1114abfe1SNeil Armstrong// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2c246e9d6SNeil Armstrong/* 3c246e9d6SNeil Armstrong * Copyright (c) 2016 Andreas Färber 4c246e9d6SNeil Armstrong * Copyright (c) 2016 BayLibre, Inc. 5c246e9d6SNeil Armstrong * Author: Neil Armstrong <narmstrong@kernel.org> 6c246e9d6SNeil Armstrong */ 7c246e9d6SNeil Armstrong 8c246e9d6SNeil Armstrong/dts-v1/; 9c246e9d6SNeil Armstrong 10c246e9d6SNeil Armstrong#include "meson-gxbb.dtsi" 11c246e9d6SNeil Armstrong#include <dt-bindings/gpio/gpio.h> 12c246e9d6SNeil Armstrong#include <dt-bindings/input/input.h> 13ec78dc89SChristian Hewitt#include <dt-bindings/sound/meson-aiu.h> 14c246e9d6SNeil Armstrong 15c246e9d6SNeil Armstrong/ { 16c246e9d6SNeil Armstrong compatible = "nexbox,a95x", "amlogic,meson-gxbb"; 17c246e9d6SNeil Armstrong model = "NEXBOX A95X"; 18c246e9d6SNeil Armstrong 19c246e9d6SNeil Armstrong aliases { 20c246e9d6SNeil Armstrong serial0 = &uart_AO; 21059a58fcSJorge Ramirez-Ortiz ethernet0 = ðmac; 22c246e9d6SNeil Armstrong }; 23c246e9d6SNeil Armstrong 24c246e9d6SNeil Armstrong chosen { 25c246e9d6SNeil Armstrong stdout-path = "serial0:115200n8"; 26c246e9d6SNeil Armstrong }; 27c246e9d6SNeil Armstrong 28c246e9d6SNeil Armstrong memory@0 { 29c246e9d6SNeil Armstrong device_type = "memory"; 30c246e9d6SNeil Armstrong reg = <0x0 0x0 0x0 0x40000000>; 31c246e9d6SNeil Armstrong }; 32c246e9d6SNeil Armstrong 33c246e9d6SNeil Armstrong leds { 34c246e9d6SNeil Armstrong compatible = "gpio-leds"; 3508dc0e5dSNeil Armstrong led-blue { 36c246e9d6SNeil Armstrong label = "a95x:system-status"; 37c246e9d6SNeil Armstrong gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>; 38c246e9d6SNeil Armstrong linux,default-trigger = "heartbeat"; 39c246e9d6SNeil Armstrong default-state = "off"; 40c246e9d6SNeil Armstrong }; 41c246e9d6SNeil Armstrong }; 42c246e9d6SNeil Armstrong 43c246e9d6SNeil Armstrong gpio-keys-polled { 44c246e9d6SNeil Armstrong compatible = "gpio-keys-polled"; 45c246e9d6SNeil Armstrong poll-interval = <100>; 46c246e9d6SNeil Armstrong 47*4956be99SKrzysztof Kozlowski button { 48c246e9d6SNeil Armstrong label = "reset"; 49c246e9d6SNeil Armstrong linux,code = <KEY_RESTART>; 50c246e9d6SNeil Armstrong gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>; 51c246e9d6SNeil Armstrong }; 52c246e9d6SNeil Armstrong }; 53a776e045SNeil Armstrong 54e2f4d749SPeter Korsgaard usb_pwr: regulator-usb-pwrs { 55e2f4d749SPeter Korsgaard compatible = "regulator-fixed"; 56e2f4d749SPeter Korsgaard 57e2f4d749SPeter Korsgaard regulator-name = "USB_PWR"; 58e2f4d749SPeter Korsgaard 59e2f4d749SPeter Korsgaard regulator-min-microvolt = <5000000>; 60e2f4d749SPeter Korsgaard regulator-max-microvolt = <5000000>; 61e2f4d749SPeter Korsgaard 62e2f4d749SPeter Korsgaard gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; 63e2f4d749SPeter Korsgaard enable-active-high; 64e2f4d749SPeter Korsgaard }; 65e2f4d749SPeter Korsgaard 66a776e045SNeil Armstrong vddio_card: gpio-regulator { 67a776e045SNeil Armstrong compatible = "regulator-gpio"; 68a776e045SNeil Armstrong 69a776e045SNeil Armstrong regulator-name = "VDDIO_CARD"; 70a776e045SNeil Armstrong regulator-min-microvolt = <1800000>; 71a776e045SNeil Armstrong regulator-max-microvolt = <3300000>; 72a776e045SNeil Armstrong 73a776e045SNeil Armstrong gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; 74a776e045SNeil Armstrong gpios-states = <1>; 75a776e045SNeil Armstrong 76a776e045SNeil Armstrong /* Based on P200 schematics, signal CARD_1.8V/3.3V_CTR */ 77f9717178SNeil Armstrong states = <1800000 0>, 78f9717178SNeil Armstrong <3300000 1>; 79a776e045SNeil Armstrong }; 80a776e045SNeil Armstrong 81a776e045SNeil Armstrong vddio_boot: regulator-vddio_boot { 82a776e045SNeil Armstrong compatible = "regulator-fixed"; 83a776e045SNeil Armstrong regulator-name = "VDDIO_BOOT"; 84a776e045SNeil Armstrong regulator-min-microvolt = <1800000>; 85a776e045SNeil Armstrong regulator-max-microvolt = <1800000>; 86a776e045SNeil Armstrong }; 87a776e045SNeil Armstrong 88a776e045SNeil Armstrong vddao_3v3: regulator-vddao_3v3 { 89a776e045SNeil Armstrong compatible = "regulator-fixed"; 90a776e045SNeil Armstrong regulator-name = "VDDAO_3V3"; 91a776e045SNeil Armstrong regulator-min-microvolt = <3300000>; 92a776e045SNeil Armstrong regulator-max-microvolt = <3300000>; 93a776e045SNeil Armstrong }; 94a776e045SNeil Armstrong 95a776e045SNeil Armstrong vcc_3v3: regulator-vcc_3v3 { 96a776e045SNeil Armstrong compatible = "regulator-fixed"; 97a776e045SNeil Armstrong regulator-name = "VCC_3V3"; 98a776e045SNeil Armstrong regulator-min-microvolt = <3300000>; 99a776e045SNeil Armstrong regulator-max-microvolt = <3300000>; 100a776e045SNeil Armstrong }; 101a776e045SNeil Armstrong 102a776e045SNeil Armstrong emmc_pwrseq: emmc-pwrseq { 103a776e045SNeil Armstrong compatible = "mmc-pwrseq-emmc"; 104a776e045SNeil Armstrong reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 105a776e045SNeil Armstrong }; 106a776e045SNeil Armstrong 107a776e045SNeil Armstrong wifi32k: wifi32k { 108a776e045SNeil Armstrong compatible = "pwm-clock"; 109a776e045SNeil Armstrong #clock-cells = <0>; 110a776e045SNeil Armstrong clock-frequency = <32768>; 111a776e045SNeil Armstrong pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ 112a776e045SNeil Armstrong }; 113a776e045SNeil Armstrong 114a776e045SNeil Armstrong sdio_pwrseq: sdio-pwrseq { 115a776e045SNeil Armstrong compatible = "mmc-pwrseq-simple"; 116a776e045SNeil Armstrong reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; 117a776e045SNeil Armstrong clocks = <&wifi32k>; 118a776e045SNeil Armstrong clock-names = "ext_clock"; 119a776e045SNeil Armstrong }; 120fafdbdf7SNeil Armstrong 121fafdbdf7SNeil Armstrong cvbs-connector { 122fafdbdf7SNeil Armstrong compatible = "composite-video-connector"; 123fafdbdf7SNeil Armstrong 124fafdbdf7SNeil Armstrong port { 125fafdbdf7SNeil Armstrong cvbs_connector_in: endpoint { 126fafdbdf7SNeil Armstrong remote-endpoint = <&cvbs_vdac_out>; 127fafdbdf7SNeil Armstrong }; 128fafdbdf7SNeil Armstrong }; 129fafdbdf7SNeil Armstrong }; 1306939db7eSNeil Armstrong 1316939db7eSNeil Armstrong hdmi-connector { 1326939db7eSNeil Armstrong compatible = "hdmi-connector"; 1336939db7eSNeil Armstrong type = "a"; 1346939db7eSNeil Armstrong 1356939db7eSNeil Armstrong port { 1366939db7eSNeil Armstrong hdmi_connector_in: endpoint { 1376939db7eSNeil Armstrong remote-endpoint = <&hdmi_tx_tmds_out>; 1386939db7eSNeil Armstrong }; 1396939db7eSNeil Armstrong }; 1406939db7eSNeil Armstrong }; 141ec78dc89SChristian Hewitt 142ec78dc89SChristian Hewitt sound { 143ec78dc89SChristian Hewitt compatible = "amlogic,gx-sound-card"; 144933b80edSChristian Hewitt model = "NEXBOX-A95X"; 145ec78dc89SChristian Hewitt assigned-clocks = <&clkc CLKID_MPLL0>, 146ec78dc89SChristian Hewitt <&clkc CLKID_MPLL1>, 147ec78dc89SChristian Hewitt <&clkc CLKID_MPLL2>; 148ec78dc89SChristian Hewitt assigned-clock-parents = <0>, <0>, <0>; 149ec78dc89SChristian Hewitt assigned-clock-rates = <294912000>, 150ec78dc89SChristian Hewitt <270950400>, 151ec78dc89SChristian Hewitt <393216000>; 152ec78dc89SChristian Hewitt 153ec78dc89SChristian Hewitt dai-link-0 { 154ec78dc89SChristian Hewitt sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; 155ec78dc89SChristian Hewitt }; 156ec78dc89SChristian Hewitt 157ec78dc89SChristian Hewitt dai-link-1 { 158ec78dc89SChristian Hewitt sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; 159ec78dc89SChristian Hewitt dai-format = "i2s"; 160ec78dc89SChristian Hewitt mclk-fs = <256>; 161ec78dc89SChristian Hewitt 162ec78dc89SChristian Hewitt codec-0 { 163ec78dc89SChristian Hewitt sound-dai = <&aiu AIU_HDMI CTRL_I2S>; 164ec78dc89SChristian Hewitt }; 165ec78dc89SChristian Hewitt }; 166ec78dc89SChristian Hewitt 167ec78dc89SChristian Hewitt dai-link-2 { 168ec78dc89SChristian Hewitt sound-dai = <&aiu AIU_HDMI CTRL_OUT>; 169ec78dc89SChristian Hewitt 170ec78dc89SChristian Hewitt codec-0 { 171ec78dc89SChristian Hewitt sound-dai = <&hdmi_tx>; 172ec78dc89SChristian Hewitt }; 173ec78dc89SChristian Hewitt }; 174ec78dc89SChristian Hewitt }; 175ec78dc89SChristian Hewitt}; 176ec78dc89SChristian Hewitt 177ec78dc89SChristian Hewitt&aiu { 178ec78dc89SChristian Hewitt status = "okay"; 179c246e9d6SNeil Armstrong}; 180c246e9d6SNeil Armstrong 18182f11345SAndreas Färber&cvbs_vdac_port { 18282f11345SAndreas Färber cvbs_vdac_out: endpoint { 18382f11345SAndreas Färber remote-endpoint = <&cvbs_connector_in>; 18482f11345SAndreas Färber }; 185c246e9d6SNeil Armstrong}; 186c246e9d6SNeil Armstrong 187b16c71c9SNeil Armstrong&cec_AO { 188b16c71c9SNeil Armstrong status = "okay"; 189b16c71c9SNeil Armstrong pinctrl-0 = <&ao_cec_pins>; 190b16c71c9SNeil Armstrong pinctrl-names = "default"; 191b16c71c9SNeil Armstrong hdmi-phandle = <&hdmi_tx>; 192b16c71c9SNeil Armstrong}; 193b16c71c9SNeil Armstrong 194c246e9d6SNeil Armstrongðmac { 195c246e9d6SNeil Armstrong status = "okay"; 1963be2d9cfSNeil Armstrong pinctrl-0 = <ð_rmii_pins>; 197c246e9d6SNeil Armstrong pinctrl-names = "default"; 19867d49f30SMartin Blumenstingl 19967d49f30SMartin Blumenstingl phy-handle = <ð_phy0>; 2003be2d9cfSNeil Armstrong phy-mode = "rmii"; 20167d49f30SMartin Blumenstingl 20267d49f30SMartin Blumenstingl mdio { 20367d49f30SMartin Blumenstingl compatible = "snps,dwmac-mdio"; 20467d49f30SMartin Blumenstingl #address-cells = <1>; 20567d49f30SMartin Blumenstingl #size-cells = <0>; 20667d49f30SMartin Blumenstingl 20767d49f30SMartin Blumenstingl eth_phy0: ethernet-phy@0 { 20867d49f30SMartin Blumenstingl /* IC Plus IP101GR (0x02430c54) */ 20967d49f30SMartin Blumenstingl reg = <0>; 210f29cabf2SMartin Blumenstingl 211f29cabf2SMartin Blumenstingl reset-assert-us = <10000>; 212f29cabf2SMartin Blumenstingl reset-deassert-us = <10000>; 213f29cabf2SMartin Blumenstingl reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; 21467d49f30SMartin Blumenstingl }; 21567d49f30SMartin Blumenstingl }; 216c246e9d6SNeil Armstrong}; 217c246e9d6SNeil Armstrong 21882f11345SAndreas Färber&hdmi_tx { 21982f11345SAndreas Färber status = "okay"; 22082f11345SAndreas Färber pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; 22182f11345SAndreas Färber pinctrl-names = "default"; 22282f11345SAndreas Färber}; 22382f11345SAndreas Färber 22482f11345SAndreas Färber&hdmi_tx_tmds_port { 22582f11345SAndreas Färber hdmi_tx_tmds_out: endpoint { 22682f11345SAndreas Färber remote-endpoint = <&hdmi_connector_in>; 22782f11345SAndreas Färber }; 22882f11345SAndreas Färber}; 22982f11345SAndreas Färber 230c246e9d6SNeil Armstrong&ir { 231c246e9d6SNeil Armstrong status = "okay"; 232c246e9d6SNeil Armstrong pinctrl-0 = <&remote_input_ao_pins>; 233c246e9d6SNeil Armstrong pinctrl-names = "default"; 234c246e9d6SNeil Armstrong}; 235a776e045SNeil Armstrong 23682f11345SAndreas Färber&pwm_ef { 23782f11345SAndreas Färber status = "okay"; 23882f11345SAndreas Färber pinctrl-0 = <&pwm_e_pins>; 23982f11345SAndreas Färber pinctrl-names = "default"; 24082f11345SAndreas Färber clocks = <&clkc CLKID_FCLK_DIV4>; 24182f11345SAndreas Färber clock-names = "clkin0"; 24282f11345SAndreas Färber}; 24382f11345SAndreas Färber 244a776e045SNeil Armstrong/* Wireless SDIO Module */ 245a776e045SNeil Armstrong&sd_emmc_a { 246a776e045SNeil Armstrong status = "okay"; 247a776e045SNeil Armstrong pinctrl-0 = <&sdio_pins>; 24867e7607fSJerome Brunet pinctrl-1 = <&sdio_clk_gate_pins>; 24967e7607fSJerome Brunet pinctrl-names = "default", "clk-gate"; 250a776e045SNeil Armstrong #address-cells = <1>; 251a776e045SNeil Armstrong #size-cells = <0>; 252a776e045SNeil Armstrong 253a776e045SNeil Armstrong bus-width = <4>; 254a776e045SNeil Armstrong cap-sd-highspeed; 255a776e045SNeil Armstrong max-frequency = <100000000>; 256a776e045SNeil Armstrong 257a776e045SNeil Armstrong non-removable; 258a776e045SNeil Armstrong disable-wp; 259a776e045SNeil Armstrong 26042d7815cSNeil Armstrong /* WiFi firmware requires power to be kept while in suspend */ 26142d7815cSNeil Armstrong keep-power-in-suspend; 26242d7815cSNeil Armstrong 263a776e045SNeil Armstrong mmc-pwrseq = <&sdio_pwrseq>; 264a776e045SNeil Armstrong 265a776e045SNeil Armstrong vmmc-supply = <&vddao_3v3>; 266a776e045SNeil Armstrong vqmmc-supply = <&vddio_boot>; 267a776e045SNeil Armstrong}; 268a776e045SNeil Armstrong 269a776e045SNeil Armstrong/* SD card */ 270a776e045SNeil Armstrong&sd_emmc_b { 271a776e045SNeil Armstrong status = "okay"; 272a776e045SNeil Armstrong pinctrl-0 = <&sdcard_pins>; 27367e7607fSJerome Brunet pinctrl-1 = <&sdcard_clk_gate_pins>; 27467e7607fSJerome Brunet pinctrl-names = "default", "clk-gate"; 275a776e045SNeil Armstrong 276a776e045SNeil Armstrong bus-width = <4>; 277a776e045SNeil Armstrong cap-sd-highspeed; 278adc52bf7SJerome Brunet max-frequency = <50000000>; 279a776e045SNeil Armstrong disable-wp; 280a776e045SNeil Armstrong 281f29200c8SLoys Ollivier cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; 282a776e045SNeil Armstrong 283a776e045SNeil Armstrong vmmc-supply = <&vddao_3v3>; 284a776e045SNeil Armstrong vqmmc-supply = <&vddio_card>; 285a776e045SNeil Armstrong}; 286a776e045SNeil Armstrong 287a776e045SNeil Armstrong/* eMMC */ 288a776e045SNeil Armstrong&sd_emmc_c { 289a776e045SNeil Armstrong status = "okay"; 290ab36be66SNeil Armstrong pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 29167e7607fSJerome Brunet pinctrl-1 = <&emmc_clk_gate_pins>; 29267e7607fSJerome Brunet pinctrl-names = "default", "clk-gate"; 293a776e045SNeil Armstrong 294a776e045SNeil Armstrong bus-width = <8>; 295a776e045SNeil Armstrong cap-mmc-highspeed; 296a776e045SNeil Armstrong max-frequency = <200000000>; 297a776e045SNeil Armstrong non-removable; 298a776e045SNeil Armstrong disable-wp; 299a776e045SNeil Armstrong mmc-ddr-1_8v; 300a776e045SNeil Armstrong mmc-hs200-1_8v; 301a776e045SNeil Armstrong 302a776e045SNeil Armstrong mmc-pwrseq = <&emmc_pwrseq>; 303a776e045SNeil Armstrong vmmc-supply = <&vcc_3v3>; 304a776e045SNeil Armstrong vqmmc-supply = <&vddio_boot>; 305a776e045SNeil Armstrong}; 306a776e045SNeil Armstrong 30782f11345SAndreas Färber&uart_AO { 308a776e045SNeil Armstrong status = "okay"; 30982f11345SAndreas Färber pinctrl-0 = <&uart_ao_a_pins>; 310a776e045SNeil Armstrong pinctrl-names = "default"; 3116939db7eSNeil Armstrong}; 312e2f4d749SPeter Korsgaard 313e2f4d749SPeter Korsgaard&usb0_phy { 314e2f4d749SPeter Korsgaard status = "okay"; 315e2f4d749SPeter Korsgaard phy-supply = <&usb_pwr>; 316e2f4d749SPeter Korsgaard}; 317e2f4d749SPeter Korsgaard 318e2f4d749SPeter Korsgaard&usb1_phy { 319e2f4d749SPeter Korsgaard status = "okay"; 320e2f4d749SPeter Korsgaard}; 321e2f4d749SPeter Korsgaard 322e2f4d749SPeter Korsgaard&usb0 { 323e2f4d749SPeter Korsgaard status = "okay"; 324e2f4d749SPeter Korsgaard}; 325e2f4d749SPeter Korsgaard 326e2f4d749SPeter Korsgaard&usb1 { 327e2f4d749SPeter Korsgaard status = "okay"; 328e2f4d749SPeter Korsgaard}; 329