1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>. 4 * Based on meson-gx-p23x-q20x.dtsi: 5 * - Copyright (c) 2016 Endless Computers, Inc. 6 * Author: Carlo Caione <carlo@endlessm.com> 7 * - Copyright (c) 2016 BayLibre, SAS. 8 * Author: Neil Armstrong <narmstrong@baylibre.com> 9 */ 10 11/* Common DTSI for devices which are based on the P212 reference board. */ 12 13#include "meson-gxl-s905x.dtsi" 14 15/ { 16 aliases { 17 serial0 = &uart_AO; 18 ethernet0 = ðmac; 19 }; 20 21 chosen { 22 stdout-path = "serial0:115200n8"; 23 }; 24 25 memory@0 { 26 device_type = "memory"; 27 reg = <0x0 0x0 0x0 0x80000000>; 28 }; 29 30 hdmi_5v: regulator-hdmi-5v { 31 compatible = "regulator-fixed"; 32 33 regulator-name = "HDMI_5V"; 34 regulator-min-microvolt = <5000000>; 35 regulator-max-microvolt = <5000000>; 36 37 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>; 38 enable-active-high; 39 regulator-always-on; 40 }; 41 42 vddio_boot: regulator-vddio-boot { 43 compatible = "regulator-fixed"; 44 regulator-name = "VDDIO_BOOT"; 45 regulator-min-microvolt = <1800000>; 46 regulator-max-microvolt = <1800000>; 47 }; 48 49 vddao_3v3: regulator-vddao-3v3 { 50 compatible = "regulator-fixed"; 51 regulator-name = "VDDAO_3V3"; 52 regulator-min-microvolt = <3300000>; 53 regulator-max-microvolt = <3300000>; 54 }; 55 56 vddio_ao18: regulator-vddio-ao18 { 57 compatible = "regulator-fixed"; 58 regulator-name = "VDDIO_AO18"; 59 regulator-min-microvolt = <1800000>; 60 regulator-max-microvolt = <1800000>; 61 }; 62 63 vcc_3v3: regulator-vcc-3v3 { 64 compatible = "regulator-fixed"; 65 regulator-name = "VCC_3V3"; 66 regulator-min-microvolt = <3300000>; 67 regulator-max-microvolt = <3300000>; 68 }; 69 70 emmc_pwrseq: emmc-pwrseq { 71 compatible = "mmc-pwrseq-emmc"; 72 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 73 }; 74 75 wifi32k: wifi32k { 76 compatible = "pwm-clock"; 77 #clock-cells = <0>; 78 clock-frequency = <32768>; 79 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ 80 }; 81 82 sdio_pwrseq: sdio-pwrseq { 83 compatible = "mmc-pwrseq-simple"; 84 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; 85 clocks = <&wifi32k>; 86 clock-names = "ext_clock"; 87 }; 88}; 89 90ðmac { 91 status = "okay"; 92}; 93 94&ir { 95 status = "okay"; 96 pinctrl-0 = <&remote_input_ao_pins>; 97 pinctrl-names = "default"; 98}; 99 100&pwm_ef { 101 status = "okay"; 102 pinctrl-0 = <&pwm_e_pins>; 103 pinctrl-names = "default"; 104}; 105 106&saradc { 107 status = "okay"; 108 vref-supply = <&vddio_ao18>; 109}; 110 111/* Wireless SDIO Module */ 112&sd_emmc_a { 113 status = "okay"; 114 pinctrl-0 = <&sdio_pins>; 115 pinctrl-1 = <&sdio_clk_gate_pins>; 116 pinctrl-names = "default", "clk-gate"; 117 #address-cells = <1>; 118 #size-cells = <0>; 119 120 bus-width = <4>; 121 cap-sd-highspeed; 122 max-frequency = <50000000>; 123 124 non-removable; 125 disable-wp; 126 127 /* WiFi firmware requires power to be kept while in suspend */ 128 keep-power-in-suspend; 129 130 mmc-pwrseq = <&sdio_pwrseq>; 131 132 vmmc-supply = <&vddao_3v3>; 133 vqmmc-supply = <&vddio_boot>; 134 135 sdio: wifi@1 { 136 reg = <1>; 137 }; 138}; 139 140/* SD card */ 141&sd_emmc_b { 142 status = "okay"; 143 pinctrl-0 = <&sdcard_pins>; 144 pinctrl-1 = <&sdcard_clk_gate_pins>; 145 pinctrl-names = "default", "clk-gate"; 146 147 bus-width = <4>; 148 cap-sd-highspeed; 149 max-frequency = <50000000>; 150 disable-wp; 151 152 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; 153 154 vmmc-supply = <&vddao_3v3>; 155 vqmmc-supply = <&vddio_boot>; 156}; 157 158/* eMMC */ 159&sd_emmc_c { 160 status = "okay"; 161 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 162 pinctrl-1 = <&emmc_clk_gate_pins>; 163 pinctrl-names = "default", "clk-gate"; 164 165 bus-width = <8>; 166 cap-mmc-highspeed; 167 max-frequency = <200000000>; 168 non-removable; 169 disable-wp; 170 mmc-ddr-1_8v; 171 mmc-hs200-1_8v; 172 173 mmc-pwrseq = <&emmc_pwrseq>; 174 vmmc-supply = <&vcc_3v3>; 175 vqmmc-supply = <&vddio_boot>; 176}; 177 178/* This is connected to the Bluetooth module: */ 179&uart_A { 180 status = "okay"; 181 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; 182 pinctrl-names = "default"; 183 uart-has-rtscts; 184 185 bluetooth { 186 compatible = "brcm,bcm43438-bt"; 187 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; 188 max-speed = <2000000>; 189 clocks = <&wifi32k>; 190 clock-names = "lpo"; 191 }; 192}; 193 194&uart_AO { 195 status = "okay"; 196 pinctrl-0 = <&uart_ao_a_pins>; 197 pinctrl-names = "default"; 198}; 199 200&usb { 201 status = "okay"; 202 dr_mode = "host"; 203}; 204 205&usb2_phy0 { 206 /* 207 * HDMI_5V is also used as supply for the USB VBUS. 208 */ 209 phy-supply = <&hdmi_5v>; 210}; 211