1114abfe1SNeil Armstrong// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2bb51b535SNeil Armstrong/* 3bb51b535SNeil Armstrong * Copyright (c) 2016 Endless Computers, Inc. 4bb51b535SNeil Armstrong * Author: Carlo Caione <carlo@endlessm.com> 5bb51b535SNeil Armstrong */ 6bb51b535SNeil Armstrong 7bb51b535SNeil Armstrong/* Common DTSI for same Amlogic Q200/Q201 and P230/P231 boards using either 8bb51b535SNeil Armstrong * the pin-compatible S912 (GXM) or S905D (GXL) SoCs. 9bb51b535SNeil Armstrong */ 10bb51b535SNeil Armstrong 11bb51b535SNeil Armstrong/ { 12bb51b535SNeil Armstrong aliases { 13bb51b535SNeil Armstrong serial0 = &uart_AO; 14059a58fcSJorge Ramirez-Ortiz ethernet0 = ðmac; 15bb51b535SNeil Armstrong }; 16bb51b535SNeil Armstrong 17bb51b535SNeil Armstrong chosen { 18bb51b535SNeil Armstrong stdout-path = "serial0:115200n8"; 19bb51b535SNeil Armstrong }; 20bb51b535SNeil Armstrong 21bb51b535SNeil Armstrong memory@0 { 22bb51b535SNeil Armstrong device_type = "memory"; 23bb51b535SNeil Armstrong reg = <0x0 0x0 0x0 0x80000000>; 24bb51b535SNeil Armstrong }; 25bb51b535SNeil Armstrong 26b409f625SNeil Armstrong hdmi_5v: regulator-hdmi-5v { 27b409f625SNeil Armstrong compatible = "regulator-fixed"; 28b409f625SNeil Armstrong 29b409f625SNeil Armstrong regulator-name = "HDMI_5V"; 30b409f625SNeil Armstrong regulator-min-microvolt = <5000000>; 31b409f625SNeil Armstrong regulator-max-microvolt = <5000000>; 32b409f625SNeil Armstrong 33b409f625SNeil Armstrong gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>; 34b409f625SNeil Armstrong enable-active-high; 35b409f625SNeil Armstrong regulator-always-on; 36b409f625SNeil Armstrong }; 37b409f625SNeil Armstrong 3841ed2e0dSMartin Blumenstingl vddio_ao18: regulator-vddio_ao18 { 3941ed2e0dSMartin Blumenstingl compatible = "regulator-fixed"; 4041ed2e0dSMartin Blumenstingl regulator-name = "VDDIO_AO18"; 4141ed2e0dSMartin Blumenstingl regulator-min-microvolt = <1800000>; 4241ed2e0dSMartin Blumenstingl regulator-max-microvolt = <1800000>; 4341ed2e0dSMartin Blumenstingl }; 4441ed2e0dSMartin Blumenstingl 45bb51b535SNeil Armstrong vddio_boot: regulator-vddio_boot { 46bb51b535SNeil Armstrong compatible = "regulator-fixed"; 47bb51b535SNeil Armstrong regulator-name = "VDDIO_BOOT"; 48bb51b535SNeil Armstrong regulator-min-microvolt = <1800000>; 49bb51b535SNeil Armstrong regulator-max-microvolt = <1800000>; 50bb51b535SNeil Armstrong }; 51bb51b535SNeil Armstrong 52bb51b535SNeil Armstrong vddao_3v3: regulator-vddao_3v3 { 53bb51b535SNeil Armstrong compatible = "regulator-fixed"; 54bb51b535SNeil Armstrong regulator-name = "VDDAO_3V3"; 55bb51b535SNeil Armstrong regulator-min-microvolt = <3300000>; 56bb51b535SNeil Armstrong regulator-max-microvolt = <3300000>; 57bb51b535SNeil Armstrong }; 58bb51b535SNeil Armstrong 59bb51b535SNeil Armstrong vcc_3v3: regulator-vcc_3v3 { 60bb51b535SNeil Armstrong compatible = "regulator-fixed"; 61bb51b535SNeil Armstrong regulator-name = "VCC_3V3"; 62bb51b535SNeil Armstrong regulator-min-microvolt = <3300000>; 63bb51b535SNeil Armstrong regulator-max-microvolt = <3300000>; 64bb51b535SNeil Armstrong }; 65bb51b535SNeil Armstrong 66bb51b535SNeil Armstrong emmc_pwrseq: emmc-pwrseq { 67bb51b535SNeil Armstrong compatible = "mmc-pwrseq-emmc"; 68bb51b535SNeil Armstrong reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 69bb51b535SNeil Armstrong }; 70bb51b535SNeil Armstrong 71bb51b535SNeil Armstrong wifi32k: wifi32k { 72bb51b535SNeil Armstrong compatible = "pwm-clock"; 73bb51b535SNeil Armstrong #clock-cells = <0>; 74bb51b535SNeil Armstrong clock-frequency = <32768>; 75bb51b535SNeil Armstrong pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ 76bb51b535SNeil Armstrong }; 77bb51b535SNeil Armstrong 78bb51b535SNeil Armstrong sdio_pwrseq: sdio-pwrseq { 79bb51b535SNeil Armstrong compatible = "mmc-pwrseq-simple"; 80bb51b535SNeil Armstrong reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; 81bb51b535SNeil Armstrong clocks = <&wifi32k>; 82bb51b535SNeil Armstrong clock-names = "ext_clock"; 83bb51b535SNeil Armstrong }; 846939db7eSNeil Armstrong 856939db7eSNeil Armstrong cvbs-connector { 866939db7eSNeil Armstrong compatible = "composite-video-connector"; 876939db7eSNeil Armstrong 886939db7eSNeil Armstrong port { 896939db7eSNeil Armstrong cvbs_connector_in: endpoint { 906939db7eSNeil Armstrong remote-endpoint = <&cvbs_vdac_out>; 916939db7eSNeil Armstrong }; 926939db7eSNeil Armstrong }; 936939db7eSNeil Armstrong }; 946939db7eSNeil Armstrong 956939db7eSNeil Armstrong hdmi-connector { 966939db7eSNeil Armstrong compatible = "hdmi-connector"; 976939db7eSNeil Armstrong type = "a"; 986939db7eSNeil Armstrong 996939db7eSNeil Armstrong port { 1006939db7eSNeil Armstrong hdmi_connector_in: endpoint { 1016939db7eSNeil Armstrong remote-endpoint = <&hdmi_tx_tmds_out>; 1026939db7eSNeil Armstrong }; 1036939db7eSNeil Armstrong }; 1046939db7eSNeil Armstrong }; 105bb51b535SNeil Armstrong}; 106bb51b535SNeil Armstrong 107b16c71c9SNeil Armstrong&cec_AO { 108b16c71c9SNeil Armstrong status = "okay"; 109b16c71c9SNeil Armstrong pinctrl-0 = <&ao_cec_pins>; 110b16c71c9SNeil Armstrong pinctrl-names = "default"; 111b16c71c9SNeil Armstrong hdmi-phandle = <&hdmi_tx>; 112b16c71c9SNeil Armstrong}; 113b16c71c9SNeil Armstrong 114d5463d25SAndreas Färber&cvbs_vdac_port { 115d5463d25SAndreas Färber cvbs_vdac_out: endpoint { 116d5463d25SAndreas Färber remote-endpoint = <&cvbs_connector_in>; 117d5463d25SAndreas Färber }; 118d5463d25SAndreas Färber}; 119d5463d25SAndreas Färber 120d5463d25SAndreas Färberðmac { 121bb51b535SNeil Armstrong status = "okay"; 122d5463d25SAndreas Färber}; 123d5463d25SAndreas Färber 124d5463d25SAndreas Färber&hdmi_tx { 125d5463d25SAndreas Färber status = "okay"; 126d5463d25SAndreas Färber pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; 127bb51b535SNeil Armstrong pinctrl-names = "default"; 128e1f2163dSNeil Armstrong hdmi-supply = <&hdmi_5v>; 129bb51b535SNeil Armstrong}; 130bb51b535SNeil Armstrong 131d5463d25SAndreas Färber&hdmi_tx_tmds_port { 132d5463d25SAndreas Färber hdmi_tx_tmds_out: endpoint { 133d5463d25SAndreas Färber remote-endpoint = <&hdmi_connector_in>; 134d5463d25SAndreas Färber }; 135d5463d25SAndreas Färber}; 136d5463d25SAndreas Färber 137bb51b535SNeil Armstrong&ir { 138bb51b535SNeil Armstrong status = "okay"; 139bb51b535SNeil Armstrong pinctrl-0 = <&remote_input_ao_pins>; 140bb51b535SNeil Armstrong pinctrl-names = "default"; 141bb51b535SNeil Armstrong}; 142bb51b535SNeil Armstrong 143d5463d25SAndreas Färber&pwm_ef { 144d5463d25SAndreas Färber status = "okay"; 145d5463d25SAndreas Färber pinctrl-0 = <&pwm_e_pins>; 146d5463d25SAndreas Färber pinctrl-names = "default"; 147d5463d25SAndreas Färber clocks = <&clkc CLKID_FCLK_DIV4>; 148d5463d25SAndreas Färber clock-names = "clkin0"; 149d5463d25SAndreas Färber}; 150d5463d25SAndreas Färber 15141ed2e0dSMartin Blumenstingl&saradc { 15241ed2e0dSMartin Blumenstingl status = "okay"; 15341ed2e0dSMartin Blumenstingl vref-supply = <&vddio_ao18>; 15441ed2e0dSMartin Blumenstingl}; 15541ed2e0dSMartin Blumenstingl 156bb51b535SNeil Armstrong/* Wireless SDIO Module */ 157bb51b535SNeil Armstrong&sd_emmc_a { 158bb51b535SNeil Armstrong status = "okay"; 159bb51b535SNeil Armstrong pinctrl-0 = <&sdio_pins>; 16067e7607fSJerome Brunet pinctrl-1 = <&sdio_clk_gate_pins>; 16167e7607fSJerome Brunet pinctrl-names = "default", "clk-gate"; 162bb51b535SNeil Armstrong #address-cells = <1>; 163bb51b535SNeil Armstrong #size-cells = <0>; 164bb51b535SNeil Armstrong 165bb51b535SNeil Armstrong bus-width = <4>; 166bb51b535SNeil Armstrong cap-sd-highspeed; 167adc52bf7SJerome Brunet max-frequency = <50000000>; 168bb51b535SNeil Armstrong 169bb51b535SNeil Armstrong non-removable; 170bb51b535SNeil Armstrong disable-wp; 171bb51b535SNeil Armstrong 172*86b8eaa2SNeil Armstrong /* WiFi firmware requires power to be kept while in suspend */ 173*86b8eaa2SNeil Armstrong keep-power-in-suspend; 174*86b8eaa2SNeil Armstrong 175bb51b535SNeil Armstrong mmc-pwrseq = <&sdio_pwrseq>; 176bb51b535SNeil Armstrong 177bb51b535SNeil Armstrong vmmc-supply = <&vddao_3v3>; 178bb51b535SNeil Armstrong vqmmc-supply = <&vddio_boot>; 179bb51b535SNeil Armstrong}; 180bb51b535SNeil Armstrong 181bb51b535SNeil Armstrong/* SD card */ 182bb51b535SNeil Armstrong&sd_emmc_b { 183bb51b535SNeil Armstrong status = "okay"; 184bb51b535SNeil Armstrong pinctrl-0 = <&sdcard_pins>; 18567e7607fSJerome Brunet pinctrl-1 = <&sdcard_clk_gate_pins>; 18667e7607fSJerome Brunet pinctrl-names = "default", "clk-gate"; 187bb51b535SNeil Armstrong 188bb51b535SNeil Armstrong bus-width = <4>; 189bb51b535SNeil Armstrong cap-sd-highspeed; 190adc52bf7SJerome Brunet max-frequency = <50000000>; 191bb51b535SNeil Armstrong disable-wp; 192bb51b535SNeil Armstrong 193f29200c8SLoys Ollivier cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; 194bb51b535SNeil Armstrong 195bb51b535SNeil Armstrong vmmc-supply = <&vddao_3v3>; 196bb51b535SNeil Armstrong vqmmc-supply = <&vddio_boot>; 197bb51b535SNeil Armstrong}; 198bb51b535SNeil Armstrong 199bb51b535SNeil Armstrong/* eMMC */ 200bb51b535SNeil Armstrong&sd_emmc_c { 201bb51b535SNeil Armstrong status = "okay"; 202ab36be66SNeil Armstrong pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 20367e7607fSJerome Brunet pinctrl-1 = <&emmc_clk_gate_pins>; 20467e7607fSJerome Brunet pinctrl-names = "default", "clk-gate"; 205bb51b535SNeil Armstrong 206bb51b535SNeil Armstrong bus-width = <8>; 207bb51b535SNeil Armstrong cap-mmc-highspeed; 208bb51b535SNeil Armstrong max-frequency = <200000000>; 209bb51b535SNeil Armstrong non-removable; 210bb51b535SNeil Armstrong disable-wp; 211bb51b535SNeil Armstrong mmc-ddr-1_8v; 212bb51b535SNeil Armstrong mmc-hs200-1_8v; 213bb51b535SNeil Armstrong 214bb51b535SNeil Armstrong mmc-pwrseq = <&emmc_pwrseq>; 215bb51b535SNeil Armstrong vmmc-supply = <&vcc_3v3>; 216bb51b535SNeil Armstrong vqmmc-supply = <&vddio_boot>; 217bb51b535SNeil Armstrong}; 218bb51b535SNeil Armstrong 219d5463d25SAndreas Färber/* This UART is brought out to the DB9 connector */ 220d5463d25SAndreas Färber&uart_AO { 221bb51b535SNeil Armstrong status = "okay"; 222d5463d25SAndreas Färber pinctrl-0 = <&uart_ao_a_pins>; 223bb51b535SNeil Armstrong pinctrl-names = "default"; 2246939db7eSNeil Armstrong}; 225972cd12aSMartin Blumenstingl 226972cd12aSMartin Blumenstingl&usb0 { 227972cd12aSMartin Blumenstingl status = "okay"; 228972cd12aSMartin Blumenstingl}; 229