Commit 822556a9 authored by Peter Robinson's avatar Peter Robinson Committed by Kever Yang
Browse files

arm: dts: sync the Rockhip 3399 SoCs from Linux



Sync the rk3399 DTs and associated bits from 5.14-rc1.
Signed-off-by: default avatarPeter Robinson <pbrobinson@gmail.com>
(Remove the conflict content for vmarc-som)
Signed-off-by: Kever Yang's avatarKever Yang <kever.yang@rock-chips.com>
parent 09cf0124
......@@ -11,6 +11,10 @@
model = "Rockchip RK3399 Evaluation Board";
compatible = "rockchip,rk3399-evb", "rockchip,rk3399";
aliases {
mmc0 = &sdhci;
};
backlight: backlight {
compatible = "pwm-backlight";
brightness-levels = <
......
......@@ -27,42 +27,43 @@
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&user_led1>, <&user_led2>, <&user_led3>,
<&user_led4>, <&wlan_led>, <&bt_led>;
pinctrl-0 = <&user_led1_pin>, <&user_led2_pin>,
<&user_led3_pin>, <&user_led4_pin>,
<&wlan_led_pin>, <&bt_led_pin>;
user_led1 {
user_led1: led-1 {
label = "red:user1";
gpios = <&gpio4 25 0>;
linux,default-trigger = "heartbeat";
};
user_led2 {
user_led2: led-2 {
label = "red:user2";
gpios = <&gpio4 26 0>;
linux,default-trigger = "mmc0";
};
user_led3 {
user_led3: led-3 {
label = "red:user3";
gpios = <&gpio4 30 0>;
linux,default-trigger = "mmc1";
};
user_led4 {
user_led4: led-4 {
label = "red:user4";
gpios = <&gpio1 0 0>;
panic-indicator;
linux,default-trigger = "none";
};
wlan_active_led {
wlan_active_led: led-5 {
label = "red:wlan";
gpios = <&gpio1 1 0>;
linux,default-trigger = "phy0tx";
default-state = "off";
};
bt_active_led {
bt_active_led: led-6 {
label = "red:bt";
gpios = <&gpio1 4 0>;
linux,default-trigger = "hci0-power";
......@@ -114,32 +115,32 @@
};
leds {
user_led1: user_led1 {
user_led1_pin: user-led1-pin {
rockchip,pins =
<4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
};
user_led2: user_led2 {
user_led2_pin: user-led2-pin {
rockchip,pins =
<4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
};
user_led3: user_led3 {
user_led3_pin: user-led3-pin {
rockchip,pins =
<4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
};
user_led4: user_led4 {
user_led4_pin: user-led4-pin {
rockchip,pins =
<1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
};
wlan_led: wlan_led {
wlan_led_pin: wlan-led-pin {
rockchip,pins =
<1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
};
bt_led: bt_led {
bt_led_pin: bt-led-pin {
rockchip,pins =
<1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
};
......
......@@ -6,6 +6,7 @@
/dts-v1/;
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/usb/pd.h>
#include "rk3399.dtsi"
#include "rk3399-opp.dtsi"
......@@ -13,6 +14,12 @@
model = "Firefly-RK3399 Board";
compatible = "firefly,firefly-rk3399", "rockchip,rk3399";
aliases {
mmc0 = &sdio0;
mmc1 = &sdmmc;
mmc2 = &sdhci;
};
chosen {
stdout-path = "serial2:1500000n8";
};
......@@ -88,18 +95,25 @@
};
};
ir-receiver {
compatible = "gpio-ir-receiver";
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&ir_int>;
pinctrl-names = "default";
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>;
pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
work-led {
work_led: led-0 {
label = "work";
default-state = "on";
gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
};
diy-led {
diy_led: led-1 {
label = "diy";
default-state = "off";
gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
......@@ -145,6 +159,23 @@
reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
};
sound-dit {
compatible = "audio-graph-card";
label = "SPDIF";
dais = <&spdif_p0>;
};
spdif-dit {
compatible = "linux,spdif-dit";
#sound-dai-cells = <0>;
port {
dit_p0_0: endpoint {
remote-endpoint = <&spdif_p0_0>;
};
};
};
/* switched by pmic_sleep */
vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
compatible = "regulator-fixed";
......@@ -190,6 +221,17 @@
vin-supply = <&vcc_sys>;
};
vcc5v0_typec: vcc5v0-typec-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_typec_en>;
regulator-name = "vcc5v0_typec";
regulator-always-on;
vin-supply = <&vcc_sys>;
};
vcc_sys: vcc-sys {
compatible = "regulator-fixed";
regulator-name = "vcc_sys";
......@@ -515,6 +557,53 @@
i2c-scl-falling-time-ns = <20>;
status = "okay";
fusb0: typec-portc@22 {
compatible = "fcs,fusb302";
reg = <0x22>;
interrupt-parent = <&gpio1>;
interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&fusb0_int>;
vbus-supply = <&vcc5v0_typec>;
status = "okay";
connector {
compatible = "usb-c-connector";
data-role = "host";
label = "USB-C";
op-sink-microwatt = <1000000>;
power-role = "dual";
sink-pdos =
<PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
source-pdos =
<PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
try-power-role = "sink";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
usbc_hs: endpoint {
remote-endpoint =
<&u2phy0_typec_hs>;
};
};
port@1 {
reg = <1>;
usbc_ss: endpoint {
remote-endpoint =
<&tcphy0_typec_ss>;
};
};
};
};
};
accelerometer@68 {
compatible = "invensense,mpu6500";
reg = <0x68>;
......@@ -572,12 +661,34 @@
};
};
fusb302x {
fusb0_int: fusb0-int {
rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
ir {
ir_int: ir-int {
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
lcd-panel {
lcd_panel_reset: lcd-panel-reset {
rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
leds {
work_led_pin: work-led-pin {
rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
};
diy_led_pin: diy-led-pin {
rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
pcie {
pcie_pwr_en: pcie-pwr-en {
rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
......@@ -589,18 +700,16 @@
};
pmic {
vsel1_gpio: vsel1-gpio {
rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
pmic_int_l: pmic-int-l {
rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
};
vsel2_gpio: vsel2-gpio {
rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
vsel1_pin: vsel1-pin {
rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
sdio-pwrseq {
wifi_enable_h: wifi-enable-h {
rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
vsel2_pin: vsel2-pin {
rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
......@@ -610,9 +719,15 @@
};
};
pmic {
pmic_int_l: pmic-int-l {
rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
sdio-pwrseq {
wifi_enable_h: wifi-enable-h {
rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
usb-typec {
vcc5v0_typec_en: vcc5v0_typec_en {
rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
......@@ -627,16 +742,6 @@
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
leds {
work_led_gpio: work_led-gpio {
rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
};
diy_led_gpio: diy_led-gpio {
rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
&pwm0 {
......@@ -704,10 +809,29 @@
status = "okay";
};
&spdif {
pinctrl-0 = <&spdif_bus_1>;
status = "okay";
spdif_p0: port {
spdif_p0_0: endpoint {
remote-endpoint = <&dit_p0_0>;
};
};
};
&tcphy0 {
status = "okay";
};
&tcphy0_usb3 {
port {
tcphy0_typec_ss: endpoint {
remote-endpoint = <&usbc_ss>;
};
};
};
&tcphy1 {
status = "okay";
};
......@@ -731,6 +855,12 @@
phy-supply = <&vcc5v0_host>;
status = "okay";
};
port {
u2phy0_typec_hs: endpoint {
remote-endpoint = <&usbc_hs>;
};
};
};
&u2phy1 {
......
......@@ -10,6 +10,11 @@
#include "rk3399-op1-opp.dtsi"
/ {
aliases {
mmc0 = &sdmmc;
mmc1 = &sdhci;
};
chosen {
stdout-path = "serial2:115200n8";
};
......@@ -247,8 +252,8 @@
enable-active-high;
enable-gpio = <&gpio2 2 GPIO_ACTIVE_HIGH>;
gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>;
states = <1800000 0x1
3000000 0x0>;
states = <1800000 0x1>,
<3000000 0x0>;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3000000>;
......@@ -342,6 +347,7 @@
cpu-supply = <&ppvar_bigcpu>;
};
&cru {
assigned-clocks =
<&cru PLL_GPLL>, <&cru PLL_CPLL>,
......@@ -515,7 +521,7 @@ ap_i2c_audio: &i2c8 {
* configured as SDMMC and not JTAG.
*/
pinctrl-names = "default";
pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_cd_gpio
pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_cd_pin
&sdmmc_bus4>;
bus-width = <4>;
......@@ -766,7 +772,7 @@ ap_i2c_audio: &i2c8 {
};
/* This is where we actually hook up CD; has external pull */
sdmmc_cd_gpio: sdmmc-cd-gpio {
sdmmc_cd_pin: sdmmc-cd-pin {
rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
......
......@@ -11,6 +11,12 @@
#include "rk3399-opp.dtsi"
/ {
aliases {
mmc0 = &sdio0;
mmc1 = &sdmmc;
mmc2 = &sdhci;
};
chosen {
stdout-path = "serial2:1500000n8";
};
......@@ -138,18 +144,26 @@
};
};
ir-receiver {
compatible = "gpio-ir-receiver";
gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
linux,rc-map-name = "rc-khadas";
pinctrl-names = "default";
pinctrl-0 = <&ir_rx>;
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&sys_led_gpio>, <&user_led_gpio>;
pinctrl-0 = <&sys_led_pin>, <&user_led_pin>;
sys-led {
sys_led: led-0 {
label = "sys_led";
linux,default-trigger = "heartbeat";
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
};
user-led {
user_led: led-1 {
label = "user_led";
default-state = "off";
gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>;
......@@ -585,12 +599,18 @@
};
};
ir {
ir_rx: ir-rx {
rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
leds {
sys_led_gpio: sys_led-gpio {
sys_led_pin: sys-led-pin {
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
};
user_led_gpio: user_led-gpio {
user_led_pin: user-led-pin {
rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
......@@ -690,6 +710,16 @@
status = "okay";
};
&spi1 {
status = "okay";
spiflash: flash@0 {
compatible = "winbond,w25q128fw", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <104000000>;
};
};
&tcphy0 {
status = "okay";
};
......
......@@ -13,6 +13,12 @@
model = "Leez RK3399 P710";
compatible = "leez,p710", "rockchip,rk3399";
aliases {
mmc0 = &sdio0;
mmc1 = &sdmmc;
mmc2 = &sdhci;
};
chosen {
stdout-path = "serial2:1500000n8";
};
......@@ -341,7 +347,7 @@
reg = <0x40>;
fcs,suspend-voltage-selector = <1>;
pinctrl-names = "default";
pinctrl-0 = <&vsel1_gpio>;
pinctrl-0 = <&vsel1_pin>;
regulator-name = "vdd_cpu_b";
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1500000>;
......@@ -360,7 +366,7 @@
reg = <0x41>;
fcs,suspend-voltage-selector = <1>;
pinctrl-names = "default";
pinctrl-0 = <&vsel2_gpio>;
pinctrl-0 = <&vsel2_pin>;
regulator-name = "vdd_gpu";
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1500000>;
......@@ -447,11 +453,11 @@
rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
};
vsel1_gpio: vsel1-gpio {
vsel1_pin: vsel1-pin {
rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
};
vsel2_gpio: vsel2-gpio {
vsel2_pin: vsel2-pin {
rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
......
......@@ -95,6 +95,7 @@
};
&pcie0 {
ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
num-lanes = <4>;
vpcie3v3-supply = <&vcc3v3_sys>;
};
......
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
* FriendlyElec NanoPC-T4 board device tree source
*
* Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
* Copyright (c) 2020 FriendlyElec Computer Tech. Co., Ltd.
* (http://www.friendlyarm.com)
*
* Copyright (c) 2018 Collabora Ltd.
* Copyright (c) 2019 Arm Ltd.
* Copyright (C) 2020 Xiaobo <peterwillcn@gmail.com>
*
* Copyright (c) 2020 Jensen Huang <jensenhuang@friendlyarm.com>
* Copyright (c) 2020 Marty Jones <mj8263788@gmail.com>
* Copyright (c) 2021 Tianling Shen <cnsztl@gmail.com>
*/
/dts-v1/;
......@@ -17,74 +19,57 @@
model = "FriendlyElec NanoPi R4S";
compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399";
vdd_5v: vdd-5v {
compatible = "regulator-fixed";
regulator-name = "vdd_5v";
regulator-always-on;
regulator-boot-on;
};
/delete-node/ display-subsystem;
fan: pwm-fan {
compatible = "pwm-fan";
cooling-levels = <0 12 18 255>;
#cooling-cells = <2>;
fan-supply = <&vdd_5v>;
pwms = <&pwm1 0 50000 0>;
};
};
gpio-leds {
pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
&cpu_thermal {
trips {
cpu_warm: cpu_warm {
temperature = <55000>;
hysteresis = <2000>;
type = "active";
};
/delete-node/ led-0;
cpu_hot: cpu_hot {
temperature = <65000>;
hysteresis = <2000>;
type = "active";
lan_led: led-lan {
gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
label = "green:lan";
};
};
cooling-maps {
map2 {
trip = <&cpu_warm>;