blob: 32255a36938b7b068cf20496edfdb1c7d091524d [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>;
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
Jan Kundrátbf1e0912021-03-05 12:45:23 +010037&pinctrl {
38 uart1_pins_i2c_bb: uart1-pins-i2c-bb {
39 marvell,pins = "mpp24", "mpp25";
40 marvell,function = "gpio";
41 };
42};
43
44&mikro_uart_pins {
Jan Kundrát130cfb92018-05-30 15:21:16 +020045 status = "disabled";
46};
47
48&uart1 {
49 status = "disabled";
50};
51
52&gpio1 {
53 spi_int {
54 /* MPP54: this needs an external pull-up */
55 gpio-hog;
56 gpios = <22 GPIO_ACTIVE_HIGH>;
57 input;
58 line-name = "SPI-INT";
59 };
60};
61
62&spi1 {
63 cs-gpios = <0>, <&gpio0 22 GPIO_ACTIVE_HIGH>, <0>, <&gpio0 29 GPIO_ACTIVE_HIGH>;
64
65 max14830: max14830@2 {
66 compatible = "maxim,max14830";
67 reg = <2>;
68 clocks = <&spi_uart_clk>;
69 clock-names = "xtal";
70 interrupt-parent = <&gpio1>;
71 interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
72 gpio-controller;
73 #gpio-cells = <2>;
74 spi-max-frequency = <26000000>;
75
76 gpio-line-names =
77 "WSS_HWRST",
78 "WSS_SSD",
79 "OCM_HS_IN",
80 "OCM_RESET",
81 "WSS_MRST",
Jan Kundrát6406d512020-11-18 18:24:36 +010082#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +020083 "I2C_XOR_ENABLE",
84 "I2C_XORH",
85 "I2C_BB_ENABLE",
Jan Kundrát8f3357f2018-08-08 14:16:32 +020086 "GPIO_K6",
Jan Kundrát6406d512020-11-18 18:24:36 +010087#else
88
89 "",
90 "",
91 "",
92 "",
93#endif
Jan Kundrát8f3357f2018-08-08 14:16:32 +020094 "",
95 "",
Jan Kundrátdb943222018-06-19 20:51:30 +020096 "EDFA1_AMP_DISABLE",
97 "EDFA2_AMP_DISABLE",
98 "EDFA1_OUT_POWER_MUTE",
99 "EDFA2_OUT_POWER_MUTE",
Jan Kundrát93d79222018-06-19 20:45:35 +0200100 "EXP_GPIO1"
Jan Kundrát130cfb92018-05-30 15:21:16 +0200101 ;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200102
Jan Kundrát6406d512020-11-18 18:24:36 +0100103#ifdef CLEARFOG_REV1
Jan Kundrátd014bb92018-06-08 21:35:21 +0200104 i2c_bitbang_enable {
105 gpio-hog;
106 gpios = <7 GPIO_ACTIVE_HIGH>;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200107 output-high;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200108 line-name = "I2C bitbang bus";
109 };
110
111 i2c_xor_high {
112 gpio-hog;
113 gpios = <6 GPIO_ACTIVE_HIGH>;
Jan Kundrát1e866c62018-07-04 19:54:30 +0200114 output-high; // XOR byte 0b1001111
Jan Kundrátd014bb92018-06-08 21:35:21 +0200115 line-name = "I2C XOR high";
116 };
117
118 i2c_xor_enable {
119 gpio-hog;
120 gpios = <5 GPIO_ACTIVE_HIGH>;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200121 output-low;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200122 line-name = "I2C addr xlate";
123 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100124#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200125 };
126
127 gpio_spi_chips: gpio@1 {
128 compatible = "microchip,mcp23s17";
129 reg = <1>;
130 interrupt-parent = <&gpio1>;
131 interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
132 interrupt-controller;
133 #interrupt-cells = <2>;
134 gpio-controller;
135 #gpio-cells = <2>;
136 microchip,spi-present-mask = <0x06>; /* extra addresses 1 and 2 */
137 microchip,irq-mirror;
138 drive-open-drain;
139 spi-max-frequency = <10000000>;
140
141 // FIXME: this naming is incompatible with that hack which makes these devices visible as 2*16pin standalone chips
142 gpio-bank@1 {
143 address = <1>;
144 gpio-line-names =
145 "EDFA1_RESET",
146 "EDFA2_RESET",
147 "PMB_ALERT",
Jan Kundrát6406d512020-11-18 18:24:36 +0100148#ifdef CLEARFOG_REV1
Jan Kundrát93d79222018-06-19 20:45:35 +0200149 "EXP_GPIO2",
Jan Kundrát6406d512020-11-18 18:24:36 +0100150#else
151 "GND",
152#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200153 "WSS_SC",
154 "WSS_RST",
Jan Kundrát6406d512020-11-18 18:24:36 +0100155#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200156 "I2C_XOR_RDY",
Jan Kundrát6406d512020-11-18 18:24:36 +0100157#else
158 "GND",
159#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200160 "OCM_HS_OUT",
161
Jan Kundrátdb943222018-06-19 20:51:30 +0200162 "EDFA1_OUT_REFLECT_A",
163 "EDFA1_PUMP_CURRENT_A",
164 "EDFA1_ST1_IN_LOS_A",
165 "EDFA1_ST2_IN_LOS_A",
166 "EDFA1_ST2_OUT_GAIN_A",
167 "EDFA1_CASE_TEMP_A",
168 "EDFA1_ST1_OUT_GAIN_A",
169 "EDFA1_PUMP_TEMP_A";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200170 };
171
172 gpio-bank@2 {
173 address = <2>;
174 gpio-line-names =
Jan Kundrát6406d512020-11-18 18:24:36 +0100175#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200176 "GND",
177 "GND",
Jan Kundrát6406d512020-11-18 18:24:36 +0100178#else
179 "OCM_READY",
180 "OCM_ALARM",
181#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200182 "GND",
183 "GND",
184 "GND",
185 "GND",
186 "GND",
187 "GND",
188
Jan Kundrátdb943222018-06-19 20:51:30 +0200189 "EDFA2_OUT_REFLECT_A",
190 "EDFA2_PUMP_CURRENT_A",
191 "EDFA2_ST1_IN_LOS_A",
192 "EDFA2_ST2_IN_LOS_A",
193 "EDFA2_ST2_OUT_GAIN_A",
194 "EDFA2_CASE_TEMP_A",
195 "EDFA2_ST1_OUT_GAIN_A",
196 "EDFA2_PUMP_TEMP_A";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200197 };
Jan Kundrát1e866c62018-07-04 19:54:30 +0200198
Jan Kundrát6406d512020-11-18 18:24:36 +0100199#ifdef CLEARFOG_REV1
Jan Kundrát6eb5a022018-08-20 14:55:33 +0200200 // FIXME: this hogs both .1 and .2 chips' #6 pin...
Jan Kundrát1e866c62018-07-04 19:54:30 +0200201 i2c_xor_ready {
202 gpio-hog;
203 gpios = <6 GPIO_ACTIVE_HIGH>;
204 input;
205 line-name = "I2C XOR ready";
206 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100207#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200208 };
209
Jan Kundrát51c34e12019-04-04 21:00:19 +0200210 lumentum_ocm: lumentum-ocm@3 {
Jan Kundrát463be652018-09-20 23:44:04 +0200211 compatible = "lumentum-ocm";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200212 reg = <3>;
213 spi-max-frequency = <12000000>;
214 // The SPI slave is CPOL=1, but the rest of the devices is CPOL=0 and our SPI master
215 // appears to have troubles with CPOL=1 toggling -> let's use a physical inverter
Jan Kundrát130cfb92018-05-30 15:21:16 +0200216 };
217};
218
219&i2c1 {
Jan Kundrát6406d512020-11-18 18:24:36 +0100220#ifdef CLEARFOG_REV1
Jan Kundrátd5129092018-06-11 18:12:37 +0200221 eeprom@53 {
Jan Kundrát130cfb92018-05-30 15:21:16 +0200222 compatible = "atmel,24c128";
Jan Kundrátd5129092018-06-11 18:12:37 +0200223 reg = <0x53>;
Jan Kundrát130cfb92018-05-30 15:21:16 +0200224 pagesize = <64>;
Jan Kundrátd9af6aa2018-06-06 14:27:23 +0200225 // There's no read-only parameter because we want to enable flashing the EEPROM by
226 // installing a physical jumper. It doesn't matter that Linux still considers this
227 // device as writable during normal operation because any write fill fail anyway
228 // on the HW level. At least we can install that jumper and make the writes pass
229 // magically without fiddling with the DT and rebooting.
Jan Kundrát130cfb92018-05-30 15:21:16 +0200230 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100231#else
232 temperature@48 {
233 compatible = "ti,tmp175";
234 reg = <0x48>;
235 };
236
237 // 24CSxx is treated as two separate devices
238 eeprom@53 {
239 compatible = "atmel,24c64";
240 reg = <0x53>;
241 };
242 eeprom@5b {
243 compatible = "atmel,24cs64";
244 reg = <0x5b>;
245 };
246#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200247
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200248 tlc59116@60 {
249 #address-cells = <1>;
250 #size-cells = <0>;
251 #gpio-cells = <2>;
252 compatible = "ti,tlc59116";
253 reg = <0x60>;
254
255 sfp_red@0 {
256 label = "sfp:red";
257 reg = <0>;
258 };
259
260 sfp_green@1 {
261 label = "sfp:green";
262 reg = <1>;
263 };
264
265 sfp_blue@2 {
266 label = "sfp:blue";
267 reg = <2>;
268 };
269
Jan Kundrát079dd672019-04-04 19:51:45 +0200270 // OUT3 remains unused
271
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200272 line_red@4 {
273 label = "line:red";
274 reg = <4>;
275 };
276
277 line_green@5 {
278 label = "line:green";
279 reg = <5>;
280 };
281
282 line_blue@6 {
283 label = "line:blue";
284 reg = <6>;
285 };
286
Jan Kundrát079dd672019-04-04 19:51:45 +0200287 led5_red@7 {
288 label = "led5:red";
289 reg = <7>;
290 };
291
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200292 status_red@8 {
293 label = "status:red";
294 reg = <8>;
295 };
296
297 status_green@9 {
298 label = "status:green";
299 reg = <9>;
300 linux,default-trigger = "timer";
301 };
302
303 status_blue@10 {
304 label = "status:blue";
305 reg = <10>;
306 };
307
Jan Kundrát079dd672019-04-04 19:51:45 +0200308 led5_green@11 {
309 label = "led5:green";
310 reg = <11>;
311 };
312
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200313 uid_red@12 {
314 label = "uid:red";
315 reg = <12>;
316 };
317
318 uid_green@13 {
319 label = "uid:green";
320 reg = <13>;
321 };
322
323 uid_blue@14 {
324 label = "uid:blue";
325 reg = <14>;
326 };
Jan Kundrát079dd672019-04-04 19:51:45 +0200327
328 led5_blue@15 {
329 label = "led5:blue";
330 reg = <15>;
331 };
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200332 };
333
Jan Kundrát6406d512020-11-18 18:24:36 +0100334#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200335 /* ADT7463: it doesn't use the DT */
Jan Kundrát6406d512020-11-18 18:24:36 +0100336#else
337 temperature@49 {
338 compatible = "ti,tmp175";
339 reg = <0x49>;
340 };
341
342 fancontrol@20 {
343 compatible = "maxim,max31790";
344 reg = <0x20>;
345 };
346
347 // 24CSxx is treated as two separate devices
348 eeprom@54 {
349 compatible = "atmel,24c64";
350 reg = <0x54>;
351 };
352 eeprom@5c {
353 compatible = "atmel,24cs64";
354 reg = <0x5c>;
355 };
356#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200357};