blob: 6a8715a03cc755c2e579d361922df13676f646b5 [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 };
49};
50
51&mikro_uart_pins {
Jan Kundrát130cfb92018-05-30 15:21:16 +020052 status = "disabled";
53};
54
55&uart1 {
56 status = "disabled";
57};
58
59&gpio1 {
60 spi_int {
61 /* MPP54: this needs an external pull-up */
62 gpio-hog;
63 gpios = <22 GPIO_ACTIVE_HIGH>;
64 input;
65 line-name = "SPI-INT";
66 };
67};
68
69&spi1 {
70 cs-gpios = <0>, <&gpio0 22 GPIO_ACTIVE_HIGH>, <0>, <&gpio0 29 GPIO_ACTIVE_HIGH>;
71
72 max14830: max14830@2 {
73 compatible = "maxim,max14830";
74 reg = <2>;
75 clocks = <&spi_uart_clk>;
76 clock-names = "xtal";
77 interrupt-parent = <&gpio1>;
78 interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
79 gpio-controller;
80 #gpio-cells = <2>;
81 spi-max-frequency = <26000000>;
82
83 gpio-line-names =
84 "WSS_HWRST",
85 "WSS_SSD",
86 "OCM_HS_IN",
87 "OCM_RESET",
88 "WSS_MRST",
Jan Kundrát6406d512020-11-18 18:24:36 +010089#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +020090 "I2C_XOR_ENABLE",
91 "I2C_XORH",
92 "I2C_BB_ENABLE",
Jan Kundrát8f3357f2018-08-08 14:16:32 +020093 "GPIO_K6",
Jan Kundrát6406d512020-11-18 18:24:36 +010094#else
95
96 "",
97 "",
98 "",
99 "",
100#endif
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200101 "",
102 "",
Jan Kundrátdb943222018-06-19 20:51:30 +0200103 "EDFA1_AMP_DISABLE",
104 "EDFA2_AMP_DISABLE",
105 "EDFA1_OUT_POWER_MUTE",
106 "EDFA2_OUT_POWER_MUTE",
Jan Kundrát93d79222018-06-19 20:45:35 +0200107 "EXP_GPIO1"
Jan Kundrát130cfb92018-05-30 15:21:16 +0200108 ;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200109
Jan Kundrát6406d512020-11-18 18:24:36 +0100110#ifdef CLEARFOG_REV1
Jan Kundrátd014bb92018-06-08 21:35:21 +0200111 i2c_bitbang_enable {
112 gpio-hog;
113 gpios = <7 GPIO_ACTIVE_HIGH>;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200114 output-high;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200115 line-name = "I2C bitbang bus";
116 };
117
118 i2c_xor_high {
119 gpio-hog;
120 gpios = <6 GPIO_ACTIVE_HIGH>;
Jan Kundrát1e866c62018-07-04 19:54:30 +0200121 output-high; // XOR byte 0b1001111
Jan Kundrátd014bb92018-06-08 21:35:21 +0200122 line-name = "I2C XOR high";
123 };
124
125 i2c_xor_enable {
126 gpio-hog;
127 gpios = <5 GPIO_ACTIVE_HIGH>;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200128 output-low;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200129 line-name = "I2C addr xlate";
130 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100131#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200132 };
133
134 gpio_spi_chips: gpio@1 {
135 compatible = "microchip,mcp23s17";
136 reg = <1>;
137 interrupt-parent = <&gpio1>;
138 interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
139 interrupt-controller;
140 #interrupt-cells = <2>;
141 gpio-controller;
142 #gpio-cells = <2>;
143 microchip,spi-present-mask = <0x06>; /* extra addresses 1 and 2 */
144 microchip,irq-mirror;
145 drive-open-drain;
146 spi-max-frequency = <10000000>;
147
148 // FIXME: this naming is incompatible with that hack which makes these devices visible as 2*16pin standalone chips
149 gpio-bank@1 {
150 address = <1>;
151 gpio-line-names =
152 "EDFA1_RESET",
153 "EDFA2_RESET",
154 "PMB_ALERT",
Jan Kundrát6406d512020-11-18 18:24:36 +0100155#ifdef CLEARFOG_REV1
Jan Kundrát93d79222018-06-19 20:45:35 +0200156 "EXP_GPIO2",
Jan Kundrát6406d512020-11-18 18:24:36 +0100157#else
158 "GND",
159#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200160 "WSS_SC",
161 "WSS_RST",
Jan Kundrát6406d512020-11-18 18:24:36 +0100162#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200163 "I2C_XOR_RDY",
Jan Kundrát6406d512020-11-18 18:24:36 +0100164#else
165 "GND",
166#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200167 "OCM_HS_OUT",
168
Jan Kundrátdb943222018-06-19 20:51:30 +0200169 "EDFA1_OUT_REFLECT_A",
170 "EDFA1_PUMP_CURRENT_A",
171 "EDFA1_ST1_IN_LOS_A",
172 "EDFA1_ST2_IN_LOS_A",
173 "EDFA1_ST2_OUT_GAIN_A",
174 "EDFA1_CASE_TEMP_A",
175 "EDFA1_ST1_OUT_GAIN_A",
176 "EDFA1_PUMP_TEMP_A";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200177 };
178
179 gpio-bank@2 {
180 address = <2>;
181 gpio-line-names =
Jan Kundrát6406d512020-11-18 18:24:36 +0100182#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200183 "GND",
184 "GND",
Jan Kundrát6406d512020-11-18 18:24:36 +0100185#else
186 "OCM_READY",
187 "OCM_ALARM",
188#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200189 "GND",
190 "GND",
191 "GND",
192 "GND",
193 "GND",
194 "GND",
195
Jan Kundrátdb943222018-06-19 20:51:30 +0200196 "EDFA2_OUT_REFLECT_A",
197 "EDFA2_PUMP_CURRENT_A",
198 "EDFA2_ST1_IN_LOS_A",
199 "EDFA2_ST2_IN_LOS_A",
200 "EDFA2_ST2_OUT_GAIN_A",
201 "EDFA2_CASE_TEMP_A",
202 "EDFA2_ST1_OUT_GAIN_A",
203 "EDFA2_PUMP_TEMP_A";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200204 };
Jan Kundrát1e866c62018-07-04 19:54:30 +0200205
Jan Kundrát6406d512020-11-18 18:24:36 +0100206#ifdef CLEARFOG_REV1
Jan Kundrát6eb5a022018-08-20 14:55:33 +0200207 // FIXME: this hogs both .1 and .2 chips' #6 pin...
Jan Kundrát1e866c62018-07-04 19:54:30 +0200208 i2c_xor_ready {
209 gpio-hog;
210 gpios = <6 GPIO_ACTIVE_HIGH>;
211 input;
212 line-name = "I2C XOR ready";
213 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100214#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200215 };
216
Jan Kundrát51c34e12019-04-04 21:00:19 +0200217 lumentum_ocm: lumentum-ocm@3 {
Jan Kundrát463be652018-09-20 23:44:04 +0200218 compatible = "lumentum-ocm";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200219 reg = <3>;
220 spi-max-frequency = <12000000>;
221 // The SPI slave is CPOL=1, but the rest of the devices is CPOL=0 and our SPI master
222 // appears to have troubles with CPOL=1 toggling -> let's use a physical inverter
Jan Kundrát130cfb92018-05-30 15:21:16 +0200223 };
224};
225
226&i2c1 {
Jan Kundrát6406d512020-11-18 18:24:36 +0100227#ifdef CLEARFOG_REV1
Jan Kundrátd5129092018-06-11 18:12:37 +0200228 eeprom@53 {
Jan Kundrát130cfb92018-05-30 15:21:16 +0200229 compatible = "atmel,24c128";
Jan Kundrátd5129092018-06-11 18:12:37 +0200230 reg = <0x53>;
Jan Kundrát130cfb92018-05-30 15:21:16 +0200231 pagesize = <64>;
Jan Kundrátd9af6aa2018-06-06 14:27:23 +0200232 // There's no read-only parameter because we want to enable flashing the EEPROM by
233 // installing a physical jumper. It doesn't matter that Linux still considers this
234 // device as writable during normal operation because any write fill fail anyway
235 // on the HW level. At least we can install that jumper and make the writes pass
236 // magically without fiddling with the DT and rebooting.
Jan Kundrát130cfb92018-05-30 15:21:16 +0200237 };
Jan Kundrát6406d512020-11-18 18:24:36 +0100238#else
239 temperature@48 {
240 compatible = "ti,tmp175";
241 reg = <0x48>;
242 };
243
244 // 24CSxx is treated as two separate devices
245 eeprom@53 {
246 compatible = "atmel,24c64";
247 reg = <0x53>;
248 };
249 eeprom@5b {
250 compatible = "atmel,24cs64";
251 reg = <0x5b>;
252 };
253#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200254
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200255 tlc59116@60 {
256 #address-cells = <1>;
257 #size-cells = <0>;
258 #gpio-cells = <2>;
259 compatible = "ti,tlc59116";
260 reg = <0x60>;
261
262 sfp_red@0 {
263 label = "sfp:red";
264 reg = <0>;
265 };
266
267 sfp_green@1 {
268 label = "sfp:green";
269 reg = <1>;
270 };
271
272 sfp_blue@2 {
273 label = "sfp:blue";
274 reg = <2>;
275 };
276
Jan Kundrát079dd672019-04-04 19:51:45 +0200277 // OUT3 remains unused
278
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200279 line_red@4 {
280 label = "line:red";
281 reg = <4>;
282 };
283
284 line_green@5 {
285 label = "line:green";
286 reg = <5>;
287 };
288
289 line_blue@6 {
290 label = "line:blue";
291 reg = <6>;
292 };
293
Jan Kundrát079dd672019-04-04 19:51:45 +0200294 led5_red@7 {
295 label = "led5:red";
296 reg = <7>;
297 };
298
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200299 status_red@8 {
300 label = "status:red";
301 reg = <8>;
302 };
303
304 status_green@9 {
305 label = "status:green";
306 reg = <9>;
307 linux,default-trigger = "timer";
308 };
309
310 status_blue@10 {
311 label = "status:blue";
312 reg = <10>;
313 };
314
Jan Kundrát079dd672019-04-04 19:51:45 +0200315 led5_green@11 {
316 label = "led5:green";
317 reg = <11>;
318 };
319
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200320 uid_red@12 {
321 label = "uid:red";
322 reg = <12>;
323 };
324
325 uid_green@13 {
326 label = "uid:green";
327 reg = <13>;
328 };
329
330 uid_blue@14 {
331 label = "uid:blue";
332 reg = <14>;
333 };
Jan Kundrát079dd672019-04-04 19:51:45 +0200334
335 led5_blue@15 {
336 label = "led5:blue";
337 reg = <15>;
338 };
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200339 };
340
Jan Kundrát6406d512020-11-18 18:24:36 +0100341#ifdef CLEARFOG_REV1
Jan Kundrát130cfb92018-05-30 15:21:16 +0200342 /* ADT7463: it doesn't use the DT */
Jan Kundrát6406d512020-11-18 18:24:36 +0100343#else
344 temperature@49 {
345 compatible = "ti,tmp175";
346 reg = <0x49>;
347 };
348
349 fancontrol@20 {
350 compatible = "maxim,max31790";
351 reg = <0x20>;
352 };
353
354 // 24CSxx is treated as two separate devices
355 eeprom@54 {
356 compatible = "atmel,24c64";
357 reg = <0x54>;
358 };
359 eeprom@5c {
360 compatible = "atmel,24cs64";
361 reg = <0x5c>;
362 };
363#endif
Jan Kundrát130cfb92018-05-30 15:21:16 +0200364};