Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2020 BayLibre, SAS.
0004  * Author: Jerome Brunet <jbrunet@baylibre.com>
0005  */
0006 
0007 /dts-v1/;
0008 
0009 #include <dt-bindings/input/input.h>
0010 #include <dt-bindings/leds/common.h>
0011 #include <dt-bindings/sound/meson-aiu.h>
0012 
0013 #include "meson-gxl-s905x.dtsi"
0014 
0015 / {
0016         compatible = "libretech,aml-s905x-cc-v2", "amlogic,s905x",
0017                      "amlogic,meson-gxl";
0018         model = "Libre Computer AML-S905X-CC V2";
0019 
0020         aliases {
0021                 serial0 = &uart_AO;
0022                 ethernet0 = &ethmac;
0023                 spi0 = &spifc;
0024         };
0025 
0026         chosen {
0027                 stdout-path = "serial0:115200n8";
0028         };
0029 
0030         emmc_pwrseq: emmc-pwrseq {
0031                 compatible = "mmc-pwrseq-emmc";
0032                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
0033         };
0034 
0035         hdmi-connector {
0036                 compatible = "hdmi-connector";
0037                 type = "a";
0038 
0039                 port {
0040                         hdmi_connector_in: endpoint {
0041                                 remote-endpoint = <&hdmi_tx_tmds_out>;
0042                         };
0043                 };
0044         };
0045 
0046         leds {
0047                 compatible = "gpio-leds";
0048 
0049                 led-blue {
0050                         color = <LED_COLOR_ID_BLUE>;
0051                         function = LED_FUNCTION_STATUS;
0052                         gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
0053                         linux,default-trigger = "heartbeat";
0054                         panic-indicator;
0055                 };
0056 
0057                 led-green {
0058                         color = <LED_COLOR_ID_GREEN>;
0059                         function = LED_FUNCTION_DISK_ACTIVITY;
0060                         gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
0061                         linux,default-trigger = "disk-activity";
0062                 };
0063         };
0064 
0065         memory@0 {
0066                 device_type = "memory";
0067                 reg = <0x0 0x0 0x0 0x80000000>;
0068         };
0069 
0070         ao_5v: regulator-ao_5v {
0071                 compatible = "regulator-fixed";
0072                 regulator-name = "AO_5V";
0073                 regulator-min-microvolt = <5000000>;
0074                 regulator-max-microvolt = <5000000>;
0075                 vin-supply = <&dc_in>;
0076                 regulator-always-on;
0077         };
0078 
0079         dc_in: regulator-dc_in {
0080                 compatible = "regulator-fixed";
0081                 regulator-name = "DC_IN";
0082                 regulator-min-microvolt = <5000000>;
0083                 regulator-max-microvolt = <5000000>;
0084                 regulator-always-on;
0085         };
0086 
0087         vcck: regulator-vcck {
0088                 compatible = "regulator-fixed";
0089                 regulator-name = "VCCK";
0090                 regulator-min-microvolt = <3300000>;
0091                 regulator-max-microvolt = <3300000>;
0092                 vin-supply = <&ao_5v>;
0093                 regulator-always-on;
0094         };
0095 
0096         vcc_card: regulator-vcc_card {
0097                 compatible = "regulator-fixed";
0098                 regulator-name = "VCC_CARD";
0099                 regulator-min-microvolt = <3300000>;
0100                 regulator-max-microvolt = <3300000>;
0101                 vin-supply = <&vddio_ao3v3>;
0102 
0103                 gpio = <&gpio GPIOCLK_1 GPIO_ACTIVE_HIGH>;
0104                 enable-active-high;
0105         };
0106 
0107         vcc5v: regulator-vcc5v {
0108                 compatible = "regulator-fixed";
0109                 regulator-name = "VCC5V";
0110                 regulator-min-microvolt = <5000000>;
0111                 regulator-max-microvolt = <5000000>;
0112                 vin-supply = <&ao_5v>;
0113 
0114                 gpio = <&gpio GPIOH_3 GPIO_OPEN_DRAIN>;
0115         };
0116 
0117         vddio_ao3v3: regulator-vddio_ao3v3 {
0118                 compatible = "regulator-fixed";
0119                 regulator-name = "VDDIO_AO3V3";
0120                 regulator-min-microvolt = <3300000>;
0121                 regulator-max-microvolt = <3300000>;
0122                 vin-supply = <&ao_5v>;
0123                 regulator-always-on;
0124         };
0125 
0126         vddio_card: regulator-vddio-card {
0127                 compatible = "regulator-gpio";
0128                 regulator-name = "VDDIO_CARD";
0129                 regulator-min-microvolt = <1800000>;
0130                 regulator-max-microvolt = <3300000>;
0131 
0132                 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
0133                 gpios-states = <0>;
0134 
0135                 states = <3300000 0>,
0136                          <1800000 1>;
0137 
0138                 regulator-settling-time-up-us = <200>;
0139                 regulator-settling-time-down-us = <50000>;
0140         };
0141 
0142         vddio_ao18: regulator-vddio_ao18 {
0143                 compatible = "regulator-fixed";
0144                 regulator-name = "VDDIO_AO18";
0145                 regulator-min-microvolt = <1800000>;
0146                 regulator-max-microvolt = <1800000>;
0147                 vin-supply = <&vddio_ao3v3>;
0148                 regulator-always-on;
0149         };
0150 
0151         vcc_1v8: regulator-vcc_1v8 {
0152                 compatible = "regulator-fixed";
0153                 regulator-name = "VCC 1V8";
0154                 regulator-min-microvolt = <1800000>;
0155                 regulator-max-microvolt = <1800000>;
0156                 vin-supply = <&vddio_ao3v3>;
0157                 regulator-always-on;
0158         };
0159 
0160         sound {
0161                 compatible = "amlogic,gx-sound-card";
0162                 model = "LIBRETECH-CC-V2";
0163                 assigned-clocks = <&clkc CLKID_MPLL0>,
0164                                   <&clkc CLKID_MPLL1>,
0165                                   <&clkc CLKID_MPLL2>;
0166                 assigned-clock-parents = <0>, <0>, <0>;
0167                 assigned-clock-rates = <294912000>,
0168                                        <270950400>,
0169                                        <393216000>;
0170                 status = "okay";
0171 
0172                 dai-link-0 {
0173                         sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
0174                 };
0175 
0176                 dai-link-1 {
0177                         sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
0178                         dai-format = "i2s";
0179                         mclk-fs = <256>;
0180 
0181                         codec-0 {
0182                                 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
0183                         };
0184                 };
0185 
0186                 dai-link-2 {
0187                         sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
0188 
0189                         codec-0 {
0190                                 sound-dai = <&hdmi_tx>;
0191                         };
0192                 };
0193         };
0194 };
0195 
0196 &aiu {
0197         status = "okay";
0198 };
0199 
0200 &cec_AO {
0201         status = "okay";
0202         pinctrl-0 = <&ao_cec_pins>;
0203         pinctrl-names = "default";
0204         hdmi-phandle = <&hdmi_tx>;
0205 };
0206 
0207 &ethmac {
0208         status = "okay";
0209 };
0210 
0211 &internal_phy {
0212         pinctrl-0 = <&eth_link_led_pins>, <&eth_act_led_pins>;
0213         pinctrl-names = "default";
0214 };
0215 
0216 &ir {
0217         status = "okay";
0218         pinctrl-0 = <&remote_input_ao_pins>;
0219         pinctrl-names = "default";
0220 };
0221 
0222 &hdmi_tx {
0223         status = "okay";
0224         pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
0225         hdmi-supply = <&vcc5v>;
0226         pinctrl-names = "default";
0227 };
0228 
0229 &hdmi_tx_tmds_port {
0230         hdmi_tx_tmds_out: endpoint {
0231                 remote-endpoint = <&hdmi_connector_in>;
0232         };
0233 };
0234 
0235 &saradc {
0236         status = "okay";
0237         vref-supply = <&vddio_ao18>;
0238 };
0239 
0240 /* SD card */
0241 &sd_emmc_b {
0242         pinctrl-0 = <&sdcard_pins>;
0243         pinctrl-1 = <&sdcard_clk_gate_pins>;
0244         pinctrl-names = "default", "clk-gate";
0245 
0246         bus-width = <4>;
0247         cap-sd-highspeed;
0248         sd-uhs-sdr12;
0249         sd-uhs-sdr25;
0250         sd-uhs-sdr50;
0251         sd-uhs-ddr50;
0252         max-frequency = <100000000>;
0253         disable-wp;
0254 
0255         cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
0256 
0257         vmmc-supply = <&vcc_card>;
0258         vqmmc-supply = <&vddio_card>;
0259 
0260         status = "okay";
0261 };
0262 
0263 /* eMMC */
0264 &sd_emmc_c {
0265         pinctrl-0 = <&emmc_pins>;
0266         pinctrl-1 = <&emmc_clk_gate_pins>;
0267         pinctrl-names = "default", "clk-gate";
0268 
0269         bus-width = <8>;
0270         cap-mmc-highspeed;
0271         mmc-hs200-1_8v;
0272         max-frequency = <200000000>;
0273         disable-wp;
0274 
0275         mmc-pwrseq = <&emmc_pwrseq>;
0276         vmmc-supply = <&vddio_ao3v3>;
0277         vqmmc-supply = <&vcc_1v8>;
0278 
0279         status = "okay";
0280 };
0281 
0282 &spifc {
0283         status = "okay";
0284         pinctrl-0 = <&nor_pins>;
0285         pinctrl-names = "default";
0286 
0287         nor_4u1: flash@0 {
0288                 #address-cells = <1>;
0289                 #size-cells = <1>;
0290                 compatible = "jedec,spi-nor";
0291                 reg = <0>;
0292                 spi-max-frequency = <3000000>;
0293         };
0294 };
0295 
0296 &uart_AO {
0297         status = "okay";
0298         pinctrl-0 = <&uart_ao_a_pins>;
0299         pinctrl-names = "default";
0300 };
0301 
0302 &usb {
0303         status = "okay";
0304         dr_mode = "host";
0305 };
0306 
0307 &usb2_phy0 {
0308         pinctrl-names = "default";
0309         phy-supply = <&vcc5v>;
0310 };
0311 
0312 &usb2_phy1 {
0313         phy-supply = <&vcc5v>;
0314 };