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>; |
Jan Kundrát | bf1e091 | 2021-03-05 12:45:23 +0100 | [diff] [blame] | 32 | pinctrl-names = "default"; |
| 33 | pinctrl-0 = <&uart1_pins_i2c_bb>; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 34 | }; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 35 | }; |
| 36 | |
Jan Kundrát | bf1e091 | 2021-03-05 12:45:23 +0100 | [diff] [blame] | 37 | &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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 45 | 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át | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 82 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 83 | "I2C_XOR_ENABLE", |
| 84 | "I2C_XORH", |
| 85 | "I2C_BB_ENABLE", |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 86 | "GPIO_K6", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 87 | #else |
| 88 | |
| 89 | "", |
| 90 | "", |
| 91 | "", |
| 92 | "", |
| 93 | #endif |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 94 | "", |
| 95 | "", |
Jan Kundrát | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 96 | "EDFA1_AMP_DISABLE", |
| 97 | "EDFA2_AMP_DISABLE", |
| 98 | "EDFA1_OUT_POWER_MUTE", |
| 99 | "EDFA2_OUT_POWER_MUTE", |
Jan Kundrát | 93d7922 | 2018-06-19 20:45:35 +0200 | [diff] [blame] | 100 | "EXP_GPIO1" |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 101 | ; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 102 | |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 103 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 104 | i2c_bitbang_enable { |
| 105 | gpio-hog; |
| 106 | gpios = <7 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 107 | output-high; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 108 | line-name = "I2C bitbang bus"; |
| 109 | }; |
| 110 | |
| 111 | i2c_xor_high { |
| 112 | gpio-hog; |
| 113 | gpios = <6 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 114 | output-high; // XOR byte 0b1001111 |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 115 | line-name = "I2C XOR high"; |
| 116 | }; |
| 117 | |
| 118 | i2c_xor_enable { |
| 119 | gpio-hog; |
| 120 | gpios = <5 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 121 | output-low; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 122 | line-name = "I2C addr xlate"; |
| 123 | }; |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 124 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 125 | }; |
| 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át | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 148 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 93d7922 | 2018-06-19 20:45:35 +0200 | [diff] [blame] | 149 | "EXP_GPIO2", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 150 | #else |
| 151 | "GND", |
| 152 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 153 | "WSS_SC", |
| 154 | "WSS_RST", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 155 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 156 | "I2C_XOR_RDY", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 157 | #else |
| 158 | "GND", |
| 159 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 160 | "OCM_HS_OUT", |
| 161 | |
Jan Kundrát | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 162 | "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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 170 | }; |
| 171 | |
| 172 | gpio-bank@2 { |
| 173 | address = <2>; |
| 174 | gpio-line-names = |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 175 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 176 | "GND", |
| 177 | "GND", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 178 | #else |
| 179 | "OCM_READY", |
| 180 | "OCM_ALARM", |
| 181 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 182 | "GND", |
| 183 | "GND", |
| 184 | "GND", |
| 185 | "GND", |
| 186 | "GND", |
| 187 | "GND", |
| 188 | |
Jan Kundrát | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 189 | "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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 197 | }; |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 198 | |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 199 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 6eb5a02 | 2018-08-20 14:55:33 +0200 | [diff] [blame] | 200 | // FIXME: this hogs both .1 and .2 chips' #6 pin... |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 201 | i2c_xor_ready { |
| 202 | gpio-hog; |
| 203 | gpios = <6 GPIO_ACTIVE_HIGH>; |
| 204 | input; |
| 205 | line-name = "I2C XOR ready"; |
| 206 | }; |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 207 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 208 | }; |
| 209 | |
Jan Kundrát | 51c34e1 | 2019-04-04 21:00:19 +0200 | [diff] [blame] | 210 | lumentum_ocm: lumentum-ocm@3 { |
Jan Kundrát | 463be65 | 2018-09-20 23:44:04 +0200 | [diff] [blame] | 211 | compatible = "lumentum-ocm"; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 212 | 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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 216 | }; |
| 217 | }; |
| 218 | |
| 219 | &i2c1 { |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 220 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | d512909 | 2018-06-11 18:12:37 +0200 | [diff] [blame] | 221 | eeprom@53 { |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 222 | compatible = "atmel,24c128"; |
Jan Kundrát | d512909 | 2018-06-11 18:12:37 +0200 | [diff] [blame] | 223 | reg = <0x53>; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 224 | pagesize = <64>; |
Jan Kundrát | d9af6aa | 2018-06-06 14:27:23 +0200 | [diff] [blame] | 225 | // 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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 230 | }; |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 231 | #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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 247 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 248 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 270 | // OUT3 remains unused |
| 271 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 272 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 287 | led5_red@7 { |
| 288 | label = "led5:red"; |
| 289 | reg = <7>; |
| 290 | }; |
| 291 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 292 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 308 | led5_green@11 { |
| 309 | label = "led5:green"; |
| 310 | reg = <11>; |
| 311 | }; |
| 312 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 313 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 327 | |
| 328 | led5_blue@15 { |
| 329 | label = "led5:blue"; |
| 330 | reg = <15>; |
| 331 | }; |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 332 | }; |
| 333 | |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 334 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 335 | /* ADT7463: it doesn't use the DT */ |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 336 | #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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 357 | }; |