blob: 3d07caca57108b154d1daccc2c5d0b07403f2466 [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",
73 "I2C_XOR_ENABLE",
74 "I2C_XORH",
75 "I2C_BB_ENABLE",
Jan Kundrát8f3357f2018-08-08 14:16:32 +020076 "GPIO_K6",
77 "",
78 "",
Jan Kundrátdb943222018-06-19 20:51:30 +020079 "EDFA1_AMP_DISABLE",
80 "EDFA2_AMP_DISABLE",
81 "EDFA1_OUT_POWER_MUTE",
82 "EDFA2_OUT_POWER_MUTE",
Jan Kundrát93d79222018-06-19 20:45:35 +020083 "EXP_GPIO1"
Jan Kundrát130cfb92018-05-30 15:21:16 +020084 ;
Jan Kundrátd014bb92018-06-08 21:35:21 +020085
86 i2c_bitbang_enable {
87 gpio-hog;
88 gpios = <7 GPIO_ACTIVE_HIGH>;
Jan Kundrátd014bb92018-06-08 21:35:21 +020089 output-high;
Jan Kundrátd014bb92018-06-08 21:35:21 +020090 line-name = "I2C bitbang bus";
91 };
92
93 i2c_xor_high {
94 gpio-hog;
95 gpios = <6 GPIO_ACTIVE_HIGH>;
Jan Kundrát1e866c62018-07-04 19:54:30 +020096 output-high; // XOR byte 0b1001111
Jan Kundrátd014bb92018-06-08 21:35:21 +020097 line-name = "I2C XOR high";
98 };
99
100 i2c_xor_enable {
101 gpio-hog;
102 gpios = <5 GPIO_ACTIVE_HIGH>;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200103 output-low;
Jan Kundrátd014bb92018-06-08 21:35:21 +0200104 line-name = "I2C addr xlate";
105 };
Jan Kundrát130cfb92018-05-30 15:21:16 +0200106 };
107
108 gpio_spi_chips: gpio@1 {
109 compatible = "microchip,mcp23s17";
110 reg = <1>;
111 interrupt-parent = <&gpio1>;
112 interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
113 interrupt-controller;
114 #interrupt-cells = <2>;
115 gpio-controller;
116 #gpio-cells = <2>;
117 microchip,spi-present-mask = <0x06>; /* extra addresses 1 and 2 */
118 microchip,irq-mirror;
119 drive-open-drain;
120 spi-max-frequency = <10000000>;
121
122 // FIXME: this naming is incompatible with that hack which makes these devices visible as 2*16pin standalone chips
123 gpio-bank@1 {
124 address = <1>;
125 gpio-line-names =
126 "EDFA1_RESET",
127 "EDFA2_RESET",
128 "PMB_ALERT",
Jan Kundrát93d79222018-06-19 20:45:35 +0200129 "EXP_GPIO2",
Jan Kundrát130cfb92018-05-30 15:21:16 +0200130 "WSS_SC",
131 "WSS_RST",
132 "I2C_XOR_RDY",
133 "OCM_HS_OUT",
134
Jan Kundrátdb943222018-06-19 20:51:30 +0200135 "EDFA1_OUT_REFLECT_A",
136 "EDFA1_PUMP_CURRENT_A",
137 "EDFA1_ST1_IN_LOS_A",
138 "EDFA1_ST2_IN_LOS_A",
139 "EDFA1_ST2_OUT_GAIN_A",
140 "EDFA1_CASE_TEMP_A",
141 "EDFA1_ST1_OUT_GAIN_A",
142 "EDFA1_PUMP_TEMP_A";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200143 };
144
145 gpio-bank@2 {
146 address = <2>;
147 gpio-line-names =
148 /* these are all grounded */
149 "GND",
150 "GND",
151 "GND",
152 "GND",
153 "GND",
154 "GND",
155 "GND",
156 "GND",
157
Jan Kundrátdb943222018-06-19 20:51:30 +0200158 "EDFA2_OUT_REFLECT_A",
159 "EDFA2_PUMP_CURRENT_A",
160 "EDFA2_ST1_IN_LOS_A",
161 "EDFA2_ST2_IN_LOS_A",
162 "EDFA2_ST2_OUT_GAIN_A",
163 "EDFA2_CASE_TEMP_A",
164 "EDFA2_ST1_OUT_GAIN_A",
165 "EDFA2_PUMP_TEMP_A";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200166 };
Jan Kundrát1e866c62018-07-04 19:54:30 +0200167
Jan Kundrát6eb5a022018-08-20 14:55:33 +0200168 // FIXME: this hogs both .1 and .2 chips' #6 pin...
Jan Kundrát1e866c62018-07-04 19:54:30 +0200169 i2c_xor_ready {
170 gpio-hog;
171 gpios = <6 GPIO_ACTIVE_HIGH>;
172 input;
173 line-name = "I2C XOR ready";
174 };
Jan Kundrát130cfb92018-05-30 15:21:16 +0200175 };
176
Jan Kundrát51c34e12019-04-04 21:00:19 +0200177 lumentum_ocm: lumentum-ocm@3 {
Jan Kundrát463be652018-09-20 23:44:04 +0200178 compatible = "lumentum-ocm";
Jan Kundrát130cfb92018-05-30 15:21:16 +0200179 reg = <3>;
180 spi-max-frequency = <12000000>;
181 // The SPI slave is CPOL=1, but the rest of the devices is CPOL=0 and our SPI master
182 // appears to have troubles with CPOL=1 toggling -> let's use a physical inverter
Jan Kundrát130cfb92018-05-30 15:21:16 +0200183 };
184};
185
186&i2c1 {
Jan Kundrátd5129092018-06-11 18:12:37 +0200187 eeprom@53 {
Jan Kundrát130cfb92018-05-30 15:21:16 +0200188 compatible = "atmel,24c128";
Jan Kundrátd5129092018-06-11 18:12:37 +0200189 reg = <0x53>;
Jan Kundrát130cfb92018-05-30 15:21:16 +0200190 pagesize = <64>;
Jan Kundrátd9af6aa2018-06-06 14:27:23 +0200191 // There's no read-only parameter because we want to enable flashing the EEPROM by
192 // installing a physical jumper. It doesn't matter that Linux still considers this
193 // device as writable during normal operation because any write fill fail anyway
194 // on the HW level. At least we can install that jumper and make the writes pass
195 // magically without fiddling with the DT and rebooting.
Jan Kundrát130cfb92018-05-30 15:21:16 +0200196 };
197
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200198 tlc59116@60 {
199 #address-cells = <1>;
200 #size-cells = <0>;
201 #gpio-cells = <2>;
202 compatible = "ti,tlc59116";
203 reg = <0x60>;
204
205 sfp_red@0 {
206 label = "sfp:red";
207 reg = <0>;
208 };
209
210 sfp_green@1 {
211 label = "sfp:green";
212 reg = <1>;
213 };
214
215 sfp_blue@2 {
216 label = "sfp:blue";
217 reg = <2>;
218 };
219
Jan Kundrát079dd672019-04-04 19:51:45 +0200220 // OUT3 remains unused
221
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200222 line_red@4 {
223 label = "line:red";
224 reg = <4>;
225 };
226
227 line_green@5 {
228 label = "line:green";
229 reg = <5>;
230 };
231
232 line_blue@6 {
233 label = "line:blue";
234 reg = <6>;
235 };
236
Jan Kundrát079dd672019-04-04 19:51:45 +0200237 led5_red@7 {
238 label = "led5:red";
239 reg = <7>;
240 };
241
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200242 status_red@8 {
243 label = "status:red";
244 reg = <8>;
245 };
246
247 status_green@9 {
248 label = "status:green";
249 reg = <9>;
250 linux,default-trigger = "timer";
251 };
252
253 status_blue@10 {
254 label = "status:blue";
255 reg = <10>;
256 };
257
Jan Kundrát079dd672019-04-04 19:51:45 +0200258 led5_green@11 {
259 label = "led5:green";
260 reg = <11>;
261 };
262
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200263 uid_red@12 {
264 label = "uid:red";
265 reg = <12>;
266 };
267
268 uid_green@13 {
269 label = "uid:green";
270 reg = <13>;
271 };
272
273 uid_blue@14 {
274 label = "uid:blue";
275 reg = <14>;
276 };
Jan Kundrát079dd672019-04-04 19:51:45 +0200277
278 led5_blue@15 {
279 label = "led5:blue";
280 reg = <15>;
281 };
Jan Kundrát8f3357f2018-08-08 14:16:32 +0200282 };
283
Jan Kundrát130cfb92018-05-30 15:21:16 +0200284 /* ADT7463: it doesn't use the DT */
Jan Kundrát130cfb92018-05-30 15:21:16 +0200285};