Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2016-2017 Andreas Färber
0004  *
0005  * Based on nexbox-a1:
0006  *
0007  * Copyright (c) 2016 BayLibre, SAS.
0008  * Author: Neil Armstrong <narmstrong@baylibre.com>
0009  *
0010  * Copyright (c) 2016 Endless Computers, Inc.
0011  * Author: Carlo Caione <carlo@endlessm.com>
0012  */
0013 
0014 /dts-v1/;
0015 
0016 #include "meson-gxm.dtsi"
0017 #include <dt-bindings/sound/meson-aiu.h>
0018 
0019 / {
0020         compatible = "kingnovel,r-box-pro", "amlogic,s912", "amlogic,meson-gxm";
0021         model = "R-Box Pro";
0022 
0023         aliases {
0024                 serial0 = &uart_AO;
0025                 ethernet0 = &ethmac;
0026         };
0027 
0028         chosen {
0029                 stdout-path = "serial0:115200n8";
0030         };
0031 
0032         memory@0 {
0033                 device_type = "memory";
0034                 reg = <0x0 0x0 0x0 0x80000000>; /* 2 GiB or 3 GiB */
0035         };
0036 
0037         spdif_dit: audio-codec-0 {
0038                 #sound-dai-cells = <0>;
0039                 compatible = "linux,spdif-dit";
0040                 status = "okay";
0041                 sound-name-prefix = "DIT";
0042         };
0043 
0044         leds {
0045                 compatible = "gpio-leds";
0046 
0047                 led-blue {
0048                         label = "rbox-pro:blue:on";
0049                         gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
0050                         default-state = "on";
0051                 };
0052 
0053                 led-red {
0054                         label = "rbox-pro:red:standby";
0055                         gpios = <&gpio GPIODV_28 GPIO_ACTIVE_HIGH>;
0056                         default-state = "off";
0057                         retain-state-suspended;
0058                         panic-indicator;
0059                 };
0060         };
0061 
0062         vddio_boot: regulator-vddio-boot {
0063                 compatible = "regulator-fixed";
0064                 regulator-name = "VDDIO_BOOT";
0065                 regulator-min-microvolt = <1800000>;
0066                 regulator-max-microvolt = <1800000>;
0067         };
0068 
0069         vddao_3v3: regulator-vddao-3v3 {
0070                 compatible = "regulator-fixed";
0071                 regulator-name = "VDDAO_3V3";
0072                 regulator-min-microvolt = <3300000>;
0073                 regulator-max-microvolt = <3300000>;
0074         };
0075 
0076         vcc_3v3: regulator-vcc-3v3 {
0077                 compatible = "regulator-fixed";
0078                 regulator-name = "VCC_3V3";
0079                 regulator-min-microvolt = <3300000>;
0080                 regulator-max-microvolt = <3300000>;
0081         };
0082 
0083         emmc_pwrseq: emmc-pwrseq {
0084                 compatible = "mmc-pwrseq-emmc";
0085                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
0086         };
0087 
0088         wifi32k: wifi32k {
0089                 compatible = "pwm-clock";
0090                 #clock-cells = <0>;
0091                 clock-frequency = <32768>;
0092                 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
0093         };
0094 
0095         sdio_pwrseq: sdio-pwrseq {
0096                 compatible = "mmc-pwrseq-simple";
0097                 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
0098                 clocks = <&wifi32k>;
0099                 clock-names = "ext_clock";
0100         };
0101 
0102         sound {
0103                 compatible = "amlogic,gx-sound-card";
0104                 model = "RBOX-PRO";
0105                 assigned-clocks = <&clkc CLKID_MPLL0>,
0106                                   <&clkc CLKID_MPLL1>,
0107                                   <&clkc CLKID_MPLL2>;
0108                 assigned-clock-parents = <0>, <0>, <0>;
0109                 assigned-clock-rates = <294912000>,
0110                                        <270950400>,
0111                                        <393216000>;
0112                 status = "okay";
0113 
0114                 dai-link-0 {
0115                         sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
0116                 };
0117 
0118                 dai-link-1 {
0119                         sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
0120                 };
0121 
0122                 dai-link-2 {
0123                         sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
0124                         dai-format = "i2s";
0125                         mclk-fs = <256>;
0126 
0127                         codec-0 {
0128                                 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
0129                         };
0130                 };
0131 
0132                 dai-link-3 {
0133                         sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
0134 
0135                         codec-0 {
0136                                 sound-dai = <&spdif_dit>;
0137                         };
0138                 };
0139 
0140                 dai-link-4 {
0141                         sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
0142 
0143                         codec-0 {
0144                                 sound-dai = <&hdmi_tx>;
0145                         };
0146                 };
0147         };
0148 };
0149 
0150 &aiu {
0151         status = "okay";
0152         pinctrl-0 = <&spdif_out_h_pins>;
0153         pinctrl-names = "default";
0154 };
0155 
0156 &ethmac {
0157         status = "okay";
0158 
0159         pinctrl-0 = <&eth_pins>;
0160         pinctrl-names = "default";
0161 
0162         /* Select external PHY by default */
0163         phy-handle = <&external_phy>;
0164 
0165         amlogic,tx-delay-ns = <2>;
0166 
0167         /* External PHY is in RGMII */
0168         phy-mode = "rgmii";
0169 };
0170 
0171 &external_mdio {
0172         external_phy: ethernet-phy@0 {
0173                 /* Realtek RTL8211F (0x001cc916) */
0174                 reg = <0>;
0175                 max-speed = <1000>;
0176 
0177                 reset-assert-us = <10000>;
0178                 reset-deassert-us = <80000>;
0179                 reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
0180         };
0181 };
0182 
0183 &ir {
0184         status = "okay";
0185         pinctrl-0 = <&remote_input_ao_pins>;
0186         pinctrl-names = "default";
0187 };
0188 
0189 &pwm_ef {
0190         status = "okay";
0191         pinctrl-0 = <&pwm_e_pins>;
0192         pinctrl-names = "default";
0193         clocks = <&clkc CLKID_FCLK_DIV4>;
0194         clock-names = "clkin0";
0195 };
0196 
0197 /* Wireless SDIO Module */
0198 &sd_emmc_a {
0199         status = "okay";
0200         pinctrl-0 = <&sdio_pins>;
0201         pinctrl-names = "default";
0202         #address-cells = <1>;
0203         #size-cells = <0>;
0204 
0205         bus-width = <4>;
0206         cap-sd-highspeed;
0207         max-frequency = <50000000>;
0208 
0209         non-removable;
0210         disable-wp;
0211 
0212         /* WiFi firmware requires power to be kept while in suspend */
0213         keep-power-in-suspend;
0214 
0215         mmc-pwrseq = <&sdio_pwrseq>;
0216 
0217         vmmc-supply = <&vddao_3v3>;
0218         vqmmc-supply = <&vddio_boot>;
0219 
0220         brcmf: brcmf@1 {
0221                 reg = <1>;
0222                 compatible = "brcm,bcm4329-fmac";
0223         };
0224 };
0225 
0226 /* SD card */
0227 &sd_emmc_b {
0228         status = "okay";
0229         pinctrl-0 = <&sdcard_pins>;
0230         pinctrl-names = "default";
0231 
0232         bus-width = <4>;
0233         cap-sd-highspeed;
0234         max-frequency = <50000000>;
0235         disable-wp;
0236 
0237         cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
0238 
0239         vmmc-supply = <&vddao_3v3>;
0240         vqmmc-supply = <&vddio_boot>;
0241 };
0242 
0243 /* eMMC */
0244 &sd_emmc_c {
0245         status = "okay";
0246         pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
0247         pinctrl-names = "default";
0248 
0249         bus-width = <8>;
0250         cap-mmc-highspeed;
0251         max-frequency = <200000000>;
0252         non-removable;
0253         disable-wp;
0254         mmc-ddr-1_8v;
0255         mmc-hs200-1_8v;
0256 
0257         mmc-pwrseq = <&emmc_pwrseq>;
0258         vmmc-supply = <&vcc_3v3>;
0259         vqmmc-supply = <&vddio_boot>;
0260 };
0261 
0262 &uart_AO {
0263         status = "okay";
0264         pinctrl-0 = <&uart_ao_a_pins>;
0265         pinctrl-names = "default";
0266 };