0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2016 BayLibre, SAS.
0004 * Author: Neil Armstrong <narmstrong@baylibre.com>
0005 *
0006 * Copyright (c) 2016 Endless Computers, Inc.
0007 * Author: Carlo Caione <carlo@endlessm.com>
0008 */
0009
0010 /dts-v1/;
0011
0012 #include "meson-gxm.dtsi"
0013 #include <dt-bindings/sound/meson-aiu.h>
0014
0015 / {
0016 compatible = "nexbox,a1", "amlogic,s912", "amlogic,meson-gxm";
0017 model = "NEXBOX A1";
0018
0019 aliases {
0020 serial0 = &uart_AO;
0021 ethernet0 = ðmac;
0022 };
0023
0024 chosen {
0025 stdout-path = "serial0:115200n8";
0026 };
0027
0028 spdif_dit: audio-codec-0 {
0029 #sound-dai-cells = <0>;
0030 compatible = "linux,spdif-dit";
0031 status = "okay";
0032 sound-name-prefix = "DIT";
0033 };
0034
0035 memory@0 {
0036 device_type = "memory";
0037 reg = <0x0 0x0 0x0 0x80000000>;
0038 };
0039
0040 vddio_boot: regulator-vddio-boot {
0041 compatible = "regulator-fixed";
0042 regulator-name = "VDDIO_BOOT";
0043 regulator-min-microvolt = <1800000>;
0044 regulator-max-microvolt = <1800000>;
0045 };
0046
0047 vddao_3v3: regulator-vddao-3v3 {
0048 compatible = "regulator-fixed";
0049 regulator-name = "VDDAO_3V3";
0050 regulator-min-microvolt = <3300000>;
0051 regulator-max-microvolt = <3300000>;
0052 };
0053
0054 vcc_3v3: regulator-vcc-3v3 {
0055 compatible = "regulator-fixed";
0056 regulator-name = "VCC_3V3";
0057 regulator-min-microvolt = <3300000>;
0058 regulator-max-microvolt = <3300000>;
0059 };
0060
0061 emmc_pwrseq: emmc-pwrseq {
0062 compatible = "mmc-pwrseq-emmc";
0063 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
0064 };
0065
0066 cvbs-connector {
0067 compatible = "composite-video-connector";
0068
0069 port {
0070 cvbs_connector_in: endpoint {
0071 remote-endpoint = <&cvbs_vdac_out>;
0072 };
0073 };
0074 };
0075
0076 hdmi-connector {
0077 compatible = "hdmi-connector";
0078 type = "a";
0079
0080 port {
0081 hdmi_connector_in: endpoint {
0082 remote-endpoint = <&hdmi_tx_tmds_out>;
0083 };
0084 };
0085 };
0086
0087 sound {
0088 compatible = "amlogic,gx-sound-card";
0089 model = "NEXBOX-A1";
0090 assigned-clocks = <&clkc CLKID_MPLL0>,
0091 <&clkc CLKID_MPLL1>,
0092 <&clkc CLKID_MPLL2>;
0093 assigned-clock-parents = <0>, <0>, <0>;
0094 assigned-clock-rates = <294912000>,
0095 <270950400>,
0096 <393216000>;
0097 status = "okay";
0098
0099 dai-link-0 {
0100 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
0101 };
0102
0103 dai-link-1 {
0104 sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
0105 };
0106
0107 dai-link-2 {
0108 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
0109 dai-format = "i2s";
0110 mclk-fs = <256>;
0111
0112 codec-0 {
0113 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
0114 };
0115 };
0116
0117 dai-link-3 {
0118 sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
0119
0120 codec-0 {
0121 sound-dai = <&spdif_dit>;
0122 };
0123 };
0124
0125 dai-link-4 {
0126 sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
0127
0128 codec-0 {
0129 sound-dai = <&hdmi_tx>;
0130 };
0131 };
0132 };
0133 };
0134
0135 &aiu {
0136 status = "okay";
0137 pinctrl-0 = <&spdif_out_h_pins>;
0138 pinctrl-names = "default";
0139 };
0140
0141 &cec_AO {
0142 status = "okay";
0143 pinctrl-0 = <&ao_cec_pins>;
0144 pinctrl-names = "default";
0145 hdmi-phandle = <&hdmi_tx>;
0146 };
0147
0148 &cvbs_vdac_port {
0149 cvbs_vdac_out: endpoint {
0150 remote-endpoint = <&cvbs_connector_in>;
0151 };
0152 };
0153
0154 ðmac {
0155 status = "okay";
0156
0157 pinctrl-0 = <ð_pins>;
0158 pinctrl-names = "default";
0159
0160 /* Select external PHY by default */
0161 phy-handle = <&external_phy>;
0162
0163 amlogic,tx-delay-ns = <2>;
0164
0165 /* External PHY is in RGMII */
0166 phy-mode = "rgmii";
0167 };
0168
0169 &external_mdio {
0170 external_phy: ethernet-phy@0 {
0171 /* Realtek RTL8211F (0x001cc916) */
0172 reg = <0>;
0173 max-speed = <1000>;
0174
0175 reset-assert-us = <10000>;
0176 reset-deassert-us = <80000>;
0177 reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
0178 };
0179 };
0180
0181 &hdmi_tx {
0182 status = "okay";
0183 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
0184 pinctrl-names = "default";
0185 };
0186
0187 &hdmi_tx_tmds_port {
0188 hdmi_tx_tmds_out: endpoint {
0189 remote-endpoint = <&hdmi_connector_in>;
0190 };
0191 };
0192
0193 &ir {
0194 status = "okay";
0195 pinctrl-0 = <&remote_input_ao_pins>;
0196 pinctrl-names = "default";
0197 };
0198
0199 /* SD card */
0200 &sd_emmc_b {
0201 status = "okay";
0202 pinctrl-0 = <&sdcard_pins>;
0203 pinctrl-1 = <&sdcard_clk_gate_pins>;
0204 pinctrl-names = "default", "clk-gate";
0205
0206 bus-width = <4>;
0207 cap-sd-highspeed;
0208 max-frequency = <50000000>;
0209 disable-wp;
0210
0211 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
0212
0213 vmmc-supply = <&vddao_3v3>;
0214 vqmmc-supply = <&vddio_boot>;
0215 };
0216
0217 /* eMMC */
0218 &sd_emmc_c {
0219 status = "okay";
0220 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
0221 pinctrl-1 = <&emmc_clk_gate_pins>;
0222 pinctrl-names = "default", "clk-gate";
0223
0224 bus-width = <8>;
0225 cap-mmc-highspeed;
0226 max-frequency = <200000000>;
0227 non-removable;
0228 disable-wp;
0229 mmc-ddr-1_8v;
0230 mmc-hs200-1_8v;
0231
0232 mmc-pwrseq = <&emmc_pwrseq>;
0233 vmmc-supply = <&vcc_3v3>;
0234 vqmmc-supply = <&vddio_boot>;
0235 };
0236
0237 &uart_AO {
0238 status = "okay";
0239 pinctrl-0 = <&uart_ao_a_pins>;
0240 pinctrl-names = "default";
0241 };
0242
0243 &usb {
0244 status = "okay";
0245 dr_mode = "host";
0246 };