Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 1 | #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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 33 | }; |
| 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át | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 73 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 74 | "I2C_XOR_ENABLE", |
| 75 | "I2C_XORH", |
| 76 | "I2C_BB_ENABLE", |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 77 | "GPIO_K6", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 78 | #else |
| 79 | |
| 80 | "", |
| 81 | "", |
| 82 | "", |
| 83 | "", |
| 84 | #endif |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 85 | "", |
| 86 | "", |
Jan Kundrát | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 87 | "EDFA1_AMP_DISABLE", |
| 88 | "EDFA2_AMP_DISABLE", |
| 89 | "EDFA1_OUT_POWER_MUTE", |
| 90 | "EDFA2_OUT_POWER_MUTE", |
Jan Kundrát | 93d7922 | 2018-06-19 20:45:35 +0200 | [diff] [blame] | 91 | "EXP_GPIO1" |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 92 | ; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 93 | |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 94 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 95 | i2c_bitbang_enable { |
| 96 | gpio-hog; |
| 97 | gpios = <7 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 98 | output-high; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 99 | line-name = "I2C bitbang bus"; |
| 100 | }; |
| 101 | |
| 102 | i2c_xor_high { |
| 103 | gpio-hog; |
| 104 | gpios = <6 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 105 | output-high; // XOR byte 0b1001111 |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 106 | line-name = "I2C XOR high"; |
| 107 | }; |
| 108 | |
| 109 | i2c_xor_enable { |
| 110 | gpio-hog; |
| 111 | gpios = <5 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 112 | output-low; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 113 | line-name = "I2C addr xlate"; |
| 114 | }; |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 115 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 116 | }; |
| 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át | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 139 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 93d7922 | 2018-06-19 20:45:35 +0200 | [diff] [blame] | 140 | "EXP_GPIO2", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 141 | #else |
| 142 | "GND", |
| 143 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 144 | "WSS_SC", |
| 145 | "WSS_RST", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 146 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 147 | "I2C_XOR_RDY", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 148 | #else |
| 149 | "GND", |
| 150 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 151 | "OCM_HS_OUT", |
| 152 | |
Jan Kundrát | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 153 | "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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 161 | }; |
| 162 | |
| 163 | gpio-bank@2 { |
| 164 | address = <2>; |
| 165 | gpio-line-names = |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 166 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 167 | "GND", |
| 168 | "GND", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 169 | #else |
| 170 | "OCM_READY", |
| 171 | "OCM_ALARM", |
| 172 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 173 | "GND", |
| 174 | "GND", |
| 175 | "GND", |
| 176 | "GND", |
| 177 | "GND", |
| 178 | "GND", |
| 179 | |
Jan Kundrát | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 180 | "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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 188 | }; |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 189 | |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 190 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 6eb5a02 | 2018-08-20 14:55:33 +0200 | [diff] [blame] | 191 | // FIXME: this hogs both .1 and .2 chips' #6 pin... |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 192 | i2c_xor_ready { |
| 193 | gpio-hog; |
| 194 | gpios = <6 GPIO_ACTIVE_HIGH>; |
| 195 | input; |
| 196 | line-name = "I2C XOR ready"; |
| 197 | }; |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 198 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 199 | }; |
| 200 | |
Jan Kundrát | 51c34e1 | 2019-04-04 21:00:19 +0200 | [diff] [blame] | 201 | lumentum_ocm: lumentum-ocm@3 { |
Jan Kundrát | 463be65 | 2018-09-20 23:44:04 +0200 | [diff] [blame] | 202 | compatible = "lumentum-ocm"; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 203 | 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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 207 | }; |
| 208 | }; |
| 209 | |
| 210 | &i2c1 { |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 211 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | d512909 | 2018-06-11 18:12:37 +0200 | [diff] [blame] | 212 | eeprom@53 { |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 213 | compatible = "atmel,24c128"; |
Jan Kundrát | d512909 | 2018-06-11 18:12:37 +0200 | [diff] [blame] | 214 | reg = <0x53>; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 215 | pagesize = <64>; |
Jan Kundrát | d9af6aa | 2018-06-06 14:27:23 +0200 | [diff] [blame] | 216 | // 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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 221 | }; |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 222 | #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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 238 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 239 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 261 | // OUT3 remains unused |
| 262 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 263 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 278 | led5_red@7 { |
| 279 | label = "led5:red"; |
| 280 | reg = <7>; |
| 281 | }; |
| 282 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 283 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 299 | led5_green@11 { |
| 300 | label = "led5:green"; |
| 301 | reg = <11>; |
| 302 | }; |
| 303 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 304 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 318 | |
| 319 | led5_blue@15 { |
| 320 | label = "led5:blue"; |
| 321 | reg = <15>; |
| 322 | }; |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 323 | }; |
| 324 | |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 325 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 326 | /* ADT7463: it doesn't use the DT */ |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 327 | #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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 348 | }; |