1
2
3
4
5
6
7
8
9
10 #ifndef __MFD_WM831X_OTP_H__
11 #define __MFD_WM831X_OTP_H__
12
13 int wm831x_otp_init(struct wm831x *wm831x);
14 void wm831x_otp_exit(struct wm831x *wm831x);
15
16
17
18
19 #define WM831X_UNIQUE_ID_MASK 0xFFFF
20 #define WM831X_UNIQUE_ID_SHIFT 0
21 #define WM831X_UNIQUE_ID_WIDTH 16
22
23
24
25
26 #define WM831X_UNIQUE_ID_MASK 0xFFFF
27 #define WM831X_UNIQUE_ID_SHIFT 0
28 #define WM831X_UNIQUE_ID_WIDTH 16
29
30
31
32
33 #define WM831X_UNIQUE_ID_MASK 0xFFFF
34 #define WM831X_UNIQUE_ID_SHIFT 0
35 #define WM831X_UNIQUE_ID_WIDTH 16
36
37
38
39
40 #define WM831X_UNIQUE_ID_MASK 0xFFFF
41 #define WM831X_UNIQUE_ID_SHIFT 0
42 #define WM831X_UNIQUE_ID_WIDTH 16
43
44
45
46
47 #define WM831X_UNIQUE_ID_MASK 0xFFFF
48 #define WM831X_UNIQUE_ID_SHIFT 0
49 #define WM831X_UNIQUE_ID_WIDTH 16
50
51
52
53
54 #define WM831X_UNIQUE_ID_MASK 0xFFFF
55 #define WM831X_UNIQUE_ID_SHIFT 0
56 #define WM831X_UNIQUE_ID_WIDTH 16
57
58
59
60
61 #define WM831X_UNIQUE_ID_MASK 0xFFFF
62 #define WM831X_UNIQUE_ID_SHIFT 0
63 #define WM831X_UNIQUE_ID_WIDTH 16
64
65
66
67
68 #define WM831X_UNIQUE_ID_MASK 0xFFFF
69 #define WM831X_UNIQUE_ID_SHIFT 0
70 #define WM831X_UNIQUE_ID_WIDTH 16
71
72
73
74
75 #define WM831X_OTP_FACT_ID_MASK 0xFFFE
76 #define WM831X_OTP_FACT_ID_SHIFT 1
77 #define WM831X_OTP_FACT_ID_WIDTH 15
78 #define WM831X_OTP_FACT_FINAL 0x0001
79 #define WM831X_OTP_FACT_FINAL_MASK 0x0001
80 #define WM831X_OTP_FACT_FINAL_SHIFT 0
81 #define WM831X_OTP_FACT_FINAL_WIDTH 1
82
83
84
85
86 #define WM831X_DC3_TRIM_MASK 0xF000
87 #define WM831X_DC3_TRIM_SHIFT 12
88 #define WM831X_DC3_TRIM_WIDTH 4
89 #define WM831X_DC2_TRIM_MASK 0x0FC0
90 #define WM831X_DC2_TRIM_SHIFT 6
91 #define WM831X_DC2_TRIM_WIDTH 6
92 #define WM831X_DC1_TRIM_MASK 0x003F
93 #define WM831X_DC1_TRIM_SHIFT 0
94 #define WM831X_DC1_TRIM_WIDTH 6
95
96
97
98
99 #define WM831X_CHIP_ID_MASK 0xFFFF
100 #define WM831X_CHIP_ID_SHIFT 0
101 #define WM831X_CHIP_ID_WIDTH 16
102
103
104
105
106 #define WM831X_OSC_TRIM_MASK 0x0780
107 #define WM831X_OSC_TRIM_SHIFT 7
108 #define WM831X_OSC_TRIM_WIDTH 4
109 #define WM831X_BG_TRIM_MASK 0x0078
110 #define WM831X_BG_TRIM_SHIFT 3
111 #define WM831X_BG_TRIM_WIDTH 4
112 #define WM831X_LPBG_TRIM_MASK 0x0007
113 #define WM831X_LPBG_TRIM_SHIFT 0
114 #define WM831X_LPBG_TRIM_WIDTH 3
115
116
117
118
119 #define WM831X_CHILD_I2C_ADDR_MASK 0x00FE
120 #define WM831X_CHILD_I2C_ADDR_SHIFT 1
121 #define WM831X_CHILD_I2C_ADDR_WIDTH 7
122 #define WM831X_CH_AW 0x0001
123 #define WM831X_CH_AW_MASK 0x0001
124 #define WM831X_CH_AW_SHIFT 0
125 #define WM831X_CH_AW_WIDTH 1
126
127
128
129
130 #define WM831X_CHARGE_TRIM_MASK 0x003F
131 #define WM831X_CHARGE_TRIM_SHIFT 0
132 #define WM831X_CHARGE_TRIM_WIDTH 6
133
134
135
136
137 #define WM831X_OTP_AUTO_PROG 0x8000
138 #define WM831X_OTP_AUTO_PROG_MASK 0x8000
139 #define WM831X_OTP_AUTO_PROG_SHIFT 15
140 #define WM831X_OTP_AUTO_PROG_WIDTH 1
141 #define WM831X_OTP_CUST_ID_MASK 0x7FFE
142 #define WM831X_OTP_CUST_ID_SHIFT 1
143 #define WM831X_OTP_CUST_ID_WIDTH 14
144 #define WM831X_OTP_CUST_FINAL 0x0001
145 #define WM831X_OTP_CUST_FINAL_MASK 0x0001
146 #define WM831X_OTP_CUST_FINAL_SHIFT 0
147 #define WM831X_OTP_CUST_FINAL_WIDTH 1
148
149
150
151
152 #define WM831X_DBE_VALID_DATA_MASK 0xFFFF
153 #define WM831X_DBE_VALID_DATA_SHIFT 0
154 #define WM831X_DBE_VALID_DATA_WIDTH 16
155
156
157 #endif