Neil Armstrong | 114abfe | 2018-02-27 12:30:33 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
Neil Armstrong | c246e9d | 2016-10-05 10:09:40 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2016 Andreas Färber |
| 4 | * Copyright (c) 2016 BayLibre, Inc. |
| 5 | * Author: Neil Armstrong <narmstrong@kernel.org> |
Neil Armstrong | c246e9d | 2016-10-05 10:09:40 +0200 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | /dts-v1/; |
| 9 | |
| 10 | #include "meson-gxbb.dtsi" |
| 11 | #include <dt-bindings/gpio/gpio.h> |
| 12 | #include <dt-bindings/input/input.h> |
| 13 | |
| 14 | / { |
| 15 | compatible = "nexbox,a95x", "amlogic,meson-gxbb"; |
| 16 | model = "NEXBOX A95X"; |
Jerome Brunet | 67e7607 | 2017-08-31 15:52:20 +0200 | [diff] [blame] | 17 | |
Neil Armstrong | c246e9d | 2016-10-05 10:09:40 +0200 | [diff] [blame] | 18 | aliases { |
| 19 | serial0 = &uart_AO; |
Jorge Ramirez-Ortiz | 059a58f | 2018-01-17 11:56:27 +0100 | [diff] [blame] | 20 | ethernet0 = ðmac; |
Neil Armstrong | c246e9d | 2016-10-05 10:09:40 +0200 | [diff] [blame] | 21 | }; |
| 22 | |
| 23 | chosen { |
| 24 | stdout-path = "serial0:115200n8"; |
| 25 | }; |
| 26 | |
| 27 | memory@0 { |
| 28 | device_type = "memory"; |
| 29 | reg = <0x0 0x0 0x0 0x40000000>; |
| 30 | }; |
| 31 | |
| 32 | leds { |
| 33 | compatible = "gpio-leds"; |
| 34 | blue { |
| 35 | label = "a95x:system-status"; |
| 36 | gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>; |
| 37 | linux,default-trigger = "heartbeat"; |
| 38 | default-state = "off"; |
| 39 | }; |
| 40 | }; |
| 41 | |
| 42 | gpio-keys-polled { |
| 43 | compatible = "gpio-keys-polled"; |
| 44 | #address-cells = <1>; |
| 45 | #size-cells = <0>; |
| 46 | poll-interval = <100>; |
| 47 | |
| 48 | button@0 { |
| 49 | label = "reset"; |
| 50 | linux,code = <KEY_RESTART>; |
| 51 | gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>; |
| 52 | }; |
| 53 | }; |
Neil Armstrong | a776e04 | 2016-10-20 13:42:57 +0200 | [diff] [blame] | 54 | |
Peter Korsgaard | e2f4d74 | 2017-10-05 15:21:18 +0200 | [diff] [blame] | 55 | usb_pwr: regulator-usb-pwrs { |
| 56 | compatible = "regulator-fixed"; |
| 57 | |
| 58 | regulator-name = "USB_PWR"; |
| 59 | |
| 60 | regulator-min-microvolt = <5000000>; |
| 61 | regulator-max-microvolt = <5000000>; |
| 62 | |
| 63 | gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; |
| 64 | enable-active-high; |
| 65 | }; |
| 66 | |
Neil Armstrong | a776e04 | 2016-10-20 13:42:57 +0200 | [diff] [blame] | 67 | vddio_card: gpio-regulator { |
| 68 | compatible = "regulator-gpio"; |
| 69 | |
| 70 | regulator-name = "VDDIO_CARD"; |
| 71 | regulator-min-microvolt = <1800000>; |
| 72 | regulator-max-microvolt = <3300000>; |
| 73 | |
| 74 | gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; |
| 75 | gpios-states = <1>; |
| 76 | |
| 77 | /* Based on P200 schematics, signal CARD_1.8V/3.3V_CTR */ |
| 78 | states = <1800000 0 |
| 79 | 3300000 1>; |
| 80 | }; |
| 81 | |
| 82 | vddio_boot: regulator-vddio_boot { |
| 83 | compatible = "regulator-fixed"; |
| 84 | regulator-name = "VDDIO_BOOT"; |
| 85 | regulator-min-microvolt = <1800000>; |
| 86 | regulator-max-microvolt = <1800000>; |
| 87 | }; |
| 88 | |
| 89 | vddao_3v3: regulator-vddao_3v3 { |
| 90 | compatible = "regulator-fixed"; |
| 91 | regulator-name = "VDDAO_3V3"; |
| 92 | regulator-min-microvolt = <3300000>; |
| 93 | regulator-max-microvolt = <3300000>; |
| 94 | }; |
| 95 | |
| 96 | vcc_3v3: regulator-vcc_3v3 { |
| 97 | compatible = "regulator-fixed"; |
| 98 | regulator-name = "VCC_3V3"; |
| 99 | regulator-min-microvolt = <3300000>; |
| 100 | regulator-max-microvolt = <3300000>; |
| 101 | }; |
| 102 | |
| 103 | emmc_pwrseq: emmc-pwrseq { |
| 104 | compatible = "mmc-pwrseq-emmc"; |
| 105 | reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; |
| 106 | }; |
| 107 | |
| 108 | wifi32k: wifi32k { |
| 109 | compatible = "pwm-clock"; |
| 110 | #clock-cells = <0>; |
| 111 | clock-frequency = <32768>; |
| 112 | pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ |
| 113 | }; |
| 114 | |
| 115 | sdio_pwrseq: sdio-pwrseq { |
| 116 | compatible = "mmc-pwrseq-simple"; |
| 117 | reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; |
| 118 | clocks = <&wifi32k>; |
| 119 | clock-names = "ext_clock"; |
| 120 | }; |
Neil Armstrong | fafdbdf | 2016-12-01 10:05:58 +0100 | [diff] [blame] | 121 | |
| 122 | cvbs-connector { |
| 123 | compatible = "composite-video-connector"; |
| 124 | |
| 125 | port { |
| 126 | cvbs_connector_in: endpoint { |
| 127 | remote-endpoint = <&cvbs_vdac_out>; |
| 128 | }; |
| 129 | }; |
| 130 | }; |
Neil Armstrong | 6939db7 | 2017-03-21 16:25:46 +0100 | [diff] [blame] | 131 | |
| 132 | hdmi-connector { |
| 133 | compatible = "hdmi-connector"; |
| 134 | type = "a"; |
| 135 | |
| 136 | port { |
| 137 | hdmi_connector_in: endpoint { |
| 138 | remote-endpoint = <&hdmi_tx_tmds_out>; |
| 139 | }; |
| 140 | }; |
| 141 | }; |
Neil Armstrong | c246e9d | 2016-10-05 10:09:40 +0200 | [diff] [blame] | 142 | }; |
| 143 | |
Andreas Färber | 82f1134 | 2017-05-13 16:33:32 +0200 | [diff] [blame] | 144 | &cvbs_vdac_port { |
| 145 | cvbs_vdac_out: endpoint { |
| 146 | remote-endpoint = <&cvbs_connector_in>; |
| 147 | }; |
Neil Armstrong | c246e9d | 2016-10-05 10:09:40 +0200 | [diff] [blame] | 148 | }; |
| 149 | |
Neil Armstrong | b16c71c | 2017-08-04 15:12:13 +0200 | [diff] [blame] | 150 | &cec_AO { |
| 151 | status = "okay"; |
| 152 | pinctrl-0 = <&ao_cec_pins>; |
| 153 | pinctrl-names = "default"; |
| 154 | hdmi-phandle = <&hdmi_tx>; |
| 155 | }; |
| 156 | |
Neil Armstrong | c246e9d | 2016-10-05 10:09:40 +0200 | [diff] [blame] | 157 | ðmac { |
| 158 | status = "okay"; |
Neil Armstrong | 3be2d9c | 2016-10-07 16:59:15 +0200 | [diff] [blame] | 159 | pinctrl-0 = <ð_rmii_pins>; |
Neil Armstrong | c246e9d | 2016-10-05 10:09:40 +0200 | [diff] [blame] | 160 | pinctrl-names = "default"; |
Martin Blumenstingl | 67d49f3 | 2017-02-19 22:41:44 +0100 | [diff] [blame] | 161 | |
| 162 | phy-handle = <ð_phy0>; |
Neil Armstrong | 3be2d9c | 2016-10-07 16:59:15 +0200 | [diff] [blame] | 163 | phy-mode = "rmii"; |
Martin Blumenstingl | 67d49f3 | 2017-02-19 22:41:44 +0100 | [diff] [blame] | 164 | |
| 165 | snps,reset-gpio = <&gpio GPIOZ_14 0>; |
| 166 | snps,reset-delays-us = <0 10000 1000000>; |
| 167 | snps,reset-active-low; |
| 168 | |
| 169 | mdio { |
| 170 | compatible = "snps,dwmac-mdio"; |
| 171 | #address-cells = <1>; |
| 172 | #size-cells = <0>; |
| 173 | |
| 174 | eth_phy0: ethernet-phy@0 { |
| 175 | /* IC Plus IP101GR (0x02430c54) */ |
| 176 | reg = <0>; |
| 177 | }; |
| 178 | }; |
Neil Armstrong | c246e9d | 2016-10-05 10:09:40 +0200 | [diff] [blame] | 179 | }; |
| 180 | |
Andreas Färber | 82f1134 | 2017-05-13 16:33:32 +0200 | [diff] [blame] | 181 | &hdmi_tx { |
| 182 | status = "okay"; |
| 183 | pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; |
| 184 | pinctrl-names = "default"; |
| 185 | }; |
| 186 | |
| 187 | &hdmi_tx_tmds_port { |
| 188 | hdmi_tx_tmds_out: endpoint { |
| 189 | remote-endpoint = <&hdmi_connector_in>; |
| 190 | }; |
| 191 | }; |
| 192 | |
Neil Armstrong | c246e9d | 2016-10-05 10:09:40 +0200 | [diff] [blame] | 193 | &ir { |
| 194 | status = "okay"; |
| 195 | pinctrl-0 = <&remote_input_ao_pins>; |
| 196 | pinctrl-names = "default"; |
| 197 | }; |
Neil Armstrong | a776e04 | 2016-10-20 13:42:57 +0200 | [diff] [blame] | 198 | |
Andreas Färber | 82f1134 | 2017-05-13 16:33:32 +0200 | [diff] [blame] | 199 | &pwm_ef { |
| 200 | status = "okay"; |
| 201 | pinctrl-0 = <&pwm_e_pins>; |
| 202 | pinctrl-names = "default"; |
| 203 | clocks = <&clkc CLKID_FCLK_DIV4>; |
| 204 | clock-names = "clkin0"; |
| 205 | }; |
| 206 | |
Neil Armstrong | a776e04 | 2016-10-20 13:42:57 +0200 | [diff] [blame] | 207 | /* Wireless SDIO Module */ |
| 208 | &sd_emmc_a { |
| 209 | status = "okay"; |
| 210 | pinctrl-0 = <&sdio_pins>; |
Jerome Brunet | 67e7607 | 2017-08-31 15:52:20 +0200 | [diff] [blame] | 211 | pinctrl-1 = <&sdio_clk_gate_pins>; |
| 212 | pinctrl-names = "default", "clk-gate"; |
Neil Armstrong | a776e04 | 2016-10-20 13:42:57 +0200 | [diff] [blame] | 213 | #address-cells = <1>; |
| 214 | #size-cells = <0>; |
| 215 | |
| 216 | bus-width = <4>; |
| 217 | cap-sd-highspeed; |
| 218 | max-frequency = <100000000>; |
| 219 | |
| 220 | non-removable; |
| 221 | disable-wp; |
| 222 | |
| 223 | mmc-pwrseq = <&sdio_pwrseq>; |
| 224 | |
| 225 | vmmc-supply = <&vddao_3v3>; |
| 226 | vqmmc-supply = <&vddio_boot>; |
| 227 | }; |
| 228 | |
| 229 | /* SD card */ |
| 230 | &sd_emmc_b { |
| 231 | status = "okay"; |
| 232 | pinctrl-0 = <&sdcard_pins>; |
Jerome Brunet | 67e7607 | 2017-08-31 15:52:20 +0200 | [diff] [blame] | 233 | pinctrl-1 = <&sdcard_clk_gate_pins>; |
| 234 | pinctrl-names = "default", "clk-gate"; |
Neil Armstrong | a776e04 | 2016-10-20 13:42:57 +0200 | [diff] [blame] | 235 | |
| 236 | bus-width = <4>; |
| 237 | cap-sd-highspeed; |
| 238 | max-frequency = <100000000>; |
| 239 | disable-wp; |
| 240 | |
Loys Ollivier | f29200c | 2019-01-14 15:44:21 +0100 | [diff] [blame] | 241 | cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; |
Neil Armstrong | a776e04 | 2016-10-20 13:42:57 +0200 | [diff] [blame] | 242 | |
| 243 | vmmc-supply = <&vddao_3v3>; |
| 244 | vqmmc-supply = <&vddio_card>; |
| 245 | }; |
| 246 | |
| 247 | /* eMMC */ |
| 248 | &sd_emmc_c { |
| 249 | status = "okay"; |
Neil Armstrong | ab36be6 | 2017-10-03 17:24:42 +0200 | [diff] [blame] | 250 | pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; |
Jerome Brunet | 67e7607 | 2017-08-31 15:52:20 +0200 | [diff] [blame] | 251 | pinctrl-1 = <&emmc_clk_gate_pins>; |
| 252 | pinctrl-names = "default", "clk-gate"; |
Neil Armstrong | a776e04 | 2016-10-20 13:42:57 +0200 | [diff] [blame] | 253 | |
| 254 | bus-width = <8>; |
Neil Armstrong | a776e04 | 2016-10-20 13:42:57 +0200 | [diff] [blame] | 255 | cap-mmc-highspeed; |
| 256 | max-frequency = <200000000>; |
| 257 | non-removable; |
| 258 | disable-wp; |
| 259 | mmc-ddr-1_8v; |
| 260 | mmc-hs200-1_8v; |
| 261 | |
| 262 | mmc-pwrseq = <&emmc_pwrseq>; |
| 263 | vmmc-supply = <&vcc_3v3>; |
| 264 | vqmmc-supply = <&vddio_boot>; |
| 265 | }; |
| 266 | |
Andreas Färber | 82f1134 | 2017-05-13 16:33:32 +0200 | [diff] [blame] | 267 | &uart_AO { |
Neil Armstrong | a776e04 | 2016-10-20 13:42:57 +0200 | [diff] [blame] | 268 | status = "okay"; |
Andreas Färber | 82f1134 | 2017-05-13 16:33:32 +0200 | [diff] [blame] | 269 | pinctrl-0 = <&uart_ao_a_pins>; |
Neil Armstrong | a776e04 | 2016-10-20 13:42:57 +0200 | [diff] [blame] | 270 | pinctrl-names = "default"; |
Neil Armstrong | 6939db7 | 2017-03-21 16:25:46 +0100 | [diff] [blame] | 271 | }; |
Peter Korsgaard | e2f4d74 | 2017-10-05 15:21:18 +0200 | [diff] [blame] | 272 | |
| 273 | &usb0_phy { |
| 274 | status = "okay"; |
| 275 | phy-supply = <&usb_pwr>; |
| 276 | }; |
| 277 | |
| 278 | &usb1_phy { |
| 279 | status = "okay"; |
| 280 | }; |
| 281 | |
| 282 | &usb0 { |
| 283 | status = "okay"; |
| 284 | }; |
| 285 | |
| 286 | &usb1 { |
| 287 | status = "okay"; |
| 288 | }; |