0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2018 BayLibre, SAS.
0004 * Author: Neil Armstrong <narmstrong@baylibre.com>
0005 * Author: Jerome Brunet <jbrunet@baylibre.com>
0006 */
0007
0008 /dts-v1/;
0009
0010 #include <dt-bindings/input/input.h>
0011 #include <dt-bindings/sound/meson-aiu.h>
0012
0013 #include "meson-gxl-s805x.dtsi"
0014
0015 / {
0016 compatible = "amlogic,p241", "amlogic,s805x", "amlogic,meson-gxl";
0017 model = "Amlogic Meson GXL (S805X) P241 Development Board";
0018
0019 aliases {
0020 serial0 = &uart_AO;
0021 serial1 = &uart_A;
0022 ethernet0 = ðmac;
0023 };
0024
0025 au2: analog-amplifier {
0026 compatible = "simple-audio-amplifier";
0027 sound-name-prefix = "AU2";
0028 VCC-supply = <&vcc_5v>;
0029 enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
0030 };
0031
0032 chosen {
0033 stdout-path = "serial0:115200n8";
0034 };
0035
0036 cvbs-connector {
0037 compatible = "composite-video-connector";
0038
0039 port {
0040 cvbs_connector_in: endpoint {
0041 remote-endpoint = <&cvbs_vdac_out>;
0042 };
0043 };
0044 };
0045
0046 emmc_pwrseq: emmc-pwrseq {
0047 compatible = "mmc-pwrseq-emmc";
0048 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
0049 };
0050
0051 hdmi-connector {
0052 compatible = "hdmi-connector";
0053 type = "a";
0054
0055 port {
0056 hdmi_connector_in: endpoint {
0057 remote-endpoint = <&hdmi_tx_tmds_out>;
0058 };
0059 };
0060 };
0061
0062 memory@0 {
0063 device_type = "memory";
0064 reg = <0x0 0x0 0x0 0x20000000>;
0065 };
0066
0067 vddio_boot: regulator-vddio_boot {
0068 compatible = "regulator-fixed";
0069 regulator-name = "VDDIO_BOOT";
0070 regulator-min-microvolt = <1800000>;
0071 regulator-max-microvolt = <1800000>;
0072 };
0073
0074 vddao_3v3: regulator-vddao_3v3 {
0075 compatible = "regulator-fixed";
0076 regulator-name = "VDDAO_3V3";
0077 regulator-min-microvolt = <3300000>;
0078 regulator-max-microvolt = <3300000>;
0079 };
0080
0081 vddio_ao18: regulator-vddio_ao18 {
0082 compatible = "regulator-fixed";
0083 regulator-name = "VDDIO_AO18";
0084 regulator-min-microvolt = <1800000>;
0085 regulator-max-microvolt = <1800000>;
0086 };
0087
0088 vcc_3v3: regulator-vcc_3v3 {
0089 compatible = "regulator-fixed";
0090 regulator-name = "VCC_3V3";
0091 regulator-min-microvolt = <3300000>;
0092 regulator-max-microvolt = <3300000>;
0093 };
0094
0095 vcc_5v: regulator-vcc-5v {
0096 compatible = "regulator-fixed";
0097 regulator-name = "VCC_5V";
0098 regulator-min-microvolt = <5000000>;
0099 regulator-max-microvolt = <5000000>;
0100 };
0101
0102
0103 emmc_pwrseq: emmc-pwrseq {
0104 compatible = "mmc-pwrseq-emmc";
0105 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
0106 };
0107
0108 wifi32k: wifi32k {
0109 compatible = "pwm-clock";
0110 #clock-cells = <0>;
0111 clock-frequency = <32768>;
0112 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
0113 };
0114
0115 sdio_pwrseq: sdio-pwrseq {
0116 compatible = "mmc-pwrseq-simple";
0117 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
0118 clocks = <&wifi32k>;
0119 clock-names = "ext_clock";
0120 };
0121
0122 sound {
0123 compatible = "amlogic,gx-sound-card";
0124 model = "GXL-P241";
0125 audio-aux-devs = <&au2>;
0126 audio-widgets = "Line", "Lineout";
0127 audio-routing = "AU2 INL", "ACODEC LOLN",
0128 "AU2 INR", "ACODEC LORN",
0129 "Lineout", "AU2 OUTL",
0130 "Lineout", "AU2 OUTR";
0131 assigned-clocks = <&clkc CLKID_MPLL0>,
0132 <&clkc CLKID_MPLL1>,
0133 <&clkc CLKID_MPLL2>;
0134 assigned-clock-parents = <0>, <0>, <0>;
0135 assigned-clock-rates = <294912000>,
0136 <270950400>,
0137 <393216000>;
0138 status = "okay";
0139
0140 dai-link-0 {
0141 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
0142 };
0143
0144 dai-link-1 {
0145 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
0146 dai-format = "i2s";
0147 mclk-fs = <256>;
0148
0149 codec-0 {
0150 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
0151 };
0152
0153 codec-1 {
0154 sound-dai = <&aiu AIU_ACODEC CTRL_I2S>;
0155 };
0156 };
0157
0158 dai-link-2 {
0159 sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
0160
0161 codec-0 {
0162 sound-dai = <&hdmi_tx>;
0163 };
0164 };
0165
0166 dai-link-3 {
0167 sound-dai = <&aiu AIU_ACODEC CTRL_OUT>;
0168
0169 codec-0 {
0170 sound-dai = <&acodec>;
0171 };
0172 };
0173 };
0174 };
0175
0176 &acodec {
0177 AVDD-supply = <&vddio_ao18>;
0178 status = "okay";
0179 };
0180
0181 &aiu {
0182 status = "okay";
0183 };
0184
0185 &cec_AO {
0186 status = "okay";
0187 pinctrl-0 = <&ao_cec_pins>;
0188 pinctrl-names = "default";
0189 hdmi-phandle = <&hdmi_tx>;
0190 };
0191
0192 &cvbs_vdac_port {
0193 cvbs_vdac_out: endpoint {
0194 remote-endpoint = <&cvbs_connector_in>;
0195 };
0196 };
0197
0198 ðmac {
0199 status = "okay";
0200 };
0201
0202 &internal_phy {
0203 pinctrl-0 = <ð_link_led_pins>, <ð_act_led_pins>;
0204 pinctrl-names = "default";
0205 };
0206
0207 &ir {
0208 status = "okay";
0209 pinctrl-0 = <&remote_input_ao_pins>;
0210 pinctrl-names = "default";
0211 };
0212
0213 &hdmi_tx {
0214 status = "okay";
0215 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
0216 pinctrl-names = "default";
0217 hdmi-supply = <&vcc_5v>;
0218 };
0219
0220 &hdmi_tx_tmds_port {
0221 hdmi_tx_tmds_out: endpoint {
0222 remote-endpoint = <&hdmi_connector_in>;
0223 };
0224 };
0225
0226 &saradc {
0227 status = "okay";
0228 vref-supply = <&vddio_ao18>;
0229 };
0230
0231 /* Wireless SDIO Module */
0232 &sd_emmc_a {
0233 status = "okay";
0234 pinctrl-0 = <&sdio_pins>;
0235 pinctrl-1 = <&sdio_clk_gate_pins>;
0236 pinctrl-names = "default", "clk-gate";
0237 #address-cells = <1>;
0238 #size-cells = <0>;
0239
0240 bus-width = <4>;
0241 cap-sd-highspeed;
0242 max-frequency = <50000000>;
0243
0244 non-removable;
0245 disable-wp;
0246
0247 /* WiFi firmware requires power to be kept while in suspend */
0248 keep-power-in-suspend;
0249
0250 mmc-pwrseq = <&sdio_pwrseq>;
0251
0252 vmmc-supply = <&vddao_3v3>;
0253 vqmmc-supply = <&vddio_boot>;
0254 };
0255
0256 /* eMMC */
0257 &sd_emmc_c {
0258 status = "okay";
0259 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
0260 pinctrl-1 = <&emmc_clk_gate_pins>;
0261 pinctrl-names = "default", "clk-gate";
0262
0263 bus-width = <8>;
0264 cap-mmc-highspeed;
0265 max-frequency = <200000000>;
0266 non-removable;
0267 disable-wp;
0268 mmc-ddr-1_8v;
0269 mmc-hs200-1_8v;
0270
0271 mmc-pwrseq = <&emmc_pwrseq>;
0272 vmmc-supply = <&vcc_3v3>;
0273 vqmmc-supply = <&vddio_boot>;
0274 };
0275
0276 &pwm_ef {
0277 status = "okay";
0278 pinctrl-0 = <&pwm_e_pins>;
0279 pinctrl-names = "default";
0280 clocks = <&clkc CLKID_FCLK_DIV4>;
0281 clock-names = "clkin0";
0282 };
0283
0284 /* This is connected to the Bluetooth module: */
0285 &uart_A {
0286 status = "okay";
0287 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
0288 pinctrl-names = "default";
0289 uart-has-rtscts;
0290 };
0291
0292 &uart_AO {
0293 status = "okay";
0294 pinctrl-0 = <&uart_ao_a_pins>;
0295 pinctrl-names = "default";
0296 };
0297
0298 &usb {
0299 status = "okay";
0300 dr_mode = "host";
0301 };
0302
0303 &usb2_phy0 {
0304 phy-supply = <&vcc_5v>;
0305 };