Add support for Actions Semi Owl soc info
Subsystems (2)
cover Add support for Actions Semi Owl soc info
This patchset adds a socinfo driver which provides information about Actions Semi Owl SoCs to user space via sysfs: machine, family, soc_id, serial_number.
Please note the serial number is currently available only for the S500 SoC variant.
This has been tested on the S500 SoC based RoseapplePi SBC.
Thanks,
Cristi
Cristian Ciocaltea (4):
dt-bindings: soc: actions: Add Actions Semi Owl socinfo binding
soc: actions: Add Actions Semi Owl socinfo driver
arm: dts: owl-s500: Add socinfo support
MAINTAINERS: Add entry for Actions Semi Owl socinfo binding
.../bindings/soc/actions/owl-socinfo.yaml | 71 ++++++++++ MAINTAINERS | 1 + arch/arm/boot/dts/owl-s500.dtsi | 4 +- drivers/soc/actions/Kconfig | 8 ++ drivers/soc/actions/Makefile | 1 + drivers/soc/actions/owl-socinfo.c | 133 ++++++++++++++++++ 6 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml create mode 100644 drivers/soc/actions/owl-socinfo.c
Signature · 1 line
2.31.0
PATCH 1/4 dt-bindings: soc: actions: Add Actions Semi Owl socinfo binding
Add devicetree binding for the Actions Semi Owl SoCs info module.
--- .../bindings/soc/actions/owl-socinfo.yaml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml new file +71 -0
@@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/actions/owl-socinfo.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Actions Semi Owl SoC info module + +maintainers: + - Cristian Ciocaltea <[email protected]> + +description: | + Actions Semi Owl SoC info module provides access to various information + about the S500, S700 and S900 SoC variants, such as serial number or id. + +patternProperties: + "^soc(@[0-9a-f]+)?$": + type: object + properties: + compatible: + items: + - enum: + - actions,s500-soc + - actions,s700-soc + - actions,s900-soc + - const: simple-bus + + "#address-cells": + enum: [1, 2] + + "#size-cells": + enum: [1, 2] + + ranges: true + + actions,serial-number-addrs: + description: | + Contains the physical addresses in DDR memory where the two parts + of the serial number (low & high) can be read from. + This is currently supported only on the S500 SoC variant. + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 2 + maxItems: 2 + + required: + - compatible + + additionalProperties: + type: object + +additionalProperties: true + +examples: + - | + / { + compatible = "roseapplepi,roseapplepi", "actions,s500"; + model = "Roseapple Pi"; + #address-cells = <1>; + #size-cells = <1>; + + soc { + compatible = "actions,s500-soc", "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + actions,serial-number-addrs = <0x800>, /* S/N Low */ + <0x804>; /* S/N High */ + }; + }; + +...
Signature · 1 line
2.31.0
Rob Herring
maintainerRe: [PATCH 1/4] dt-bindings: soc: actions: Add Actions Semi Owl socinfo binding
Quoted 21 lines · Cristian Ciocaltea
Add devicetree binding for the Actions Semi Owl SoCs info module.
Signed-off-by Cristian Ciocaltea <[email protected]>--- .../bindings/soc/actions/owl-socinfo.yaml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/actions/owl-socinfo.yamlDocumentation/devicetree/bindings/soc/actions/owl-socinfo.yaml new file +7
-0@@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/actions/owl-socinfo.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Actions Semi Owl SoC info module
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml new file +10
-0+ +maintainers: + - Cristian Ciocaltea <[email protected]> + +description: | + Actions Semi Owl SoC info module provides access to various information + about the S500, S700 and S900 SoC variants, such as serial number or id. + +patternProperties: + "^soc(@[0-9a-f]+)?$":
Make this a $nodename property.
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml line 19
Quoted 2 lines
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml new file +2
-0+ type: object + properties:
And move this up to top-level.
You need a custom 'select' entry to exclude 'simple-bus'.
Quoted 14 lines
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml new file +14
-0+ compatible: + items: + - enum: + - actions,s500-soc + - actions,s700-soc + - actions,s900-soc + - const: simple-bus + + "#address-cells": + enum: [1, 2] + + "#size-cells": + enum: [1, 2] +
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml line 43
Quoted 10 lines
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml new file +10
-0+ ranges: true + + actions,serial-number-addrs: + description: | + Contains the physical addresses in DDR memory where the two parts + of the serial number (low & high) can be read from. + This is currently supported only on the S500 SoC variant. + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 2 + maxItems: 2
Humm, it doesn't really seem you have an actual device or bus here, but are abusing DT to create your socinfo device.
As the only property is data in main memory, you should do a compatible for that memory region and put it under reserved-memory. You need that anyway to prevent the kernel from using the memory, right?
Rob
Re: [PATCH 1/4] dt-bindings: soc: actions: Add Actions Semi Owl socinfo binding
Quoted 6 lines · Rob Herring
Quoted 5 lines · Cristian Ciocaltea
Add devicetree binding for the Actions Semi Owl SoCs info module.
Signed-off-by Cristian Ciocaltea <[email protected]>--- .../bindings/soc/actions/owl-socinfo.yaml | 71 +++++++++++++++++++
[...]
Quoted 6 lines
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml line 17
Quoted 3 lines
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml new file +3
-0+ +patternProperties: + "^soc(@[0-9a-f]+)?$":Make this a $nodename property.
Quoted 6 lines
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml line 19
Quoted 2 lines
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml new file +2
-0+ type: object + properties:And move this up to top-level.
You need a custom 'select' entry to exclude 'simple-bus'.
Indeed, I missed it..
Quoted 28 lines
Quoted 14 lines
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml new file +14
-0+ compatible: + items: + - enum: + - actions,s500-soc + - actions,s700-soc + - actions,s900-soc + - const: simple-bus + + "#address-cells": + enum: [1, 2] + + "#size-cells": + enum: [1, 2] +Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml line 43
Quoted 10 lines
Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml new file +10
-0+ ranges: true + + actions,serial-number-addrs: + description: | + Contains the physical addresses in DDR memory where the two parts + of the serial number (low & high) can be read from. + This is currently supported only on the S500 SoC variant. + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 2 + maxItems: 2Humm, it doesn't really seem you have an actual device or bus here, but are abusing DT to create your socinfo device.
Quoted 3 lines
As the only property is data in main memory, you should do a compatible for that memory region and put it under reserved-memory. You need that anyway to prevent the kernel from using the memory, right?
Right, this region should be exposed as reserved-memory. Will handle it in the next revision.
Quoted 1 line
Rob
Thanks for the review,
Cristi
PATCH 2/4 soc: actions: Add Actions Semi Owl socinfo driver
In reply to Cristian CiocalteaThe driver provides information about the Action Semi Owl family of SoCs (S500, S700 and S900) to user space via sysfs: machine, family, soc_id, serial_number.
Note the serial number is currently provided only for the S500 SoC variant.
--- drivers/soc/actions/Kconfig | 8 ++ drivers/soc/actions/Makefile | 1 + drivers/soc/actions/owl-socinfo.c | 133 ++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 drivers/soc/actions/owl-socinfo.c
drivers/soc/actions/Kconfig +8 -0
@@ -14,4 +14,12 @@ config OWL_PM_DOMAINS power-gating on Actions Semiconductor S500, S700 and S900 SoCs. If unsure, say 'n'. +config OWL_SOCINFO + bool "Actions Semi Owl SoC info driver" + default ARCH_ACTIONS + select SOC_BUS + help + Say 'y' here to support the Action Semiconductor Owl socinfo + driver, providing information about the SoC to user space. + endif
drivers/soc/actions/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_OWL_PM_DOMAINS_HELPER) += owl-sps-helper.o obj-$(CONFIG_OWL_PM_DOMAINS) += owl-sps.o +obj-$(CONFIG_OWL_SOCINFO) += owl-socinfo.o
drivers/soc/actions/owl-socinfo.c new file +133 -0
133 lines not on this page · raw message
Signature · 1 line
2.31.0
PATCH 3/4 arm: dts: owl-s500: Add socinfo support
In reply to Cristian CiocalteaUpdate soc node compatible property to enable support for the Actions Semi Owl soc info driver.
Additionally provide memory addresses where the serial number parts are accessible.
--- arch/arm/boot/dts/owl-s500.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/boot/dts/owl-s500.dtsi +3 -1
@@ -80,10 +80,12 @@ losc: losc { }; soc { - compatible = "simple-bus"; + compatible = "actions,s500-soc", "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges; + actions,serial-number-addrs = <0x800>, /* S/N Low */ + <0x804>; /* S/N High */ scu: scu@b0020000 { compatible = "arm,cortex-a9-scu";
Signature · 1 line
2.31.0
PATCH 4/4 MAINTAINERS: Add entry for Actions Semi Owl socinfo binding
In reply to Cristian CiocalteaAdd an entry for the Actions Semi Owl socinfo binding.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -1533,6 +1533,7 @@ F: Documentation/devicetree/bindings/mmc/owl-mmc.yaml F: Documentation/devicetree/bindings/net/actions,owl-emac.yaml F: Documentation/devicetree/bindings/pinctrl/actions,* F: Documentation/devicetree/bindings/power/actions,owl-sps.txt +F: Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml F: Documentation/devicetree/bindings/timer/actions,owl-timer.txt F: arch/arm/boot/dts/owl-* F: arch/arm/mach-actions/
Signature · 1 line
2.31.0