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", |
| 73 | "I2C_XOR_ENABLE", |
| 74 | "I2C_XORH", |
| 75 | "I2C_BB_ENABLE", |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 76 | "GPIO_K6", |
| 77 | "", |
| 78 | "", |
Jan Kundrát | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 79 | "EDFA1_AMP_DISABLE", |
| 80 | "EDFA2_AMP_DISABLE", |
| 81 | "EDFA1_OUT_POWER_MUTE", |
| 82 | "EDFA2_OUT_POWER_MUTE", |
Jan Kundrát | 93d7922 | 2018-06-19 20:45:35 +0200 | [diff] [blame] | 83 | "EXP_GPIO1" |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 84 | ; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 85 | |
| 86 | i2c_bitbang_enable { |
| 87 | gpio-hog; |
| 88 | gpios = <7 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 89 | output-high; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 90 | line-name = "I2C bitbang bus"; |
| 91 | }; |
| 92 | |
| 93 | i2c_xor_high { |
| 94 | gpio-hog; |
| 95 | gpios = <6 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 96 | output-high; // XOR byte 0b1001111 |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 97 | line-name = "I2C XOR high"; |
| 98 | }; |
| 99 | |
| 100 | i2c_xor_enable { |
| 101 | gpio-hog; |
| 102 | gpios = <5 GPIO_ACTIVE_HIGH>; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 103 | output-low; |
Jan Kundrát | d014bb9 | 2018-06-08 21:35:21 +0200 | [diff] [blame] | 104 | line-name = "I2C addr xlate"; |
| 105 | }; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 106 | }; |
| 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át | 93d7922 | 2018-06-19 20:45:35 +0200 | [diff] [blame] | 129 | "EXP_GPIO2", |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 130 | "WSS_SC", |
| 131 | "WSS_RST", |
| 132 | "I2C_XOR_RDY", |
| 133 | "OCM_HS_OUT", |
| 134 | |
Jan Kundrát | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 135 | "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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 143 | }; |
| 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át | db94322 | 2018-06-19 20:51:30 +0200 | [diff] [blame] | 158 | "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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 166 | }; |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 167 | |
Jan Kundrát | 6eb5a02 | 2018-08-20 14:55:33 +0200 | [diff] [blame] | 168 | // FIXME: this hogs both .1 and .2 chips' #6 pin... |
Jan Kundrát | 1e866c6 | 2018-07-04 19:54:30 +0200 | [diff] [blame] | 169 | i2c_xor_ready { |
| 170 | gpio-hog; |
| 171 | gpios = <6 GPIO_ACTIVE_HIGH>; |
| 172 | input; |
| 173 | line-name = "I2C XOR ready"; |
| 174 | }; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 175 | }; |
| 176 | |
Jan Kundrát | 51c34e1 | 2019-04-04 21:00:19 +0200 | [diff] [blame] | 177 | lumentum_ocm: lumentum-ocm@3 { |
Jan Kundrát | 463be65 | 2018-09-20 23:44:04 +0200 | [diff] [blame] | 178 | compatible = "lumentum-ocm"; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 179 | 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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 183 | }; |
| 184 | }; |
| 185 | |
| 186 | &i2c1 { |
Jan Kundrát | d512909 | 2018-06-11 18:12:37 +0200 | [diff] [blame] | 187 | eeprom@53 { |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 188 | compatible = "atmel,24c128"; |
Jan Kundrát | d512909 | 2018-06-11 18:12:37 +0200 | [diff] [blame] | 189 | reg = <0x53>; |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 190 | pagesize = <64>; |
Jan Kundrát | d9af6aa | 2018-06-06 14:27:23 +0200 | [diff] [blame] | 191 | // 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át | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 196 | }; |
| 197 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 198 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 220 | // OUT3 remains unused |
| 221 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 222 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 237 | led5_red@7 { |
| 238 | label = "led5:red"; |
| 239 | reg = <7>; |
| 240 | }; |
| 241 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 242 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 258 | led5_green@11 { |
| 259 | label = "led5:green"; |
| 260 | reg = <11>; |
| 261 | }; |
| 262 | |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 263 | 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át | 079dd67 | 2019-04-04 19:51:45 +0200 | [diff] [blame] | 277 | |
| 278 | led5_blue@15 { |
| 279 | label = "led5:blue"; |
| 280 | reg = <15>; |
| 281 | }; |
Jan Kundrát | 8f3357f | 2018-08-08 14:16:32 +0200 | [diff] [blame] | 282 | }; |
| 283 | |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 284 | /* ADT7463: it doesn't use the DT */ |
Jan Kundrát | 130cfb9 | 2018-05-30 15:21:16 +0200 | [diff] [blame] | 285 | }; |