arm64: dts: meson-axg: enable SCPI
Subsystems (2)
Jerome Brunet
reviewercover arm64: dts: meson-axg: enable SCPI
The goal of this patchset is to enable SCPI (dvfs and hwmon) the axg platform. The first patches in this series fix a few issues to acheive this.
Jerome Brunet (4):
arm64: dts: meson-axg: fix mailbox address
arm64: dts: meson-axg: correct sram shared mem unit-address
Documentation: bindings: Add missing Amlogic SCPI sensor bindings
arm64: dts: meson-axg: enable SCPI
.../devicetree/bindings/arm/amlogic,scpi.txt | 7 ++++ arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 34 ++++++++++++++++--- 2 files changed, 37 insertions(+), 4 deletions(-)
Signature · 1 line
2.19.1
Jerome Brunet
reviewerPATCH 1/4 arm64: dts: meson-axg: fix mailbox address
MHU mailbox address is wrong. Fixing it enables the mailboxes on the A113. These mailboxes are needed for SCPI
--- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +2 -2
@@ -1067,9 +1067,9 @@ }; }; - mailbox: mailbox at ff63dc00 { + mailbox: mailbox at ff63c404 { compatible = "amlogic,meson-gx-mhu", "amlogic,meson-gxbb-mhu"; - reg = <0 0xff63dc00 0 0x400>; + reg = <0 0xff63c404 0 0x4c>; interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>, <GIC_SPI 209 IRQ_TYPE_EDGE_RISING>, <GIC_SPI 210 IRQ_TYPE_EDGE_RISING>;
Signature · 1 line
2.19.1
Re: [PATCH 1/4] arm64: dts: meson-axg: fix mailbox address
Quoted 16 lines · Jerome Brunet
MHU mailbox address is wrong. Fixing it enables the mailboxes on the A113. These mailboxes are needed for SCPI
Fixes 9d59b708500f ("arm64: dts: meson-axg: add initial A113D SoC DT support")Signed-off-by Jerome Brunet <[email protected]>--- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/boot/dts/amlogic/meson-axg.dtsi +0
-0@@ -1067,9 +1067,9 @@ };
arch/arm64/boot/dts/amlogic/meson-axg.dtsi line 1075
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +2
-2}; - mailbox: mailbox at ff63dc00 { + mailbox: mailbox at ff63c404 { compatible = "amlogic,meson-gx-mhu", "amlogic,meson-gxbb-mhu"; - reg = <0 0xff63dc00 0 0x400>; + reg = <0 0xff63c404 0 0x4c>; interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>, <GIC_SPI 209 IRQ_TYPE_EDGE_RISING>, <GIC_SPI 210 IRQ_TYPE_EDGE_RISING>;
Jerome Brunet
reviewerPATCH 2/4 arm64: dts: meson-axg: correct sram shared mem unit-address
In reply to Jerome BrunetCorrect the unit-address in the node name of the SRAM shared memory
--- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +2 -2
@@ -1659,12 +1659,12 @@ #size-cells = <1>; ranges = <0 0x0 0xfffc0000 0x20000>; - cpu_scp_lpri: scp-shmem at 0 { + cpu_scp_lpri: scp-shmem at 13000 { compatible = "amlogic,meson-axg-scp-shmem"; reg = <0x13000 0x400>; }; - cpu_scp_hpri: scp-shmem at 200 { + cpu_scp_hpri: scp-shmem at 13400 { compatible = "amlogic,meson-axg-scp-shmem"; reg = <0x13400 0x400>; };
Signature · 1 line
2.19.1
Re: [PATCH 2/4] arm64: dts: meson-axg: correct sram shared mem unit-address
Quoted 17 lines · Jerome Brunet
Correct the unit-address in the node name of the SRAM shared memory
Signed-off-by Jerome Brunet <[email protected]>--- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/boot/dts/amlogic/meson-axg.dtsi +0
-1@@ -1659,12 +1659,12 @@ #size-cells = <1>; ranges = <0 0x0 0xfffc0000 0x20000>; - cpu_scp_lpri: scp-shmem at 0 {
arch/arm64/boot/dts/amlogic/meson-axg.dtsi line 1670
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +2
-1+ cpu_scp_lpri: scp-shmem at 13000 { compatible = "amlogic,meson-axg-scp-shmem"; reg = <0x13000 0x400>; }; - cpu_scp_hpri: scp-shmem at 200 { + cpu_scp_hpri: scp-shmem at 13400 { compatible = "amlogic,meson-axg-scp-shmem"; reg = <0x13400 0x400>; };
Jerome Brunet
reviewerPATCH 3/4 Documentation: bindings: Add missing Amlogic SCPI sensor bindings
In reply to Jerome Brunetamlogic,meson-gxbb-scpi-sensors is both the driver and DT but is not documented. Just add it to amlogic's scpi documentation
--- Documentation/devicetree/bindings/arm/amlogic,scpi.txt | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/arm/amlogic,scpi.txt +7 -0
@@ -17,4 +17,11 @@ Required sub-node properties: - compatible : should be "amlogic,meson-gxbb-scp-shmem" for SRAM based shared memory on Amlogic GXBB SoC. +Sensor bindings for the sensors based on SCPI Message Protocol +-------------------------------------------------------------- +SCPI provides an API to access the various sensors on the SoC. + +Required properties: +- compatible : should be "amlogic,meson-gxbb-scpi-sensors". + [0] Documentation/devicetree/bindings/arm/arm,scpi.txt
Signature · 1 line
2.19.1
Re: [PATCH 3/4] Documentation: bindings: Add missing Amlogic SCPI sensor bindings
Quoted 13 lines · Jerome Brunet
amlogic,meson-gxbb-scpi-sensors is both the driver and DT but is not documented. Just add it to amlogic's scpi documentation
Signed-off-by Jerome Brunet <[email protected]>--- Documentation/devicetree/bindings/arm/amlogic,scpi.txt | 7 +++++++ 1 file changed, 7 insertions(+)Documentation/devicetree/bindings/arm/amlogic,scpi.txt +0
-0
Documentation/devicetree/bindings/arm/amlogic,scpi.txt Required sub-node properties: · line 26
Quoted 10 lines
Documentation/devicetree/bindings/arm/amlogic,scpi.txt +7
-0@@ -17,4 +17,11 @@ Required sub-node properties: - compatible : should be "amlogic,meson-gxbb-scp-shmem" for SRAM based shared memory on Amlogic GXBB SoC. +Sensor bindings for the sensors based on SCPI Message Protocol +-------------------------------------------------------------- +SCPI provides an API to access the various sensors on the SoC. + +Required properties: +- compatible : should be "amlogic,meson-gxbb-scpi-sensors". +
Not sure if it's worth mentioning the reason for being able to identify amlogic,meson-gxbb sensors from generic scpi ones. IIRC it was for the unit values of these sensors are different ? But I will leave that to DT or platform maintainers' taste.
--
Regards,
Sudeep
[email protected]
reviewerRe: [PATCH 3/4] Documentation: bindings: Add missing Amlogic SCPI sensor bindings
Quoted 19 lines · Sudeep Holla
Quoted 18 lines · Jerome Brunet
amlogic,meson-gxbb-scpi-sensors is both the driver and DT but is not documented. Just add it to amlogic's scpi documentation
Signed-off-by Jerome Brunet <[email protected]>--- Documentation/devicetree/bindings/arm/amlogic,scpi.txt | 7 +++++++ 1 file changed, 7 insertions(+)Documentation/devicetree/bindings/arm/amlogic,scpi.txt +0
-0@@ -17,4 +17,11 @@ Required sub-node properties: - compatible : should be "amlogic,meson-gxbb-scp-shmem" for SRAM basedshared
memory on Amlogic GXBB SoC.
Quoted 12 lines
Documentation/devicetree/bindings/arm/amlogic,scpi.txt Required sub-node properties: · line 26
Quoted 7 lines
Documentation/devicetree/bindings/arm/amlogic,scpi.txt +7
-0+Sensor bindings for the sensors based on SCPI Message Protocol +-------------------------------------------------------------- +SCPI provides an API to access the various sensors on the SoC. + +Required properties: +- compatible : should be "amlogic,meson-gxbb-scpi-sensors". +Not sure if it's worth mentioning the reason for being able to identify amlogic,meson-gxbb sensors from generic scpi ones. IIRC it was for the unit values of these sensors are different ? But I will leave that to DT or platform maintainers' taste.
Yes Sudeep, the unit are different.
If we probe on the generic one, it will "work" but the result is just not good.
BTW, the point of this patch is merely to remove an existing issue. The scpi driver and meson-gx.dtsi are both refering to an undocumented compatible.
Quoted 4 lines
--
Regards,
Sudeep
Re: [PATCH 3/4] Documentation: bindings: Add missing Amlogic SCPI sensor bindings
In reply to Jerome BrunetQuoted 8 lines · Jerome Brunet
amlogic,meson-gxbb-scpi-sensors is both the driver and DT but is not documented. Just add it to amlogic's scpi documentation
Signed-off-by Jerome Brunet <[email protected]>--- Documentation/devicetree/bindings/arm/amlogic,scpi.txt | 7 +++++++ 1 file changed, 7 insertions(+)
Jerome Brunet
reviewerPATCH 4/4 arm64: dts: meson-axg: enable SCPI
In reply to Jerome BrunetEnable SCPI on the axg platform, with cpu clock and hwmon (core temperature) support
--- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +26 -0
@@ -79,6 +79,7 @@ reg = <0x0 0x0>; enable-method = "psci"; next-level-cache = <&l2>; + clocks = <&scpi_dvfs 0>; }; cpu1: cpu at 1 {
@@ -87,6 +88,7 @@ reg = <0x0 0x1>; enable-method = "psci"; next-level-cache = <&l2>; + clocks = <&scpi_dvfs 0>; }; cpu2: cpu at 2 {
@@ -95,6 +97,7 @@ reg = <0x0 0x2>; enable-method = "psci"; next-level-cache = <&l2>; + clocks = <&scpi_dvfs 0>; }; cpu3: cpu at 3 {
@@ -103,6 +106,7 @@ reg = <0x0 0x3>; enable-method = "psci"; next-level-cache = <&l2>; + clocks = <&scpi_dvfs 0>; }; l2: l2-cache0 {
@@ -137,6 +141,28 @@ }; }; + scpi { + compatible = "arm,scpi-pre-1.0"; + mboxes = <&mailbox 1 &mailbox 2>; + shmem = <&cpu_scp_lpri &cpu_scp_hpri>; + + scpi_clocks: clocks { + compatible = "arm,scpi-clocks"; + + scpi_dvfs: clock-controller { + compatible = "arm,scpi-dvfs-clocks"; + #clock-cells = <1>; + clock-indices = <0>; + clock-output-names = "vcpu"; + }; + }; + + scpi_sensors: sensors { + compatible = "amlogic,meson-gxbb-scpi-sensors"; + #thermal-sensor-cells = <1>; + }; + }; + soc { compatible = "simple-bus"; #address-cells = <2>;
Signature · 1 line
2.19.1
Quoted 64 lines · Jerome Brunet
Enable SCPI on the axg platform, with cpu clock and hwmon (core temperature) support
Signed-off-by Jerome Brunet <[email protected]>--- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+)arch/arm64/boot/dts/amlogic/meson-axg.dtsi +19
-0@@ -79,6 +79,7 @@ reg = <0x0 0x0>; enable-method = "psci"; next-level-cache = <&l2>; + clocks = <&scpi_dvfs 0>; }; cpu1: cpu at 1 {@@ -87,6 +88,7 @@ reg = <0x0 0x1>; enable-method = "psci"; next-level-cache = <&l2>; + clocks = <&scpi_dvfs 0>; }; cpu2: cpu at 2 {@@ -95,6 +97,7 @@ reg = <0x0 0x2>; enable-method = "psci"; next-level-cache = <&l2>; + clocks = <&scpi_dvfs 0>; }; cpu3: cpu at 3 {@@ -103,6 +106,7 @@ reg = <0x0 0x3>; enable-method = "psci"; next-level-cache = <&l2>; + clocks = <&scpi_dvfs 0>; }; l2: l2-cache0 {@@ -137,6 +141,28 @@ }; }; + scpi { + compatible = "arm,scpi-pre-1.0"; + mboxes = <&mailbox 1 &mailbox 2>; + shmem = <&cpu_scp_lpri &cpu_scp_hpri>; + + scpi_clocks: clocks { + compatible = "arm,scpi-clocks"; + + scpi_dvfs: clock-controller { + compatible = "arm,scpi-dvfs-clocks"; + #clock-cells = <1>; + clock-indices = <0>; + clock-output-names = "vcpu"; + }; + };
arch/arm64/boot/dts/amlogic/meson-axg.dtsi line 168
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +7
-0+ + scpi_sensors: sensors { + compatible = "amlogic,meson-gxbb-scpi-sensors"; + #thermal-sensor-cells = <1>; + }; + }; + soc { compatible = "simple-bus"; #address-cells = <2>;
Quoted 3 lines · Jerome Brunet
The goal of this patchset is to enable SCPI (dvfs and hwmon) the axg platform. The first patches in this series fix a few issues to acheive this.
Queued for v4.21 (branch: v4.21/dt64)
Kevin