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 | |
Václav Kubernát | f1b92ff | 2021-03-24 07:41:23 +0100 | [diff] [blame] | 25 | gpio_i2c: gpio_i2c { |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 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 | |
Václav Kubernát | f1b92ff | 2021-03-24 07:41:23 +0100 | [diff] [blame] | 37 | &gpio_i2c { |
| 38 | pdu@25 { |
| 39 | compatible = "fsp,yh5151e"; |
| 40 | reg = <0x25>; |
| 41 | }; |
| 42 | }; |
| 43 | |
Jan Kundrát | bf1e091 | 2021-03-05 12:45:23 +0100 | [diff] [blame] | 44 | &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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 52 | 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át | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 89 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 90 | "I2C_XOR_ENABLE", |
| 91 | "I2C_XORH", |
| 92 | "I2C_BB_ENABLE", |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 93 | "GPIO_K6", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 94 | #else |
| 95 | |
| 96 | "", |
| 97 | "", |
| 98 | "", |
| 99 | "", |
| 100 | #endif |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 101 | "", |
| 102 | "", |
Jan Kundrát | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 103 | "EDFA1_AMP_DISABLE", |
| 104 | "EDFA2_AMP_DISABLE", |
| 105 | "EDFA1_OUT_POWER_MUTE", |
| 106 | "EDFA2_OUT_POWER_MUTE", |
Jan Kundrát | 93d7922 | 2018-06-19 20:45:35 +0200 | [diff] [blame] | 107 | "EXP_GPIO1" |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 108 | ; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 109 | |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 110 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 111 | i2c_bitbang_enable { |
| 112 | gpio-hog; |
| 113 | gpios = <7 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 114 | output-high; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 115 | line-name = "I2C bitbang bus"; |
| 116 | }; |
| 117 | |
| 118 | i2c_xor_high { |
| 119 | gpio-hog; |
| 120 | gpios = <6 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 121 | output-high; // XOR byte 0b1001111 |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 122 | line-name = "I2C XOR high"; |
| 123 | }; |
| 124 | |
| 125 | i2c_xor_enable { |
| 126 | gpio-hog; |
| 127 | gpios = <5 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 128 | output-low; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 129 | line-name = "I2C addr xlate"; |
| 130 | }; |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 131 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 132 | }; |
| 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át | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 155 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 93d7922 | 2018-06-19 20:45:35 +0200 | [diff] [blame] | 156 | "EXP_GPIO2", |
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 | "WSS_SC", |
| 161 | "WSS_RST", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 162 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 163 | "I2C_XOR_RDY", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 164 | #else |
| 165 | "GND", |
| 166 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 167 | "OCM_HS_OUT", |
| 168 | |
Jan Kundrát | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 169 | "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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 177 | }; |
| 178 | |
| 179 | gpio-bank@2 { |
| 180 | address = <2>; |
| 181 | gpio-line-names = |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 182 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 183 | "GND", |
| 184 | "GND", |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 185 | #else |
| 186 | "OCM_READY", |
| 187 | "OCM_ALARM", |
| 188 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 189 | "GND", |
| 190 | "GND", |
| 191 | "GND", |
| 192 | "GND", |
| 193 | "GND", |
| 194 | "GND", |
| 195 | |
Jan Kundrát | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 196 | "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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 204 | }; |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 205 | |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 206 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 6eb5a02 | 2018-08-20 14:55:33 +0200 | [diff] [blame] | 207 | // FIXME: this hogs both .1 and .2 chips' #6 pin... |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 208 | i2c_xor_ready { |
| 209 | gpio-hog; |
| 210 | gpios = <6 GPIO_ACTIVE_HIGH>; |
| 211 | input; |
| 212 | line-name = "I2C XOR ready"; |
| 213 | }; |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 214 | #endif |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 215 | }; |
| 216 | |
Jan Kundrát | 51c34e1 | 2019-04-04 21:00:19 +0200 | [diff] [blame] | 217 | lumentum_ocm: lumentum-ocm@3 { |
Jan Kundrát | 463be65 | 2018-09-20 23:44:04 +0200 | [diff] [blame] | 218 | compatible = "lumentum-ocm"; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 219 | 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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 223 | }; |
| 224 | }; |
| 225 | |
| 226 | &i2c1 { |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 227 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | d512909 | 2018-06-11 18:12:37 +0200 | [diff] [blame] | 228 | eeprom@53 { |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 229 | compatible = "atmel,24c128"; |
Jan Kundrát | d512909 | 2018-06-11 18:12:37 +0200 | [diff] [blame] | 230 | reg = <0x53>; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 231 | pagesize = <64>; |
Jan Kundrát | d9af6aa | 2018-06-06 14:27:23 +0200 | [diff] [blame] | 232 | // 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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 237 | }; |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 238 | #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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 254 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 255 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 277 | // OUT3 remains unused |
| 278 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 279 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 294 | led5_red@7 { |
| 295 | label = "led5:red"; |
| 296 | reg = <7>; |
| 297 | }; |
| 298 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 299 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 315 | led5_green@11 { |
| 316 | label = "led5:green"; |
| 317 | reg = <11>; |
| 318 | }; |
| 319 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 320 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 334 | |
| 335 | led5_blue@15 { |
| 336 | label = "led5:blue"; |
| 337 | reg = <15>; |
| 338 | }; |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 339 | }; |
| 340 | |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 341 | #ifdef CLEARFOG_REV1 |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 342 | /* ADT7463: it doesn't use the DT */ |
Jan Kundrát | 6406d51 | 2020-11-18 18:24:36 +0100 | [diff] [blame] | 343 | #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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 364 | }; |