0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2016 Andreas Färber
0004 */
0005
0006 #include "meson-gxbb.dtsi"
0007 #include <dt-bindings/sound/meson-aiu.h>
0008
0009 / {
0010 compatible = "tronsmart,vega-s95", "amlogic,meson-gxbb";
0011
0012 aliases {
0013 serial0 = &uart_AO;
0014 ethernet0 = ðmac;
0015 };
0016
0017 chosen {
0018 stdout-path = "serial0:115200n8";
0019 };
0020
0021 spdif_dit: audio-codec-0 {
0022 #sound-dai-cells = <0>;
0023 compatible = "linux,spdif-dit";
0024 status = "okay";
0025 sound-name-prefix = "DIT";
0026 };
0027
0028 leds {
0029 compatible = "gpio-leds";
0030
0031 led-blue {
0032 label = "vega-s95:blue:on";
0033 gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
0034 default-state = "on";
0035 panic-indicator;
0036 };
0037 };
0038
0039 usb_pwr: regulator-usb-pwrs {
0040 compatible = "regulator-fixed";
0041
0042 regulator-name = "USB_PWR";
0043
0044 regulator-min-microvolt = <5000000>;
0045 regulator-max-microvolt = <5000000>;
0046
0047 gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
0048 enable-active-high;
0049 };
0050
0051 vddio_boot: regulator-vddio_boot {
0052 compatible = "regulator-fixed";
0053 regulator-name = "VDDIO_BOOT";
0054 regulator-min-microvolt = <1800000>;
0055 regulator-max-microvolt = <1800000>;
0056 };
0057
0058 vddao_3v3: regulator-vddao_3v3 {
0059 compatible = "regulator-fixed";
0060 regulator-name = "VDDAO_3V3";
0061 regulator-min-microvolt = <3300000>;
0062 regulator-max-microvolt = <3300000>;
0063 };
0064
0065 vddio_ao18: regulator-vddio_ao18 {
0066 compatible = "regulator-fixed";
0067 regulator-name = "VDDIO_AO18";
0068 regulator-min-microvolt = <1800000>;
0069 regulator-max-microvolt = <1800000>;
0070 };
0071
0072 vcc_3v3: regulator-vcc_3v3 {
0073 compatible = "regulator-fixed";
0074 regulator-name = "VCC_3V3";
0075 regulator-min-microvolt = <3300000>;
0076 regulator-max-microvolt = <3300000>;
0077 };
0078
0079 emmc_pwrseq: emmc-pwrseq {
0080 compatible = "mmc-pwrseq-emmc";
0081 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
0082 };
0083
0084 wifi32k: wifi32k {
0085 compatible = "pwm-clock";
0086 #clock-cells = <0>;
0087 clock-frequency = <32768>;
0088 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
0089 };
0090
0091 hdmi-connector {
0092 compatible = "hdmi-connector";
0093 type = "a";
0094
0095 port {
0096 hdmi_connector_in: endpoint {
0097 remote-endpoint = <&hdmi_tx_tmds_out>;
0098 };
0099 };
0100 };
0101
0102 sdio_pwrseq: sdio-pwrseq {
0103 compatible = "mmc-pwrseq-simple";
0104 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
0105 clocks = <&wifi32k>;
0106 clock-names = "ext_clock";
0107 };
0108
0109 sound {
0110 compatible = "amlogic,gx-sound-card";
0111 model = "VEGA-S95";
0112 assigned-clocks = <&clkc CLKID_MPLL0>,
0113 <&clkc CLKID_MPLL1>,
0114 <&clkc CLKID_MPLL2>;
0115 assigned-clock-parents = <0>, <0>, <0>;
0116 assigned-clock-rates = <294912000>,
0117 <270950400>,
0118 <393216000>;
0119 status = "okay";
0120
0121 dai-link-0 {
0122 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
0123 };
0124
0125 dai-link-1 {
0126 sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
0127 };
0128
0129 dai-link-2 {
0130 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
0131 dai-format = "i2s";
0132 mclk-fs = <256>;
0133
0134 codec-0 {
0135 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
0136 };
0137 };
0138
0139 dai-link-3 {
0140 sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
0141
0142 codec-0 {
0143 sound-dai = <&spdif_dit>;
0144 };
0145 };
0146
0147 dai-link-4 {
0148 sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
0149
0150 codec-0 {
0151 sound-dai = <&hdmi_tx>;
0152 };
0153 };
0154 };
0155 };
0156
0157 &aiu {
0158 status = "okay";
0159 pinctrl-0 = <&spdif_out_y_pins>;
0160 pinctrl-names = "default";
0161 };
0162
0163 &cec_AO {
0164 status = "okay";
0165 pinctrl-0 = <&ao_cec_pins>;
0166 pinctrl-names = "default";
0167 hdmi-phandle = <&hdmi_tx>;
0168 };
0169
0170 ðmac {
0171 status = "okay";
0172 pinctrl-0 = <ð_rgmii_pins>;
0173 pinctrl-names = "default";
0174
0175 phy-handle = <ð_phy0>;
0176 phy-mode = "rgmii";
0177
0178 amlogic,tx-delay-ns = <2>;
0179
0180 mdio {
0181 compatible = "snps,dwmac-mdio";
0182 #address-cells = <1>;
0183 #size-cells = <0>;
0184
0185 eth_phy0: ethernet-phy@0 {
0186 /* Realtek RTL8211F (0x001cc916) */
0187 reg = <0>;
0188
0189 reset-assert-us = <10000>;
0190 reset-deassert-us = <80000>;
0191 reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
0192
0193 interrupt-parent = <&gpio_intc>;
0194 /* MAC_INTR on GPIOZ_15 */
0195 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
0196 };
0197 };
0198 };
0199
0200 &hdmi_tx {
0201 status = "okay";
0202 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
0203 pinctrl-names = "default";
0204 };
0205
0206 &hdmi_tx_tmds_port {
0207 hdmi_tx_tmds_out: endpoint {
0208 remote-endpoint = <&hdmi_connector_in>;
0209 };
0210 };
0211
0212 &ir {
0213 status = "okay";
0214 pinctrl-0 = <&remote_input_ao_pins>;
0215 pinctrl-names = "default";
0216 linux,rc-map-name = "rc-vega-s9x";
0217 };
0218
0219 &pwm_ef {
0220 status = "okay";
0221 pinctrl-0 = <&pwm_e_pins>;
0222 pinctrl-names = "default";
0223 clocks = <&clkc CLKID_FCLK_DIV4>;
0224 clock-names = "clkin0";
0225 };
0226
0227 &saradc {
0228 status = "okay";
0229 vref-supply = <&vddio_ao18>;
0230 };
0231
0232 /* Wireless SDIO Module */
0233 &sd_emmc_a {
0234 status = "okay";
0235 pinctrl-0 = <&sdio_pins>;
0236 pinctrl-1 = <&sdio_clk_gate_pins>;
0237 pinctrl-names = "default", "clk-gate";
0238 #address-cells = <1>;
0239 #size-cells = <0>;
0240
0241 bus-width = <4>;
0242 cap-sd-highspeed;
0243 max-frequency = <50000000>;
0244
0245 non-removable;
0246 disable-wp;
0247
0248 /* WiFi firmware requires power to be kept while in suspend */
0249 keep-power-in-suspend;
0250
0251 mmc-pwrseq = <&sdio_pwrseq>;
0252
0253 vmmc-supply = <&vddao_3v3>;
0254 vqmmc-supply = <&vddio_boot>;
0255
0256 brcmf: wifi@1 {
0257 reg = <1>;
0258 compatible = "brcm,bcm4329-fmac";
0259 };
0260 };
0261
0262 /* SD card */
0263 &sd_emmc_b {
0264 status = "okay";
0265 pinctrl-0 = <&sdcard_pins>;
0266 pinctrl-1 = <&sdcard_clk_gate_pins>;
0267 pinctrl-names = "default", "clk-gate";
0268
0269 bus-width = <4>;
0270 cap-sd-highspeed;
0271 max-frequency = <50000000>;
0272 disable-wp;
0273
0274 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
0275
0276 vmmc-supply = <&vddao_3v3>;
0277 vqmmc-supply = <&vcc_3v3>;
0278 };
0279
0280 /* eMMC */
0281 &sd_emmc_c {
0282 status = "okay";
0283 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
0284 pinctrl-1 = <&emmc_clk_gate_pins>;
0285 pinctrl-names = "default", "clk-gate";
0286
0287 bus-width = <8>;
0288 cap-mmc-highspeed;
0289 max-frequency = <200000000>;
0290 non-removable;
0291 disable-wp;
0292 mmc-ddr-1_8v;
0293 mmc-hs200-1_8v;
0294
0295 mmc-pwrseq = <&emmc_pwrseq>;
0296 vmmc-supply = <&vcc_3v3>;
0297 vqmmc-supply = <&vddio_boot>;
0298 };
0299
0300 /* This is connected to the Bluetooth module: */
0301 &uart_A {
0302 status = "okay";
0303 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
0304 pinctrl-names = "default";
0305
0306 bluetooth {
0307 compatible = "brcm,bcm43438-bt";
0308 shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
0309 max-speed = <2000000>;
0310 clocks = <&wifi32k>;
0311 clock-names = "lpo";
0312 };
0313 };
0314
0315 /* This UART is brought out to the DB9 connector */
0316 &uart_AO {
0317 status = "okay";
0318 pinctrl-0 = <&uart_ao_a_pins>;
0319 pinctrl-names = "default";
0320 };
0321
0322 &usb0_phy {
0323 status = "okay";
0324 phy-supply = <&usb_pwr>;
0325 };
0326
0327 &usb1_phy {
0328 status = "okay";
0329 };
0330
0331 &usb0 {
0332 status = "okay";
0333 };
0334
0335 &usb1 {
0336 status = "okay";
0337 };