New boards: Pine64 PineNote ereader tablet and Bananapi-R2-Pro (both rk356x)

New peripherals for the rk356x-family (pdm-audio, gpu, another i2s, usb2)
 
 A lot of additions to Quartz-A (connector-header, gpu, sdmmc1, io-domains,
 usb2) and rk3568-evb1-v10 (rk809-audio, cpu-regulator, gpu, tsadc, led,
 usb2, touchscreen).
 
 Fixes for the pwm-regulators, that used wrong names for their supplies
 as well adapting the cros-ec pwm nodes to a changed binding (going via
 the pwm tree).
 
 And as sort of misc-changes, defined the logic-regulator on rk3399-puma
 as well as enabled the mali-gpu on the rk3399-firefly.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmIX+P8QHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgfZLB/9DUe9pJWRo7zg3GENlp9d3slQBJkBWHF4h
 SiYheGDbQyfWmPeH4PcvwfwsVmTdNewRTgmhEbNKyl64XEIEbIVi7GXEmfCaNipQ
 zEfTN/m1hMl1kn9gey+0yJT9K3oAkA4UqBUbGmgP/UuYcztZvnhjnt9Np60gwBhf
 l7de3OBFcxQUatq2Tfn+HbqiGA5aur/IfJzcrzK9kFXLi6Ox2nMZGN1U2CTmJEcT
 ZLFQH1tKQ0doacaAUtRSSx3IbTVSoOjr2imSzsfPKCM691OwwGC4XeJLVTn3QmVF
 4WhDQsH+ufluG/dFHPA7Nqa1IVp9IX/QhOW1ZAgmODNVR37EkXGp
 =cIwM
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmIY8fUACgkQmmx57+YA
 GNnjPw/+LYwi3YXP4izmG0u6y/Jfmy1J6T37FCZJEo8C9I92USUU+S6z9pEG5yrn
 LhmXogJj3zB6dGUcq7nFUXIUA5YMVGxofnFRbyxbGPUmRnQSfpOB2/g4aSEYf2U8
 0OwD/4ajxVOP2mSimQ7gXnwpzfeUvNrml81VJ76OHZnVtEqt81l/vIyWpd3Dro00
 EQN+THTAV4G2M6XhshILt5QTLdsWHwPoCaZAg0PwmIJDU/3NeBH92rXIQiWkE33R
 zmPJyOZ2ih3D2ceyVVdNp9uIvLcXeIpsXqIQv2dN0D5iXjviyBqfX787S4PFLlLO
 ibsYyB+JUkciwzHyRrKHRYlOXuZmhYDYcL1M+6STSMtmZfS3Kno6V9kOdPYWpTZ8
 SluJYqdkED0NMggegunGj67qbe902hX9vuL3vISaZUll3Au48YGSEoEcpghf8kuE
 E2Uo4pnEkhN/1sSeZFyINUstKtqpa/XMAS2sK/CJQ09HjQfqvFnifjUxhjqYoAM6
 ylhjDymjH11h3jWDmiJUpYfPxa4u/j598UI4ajvKgwPhd0ZxLug43d9IQBpFxux6
 qXCWQrgUe39L5o8hfgQSXb58g72uGBXMRd8m7F3G52teGkFz+xentxHbJEZlX8oZ
 UQJXCDHhkFpGkD3TNOc4YbQW/ydDZo+OCzWopP3iU6oG2X3FPQY=
 =yqpJ
 -----END PGP SIGNATURE-----

Merge tag 'v5.18-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt

New boards: Pine64 PineNote ereader tablet and Bananapi-R2-Pro (both rk356x)

New peripherals for the rk356x-family (pdm-audio, gpu, another i2s, usb2)

A lot of additions to Quartz-A (connector-header, gpu, sdmmc1, io-domains,
usb2) and rk3568-evb1-v10 (rk809-audio, cpu-regulator, gpu, tsadc, led,
usb2, touchscreen).

Fixes for the pwm-regulators, that used wrong names for their supplies
as well adapting the cros-ec pwm nodes to a changed binding (going via
the pwm tree).

And as sort of misc-changes, defined the logic-regulator on rk3399-puma
as well as enabled the mali-gpu on the rk3399-firefly.

* tag 'v5.18-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (28 commits)
  arm64: dts: rockchip: align Google CROS EC PWM node name with dtschema
  arm64: dts: rockchip: enable rk809 audio codec on the rk3568 evb1-v10
  arm64: dts: rockchip: set vdd_gpu regulator on rk3568-evb1-v10 to always on
  arm64: dts: rockchip: add the vdd_cpu regulator to rk3568-evb1-v10
  arm64: dts: rockchip: enable work led on rk3568-evb1-v10
  arm64: dts: rockchip: fix supplies for pwm regulators
  arm64: dts: rockchip: define vdd_log on rk3399-puma
  arm64: dts: rockchip: Add Pine64 PineNote board
  arm64: dts: rockchip: Add pdm node to rk356x
  dt-bindings: arm: rockchip: Add Pine64 PineNote board
  arm64: dts: rockchip: enable the tsadc on rk3568-evb1-v10
  arm64: dts: rockchip: enable the gpu on rk3568-evb1-v10
  arm64: dts: rockchip: enable the gpu on quartz64-a
  arm64: dts: rockchip: add cooling map and trip points for gpu to rk356x
  arm64: dts: rockchip: add gpu node to rk356x
  arm64: dts: rockchip: add usb2 support to rk3568-evb1-v10
  arm64: dts: rockchip: rename and sort the rk356x usb2 phy handles
  arm64: dts: rockchip: add the i2s3_2ch node to rk356x
  arm64: dts: rockchip: Add Bananapi R2 Pro
  dt-bindings: rockchip: Add BananaPi R2 Pro Board
  ...

Link: https://lore.kernel.org/r/6456947.djgVdjDsCv@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2022-02-25 16:12:52 +01:00
commit 84d08b2e54
19 changed files with 1721 additions and 12 deletions

View File

@ -481,6 +481,14 @@ properties:
- const: pine64,pinebook-pro
- const: rockchip,rk3399
- description: Pine64 PineNote
items:
- enum:
- pine64,pinenote-v1.1
- pine64,pinenote-v1.2
- const: pine64,pinenote
- const: rockchip,rk3566
- description: Pine64 Rock64
items:
- const: pine64,rock64
@ -651,6 +659,11 @@ properties:
- const: rockchip,rk3568-evb1-v10
- const: rockchip,rk3568
- description: Rockchip RK3568 Banana Pi R2 Pro
items:
- const: rockchip,rk3568-bpi-r2pro
- const: rockchip,rk3568
additionalProperties: true
...

