| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2016-2017 Andreas Färber |
| 4 |
* |
| 5 |
* Based on nexbox-a1: |
| 6 |
* |
| 7 |
* Copyright (c) 2016 BayLibre, SAS. |
| 8 |
* Author: Neil Armstrong <[email protected]> |
| 9 |
* |
| 10 |
* Copyright (c) 2016 Endless Computers, Inc. |
| 11 |
* Author: Carlo Caione <[email protected]> |
| 12 |
*/ |
| 13 |
|
| 14 |
/dts-v1/; |
| 15 |
|
| 16 |
#include "meson-gxm.dtsi" |
| 17 |
#include <dt-bindings/sound/meson-aiu.h> |
| 18 |
|
| 19 |
/ { |
| 20 |
compatible = "kingnovel,r-box-pro", "amlogic,s912", "amlogic,meson-gxm"; |
| 21 |
model = "R-Box Pro"; |
| 22 |
|
| 23 |
aliases { |
| 24 |
serial0 = &uart_AO; |
| 25 |
ethernet0 = ðmac; |
| 26 |
}; |
| 27 |
|
| 28 |
chosen { |
| 29 |
stdout-path = "serial0:115200n8"; |
| 30 |
}; |
| 31 |
|
| 32 |
memory@0 { |
| 33 |
device_type = "memory"; |
| 34 |
reg = <0x0 0x0 0x0 0x80000000>; /* 2 GiB or 3 GiB */ |
| 35 |
}; |
| 36 |
|
| 37 |
spdif_dit: audio-codec-0 { |
| 38 |
#sound-dai-cells = <0>; |
| 39 |
compatible = "linux,spdif-dit"; |
| 40 |
sound-name-prefix = "DIT"; |
| 41 |
}; |
| 42 |
|
| 43 |
leds { |
| 44 |
compatible = "gpio-leds"; |
| 45 |
|
| 46 |
led-blue { |
| 47 |
label = "rbox-pro:blue:on"; |
| 48 |
gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>; |
| 49 |
default-state = "on"; |
| 50 |
}; |
| 51 |
|
| 52 |
led-red { |
| 53 |
label = "rbox-pro:red:standby"; |
| 54 |
gpios = <&gpio GPIODV_28 GPIO_ACTIVE_HIGH>; |
| 55 |
default-state = "off"; |
| 56 |
retain-state-suspended; |
| 57 |
panic-indicator; |
| 58 |
}; |
| 59 |
}; |
| 60 |
|
| 61 |
vddio_boot: regulator-vddio-boot { |
| 62 |
compatible = "regulator-fixed"; |
| 63 |
regulator-name = "VDDIO_BOOT"; |
| 64 |
regulator-min-microvolt = <1800000>; |
| 65 |
regulator-max-microvolt = <1800000>; |
| 66 |
}; |
| 67 |
|
| 68 |
vddao_3v3: regulator-vddao-3v3 { |
| 69 |
compatible = "regulator-fixed"; |
| 70 |
regulator-name = "VDDAO_3V3"; |
| 71 |
regulator-min-microvolt = <3300000>; |
| 72 |
regulator-max-microvolt = <3300000>; |
| 73 |
}; |
| 74 |
|
| 75 |
vcc_3v3: regulator-vcc-3v3 { |
| 76 |
compatible = "regulator-fixed"; |
| 77 |
regulator-name = "VCC_3V3"; |
| 78 |
regulator-min-microvolt = <3300000>; |
| 79 |
regulator-max-microvolt = <3300000>; |
| 80 |
}; |
| 81 |
|
| 82 |
emmc_pwrseq: emmc-pwrseq { |
| 83 |
compatible = "mmc-pwrseq-emmc"; |
| 84 |
reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; |
| 85 |
}; |
| 86 |
|
| 87 |
wifi32k: wifi32k { |
| 88 |
compatible = "pwm-clock"; |
| 89 |
#clock-cells = <0>; |
| 90 |
clock-frequency = <32768>; |
| 91 |
pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ |
| 92 |
}; |
| 93 |
|
| 94 |
sdio_pwrseq: sdio-pwrseq { |
| 95 |
compatible = "mmc-pwrseq-simple"; |
| 96 |
reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; |
| 97 |
clocks = <&wifi32k>; |
| 98 |
clock-names = "ext_clock"; |
| 99 |
}; |
| 100 |
|
| 101 |
sound { |
| 102 |
compatible = "amlogic,gx-sound-card"; |
| 103 |
model = "RBOX-PRO"; |
| 104 |
clocks = <&clkc CLKID_MPLL0>, |
| 105 |
<&clkc CLKID_MPLL1>, |
| 106 |
<&clkc CLKID_MPLL2>; |
| 107 |
|
| 108 |
assigned-clocks = <&clkc CLKID_MPLL0>, |
| 109 |
<&clkc CLKID_MPLL1>, |
| 110 |
<&clkc CLKID_MPLL2>; |
| 111 |
assigned-clock-rates = <294912000>, |
| 112 |
<270950400>, |
| 113 |
<393216000>; |
| 114 |
|
| 115 |
dai-link-0 { |
| 116 |
sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; |
| 117 |
}; |
| 118 |
|
| 119 |
dai-link-1 { |
| 120 |
sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>; |
| 121 |
}; |
| 122 |
|
| 123 |
dai-link-2 { |
| 124 |
sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; |
| 125 |
dai-format = "i2s"; |
| 126 |
mclk-fs = <256>; |
| 127 |
|
| 128 |
codec-0 { |
| 129 |
sound-dai = <&aiu AIU_HDMI CTRL_I2S>; |
| 130 |
}; |
| 131 |
}; |
| 132 |
|
| 133 |
dai-link-3 { |
| 134 |
sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; |
| 135 |
|
| 136 |
codec-0 { |
| 137 |
sound-dai = <&spdif_dit>; |
| 138 |
}; |
| 139 |
}; |
| 140 |
|
| 141 |
dai-link-4 { |
| 142 |
sound-dai = <&aiu AIU_HDMI CTRL_OUT>; |
| 143 |
|
| 144 |
codec-0 { |
| 145 |
sound-dai = <&hdmi_tx>; |
| 146 |
}; |
| 147 |
}; |
| 148 |
}; |
| 149 |
}; |
| 150 |
|
| 151 |
&aiu { |
| 152 |
status = "okay"; |
| 153 |
pinctrl-0 = <&spdif_out_h_pins>; |
| 154 |
pinctrl-names = "default"; |
| 155 |
}; |
| 156 |
|
| 157 |
ðmac { |
| 158 |
status = "okay"; |
| 159 |
|
| 160 |
pinctrl-0 = <ð_pins>; |
| 161 |
pinctrl-names = "default"; |
| 162 |
|
| 163 |
/* Select external PHY by default */ |
| 164 |
phy-handle = <&external_phy>; |
| 165 |
|
| 166 |
amlogic,tx-delay-ns = <2>; |
| 167 |
|
| 168 |
/* External PHY is in RGMII */ |
| 169 |
phy-mode = "rgmii"; |
| 170 |
}; |
| 171 |
|
| 172 |
&external_mdio { |
| 173 |
external_phy: ethernet-phy@0 { |
| 174 |
/* Realtek RTL8211F (0x001cc916) */ |
| 175 |
reg = <0>; |
| 176 |
max-speed = <1000>; |
| 177 |
|
| 178 |
reset-assert-us = <10000>; |
| 179 |
reset-deassert-us = <80000>; |
| 180 |
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; |
| 181 |
}; |
| 182 |
}; |
| 183 |
|
| 184 |
&ir { |
| 185 |
status = "okay"; |
| 186 |
pinctrl-0 = <&remote_input_ao_pins>; |
| 187 |
pinctrl-names = "default"; |
| 188 |
}; |
| 189 |
|
| 190 |
&pwm_ef { |
| 191 |
status = "okay"; |
| 192 |
pinctrl-0 = <&pwm_e_pins>; |
| 193 |
pinctrl-names = "default"; |
| 194 |
}; |
| 195 |
|
| 196 |
/* Wireless SDIO Module */ |
| 197 |
&sd_emmc_a { |
| 198 |
status = "okay"; |
| 199 |
pinctrl-0 = <&sdio_pins>; |
| 200 |
pinctrl-names = "default"; |
| 201 |
#address-cells = <1>; |
| 202 |
#size-cells = <0>; |
| 203 |
|
| 204 |
bus-width = <4>; |
| 205 |
cap-sd-highspeed; |
| 206 |
max-frequency = <50000000>; |
| 207 |
|
| 208 |
non-removable; |
| 209 |
disable-wp; |
| 210 |
|
| 211 |
/* WiFi firmware requires power to be kept while in suspend */ |
| 212 |
keep-power-in-suspend; |
| 213 |
|
| 214 |
mmc-pwrseq = <&sdio_pwrseq>; |
| 215 |
|
| 216 |
vmmc-supply = <&vddao_3v3>; |
| 217 |
vqmmc-supply = <&vddio_boot>; |
| 218 |
|
| 219 |
brcmf: wifi@1 { |
| 220 |
reg = <1>; |
| 221 |
compatible = "brcm,bcm4329-fmac"; |
| 222 |
}; |
| 223 |
}; |
| 224 |
|
| 225 |
/* SD card */ |
| 226 |
&sd_emmc_b { |
| 227 |
status = "okay"; |
| 228 |
pinctrl-0 = <&sdcard_pins>; |
| 229 |
pinctrl-names = "default"; |
| 230 |
|
| 231 |
bus-width = <4>; |
| 232 |
cap-sd-highspeed; |
| 233 |
max-frequency = <50000000>; |
| 234 |
disable-wp; |
| 235 |
|
| 236 |
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; |
| 237 |
|
| 238 |
vmmc-supply = <&vddao_3v3>; |
| 239 |
vqmmc-supply = <&vddio_boot>; |
| 240 |
}; |
| 241 |
|
| 242 |
/* eMMC */ |
| 243 |
&sd_emmc_c { |
| 244 |
status = "okay"; |
| 245 |
pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; |
| 246 |
pinctrl-names = "default"; |
| 247 |
|
| 248 |
bus-width = <8>; |
| 249 |
cap-mmc-highspeed; |
| 250 |
max-frequency = <200000000>; |
| 251 |
non-removable; |
| 252 |
disable-wp; |
| 253 |
mmc-ddr-1_8v; |
| 254 |
mmc-hs200-1_8v; |
| 255 |
|
| 256 |
mmc-pwrseq = <&emmc_pwrseq>; |
| 257 |
vmmc-supply = <&vcc_3v3>; |
| 258 |
vqmmc-supply = <&vddio_boot>; |
| 259 |
}; |
| 260 |
|
| 261 |
&uart_AO { |
| 262 |
status = "okay"; |
| 263 |
pinctrl-0 = <&uart_ao_a_pins>; |
| 264 |
pinctrl-names = "default"; |
| 265 |
}; |