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