16be33864SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 26be33864SEmmanuel Vadot/* 36be33864SEmmanuel Vadot * Copyright (c) 2020 BayLibre, SAS. 46be33864SEmmanuel Vadot * Author: Jerome Brunet <jbrunet@baylibre.com> 56be33864SEmmanuel Vadot */ 66be33864SEmmanuel Vadot 76be33864SEmmanuel Vadot/dts-v1/; 86be33864SEmmanuel Vadot 96be33864SEmmanuel Vadot#include <dt-bindings/input/input.h> 106be33864SEmmanuel Vadot#include <dt-bindings/leds/common.h> 116be33864SEmmanuel Vadot#include <dt-bindings/sound/meson-aiu.h> 126be33864SEmmanuel Vadot 136be33864SEmmanuel Vadot#include "meson-gxl-s905x.dtsi" 146be33864SEmmanuel Vadot 156be33864SEmmanuel Vadot/ { 166be33864SEmmanuel Vadot compatible = "libretech,aml-s905x-cc-v2", "amlogic,s905x", 176be33864SEmmanuel Vadot "amlogic,meson-gxl"; 186be33864SEmmanuel Vadot model = "Libre Computer AML-S905X-CC V2"; 196be33864SEmmanuel Vadot 206be33864SEmmanuel Vadot aliases { 216be33864SEmmanuel Vadot serial0 = &uart_AO; 226be33864SEmmanuel Vadot ethernet0 = ðmac; 236be33864SEmmanuel Vadot spi0 = &spifc; 246be33864SEmmanuel Vadot }; 256be33864SEmmanuel Vadot 266be33864SEmmanuel Vadot chosen { 276be33864SEmmanuel Vadot stdout-path = "serial0:115200n8"; 286be33864SEmmanuel Vadot }; 296be33864SEmmanuel Vadot 306be33864SEmmanuel Vadot emmc_pwrseq: emmc-pwrseq { 316be33864SEmmanuel Vadot compatible = "mmc-pwrseq-emmc"; 326be33864SEmmanuel Vadot reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 336be33864SEmmanuel Vadot }; 346be33864SEmmanuel Vadot 356be33864SEmmanuel Vadot hdmi-connector { 366be33864SEmmanuel Vadot compatible = "hdmi-connector"; 376be33864SEmmanuel Vadot type = "a"; 386be33864SEmmanuel Vadot 396be33864SEmmanuel Vadot port { 406be33864SEmmanuel Vadot hdmi_connector_in: endpoint { 416be33864SEmmanuel Vadot remote-endpoint = <&hdmi_tx_tmds_out>; 426be33864SEmmanuel Vadot }; 436be33864SEmmanuel Vadot }; 446be33864SEmmanuel Vadot }; 456be33864SEmmanuel Vadot 466be33864SEmmanuel Vadot leds { 476be33864SEmmanuel Vadot compatible = "gpio-leds"; 486be33864SEmmanuel Vadot 496be33864SEmmanuel Vadot led-blue { 506be33864SEmmanuel Vadot color = <LED_COLOR_ID_BLUE>; 516be33864SEmmanuel Vadot function = LED_FUNCTION_STATUS; 526be33864SEmmanuel Vadot gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; 536be33864SEmmanuel Vadot linux,default-trigger = "heartbeat"; 546be33864SEmmanuel Vadot panic-indicator; 556be33864SEmmanuel Vadot }; 566be33864SEmmanuel Vadot 576be33864SEmmanuel Vadot led-green { 586be33864SEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 596be33864SEmmanuel Vadot function = LED_FUNCTION_DISK_ACTIVITY; 606be33864SEmmanuel Vadot gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; 616be33864SEmmanuel Vadot linux,default-trigger = "disk-activity"; 626be33864SEmmanuel Vadot }; 636be33864SEmmanuel Vadot }; 646be33864SEmmanuel Vadot 656be33864SEmmanuel Vadot memory@0 { 666be33864SEmmanuel Vadot device_type = "memory"; 676be33864SEmmanuel Vadot reg = <0x0 0x0 0x0 0x80000000>; 686be33864SEmmanuel Vadot }; 696be33864SEmmanuel Vadot 706be33864SEmmanuel Vadot ao_5v: regulator-ao_5v { 716be33864SEmmanuel Vadot compatible = "regulator-fixed"; 726be33864SEmmanuel Vadot regulator-name = "AO_5V"; 736be33864SEmmanuel Vadot regulator-min-microvolt = <5000000>; 746be33864SEmmanuel Vadot regulator-max-microvolt = <5000000>; 756be33864SEmmanuel Vadot vin-supply = <&dc_in>; 766be33864SEmmanuel Vadot regulator-always-on; 776be33864SEmmanuel Vadot }; 786be33864SEmmanuel Vadot 796be33864SEmmanuel Vadot dc_in: regulator-dc_in { 806be33864SEmmanuel Vadot compatible = "regulator-fixed"; 816be33864SEmmanuel Vadot regulator-name = "DC_IN"; 826be33864SEmmanuel Vadot regulator-min-microvolt = <5000000>; 836be33864SEmmanuel Vadot regulator-max-microvolt = <5000000>; 846be33864SEmmanuel Vadot regulator-always-on; 856be33864SEmmanuel Vadot }; 866be33864SEmmanuel Vadot 876be33864SEmmanuel Vadot vcck: regulator-vcck { 886be33864SEmmanuel Vadot compatible = "regulator-fixed"; 896be33864SEmmanuel Vadot regulator-name = "VCCK"; 906be33864SEmmanuel Vadot regulator-min-microvolt = <3300000>; 916be33864SEmmanuel Vadot regulator-max-microvolt = <3300000>; 926be33864SEmmanuel Vadot vin-supply = <&ao_5v>; 936be33864SEmmanuel Vadot regulator-always-on; 946be33864SEmmanuel Vadot }; 956be33864SEmmanuel Vadot 966be33864SEmmanuel Vadot vcc_card: regulator-vcc_card { 976be33864SEmmanuel Vadot compatible = "regulator-fixed"; 986be33864SEmmanuel Vadot regulator-name = "VCC_CARD"; 996be33864SEmmanuel Vadot regulator-min-microvolt = <3300000>; 1006be33864SEmmanuel Vadot regulator-max-microvolt = <3300000>; 1016be33864SEmmanuel Vadot vin-supply = <&vddio_ao3v3>; 1026be33864SEmmanuel Vadot 1036be33864SEmmanuel Vadot gpio = <&gpio GPIOCLK_1 GPIO_ACTIVE_HIGH>; 1046be33864SEmmanuel Vadot enable-active-high; 1056be33864SEmmanuel Vadot }; 1066be33864SEmmanuel Vadot 1076be33864SEmmanuel Vadot vcc5v: regulator-vcc5v { 1086be33864SEmmanuel Vadot compatible = "regulator-fixed"; 1096be33864SEmmanuel Vadot regulator-name = "VCC5V"; 1106be33864SEmmanuel Vadot regulator-min-microvolt = <5000000>; 1116be33864SEmmanuel Vadot regulator-max-microvolt = <5000000>; 1126be33864SEmmanuel Vadot vin-supply = <&ao_5v>; 1136be33864SEmmanuel Vadot 1146be33864SEmmanuel Vadot gpio = <&gpio GPIOH_3 GPIO_OPEN_DRAIN>; 1156be33864SEmmanuel Vadot }; 1166be33864SEmmanuel Vadot 1176be33864SEmmanuel Vadot vddio_ao3v3: regulator-vddio_ao3v3 { 1186be33864SEmmanuel Vadot compatible = "regulator-fixed"; 1196be33864SEmmanuel Vadot regulator-name = "VDDIO_AO3V3"; 1206be33864SEmmanuel Vadot regulator-min-microvolt = <3300000>; 1216be33864SEmmanuel Vadot regulator-max-microvolt = <3300000>; 1226be33864SEmmanuel Vadot vin-supply = <&ao_5v>; 1236be33864SEmmanuel Vadot regulator-always-on; 1246be33864SEmmanuel Vadot }; 1256be33864SEmmanuel Vadot 1266be33864SEmmanuel Vadot vddio_card: regulator-vddio-card { 1276be33864SEmmanuel Vadot compatible = "regulator-gpio"; 1286be33864SEmmanuel Vadot regulator-name = "VDDIO_CARD"; 1296be33864SEmmanuel Vadot regulator-min-microvolt = <1800000>; 1306be33864SEmmanuel Vadot regulator-max-microvolt = <3300000>; 1316be33864SEmmanuel Vadot 1326be33864SEmmanuel Vadot gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; 1336be33864SEmmanuel Vadot gpios-states = <0>; 1346be33864SEmmanuel Vadot 1356be33864SEmmanuel Vadot states = <3300000 0>, 1366be33864SEmmanuel Vadot <1800000 1>; 1376be33864SEmmanuel Vadot 1386be33864SEmmanuel Vadot regulator-settling-time-up-us = <200>; 1396be33864SEmmanuel Vadot regulator-settling-time-down-us = <50000>; 1406be33864SEmmanuel Vadot }; 1416be33864SEmmanuel Vadot 1426be33864SEmmanuel Vadot vddio_ao18: regulator-vddio_ao18 { 1436be33864SEmmanuel Vadot compatible = "regulator-fixed"; 1446be33864SEmmanuel Vadot regulator-name = "VDDIO_AO18"; 1456be33864SEmmanuel Vadot regulator-min-microvolt = <1800000>; 1466be33864SEmmanuel Vadot regulator-max-microvolt = <1800000>; 1476be33864SEmmanuel Vadot vin-supply = <&vddio_ao3v3>; 1486be33864SEmmanuel Vadot regulator-always-on; 1496be33864SEmmanuel Vadot }; 1506be33864SEmmanuel Vadot 1516be33864SEmmanuel Vadot vcc_1v8: regulator-vcc_1v8 { 1526be33864SEmmanuel Vadot compatible = "regulator-fixed"; 1536be33864SEmmanuel Vadot regulator-name = "VCC 1V8"; 1546be33864SEmmanuel Vadot regulator-min-microvolt = <1800000>; 1556be33864SEmmanuel Vadot regulator-max-microvolt = <1800000>; 1566be33864SEmmanuel Vadot vin-supply = <&vddio_ao3v3>; 1576be33864SEmmanuel Vadot regulator-always-on; 1586be33864SEmmanuel Vadot }; 1596be33864SEmmanuel Vadot 1606be33864SEmmanuel Vadot sound { 1616be33864SEmmanuel Vadot compatible = "amlogic,gx-sound-card"; 1625def4c47SEmmanuel Vadot model = "LIBRETECH-CC-V2"; 1636be33864SEmmanuel Vadot assigned-clocks = <&clkc CLKID_MPLL0>, 1646be33864SEmmanuel Vadot <&clkc CLKID_MPLL1>, 1656be33864SEmmanuel Vadot <&clkc CLKID_MPLL2>; 1666be33864SEmmanuel Vadot assigned-clock-parents = <0>, <0>, <0>; 1676be33864SEmmanuel Vadot assigned-clock-rates = <294912000>, 1686be33864SEmmanuel Vadot <270950400>, 1696be33864SEmmanuel Vadot <393216000>; 1706be33864SEmmanuel Vadot status = "okay"; 1716be33864SEmmanuel Vadot 1726be33864SEmmanuel Vadot dai-link-0 { 1736be33864SEmmanuel Vadot sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; 1746be33864SEmmanuel Vadot }; 1756be33864SEmmanuel Vadot 1766be33864SEmmanuel Vadot dai-link-1 { 1776be33864SEmmanuel Vadot sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; 1786be33864SEmmanuel Vadot dai-format = "i2s"; 1796be33864SEmmanuel Vadot mclk-fs = <256>; 1806be33864SEmmanuel Vadot 1816be33864SEmmanuel Vadot codec-0 { 1826be33864SEmmanuel Vadot sound-dai = <&aiu AIU_HDMI CTRL_I2S>; 1836be33864SEmmanuel Vadot }; 1846be33864SEmmanuel Vadot }; 1856be33864SEmmanuel Vadot 1866be33864SEmmanuel Vadot dai-link-2 { 1876be33864SEmmanuel Vadot sound-dai = <&aiu AIU_HDMI CTRL_OUT>; 1886be33864SEmmanuel Vadot 1896be33864SEmmanuel Vadot codec-0 { 1906be33864SEmmanuel Vadot sound-dai = <&hdmi_tx>; 1916be33864SEmmanuel Vadot }; 1926be33864SEmmanuel Vadot }; 1936be33864SEmmanuel Vadot }; 1946be33864SEmmanuel Vadot}; 1956be33864SEmmanuel Vadot 1966be33864SEmmanuel Vadot&aiu { 1976be33864SEmmanuel Vadot status = "okay"; 1986be33864SEmmanuel Vadot}; 1996be33864SEmmanuel Vadot 2006be33864SEmmanuel Vadot&cec_AO { 2016be33864SEmmanuel Vadot status = "okay"; 2026be33864SEmmanuel Vadot pinctrl-0 = <&ao_cec_pins>; 2036be33864SEmmanuel Vadot pinctrl-names = "default"; 2046be33864SEmmanuel Vadot hdmi-phandle = <&hdmi_tx>; 2056be33864SEmmanuel Vadot}; 2066be33864SEmmanuel Vadot 2076be33864SEmmanuel Vadotðmac { 2086be33864SEmmanuel Vadot status = "okay"; 2096be33864SEmmanuel Vadot}; 2106be33864SEmmanuel Vadot 2116be33864SEmmanuel Vadot&internal_phy { 2126be33864SEmmanuel Vadot pinctrl-0 = <ð_link_led_pins>, <ð_act_led_pins>; 2136be33864SEmmanuel Vadot pinctrl-names = "default"; 2146be33864SEmmanuel Vadot}; 2156be33864SEmmanuel Vadot 2166be33864SEmmanuel Vadot&ir { 2176be33864SEmmanuel Vadot status = "okay"; 2186be33864SEmmanuel Vadot pinctrl-0 = <&remote_input_ao_pins>; 2196be33864SEmmanuel Vadot pinctrl-names = "default"; 2206be33864SEmmanuel Vadot}; 2216be33864SEmmanuel Vadot 2226be33864SEmmanuel Vadot&hdmi_tx { 2236be33864SEmmanuel Vadot status = "okay"; 2246be33864SEmmanuel Vadot pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; 2256be33864SEmmanuel Vadot hdmi-supply = <&vcc5v>; 2266be33864SEmmanuel Vadot pinctrl-names = "default"; 2276be33864SEmmanuel Vadot}; 2286be33864SEmmanuel Vadot 2296be33864SEmmanuel Vadot&hdmi_tx_tmds_port { 2306be33864SEmmanuel Vadot hdmi_tx_tmds_out: endpoint { 2316be33864SEmmanuel Vadot remote-endpoint = <&hdmi_connector_in>; 2326be33864SEmmanuel Vadot }; 2336be33864SEmmanuel Vadot}; 2346be33864SEmmanuel Vadot 2356be33864SEmmanuel Vadot&saradc { 2366be33864SEmmanuel Vadot status = "okay"; 2376be33864SEmmanuel Vadot vref-supply = <&vddio_ao18>; 2386be33864SEmmanuel Vadot}; 2396be33864SEmmanuel Vadot 2406be33864SEmmanuel Vadot/* SD card */ 2416be33864SEmmanuel Vadot&sd_emmc_b { 2426be33864SEmmanuel Vadot pinctrl-0 = <&sdcard_pins>; 2436be33864SEmmanuel Vadot pinctrl-1 = <&sdcard_clk_gate_pins>; 2446be33864SEmmanuel Vadot pinctrl-names = "default", "clk-gate"; 2456be33864SEmmanuel Vadot 2466be33864SEmmanuel Vadot bus-width = <4>; 2476be33864SEmmanuel Vadot cap-sd-highspeed; 2486be33864SEmmanuel Vadot sd-uhs-sdr12; 2496be33864SEmmanuel Vadot sd-uhs-sdr25; 2506be33864SEmmanuel Vadot sd-uhs-sdr50; 2516be33864SEmmanuel Vadot sd-uhs-ddr50; 2526be33864SEmmanuel Vadot max-frequency = <100000000>; 2536be33864SEmmanuel Vadot disable-wp; 2546be33864SEmmanuel Vadot 2556be33864SEmmanuel Vadot cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; 2566be33864SEmmanuel Vadot 2576be33864SEmmanuel Vadot vmmc-supply = <&vcc_card>; 2586be33864SEmmanuel Vadot vqmmc-supply = <&vddio_card>; 2596be33864SEmmanuel Vadot 2606be33864SEmmanuel Vadot status = "okay"; 2616be33864SEmmanuel Vadot}; 2626be33864SEmmanuel Vadot 2636be33864SEmmanuel Vadot/* eMMC */ 2646be33864SEmmanuel Vadot&sd_emmc_c { 2656be33864SEmmanuel Vadot pinctrl-0 = <&emmc_pins>; 2666be33864SEmmanuel Vadot pinctrl-1 = <&emmc_clk_gate_pins>; 2676be33864SEmmanuel Vadot pinctrl-names = "default", "clk-gate"; 2686be33864SEmmanuel Vadot 2696be33864SEmmanuel Vadot bus-width = <8>; 2706be33864SEmmanuel Vadot cap-mmc-highspeed; 2716be33864SEmmanuel Vadot mmc-hs200-1_8v; 2726be33864SEmmanuel Vadot max-frequency = <200000000>; 2736be33864SEmmanuel Vadot disable-wp; 2746be33864SEmmanuel Vadot 2756be33864SEmmanuel Vadot mmc-pwrseq = <&emmc_pwrseq>; 2766be33864SEmmanuel Vadot vmmc-supply = <&vddio_ao3v3>; 2776be33864SEmmanuel Vadot vqmmc-supply = <&vcc_1v8>; 2786be33864SEmmanuel Vadot 2796be33864SEmmanuel Vadot status = "okay"; 2806be33864SEmmanuel Vadot}; 2816be33864SEmmanuel Vadot 2826be33864SEmmanuel Vadot&spifc { 2836be33864SEmmanuel Vadot status = "okay"; 2846be33864SEmmanuel Vadot pinctrl-0 = <&nor_pins>; 2856be33864SEmmanuel Vadot pinctrl-names = "default"; 2866be33864SEmmanuel Vadot 287*d5b0e70fSEmmanuel Vadot nor_4u1: flash@0 { 2886be33864SEmmanuel Vadot #address-cells = <1>; 2896be33864SEmmanuel Vadot #size-cells = <1>; 2906be33864SEmmanuel Vadot compatible = "jedec,spi-nor"; 2916be33864SEmmanuel Vadot reg = <0>; 2926be33864SEmmanuel Vadot spi-max-frequency = <3000000>; 2936be33864SEmmanuel Vadot }; 2946be33864SEmmanuel Vadot}; 2956be33864SEmmanuel Vadot 2966be33864SEmmanuel Vadot&uart_AO { 2976be33864SEmmanuel Vadot status = "okay"; 2986be33864SEmmanuel Vadot pinctrl-0 = <&uart_ao_a_pins>; 2996be33864SEmmanuel Vadot pinctrl-names = "default"; 3006be33864SEmmanuel Vadot}; 3016be33864SEmmanuel Vadot 3026be33864SEmmanuel Vadot&usb { 3036be33864SEmmanuel Vadot status = "okay"; 3046be33864SEmmanuel Vadot dr_mode = "host"; 3056be33864SEmmanuel Vadot}; 3066be33864SEmmanuel Vadot 3076be33864SEmmanuel Vadot&usb2_phy0 { 3086be33864SEmmanuel Vadot pinctrl-names = "default"; 3096be33864SEmmanuel Vadot phy-supply = <&vcc5v>; 3106be33864SEmmanuel Vadot}; 3116be33864SEmmanuel Vadot 3126be33864SEmmanuel Vadot&usb2_phy1 { 3136be33864SEmmanuel Vadot phy-supply = <&vcc5v>; 3146be33864SEmmanuel Vadot}; 315