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