1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2016 Andreas Färber 4 * Copyright (c) 2016 BayLibre, Inc. 5 * Author: Kevin Hilman <khilman@kernel.org> 6 */ 7 8#include "meson-gxbb.dtsi" 9#include <dt-bindings/gpio/gpio.h> 10 11/ { 12 aliases { 13 serial0 = &uart_AO; 14 ethernet0 = ðmac; 15 }; 16 17 chosen { 18 stdout-path = "serial0:115200n8"; 19 }; 20 21 memory@0 { 22 device_type = "memory"; 23 reg = <0x0 0x0 0x0 0x40000000>; 24 }; 25 26 leds { 27 compatible = "gpio-leds"; 28 29 led-system { 30 label = "wetek-play:system-status"; 31 gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>; 32 default-state = "on"; 33 panic-indicator; 34 }; 35 }; 36 37 usb_pwr: regulator-usb-pwrs { 38 compatible = "regulator-fixed"; 39 40 regulator-name = "USB_PWR"; 41 42 regulator-min-microvolt = <5000000>; 43 regulator-max-microvolt = <5000000>; 44 45 gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; 46 enable-active-high; 47 }; 48 49 vddio_boot: regulator-vddio_boot { 50 compatible = "regulator-fixed"; 51 regulator-name = "VDDIO_BOOT"; 52 regulator-min-microvolt = <1800000>; 53 regulator-max-microvolt = <1800000>; 54 }; 55 56 vddao_3v3: regulator-vddao_3v3 { 57 compatible = "regulator-fixed"; 58 regulator-name = "VDDAO_3V3"; 59 regulator-min-microvolt = <3300000>; 60 regulator-max-microvolt = <3300000>; 61 }; 62 63 vddio_ao18: regulator-vddio_ao18 { 64 compatible = "regulator-fixed"; 65 regulator-name = "VDDIO_AO18"; 66 regulator-min-microvolt = <1800000>; 67 regulator-max-microvolt = <1800000>; 68 regulator-always-on; 69 }; 70 71 vcc_3v3: regulator-vcc_3v3 { 72 compatible = "regulator-fixed"; 73 regulator-name = "VCC_3V3"; 74 regulator-min-microvolt = <3300000>; 75 regulator-max-microvolt = <3300000>; 76 }; 77 78 emmc_pwrseq: emmc-pwrseq { 79 compatible = "mmc-pwrseq-emmc"; 80 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 81 }; 82 83 wifi32k: wifi32k { 84 compatible = "pwm-clock"; 85 #clock-cells = <0>; 86 clock-frequency = <32768>; 87 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ 88 }; 89 90 sdio_pwrseq: sdio-pwrseq { 91 compatible = "mmc-pwrseq-simple"; 92 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; 93 clocks = <&wifi32k>; 94 clock-names = "ext_clock"; 95 }; 96 97 cvbs-connector { 98 compatible = "composite-video-connector"; 99 100 port { 101 cvbs_connector_in: endpoint { 102 remote-endpoint = <&cvbs_vdac_out>; 103 }; 104 }; 105 }; 106 107 hdmi-connector { 108 compatible = "hdmi-connector"; 109 type = "a"; 110 111 port { 112 hdmi_connector_in: endpoint { 113 remote-endpoint = <&hdmi_tx_tmds_out>; 114 }; 115 }; 116 }; 117}; 118 119&cec_AO { 120 status = "okay"; 121 pinctrl-0 = <&ao_cec_pins>; 122 pinctrl-names = "default"; 123 hdmi-phandle = <&hdmi_tx>; 124}; 125 126&cvbs_vdac_port { 127 cvbs_vdac_out: endpoint { 128 remote-endpoint = <&cvbs_connector_in>; 129 }; 130}; 131 132ðmac { 133 status = "okay"; 134 pinctrl-0 = <ð_rgmii_pins>; 135 pinctrl-names = "default"; 136 137 phy-handle = <ð_phy0>; 138 phy-mode = "rgmii"; 139 140 amlogic,tx-delay-ns = <2>; 141 142 mdio { 143 compatible = "snps,dwmac-mdio"; 144 #address-cells = <1>; 145 #size-cells = <0>; 146 147 eth_phy0: ethernet-phy@0 { 148 /* Realtek RTL8211F (0x001cc916) */ 149 reg = <0>; 150 151 reset-assert-us = <10000>; 152 reset-deassert-us = <80000>; 153 reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; 154 155 interrupt-parent = <&gpio_intc>; 156 /* MAC_INTR on GPIOZ_15 */ 157 interrupts = <29 IRQ_TYPE_LEVEL_LOW>; 158 }; 159 }; 160}; 161 162&hdmi_tx { 163 status = "okay"; 164 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; 165 pinctrl-names = "default"; 166 hdmi-supply = <&vddio_ao18>; 167}; 168 169&hdmi_tx_tmds_port { 170 hdmi_tx_tmds_out: endpoint { 171 remote-endpoint = <&hdmi_connector_in>; 172 }; 173}; 174 175&ir { 176 status = "okay"; 177 pinctrl-0 = <&remote_input_ao_pins>; 178 pinctrl-names = "default"; 179}; 180 181&pwm_ef { 182 status = "okay"; 183 pinctrl-0 = <&pwm_e_pins>; 184 pinctrl-names = "default"; 185 clocks = <&clkc CLKID_FCLK_DIV4>; 186 clock-names = "clkin0"; 187}; 188 189&saradc { 190 status = "okay"; 191 vref-supply = <&vddio_ao18>; 192}; 193 194/* Wireless SDIO Module */ 195&sd_emmc_a { 196 status = "okay"; 197 pinctrl-0 = <&sdio_pins>; 198 pinctrl-1 = <&sdio_clk_gate_pins>; 199 pinctrl-names = "default", "clk-gate"; 200 #address-cells = <1>; 201 #size-cells = <0>; 202 203 bus-width = <4>; 204 cap-sd-highspeed; 205 max-frequency = <50000000>; 206 207 non-removable; 208 disable-wp; 209 210 /* WiFi firmware requires power to be kept while in suspend */ 211 keep-power-in-suspend; 212 213 mmc-pwrseq = <&sdio_pwrseq>; 214 215 vmmc-supply = <&vddao_3v3>; 216 vqmmc-supply = <&vddio_boot>; 217 218 brcmf: wifi@1 { 219 reg = <1>; 220 compatible = "brcm,bcm4329-fmac"; 221 }; 222}; 223 224/* SD card */ 225&sd_emmc_b { 226 status = "okay"; 227 pinctrl-0 = <&sdcard_pins>; 228 pinctrl-1 = <&sdcard_clk_gate_pins>; 229 pinctrl-names = "default", "clk-gate"; 230 231 bus-width = <4>; 232 cap-sd-highspeed; 233 max-frequency = <50000000>; 234 disable-wp; 235 236 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; 237 238 vmmc-supply = <&vddao_3v3>; 239 vqmmc-supply = <&vcc_3v3>; 240}; 241 242/* eMMC */ 243&sd_emmc_c { 244 status = "okay"; 245 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 246 pinctrl-1 = <&emmc_clk_gate_pins>; 247 pinctrl-names = "default", "clk-gate"; 248 249 bus-width = <8>; 250 cap-mmc-highspeed; 251 max-frequency = <200000000>; 252 non-removable; 253 disable-wp; 254 mmc-ddr-1_8v; 255 mmc-hs200-1_8v; 256 257 mmc-pwrseq = <&emmc_pwrseq>; 258 vmmc-supply = <&vcc_3v3>; 259 vqmmc-supply = <&vddio_boot>; 260}; 261 262/* This is connected to the Bluetooth module: */ 263&uart_A { 264 status = "okay"; 265 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; 266 pinctrl-names = "default"; 267 uart-has-rtscts; 268 269 bluetooth { 270 compatible = "brcm,bcm43438-bt"; 271 shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>; 272 }; 273}; 274 275/* This UART is brought out to the DB9 connector */ 276&uart_AO { 277 status = "okay"; 278 pinctrl-0 = <&uart_ao_a_pins>; 279 pinctrl-names = "default"; 280}; 281 282&usb0_phy { 283 status = "okay"; 284 phy-supply = <&usb_pwr>; 285}; 286 287&usb0 { 288 status = "okay"; 289}; 290