Googler | 695f9d9 | 2023-09-11 15:38:29 +0800 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
| 2 | /* |
| 3 | * board/amlogic/txhd_skt_v1/pwm_table.c |
| 4 | * |
| 5 | * Copyright (C) 2020 Amlogic, Inc. All rights reserved. |
| 6 | * |
| 7 | */ |
| 8 | |
| 9 | #include <common.h> |
| 10 | |
| 11 | const int pwm_cal_voltage_table[][2] = { |
| 12 | { 0x1c0000, 860}, |
| 13 | { 0x1b0001, 870}, |
| 14 | { 0x1a0002, 880}, |
| 15 | { 0x190003, 890}, |
| 16 | { 0x180004, 900}, |
| 17 | { 0x170005, 910}, |
| 18 | { 0x160006, 920}, |
| 19 | { 0x150007, 930}, |
| 20 | { 0x140008, 940}, |
| 21 | { 0x130009, 950}, |
| 22 | { 0x12000a, 960}, |
| 23 | { 0x11000b, 970}, |
| 24 | { 0x10000c, 980}, |
| 25 | { 0x0f000d, 990}, |
| 26 | { 0x0e000e, 1000}, |
| 27 | { 0x0d000f, 1010}, |
| 28 | { 0x0c0010, 1020}, |
| 29 | { 0x0b0011, 1030}, |
| 30 | { 0x0a0012, 1040}, |
| 31 | { 0x090013, 1050}, |
| 32 | { 0x080014, 1060}, |
| 33 | { 0x070015, 1070}, |
| 34 | { 0x060016, 1080}, |
| 35 | { 0x050017, 1090}, |
| 36 | { 0x040018, 1100}, |
| 37 | { 0x030019, 1110}, |
| 38 | { 0x02001a, 1120}, |
| 39 | { 0x01001b, 1130}, |
| 40 | { 0x00001c, 1140} |
| 41 | }; |
| 42 | const int pwm_cal_voltage_table_ee[][2] = { |
| 43 | { 0x1c0000, 810}, |
| 44 | { 0x1b0001, 820}, |
| 45 | { 0x1a0002, 830}, |
| 46 | { 0x190003, 840}, |
| 47 | { 0x180004, 850}, |
| 48 | { 0x170005, 860}, |
| 49 | { 0x160006, 870}, |
| 50 | { 0x150007, 880}, |
| 51 | { 0x140008, 890}, |
| 52 | { 0x130009, 900}, |
| 53 | { 0x12000a, 910}, |
| 54 | { 0x11000b, 920}, |
| 55 | { 0x10000c, 930}, |
| 56 | { 0x0f000d, 940}, |
| 57 | { 0x0e000e, 950}, |
| 58 | { 0x0d000f, 960}, |
| 59 | { 0x0c0010, 970}, |
| 60 | { 0x0b0011, 980}, |
| 61 | { 0x0a0012, 990}, |
| 62 | { 0x090013, 1000}, |
| 63 | { 0x080014, 1010}, |
| 64 | { 0x070015, 1020}, |
| 65 | { 0x060016, 1030}, |
| 66 | { 0x050017, 1040}, |
| 67 | { 0x040018, 1050}, |
| 68 | { 0x030019, 1060}, |
| 69 | { 0x02001a, 1070}, |
| 70 | { 0x01001b, 1080}, |
| 71 | { 0x00001c, 1090} |
| 72 | }; |
| 73 | |
| 74 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
| 75 | |
| 76 | int pwm_cal_voltage_table_size = ARRAY_SIZE(pwm_cal_voltage_table); |
| 77 | int pwm_cal_voltage_table_ee_size = ARRAY_SIZE(pwm_cal_voltage_table_ee); |
| 78 | |
| 79 | |