| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
// Copyright (c) 2024 Freebox SAS |
| 3 |
|
| 4 |
/* |
| 5 |
* SEI codename: SEI530FB (based on SEI510) |
| 6 |
* Freebox codename: fbx8am |
| 7 |
* Commercial names: Freebox Pop, Player TV Free 4K |
| 8 |
*/ |
| 9 |
|
| 10 |
/dts-v1/; |
| 11 |
|
| 12 |
#include "meson-g12a.dtsi" |
| 13 |
#include <dt-bindings/gpio/gpio.h> |
| 14 |
#include <dt-bindings/input/input.h> |
| 15 |
#include <dt-bindings/gpio/meson-g12a-gpio.h> |
| 16 |
#include <dt-bindings/sound/meson-g12a-tohdmitx.h> |
| 17 |
|
| 18 |
/ { |
| 19 |
compatible = "freebox,fbx8am", "amlogic,g12a"; |
| 20 |
model = "Freebox Player Pop"; |
| 21 |
chassis-type = "embedded"; |
| 22 |
|
| 23 |
firmware { |
| 24 |
optee { |
| 25 |
compatible = "linaro,optee-tz"; |
| 26 |
method = "smc"; |
| 27 |
}; |
| 28 |
}; |
| 29 |
|
| 30 |
gpio-keys-polled { |
| 31 |
compatible = "gpio-keys-polled"; |
| 32 |
poll-interval = <100>; |
| 33 |
|
| 34 |
/* Physical user-accessible reset button near USB port */ |
| 35 |
power-button { |
| 36 |
label = "Reset"; |
| 37 |
linux,code = <BTN_MISC>; |
| 38 |
gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; |
| 39 |
}; |
| 40 |
}; |
| 41 |
|
| 42 |
spdif_dit: audio-codec-2 { |
| 43 |
#sound-dai-cells = <0>; |
| 44 |
compatible = "linux,spdif-dit"; |
| 45 |
status = "okay"; |
| 46 |
sound-name-prefix = "DIT"; |
| 47 |
}; |
| 48 |
|
| 49 |
aliases { |
| 50 |
serial0 = &uart_AO; |
| 51 |
ethernet0 = ðmac; |
| 52 |
}; |
| 53 |
|
| 54 |
chosen { |
| 55 |
stdout-path = "serial0:115200n8"; |
| 56 |
}; |
| 57 |
|
| 58 |
emmc_pwrseq: emmc-pwrseq { |
| 59 |
compatible = "mmc-pwrseq-emmc"; |
| 60 |
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; |
| 61 |
}; |
| 62 |
|
| 63 |
hdmi-connector { |
| 64 |
compatible = "hdmi-connector"; |
| 65 |
type = "a"; |
| 66 |
|
| 67 |
port { |
| 68 |
hdmi_connector_in: endpoint { |
| 69 |
remote-endpoint = <&hdmi_tx_tmds_out>; |
| 70 |
}; |
| 71 |
}; |
| 72 |
}; |
| 73 |
|
| 74 |
memory@0 { |
| 75 |
device_type = "memory"; |
| 76 |
reg = <0x0 0x0 0x0 0x80000000>; |
| 77 |
}; |
| 78 |
|
| 79 |
ao_5v: regulator-ao-5v { |
| 80 |
compatible = "regulator-fixed"; |
| 81 |
regulator-name = "AO_5V"; |
| 82 |
regulator-min-microvolt = <5000000>; |
| 83 |
regulator-max-microvolt = <5000000>; |
| 84 |
vin-supply = <&dc_in>; |
| 85 |
regulator-always-on; |
| 86 |
}; |
| 87 |
|
| 88 |
dc_in: regulator-dc-in { |
| 89 |
compatible = "regulator-fixed"; |
| 90 |
regulator-name = "DC_IN"; |
| 91 |
regulator-min-microvolt = <12000000>; |
| 92 |
regulator-max-microvolt = <12000000>; |
| 93 |
regulator-always-on; |
| 94 |
}; |
| 95 |
|
| 96 |
emmc_1v8: regulator-emmc-1v8 { |
| 97 |
compatible = "regulator-fixed"; |
| 98 |
regulator-name = "EMMC_1V8"; |
| 99 |
regulator-min-microvolt = <1800000>; |
| 100 |
regulator-max-microvolt = <1800000>; |
| 101 |
vin-supply = <&vddao_3v3>; |
| 102 |
regulator-always-on; |
| 103 |
}; |
| 104 |
|
| 105 |
vddao_3v3: regulator-vddao-3v3 { |
| 106 |
compatible = "regulator-fixed"; |
| 107 |
regulator-name = "VDDAO_3V3"; |
| 108 |
regulator-min-microvolt = <3300000>; |
| 109 |
regulator-max-microvolt = <3300000>; |
| 110 |
vin-supply = <&ao_5v>; |
| 111 |
regulator-always-on; |
| 112 |
}; |
| 113 |
|
| 114 |
vddao_3v3_t: regulator-vddao-3v3-t { |
| 115 |
compatible = "regulator-fixed"; |
| 116 |
regulator-name = "VDDAO_3V3_T"; |
| 117 |
regulator-min-microvolt = <3300000>; |
| 118 |
regulator-max-microvolt = <3300000>; |
| 119 |
vin-supply = <&vddao_3v3>; |
| 120 |
gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; |
| 121 |
enable-active-high; |
| 122 |
}; |
| 123 |
|
| 124 |
vddcpu: regulator-vddcpu { |
| 125 |
/* |
| 126 |
* SY8120B1ABC DC/DC Regulator. |
| 127 |
*/ |
| 128 |
compatible = "pwm-regulator"; |
| 129 |
|
| 130 |
regulator-name = "VDDCPU"; |
| 131 |
regulator-min-microvolt = <721000>; |
| 132 |
regulator-max-microvolt = <1022000>; |
| 133 |
|
| 134 |
pwm-supply = <&ao_5v>; |
| 135 |
|
| 136 |
pwms = <&pwm_AO_cd 1 1250 0>; |
| 137 |
pwm-dutycycle-range = <100 0>; |
| 138 |
|
| 139 |
regulator-boot-on; |
| 140 |
regulator-always-on; |
| 141 |
}; |
| 142 |
|
| 143 |
vddio_ao1v8: regulator-vddio-ao1v8 { |
| 144 |
compatible = "regulator-fixed"; |
| 145 |
regulator-name = "VDDIO_AO1V8"; |
| 146 |
regulator-min-microvolt = <1800000>; |
| 147 |
regulator-max-microvolt = <1800000>; |
| 148 |
vin-supply = <&vddao_3v3>; |
| 149 |
regulator-always-on; |
| 150 |
}; |
| 151 |
|
| 152 |
sdio_pwrseq: sdio-pwrseq { |
| 153 |
compatible = "mmc-pwrseq-simple"; |
| 154 |
reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; |
| 155 |
post-power-on-delay-ms = <10>; /* required for 43752 */ |
| 156 |
clocks = <&wifi32k>; |
| 157 |
clock-names = "ext_clock"; |
| 158 |
}; |
| 159 |
|
| 160 |
wifi32k: wifi32k { |
| 161 |
compatible = "pwm-clock"; |
| 162 |
#clock-cells = <0>; |
| 163 |
clock-frequency = <32768>; |
| 164 |
pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ |
| 165 |
}; |
| 166 |
|
| 167 |
sound { |
| 168 |
compatible = "amlogic,axg-sound-card"; |
| 169 |
model = "fbx8am"; |
| 170 |
audio-aux-devs = <&tdmout_b>; |
| 171 |
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", |
| 172 |
"TDMOUT_B IN 1", "FRDDR_B OUT 1", |
| 173 |
"TDMOUT_B IN 2", "FRDDR_C OUT 1", |
| 174 |
"TDM_B Playback", "TDMOUT_B OUT", |
| 175 |
"SPDIFOUT_A IN 0", "FRDDR_A OUT 3", |
| 176 |
"SPDIFOUT_A IN 1", "FRDDR_B OUT 3", |
| 177 |
"SPDIFOUT_A IN 2", "FRDDR_C OUT 3"; |
| 178 |
|
| 179 |
clocks = <&clkc CLKID_MPLL2>, |
| 180 |
<&clkc CLKID_MPLL0>, |
| 181 |
<&clkc CLKID_MPLL1>; |
| 182 |
|
| 183 |
assigned-clocks = <&clkc CLKID_MPLL2>, |
| 184 |
<&clkc CLKID_MPLL0>, |
| 185 |
<&clkc CLKID_MPLL1>; |
| 186 |
assigned-clock-rates = <294912000>, |
| 187 |
<270950400>, |
| 188 |
<393216000>; |
| 189 |
|
| 190 |
dai-link-0 { |
| 191 |
sound-dai = <&frddr_a>; |
| 192 |
}; |
| 193 |
|
| 194 |
dai-link-1 { |
| 195 |
sound-dai = <&frddr_b>; |
| 196 |
}; |
| 197 |
|
| 198 |
dai-link-2 { |
| 199 |
sound-dai = <&frddr_c>; |
| 200 |
}; |
| 201 |
|
| 202 |
/* 8ch hdmi interface */ |
| 203 |
dai-link-3 { |
| 204 |
sound-dai = <&tdmif_b>; |
| 205 |
dai-format = "i2s"; |
| 206 |
dai-tdm-slot-tx-mask-0 = <1 1>; |
| 207 |
dai-tdm-slot-tx-mask-1 = <1 1>; |
| 208 |
dai-tdm-slot-tx-mask-2 = <1 1>; |
| 209 |
dai-tdm-slot-tx-mask-3 = <1 1>; |
| 210 |
mclk-fs = <256>; |
| 211 |
|
| 212 |
codec { |
| 213 |
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; |
| 214 |
}; |
| 215 |
}; |
| 216 |
|
| 217 |
/* spdif hdmi or toslink interface */ |
| 218 |
dai-link-4 { |
| 219 |
sound-dai = <&spdifout_a>; |
| 220 |
|
| 221 |
codec-0 { |
| 222 |
sound-dai = <&spdif_dit>; |
| 223 |
}; |
| 224 |
|
| 225 |
codec-1 { |
| 226 |
sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>; |
| 227 |
}; |
| 228 |
}; |
| 229 |
|
| 230 |
/* spdif hdmi interface */ |
| 231 |
dai-link-5 { |
| 232 |
sound-dai = <&spdifout_b>; |
| 233 |
|
| 234 |
codec { |
| 235 |
sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>; |
| 236 |
}; |
| 237 |
}; |
| 238 |
|
| 239 |
/* hdmi glue */ |
| 240 |
dai-link-6 { |
| 241 |
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; |
| 242 |
|
| 243 |
codec { |
| 244 |
sound-dai = <&hdmi_tx>; |
| 245 |
}; |
| 246 |
}; |
| 247 |
}; |
| 248 |
}; |
| 249 |
|
| 250 |
&arb { |
| 251 |
status = "okay"; |
| 252 |
}; |
| 253 |
|
| 254 |
&cecb_AO { |
| 255 |
pinctrl-0 = <&cec_ao_b_h_pins>; |
| 256 |
pinctrl-names = "default"; |
| 257 |
status = "okay"; |
| 258 |
hdmi-phandle = <&hdmi_tx>; |
| 259 |
}; |
| 260 |
|
| 261 |
&clkc_audio { |
| 262 |
status = "okay"; |
| 263 |
}; |
| 264 |
|
| 265 |
&cpu0 { |
| 266 |
cpu-supply = <&vddcpu>; |
| 267 |
}; |
| 268 |
|
| 269 |
&cpu1 { |
| 270 |
cpu-supply = <&vddcpu>; |
| 271 |
}; |
| 272 |
|
| 273 |
&cpu2 { |
| 274 |
cpu-supply = <&vddcpu>; |
| 275 |
}; |
| 276 |
|
| 277 |
&cpu3 { |
| 278 |
cpu-supply = <&vddcpu>; |
| 279 |
}; |
| 280 |
|
| 281 |
ðmac { |
| 282 |
status = "okay"; |
| 283 |
phy-handle = <&internal_ephy>; |
| 284 |
phy-mode = "rmii"; |
| 285 |
}; |
| 286 |
|
| 287 |
&frddr_a { |
| 288 |
status = "okay"; |
| 289 |
}; |
| 290 |
|
| 291 |
&frddr_b { |
| 292 |
status = "okay"; |
| 293 |
}; |
| 294 |
|
| 295 |
&frddr_c { |
| 296 |
status = "okay"; |
| 297 |
}; |
| 298 |
|
| 299 |
&spdifout_a { |
| 300 |
pinctrl-0 = <&spdif_out_h_pins>; |
| 301 |
pinctrl-names = "default"; |
| 302 |
status = "okay"; |
| 303 |
}; |
| 304 |
|
| 305 |
&spdifout_b { |
| 306 |
status = "okay"; |
| 307 |
}; |
| 308 |
|
| 309 |
&hdmi_tx { |
| 310 |
status = "okay"; |
| 311 |
pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; |
| 312 |
pinctrl-names = "default"; |
| 313 |
}; |
| 314 |
|
| 315 |
&hdmi_tx_tmds_port { |
| 316 |
hdmi_tx_tmds_out: endpoint { |
| 317 |
remote-endpoint = <&hdmi_connector_in>; |
| 318 |
}; |
| 319 |
}; |
| 320 |
|
| 321 |
&i2c3 { |
| 322 |
status = "okay"; |
| 323 |
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; |
| 324 |
pinctrl-names = "default"; |
| 325 |
}; |
| 326 |
|
| 327 |
&ir { |
| 328 |
status = "okay"; |
| 329 |
pinctrl-0 = <&remote_input_ao_pins>; |
| 330 |
pinctrl-names = "default"; |
| 331 |
}; |
| 332 |
|
| 333 |
&pwm_AO_cd { |
| 334 |
pinctrl-0 = <&pwm_ao_d_e_pins>; |
| 335 |
pinctrl-names = "default"; |
| 336 |
status = "okay"; |
| 337 |
}; |
| 338 |
|
| 339 |
&pwm_ef { |
| 340 |
status = "okay"; |
| 341 |
pinctrl-0 = <&pwm_e_pins>; |
| 342 |
pinctrl-names = "default"; |
| 343 |
}; |
| 344 |
|
| 345 |
&pdm { |
| 346 |
pinctrl-0 = <&pdm_din0_z_pins>, <&pdm_din1_z_pins>, |
| 347 |
<&pdm_din2_z_pins>, <&pdm_din3_z_pins>, |
| 348 |
<&pdm_dclk_z_pins>; |
| 349 |
pinctrl-names = "default"; |
| 350 |
status = "okay"; |
| 351 |
}; |
| 352 |
|
| 353 |
&saradc { |
| 354 |
status = "okay"; |
| 355 |
vref-supply = <&vddio_ao1v8>; |
| 356 |
}; |
| 357 |
|
| 358 |
/* SDIO */ |
| 359 |
&sd_emmc_a { |
| 360 |
status = "okay"; |
| 361 |
pinctrl-0 = <&sdio_pins>; |
| 362 |
pinctrl-1 = <&sdio_clk_gate_pins>; |
| 363 |
pinctrl-names = "default", "clk-gate"; |
| 364 |
#address-cells = <1>; |
| 365 |
#size-cells = <0>; |
| 366 |
|
| 367 |
bus-width = <4>; |
| 368 |
cap-sd-highspeed; |
| 369 |
sd-uhs-sdr50; |
| 370 |
max-frequency = <100000000>; |
| 371 |
|
| 372 |
non-removable; |
| 373 |
disable-wp; |
| 374 |
|
| 375 |
/* WiFi firmware requires power to be kept while in suspend */ |
| 376 |
keep-power-in-suspend; |
| 377 |
|
| 378 |
mmc-pwrseq = <&sdio_pwrseq>; |
| 379 |
|
| 380 |
vmmc-supply = <&vddao_3v3>; |
| 381 |
vqmmc-supply = <&vddio_ao1v8>; |
| 382 |
}; |
| 383 |
|
| 384 |
/* SD card */ |
| 385 |
&sd_emmc_b { |
| 386 |
status = "okay"; |
| 387 |
pinctrl-0 = <&sdcard_c_pins>; |
| 388 |
pinctrl-1 = <&sdcard_clk_gate_c_pins>; |
| 389 |
pinctrl-names = "default", "clk-gate"; |
| 390 |
|
| 391 |
bus-width = <4>; |
| 392 |
cap-sd-highspeed; |
| 393 |
max-frequency = <50000000>; |
| 394 |
disable-wp; |
| 395 |
|
| 396 |
cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; |
| 397 |
vmmc-supply = <&vddao_3v3>; |
| 398 |
vqmmc-supply = <&vddao_3v3>; |
| 399 |
}; |
| 400 |
|
| 401 |
/* eMMC */ |
| 402 |
&sd_emmc_c { |
| 403 |
status = "okay"; |
| 404 |
pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; |
| 405 |
pinctrl-1 = <&emmc_clk_gate_pins>; |
| 406 |
pinctrl-names = "default", "clk-gate"; |
| 407 |
|
| 408 |
bus-width = <8>; |
| 409 |
cap-mmc-highspeed; |
| 410 |
mmc-ddr-1_8v; |
| 411 |
mmc-hs200-1_8v; |
| 412 |
max-frequency = <200000000>; |
| 413 |
non-removable; |
| 414 |
disable-wp; |
| 415 |
|
| 416 |
mmc-pwrseq = <&emmc_pwrseq>; |
| 417 |
vmmc-supply = <&vddao_3v3>; |
| 418 |
vqmmc-supply = <&emmc_1v8>; |
| 419 |
}; |
| 420 |
|
| 421 |
&tdmif_b { |
| 422 |
status = "okay"; |
| 423 |
}; |
| 424 |
|
| 425 |
&tdmout_b { |
| 426 |
status = "okay"; |
| 427 |
}; |
| 428 |
|
| 429 |
&tohdmitx { |
| 430 |
status = "okay"; |
| 431 |
}; |
| 432 |
|
| 433 |
&uart_A { |
| 434 |
status = "okay"; |
| 435 |
pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; |
| 436 |
pinctrl-names = "default"; |
| 437 |
uart-has-rtscts; |
| 438 |
}; |
| 439 |
|
| 440 |
&uart_AO { |
| 441 |
status = "okay"; |
| 442 |
pinctrl-0 = <&uart_ao_a_pins>; |
| 443 |
pinctrl-names = "default"; |
| 444 |
}; |
| 445 |
|
| 446 |
&usb { |
| 447 |
status = "okay"; |
| 448 |
dr_mode = "host"; |
| 449 |
}; |