soc: amlogic: Add Amlogic SoC Information driver
Subsystems (2)
v2 cover soc: amlogic: Add Amlogic SoC Information driver
Amlogic SoCs have a SoC information register for SoC type, package type and revision information.
This patchset adds support for this register decoding and exposing with the SoC bus infrastructure, with dt-bindings and DT node.
Changes since v1 at [1] :
- Switch DT representation to use regmap ans sub-node of a simple-mfd node
- Updated DT, bindings and driver accordingly
Neil Armstrong (3):
dt-bindings: arm: amlogic: Add SoC information bindings
ARM64: dts: meson-gx: Add SoC info register
soc: Add Amlogic SoC Information driver
Documentation/devicetree/bindings/arm/amlogic.txt | 32 ++++ arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 9 ++ drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/amlogic/Kconfig | 12 ++ drivers/soc/amlogic/Makefile | 1 + drivers/soc/amlogic/meson-gx-socinfo.c | 169 ++++++++++++++++++++++ 7 files changed, 225 insertions(+) create mode 100644 drivers/soc/amlogic/Kconfig create mode 100644 drivers/soc/amlogic/Makefile create mode 100644 drivers/soc/amlogic/meson-gx-socinfo.c
Signature · 1 line
1.9.1
PATCH v2 1/3 dt-bindings: arm: amlogic: Add SoC information bindings
Add bindings for the SoC information register of the Amlogic SoCs.
--- Documentation/devicetree/bindings/arm/amlogic.txt | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.txt +32 -0
@@ -60,3 +60,35 @@ Board compatible values (alphabetically, grouped by SoC): - "amlogic,q201" (Meson gxm s912) - "kingnovel,r-box-pro" (Meson gxm S912) - "nexbox,a1" (Meson gxm s912) + +Amlogic Meson Firmware registers Interface +------------------------------------------ + +The Meson SoCs have a register bank with status and data shared with the +secure firmware. + +Required properties: + - compatible: For Meson GX SoCs, must be "amlogic,meson-gx-ao-secure", "syscon", "simple-mfd" + +Sub-nodes should indentify components of this register interface : + +Meson GX SoC Information +------------------------ +A firmware register encodes the SoC type, package and revision information on +the Meson GX SoCs. +If present, a device node for this register should be added. + +Required properties: + - compatible: For Meson GX SoCs, must be "amlogic,meson-gx-chipid". + +Example +------- + +ao-secure at 140 { + compatible = "amlogic,meson-gx-ao-secure", "syscon", "simple-mfd"; + reg = <0x0 0x140 0x0 0x140>; + + chipid { + compatible = "amlogic,meson-gx-chipid"; + }; +};
Signature · 1 line
1.9.1
Rob Herring
maintainerRe: [PATCH v2 1/3] dt-bindings: arm: amlogic: Add SoC information bindings
Quoted 35 lines · Neil Armstrong
Add bindings for the SoC information register of the Amlogic SoCs.
Signed-off-by Neil Armstrong <[email protected]>--- Documentation/devicetree/bindings/arm/amlogic.txt | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+)Documentation/devicetree/bindings/arm/amlogic.txt +20
-0@@ -60,3 +60,35 @@ Board compatible values (alphabetically, grouped by SoC): - "amlogic,q201" (Meson gxm s912) - "kingnovel,r-box-pro" (Meson gxm S912) - "nexbox,a1" (Meson gxm s912) + +Amlogic Meson Firmware registers Interface +------------------------------------------ + +The Meson SoCs have a register bank with status and data shared with the +secure firmware. + +Required properties: + - compatible: For Meson GX SoCs, must be "amlogic,meson-gx-ao-secure", "syscon", "simple-mfd" + +Sub-nodes should indentify components of this register interface : + +Meson GX SoC Information +------------------------ +A firmware register encodes the SoC type, package and revision information on +the Meson GX SoCs. +If present, a device node for this register should be added. + +Required properties: + - compatible: For Meson GX SoCs, must be "amlogic,meson-gx-chipid".
Documentation/devicetree/bindings/arm/amlogic.txt Board compatible values (alphabetically, grouped by SoC): · line 92
Quoted 10 lines
Documentation/devicetree/bindings/arm/amlogic.txt +10
-0+ +Example +------- + +ao-secure at 140 { + compatible = "amlogic,meson-gx-ao-secure", "syscon", "simple-mfd"; + reg = <0x0 0x140 0x0 0x140>; + + chipid { + compatible = "amlogic,meson-gx-chipid";
No registers for this block? If not, this node is pointless. "amlogic,meson-gx-ao-secure" should be specific enough to determine if you have this block or not and the driver for it can create a device if the OS needs it.
Rob
Re: [PATCH v2 1/3] dt-bindings: arm: amlogic: Add SoC information bindings
Quoted 52 lines · Rob Herring
Quoted 35 lines · Neil Armstrong
Add bindings for the SoC information register of the Amlogic SoCs.
Signed-off-by Neil Armstrong <[email protected]>--- Documentation/devicetree/bindings/arm/amlogic.txt | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+)Documentation/devicetree/bindings/arm/amlogic.txt +20
-0@@ -60,3 +60,35 @@ Board compatible values (alphabetically, grouped by SoC): - "amlogic,q201" (Meson gxm s912) - "kingnovel,r-box-pro" (Meson gxm S912) - "nexbox,a1" (Meson gxm s912) + +Amlogic Meson Firmware registers Interface +------------------------------------------ + +The Meson SoCs have a register bank with status and data shared with the +secure firmware. + +Required properties: + - compatible: For Meson GX SoCs, must be "amlogic,meson-gx-ao-secure", "syscon", "simple-mfd" + +Sub-nodes should indentify components of this register interface : + +Meson GX SoC Information +------------------------ +A firmware register encodes the SoC type, package and revision information on +the Meson GX SoCs. +If present, a device node for this register should be added. + +Required properties: + - compatible: For Meson GX SoCs, must be "amlogic,meson-gx-chipid".Documentation/devicetree/bindings/arm/amlogic.txt Board compatible values (alphabetically, grouped by SoC): · line 92
Quoted 10 lines
Documentation/devicetree/bindings/arm/amlogic.txt +10
-0+ +Example +------- + +ao-secure at 140 { + compatible = "amlogic,meson-gx-ao-secure", "syscon", "simple-mfd"; + reg = <0x0 0x140 0x0 0x140>; + + chipid { + compatible = "amlogic,meson-gx-chipid";No registers for this block? If not, this node is pointless. "amlogic,meson-gx-ao-secure" should be specific enough to determine if you have this block or not and the driver for it can create a device if the OS needs it.
Quoted 2 lines
Rob
Well OK, but since it's a firmware interface, it can be handy to list the possible capabilities, not especially tied to a driver.
Neil
Rob Herring
maintainerRe: [PATCH v2 1/3] dt-bindings: arm: amlogic: Add SoC information bindings
Quoted 53 lines · Neil Armstrong
Quoted 52 lines · Rob Herring
Quoted 35 lines · Neil Armstrong
Add bindings for the SoC information register of the Amlogic SoCs.
Signed-off-by Neil Armstrong <[email protected]>--- Documentation/devicetree/bindings/arm/amlogic.txt | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+)Documentation/devicetree/bindings/arm/amlogic.txt +20
-0@@ -60,3 +60,35 @@ Board compatible values (alphabetically, grouped by SoC): - "amlogic,q201" (Meson gxm s912) - "kingnovel,r-box-pro" (Meson gxm S912) - "nexbox,a1" (Meson gxm s912) + +Amlogic Meson Firmware registers Interface +------------------------------------------ + +The Meson SoCs have a register bank with status and data shared with the +secure firmware. + +Required properties: + - compatible: For Meson GX SoCs, must be "amlogic,meson-gx-ao-secure", "syscon", "simple-mfd" + +Sub-nodes should indentify components of this register interface : + +Meson GX SoC Information +------------------------ +A firmware register encodes the SoC type, package and revision information on +the Meson GX SoCs. +If present, a device node for this register should be added. + +Required properties: + - compatible: For Meson GX SoCs, must be "amlogic,meson-gx-chipid".Documentation/devicetree/bindings/arm/amlogic.txt Board compatible values (alphabetically, grouped by SoC): · line 92
Quoted 10 lines
Documentation/devicetree/bindings/arm/amlogic.txt +10
-0+ +Example +------- + +ao-secure at 140 { + compatible = "amlogic,meson-gx-ao-secure", "syscon", "simple-mfd"; + reg = <0x0 0x140 0x0 0x140>; + + chipid { + compatible = "amlogic,meson-gx-chipid";No registers for this block? If not, this node is pointless. "amlogic,meson-gx-ao-secure" should be specific enough to determine if you have this block or not and the driver for it can create a device if the OS needs it.
Quoted 5 lines
Quoted 2 lines
Rob
Well OK, but since it's a firmware interface, it can be handy to list the possible capabilities, not especially tied to a driver.
A "has-chip-id;" property would do that.
It would be better to just be very explicit about what version of firmware you have and that can imply anything and everything you need to know about the firmware without needing to up date the dtb every time you need to provide a new (to Linux) firmware capability.
Rob
PATCH v2 2/3 ARM64: dts: meson-gx: Add SoC info register
In reply to Neil ArmstrongAdd node for the Amlogic Meson GX SoC information register.
--- arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gx.dtsi +9 -0
@@ -365,6 +365,15 @@ #reset-cells = <1>; }; + sec_AO: ao-secure at 140 { + compatible = "amlogic,meson-gx-ao-secure", "syscon", "simple-mfd"; + reg = <0x0 0x140 0x0 0x140>; + + chipid { + compatible = "amlogic,meson-gx-chipid"; + }; + }; + uart_AO: serial at 4c0 { compatible = "amlogic,meson-uart"; reg = <0x0 0x004c0 0x0 0x14>;
Signature · 1 line
1.9.1
PATCH v2 3/3 soc: Add Amlogic SoC Information driver
In reply to Neil ArmstrongAmlogic SoCs have a SoC information register for SoC type, package type and revision information.
This patchs adds support for this register decoding and exposing with the SoC bus infrastructure.
--- drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/amlogic/Kconfig | 12 +++ drivers/soc/amlogic/Makefile | 1 + drivers/soc/amlogic/meson-gx-socinfo.c | 169 +++++++++++++++++++++++++++++++++ 5 files changed, 184 insertions(+) create mode 100644 drivers/soc/amlogic/Kconfig create mode 100644 drivers/soc/amlogic/Makefile create mode 100644 drivers/soc/amlogic/meson-gx-socinfo.c
drivers/soc/Kconfig +1 -0
@@ -1,5 +1,6 @@ menu "SOC (System On Chip) specific Drivers" +source "drivers/soc/amlogic/Kconfig" source "drivers/soc/atmel/Kconfig" source "drivers/soc/bcm/Kconfig" source "drivers/soc/fsl/Kconfig"
drivers/soc/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-$(CONFIG_MACH_DOVE) += dove/ obj-y += fsl/ obj-$(CONFIG_ARCH_MXC) += imx/ obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/ +obj-$(CONFIG_ARCH_MESON) += amlogic/ obj-$(CONFIG_ARCH_QCOM) += qcom/ obj-$(CONFIG_ARCH_RENESAS) += renesas/ obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
drivers/soc/amlogic/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +menu "Amlogic SoC drivers" + +config MESON_GX_SOCINFO + bool "Amlogic Meson GX SoC Information driver" + depends on ARCH_MESON || COMPILE_TEST + default ARCH_MESON + select SOC_BUS + help + Say yes to support decoding of Amlogic Meson GX SoC family + information about the type, package and version. + +endmenu
drivers/soc/amlogic/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_MESON_GX_SOCINFO) += meson-gx-socinfo.o
drivers/soc/amlogic/meson-gx-socinfo.c new file +169 -0
169 lines not on this page · raw message
Signature · 1 line
1.9.1