* [PATCH v2 0/4] Enable SMP bring-up and cpu frequency-scaling for RK3128
@ 2023-08-29 21:40 Alex Bee
2023-08-29 21:40 ` [PATCH v2 1/4] ARM: dts: rockchip: Add SRAM node " Alex Bee
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Alex Bee @ 2023-08-29 21:40 UTC (permalink / raw)
To: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, Alex Bee
This series aims to enable bring-up of the non-boot cpu-cores by the
Rockchip platsmp driver and enables cpu frequency-scaling by defining
appropriate operating points.
Please see commit messages of the individual patches for details.
These patches have been part of the pretty huge RK3128 bring-up/fix-up
series [0] which I've splitted-up now, as suggested.
[0] https://lore.kernel.org/linux-rockchip/20230829171647.187787-1-knaerzche@gmail.com
Alex Bee (4):
ARM: dts: rockchip: Add SRAM node for RK3128
ARM: dts: rockchip: Add CPU resets for RK3128
ARM: dts: rockchip: Enable SMP bring-up for RK3128
ARM: dts: rockchip: Switch to operating-points-v2 for RK3128's CPU
arch/arm/boot/dts/rockchip/rk3128.dtsi | 61 ++++++++++++++++++++++++--
1 file changed, 57 insertions(+), 4 deletions(-)
base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c
--
2.42.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/4] ARM: dts: rockchip: Add SRAM node for RK3128
2023-08-29 21:40 [PATCH v2 0/4] Enable SMP bring-up and cpu frequency-scaling for RK3128 Alex Bee
@ 2023-08-29 21:40 ` Alex Bee
2023-08-29 21:40 ` [PATCH v2 2/4] ARM: dts: rockchip: Add CPU resets " Alex Bee
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Alex Bee @ 2023-08-29 21:40 UTC (permalink / raw)
To: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, Alex Bee
RK3128 SoCs have 8KB of SRAM.
Add the respective device tree node for it.
Signed-off-by: Alex Bee <knaerzche@gmail.com>
---
arch/arm/boot/dts/rockchip/rk3128.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi
index b63bd4ad3143..3a0856973795 100644
--- a/arch/arm/boot/dts/rockchip/rk3128.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi
@@ -76,6 +76,14 @@ xin24m: oscillator {
#clock-cells = <0>;
};
+ imem: sram@10080000 {
+ compatible = "mmio-sram";
+ reg = <0x10080000 0x2000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x10080000 0x2000>;
+ };
+
pmu: syscon@100a0000 {
compatible = "rockchip,rk3128-pmu", "syscon", "simple-mfd";
reg = <0x100a0000 0x1000>;
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/4] ARM: dts: rockchip: Add CPU resets for RK3128
2023-08-29 21:40 [PATCH v2 0/4] Enable SMP bring-up and cpu frequency-scaling for RK3128 Alex Bee
2023-08-29 21:40 ` [PATCH v2 1/4] ARM: dts: rockchip: Add SRAM node " Alex Bee
@ 2023-08-29 21:40 ` Alex Bee
2023-08-29 21:40 ` [PATCH v2 3/4] ARM: dts: rockchip: Enable SMP bring-up " Alex Bee
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Alex Bee @ 2023-08-29 21:40 UTC (permalink / raw)
To: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, Alex Bee
In order to support bring-up of the non-boot cores, this patch adds the
reset controls for the cpu cores.
They are required/will be used by the Rockchip platsmp driver.
Signed-off-by: Alex Bee <knaerzche@gmail.com>
---
arch/arm/boot/dts/rockchip/rk3128.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi
index 3a0856973795..2778049003a1 100644
--- a/arch/arm/boot/dts/rockchip/rk3128.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi
@@ -34,6 +34,7 @@ cpu0: cpu@f00 {
reg = <0xf00>;
clock-latency = <40000>;
clocks = <&cru ARMCLK>;
+ resets = <&cru SRST_CORE0>;
operating-points = <
/* KHz uV */
816000 1000000
@@ -45,18 +46,21 @@ cpu1: cpu@f01 {
device_type = "cpu";
compatible = "arm,cortex-a7";
reg = <0xf01>;
+ resets = <&cru SRST_CORE1>;
};
cpu2: cpu@f02 {
device_type = "cpu";
compatible = "arm,cortex-a7";
reg = <0xf02>;
+ resets = <&cru SRST_CORE2>;
};
cpu3: cpu@f03 {
device_type = "cpu";
compatible = "arm,cortex-a7";
reg = <0xf03>;
+ resets = <&cru SRST_CORE3>;
};
};
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/4] ARM: dts: rockchip: Enable SMP bring-up for RK3128
2023-08-29 21:40 [PATCH v2 0/4] Enable SMP bring-up and cpu frequency-scaling for RK3128 Alex Bee
2023-08-29 21:40 ` [PATCH v2 1/4] ARM: dts: rockchip: Add SRAM node " Alex Bee
2023-08-29 21:40 ` [PATCH v2 2/4] ARM: dts: rockchip: Add CPU resets " Alex Bee
@ 2023-08-29 21:40 ` Alex Bee
2023-08-29 21:40 ` [PATCH v2 4/4] ARM: dts: rockchip: Switch to operating-points-v2 for RK3128's CPU Alex Bee
2023-10-04 21:32 ` [PATCH v2 0/4] Enable SMP bring-up and cpu frequency-scaling for RK3128 Heiko Stuebner
4 siblings, 0 replies; 6+ messages in thread
From: Alex Bee @ 2023-08-29 21:40 UTC (permalink / raw)
To: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, Alex Bee
For bring-up of the non-boot cpu cores the enable-method for RK3036 can be
re-used.
This adds a (small) chunk of SRAM for execution of the SMP trampoline code
and the respective enable-method property to the cpus.
Signed-off-by: Alex Bee <knaerzche@gmail.com>
---
arch/arm/boot/dts/rockchip/rk3128.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi
index 2778049003a1..877854dd765d 100644
--- a/arch/arm/boot/dts/rockchip/rk3128.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi
@@ -27,6 +27,7 @@ arm-pmu {
cpus {
#address-cells = <1>;
#size-cells = <0>;
+ enable-method = "rockchip,rk3036-smp";
cpu0: cpu@f00 {
device_type = "cpu";
@@ -86,6 +87,11 @@ imem: sram@10080000 {
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x10080000 0x2000>;
+
+ smp-sram@0 {
+ compatible = "rockchip,rk3066-smp-sram";
+ reg = <0x00 0x10>;
+ };
};
pmu: syscon@100a0000 {
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 4/4] ARM: dts: rockchip: Switch to operating-points-v2 for RK3128's CPU
2023-08-29 21:40 [PATCH v2 0/4] Enable SMP bring-up and cpu frequency-scaling for RK3128 Alex Bee
` (2 preceding siblings ...)
2023-08-29 21:40 ` [PATCH v2 3/4] ARM: dts: rockchip: Enable SMP bring-up " Alex Bee
@ 2023-08-29 21:40 ` Alex Bee
2023-10-04 21:32 ` [PATCH v2 0/4] Enable SMP bring-up and cpu frequency-scaling for RK3128 Heiko Stuebner
4 siblings, 0 replies; 6+ messages in thread
From: Alex Bee @ 2023-08-29 21:40 UTC (permalink / raw)
To: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, Alex Bee
This will allow frequency-scaling for the cpu-cores.
Operating frequencies and voltages have been taken from Rockchip's
downstream kernel.
Signed-off-by: Alex Bee <knaerzche@gmail.com>
---
arch/arm/boot/dts/rockchip/rk3128.dtsi | 43 +++++++++++++++++++++++---
1 file changed, 39 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi
index 877854dd765d..71964262cd5f 100644
--- a/arch/arm/boot/dts/rockchip/rk3128.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi
@@ -36,10 +36,7 @@ cpu0: cpu@f00 {
clock-latency = <40000>;
clocks = <&cru ARMCLK>;
resets = <&cru SRST_CORE0>;
- operating-points = <
- /* KHz uV */
- 816000 1000000
- >;
+ operating-points-v2 = <&cpu_opp_table>;
#cooling-cells = <2>; /* min followed by max */
};
@@ -48,6 +45,7 @@ cpu1: cpu@f01 {
compatible = "arm,cortex-a7";
reg = <0xf01>;
resets = <&cru SRST_CORE1>;
+ operating-points-v2 = <&cpu_opp_table>;
};
cpu2: cpu@f02 {
@@ -55,6 +53,7 @@ cpu2: cpu@f02 {
compatible = "arm,cortex-a7";
reg = <0xf02>;
resets = <&cru SRST_CORE2>;
+ operating-points-v2 = <&cpu_opp_table>;
};
cpu3: cpu@f03 {
@@ -62,6 +61,42 @@ cpu3: cpu@f03 {
compatible = "arm,cortex-a7";
reg = <0xf03>;
resets = <&cru SRST_CORE3>;
+ operating-points-v2 = <&cpu_opp_table>;
+ };
+ };
+
+ cpu_opp_table: opp-table-0 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp-216000000 {
+ opp-hz = /bits/ 64 <216000000>;
+ opp-microvolt = <950000 950000 1325000>;
+ };
+ opp-408000000 {
+ opp-hz = /bits/ 64 <408000000>;
+ opp-microvolt = <950000 950000 1325000>;
+ };
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ opp-microvolt = <950000 950000 1325000>;
+ };
+ opp-696000000 {
+ opp-hz = /bits/ 64 <696000000>;
+ opp-microvolt = <975000 975000 1325000>;
+ };
+ opp-816000000 {
+ opp-hz = /bits/ 64 <816000000>;
+ opp-microvolt = <1075000 1075000 1325000>;
+ opp-suspend;
+ };
+ opp-1008000000 {
+ opp-hz = /bits/ 64 <1008000000>;
+ opp-microvolt = <1200000 1200000 1325000>;
+ };
+ opp-1200000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <1325000 1325000 1325000>;
};
};
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/4] Enable SMP bring-up and cpu frequency-scaling for RK3128
2023-08-29 21:40 [PATCH v2 0/4] Enable SMP bring-up and cpu frequency-scaling for RK3128 Alex Bee
` (3 preceding siblings ...)
2023-08-29 21:40 ` [PATCH v2 4/4] ARM: dts: rockchip: Switch to operating-points-v2 for RK3128's CPU Alex Bee
@ 2023-10-04 21:32 ` Heiko Stuebner
4 siblings, 0 replies; 6+ messages in thread
From: Heiko Stuebner @ 2023-10-04 21:32 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alex Bee, Conor Dooley, Rob Herring
Cc: Heiko Stuebner, devicetree, linux-kernel, linux-arm-kernel,
linux-rockchip
On Tue, 29 Aug 2023 23:40:01 +0200, Alex Bee wrote:
> This series aims to enable bring-up of the non-boot cpu-cores by the
> Rockchip platsmp driver and enables cpu frequency-scaling by defining
> appropriate operating points.
> Please see commit messages of the individual patches for details.
>
> These patches have been part of the pretty huge RK3128 bring-up/fix-up
> series [0] which I've splitted-up now, as suggested.
>
> [...]
Applied, thanks!
[1/4] ARM: dts: rockchip: Add SRAM node for RK3128
commit: 9107283badc7d058e34ef3b60a52afe6a5e0acfb
[2/4] ARM: dts: rockchip: Add CPU resets for RK3128
commit: 02941bc2a1bc8ea82617ba1fd4d2c0643399a9ea
[3/4] ARM: dts: rockchip: Enable SMP bring-up for RK3128
commit: da8b973957ca03f05f78384f2bf6d79a3fce9fb0
[4/4] ARM: dts: rockchip: Switch to operating-points-v2 for RK3128's CPU
commit: c96b13d7c0e494e1072648301e61e13a2a85a362
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-10-04 21:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-29 21:40 [PATCH v2 0/4] Enable SMP bring-up and cpu frequency-scaling for RK3128 Alex Bee
2023-08-29 21:40 ` [PATCH v2 1/4] ARM: dts: rockchip: Add SRAM node " Alex Bee
2023-08-29 21:40 ` [PATCH v2 2/4] ARM: dts: rockchip: Add CPU resets " Alex Bee
2023-08-29 21:40 ` [PATCH v2 3/4] ARM: dts: rockchip: Enable SMP bring-up " Alex Bee
2023-08-29 21:40 ` [PATCH v2 4/4] ARM: dts: rockchip: Switch to operating-points-v2 for RK3128's CPU Alex Bee
2023-10-04 21:32 ` [PATCH v2 0/4] Enable SMP bring-up and cpu frequency-scaling for RK3128 Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).