blob: a1efd3f9491648d8c321edb05ed8ad20e3689376 [file] [log] [blame]
Jan Kundrát130cfb92018-05-30 15:21:16 +02001#include "armada-388-clearfog-base.dts"
2
3&w25q32 {
4 status = "okay";
5};
6
7/ {
8 clocks {
9 spi_uart_clk: osc_max14830 {
10 compatible = "fixed-clock";
11 #clock-cells = <0>;
12 clock-frequency = <3686400>;
13 };
14 };
15
16 soc {
17 internal-regs {
18 sdhci@d8000 {
19 /delete-property/ cd-gpios;
20 broken-cd;
21 };
22 };
23 };
24
25 gpio_i2c {
26 compatible = "i2c-gpio";
27 sda-gpios = <&gpio0 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
28 scl-gpios = <&gpio0 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
29 i2c-gpio.delay-us = <1>;
30 #address-cells = <1>;
31 #size-cells = <0>;
32 };
Jan Kundrát130cfb92018-05-30 15:21:16 +020033};
34
35&uart1_pins {
36 status = "disabled";
37};
38
39&uart1 {
40 status = "disabled";
41};
42
43&gpio1 {
44 spi_int {
45 /* MPP54: this needs an external pull-up */
46 gpio-hog;
47 gpios = <22 GPIO_ACTIVE_HIGH>;
48 input;
49 line-name = "SPI-INT";
50 };
51};
52
53&spi1 {
54 cs-gpios = <0>, <&gpio0 22 GPIO_ACTIVE_HIGH>, <0>, <&gpio0 29 GPIO_ACTIVE_HIGH>;
55
56 max14830: max14830@2 {
57 compatible = "maxim,max14830";
58 reg = <2>;
59 clocks = <&spi_uart_clk>;
60 clock-names = "xtal";
61 interrupt-parent = <&gpio1>;
62 interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
63 gpio-controller;
64 #gpio-cells = <2>;
65 spi-max-frequency = <26000000>;
66
67 gpio-line-names =
68 "WSS_HWRST",
69 "WSS_SSD",
70 "OCM_HS_IN",
71 "OCM_RESET",
72 "WSS_MRST",
Jan Kundrát6406d512020-11-18 18:24:36 +010073#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +020074 "I2C_XOR_ENABLE",
75 "I2C_XORH",
76 "I2C_BB_ENABLE",
Jan Kundrát8f3357f2018-08-08 14:16:32 +020077 "GPIO_K6",
Jan Kundrát6406d512020-11-18 18:24:36 +010078#else
79
80 "",
81 "",
82 "",
83 "",
84#endif
Jan Kundrát8f3357f2018-08-08 14:16:32 +020085 "",
86 "",
Jan Kundrátdb943222018-06-19 20:51:30 +020087 "EDFA1_AMP_DISABLE",
88 "EDFA2_AMP_DISABLE",
89 "EDFA1_OUT_POWER_MUTE",
90 "EDFA2_OUT_POWER_MUTE",
Jan Kundrát93d79222018-06-19 20:45:35 +020091 "EXP_GPIO1"
Jan Kundrát130cfb92018-05-30 15:21:16 +020092 ;
Jan Kundrátd014bb92018-06-08 21:35:21 +020093
Jan Kundrát6406d512020-11-18 18:24:36 +010094#ifdef CLEARFOG_REV1
Jan Kundrátd014bb92018-06-08 21:35:21 +020095 i2c_bitbang_enable {
96 gpio-hog;
97 gpios = <7 GPIO_ACTIVE_HIGH>;
Jan Kundrátd014bb92018-06-08 21:35:21 +020098 output-high;
Jan Kundrátd014bb92018-06-08 21:35:21 +020099 line-name = "I2C bitbang bus";
100 };
101
102 i2c_xor_high {
103 gpio-hog;
104 gpios = <6 GPIO_ACTIVE_HIGH>;
Jan Kundrát1e866c62018-07-04 19:54:30 +0200105 output-high; // XOR byte 0b1001111
Jan Kundrátd014bb92018-06-08 21:35:21 +0200106 line-name = "I2C XOR high";
107 };
108
109 i2c_xor_enable {
110 gpio-hog;
111 gpios = <5 GPIO_ACTIVE_HIGH>;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200112 output-low;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200113 line-name = "I2C addr xlate";
114 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100115#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200116 };
117
118 gpio_spi_chips: gpio@1 {
119 compatible = "microchip,mcp23s17";
120 reg = <1>;
121 interrupt-parent = <&gpio1>;
122 interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
123 interrupt-controller;
124 #interrupt-cells = <2>;
125 gpio-controller;
126 #gpio-cells = <2>;
127 microchip,spi-present-mask = <0x06>; /* extra addresses 1 and 2 */
128 microchip,irq-mirror;
129 drive-open-drain;
130 spi-max-frequency = <10000000>;
131
132 // FIXME: this naming is incompatible with that hack which makes these devices visible as 2*16pin standalone chips
133 gpio-bank@1 {
134 address = <1>;
135 gpio-line-names =
136 "EDFA1_RESET",
137 "EDFA2_RESET",
138 "PMB_ALERT",
Jan Kundrát6406d512020-11-18 18:24:36 +0100139#ifdef CLEARFOG_REV1
Jan Kundrát93d79222018-06-19 20:45:35 +0200140 "EXP_GPIO2",
Jan Kundrát6406d512020-11-18 18:24:36 +0100141#else
142 "GND",
143#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200144 "WSS_SC",
145 "WSS_RST",
Jan Kundrát6406d512020-11-18 18:24:36 +0100146#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200147 "I2C_XOR_RDY",
Jan Kundrát6406d512020-11-18 18:24:36 +0100148#else
149 "GND",
150#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200151 "OCM_HS_OUT",
152
Jan Kundrátdb943222018-06-19 20:51:30 +0200153 "EDFA1_OUT_REFLECT_A",
154 "EDFA1_PUMP_CURRENT_A",
155 "EDFA1_ST1_IN_LOS_A",
156 "EDFA1_ST2_IN_LOS_A",
157 "EDFA1_ST2_OUT_GAIN_A",
158 "EDFA1_CASE_TEMP_A",
159 "EDFA1_ST1_OUT_GAIN_A",
160 "EDFA1_PUMP_TEMP_A";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200161 };
162
163 gpio-bank@2 {
164 address = <2>;
165 gpio-line-names =
Jan Kundrát6406d512020-11-18 18:24:36 +0100166#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200167 "GND",
168 "GND",
Jan Kundrát6406d512020-11-18 18:24:36 +0100169#else
170 "OCM_READY",
171 "OCM_ALARM",
172#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200173 "GND",
174 "GND",
175 "GND",
176 "GND",
177 "GND",
178 "GND",
179
Jan Kundrátdb943222018-06-19 20:51:30 +0200180 "EDFA2_OUT_REFLECT_A",
181 "EDFA2_PUMP_CURRENT_A",
182 "EDFA2_ST1_IN_LOS_A",
183 "EDFA2_ST2_IN_LOS_A",
184 "EDFA2_ST2_OUT_GAIN_A",
185 "EDFA2_CASE_TEMP_A",
186 "EDFA2_ST1_OUT_GAIN_A",
187 "EDFA2_PUMP_TEMP_A";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200188 };
Jan Kundrát1e866c62018-07-04 19:54:30 +0200189
Jan Kundrát6406d512020-11-18 18:24:36 +0100190#ifdef CLEARFOG_REV1
Jan Kundrát6eb5a022018-08-20 14:55:33 +0200191 // FIXME: this hogs both .1 and .2 chips' #6 pin...
Jan Kundrát1e866c62018-07-04 19:54:30 +0200192 i2c_xor_ready {
193 gpio-hog;
194 gpios = <6 GPIO_ACTIVE_HIGH>;
195 input;
196 line-name = "I2C XOR ready";
197 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100198#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200199 };
200
Jan Kundrát51c34e12019-04-04 21:00:19 +0200201 lumentum_ocm: lumentum-ocm@3 {
Jan Kundrát463be652018-09-20 23:44:04 +0200202 compatible = "lumentum-ocm";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200203 reg = <3>;
204 spi-max-frequency = <12000000>;
205 // The SPI slave is CPOL=1, but the rest of the devices is CPOL=0 and our SPI master
206 // appears to have troubles with CPOL=1 toggling -> let's use a physical inverter
Jan Kundrát130cfb92018-05-30 15:21:16 +0200207 };
208};
209
210&i2c1 {
Jan Kundrát6406d512020-11-18 18:24:36 +0100211#ifdef CLEARFOG_REV1
Jan Kundrátd5129092018-06-11 18:12:37 +0200212 eeprom@53 {
Jan Kundrát130cfb92018-05-30 15:21:16 +0200213 compatible = "atmel,24c128";
Jan Kundrátd5129092018-06-11 18:12:37 +0200214 reg = <0x53>;
Jan Kundrát130cfb92018-05-30 15:21:16 +0200215 pagesize = <64>;
Jan Kundrátd9af6aa2018-06-06 14:27:23 +0200216 // There's no read-only parameter because we want to enable flashing the EEPROM by
217 // installing a physical jumper. It doesn't matter that Linux still considers this
218 // device as writable during normal operation because any write fill fail anyway
219 // on the HW level. At least we can install that jumper and make the writes pass
220 // magically without fiddling with the DT and rebooting.
Jan Kundrát130cfb92018-05-30 15:21:16 +0200221 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100222#else
223 temperature@48 {
224 compatible = "ti,tmp175";
225 reg = <0x48>;
226 };
227
228 // 24CSxx is treated as two separate devices
229 eeprom@53 {
230 compatible = "atmel,24c64";
231 reg = <0x53>;
232 };
233 eeprom@5b {
234 compatible = "atmel,24cs64";
235 reg = <0x5b>;
236 };
237#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200238
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200239 tlc59116@60 {
240 #address-cells = <1>;
241 #size-cells = <0>;
242 #gpio-cells = <2>;
243 compatible = "ti,tlc59116";
244 reg = <0x60>;
245
246 sfp_red@0 {
247 label = "sfp:red";
248 reg = <0>;
249 };
250
251 sfp_green@1 {
252 label = "sfp:green";
253 reg = <1>;
254 };
255
256 sfp_blue@2 {
257 label = "sfp:blue";
258 reg = <2>;
259 };
260
Jan Kundrát079dd672019-04-04 19:51:45 +0200261 // OUT3 remains unused
262
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200263 line_red@4 {
264 label = "line:red";
265 reg = <4>;
266 };
267
268 line_green@5 {
269 label = "line:green";
270 reg = <5>;
271 };
272
273 line_blue@6 {
274 label = "line:blue";
275 reg = <6>;
276 };
277
Jan Kundrát079dd672019-04-04 19:51:45 +0200278 led5_red@7 {
279 label = "led5:red";
280 reg = <7>;
281 };
282
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200283 status_red@8 {
284 label = "status:red";
285 reg = <8>;
286 };
287
288 status_green@9 {
289 label = "status:green";
290 reg = <9>;
291 linux,default-trigger = "timer";
292 };
293
294 status_blue@10 {
295 label = "status:blue";
296 reg = <10>;
297 };
298
Jan Kundrát079dd672019-04-04 19:51:45 +0200299 led5_green@11 {
300 label = "led5:green";
301 reg = <11>;
302 };
303
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200304 uid_red@12 {
305 label = "uid:red";
306 reg = <12>;
307 };
308
309 uid_green@13 {
310 label = "uid:green";
311 reg = <13>;
312 };
313
314 uid_blue@14 {
315 label = "uid:blue";
316 reg = <14>;
317 };
Jan Kundrát079dd672019-04-04 19:51:45 +0200318
319 led5_blue@15 {
320 label = "led5:blue";
321 reg = <15>;
322 };
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200323 };
324
Jan Kundrát6406d512020-11-18 18:24:36 +0100325#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200326 /* ADT7463: it doesn't use the DT */
Jan Kundrát6406d512020-11-18 18:24:36 +0100327#else
328 temperature@49 {
329 compatible = "ti,tmp175";
330 reg = <0x49>;
331 };
332
333 fancontrol@20 {
334 compatible = "maxim,max31790";
335 reg = <0x20>;
336 };
337
338 // 24CSxx is treated as two separate devices
339 eeprom@54 {
340 compatible = "atmel,24c64";
341 reg = <0x54>;
342 };
343 eeprom@5c {
344 compatible = "atmel,24cs64";
345 reg = <0x5c>;
346 };
347#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200348};