blob: c502435db58e5dacba0f90afb2c2479144660c2e [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
Václav Kubernátf1b92ff2021-03-24 07:41:23 +010025 gpio_i2c: gpio_i2c {
Jan Kundrát130cfb92018-05-30 15:21:16 +020026 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>;
Jan Kundrátbf1e0912021-03-05 12:45:23 +010032 pinctrl-names = "default";
33 pinctrl-0 = <&uart1_pins_i2c_bb>;
Jan Kundrát130cfb92018-05-30 15:21:16 +020034 };
Jan Kundrát130cfb92018-05-30 15:21:16 +020035};
36
Václav Kubernátf1b92ff2021-03-24 07:41:23 +010037&gpio_i2c {
38 pdu@25 {
39 compatible = "fsp,yh5151e";
40 reg = <0x25>;
41 };
42};
43
Jan Kundrátbf1e0912021-03-05 12:45:23 +010044&pinctrl {
45 uart1_pins_i2c_bb: uart1-pins-i2c-bb {
46 marvell,pins = "mpp24", "mpp25";
47 marvell,function = "gpio";
48 };
Jan Kundrátf281b0c2022-01-28 18:23:09 +010049
50 clearfog_i2c1_recovery_pins: clearfog-i2c1-recovery-pins {
51 marvell,pins = "mpp26", "mpp27";
52 marvell,function = "gpio";
53 };
Jan Kundrátbf1e0912021-03-05 12:45:23 +010054};
55
56&mikro_uart_pins {
Jan Kundrát130cfb92018-05-30 15:21:16 +020057 status = "disabled";
58};
59
60&uart1 {
61 status = "disabled";
62};
63
64&gpio1 {
65 spi_int {
66 /* MPP54: this needs an external pull-up */
67 gpio-hog;
68 gpios = <22 GPIO_ACTIVE_HIGH>;
69 input;
70 line-name = "SPI-INT";
71 };
72};
73
74&spi1 {
75 cs-gpios = <0>, <&gpio0 22 GPIO_ACTIVE_HIGH>, <0>, <&gpio0 29 GPIO_ACTIVE_HIGH>;
76
77 max14830: max14830@2 {
78 compatible = "maxim,max14830";
79 reg = <2>;
80 clocks = <&spi_uart_clk>;
81 clock-names = "xtal";
82 interrupt-parent = <&gpio1>;
83 interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
84 gpio-controller;
85 #gpio-cells = <2>;
86 spi-max-frequency = <26000000>;
87
88 gpio-line-names =
89 "WSS_HWRST",
90 "WSS_SSD",
91 "OCM_HS_IN",
92 "OCM_RESET",
93 "WSS_MRST",
Jan Kundrát6406d512020-11-18 18:24:36 +010094#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +020095 "I2C_XOR_ENABLE",
96 "I2C_XORH",
97 "I2C_BB_ENABLE",
Jan Kundrát8f3357f2018-08-08 14:16:32 +020098 "GPIO_K6",
Jan Kundrát6406d512020-11-18 18:24:36 +010099#else
100
101 "",
102 "",
103 "",
104 "",
105#endif
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200106 "",
107 "",
Jan Kundrátdb943222018-06-19 20:51:30 +0200108 "EDFA1_AMP_DISABLE",
109 "EDFA2_AMP_DISABLE",
110 "EDFA1_OUT_POWER_MUTE",
111 "EDFA2_OUT_POWER_MUTE",
Jan Kundrát93d79222018-06-19 20:45:35 +0200112 "EXP_GPIO1"
Jan Kundrát130cfb92018-05-30 15:21:16 +0200113 ;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200114
Jan Kundrát6406d512020-11-18 18:24:36 +0100115#ifdef CLEARFOG_REV1
Jan Kundrátd014bb92018-06-08 21:35:21 +0200116 i2c_bitbang_enable {
117 gpio-hog;
118 gpios = <7 GPIO_ACTIVE_HIGH>;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200119 output-high;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200120 line-name = "I2C bitbang bus";
121 };
122
123 i2c_xor_high {
124 gpio-hog;
125 gpios = <6 GPIO_ACTIVE_HIGH>;
Jan Kundrát1e866c62018-07-04 19:54:30 +0200126 output-high; // XOR byte 0b1001111
Jan Kundrátd014bb92018-06-08 21:35:21 +0200127 line-name = "I2C XOR high";
128 };
129
130 i2c_xor_enable {
131 gpio-hog;
132 gpios = <5 GPIO_ACTIVE_HIGH>;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200133 output-low;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200134 line-name = "I2C addr xlate";
135 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100136#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200137 };
138
139 gpio_spi_chips: gpio@1 {
140 compatible = "microchip,mcp23s17";
141 reg = <1>;
142 interrupt-parent = <&gpio1>;
143 interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
144 interrupt-controller;
145 #interrupt-cells = <2>;
146 gpio-controller;
147 #gpio-cells = <2>;
148 microchip,spi-present-mask = <0x06>; /* extra addresses 1 and 2 */
149 microchip,irq-mirror;
150 drive-open-drain;
151 spi-max-frequency = <10000000>;
152
153 // FIXME: this naming is incompatible with that hack which makes these devices visible as 2*16pin standalone chips
154 gpio-bank@1 {
155 address = <1>;
156 gpio-line-names =
157 "EDFA1_RESET",
158 "EDFA2_RESET",
159 "PMB_ALERT",
Jan Kundrát6406d512020-11-18 18:24:36 +0100160#ifdef CLEARFOG_REV1
Jan Kundrát93d79222018-06-19 20:45:35 +0200161 "EXP_GPIO2",
Jan Kundrát6406d512020-11-18 18:24:36 +0100162#else
163 "GND",
164#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200165 "WSS_SC",
166 "WSS_RST",
Jan Kundrát6406d512020-11-18 18:24:36 +0100167#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200168 "I2C_XOR_RDY",
Jan Kundrát6406d512020-11-18 18:24:36 +0100169#else
170 "GND",
171#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200172 "OCM_HS_OUT",
173
Jan Kundrátdb943222018-06-19 20:51:30 +0200174 "EDFA1_OUT_REFLECT_A",
175 "EDFA1_PUMP_CURRENT_A",
176 "EDFA1_ST1_IN_LOS_A",
177 "EDFA1_ST2_IN_LOS_A",
178 "EDFA1_ST2_OUT_GAIN_A",
179 "EDFA1_CASE_TEMP_A",
180 "EDFA1_ST1_OUT_GAIN_A",
181 "EDFA1_PUMP_TEMP_A";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200182 };
183
184 gpio-bank@2 {
185 address = <2>;
186 gpio-line-names =
Jan Kundrát6406d512020-11-18 18:24:36 +0100187#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200188 "GND",
189 "GND",
Jan Kundrát6406d512020-11-18 18:24:36 +0100190#else
191 "OCM_READY",
192 "OCM_ALARM",
193#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200194 "GND",
195 "GND",
196 "GND",
197 "GND",
198 "GND",
199 "GND",
200
Jan Kundrátdb943222018-06-19 20:51:30 +0200201 "EDFA2_OUT_REFLECT_A",
202 "EDFA2_PUMP_CURRENT_A",
203 "EDFA2_ST1_IN_LOS_A",
204 "EDFA2_ST2_IN_LOS_A",
205 "EDFA2_ST2_OUT_GAIN_A",
206 "EDFA2_CASE_TEMP_A",
207 "EDFA2_ST1_OUT_GAIN_A",
208 "EDFA2_PUMP_TEMP_A";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200209 };
Jan Kundrát1e866c62018-07-04 19:54:30 +0200210
Jan Kundrát6406d512020-11-18 18:24:36 +0100211#ifdef CLEARFOG_REV1
Jan Kundrát6eb5a022018-08-20 14:55:33 +0200212 // FIXME: this hogs both .1 and .2 chips' #6 pin...
Jan Kundrát1e866c62018-07-04 19:54:30 +0200213 i2c_xor_ready {
214 gpio-hog;
215 gpios = <6 GPIO_ACTIVE_HIGH>;
216 input;
217 line-name = "I2C XOR ready";
218 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100219#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200220 };
221
Jan Kundrát51c34e12019-04-04 21:00:19 +0200222 lumentum_ocm: lumentum-ocm@3 {
Jan Kundrát463be652018-09-20 23:44:04 +0200223 compatible = "lumentum-ocm";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200224 reg = <3>;
225 spi-max-frequency = <12000000>;
226 // The SPI slave is CPOL=1, but the rest of the devices is CPOL=0 and our SPI master
227 // appears to have troubles with CPOL=1 toggling -> let's use a physical inverter
Jan Kundrát130cfb92018-05-30 15:21:16 +0200228 };
229};
230
231&i2c1 {
Jan Kundrátf281b0c2022-01-28 18:23:09 +0100232 pinctrl-names = "default", "gpio";
233 pinctrl-1 = <&clearfog_i2c1_recovery_pins>;
234 single-master;
235 scl-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
236 sda-gpios = <&gpio0 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
237
Jan Kundrát6406d512020-11-18 18:24:36 +0100238#ifdef CLEARFOG_REV1
Jan Kundrátd5129092018-06-11 18:12:37 +0200239 eeprom@53 {
Jan Kundrát130cfb92018-05-30 15:21:16 +0200240 compatible = "atmel,24c128";
Jan Kundrátd5129092018-06-11 18:12:37 +0200241 reg = <0x53>;
Jan Kundrát130cfb92018-05-30 15:21:16 +0200242 pagesize = <64>;
Jan Kundrátd9af6aa2018-06-06 14:27:23 +0200243 // There's no read-only parameter because we want to enable flashing the EEPROM by
244 // installing a physical jumper. It doesn't matter that Linux still considers this
245 // device as writable during normal operation because any write fill fail anyway
246 // on the HW level. At least we can install that jumper and make the writes pass
247 // magically without fiddling with the DT and rebooting.
Jan Kundrát130cfb92018-05-30 15:21:16 +0200248 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100249#else
250 temperature@48 {
251 compatible = "ti,tmp175";
252 reg = <0x48>;
253 };
254
255 // 24CSxx is treated as two separate devices
256 eeprom@53 {
257 compatible = "atmel,24c64";
258 reg = <0x53>;
259 };
260 eeprom@5b {
261 compatible = "atmel,24cs64";
262 reg = <0x5b>;
263 };
264#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200265
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200266 tlc59116@60 {
267 #address-cells = <1>;
268 #size-cells = <0>;
269 #gpio-cells = <2>;
270 compatible = "ti,tlc59116";
271 reg = <0x60>;
272
273 sfp_red@0 {
274 label = "sfp:red";
275 reg = <0>;
276 };
277
278 sfp_green@1 {
279 label = "sfp:green";
280 reg = <1>;
281 };
282
283 sfp_blue@2 {
284 label = "sfp:blue";
285 reg = <2>;
286 };
287
Jan Kundrát079dd672019-04-04 19:51:45 +0200288 // OUT3 remains unused
289
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200290 line_red@4 {
291 label = "line:red";
292 reg = <4>;
293 };
294
295 line_green@5 {
296 label = "line:green";
297 reg = <5>;
298 };
299
300 line_blue@6 {
301 label = "line:blue";
302 reg = <6>;
303 };
304
Jan Kundrát079dd672019-04-04 19:51:45 +0200305 led5_red@7 {
306 label = "led5:red";
307 reg = <7>;
308 };
309
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200310 status_red@8 {
311 label = "status:red";
312 reg = <8>;
313 };
314
315 status_green@9 {
316 label = "status:green";
317 reg = <9>;
318 linux,default-trigger = "timer";
319 };
320
321 status_blue@10 {
322 label = "status:blue";
323 reg = <10>;
324 };
325
Jan Kundrát079dd672019-04-04 19:51:45 +0200326 led5_green@11 {
327 label = "led5:green";
328 reg = <11>;
329 };
330
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200331 uid_red@12 {
332 label = "uid:red";
333 reg = <12>;
334 };
335
336 uid_green@13 {
337 label = "uid:green";
338 reg = <13>;
339 };
340
341 uid_blue@14 {
342 label = "uid:blue";
343 reg = <14>;
344 };
Jan Kundrát079dd672019-04-04 19:51:45 +0200345
346 led5_blue@15 {
347 label = "led5:blue";
348 reg = <15>;
349 };
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200350 };
351
Jan Kundrát6406d512020-11-18 18:24:36 +0100352#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200353 /* ADT7463: it doesn't use the DT */
Jan Kundrát6406d512020-11-18 18:24:36 +0100354#else
355 temperature@49 {
356 compatible = "ti,tmp175";
357 reg = <0x49>;
358 };
359
360 fancontrol@20 {
361 compatible = "maxim,max31790";
362 reg = <0x20>;
363 };
364
365 // 24CSxx is treated as two separate devices
366 eeprom@54 {
367 compatible = "atmel,24c64";
368 reg = <0x54>;
369 };
370 eeprom@5c {
371 compatible = "atmel,24cs64";
372 reg = <0x5c>;
373 };
374#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200375};