| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2016 Andreas Färber |
| 4 |
*/ |
| 5 |
|
| 6 |
#include "meson-gxbb.dtsi" |
| 7 |
#include <dt-bindings/sound/meson-aiu.h> |
| 8 |
|
| 9 |
/ { |
| 10 |
compatible = "tronsmart,vega-s95", "amlogic,meson-gxbb"; |
| 11 |
|
| 12 |
aliases { |
| 13 |
serial0 = &uart_AO; |
| 14 |
ethernet0 = ðmac; |
| 15 |
}; |
| 16 |
|
| 17 |
chosen { |
| 18 |
stdout-path = "serial0:115200n8"; |
| 19 |
}; |
| 20 |
|
| 21 |
spdif_dit: audio-codec-0 { |
| 22 |
#sound-dai-cells = <0>; |
| 23 |
compatible = "linux,spdif-dit"; |
| 24 |
sound-name-prefix = "DIT"; |
| 25 |
}; |
| 26 |
|
| 27 |
leds { |
| 28 |
compatible = "gpio-leds"; |
| 29 |
|
| 30 |
led-blue { |
| 31 |
label = "vega-s95:blue:on"; |
| 32 |
gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>; |
| 33 |
default-state = "on"; |
| 34 |
panic-indicator; |
| 35 |
}; |
| 36 |
}; |
| 37 |
|
| 38 |
usb_pwr: regulator-usb-pwrs { |
| 39 |
compatible = "regulator-fixed"; |
| 40 |
|
| 41 |
regulator-name = "USB_PWR"; |
| 42 |
|
| 43 |
regulator-min-microvolt = <5000000>; |
| 44 |
regulator-max-microvolt = <5000000>; |
| 45 |
|
| 46 |
gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; |
| 47 |
enable-active-high; |
| 48 |
}; |
| 49 |
|
| 50 |
vddio_boot: regulator-vddio-boot { |
| 51 |
compatible = "regulator-fixed"; |
| 52 |
regulator-name = "VDDIO_BOOT"; |
| 53 |
regulator-min-microvolt = <1800000>; |
| 54 |
regulator-max-microvolt = <1800000>; |
| 55 |
}; |
| 56 |
|
| 57 |
vddao_3v3: regulator-vddao-3v3 { |
| 58 |
compatible = "regulator-fixed"; |
| 59 |
regulator-name = "VDDAO_3V3"; |
| 60 |
regulator-min-microvolt = <3300000>; |
| 61 |
regulator-max-microvolt = <3300000>; |
| 62 |
}; |
| 63 |
|
| 64 |
vddio_ao18: regulator-vddio-ao18 { |
| 65 |
compatible = "regulator-fixed"; |
| 66 |
regulator-name = "VDDIO_AO18"; |
| 67 |
regulator-min-microvolt = <1800000>; |
| 68 |
regulator-max-microvolt = <1800000>; |
| 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 |
hdmi-connector { |
| 91 |
compatible = "hdmi-connector"; |
| 92 |
type = "a"; |
| 93 |
|
| 94 |
port { |
| 95 |
hdmi_connector_in: endpoint { |
| 96 |
remote-endpoint = <&hdmi_tx_tmds_out>; |
| 97 |
}; |
| 98 |
}; |
| 99 |
}; |
| 100 |
|
| 101 |
sdio_pwrseq: sdio-pwrseq { |
| 102 |
compatible = "mmc-pwrseq-simple"; |
| 103 |
reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; |
| 104 |
clocks = <&wifi32k>; |
| 105 |
clock-names = "ext_clock"; |
| 106 |
}; |
| 107 |
|
| 108 |
sound { |
| 109 |
compatible = "amlogic,gx-sound-card"; |
| 110 |
model = "VEGA-S95"; |
| 111 |
clocks = <&clkc CLKID_MPLL0>, |
| 112 |
<&clkc CLKID_MPLL1>, |
| 113 |
<&clkc CLKID_MPLL2>; |
| 114 |
|
| 115 |
assigned-clocks = <&clkc CLKID_MPLL0>, |
| 116 |
<&clkc CLKID_MPLL1>, |
| 117 |
<&clkc CLKID_MPLL2>; |
| 118 |
assigned-clock-rates = <294912000>, |
| 119 |
<270950400>, |
| 120 |
<393216000>; |
| 121 |
|
| 122 |
dai-link-0 { |
| 123 |
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; |
| 124 |
}; |
| 125 |
|
| 126 |
dai-link-1 { |
| 127 |
sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>; |
| 128 |
}; |
| 129 |
|
| 130 |
dai-link-2 { |
| 131 |
sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; |
| 132 |
dai-format = "i2s"; |
| 133 |
mclk-fs = <256>; |
| 134 |
|
| 135 |
codec-0 { |
| 136 |
sound-dai = <&aiu AIU_HDMI CTRL_I2S>; |
| 137 |
}; |
| 138 |
}; |
| 139 |
|
| 140 |
dai-link-3 { |
| 141 |
sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; |
| 142 |
|
| 143 |
codec-0 { |
| 144 |
sound-dai = <&spdif_dit>; |
| 145 |
}; |
| 146 |
}; |
| 147 |
|
| 148 |
dai-link-4 { |
| 149 |
sound-dai = <&aiu AIU_HDMI CTRL_OUT>; |
| 150 |
|
| 151 |
codec-0 { |
| 152 |
sound-dai = <&hdmi_tx>; |
| 153 |
}; |
| 154 |
}; |
| 155 |
}; |
| 156 |
}; |
| 157 |
|
| 158 |
&aiu { |
| 159 |
status = "okay"; |
| 160 |
pinctrl-0 = <&spdif_out_y_pins>; |
| 161 |
pinctrl-names = "default"; |
| 162 |
}; |
| 163 |
|
| 164 |
&cec_AO { |
| 165 |
status = "okay"; |
| 166 |
pinctrl-0 = <&ao_cec_pins>; |
| 167 |
pinctrl-names = "default"; |
| 168 |
hdmi-phandle = <&hdmi_tx>; |
| 169 |
}; |
| 170 |
|
| 171 |
ðmac { |
| 172 |
status = "okay"; |
| 173 |
pinctrl-0 = <ð_rgmii_pins>; |
| 174 |
pinctrl-names = "default"; |
| 175 |
|
| 176 |
phy-handle = <ð_phy0>; |
| 177 |
phy-mode = "rgmii"; |
| 178 |
|
| 179 |
amlogic,tx-delay-ns = <2>; |
| 180 |
|
| 181 |
mdio { |
| 182 |
compatible = "snps,dwmac-mdio"; |
| 183 |
#address-cells = <1>; |
| 184 |
#size-cells = <0>; |
| 185 |
|
| 186 |
eth_phy0: ethernet-phy@0 { |
| 187 |
/* Realtek RTL8211F (0x001cc916) */ |
| 188 |
reg = <0>; |
| 189 |
|
| 190 |
reset-assert-us = <10000>; |
| 191 |
reset-deassert-us = <80000>; |
| 192 |
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; |
| 193 |
|
| 194 |
interrupt-parent = <&gpio_intc>; |
| 195 |
/* MAC_INTR on GPIOZ_15 */ |
| 196 |
interrupts = <29 IRQ_TYPE_LEVEL_LOW>; |
| 197 |
}; |
| 198 |
}; |
| 199 |
}; |
| 200 |
|
| 201 |
&hdmi_tx { |
| 202 |
status = "okay"; |
| 203 |
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; |
| 204 |
pinctrl-names = "default"; |
| 205 |
}; |
| 206 |
|
| 207 |
&hdmi_tx_tmds_port { |
| 208 |
hdmi_tx_tmds_out: endpoint { |
| 209 |
remote-endpoint = <&hdmi_connector_in>; |
| 210 |
}; |
| 211 |
}; |
| 212 |
|
| 213 |
&ir { |
| 214 |
status = "okay"; |
| 215 |
pinctrl-0 = <&remote_input_ao_pins>; |
| 216 |
pinctrl-names = "default"; |
| 217 |
linux,rc-map-name = "rc-vega-s9x"; |
| 218 |
}; |
| 219 |
|
| 220 |
&pwm_ef { |
| 221 |
status = "okay"; |
| 222 |
pinctrl-0 = <&pwm_e_pins>; |
| 223 |
pinctrl-names = "default"; |
| 224 |
}; |
| 225 |
|
| 226 |
&saradc { |
| 227 |
status = "okay"; |
| 228 |
vref-supply = <&vddio_ao18>; |
| 229 |
}; |
| 230 |
|
| 231 |
/* Wireless SDIO Module */ |
| 232 |
&sd_emmc_a { |
| 233 |
status = "okay"; |
| 234 |
pinctrl-0 = <&sdio_pins>; |
| 235 |
pinctrl-1 = <&sdio_clk_gate_pins>; |
| 236 |
pinctrl-names = "default", "clk-gate"; |
| 237 |
#address-cells = <1>; |
| 238 |
#size-cells = <0>; |
| 239 |
|
| 240 |
bus-width = <4>; |
| 241 |
cap-sd-highspeed; |
| 242 |
max-frequency = <50000000>; |
| 243 |
|
| 244 |
non-removable; |
| 245 |
disable-wp; |
| 246 |
|
| 247 |
/* WiFi firmware requires power to be kept while in suspend */ |
| 248 |
keep-power-in-suspend; |
| 249 |
|
| 250 |
mmc-pwrseq = <&sdio_pwrseq>; |
| 251 |
|
| 252 |
vmmc-supply = <&vddao_3v3>; |
| 253 |
vqmmc-supply = <&vddio_boot>; |
| 254 |
|
| 255 |
brcmf: wifi@1 { |
| 256 |
reg = <1>; |
| 257 |
compatible = "brcm,bcm4329-fmac"; |
| 258 |
}; |
| 259 |
}; |
| 260 |
|
| 261 |
/* SD card */ |
| 262 |
&sd_emmc_b { |
| 263 |
status = "okay"; |
| 264 |
pinctrl-0 = <&sdcard_pins>; |
| 265 |
pinctrl-1 = <&sdcard_clk_gate_pins>; |
| 266 |
pinctrl-names = "default", "clk-gate"; |
| 267 |
|
| 268 |
bus-width = <4>; |
| 269 |
cap-sd-highspeed; |
| 270 |
max-frequency = <50000000>; |
| 271 |
disable-wp; |
| 272 |
|
| 273 |
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; |
| 274 |
|
| 275 |
vmmc-supply = <&vddao_3v3>; |
| 276 |
vqmmc-supply = <&vcc_3v3>; |
| 277 |
}; |
| 278 |
|
| 279 |
/* eMMC */ |
| 280 |
&sd_emmc_c { |
| 281 |
status = "okay"; |
| 282 |
pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; |
| 283 |
pinctrl-1 = <&emmc_clk_gate_pins>; |
| 284 |
pinctrl-names = "default", "clk-gate"; |
| 285 |
|
| 286 |
bus-width = <8>; |
| 287 |
cap-mmc-highspeed; |
| 288 |
max-frequency = <200000000>; |
| 289 |
non-removable; |
| 290 |
disable-wp; |
| 291 |
mmc-ddr-1_8v; |
| 292 |
mmc-hs200-1_8v; |
| 293 |
|
| 294 |
mmc-pwrseq = <&emmc_pwrseq>; |
| 295 |
vmmc-supply = <&vcc_3v3>; |
| 296 |
vqmmc-supply = <&vddio_boot>; |
| 297 |
}; |
| 298 |
|
| 299 |
/* This is connected to the Bluetooth module: */ |
| 300 |
&uart_A { |
| 301 |
status = "okay"; |
| 302 |
pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; |
| 303 |
pinctrl-names = "default"; |
| 304 |
|
| 305 |
bluetooth { |
| 306 |
compatible = "brcm,bcm43438-bt"; |
| 307 |
shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>; |
| 308 |
max-speed = <2000000>; |
| 309 |
clocks = <&wifi32k>; |
| 310 |
clock-names = "lpo"; |
| 311 |
}; |
| 312 |
}; |
| 313 |
|
| 314 |
/* This UART is brought out to the DB9 connector */ |
| 315 |
&uart_AO { |
| 316 |
status = "okay"; |
| 317 |
pinctrl-0 = <&uart_ao_a_pins>; |
| 318 |
pinctrl-names = "default"; |
| 319 |
}; |
| 320 |
|
| 321 |
&usb0_phy { |
| 322 |
status = "okay"; |
| 323 |
phy-supply = <&usb_pwr>; |
| 324 |
}; |
| 325 |
|
| 326 |
&usb1_phy { |
| 327 |
status = "okay"; |
| 328 |
}; |
| 329 |
|
| 330 |
&usb0 { |
| 331 |
status = "okay"; |
| 332 |
}; |
| 333 |
|
| 334 |
&usb1 { |
| 335 |
status = "okay"; |
| 336 |
}; |