Back to home page

OSCL-LXR

 
 

    


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 = "libretech,aml-s805x-ac", "amlogic,s805x",
0017                      "amlogic,meson-gxl";
0018         model = "Libre Computer AML-S805X-AC";
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         cvbs-connector {
0031                 /*
0032                  * The pads are present but no connector is soldered on
0033                  * 2J2, so keep this off by default.
0034                  */
0035                 status = "disabled";
0036                 compatible = "composite-video-connector";
0037 
0038                 port {
0039                         cvbs_connector_in: endpoint {
0040                                 remote-endpoint = <&cvbs_vdac_out>;
0041                         };
0042                 };
0043         };
0044 
0045         dc_5v: regulator-dc_5v {
0046                 compatible = "regulator-fixed";
0047                 regulator-name = "DC_5V";
0048                 regulator-min-microvolt = <5000000>;
0049                 regulator-max-microvolt = <5000000>;
0050                 regulator-always-on;
0051         };
0052 
0053         emmc_pwrseq: emmc-pwrseq {
0054                 compatible = "mmc-pwrseq-emmc";
0055                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
0056         };
0057 
0058         hdmi-connector {
0059                 compatible = "hdmi-connector";
0060                 type = "a";
0061 
0062                 port {
0063                         hdmi_connector_in: endpoint {
0064                                 remote-endpoint = <&hdmi_tx_tmds_out>;
0065                         };
0066                 };
0067         };
0068 
0069         memory@0 {
0070                 device_type = "memory";
0071                 reg = <0x0 0x0 0x0 0x20000000>;
0072         };
0073 
0074         vcck: regulator-vcck {
0075                 compatible = "regulator-fixed";
0076                 regulator-name = "VCCK";
0077                 regulator-min-microvolt = <3300000>;
0078                 regulator-max-microvolt = <3300000>;
0079                 vin-supply = <&dc_5v>;
0080 
0081                 /*
0082                  * This is controlled by GPIOAO_9 we reserve this but
0083                  * claiming it as done below reset the board anyway
0084                  * Need to investigate this
0085                  *
0086                  * gpio = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
0087                  * enable-active-high;
0088                  */
0089                 regulator-always-on;
0090         };
0091 
0092         vcc_3v3: regulator-vcc_3v3 {
0093                 compatible = "regulator-fixed";
0094                 regulator-name = "VCC_3V3";
0095                 regulator-min-microvolt = <3300000>;
0096                 regulator-max-microvolt = <3300000>;
0097                 vin-supply = <&dc_5v>;
0098                 regulator-always-on;
0099         };
0100 
0101         vddio_ao18: regulator-vddio_ao18 {
0102                 compatible = "regulator-fixed";
0103                 regulator-name = "VDDIO_AO18";
0104                 regulator-min-microvolt = <1800000>;
0105                 regulator-max-microvolt = <1800000>;
0106                 vin-supply = <&vcc_3v3>;
0107                 regulator-always-on;
0108         };
0109 
0110         vddio_boot: regulator-vddio_boot {
0111                 compatible = "regulator-fixed";
0112                 regulator-name = "VDDIO_BOOT";
0113                 regulator-min-microvolt = <1800000>;
0114                 regulator-max-microvolt = <1800000>;
0115                 vin-supply = <&vcc_3v3>;
0116                 regulator-always-on;
0117         };
0118 
0119         sound {
0120                 compatible = "amlogic,gx-sound-card";
0121                 model = "LIBRETECH-AC";
0122                 audio-widgets = "Speaker", "9J5-3 LEFT",
0123                                 "Speaker", "9J5-2 RIGHT";
0124                 audio-routing = "9J5-3 LEFT", "ACODEC LOLN",
0125                                 "9J5-2 RIGHT", "ACODEC LORN";
0126                 assigned-clocks = <&clkc CLKID_MPLL0>,
0127                                   <&clkc CLKID_MPLL1>,
0128                                   <&clkc CLKID_MPLL2>;
0129                 assigned-clock-parents = <0>, <0>, <0>;
0130                 assigned-clock-rates = <294912000>,
0131                                        <270950400>,
0132                                        <393216000>;
0133                 status = "okay";
0134 
0135                 dai-link-0 {
0136                         sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
0137                 };
0138 
0139                 dai-link-1 {
0140                         sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
0141                         dai-format = "i2s";
0142                         mclk-fs = <256>;
0143 
0144                         codec-0 {
0145                                 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
0146                         };
0147 
0148                         codec-1 {
0149                                 sound-dai = <&aiu AIU_ACODEC CTRL_I2S>;
0150                         };
0151                 };
0152 
0153                 dai-link-2 {
0154                         sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
0155 
0156                         codec-0 {
0157                                 sound-dai = <&hdmi_tx>;
0158                         };
0159                 };
0160 
0161                 dai-link-3 {
0162                         sound-dai = <&aiu AIU_ACODEC CTRL_OUT>;
0163 
0164                         codec-0 {
0165                                 sound-dai = <&acodec>;
0166                         };
0167                 };
0168         };
0169 };
0170 
0171 &acodec {
0172         AVDD-supply = <&vddio_ao18>;
0173         status = "okay";
0174 };
0175 
0176 &aiu {
0177         status = "okay";
0178 };
0179 
0180 &cec_AO {
0181         status = "okay";
0182         pinctrl-0 = <&ao_cec_pins>;
0183         pinctrl-names = "default";
0184         hdmi-phandle = <&hdmi_tx>;
0185 };
0186 
0187 &cvbs_vdac_port {
0188         cvbs_vdac_out: endpoint {
0189                 remote-endpoint = <&cvbs_connector_in>;
0190         };
0191 };
0192 
0193 &ethmac {
0194         status = "okay";
0195 };
0196 
0197 &internal_phy {
0198         pinctrl-0 = <&eth_link_led_pins>, <&eth_act_led_pins>;
0199         pinctrl-names = "default";
0200 };
0201 
0202 &ir {
0203         status = "okay";
0204         pinctrl-0 = <&remote_input_ao_pins>;
0205         pinctrl-names = "default";
0206 };
0207 
0208 &hdmi_tx {
0209         status = "okay";
0210         pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
0211         pinctrl-names = "default";
0212 };
0213 
0214 &hdmi_tx_tmds_port {
0215         hdmi_tx_tmds_out: endpoint {
0216                 remote-endpoint = <&hdmi_connector_in>;
0217         };
0218 };
0219 
0220 &gpio_ao {
0221         gpio-line-names = "UART TX",
0222                           "UART RX",
0223                           "7J1 Header Pin31",
0224                           "", "", "", "",
0225                           "IR In",
0226                           "HDMI CEC",
0227                           "5V VCCK Regulator",
0228                           /* GPIO_TEST_N */
0229                           "";
0230 };
0231 
0232 &gpio {
0233         gpio-line-names = /* Bank GPIOZ */
0234                           "", "", "", "", "", "", "",
0235                           "", "", "", "", "", "", "",
0236                           "Eth Link LED", "Eth Activity LED",
0237                           /* Bank GPIOH */
0238                           "HDMI HPD", "HDMI SDA", "HDMI SCL",
0239                           "", "7J1 Header Pin13",
0240                           "7J1 Header Pin15",
0241                           "7J1 Header Pin7",
0242                           "7J1 Header Pin12",
0243                           "7J1 Header Pin16",
0244                           "7J1 Header Pin18",
0245                           /* Bank BOOT */
0246                           "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3",
0247                           "eMMC D4", "eMMC D5", "eMMC D6", "eMMC D7",
0248                           "eMMC Clk", "eMMC Reset", "eMMC CMD",
0249                           "SPI NOR MOSI", "SPI NOR MISO", "SPI NOR Clk",
0250                           "", "SPI NOR Chip Select",
0251                           /* Bank CARD */
0252                           "", "", "", "", "", "", "",
0253                           /* Bank GPIODV */
0254                           "", "", "", "", "", "", "", "", "", "", "", "",
0255                           "", "", "", "", "", "", "", "", "", "", "", "",
0256                           "7J1 Header Pin27", "7J1 Header Pin28", "",
0257                           "7J1 Header Pin29",
0258                           "VCCK Regulator", "VDDEE Regulator",
0259                           /* Bank GPIOX */
0260                           "7J1 Header Pin22", "7J1 Header Pin26",
0261                           "7J1 Header Pin36", "7J1 Header Pin38",
0262                           "7J1 Header Pin40", "7J1 Header Pin37",
0263                           "7J1 Header Pin33", "7J1 Header Pin35",
0264                           "7J1 Header Pin19", "7J1 Header Pin21",
0265                           "7J1 Header Pin24", "7J1 Header Pin23",
0266                           "7J1 Header Pin8", "7J1 Header Pin10",
0267                           "", "", "7J1 Header Pin32", "", "",
0268                           /* Bank GPIOCLK */
0269                           "", "";
0270 };
0271 
0272 &saradc {
0273         status = "okay";
0274         vref-supply = <&vddio_boot>;
0275 };
0276 
0277 /* eMMC */
0278 &sd_emmc_c {
0279         status = "okay";
0280         pinctrl-0 = <&emmc_pins>;
0281         pinctrl-1 = <&emmc_clk_gate_pins>;
0282         pinctrl-names = "default", "clk-gate";
0283 
0284         bus-width = <8>;
0285         cap-mmc-highspeed;
0286         mmc-ddr-1_8v;
0287         mmc-hs200-1_8v;
0288         max-frequency = <200000000>;
0289         disable-wp;
0290 
0291         mmc-pwrseq = <&emmc_pwrseq>;
0292         vmmc-supply = <&vcc_3v3>;
0293         vqmmc-supply = <&vddio_boot>;
0294 };
0295 
0296 &spifc {
0297         status = "okay";
0298         pinctrl-0 = <&nor_pins>;
0299         pinctrl-names = "default";
0300 
0301         w25q32: flash@0 {
0302                 #address-cells = <1>;
0303                 #size-cells = <1>;
0304                 compatible = "jedec,spi-nor";
0305                 reg = <0>;
0306                 spi-max-frequency = <3000000>;
0307         };
0308 };
0309 
0310 &uart_AO {
0311         status = "okay";
0312         pinctrl-0 = <&uart_ao_a_pins>;
0313         pinctrl-names = "default";
0314 };
0315 
0316 &usb {
0317         status = "okay";
0318         dr_mode = "host";
0319 };