From 1f0b2735a00446d925bdd590fd08937c8eada971 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 7 Aug 2023 01:32:37 +0800 Subject: [PATCH] rockchip: enable rockchip 3588001 erratum workaround for rk3588s Signed-off-by: Tianling Shen --- .../src/arch/arm/dts/rk3588s-nanopi-r6s.dts | 24 +++++++++---------- .../boot/dts/rockchip/rk3588s-nanopi-r6s.dts | 2 +- ...v3-its-force-to-config-its-tables-as.patch | 20 +++++++++------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6s.dts b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6s.dts index 5192084dc6..fcbcdb643a 100644 --- a/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6s.dts +++ b/package/boot/uboot-rockchip/src/arch/arm/dts/rk3588s-nanopi-r6s.dts @@ -91,14 +91,14 @@ vcc5v0_host_20: vcc5v0-host-20-regulator { compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc5v0_host20_en>; regulator-name = "vcc5v0_host_20"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_usb>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_host20_en>; }; vcc_3v3_pcie20: vcc3v3-pcie20-regulator { @@ -123,28 +123,28 @@ vcc_3v3_sd_s0: vcc-3v3-sd-s0-regulator { compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc3v3_sd_en>; regulator-always-on; regulator-boot-on; regulator-max-microvolt = <3000000>; regulator-min-microvolt = <3000000>; regulator-name = "vcc_3v3_sd_s0"; + enable-active-high; + gpio = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc_3v3_s3>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc3v3_sd_en>; }; vbus5v0_typec: vbus5v0-typec-regulator { compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vbus5v0_typec_en>; regulator-name = "vbus5v0_typec"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_usb>; + pinctrl-names = "default"; + pinctrl-0 = <&vbus5v0_typec_en>; }; }; diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts index 8c4b6e6bc2..97c725ea21 100644 --- a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts +++ b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts @@ -134,7 +134,7 @@ regulator-min-microvolt = <3000000>; regulator-name = "vcc_3v3_sd_s0"; enable-active-high; - gpio = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>; + gpio = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc_3v3_s3>; pinctrl-names = "default"; pinctrl-0 = <&vcc3v3_sd_en>; diff --git a/target/linux/rockchip/patches-6.1/701-04-irqchip-gic-v3-its-force-to-config-its-tables-as.patch b/target/linux/rockchip/patches-6.1/701-04-irqchip-gic-v3-its-force-to-config-its-tables-as.patch index b29d307887..2ca1b5dc30 100644 --- a/target/linux/rockchip/patches-6.1/701-04-irqchip-gic-v3-its-force-to-config-its-tables-as.patch +++ b/target/linux/rockchip/patches-6.1/701-04-irqchip-gic-v3-its-force-to-config-its-tables-as.patch @@ -12,43 +12,47 @@ Change-Id: I7275cbf011061f11968505a7570230d2d789e9fc --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c -@@ -2366,7 +2366,8 @@ retry_baser: +@@ -2366,7 +2366,9 @@ retry_baser: tmp = baser->val; if (of_machine_is_compatible("rockchip,rk3568") || - of_machine_is_compatible("rockchip,rk3566")) { + of_machine_is_compatible("rockchip,rk3566") || -+ of_machine_is_compatible("rockchip,rk3588")) { ++ of_machine_is_compatible("rockchip,rk3588") || ++ of_machine_is_compatible("rockchip,rk3588s")) { if (tmp & GITS_BASER_SHAREABILITY_MASK) tmp &= ~GITS_BASER_SHAREABILITY_MASK; else -@@ -3113,7 +3114,8 @@ static void its_cpu_init_lpis(void) +@@ -3113,7 +3115,9 @@ static void its_cpu_init_lpis(void) tmp = gicr_read_propbaser(rbase + GICR_PROPBASER); if (of_machine_is_compatible("rockchip,rk3568") || - of_machine_is_compatible("rockchip,rk3566")) + of_machine_is_compatible("rockchip,rk3566") || -+ of_machine_is_compatible("rockchip,rk3588")) ++ of_machine_is_compatible("rockchip,rk3588") || ++ of_machine_is_compatible("rockchip,rk3588s")) tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK; if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) { -@@ -3141,7 +3143,8 @@ static void its_cpu_init_lpis(void) +@@ -3141,7 +3145,9 @@ static void its_cpu_init_lpis(void) tmp = gicr_read_pendbaser(rbase + GICR_PENDBASER); if (of_machine_is_compatible("rockchip,rk3568") || - of_machine_is_compatible("rockchip,rk3566")) + of_machine_is_compatible("rockchip,rk3566") || -+ of_machine_is_compatible("rockchip,rk3588")) ++ of_machine_is_compatible("rockchip,rk3588") || ++ of_machine_is_compatible("rockchip,rk3588s")) tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK; if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) { -@@ -5132,7 +5135,8 @@ static int __init its_probe_one(struct r +@@ -5132,7 +5138,9 @@ static int __init its_probe_one(struct r tmp = gits_read_cbaser(its->base + GITS_CBASER); if (of_machine_is_compatible("rockchip,rk3568") || - of_machine_is_compatible("rockchip,rk3566")) + of_machine_is_compatible("rockchip,rk3566") || -+ of_machine_is_compatible("rockchip,rk3588")) ++ of_machine_is_compatible("rockchip,rk3588") || ++ of_machine_is_compatible("rockchip,rk3588s")) tmp &= ~GITS_CBASER_SHAREABILITY_MASK; if ((tmp ^ baser) & GITS_CBASER_SHAREABILITY_MASK) {