update 6.6
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
From 36d9b3ae708e865cdab95692db5a24c5d975383d Mon Sep 17 00:00:00 2001
|
||||
From: Dragan Simic <dsimic@manjaro.org>
|
||||
Date: Tue, 12 Dec 2023 09:01:39 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add ethernet0 alias to the dts for
|
||||
RK3566 boards
|
||||
|
||||
Add ethernet0 alias to the board dts files for a few supported RK3566 boards
|
||||
that had it missing. Also, remove the ethernet0 alias from one RK3566 SoM
|
||||
dtsi file, which doesn't enable the GMAC, and add the ethernet0 alias back to
|
||||
the dependent board dts files, which actually enable the GMAC.
|
||||
|
||||
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/d2a272e0ae0fff0adfab8bb0238243b11d348799.1702368023.git.dsimic@manjaro.org
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
|
||||
@@ -14,6 +14,7 @@
|
||||
compatible = "radxa,cm3-io", "radxa,cm3", "rockchip,rk3566";
|
||||
|
||||
aliases {
|
||||
+ ethernet0 = &gmac1;
|
||||
mmc1 = &sdmmc0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 0597d85859e48c4366862a6252479698590ae39c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tam=C3=A1s=20Sz=C5=B1cs?= <tszucs@protonmail.ch>
|
||||
Date: Wed, 11 Oct 2023 19:14:56 +0000
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add missing sdmmc2 SDR rates to rock-3a
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add missing UHS-I SDR rates to sdmmc2. Add explicit alias as mmc2 while at it.
|
||||
It would be good to have matching timings enabled in case slower SDIO devices
|
||||
are encountered.
|
||||
|
||||
Signed-off-by: Tamás Szűcs <tszucs@protonmail.ch>
|
||||
Link: https://lore.kernel.org/r/20231011191448.58936-1-tszucs@protonmail.ch
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
|
||||
@@ -15,6 +15,7 @@
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc0;
|
||||
+ mmc2 = &sdmmc2;
|
||||
};
|
||||
|
||||
chosen: chosen {
|
||||
@@ -747,6 +748,9 @@
|
||||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc3v3_sys>;
|
||||
vqmmc-supply = <&vcc_1v8>;
|
||||
@@ -1,44 +0,0 @@
|
||||
From 52e4a561560b0b4564329dc3771240c8e68ef48f Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Fri, 10 Jul 2020 21:38:20 +0200
|
||||
Subject: [PATCH 06/95] rockchip: use system LED for OpenWrt
|
||||
|
||||
Use the SYS LED on the casing for showing system status.
|
||||
|
||||
This patch is kept separate from the NanoPi R2S support patch, as i plan
|
||||
on submitting the device support upstream.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 5 +++++
|
||||
arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 5 +++++
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -16,6 +16,11 @@
|
||||
aliases {
|
||||
ethernet1 = &rtl8153;
|
||||
mmc0 = &sdmmc;
|
||||
+
|
||||
+ led-boot = &sys_led;
|
||||
+ led-failsafe = &sys_led;
|
||||
+ led-running = &sys_led;
|
||||
+ led-upgrade = &sys_led;
|
||||
};
|
||||
|
||||
chosen {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
@@ -13,6 +13,11 @@
|
||||
aliases {
|
||||
mmc0 = &sdmmc;
|
||||
mmc1 = &emmc;
|
||||
+
|
||||
+ led-boot = &power_led;
|
||||
+ led-failsafe = &power_led;
|
||||
+ led-running = &power_led;
|
||||
+ led-upgrade = &power_led;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -1,24 +0,0 @@
|
||||
From 13cb72fa5bccd8fd4152ffce8d92a12e3c5c36bc Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Sun, 26 Jul 2020 13:32:59 +0200
|
||||
Subject: [PATCH 07/95] arm64: rockchip: add OF node for USB eth on NanoPi R2S
|
||||
|
||||
This adds the OF node for the USB3 ethernet adapter on the FriendlyARM
|
||||
NanoPi R2S. Add the correct value for the RTL8153 LED configuration
|
||||
register to match the blink behavior of the other port on the device.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -402,6 +402,7 @@
|
||||
rtl8153: device@2 {
|
||||
compatible = "usbbda,8153";
|
||||
reg = <2>;
|
||||
+ realtek,led-data = <0x87>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
From 038e5650cdabe7531cd64a5b873c9b02aab3f06c Mon Sep 17 00:00:00 2001
|
||||
From: Tianling Shen <cnsztl@gmail.com>
|
||||
Date: Mon, 7 Jun 2021 15:45:37 +0800
|
||||
Subject: [PATCH 08/95] arm64: dts: rockchip: add EEPROM node for NanoPi R4S
|
||||
|
||||
NanoPi R4S has a EEPROM attached to the 2nd I2C bus (U92), which
|
||||
stores the MAC address.
|
||||
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
@@ -68,6 +68,15 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+&i2c2 {
|
||||
+ eeprom@51 {
|
||||
+ compatible = "microchip,24c02", "atmel,24c02";
|
||||
+ reg = <0x51>;
|
||||
+ pagesize = <16>;
|
||||
+ read-only; /* This holds our MAC */
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&i2c4 {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -1,31 +0,0 @@
|
||||
From eeb15d6eeed0dc35d10b482b2a857abfb0c8417c Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Thu, 1 Sep 2022 00:28:11 -0400
|
||||
Subject: [PATCH 09/95] arm64: dts: rockchip: disable UHS modes for NanoPi R4S
|
||||
|
||||
The NanoPi R4S leaves the SD card in 1.8V signalling when rebooting
|
||||
while U-Boot requires the card to be in 3.3V mode.
|
||||
|
||||
Remove UHS support from the SD controller so the card remains in 3.3V
|
||||
mode. This reduces transfer speeds but ensures a reboot whether from
|
||||
userspace or following a kernel panic is always working.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
@@ -121,6 +121,11 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+&sdmmc {
|
||||
+ /delete-property/ sd-uhs-sdr104;
|
||||
+ cap-sd-highspeed;
|
||||
+};
|
||||
+
|
||||
&u2phy0_host {
|
||||
phy-supply = <&vdd_5v>;
|
||||
};
|
||||
@@ -1,399 +0,0 @@
|
||||
From 901cf603c663ad3d52d274d07ecf4411aa93f992 Mon Sep 17 00:00:00 2001
|
||||
From: Marty Jones <mj8263788@gmail.com>
|
||||
Date: Wed, 12 May 2021 13:04:20 -0400
|
||||
Subject: [PATCH 10/95] rockchip: rk3328: add support for FriendlyARM NanoPi
|
||||
NEO3
|
||||
|
||||
This patch adds support for FriendlyARM NanoPi NEO3
|
||||
|
||||
Soc: RockChip RK3328
|
||||
RAM: 1GB/2GB DDR4
|
||||
LAN: 10/100/1000M Ethernet with unique MAC
|
||||
USB Host: 1x USB3.0 Type A and 2x USB2.0 on 2.54mm pin header
|
||||
MicroSD: x 1 for system boot and storage
|
||||
LED: Power LED x 1, System LED x 1
|
||||
Key: User Button x 1
|
||||
Fan: 2 Pin JST ZH 1.5mm Connector for 5V Fan
|
||||
GPIO: 26 pin-header, include I2C, UART, SPI, I2S, GPIO
|
||||
Power: 5V/1A, via Type-C or GPIO
|
||||
|
||||
Signed-off-by: Marty Jones <mj8263788@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 1 +
|
||||
.../boot/dts/rockchip/rk3328-nanopi-neo3.dts | 359 ++++++++++++++++++
|
||||
2 files changed, 360 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -14,6 +14,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-od
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-neo3.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-doornet1.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts
|
||||
@@ -0,0 +1,359 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2020 David Bauer <mail@david-bauer.net>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include "rk3328.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyElec NanoPi NEO3";
|
||||
+ compatible = "friendlyarm,nanopi-neo3", "rockchip,rk3328";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ gmac_clk: gmac-clock {
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <125000000>;
|
||||
+ clock-output-names = "gmac_clkin";
|
||||
+ #clock-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ pinctrl-0 = <&reset_button_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ reset {
|
||||
+ label = "reset";
|
||||
+ gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ debounce-interval = <50>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-0 = <&stat_led_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ stat_led: led-1 {
|
||||
+ gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "nanopi-neo3:green:stat";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_io_sdio: sdmmcio-regulator {
|
||||
+ compatible = "regulator-gpio";
|
||||
+ enable-active-high;
|
||||
+ gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-0 = <&sdio_vcc_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ regulator-name = "vcc_io_sdio";
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-settling-time-us = <5000>;
|
||||
+ regulator-type = "voltage";
|
||||
+ startup-delay-us = <2000>;
|
||||
+ states = <1800000 0x1>,
|
||||
+ <3300000 0x0>;
|
||||
+ vin-supply = <&vcc_io_33>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_sd: sdmmc-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-0 = <&sdmmc0m1_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ regulator-name = "vcc_sd";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&vcc_io_33>;
|
||||
+ };
|
||||
+
|
||||
+ vdd_5v: vdd-5v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vdd_5v";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&display_subsystem {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&gmac2io {
|
||||
+ assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
|
||||
+ assigned-clock-parents = <&gmac_clk>, <&gmac_clk>;
|
||||
+ clock_in_out = "input";
|
||||
+ phy-handle = <&rtl8211e>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-supply = <&vcc_io_33>;
|
||||
+ pinctrl-0 = <&rgmiim1_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ rx_delay = <0x18>;
|
||||
+ snps,aal;
|
||||
+ tx_delay = <0x24>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ mdio {
|
||||
+ compatible = "snps,dwmac-mdio";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ rtl8211e: ethernet-phy@1 {
|
||||
+ reg = <1>;
|
||||
+ pinctrl-0 = <ð_phy_reset_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ reset-assert-us = <10000>;
|
||||
+ reset-deassert-us = <50000>;
|
||||
+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rk805: pmic@18 {
|
||||
+ compatible = "rockchip,rk805";
|
||||
+ reg = <0x18>;
|
||||
+ interrupt-parent = <&gpio1>;
|
||||
+ interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ #clock-cells = <1>;
|
||||
+ clock-output-names = "xin32k", "rk805-clkout2";
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ pinctrl-0 = <&pmic_int_l>;
|
||||
+ pinctrl-names = "default";
|
||||
+ rockchip,system-power-controller;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ vcc1-supply = <&vdd_5v>;
|
||||
+ vcc2-supply = <&vdd_5v>;
|
||||
+ vcc3-supply = <&vdd_5v>;
|
||||
+ vcc4-supply = <&vdd_5v>;
|
||||
+ vcc5-supply = <&vcc_io_33>;
|
||||
+ vcc6-supply = <&vdd_5v>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_log: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_log";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_arm: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_arm";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <950000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_io_33: DCDC_REG4 {
|
||||
+ regulator-name = "vcc_io_33";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_18: LDO_REG1 {
|
||||
+ regulator-name = "vcc_18";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc18_emmc: LDO_REG2 {
|
||||
+ regulator-name = "vcc18_emmc";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_10: LDO_REG3 {
|
||||
+ regulator-name = "vdd_10";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1000000>;
|
||||
+ regulator-max-microvolt = <1000000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1000000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ pmuio-supply = <&vcc_io_33>;
|
||||
+ vccio1-supply = <&vcc_io_33>;
|
||||
+ vccio2-supply = <&vcc18_emmc>;
|
||||
+ vccio3-supply = <&vcc_io_sdio>;
|
||||
+ vccio4-supply = <&vcc_18>;
|
||||
+ vccio5-supply = <&vcc_io_33>;
|
||||
+ vccio6-supply = <&vcc_io_33>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ button {
|
||||
+ reset_button_pin: reset-button-pin {
|
||||
+ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gmac2io {
|
||||
+ eth_phy_reset_pin: eth-phy-reset-pin {
|
||||
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ stat_led_pin: stat-led-pin {
|
||||
+ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sd {
|
||||
+ sdio_vcc_pin: sdio-vcc-pin {
|
||||
+ rockchip,pins = <1 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pwm2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ disable-wp;
|
||||
+ pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>;
|
||||
+ pinctrl-names = "default";
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc_sd>;
|
||||
+ vqmmc-supply = <&vcc_io_sdio>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <0>;
|
||||
+ rockchip,hw-tshut-polarity = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy_host {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb20_otg {
|
||||
+ status = "okay";
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3 {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
@@ -1,29 +0,0 @@
|
||||
From 0926497951d548c81b5b60965f0b0352f3da5e01 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Sun, 11 Sep 2022 11:10:20 -0400
|
||||
Subject: [PATCH 11/95] rockchip: add system-LED aliases specific to OpenWrt
|
||||
|
||||
Add the aliases sections required to detect LEDs specific to OpenWrt
|
||||
boot / update indication for the NanoPi R4S.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
@@ -19,6 +19,13 @@
|
||||
model = "FriendlyElec NanoPi R4S";
|
||||
compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399";
|
||||
|
||||
+ aliases {
|
||||
+ led-boot = &sys_led;
|
||||
+ led-failsafe = &sys_led;
|
||||
+ led-running = &sys_led;
|
||||
+ led-upgrade = &sys_led;
|
||||
+ };
|
||||
+
|
||||
/delete-node/ display-subsystem;
|
||||
|
||||
gpio-leds {
|
||||
@@ -1,106 +0,0 @@
|
||||
From 3a8a66759baf24ece7e8a968a700d6a35876a63d Mon Sep 17 00:00:00 2001
|
||||
From: Corentin Labbe <clabbe@baylibre.com>
|
||||
Date: Tue, 27 Sep 2022 08:00:44 +0000
|
||||
Subject: [PATCH 12/95] crypto: rockchip: move kconfig to its dedicated
|
||||
directory
|
||||
|
||||
Move all rockchip kconfig in its own subdirectory.
|
||||
|
||||
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
|
||||
---
|
||||
drivers/crypto/Kconfig | 32 ++------------------------------
|
||||
drivers/crypto/Makefile | 2 +-
|
||||
drivers/crypto/rockchip/Kconfig | 28 ++++++++++++++++++++++++++++
|
||||
3 files changed, 31 insertions(+), 31 deletions(-)
|
||||
create mode 100644 drivers/crypto/rockchip/Kconfig
|
||||
|
||||
--- a/drivers/crypto/Kconfig
|
||||
+++ b/drivers/crypto/Kconfig
|
||||
@@ -609,6 +609,8 @@ config CRYPTO_DEV_QCOM_RNG
|
||||
To compile this driver as a module, choose M here. The
|
||||
module will be called qcom-rng. If unsure, say N.
|
||||
|
||||
+source "drivers/crypto/rockchip/Kconfig"
|
||||
+
|
||||
config CRYPTO_DEV_VMX
|
||||
bool "Support for VMX cryptographic acceleration instructions"
|
||||
depends on PPC64 && VSX
|
||||
@@ -629,36 +631,6 @@ config CRYPTO_DEV_IMGTEC_HASH
|
||||
hardware hash accelerator. Supporting MD5/SHA1/SHA224/SHA256
|
||||
hashing algorithms.
|
||||
|
||||
-config CRYPTO_DEV_ROCKCHIP
|
||||
- tristate "Rockchip's Cryptographic Engine driver"
|
||||
- depends on OF && ARCH_ROCKCHIP
|
||||
- depends on PM
|
||||
- select CRYPTO_ECB
|
||||
- select CRYPTO_CBC
|
||||
- select CRYPTO_DES
|
||||
- select CRYPTO_AES
|
||||
- select CRYPTO_ENGINE
|
||||
- select CRYPTO_LIB_DES
|
||||
- select CRYPTO_MD5
|
||||
- select CRYPTO_SHA1
|
||||
- select CRYPTO_SHA256
|
||||
- select CRYPTO_HASH
|
||||
- select CRYPTO_SKCIPHER
|
||||
-
|
||||
- help
|
||||
- This driver interfaces with the hardware crypto accelerator.
|
||||
- Supporting cbc/ecb chainmode, and aes/des/des3_ede cipher mode.
|
||||
-
|
||||
-config CRYPTO_DEV_ROCKCHIP_DEBUG
|
||||
- bool "Enable Rockchip crypto stats"
|
||||
- depends on CRYPTO_DEV_ROCKCHIP
|
||||
- depends on DEBUG_FS
|
||||
- help
|
||||
- Say y to enable Rockchip crypto debug stats.
|
||||
- This will create /sys/kernel/debug/rk3288_crypto/stats for displaying
|
||||
- the number of requests per algorithm and other internal stats.
|
||||
-
|
||||
-
|
||||
config CRYPTO_DEV_ZYNQMP_AES
|
||||
tristate "Support for Xilinx ZynqMP AES hw accelerator"
|
||||
depends on ZYNQMP_FIRMWARE || COMPILE_TEST
|
||||
--- a/drivers/crypto/Makefile
|
||||
+++ b/drivers/crypto/Makefile
|
||||
@@ -34,7 +34,7 @@ obj-$(CONFIG_CRYPTO_DEV_PADLOCK_SHA) +=
|
||||
obj-$(CONFIG_CRYPTO_DEV_PPC4XX) += amcc/
|
||||
obj-$(CONFIG_CRYPTO_DEV_QCE) += qce/
|
||||
obj-$(CONFIG_CRYPTO_DEV_QCOM_RNG) += qcom-rng.o
|
||||
-obj-$(CONFIG_CRYPTO_DEV_ROCKCHIP) += rockchip/
|
||||
+obj-y += rockchip/
|
||||
obj-$(CONFIG_CRYPTO_DEV_S5P) += s5p-sss.o
|
||||
obj-$(CONFIG_CRYPTO_DEV_SA2UL) += sa2ul.o
|
||||
obj-$(CONFIG_CRYPTO_DEV_SAHARA) += sahara.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/crypto/rockchip/Kconfig
|
||||
@@ -0,0 +1,28 @@
|
||||
+config CRYPTO_DEV_ROCKCHIP
|
||||
+ tristate "Rockchip's Cryptographic Engine driver"
|
||||
+ depends on OF && ARCH_ROCKCHIP
|
||||
+ depends on PM
|
||||
+ select CRYPTO_ECB
|
||||
+ select CRYPTO_CBC
|
||||
+ select CRYPTO_DES
|
||||
+ select CRYPTO_AES
|
||||
+ select CRYPTO_ENGINE
|
||||
+ select CRYPTO_LIB_DES
|
||||
+ select CRYPTO_MD5
|
||||
+ select CRYPTO_SHA1
|
||||
+ select CRYPTO_SHA256
|
||||
+ select CRYPTO_HASH
|
||||
+ select CRYPTO_SKCIPHER
|
||||
+
|
||||
+ help
|
||||
+ This driver interfaces with the hardware crypto accelerator.
|
||||
+ Supporting cbc/ecb chainmode, and aes/des/des3_ede cipher mode.
|
||||
+
|
||||
+config CRYPTO_DEV_ROCKCHIP_DEBUG
|
||||
+ bool "Enable Rockchip crypto stats"
|
||||
+ depends on CRYPTO_DEV_ROCKCHIP
|
||||
+ depends on DEBUG_FS
|
||||
+ help
|
||||
+ Say y to enable Rockchip crypto debug stats.
|
||||
+ This will create /sys/kernel/debug/rk3288_crypto/stats for displaying
|
||||
+ the number of requests per algorithm and other internal stats.
|
||||
@@ -1,89 +0,0 @@
|
||||
From 94327499ba7867ec017abe331446858086ae1f36 Mon Sep 17 00:00:00 2001
|
||||
From: Corentin Labbe <clabbe@baylibre.com>
|
||||
Date: Tue, 27 Sep 2022 08:00:45 +0000
|
||||
Subject: [PATCH 13/95] dt-bindings: crypto: add support for
|
||||
rockchip,crypto-rk3588
|
||||
|
||||
Add device tree binding documentation for the Rockchip cryptographic
|
||||
offloader V2.
|
||||
|
||||
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
|
||||
---
|
||||
.../crypto/rockchip,rk3588-crypto.yaml | 71 +++++++++++++++++++
|
||||
1 file changed, 71 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml
|
||||
@@ -0,0 +1,71 @@
|
||||
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/crypto/rockchip,rk3588-crypto.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: Rockchip cryptographic offloader V2
|
||||
+
|
||||
+maintainers:
|
||||
+ - Corentin Labbe <clabbe@baylibre.com>
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ enum:
|
||||
+ - rockchip,rk3568-crypto
|
||||
+ - rockchip,rk3588-crypto
|
||||
+
|
||||
+ reg:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ interrupts:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ clocks:
|
||||
+ minItems: 4
|
||||
+
|
||||
+ clock-names:
|
||||
+ items:
|
||||
+ - const: aclk
|
||||
+ - const: hclk
|
||||
+ - const: sclk
|
||||
+ - const: pka
|
||||
+
|
||||
+ resets:
|
||||
+ minItems: 5
|
||||
+
|
||||
+ reset-names:
|
||||
+ items:
|
||||
+ - const: core
|
||||
+ - const: a
|
||||
+ - const: h
|
||||
+ - const: rng
|
||||
+ - const: pka
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - reg
|
||||
+ - interrupts
|
||||
+ - clocks
|
||||
+ - clock-names
|
||||
+ - resets
|
||||
+ - reset-names
|
||||
+
|
||||
+additionalProperties: false
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
+ #include <dt-bindings/clock/rk3568-cru.h>
|
||||
+ crypto@fe380000 {
|
||||
+ compatible = "rockchip,rk3588-crypto";
|
||||
+ reg = <0xfe380000 0x4000>;
|
||||
+ interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru ACLK_CRYPTO_NS>, <&cru HCLK_CRYPTO_NS>,
|
||||
+ <&cru CLK_CRYPTO_NS_CORE>, <&cru CLK_CRYPTO_NS_PKA>;
|
||||
+ clock-names = "aclk", "hclk", "sclk", "pka";
|
||||
+ resets = <&cru SRST_CRYPTO_NS_CORE>, <&cru SRST_A_CRYPTO_NS>,
|
||||
+ <&cru SRST_H_CRYPTO_NS>, <&cru SRST_CRYPTO_NS_RNG>,
|
||||
+ <&cru SRST_CRYPTO_NS_PKA>;
|
||||
+ reset-names = "core", "a", "h", "rng", "pka";
|
||||
+ };
|
||||
@@ -1,22 +0,0 @@
|
||||
From efbbe9089347272d845cf9a8478d6249b0902cf9 Mon Sep 17 00:00:00 2001
|
||||
From: Corentin Labbe <clabbe@baylibre.com>
|
||||
Date: Tue, 27 Sep 2022 08:00:46 +0000
|
||||
Subject: [PATCH 14/95] MAINTAINERS: add new dt-binding doc to the right entry
|
||||
|
||||
Rockchip crypto driver have a new file to be added.
|
||||
|
||||
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
|
||||
---
|
||||
MAINTAINERS | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -18502,6 +18502,7 @@ M: Corentin Labbe <clabbe@baylibre.com>
|
||||
L: linux-crypto@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml
|
||||
+F: Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml
|
||||
F: drivers/crypto/rockchip/
|
||||
|
||||
ROCKCHIP I2S TDM DRIVER
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,46 +0,0 @@
|
||||
From a835ba3fd0d62c735e17bf40bee95e2931e44b84 Mon Sep 17 00:00:00 2001
|
||||
From: Corentin Labbe <clabbe@baylibre.com>
|
||||
Date: Tue, 27 Sep 2022 08:00:48 +0000
|
||||
Subject: [PATCH 16/95] ARM64: dts: rk3568: add crypto node
|
||||
|
||||
The rk3568 has a crypto IP handled by the rk3588 crypto driver so adds a
|
||||
node for it.
|
||||
|
||||
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
@@ -213,6 +213,30 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ crypto: crypto@fe380000 {
|
||||
+ compatible = "rockchip,rk3568-crypto";
|
||||
+ reg = <0x0 0xfe380000 0x0 0x2000>;
|
||||
+ interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru ACLK_CRYPTO_NS>, <&cru HCLK_CRYPTO_NS>,
|
||||
+ <&cru CLK_CRYPTO_NS_CORE>, <&cru CLK_CRYPTO_NS_PKA>;
|
||||
+ clock-names = "aclk", "hclk", "sclk", "pka";
|
||||
+ resets = <&cru SRST_CRYPTO_NS_CORE>, <&cru SRST_A_CRYPTO_NS>,
|
||||
+ <&cru SRST_H_CRYPTO_NS>, <&cru SRST_CRYPTO_NS_RNG>,
|
||||
+ <&cru SRST_CRYPTO_NS_PKA>;
|
||||
+ reset-names = "core", "a", "h", "rng,", "pka";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ rng: rng@fe388000 {
|
||||
+ compatible = "rockchip,cryptov2-rng";
|
||||
+ reg = <0x0 0xfe388000 0x0 0x2000>;
|
||||
+ clocks = <&cru CLK_TRNG_NS>, <&cru HCLK_TRNG_NS>;
|
||||
+ clock-names = "clk_trng", "hclk_trng";
|
||||
+ resets = <&cru SRST_TRNG_NS>;
|
||||
+ reset-names = "reset";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
combphy0: phy@fe820000 {
|
||||
compatible = "rockchip,rk3568-naneng-combphy";
|
||||
reg = <0x0 0xfe820000 0x0 0x100>;
|
||||
@@ -1,31 +0,0 @@
|
||||
From 1dc0e2c75df089cdf1acb78192381f40088bba01 Mon Sep 17 00:00:00 2001
|
||||
From: Marty Jones <mj8263788@gmail.com>
|
||||
Date: Thu, 29 Sep 2022 18:44:42 -0400
|
||||
Subject: [PATCH 17/95] drivers: crypto-rockchip fix openwrt build
|
||||
|
||||
Signed-off-by: Marty Jones <mj8263788@gmail.com>
|
||||
---
|
||||
drivers/crypto/rockchip/rk3288_crypto.c | 12 ------------
|
||||
1 file changed, 12 deletions(-)
|
||||
|
||||
--- a/drivers/crypto/rockchip/rk3288_crypto.c
|
||||
+++ b/drivers/crypto/rockchip/rk3288_crypto.c
|
||||
@@ -31,18 +31,6 @@ static struct rockchip_ip rocklist = {
|
||||
.lock = __SPIN_LOCK_UNLOCKED(rocklist.lock),
|
||||
};
|
||||
|
||||
-struct rk_crypto_info *get_rk_crypto(void)
|
||||
-{
|
||||
- struct rk_crypto_info *first;
|
||||
-
|
||||
- spin_lock(&rocklist.lock);
|
||||
- first = list_first_entry_or_null(&rocklist.dev_list,
|
||||
- struct rk_crypto_info, list);
|
||||
- list_rotate_left(&rocklist.dev_list);
|
||||
- spin_unlock(&rocklist.lock);
|
||||
- return first;
|
||||
-}
|
||||
-
|
||||
static const struct rk_variant rk3288_variant = {
|
||||
.num_clks = 4,
|
||||
.rkclks = {
|
||||
@@ -1,109 +0,0 @@
|
||||
From 1b31cbc7f82082266049fadedf822affa49db8f6 Mon Sep 17 00:00:00 2001
|
||||
From: Marty Jones <mj8263788@gmail.com>
|
||||
Date: Tue, 30 May 2023 01:56:43 -0400
|
||||
Subject: [PATCH 18/95] rock3a fixes
|
||||
|
||||
---
|
||||
.../boot/dts/rockchip/rk3568-rock-3a.dts | 35 +++++++++----------
|
||||
1 file changed, 17 insertions(+), 18 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
|
||||
@@ -32,13 +32,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
- gmac1_clkin: external-gmac1-clock {
|
||||
- compatible = "fixed-clock";
|
||||
- clock-frequency = <125000000>;
|
||||
- clock-output-names = "gmac1_clkin";
|
||||
- #clock-cells = <0>;
|
||||
- };
|
||||
-
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
@@ -256,18 +249,25 @@
|
||||
|
||||
&gmac1 {
|
||||
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
- assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;
|
||||
- clock_in_out = "input";
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
|
||||
+ clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
- phy-mode = "rgmii-id";
|
||||
- phy-supply = <&vcc_3v3>;
|
||||
+ phy-mode = "rgmii";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac1m1_miim
|
||||
&gmac1m1_tx_bus2
|
||||
&gmac1m1_rx_bus2
|
||||
&gmac1m1_rgmii_clk
|
||||
- &gmac1m1_clkinout
|
||||
&gmac1m1_rgmii_bus>;
|
||||
+
|
||||
+ snps,reset-gpio = <&gpio3 RK_PB0 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";
|
||||
};
|
||||
|
||||
@@ -410,6 +410,7 @@
|
||||
|
||||
vdda0v9_image: LDO_REG1 {
|
||||
regulator-name = "vdda0v9_image";
|
||||
+ regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
|
||||
@@ -446,6 +447,7 @@
|
||||
vccio_acodec: LDO_REG4 {
|
||||
regulator-name = "vccio_acodec";
|
||||
regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
@@ -504,6 +506,7 @@
|
||||
|
||||
vcca1v8_image: LDO_REG9 {
|
||||
regulator-name = "vcca1v8_image";
|
||||
+ regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
@@ -524,6 +527,7 @@
|
||||
|
||||
vcc3v3_sd: SWITCH_REG2 {
|
||||
regulator-name = "vcc3v3_sd";
|
||||
+ regulator-always-on;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
@@ -585,11 +589,6 @@
|
||||
rgmii_phy1: ethernet-phy@0 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0x0>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <ð_phy_rst>;
|
||||
- reset-assert-us = <20000>;
|
||||
- reset-deassert-us = <100000>;
|
||||
- reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -793,7 +792,7 @@
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
- extcon = <&usb2phy0>;
|
||||
+ dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
From e85254ff587de217555b1eca5f6c5a66ba0df283 Mon Sep 17 00:00:00 2001
|
||||
From: Marty Jones <mj8263788@gmail.com>
|
||||
Date: Tue, 30 May 2023 01:58:03 -0400
|
||||
Subject: [PATCH 19/95] rock pi 4b fix wifi
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
|
||||
@@ -24,7 +24,7 @@
|
||||
compatible = "brcm,bcm4329-fmac";
|
||||
reg = <1>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
- interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-names = "host-wake";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_host_wake_l>;
|
||||
@@ -1,233 +0,0 @@
|
||||
From 4ec87387e211ac6ffb0315c470d52d73cfb2a639 Mon Sep 17 00:00:00 2001
|
||||
From: Marty Jones <mj8263788@gmail.com>
|
||||
Date: Sun, 4 Jun 2023 02:29:36 -0400
|
||||
Subject: [PATCH] fix r5s r5c
|
||||
|
||||
Signed-off-by: Marty Jones <mj8263788@gmail.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3568-nanopi-r5c.dts | 70 ++++++++++---------
|
||||
.../boot/dts/rockchip/rk3568-nanopi-r5s.dts | 61 ++++++++--------
|
||||
2 files changed, 67 insertions(+), 64 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
|
||||
@@ -11,14 +11,14 @@
|
||||
|
||||
/ {
|
||||
model = "FriendlyElec NanoPi R5C";
|
||||
- compatible = "friendlyarm,nanopi-r5c", "rockchip,rk3568";
|
||||
+ compatible = "friendlyelec,nanopi-r5c", "rockchip,rk3568";
|
||||
|
||||
- gpio-keys {
|
||||
+ gpio_keys: gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&reset_button_pin>;
|
||||
+ pinctrl-0 = <&key1_pin>;
|
||||
|
||||
- button-reset {
|
||||
+ key-reset {
|
||||
debounce-interval = <50>;
|
||||
gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
label = "reset";
|
||||
@@ -28,39 +28,41 @@
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&lan_led_pin>, <&power_led_pin>, <&wan_led_pin>, <&wlan_led_pin>;
|
||||
-
|
||||
- led-lan {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_LAN;
|
||||
- gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
- };
|
||||
|
||||
- power_led: led-power {
|
||||
- color = <LED_COLOR_ID_RED>;
|
||||
- function = LED_FUNCTION_POWER;
|
||||
+ sys_led: led-sys {
|
||||
+ label = "red:sys";
|
||||
linux,default-trigger = "heartbeat";
|
||||
+ pinctrl-names = "default";
|
||||
gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-0 = <&sys_led_pin>;
|
||||
};
|
||||
|
||||
- led-wan {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_WAN;
|
||||
+ lan-led {
|
||||
+ label = "green:lan";
|
||||
+ gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&lan_led_pin>;
|
||||
+ };
|
||||
+
|
||||
+ wan-led {
|
||||
+ label = "green:wan";
|
||||
gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wan_led_pin>;
|
||||
};
|
||||
|
||||
- led-wlan {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_WLAN;
|
||||
+ wlan-led {
|
||||
+ label = "green:wlan";
|
||||
gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wlan_led_pin>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2x1 {
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pcie20_reset_pin>;
|
||||
+ pinctrl-0 = <&m2_w_disable_pin>;
|
||||
reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -80,15 +82,21 @@
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
- gpio-leds {
|
||||
- lan_led_pin: lan-led-pin {
|
||||
- rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ gpio-key {
|
||||
+ key1_pin: key1-pin {
|
||||
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
+ };
|
||||
|
||||
- power_led_pin: power-led-pin {
|
||||
+ gpio-leds {
|
||||
+ sys_led_pin: power-led-pin {
|
||||
rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
+ lan_led_pin: lan-led-pin {
|
||||
+ rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
wan_led_pin: wan-led-pin {
|
||||
rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
@@ -98,15 +106,9 @@
|
||||
};
|
||||
};
|
||||
|
||||
- pcie {
|
||||
- pcie20_reset_pin: pcie20-reset-pin {
|
||||
+ m2-pins {
|
||||
+ m2_w_disable_pin: m2-w-disable-pin {
|
||||
rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
-
|
||||
- rockchip-key {
|
||||
- reset_button_pin: reset-button-pin {
|
||||
- rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
- };
|
||||
- };
|
||||
};
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/ {
|
||||
model = "FriendlyElec NanoPi R5S";
|
||||
- compatible = "friendlyarm,nanopi-r5s", "rockchip,rk3568";
|
||||
+ compatible = "friendlyelec,nanopi-r5s", "rockchip,rk3568";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac0;
|
||||
@@ -19,34 +19,34 @@
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&lan1_led_pin>, <&lan2_led_pin>, <&power_led_pin>, <&wan_led_pin>;
|
||||
|
||||
- led-lan1 {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_LAN;
|
||||
- function-enumerator = <1>;
|
||||
- gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
|
||||
+ sys_led: led-sys {
|
||||
+ gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "red:power";
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sys_led_pin>;
|
||||
};
|
||||
|
||||
- led-lan2 {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_LAN;
|
||||
- function-enumerator = <2>;
|
||||
- gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>;
|
||||
+ wan_led: led-wan {
|
||||
+ gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:wan";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wan_led_pin>;
|
||||
};
|
||||
|
||||
- power_led: led-power {
|
||||
- color = <LED_COLOR_ID_RED>;
|
||||
- function = LED_FUNCTION_POWER;
|
||||
- linux,default-trigger = "heartbeat";
|
||||
- gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
+ lan1_led: led-lan1 {
|
||||
+ gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:lan1";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&lan1_led_pin>;
|
||||
};
|
||||
|
||||
- led-wan {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_WAN;
|
||||
- gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
+ lan2_led: led-lan2 {
|
||||
+ gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:lan2";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&lan2_led_pin>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -117,20 +117,21 @@
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
- lan1_led_pin: lan1-led-pin {
|
||||
- rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
- };
|
||||
|
||||
- lan2_led_pin: lan2-led-pin {
|
||||
- rockchip,pins = <3 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
- };
|
||||
-
|
||||
- power_led_pin: power-led-pin {
|
||||
+ sys_led_pin: sys-led-pin {
|
||||
rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
wan_led_pin: wan-led-pin {
|
||||
rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
+
|
||||
+ lan1_led_pin: lan1-led-pin {
|
||||
+ rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ lan2_led_pin: lan2-led-pin {
|
||||
+ rockchip,pins = <3 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
@@ -1,499 +0,0 @@
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-doornet1.dts
|
||||
@@ -0,0 +1,495 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2021 EmbedFire <embedfire@embedfire.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include "rk3328-dram-default-timing.dtsi"
|
||||
+#include "rk3328.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "EmbedFire DoorNet1";
|
||||
+ compatible = "embedfire,doornet1", "rockchip,rk3328";
|
||||
+
|
||||
+ aliases {
|
||||
+ led-boot = &sys_led;
|
||||
+ led-failsafe = &sys_led;
|
||||
+ led-running = &sys_led;
|
||||
+ led-upgrade = &sys_led;
|
||||
+ // mmc1 = &sdmmc;
|
||||
+ // mmc0 = &emmc;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ gmac_clk: gmac-clock {
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <125000000>;
|
||||
+ clock-output-names = "gmac_clkin";
|
||||
+ #clock-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ pinctrl-0 = <&reset_button_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ reset {
|
||||
+ label = "reset";
|
||||
+ gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ debounce-interval = <50>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_rtl8153: vcc-rtl8153-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rtl8153_en_drv>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-name = "vcc_rtl8153";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+
|
||||
+ dmc: dmc {
|
||||
+ compatible = "rockchip,rk3328-dmc";
|
||||
+ devfreq-events = <&dfi>;
|
||||
+ center-supply = <&vdd_log>;
|
||||
+ clocks = <&cru SCLK_DDRCLK>;
|
||||
+ clock-names = "dmc_clk";
|
||||
+ operating-points-v2 = <&dmc_opp_table>;
|
||||
+ ddr_timing = <&ddr_timing>;
|
||||
+ upthreshold = <40>;
|
||||
+ downdifferential = <20>;
|
||||
+ auto-min-freq = <786000>;
|
||||
+ auto-freq-en = <1>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ddr_power_model: ddr_power_model {
|
||||
+ compatible = "ddr_power_model";
|
||||
+ dynamic-power-coefficient = <120>;
|
||||
+ static-power-coefficient = <200>;
|
||||
+ ts = <32000 4700 (-80) 2>;
|
||||
+ thermal-zone = "soc-thermal";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ dmc_opp_table: dmc-opp-table {
|
||||
+ compatible = "operating-points-v2";
|
||||
+
|
||||
+ rockchip,leakage-voltage-sel = <
|
||||
+ 1 10 0
|
||||
+ 11 254 1
|
||||
+ >;
|
||||
+ nvmem-cells = <&logic_leakage>;
|
||||
+ nvmem-cell-names = "ddr_leakage";
|
||||
+
|
||||
+ opp-786000000 {
|
||||
+ opp-hz = /bits/ 64 <786000000>;
|
||||
+ opp-microvolt = <1075000>;
|
||||
+ opp-microvolt-L0 = <1075000>;
|
||||
+ opp-microvolt-L1 = <1050000>;
|
||||
+ };
|
||||
+ opp-798000000 {
|
||||
+ opp-hz = /bits/ 64 <798000000>;
|
||||
+ opp-microvolt = <1075000>;
|
||||
+ opp-microvolt-L0 = <1075000>;
|
||||
+ opp-microvolt-L1 = <1050000>;
|
||||
+ };
|
||||
+ opp-840000000 {
|
||||
+ opp-hz = /bits/ 64 <840000000>;
|
||||
+ opp-microvolt = <1075000>;
|
||||
+ opp-microvolt-L0 = <1075000>;
|
||||
+ opp-microvolt-L1 = <1050000>;
|
||||
+ };
|
||||
+ opp-924000000 {
|
||||
+ opp-hz = /bits/ 64 <924000000>;
|
||||
+ opp-microvolt = <1100000>;
|
||||
+ opp-microvolt-L0 = <1100000>;
|
||||
+ opp-microvolt-L1 = <1075000>;
|
||||
+ };
|
||||
+ opp-1056000000 {
|
||||
+ opp-hz = /bits/ 64 <1056000000>;
|
||||
+ opp-microvolt = <1175000>;
|
||||
+ opp-microvolt-L0 = <1175000>;
|
||||
+ opp-microvolt-L1 = <1150000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ lan_led: led-0 {
|
||||
+ gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "doornet1:green:lan";
|
||||
+ };
|
||||
+
|
||||
+ sys_led: led-1 {
|
||||
+ gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "doornet1:red:sys";
|
||||
+ };
|
||||
+
|
||||
+ wan_led: led-2 {
|
||||
+ gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "doornet1:green:wan";
|
||||
+ };
|
||||
+
|
||||
+ wifi_enable: wifi_enable {
|
||||
+ gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "wifi-enable";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_io_sdio: sdmmcio-regulator {
|
||||
+ compatible = "regulator-gpio";
|
||||
+ enable-active-high;
|
||||
+ gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-0 = <&sdio_vcc_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ regulator-name = "vcc_io_sdio";
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-settling-time-us = <5000>;
|
||||
+ regulator-type = "voltage";
|
||||
+ startup-delay-us = <2000>;
|
||||
+ states = <1800000 0x1
|
||||
+ 3300000 0x0>;
|
||||
+ vin-supply = <&vcc_io_33>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_sd: sdmmc-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-0 = <&sdmmc0m1_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ regulator-name = "vcc_sd";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&vcc_io_33>;
|
||||
+ };
|
||||
+
|
||||
+ vdd_5v: vdd-5v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vdd_5v";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&dfi {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gmac2io {
|
||||
+ assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
|
||||
+ assigned-clock-parents = <&gmac_clk>, <&gmac_clk>;
|
||||
+ clock_in_out = "input";
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-supply = <&vcc_io_33>;
|
||||
+ pinctrl-0 = <&rgmiim1_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
+ snps,reset-delays-us = <0 1000000 50000>;
|
||||
+ snps,reset-active-low;
|
||||
+ tx_delay = <0x18>;
|
||||
+ rx_delay = <0x24>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rk805: pmic@18 {
|
||||
+ compatible = "rockchip,rk805";
|
||||
+ reg = <0x18>;
|
||||
+ interrupt-parent = <&gpio1>;
|
||||
+ interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ #clock-cells = <1>;
|
||||
+ clock-output-names = "xin32k", "rk805-clkout2";
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ pinctrl-0 = <&pmic_int_l>;
|
||||
+ pinctrl-names = "default";
|
||||
+ rockchip,system-power-controller;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ vcc1-supply = <&vdd_5v>;
|
||||
+ vcc2-supply = <&vdd_5v>;
|
||||
+ vcc3-supply = <&vdd_5v>;
|
||||
+ vcc4-supply = <&vdd_5v>;
|
||||
+ vcc5-supply = <&vcc_io_33>;
|
||||
+ vcc6-supply = <&vdd_5v>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_log: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_log";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-init-microvolt = <1075000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_arm: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_arm";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-init-microvolt = <1225000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <950000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_io_33: DCDC_REG4 {
|
||||
+ regulator-name = "vcc_io_33";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_18: LDO_REG1 {
|
||||
+ regulator-name = "vcc_18";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc18_emmc: LDO_REG2 {
|
||||
+ regulator-name = "vcc18_emmc";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_10: LDO_REG3 {
|
||||
+ regulator-name = "vdd_10";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1000000>;
|
||||
+ regulator-max-microvolt = <1000000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1000000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ usb {
|
||||
+ rtl8153_en_drv: rtl8153-en-drv {
|
||||
+ rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ pmuio-supply = <&vcc_io_33>;
|
||||
+ vccio1-supply = <&vcc_io_33>;
|
||||
+ vccio2-supply = <&vcc18_emmc>;
|
||||
+ vccio3-supply = <&vcc_io_sdio>;
|
||||
+ vccio4-supply = <&vcc_18>;
|
||||
+ vccio5-supply = <&vcc_io_33>;
|
||||
+ vccio6-supply = <&vcc_io_33>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ button {
|
||||
+ reset_button_pin: reset-button-pin {
|
||||
+ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ ethernet-phy {
|
||||
+ eth_phy_reset_pin: eth-phy-reset-pin {
|
||||
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ lan_led_pin: lan-led-pin {
|
||||
+ rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ sys_led_pin: sys-led-pin {
|
||||
+ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ wan_led_pin: wan-led-pin {
|
||||
+ rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ wifi_pin: wifi_pin{
|
||||
+ rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sd {
|
||||
+ sdio_vcc_pin: sdio-vcc-pin {
|
||||
+ rockchip,pins = <1 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pwm2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ disable-wp;
|
||||
+ pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>;
|
||||
+ pinctrl-names = "default";
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc_sd>;
|
||||
+ vqmmc-supply = <&vcc_io_sdio>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&emmc {
|
||||
+ bus-width = <8>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ max-frequency = <150000000>;
|
||||
+ mmc-ddr-1_8v;
|
||||
+ mmc-hs200-1_8v;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
|
||||
+ vmmc-supply = <&vcc_io_33>;
|
||||
+ vqmmc-supply = <&vcc18_emmc>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <0>;
|
||||
+ rockchip,hw-tshut-polarity = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy_host {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb20_otg {
|
||||
+ status = "okay";
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3 {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ /* Second port is for USB 3.0 */
|
||||
+ rtl8153: device@2 {
|
||||
+ compatible = "usbbda,8153";
|
||||
+ reg = <2>;
|
||||
+
|
||||
+ realtek,led-data = <0x87>;
|
||||
+ };
|
||||
+};
|
||||
\ No newline at end of file
|
||||
@@ -1,768 +0,0 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -66,6 +66,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-ro
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4b.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4b-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4c.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-doornet2.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock960.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64-v2.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-doornet2.dts
|
||||
@@ -0,0 +1,115 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "rk3399-doornet2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "EmbedFire DoorNet2";
|
||||
+ compatible = "embedfire,doornet2", "rockchip,rk3399";
|
||||
+
|
||||
+ aliases {
|
||||
+ led-boot = &sys_led;
|
||||
+ led-failsafe = &sys_led;
|
||||
+ led-running = &sys_led;
|
||||
+ led-upgrade = &sys_led;
|
||||
+ };
|
||||
+
|
||||
+ /delete-node/ display-subsystem;
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
|
||||
+
|
||||
+ /delete-node/ status;
|
||||
+
|
||||
+ lan_led: led-lan {
|
||||
+ gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:lan";
|
||||
+ };
|
||||
+
|
||||
+ sys_led: led-sys {
|
||||
+ gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "red:sys";
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+
|
||||
+ wan_led: led-wan {
|
||||
+ gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:wan";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ pinctrl-0 = <&reset_button_pin>;
|
||||
+
|
||||
+ /delete-node/ power;
|
||||
+
|
||||
+ reset {
|
||||
+ debounce-interval = <50>;
|
||||
+ gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_5v: vdd-5v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vdd_5v";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ max-link-speed = <1>;
|
||||
+ num-lanes = <1>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ pcie@0 {
|
||||
+ reg = <0x00000000 0 0 0 0>;
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+
|
||||
+ pcie-eth@0,0 {
|
||||
+ compatible = "realtek,r8168";
|
||||
+ reg = <0x000000 0 0 0 0>;
|
||||
+
|
||||
+ realtek,led-data = <0x870>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ gpio-leds {
|
||||
+ /delete-node/ leds-gpio;
|
||||
+
|
||||
+ lan_led_pin: lan-led-pin {
|
||||
+ rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ sys_led_pin: sys-led-pin {
|
||||
+ rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ wan_led_pin: wan-led-pin {
|
||||
+ rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rockchip-key {
|
||||
+ /delete-node/ power-key;
|
||||
+
|
||||
+ reset_button_pin: reset-button-pin {
|
||||
+ rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&u2phy0_host {
|
||||
+ phy-supply = <&vdd_5v>;
|
||||
+};
|
||||
+
|
||||
+&vcc3v3_sys {
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+};
|
||||
+
|
||||
+
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-doornet2.dtsi
|
||||
@@ -0,0 +1,637 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+#include "rk3399.dtsi"
|
||||
+#include "rk3399-opp.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ clkin_gmac: external-gmac-clock {
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <125000000>;
|
||||
+ clock-output-names = "clkin_gmac";
|
||||
+ #clock-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: vcc3v3-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: vcc5v0-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-name = "vcc5v0_sys";
|
||||
+ vin-supply = <&vdd_5v>;
|
||||
+ };
|
||||
+
|
||||
+ /* switched by pmic_sleep */
|
||||
+ vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc1v8_s3";
|
||||
+ vin-supply = <&vcc_1v8>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v0_sd: vcc3v0-sd {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc0_pwr_h>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-name = "vcc3v0_sd";
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vbus_typec: vbus-typec {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-name = "vbus_typec";
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ autorepeat;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&power_key>;
|
||||
+
|
||||
+ power {
|
||||
+ debounce-interval = <100>;
|
||||
+ gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
|
||||
+ label = "GPIO Key Power";
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ wakeup-source;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds: gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&leds_gpio>;
|
||||
+
|
||||
+ status {
|
||||
+ gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "status_led";
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdio_pwrseq: sdio-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ clocks = <&rk808 1>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_reg_on_h>;
|
||||
+ reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu_b0 {
|
||||
+ cpu-supply = <&vdd_cpu_b>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b1 {
|
||||
+ cpu-supply = <&vdd_cpu_b>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l0 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l1 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l2 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l3 {
|
||||
+ cpu-supply = <&vdd_cpu_l>;
|
||||
+};
|
||||
+
|
||||
+&emmc_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gmac {
|
||||
+ assigned-clocks = <&cru SCLK_RMII_SRC>;
|
||||
+ assigned-clock-parents = <&clkin_gmac>;
|
||||
+ clock_in_out = "input";
|
||||
+ phy-supply = <&vcc3v3_s3>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rgmii_pins>;
|
||||
+ snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
+ snps,reset-active-low;
|
||||
+ snps,reset-delays-us = <0 100000 50000>;
|
||||
+ tx_delay = <0x28>;
|
||||
+ rx_delay = <0x11>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ ddc-i2c-bus = <&i2c7>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hdmi_cec>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ i2c-scl-rising-time-ns = <160>;
|
||||
+ i2c-scl-falling-time-ns = <30>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu_b: regulator@40 {
|
||||
+ compatible = "silergy,syr827";
|
||||
+ reg = <0x40>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&cpu_b_sleep>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-name = "vdd_cpu_b";
|
||||
+ regulator-ramp-delay = <1000>;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: regulator@41 {
|
||||
+ compatible = "silergy,syr828";
|
||||
+ reg = <0x41>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gpu_sleep>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-ramp-delay = <1000>;
|
||||
+ vin-supply = <&vcc3v3_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk808: pmic@1b {
|
||||
+ compatible = "rockchip,rk808";
|
||||
+ reg = <0x1b>;
|
||||
+ clock-output-names = "xin32k", "rtc_clko_wifi";
|
||||
+ #clock-cells = <1>;
|
||||
+ interrupt-parent = <&gpio1>;
|
||||
+ interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int_l>;
|
||||
+ rockchip,system-power-controller;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ vcc1-supply = <&vcc3v3_sys>;
|
||||
+ vcc2-supply = <&vcc3v3_sys>;
|
||||
+ vcc3-supply = <&vcc3v3_sys>;
|
||||
+ vcc4-supply = <&vcc3v3_sys>;
|
||||
+ vcc6-supply = <&vcc3v3_sys>;
|
||||
+ vcc7-supply = <&vcc3v3_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc3v3_sys>;
|
||||
+ vcc10-supply = <&vcc3v3_sys>;
|
||||
+ vcc11-supply = <&vcc3v3_sys>;
|
||||
+ vcc12-supply = <&vcc3v3_sys>;
|
||||
+ vddio-supply = <&vcc_3v0>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_center: DCDC_REG1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-name = "vdd_center";
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpu_l: DCDC_REG2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-name = "vdd_cpu_l";
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG4 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc1v8_cam: LDO_REG1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc1v8_cam";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v0_touch: LDO_REG2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-name = "vcc3v0_touch";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc1v8_pmupll: LDO_REG3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc1v8_pmupll";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_sdio: LDO_REG4 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-init-microvolt = <3000000>;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc_sdio";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca3v0_codec: LDO_REG5 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-name = "vcca3v0_codec";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v5: LDO_REG6 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1500000>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-name = "vcc_1v5";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1500000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_codec: LDO_REG7 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcca1v8_codec";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v0: LDO_REG8 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-name = "vcc_3v0";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_s3: SWITCH_REG1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc3v3_s3";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_s0: SWITCH_REG2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-name = "vcc3v3_s0";
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ clock-frequency = <200000>;
|
||||
+ i2c-scl-rising-time-ns = <150>;
|
||||
+ i2c-scl-falling-time-ns = <30>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c7 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ bt656-supply = <&vcc_1v8>;
|
||||
+ audio-supply = <&vcca1v8_codec>;
|
||||
+ sdmmc-supply = <&vcc_sdio>;
|
||||
+ gpio1830-supply = <&vcc_3v0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie_phy {
|
||||
+ assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
|
||||
+ assigned-clock-rates = <100000000>;
|
||||
+ assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
|
||||
+ max-link-speed = <2>;
|
||||
+ num-lanes = <4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ fusb30x {
|
||||
+ fusb0_int: fusb0-int {
|
||||
+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ leds_gpio: leds-gpio {
|
||||
+ rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ ethernet-phy {
|
||||
+ eth_phy_reset_pin: eth-phy-reset-pin {
|
||||
+ rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ cpu_b_sleep: cpu-b-sleep {
|
||||
+ rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+
|
||||
+ gpu_sleep: gpu-sleep {
|
||||
+ rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rockchip-key {
|
||||
+ power_key: power-key {
|
||||
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdio {
|
||||
+ bt_host_wake_l: bt-host-wake-l {
|
||||
+ rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ bt_reg_on_h: bt-reg-on-h {
|
||||
+ /* external pullup to VCC1V8_PMUPLL */
|
||||
+ rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ bt_wake_l: bt-wake-l {
|
||||
+ rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ wifi_reg_on_h: wifi-reg_on-h {
|
||||
+ rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sdmmc {
|
||||
+ sdmmc0_det_l: sdmmc0-det-l {
|
||||
+ rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ sdmmc0_pwr_h: sdmmc0-pwr-h {
|
||||
+ rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ pmu1830-supply = <&vcc_3v0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcca1v8_s3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ mmc-ddr-1_8v;
|
||||
+ mmc-hs200-1_8v;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cap-mmc-highspeed;
|
||||
+ cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
+ disable-wp;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc0_det_l>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc3v0_sd>;
|
||||
+ vqmmc-supply = <&vcc_sdio>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tcphy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tcphy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ /* tshut mode 0:CRU 1:GPIO */
|
||||
+ rockchip,hw-tshut-mode = <1>;
|
||||
+ /* tshut polarity 0:LOW 1:HIGH */
|
||||
+ rockchip,hw-tshut-polarity = <1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_host {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3_1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_0 {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd_dwc3_1 {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopb_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vopl_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
@@ -0,0 +1,78 @@
|
||||
From 2dc66a5ab2c6fb532fbb16107ee7efcb0effbfa5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 26 Jan 2024 19:18:22 +0100
|
||||
Subject: [PATCH] clk: rockchip: rk3588: fix CLK_NR_CLKS usage
|
||||
|
||||
CLK_NR_CLKS is not part of the DT bindings and needs to be removed
|
||||
from it, just like it recently happened for other platforms. This
|
||||
takes care of it by introducing a new function identifying the
|
||||
maximum used clock ID at runtime.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20240126182919.48402-2-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3588.c | 5 ++++-
|
||||
drivers/clk/rockchip/clk.c | 17 +++++++++++++++++
|
||||
drivers/clk/rockchip/clk.h | 2 ++
|
||||
3 files changed, 23 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/clk/rockchip/clk-rk3588.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3588.c
|
||||
@@ -2458,15 +2458,18 @@ static struct rockchip_clk_branch rk3588
|
||||
static void __init rk3588_clk_init(struct device_node *np)
|
||||
{
|
||||
struct rockchip_clk_provider *ctx;
|
||||
+ unsigned long clk_nr_clks;
|
||||
void __iomem *reg_base;
|
||||
|
||||
+ clk_nr_clks = rockchip_clk_find_max_clk_id(rk3588_clk_branches,
|
||||
+ ARRAY_SIZE(rk3588_clk_branches)) + 1;
|
||||
reg_base = of_iomap(np, 0);
|
||||
if (!reg_base) {
|
||||
pr_err("%s: could not map cru region\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
- ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
|
||||
+ ctx = rockchip_clk_init(np, reg_base, clk_nr_clks);
|
||||
if (IS_ERR(ctx)) {
|
||||
pr_err("%s: rockchip clk init failed\n", __func__);
|
||||
iounmap(reg_base);
|
||||
--- a/drivers/clk/rockchip/clk.c
|
||||
+++ b/drivers/clk/rockchip/clk.c
|
||||
@@ -429,6 +429,23 @@ void rockchip_clk_register_plls(struct r
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rockchip_clk_register_plls);
|
||||
|
||||
+unsigned long rockchip_clk_find_max_clk_id(struct rockchip_clk_branch *list,
|
||||
+ unsigned int nr_clk)
|
||||
+{
|
||||
+ unsigned long max = 0;
|
||||
+ unsigned int idx;
|
||||
+
|
||||
+ for (idx = 0; idx < nr_clk; idx++, list++) {
|
||||
+ if (list->id > max)
|
||||
+ max = list->id;
|
||||
+ if (list->child && list->child->id > max)
|
||||
+ max = list->id;
|
||||
+ }
|
||||
+
|
||||
+ return max;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(rockchip_clk_find_max_clk_id);
|
||||
+
|
||||
void rockchip_clk_register_branches(struct rockchip_clk_provider *ctx,
|
||||
struct rockchip_clk_branch *list,
|
||||
unsigned int nr_clk)
|
||||
--- a/drivers/clk/rockchip/clk.h
|
||||
+++ b/drivers/clk/rockchip/clk.h
|
||||
@@ -973,6 +973,8 @@ struct rockchip_clk_provider *rockchip_c
|
||||
void __iomem *base, unsigned long nr_clks);
|
||||
void rockchip_clk_of_add_provider(struct device_node *np,
|
||||
struct rockchip_clk_provider *ctx);
|
||||
+unsigned long rockchip_clk_find_max_clk_id(struct rockchip_clk_branch *list,
|
||||
+ unsigned int nr_clk);
|
||||
void rockchip_clk_register_branches(struct rockchip_clk_provider *ctx,
|
||||
struct rockchip_clk_branch *list,
|
||||
unsigned int nr_clk);
|
||||
@@ -0,0 +1,27 @@
|
||||
From 11a29dc2e41ead2be78cfa9d532edf924b461acc Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 26 Jan 2024 19:18:23 +0100
|
||||
Subject: [PATCH] dt-bindings: clock: rk3588: drop CLK_NR_CLKS
|
||||
|
||||
CLK_NR_CLKS should not be part of the binding. Let's drop it, since
|
||||
the kernel code no longer uses it either.
|
||||
|
||||
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20240126182919.48402-3-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
include/dt-bindings/clock/rockchip,rk3588-cru.h | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
--- a/include/dt-bindings/clock/rockchip,rk3588-cru.h
|
||||
+++ b/include/dt-bindings/clock/rockchip,rk3588-cru.h
|
||||
@@ -734,8 +734,6 @@
|
||||
#define PCLK_AV1_PRE 719
|
||||
#define HCLK_SDIO_PRE 720
|
||||
|
||||
-#define CLK_NR_CLKS (HCLK_SDIO_PRE + 1)
|
||||
-
|
||||
/* scmi-clocks indices */
|
||||
|
||||
#define SCMI_CLK_CPUL 0
|
||||
@@ -0,0 +1,26 @@
|
||||
From c81798cf9dd2f324934585b2b52a0398caefb88e Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 26 Jan 2024 19:18:24 +0100
|
||||
Subject: [PATCH] dt-bindings: clock: rk3588: add missing PCLK_VO1GRF
|
||||
|
||||
Add PCLK_VO1GRF to complement PCLK_VO0GRF. This will be needed
|
||||
for HDMI support.
|
||||
|
||||
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20240126182919.48402-4-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
include/dt-bindings/clock/rockchip,rk3588-cru.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/include/dt-bindings/clock/rockchip,rk3588-cru.h
|
||||
+++ b/include/dt-bindings/clock/rockchip,rk3588-cru.h
|
||||
@@ -733,6 +733,7 @@
|
||||
#define ACLK_AV1_PRE 718
|
||||
#define PCLK_AV1_PRE 719
|
||||
#define HCLK_SDIO_PRE 720
|
||||
+#define PCLK_VO1GRF 721
|
||||
|
||||
/* scmi-clocks indices */
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
From f394bee6ec7436619ded028c7892016a3a05f16d Mon Sep 17 00:00:00 2001
|
||||
From 326be62eaf2e89767b7b9223f88eaf3c041b98d2 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 13 Jun 2023 16:45:05 +0200
|
||||
Subject: [PATCH 23/41] clk: rockchip: rk3588: fix pclk_vo0grf and pclk_vo1grf
|
||||
Date: Fri, 26 Jan 2024 19:18:25 +0100
|
||||
Subject: [PATCH] clk: rockchip: rk3588: fix pclk_vo0grf and pclk_vo1grf
|
||||
|
||||
Currently pclk_vo1grf is not exposed, but it should be referenced
|
||||
from the vo1_grf syscon, which needs it enabled. That syscon will
|
||||
be required for HDMI-RX functionality among other things.
|
||||
from the vo1_grf syscon, which needs it enabled. That syscon is
|
||||
required for HDMI RX and TX functionality among other things.
|
||||
|
||||
Apart from that pclk_vo0grf and pclk_vo1grf are both linked gates
|
||||
and need the VO's hclk enabled in addition to their parent clock.
|
||||
@@ -14,10 +14,11 @@ No Fixes tag has been added, since the logic requiring these clocks
|
||||
is not yet upstream anyways.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20240126182919.48402-5-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3588.c | 11 +++++------
|
||||
include/dt-bindings/clock/rockchip,rk3588-cru.h | 3 ++-
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
drivers/clk/rockchip/clk-rk3588.c | 10 ++++------
|
||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/clk/rockchip/clk-rk3588.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3588.c
|
||||
@@ -39,7 +40,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
GATE(PCLK_S_EDP0, "pclk_s_edp0", "pclk_vo1_s_root", 0,
|
||||
RK3588_CLKGATE_CON(59), 14, GFLAGS),
|
||||
GATE(PCLK_S_EDP1, "pclk_s_edp1", "pclk_vo1_s_root", 0,
|
||||
@@ -2447,12 +2443,15 @@ static struct rockchip_clk_branch rk3588
|
||||
@@ -2447,12 +2443,14 @@ static struct rockchip_clk_branch rk3588
|
||||
GATE_LINK(HCLK_RKVDEC1_PRE, "hclk_rkvdec1_pre", "hclk_rkvdec1_root", "hclk_vdpu_root", 0, RK3588_CLKGATE_CON(41), 4, GFLAGS),
|
||||
GATE_LINK(ACLK_RKVDEC1_PRE, "aclk_rkvdec1_pre", "aclk_rkvdec1_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(41), 5, GFLAGS),
|
||||
GATE_LINK(ACLK_HDCP0_PRE, "aclk_hdcp0_pre", "aclk_vo0_root", "aclk_vop_low_root", 0, RK3588_CLKGATE_CON(55), 9, GFLAGS),
|
||||
@@ -53,20 +54,6 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
GATE_LINK(HCLK_SDIO_PRE, "hclk_sdio_pre", "hclk_sdio_root", "hclk_nvm", 0, RK3588_CLKGATE_CON(75), 1, GFLAGS),
|
||||
+ GATE_LINK(PCLK_VO0GRF, "pclk_vo0grf", "pclk_vo0_root", "hclk_vo0", CLK_IGNORE_UNUSED, RK3588_CLKGATE_CON(55), 10, GFLAGS),
|
||||
+ GATE_LINK(PCLK_VO1GRF, "pclk_vo1grf", "pclk_vo1_root", "hclk_vo1", CLK_IGNORE_UNUSED, RK3588_CLKGATE_CON(59), 12, GFLAGS),
|
||||
+
|
||||
};
|
||||
|
||||
static void __init rk3588_clk_init(struct device_node *np)
|
||||
--- a/include/dt-bindings/clock/rockchip,rk3588-cru.h
|
||||
+++ b/include/dt-bindings/clock/rockchip,rk3588-cru.h
|
||||
@@ -733,8 +733,9 @@
|
||||
#define ACLK_AV1_PRE 718
|
||||
#define PCLK_AV1_PRE 719
|
||||
#define HCLK_SDIO_PRE 720
|
||||
+#define PCLK_VO1GRF 721
|
||||
|
||||
-#define CLK_NR_CLKS (HCLK_SDIO_PRE + 1)
|
||||
+#define CLK_NR_CLKS (PCLK_VO1GRF + 1)
|
||||
|
||||
/* scmi-clocks indices */
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 2a6e4710672242281347103b64e01693aa823a29 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 26 Jan 2024 19:18:26 +0100
|
||||
Subject: [PATCH] clk: rockchip: rk3588: fix indent
|
||||
|
||||
pclk_mailbox2 is the only RK3588 clock indented with one tab instead of
|
||||
two tabs. Let's fix this.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20240126182919.48402-6-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3588.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/clk/rockchip/clk-rk3588.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3588.c
|
||||
@@ -1004,7 +1004,7 @@ static struct rockchip_clk_branch rk3588
|
||||
GATE(PCLK_MAILBOX1, "pclk_mailbox1", "pclk_top_root", 0,
|
||||
RK3588_CLKGATE_CON(16), 12, GFLAGS),
|
||||
GATE(PCLK_MAILBOX2, "pclk_mailbox2", "pclk_top_root", 0,
|
||||
- RK3588_CLKGATE_CON(16), 13, GFLAGS),
|
||||
+ RK3588_CLKGATE_CON(16), 13, GFLAGS),
|
||||
GATE(PCLK_PMU2, "pclk_pmu2", "pclk_top_root", CLK_IS_CRITICAL,
|
||||
RK3588_CLKGATE_CON(19), 3, GFLAGS),
|
||||
GATE(PCLK_PMUCM0_INTMUX, "pclk_pmucm0_intmux", "pclk_top_root", CLK_IS_CRITICAL,
|
||||
@@ -0,0 +1,78 @@
|
||||
From dae3e57000fb2d6f491e3ee2956f5918326d6b72 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 26 Jan 2024 19:18:27 +0100
|
||||
Subject: [PATCH] clk: rockchip: rk3588: use linked clock ID for GATE_LINK
|
||||
|
||||
In preparation for properly supporting GATE_LINK switch the unused
|
||||
linked clock argument from the clock's name to its ID. This allows
|
||||
easy and fast lookup of the 'struct clk'.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20240126182919.48402-7-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3588.c | 46 +++++++++++++++----------------
|
||||
1 file changed, 23 insertions(+), 23 deletions(-)
|
||||
|
||||
--- a/drivers/clk/rockchip/clk-rk3588.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3588.c
|
||||
@@ -29,7 +29,7 @@
|
||||
* power, but avoids leaking implementation details into DT or hanging the
|
||||
* system.
|
||||
*/
|
||||
-#define GATE_LINK(_id, cname, pname, linkname, f, o, b, gf) \
|
||||
+#define GATE_LINK(_id, cname, pname, linkedclk, f, o, b, gf) \
|
||||
GATE(_id, cname, pname, f, o, b, gf)
|
||||
#define RK3588_LINKED_CLK CLK_IS_CRITICAL
|
||||
|
||||
@@ -2429,28 +2429,28 @@ static struct rockchip_clk_branch rk3588
|
||||
GATE(ACLK_AV1, "aclk_av1", "aclk_av1_pre", 0,
|
||||
RK3588_CLKGATE_CON(68), 2, GFLAGS),
|
||||
|
||||
- GATE_LINK(ACLK_ISP1_PRE, "aclk_isp1_pre", "aclk_isp1_root", "aclk_vi_root", 0, RK3588_CLKGATE_CON(26), 6, GFLAGS),
|
||||
- GATE_LINK(HCLK_ISP1_PRE, "hclk_isp1_pre", "hclk_isp1_root", "hclk_vi_root", 0, RK3588_CLKGATE_CON(26), 8, GFLAGS),
|
||||
- GATE_LINK(HCLK_NVM, "hclk_nvm", "hclk_nvm_root", "aclk_nvm_root", RK3588_LINKED_CLK, RK3588_CLKGATE_CON(31), 2, GFLAGS),
|
||||
- GATE_LINK(ACLK_USB, "aclk_usb", "aclk_usb_root", "aclk_vo1usb_top_root", 0, RK3588_CLKGATE_CON(42), 2, GFLAGS),
|
||||
- GATE_LINK(HCLK_USB, "hclk_usb", "hclk_usb_root", "hclk_vo1usb_top_root", 0, RK3588_CLKGATE_CON(42), 3, GFLAGS),
|
||||
- GATE_LINK(ACLK_JPEG_DECODER_PRE, "aclk_jpeg_decoder_pre", "aclk_jpeg_decoder_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(44), 7, GFLAGS),
|
||||
- GATE_LINK(ACLK_VDPU_LOW_PRE, "aclk_vdpu_low_pre", "aclk_vdpu_low_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(44), 5, GFLAGS),
|
||||
- GATE_LINK(ACLK_RKVENC1_PRE, "aclk_rkvenc1_pre", "aclk_rkvenc1_root", "aclk_rkvenc0", 0, RK3588_CLKGATE_CON(48), 3, GFLAGS),
|
||||
- GATE_LINK(HCLK_RKVENC1_PRE, "hclk_rkvenc1_pre", "hclk_rkvenc1_root", "hclk_rkvenc0", 0, RK3588_CLKGATE_CON(48), 2, GFLAGS),
|
||||
- GATE_LINK(HCLK_RKVDEC0_PRE, "hclk_rkvdec0_pre", "hclk_rkvdec0_root", "hclk_vdpu_root", 0, RK3588_CLKGATE_CON(40), 5, GFLAGS),
|
||||
- GATE_LINK(ACLK_RKVDEC0_PRE, "aclk_rkvdec0_pre", "aclk_rkvdec0_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(40), 6, GFLAGS),
|
||||
- GATE_LINK(HCLK_RKVDEC1_PRE, "hclk_rkvdec1_pre", "hclk_rkvdec1_root", "hclk_vdpu_root", 0, RK3588_CLKGATE_CON(41), 4, GFLAGS),
|
||||
- GATE_LINK(ACLK_RKVDEC1_PRE, "aclk_rkvdec1_pre", "aclk_rkvdec1_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(41), 5, GFLAGS),
|
||||
- GATE_LINK(ACLK_HDCP0_PRE, "aclk_hdcp0_pre", "aclk_vo0_root", "aclk_vop_low_root", 0, RK3588_CLKGATE_CON(55), 9, GFLAGS),
|
||||
- GATE_LINK(HCLK_VO0, "hclk_vo0", "hclk_vo0_root", "hclk_vop_root", RK3588_LINKED_CLK, RK3588_CLKGATE_CON(55), 5, GFLAGS),
|
||||
- GATE_LINK(ACLK_HDCP1_PRE, "aclk_hdcp1_pre", "aclk_hdcp1_root", "aclk_vo1usb_top_root", 0, RK3588_CLKGATE_CON(59), 6, GFLAGS),
|
||||
- GATE_LINK(HCLK_VO1, "hclk_vo1", "hclk_vo1_root", "hclk_vo1usb_top_root", RK3588_LINKED_CLK, RK3588_CLKGATE_CON(59), 9, GFLAGS),
|
||||
- GATE_LINK(ACLK_AV1_PRE, "aclk_av1_pre", "aclk_av1_root", "aclk_vdpu_root", 0, RK3588_CLKGATE_CON(68), 1, GFLAGS),
|
||||
- GATE_LINK(PCLK_AV1_PRE, "pclk_av1_pre", "pclk_av1_root", "hclk_vdpu_root", 0, RK3588_CLKGATE_CON(68), 4, GFLAGS),
|
||||
- GATE_LINK(HCLK_SDIO_PRE, "hclk_sdio_pre", "hclk_sdio_root", "hclk_nvm", 0, RK3588_CLKGATE_CON(75), 1, GFLAGS),
|
||||
- GATE_LINK(PCLK_VO0GRF, "pclk_vo0grf", "pclk_vo0_root", "hclk_vo0", CLK_IGNORE_UNUSED, RK3588_CLKGATE_CON(55), 10, GFLAGS),
|
||||
- GATE_LINK(PCLK_VO1GRF, "pclk_vo1grf", "pclk_vo1_root", "hclk_vo1", CLK_IGNORE_UNUSED, RK3588_CLKGATE_CON(59), 12, GFLAGS),
|
||||
+ GATE_LINK(ACLK_ISP1_PRE, "aclk_isp1_pre", "aclk_isp1_root", ACLK_VI_ROOT, 0, RK3588_CLKGATE_CON(26), 6, GFLAGS),
|
||||
+ GATE_LINK(HCLK_ISP1_PRE, "hclk_isp1_pre", "hclk_isp1_root", HCLK_VI_ROOT, 0, RK3588_CLKGATE_CON(26), 8, GFLAGS),
|
||||
+ GATE_LINK(HCLK_NVM, "hclk_nvm", "hclk_nvm_root", ACLK_NVM_ROOT, RK3588_LINKED_CLK, RK3588_CLKGATE_CON(31), 2, GFLAGS),
|
||||
+ GATE_LINK(ACLK_USB, "aclk_usb", "aclk_usb_root", ACLK_VO1USB_TOP_ROOT, 0, RK3588_CLKGATE_CON(42), 2, GFLAGS),
|
||||
+ GATE_LINK(HCLK_USB, "hclk_usb", "hclk_usb_root", HCLK_VO1USB_TOP_ROOT, 0, RK3588_CLKGATE_CON(42), 3, GFLAGS),
|
||||
+ GATE_LINK(ACLK_JPEG_DECODER_PRE, "aclk_jpeg_decoder_pre", "aclk_jpeg_decoder_root", ACLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(44), 7, GFLAGS),
|
||||
+ GATE_LINK(ACLK_VDPU_LOW_PRE, "aclk_vdpu_low_pre", "aclk_vdpu_low_root", ACLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(44), 5, GFLAGS),
|
||||
+ GATE_LINK(ACLK_RKVENC1_PRE, "aclk_rkvenc1_pre", "aclk_rkvenc1_root", ACLK_RKVENC0, 0, RK3588_CLKGATE_CON(48), 3, GFLAGS),
|
||||
+ GATE_LINK(HCLK_RKVENC1_PRE, "hclk_rkvenc1_pre", "hclk_rkvenc1_root", HCLK_RKVENC0, 0, RK3588_CLKGATE_CON(48), 2, GFLAGS),
|
||||
+ GATE_LINK(HCLK_RKVDEC0_PRE, "hclk_rkvdec0_pre", "hclk_rkvdec0_root", HCLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(40), 5, GFLAGS),
|
||||
+ GATE_LINK(ACLK_RKVDEC0_PRE, "aclk_rkvdec0_pre", "aclk_rkvdec0_root", ACLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(40), 6, GFLAGS),
|
||||
+ GATE_LINK(HCLK_RKVDEC1_PRE, "hclk_rkvdec1_pre", "hclk_rkvdec1_root", HCLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(41), 4, GFLAGS),
|
||||
+ GATE_LINK(ACLK_RKVDEC1_PRE, "aclk_rkvdec1_pre", "aclk_rkvdec1_root", ACLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(41), 5, GFLAGS),
|
||||
+ GATE_LINK(ACLK_HDCP0_PRE, "aclk_hdcp0_pre", "aclk_vo0_root", ACLK_VOP_LOW_ROOT, 0, RK3588_CLKGATE_CON(55), 9, GFLAGS),
|
||||
+ GATE_LINK(HCLK_VO0, "hclk_vo0", "hclk_vo0_root", HCLK_VOP_ROOT, RK3588_LINKED_CLK, RK3588_CLKGATE_CON(55), 5, GFLAGS),
|
||||
+ GATE_LINK(ACLK_HDCP1_PRE, "aclk_hdcp1_pre", "aclk_hdcp1_root", ACLK_VO1USB_TOP_ROOT, 0, RK3588_CLKGATE_CON(59), 6, GFLAGS),
|
||||
+ GATE_LINK(HCLK_VO1, "hclk_vo1", "hclk_vo1_root", HCLK_VO1USB_TOP_ROOT, RK3588_LINKED_CLK, RK3588_CLKGATE_CON(59), 9, GFLAGS),
|
||||
+ GATE_LINK(ACLK_AV1_PRE, "aclk_av1_pre", "aclk_av1_root", ACLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(68), 1, GFLAGS),
|
||||
+ GATE_LINK(PCLK_AV1_PRE, "pclk_av1_pre", "pclk_av1_root", HCLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(68), 4, GFLAGS),
|
||||
+ GATE_LINK(HCLK_SDIO_PRE, "hclk_sdio_pre", "hclk_sdio_root", HCLK_NVM, 0, RK3588_CLKGATE_CON(75), 1, GFLAGS),
|
||||
+ GATE_LINK(PCLK_VO0GRF, "pclk_vo0grf", "pclk_vo0_root", HCLK_VO0, CLK_IGNORE_UNUSED, RK3588_CLKGATE_CON(55), 10, GFLAGS),
|
||||
+ GATE_LINK(PCLK_VO1GRF, "pclk_vo1grf", "pclk_vo1_root", HCLK_VO1, CLK_IGNORE_UNUSED, RK3588_CLKGATE_CON(59), 12, GFLAGS),
|
||||
};
|
||||
|
||||
static void __init rk3588_clk_init(struct device_node *np)
|
||||
@@ -0,0 +1,28 @@
|
||||
From 2a46cd97f401a669d71b3d36b78bd6653f8424ee Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megi@xff.cz>
|
||||
Date: Thu, 19 Oct 2023 18:57:25 +0200
|
||||
Subject: [PATCH] mfd: rk8xx: Add support for standard system-power-controller
|
||||
property
|
||||
|
||||
DT property rockchip,system-power-controller is now deprecated.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||||
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20231019165732.3818789-4-megi@xff.cz
|
||||
Signed-off-by: Lee Jones <lee@kernel.org>
|
||||
---
|
||||
drivers/mfd/rk8xx-core.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/mfd/rk8xx-core.c
|
||||
+++ b/drivers/mfd/rk8xx-core.c
|
||||
@@ -677,7 +677,8 @@ int rk8xx_probe(struct device *dev, int
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "failed to add MFD devices\n");
|
||||
|
||||
- if (device_property_read_bool(dev, "rockchip,system-power-controller")) {
|
||||
+ if (device_property_read_bool(dev, "rockchip,system-power-controller") ||
|
||||
+ device_property_read_bool(dev, "system-power-controller")) {
|
||||
ret = devm_register_sys_off_handler(dev,
|
||||
SYS_OFF_MODE_POWER_OFF_PREPARE, SYS_OFF_PRIO_HIGH,
|
||||
&rk808_power_off, rk808);
|
||||
@@ -0,0 +1,29 @@
|
||||
From b0227e7081404448a0059b8698fdffd2dec280d2 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megi@xff.cz>
|
||||
Date: Thu, 19 Oct 2023 18:57:26 +0200
|
||||
Subject: [PATCH] mfd: rk8xx: Add support for RK806 power off
|
||||
|
||||
Use DEV_OFF bit to power off the RK806 PMIC, when system-power-controller
|
||||
is used in DTS.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||||
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20231019165732.3818789-5-megi@xff.cz
|
||||
Signed-off-by: Lee Jones <lee@kernel.org>
|
||||
---
|
||||
drivers/mfd/rk8xx-core.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/mfd/rk8xx-core.c
|
||||
+++ b/drivers/mfd/rk8xx-core.c
|
||||
@@ -517,6 +517,10 @@ static int rk808_power_off(struct sys_of
|
||||
reg = RK805_DEV_CTRL_REG;
|
||||
bit = DEV_OFF;
|
||||
break;
|
||||
+ case RK806_ID:
|
||||
+ reg = RK806_SYS_CFG3;
|
||||
+ bit = DEV_OFF;
|
||||
+ break;
|
||||
case RK808_ID:
|
||||
reg = RK808_DEVCTRL_REG,
|
||||
bit = DEV_OFF_RST;
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -2034,6 +2034,17 @@
|
||||
@@ -1425,6 +1425,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,35 +1,36 @@
|
||||
From a99f60696caea55f45ba4e288d7c50a4fc95183e Mon Sep 17 00:00:00 2001
|
||||
From dd6dc0c4c1265129c229e26917bf4de1d97ff91f Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
|
||||
Date: Wed, 2 Nov 2022 14:31:56 +0100
|
||||
Subject: [PATCH 24/41] arm64: dts: rockchip: rk3588is: Add AV1 decoder node
|
||||
Date: Fri, 6 Oct 2023 08:53:34 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add AV1 decoder node to rk3588s
|
||||
|
||||
Add node for AV1 video decoder.
|
||||
|
||||
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20231006065334.8117-1-benjamin.gaignard@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -2421,6 +2421,20 @@
|
||||
@@ -2314,6 +2314,19 @@
|
||||
#interrupt-cells = <2>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ av1d: av1d@fdc70000 {
|
||||
+ av1d: video-codec@fdc70000 {
|
||||
+ compatible = "rockchip,rk3588-av1-vpu";
|
||||
+ reg = <0x0 0xfdc70000 0x0 0x800>;
|
||||
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ interrupt-names = "vdpu";
|
||||
+ clocks = <&cru ACLK_AV1>, <&cru PCLK_AV1>;
|
||||
+ clock-names = "aclk", "hclk";
|
||||
+ assigned-clocks = <&cru ACLK_AV1>, <&cru PCLK_AV1>;
|
||||
+ assigned-clock-rates = <400000000>, <400000000>;
|
||||
+ resets = <&cru SRST_A_AV1>, <&cru SRST_P_AV1>, <&cru SRST_A_AV1_BIU>, <&cru SRST_P_AV1_BIU>;
|
||||
+ clocks = <&cru ACLK_AV1>, <&cru PCLK_AV1>;
|
||||
+ clock-names = "aclk", "hclk";
|
||||
+ power-domains = <&power RK3588_PD_AV1>;
|
||||
+ status = "okay";
|
||||
+ resets = <&cru SRST_A_AV1>, <&cru SRST_P_AV1>, <&cru SRST_A_AV1_BIU>, <&cru SRST_P_AV1_BIU>;
|
||||
+ };
|
||||
};
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From 5a6976b1040a2f99ab84eddbfa7cd072ac5d10fc Mon Sep 17 00:00:00 2001
|
||||
From: Sascha Hauer <s.hauer@pengutronix.de>
|
||||
Date: Wed, 18 Oct 2023 08:17:14 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add DFI to rk3588s
|
||||
|
||||
The DFI unit can be used to measure DRAM utilization using perf. Add the
|
||||
node to the device tree. The DFI needs a rockchip,pmu phandle to the pmu
|
||||
containing registers for SDRAM configuration details. This is added in
|
||||
this patch as well.
|
||||
|
||||
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
||||
Link: https://lore.kernel.org/r/20231018061714.3553817-27-s.hauer@pengutronix.de
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -443,6 +443,11 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ pmu1grf: syscon@fd58a000 {
|
||||
+ compatible = "rockchip,rk3588-pmugrf", "syscon", "simple-mfd";
|
||||
+ reg = <0x0 0xfd58a000 0x0 0x10000>;
|
||||
+ };
|
||||
+
|
||||
sys_grf: syscon@fd58c000 {
|
||||
compatible = "rockchip,rk3588-sys-grf", "syscon";
|
||||
reg = <0x0 0xfd58c000 0x0 0x1000>;
|
||||
@@ -1330,6 +1335,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ dfi: dfi@fe060000 {
|
||||
+ reg = <0x00 0xfe060000 0x00 0x10000>;
|
||||
+ compatible = "rockchip,rk3588-dfi";
|
||||
+ interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ interrupt-names = "ch0", "ch1", "ch2", "ch3";
|
||||
+ rockchip,pmu = <&pmu1grf>;
|
||||
+ };
|
||||
+
|
||||
gmac1: ethernet@fe1c0000 {
|
||||
compatible = "rockchip,rk3588-gmac", "snps,dwmac-4.20a";
|
||||
reg = <0x0 0xfe1c0000 0x0 0x10000>;
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4c2162f99fbc0791b85a14ebb2a17c40a18efa7f Mon Sep 17 00:00:00 2001
|
||||
From bbd3778da16b3d448832b843f80bcde1aff26290 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 18 Jul 2023 18:57:15 +0200
|
||||
Subject: [PATCH 14/41] arm64: dts: rockchip: rk3588s: Add USB3 host controller
|
||||
Date: Fri, 20 Oct 2023 16:11:42 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588s: Add USB3 host controller
|
||||
|
||||
RK3588 has three USB3 controllers. This adds the host-only controller,
|
||||
which is using the naneng-combphy shared with PCIe and SATA.
|
||||
@@ -10,14 +10,16 @@ The other two are dual-role and using a different PHY that is not yet
|
||||
supported upstream.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20231020150022.48725-4-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -443,6 +443,27 @@
|
||||
status = "disabled";
|
||||
@@ -448,6 +448,27 @@
|
||||
reg = <0x0 0xfd58a000 0x0 0x10000>;
|
||||
};
|
||||
|
||||
+ usb_host2_xhci: usb@fcd00000 {
|
||||
@@ -0,0 +1,129 @@
|
||||
From 9918d10d16665527e59fdb87c5acac70cc1cfe8f Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Stuebner <heiko.stuebner@cherry.de>
|
||||
Date: Tue, 5 Dec 2023 17:48:39 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: move rk3588 serial aliases to soc dtsi
|
||||
|
||||
The serial ports on rk3588 are named uart0 - uart9. Board schematics
|
||||
also use these exact numbers and we want those names to also reflect
|
||||
in the OS devices because everything else would just cause confusion.
|
||||
|
||||
To prevent each board repeating their list of serial aliases, move them
|
||||
to the soc dtsi, as all previous Rockchip soc do already.
|
||||
|
||||
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
|
||||
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20231205164842.556684-2-heiko@sntech.de
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-edgeble-neu6a-io.dts | 4 ----
|
||||
.../boot/dts/rockchip/rk3588-edgeble-neu6b-io.dts | 4 ----
|
||||
arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts | 1 -
|
||||
.../boot/dts/rockchip/rk3588-orangepi-5-plus.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 2 --
|
||||
.../boot/dts/rockchip/rk3588s-indiedroid-nova.dts | 1 -
|
||||
.../boot/dts/rockchip/rk3588s-khadas-edge2.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 13 +++++++++++++
|
||||
13 files changed, 13 insertions(+), 19 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-io.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-io.dts
|
||||
@@ -12,10 +12,6 @@
|
||||
compatible = "edgeble,neural-compute-module-6a-io",
|
||||
"edgeble,neural-compute-module-6a", "rockchip,rk3588";
|
||||
|
||||
- aliases {
|
||||
- serial2 = &uart2;
|
||||
- };
|
||||
-
|
||||
chosen {
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6b-io.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6b-io.dts
|
||||
@@ -12,10 +12,6 @@
|
||||
compatible = "edgeble,neural-compute-module-6b-io",
|
||||
"edgeble,neural-compute-module-6b", "rockchip,rk3588";
|
||||
|
||||
- aliases {
|
||||
- serial2 = &uart2;
|
||||
- };
|
||||
-
|
||||
chosen {
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
aliases {
|
||||
mmc0 = &sdhci;
|
||||
- serial2 = &uart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -12,7 +12,6 @@
|
||||
aliases {
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
- serial2 = &uart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
|
||||
@@ -15,7 +15,6 @@
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
mmc2 = &sdio;
|
||||
- serial2 = &uart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
aliases {
|
||||
mmc0 = &sdhci;
|
||||
- serial2 = &uart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -14,7 +14,6 @@
|
||||
aliases {
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
- serial2 = &uart2;
|
||||
};
|
||||
|
||||
analog-sound {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -18,6 +18,19 @@
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
+ aliases {
|
||||
+ serial0 = &uart0;
|
||||
+ serial1 = &uart1;
|
||||
+ serial2 = &uart2;
|
||||
+ serial3 = &uart3;
|
||||
+ serial4 = &uart4;
|
||||
+ serial5 = &uart5;
|
||||
+ serial6 = &uart6;
|
||||
+ serial7 = &uart7;
|
||||
+ serial8 = &uart8;
|
||||
+ serial9 = &uart9;
|
||||
+ };
|
||||
+
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@@ -0,0 +1,38 @@
|
||||
From 328e901b7b03d292c1520ffb38e9164feef4f1ea Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Stuebner <heiko.stuebner@cherry.de>
|
||||
Date: Tue, 5 Dec 2023 17:48:40 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: add rk3588 i2c aliases to soc dtsi
|
||||
|
||||
The i2c controllers on rk3588 are named i2c0 - i2c8. Board schematics
|
||||
also use these exact numbers and we want those names to also reflect
|
||||
in the OS devices because everything else would just cause confusion.
|
||||
Userspace i2c access is a thing afterall.
|
||||
|
||||
To prevent each board repeating their list of i2c aliases, define them
|
||||
in the soc dtsi, as all previous Rockchip soc do already.
|
||||
|
||||
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
|
||||
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20231205164842.556684-3-heiko@sntech.de
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -19,6 +19,15 @@
|
||||
#size-cells = <2>;
|
||||
|
||||
aliases {
|
||||
+ i2c0 = &i2c0;
|
||||
+ i2c1 = &i2c1;
|
||||
+ i2c2 = &i2c2;
|
||||
+ i2c3 = &i2c3;
|
||||
+ i2c4 = &i2c4;
|
||||
+ i2c5 = &i2c5;
|
||||
+ i2c6 = &i2c6;
|
||||
+ i2c7 = &i2c7;
|
||||
+ i2c8 = &i2c8;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
serial2 = &uart2;
|
||||
@@ -0,0 +1,34 @@
|
||||
From a024abedbca99a20aeb96f5beec9ded13c85dcb3 Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Stuebner <heiko.stuebner@cherry.de>
|
||||
Date: Tue, 5 Dec 2023 17:48:41 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: add rk3588 gpio aliases to soc dtsi
|
||||
|
||||
The gpio controllers on rk3588 are named gpio0 - gpio4. Board schematics
|
||||
also use these exact numbers and we want those names to also reflect
|
||||
in the OS devices because everything else would just cause confusion.
|
||||
Userspace gpio access is a thing afterall.
|
||||
|
||||
To prevent each board repeating their list of gpio aliases, define them
|
||||
in the soc dtsi, as previous Rockchip soc like the rk356x do already.
|
||||
|
||||
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
|
||||
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20231205164842.556684-4-heiko@sntech.de
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -19,6 +19,11 @@
|
||||
#size-cells = <2>;
|
||||
|
||||
aliases {
|
||||
+ gpio0 = &gpio0;
|
||||
+ gpio1 = &gpio1;
|
||||
+ gpio2 = &gpio2;
|
||||
+ gpio3 = &gpio3;
|
||||
+ gpio4 = &gpio4;
|
||||
i2c0 = &i2c0;
|
||||
i2c1 = &i2c1;
|
||||
i2c2 = &i2c2;
|
||||
@@ -0,0 +1,34 @@
|
||||
From a86e88043de929da76f7f6cf0990ba92aed8391a Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Stuebner <heiko.stuebner@cherry.de>
|
||||
Date: Tue, 5 Dec 2023 17:48:42 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: add rk3588 spi aliases to soc dtsi
|
||||
|
||||
The spi controllers on rk3588 are named spi0 - spi4. Board schematics
|
||||
also use these exact numbers and we want those names to also reflect
|
||||
in the OS devices because everything else would just cause confusion.
|
||||
Userspace spi access is a thing afterall.
|
||||
|
||||
To prevent each board repeating their list of spi aliases, define them
|
||||
in the soc dtsi, as previous Rockchip soc like the rk356x do already.
|
||||
|
||||
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
|
||||
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
|
||||
Link: https://lore.kernel.org/r/20231205164842.556684-5-heiko@sntech.de
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -43,6 +43,11 @@
|
||||
serial7 = &uart7;
|
||||
serial8 = &uart8;
|
||||
serial9 = &uart9;
|
||||
+ spi0 = &spi0;
|
||||
+ spi1 = &spi1;
|
||||
+ spi2 = &spi2;
|
||||
+ spi3 = &spi3;
|
||||
+ spi4 = &spi4;
|
||||
};
|
||||
|
||||
cpus {
|
||||
@@ -0,0 +1,120 @@
|
||||
From d895dbef3f3a31ab50491bb48552e798cf555987 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Yan <andy.yan@rock-chips.com>
|
||||
Date: Mon, 11 Dec 2023 20:00:04 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add vop on rk3588
|
||||
|
||||
Add vop dt node for rk3588.
|
||||
|
||||
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
|
||||
Link: https://lore.kernel.org/r/20231211120004.1785616-1-andyshrk@163.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 83 +++++++++++++++++++++++
|
||||
1 file changed, 83 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -394,6 +394,11 @@
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
+ display_subsystem: display-subsystem {
|
||||
+ compatible = "rockchip,display-subsystem";
|
||||
+ ports = <&vop_out>;
|
||||
+ };
|
||||
+
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
@@ -506,6 +511,16 @@
|
||||
reg = <0x0 0xfd58c000 0x0 0x1000>;
|
||||
};
|
||||
|
||||
+ vop_grf: syscon@fd5a4000 {
|
||||
+ compatible = "rockchip,rk3588-vop-grf", "syscon";
|
||||
+ reg = <0x0 0xfd5a4000 0x0 0x2000>;
|
||||
+ };
|
||||
+
|
||||
+ vo1_grf: syscon@fd5a8000 {
|
||||
+ compatible = "rockchip,rk3588-vo-grf", "syscon";
|
||||
+ reg = <0x0 0xfd5a8000 0x0 0x100>;
|
||||
+ };
|
||||
+
|
||||
php_grf: syscon@fd5b0000 {
|
||||
compatible = "rockchip,rk3588-php-grf", "syscon";
|
||||
reg = <0x0 0xfd5b0000 0x0 0x1000>;
|
||||
@@ -625,6 +640,74 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ vop: vop@fdd90000 {
|
||||
+ compatible = "rockchip,rk3588-vop";
|
||||
+ reg = <0x0 0xfdd90000 0x0 0x4200>, <0x0 0xfdd95000 0x0 0x1000>;
|
||||
+ reg-names = "vop", "gamma-lut";
|
||||
+ interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ clocks = <&cru ACLK_VOP>,
|
||||
+ <&cru HCLK_VOP>,
|
||||
+ <&cru DCLK_VOP0>,
|
||||
+ <&cru DCLK_VOP1>,
|
||||
+ <&cru DCLK_VOP2>,
|
||||
+ <&cru DCLK_VOP3>,
|
||||
+ <&cru PCLK_VOP_ROOT>;
|
||||
+ clock-names = "aclk",
|
||||
+ "hclk",
|
||||
+ "dclk_vp0",
|
||||
+ "dclk_vp1",
|
||||
+ "dclk_vp2",
|
||||
+ "dclk_vp3",
|
||||
+ "pclk_vop";
|
||||
+ iommus = <&vop_mmu>;
|
||||
+ power-domains = <&power RK3588_PD_VOP>;
|
||||
+ rockchip,grf = <&sys_grf>;
|
||||
+ rockchip,vop-grf = <&vop_grf>;
|
||||
+ rockchip,vo1-grf = <&vo1_grf>;
|
||||
+ rockchip,pmu = <&pmu>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ vop_out: ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ vp0: port@0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ vp1: port@1 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+
|
||||
+ vp2: port@2 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <2>;
|
||||
+ };
|
||||
+
|
||||
+ vp3: port@3 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <3>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vop_mmu: iommu@fdd97e00 {
|
||||
+ compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu";
|
||||
+ reg = <0x0 0xfdd97e00 0x0 0x100>, <0x0 0xfdd97f00 0x0 0x100>;
|
||||
+ interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>;
|
||||
+ clock-names = "aclk", "iface";
|
||||
+ #iommu-cells = <0>;
|
||||
+ power-domains = <&power RK3588_PD_VOP>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
uart0: serial@fd890000 {
|
||||
compatible = "rockchip,rk3588-uart", "snps,dw-apb-uart";
|
||||
reg = <0x0 0xfd890000 0x0 0x100>;
|
||||
@@ -0,0 +1,25 @@
|
||||
From 2047366b9eff8fada2a118588b0478de6e92d02c Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Stuebner <heiko@sntech.de>
|
||||
Date: Tue, 27 Feb 2024 22:05:21 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: add clock to vo1-grf syscon on rk3588
|
||||
|
||||
The VO*-general-register-files need a clock, so add the correct one.
|
||||
|
||||
Cc: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
Link: https://lore.kernel.org/r/20240227210521.724754-1-heiko@sntech.de
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -519,6 +519,7 @@
|
||||
vo1_grf: syscon@fd5a8000 {
|
||||
compatible = "rockchip,rk3588-vo-grf", "syscon";
|
||||
reg = <0x0 0xfd5a8000 0x0 0x100>;
|
||||
+ clocks = <&cru PCLK_VO1GRF>;
|
||||
};
|
||||
|
||||
php_grf: syscon@fd5b0000 {
|
||||
@@ -1,28 +1,30 @@
|
||||
From 1f538925b863f9b0fdd1c24570565e8e4985b8a0 Mon Sep 17 00:00:00 2001
|
||||
From 86a2024d95e259c4309ced53242c0db6d993320b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Mon, 17 Apr 2023 21:13:03 +0200
|
||||
Subject: [PATCH 07/41] arm64: dts: rockchip: rk3588-evb1: add PCIe2 network
|
||||
controller
|
||||
Date: Mon, 18 Sep 2023 16:13:26 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: add PCIe2 network controller to
|
||||
rk3588-evb1
|
||||
|
||||
The RK3588 EVB1 has a second network card, which is connected
|
||||
via PCIe2. This adds support for that.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20230918141327.131108-2-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 43 +++++++++++++++++++
|
||||
1 file changed, 43 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -29,6 +29,26 @@
|
||||
@@ -28,6 +28,26 @@
|
||||
pwms = <&pwm2 0 25000 0>;
|
||||
};
|
||||
|
||||
+ pcie20_avdd0v85: pcie20-avdd0v85-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "pcie20_avdd0v85";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <850000>;
|
||||
+ regulator-max-microvolt = <850000>;
|
||||
+ vin-supply = <&avdd_0v85_s0>;
|
||||
@@ -31,8 +33,8 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ pcie20_avdd1v8: pcie20-avdd1v8-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "pcie20_avdd1v8";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ vin-supply = <&avcc_1v8_s0>;
|
||||
@@ -41,7 +43,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
vcc12v_dcin: vcc12v-dcin-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc12v_dcin";
|
||||
@@ -87,6 +107,10 @@
|
||||
@@ -86,6 +106,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -52,7 +54,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
@@ -163,7 +187,20 @@
|
||||
@@ -162,7 +186,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -73,7 +75,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
rtl8211f {
|
||||
rtl8211f_rst: rtl8211f-rst {
|
||||
rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
@@ -177,6 +214,12 @@
|
||||
@@ -176,6 +213,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
From b7295c0349ff35a32c37e9429e3359d12f3ecf0b Mon Sep 17 00:00:00 2001
|
||||
From 46bb398ea1d81302e3735087ceb4b5763d5afc29 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 11 Jul 2023 17:20:47 +0200
|
||||
Subject: [PATCH 08/41] arm64: dts: rockchip: rk3588-evb1: add PCIe3 bus
|
||||
Date: Mon, 18 Sep 2023 16:13:27 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: add PCIe3 bus to rk3588-evb1
|
||||
|
||||
Enable PCIe3 support, which is exposed via a PCIe3 connector.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20230918141327.131108-3-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 55 +++++++++++++++++++
|
||||
1 file changed, 55 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -49,6 +49,26 @@
|
||||
@@ -48,6 +48,26 @@
|
||||
vin-supply = <&avcc_1v8_s0>;
|
||||
};
|
||||
|
||||
+ pcie30_avdd0v75: pcie30-avdd0v75-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "pcie30_avdd0v75";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <750000>;
|
||||
+ vin-supply = <&avdd_0v75_s0>;
|
||||
@@ -29,8 +31,8 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ pcie30_avdd1v8: pcie30-avdd1v8-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "pcie30_avdd1v8";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ vin-supply = <&avcc_1v8_s0>;
|
||||
@@ -39,7 +41,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
vcc12v_dcin: vcc12v-dcin-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc12v_dcin";
|
||||
@@ -58,6 +78,19 @@
|
||||
@@ -57,6 +77,19 @@
|
||||
regulator-max-microvolt = <12000000>;
|
||||
};
|
||||
|
||||
@@ -59,7 +61,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
vcc5v0_host: vcc5v0-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_host";
|
||||
@@ -194,6 +227,18 @@
|
||||
@@ -193,6 +226,18 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -78,7 +80,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&pinctrl {
|
||||
rtl8111 {
|
||||
rtl8111_isolate: rtl8111-isolate {
|
||||
@@ -220,6 +265,16 @@
|
||||
@@ -219,6 +264,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
From ef797eb4e048d16933591802500295a3612b60f8 Mon Sep 17 00:00:00 2001
|
||||
From afa933c208e5ea9ddf8adb460e273b2b1aba85e5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 21 Jul 2023 15:47:00 +0200
|
||||
Subject: [PATCH 34/41] arm64: dts: rockchip: rk3588-evb1: add ADC buttons
|
||||
Date: Thu, 5 Oct 2023 15:43:57 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: add ADC buttons to rk3588-evb1
|
||||
|
||||
The Rockchip EVB1 has a couple of buttons connected via an ADC
|
||||
line. Let's add them to its devicetree.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20231005134357.37171-1-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 38 +++++++++++++++++++
|
||||
1 file changed, 38 insertions(+)
|
||||
@@ -19,9 +21,9 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/usb/pd.h>
|
||||
#include "rk3588.dtsi"
|
||||
@@ -24,6 +25,38 @@
|
||||
|
||||
@@ -22,6 +23,38 @@
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
|
||||
@@ -60,7 +62,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
power-supply = <&vcc12v_dcin>;
|
||||
@@ -367,6 +400,11 @@
|
||||
@@ -285,6 +318,11 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From fc4657971be31ae679e2bbeee2fb8e93a7a063eb Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Wed, 17 Jan 2024 20:14:48 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: mark system power controller on rk3588-evb1
|
||||
|
||||
Mark the primary PMIC as system-power-controller, so that the
|
||||
system properly shuts down on poweroff.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20240117191555.86138-1-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -654,6 +654,7 @@
|
||||
<&rk806_slave_dvs3_null>;
|
||||
pinctrl-names = "default";
|
||||
spi-max-frequency = <1000000>;
|
||||
+ system-power-controller;
|
||||
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
@@ -1,22 +1,24 @@
|
||||
From 4933b279c701287de5788581ae5a2f662b700ebb Mon Sep 17 00:00:00 2001
|
||||
From 0773a4a199aabb60afe50f5a19a6772abf4ad0bf Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 21 Jul 2023 15:19:37 +0200
|
||||
Subject: [PATCH 16/41] arm64: dts: rockchip: rk3588s-rock5a: add USB3 host
|
||||
Date: Mon, 6 Nov 2023 16:54:32 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: add USB3 host to rock-5a
|
||||
|
||||
Enable USB3 host controller for the Radxa ROCK 5 Model A. This adds
|
||||
USB3 for the lower USB3 port (the one closer to the PCB).
|
||||
|
||||
The upper USB3 port uses the RK3588 USB TypeC host controller, which
|
||||
uses a different PHY that is not yet supported upstream.
|
||||
use a different PHY without upstream support.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20231106155934.80838-2-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -114,6 +114,10 @@
|
||||
@@ -113,6 +113,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -27,7 +29,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
@@ -734,3 +738,7 @@
|
||||
@@ -733,3 +737,7 @@
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -1,20 +1,21 @@
|
||||
From 7d2e3eded0118612014961b6e8c2a3dd2e9daee0 Mon Sep 17 00:00:00 2001
|
||||
From 42145b7a823530f57983fb6e6897f40c0be278d5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 28 Feb 2023 14:40:59 +0000
|
||||
Subject: [PATCH 09/41] arm64: dts: rockchip: rock-5b: add PCIe network
|
||||
controller
|
||||
Date: Mon, 18 Sep 2023 16:14:49 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: add PCIe network controller to rock-5b
|
||||
|
||||
Enable the RTL8125 network controller, which is connected via
|
||||
PCIe.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20230918141451.131247-2-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 27 +++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -44,6 +44,15 @@
|
||||
@@ -43,6 +43,15 @@
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
@@ -30,7 +31,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
vcc5v0_host: vcc5v0-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_host";
|
||||
@@ -78,6 +87,10 @@
|
||||
@@ -77,6 +86,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -41,22 +42,22 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
@@ -204,6 +217,14 @@
|
||||
@@ -203,6 +216,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&pcie2x1l2 {
|
||||
+ reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie2_2_rst>;
|
||||
+ reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&pinctrl {
|
||||
hym8563 {
|
||||
hym8563_int: hym8563-int {
|
||||
@@ -217,6 +238,12 @@
|
||||
@@ -216,6 +237,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,39 +1,41 @@
|
||||
From f979867857a275629d365ca5f4db1148a9879176 Mon Sep 17 00:00:00 2001
|
||||
From 199cbd5f195adbc0e70ad218cdba82f45750f11b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 14 Jul 2023 19:19:29 +0200
|
||||
Subject: [PATCH 10/41] arm64: dts: rockchip: rock-5b: add PCIe for M.2 M-key
|
||||
Date: Mon, 18 Sep 2023 16:14:50 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: add PCIe for M.2 M-key to rock-5b
|
||||
|
||||
The Radxa Rock 5B has PCIe 3x4 routed to its M.2 M-key connector
|
||||
on the board's back.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20230918141451.131247-3-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 35 +++++++++++++++++++
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -53,6 +53,19 @@
|
||||
@@ -52,6 +52,19 @@
|
||||
vin-supply = <&vcc_3v3_s3>;
|
||||
};
|
||||
|
||||
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie3_vcc3v3_en>;
|
||||
+ regulator-name = "vcc3v3_pcie30";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ enable-active-high;
|
||||
+ gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
|
||||
+ startup-delay-us = <5000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie3_vcc3v3_en>;
|
||||
+ };
|
||||
+
|
||||
vcc5v0_host: vcc5v0-host-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_host";
|
||||
@@ -225,6 +238,18 @@
|
||||
@@ -224,6 +237,18 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -42,17 +44,17 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+};
|
||||
+
|
||||
+&pcie3x4 {
|
||||
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie30>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie3_rst>;
|
||||
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie30>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&pinctrl {
|
||||
hym8563 {
|
||||
hym8563_int: hym8563-int {
|
||||
@@ -244,6 +269,16 @@
|
||||
@@ -243,6 +268,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,33 +1,35 @@
|
||||
From c6b2b27433180b30e0756f228f0cf4b4b9d5ac5a Mon Sep 17 00:00:00 2001
|
||||
From da447ec387800bdf2df1fb1d8c1522991d025952 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 21 Jul 2023 17:43:58 +0200
|
||||
Subject: [PATCH 11/41] arm64: dts: rockchip: rock-5b: add PCIe for M.2 E-Key
|
||||
Date: Mon, 18 Sep 2023 16:14:51 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: add PCIe for M.2 E-Key to rock-5b
|
||||
|
||||
Enable PCIe2_0 controller and its voltage supply, which is routed
|
||||
to the M.2 E-Key on the upper side of the Radxa Rock 5B.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20230918141451.131247-4-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 35 +++++++++++++++++++
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -44,6 +44,21 @@
|
||||
@@ -43,6 +43,21 @@
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
+ vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_pcie2x1l0";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ enable-active-high;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie2_0_vcc3v3_en>;
|
||||
+ regulator-name = "vcc3v3_pcie2x1l0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <50000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
@@ -35,7 +37,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
vcc3v3_pcie2x1l2: vcc3v3-pcie2x1l2-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_pcie2x1l2";
|
||||
@@ -104,6 +119,10 @@
|
||||
@@ -103,6 +118,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -46,22 +48,22 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
@@ -230,6 +249,14 @@
|
||||
@@ -229,6 +248,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&pcie2x1l0 {
|
||||
+ reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie2_0_rst>;
|
||||
+ reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&pcie2x1l2 {
|
||||
reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
|
||||
@@ -264,6 +291,14 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie2_2_rst>;
|
||||
@@ -263,6 +290,14 @@
|
||||
};
|
||||
|
||||
pcie2 {
|
||||
@@ -0,0 +1,93 @@
|
||||
From 1c9a53ff7ece056eb995332f0d9523ca43fdcb5a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tam=C3=A1s=20Sz=C5=B1cs?= <tszucs@protonmail.ch>
|
||||
Date: Sun, 24 Sep 2023 20:37:45 +0000
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add sdio node to rock-5b
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Enable SDIO on Radxa ROCK 5 Model B M.2 Key E. Add sdio node and alias as mmc2.
|
||||
Add regulator for the 3.3 V rail bringing it up during boot. Make sure EKEY_EN
|
||||
is muxed as GPIO.
|
||||
|
||||
Signed-off-by: Tamás Szűcs <tszucs@protonmail.ch>
|
||||
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20230924203740.65744-1-tszucs@protonmail.ch
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 43 +++++++++++++++++++
|
||||
1 file changed, 43 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -12,6 +12,7 @@
|
||||
aliases {
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
+ mmc2 = &sdio;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -112,6 +113,21 @@
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
+
|
||||
+ vcc3v3_wf: vcc3v3-wf-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_wf";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ enable-active-high;
|
||||
+ gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc3v3_wf_en>;
|
||||
+ startup-delay-us = <50000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
@@ -318,6 +334,12 @@
|
||||
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ m2e {
|
||||
+ vcc3v3_wf_en: vcc3v3-wf-en {
|
||||
+ rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pwm1 {
|
||||
@@ -354,6 +376,27 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&sdio {
|
||||
+ max-frequency = <200000000>;
|
||||
+ no-sd;
|
||||
+ no-mmc;
|
||||
+ non-removable;
|
||||
+ bus-width = <4>;
|
||||
+ cap-sdio-irq;
|
||||
+ disable-wp;
|
||||
+ keep-power-in-suspend;
|
||||
+ wakeup-source;
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc3v3_wf>;
|
||||
+ vqmmc-supply = <&vcc_1v8_s3>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdiom0_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
assigned-clocks = <&cru CLK_SPI2>;
|
||||
@@ -0,0 +1,65 @@
|
||||
From 0002c377e862140ad65b67b8b9dbf086d4578f95 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tam=C3=A1s=20Sz=C5=B1cs?= <tszucs@protonmail.ch>
|
||||
Date: Wed, 11 Oct 2023 18:18:05 +0000
|
||||
Subject: [PATCH] arm64: dts: rockchip: Remove duplicate regulator vcc3v3_wf
|
||||
from rock-5b
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Regulator for VCC3V3_WF has been added as vcc3v3_pcie2x1l0 first. Clean this up.
|
||||
|
||||
Fixes: 1c9a53ff7ece ("arm64: dts: rockchip: Add sdio node to rock-5b")
|
||||
Signed-off-by: Tamás Szűcs <tszucs@protonmail.ch>
|
||||
Link: https://lore.kernel.org/r/20231011181757.58047-1-tszucs@protonmail.ch
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 23 +------------------
|
||||
1 file changed, 1 insertion(+), 22 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -113,21 +113,6 @@
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
-
|
||||
- vcc3v3_wf: vcc3v3-wf-regulator {
|
||||
- compatible = "regulator-fixed";
|
||||
- regulator-name = "vcc3v3_wf";
|
||||
- regulator-always-on;
|
||||
- regulator-boot-on;
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
- enable-active-high;
|
||||
- gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&vcc3v3_wf_en>;
|
||||
- startup-delay-us = <50000>;
|
||||
- vin-supply = <&vcc5v0_sys>;
|
||||
- };
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
@@ -334,12 +319,6 @@
|
||||
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
-
|
||||
- m2e {
|
||||
- vcc3v3_wf_en: vcc3v3-wf-en {
|
||||
- rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
- };
|
||||
- };
|
||||
};
|
||||
|
||||
&pwm1 {
|
||||
@@ -390,7 +369,7 @@
|
||||
sd-uhs-sdr25;
|
||||
sd-uhs-sdr50;
|
||||
sd-uhs-sdr104;
|
||||
- vmmc-supply = <&vcc3v3_wf>;
|
||||
+ vmmc-supply = <&vcc3v3_pcie2x1l0>;
|
||||
vqmmc-supply = <&vcc_1v8_s3>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdiom0_pins>;
|
||||
@@ -0,0 +1,32 @@
|
||||
From a6169ab369236f15c79b45037074a2567d30b037 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tam=C3=A1s=20Sz=C5=B1cs?= <szucst@iit.uni-miskolc.hu>
|
||||
Date: Fri, 13 Oct 2023 23:51:53 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Enable UART6 on rock-5b
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Enable UART lines on Radxa ROCK 5 Model B M.2 Key E.
|
||||
|
||||
Signed-off-by: Tamás Szűcs <szucst@iit.uni-miskolc.hu>
|
||||
Link: https://lore.kernel.org/r/20231013215208.81345-1-szucst@iit.uni-miskolc.hu
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -376,6 +376,12 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&uart6 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart6m1_xfer &uart6m1_ctsn &uart6m1_rtsn>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&spi2 {
|
||||
status = "okay";
|
||||
assigned-clocks = <&cru CLK_SPI2>;
|
||||
@@ -1,11 +1,13 @@
|
||||
From dc551c258ec6bcb550f6d06df6a34b3455bacdc5 Mon Sep 17 00:00:00 2001
|
||||
From 7952cbbda301f7d297c6ac761f9dfafb90205358 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 21 Jul 2023 15:34:28 +0200
|
||||
Subject: [PATCH 33/41] arm64: dts: rockchip: add status LED to rock-5b
|
||||
Date: Thu, 5 Oct 2023 15:40:37 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: add status LED to rock-5b
|
||||
|
||||
Describe the Rock 5B status LED in its device tree.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20231005134037.33231-1-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 20 +++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
@@ -40,7 +42,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
fan: pwm-fan {
|
||||
compatible = "pwm-fan";
|
||||
cooling-levels = <0 95 145 195 255>;
|
||||
@@ -296,6 +310,12 @@
|
||||
@@ -284,6 +298,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
From 1a67b0d41f4a0b867789cf2503291fc497c6ff81 Mon Sep 17 00:00:00 2001
|
||||
From f97d78b9f6cff4c680206a8c8b03f726f0dc2c8b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Wed, 19 Jul 2023 15:56:42 +0200
|
||||
Subject: [PATCH 15/41] arm64: dts: rockchip: rk3588-rock5b: add USB3 host
|
||||
Date: Mon, 6 Nov 2023 16:54:31 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: add USB3 host to rock-5b
|
||||
|
||||
Enable USB3 host controller for the Radxa ROCK 5 Model B. This adds
|
||||
USB3 for the upper USB3 port (the one further away from the PCB).
|
||||
|
||||
The lower USB3 (closer to the PCB) and the USB-C ports use the RK3588
|
||||
USB TypeC host controller, which use a different PHY that is not yet
|
||||
supported upstream.
|
||||
The lower USB3 and the USB-C ports use the RK3588 USB TypeC host
|
||||
controller, which use a different PHY without upstream support.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20231106155934.80838-1-sebastian.reichel@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -123,6 +123,10 @@
|
||||
@@ -137,6 +137,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -28,7 +29,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
@@ -717,3 +721,7 @@
|
||||
@@ -764,3 +768,7 @@
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
From 7738f551173540b3daa63a91b384b167eacd24fd Mon Sep 17 00:00:00 2001
|
||||
From: John Clark <inindev@gmail.com>
|
||||
Date: Mon, 25 Dec 2023 22:28:19 +0000
|
||||
Subject: [PATCH] arm64: dts: rockchip: support poweroff on the rock-5b
|
||||
|
||||
Allow the rock-5b to poweroff its pmic. When issuing a "shutdown -h now"
|
||||
on the rock-5b it reboots instead. Defining 'system-power-controller'
|
||||
allows the rk806 to power down.
|
||||
|
||||
Commit c699fbfdfd54 ("arm64: dts: rockchip: Support poweroff on
|
||||
NanoPC-T6") similarly resolves this issue for the nanopc-t6.
|
||||
|
||||
Signed-off-by: John Clark <inindev@gmail.com>
|
||||
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20231225222859.17153-1-inindev@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -426,6 +426,8 @@
|
||||
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
|
||||
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
|
||||
|
||||
+ system-power-controller;
|
||||
+
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
vcc3-supply = <&vcc5v0_sys>;
|
||||
@@ -0,0 +1,27 @@
|
||||
From aed6514c4e3aee843385ded4c5ee0921b51c30fa Mon Sep 17 00:00:00 2001
|
||||
From: John Clark <inindev@gmail.com>
|
||||
Date: Mon, 25 Dec 2023 22:28:20 +0000
|
||||
Subject: [PATCH] arm64: dts: rockchip: correct gpio_pwrctrl1 typo on rock-5b
|
||||
|
||||
Both rk806_dvs1_null and rk806_dvs2_null duplicate gpio_pwrctrl2 and
|
||||
gpio_pwrctrl1 is not set. This patch sets gpio_pwrctrl1.
|
||||
|
||||
Signed-off-by: John Clark <inindev@gmail.com>
|
||||
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20231225222859.17153-2-inindev@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -448,7 +448,7 @@
|
||||
#gpio-cells = <2>;
|
||||
|
||||
rk806_dvs1_null: dvs1-null-pins {
|
||||
- pins = "gpio_pwrctrl2";
|
||||
+ pins = "gpio_pwrctrl1";
|
||||
function = "pin_fun0";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 82d40b141a4c7ab6608a84a5ce0c58b747cb7163 Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Charkov <alchark@gmail.com>
|
||||
Date: Sun, 7 Jan 2024 00:26:45 +0400
|
||||
Subject: [PATCH] arm64: dts: rockchip: add rfkill node for M.2 Key E WiFi on rock-5b
|
||||
|
||||
By default the GPIO pin that connects to the WiFi enable signal
|
||||
inside the M.2 Key E slot is driven low, resulting in impossibility
|
||||
to connect to any network. Add a DT node to expose it as an RFKILL
|
||||
device, which lets the WiFi driver or userspace toggle it as
|
||||
required.
|
||||
|
||||
Signed-off-by: Alexey Charkov <alchark@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20240106202650.22310-1-alchark@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -58,6 +58,13 @@
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
+ rfkill {
|
||||
+ compatible = "rfkill-gpio";
|
||||
+ label = "rfkill-pcie-wlan";
|
||||
+ radio-type = "wlan";
|
||||
+ shutdown-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
@@ -0,0 +1,693 @@
|
||||
From b6bc755d806eac3fbddb7ea278fc7d2eb57dba4a Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@6tel.net>
|
||||
Date: Mon, 9 Oct 2023 22:27:27 +0300
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add Orange Pi 5
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add initial support for OPi5 that includes support for USB2, PCIe2, Sata,
|
||||
Sdmmc, SPI Flash, PMIC.
|
||||
|
||||
Signed-off-by: Muhammed Efe Cetin <efectn@6tel.net>
|
||||
Reviewed-by: Ondřej Jirman <megi@xff.cz>
|
||||
Link: https://lore.kernel.org/r/4212da199c9c532b60d380bf1dfa83490e16bc13.1696878787.git.efectn@6tel.net
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 1 +
|
||||
.../boot/dts/rockchip/rk3588s-orangepi-5.dts | 662 ++++++++++++++++++
|
||||
2 files changed, 663 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -105,3 +105,4 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ro
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-indiedroid-nova.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-khadas-edge2.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts
|
||||
@@ -0,0 +1,662 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include "rk3588s.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Xunlong Orange Pi 5";
|
||||
+ compatible = "xunlong,orangepi-5", "rockchip,rk3588s";
|
||||
+
|
||||
+ aliases {
|
||||
+ mmc0 = &sdmmc;
|
||||
+ serial2 = &uart2;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ adc-keys {
|
||||
+ compatible = "adc-keys";
|
||||
+ io-channels = <&saradc 1>;
|
||||
+ io-channel-names = "buttons";
|
||||
+ keyup-threshold-microvolt = <1800000>;
|
||||
+ poll-interval = <100>;
|
||||
+
|
||||
+ button-recovery {
|
||||
+ label = "Recovery";
|
||||
+ linux,code = <KEY_VENDOR>;
|
||||
+ press-threshold-microvolt = <1800>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 =<&leds_gpio>;
|
||||
+
|
||||
+ led-1 {
|
||||
+ gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "status_led";
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vbus_typec: vbus-typec-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&typec5v_pwren>;
|
||||
+ regulator-name = "vbus_typec";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3_sd_s0: vcc-3v3-sd-s0-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-low;
|
||||
+ gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
|
||||
+ regulator-name = "vcc_3v3_sd_s0";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&vcc_3v3_s3>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pcie20: vcc3v3-pcie20-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
+ regulator-name = "vcc3v3_pcie20";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ startup-delay-us = <50000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&combphy0_ps {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy2_psu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&cpu_b0 {
|
||||
+ cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b1 {
|
||||
+ cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b2 {
|
||||
+ cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b3 {
|
||||
+ cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l0 {
|
||||
+ cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l1 {
|
||||
+ cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l2 {
|
||||
+ cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l3 {
|
||||
+ cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+};
|
||||
+
|
||||
+&gmac1 {
|
||||
+ clock_in_out = "output";
|
||||
+ phy-handle = <&rgmii_phy1>;
|
||||
+ phy-mode = "rgmii-rxid";
|
||||
+ pinctrl-0 = <&gmac1_miim
|
||||
+ &gmac1_tx_bus2
|
||||
+ &gmac1_rx_bus2
|
||||
+ &gmac1_rgmii_clk
|
||||
+ &gmac1_rgmii_bus>;
|
||||
+ pinctrl-names = "default";
|
||||
+ tx_delay = <0x42>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c0m2_xfer>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu_big0_s0: regulator@42 {
|
||||
+ compatible = "rockchip,rk8602";
|
||||
+ reg = <0x42>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_cpu_big0_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <550000>;
|
||||
+ regulator-max-microvolt = <1050000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpu_big1_s0: regulator@43 {
|
||||
+ compatible = "rockchip,rk8603", "rockchip,rk8602";
|
||||
+ reg = <0x43>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_cpu_big1_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <550000>;
|
||||
+ regulator-max-microvolt = <1050000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_npu_s0: regulator@42 {
|
||||
+ compatible = "rockchip,rk8602";
|
||||
+ reg = <0x42>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_npu_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <550000>;
|
||||
+ regulator-max-microvolt = <950000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c6 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c6m3_xfer>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ hym8563: rtc@51 {
|
||||
+ compatible = "haoyu,hym8563";
|
||||
+ reg = <0x51>;
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-output-names = "hym8563";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hym8563_int>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ wakeup-source;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mdio1 {
|
||||
+ rgmii_phy1: ethernet-phy@1 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <0x1>;
|
||||
+ reset-assert-us = <20000>;
|
||||
+ reset-deassert-us = <100000>;
|
||||
+ reset-gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie2x1l2 {
|
||||
+ reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie20>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ gpio-func {
|
||||
+ leds_gpio: leds-gpio {
|
||||
+ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ hym8563 {
|
||||
+ hym8563_int: hym8563-int {
|
||||
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb-typec {
|
||||
+ usbc0_int: usbc0-int {
|
||||
+ rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+
|
||||
+ typec5v_pwren: typec5v-pwren {
|
||||
+ rockchip,pins = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&avcc_1v8_s0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ disable-wp;
|
||||
+ max-frequency = <150000000>;
|
||||
+ no-mmc;
|
||||
+ no-sdio;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc_3v3_sd_s0>;
|
||||
+ vqmmc-supply = <&vccio_sd_s0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sfc {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&fspim0_pins>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ flash@0 {
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ reg = <0x0>;
|
||||
+ spi-max-frequency = <100000000>;
|
||||
+ spi-rx-bus-width = <4>;
|
||||
+ spi-tx-bus-width = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi2 {
|
||||
+ status = "okay";
|
||||
+ assigned-clocks = <&cru CLK_SPI2>;
|
||||
+ assigned-clock-rates = <200000000>;
|
||||
+ num-cs = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
|
||||
+
|
||||
+ pmic@0 {
|
||||
+ compatible = "rockchip,rk806";
|
||||
+ reg = <0x0>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
|
||||
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
|
||||
+ spi-max-frequency = <1000000>;
|
||||
+
|
||||
+ vcc1-supply = <&vcc5v0_sys>;
|
||||
+ vcc2-supply = <&vcc5v0_sys>;
|
||||
+ vcc3-supply = <&vcc5v0_sys>;
|
||||
+ vcc4-supply = <&vcc5v0_sys>;
|
||||
+ vcc5-supply = <&vcc5v0_sys>;
|
||||
+ vcc6-supply = <&vcc5v0_sys>;
|
||||
+ vcc7-supply = <&vcc5v0_sys>;
|
||||
+ vcc8-supply = <&vcc5v0_sys>;
|
||||
+ vcc9-supply = <&vcc5v0_sys>;
|
||||
+ vcc10-supply = <&vcc5v0_sys>;
|
||||
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
|
||||
+ vcc12-supply = <&vcc5v0_sys>;
|
||||
+ vcc13-supply = <&vcc_1v1_nldo_s3>;
|
||||
+ vcc14-supply = <&vcc_1v1_nldo_s3>;
|
||||
+ vcca-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+
|
||||
+ rk806_dvs1_null: dvs1-null-pins {
|
||||
+ pins = "gpio_pwrctrl2";
|
||||
+ function = "pin_fun0";
|
||||
+ };
|
||||
+
|
||||
+ rk806_dvs2_null: dvs2-null-pins {
|
||||
+ pins = "gpio_pwrctrl2";
|
||||
+ function = "pin_fun0";
|
||||
+ };
|
||||
+
|
||||
+ rk806_dvs3_null: dvs3-null-pins {
|
||||
+ pins = "gpio_pwrctrl3";
|
||||
+ function = "pin_fun0";
|
||||
+ };
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_gpu_s0: dcdc-reg1 {
|
||||
+ regulator-name = "vdd_gpu_s0";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <550000>;
|
||||
+ regulator-max-microvolt = <950000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+ regulator-enable-ramp-delay = <400>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpu_lit_s0: dcdc-reg2 {
|
||||
+ regulator-name = "vdd_cpu_lit_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <550000>;
|
||||
+ regulator-max-microvolt = <950000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_log_s0: dcdc-reg3 {
|
||||
+ regulator-name = "vdd_log_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <675000>;
|
||||
+ regulator-max-microvolt = <750000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <750000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_vdenc_s0: dcdc-reg4 {
|
||||
+ regulator-name = "vdd_vdenc_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <550000>;
|
||||
+ regulator-max-microvolt = <950000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_ddr_s0: dcdc-reg5 {
|
||||
+ regulator-name = "vdd_ddr_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <675000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <850000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v1_nldo_s3: vdd2_ddr_s3: dcdc-reg6 {
|
||||
+ regulator-name = "vdd2_ddr_s3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-max-microvolt = <1100000>;
|
||||
+ regulator-min-microvolt = <1100000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_2v0_pldo_s3: dcdc-reg7 {
|
||||
+ regulator-name = "vdd_2v0_pldo_s3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <2000000>;
|
||||
+ regulator-max-microvolt = <2000000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <2000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3_s3: dcdc-reg8 {
|
||||
+ regulator-name = "vcc_3v3_s3";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vddq_ddr_s0: dcdc-reg9 {
|
||||
+ regulator-name = "vddq_ddr_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8_s3: dcdc-reg10 {
|
||||
+ regulator-name = "vcc_1v8_s3";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ avcc_1v8_s0: pldo-reg1 {
|
||||
+ regulator-name = "avcc_1v8_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8_s0: pldo-reg2 {
|
||||
+ regulator-name = "vcc_1v8_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ avdd_1v2_s0: pldo-reg3 {
|
||||
+ regulator-name = "avdd_1v2_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1200000>;
|
||||
+ regulator-max-microvolt = <1200000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3_s0: pldo-reg4 {
|
||||
+ regulator-name = "vcc_3v3_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd_s0: pldo-reg5 {
|
||||
+ regulator-name = "vccio_sd_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pldo6_s3: pldo-reg6 {
|
||||
+ regulator-name = "pldo6_s3";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_0v75_s3: nldo-reg1 {
|
||||
+ regulator-name = "vdd_0v75_s3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <750000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <750000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_ddr_pll_s0: nldo-reg2 {
|
||||
+ regulator-name = "vdd_ddr_pll_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <850000>;
|
||||
+ regulator-max-microvolt = <850000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <850000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ avdd_0v75_s0: nldo-reg3 {
|
||||
+ regulator-name = "avdd_0v75_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <750000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_0v85_s0: nldo-reg4 {
|
||||
+ regulator-name = "vdd_0v85_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <850000>;
|
||||
+ regulator-max-microvolt = <850000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_0v75_s0: nldo-reg5 {
|
||||
+ regulator-name = "vdd_0v75_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <750000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy2_host {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy3_host {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ pinctrl-0 = <&uart2m0_xfer>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@@ -0,0 +1,24 @@
|
||||
From 9ecf44fedc17ff267968b5fff589bf6793fc7ddd Mon Sep 17 00:00:00 2001
|
||||
From: Jimmy Hon <honyuenkwun@gmail.com>
|
||||
Date: Sun, 26 Nov 2023 14:08:45 -0600
|
||||
Subject: [PATCH] arm64: dts: rockchip: add USB3 host on rk3588s-orangepi-5
|
||||
|
||||
Enable USB3 host controller for the Orange Pi 5.
|
||||
|
||||
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20231126200845.1192-1-honyuenkwun@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts
|
||||
@@ -660,3 +660,7 @@
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usb_host2_xhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@@ -0,0 +1,25 @@
|
||||
From e9126f9d3c83acbc88461a535e24c949c7e0b6ca Mon Sep 17 00:00:00 2001
|
||||
From: Jimmy Hon <honyuenkwun@gmail.com>
|
||||
Date: Wed, 27 Dec 2023 14:32:11 -0600
|
||||
Subject: [PATCH] arm64: dts: rockchip: Support poweroff on Orange Pi 5
|
||||
|
||||
The RK806 on the Orange Pi 5 can be used to power on/off the whole board.
|
||||
Mark it as the system power controller.
|
||||
|
||||
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20231227203211.1047-1-honyuenkwun@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts
|
||||
@@ -314,6 +314,7 @@
|
||||
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
|
||||
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
|
||||
spi-max-frequency = <1000000>;
|
||||
+ system-power-controller;
|
||||
|
||||
vcc1-supply = <&vcc5v0_sys>;
|
||||
vcc2-supply = <&vcc5v0_sys>;
|
||||
@@ -0,0 +1,897 @@
|
||||
From 236d225e1ee72a28aa7c2b1e39894e4390bbf51c Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megi@xff.cz>
|
||||
Date: Sun, 8 Oct 2023 15:05:02 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add board device tree for
|
||||
rk3588-orangepi-5-plus
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Orange Pi 5 Plus is RK3588 based SBC featuring:
|
||||
|
||||
- 2x 2.5G ethernet ports – onboard NIC hooked to PCIe 2.0 interface
|
||||
- 2x USB 2.0 host ports
|
||||
- 2x USB 3.0 host ports (exposed over USB 3.0 hub)
|
||||
- Type-C port featuring USB 2.0/3.0 and Alt-DP mode
|
||||
- PCIe 2.0/USB 2.0/I2S/I2C/UART on E.KEY socket
|
||||
- RTC
|
||||
- ES8388 on-board sound codec – jack in/out, onboard mic, speaker amplifier
|
||||
- SPI NOR flash
|
||||
- RGB LED (R is always on)
|
||||
- IR receiver
|
||||
- PCIe 3.0 on the bottom for NVMe, etc.
|
||||
- 40pin GPIO header (with gpio, I2C, SPI, PWM, UART)
|
||||
- Power, recovery and Mask ROM buttons
|
||||
- 2x HDMI out, 1x HDMI in
|
||||
- Slots/connectors for eMMC, uSD card, fan, MIPI CSI/DSI
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||||
Link: https://lore.kernel.org/r/20231008130515.1155664-5-megi@xff.cz
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 1 +
|
||||
.../dts/rockchip/rk3588-orangepi-5-plus.dts | 848 ++++++++++++++++++
|
||||
2 files changed, 849 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -101,6 +101,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ed
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-edgeble-neu6b-io.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-v10.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-nanopc-t6.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-orangepi-5-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-indiedroid-nova.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-khadas-edge2.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
|
||||
@@ -0,0 +1,848 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2023 Ondřej Jirman <megi@xff.cz>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include <dt-bindings/usb/pd.h>
|
||||
+#include "rk3588.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Xunlong Orange Pi 5 Plus";
|
||||
+ compatible = "xunlong,orangepi-5-plus", "rockchip,rk3588";
|
||||
+
|
||||
+ aliases {
|
||||
+ mmc0 = &sdhci;
|
||||
+ mmc1 = &sdmmc;
|
||||
+ serial2 = &uart2;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ adc-keys-0 {
|
||||
+ compatible = "adc-keys";
|
||||
+ io-channels = <&saradc 0>;
|
||||
+ io-channel-names = "buttons";
|
||||
+ keyup-threshold-microvolt = <1800000>;
|
||||
+ poll-interval = <100>;
|
||||
+
|
||||
+ button-maskrom {
|
||||
+ label = "Mask Rom";
|
||||
+ linux,code = <KEY_SETUP>;
|
||||
+ press-threshold-microvolt = <2000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ adc-keys-1 {
|
||||
+ compatible = "adc-keys";
|
||||
+ io-channels = <&saradc 1>;
|
||||
+ io-channel-names = "buttons";
|
||||
+ keyup-threshold-microvolt = <1800000>;
|
||||
+ poll-interval = <100>;
|
||||
+
|
||||
+ button-recovery {
|
||||
+ label = "Recovery";
|
||||
+ linux,code = <KEY_VENDOR>;
|
||||
+ press-threshold-microvolt = <2000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ speaker_amp: speaker-audio-amplifier {
|
||||
+ compatible = "simple-audio-amplifier";
|
||||
+ enable-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
|
||||
+ sound-name-prefix = "Speaker Amp";
|
||||
+ };
|
||||
+
|
||||
+ headphone_amp: headphones-audio-amplifier {
|
||||
+ compatible = "simple-audio-amplifier";
|
||||
+ enable-gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
|
||||
+ sound-name-prefix = "Headphones Amp";
|
||||
+ };
|
||||
+
|
||||
+ ir-receiver {
|
||||
+ compatible = "gpio-ir-receiver";
|
||||
+ gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&ir_receiver_pin>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&blue_led_pin>;
|
||||
+
|
||||
+ led {
|
||||
+ color = <LED_COLOR_ID_BLUE>;
|
||||
+ function = LED_FUNCTION_INDICATOR;
|
||||
+ function-enumerator = <1>;
|
||||
+ gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ fan: pwm-fan {
|
||||
+ compatible = "pwm-fan";
|
||||
+ cooling-levels = <0 70 75 80 100>;
|
||||
+ fan-supply = <&vcc5v0_sys>;
|
||||
+ pwms = <&pwm3 0 50000 0>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ };
|
||||
+
|
||||
+ pwm-leds {
|
||||
+ compatible = "pwm-leds";
|
||||
+
|
||||
+ led {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ function = LED_FUNCTION_INDICATOR;
|
||||
+ function-enumerator = <2>;
|
||||
+ max-brightness = <255>;
|
||||
+ pwms = <&pwm2 0 25000 0>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hp_detect>;
|
||||
+ simple-audio-card,name = "Analog";
|
||||
+ simple-audio-card,aux-devs = <&speaker_amp>, <&headphone_amp>;
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+ simple-audio-card,hp-det-gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_LOW>;
|
||||
+ simple-audio-card,bitclock-master = <&daicpu>;
|
||||
+ simple-audio-card,frame-master = <&daicpu>;
|
||||
+ /*TODO: SARADC_IN3 is used as MIC detection / key input */
|
||||
+
|
||||
+ simple-audio-card,widgets =
|
||||
+ "Microphone", "Onboard Microphone",
|
||||
+ "Microphone", "Microphone Jack",
|
||||
+ "Speaker", "Speaker",
|
||||
+ "Headphone", "Headphones";
|
||||
+
|
||||
+ simple-audio-card,routing =
|
||||
+ "Headphones", "LOUT1",
|
||||
+ "Headphones", "ROUT1",
|
||||
+ "Speaker", "LOUT2",
|
||||
+ "Speaker", "ROUT2",
|
||||
+
|
||||
+ "Headphones", "Headphones Amp OUTL",
|
||||
+ "Headphones", "Headphones Amp OUTR",
|
||||
+ "Headphones Amp INL", "LOUT1",
|
||||
+ "Headphones Amp INR", "ROUT1",
|
||||
+
|
||||
+ "Speaker", "Speaker Amp OUTL",
|
||||
+ "Speaker", "Speaker Amp OUTR",
|
||||
+ "Speaker Amp INL", "LOUT2",
|
||||
+ "Speaker Amp INR", "ROUT2",
|
||||
+
|
||||
+ /* single ended signal to LINPUT1 */
|
||||
+ "LINPUT1", "Microphone Jack",
|
||||
+ "RINPUT1", "Microphone Jack",
|
||||
+ /* differential signal */
|
||||
+ "LINPUT2", "Onboard Microphone",
|
||||
+ "RINPUT2", "Onboard Microphone";
|
||||
+
|
||||
+ daicpu: simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s0_8ch>;
|
||||
+ system-clock-frequency = <12288000>;
|
||||
+ };
|
||||
+
|
||||
+ daicodec: simple-audio-card,codec {
|
||||
+ sound-dai = <&es8388>;
|
||||
+ system-clock-frequency = <12288000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpios = <&gpio2 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
+ regulator-name = "vcc3v3_pcie30";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <5000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pcie_eth: vcc3v3-pcie-eth-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
|
||||
+ regulator-name = "vcc3v3_pcie_eth";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <50000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_wf: vcc3v3-wf-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
+ regulator-name = "vcc3v3_wf";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <50000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb20: vcc5v0-usb20-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb20_en>;
|
||||
+ regulator-name = "vcc5v0_usb20";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&combphy0_ps {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy1_ps {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy2_psu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&cpu_b0 {
|
||||
+ cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b1 {
|
||||
+ cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b2 {
|
||||
+ cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b3 {
|
||||
+ cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l0 {
|
||||
+ cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l1 {
|
||||
+ cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l2 {
|
||||
+ cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_l3 {
|
||||
+ cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c0m2_xfer>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu_big0_s0: regulator@42 {
|
||||
+ compatible = "rockchip,rk8602";
|
||||
+ reg = <0x42>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_cpu_big0_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <550000>;
|
||||
+ regulator-max-microvolt = <1050000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpu_big1_s0: regulator@43 {
|
||||
+ compatible = "rockchip,rk8603", "rockchip,rk8602";
|
||||
+ reg = <0x43>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_cpu_big1_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <550000>;
|
||||
+ regulator-max-microvolt = <1050000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c6 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ hym8563: rtc@51 {
|
||||
+ compatible = "haoyu,hym8563";
|
||||
+ reg = <0x51>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-output-names = "hym8563";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hym8563_int>;
|
||||
+ wakeup-source;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c7 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ /* PLDO2 vcca 1.8V, BUCK8 gated by PLDO2 being enabled */
|
||||
+ es8388: audio-codec@11 {
|
||||
+ compatible = "everest,es8388";
|
||||
+ reg = <0x11>;
|
||||
+ clocks = <&cru I2S0_8CH_MCLKOUT>;
|
||||
+ clock-names = "mclk";
|
||||
+ AVDD-supply = <&vcc_1v8_s0>;
|
||||
+ DVDD-supply = <&vcc_1v8_s0>;
|
||||
+ HPVDD-supply = <&vcc_3v3_s0>;
|
||||
+ PVDD-supply = <&vcc_3v3_s0>;
|
||||
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
|
||||
+ assigned-clock-rates = <12288000>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2s0_8ch {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2s0_lrck
|
||||
+ &i2s0_mclk
|
||||
+ &i2s0_sclk
|
||||
+ &i2s0_sdi0
|
||||
+ &i2s0_sdo0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s2_2ch {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2s2m0_lrck
|
||||
+ &i2s2m0_sclk
|
||||
+ &i2s2m0_sdi
|
||||
+ &i2s2m0_sdo>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* phy1 - M.KEY socket */
|
||||
+&pcie2x1l0 {
|
||||
+ reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_wf>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* phy2 - right ethernet port */
|
||||
+&pcie2x1l1 {
|
||||
+ reset-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie_eth>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* phy0 - left ethernet port */
|
||||
+&pcie2x1l2 {
|
||||
+ reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie_eth>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie30phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie3x4 {
|
||||
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie30>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ hym8563 {
|
||||
+ hym8563_int: hym8563-int {
|
||||
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ blue_led_pin: blue-led {
|
||||
+ rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ ir-receiver {
|
||||
+ ir_receiver_pin: ir-receiver-pin {
|
||||
+ rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sound {
|
||||
+ hp_detect: hp-detect {
|
||||
+ rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb {
|
||||
+ vcc5v0_usb20_en: vcc5v0-usb20-en {
|
||||
+ rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pwm2 {
|
||||
+ pinctrl-0 = <&pwm2m1_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm3 {
|
||||
+ pinctrl-0 = <&pwm3m1_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ vref-supply = <&vcc_1v8_s0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ no-sdio;
|
||||
+ no-sd;
|
||||
+ non-removable;
|
||||
+ max-frequency = <200000000>;
|
||||
+ mmc-hs400-1_8v;
|
||||
+ mmc-hs400-enhanced-strobe;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
+ disable-wp;
|
||||
+ max-frequency = <150000000>;
|
||||
+ no-sdio;
|
||||
+ no-mmc;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc_3v3_s3>;
|
||||
+ vqmmc-supply = <&vccio_sd_s0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sfc {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&fspim1_pins>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ spi_flash: flash@0 {
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ reg = <0x0>;
|
||||
+ spi-max-frequency = <100000000>;
|
||||
+ spi-rx-bus-width = <4>;
|
||||
+ spi-tx-bus-width = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi2 {
|
||||
+ assigned-clocks = <&cru CLK_SPI2>;
|
||||
+ assigned-clock-rates = <200000000>;
|
||||
+ num-cs = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ pmic@0 {
|
||||
+ compatible = "rockchip,rk806";
|
||||
+ reg = <0x0>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
|
||||
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
|
||||
+ spi-max-frequency = <1000000>;
|
||||
+
|
||||
+ vcc1-supply = <&vcc5v0_sys>;
|
||||
+ vcc2-supply = <&vcc5v0_sys>;
|
||||
+ vcc3-supply = <&vcc5v0_sys>;
|
||||
+ vcc4-supply = <&vcc5v0_sys>;
|
||||
+ vcc5-supply = <&vcc5v0_sys>;
|
||||
+ vcc6-supply = <&vcc5v0_sys>;
|
||||
+ vcc7-supply = <&vcc5v0_sys>;
|
||||
+ vcc8-supply = <&vcc5v0_sys>;
|
||||
+ vcc9-supply = <&vcc5v0_sys>;
|
||||
+ vcc10-supply = <&vcc5v0_sys>;
|
||||
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
|
||||
+ vcc12-supply = <&vcc5v0_sys>;
|
||||
+ vcc13-supply = <&vdd2_ddr_s3>;
|
||||
+ vcc14-supply = <&vdd2_ddr_s3>;
|
||||
+ vcca-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+
|
||||
+ rk806_dvs1_null: dvs1-null-pins {
|
||||
+ pins = "gpio_pwrctrl2";
|
||||
+ function = "pin_fun0";
|
||||
+ };
|
||||
+
|
||||
+ rk806_dvs2_null: dvs2-null-pins {
|
||||
+ pins = "gpio_pwrctrl2";
|
||||
+ function = "pin_fun0";
|
||||
+ };
|
||||
+
|
||||
+ rk806_dvs3_null: dvs3-null-pins {
|
||||
+ pins = "gpio_pwrctrl3";
|
||||
+ function = "pin_fun0";
|
||||
+ };
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_gpu_s0: dcdc-reg1 {
|
||||
+ regulator-name = "vdd_gpu_s0";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-enable-ramp-delay = <400>;
|
||||
+ regulator-min-microvolt = <550000>;
|
||||
+ regulator-max-microvolt = <950000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_cpu_lit_s0: dcdc-reg2 {
|
||||
+ regulator-name = "vdd_cpu_lit_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <550000>;
|
||||
+ regulator-max-microvolt = <950000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_log_s0: dcdc-reg3 {
|
||||
+ regulator-name = "vdd_log_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <675000>;
|
||||
+ regulator-max-microvolt = <825000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <750000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_vdenc_s0: dcdc-reg4 {
|
||||
+ regulator-name = "vdd_vdenc_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <550000>;
|
||||
+ regulator-max-microvolt = <825000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_ddr_s0: dcdc-reg5 {
|
||||
+ regulator-name = "vdd_ddr_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <675000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <850000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd2_ddr_s3: dcdc-reg6 {
|
||||
+ regulator-name = "vdd2_ddr_s3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_2v0_pldo_s3: dcdc-reg7 {
|
||||
+ regulator-name = "vdd_2v0_pldo_s3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <2000000>;
|
||||
+ regulator-max-microvolt = <2000000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <2000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3_s3: dcdc-reg8 {
|
||||
+ regulator-name = "vcc_3v3_s3";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vddq_ddr_s0: dcdc-reg9 {
|
||||
+ regulator-name = "vddq_ddr_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8_s3: dcdc-reg10 {
|
||||
+ regulator-name = "vcc_1v8_s3";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ avcc_1v8_s0: pldo-reg1 {
|
||||
+ regulator-name = "avcc_1v8_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ /* shorted to avcc_1v8_s0 on the board */
|
||||
+ vcc_1v8_s0: pldo-reg2 {
|
||||
+ regulator-name = "vcc_1v8_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ avdd_1v2_s0: pldo-reg3 {
|
||||
+ regulator-name = "avdd_1v2_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1200000>;
|
||||
+ regulator-max-microvolt = <1200000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3_s0: pldo-reg4 {
|
||||
+ regulator-name = "vcc_3v3_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd_s0: pldo-reg5 {
|
||||
+ regulator-name = "vccio_sd_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pldo6_s3: pldo-reg6 {
|
||||
+ regulator-name = "pldo6_s3";
|
||||
+ 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>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_0v75_s3: nldo-reg1 {
|
||||
+ regulator-name = "vdd_0v75_s3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <750000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <750000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_ddr_pll_s0: nldo-reg2 {
|
||||
+ regulator-name = "vdd_ddr_pll_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <850000>;
|
||||
+ regulator-max-microvolt = <850000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ regulator-suspend-microvolt = <850000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ avdd_0v75_s0: nldo-reg3 {
|
||||
+ regulator-name = "avdd_0v75_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ /*
|
||||
+ * The schematic mentions that actual setting
|
||||
+ * should be 0.8375V. RK3588 datasheet specifies
|
||||
+ * maximum as 0.825V. So we set datasheet max
|
||||
+ * here.
|
||||
+ */
|
||||
+ regulator-min-microvolt = <825000>;
|
||||
+ regulator-max-microvolt = <825000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_0v85_s0: nldo-reg4 {
|
||||
+ regulator-name = "vdd_0v85_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <850000>;
|
||||
+ regulator-max-microvolt = <850000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_0v75_s0: nldo-reg5 {
|
||||
+ regulator-name = "vdd_0v75_s0";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <750000>;
|
||||
+ regulator-max-microvolt = <750000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy2_host {
|
||||
+ phy-supply = <&vcc5v0_usb20>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy3_host {
|
||||
+ phy-supply = <&vcc5v0_usb20>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ pinctrl-0 = <&uart2m0_xfer>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart9 {
|
||||
+ pinctrl-0 = <&uart9m0_xfer>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@@ -0,0 +1,55 @@
|
||||
From d859ad305ed19d9a77d8c8ecd22459b73da36ba6 Mon Sep 17 00:00:00 2001
|
||||
From: Kever Yang <kever.yang@rock-chips.com>
|
||||
Date: Thu, 1 Feb 2024 11:46:21 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: remove redundant cd-gpios from rk3588
|
||||
sdmmc nodes
|
||||
|
||||
The sdmmc node already have a "&sdmmc_det" for pinctrl which switch the
|
||||
GPIO0A4 to sdmmc detect function, no need to define a separate "cd-gpios".
|
||||
|
||||
RK3588 has force_jtage feature which is enable JTAG function via sdmmc
|
||||
pins automatically when there is no SD card insert, this feature will
|
||||
need the GPIO0A4 works in sdmmc_det function like other mmc signal instead
|
||||
of GPIO function, or else the force_jtag can not auto be disabled when
|
||||
SD card insert.
|
||||
|
||||
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
Link: https://lore.kernel.org/r/20240201034621.1970279-1-kever.yang@rock-chips.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 1 -
|
||||
4 files changed, 4 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
|
||||
@@ -445,7 +445,6 @@
|
||||
&sdmmc {
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
- cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
disable-wp;
|
||||
max-frequency = <150000000>;
|
||||
no-sdio;
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -378,7 +378,6 @@
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
- cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
disable-wp;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3_s3>;
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -365,7 +365,6 @@
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
- cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
|
||||
disable-wp;
|
||||
max-frequency = <150000000>;
|
||||
no-sdio;
|
||||
@@ -1,17 +0,0 @@
|
||||
From 3e8be25a2ae2141c94bf20c75200e8282605d825 Mon Sep 17 00:00:00 2001
|
||||
From: Marty Jones <mj8263788@gmail.com>
|
||||
Date: Tue, 30 May 2023 02:03:35 -0400
|
||||
Subject: [PATCH 95/95] rockchip: add FriendlyElec NanoPi R6C/R6S
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -108,3 +108,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ro
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-indiedroid-nova.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-khadas-edge2.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6c.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6s.dtb
|
||||
@@ -1,144 +0,0 @@
|
||||
From ba70dba1ea8347003c94f0fdad00ff6dd765408c Mon Sep 17 00:00:00 2001
|
||||
From: Marty Jones <mj8263788@gmail.com>
|
||||
Date: Tue, 13 Jun 2023 02:40:07 -0400
|
||||
Subject: [PATCH] rockchip: add FriendlyElec NanoPi R6C Plus
|
||||
|
||||
Signed-off-by: Marty Jones <mj8263788@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 1 +
|
||||
.../dts/rockchip/rk3588s-nanopi-r6c-plus.dts | 121 ++++++++++++++++++
|
||||
2 files changed, 122 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6c-plus.dts
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -109,4 +109,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-i
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-khadas-edge2.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6c.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6c-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6s.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6c-plus.dts
|
||||
@@ -0,0 +1,121 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2022 FriendlyElec Computer Tech. Co., Ltd.
|
||||
+ * (http://www.friendlyelec.com)
|
||||
+ * Copyright (c) 2023, Marty Jones <mj8263788@gmail.com
|
||||
+ * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "rk3588-nanopi6-common.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyElec NanoPi R6C Plus";
|
||||
+ compatible = "friendlyelec,nanopi-r6c-plus", "rockchip,rk3588";
|
||||
+
|
||||
+ aliases {
|
||||
+ mmc0 = &sdmmc;
|
||||
+ mmc1 = &sdhci;
|
||||
+ ethernet0 = &gmac1;
|
||||
+ serial2 = &uart2;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ gpio_keys: gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&key1_pin>;
|
||||
+ };
|
||||
+
|
||||
+ gpio_leds: gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ sys_led: led-sys {
|
||||
+ gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "red:sys";
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sys_led_pin>;
|
||||
+ };
|
||||
+
|
||||
+ wan_led: led-wan {
|
||||
+ gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:wan";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wan_led_pin>;
|
||||
+ };
|
||||
+
|
||||
+ lan_led: led-lan {
|
||||
+ gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:lan";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&lan1_led_pin>;
|
||||
+ };
|
||||
+
|
||||
+ lan2_led: led-lan2 {
|
||||
+ gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:lan1";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&lan2_led_pin>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+
|
||||
+&pinctrl {
|
||||
+ gpio-key {
|
||||
+ key1_pin: key1-pin {
|
||||
+ rockchip,pins = <1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ sys_led_pin: sys-led-pin {
|
||||
+ rockchip,pins =
|
||||
+ <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ wan_led_pin: wan-led-pin {
|
||||
+ rockchip,pins =
|
||||
+ <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ lan1_led_pin: lan1-led-pin {
|
||||
+ rockchip,pins =
|
||||
+ <1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ lan2_led_pin: lan2-led-pin {
|
||||
+ rockchip,pins =
|
||||
+ <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb {
|
||||
+ vcc5v0_host20_en: vcc5v0-host20-en {
|
||||
+ rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c6 {
|
||||
+ clock-frequency = <200000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ eeprom@53 {
|
||||
+ compatible = "microchip,24c02", "atmel,24c02";
|
||||
+ reg = <0x53>;
|
||||
+ #address-cells = <2>;
|
||||
+ #size-cells = <0>;
|
||||
+ pagesize = <16>;
|
||||
+ size = <256>;
|
||||
+
|
||||
+ eui_48: eui-48@fa {
|
||||
+ reg = <0xfa 0x06>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
@@ -0,0 +1,25 @@
|
||||
From bc6c96d850419e71dbc9b0094ccc9b668ba9be43 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Mon, 28 Sep 2020 22:54:52 +0200
|
||||
Subject: [PATCH] rockchip: rk3328: add compatible to NanoPi R2S ethernet PHY
|
||||
|
||||
This adds the compatible property to the NanoPi R2S ethernet PHY node.
|
||||
Otherwise, the PHY might not be probed, as the PHY ID reads all 0xff
|
||||
when it is still in reset.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -165,6 +165,8 @@
|
||||
#size-cells = <0>;
|
||||
|
||||
rtl8211e: ethernet-phy@1 {
|
||||
+ compatible = "ethernet-phy-id001c.c915",
|
||||
+ "ethernet-phy-ieee802.3-c22";
|
||||
reg = <1>;
|
||||
pinctrl-0 = <ð_phy_reset_pin>;
|
||||
pinctrl-names = "default";
|
||||
@@ -0,0 +1,22 @@
|
||||
From 3b7eb946b1d640d684a921e53e1e50985ab7eb89 Mon Sep 17 00:00:00 2001
|
||||
From: QiuSimons <45143996+QiuSimons@users.noreply.github.com>
|
||||
Date: Tue, 4 Aug 2020 20:17:53 +0800
|
||||
Subject: [PATCH] rockchip: rk3328: add i2c0 controller for nanopi r2s
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 4 ++++
|
||||
1 files changed, 4 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -177,6 +177,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Subject: arm64: dts: rockchip: disable UHS modes for NanoPi R4S
|
||||
|
||||
The NanoPi R4S leaves the SD card in 1.8V signalling when rebooting
|
||||
while U-Boot requires the card to be in 3.3V mode.
|
||||
|
||||
Remove UHS support from the SD controller so the card remains in 3.3V
|
||||
mode. This reduces transfer speeds but ensures a reboot whether from
|
||||
userspace or following a kernel panic is always working.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
@@ -333,7 +333,6 @@
|
||||
sd-uhs-sdr12;
|
||||
sd-uhs-sdr25;
|
||||
sd-uhs-sdr50;
|
||||
- sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_sd>;
|
||||
vqmmc-supply = <&vcc_sdio>;
|
||||
status = "okay";
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
@@ -119,6 +119,11 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+&sdmmc {
|
||||
+ /delete-property/ sd-uhs-sdr104;
|
||||
+ cap-sd-highspeed;
|
||||
+};
|
||||
+
|
||||
&u2phy0_host {
|
||||
phy-supply = <&vdd_5v>;
|
||||
};
|
||||
|
||||
@@ -574,7 +573,7 @@
|
||||
disable-wp;
|
||||
no-mmc;
|
||||
no-sdio;
|
||||
- sd-uhs-sdr104;
|
||||
+ sd-uhs-sdr50;
|
||||
vmmc-supply = <&vcc3v3_sd_s0>;
|
||||
vqmmc-supply = <&vccio_sd_s0>;
|
||||
status = "okay";
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -370,8 +370,7 @@
|
||||
no-sdio;
|
||||
no-sd;
|
||||
non-removable;
|
||||
- mmc-hs400-1_8v;
|
||||
- mmc-hs400-enhanced-strobe;
|
||||
+ mmc-hs200-1_8v;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -383,7 +382,7 @@
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
- sd-uhs-sdr104;
|
||||
+ sd-uhs-sdr50;
|
||||
vmmc-supply = <&vcc_3v3_s3>;
|
||||
vqmmc-supply = <&vccio_sd_s0>;
|
||||
status = "okay";
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -360,8 +360,7 @@
|
||||
no-sdio;
|
||||
no-sd;
|
||||
non-removable;
|
||||
- mmc-hs400-1_8v;
|
||||
- mmc-hs400-enhanced-strobe;
|
||||
+ mmc-hs200-1_8v;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -373,7 +372,7 @@
|
||||
max-frequency = <150000000>;
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
- sd-uhs-sdr104;
|
||||
+ sd-uhs-sdr50;
|
||||
vmmc-supply = <&vcc_3v3_s0>;
|
||||
vqmmc-supply = <&vccio_sd_s0>;
|
||||
status = "okay";
|
||||
@@ -1,7 +1,7 @@
|
||||
From 060e1a8aa7a81f974058806882e1620ef5c694b8 Mon Sep 17 00:00:00 2001
|
||||
From 8baebef8be9691a28f8efa284dfce9a5b9395130 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Thu, 18 Aug 2022 14:21:30 +0200
|
||||
Subject: [PATCH 27/41] cpufreq: rockchip: Introduce driver for rk3588
|
||||
Subject: [PATCH] cpufreq: rockchip: Introduce driver for rk3588
|
||||
|
||||
This is a heavily modified port from the downstream driver.
|
||||
Downstream used it for multiple rockchip generations, while
|
||||
@@ -24,7 +24,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
|
||||
--- a/drivers/cpufreq/Kconfig.arm
|
||||
+++ b/drivers/cpufreq/Kconfig.arm
|
||||
@@ -189,6 +189,16 @@ config ARM_RASPBERRYPI_CPUFREQ
|
||||
@@ -190,6 +190,16 @@ config ARM_RASPBERRYPI_CPUFREQ
|
||||
|
||||
If in doubt, say N.
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From ab1b4994d0d920a17ddead2b1ae8131f9d873cba Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 24 Oct 2023 16:09:35 +0200
|
||||
Subject: [PATCH] math.h: add DIV_ROUND_UP_NO_OVERFLOW
|
||||
|
||||
Add a new DIV_ROUND_UP helper, which cannot overflow when
|
||||
big numbers are being used.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
include/linux/math.h | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
--- a/include/linux/math.h
|
||||
+++ b/include/linux/math.h
|
||||
@@ -36,6 +36,17 @@
|
||||
|
||||
#define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
|
||||
|
||||
+/**
|
||||
+ * DIV_ROUND_UP_NO_OVERFLOW - divide two numbers and always round up
|
||||
+ * @n: numerator / dividend
|
||||
+ * @d: denominator / divisor
|
||||
+ *
|
||||
+ * This functions does the same as DIV_ROUND_UP, but internally uses a
|
||||
+ * division and a modulo operation instead of math tricks. This way it
|
||||
+ * avoids overflowing when handling big numbers.
|
||||
+ */
|
||||
+#define DIV_ROUND_UP_NO_OVERFLOW(n, d) (((n) / (d)) + !!((n) % (d)))
|
||||
+
|
||||
#define DIV_ROUND_DOWN_ULL(ll, d) \
|
||||
({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; })
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 122481e9b538979f0ab1b6d2ebbcd3446cec4a33 Mon Sep 17 00:00:00 2001
|
||||
From b55f69688803c3c7d8fd51d8c833002591dd271b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Thu, 18 May 2023 05:19:48 +0200
|
||||
Subject: [PATCH 01/41] clk: divider: Fix divisor masking on 64 bit platforms
|
||||
Date: Tue, 24 Oct 2023 16:13:50 +0200
|
||||
Subject: [PATCH] clk: divider: Fix divisor masking on 64 bit platforms
|
||||
|
||||
The clock framework handles clock rates as "unsigned long", so u32 on
|
||||
32-bit architectures and u64 on 64-bit architectures.
|
||||
@@ -19,16 +19,14 @@ effectively request ca. 5 MHz. Requesting clk_round_rate(clk, ULONG_MAX)
|
||||
is a bit of a special case, since that still returns correct values as
|
||||
long as the parent clock is below 8.5 GHz.
|
||||
|
||||
Fix this by introducing a new helper, which avoids the overflow
|
||||
by using a modulo operation instead of math tricks. This avoids
|
||||
any requirements on the arguments (except that divisor should not
|
||||
be 0 obviously).
|
||||
Fix this by switching to DIV_ROUND_UP_NO_OVERFLOW, which cannot
|
||||
overflow. This avoids any requirements on the arguments (except
|
||||
that divisor should not be 0 obviously).
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
drivers/clk/clk-divider.c | 6 +++---
|
||||
include/linux/math.h | 11 +++++++++++
|
||||
2 files changed, 14 insertions(+), 3 deletions(-)
|
||||
drivers/clk/clk-divider.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/clk/clk-divider.c
|
||||
+++ b/drivers/clk/clk-divider.c
|
||||
@@ -59,23 +57,3 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
|
||||
if (!_is_valid_div(table, div, flags))
|
||||
return -EINVAL;
|
||||
--- a/include/linux/math.h
|
||||
+++ b/include/linux/math.h
|
||||
@@ -36,6 +36,17 @@
|
||||
|
||||
#define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
|
||||
|
||||
+/**
|
||||
+ * DIV_ROUND_UP_NO_OVERFLOW - divide two numbers and always round up
|
||||
+ * @n: numerator / dividend
|
||||
+ * @d: denominator / divisor
|
||||
+ *
|
||||
+ * This functions does the same as DIV_ROUND_UP, but internally uses a
|
||||
+ * division and a modulo operation instead of math tricks. This way it
|
||||
+ * avoids overflowing when handling big numbers.
|
||||
+ */
|
||||
+#define DIV_ROUND_UP_NO_OVERFLOW(n, d) (((n) / (d)) + !!((n) % (d)))
|
||||
+
|
||||
#define DIV_ROUND_DOWN_ULL(ll, d) \
|
||||
({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; })
|
||||
|
||||
@@ -0,0 +1,435 @@
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
To: Michael Turquette <mturquette@baylibre.com>,
|
||||
Stephen Boyd <sboyd@kernel.org>,
|
||||
linux-clk@vger.kernel.org
|
||||
Cc: Elaine Zhang <zhangqing@rock-chips.com>,
|
||||
Kever Yang <kever.yang@rock-chips.com>,
|
||||
Heiko Stuebner <heiko@sntech.de>,
|
||||
Rob Herring <robh+dt@kernel.org>,
|
||||
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
|
||||
Conor Dooley <conor+dt@kernel.org>,
|
||||
huangtao@rock-chips.com, andy.yan@rock-chips.com,
|
||||
devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org,
|
||||
Sebastian Reichel <sebastian.reichel@collabora.com>,
|
||||
kernel@collabora.com
|
||||
Subject: [PATCH v8 7/7] clk: rockchip: implement proper GATE_LINK support
|
||||
Date: Fri, 26 Jan 2024 19:18:28 +0100 [thread overview]
|
||||
Message-ID: <20240126182919.48402-8-sebastian.reichel@collabora.com> (raw)
|
||||
In-Reply-To: <20240126182919.48402-1-sebastian.reichel@collabora.com>
|
||||
|
||||
Recent Rockchip SoCs have a new hardware block called Native Interface
|
||||
Unit (NIU), which gates clocks to devices behind them. These effectively
|
||||
need two parent clocks.
|
||||
|
||||
GATE_LINK type clocks handle the second parent via 'linkedclk' by using
|
||||
runtime PM clocks. To make that possible a new platform device is created
|
||||
for every clock handled in this way.
|
||||
|
||||
Note, that before this patch clk_rk3588_probe() has never been called,
|
||||
because CLK_OF_DECLARE marks the DT node as processed. This patch replaces
|
||||
that with CLK_OF_DECLARE_DRIVER and thus the probe function is used now.
|
||||
This is necessary to have 'struct device' available.
|
||||
|
||||
Also instead of builtin_platform_driver_probe, the driver has been
|
||||
switched to use core_initcall, since it should be fully probed before
|
||||
the Rockchip PM domain driver (and that is using postcore_initcall).
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3588.c | 122 +++++++++++++-----------------
|
||||
drivers/clk/rockchip/clk.c | 69 ++++++++++++++++-
|
||||
drivers/clk/rockchip/clk.h | 16 ++++
|
||||
3 files changed, 138 insertions(+), 69 deletions(-)
|
||||
|
||||
--- a/drivers/clk/rockchip/clk-rk3588.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3588.c
|
||||
@@ -12,28 +12,6 @@
|
||||
#include <dt-bindings/clock/rockchip,rk3588-cru.h>
|
||||
#include "clk.h"
|
||||
|
||||
-/*
|
||||
- * Recent Rockchip SoCs have a new hardware block called Native Interface
|
||||
- * Unit (NIU), which gates clocks to devices behind them. These effectively
|
||||
- * need two parent clocks.
|
||||
- *
|
||||
- * Downstream enables the linked clock via runtime PM whenever the gate is
|
||||
- * enabled. This implementation uses separate clock nodes for each of the
|
||||
- * linked gate clocks, which leaks parts of the clock tree into DT.
|
||||
- *
|
||||
- * The GATE_LINK macro instead takes the second parent via 'linkname', but
|
||||
- * ignores the information. Once the clock framework is ready to handle it, the
|
||||
- * information should be passed on here. But since these clocks are required to
|
||||
- * access multiple relevant IP blocks, such as PCIe or USB, we mark all linked
|
||||
- * clocks critical until a better solution is available. This will waste some
|
||||
- * power, but avoids leaking implementation details into DT or hanging the
|
||||
- * system.
|
||||
- */
|
||||
-#define GATE_LINK(_id, cname, pname, linkedclk, f, o, b, gf) \
|
||||
- GATE(_id, cname, pname, f, o, b, gf)
|
||||
-#define RK3588_LINKED_CLK CLK_IS_CRITICAL
|
||||
-
|
||||
-
|
||||
#define RK3588_GRF_SOC_STATUS0 0x600
|
||||
#define RK3588_PHYREF_ALT_GATE 0xc38
|
||||
|
||||
@@ -266,6 +244,8 @@ static struct rockchip_pll_rate_table rk
|
||||
}, \
|
||||
}
|
||||
|
||||
+static struct rockchip_clk_provider *early_ctx;
|
||||
+
|
||||
static struct rockchip_cpuclk_rate_table rk3588_cpub0clk_rates[] __initdata = {
|
||||
RK3588_CPUB01CLK_RATE(2496000000, 1),
|
||||
RK3588_CPUB01CLK_RATE(2400000000, 1),
|
||||
@@ -694,7 +674,7 @@ static struct rockchip_pll_clock rk3588_
|
||||
RK3588_MODE_CON0, 10, 15, 0, rk3588_pll_rates),
|
||||
};
|
||||
|
||||
-static struct rockchip_clk_branch rk3588_clk_branches[] __initdata = {
|
||||
+static struct rockchip_clk_branch rk3588_early_clk_branches[] __initdata = {
|
||||
/*
|
||||
* CRU Clock-Architecture
|
||||
*/
|
||||
@@ -1456,7 +1436,7 @@ static struct rockchip_clk_branch rk3588
|
||||
COMPOSITE_NODIV(HCLK_NVM_ROOT, "hclk_nvm_root", mux_200m_100m_50m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(77), 0, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(31), 0, GFLAGS),
|
||||
- COMPOSITE(ACLK_NVM_ROOT, "aclk_nvm_root", gpll_cpll_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE(ACLK_NVM_ROOT, "aclk_nvm_root", gpll_cpll_p, 0,
|
||||
RK3588_CLKSEL_CON(77), 7, 1, MFLAGS, 2, 5, DFLAGS,
|
||||
RK3588_CLKGATE_CON(31), 1, GFLAGS),
|
||||
GATE(ACLK_EMMC, "aclk_emmc", "aclk_nvm_root", 0,
|
||||
@@ -1685,13 +1665,13 @@ static struct rockchip_clk_branch rk3588
|
||||
RK3588_CLKGATE_CON(42), 9, GFLAGS),
|
||||
|
||||
/* vdpu */
|
||||
- COMPOSITE(ACLK_VDPU_ROOT, "aclk_vdpu_root", gpll_cpll_aupll_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE(ACLK_VDPU_ROOT, "aclk_vdpu_root", gpll_cpll_aupll_p, 0,
|
||||
RK3588_CLKSEL_CON(98), 5, 2, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3588_CLKGATE_CON(44), 0, GFLAGS),
|
||||
COMPOSITE_NODIV(ACLK_VDPU_LOW_ROOT, "aclk_vdpu_low_root", mux_400m_200m_100m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(98), 7, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(44), 1, GFLAGS),
|
||||
- COMPOSITE_NODIV(HCLK_VDPU_ROOT, "hclk_vdpu_root", mux_200m_100m_50m_24m_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE_NODIV(HCLK_VDPU_ROOT, "hclk_vdpu_root", mux_200m_100m_50m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(98), 9, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(44), 2, GFLAGS),
|
||||
COMPOSITE(ACLK_JPEG_DECODER_ROOT, "aclk_jpeg_decoder_root", gpll_cpll_aupll_spll_p, 0,
|
||||
@@ -1742,9 +1722,9 @@ static struct rockchip_clk_branch rk3588
|
||||
COMPOSITE(ACLK_RKVENC0_ROOT, "aclk_rkvenc0_root", gpll_cpll_npll_p, 0,
|
||||
RK3588_CLKSEL_CON(102), 7, 2, MFLAGS, 2, 5, DFLAGS,
|
||||
RK3588_CLKGATE_CON(47), 1, GFLAGS),
|
||||
- GATE(HCLK_RKVENC0, "hclk_rkvenc0", "hclk_rkvenc0_root", RK3588_LINKED_CLK,
|
||||
+ GATE(HCLK_RKVENC0, "hclk_rkvenc0", "hclk_rkvenc0_root", 0,
|
||||
RK3588_CLKGATE_CON(47), 4, GFLAGS),
|
||||
- GATE(ACLK_RKVENC0, "aclk_rkvenc0", "aclk_rkvenc0_root", RK3588_LINKED_CLK,
|
||||
+ GATE(ACLK_RKVENC0, "aclk_rkvenc0", "aclk_rkvenc0_root", 0,
|
||||
RK3588_CLKGATE_CON(47), 5, GFLAGS),
|
||||
COMPOSITE(CLK_RKVENC0_CORE, "clk_rkvenc0_core", gpll_cpll_aupll_npll_p, 0,
|
||||
RK3588_CLKSEL_CON(102), 14, 2, MFLAGS, 9, 5, DFLAGS,
|
||||
@@ -1754,10 +1734,10 @@ static struct rockchip_clk_branch rk3588
|
||||
RK3588_CLKGATE_CON(48), 6, GFLAGS),
|
||||
|
||||
/* vi */
|
||||
- COMPOSITE(ACLK_VI_ROOT, "aclk_vi_root", gpll_cpll_npll_aupll_spll_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE(ACLK_VI_ROOT, "aclk_vi_root", gpll_cpll_npll_aupll_spll_p, 0,
|
||||
RK3588_CLKSEL_CON(106), 5, 3, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3588_CLKGATE_CON(49), 0, GFLAGS),
|
||||
- COMPOSITE_NODIV(HCLK_VI_ROOT, "hclk_vi_root", mux_200m_100m_50m_24m_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE_NODIV(HCLK_VI_ROOT, "hclk_vi_root", mux_200m_100m_50m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(106), 8, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(49), 1, GFLAGS),
|
||||
COMPOSITE_NODIV(PCLK_VI_ROOT, "pclk_vi_root", mux_100m_50m_24m_p, 0,
|
||||
@@ -1927,10 +1907,10 @@ static struct rockchip_clk_branch rk3588
|
||||
COMPOSITE(ACLK_VOP_ROOT, "aclk_vop_root", gpll_cpll_dmyaupll_npll_spll_p, 0,
|
||||
RK3588_CLKSEL_CON(110), 5, 3, MFLAGS, 0, 5, DFLAGS,
|
||||
RK3588_CLKGATE_CON(52), 0, GFLAGS),
|
||||
- COMPOSITE_NODIV(ACLK_VOP_LOW_ROOT, "aclk_vop_low_root", mux_400m_200m_100m_24m_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE_NODIV(ACLK_VOP_LOW_ROOT, "aclk_vop_low_root", mux_400m_200m_100m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(110), 8, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(52), 1, GFLAGS),
|
||||
- COMPOSITE_NODIV(HCLK_VOP_ROOT, "hclk_vop_root", mux_200m_100m_50m_24m_p, RK3588_LINKED_CLK,
|
||||
+ COMPOSITE_NODIV(HCLK_VOP_ROOT, "hclk_vop_root", mux_200m_100m_50m_24m_p, 0,
|
||||
RK3588_CLKSEL_CON(110), 10, 2, MFLAGS,
|
||||
RK3588_CLKGATE_CON(52), 2, GFLAGS),
|
||||
COMPOSITE_NODIV(PCLK_VOP_ROOT, "pclk_vop_root", mux_100m_50m_24m_p, 0,
|
||||
@@ -2428,10 +2408,12 @@ static struct rockchip_clk_branch rk3588
|
||||
RK3588_CLKGATE_CON(68), 5, GFLAGS),
|
||||
GATE(ACLK_AV1, "aclk_av1", "aclk_av1_pre", 0,
|
||||
RK3588_CLKGATE_CON(68), 2, GFLAGS),
|
||||
+};
|
||||
|
||||
+static struct rockchip_clk_branch rk3588_clk_branches[] = {
|
||||
GATE_LINK(ACLK_ISP1_PRE, "aclk_isp1_pre", "aclk_isp1_root", ACLK_VI_ROOT, 0, RK3588_CLKGATE_CON(26), 6, GFLAGS),
|
||||
GATE_LINK(HCLK_ISP1_PRE, "hclk_isp1_pre", "hclk_isp1_root", HCLK_VI_ROOT, 0, RK3588_CLKGATE_CON(26), 8, GFLAGS),
|
||||
- GATE_LINK(HCLK_NVM, "hclk_nvm", "hclk_nvm_root", ACLK_NVM_ROOT, RK3588_LINKED_CLK, RK3588_CLKGATE_CON(31), 2, GFLAGS),
|
||||
+ GATE_LINK(HCLK_NVM, "hclk_nvm", "hclk_nvm_root", ACLK_NVM_ROOT, 0, RK3588_CLKGATE_CON(31), 2, GFLAGS),
|
||||
GATE_LINK(ACLK_USB, "aclk_usb", "aclk_usb_root", ACLK_VO1USB_TOP_ROOT, 0, RK3588_CLKGATE_CON(42), 2, GFLAGS),
|
||||
GATE_LINK(HCLK_USB, "hclk_usb", "hclk_usb_root", HCLK_VO1USB_TOP_ROOT, 0, RK3588_CLKGATE_CON(42), 3, GFLAGS),
|
||||
GATE_LINK(ACLK_JPEG_DECODER_PRE, "aclk_jpeg_decoder_pre", "aclk_jpeg_decoder_root", ACLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(44), 7, GFLAGS),
|
||||
@@ -2443,9 +2425,9 @@ static struct rockchip_clk_branch rk3588
|
||||
GATE_LINK(HCLK_RKVDEC1_PRE, "hclk_rkvdec1_pre", "hclk_rkvdec1_root", HCLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(41), 4, GFLAGS),
|
||||
GATE_LINK(ACLK_RKVDEC1_PRE, "aclk_rkvdec1_pre", "aclk_rkvdec1_root", ACLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(41), 5, GFLAGS),
|
||||
GATE_LINK(ACLK_HDCP0_PRE, "aclk_hdcp0_pre", "aclk_vo0_root", ACLK_VOP_LOW_ROOT, 0, RK3588_CLKGATE_CON(55), 9, GFLAGS),
|
||||
- GATE_LINK(HCLK_VO0, "hclk_vo0", "hclk_vo0_root", HCLK_VOP_ROOT, RK3588_LINKED_CLK, RK3588_CLKGATE_CON(55), 5, GFLAGS),
|
||||
+ GATE_LINK(HCLK_VO0, "hclk_vo0", "hclk_vo0_root", HCLK_VOP_ROOT, 0, RK3588_CLKGATE_CON(55), 5, GFLAGS),
|
||||
GATE_LINK(ACLK_HDCP1_PRE, "aclk_hdcp1_pre", "aclk_hdcp1_root", ACLK_VO1USB_TOP_ROOT, 0, RK3588_CLKGATE_CON(59), 6, GFLAGS),
|
||||
- GATE_LINK(HCLK_VO1, "hclk_vo1", "hclk_vo1_root", HCLK_VO1USB_TOP_ROOT, RK3588_LINKED_CLK, RK3588_CLKGATE_CON(59), 9, GFLAGS),
|
||||
+ GATE_LINK(HCLK_VO1, "hclk_vo1", "hclk_vo1_root", HCLK_VO1USB_TOP_ROOT, 0, RK3588_CLKGATE_CON(59), 9, GFLAGS),
|
||||
GATE_LINK(ACLK_AV1_PRE, "aclk_av1_pre", "aclk_av1_root", ACLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(68), 1, GFLAGS),
|
||||
GATE_LINK(PCLK_AV1_PRE, "pclk_av1_pre", "pclk_av1_root", HCLK_VDPU_ROOT, 0, RK3588_CLKGATE_CON(68), 4, GFLAGS),
|
||||
GATE_LINK(HCLK_SDIO_PRE, "hclk_sdio_pre", "hclk_sdio_root", HCLK_NVM, 0, RK3588_CLKGATE_CON(75), 1, GFLAGS),
|
||||
@@ -2453,14 +2435,18 @@ static struct rockchip_clk_branch rk3588
|
||||
GATE_LINK(PCLK_VO1GRF, "pclk_vo1grf", "pclk_vo1_root", HCLK_VO1, CLK_IGNORE_UNUSED, RK3588_CLKGATE_CON(59), 12, GFLAGS),
|
||||
};
|
||||
|
||||
-static void __init rk3588_clk_init(struct device_node *np)
|
||||
+static void __init rk3588_clk_early_init(struct device_node *np)
|
||||
{
|
||||
struct rockchip_clk_provider *ctx;
|
||||
- unsigned long clk_nr_clks;
|
||||
+ unsigned long clk_nr_clks, max_clk_id1, max_clk_id2;
|
||||
void __iomem *reg_base;
|
||||
|
||||
- clk_nr_clks = rockchip_clk_find_max_clk_id(rk3588_clk_branches,
|
||||
- ARRAY_SIZE(rk3588_clk_branches)) + 1;
|
||||
+ max_clk_id1 = rockchip_clk_find_max_clk_id(rk3588_clk_branches,
|
||||
+ ARRAY_SIZE(rk3588_clk_branches));
|
||||
+ max_clk_id2 = rockchip_clk_find_max_clk_id(rk3588_early_clk_branches,
|
||||
+ ARRAY_SIZE(rk3588_early_clk_branches));
|
||||
+ clk_nr_clks = max(max_clk_id1, max_clk_id2) + 1;
|
||||
+
|
||||
reg_base = of_iomap(np, 0);
|
||||
if (!reg_base) {
|
||||
pr_err("%s: could not map cru region\n", __func__);
|
||||
@@ -2473,6 +2459,7 @@ static void __init rk3588_clk_init(struc
|
||||
iounmap(reg_base);
|
||||
return;
|
||||
}
|
||||
+ early_ctx = ctx;
|
||||
|
||||
rockchip_clk_register_plls(ctx, rk3588_pll_clks,
|
||||
ARRAY_SIZE(rk3588_pll_clks),
|
||||
@@ -2491,54 +2478,53 @@ static void __init rk3588_clk_init(struc
|
||||
&rk3588_cpub1clk_data, rk3588_cpub1clk_rates,
|
||||
ARRAY_SIZE(rk3588_cpub1clk_rates));
|
||||
|
||||
+ rockchip_clk_register_branches(ctx, rk3588_early_clk_branches,
|
||||
+ ARRAY_SIZE(rk3588_early_clk_branches));
|
||||
+
|
||||
+ rockchip_clk_of_add_provider(np, ctx);
|
||||
+}
|
||||
+CLK_OF_DECLARE_DRIVER(rk3588_cru, "rockchip,rk3588-cru", rk3588_clk_early_init);
|
||||
+
|
||||
+static int clk_rk3588_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct rockchip_clk_provider *ctx = early_ctx;
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct device_node *np = dev->of_node;
|
||||
+
|
||||
rockchip_clk_register_branches(ctx, rk3588_clk_branches,
|
||||
ARRAY_SIZE(rk3588_clk_branches));
|
||||
|
||||
- rk3588_rst_init(np, reg_base);
|
||||
-
|
||||
+ rk3588_rst_init(np, ctx->reg_base);
|
||||
rockchip_register_restart_notifier(ctx, RK3588_GLB_SRST_FST, NULL);
|
||||
|
||||
+ /*
|
||||
+ * Re-add clock provider, so that the newly added clocks are also
|
||||
+ * re-parented and get their defaults configured.
|
||||
+ */
|
||||
+ of_clk_del_provider(np);
|
||||
rockchip_clk_of_add_provider(np, ctx);
|
||||
-}
|
||||
-
|
||||
-CLK_OF_DECLARE(rk3588_cru, "rockchip,rk3588-cru", rk3588_clk_init);
|
||||
|
||||
-struct clk_rk3588_inits {
|
||||
- void (*inits)(struct device_node *np);
|
||||
-};
|
||||
-
|
||||
-static const struct clk_rk3588_inits clk_3588_cru_init = {
|
||||
- .inits = rk3588_clk_init,
|
||||
-};
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
static const struct of_device_id clk_rk3588_match_table[] = {
|
||||
{
|
||||
.compatible = "rockchip,rk3588-cru",
|
||||
- .data = &clk_3588_cru_init,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
-static int __init clk_rk3588_probe(struct platform_device *pdev)
|
||||
-{
|
||||
- const struct clk_rk3588_inits *init_data;
|
||||
- struct device *dev = &pdev->dev;
|
||||
-
|
||||
- init_data = device_get_match_data(dev);
|
||||
- if (!init_data)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- if (init_data->inits)
|
||||
- init_data->inits(dev->of_node);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static struct platform_driver clk_rk3588_driver = {
|
||||
+ .probe = clk_rk3588_probe,
|
||||
.driver = {
|
||||
.name = "clk-rk3588",
|
||||
.of_match_table = clk_rk3588_match_table,
|
||||
.suppress_bind_attrs = true,
|
||||
},
|
||||
};
|
||||
-builtin_platform_driver_probe(clk_rk3588_driver, clk_rk3588_probe);
|
||||
+
|
||||
+static int __init rockchip_clk_rk3588_drv_register(void)
|
||||
+{
|
||||
+ return platform_driver_register(&clk_rk3588_driver);
|
||||
+}
|
||||
+core_initcall(rockchip_clk_rk3588_drv_register);
|
||||
--- a/drivers/clk/rockchip/clk.c
|
||||
+++ b/drivers/clk/rockchip/clk.c
|
||||
@@ -19,8 +19,12 @@
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
+#include <linux/of_platform.h>
|
||||
+#include <linux/pm_clock.h>
|
||||
+#include <linux/pm_runtime.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/reboot.h>
|
||||
+#include <linux/platform_device.h>
|
||||
|
||||
#include "../clk-fractional-divider.h"
|
||||
#include "clk.h"
|
||||
@@ -376,7 +380,7 @@ struct rockchip_clk_provider *rockchip_c
|
||||
goto err_free;
|
||||
|
||||
for (i = 0; i < nr_clks; ++i)
|
||||
- clk_table[i] = ERR_PTR(-ENOENT);
|
||||
+ clk_table[i] = ERR_PTR(-EPROBE_DEFER);
|
||||
|
||||
ctx->reg_base = base;
|
||||
ctx->clk_data.clks = clk_table;
|
||||
@@ -446,6 +450,66 @@ unsigned long rockchip_clk_find_max_clk_
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rockchip_clk_find_max_clk_id);
|
||||
|
||||
+static struct platform_device *rockchip_clk_register_pdev(
|
||||
+ struct platform_device *parent,
|
||||
+ const char *name,
|
||||
+ struct device_node *np)
|
||||
+{
|
||||
+ struct platform_device_info pdevinfo = {
|
||||
+ .parent = &parent->dev,
|
||||
+ .name = name,
|
||||
+ .fwnode = of_fwnode_handle(np),
|
||||
+ .of_node_reused = true,
|
||||
+ };
|
||||
+
|
||||
+ return platform_device_register_full(&pdevinfo);
|
||||
+}
|
||||
+
|
||||
+static struct clk *rockchip_clk_register_linked_gate(
|
||||
+ struct rockchip_clk_provider *ctx,
|
||||
+ struct rockchip_clk_branch *clkbr)
|
||||
+{
|
||||
+ struct clk *linked_clk = ctx->clk_data.clks[clkbr->linked_clk_id];
|
||||
+ unsigned long flags = clkbr->flags | CLK_SET_RATE_PARENT;
|
||||
+ struct device_node *np = ctx->cru_node;
|
||||
+ struct platform_device *parent, *pdev;
|
||||
+ struct device *dev = NULL;
|
||||
+ int ret;
|
||||
+
|
||||
+ parent = of_find_device_by_node(np);
|
||||
+ if (!parent) {
|
||||
+ pr_err("failed to find device for %pOF\n", np);
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
+ pdev = rockchip_clk_register_pdev(parent, clkbr->name, np);
|
||||
+ put_device(&parent->dev);
|
||||
+ if (!pdev) {
|
||||
+ pr_err("failed to register device for clock %s\n", clkbr->name);
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
+ dev = &pdev->dev;
|
||||
+ pm_runtime_enable(dev);
|
||||
+ ret = pm_clk_create(dev);
|
||||
+ if (ret) {
|
||||
+ pr_err("failed to create PM clock list for %s\n", clkbr->name);
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
+ ret = pm_clk_add_clk(dev, linked_clk);
|
||||
+ if (ret) {
|
||||
+ pr_err("failed to setup linked clock for %s\n", clkbr->name);
|
||||
+ }
|
||||
+
|
||||
+exit:
|
||||
+ return clk_register_gate(dev, clkbr->name,
|
||||
+ clkbr->parent_names[0], flags,
|
||||
+ ctx->reg_base + clkbr->gate_offset,
|
||||
+ clkbr->gate_shift, clkbr->gate_flags,
|
||||
+ &ctx->lock);
|
||||
+}
|
||||
+
|
||||
void rockchip_clk_register_branches(struct rockchip_clk_provider *ctx,
|
||||
struct rockchip_clk_branch *list,
|
||||
unsigned int nr_clk)
|
||||
@@ -526,6 +590,9 @@ void rockchip_clk_register_branches(stru
|
||||
ctx->reg_base + list->gate_offset,
|
||||
list->gate_shift, list->gate_flags, &ctx->lock);
|
||||
break;
|
||||
+ case branch_linked_gate:
|
||||
+ clk = rockchip_clk_register_linked_gate(ctx, list);
|
||||
+ break;
|
||||
case branch_composite:
|
||||
clk = rockchip_clk_register_branch(list->name,
|
||||
list->parent_names, list->num_parents,
|
||||
--- a/drivers/clk/rockchip/clk.h
|
||||
+++ b/drivers/clk/rockchip/clk.h
|
||||
@@ -517,6 +517,7 @@ enum rockchip_clk_branch_type {
|
||||
branch_divider,
|
||||
branch_fraction_divider,
|
||||
branch_gate,
|
||||
+ branch_linked_gate,
|
||||
branch_mmc,
|
||||
branch_inverter,
|
||||
branch_factor,
|
||||
@@ -544,6 +545,7 @@ struct rockchip_clk_branch {
|
||||
int gate_offset;
|
||||
u8 gate_shift;
|
||||
u8 gate_flags;
|
||||
+ unsigned int linked_clk_id;
|
||||
struct rockchip_clk_branch *child;
|
||||
};
|
||||
|
||||
@@ -838,6 +840,20 @@ struct rockchip_clk_branch {
|
||||
.num_parents = 1, \
|
||||
.flags = f, \
|
||||
.gate_offset = o, \
|
||||
+ .gate_shift = b, \
|
||||
+ .gate_flags = gf, \
|
||||
+ }
|
||||
+
|
||||
+#define GATE_LINK(_id, cname, pname, linkedclk, f, o, b, gf) \
|
||||
+ { \
|
||||
+ .id = _id, \
|
||||
+ .branch_type = branch_linked_gate, \
|
||||
+ .name = cname, \
|
||||
+ .parent_names = (const char *[]){ pname }, \
|
||||
+ .linked_clk_id = linkedclk, \
|
||||
+ .num_parents = 1, \
|
||||
+ .flags = f, \
|
||||
+ .gate_offset = o, \
|
||||
.gate_shift = b, \
|
||||
.gate_flags = gf, \
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,46 @@
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
To: Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
|
||||
Kishon Vijay Abraham I <kishon@kernel.org>,
|
||||
linux-rockchip@lists.infradead.org,
|
||||
linux-phy@lists.infradead.org
|
||||
Cc: Rob Herring <robh+dt@kernel.org>,
|
||||
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
|
||||
Conor Dooley <conor+dt@kernel.org>,
|
||||
Frank Wang <frank.wang@rock-chips.com>,
|
||||
Kever Yang <kever.yang@rock-chips.com>,
|
||||
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
Sebastian Reichel <sebastian.reichel@collabora.com>,
|
||||
kernel@collabora.com
|
||||
Subject: [PATCH v2 06/12] arm64: dts: rockchip: Fix usb2phy nodename for rk3588
|
||||
Date: Tue, 13 Feb 2024 17:32:40 +0100 [thread overview]
|
||||
Message-ID: <20240213163609.44930-7-sebastian.reichel@collabora.com> (raw)
|
||||
In-Reply-To: <20240213163609.44930-1-sebastian.reichel@collabora.com>
|
||||
|
||||
usb2-phy should be named usb2phy according to the DT binding,
|
||||
so let's fix it up accordingly.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -543,7 +543,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
- u2phy2: usb2-phy@8000 {
|
||||
+ u2phy2: usb2phy@8000 {
|
||||
compatible = "rockchip,rk3588-usb2phy";
|
||||
reg = <0x8000 0x10>;
|
||||
interrupts = <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
@@ -568,7 +568,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
- u2phy3: usb2-phy@c000 {
|
||||
+ u2phy3: usb2phy@c000 {
|
||||
compatible = "rockchip,rk3588-usb2phy";
|
||||
reg = <0xc000 0x10>;
|
||||
interrupts = <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
@@ -0,0 +1,64 @@
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
To: Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
|
||||
Kishon Vijay Abraham I <kishon@kernel.org>,
|
||||
linux-rockchip@lists.infradead.org,
|
||||
linux-phy@lists.infradead.org
|
||||
Cc: Rob Herring <robh+dt@kernel.org>,
|
||||
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
|
||||
Conor Dooley <conor+dt@kernel.org>,
|
||||
Frank Wang <frank.wang@rock-chips.com>,
|
||||
Kever Yang <kever.yang@rock-chips.com>,
|
||||
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
Sebastian Reichel <sebastian.reichel@collabora.com>,
|
||||
kernel@collabora.com
|
||||
Subject: [PATCH v2 07/12] arm64: dts: rockchip: reorder usb2phy properties for rk3588
|
||||
Date: Tue, 13 Feb 2024 17:32:41 +0100 [thread overview]
|
||||
Message-ID: <20240213163609.44930-8-sebastian.reichel@collabora.com> (raw)
|
||||
In-Reply-To: <20240213163609.44930-1-sebastian.reichel@collabora.com>
|
||||
|
||||
Reorder common DT properties alphabetically for usb2phy, according
|
||||
to latest DT style rules.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -546,13 +546,13 @@
|
||||
u2phy2: usb2phy@8000 {
|
||||
compatible = "rockchip,rk3588-usb2phy";
|
||||
reg = <0x8000 0x10>;
|
||||
- interrupts = <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
- resets = <&cru SRST_OTGPHY_U2_0>, <&cru SRST_P_USB2PHY_U2_0_GRF0>;
|
||||
- reset-names = "phy", "apb";
|
||||
+ #clock-cells = <0>;
|
||||
clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>;
|
||||
clock-names = "phyclk";
|
||||
clock-output-names = "usb480m_phy2";
|
||||
- #clock-cells = <0>;
|
||||
+ interrupts = <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ resets = <&cru SRST_OTGPHY_U2_0>, <&cru SRST_P_USB2PHY_U2_0_GRF0>;
|
||||
+ reset-names = "phy", "apb";
|
||||
status = "disabled";
|
||||
|
||||
u2phy2_host: host-port {
|
||||
@@ -571,13 +571,13 @@
|
||||
u2phy3: usb2phy@c000 {
|
||||
compatible = "rockchip,rk3588-usb2phy";
|
||||
reg = <0xc000 0x10>;
|
||||
- interrupts = <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
- resets = <&cru SRST_OTGPHY_U2_1>, <&cru SRST_P_USB2PHY_U2_1_GRF0>;
|
||||
- reset-names = "phy", "apb";
|
||||
+ #clock-cells = <0>;
|
||||
clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>;
|
||||
clock-names = "phyclk";
|
||||
clock-output-names = "usb480m_phy3";
|
||||
- #clock-cells = <0>;
|
||||
+ interrupts = <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ resets = <&cru SRST_OTGPHY_U2_1>, <&cru SRST_P_USB2PHY_U2_1_GRF0>;
|
||||
+ reset-names = "phy", "apb";
|
||||
status = "disabled";
|
||||
|
||||
u2phy3_host: host-port {
|
||||
@@ -1,19 +1,32 @@
|
||||
From c7fe71f2048da9ca0e51aa163c3cbce99b4304b3 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Apr 2023 17:49:04 +0200
|
||||
Subject: [PATCH 20/41] arm64: dts: rockchip: rk3588s: Add USBDP phy nodes
|
||||
To: Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
|
||||
Kishon Vijay Abraham I <kishon@kernel.org>,
|
||||
linux-rockchip@lists.infradead.org,
|
||||
linux-phy@lists.infradead.org
|
||||
Cc: Rob Herring <robh+dt@kernel.org>,
|
||||
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
|
||||
Conor Dooley <conor+dt@kernel.org>,
|
||||
Frank Wang <frank.wang@rock-chips.com>,
|
||||
Kever Yang <kever.yang@rock-chips.com>,
|
||||
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
Sebastian Reichel <sebastian.reichel@collabora.com>,
|
||||
kernel@collabora.com
|
||||
Subject: [PATCH v2 08/12] arm64: dts: rockchip: add USBDP phys on rk3588
|
||||
Date: Tue, 13 Feb 2024 17:32:42 +0100 [thread overview]
|
||||
Message-ID: <20240213163609.44930-9-sebastian.reichel@collabora.com> (raw)
|
||||
In-Reply-To: <20240213163609.44930-1-sebastian.reichel@collabora.com>
|
||||
|
||||
Add both USB3-Displayport PHYs from RK3588.
|
||||
Add both USB3-DisplayPort PHYs to RK3588 SoC DT.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588.dtsi | 62 +++++++++++++++++++
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 73 +++++++++++++++++++++++
|
||||
2 files changed, 135 insertions(+)
|
||||
arch/arm64/boot/dts/rockchip/rk3588.dtsi | 61 +++++++++++++++++++
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 72 +++++++++++++++++++++++
|
||||
2 files changed, 133 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
@@ -17,6 +17,37 @@
|
||||
@@ -17,6 +17,36 @@
|
||||
reg = <0x0 0xfd5c0000 0x0 0x100>;
|
||||
};
|
||||
|
||||
@@ -23,22 +36,21 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ };
|
||||
+
|
||||
+ usb2phy1_grf: syscon@fd5d4000 {
|
||||
+ compatible = "rockchip,rk3588-usb2phy-grf", "syscon",
|
||||
+ "simple-mfd";
|
||||
+ compatible = "rockchip,rk3588-usb2phy-grf", "syscon", "simple-mfd";
|
||||
+ reg = <0x0 0xfd5d4000 0x0 0x4000>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ u2phy1: usb2-phy@4000 {
|
||||
+ u2phy1: usb2phy@4000 {
|
||||
+ compatible = "rockchip,rk3588-usb2phy";
|
||||
+ reg = <0x4000 0x10>;
|
||||
+ interrupts = <GIC_SPI 394 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ resets = <&cru SRST_OTGPHY_U3_1>, <&cru SRST_P_USB2PHY_U3_1_GRF0>;
|
||||
+ reset-names = "phy", "apb";
|
||||
+ #clock-cells = <0>;
|
||||
+ clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>;
|
||||
+ clock-names = "phyclk";
|
||||
+ clock-output-names = "usb480m_phy1";
|
||||
+ #clock-cells = <0>;
|
||||
+ interrupts = <GIC_SPI 394 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ resets = <&cru SRST_OTGPHY_U3_1>, <&cru SRST_P_USB2PHY_U3_1_GRF0>;
|
||||
+ reset-names = "phy", "apb";
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ u2phy1_otg: otg-port {
|
||||
@@ -51,17 +63,13 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
i2s8_8ch: i2s@fddc8000 {
|
||||
compatible = "rockchip,rk3588-i2s-tdm";
|
||||
reg = <0x0 0xfddc8000 0x0 0x1000>;
|
||||
@@ -310,6 +341,37 @@
|
||||
@@ -310,6 +340,37 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ usbdp_phy1: phy@fed90000 {
|
||||
+ compatible = "rockchip,rk3588-usbdp-phy";
|
||||
+ reg = <0x0 0xfed90000 0x0 0x10000>;
|
||||
+ rockchip,u2phy-grf = <&usb2phy1_grf>;
|
||||
+ rockchip,usb-grf = <&usb_grf>;
|
||||
+ rockchip,usbdpphy-grf = <&usbdpphy1_grf>;
|
||||
+ rockchip,vo-grf = <&vo0_grf>;
|
||||
+ clocks = <&cru CLK_USBDPPHY_MIPIDCPPHY_REF>,
|
||||
+ <&cru CLK_USBDP_PHY1_IMMORTAL>,
|
||||
+ <&cru PCLK_USBDPPHY1>,
|
||||
@@ -73,6 +81,10 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ <&cru SRST_USBDP_COMBO_PHY1_PCS>,
|
||||
+ <&cru SRST_P_USBDPPHY1>;
|
||||
+ reset-names = "init", "cmn", "lane", "pcs_apb", "pma_apb";
|
||||
+ rockchip,u2phy-grf = <&usb2phy1_grf>;
|
||||
+ rockchip,usb-grf = <&usb_grf>;
|
||||
+ rockchip,usbdpphy-grf = <&usbdpphy1_grf>;
|
||||
+ rockchip,vo-grf = <&vo0_grf>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ usbdp_phy1_dp: dp-port {
|
||||
@@ -91,7 +103,31 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
reg = <0x0 0xfee10000 0x0 0x100>;
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -484,6 +484,37 @@
|
||||
@@ -516,12 +516,23 @@
|
||||
reg = <0x0 0xfd5a4000 0x0 0x2000>;
|
||||
};
|
||||
|
||||
+ vo0_grf: syscon@fd5a6000 {
|
||||
+ compatible = "rockchip,rk3588-vo-grf", "syscon";
|
||||
+ reg = <0x0 0xfd5a6000 0x0 0x2000>;
|
||||
+ clocks = <&cru PCLK_VO0GRF>;
|
||||
+ };
|
||||
+
|
||||
vo1_grf: syscon@fd5a8000 {
|
||||
compatible = "rockchip,rk3588-vo-grf", "syscon";
|
||||
reg = <0x0 0xfd5a8000 0x0 0x100>;
|
||||
clocks = <&cru PCLK_VO1GRF>;
|
||||
};
|
||||
|
||||
+ usb_grf: syscon@fd5ac000 {
|
||||
+ compatible = "rockchip,rk3588-usb-grf", "syscon";
|
||||
+ reg = <0x0 0xfd5ac000 0x0 0x4000>;
|
||||
+ };
|
||||
+
|
||||
php_grf: syscon@fd5b0000 {
|
||||
compatible = "rockchip,rk3588-php-grf", "syscon";
|
||||
reg = <0x0 0xfd5b0000 0x0 0x1000>;
|
||||
@@ -537,6 +548,36 @@
|
||||
reg = <0x0 0xfd5c4000 0x0 0x100>;
|
||||
};
|
||||
|
||||
@@ -101,22 +137,21 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ };
|
||||
+
|
||||
+ usb2phy0_grf: syscon@fd5d0000 {
|
||||
+ compatible = "rockchip,rk3588-usb2phy-grf", "syscon",
|
||||
+ "simple-mfd";
|
||||
+ compatible = "rockchip,rk3588-usb2phy-grf", "syscon", "simple-mfd";
|
||||
+ reg = <0x0 0xfd5d0000 0x0 0x4000>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ u2phy0: usb2-phy@0 {
|
||||
+ u2phy0: usb2phy@0 {
|
||||
+ compatible = "rockchip,rk3588-usb2phy";
|
||||
+ reg = <0x0 0x10>;
|
||||
+ interrupts = <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ resets = <&cru SRST_OTGPHY_U3_0>, <&cru SRST_P_USB2PHY_U3_0_GRF0>;
|
||||
+ reset-names = "phy", "apb";
|
||||
+ #clock-cells = <0>;
|
||||
+ clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>;
|
||||
+ clock-names = "phyclk";
|
||||
+ clock-output-names = "usb480m_phy0";
|
||||
+ #clock-cells = <0>;
|
||||
+ interrupts = <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ resets = <&cru SRST_OTGPHY_U3_0>, <&cru SRST_P_USB2PHY_U3_0_GRF0>;
|
||||
+ reset-names = "phy", "apb";
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ u2phy0_otg: otg-port {
|
||||
@@ -129,35 +164,13 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
usb2phy2_grf: syscon@fd5d8000 {
|
||||
compatible = "rockchip,rk3588-usb2phy-grf", "syscon", "simple-mfd";
|
||||
reg = <0x0 0xfd5d8000 0x0 0x4000>;
|
||||
@@ -509,6 +540,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ vo0_grf: syscon@fd5a6000 {
|
||||
+ compatible = "rockchip,rk3588-vo-grf", "syscon";
|
||||
+ reg = <0x0 0xfd5a6000 0x0 0x2000>;
|
||||
+ clocks = <&cru PCLK_VO0GRF>;
|
||||
+ };
|
||||
+
|
||||
+ usb_grf: syscon@fd5ac000 {
|
||||
+ compatible = "rockchip,rk3588-usb-grf", "syscon";
|
||||
+ reg = <0x0 0xfd5ac000 0x0 0x4000>;
|
||||
+ };
|
||||
+
|
||||
usb2phy3_grf: syscon@fd5dc000 {
|
||||
compatible = "rockchip,rk3588-usb2phy-grf", "syscon", "simple-mfd";
|
||||
reg = <0x0 0xfd5dc000 0x0 0x4000>;
|
||||
@@ -2219,6 +2261,37 @@
|
||||
@@ -2360,6 +2401,37 @@
|
||||
#dma-cells = <1>;
|
||||
};
|
||||
|
||||
+ usbdp_phy0: phy@fed80000 {
|
||||
+ compatible = "rockchip,rk3588-usbdp-phy";
|
||||
+ reg = <0x0 0xfed80000 0x0 0x10000>;
|
||||
+ rockchip,u2phy-grf = <&usb2phy0_grf>;
|
||||
+ rockchip,usb-grf = <&usb_grf>;
|
||||
+ rockchip,usbdpphy-grf = <&usbdpphy0_grf>;
|
||||
+ rockchip,vo-grf = <&vo0_grf>;
|
||||
+ clocks = <&cru CLK_USBDPPHY_MIPIDCPPHY_REF>,
|
||||
+ <&cru CLK_USBDP_PHY0_IMMORTAL>,
|
||||
+ <&cru PCLK_USBDPPHY0>,
|
||||
@@ -169,6 +182,10 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ <&cru SRST_USBDP_COMBO_PHY0_PCS>,
|
||||
+ <&cru SRST_P_USBDPPHY0>;
|
||||
+ reset-names = "init", "cmn", "lane", "pcs_apb", "pma_apb";
|
||||
+ rockchip,u2phy-grf = <&usb2phy0_grf>;
|
||||
+ rockchip,usb-grf = <&usb_grf>;
|
||||
+ rockchip,usbdpphy-grf = <&usbdpphy0_grf>;
|
||||
+ rockchip,vo-grf = <&vo0_grf>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ usbdp_phy0_dp: dp-port {
|
||||
@@ -1,7 +1,20 @@
|
||||
From f4240c7c1db6d246bf84aa736e3cf13ea39429e9 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 18 Jul 2023 19:05:38 +0200
|
||||
Subject: [PATCH 21/41] arm64: dts: rockchip: rk3588s: Add USB3 DRD controllers
|
||||
To: Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
|
||||
Kishon Vijay Abraham I <kishon@kernel.org>,
|
||||
linux-rockchip@lists.infradead.org,
|
||||
linux-phy@lists.infradead.org
|
||||
Cc: Rob Herring <robh+dt@kernel.org>,
|
||||
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
|
||||
Conor Dooley <conor+dt@kernel.org>,
|
||||
Frank Wang <frank.wang@rock-chips.com>,
|
||||
Kever Yang <kever.yang@rock-chips.com>,
|
||||
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
Sebastian Reichel <sebastian.reichel@collabora.com>,
|
||||
kernel@collabora.com
|
||||
Subject: [PATCH v2 09/12] arm64: dts: rockchip: add USB3 DRD controllers on rk3588
|
||||
Date: Tue, 13 Feb 2024 17:32:43 +0100 [thread overview]
|
||||
Message-ID: <20240213163609.44930-10-sebastian.reichel@collabora.com> (raw)
|
||||
In-Reply-To: <20240213163609.44930-1-sebastian.reichel@collabora.com>
|
||||
|
||||
Add both USB3 dual-role controllers to the RK3588 devicetree.
|
||||
|
||||
@@ -24,7 +37,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ clocks = <&cru REF_CLK_USB3OTG1>, <&cru SUSPEND_CLK_USB3OTG1>,
|
||||
+ <&cru ACLK_USB3OTG1>;
|
||||
+ clock-names = "ref_clk", "suspend_clk", "bus_clk";
|
||||
+ dr_mode = "host";
|
||||
+ dr_mode = "otg";
|
||||
+ phys = <&u2phy1_otg>, <&usbdp_phy1_u3>;
|
||||
+ phy-names = "usb2-phy", "usb3-phy";
|
||||
+ phy_type = "utmi_wide";
|
||||
@@ -42,7 +55,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
reg = <0x0 0xfd5b8000 0x0 0x10000>;
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -399,6 +399,28 @@
|
||||
@@ -436,6 +436,28 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,27 +1,40 @@
|
||||
From 8760a05d818baa73e49ef7c7c142f9d0fdb28256 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Wed, 26 Apr 2023 21:18:43 +0200
|
||||
Subject: [PATCH 22/41] arm64: dts: rockchip: rk3588-evb1: add USB3
|
||||
To: Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
|
||||
Kishon Vijay Abraham I <kishon@kernel.org>,
|
||||
linux-rockchip@lists.infradead.org,
|
||||
linux-phy@lists.infradead.org
|
||||
Cc: Rob Herring <robh+dt@kernel.org>,
|
||||
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
|
||||
Conor Dooley <conor+dt@kernel.org>,
|
||||
Frank Wang <frank.wang@rock-chips.com>,
|
||||
Kever Yang <kever.yang@rock-chips.com>,
|
||||
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
Sebastian Reichel <sebastian.reichel@collabora.com>,
|
||||
kernel@collabora.com
|
||||
Subject: [PATCH v2 10/12] arm64: dts: rockchip: add USB3 to rk3588-evb1
|
||||
Date: Tue, 13 Feb 2024 17:32:44 +0100 [thread overview]
|
||||
Message-ID: <20240213163609.44930-11-sebastian.reichel@collabora.com> (raw)
|
||||
In-Reply-To: <20240213163609.44930-1-sebastian.reichel@collabora.com>
|
||||
|
||||
Add support for the boards USB3 type A, as well as its Type-C
|
||||
connector.
|
||||
Add support for the board's USB3 connectors. It has 1x USB Type-A
|
||||
and 1x USB Type-C.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 144 ++++++++++++++++++
|
||||
1 file changed, 144 insertions(+)
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 151 ++++++++++++++++++
|
||||
1 file changed, 151 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include <dt-bindings/usb/pd.h>
|
||||
#include "rk3588.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -134,6 +135,18 @@
|
||||
@@ -166,6 +167,18 @@
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usbdcin>;
|
||||
};
|
||||
@@ -40,7 +53,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
@@ -194,6 +207,56 @@
|
||||
@@ -226,6 +239,56 @@
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
@@ -59,7 +72,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ label = "USB-C";
|
||||
+ data-role = "dual";
|
||||
+ power-role = "dual";
|
||||
+ try-power-role = "sink";
|
||||
+ try-power-role = "source";
|
||||
+ op-sink-microwatt = <1000000>;
|
||||
+ sink-pdos =
|
||||
+ <PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
|
||||
@@ -97,7 +110,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
hym8563: rtc@51 {
|
||||
compatible = "haoyu,hym8563";
|
||||
reg = <0x51>;
|
||||
@@ -280,6 +343,16 @@
|
||||
@@ -312,6 +375,16 @@
|
||||
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
@@ -114,7 +127,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
@@ -905,6 +978,22 @@
|
||||
@@ -944,6 +1017,22 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -137,7 +150,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -943,3 +1032,58 @@
|
||||
@@ -982,3 +1071,65 @@
|
||||
&usb_host1_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -170,6 +183,12 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy1 {
|
||||
+ /*
|
||||
+ * USBDP PHY1 is wired to a female USB3 Type-A connector. Additionally
|
||||
+ * the differential pairs 2+3 and the aux channel are wired to a RTD2166,
|
||||
+ * which converts the DP signal into VGA. This is exposed on the
|
||||
+ * board via a female VGA connector.
|
||||
+ */
|
||||
+ rockchip,dp-lane-mux = <2 3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
@@ -194,5 +213,6 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+};
|
||||
+
|
||||
+&usb_host1_xhci {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
@@ -0,0 +1,71 @@
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
To: Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
|
||||
Kishon Vijay Abraham I <kishon@kernel.org>,
|
||||
linux-rockchip@lists.infradead.org,
|
||||
linux-phy@lists.infradead.org
|
||||
Cc: Rob Herring <robh+dt@kernel.org>,
|
||||
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
|
||||
Conor Dooley <conor+dt@kernel.org>,
|
||||
Frank Wang <frank.wang@rock-chips.com>,
|
||||
Kever Yang <kever.yang@rock-chips.com>,
|
||||
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
Sebastian Reichel <sebastian.reichel@collabora.com>,
|
||||
kernel@collabora.com
|
||||
Subject: [PATCH v2 11/12] arm64: dts: rockchip: add upper USB3 port to rock-5a
|
||||
Date: Tue, 13 Feb 2024 17:32:45 +0100 [thread overview]
|
||||
Message-ID: <20240213163609.44930-12-sebastian.reichel@collabora.com> (raw)
|
||||
In-Reply-To: <20240213163609.44930-1-sebastian.reichel@collabora.com>
|
||||
|
||||
Enable full support (XHCI, EHCI, OHCI) for the upper USB3 port from
|
||||
Radxa Rock 5 Model A. The lower one is already supported.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588s-rock-5a.dts | 22 +++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -699,6 +699,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -722,6 +730,15 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usbdp_phy0 {
|
||||
+ status = "okay";
|
||||
+ rockchip,dp-lane-mux = <2 3>;
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy0_u3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
@@ -732,6 +749,11 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host0_xhci {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host1_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -0,0 +1,70 @@
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
To: Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
|
||||
Kishon Vijay Abraham I <kishon@kernel.org>,
|
||||
linux-rockchip@lists.infradead.org,
|
||||
linux-phy@lists.infradead.org
|
||||
Cc: Rob Herring <robh+dt@kernel.org>,
|
||||
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
|
||||
Conor Dooley <conor+dt@kernel.org>,
|
||||
Frank Wang <frank.wang@rock-chips.com>,
|
||||
Kever Yang <kever.yang@rock-chips.com>,
|
||||
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
Sebastian Reichel <sebastian.reichel@collabora.com>,
|
||||
kernel@collabora.com
|
||||
Subject: [PATCH v2 12/12] arm64: dts: rockchip: add lower USB3 port to rock-5b
|
||||
Date: Tue, 13 Feb 2024 17:32:46 +0100 [thread overview]
|
||||
Message-ID: <20240213163609.44930-13-sebastian.reichel@collabora.com> (raw)
|
||||
In-Reply-To: <20240213163609.44930-1-sebastian.reichel@collabora.com>
|
||||
|
||||
Enable full support (XHCI, EHCI, OHCI) for the lower USB3 port from
|
||||
Radxa Rock 5 Model B. The upper one is already supported.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 21 +++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -745,6 +745,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&u2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -764,6 +772,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usbdp_phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy1_u3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -780,6 +796,11 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host1_xhci {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host2_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
From 97b72e2d95039c733573459bd15f5a0e96aa3a68 Mon Sep 17 00:00:00 2001
|
||||
From c686cce2ef2634168938e37caa2a0f8e1de65a94 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Thu, 20 Jul 2023 18:59:37 +0200
|
||||
Subject: [PATCH 13/41] usb: dwc3: add optional PHY interface clocks
|
||||
Subject: [PATCH] usb: dwc3: add optional PHY interface clocks
|
||||
|
||||
On Rockchip RK3588 one of the DWC3 cores is integrated weirdly and
|
||||
requires two extra clocks to be enabled. Without these extra clocks
|
||||
@@ -45,25 +45,25 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
clk_disable_unprepare(dwc->susp_clk);
|
||||
clk_disable_unprepare(dwc->ref_clk);
|
||||
clk_disable_unprepare(dwc->bus_clk);
|
||||
@@ -1836,6 +1850,18 @@ static int dwc3_get_clocks(struct dwc3 *
|
||||
@@ -1834,6 +1848,18 @@ static int dwc3_get_clocks(struct dwc3 *
|
||||
return dev_err_probe(dev, PTR_ERR(dwc->susp_clk),
|
||||
"could not get suspend clock\n");
|
||||
}
|
||||
+
|
||||
+ dwc->utmi_clk = devm_clk_get_optional(dev, "utmi");
|
||||
+ if (IS_ERR(dwc->utmi_clk)) {
|
||||
+ return dev_err_probe(dev, PTR_ERR(dwc->utmi_clk),
|
||||
+ "could not get utmi clock\n");
|
||||
+ }
|
||||
+
|
||||
+ dwc->pipe_clk = devm_clk_get_optional(dev, "pipe");
|
||||
+ if (IS_ERR(dwc->pipe_clk)) {
|
||||
+ return dev_err_probe(dev, PTR_ERR(dwc->pipe_clk),
|
||||
+ "could not get pipe clock\n");
|
||||
+ }
|
||||
}
|
||||
|
||||
+ dwc->utmi_clk = devm_clk_get_optional(dev, "utmi");
|
||||
+ if (IS_ERR(dwc->utmi_clk)) {
|
||||
+ return dev_err_probe(dev, PTR_ERR(dwc->utmi_clk),
|
||||
+ "could not get utmi clock\n");
|
||||
+ }
|
||||
+
|
||||
+ dwc->pipe_clk = devm_clk_get_optional(dev, "pipe");
|
||||
+ if (IS_ERR(dwc->pipe_clk)) {
|
||||
+ return dev_err_probe(dev, PTR_ERR(dwc->pipe_clk),
|
||||
+ "could not get pipe clock\n");
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- a/drivers/usb/dwc3/core.h
|
||||
+++ b/drivers/usb/dwc3/core.h
|
||||
@@ -996,6 +996,8 @@ struct dwc3_scratchpad_array {
|
||||
@@ -1,7 +1,7 @@
|
||||
From d49623b5cd3b29f946a95521fbb2a44eda0aea9c Mon Sep 17 00:00:00 2001
|
||||
From 2d51b382bcd4b05d944b55d483caac1fda338908 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 28 Jul 2023 16:43:16 +0200
|
||||
Subject: [PATCH 35/41] usb: typec: tcpm: avoid graph warning
|
||||
Subject: [PATCH] usb: typec: tcpm: avoid graph warning
|
||||
|
||||
When using a devicetree as described in commit d56de8c9a17d ("usb:
|
||||
typec: tcpm: try to get role switch from tcpc fwnode"), the kernel
|
||||
@@ -28,7 +28,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
|
||||
--- a/drivers/usb/typec/tcpm/tcpm.c
|
||||
+++ b/drivers/usb/typec/tcpm/tcpm.c
|
||||
@@ -6597,9 +6597,9 @@ struct tcpm_port *tcpm_register_port(str
|
||||
@@ -6595,9 +6595,9 @@ struct tcpm_port *tcpm_register_port(str
|
||||
port->partner_desc.identity = &port->partner_ident;
|
||||
port->port_type = port->typec_caps.type;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From cc2a0371626a00d8c2778594f8302c7836900be0 Mon Sep 17 00:00:00 2001
|
||||
From 28ce8a074fe8944a0614dcde539456312f915113 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 4 Apr 2023 17:30:46 +0200
|
||||
Subject: [PATCH 28/41] arm64: dts: rockchip: rk3588: add cpu frequency scaling
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588: add cpu frequency scaling
|
||||
support
|
||||
|
||||
Add required bits for CPU frequency scaling to the Rockchip 3588
|
||||
@@ -25,9 +25,9 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
|
||||
/ {
|
||||
compatible = "rockchip,rk3588";
|
||||
@@ -18,6 +19,215 @@
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
@@ -50,6 +51,215 @@
|
||||
spi4 = &spi4;
|
||||
};
|
||||
|
||||
+ cluster0_opp_table: opp-table-cluster0 {
|
||||
+ compatible = "operating-points-v2";
|
||||
@@ -241,7 +241,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@@ -64,6 +274,7 @@
|
||||
@@ -96,6 +306,7 @@
|
||||
clocks = <&scmi_clk SCMI_CLK_CPUL>;
|
||||
assigned-clocks = <&scmi_clk SCMI_CLK_CPUL>;
|
||||
assigned-clock-rates = <816000000>;
|
||||
@@ -249,7 +249,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
i-cache-size = <32768>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -83,6 +294,7 @@
|
||||
@@ -115,6 +326,7 @@
|
||||
enable-method = "psci";
|
||||
capacity-dmips-mhz = <530>;
|
||||
clocks = <&scmi_clk SCMI_CLK_CPUL>;
|
||||
@@ -257,7 +257,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
i-cache-size = <32768>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -102,6 +314,7 @@
|
||||
@@ -134,6 +346,7 @@
|
||||
enable-method = "psci";
|
||||
capacity-dmips-mhz = <530>;
|
||||
clocks = <&scmi_clk SCMI_CLK_CPUL>;
|
||||
@@ -265,7 +265,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
i-cache-size = <32768>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -121,6 +334,7 @@
|
||||
@@ -153,6 +366,7 @@
|
||||
enable-method = "psci";
|
||||
capacity-dmips-mhz = <530>;
|
||||
clocks = <&scmi_clk SCMI_CLK_CPUL>;
|
||||
@@ -273,7 +273,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
i-cache-size = <32768>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -142,6 +356,7 @@
|
||||
@@ -174,6 +388,7 @@
|
||||
clocks = <&scmi_clk SCMI_CLK_CPUB01>;
|
||||
assigned-clocks = <&scmi_clk SCMI_CLK_CPUB01>;
|
||||
assigned-clock-rates = <816000000>;
|
||||
@@ -281,7 +281,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
i-cache-size = <65536>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -161,6 +376,7 @@
|
||||
@@ -193,6 +408,7 @@
|
||||
enable-method = "psci";
|
||||
capacity-dmips-mhz = <1024>;
|
||||
clocks = <&scmi_clk SCMI_CLK_CPUB01>;
|
||||
@@ -289,7 +289,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
i-cache-size = <65536>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -182,6 +398,7 @@
|
||||
@@ -214,6 +430,7 @@
|
||||
clocks = <&scmi_clk SCMI_CLK_CPUB23>;
|
||||
assigned-clocks = <&scmi_clk SCMI_CLK_CPUB23>;
|
||||
assigned-clock-rates = <816000000>;
|
||||
@@ -297,7 +297,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
i-cache-size = <65536>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -201,6 +418,7 @@
|
||||
@@ -233,6 +450,7 @@
|
||||
enable-method = "psci";
|
||||
capacity-dmips-mhz = <1024>;
|
||||
clocks = <&scmi_clk SCMI_CLK_CPUB23>;
|
||||
@@ -305,8 +305,8 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
i-cache-size = <65536>;
|
||||
i-cache-line-size = <64>;
|
||||
@@ -362,6 +580,230 @@
|
||||
#clock-cells = <0>;
|
||||
@@ -399,6 +617,230 @@
|
||||
ports = <&vop_out>;
|
||||
};
|
||||
|
||||
+ thermal_zones: thermal-zones {
|
||||
@@ -536,8 +536,8 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
@@ -491,6 +933,16 @@
|
||||
reg = <0x0 0xfd58c000 0x0 0x1000>;
|
||||
@@ -555,6 +997,16 @@
|
||||
reg = <0x0 0xfd5ac000 0x0 0x4000>;
|
||||
};
|
||||
|
||||
+ bigcore0_grf: syscon@fd590000 {
|
||||
@@ -1,7 +1,7 @@
|
||||
From e0afda8017b1b504c7925f45ef0200e80df8e44b Mon Sep 17 00:00:00 2001
|
||||
From efdf918a1667bf01b167eb98d582d75e14147903 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Thu, 25 May 2023 19:45:02 +0200
|
||||
Subject: [PATCH 29/41] arm64: dts: rockchip: enable RK3588 tsadc by default
|
||||
Subject: [PATCH] arm64: dts: rockchip: enable RK3588 tsadc by default
|
||||
|
||||
Enable the thermal ADC for all boards.
|
||||
|
||||
@@ -12,7 +12,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -2600,7 +2600,6 @@
|
||||
@@ -2740,7 +2740,6 @@
|
||||
pinctrl-1 = <&tsadc_shut>;
|
||||
pinctrl-names = "gpio", "otpout";
|
||||
#thermal-sensor-cells = <1>;
|
||||
@@ -0,0 +1,48 @@
|
||||
From 44ab35d703a396c625ae90fcaa2777e4dcfd6c73 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Thu, 18 Aug 2022 14:35:46 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588-evb1: add cpu regulator info
|
||||
|
||||
Add regulator information for the CPU and enable the thermal sensor
|
||||
to have working cpu frequency scaling.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -221,6 +221,21 @@
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
+&cpu_l0 {
|
||||
+ cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b0 {
|
||||
+ cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big0_mem_s0>;
|
||||
+};
|
||||
+
|
||||
+&cpu_b2 {
|
||||
+ cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big1_mem_s0>;
|
||||
+};
|
||||
+
|
||||
&gmac0 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy>;
|
||||
@@ -1051,6 +1066,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tsadc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart2 {
|
||||
pinctrl-0 = <&uart2m0_xfer>;
|
||||
status = "okay";
|
||||
@@ -1,8 +1,7 @@
|
||||
From 977ddbb94890f5afa2daa8726ab05c6afd71c472 Mon Sep 17 00:00:00 2001
|
||||
From a6000cf17b43c6e953c9f75bfc05ace3d2fd72fe Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Mon, 24 Jul 2023 15:18:39 +0200
|
||||
Subject: [PATCH 31/41] arm64: dts: rockchip: rock5a: add cpu mem regulator
|
||||
info
|
||||
Subject: [PATCH] arm64: dts: rockchip: rock5a: add cpu mem regulator info
|
||||
|
||||
Add the second supply regulator for the CPU cores, which is used
|
||||
for supplying the memory interface.
|
||||
@@ -14,7 +13,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -120,34 +120,42 @@
|
||||
@@ -123,34 +123,42 @@
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
@@ -1,8 +1,7 @@
|
||||
From 379715d7c42f5103a6b8de741b090d2e51344826 Mon Sep 17 00:00:00 2001
|
||||
From 3b70b9529d63d21f0ed03c332d8877b63b968d10 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Mon, 24 Jul 2023 15:07:49 +0200
|
||||
Subject: [PATCH 32/41] arm64: dts: rockchip: rock5b: add cpu mem regulator
|
||||
info
|
||||
Subject: [PATCH] arm64: dts: rockchip: rock5b: add cpu mem regulator info
|
||||
|
||||
Add the second supply regulator for the CPU cores, which is used
|
||||
for supplying the memory interface.
|
||||
@@ -14,7 +13,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -129,34 +129,42 @@
|
||||
@@ -154,34 +154,42 @@
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
@@ -1,11 +1,17 @@
|
||||
From 1583cee0fdadc3bf16bb8903761a82bf92b62320 Mon Sep 17 00:00:00 2001
|
||||
From 152b46f9ad81fe60f2845c87b0298db84bbecdc9 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Jul 2023 18:35:56 +0200
|
||||
Subject: [PATCH 38/41] arm64: dts: rockchip: rk3588-rock5b: add USB-C support
|
||||
Subject: [PATCH] [BROKEN] arm64: dts: rockchip: rk3588-rock5b: add USB-C
|
||||
support
|
||||
|
||||
Add support for using the Radxa Rock 5 Model B USB-C port for USB in
|
||||
OHCI, EHCI or XHCI mode. Displayport AltMode is not yet supported.
|
||||
|
||||
Note: Enabling support for the USB-C port results in a board reset
|
||||
when the system is supplied with a PD capable power-supply. Until
|
||||
this has been analyzed and fixed, let's disable support for the
|
||||
Type-C port.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 119 ++++++++++++++++++
|
||||
@@ -21,8 +27,8 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
#include "rk3588.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -58,6 +59,15 @@
|
||||
#cooling-cells = <2>;
|
||||
@@ -69,6 +70,15 @@
|
||||
shutdown-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
+ vcc12v_dcin: vcc12v-dcin-regulator {
|
||||
@@ -36,8 +42,8 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+
|
||||
vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_pcie2x1l0";
|
||||
@@ -116,6 +126,7 @@
|
||||
enable-active-high;
|
||||
@@ -127,6 +137,7 @@
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
@@ -45,7 +51,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
};
|
||||
|
||||
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
|
||||
@@ -221,6 +232,61 @@
|
||||
@@ -232,6 +243,61 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -62,7 +68,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&usbc0_int>;
|
||||
+ vbus-supply = <&vcc12v_dcin>;
|
||||
+ status = "okay";
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ usb_con: connector {
|
||||
+ compatible = "usb-c-connector";
|
||||
@@ -107,7 +113,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&i2c6 {
|
||||
status = "okay";
|
||||
|
||||
@@ -350,6 +416,10 @@
|
||||
@@ -361,6 +427,10 @@
|
||||
vcc5v0_host_en: vcc5v0-host-en {
|
||||
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
@@ -118,7 +124,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
};
|
||||
};
|
||||
|
||||
@@ -715,6 +785,14 @@
|
||||
@@ -753,6 +823,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -133,7 +139,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&u2phy1 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -750,6 +828,33 @@
|
||||
@@ -788,6 +866,33 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -167,7 +173,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -758,6 +863,20 @@
|
||||
@@ -796,6 +901,20 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
From ab9b8789c6e472196230793b207e6ed69aacb156 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Thu, 20 Jul 2023 18:05:56 +0200
|
||||
Subject: [PATCH 12/41] dt-bindings: usb: add rk3588 compatible to
|
||||
rockchip,dwc3
|
||||
|
||||
RK3588 has three DWC3 controllers. Two of them are fully functional in
|
||||
host, device and OTG mode including USB2 support. They are connected to
|
||||
dedicated PHYs, that also support USB-C's DisplayPort alternate mode.
|
||||
|
||||
The third controller is connected to one of the combphy's shared
|
||||
with PCIe and SATA. It can only be used in host mode and does not
|
||||
support USB2. Compared to the other controllers this one needs
|
||||
some extra clocks.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../devicetree/bindings/usb/rockchip,dwc3.yaml | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml
|
||||
+++ b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml
|
||||
@@ -30,6 +30,7 @@ select:
|
||||
enum:
|
||||
- rockchip,rk3328-dwc3
|
||||
- rockchip,rk3568-dwc3
|
||||
+ - rockchip,rk3588-dwc3
|
||||
required:
|
||||
- compatible
|
||||
|
||||
@@ -39,6 +40,7 @@ properties:
|
||||
- enum:
|
||||
- rockchip,rk3328-dwc3
|
||||
- rockchip,rk3568-dwc3
|
||||
+ - rockchip,rk3588-dwc3
|
||||
- const: snps,dwc3
|
||||
|
||||
reg:
|
||||
@@ -58,7 +60,9 @@ properties:
|
||||
Master/Core clock, must to be >= 62.5 MHz for SS
|
||||
operation and >= 30MHz for HS operation
|
||||
- description:
|
||||
- Controller grf clock
|
||||
+ Controller grf clock OR UTMI clock
|
||||
+ - description:
|
||||
+ PIPE clock
|
||||
|
||||
clock-names:
|
||||
minItems: 3
|
||||
@@ -66,7 +70,10 @@ properties:
|
||||
- const: ref_clk
|
||||
- const: suspend_clk
|
||||
- const: bus_clk
|
||||
- - const: grf_clk
|
||||
+ - enum:
|
||||
+ - grf_clk
|
||||
+ - utmi
|
||||
+ - const: pipe
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
@@ -1,185 +0,0 @@
|
||||
From f03ed7758b9e7d08737a026bd9e666ac2746d1d8 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Apr 2023 17:38:57 +0200
|
||||
Subject: [PATCH 17/41] dt-bindings: phy: add rockchip usbdp combo phy document
|
||||
|
||||
Add device tree binding document for Rockchip USBDP Combo PHY
|
||||
with Samsung IP block.
|
||||
|
||||
Co-developed-by: Frank Wang <frank.wang@rock-chips.com>
|
||||
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../bindings/phy/phy-rockchip-usbdp.yaml | 166 ++++++++++++++++++
|
||||
1 file changed, 166 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml
|
||||
@@ -0,0 +1,166 @@
|
||||
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/phy/phy-rockchip-usbdp.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: Rockchip USBDP Combo PHY with Samsung IP block
|
||||
+
|
||||
+maintainers:
|
||||
+ - Frank Wang <frank.wang@rock-chips.com>
|
||||
+ - Zhang Yubing <yubing.zhang@rock-chips.com>
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ enum:
|
||||
+ - rockchip,rk3588-usbdp-phy
|
||||
+
|
||||
+ reg:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ clocks:
|
||||
+ maxItems: 4
|
||||
+
|
||||
+ clock-names:
|
||||
+ items:
|
||||
+ - const: refclk
|
||||
+ - const: immortal
|
||||
+ - const: pclk
|
||||
+ - const: utmi
|
||||
+
|
||||
+ resets:
|
||||
+ maxItems: 5
|
||||
+
|
||||
+ reset-names:
|
||||
+ items:
|
||||
+ - const: init
|
||||
+ - const: cmn
|
||||
+ - const: lane
|
||||
+ - const: pcs_apb
|
||||
+ - const: pma_apb
|
||||
+
|
||||
+ rockchip,dp-lane-mux:
|
||||
+ $ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
+ minItems: 2
|
||||
+ maxItems: 4
|
||||
+ description:
|
||||
+ An array of physical Tyep-C lanes indexes. Position of an entry determines
|
||||
+ the dp lane index, while the value of an entry indicater physical Type-C lane.
|
||||
+ The support dp lanes number are 2 or 4. e.g. for 2 lanes dp lanes map, we could
|
||||
+ have "rockchip,dp-lane-mux = <2, 3>;", assuming dp lane0 on Type-C phy lane2,
|
||||
+ dp lane1 on Type-C phy lane3. For 4 lanes dp lanes map, we could have
|
||||
+ "rockchip,dp-lane-mux = <0, 1, 2, 3>;", assuming dp lane0 on Type-C phy lane0,
|
||||
+ dp lane1 on Type-C phy lane1, dp lane2 on Type-C phy lane2, dp lane3 on Type-C
|
||||
+ phy lane3. If dp lane map by DisplayPort Alt mode, this property is not need.
|
||||
+
|
||||
+ rockchip,u2phy-grf:
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle
|
||||
+ description:
|
||||
+ Phandle to the syscon managing the 'usb2 phy general register files'.
|
||||
+
|
||||
+ rockchip,usb-grf:
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle
|
||||
+ description:
|
||||
+ Phandle to the syscon managing the 'usb general register files'.
|
||||
+
|
||||
+ rockchip,usbdpphy-grf:
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle
|
||||
+ description:
|
||||
+ Phandle to the syscon managing the 'usbdp phy general register files'.
|
||||
+
|
||||
+ rockchip,vo-grf:
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle
|
||||
+ description:
|
||||
+ Phandle to the syscon managing the 'video output general register files'.
|
||||
+ When select the dp lane mapping will request its phandle.
|
||||
+
|
||||
+ sbu1-dc-gpios:
|
||||
+ description:
|
||||
+ GPIO connected to the SBU1 line of the USB-C connector via a big resistor
|
||||
+ (~100K) to apply a DC offset for signalling the connector orientation.
|
||||
+
|
||||
+ sbu2-dc-gpios:
|
||||
+ description:
|
||||
+ GPIO connected to the SBU2 line of the USB-C connector via a big resistor
|
||||
+ (~100K) to apply a DC offset for signalling the connector orientation.
|
||||
+
|
||||
+ orientation-switch:
|
||||
+ description: Flag the port as possible handler of orientation switching
|
||||
+ type: boolean
|
||||
+
|
||||
+ mode-switch:
|
||||
+ description: Flag the port as possible handle of altmode switching
|
||||
+ type: boolean
|
||||
+
|
||||
+ dp-port:
|
||||
+ type: object
|
||||
+ additionalProperties: false
|
||||
+
|
||||
+ properties:
|
||||
+ "#phy-cells":
|
||||
+ const: 0
|
||||
+
|
||||
+ required:
|
||||
+ - "#phy-cells"
|
||||
+
|
||||
+ usb3-port:
|
||||
+ type: object
|
||||
+ additionalProperties: false
|
||||
+
|
||||
+ properties:
|
||||
+ "#phy-cells":
|
||||
+ const: 0
|
||||
+
|
||||
+ required:
|
||||
+ - "#phy-cells"
|
||||
+
|
||||
+ port:
|
||||
+ $ref: /schemas/graph.yaml#/properties/port
|
||||
+ description:
|
||||
+ A port node to link the PHY to a TypeC controller for the purpose of
|
||||
+ handling orientation switching.
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - reg
|
||||
+ - clocks
|
||||
+ - clock-names
|
||||
+ - resets
|
||||
+ - reset-names
|
||||
+ - dp-port
|
||||
+ - usb3-port
|
||||
+
|
||||
+additionalProperties: false
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ #include <dt-bindings/clock/rk3588-cru.h>
|
||||
+
|
||||
+ usbdp_phy0: phy@fed80000 {
|
||||
+ compatible = "rockchip,rk3588-usbdp-phy";
|
||||
+ reg = <0x0 0xfed80000 0x0 0x10000>;
|
||||
+ rockchip,u2phy-grf = <&usb2phy0_grf>;
|
||||
+ rockchip,usb-grf = <&usb_grf>;
|
||||
+ rockchip,usbdpphy-grf = <&usbdpphy0_grf>;
|
||||
+ rockchip,vo-grf = <&vo0_grf>;
|
||||
+ clocks = <&cru CLK_USBDPPHY_MIPIDCPPHY_REF>,
|
||||
+ <&cru CLK_USBDP_PHY0_IMMORTAL>,
|
||||
+ <&cru PCLK_USBDPPHY0>;
|
||||
+ clock-names = "refclk", "immortal", "pclk";
|
||||
+ resets = <&cru SRST_USBDP_COMBO_PHY0_INIT>,
|
||||
+ <&cru SRST_USBDP_COMBO_PHY0_CMN>,
|
||||
+ <&cru SRST_USBDP_COMBO_PHY0_LANE>,
|
||||
+ <&cru SRST_USBDP_COMBO_PHY0_PCS>,
|
||||
+ <&cru SRST_P_USBDPPHY0>;
|
||||
+ reset-names = "init", "cmn", "lane", "pcs_apb", "pma_apb";
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ usbdp_phy0_dp: dp-port {
|
||||
+ #phy-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ usbdp_phy0_u3: usb3-port {
|
||||
+ #phy-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
@@ -1,57 +0,0 @@
|
||||
From 86af665b81ec23dbefc97f1b481d17536fd84f26 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 30 May 2023 18:49:48 +0200
|
||||
Subject: [PATCH 18/41] dt-bindings: soc: rockchip: add rk3588 USB3 syscon
|
||||
|
||||
RK3588 USB3 support requires the GRF for USB, USBDP PHY and VO.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../devicetree/bindings/soc/rockchip/grf.yaml | 22 +++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
|
||||
+++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
|
||||
@@ -28,6 +28,9 @@ properties:
|
||||
- rockchip,rk3588-sys-grf
|
||||
- rockchip,rk3588-pcie3-phy-grf
|
||||
- rockchip,rk3588-pcie3-pipe-grf
|
||||
+ - rockchip,rk3588-usb-grf
|
||||
+ - rockchip,rk3588-usbdpphy-grf
|
||||
+ - rockchip,rk3588-vo-grf
|
||||
- rockchip,rv1108-usbgrf
|
||||
- const: syscon
|
||||
- items:
|
||||
@@ -64,6 +67,9 @@ properties:
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
+ clocks:
|
||||
+ maxItems: 1
|
||||
+
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
@@ -245,6 +251,22 @@ allOf:
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
+ - if:
|
||||
+ properties:
|
||||
+ compatible:
|
||||
+ contains:
|
||||
+ enum:
|
||||
+ - rockchip,rk3588-vo-grf
|
||||
+
|
||||
+ then:
|
||||
+ required:
|
||||
+ - clocks
|
||||
+
|
||||
+ else:
|
||||
+ properties:
|
||||
+ clocks: false
|
||||
+
|
||||
+
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/rk3399-cru.h>
|
||||
@@ -1,27 +0,0 @@
|
||||
From 87e0a8bd8a089128bb8097939ccb15812b308f65 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
|
||||
Date: Mon, 12 Jun 2023 14:57:58 +0200
|
||||
Subject: [PATCH 26/41] dt-bindings: media: rockchip: Add resets property into
|
||||
decoder node
|
||||
|
||||
RK3588 AV1 decoder hardware block have resets lines and driver code
|
||||
already suppport it.
|
||||
Update yaml file to be aligned with this feature.
|
||||
|
||||
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
|
||||
---
|
||||
Documentation/devicetree/bindings/media/rockchip-vpu.yaml | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml
|
||||
+++ b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml
|
||||
@@ -68,6 +68,9 @@ properties:
|
||||
iommus:
|
||||
maxItems: 1
|
||||
|
||||
+ resets:
|
||||
+ maxItems: 4
|
||||
+
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
@@ -1,59 +0,0 @@
|
||||
From 68c46abeacb0587ed74044291f0aeca2be5b0683 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Thu, 25 May 2023 19:48:49 +0200
|
||||
Subject: [PATCH 30/41] arm64: dts: rockchip: rk3588-evb1: add cpu mem
|
||||
regulator info
|
||||
|
||||
Add the second supply regulator for the CPU cores, which is used
|
||||
for supplying the memory interface.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -159,34 +159,42 @@
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big0_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big0_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big1_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
+ mem-supply = <&vdd_cpu_big1_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_l0 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_l1 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_l2 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&cpu_l3 {
|
||||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
+ mem-supply = <&vdd_cpu_lit_mem_s0>;
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
@@ -1,59 +0,0 @@
|
||||
From 8d7efd46755f22f6a2927e9815a4d5823db5f3b2 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Jul 2023 16:30:46 +0200
|
||||
Subject: [PATCH 36/41] arm64: dts: rockchip: rk3588s-rock5a: add upper USB3
|
||||
port
|
||||
|
||||
Enable full support (XHCI, EHCI, OHCI) for the upper USB3 port from
|
||||
Radxa Rock 5 Model A.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588s-rock-5a.dts | 22 +++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -706,6 +706,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -729,6 +737,15 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usbdp_phy0 {
|
||||
+ status = "okay";
|
||||
+ rockchip,dp-lane-mux = <2 3>;
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy0_u3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
@@ -739,6 +756,11 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host0_xhci {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host1_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -1,57 +0,0 @@
|
||||
From e0b50dce22908bf995eedfbffde7b7b39a9190bd Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Jul 2023 17:18:17 +0200
|
||||
Subject: [PATCH 37/41] arm64: dts: rockchip: rk3588-rock5b: add lower USB3
|
||||
port
|
||||
|
||||
Enable full support (XHCI, EHCI, OHCI) for the lower USB3 port from
|
||||
Radxa Rock 5 Model B.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-rock-5b.dts | 20 +++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -715,6 +715,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&u2phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy1_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&u2phy2 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -734,6 +742,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usbdp_phy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy1_u3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -750,6 +766,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usb_host1_xhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb_host2_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -1,86 +0,0 @@
|
||||
From 049b5480e1b96ecffcb2e0fac72abc658c148d0c Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 14 Jul 2023 17:38:24 +0200
|
||||
Subject: [PATCH 39/41] arm64: dts: rockchip: rk3588-evb1: add PCIe2 WLAN
|
||||
controller
|
||||
|
||||
Enable PCIe bus used by on-board PCIe Broadcom WLAN controller.
|
||||
|
||||
TODO: The WLAN controller is not detected.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 34 +++++++++++++++++++
|
||||
1 file changed, 34 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -63,6 +63,15 @@
|
||||
pwms = <&pwm2 0 25000 0>;
|
||||
};
|
||||
|
||||
+ wlan-rfkill {
|
||||
+ compatible = "rfkill-gpio";
|
||||
+ label = "rfkill-pcie-wlan";
|
||||
+ radio-type = "wlan";
|
||||
+ shutdown-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_pwren>, <&wifi_host_wake_irq>;
|
||||
+ };
|
||||
+
|
||||
pcie20_avdd0v85: pcie20-avdd0v85-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "pcie20_avdd0v85";
|
||||
@@ -186,6 +195,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&combphy1_ps {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&combphy2_psu {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -324,6 +337,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&pcie2x1l0 {
|
||||
+ reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&pcie2_0_rst>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&pcie2x1l1 {
|
||||
reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
@@ -364,6 +384,10 @@
|
||||
};
|
||||
|
||||
pcie2 {
|
||||
+ pcie2_0_rst: pcie2-0-rst {
|
||||
+ rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
pcie2_1_rst: pcie2-1-rst {
|
||||
rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
@@ -394,6 +418,16 @@
|
||||
rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ wlan {
|
||||
+ wifi_host_wake_irq: wifi-host-wake-irq {
|
||||
+ rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwren: wifi-pwren {
|
||||
+ rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
@@ -1,136 +0,0 @@
|
||||
From dbfa3907a8cebfb47e5d11e64702e961508f16b7 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Jul 2023 18:49:43 +0200
|
||||
Subject: [PATCH 40/41] dt-bindings: es8328: convert to DT schema format
|
||||
|
||||
Convert the binding to DT schema format.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../devicetree/bindings/sound/es8328.txt | 38 ---------
|
||||
.../bindings/sound/everest,es8328.yaml | 77 +++++++++++++++++++
|
||||
2 files changed, 77 insertions(+), 38 deletions(-)
|
||||
delete mode 100644 Documentation/devicetree/bindings/sound/es8328.txt
|
||||
create mode 100644 Documentation/devicetree/bindings/sound/everest,es8328.yaml
|
||||
|
||||
--- a/Documentation/devicetree/bindings/sound/es8328.txt
|
||||
+++ /dev/null
|
||||
@@ -1,38 +0,0 @@
|
||||
-Everest ES8328 audio CODEC
|
||||
-
|
||||
-This device supports both I2C and SPI.
|
||||
-
|
||||
-Required properties:
|
||||
-
|
||||
- - compatible : Should be "everest,es8328" or "everest,es8388"
|
||||
- - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V
|
||||
- - AVDD-supply : Regulator providing analog supply voltage 3.3V
|
||||
- - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V
|
||||
- - IPVDD-supply : Regulator providing analog output voltage 3.3V
|
||||
- - clocks : A 22.5792 or 11.2896 MHz clock
|
||||
- - reg : the I2C address of the device for I2C, the chip select number for SPI
|
||||
-
|
||||
-Pins on the device (for linking into audio routes):
|
||||
-
|
||||
- * LOUT1
|
||||
- * LOUT2
|
||||
- * ROUT1
|
||||
- * ROUT2
|
||||
- * LINPUT1
|
||||
- * RINPUT1
|
||||
- * LINPUT2
|
||||
- * RINPUT2
|
||||
- * Mic Bias
|
||||
-
|
||||
-
|
||||
-Example:
|
||||
-
|
||||
-codec: es8328@11 {
|
||||
- compatible = "everest,es8328";
|
||||
- DVDD-supply = <®_3p3v>;
|
||||
- AVDD-supply = <®_3p3v>;
|
||||
- PVDD-supply = <®_3p3v>;
|
||||
- HPVDD-supply = <®_3p3v>;
|
||||
- clocks = <&clks 169>;
|
||||
- reg = <0x11>;
|
||||
-};
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/sound/everest,es8328.yaml
|
||||
@@ -0,0 +1,77 @@
|
||||
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/sound/everest,es8328.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: Everest ES8328 audio CODEC
|
||||
+
|
||||
+description:
|
||||
+ Everest Audio Codec, which can be connected via I2C or SPI.
|
||||
+ Pins on the device (for linking into audio routes) are
|
||||
+ * LOUT1
|
||||
+ * LOUT2
|
||||
+ * ROUT1
|
||||
+ * ROUT2
|
||||
+ * LINPUT1
|
||||
+ * RINPUT1
|
||||
+ * LINPUT2
|
||||
+ * RINPUT2
|
||||
+ * Mic Bias
|
||||
+
|
||||
+maintainers:
|
||||
+ - David Yang <yangxiaohua@everest-semi.com>
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ enum:
|
||||
+ - everest,es8328
|
||||
+ - everest,es8388
|
||||
+
|
||||
+ reg:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ "#sound-dai-cells":
|
||||
+ const: 0
|
||||
+
|
||||
+ clocks:
|
||||
+ items:
|
||||
+ - description: A 22.5792 or 11.2896 MHz clock
|
||||
+
|
||||
+ DVDD-supply:
|
||||
+ description: Regulator providing digital core supply voltage 1.8 - 3.6V
|
||||
+
|
||||
+ AVDD-supply:
|
||||
+ description: Regulator providing analog supply voltage 3.3V
|
||||
+
|
||||
+ PVDD-supply:
|
||||
+ description: Regulator providing digital IO supply voltage 1.8 - 3.6V
|
||||
+
|
||||
+ IPVDD-supply:
|
||||
+ description: Regulator providing analog output voltage 3.3V
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - clocks
|
||||
+ - DVDD-supply
|
||||
+ - AVDD-supply
|
||||
+ - PVDD-supply
|
||||
+ - IPVDD-supply
|
||||
+
|
||||
+additionalProperties: false
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ i2c {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ es8328: codec@11 {
|
||||
+ compatible = "everest,es8328";
|
||||
+ reg = <0x11>;
|
||||
+ AVDD-supply = <®_3p3v>;
|
||||
+ DVDD-supply = <®_3p3v>;
|
||||
+ HPVDD-supply = <®_3p3v>;
|
||||
+ PVDD-supply = <®_3p3v>;
|
||||
+ clocks = <&clks 169>;
|
||||
+ };
|
||||
+ };
|
||||
@@ -1,136 +0,0 @@
|
||||
From fe23f2bcf3dc650be3a0f25afa4a645200ff3878 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 21 Jul 2023 16:59:40 +0200
|
||||
Subject: [PATCH 41/41] arm64: dts: rockchip: rk3588-evb1: add analog audio
|
||||
|
||||
Add support for the EVB1 analog audio to its devicetree.
|
||||
|
||||
TODO: fails like this:
|
||||
|
||||
es8328 1-0011: ASoC: error at snd_soc_dai_set_sysclk on es8328-hifi-analog: -22
|
||||
es8328 1-0011: simple-card: set_sysclk error
|
||||
fe470000.i2s-es8328-hifi-analog: ASoC: error at snd_soc_link_init on fe470000.i2s-es8328-hifi-analog: -22
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3588-evb1-v10.dts | 95 +++++++++++++++++++
|
||||
1 file changed, 95 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -57,6 +57,65 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ analog-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hp_detect>;
|
||||
+ simple-audio-card,name = "RK3588 EVB1 Audio";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+ simple-audio-card,bitclock-master = <&masterdai>;
|
||||
+ simple-audio-card,frame-master = <&masterdai>;
|
||||
+
|
||||
+
|
||||
+ simple-audio-card,widgets =
|
||||
+ "Microphone", "Mic Jack",
|
||||
+ "Microphone", "Onboard Mic",
|
||||
+ "Headphone", "Headphones",
|
||||
+ "Speaker", "Speaker";
|
||||
+ simple-audio-card,routing =
|
||||
+ "Speaker Amplifier INL", "LOUT2",
|
||||
+ "Speaker Amplifier INR", "ROUT2",
|
||||
+ "Speaker", "Speaker Amplifier OUTL",
|
||||
+ "Speaker", "Speaker Amplifier OUTR",
|
||||
+ "Headphone Amplifier INL", "LOUT1",
|
||||
+ "Headphone Amplifier INR", "ROUT1",
|
||||
+ "Headphones", "Headphone Amplifier OUTL",
|
||||
+ "Headphones", "Headphone Amplifier OUTR",
|
||||
+ "LINPUT1", "Onboard Mic",
|
||||
+ "LINPUT2", "Onboard Mic",
|
||||
+ "RINPUT1", "Mic Jack",
|
||||
+ "RINPUT2", "Mic Jack";
|
||||
+
|
||||
+ simple-audio-card,hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
|
||||
+ simple-audio-card,aux-devs = <&_headphone>, <&_speaker>;
|
||||
+ simple-audio-card,pin-switches = "Headphone", "Speaker";
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s0_8ch>;
|
||||
+ };
|
||||
+
|
||||
+ masterdai: simple-audio-card,codec {
|
||||
+ sound-dai = <&es8388>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ amp_headphone: headphone-amplifier {
|
||||
+ compatible = "simple-audio-amplifier";
|
||||
+ enable-gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&headphone_amplifier_en>;
|
||||
+ sound-name-prefix = "Headphone Amplifier";
|
||||
+ };
|
||||
+
|
||||
+ amp_speaker: speaker-amplifier {
|
||||
+ compatible = "simple-audio-amplifier";
|
||||
+ enable-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&speaker_amplifier_en>;
|
||||
+ sound-name-prefix = "Speaker Amplifier";
|
||||
+ };
|
||||
+
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
power-supply = <&vcc12v_dcin>;
|
||||
@@ -324,6 +383,28 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c7 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ es8388: audio-codec@11 {
|
||||
+ compatible = "everest,es8388";
|
||||
+ reg = <0x11>;
|
||||
+ clocks = <&cru I2S0_8CH_MCLKOUT>;
|
||||
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
|
||||
+ assigned-clock-rates = <12288000>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2s0_8ch {
|
||||
+ pinctrl-0 = <&i2s0_lrck
|
||||
+ &i2s0_mclk
|
||||
+ &i2s0_sclk
|
||||
+ &i2s0_sdi0
|
||||
+ &i2s0_sdo0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&mdio0 {
|
||||
rgmii_phy: ethernet-phy@1 {
|
||||
/* RTL8211F */
|
||||
@@ -364,6 +445,20 @@
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
+ audio {
|
||||
+ hp_detect: headphone-detect {
|
||||
+ rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ headphone_amplifier_en: headphone-amplifier-en {
|
||||
+ rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ speaker_amplifier_en: speaker-amplifier-en {
|
||||
+ rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
rtl8111 {
|
||||
rtl8111_isolate: rtl8111-isolate {
|
||||
rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
@@ -1,129 +0,0 @@
|
||||
From 10ec0a7f1a6950be2af070d71ffbc713426e6dd2 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Tue, 25 Apr 2023 18:17:19 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3588s: Add USB3 controllers
|
||||
|
||||
Add all USB3 controllers.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588.dtsi | 29 +++++++++++
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 62 +++++++++++++++++++++++
|
||||
2 files changed, 91 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
@@ -7,6 +7,35 @@
|
||||
#include "rk3588-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
+ usbdrd3_1: usbdrd3_1 {
|
||||
+ compatible = "rockchip,rk3588-dwc3", "rockchip,rk3399-dwc3";
|
||||
+ clocks = <&cru REF_CLK_USB3OTG1>, <&cru SUSPEND_CLK_USB3OTG1>,
|
||||
+ <&cru ACLK_USB3OTG1>;
|
||||
+ clock-names = "ref", "suspend", "bus";
|
||||
+ #address-cells = <2>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ usbdrd_dwc3_1: usb@fc400000 {
|
||||
+ compatible = "snps,dwc3";
|
||||
+ reg = <0x0 0xfc400000 0x0 0x400000>;
|
||||
+ interrupts = <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ power-domains = <&power RK3588_PD_USB>;
|
||||
+ resets = <&cru SRST_A_USB3OTG1>;
|
||||
+ reset-names = "usb3-otg";
|
||||
+ dr_mode = "host";
|
||||
+ phys = <&u2phy1_otg>, <&usbdp_phy1_u3>;
|
||||
+ phy-names = "usb2-phy", "usb3-phy";
|
||||
+ phy_type = "utmi_wide";
|
||||
+ snps,dis_enblslpm_quirk;
|
||||
+ snps,dis-u2-freeclk-exists-quirk;
|
||||
+ snps,dis-del-phy-power-chg-quirk;
|
||||
+ snps,dis-tx-ipgap-linecheck-quirk;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
usb_host1_xhci: usb@fc400000 {
|
||||
compatible = "rockchip,rk3588-dwc3", "snps,dwc3";
|
||||
reg = <0x0 0xfc400000 0x0 0x400000>;
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -841,6 +841,38 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ usbdrd3_0: usbdrd3_0 {
|
||||
+ compatible = "rockchip,rk3588-dwc3", "rockchip,rk3399-dwc3";
|
||||
+ clocks = <&cru REF_CLK_USB3OTG0>, <&cru SUSPEND_CLK_USB3OTG0>,
|
||||
+ <&cru ACLK_USB3OTG0>;
|
||||
+ clock-names = "ref", "suspend", "bus";
|
||||
+ #address-cells = <2>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ usbdrd_dwc3_0: usb@fc000000 {
|
||||
+ compatible = "snps,dwc3";
|
||||
+ reg = <0x0 0xfc000000 0x0 0x400000>;
|
||||
+ interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ power-domains = <&power RK3588_PD_USB>;
|
||||
+ resets = <&cru SRST_A_USB3OTG0>;
|
||||
+ reset-names = "usb3-otg";
|
||||
+ dr_mode = "otg";
|
||||
+ phys = <&u2phy0_otg>, <&usbdp_phy0_u3>;
|
||||
+ phy-names = "usb2-phy", "usb3-phy";
|
||||
+ phy_type = "utmi_wide";
|
||||
+ snps,dis_enblslpm_quirk;
|
||||
+ snps,dis-u1-entry-quirk;
|
||||
+ snps,dis-u2-entry-quirk;
|
||||
+ snps,dis-u2-freeclk-exists-quirk;
|
||||
+ snps,dis-del-phy-power-chg-quirk;
|
||||
+ snps,dis-tx-ipgap-linecheck-quirk;
|
||||
+ quirk-skip-phy-init;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
usb_host0_xhci: usb@fc000000 {
|
||||
compatible = "rockchip,rk3588-dwc3", "snps,dwc3";
|
||||
reg = <0x0 0xfc000000 0x0 0x400000>;
|
||||
@@ -928,6 +960,36 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ usbhost3_0: usbhost3_0 {
|
||||
+ compatible = "rockchip,rk3588-dwc3", "rockchip,rk3399-dwc3";
|
||||
+ clocks = <&cru REF_CLK_USB3OTG2>, <&cru SUSPEND_CLK_USB3OTG2>,
|
||||
+ <&cru ACLK_USB3OTG2>, <&cru CLK_UTMI_OTG2>,
|
||||
+ <&cru PCLK_PHP_ROOT>, <&cru CLK_PIPEPHY2_PIPE_U3_G>;
|
||||
+ clock-names = "ref", "suspend", "bus", "utmi", "php", "pipe";
|
||||
+ #address-cells = <2>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ usbhost_dwc3_0: usb@fcd00000 {
|
||||
+ compatible = "snps,dwc3";
|
||||
+ reg = <0x0 0xfcd00000 0x0 0x400000>;
|
||||
+ interrupts = <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ resets = <&cru SRST_A_USB3OTG2>;
|
||||
+ reset-names = "usb3-host";
|
||||
+ dr_mode = "host";
|
||||
+ phys = <&combphy2_psu PHY_TYPE_USB3>;
|
||||
+ phy-names = "usb3-phy";
|
||||
+ phy_type = "utmi_wide";
|
||||
+ snps,dis_enblslpm_quirk;
|
||||
+ snps,dis-u2-freeclk-exists-quirk;
|
||||
+ snps,dis-del-phy-power-chg-quirk;
|
||||
+ snps,dis-tx-ipgap-linecheck-quirk;
|
||||
+ snps,dis_rxdet_inp3_quirk;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
sys_grf: syscon@fd58c000 {
|
||||
compatible = "rockchip,rk3588-sys-grf", "syscon";
|
||||
reg = <0x0 0xfd58c000 0x0 0x1000>;
|
||||
@@ -1,38 +0,0 @@
|
||||
From bd03124217afbe108ebf0a5bd23ab8db1f2ae2bf Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Wed, 26 Apr 2023 15:01:10 +0200
|
||||
Subject: [PATCH 84/95] fix USB3: do not disable sub-nodes
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588.dtsi | 1 -
|
||||
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 2 --
|
||||
2 files changed, 3 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588.dtsi
|
||||
@@ -32,7 +32,6 @@
|
||||
snps,dis-u2-freeclk-exists-quirk;
|
||||
snps,dis-del-phy-power-chg-quirk;
|
||||
snps,dis-tx-ipgap-linecheck-quirk;
|
||||
- status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
|
||||
@@ -869,7 +869,6 @@
|
||||
snps,dis-del-phy-power-chg-quirk;
|
||||
snps,dis-tx-ipgap-linecheck-quirk;
|
||||
quirk-skip-phy-init;
|
||||
- status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -986,7 +985,6 @@
|
||||
snps,dis-del-phy-power-chg-quirk;
|
||||
snps,dis-tx-ipgap-linecheck-quirk;
|
||||
snps,dis_rxdet_inp3_quirk;
|
||||
- status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,208 +0,0 @@
|
||||
From d441305416aa91190df5865bbc0e3c684ec183b0 Mon Sep 17 00:00:00 2001
|
||||
From: Muhammed Efe Cetin <efectn@protonmail.com>
|
||||
Date: Fri, 11 Aug 2023 17:56:00 +0300
|
||||
Subject: [PATCH 1/1] irqchip/irq-gic-v3-its: fix its timeout issue for rk35xx
|
||||
boards
|
||||
|
||||
---
|
||||
drivers/irqchip/irq-gic-v3-its.c | 79 +++++++++++++++++++++++++++++---
|
||||
1 file changed, 72 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/irqchip/irq-gic-v3-its.c
|
||||
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
||||
@@ -163,6 +163,7 @@ struct its_device {
|
||||
struct its_node *its;
|
||||
struct event_lpi_map event_map;
|
||||
void *itt;
|
||||
+ u32 itt_sz;
|
||||
u32 nr_ites;
|
||||
u32 device_id;
|
||||
bool shared;
|
||||
@@ -2201,6 +2202,9 @@ static struct page *its_allocate_prop_ta
|
||||
{
|
||||
struct page *prop_page;
|
||||
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
+
|
||||
prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
|
||||
if (!prop_page)
|
||||
return NULL;
|
||||
@@ -2324,6 +2328,7 @@ static int its_setup_baser(struct its_no
|
||||
u32 alloc_pages, psz;
|
||||
struct page *page;
|
||||
void *base;
|
||||
+ gfp_t gfp_flags;
|
||||
|
||||
psz = baser->psz;
|
||||
alloc_pages = (PAGE_ORDER_TO_SIZE(order) / psz);
|
||||
@@ -2335,7 +2340,11 @@ static int its_setup_baser(struct its_no
|
||||
order = get_order(GITS_BASER_PAGES_MAX * psz);
|
||||
}
|
||||
|
||||
- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO, order);
|
||||
+ gfp_flags = GFP_KERNEL | __GFP_ZERO;
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
+
|
||||
+ page = alloc_pages_node(its->numa_node, gfp_flags, order);
|
||||
if (!page)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -2385,6 +2394,15 @@ retry_baser:
|
||||
its_write_baser(its, baser, val);
|
||||
tmp = baser->val;
|
||||
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3588")) {
|
||||
+ if (tmp & GITS_BASER_SHAREABILITY_MASK)
|
||||
+ tmp &= ~GITS_BASER_SHAREABILITY_MASK;
|
||||
+ else
|
||||
+ gic_flush_dcache_to_poc(base, PAGE_ORDER_TO_SIZE(order));
|
||||
+ }
|
||||
+
|
||||
if ((val ^ tmp) & GITS_BASER_SHAREABILITY_MASK) {
|
||||
/*
|
||||
* Shareability didn't stick. Just use
|
||||
@@ -2971,6 +2989,8 @@ static struct page *its_allocate_pending
|
||||
{
|
||||
struct page *pend_page;
|
||||
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
pend_page = alloc_pages(gfp_flags | __GFP_ZERO,
|
||||
get_order(LPI_PENDBASE_SZ));
|
||||
if (!pend_page)
|
||||
@@ -3129,6 +3149,11 @@ static void its_cpu_init_lpis(void)
|
||||
if (gic_rdists->flags & RDIST_FLAGS_FORCE_NON_SHAREABLE)
|
||||
tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK;
|
||||
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK;
|
||||
+
|
||||
if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) {
|
||||
if (!(tmp & GICR_PROPBASER_SHAREABILITY_MASK)) {
|
||||
/*
|
||||
@@ -3156,6 +3181,11 @@ static void its_cpu_init_lpis(void)
|
||||
if (gic_rdists->flags & RDIST_FLAGS_FORCE_NON_SHAREABLE)
|
||||
tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK;
|
||||
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK;
|
||||
+
|
||||
if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) {
|
||||
/*
|
||||
* The HW reports non-shareable, we must remove the
|
||||
@@ -3319,7 +3349,11 @@ static bool its_alloc_table_entry(struct
|
||||
|
||||
/* Allocate memory for 2nd level table */
|
||||
if (!table[idx]) {
|
||||
- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO,
|
||||
+ gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO;
|
||||
+
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
+ page = alloc_pages_node(its->numa_node, gfp_flags,
|
||||
get_order(baser->psz));
|
||||
if (!page)
|
||||
return false;
|
||||
@@ -3408,6 +3442,7 @@ static struct its_device *its_create_dev
|
||||
int nr_lpis;
|
||||
int nr_ites;
|
||||
int sz;
|
||||
+ gfp_t gfp_flags;
|
||||
|
||||
if (!its_alloc_device_table(its, dev_id))
|
||||
return NULL;
|
||||
@@ -3423,7 +3458,15 @@ static struct its_device *its_create_dev
|
||||
nr_ites = max(2, nvecs);
|
||||
sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1);
|
||||
sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
|
||||
- itt = kzalloc_node(sz, GFP_KERNEL, its->numa_node);
|
||||
+ gfp_flags = GFP_KERNEL;
|
||||
+
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588")) {
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
+ itt = (void *)__get_free_pages(gfp_flags, get_order(sz));
|
||||
+ } else {
|
||||
+ itt = kzalloc_node(sz, gfp_flags, its->numa_node);
|
||||
+ }
|
||||
+
|
||||
if (alloc_lpis) {
|
||||
lpi_map = its_lpi_alloc(nvecs, &lpi_base, &nr_lpis);
|
||||
if (lpi_map)
|
||||
@@ -3437,7 +3480,13 @@ static struct its_device *its_create_dev
|
||||
|
||||
if (!dev || !itt || !col_map || (!lpi_map && alloc_lpis)) {
|
||||
kfree(dev);
|
||||
- kfree(itt);
|
||||
+
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ free_pages((unsigned long)itt, get_order(sz));
|
||||
+ else
|
||||
+ kfree(itt);
|
||||
+
|
||||
bitmap_free(lpi_map);
|
||||
kfree(col_map);
|
||||
return NULL;
|
||||
@@ -3447,6 +3496,7 @@ static struct its_device *its_create_dev
|
||||
|
||||
dev->its = its;
|
||||
dev->itt = itt;
|
||||
+ dev->itt_sz = sz;
|
||||
dev->nr_ites = nr_ites;
|
||||
dev->event_map.lpi_map = lpi_map;
|
||||
dev->event_map.col_map = col_map;
|
||||
@@ -3474,7 +3524,13 @@ static void its_free_device(struct its_d
|
||||
list_del(&its_dev->entry);
|
||||
raw_spin_unlock_irqrestore(&its_dev->its->lock, flags);
|
||||
kfree(its_dev->event_map.col_map);
|
||||
- kfree(its_dev->itt);
|
||||
+
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ free_pages((unsigned long)its_dev->itt, get_order(its_dev->itt_sz));
|
||||
+ else
|
||||
+ kfree(its_dev->itt);
|
||||
+
|
||||
kfree(its_dev);
|
||||
}
|
||||
|
||||
@@ -5077,6 +5133,7 @@ static int __init its_probe_one(struct i
|
||||
struct page *page;
|
||||
u32 ctlr;
|
||||
int err;
|
||||
+ gfp_t gfp_flags;
|
||||
|
||||
if (is_v4(its)) {
|
||||
if (!(its->typer & GITS_TYPER_VMOVP)) {
|
||||
@@ -5108,7 +5165,10 @@ static int __init its_probe_one(struct i
|
||||
}
|
||||
}
|
||||
|
||||
- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO,
|
||||
+ gfp_flags = GFP_KERNEL | __GFP_ZERO;
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566") || of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ gfp_flags |= GFP_DMA32;
|
||||
+ page = alloc_pages_node(its->numa_node, gfp_flags,
|
||||
get_order(ITS_CMD_QUEUE_SZ));
|
||||
if (!page) {
|
||||
err = -ENOMEM;
|
||||
@@ -5137,6 +5197,11 @@ static int __init its_probe_one(struct i
|
||||
if (its->flags & ITS_FLAGS_FORCE_NON_SHAREABLE)
|
||||
tmp &= ~GITS_CBASER_SHAREABILITY_MASK;
|
||||
|
||||
+ if (of_machine_is_compatible("rockchip,rk3568") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3566") ||
|
||||
+ of_machine_is_compatible("rockchip,rk3588"))
|
||||
+ tmp &= ~GITS_CBASER_SHAREABILITY_MASK;
|
||||
+
|
||||
if ((tmp ^ baser) & GITS_CBASER_SHAREABILITY_MASK) {
|
||||
if (!(tmp & GITS_CBASER_SHAREABILITY_MASK)) {
|
||||
/*
|
||||
@@ -1,14 +0,0 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -100,6 +100,11 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-od
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-roc-pc.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1n.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-lubancat-2n.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h66k.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h68k.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h69k.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-edgeble-neu6a-io.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-edgeble-neu6b-io.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-v10.dtb
|
||||
@@ -0,0 +1,35 @@
|
||||
From 0d329112c709d6cfedf0fffb19f0cc6b19043f6b Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Wed, 20 Feb 2019 07:38:34 +0000
|
||||
Subject: [PATCH] mmc: core: set initial signal voltage on power off
|
||||
|
||||
Some boards have SD card connectors where the power rail cannot be switched
|
||||
off by the driver. If the card has not been power cycled, it may still be
|
||||
using 1.8V signaling after a warm re-boot. Bootroms expecting 3.3V signaling
|
||||
will fail to boot from a UHS card that continue to use 1.8V signaling.
|
||||
|
||||
Set initial signal voltage in mmc_power_off() to allow re-boot to function.
|
||||
|
||||
This fixes re-boot with UHS cards on Asus Tinker Board (Rockchip RK3288),
|
||||
same issue have been seen on some Rockchip RK3399 boards.
|
||||
|
||||
I am sending this as a RFC because I have no insights into SD/MMC subsystem,
|
||||
this change fix a re-boot issue on my boards and does not break emmc/sdio.
|
||||
Is this an acceptable workaround? Any advice is appreciated.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/mmc/core/core.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/mmc/core/core.c
|
||||
+++ b/drivers/mmc/core/core.c
|
||||
@@ -1370,6 +1370,8 @@ void mmc_power_off(struct mmc_host *host
|
||||
|
||||
mmc_pwrseq_power_off(host);
|
||||
|
||||
+ mmc_set_initial_signal_voltage(host);
|
||||
+
|
||||
host->ios.clock = 0;
|
||||
host->ios.vdd = 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user