soc: amlogic: Add Amlogic SoC Information driver
Subsystems (2)
v3 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 v2 at [2] :
- Removed subnodes of socinfo node
- Checks has-chip-id property and if node is enabled
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
[1] http://lkml.kernel.org/r/1490950079-10145-1-git-send-email-narmstrong at baylibre.com
[2] http://lkml.kernel.org/r/1496742340-10307-1-git-send-email-narmstrong at baylibre.com
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 | 29 ++++ arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 6 + 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 | 177 ++++++++++++++++++++++ 7 files changed, 227 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 v3 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 | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.txt +29 -0
@@ -60,3 +60,32 @@ 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" + +Properties 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, the following property should be added : + +Optional properties: + - has-chip-id: If present, the interface gives the current SoC version. + +Example +------- + +ao-secure at 140 { + compatible = "amlogic,meson-gx-ao-secure", "syscon"; + reg = <0x0 0x140 0x0 0x140>; + has-chip-id; +};
Signature · 1 line
1.9.1
PATCH v3 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 | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gx.dtsi +6 -0
@@ -365,6 +365,12 @@ #reset-cells = <1>; }; + sec_AO: ao-secure at 140 { + compatible = "amlogic,meson-gx-ao-secure", "syscon"; + reg = <0x0 0x140 0x0 0x140>; + has-chip-id; + }; + uart_AO: serial at 4c0 { compatible = "amlogic,meson-uart"; reg = <0x0 0x004c0 0x0 0x14>;
Signature · 1 line
1.9.1
PATCH v3 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 | 177 +++++++++++++++++++++++++++++++++ 5 files changed, 192 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 +177 -0
177 lines not on this page · raw message
Signature · 1 line
1.9.1
Re: [PATCH v3 1/3] dt-bindings: arm: amlogic: Add SoC information bindings
In reply to Neil ArmstrongQuoted 25 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 | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+)Documentation/devicetree/bindings/arm/amlogic.txt +10
-0@@ -60,3 +60,32 @@ 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" +
Documentation/devicetree/bindings/arm/amlogic.txt Board compatible values (alphabetically, grouped by SoC): · line 82
Quoted 10 lines
Documentation/devicetree/bindings/arm/amlogic.txt +10
-0+Properties 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, the following property should be added : + +Optional properties: + - has-chip-id: If present, the interface gives the current SoC version.
amlogic,has-chip-id
With that,
Quoted 16 lines
Documentation/devicetree/bindings/arm/amlogic.txt +9
-0+ +Example +------- + +ao-secure at 140 { + compatible = "amlogic,meson-gx-ao-secure", "syscon"; + reg = <0x0 0x140 0x0 0x140>; + has-chip-id; +};Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 1/3] dt-bindings: arm: amlogic: Add SoC information bindings
Quoted 30 lines · Rob Herring
Quoted 29 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 | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+)Documentation/devicetree/bindings/arm/amlogic.txt +14
-0@@ -60,3 +60,32 @@ 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" + +Properties should indentify components of this register interface : + +Meson GX SoC Information +------------------------
Quoted 8 lines
Documentation/devicetree/bindings/arm/amlogic.txt Board compatible values (alphabetically, grouped by SoC): · line 82
Quoted 6 lines
Documentation/devicetree/bindings/arm/amlogic.txt +6
-0+A firmware register encodes the SoC type, package and revision information on +the Meson GX SoCs. +If present, the following property should be added : + +Optional properties: + - has-chip-id: If present, the interface gives the current SoC version.amlogic,has-chip-id
OK, thanks I'll send a v3.1 with this small change.
Neil
Quoted 21 lines
With that,
Acked-by Rob Herring <[email protected]>Quoted 16 lines
Documentation/devicetree/bindings/arm/amlogic.txt +9
-0+ +Example +------- + +ao-secure at 140 { + compatible = "amlogic,meson-gx-ao-secure", "syscon"; + reg = <0x0 0x140 0x0 0x140>; + has-chip-id; +};Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html