View File

@ -56,5 +56,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399pro-rock-pi-n10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb

View File

@ -245,12 +245,12 @@ vcc_sys: vcc-sys {
vdd_log: vdd-log {
compatible = "pwm-regulator";
pwms = <&pwm2 0 25000 1>;
pwm-supply = <&vcc_sys>;
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <430000>;
regulator-max-microvolt = <1400000>;
vin-supply = <&vcc_sys>;
};
};
@ -298,6 +298,11 @@ &gmac {
status = "okay";
};
&gpu {
mali-supply = <&vdd_gpu>;
status = "okay";
};
&hdmi {
ddc-i2c-bus = <&i2c3>;
pinctrl-names = "default";

View File

@ -462,7 +462,7 @@ ap_i2c_tp: &i2c5 {
};
&cros_ec {
cros_ec_pwm: ec-pwm {
cros_ec_pwm: pwm {
compatible = "google,cros-ec-pwm";
#pwm-cells = <1>;
};

View File

@ -80,12 +80,12 @@ vcc5v0_host: vcc5v0-host-regulator {
vdd_log: vdd-log {
compatible = "pwm-regulator";
pwms = <&pwm2 0 25000 1>;
pwm-supply = <&vsys_3v3>;
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;
vin-supply = <&vsys_3v3>;
};
vsys: vsys {

View File

@ -102,12 +102,12 @@ vcc5v0_sys: vcc5v0-sys {
vdd_log: vdd-log {
compatible = "pwm-regulator";
pwms = <&pwm2 0 25000 1>;
pwm-supply = <&vcc5v0_sys>;
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;
vin-supply = <&vcc5v0_sys>;
};
};

View File

@ -166,12 +166,12 @@ vcc_sys: vcc-sys {
vdd_log: vdd-log {
compatible = "pwm-regulator";
pwms = <&pwm2 0 25000 1>;
pwm-supply = <&vcc_sys>;
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;
vin-supply = <&vcc_sys>;
};
};

View File

@ -243,12 +243,12 @@ regulator-state-mem {
vdd_log: vdd-log {
compatible = "pwm-regulator";
pwms = <&pwm2 0 25000 1>;
pwm-supply = <&vcc_sysin>;
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;
vin-supply = <&vcc_sysin>;
regulator-state-mem {
regulator-on-in-suspend;

View File

@ -71,6 +71,17 @@ vcc5v0_sys: vcc5v0-sys {
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};
vdd_log: vdd-log {
compatible = "pwm-regulator";
pwms = <&pwm2 0 25000 1>;
pwm-supply = <&vcc5v0_sys>;
regulator-name = "vdd_log";
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;
regulator-always-on;
regulator-boot-on;
};
};
&cpu_b0 {

View File

@ -144,12 +144,12 @@ vcc_lan: vcc3v3-phy-regulator {
vdd_log: vdd-log {
compatible = "pwm-regulator";
pwms = <&pwm2 0 25000 1>;
pwm-supply = <&vcc5v0_sys>;
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;
vin-supply = <&vcc5v0_sys>;
};
};

View File

@ -213,12 +213,12 @@ vcc5v0_usb: vcc5v0-usb {
vdd_log: vdd-log {
compatible = "pwm-regulator";
pwms = <&pwm2 0 25000 1>;
pwm-supply = <&vcc5v0_sys>;
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1700000>;
vin-supply = <&vcc5v0_sys>;
};
};

View File

@ -133,12 +133,12 @@ vcc_sys: vcc-sys {
vdd_log: vdd-log {
compatible = "pwm-regulator";
pwms = <&pwm2 0 25000 1>;
pwm-supply = <&vcc_sys>;
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;
vin-supply = <&vcc_sys>;
};
};

View File

@ -0,0 +1,18 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/dts-v1/;
#include "rk3566-pinenote.dtsi"
/ {
model = "Pine64 PineNote v1.1";
compatible = "pine64,pinenote-v1.1", "pine64,pinenote", "rockchip,rk3566";
};
&pmu_io_domains {
vccio7-supply = <&vcc_1v8>;
};
&spk_amp {
VCC-supply = <&dcdc_boost>;
};

View File

@ -0,0 +1,18 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/dts-v1/;
#include "rk3566-pinenote.dtsi"
/ {
model = "Pine64 PineNote v1.2";
compatible = "pine64,pinenote-v1.2", "pine64,pinenote", "rockchip,rk3566";
};
&pmu_io_domains {
vccio7-supply = <&vcc_3v3>;
};
&spk_amp {
VCC-supply = <&vcc_bat>;
};

View File

@ -0,0 +1,639 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3566.dtsi"
/ {
aliases {
mmc0 = &sdhci;
};
chosen {
stdout-path = "serial2:1500000n8";
};
adc-keys {
compatible = "adc-keys";
io-channels = <&saradc 0>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <1750000>;
recovery {
label = "recovery";
linux,code = <KEY_VENDOR>;
press-threshold-microvolt = <0>;
};
};
spk_amp: audio-amplifier {
compatible = "simple-audio-amplifier";
enable-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&spk_amp_enable_h>;
pinctrl-names = "default";
sound-name-prefix = "Speaker Amp";
};
dmic_codec: dmic-codec {
compatible = "dmic-codec";
num-channels = <6>;
#sound-dai-cells = <0>;
};
gpio-keys {
compatible = "gpio-keys";
pinctrl-0 = <&hall_int_l>;
pinctrl-names = "default";
cover {
label = "cover";
gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_LOW>;
linux,input-type = <EV_SW>;
linux,code = <SW_MACHINE_COVER>;
linux,can-disable;
wakeup-event-action = <EV_ACT_DEASSERTED>;
wakeup-source;
};
};
gpio-leds {
compatible = "gpio-leds";
pinctrl-0 = <&led_pin>;
pinctrl-names = "default";
led-0 {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_CHARGING;
gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
};
};
sdio_pwrseq: sdio-pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&rk817 1>;
clock-names = "ext_clock";
pinctrl-0 = <&wifi_enable_h>;
pinctrl-names = "default";
reset-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>;
};
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "PineNote";
simple-audio-card,aux-devs = <&spk_amp>;
simple-audio-card,widgets = "Headphone", "Headphones",
"Speaker", "Internal Speakers";
simple-audio-card,routing = "Headphones", "HPOL",
"Headphones", "HPOR",
"Internal Speakers", "Speaker Amp OUTL",
"Internal Speakers", "Speaker Amp OUTR",
"Speaker Amp INL", "HPOL",
"Speaker Amp INR", "HPOR";
simple-audio-card,pin-switches = "Internal Speakers";
#address-cells = <1>;
#size-cells = <0>;
simple-audio-card,dai-link@0 {
reg = <0>;
bitclock-master = <&link0_cpu>;
format = "i2s";
frame-master = <&link0_cpu>;
mclk-fs = <256>;
link0_cpu: cpu {
sound-dai = <&i2s1_8ch>;
};
link0_codec: codec {
sound-dai = <&rk817>;
};
};
simple-audio-card,dai-link@1 {
reg = <1>;
bitclock-master = <&link1_cpu>;
format = "pdm";
frame-master = <&link1_cpu>;
link1_cpu: cpu {
sound-dai = <&pdm>;
};
link1_codec: codec {
sound-dai = <&dmic_codec>;
};
};
};
vbat_4g: vbat-4g {
compatible = "regulator-fixed";
regulator-name = "vbat_4g";
regulator-min-microvolt = <3800000>;
regulator-max-microvolt = <3800000>;
/* powered by vcc_bat, enabled by vbat_4g_en */
vin-supply = <&vbat_4g_en>;
};
vcc_1v8: vcc-1v8 {
compatible = "regulator-fixed";
regulator-name = "vcc_1v8";
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
/* powered by vcc_sys, enabled by vcc_1v8_en */
vin-supply = <&vcc_1v8_en>;
};
vcc_bat: vcc-bat {
compatible = "regulator-fixed";
regulator-name = "vcc_bat";
regulator-always-on;
regulator-min-microvolt = <3800000>;
regulator-max-microvolt = <3800000>;
};
vcc_hall_3v3: vcc-hall-3v3 {
compatible = "regulator-fixed";
regulator-name = "vcc_hall_3v3";
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc_sys>;
};
vcc_sys: vcc-sys {
compatible = "regulator-fixed";
regulator-name = "vcc_sys";
regulator-always-on;
regulator-min-microvolt = <3800000>;
regulator-max-microvolt = <3800000>;
vin-supply = <&vcc_bat>;
};
vcc_wl: vcc-wl {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&vcc_wl_pin>;
pinctrl-names = "default";
regulator-name = "vcc_wl";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc_bat>;
};
vdda_0v9: vdda-0v9 {
compatible = "regulator-fixed";
regulator-name = "vdda_0v9";
regulator-always-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
/* powered by vcc_sys, enabled by vcc_1v8_en */
vin-supply = <&vcc_1v8_en>;
};
};
&cpu0 {
cpu-supply = <&vdd_cpu>;
};
&cpu1 {
cpu-supply = <&vdd_cpu>;
};
&cpu2 {
cpu-supply = <&vdd_cpu>;
};
&cpu3 {
cpu-supply = <&vdd_cpu>;
};
&i2c0 {
status = "okay";
vdd_cpu: regulator@1c {
compatible = "tcs,tcs4525";
reg = <0x1c>;
fcs,suspend-voltage-selector = <0>;
regulator-name = "vdd_cpu";
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1390000>;
regulator-ramp-delay = <2300>;
regulator-always-on;
vin-supply = <&vcc_sys>;
regulator-state-mem {
regulator-on-in-suspend;
};
};
rk817: pmic@20 {
compatible = "rockchip,rk817";
reg = <0x20>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
clocks = <&cru I2S1_MCLKOUT_TX>;
clock-names = "mclk";
#clock-cells = <1>;
pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>, <&pmic_sleep>;
pinctrl-names = "default";
rockchip,system-power-controller;
#sound-dai-cells = <0>;
wakeup-source;
vcc1-supply = <&vcc_sys>;
vcc2-supply = <&vcc_sys>;
vcc3-supply = <&vcc_sys>;
vcc4-supply = <&vcc_sys>;
vcc5-supply = <&vcc_sys>;
vcc6-supply = <&vcc_sys>;
vcc7-supply = <&vcc_sys>;
vcc8-supply = <&vcc_sys>;
vcc9-supply = <&dcdc_boost>;
regulators {
vdd_logic: DCDC_REG1 {
regulator-name = "vdd_logic";
regulator-always-on;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-init-microvolt = <900000>;
regulator-ramp-delay = <6001>;
regulator-initial-mode = <0x2>;
regulator-state-mem {
regulator-off-in-suspend;
regulator-suspend-microvolt = <900000>;
};
};
vdd_gpu_npu: DCDC_REG2 {
regulator-name = "vdd_gpu_npu";
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-init-microvolt = <900000>;
regulator-ramp-delay = <6001>;
regulator-initial-mode = <0x2>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_ddr: DCDC_REG3 {
regulator-name = "vcc_ddr";
regulator-always-on;
regulator-initial-mode = <0x2>;
regulator-state-mem {
regulator-on-in-suspend;
};
};
vcc_3v3: DCDC_REG4 {
regulator-name = "vcc_3v3";
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-initial-mode = <0x2>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcca_1v8_pmu: LDO_REG1 {
regulator-name = "vcca_1v8_pmu";
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-on-in-suspend;
};
};
/* unused */
vdda_0v9_ldo: LDO_REG2 {
regulator-name = "vdda_0v9_ldo";
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdda_0v9_pmu: LDO_REG3 {
regulator-name = "vdda_0v9_pmu";
regulator-always-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-state-mem {
regulator-on-in-suspend;
};
};
vccio_acodec: LDO_REG4 {
regulator-name = "vccio_acodec";
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
/* unused */
vccio_sd: LDO_REG5 {
regulator-name = "vccio_sd";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_3v3_pmu: LDO_REG6 {
regulator-name = "vcc_3v3_pmu";
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-on-in-suspend;
};
};
vcc_1v8_en: LDO_REG7 {
regulator-name = "vcc_1v8_en";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vbat_4g_en: LDO_REG8 {
regulator-name = "vbat_4g_en";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
sleep_sta_ctl: LDO_REG9 {
regulator-name = "sleep_sta_ctl";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-on-in-suspend;
};
};
dcdc_boost: BOOST {
regulator-name = "boost";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
otg_switch: OTG_SWITCH {
regulator-name = "otg_switch";
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
};
};
&i2c1 {
status = "okay";
digitizer@9 {
compatible = "wacom,w9013", "hid-over-i2c";
reg = <0x09>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PB6 IRQ_TYPE_LEVEL_LOW>;
hid-descr-addr = <0x1>;
pinctrl-0 = <&pen_fwe>, <&pen_irq_l>, <&pen_rst_l>;
pinctrl-names = "default";
vdd-supply = <&vcc_3v3_pmu>;
};
};
&i2c3 {
pinctrl-0 = <&i2c3m1_xfer>;
status = "okay";
led-controller@36 {
compatible = "ti,lm3630a";
reg = <0x36>;
enable-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&backlight_hwen_h>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
label = "backlight_cool";
default-brightness = <0>;
};
led@1 {
reg = <1>;
label = "backlight_warm";
default-brightness = <0>;
};
};
};
&i2s1_8ch {
pinctrl-0 = <&i2s1m0_lrcktx>, <&i2s1m0_sclktx>, <&i2s1m0_sdi0>, <&i2s1m0_sdo0>;
rockchip,trcm-sync-tx-only;
status = "okay";
};
&pdm {
pinctrl-0 = <&pdmm0_clk1>, <&pdmm0_sdi1>, <&pdmm0_sdi2>;
/* microphones are on channels 1 and 2 */
rockchip,path-map = <1>, <2>, <0>, <3>;
status = "okay";
};
&pinctrl {
audio-amplifier {
spk_amp_enable_h: spk-amp-enable-h {
rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
backlight {
backlight_hwen_h: backlight-hwen-h {
rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
bt {
bt_enable_h: bt-enable-h {
rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
};
bt_host_wake_l: bt-host-wake-l {
rockchip,pins = <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
};
bt_wake_h: bt-wake-h {
rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
led {
led_pin: led-pin {
rockchip,pins = <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
hall {
hall_int_l: hall-int-l {
rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
pen {
pen_fwe: pen-fwe {
rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_down>;
};
pen_irq_l: pen-irq-l {
rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
};
pen_rst_l: pen-rst-l {
rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
pmic {
pmic_int_l: pmic-int-l {
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
};
pmic_sleep: pmic-sleep {
rockchip,pins = <0 RK_PA2 1 &pcfg_pull_none>;
};
};
sdio-pwrseq {
wifi_enable_h: wifi-enable-h {
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
vcc-wl {
vcc_wl_pin: vcc-wl-pin {
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
wifi {
wifi_host_wake_l: wifi-host-wake-l {
rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};
&pmu_io_domains {
pmuio1-supply = <&vcc_3v3_pmu>;
pmuio2-supply = <&vcc_3v3_pmu>;
vccio1-supply = <&vccio_acodec>;
vccio2-supply = <&vcc_1v8>;
vccio3-supply = <&vcc_3v3>;
vccio4-supply = <&vcca_1v8_pmu>;
vccio5-supply = <&vcc_3v3>;
vccio6-supply = <&vcc_3v3>;
status = "okay";
};
&saradc {
vref-supply = <&vcc_1v8>;
status = "okay";
};
&sdhci {
bus-width = <8>;
mmc-hs200-1_8v;
non-removable;
pinctrl-0 = <&emmc_bus8>, <&emmc_clk>, <&emmc_cmd>, <&emmc_datastrobe>, <&emmc_rstnout>;
pinctrl-names = "default";
vmmc-supply = <&vcc_3v3>;
vqmmc-supply = <&vcc_1v8>;
status = "okay";
};
&sdmmc1 {
bus-width = <4>;
cap-sd-highspeed;
cap-sdio-irq;
keep-power-in-suspend;
mmc-pwrseq = <&sdio_pwrseq>;
non-removable;
pinctrl-0 = <&sdmmc1_bus4>, <&sdmmc1_clk>, <&sdmmc1_cmd>;
pinctrl-names = "default";
sd-uhs-sdr104;
vmmc-supply = <&vcc_wl>;
vqmmc-supply = <&vcca_1v8_pmu>;
status = "okay";
};
&tsadc {
/* tshut mode 0:CRU 1:GPIO */
rockchip,hw-tshut-mode = <1>;
/* tshut polarity 0:LOW 1:HIGH */
rockchip,hw-tshut-polarity = <0>;
status = "okay";
};
&uart1 {
pinctrl-0 = <&uart1m0_ctsn>, <&uart1m0_rtsn>, <&uart1m0_xfer>;
pinctrl-names = "default";
uart-has-rtscts;
status = "okay";
bluetooth {
compatible = "brcm,bcm43438-bt";
clocks = <&rk817 1>;
clock-names = "lpo";
device-wake-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
host-wake-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
pinctrl-names = "default";
vbat-supply = <&vcc_wl>;
vddio-supply = <&vcca_1v8_pmu>;
};
};
&uart2 {
status = "okay";
};

View File

@ -73,6 +73,17 @@ simple-audio-card,codec {
};
};
sdio_pwrseq: sdio-pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&rk817 1>;
clock-names = "ext_clock";
pinctrl-names = "default";
pinctrl-0 = <&wifi_enable_h>;
post-power-on-delay-ms = <100>;
power-off-delay-us = <5000000>;
reset-gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_LOW>;
};
spdif_dit: spdif-dit {
compatible = "linux,spdif-dit";
#sound-dai-cells = <0>;
@ -124,6 +135,22 @@ vcc5v0_usb: vcc5v0_usb {
vin-supply = <&vcc12v_dcin>;
};
/* all four ports are controlled by one gpio
* the host ports are sourced from vcc5v0_usb
* the otg port is sourced from vcc5v0_midu
*/
vcc5v0_usb20_host: vcc5v0_usb20_host {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_usb20_host_en>;
regulator-name = "vcc5v0_usb20_host";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_usb>;
};
vcc3v3_sd: vcc3v3_sd {
compatible = "regulator-fixed";
enable-active-low;
@ -147,6 +174,17 @@ vcc_sys: vcc_sys {
regulator-max-microvolt = <4400000>;
vin-supply = <&vbus>;
};
/* sourced from vcc_sys, sdio module operates internally at 3.3v */
vcc_wl: vcc_wl {
compatible = "regulator-fixed";
regulator-name = "vcc_wl";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc_sys>;
};
};
&cpu0 {
@ -205,6 +243,11 @@ &gmac1m0_clkinout
status = "okay";
};
&gpu {
mali-supply = <&vdd_gpu>;
status = "okay";
};
&i2c0 {
status = "okay";
@ -429,6 +472,14 @@ regulator-state-mem {
};
};
/* i2c3 is exposed on con40
* pin 3 - i2c3_sda_m0, pullup to vcc_3v3
* pin 5 - i2c3_scl_m0, pullup to vcc_3v3
*/
&i2c3 {
status = "okay";
};
&i2s1_8ch {
pinctrl-names = "default";
pinctrl-0 = <&i2s1m0_sclktx
@ -477,6 +528,18 @@ pmic_int_l: pmic-int-l {
};
};
usb2 {
vcc5v0_usb20_host_en: vcc5v0-usb20-host-en {
rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
sdio-pwrseq {
wifi_enable_h: wifi-enable-h {
rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
vcc_sd {
vcc_sd_h: vcc-sd-h {
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
@ -484,6 +547,19 @@ vcc_sd_h: vcc-sd-h {
};
};
&pmu_io_domains {
pmuio1-supply = <&vcc3v3_pmu>;
pmuio2-supply = <&vcc3v3_pmu>;
vccio1-supply = <&vccio_acodec>;
vccio2-supply = <&vcc_1v8>;
vccio3-supply = <&vccio_sd>;
vccio4-supply = <&vcc_1v8>;
vccio5-supply = <&vcc_3v3>;
vccio6-supply = <&vcc1v8_dvp>;
vccio7-supply = <&vcc_3v3>;
status = "okay";
};
&sdhci {
bus-width = <8>;
mmc-hs200-1_8v;
@ -505,10 +581,32 @@ &sdmmc0 {
status = "okay";
};
&sdmmc1 {
bus-width = <4>;
cap-sd-highspeed;
cap-sdio-irq;
keep-power-in-suspend;
mmc-pwrseq = <&sdio_pwrseq>;
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
sd-uhs-sdr104;
vmmc-supply = <&vcc_wl>;
vqmmc-supply = <&vcc_1v8>;
status = "okay";
};
/* spdif is exposed on con40 pin 18 */
&spdif {
status = "okay";
};
/* spi1 is exposed on con40
* pin 11 - spi1_mosi_m1
* pin 13 - spi1_miso_m1
* pin 15 - spi1_clk_m1
* pin 17 - spi1_cs0_m1
*/
&spi1 {
pinctrl-names = "default";
pinctrl-0 = <&spi1m1_cs0 &spi1m1_pins>;
@ -522,6 +620,10 @@ &tsadc {
status = "okay";
};
/* uart0 is exposed on con40
* pin 12 - uart0_tx
* pin 14 - uart0_rx
*/
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_xfer>;
@ -548,6 +650,40 @@ bluetooth {
};
};
/* uart2 is exposed on con40
* pin 8 - uart2_tx_m0_debug
* pin 10 - uart2_rx_m0_debug
*/
&uart2 {
status = "okay";
};
&usb_host0_ehci {
status = "okay";
};
&usb_host0_ohci {
status = "okay";
};
&usb_host1_ehci {
status = "okay";
};
&usb_host1_ohci {
status = "okay";
};
&usb2phy1 {
status = "okay";
};
&usb2phy1_host {
phy-supply = <&vcc5v0_usb20_host>;
status = "okay";
};
&usb2phy1_otg {
phy-supply = <&vcc5v0_usb20_host>;
status = "okay";
};

View File

@ -0,0 +1,457 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Author: Frank Wunderlich <frank-w@public-files.de>
*
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3568.dtsi"
/ {
model = "Bananapi-R2 Pro (RK3568) DDR4 Board";
compatible = "rockchip,rk3568-bpi-r2pro", "rockchip,rk3568";
aliases {
ethernet0 = &gmac0;
mmc0 = &sdmmc0;
mmc1 = &sdhci;
};
chosen: chosen {
stdout-path = "serial2:1500000n8";
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&blue_led_pin &green_led_pin>;
blue_led: led-0 {
color = <LED_COLOR_ID_BLUE>;
default-state = "off";
function = LED_FUNCTION_STATUS;
gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>;
};
green_led: led-1 {
color = <LED_COLOR_ID_GREEN>;
default-state = "on";
function = LED_FUNCTION_POWER;
gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
};
};
dc_12v: dc-12v {
compatible = "regulator-fixed";
regulator-name = "dc_12v";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};
vcc3v3_sys: vcc3v3-sys {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&dc_12v>;
};
vcc5v0_sys: vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&dc_12v>;
};
};
&gmac0 {
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
clock_in_out = "input";
phy-handle = <&rgmii_phy0>;
phy-mode = "rgmii";
pinctrl-names = "default";
pinctrl-0 = <&gmac0_miim
&gmac0_tx_bus2
&gmac0_rx_bus2
&gmac0_rgmii_clk
&gmac0_rgmii_bus>;
snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
/* Reset time is 20ms, 100ms for rtl8211f */
snps,reset-delays-us = <0 20000 100000>;
tx_delay = <0x3c>;
rx_delay = <0x2f>;
status = "okay";
};
&i2c0 {
status = "okay";
rk809: pmic@20 {
compatible = "rockchip,rk809";
reg = <0x20>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
#clock-cells = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pmic_int>;
rockchip,system-power-controller;
vcc1-supply = <&vcc3v3_sys>;
vcc2-supply = <&vcc3v3_sys>;
vcc3-supply = <&vcc3v3_sys>;
vcc4-supply = <&vcc3v3_sys>;
vcc5-supply = <&vcc3v3_sys>;
vcc6-supply = <&vcc3v3_sys>;
vcc7-supply = <&vcc3v3_sys>;
vcc8-supply = <&vcc3v3_sys>;
vcc9-supply = <&vcc3v3_sys>;
wakeup-source;
regulators {
vdd_logic: DCDC_REG1 {
regulator-name = "vdd_logic";
regulator-always-on;
regulator-boot-on;
regulator-init-microvolt = <900000>;
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdd_gpu: DCDC_REG2 {
regulator-name = "vdd_gpu";
regulator-init-microvolt = <900000>;
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_ddr: DCDC_REG3 {
regulator-name = "vcc_ddr";
regulator-always-on;
regulator-boot-on;
regulator-initial-mode = <0x2>;
regulator-state-mem {
regulator-on-in-suspend;
};
};
vdd_npu: DCDC_REG4 {
regulator-name = "vdd_npu";
regulator-init-microvolt = <900000>;
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
regulator-ramp-delay = <6001>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_1v8: DCDC_REG5 {
regulator-name = "vcc_1v8";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdda0v9_image: LDO_REG1 {
regulator-name = "vdda0v9_image";
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdda_0v9: LDO_REG2 {
regulator-name = "vdda_0v9";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vdda0v9_pmu: LDO_REG3 {
regulator-name = "vdda0v9_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <900000>;
};
};
vccio_acodec: LDO_REG4 {
regulator-name = "vccio_acodec";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vccio_sd: LDO_REG5 {
regulator-name = "vccio_sd";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc3v3_pmu: LDO_REG6 {
regulator-name = "vcc3v3_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <3300000>;
};
};
vcca_1v8: LDO_REG7 {
regulator-name = "vcca_1v8";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcca1v8_pmu: LDO_REG8 {
regulator-name = "vcca1v8_pmu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-on-in-suspend;
regulator-suspend-microvolt = <1800000>;
};
};
vcca1v8_image: LDO_REG9 {
regulator-name = "vcca1v8_image";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc_3v3: SWITCH_REG1 {
regulator-name = "vcc_3v3";
regulator-always-on;
regulator-boot-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
vcc3v3_sd: SWITCH_REG2 {
regulator-name = "vcc3v3_sd";
regulator-always-on;
regulator-state-mem {
regulator-off-in-suspend;
};
};
};
};
};
&i2c5 {
/* pin 3 (SDA) + 4 (SCL) of header con2 */
status = "disabled";
};
&mdio0 {
rgmii_phy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
};
};
&pinctrl {
leds {
blue_led_pin: blue-led-pin {
rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
};
green_led_pin: green-led-pin {
rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
pmic {
pmic_int: pmic_int {
rockchip,pins =
<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};
&pmu_io_domains {
pmuio1-supply = <&vcc3v3_pmu>;
pmuio2-supply = <&vcc3v3_pmu>;
vccio1-supply = <&vccio_acodec>;
vccio3-supply = <&vccio_sd>;
vccio4-supply = <&vcc_1v8>;
vccio5-supply = <&vcc_3v3>;
vccio6-supply = <&vcc_3v3>;
vccio7-supply = <&vcc_3v3>;
status = "okay";
};
&pwm8 {
/* fan 5v - gnd - pwm */
status = "okay";
};
&pwm10 {
/* pin 7 of header con2 */
status = "disabled";
};
&pwm11 {
/* pin 15 of header con2 */
status = "disabled";
};
&pwm12 {
/* pin 21 of header con2 */
/* shared with uart9 + spi3 */
pinctrl-0 = <&pwm12m1_pins>;
status = "disabled";
};
&pwm13 {
/* pin 24 of header con2 */
/* shared with uart9 */
pinctrl-0 = <&pwm13m1_pins>;
status = "disabled";
};
&pwm14 {
/* pin 23 of header con2 */
/* shared with spi3 */
pinctrl-0 = <&pwm14m1_pins>;
status = "disabled";
};
&pwm15 {
/* pin 19 of header con2 */
/* shared with spi3 */
pinctrl-0 = <&pwm15m1_pins>;
status = "disabled";
};
&saradc {
vref-supply = <&vcca_1v8>;
status = "okay";
};
&sdhci {
bus-width = <8>;
max-frequency = <200000000>;
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
status = "okay";
};
&sdmmc0 {
bus-width = <4>;
cap-sd-highspeed;
cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
disable-wp;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
sd-uhs-sdr104;
vmmc-supply = <&vcc3v3_sd>;
vqmmc-supply = <&vccio_sd>;
status = "okay";
};
&spi3 {
/* pin 19 (MO) + 21 (MI) + 23 (CK) of header con2 */
/* shared with pwm12/14/15 and uart9 */
pinctrl-0 = <&spi3m1_pins>;
status = "disabled";
};
&tsadc {
status = "okay";
};
&uart0 {
/* pin 8 (TX) + 10 (RX) (RTS:16, CTS:18) of header con2 */
status = "disabled";
};
&uart2 {
/* debug-uart */
status = "okay";
};
&uart7 {
/* pin 11 (TX) + 13 (RX) of header con2 */
pinctrl-0 = <&uart7m1_xfer>;
status = "disabled";
};
&uart9 {
/* pin 21 (TX) + 24 (RX) of header con2 */
/* shared with pwm13 and pwm12/spi3 */
pinctrl-0 = <&uart9m1_xfer>;
status = "disabled";
};

View File

@ -6,6 +6,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3568.dtsi"
@ -33,6 +34,33 @@ dc_12v: dc-12v {
regulator-max-microvolt = <12000000>;
};
leds {
compatible = "gpio-leds";
led_work: led-0 {
gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
function = LED_FUNCTION_HEARTBEAT;
color = <LED_COLOR_ID_BLUE>;
linux,default-trigger = "heartbeat";
pinctrl-names = "default";
pinctrl-0 = <&led_work_en>;
};
};
rk809-sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "Analog RK809";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,cpu {
sound-dai = <&i2s1_8ch>;
};
simple-audio-card,codec {
sound-dai = <&rk809>;
};
};
vcc3v3_sys: vcc3v3-sys {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
@ -53,10 +81,38 @@ vcc5v0_sys: vcc5v0-sys {
vin-supply = <&dc_12v>;
};
vcc5v0_usb: vcc5v0-usb {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_usb";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&dc_12v>;
};
vcc5v0_usb_host: vcc5v0-usb-host {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_usb_host_en>;
regulator-name = "vcc5v0_usb_host";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_usb>;
};
vcc3v3_lcd0_n: vcc3v3-lcd0-n {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_lcd0_n";
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc3v3_sys>;
pinctrl-names = "default";
pinctrl-0 = <&vcc3v3_lcd0_n_en>;
regulator-state-mem {
regulator-off-in-suspend;
@ -66,7 +122,13 @@ regulator-state-mem {
vcc3v3_lcd1_n: vcc3v3-lcd1-n {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_lcd1_n";
regulator-boot-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc3v3_sys>;
pinctrl-names = "default";
pinctrl-0 = <&vcc3v3_lcd1_n_en>;
regulator-state-mem {
regulator-off-in-suspend;
@ -74,6 +136,22 @@ regulator-state-mem {
};
};
&cpu0 {
cpu-supply = <&vdd_cpu>;
};
&cpu1 {
cpu-supply = <&vdd_cpu>;
};
&cpu2 {
cpu-supply = <&vdd_cpu>;
};
&cpu3 {
cpu-supply = <&vdd_cpu>;
};
&gmac0 {
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
@ -106,18 +184,45 @@ &gmac1m1_rgmii_clk
status = "okay";
};
&gpu {
mali-supply = <&vdd_gpu>;
status = "okay";
};
&i2c0 {
status = "okay";
vdd_cpu: regulator@1c {
compatible = "tcs,tcs4525";
reg = <0x1c>;
fcs,suspend-voltage-selector = <1>;
regulator-name = "vdd_cpu";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1150000>;
regulator-ramp-delay = <2300>;
vin-supply = <&vcc5v0_sys>;
regulator-state-mem {
regulator-off-in-suspend;
};
};
rk809: pmic@20 {
compatible = "rockchip,rk809";
reg = <0x20>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
#clock-cells = <1>;
clock-names = "mclk";
clocks = <&cru I2S1_MCLKOUT_TX>;
pinctrl-names = "default";
pinctrl-0 = <&pmic_int>;
pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
rockchip,system-power-controller;
#sound-dai-cells = <0>;
vcc1-supply = <&vcc3v3_sys>;
vcc2-supply = <&vcc3v3_sys>;
vcc3-supply = <&vcc3v3_sys>;
@ -147,6 +252,7 @@ regulator-state-mem {
vdd_gpu: DCDC_REG2 {
regulator-name = "vdd_gpu";
regulator-always-on;
regulator-init-microvolt = <900000>;
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
@ -231,6 +337,7 @@ regulator-state-mem {
vccio_acodec: LDO_REG4 {
regulator-name = "vccio_acodec";
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
@ -315,9 +422,35 @@ regulator-state-mem {
};
};
};
codec {
mic-in-differential;
};
};
};
&i2c1 {
status = "okay";
touchscreen0: goodix@14 {
compatible = "goodix,gt1151";
reg = <0x14>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PB5 IRQ_TYPE_EDGE_FALLING>;
AVDD28-supply = <&vcc3v3_lcd0_n>;
irq-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&touch_int &touch_rst>;
reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
VDDIO-supply = <&vcc3v3_lcd0_n>;
};
};
&i2s1_8ch {
rockchip,trcm-sync-tx-only;
status = "okay";
};
&mdio0 {
rgmii_phy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
@ -339,12 +472,42 @@ rgmii_phy1: ethernet-phy@0 {
};
&pinctrl {
display {
vcc3v3_lcd0_n_en: vcc3v3_lcd0_n_en {
rockchip,pins = <0 RK_PC7 0 &pcfg_pull_none>;
};
vcc3v3_lcd1_n_en: vcc3v3_lcd1_n_en {
rockchip,pins = <0 RK_PC5 0 &pcfg_pull_none>;
};
};
leds {
led_work_en: led_work_en {
rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
pmic {
pmic_int: pmic_int {
rockchip,pins =
<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
touchscreen {
touch_int: touch_int {
rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
};
touch_rst: touch_rst {
rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
usb {
vcc5v0_usb_host_en: vcc5v0_usb_host_en {
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
&pmu_io_domains {
@ -387,6 +550,42 @@ &sdmmc0 {
status = "okay";
};
&tsadc {
rockchip,hw-tshut-mode = <1>;
rockchip,hw-tshut-polarity = <0>;
status = "okay";
};
&uart2 {
status = "okay";
};
&usb_host0_ehci {
status = "okay";
};
&usb_host0_ohci {
status = "okay";
};
&usb_host1_ehci {
status = "okay";
};
&usb_host1_ohci {
status = "okay";
};
&usb2phy1 {
status = "okay";
};
&usb2phy1_host {
phy-supply = <&vcc5v0_usb_host>;
status = "okay";
};
&usb2phy1_otg {
phy-supply = <&vcc5v0_usb_host>;
status = "okay";
};

View File

@ -144,6 +144,40 @@ scmi_clk: protocol@14 {
};
};
gpu_opp_table: opp-table-1 {
compatible = "operating-points-v2";
opp-200000000 {
opp-hz = /bits/ 64 <200000000>;
opp-microvolt = <825000>;
};
opp-300000000 {
opp-hz = /bits/ 64 <300000000>;
opp-microvolt = <825000>;
};
opp-400000000 {
opp-hz = /bits/ 64 <400000000>;
opp-microvolt = <825000>;
};
opp-600000000 {
opp-hz = /bits/ 64 <600000000>;
opp-microvolt = <825000>;
};
opp-700000000 {
opp-hz = /bits/ 64 <700000000>;
opp-microvolt = <900000>;
};
opp-800000000 {
opp-hz = /bits/ 64 <800000000>;
opp-microvolt = <1000000>;
};
};
pmu {
compatible = "arm,cortex-a55-pmu";
interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_HIGH>,
@ -208,6 +242,50 @@ gic: interrupt-controller@fd400000 {
msi-controller;
};
usb_host0_ehci: usb@fd800000 {
compatible = "generic-ehci";
reg = <0x0 0xfd800000 0x0 0x40000>;
interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru HCLK_USB2HOST0>, <&cru HCLK_USB2HOST0_ARB>,
<&cru PCLK_USB>;
phys = <&usb2phy1_otg>;
phy-names = "usb";
status = "disabled";
};
usb_host0_ohci: usb@fd840000 {
compatible = "generic-ohci";
reg = <0x0 0xfd840000 0x0 0x40000>;
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru HCLK_USB2HOST0>, <&cru HCLK_USB2HOST0_ARB>,
<&cru PCLK_USB>;
phys = <&usb2phy1_otg>;
phy-names = "usb";
status = "disabled";
};
usb_host1_ehci: usb@fd880000 {
compatible = "generic-ehci";
reg = <0x0 0xfd880000 0x0 0x40000>;
interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru HCLK_USB2HOST1>, <&cru HCLK_USB2HOST1_ARB>,
<&cru PCLK_USB>;
phys = <&usb2phy1_host>;
phy-names = "usb";
status = "disabled";
};
usb_host1_ohci: usb@fd8c0000 {
compatible = "generic-ohci";
reg = <0x0 0xfd8c0000 0x0 0x40000>;
interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru HCLK_USB2HOST1>, <&cru HCLK_USB2HOST1_ARB>,
<&cru PCLK_USB>;
phys = <&usb2phy1_host>;
phy-names = "usb";
status = "disabled";
};
pmugrf: syscon@fdc20000 {
compatible = "rockchip,rk3568-pmugrf", "syscon", "simple-mfd";
reg = <0x0 0xfdc20000 0x0 0x10000>;
@ -223,6 +301,16 @@ grf: syscon@fdc60000 {
reg = <0x0 0xfdc60000 0x0 0x10000>;
};
usb2phy0_grf: syscon@fdca0000 {
compatible = "rockchip,rk3568-usb2phy-grf", "syscon";
reg = <0x0 0xfdca0000 0x0 0x8000>;
};
usb2phy1_grf: syscon@fdca8000 {
compatible = "rockchip,rk3568-usb2phy-grf", "syscon";
reg = <0x0 0xfdca8000 0x0 0x8000>;
};
pmucru: clock-controller@fdd00000 {
compatible = "rockchip,rk3568-pmucru";
reg = <0x0 0xfdd00000 0x0 0x1000>;
@ -390,6 +478,21 @@ power-domain@RK3568_PD_RKVENC {
};
};
gpu: gpu@fde60000 {
compatible = "rockchip,rk3568-mali", "arm,mali-bifrost";
reg = <0x0 0xfde60000 0x0 0x4000>;
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "job", "mmu", "gpu";
clocks = <&scmi_clk 1>, <&cru CLK_GPU>;
clock-names = "gpu", "bus";
#cooling-cells = <2>;
operating-points-v2 = <&gpu_opp_table>;
power-domains = <&power RK3568_PD_GPU>;
status = "disabled";
};
sdmmc2: mmc@fe000000 {
compatible = "rockchip,rk3568-dw-mshc", "rockchip,rk3288-dw-mshc";
reg = <0x0 0xfe000000 0x0 0x4000>;
@ -651,6 +754,43 @@ &i2s1m0_sdo0 &i2s1m0_sdo1
status = "disabled";
};
i2s3_2ch: i2s@fe430000 {
compatible = "rockchip,rk3568-i2s-tdm";
reg = <0x0 0xfe430000 0x0 0x1000>;
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru MCLK_I2S3_2CH_TX>, <&cru MCLK_I2S3_2CH_RX>,
<&cru HCLK_I2S3_2CH>;
clock-names = "mclk_tx", "mclk_rx", "hclk";
dmas = <&dmac1 6>, <&dmac1 7>;
dma-names = "tx", "rx";
resets = <&cru SRST_M_I2S3_2CH_TX>, <&cru SRST_M_I2S3_2CH_RX>;
reset-names = "tx-m", "rx-m";
rockchip,grf = <&grf>;
#sound-dai-cells = <0>;
status = "disabled";
};
pdm: pdm@fe440000 {
compatible = "rockchip,rk3568-pdm";
reg = <0x0 0xfe440000 0x0 0x1000>;
interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru MCLK_PDM>, <&cru HCLK_PDM>;
clock-names = "pdm_clk", "pdm_hclk";
dmas = <&dmac1 9>;
dma-names = "rx";
pinctrl-0 = <&pdmm0_clk
&pdmm0_clk1
&pdmm0_sdi0
&pdmm0_sdi1
&pdmm0_sdi2
&pdmm0_sdi3>;
pinctrl-names = "default";
resets = <&cru SRST_M_PDM>;
reset-names = "pdm-m";
#sound-dai-cells = <0>;
status = "disabled";
};
dmac0: dmac@fe530000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x0 0xfe530000 0x0 0x4000>;
@ -974,6 +1114,32 @@ gpu_thermal: gpu-thermal {
polling-delay = <1000>; /* milliseconds */
thermal-sensors = <&tsadc 1>;
trips {
gpu_threshold: gpu-threshold {
temperature = <70000>;
hysteresis = <2000>;
type = "passive";
};
gpu_target: gpu-target {
temperature = <75000>;
hysteresis = <2000>;
type = "passive";
};
gpu_crit: gpu-crit {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
};
};
cooling-maps {
map0 {
trip = <&gpu_target>;
cooling-device =
<&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
};
};
@ -1141,6 +1307,50 @@ pwm15: pwm@fe700030 {
status = "disabled";
};
usb2phy0: usb2phy@fe8a0000 {
compatible = "rockchip,rk3568-usb2phy";
reg = <0x0 0xfe8a0000 0x0 0x10000>;
clocks = <&pmucru CLK_USBPHY0_REF>;
clock-names = "phyclk";
clock-output-names = "clk_usbphy0_480m";
interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
rockchip,usbgrf = <&usb2phy0_grf>;
#clock-cells = <0>;
status = "disabled";
usb2phy0_host: host-port {
#phy-cells = <0>;
status = "disabled";
};
usb2phy0_otg: otg-port {
#phy-cells = <0>;
status = "disabled";
};
};
usb2phy1: usb2phy@fe8b0000 {
compatible = "rockchip,rk3568-usb2phy";
reg = <0x0 0xfe8b0000 0x0 0x10000>;
clocks = <&pmucru CLK_USBPHY1_REF>;
clock-names = "phyclk";
clock-output-names = "clk_usbphy1_480m";
interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
rockchip,usbgrf = <&usb2phy1_grf>;
#clock-cells = <0>;
status = "disabled";
usb2phy1_host: host-port {
#phy-cells = <0>;
status = "disabled";
};
usb2phy1_otg: otg-port {
#phy-cells = <0>;
status = "disabled";
};
};
pinctrl: pinctrl {
compatible = "rockchip,rk3568-pinctrl";
rockchip,grf = <&grf>;