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 | }; |
| 33 | |
| 34 | gpio-leds { |
| 35 | compatible = "gpio-leds"; |
| 36 | |
| 37 | ok_led { |
| 38 | label = "status-ok"; |
| 39 | linux,default-trigger = "default-on"; |
| 40 | gpios = <&max14830 9 GPIO_ACTIVE_HIGH>; |
| 41 | }; |
| 42 | |
| 43 | fail_led { |
| 44 | label = "status-error"; |
| 45 | panic-indicator; |
| 46 | gpios = <&max14830 8 GPIO_ACTIVE_HIGH>; |
| 47 | }; |
| 48 | |
| 49 | uid_led { |
| 50 | label = "UID"; |
| 51 | linux,default-trigger = "heartbeat"; |
| 52 | gpios = <&max14830 10 GPIO_ACTIVE_HIGH>; |
| 53 | }; |
| 54 | }; |
| 55 | }; |
| 56 | |
| 57 | &uart1_pins { |
| 58 | status = "disabled"; |
| 59 | }; |
| 60 | |
| 61 | &uart1 { |
| 62 | status = "disabled"; |
| 63 | }; |
| 64 | |
| 65 | &gpio1 { |
| 66 | spi_int { |
| 67 | /* MPP54: this needs an external pull-up */ |
| 68 | gpio-hog; |
| 69 | gpios = <22 GPIO_ACTIVE_HIGH>; |
| 70 | input; |
| 71 | line-name = "SPI-INT"; |
| 72 | }; |
| 73 | }; |
| 74 | |
| 75 | &spi1 { |
| 76 | cs-gpios = <0>, <&gpio0 22 GPIO_ACTIVE_HIGH>, <0>, <&gpio0 29 GPIO_ACTIVE_HIGH>; |
| 77 | |
| 78 | max14830: max14830@2 { |
| 79 | compatible = "maxim,max14830"; |
| 80 | reg = <2>; |
| 81 | clocks = <&spi_uart_clk>; |
| 82 | clock-names = "xtal"; |
| 83 | interrupt-parent = <&gpio1>; |
| 84 | interrupts = <22 IRQ_TYPE_LEVEL_LOW>; |
| 85 | gpio-controller; |
| 86 | #gpio-cells = <2>; |
| 87 | spi-max-frequency = <26000000>; |
| 88 | |
| 89 | gpio-line-names = |
| 90 | "WSS_HWRST", |
| 91 | "WSS_SSD", |
| 92 | "OCM_HS_IN", |
| 93 | "OCM_RESET", |
| 94 | "WSS_MRST", |
| 95 | "I2C_XOR_ENABLE", |
| 96 | "I2C_XORH", |
| 97 | "I2C_BB_ENABLE", |
| 98 | "LED_RED", |
| 99 | "LED_GREEN", |
| 100 | "LED_BLUE", |
| 101 | "EDFA1_AMPLIFIER_DISABLE", |
| 102 | "EDFA2_AMPLIFIER_DISABLE", |
| 103 | "EDFA1_OUTPUT_POWER_MUTE", |
| 104 | "EDFA2_OUTPUT_POWER_MUTE", |
| 105 | "" /* not used, not routed anywhere */ |
| 106 | ; |
| 107 | }; |
| 108 | |
| 109 | gpio_spi_chips: gpio@1 { |
| 110 | compatible = "microchip,mcp23s17"; |
| 111 | reg = <1>; |
| 112 | interrupt-parent = <&gpio1>; |
| 113 | interrupts = <22 IRQ_TYPE_LEVEL_LOW>; |
| 114 | interrupt-controller; |
| 115 | #interrupt-cells = <2>; |
| 116 | gpio-controller; |
| 117 | #gpio-cells = <2>; |
| 118 | microchip,spi-present-mask = <0x06>; /* extra addresses 1 and 2 */ |
| 119 | microchip,irq-mirror; |
| 120 | drive-open-drain; |
| 121 | spi-max-frequency = <10000000>; |
| 122 | |
| 123 | // FIXME: this naming is incompatible with that hack which makes these devices visible as 2*16pin standalone chips |
| 124 | gpio-bank@1 { |
| 125 | address = <1>; |
| 126 | gpio-line-names = |
| 127 | "EDFA1_RESET", |
| 128 | "EDFA2_RESET", |
| 129 | "PMB_ALERT", |
| 130 | "ATX_TTL", /* FIXME: will this be used? */ |
| 131 | "WSS_SC", |
| 132 | "WSS_RST", |
| 133 | "I2C_XOR_RDY", |
| 134 | "OCM_HS_OUT", |
| 135 | |
| 136 | "EDFA1_OUT_REFLECTION_ALARM", |
| 137 | "EDFA1_PUMP_CURRENT_ALARM", |
| 138 | "EDFA1_ST1_IN_LOS_ALARM", |
| 139 | "EDFA1_ST2_IN_LOS_ALARM", |
| 140 | "EDFA1_ST2_OUT_GAIN_ALARM", |
| 141 | "EDFA1_CASE_TEMP_ALARM", |
| 142 | "EDFA1_ST1_OUT_GAIN_ALARM", |
| 143 | "EDFA1_PUMP_TEMP_ALARM"; |
| 144 | }; |
| 145 | |
| 146 | gpio-bank@2 { |
| 147 | address = <2>; |
| 148 | gpio-line-names = |
| 149 | /* these are all grounded */ |
| 150 | "GND", |
| 151 | "GND", |
| 152 | "GND", |
| 153 | "GND", |
| 154 | "GND", |
| 155 | "GND", |
| 156 | "GND", |
| 157 | "GND", |
| 158 | |
| 159 | "EDFA2_OUT_REFLECTION_ALARM", |
| 160 | "EDFA2_PUMP_CURRENT_ALARM", |
| 161 | "EDFA2_ST1_IN_LOS_ALARM", |
| 162 | "EDFA2_ST2_IN_LOS_ALARM", |
| 163 | "EDFA2_ST2_OUT_GAIN_ALARM", |
| 164 | "EDFA2_CASE_TEMP_ALARM", |
| 165 | "EDFA2_ST1_OUT_GAIN_ALARM", |
| 166 | "EDFA2_PUMP_TEMP_ALARM"; |
| 167 | }; |
| 168 | }; |
| 169 | |
| 170 | spidev@3 { |
| 171 | compatible = "spidev"; |
| 172 | reg = <3>; |
| 173 | spi-max-frequency = <12000000>; |
| 174 | // The SPI slave is CPOL=1, but the rest of the devices is CPOL=0 and our SPI master |
| 175 | // appears to have troubles with CPOL=1 toggling -> let's use a physical inverter |
| 176 | linux,spi-wdelay = /bits/ 16 <3>; |
| 177 | }; |
| 178 | }; |
| 179 | |
| 180 | &i2c1 { |
| 181 | eeprom@57 { |
| 182 | compatible = "atmel,24c128"; |
| 183 | reg = <0x57>; |
| 184 | pagesize = <64>; |
| 185 | }; |
| 186 | |
| 187 | /* ADT7463: it doesn't use the DT */ |
| 188 | |
| 189 | }; |