1114abfe1SNeil Armstrong// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 20a072362SAndreas Färber/* 30a072362SAndreas Färber * Copyright (c) 2016-2017 Andreas Färber 40a072362SAndreas Färber * 50a072362SAndreas Färber * Based on nexbox-a1: 60a072362SAndreas Färber * 70a072362SAndreas Färber * Copyright (c) 2016 BayLibre, SAS. 80a072362SAndreas Färber * Author: Neil Armstrong <narmstrong@baylibre.com> 90a072362SAndreas Färber * 100a072362SAndreas Färber * Copyright (c) 2016 Endless Computers, Inc. 110a072362SAndreas Färber * Author: Carlo Caione <carlo@endlessm.com> 120a072362SAndreas Färber */ 130a072362SAndreas Färber 140a072362SAndreas Färber/dts-v1/; 150a072362SAndreas Färber 160a072362SAndreas Färber#include "meson-gxm.dtsi" 17*9450f63bSChristian Hewitt#include <dt-bindings/sound/meson-aiu.h> 180a072362SAndreas Färber 190a072362SAndreas Färber/ { 200a072362SAndreas Färber compatible = "kingnovel,r-box-pro", "amlogic,s912", "amlogic,meson-gxm"; 210a072362SAndreas Färber model = "R-Box Pro"; 220a072362SAndreas Färber 230a072362SAndreas Färber aliases { 240a072362SAndreas Färber serial0 = &uart_AO; 25059a58fcSJorge Ramirez-Ortiz ethernet0 = ðmac; 260a072362SAndreas Färber }; 270a072362SAndreas Färber 280a072362SAndreas Färber chosen { 290a072362SAndreas Färber stdout-path = "serial0:115200n8"; 300a072362SAndreas Färber }; 310a072362SAndreas Färber 320a072362SAndreas Färber memory@0 { 330a072362SAndreas Färber device_type = "memory"; 340a072362SAndreas Färber reg = <0x0 0x0 0x0 0x80000000>; /* 2 GiB or 3 GiB */ 350a072362SAndreas Färber }; 360a072362SAndreas Färber 37*9450f63bSChristian Hewitt spdif_dit: audio-codec-0 { 38*9450f63bSChristian Hewitt #sound-dai-cells = <0>; 39*9450f63bSChristian Hewitt compatible = "linux,spdif-dit"; 40*9450f63bSChristian Hewitt status = "okay"; 41*9450f63bSChristian Hewitt sound-name-prefix = "DIT"; 42*9450f63bSChristian Hewitt }; 43*9450f63bSChristian Hewitt 440a072362SAndreas Färber leds { 450a072362SAndreas Färber compatible = "gpio-leds"; 460a072362SAndreas Färber 4708dc0e5dSNeil Armstrong led-blue { 480a072362SAndreas Färber label = "rbox-pro:blue:on"; 490a072362SAndreas Färber gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>; 500a072362SAndreas Färber default-state = "on"; 510a072362SAndreas Färber }; 520a072362SAndreas Färber 5308dc0e5dSNeil Armstrong led-red { 540a072362SAndreas Färber label = "rbox-pro:red:standby"; 550a072362SAndreas Färber gpios = <&gpio GPIODV_28 GPIO_ACTIVE_HIGH>; 560a072362SAndreas Färber default-state = "off"; 570a072362SAndreas Färber retain-state-suspended; 580a072362SAndreas Färber panic-indicator; 590a072362SAndreas Färber }; 600a072362SAndreas Färber }; 610a072362SAndreas Färber 620a072362SAndreas Färber vddio_boot: regulator-vddio-boot { 630a072362SAndreas Färber compatible = "regulator-fixed"; 640a072362SAndreas Färber regulator-name = "VDDIO_BOOT"; 650a072362SAndreas Färber regulator-min-microvolt = <1800000>; 660a072362SAndreas Färber regulator-max-microvolt = <1800000>; 670a072362SAndreas Färber }; 680a072362SAndreas Färber 690a072362SAndreas Färber vddao_3v3: regulator-vddao-3v3 { 700a072362SAndreas Färber compatible = "regulator-fixed"; 710a072362SAndreas Färber regulator-name = "VDDAO_3V3"; 720a072362SAndreas Färber regulator-min-microvolt = <3300000>; 730a072362SAndreas Färber regulator-max-microvolt = <3300000>; 740a072362SAndreas Färber }; 750a072362SAndreas Färber 760a072362SAndreas Färber vcc_3v3: regulator-vcc-3v3 { 770a072362SAndreas Färber compatible = "regulator-fixed"; 780a072362SAndreas Färber regulator-name = "VCC_3V3"; 790a072362SAndreas Färber regulator-min-microvolt = <3300000>; 800a072362SAndreas Färber regulator-max-microvolt = <3300000>; 810a072362SAndreas Färber }; 820a072362SAndreas Färber 830a072362SAndreas Färber emmc_pwrseq: emmc-pwrseq { 840a072362SAndreas Färber compatible = "mmc-pwrseq-emmc"; 850a072362SAndreas Färber reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 860a072362SAndreas Färber }; 870a072362SAndreas Färber 880a072362SAndreas Färber wifi32k: wifi32k { 890a072362SAndreas Färber compatible = "pwm-clock"; 900a072362SAndreas Färber #clock-cells = <0>; 910a072362SAndreas Färber clock-frequency = <32768>; 920a072362SAndreas Färber pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ 930a072362SAndreas Färber }; 940a072362SAndreas Färber 950a072362SAndreas Färber sdio_pwrseq: sdio-pwrseq { 960a072362SAndreas Färber compatible = "mmc-pwrseq-simple"; 970a072362SAndreas Färber reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; 980a072362SAndreas Färber clocks = <&wifi32k>; 990a072362SAndreas Färber clock-names = "ext_clock"; 1000a072362SAndreas Färber }; 101*9450f63bSChristian Hewitt 102*9450f63bSChristian Hewitt sound { 103*9450f63bSChristian Hewitt compatible = "amlogic,gx-sound-card"; 104*9450f63bSChristian Hewitt model = "RBOX-PRO"; 105*9450f63bSChristian Hewitt assigned-clocks = <&clkc CLKID_MPLL0>, 106*9450f63bSChristian Hewitt <&clkc CLKID_MPLL1>, 107*9450f63bSChristian Hewitt <&clkc CLKID_MPLL2>; 108*9450f63bSChristian Hewitt assigned-clock-parents = <0>, <0>, <0>; 109*9450f63bSChristian Hewitt assigned-clock-rates = <294912000>, 110*9450f63bSChristian Hewitt <270950400>, 111*9450f63bSChristian Hewitt <393216000>; 112*9450f63bSChristian Hewitt status = "okay"; 113*9450f63bSChristian Hewitt 114*9450f63bSChristian Hewitt dai-link-0 { 115*9450f63bSChristian Hewitt sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; 116*9450f63bSChristian Hewitt }; 117*9450f63bSChristian Hewitt 118*9450f63bSChristian Hewitt dai-link-1 { 119*9450f63bSChristian Hewitt sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>; 120*9450f63bSChristian Hewitt }; 121*9450f63bSChristian Hewitt 122*9450f63bSChristian Hewitt dai-link-2 { 123*9450f63bSChristian Hewitt sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; 124*9450f63bSChristian Hewitt dai-format = "i2s"; 125*9450f63bSChristian Hewitt mclk-fs = <256>; 126*9450f63bSChristian Hewitt 127*9450f63bSChristian Hewitt codec-0 { 128*9450f63bSChristian Hewitt sound-dai = <&aiu AIU_HDMI CTRL_I2S>; 129*9450f63bSChristian Hewitt }; 130*9450f63bSChristian Hewitt }; 131*9450f63bSChristian Hewitt 132*9450f63bSChristian Hewitt dai-link-3 { 133*9450f63bSChristian Hewitt sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; 134*9450f63bSChristian Hewitt 135*9450f63bSChristian Hewitt codec-0 { 136*9450f63bSChristian Hewitt sound-dai = <&spdif_dit>; 137*9450f63bSChristian Hewitt }; 138*9450f63bSChristian Hewitt }; 139*9450f63bSChristian Hewitt 140*9450f63bSChristian Hewitt dai-link-4 { 141*9450f63bSChristian Hewitt sound-dai = <&aiu AIU_HDMI CTRL_OUT>; 142*9450f63bSChristian Hewitt 143*9450f63bSChristian Hewitt codec-0 { 144*9450f63bSChristian Hewitt sound-dai = <&hdmi_tx>; 145*9450f63bSChristian Hewitt }; 146*9450f63bSChristian Hewitt }; 147*9450f63bSChristian Hewitt }; 148*9450f63bSChristian Hewitt}; 149*9450f63bSChristian Hewitt 150*9450f63bSChristian Hewitt&aiu { 151*9450f63bSChristian Hewitt status = "okay"; 152*9450f63bSChristian Hewitt pinctrl-0 = <&spdif_out_h_pins>; 153*9450f63bSChristian Hewitt pinctrl-names = "default"; 1540a072362SAndreas Färber}; 1550a072362SAndreas Färber 1560a072362SAndreas Färberðmac { 1570a072362SAndreas Färber status = "okay"; 1580a072362SAndreas Färber 1590a072362SAndreas Färber pinctrl-0 = <ð_pins>; 1600a072362SAndreas Färber pinctrl-names = "default"; 1610a072362SAndreas Färber 1620a072362SAndreas Färber /* Select external PHY by default */ 1630a072362SAndreas Färber phy-handle = <&external_phy>; 1640a072362SAndreas Färber 1650a072362SAndreas Färber amlogic,tx-delay-ns = <2>; 1660a072362SAndreas Färber 1670a072362SAndreas Färber /* External PHY is in RGMII */ 1680a072362SAndreas Färber phy-mode = "rgmii"; 1690a072362SAndreas Färber}; 1700a072362SAndreas Färber 1710a072362SAndreas Färber&external_mdio { 1720a072362SAndreas Färber external_phy: ethernet-phy@0 { 173890265c9SMartin Blumenstingl /* Realtek RTL8211F (0x001cc916) */ 1740a072362SAndreas Färber reg = <0>; 1750a072362SAndreas Färber max-speed = <1000>; 176f29cabf2SMartin Blumenstingl 177f29cabf2SMartin Blumenstingl reset-assert-us = <10000>; 178c183c406SStefan Agner reset-deassert-us = <80000>; 179f29cabf2SMartin Blumenstingl reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; 1800a072362SAndreas Färber }; 1810a072362SAndreas Färber}; 1820a072362SAndreas Färber 1830a072362SAndreas Färber&ir { 1840a072362SAndreas Färber status = "okay"; 1850a072362SAndreas Färber pinctrl-0 = <&remote_input_ao_pins>; 1860a072362SAndreas Färber pinctrl-names = "default"; 1870a072362SAndreas Färber}; 1880a072362SAndreas Färber 1890a072362SAndreas Färber&pwm_ef { 1900a072362SAndreas Färber status = "okay"; 1910a072362SAndreas Färber pinctrl-0 = <&pwm_e_pins>; 1920a072362SAndreas Färber pinctrl-names = "default"; 1930a072362SAndreas Färber clocks = <&clkc CLKID_FCLK_DIV4>; 1940a072362SAndreas Färber clock-names = "clkin0"; 1950a072362SAndreas Färber}; 1960a072362SAndreas Färber 1970a072362SAndreas Färber/* Wireless SDIO Module */ 1980a072362SAndreas Färber&sd_emmc_a { 1990a072362SAndreas Färber status = "okay"; 2000a072362SAndreas Färber pinctrl-0 = <&sdio_pins>; 2010a072362SAndreas Färber pinctrl-names = "default"; 2020a072362SAndreas Färber #address-cells = <1>; 2030a072362SAndreas Färber #size-cells = <0>; 2040a072362SAndreas Färber 2050a072362SAndreas Färber bus-width = <4>; 2060a072362SAndreas Färber cap-sd-highspeed; 207adc52bf7SJerome Brunet max-frequency = <50000000>; 2080a072362SAndreas Färber 2090a072362SAndreas Färber non-removable; 2100a072362SAndreas Färber disable-wp; 2110a072362SAndreas Färber 212e326c967SNeil Armstrong /* WiFi firmware requires power to be kept while in suspend */ 213e326c967SNeil Armstrong keep-power-in-suspend; 214e326c967SNeil Armstrong 2150a072362SAndreas Färber mmc-pwrseq = <&sdio_pwrseq>; 2160a072362SAndreas Färber 2170a072362SAndreas Färber vmmc-supply = <&vddao_3v3>; 2180a072362SAndreas Färber vqmmc-supply = <&vddio_boot>; 2190a072362SAndreas Färber 2200a072362SAndreas Färber brcmf: brcmf@1 { 2210a072362SAndreas Färber reg = <1>; 2220a072362SAndreas Färber compatible = "brcm,bcm4329-fmac"; 2230a072362SAndreas Färber }; 2240a072362SAndreas Färber}; 2250a072362SAndreas Färber 2260a072362SAndreas Färber/* SD card */ 2270a072362SAndreas Färber&sd_emmc_b { 2280a072362SAndreas Färber status = "okay"; 2290a072362SAndreas Färber pinctrl-0 = <&sdcard_pins>; 2300a072362SAndreas Färber pinctrl-names = "default"; 2310a072362SAndreas Färber 2320a072362SAndreas Färber bus-width = <4>; 2330a072362SAndreas Färber cap-sd-highspeed; 234adc52bf7SJerome Brunet max-frequency = <50000000>; 2350a072362SAndreas Färber disable-wp; 2360a072362SAndreas Färber 237f29200c8SLoys Ollivier cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; 2380a072362SAndreas Färber 2390a072362SAndreas Färber vmmc-supply = <&vddao_3v3>; 2400a072362SAndreas Färber vqmmc-supply = <&vddio_boot>; 2410a072362SAndreas Färber}; 2420a072362SAndreas Färber 2430a072362SAndreas Färber/* eMMC */ 2440a072362SAndreas Färber&sd_emmc_c { 2450a072362SAndreas Färber status = "okay"; 246ab36be66SNeil Armstrong pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 2470a072362SAndreas Färber pinctrl-names = "default"; 2480a072362SAndreas Färber 2490a072362SAndreas Färber bus-width = <8>; 2500a072362SAndreas Färber cap-mmc-highspeed; 2510a072362SAndreas Färber max-frequency = <200000000>; 2520a072362SAndreas Färber non-removable; 2530a072362SAndreas Färber disable-wp; 2540a072362SAndreas Färber mmc-ddr-1_8v; 2550a072362SAndreas Färber mmc-hs200-1_8v; 2560a072362SAndreas Färber 2570a072362SAndreas Färber mmc-pwrseq = <&emmc_pwrseq>; 2580a072362SAndreas Färber vmmc-supply = <&vcc_3v3>; 2590a072362SAndreas Färber vqmmc-supply = <&vddio_boot>; 2600a072362SAndreas Färber}; 2610a072362SAndreas Färber 2620a072362SAndreas Färber&uart_AO { 2630a072362SAndreas Färber status = "okay"; 2640a072362SAndreas Färber pinctrl-0 = <&uart_ao_a_pins>; 2650a072362SAndreas Färber pinctrl-names = "default"; 2660a072362SAndreas Färber}; 267