Add JH7110 cpufreq support
v4 cover Add JH7110 cpufreq support
The StarFive JH7110 SoC has four RISC-V cores,
and it supports up to 4 cpu frequency loads.
This patchset adds the compatible strings into the allowlist for supporting the generic cpufreq driver on JH7110 SoC. Also, it enables the axp15060 pmic for the cpu power source.
The series has been tested on the VisionFive 2 boards which are equipped with JH7110 SoC and axp15060 pmic.
---
This patchset is based on v6.4-rc4 with these patches applied:
[1] ("regulator: Add X-Powers AXP15060/AXP313a PMIC support")
https://lore.kernel.org/lkml/[email protected]/
Changes since v3:
- Fix the dtb_check issues for axp15060 pmic dts configuration.
Changes since v2:
- Fix the new blank line at EOF issue in dtsi.
Changes since v1:
- Fix dts node naming issues.
- Move clock properties of cpu node from <board>.dtsi to <soc>.dtsi.
- Follow the alphabetical order to place the cpufreq dt allowlist.
Mason Huo (3):
riscv: dts: starfive: Enable axp15060 pmic for cpufreq
cpufreq: dt-platdev: Add JH7110 SOC to the allowlist
riscv: dts: starfive: Add cpu scaling for JH7110 SoC
.../jh7110-starfive-visionfive-2.dtsi | 33 +++++++++++++++++++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 33 +++++++++++++++++++ drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++ 3 files changed, 68 insertions(+)
Signature · 7 lines
2.39.2 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH v4 1/3 riscv: dts: starfive: Enable axp15060 pmic for cpufreq
The VisionFive 2 board has an embedded pmic axp15060, which supports the cpu DVFS through the dcdc2 regulator. This patch enables axp15060 pmic and configs the dcdc2.
--- .../starfive/jh7110-starfive-visionfive-2.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +17 -0
@@ -114,6 +114,23 @@ &i2c5 { pinctrl-names = "default"; pinctrl-0 = <&i2c5_pins>; status = "okay"; + + axp15060: pmic@36 { + compatible = "x-powers,axp15060"; + reg = <0x36>; + interrupts = <0>; + interrupt-controller; + #interrupt-cells = <1>; + + regulators { + vdd_cpu: dcdc2 { + regulator-always-on; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1540000>; + regulator-name = "vdd-cpu"; + }; + }; + }; }; &i2c6 {
Signature · 7 lines
2.39.2 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v4 1/3] riscv: dts: starfive: Enable axp15060 pmic for cpufreq
Quoted 14 lines · Mason Huo
The VisionFive 2 board has an embedded pmic axp15060, which supports the cpu DVFS through the dcdc2 regulator. This patch enables axp15060 pmic and configs the dcdc2.
Signed-off-by Mason Huo <[email protected]>--- .../starfive/jh7110-starfive-visionfive-2.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +0
-0
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi &i2c5 { · line 122
Quoted 9 lines
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +6
-0@@ -114,6 +114,23 @@ &i2c5 { pinctrl-names = "default"; pinctrl-0 = <&i2c5_pins>; status = "okay"; + + axp15060: pmic@36 { + compatible = "x-powers,axp15060"; + reg = <0x36>; + interrupts = <0>; + interrupt-controller;
This appears to be wrong. I'm working on a private tree of OpenSBI, where I validate all PLIC SYS/AON/STG CRG/SYSCON/IOMUX, and other devices... register reads/writes. Looks like this interrupts = <0> will cause the kernel code (my vanilla 6.6 tree) to enable interrupt 0 on PLIC, which is wrong. Of course, you won't see this problem if you run upstream OpenSBI, where all writes to PLIC are permitted. I assume PLIC will ignore this request to enable irq 0. Still, this is wrong. Can someone from Starfive take this issue? Attaching the backtrace here:
# This line is from my OpenSBIjh7110_virt_plic_write: U7 refusing to enable interrupt 0 # After this, I'll inject a memory access (write) fault to S mode
# Below is from Linux
Oops - store (or AMO) access fault [#1]
Modules linked in: CPU: 0 PID: 62 Comm: kworker/u9:2 Not tainted 6.6.0-gc3eb9993b167 #14 Hardware name: StarFive VisionFive 2 v1.3B (DT) Workqueue: events_unbound deferred_probe_work_func epc : plic_irq_enable+0xd2/0x15e ra : plic_irq_enable+0xa8/0x15e
epc : ffffffff804650bc ra : ffffffff80465092 sp : ffffffc8003f34c0
gp : ffffffff816d2290 tp : ffffffd802411f80 t0 : ffffffc8003f3010 t1 : 0000000000000001 t2 : 0000000000000003 s0 : ffffffc8003f3530 s1 : ffffffd801eaee30 a0 : ffffffd8bff835b0 a1 : 000000000000001e a2 : 0000000000000004 a3 : ffffffd801eaee00 a4 : 000000000000001e a5 : ffffffc804002100 a6 : 0000000000000000 a7 : 00000000000007ad s2 : ffffffff80ede5a0 s3 : 0000000000000001 s4 : 000000000000ffff s5 : 00000000ffffffff s6 : 0000000000000000 s7 : 000000000000001f s8 : ffffffff81707af0 s9 : ffffffff80eda688 s10: ffffffd801eaee00
s11: ffffffd8bff835a0 t3 : ffffffff816d3420 t4 : 0000000000000002 t5 : 0000000000000000 t6 : 0000000000000000
status: 0000000200000100 badaddr: ffffffc804002100 cause: 0000000000000007
[<ffffffff804650bc>] plic_irq_enable+0xd2/0x15e [<ffffffff800649e6>] irq_enable+0x2c/0x64 [<ffffffff80064a76>] __irq_startup+0x58/0x60 [<ffffffff80064ada>] irq_startup+0x5c/0x14e [<ffffffff800621f4>] __setup_irq+0x582/0x644 [<ffffffff80062368>] request_threaded_irq+0xb2/0x154 [<ffffffff8055571a>] regmap_add_irq_chip_fwnode+0x6fe/0x8f2 [<ffffffff80555944>] regmap_add_irq_chip+0x36/0x4a [<ffffffff8055cb1e>] axp20x_device_probe+0x36/0x114 [<ffffffff8055cce6>] axp20x_i2c_probe+0x6c/0xa0 [<ffffffff8063a8f0>] i2c_device_probe+0x11c/0x23e [<ffffffff80533464>] really_probe+0x86/0x23e [<ffffffff80533678>] __driver_probe_device+0x5c/0xda [<ffffffff80533722>] driver_probe_device+0x2c/0xf8 [<ffffffff8053385c>] __device_attach_driver+0x6e/0xd0 [<ffffffff80531a2c>] bus_for_each_drv+0x5a/0x9a [<ffffffff80533ba0>] __device_attach+0x78/0x116 [<ffffffff80533db6>] device_initial_probe+0xe/0x16 [<ffffffff80532722>] bus_probe_device+0x86/0x88 [<ffffffff8053034a>] device_add+0x3b2/0x552 [<ffffffff80530500>] device_register+0x16/0x20 [<ffffffff8063bb54>] i2c_new_client_device+0x14e/0x214 [<ffffffff8063d9ae>] of_i2c_register_devices+0xa2/0xf8 [<ffffffff8063c246>] i2c_register_adapter+0x130/0x32e [<ffffffff8063c49e>] __i2c_add_numbered_adapter+0x5a/0x86 [<ffffffff8063c55a>] i2c_add_adapter+0x90/0xb4 [<ffffffff8063c62e>] i2c_add_numbered_adapter+0x22/0x2a [<ffffffff8063fd34>] i2c_dw_probe_master+0x288/0x304 [<ffffffff806409c4>] dw_i2c_plat_probe+0x288/0x37e [<ffffffff80535946>] platform_probe+0x4e/0xa6 [<ffffffff80533464>] really_probe+0x86/0x23e [<ffffffff80533678>] __driver_probe_device+0x5c/0xda [<ffffffff80533722>] driver_probe_device+0x2c/0xf8 [<ffffffff8053385c>] __device_attach_driver+0x6e/0xd0 [<ffffffff80531a2c>] bus_for_each_drv+0x5a/0x9a [<ffffffff80533ba0>] __device_attach+0x78/0x116 [<ffffffff80533db6>] device_initial_probe+0xe/0x16 [<ffffffff80532722>] bus_probe_device+0x86/0x88 [<ffffffff80532b86>] deferred_probe_work_func+0x70/0xa6 [<ffffffff800238c2>] process_one_work+0x14a/0x23a [<ffffffff80024760>] worker_thread+0x314/0x450 [<ffffffff8002be5a>] kthread+0x9a/0xae [<ffffffff8000248a>] ret_from_fork+0xa/0x1c Code: 97ba 000f 0140 4398 000f 08a0 9bbb 0179 ebb3 00eb (a023) 0177 ---[ end trace 0000000000000000 ]---
Quoted 5 lines
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +4
-0+ #interrupt-cells = <1>; + + regulators { + vdd_cpu: dcdc2 {
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi &i2c5 { · line 136
Quoted 10 lines
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +7
-0+ regulator-always-on; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1540000>; + regulator-name = "vdd-cpu"; + }; + }; + }; }; &i2c6 {
Bo
Re: [PATCH v4 1/3] riscv: dts: starfive: Enable axp15060 pmic for cpufreq
Hi Bo,
Since commit b2cb2ae22278f1918f7526b89760ee00b4a81393 ("mfd: axp20x:
Generalise handling without interrupt"), the "interrupts = <0>;" line can be removed. It was kept to fix a driver issue that driver would try to find an IRQ line for power button function of the PMIC.
I'll send a patch to fix it.
Best Regards,
Shengyu
Quoted 120 lines · Bo Gan
Quoted 14 lines · Mason Huo
The VisionFive 2 board has an embedded pmic axp15060, which supports the cpu DVFS through the dcdc2 regulator. This patch enables axp15060 pmic and configs the dcdc2.
Signed-off-by Mason Huo <[email protected]>---
.../starfive/jh7110-starfive-visionfive-2.dtsi | 17 +++++++++++++++++1 file changed, 17 insertions(+)arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +0
-0arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi &i2c5 { · line 122
Quoted 9 lines
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +6
-0@@ -114,6 +114,23 @@ &i2c5 { pinctrl-names = "default"; pinctrl-0 = <&i2c5_pins>; status = "okay"; + + axp15060: pmic@36 { + compatible = "x-powers,axp15060"; + reg = <0x36>; + interrupts = <0>; + interrupt-controller;This appears to be wrong. I'm working on a private tree of OpenSBI, where I validate all PLIC SYS/AON/STG CRG/SYSCON/IOMUX, and other devices... register reads/writes. Looks like this
interrupts = <0>will cause the kernel code (my vanilla 6.6 tree) to enable interrupt 0 on PLIC, which is wrong. Of course, you won't see this problem if you run upstream OpenSBI, where all writes to PLIC are permitted. I assume PLIC will ignore this request to enable irq 0. Still, this is wrong. Can someone from Starfive take this issue? Attaching the backtrace here:# This line is from my OpenSBI
jh7110_virt_plic_write: U7 refusing to enable interrupt 0 # After this, I'll inject a memory access (write) fault to S mode# Below is from Linux
Oops - store (or AMO) access fault [#1]Modules linked in: CPU: 0 PID: 62 Comm: kworker/u9:2 Not tainted 6.6.0-gc3eb9993b167 #14 Hardware name: StarFive VisionFive 2 v1.3B (DT) Workqueue: events_unbound deferred_probe_work_func epc : plic_irq_enable+0xd2/0x15e ra : plic_irq_enable+0xa8/0x15eepc :
ffffffff804650bcra :ffffffff80465092sp :ffffffc8003f34c0
gp :ffffffff816d2290tp :ffffffd802411f80t0 :ffffffc8003f3010t1 : 0000000000000001 t2 : 0000000000000003 s0 :ffffffc8003f3530s1 :ffffffd801eaee30a0 :ffffffd8bff835b0a1 :000000000000001ea2 : 0000000000000004 a3 :ffffffd801eaee00a4 :000000000000001ea5 :ffffffc804002100a6 : 0000000000000000 a7 :00000000000007ads2 :ffffffff80ede5a0s3 : 0000000000000001 s4 :000000000000ffffs5 :00000000ffffffffs6 : 0000000000000000 s7 :000000000000001fs8 :ffffffff81707af0s9 :ffffffff80eda688s10:ffffffd801eaee00
s11:ffffffd8bff835a0t3 :ffffffff816d3420t4 : 0000000000000002 t5 : 0000000000000000 t6 : 0000000000000000
status: 0000000200000100 badaddr:ffffffc804002100cause: 0000000000000007[<ffffffff804650bc>] plic_irq_enable+0xd2/0x15e [<ffffffff800649e6>] irq_enable+0x2c/0x64 [<ffffffff80064a76>] __irq_startup+0x58/0x60 [<ffffffff80064ada>] irq_startup+0x5c/0x14e [<ffffffff800621f4>] __setup_irq+0x582/0x644 [<ffffffff80062368>] request_threaded_irq+0xb2/0x154 [<ffffffff8055571a>] regmap_add_irq_chip_fwnode+0x6fe/0x8f2 [<ffffffff80555944>] regmap_add_irq_chip+0x36/0x4a [<ffffffff8055cb1e>] axp20x_device_probe+0x36/0x114 [<ffffffff8055cce6>] axp20x_i2c_probe+0x6c/0xa0 [<ffffffff8063a8f0>] i2c_device_probe+0x11c/0x23e [<ffffffff80533464>] really_probe+0x86/0x23e [<ffffffff80533678>] __driver_probe_device+0x5c/0xda [<ffffffff80533722>] driver_probe_device+0x2c/0xf8 [<ffffffff8053385c>] __device_attach_driver+0x6e/0xd0 [<ffffffff80531a2c>] bus_for_each_drv+0x5a/0x9a [<ffffffff80533ba0>] __device_attach+0x78/0x116 [<ffffffff80533db6>] device_initial_probe+0xe/0x16 [<ffffffff80532722>] bus_probe_device+0x86/0x88 [<ffffffff8053034a>] device_add+0x3b2/0x552 [<ffffffff80530500>] device_register+0x16/0x20 [<ffffffff8063bb54>] i2c_new_client_device+0x14e/0x214 [<ffffffff8063d9ae>] of_i2c_register_devices+0xa2/0xf8 [<ffffffff8063c246>] i2c_register_adapter+0x130/0x32e [<ffffffff8063c49e>] __i2c_add_numbered_adapter+0x5a/0x86 [<ffffffff8063c55a>] i2c_add_adapter+0x90/0xb4 [<ffffffff8063c62e>] i2c_add_numbered_adapter+0x22/0x2a [<ffffffff8063fd34>] i2c_dw_probe_master+0x288/0x304 [<ffffffff806409c4>] dw_i2c_plat_probe+0x288/0x37e [<ffffffff80535946>] platform_probe+0x4e/0xa6 [<ffffffff80533464>] really_probe+0x86/0x23e [<ffffffff80533678>] __driver_probe_device+0x5c/0xda [<ffffffff80533722>] driver_probe_device+0x2c/0xf8 [<ffffffff8053385c>] __device_attach_driver+0x6e/0xd0 [<ffffffff80531a2c>] bus_for_each_drv+0x5a/0x9a [<ffffffff80533ba0>] __device_attach+0x78/0x116 [<ffffffff80533db6>] device_initial_probe+0xe/0x16 [<ffffffff80532722>] bus_probe_device+0x86/0x88 [<ffffffff80532b86>] deferred_probe_work_func+0x70/0xa6 [<ffffffff800238c2>] process_one_work+0x14a/0x23a [<ffffffff80024760>] worker_thread+0x314/0x450 [<ffffffff8002be5a>] kthread+0x9a/0xae [<ffffffff8000248a>] ret_from_fork+0xa/0x1c Code: 97ba 000f 0140 4398 000f 08a0 9bbb 0179 ebb3 00eb (a023) 0177 ---[ end trace 0000000000000000 ]---Quoted 4 lines
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +4
-0+ #interrupt-cells = <1>; + + regulators { + vdd_cpu: dcdc2 {arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi &i2c5 {
Quoted 10 lines
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +7
-0+ regulator-always-on; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1540000>; + regulator-name = "vdd-cpu"; + }; + }; + }; }; &i2c6 {Bo
PATCH v4 2/3 cpufreq: dt-platdev: Add JH7110 SOC to the allowlist
In reply to Mason HuoAdd the compatible strings for supporting the generic cpufreq driver on the StarFive JH7110 SoC.
--- drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/cpufreq/cpufreq-dt-platdev.c +2 -0
@@ -85,6 +85,8 @@ static const struct of_device_id allowlist[] __initconst = { { .compatible = "st-ericsson,u9500", }, { .compatible = "st-ericsson,u9540", }, + { .compatible = "starfive,jh7110", }, + { .compatible = "ti,omap2", }, { .compatible = "ti,omap4", }, { .compatible = "ti,omap5", },
Signature · 7 lines
2.39.2 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Viresh Kumar
maintainerRe: [PATCH v4 2/3] cpufreq: dt-platdev: Add JH7110 SOC to the allowlist
Quoted 13 lines · Mason Huo
Add the compatible strings for supporting the generic cpufreq driver on the StarFive JH7110 SoC.
Signed-off-by Mason Huo <[email protected]>--- drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++ 1 file changed, 2 insertions(+)drivers/cpufreq/cpufreq-dt-platdev.c +0
-0
drivers/cpufreq/cpufreq-dt-platdev.c static const struct of_device_id allowlist[] __initconst = { · line 92
Quoted 8 lines
drivers/cpufreq/cpufreq-dt-platdev.c +2
-0@@ -85,6 +85,8 @@ static const struct of_device_id allowlist[] __initconst = { { .compatible = "st-ericsson,u9500", }, { .compatible = "st-ericsson,u9540", }, + { .compatible = "starfive,jh7110", }, + { .compatible = "ti,omap2", }, { .compatible = "ti,omap4", }, { .compatible = "ti,omap5", },
I thought I already merged it ?
Signature · 6 lines
viresh _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v4 2/3] cpufreq: dt-platdev: Add JH7110 SOC to the allowlist
Quoted 17 lines · Viresh Kumar
Quoted 16 lines · Mason Huo
Add the compatible strings for supporting the generic cpufreq driver on the StarFive JH7110 SoC.
Signed-off-by Mason Huo <[email protected]>--- drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++ 1 file changed, 2 insertions(+)drivers/cpufreq/cpufreq-dt-platdev.c +0
-0@@ -85,6 +85,8 @@ static const struct of_device_id allowlist[] __initconst = { { .compatible = "st-ericsson,u9500", }, { .compatible = "st-ericsson,u9540", },
Quoted 7 lines
drivers/cpufreq/cpufreq-dt-platdev.c static const struct of_device_id allowlist[] __initconst = { · line 92
Quoted 5 lines
drivers/cpufreq/cpufreq-dt-platdev.c +2
-0+ { .compatible = "starfive,jh7110", }, + { .compatible = "ti,omap2", }, { .compatible = "ti,omap4", }, { .compatible = "ti,omap5", },I thought I already merged it ?
You did, 4b4c0d37164c ("cpufreq: dt-platdev: Add JH7110 SOC to the allowlist").
Re: [PATCH v4 2/3] cpufreq: dt-platdev: Add JH7110 SOC to the allowlist
Hi Viresh & Conor,
Sorry for the confusion.
Should I re-send the patch series and remove this patch? Or you can just ignore it?
Thanks
Mason
Quoted 28 lines · Viresh Kumar
Quoted 18 lines · Mason Huo
Quoted 17 lines
Add the compatible strings for supporting the generic cpufreq driver on the StarFive JH7110 SoC.
Signed-off-by Mason Huo <[email protected]>--- drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++ 1 file changed, 2 insertions(+)drivers/cpufreq/cpufreq-dt-platdev.c +0
-0@@ -85,6 +85,8 @@ static const struct of_device_id allowlist[] __initconst = { { .compatible = "st-ericsson,u9500", }, { .compatible = "st-ericsson,u9540", },Quoted 7 lines
drivers/cpufreq/cpufreq-dt-platdev.c static const struct of_device_id allowlist[] __initconst = { · line 92
Quoted 5 lines
drivers/cpufreq/cpufreq-dt-platdev.c +2
-0+ { .compatible = "starfive,jh7110", }, + { .compatible = "ti,omap2", }, { .compatible = "ti,omap4", }, { .compatible = "ti,omap5", },I thought I already merged it ?
You did,
4b4c0d37164c("cpufreq: dt-platdev: Add JH7110 SOC to the allowlist").
Viresh Kumar
maintainerRe: [PATCH v4 2/3] cpufreq: dt-platdev: Add JH7110 SOC to the allowlist
Quoted 1 line · Mason Huo
Or you can just ignore it?
I can do that :)
Signature · 1 line
viresh
Conor Dooley
AppliedRe: [PATCH v4 2/3] cpufreq: dt-platdev: Add JH7110 SOC to the allowlist
In reply to Mason HuoQuoted 5 lines · Mason Huo
Hi Viresh & Conor,
Sorry for the confusion.
Should I re-send the patch series and remove this patch? Or you can just ignore it?
I applied the two dts patches yesterday, you shouldn't need to do anything.
Re: [PATCH v4 2/3] cpufreq: dt-platdev: Add JH7110 SOC to the allowlist
Hi Conor & Viresh,
Quoted 8 lines · Mason Huo
Quoted 5 lines
Hi Viresh & Conor,
Sorry for the confusion.
Should I re-send the patch series and remove this patch? Or you can just ignore it?I applied the two dts patches yesterday, you shouldn't need to do anything.
Thank you for your help & review.
B.R
Mason
PATCH v4 3/3 riscv: dts: starfive: Add cpu scaling for JH7110 SoC
In reply to Mason HuoAdd the operating-points-v2 to support cpu scaling on StarFive JH7110 SoC. It supports up to 4 cpu frequency loads.
--- .../jh7110-starfive-visionfive-2.dtsi | 16 +++++++++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 33 +++++++++++++++++++ 2 files changed, 49 insertions(+)
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +16 -0
@@ -230,3 +230,19 @@ &uart0 { pinctrl-0 = <&uart0_pins>; status = "okay"; }; + +&U74_1 { + cpu-supply = <&vdd_cpu>; +}; + +&U74_2 { + cpu-supply = <&vdd_cpu>; +}; + +&U74_3 { + cpu-supply = <&vdd_cpu>; +}; + +&U74_4 { + cpu-supply = <&vdd_cpu>; +};
arch/riscv/boot/dts/starfive/jh7110.dtsi +33 -0
@@ -53,6 +53,9 @@ U74_1: cpu@1 { next-level-cache = <&ccache>; riscv,isa = "rv64imafdc_zba_zbb"; tlb-split; + operating-points-v2 = <&cpu_opp>; + clocks = <&syscrg JH7110_SYSCLK_CPU_CORE>; + clock-names = "cpu"; cpu1_intc: interrupt-controller { compatible = "riscv,cpu-intc";
@@ -79,6 +82,9 @@ U74_2: cpu@2 { next-level-cache = <&ccache>; riscv,isa = "rv64imafdc_zba_zbb"; tlb-split; + operating-points-v2 = <&cpu_opp>; + clocks = <&syscrg JH7110_SYSCLK_CPU_CORE>; + clock-names = "cpu"; cpu2_intc: interrupt-controller { compatible = "riscv,cpu-intc";
@@ -105,6 +111,9 @@ U74_3: cpu@3 { next-level-cache = <&ccache>; riscv,isa = "rv64imafdc_zba_zbb"; tlb-split; + operating-points-v2 = <&cpu_opp>; + clocks = <&syscrg JH7110_SYSCLK_CPU_CORE>; + clock-names = "cpu"; cpu3_intc: interrupt-controller { compatible = "riscv,cpu-intc";
@@ -131,6 +140,9 @@ U74_4: cpu@4 { next-level-cache = <&ccache>; riscv,isa = "rv64imafdc_zba_zbb"; tlb-split; + operating-points-v2 = <&cpu_opp>; + clocks = <&syscrg JH7110_SYSCLK_CPU_CORE>; + clock-names = "cpu"; cpu4_intc: interrupt-controller { compatible = "riscv,cpu-intc";
@@ -164,6 +176,27 @@ core4 { }; }; + cpu_opp: opp-table-0 { + compatible = "operating-points-v2"; + opp-shared; + opp-375000000 { + opp-hz = /bits/ 64 <375000000>; + opp-microvolt = <800000>; + }; + opp-500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <800000>; + }; + opp-750000000 { + opp-hz = /bits/ 64 <750000000>; + opp-microvolt = <800000>; + }; + opp-1500000000 { + opp-hz = /bits/ 64 <1500000000>; + opp-microvolt = <1040000>; + }; + }; + gmac0_rgmii_rxin: gmac0-rgmii-rxin-clock { compatible = "fixed-clock"; clock-output-names = "gmac0_rgmii_rxin";
Signature · 7 lines
2.39.2 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Hello,
AXP15060 series just got merged, just to remind this for anyone who wants to test this series.
Best regards,
Shengyu
Quoted 36 lines
The StarFive JH7110 SoC has four RISC-V cores,
and it supports up to 4 cpu frequency loads.This patchset adds the compatible strings into the allowlist for supporting the generic cpufreq driver on JH7110 SoC. Also, it enables the axp15060 pmic for the cpu power source.
The series has been tested on the VisionFive 2 boards which are equipped with JH7110 SoC and axp15060 pmic.
---
This patchset is based on v6.4-rc4 with these patches applied:
[1] ("regulator: Add X-Powers AXP15060/AXP313a PMIC support")https://lore.kernel.org/lkml/[email protected]/Changes since v3:
- Fix thedtb_checkissues for axp15060 pmic dts configuration.Changes since v2:
- Fix the new blank line at EOF issue in dtsi.Changes since v1:
- Fix dts node naming issues.
- Move clock properties of cpu node from <board>.dtsi to <soc>.dtsi.
- Follow the alphabetical order to place the cpufreq dt allowlist.Mason Huo (3):
riscv: dts: starfive: Enable axp15060 pmic for cpufreq
cpufreq: dt-platdev: Add JH7110 SOC to the allowlist
riscv: dts: starfive: Add cpu scaling for JH7110 SoC.../jh7110-starfive-visionfive-2.dtsi | 33 +++++++++++++++++++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 33 +++++++++++++++++++ drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++ 3 files changed, 68 insertions(+)