* [PATCH v2 0/7] dt-bindings: mfd: syscon: Document more compatibles and require simpe-mfd description
@ 2024-06-16 13:19 Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 1/7] dt-bindings: mfd: syscon: Drop hwlocks Krzysztof Kozlowski
` (6 more replies)
0 siblings, 7 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-16 13:19 UTC (permalink / raw)
To: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: Jiaxun Yang, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Krzysztof Kozlowski
Hi,
Dependency
==========
Rebased on Lee's MFD tree, because dependency is there already:
https://lore.kernel.org/all/171828959006.2643902.8308227314531523435.b4-ty@kernel.org/
Merging
=======
Preferrably everything via MFD tree (file/context dependencies).
Changes in v2:
===================
- Add acks
- lgm-syscon: add ranges to binding and example
- syscon.yaml: add big select with all compatibles for older dtschema
- Link to v1: https://lore.kernel.org/r/20240519-dt-bindings-mfd-syscon-split-v1-0-aaf996e2313a@linaro.org
Description/problem
===================
Simple syscon nodes can be documented in common syscon.yaml, however
devices with simple-mfd compatible, thus some children, should have
their own schema listing these children. Such listing makes the binding
specific, allows better validation (so the incorrect child would not
appear in the simple-mfd node) and actually enforces repeated rule for
simple-mfd devices:
"simple-mfd" is only for simple devices, where the children do not
depend on the parent.
Currently the syscon+simple-mfd binding is quite broad and allows
any child or property, thus above rule cannot be enforced.
Solution
========
1. Split the syscon.yaml binding into common syscon properties, used
potentially by many bindings, and only simple syscon devices (NO
simple-mfd!).
2. Move some known simple-mfd bindings from syscon.yaml to dedicated
files.
This patchset might introduce new dtbs_check warnings for devices having
simple-mfd and being part of syscon.yaml previously. I fixed some of
them, but probably not all.
Best regards,
Krzysztof
To: Lee Jones <lee@kernel.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Lars Povlsen <lars.povlsen@microchip.com>
To: Steen Hegelund <Steen.Hegelund@microchip.com>
To: Daniel Machon <daniel.machon@microchip.com>
To: UNGLinuxDriver@microchip.com
To: Nishanth Menon <nm@ti.com>
To: Matthias Brugger <matthias.bgg@gmail.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
---
Krzysztof Kozlowski (7):
dt-bindings: mfd: syscon: Drop hwlocks
dt-bindings: soc: sprd: sc9863a-glbregs: Document SC9863A syscon
dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema
dt-bindings: soc: microchip: sparx5-cpu-syscon: Move to dedicated schema
dt-bindings: soc: ti: am654-serdes-ctrl: Move to dedicated schema
dt-bindings: mfd: syscon: Split and enforce documenting MFD children
dt-bindings: mfd: syscon: Add APM poweroff mailbox
.../devicetree/bindings/mfd/syscon-common.yaml | 72 +++++
Documentation/devicetree/bindings/mfd/syscon.yaml | 306 ++++++++++++---------
.../bindings/soc/intel/intel,lgm-syscon.yaml | 56 ++++
.../soc/microchip/microchip,sparx5-cpu-syscon.yaml | 49 ++++
.../bindings/soc/sprd/sprd,sc9863a-glbregs.yaml | 55 ++++
.../bindings/soc/ti/ti,am654-serdes-ctrl.yaml | 42 +++
6 files changed, 457 insertions(+), 123 deletions(-)
---
base-commit: fe6ba540b2ce777eb4f59991c3ef20ad8a319a1a
change-id: 20240517-dt-bindings-mfd-syscon-split-37e23996523d
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 1/7] dt-bindings: mfd: syscon: Drop hwlocks
2024-06-16 13:19 [PATCH v2 0/7] dt-bindings: mfd: syscon: Document more compatibles and require simpe-mfd description Krzysztof Kozlowski
@ 2024-06-16 13:19 ` Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 2/7] dt-bindings: soc: sprd: sc9863a-glbregs: Document SC9863A syscon Krzysztof Kozlowski
` (5 subsequent siblings)
6 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-16 13:19 UTC (permalink / raw)
To: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: Jiaxun Yang, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Krzysztof Kozlowski
Apparently there is no in-tree DTS syscon node having hwlocks, so drop
the property to simplify the binding.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/mfd/syscon.yaml | 5 -----
1 file changed, 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index 79830dd51ac3..af442767aa96 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -142,11 +142,6 @@ properties:
resets:
maxItems: 1
- hwlocks:
- maxItems: 1
- description:
- Reference to a phandle of a hardware spinlock provider node.
-
required:
- compatible
- reg
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 2/7] dt-bindings: soc: sprd: sc9863a-glbregs: Document SC9863A syscon
2024-06-16 13:19 [PATCH v2 0/7] dt-bindings: mfd: syscon: Document more compatibles and require simpe-mfd description Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 1/7] dt-bindings: mfd: syscon: Drop hwlocks Krzysztof Kozlowski
@ 2024-06-16 13:19 ` Krzysztof Kozlowski
2024-06-18 8:52 ` Baolin Wang
2024-06-16 13:19 ` [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema Krzysztof Kozlowski
` (4 subsequent siblings)
6 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-16 13:19 UTC (permalink / raw)
To: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: Jiaxun Yang, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Krzysztof Kozlowski
Document sprd,sc9863a-glbregs compatible already used in DTS and other
bindings example.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
.../bindings/soc/sprd/sprd,sc9863a-glbregs.yaml | 55 ++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/Documentation/devicetree/bindings/soc/sprd/sprd,sc9863a-glbregs.yaml b/Documentation/devicetree/bindings/soc/sprd/sprd,sc9863a-glbregs.yaml
new file mode 100644
index 000000000000..49add564e5e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/sprd/sprd,sc9863a-glbregs.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/sprd/sprd,sc9863a-glbregs.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SC9863A Syscon
+
+maintainers:
+ - Orson Zhai <orsonzhai@gmail.com>
+ - Baolin Wang <baolin.wang7@gmail.com>
+ - Chunyan Zhang <zhang.lyra@gmail.com>
+
+properties:
+ compatible:
+ items:
+ - const: sprd,sc9863a-glbregs
+ - const: syscon
+ - const: simple-mfd
+
+ reg:
+ maxItems: 1
+
+ ranges: true
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+patternProperties:
+ "@[0-9a-f]+$":
+ $ref: /schemas/clock/sprd,sc9863a-clk.yaml
+ description: Clock controllers
+
+additionalProperties: false
+
+examples:
+ - |
+ syscon@20e00000 {
+ compatible = "sprd,sc9863a-glbregs", "syscon", "simple-mfd";
+ reg = <0x20e00000 0x4000>;
+ ranges = <0 0x20e00000 0x4000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ apahb_gate: apahb-gate@0 {
+ compatible = "sprd,sc9863a-apahb-gate";
+ reg = <0x0 0x1020>;
+ #clock-cells = <1>;
+ };
+ };
+
+...
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema
2024-06-16 13:19 [PATCH v2 0/7] dt-bindings: mfd: syscon: Document more compatibles and require simpe-mfd description Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 1/7] dt-bindings: mfd: syscon: Drop hwlocks Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 2/7] dt-bindings: soc: sprd: sc9863a-glbregs: Document SC9863A syscon Krzysztof Kozlowski
@ 2024-06-16 13:19 ` Krzysztof Kozlowski
2024-06-17 16:46 ` Conor Dooley
` (2 more replies)
2024-06-16 13:19 ` [PATCH v2 4/7] dt-bindings: soc: microchip: sparx5-cpu-syscon: " Krzysztof Kozlowski
` (3 subsequent siblings)
6 siblings, 3 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-16 13:19 UTC (permalink / raw)
To: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: Jiaxun Yang, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Krzysztof Kozlowski
intel,lgm-syscon is not a simple syscon device - it has children - thus
it should be fully documented in its own binding.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Context might depend on patch in Lee's MFD tree:
https://lore.kernel.org/all/171828959006.2643902.8308227314531523435.b4-ty@kernel.org/
and also further patches here depend on this one.
---
Documentation/devicetree/bindings/mfd/syscon.yaml | 1 -
.../bindings/soc/intel/intel,lgm-syscon.yaml | 56 ++++++++++++++++++++++
2 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index af442767aa96..b9bf5bc05e92 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -77,7 +77,6 @@ properties:
- hisilicon,pcie-sas-subctrl
- hisilicon,peri-subctrl
- hpe,gxp-sysreg
- - intel,lgm-syscon
- loongson,ls1b-syscon
- loongson,ls1c-syscon
- lsi,axxia-syscon
diff --git a/Documentation/devicetree/bindings/soc/intel/intel,lgm-syscon.yaml b/Documentation/devicetree/bindings/soc/intel/intel,lgm-syscon.yaml
new file mode 100644
index 000000000000..0a73b7616a60
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/intel/intel,lgm-syscon.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/intel/intel,lgm-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intel Lightning Mountain(LGM) Syscon
+
+maintainers:
+ - Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
+
+properties:
+ compatible:
+ items:
+ - const: intel,lgm-syscon
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ ranges: true
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+patternProperties:
+ "^emmc-phy@[0-9a-f]+$":
+ $ref: /schemas/phy/intel,lgm-emmc-phy.yaml#
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ chiptop@e0200000 {
+ compatible = "intel,lgm-syscon", "syscon";
+ reg = <0xe0200000 0x100>;
+ ranges = <0x0 0xe0200000 0x100>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ emmc-phy@a8 {
+ compatible = "intel,lgm-emmc-phy";
+ reg = <0x00a8 0x10>;
+ clocks = <&emmc>;
+ #phy-cells = <0>;
+ };
+ };
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 4/7] dt-bindings: soc: microchip: sparx5-cpu-syscon: Move to dedicated schema
2024-06-16 13:19 [PATCH v2 0/7] dt-bindings: mfd: syscon: Document more compatibles and require simpe-mfd description Krzysztof Kozlowski
` (2 preceding siblings ...)
2024-06-16 13:19 ` [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema Krzysztof Kozlowski
@ 2024-06-16 13:19 ` Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 5/7] dt-bindings: soc: ti: am654-serdes-ctrl: " Krzysztof Kozlowski
` (2 subsequent siblings)
6 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-16 13:19 UTC (permalink / raw)
To: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: Jiaxun Yang, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Krzysztof Kozlowski
microchip,sparx5-cpu-syscon is not a simple syscon device - it has
children and implements simple-mfd compatible - thus it should be fully
documented in its own binding.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Context might depend on patch in Lee's MFD tree:
https://lore.kernel.org/all/171828959006.2643902.8308227314531523435.b4-ty@kernel.org/
and also further patches here depend on this one.
---
Documentation/devicetree/bindings/mfd/syscon.yaml | 1 -
.../soc/microchip/microchip,sparx5-cpu-syscon.yaml | 49 ++++++++++++++++++++++
2 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index b9bf5bc05e92..abd3debe5faf 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -95,7 +95,6 @@ properties:
- microchip,lan966x-cpu-syscon
- microchip,sam9x60-sfr
- microchip,sama7g5-ddr3phy
- - microchip,sparx5-cpu-syscon
- mscc,ocelot-cpu-syscon
- mstar,msc313-pmsleep
- nuvoton,ma35d1-sys
diff --git a/Documentation/devicetree/bindings/soc/microchip/microchip,sparx5-cpu-syscon.yaml b/Documentation/devicetree/bindings/soc/microchip/microchip,sparx5-cpu-syscon.yaml
new file mode 100644
index 000000000000..1f0b542d2296
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/microchip/microchip,sparx5-cpu-syscon.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/microchip/microchip,sparx5-cpu-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip Sparx5 CPU Syscon
+
+maintainers:
+ - Lars Povlsen <lars.povlsen@microchip.com>
+
+properties:
+ compatible:
+ items:
+ - const: microchip,sparx5-cpu-syscon
+ - const: syscon
+ - const: simple-mfd
+
+ reg:
+ maxItems: 1
+
+ mux-controller:
+ $ref: /schemas/mux/reg-mux.yaml#
+
+required:
+ - compatible
+ - reg
+ - mux-controller
+
+additionalProperties: false
+
+examples:
+ - |
+ soc {
+ #address-cells = <2>;
+ #size-cells = <1>;
+
+ syscon@600000000 {
+ compatible = "microchip,sparx5-cpu-syscon", "syscon",
+ "simple-mfd";
+ reg = <0x6 0x00000000 0xd0>;
+
+ mux: mux-controller {
+ compatible = "mmio-mux";
+ #mux-control-cells = <1>;
+ mux-reg-masks = <0x88 0xf0>;
+ };
+ };
+ };
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 5/7] dt-bindings: soc: ti: am654-serdes-ctrl: Move to dedicated schema
2024-06-16 13:19 [PATCH v2 0/7] dt-bindings: mfd: syscon: Document more compatibles and require simpe-mfd description Krzysztof Kozlowski
` (3 preceding siblings ...)
2024-06-16 13:19 ` [PATCH v2 4/7] dt-bindings: soc: microchip: sparx5-cpu-syscon: " Krzysztof Kozlowski
@ 2024-06-16 13:19 ` Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 7/7] dt-bindings: mfd: syscon: Add APM poweroff mailbox Krzysztof Kozlowski
6 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-16 13:19 UTC (permalink / raw)
To: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: Jiaxun Yang, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Krzysztof Kozlowski
ti,am654-serdes-ctrl is not a simple syscon device - it has children -
thus it should be fully documented in its own binding.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Context might depend on patch in Lee's MFD tree:
https://lore.kernel.org/all/171828959006.2643902.8308227314531523435.b4-ty@kernel.org/
and also further patches here depend on this one.
---
Documentation/devicetree/bindings/mfd/syscon.yaml | 1 -
.../bindings/soc/ti/ti,am654-serdes-ctrl.yaml | 42 ++++++++++++++++++++++
2 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index abd3debe5faf..d6fa58c9e4de 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -117,7 +117,6 @@ properties:
- ti,am625-dss-oldi-io-ctrl
- ti,am62p-cpsw-mac-efuse
- ti,am654-dss-oldi-io-ctrl
- - ti,am654-serdes-ctrl
- ti,j784s4-pcie-ctrl
- ti,keystone-pllctrl
diff --git a/Documentation/devicetree/bindings/soc/ti/ti,am654-serdes-ctrl.yaml b/Documentation/devicetree/bindings/soc/ti/ti,am654-serdes-ctrl.yaml
new file mode 100644
index 000000000000..a10a3b89ae05
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/ti/ti,am654-serdes-ctrl.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/ti/ti,am654-serdes-ctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments AM654 Serdes Control Syscon
+
+maintainers:
+ - Nishanth Menon <nm@ti.com>
+
+properties:
+ compatible:
+ items:
+ - const: ti,am654-serdes-ctrl
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ mux-controller:
+ $ref: /schemas/mux/reg-mux.yaml#
+
+required:
+ - compatible
+ - reg
+ - mux-controller
+
+additionalProperties: false
+
+examples:
+ - |
+ clock@4080 {
+ compatible = "ti,am654-serdes-ctrl", "syscon";
+ reg = <0x4080 0x4>;
+
+ mux-controller {
+ compatible = "mmio-mux";
+ #mux-control-cells = <1>;
+ mux-reg-masks = <0x0 0x3>; /* lane select */
+ };
+ };
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children
2024-06-16 13:19 [PATCH v2 0/7] dt-bindings: mfd: syscon: Document more compatibles and require simpe-mfd description Krzysztof Kozlowski
` (4 preceding siblings ...)
2024-06-16 13:19 ` [PATCH v2 5/7] dt-bindings: soc: ti: am654-serdes-ctrl: " Krzysztof Kozlowski
@ 2024-06-16 13:19 ` Krzysztof Kozlowski
2024-06-17 16:44 ` Conor Dooley
2024-06-24 20:28 ` Rob Herring (Arm)
2024-06-16 13:19 ` [PATCH v2 7/7] dt-bindings: mfd: syscon: Add APM poweroff mailbox Krzysztof Kozlowski
6 siblings, 2 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-16 13:19 UTC (permalink / raw)
To: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: Jiaxun Yang, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Krzysztof Kozlowski
Simple syscon nodes can be documented in common syscon.yaml, however
devices with simple-mfd compatible, thus with some children, should have
their own schema listing these children. Such listing makes the binding
specific, allows better validation (so the incorrect child would not
appear in the simple-mfd node) and actually enforces repeated rule for
simple-mfd devices:
"simple-mfd" is only for simple devices, where the children do not
depend on the parent.
Currently the syscon+simple-mfd binding is quite broad and allows
any child or property, thus above rule cannot be enforced.
Split the syscon.yaml binding into:
1. Common syscon properties, used potentially by many bindings.
2. Simple syscon devices (NO simple-mfd!).
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Depends on:
1. Patch in MFD: https://lore.kernel.org/all/171828959006.2643902.8308227314531523435.b4-ty@kernel.org/
2. Previous patches in the series.
---
.../devicetree/bindings/mfd/syscon-common.yaml | 72 +++++
Documentation/devicetree/bindings/mfd/syscon.yaml | 294 +++++++++++++--------
2 files changed, 251 insertions(+), 115 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/syscon-common.yaml b/Documentation/devicetree/bindings/mfd/syscon-common.yaml
new file mode 100644
index 000000000000..c3ff3a7afce3
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/syscon-common.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/syscon-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: System Controller Registers R/W Common Properties
+
+description: |
+ System controller node represents a register region containing a set
+ of miscellaneous registers. The registers are not cohesive enough to
+ represent as any specific type of device. The typical use-case is
+ for some other node's driver, or platform-specific code, to acquire
+ a reference to the syscon node (e.g. by phandle, node path, or
+ search using a specific compatible value), interrogate the node (or
+ associated OS driver) to determine the location of the registers,
+ and access the registers directly.
+
+maintainers:
+ - Lee Jones <lee@kernel.org>
+
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - syscon
+
+ required:
+ - compatible
+
+properties:
+ compatible:
+ contains:
+ const: syscon
+ minItems: 2
+ maxItems: 5 # Should be enough
+
+ reg:
+ maxItems: 1
+
+ reg-io-width:
+ description: |
+ The size (in bytes) of the IO accesses that should be performed
+ on the device.
+ enum: [1, 2, 4, 8]
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: simple-mfd
+ then:
+ properties:
+ compatible:
+ minItems: 3
+ maxItems: 5
+
+additionalProperties: true
+
+examples:
+ - |
+ syscon: syscon@1c00000 {
+ compatible = "allwinner,sun8i-h3-system-controller", "syscon";
+ reg = <0x01c00000 0x1000>;
+ };
+...
diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index d6fa58c9e4de..d4e9533cf3fe 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/mfd/syscon.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: System Controller Registers R/W
+title: System Controller Devices
description: |
System controller node represents a register region containing a set
@@ -19,123 +19,196 @@ description: |
maintainers:
- Lee Jones <lee@kernel.org>
+# Need a select with all compatibles listed for compatibility with older
+# dtschema (<2024.02), so this will not be selected for other schemas having
+# syscon fallback.
select:
properties:
compatible:
contains:
enum:
- - syscon
-
+ - al,alpine-sysfabric-servic
+ - allwinner,sun8i-a83t-system-controller
+ - allwinner,sun8i-h3-system-controller
+ - allwinner,sun8i-v3s-system-controller
+ - allwinner,sun50i-a64-system-controller
+ - altr,l3regs
+ - altr,sdr-ctl
+ - amd,pensando-elba-syscon
+ - amlogic,meson-mx-assist
+ - amlogic,meson-mx-bootrom
+ - amlogic,meson8-analog-top
+ - amlogic,meson8b-analog-top
+ - amlogic,meson8-pmu
+ - amlogic,meson8b-pmu
+ - apm,xgene-csw
+ - apm,xgene-efuse
+ - apm,xgene-mcb
+ - apm,xgene-rb
+ - apm,xgene-scu
+ - atmel,sama5d2-sfrbu
+ - atmel,sama5d3-nfc-io
+ - atmel,sama5d3-sfrbu
+ - atmel,sama5d4-sfrbu
+ - axis,artpec6-syscon
+ - brcm,cru-clkset
+ - brcm,sr-cdru
+ - brcm,sr-mhb
+ - cirrus,ep7209-syscon1
+ - cirrus,ep7209-syscon2
+ - cirrus,ep7209-syscon3
+ - cnxt,cx92755-uc
+ - freecom,fsg-cs2-system-controller
+ - fsl,imx93-aonmix-ns-syscfg
+ - fsl,imx93-wakeupmix-syscfg
+ - fsl,ls1088a-reset
+ - fsl,vf610-anatop
+ - fsl,vf610-mscm-cpucfg
+ - hisilicon,dsa-subctrl
+ - hisilicon,hi6220-sramctrl
+ - hisilicon,hip04-ppe
+ - hisilicon,pcie-sas-subctrl
+ - hisilicon,peri-subctrl
+ - hpe,gxp-sysreg
+ - loongson,ls1b-syscon
+ - loongson,ls1c-syscon
+ - lsi,axxia-syscon
+ - marvell,armada-3700-cpu-misc
+ - marvell,armada-3700-nb-pm
+ - marvell,armada-3700-avs
+ - marvell,armada-3700-usb2-host-misc
+ - marvell,dove-global-config
+ - mediatek,mt2701-pctl-a-syscfg
+ - mediatek,mt2712-pctl-a-syscfg
+ - mediatek,mt6397-pctl-pmic-syscfg
+ - mediatek,mt8135-pctl-a-syscfg
+ - mediatek,mt8135-pctl-b-syscfg
+ - mediatek,mt8173-pctl-a-syscfg
+ - mediatek,mt8365-syscfg
+ - microchip,lan966x-cpu-syscon
+ - microchip,sam9x60-sfr
+ - microchip,sama7g5-ddr3phy
+ - mscc,ocelot-cpu-syscon
+ - mstar,msc313-pmsleep
+ - nuvoton,ma35d1-sys
+ - nuvoton,wpcm450-shm
+ - rockchip,px30-qos
+ - rockchip,rk3036-qos
+ - rockchip,rk3066-qos
+ - rockchip,rk3128-qos
+ - rockchip,rk3228-qos
+ - rockchip,rk3288-qos
+ - rockchip,rk3368-qos
+ - rockchip,rk3399-qos
+ - rockchip,rk3568-qos
+ - rockchip,rk3588-qos
+ - rockchip,rv1126-qos
+ - st,spear1340-misc
+ - stericsson,nomadik-pmu
+ - starfive,jh7100-sysmain
+ - ti,am62-usb-phy-ctrl
+ - ti,am625-dss-oldi-io-ctrl
+ - ti,am62p-cpsw-mac-efuse
+ - ti,am654-dss-oldi-io-ctrl
+ - ti,j784s4-pcie-ctrl
+ - ti,keystone-pllctrl
required:
- compatible
properties:
compatible:
- anyOf:
- - items:
- - enum:
- - al,alpine-sysfabric-service
- - allwinner,sun8i-a83t-system-controller
- - allwinner,sun8i-h3-system-controller
- - allwinner,sun8i-v3s-system-controller
- - allwinner,sun50i-a64-system-controller
- - altr,l3regs
- - altr,sdr-ctl
- - amd,pensando-elba-syscon
- - amlogic,meson-mx-assist
- - amlogic,meson-mx-bootrom
- - amlogic,meson8-analog-top
- - amlogic,meson8b-analog-top
- - amlogic,meson8-pmu
- - amlogic,meson8b-pmu
- - apm,xgene-csw
- - apm,xgene-efuse
- - apm,xgene-mcb
- - apm,xgene-rb
- - apm,xgene-scu
- - atmel,sama5d2-sfrbu
- - atmel,sama5d3-nfc-io
- - atmel,sama5d3-sfrbu
- - atmel,sama5d4-sfrbu
- - axis,artpec6-syscon
- - brcm,cru-clkset
- - brcm,sr-cdru
- - brcm,sr-mhb
- - cirrus,ep7209-syscon1
- - cirrus,ep7209-syscon2
- - cirrus,ep7209-syscon3
- - cnxt,cx92755-uc
- - freecom,fsg-cs2-system-controller
- - fsl,imx93-aonmix-ns-syscfg
- - fsl,imx93-wakeupmix-syscfg
- - fsl,ls1088a-reset
- - fsl,vf610-anatop
- - fsl,vf610-mscm-cpucfg
- - hisilicon,dsa-subctrl
- - hisilicon,hi6220-sramctrl
- - hisilicon,hip04-ppe
- - hisilicon,pcie-sas-subctrl
- - hisilicon,peri-subctrl
- - hpe,gxp-sysreg
- - loongson,ls1b-syscon
- - loongson,ls1c-syscon
- - lsi,axxia-syscon
- - marvell,armada-3700-cpu-misc
- - marvell,armada-3700-nb-pm
- - marvell,armada-3700-avs
- - marvell,armada-3700-usb2-host-misc
- - marvell,dove-global-config
- - mediatek,mt2701-pctl-a-syscfg
- - mediatek,mt2712-pctl-a-syscfg
- - mediatek,mt6397-pctl-pmic-syscfg
- - mediatek,mt8135-pctl-a-syscfg
- - mediatek,mt8135-pctl-b-syscfg
- - mediatek,mt8173-pctl-a-syscfg
- - mediatek,mt8365-syscfg
- - microchip,lan966x-cpu-syscon
- - microchip,sam9x60-sfr
- - microchip,sama7g5-ddr3phy
- - mscc,ocelot-cpu-syscon
- - mstar,msc313-pmsleep
- - nuvoton,ma35d1-sys
- - nuvoton,wpcm450-shm
- - rockchip,px30-qos
- - rockchip,rk3036-qos
- - rockchip,rk3066-qos
- - rockchip,rk3128-qos
- - rockchip,rk3228-qos
- - rockchip,rk3288-qos
- - rockchip,rk3368-qos
- - rockchip,rk3399-qos
- - rockchip,rk3568-qos
- - rockchip,rk3588-qos
- - rockchip,rv1126-qos
- - st,spear1340-misc
- - stericsson,nomadik-pmu
- - starfive,jh7100-sysmain
- - ti,am62-usb-phy-ctrl
- - ti,am625-dss-oldi-io-ctrl
- - ti,am62p-cpsw-mac-efuse
- - ti,am654-dss-oldi-io-ctrl
- - ti,j784s4-pcie-ctrl
- - ti,keystone-pllctrl
-
- - const: syscon
-
- - contains:
- const: syscon
- minItems: 2
- maxItems: 5 # Should be enough
+ items:
+ - enum:
+ - al,alpine-sysfabric-service
+ - allwinner,sun8i-a83t-system-controller
+ - allwinner,sun8i-h3-system-controller
+ - allwinner,sun8i-v3s-system-controller
+ - allwinner,sun50i-a64-system-controller
+ - altr,l3regs
+ - altr,sdr-ctl
+ - amd,pensando-elba-syscon
+ - amlogic,meson-mx-assist
+ - amlogic,meson-mx-bootrom
+ - amlogic,meson8-analog-top
+ - amlogic,meson8b-analog-top
+ - amlogic,meson8-pmu
+ - amlogic,meson8b-pmu
+ - apm,xgene-csw
+ - apm,xgene-efuse
+ - apm,xgene-mcb
+ - apm,xgene-rb
+ - apm,xgene-scu
+ - atmel,sama5d2-sfrbu
+ - atmel,sama5d3-nfc-io
+ - atmel,sama5d3-sfrbu
+ - atmel,sama5d4-sfrbu
+ - axis,artpec6-syscon
+ - brcm,cru-clkset
+ - brcm,sr-cdru
+ - brcm,sr-mhb
+ - cirrus,ep7209-syscon1
+ - cirrus,ep7209-syscon2
+ - cirrus,ep7209-syscon3
+ - cnxt,cx92755-uc
+ - freecom,fsg-cs2-system-controller
+ - fsl,imx93-aonmix-ns-syscfg
+ - fsl,imx93-wakeupmix-syscfg
+ - fsl,ls1088a-reset
+ - fsl,vf610-anatop
+ - fsl,vf610-mscm-cpucfg
+ - hisilicon,dsa-subctrl
+ - hisilicon,hi6220-sramctrl
+ - hisilicon,hip04-ppe
+ - hisilicon,pcie-sas-subctrl
+ - hisilicon,peri-subctrl
+ - hpe,gxp-sysreg
+ - loongson,ls1b-syscon
+ - loongson,ls1c-syscon
+ - lsi,axxia-syscon
+ - marvell,armada-3700-cpu-misc
+ - marvell,armada-3700-nb-pm
+ - marvell,armada-3700-avs
+ - marvell,armada-3700-usb2-host-misc
+ - marvell,dove-global-config
+ - mediatek,mt2701-pctl-a-syscfg
+ - mediatek,mt2712-pctl-a-syscfg
+ - mediatek,mt6397-pctl-pmic-syscfg
+ - mediatek,mt8135-pctl-a-syscfg
+ - mediatek,mt8135-pctl-b-syscfg
+ - mediatek,mt8173-pctl-a-syscfg
+ - mediatek,mt8365-syscfg
+ - microchip,lan966x-cpu-syscon
+ - microchip,sam9x60-sfr
+ - microchip,sama7g5-ddr3phy
+ - mscc,ocelot-cpu-syscon
+ - mstar,msc313-pmsleep
+ - nuvoton,ma35d1-sys
+ - nuvoton,wpcm450-shm
+ - rockchip,px30-qos
+ - rockchip,rk3036-qos
+ - rockchip,rk3066-qos
+ - rockchip,rk3128-qos
+ - rockchip,rk3228-qos
+ - rockchip,rk3288-qos
+ - rockchip,rk3368-qos
+ - rockchip,rk3399-qos
+ - rockchip,rk3568-qos
+ - rockchip,rk3588-qos
+ - rockchip,rv1126-qos
+ - st,spear1340-misc
+ - stericsson,nomadik-pmu
+ - starfive,jh7100-sysmain
+ - ti,am62-usb-phy-ctrl
+ - ti,am625-dss-oldi-io-ctrl
+ - ti,am62p-cpsw-mac-efuse
+ - ti,am654-dss-oldi-io-ctrl
+ - ti,j784s4-pcie-ctrl
+ - ti,keystone-pllctrl
+ - const: syscon
reg:
maxItems: 1
- reg-io-width:
- description: |
- The size (in bytes) of the IO accesses that should be performed
- on the device.
- enum: [1, 2, 4, 8]
-
resets:
maxItems: 1
@@ -144,18 +217,9 @@ required:
- reg
allOf:
- - if:
- properties:
- compatible:
- contains:
- const: simple-mfd
- then:
- properties:
- compatible:
- minItems: 3
- maxItems: 5
+ - $ref: syscon-common.yaml#
-additionalProperties: true
+unevaluatedProperties: false
examples:
- |
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 7/7] dt-bindings: mfd: syscon: Add APM poweroff mailbox
2024-06-16 13:19 [PATCH v2 0/7] dt-bindings: mfd: syscon: Document more compatibles and require simpe-mfd description Krzysztof Kozlowski
` (5 preceding siblings ...)
2024-06-16 13:19 ` [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children Krzysztof Kozlowski
@ 2024-06-16 13:19 ` Krzysztof Kozlowski
6 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-16 13:19 UTC (permalink / raw)
To: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: Jiaxun Yang, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Krzysztof Kozlowski
Add compatible for an already used syscon poweroff/mailbox block in APM.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/mfd/syscon.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index d4e9533cf3fe..70e3a4465b4f 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -41,6 +41,8 @@ select:
- amlogic,meson8b-analog-top
- amlogic,meson8-pmu
- amlogic,meson8b-pmu
+ - apm,merlin-poweroff-mailbox
+ - apm,mustang-poweroff-mailbox
- apm,xgene-csw
- apm,xgene-efuse
- apm,xgene-mcb
@@ -133,6 +135,8 @@ properties:
- amlogic,meson8b-analog-top
- amlogic,meson8-pmu
- amlogic,meson8b-pmu
+ - apm,merlin-poweroff-mailbox
+ - apm,mustang-poweroff-mailbox
- apm,xgene-csw
- apm,xgene-efuse
- apm,xgene-mcb
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children
2024-06-16 13:19 ` [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children Krzysztof Kozlowski
@ 2024-06-17 16:44 ` Conor Dooley
2024-06-17 16:46 ` Conor Dooley
2024-06-17 17:33 ` Krzysztof Kozlowski
2024-06-24 20:28 ` Rob Herring (Arm)
1 sibling, 2 replies; 19+ messages in thread
From: Conor Dooley @ 2024-06-17 16:44 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno, Jiaxun Yang, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
[-- Attachment #1: Type: text/plain, Size: 16105 bytes --]
On Sun, Jun 16, 2024 at 03:19:26PM +0200, Krzysztof Kozlowski wrote:
> Simple syscon nodes can be documented in common syscon.yaml, however
> devices with simple-mfd compatible, thus with some children, should have
> their own schema listing these children. Such listing makes the binding
> specific, allows better validation (so the incorrect child would not
> appear in the simple-mfd node) and actually enforces repeated rule for
> simple-mfd devices:
>
> "simple-mfd" is only for simple devices, where the children do not
> depend on the parent.
>
> Currently the syscon+simple-mfd binding is quite broad and allows
> any child or property, thus above rule cannot be enforced.
>
> Split the syscon.yaml binding into:
> 1. Common syscon properties, used potentially by many bindings.
> 2. Simple syscon devices (NO simple-mfd!).
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Depends on:
> 1. Patch in MFD: https://lore.kernel.org/all/171828959006.2643902.8308227314531523435.b4-ty@kernel.org/
> 2. Previous patches in the series.
> ---
> .../devicetree/bindings/mfd/syscon-common.yaml | 72 +++++
> Documentation/devicetree/bindings/mfd/syscon.yaml | 294 +++++++++++++--------
> 2 files changed, 251 insertions(+), 115 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/syscon-common.yaml b/Documentation/devicetree/bindings/mfd/syscon-common.yaml
> new file mode 100644
> index 000000000000..c3ff3a7afce3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/syscon-common.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/syscon-common.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: System Controller Registers R/W Common Properties
> +
> +description: |
This | can go, right?
> + System controller node represents a register region containing a set
> + of miscellaneous registers. The registers are not cohesive enough to
> + represent as any specific type of device. The typical use-case is
> + for some other node's driver, or platform-specific code, to acquire
> + a reference to the syscon node (e.g. by phandle, node path, or
> + search using a specific compatible value), interrogate the node (or
> + associated OS driver) to determine the location of the registers,
> + and access the registers directly.
> +
> +maintainers:
> + - Lee Jones <lee@kernel.org>
> +
> +select:
> + properties:
> + compatible:
> + contains:
> + enum:
And this can be const, given it's unlikely to grow?
> + - syscon
> +
> + required:
> + - compatible
> +
> +properties:
> + compatible:
> + contains:
> + const: syscon
> + minItems: 2
> + maxItems: 5 # Should be enough
> +
> + reg:
> + maxItems: 1
> +
> + reg-io-width:
> + description: |
Same with this one.
> + The size (in bytes) of the IO accesses that should be performed
> + on the device.
> + enum: [1, 2, 4, 8]
> +
> +required:
> + - compatible
> + - reg
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: simple-mfd
> + then:
> + properties:
> + compatible:
> + minItems: 3
> + maxItems: 5
> +
> +additionalProperties: true
> +
> +examples:
> + - |
> + syscon: syscon@1c00000 {
> + compatible = "allwinner,sun8i-h3-system-controller", "syscon";
> + reg = <0x01c00000 0x1000>;
> + };
> +...
> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
> index d6fa58c9e4de..d4e9533cf3fe 100644
> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml
> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
> @@ -4,7 +4,7 @@
> $id: http://devicetree.org/schemas/mfd/syscon.yaml#
> $schema: http://devicetree.org/meta-schemas/core.yaml#
>
> -title: System Controller Registers R/W
> +title: System Controller Devices
>
> description: |
> System controller node represents a register region containing a set
> @@ -19,123 +19,196 @@ description: |
> maintainers:
> - Lee Jones <lee@kernel.org>
>
> +# Need a select with all compatibles listed for compatibility with older
> +# dtschema (<2024.02), so this will not be selected for other schemas having
> +# syscon fallback.
> select:
> properties:
> compatible:
> contains:
> enum:
> - - syscon
Wow, this is noisy. Is it not possible to achieve something similar by
making the select check for not: compatible: contains: simple-mfd? Or
did I misunderstand the intention here?
Thanks,
Conor.
> -
> + - al,alpine-sysfabric-servic
> + - allwinner,sun8i-a83t-system-controller
> + - allwinner,sun8i-h3-system-controller
> + - allwinner,sun8i-v3s-system-controller
> + - allwinner,sun50i-a64-system-controller
> + - altr,l3regs
> + - altr,sdr-ctl
> + - amd,pensando-elba-syscon
> + - amlogic,meson-mx-assist
> + - amlogic,meson-mx-bootrom
> + - amlogic,meson8-analog-top
> + - amlogic,meson8b-analog-top
> + - amlogic,meson8-pmu
> + - amlogic,meson8b-pmu
> + - apm,xgene-csw
> + - apm,xgene-efuse
> + - apm,xgene-mcb
> + - apm,xgene-rb
> + - apm,xgene-scu
> + - atmel,sama5d2-sfrbu
> + - atmel,sama5d3-nfc-io
> + - atmel,sama5d3-sfrbu
> + - atmel,sama5d4-sfrbu
> + - axis,artpec6-syscon
> + - brcm,cru-clkset
> + - brcm,sr-cdru
> + - brcm,sr-mhb
> + - cirrus,ep7209-syscon1
> + - cirrus,ep7209-syscon2
> + - cirrus,ep7209-syscon3
> + - cnxt,cx92755-uc
> + - freecom,fsg-cs2-system-controller
> + - fsl,imx93-aonmix-ns-syscfg
> + - fsl,imx93-wakeupmix-syscfg
> + - fsl,ls1088a-reset
> + - fsl,vf610-anatop
> + - fsl,vf610-mscm-cpucfg
> + - hisilicon,dsa-subctrl
> + - hisilicon,hi6220-sramctrl
> + - hisilicon,hip04-ppe
> + - hisilicon,pcie-sas-subctrl
> + - hisilicon,peri-subctrl
> + - hpe,gxp-sysreg
> + - loongson,ls1b-syscon
> + - loongson,ls1c-syscon
> + - lsi,axxia-syscon
> + - marvell,armada-3700-cpu-misc
> + - marvell,armada-3700-nb-pm
> + - marvell,armada-3700-avs
> + - marvell,armada-3700-usb2-host-misc
> + - marvell,dove-global-config
> + - mediatek,mt2701-pctl-a-syscfg
> + - mediatek,mt2712-pctl-a-syscfg
> + - mediatek,mt6397-pctl-pmic-syscfg
> + - mediatek,mt8135-pctl-a-syscfg
> + - mediatek,mt8135-pctl-b-syscfg
> + - mediatek,mt8173-pctl-a-syscfg
> + - mediatek,mt8365-syscfg
> + - microchip,lan966x-cpu-syscon
> + - microchip,sam9x60-sfr
> + - microchip,sama7g5-ddr3phy
> + - mscc,ocelot-cpu-syscon
> + - mstar,msc313-pmsleep
> + - nuvoton,ma35d1-sys
> + - nuvoton,wpcm450-shm
> + - rockchip,px30-qos
> + - rockchip,rk3036-qos
> + - rockchip,rk3066-qos
> + - rockchip,rk3128-qos
> + - rockchip,rk3228-qos
> + - rockchip,rk3288-qos
> + - rockchip,rk3368-qos
> + - rockchip,rk3399-qos
> + - rockchip,rk3568-qos
> + - rockchip,rk3588-qos
> + - rockchip,rv1126-qos
> + - st,spear1340-misc
> + - stericsson,nomadik-pmu
> + - starfive,jh7100-sysmain
> + - ti,am62-usb-phy-ctrl
> + - ti,am625-dss-oldi-io-ctrl
> + - ti,am62p-cpsw-mac-efuse
> + - ti,am654-dss-oldi-io-ctrl
> + - ti,j784s4-pcie-ctrl
> + - ti,keystone-pllctrl
> required:
> - compatible
>
> properties:
> compatible:
> - anyOf:
> - - items:
> - - enum:
> - - al,alpine-sysfabric-service
> - - allwinner,sun8i-a83t-system-controller
> - - allwinner,sun8i-h3-system-controller
> - - allwinner,sun8i-v3s-system-controller
> - - allwinner,sun50i-a64-system-controller
> - - altr,l3regs
> - - altr,sdr-ctl
> - - amd,pensando-elba-syscon
> - - amlogic,meson-mx-assist
> - - amlogic,meson-mx-bootrom
> - - amlogic,meson8-analog-top
> - - amlogic,meson8b-analog-top
> - - amlogic,meson8-pmu
> - - amlogic,meson8b-pmu
> - - apm,xgene-csw
> - - apm,xgene-efuse
> - - apm,xgene-mcb
> - - apm,xgene-rb
> - - apm,xgene-scu
> - - atmel,sama5d2-sfrbu
> - - atmel,sama5d3-nfc-io
> - - atmel,sama5d3-sfrbu
> - - atmel,sama5d4-sfrbu
> - - axis,artpec6-syscon
> - - brcm,cru-clkset
> - - brcm,sr-cdru
> - - brcm,sr-mhb
> - - cirrus,ep7209-syscon1
> - - cirrus,ep7209-syscon2
> - - cirrus,ep7209-syscon3
> - - cnxt,cx92755-uc
> - - freecom,fsg-cs2-system-controller
> - - fsl,imx93-aonmix-ns-syscfg
> - - fsl,imx93-wakeupmix-syscfg
> - - fsl,ls1088a-reset
> - - fsl,vf610-anatop
> - - fsl,vf610-mscm-cpucfg
> - - hisilicon,dsa-subctrl
> - - hisilicon,hi6220-sramctrl
> - - hisilicon,hip04-ppe
> - - hisilicon,pcie-sas-subctrl
> - - hisilicon,peri-subctrl
> - - hpe,gxp-sysreg
> - - loongson,ls1b-syscon
> - - loongson,ls1c-syscon
> - - lsi,axxia-syscon
> - - marvell,armada-3700-cpu-misc
> - - marvell,armada-3700-nb-pm
> - - marvell,armada-3700-avs
> - - marvell,armada-3700-usb2-host-misc
> - - marvell,dove-global-config
> - - mediatek,mt2701-pctl-a-syscfg
> - - mediatek,mt2712-pctl-a-syscfg
> - - mediatek,mt6397-pctl-pmic-syscfg
> - - mediatek,mt8135-pctl-a-syscfg
> - - mediatek,mt8135-pctl-b-syscfg
> - - mediatek,mt8173-pctl-a-syscfg
> - - mediatek,mt8365-syscfg
> - - microchip,lan966x-cpu-syscon
> - - microchip,sam9x60-sfr
> - - microchip,sama7g5-ddr3phy
> - - mscc,ocelot-cpu-syscon
> - - mstar,msc313-pmsleep
> - - nuvoton,ma35d1-sys
> - - nuvoton,wpcm450-shm
> - - rockchip,px30-qos
> - - rockchip,rk3036-qos
> - - rockchip,rk3066-qos
> - - rockchip,rk3128-qos
> - - rockchip,rk3228-qos
> - - rockchip,rk3288-qos
> - - rockchip,rk3368-qos
> - - rockchip,rk3399-qos
> - - rockchip,rk3568-qos
> - - rockchip,rk3588-qos
> - - rockchip,rv1126-qos
> - - st,spear1340-misc
> - - stericsson,nomadik-pmu
> - - starfive,jh7100-sysmain
> - - ti,am62-usb-phy-ctrl
> - - ti,am625-dss-oldi-io-ctrl
> - - ti,am62p-cpsw-mac-efuse
> - - ti,am654-dss-oldi-io-ctrl
> - - ti,j784s4-pcie-ctrl
> - - ti,keystone-pllctrl
> -
> - - const: syscon
> -
> - - contains:
> - const: syscon
> - minItems: 2
> - maxItems: 5 # Should be enough
> + items:
> + - enum:
> + - al,alpine-sysfabric-service
> + - allwinner,sun8i-a83t-system-controller
> + - allwinner,sun8i-h3-system-controller
> + - allwinner,sun8i-v3s-system-controller
> + - allwinner,sun50i-a64-system-controller
> + - altr,l3regs
> + - altr,sdr-ctl
> + - amd,pensando-elba-syscon
> + - amlogic,meson-mx-assist
> + - amlogic,meson-mx-bootrom
> + - amlogic,meson8-analog-top
> + - amlogic,meson8b-analog-top
> + - amlogic,meson8-pmu
> + - amlogic,meson8b-pmu
> + - apm,xgene-csw
> + - apm,xgene-efuse
> + - apm,xgene-mcb
> + - apm,xgene-rb
> + - apm,xgene-scu
> + - atmel,sama5d2-sfrbu
> + - atmel,sama5d3-nfc-io
> + - atmel,sama5d3-sfrbu
> + - atmel,sama5d4-sfrbu
> + - axis,artpec6-syscon
> + - brcm,cru-clkset
> + - brcm,sr-cdru
> + - brcm,sr-mhb
> + - cirrus,ep7209-syscon1
> + - cirrus,ep7209-syscon2
> + - cirrus,ep7209-syscon3
> + - cnxt,cx92755-uc
> + - freecom,fsg-cs2-system-controller
> + - fsl,imx93-aonmix-ns-syscfg
> + - fsl,imx93-wakeupmix-syscfg
> + - fsl,ls1088a-reset
> + - fsl,vf610-anatop
> + - fsl,vf610-mscm-cpucfg
> + - hisilicon,dsa-subctrl
> + - hisilicon,hi6220-sramctrl
> + - hisilicon,hip04-ppe
> + - hisilicon,pcie-sas-subctrl
> + - hisilicon,peri-subctrl
> + - hpe,gxp-sysreg
> + - loongson,ls1b-syscon
> + - loongson,ls1c-syscon
> + - lsi,axxia-syscon
> + - marvell,armada-3700-cpu-misc
> + - marvell,armada-3700-nb-pm
> + - marvell,armada-3700-avs
> + - marvell,armada-3700-usb2-host-misc
> + - marvell,dove-global-config
> + - mediatek,mt2701-pctl-a-syscfg
> + - mediatek,mt2712-pctl-a-syscfg
> + - mediatek,mt6397-pctl-pmic-syscfg
> + - mediatek,mt8135-pctl-a-syscfg
> + - mediatek,mt8135-pctl-b-syscfg
> + - mediatek,mt8173-pctl-a-syscfg
> + - mediatek,mt8365-syscfg
> + - microchip,lan966x-cpu-syscon
> + - microchip,sam9x60-sfr
> + - microchip,sama7g5-ddr3phy
> + - mscc,ocelot-cpu-syscon
> + - mstar,msc313-pmsleep
> + - nuvoton,ma35d1-sys
> + - nuvoton,wpcm450-shm
> + - rockchip,px30-qos
> + - rockchip,rk3036-qos
> + - rockchip,rk3066-qos
> + - rockchip,rk3128-qos
> + - rockchip,rk3228-qos
> + - rockchip,rk3288-qos
> + - rockchip,rk3368-qos
> + - rockchip,rk3399-qos
> + - rockchip,rk3568-qos
> + - rockchip,rk3588-qos
> + - rockchip,rv1126-qos
> + - st,spear1340-misc
> + - stericsson,nomadik-pmu
> + - starfive,jh7100-sysmain
> + - ti,am62-usb-phy-ctrl
> + - ti,am625-dss-oldi-io-ctrl
> + - ti,am62p-cpsw-mac-efuse
> + - ti,am654-dss-oldi-io-ctrl
> + - ti,j784s4-pcie-ctrl
> + - ti,keystone-pllctrl
> + - const: syscon
>
> reg:
> maxItems: 1
>
> - reg-io-width:
> - description: |
> - The size (in bytes) of the IO accesses that should be performed
> - on the device.
> - enum: [1, 2, 4, 8]
> -
> resets:
> maxItems: 1
>
> @@ -144,18 +217,9 @@ required:
> - reg
>
> allOf:
> - - if:
> - properties:
> - compatible:
> - contains:
> - const: simple-mfd
> - then:
> - properties:
> - compatible:
> - minItems: 3
> - maxItems: 5
> + - $ref: syscon-common.yaml#
>
> -additionalProperties: true
> +unevaluatedProperties: false
>
> examples:
> - |
>
> --
> 2.43.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children
2024-06-17 16:44 ` Conor Dooley
@ 2024-06-17 16:46 ` Conor Dooley
2024-06-17 17:35 ` Krzysztof Kozlowski
2024-06-17 17:33 ` Krzysztof Kozlowski
1 sibling, 1 reply; 19+ messages in thread
From: Conor Dooley @ 2024-06-17 16:46 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno, Jiaxun Yang, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
[-- Attachment #1: Type: text/plain, Size: 5239 bytes --]
On Mon, Jun 17, 2024 at 05:44:52PM +0100, Conor Dooley wrote:
> On Sun, Jun 16, 2024 at 03:19:26PM +0200, Krzysztof Kozlowski wrote:
> > Simple syscon nodes can be documented in common syscon.yaml, however
> > devices with simple-mfd compatible, thus with some children, should have
> > their own schema listing these children. Such listing makes the binding
> > specific, allows better validation (so the incorrect child would not
> > appear in the simple-mfd node) and actually enforces repeated rule for
> > simple-mfd devices:
> >
> > "simple-mfd" is only for simple devices, where the children do not
> > depend on the parent.
> >
> > Currently the syscon+simple-mfd binding is quite broad and allows
> > any child or property, thus above rule cannot be enforced.
> >
> > Split the syscon.yaml binding into:
> > 1. Common syscon properties, used potentially by many bindings.
> > 2. Simple syscon devices (NO simple-mfd!).
> >
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >
> > ---
> >
> > Depends on:
> > 1. Patch in MFD: https://lore.kernel.org/all/171828959006.2643902.8308227314531523435.b4-ty@kernel.org/
> > 2. Previous patches in the series.
> > ---
> > .../devicetree/bindings/mfd/syscon-common.yaml | 72 +++++
> > Documentation/devicetree/bindings/mfd/syscon.yaml | 294 +++++++++++++--------
> > 2 files changed, 251 insertions(+), 115 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/syscon-common.yaml b/Documentation/devicetree/bindings/mfd/syscon-common.yaml
> > new file mode 100644
> > index 000000000000..c3ff3a7afce3
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mfd/syscon-common.yaml
> > @@ -0,0 +1,72 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/mfd/syscon-common.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: System Controller Registers R/W Common Properties
> > +
> > +description: |
>
> This | can go, right?
>
> > + System controller node represents a register region containing a set
> > + of miscellaneous registers. The registers are not cohesive enough to
> > + represent as any specific type of device. The typical use-case is
> > + for some other node's driver, or platform-specific code, to acquire
> > + a reference to the syscon node (e.g. by phandle, node path, or
> > + search using a specific compatible value), interrogate the node (or
> > + associated OS driver) to determine the location of the registers,
> > + and access the registers directly.
> > +
> > +maintainers:
> > + - Lee Jones <lee@kernel.org>
> > +
> > +select:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
>
> And this can be const, given it's unlikely to grow?
>
> > + - syscon
> > +
> > + required:
> > + - compatible
> > +
> > +properties:
> > + compatible:
> > + contains:
> > + const: syscon
> > + minItems: 2
> > + maxItems: 5 # Should be enough
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + reg-io-width:
> > + description: |
>
> Same with this one.
>
> > + The size (in bytes) of the IO accesses that should be performed
> > + on the device.
> > + enum: [1, 2, 4, 8]
> > +
> > +required:
> > + - compatible
> > + - reg
> > +
> > +allOf:
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: simple-mfd
> > + then:
> > + properties:
> > + compatible:
> > + minItems: 3
> > + maxItems: 5
> > +
> > +additionalProperties: true
> > +
> > +examples:
> > + - |
> > + syscon: syscon@1c00000 {
> > + compatible = "allwinner,sun8i-h3-system-controller", "syscon";
> > + reg = <0x01c00000 0x1000>;
> > + };
> > +...
> > diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
> > index d6fa58c9e4de..d4e9533cf3fe 100644
> > --- a/Documentation/devicetree/bindings/mfd/syscon.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
> > @@ -4,7 +4,7 @@
> > $id: http://devicetree.org/schemas/mfd/syscon.yaml#
> > $schema: http://devicetree.org/meta-schemas/core.yaml#
> >
> > -title: System Controller Registers R/W
> > +title: System Controller Devices
> >
> > description: |
> > System controller node represents a register region containing a set
> > @@ -19,123 +19,196 @@ description: |
> > maintainers:
> > - Lee Jones <lee@kernel.org>
> >
> > +# Need a select with all compatibles listed for compatibility with older
> > +# dtschema (<2024.02), so this will not be selected for other schemas having
> > +# syscon fallback.
> > select:
> > properties:
> > compatible:
> > contains:
> > enum:
> > - - syscon
>
> Wow, this is noisy. Is it not possible to achieve something similar by
> making the select check for not: compatible: contains: simple-mfd? Or
> did I misunderstand the intention here?
Ah, you'd match things then like the intel,lgm-syscon, right?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema
2024-06-16 13:19 ` [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema Krzysztof Kozlowski
@ 2024-06-17 16:46 ` Conor Dooley
2024-06-17 16:47 ` Conor Dooley
2024-06-24 20:34 ` Rob Herring (Arm)
2 siblings, 0 replies; 19+ messages in thread
From: Conor Dooley @ 2024-06-17 16:46 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno, Jiaxun Yang, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
[-- Attachment #1: Type: text/plain, Size: 331 bytes --]
On Sun, Jun 16, 2024 at 03:19:23PM +0200, Krzysztof Kozlowski wrote:
> intel,lgm-syscon is not a simple syscon device - it has children - thus
> it should be fully documented in its own binding.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema
2024-06-16 13:19 ` [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema Krzysztof Kozlowski
2024-06-17 16:46 ` Conor Dooley
@ 2024-06-17 16:47 ` Conor Dooley
2024-06-17 17:39 ` Krzysztof Kozlowski
2024-06-24 20:34 ` Rob Herring (Arm)
2 siblings, 1 reply; 19+ messages in thread
From: Conor Dooley @ 2024-06-17 16:47 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno, Jiaxun Yang, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]
On Sun, Jun 16, 2024 at 03:19:23PM +0200, Krzysztof Kozlowski wrote:
> intel,lgm-syscon is not a simple syscon device - it has children - thus
> it should be fully documented in its own binding.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Context might depend on patch in Lee's MFD tree:
> https://lore.kernel.org/all/171828959006.2643902.8308227314531523435.b4-ty@kernel.org/
> and also further patches here depend on this one.
> ---
> Documentation/devicetree/bindings/mfd/syscon.yaml | 1 -
> .../bindings/soc/intel/intel,lgm-syscon.yaml | 56 ++++++++++++++++++++++
> 2 files changed, 56 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
> index af442767aa96..b9bf5bc05e92 100644
> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml
> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
> @@ -77,7 +77,6 @@ properties:
> - hisilicon,pcie-sas-subctrl
> - hisilicon,peri-subctrl
> - hpe,gxp-sysreg
> - - intel,lgm-syscon
> - loongson,ls1b-syscon
> - loongson,ls1c-syscon
> - lsi,axxia-syscon
> diff --git a/Documentation/devicetree/bindings/soc/intel/intel,lgm-syscon.yaml b/Documentation/devicetree/bindings/soc/intel/intel,lgm-syscon.yaml
> new file mode 100644
> index 000000000000..0a73b7616a60
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/intel/intel,lgm-syscon.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/intel/intel,lgm-syscon.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Intel Lightning Mountain(LGM) Syscon
> +
> +maintainers:
> + - Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
This email is bouncing FYI.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children
2024-06-17 16:44 ` Conor Dooley
2024-06-17 16:46 ` Conor Dooley
@ 2024-06-17 17:33 ` Krzysztof Kozlowski
1 sibling, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-17 17:33 UTC (permalink / raw)
To: Conor Dooley, Krzysztof Kozlowski
Cc: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno, Jiaxun Yang, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On 17/06/2024 18:44, Conor Dooley wrote:
>> +$id: http://devicetree.org/schemas/mfd/syscon-common.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: System Controller Registers R/W Common Properties
>> +
>> +description: |
>
> This | can go, right?
Ack
>
>> + System controller node represents a register region containing a set
>> + of miscellaneous registers. The registers are not cohesive enough to
>> + represent as any specific type of device. The typical use-case is
>> + for some other node's driver, or platform-specific code, to acquire
>> + a reference to the syscon node (e.g. by phandle, node path, or
>> + search using a specific compatible value), interrogate the node (or
>> + associated OS driver) to determine the location of the registers,
>> + and access the registers directly.
>> +
>> +maintainers:
>> + - Lee Jones <lee@kernel.org>
>> +
>> +select:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>
> And this can be const, given it's unlikely to grow?
ack
>
>> + - syscon
>> +
>> + required:
>> + - compatible
>> +
>> +properties:
>> + compatible:
>> + contains:
>> + const: syscon
>> + minItems: 2
>> + maxItems: 5 # Should be enough
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + reg-io-width:
>> + description: |
>
> Same with this one.
ack
>
>> + The size (in bytes) of the IO accesses that should be performed
>> + on the device.
>> + enum: [1, 2, 4, 8]
>> +
>> +required:
>> + - compatible
>> + - reg
>> +
>> +allOf:
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: simple-mfd
>> + then:
>> + properties:
>> + compatible:
>> + minItems: 3
>> + maxItems: 5
>> +
>> +additionalProperties: true
>> +
>> +examples:
>> + - |
>> + syscon: syscon@1c00000 {
>> + compatible = "allwinner,sun8i-h3-system-controller", "syscon";
>> + reg = <0x01c00000 0x1000>;
>> + };
>> +...
>> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
>> index d6fa58c9e4de..d4e9533cf3fe 100644
>> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml
>> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
>> @@ -4,7 +4,7 @@
>> $id: http://devicetree.org/schemas/mfd/syscon.yaml#
>> $schema: http://devicetree.org/meta-schemas/core.yaml#
>>
>> -title: System Controller Registers R/W
>> +title: System Controller Devices
>>
>> description: |
>> System controller node represents a register region containing a set
>> @@ -19,123 +19,196 @@ description: |
>> maintainers:
>> - Lee Jones <lee@kernel.org>
>>
>> +# Need a select with all compatibles listed for compatibility with older
>> +# dtschema (<2024.02), so this will not be selected for other schemas having
>> +# syscon fallback.
>> select:
>> properties:
>> compatible:
>> contains:
>> enum:
>> - - syscon
>
> Wow, this is noisy. Is it not possible to achieve something similar by
> making the select check for not: compatible: contains: simple-mfd? Or
> did I misunderstand the intention here?
See comment from Rob for v1. This is needed for older schema, although
2024.02 worked fine in my tests. The point is to select all schemas, not
by compatible property, because then we match this schema to anything
having syscon.
Kind of similar how it is woth arm,primecell.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children
2024-06-17 16:46 ` Conor Dooley
@ 2024-06-17 17:35 ` Krzysztof Kozlowski
2024-06-18 18:04 ` Conor Dooley
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-17 17:35 UTC (permalink / raw)
To: Conor Dooley, Krzysztof Kozlowski
Cc: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno, Jiaxun Yang, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On 17/06/2024 18:46, Conor Dooley wrote:
>>>
>>> +# Need a select with all compatibles listed for compatibility with older
>>> +# dtschema (<2024.02), so this will not be selected for other schemas having
>>> +# syscon fallback.
>>> select:
>>> properties:
>>> compatible:
>>> contains:
>>> enum:
>>> - - syscon
>>
>> Wow, this is noisy. Is it not possible to achieve something similar by
>> making the select check for not: compatible: contains: simple-mfd? Or
>> did I misunderstand the intention here?
>
> Ah, you'd match things then like the intel,lgm-syscon, right?
Yes.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema
2024-06-17 16:47 ` Conor Dooley
@ 2024-06-17 17:39 ` Krzysztof Kozlowski
0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-17 17:39 UTC (permalink / raw)
To: Conor Dooley, Krzysztof Kozlowski
Cc: Orson Zhai, Baolin Wang, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno, Jiaxun Yang, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On 17/06/2024 18:47, Conor Dooley wrote:
>> +---
>> +$id: http://devicetree.org/schemas/soc/intel/intel,lgm-syscon.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Intel Lightning Mountain(LGM) Syscon
>> +
>> +maintainers:
>> + - Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
>
> This email is bouncing FYI.
Eh, indeed. I'll figure out something, but in general platform looks
abandoned.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 2/7] dt-bindings: soc: sprd: sc9863a-glbregs: Document SC9863A syscon
2024-06-16 13:19 ` [PATCH v2 2/7] dt-bindings: soc: sprd: sc9863a-glbregs: Document SC9863A syscon Krzysztof Kozlowski
@ 2024-06-18 8:52 ` Baolin Wang
0 siblings, 0 replies; 19+ messages in thread
From: Baolin Wang @ 2024-06-18 8:52 UTC (permalink / raw)
To: Krzysztof Kozlowski, Orson Zhai, Chunyan Zhang, Vadivel Murugan,
Jacky Huang, Shan-Chun Hung, Khuong Dinh, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lars Povlsen, Steen Hegelund,
Daniel Machon, UNGLinuxDriver, Nishanth Menon, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: Jiaxun Yang, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On 2024/6/16 21:19, Krzysztof Kozlowski wrote:
> Document sprd,sc9863a-glbregs compatible already used in DTS and other
> bindings example.
>
> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
LGTM. Thanks.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
> .../bindings/soc/sprd/sprd,sc9863a-glbregs.yaml | 55 ++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/soc/sprd/sprd,sc9863a-glbregs.yaml b/Documentation/devicetree/bindings/soc/sprd/sprd,sc9863a-glbregs.yaml
> new file mode 100644
> index 000000000000..49add564e5e1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/sprd/sprd,sc9863a-glbregs.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/sprd/sprd,sc9863a-glbregs.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: SC9863A Syscon
> +
> +maintainers:
> + - Orson Zhai <orsonzhai@gmail.com>
> + - Baolin Wang <baolin.wang7@gmail.com>
> + - Chunyan Zhang <zhang.lyra@gmail.com>
> +
> +properties:
> + compatible:
> + items:
> + - const: sprd,sc9863a-glbregs
> + - const: syscon
> + - const: simple-mfd
> +
> + reg:
> + maxItems: 1
> +
> + ranges: true
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 1
> +
> +patternProperties:
> + "@[0-9a-f]+$":
> + $ref: /schemas/clock/sprd,sc9863a-clk.yaml
> + description: Clock controllers
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + syscon@20e00000 {
> + compatible = "sprd,sc9863a-glbregs", "syscon", "simple-mfd";
> + reg = <0x20e00000 0x4000>;
> + ranges = <0 0x20e00000 0x4000>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + apahb_gate: apahb-gate@0 {
> + compatible = "sprd,sc9863a-apahb-gate";
> + reg = <0x0 0x1020>;
> + #clock-cells = <1>;
> + };
> + };
> +
> +...
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children
2024-06-17 17:35 ` Krzysztof Kozlowski
@ 2024-06-18 18:04 ` Conor Dooley
0 siblings, 0 replies; 19+ messages in thread
From: Conor Dooley @ 2024-06-18 18:04 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Krzysztof Kozlowski, Orson Zhai, Baolin Wang, Chunyan Zhang,
Vadivel Murugan, Jacky Huang, Shan-Chun Hung, Khuong Dinh,
Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Lars Povlsen, Steen Hegelund, Daniel Machon, UNGLinuxDriver,
Nishanth Menon, Matthias Brugger, AngeloGioacchino Del Regno,
Jiaxun Yang, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
On Mon, Jun 17, 2024 at 07:35:07PM +0200, Krzysztof Kozlowski wrote:
> On 17/06/2024 18:46, Conor Dooley wrote:
> >>>
> >>> +# Need a select with all compatibles listed for compatibility with older
> >>> +# dtschema (<2024.02), so this will not be selected for other schemas having
> >>> +# syscon fallback.
> >>> select:
> >>> properties:
> >>> compatible:
> >>> contains:
> >>> enum:
> >>> - - syscon
> >>
> >> Wow, this is noisy. Is it not possible to achieve something similar by
> >> making the select check for not: compatible: contains: simple-mfd? Or
> >> did I misunderstand the intention here?
> >
> > Ah, you'd match things then like the intel,lgm-syscon, right?
>
> Yes.
With the nits then:
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children
2024-06-16 13:19 ` [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children Krzysztof Kozlowski
2024-06-17 16:44 ` Conor Dooley
@ 2024-06-24 20:28 ` Rob Herring (Arm)
1 sibling, 0 replies; 19+ messages in thread
From: Rob Herring (Arm) @ 2024-06-24 20:28 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: linux-mediatek, Conor Dooley, linux-kernel,
AngeloGioacchino Del Regno, Shan-Chun Hung, Orson Zhai,
Vadivel Murugan, Krzysztof Kozlowski, UNGLinuxDriver,
Steen Hegelund, Baolin Wang, Chunyan Zhang, Khuong Dinh,
linux-arm-kernel, Lars Povlsen, Jiaxun Yang, Lee Jones,
Daniel Machon, Nishanth Menon, Jacky Huang, devicetree,
Matthias Brugger
On Sun, 16 Jun 2024 15:19:26 +0200, Krzysztof Kozlowski wrote:
> Simple syscon nodes can be documented in common syscon.yaml, however
> devices with simple-mfd compatible, thus with some children, should have
> their own schema listing these children. Such listing makes the binding
> specific, allows better validation (so the incorrect child would not
> appear in the simple-mfd node) and actually enforces repeated rule for
> simple-mfd devices:
>
> "simple-mfd" is only for simple devices, where the children do not
> depend on the parent.
>
> Currently the syscon+simple-mfd binding is quite broad and allows
> any child or property, thus above rule cannot be enforced.
>
> Split the syscon.yaml binding into:
> 1. Common syscon properties, used potentially by many bindings.
> 2. Simple syscon devices (NO simple-mfd!).
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Depends on:
> 1. Patch in MFD: https://lore.kernel.org/all/171828959006.2643902.8308227314531523435.b4-ty@kernel.org/
> 2. Previous patches in the series.
> ---
> .../devicetree/bindings/mfd/syscon-common.yaml | 72 +++++
> Documentation/devicetree/bindings/mfd/syscon.yaml | 294 +++++++++++++--------
> 2 files changed, 251 insertions(+), 115 deletions(-)
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema
2024-06-16 13:19 ` [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema Krzysztof Kozlowski
2024-06-17 16:46 ` Conor Dooley
2024-06-17 16:47 ` Conor Dooley
@ 2024-06-24 20:34 ` Rob Herring (Arm)
2 siblings, 0 replies; 19+ messages in thread
From: Rob Herring (Arm) @ 2024-06-24 20:34 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Orson Zhai, linux-arm-kernel, Lee Jones, Nishanth Menon,
Baolin Wang, Chunyan Zhang, Vadivel Murugan, Krzysztof Kozlowski,
Shan-Chun Hung, Lars Povlsen, Matthias Brugger, Conor Dooley,
Jiaxun Yang, Khuong Dinh, Steen Hegelund, linux-kernel,
UNGLinuxDriver, Jacky Huang, AngeloGioacchino Del Regno,
Daniel Machon, devicetree, linux-mediatek
On Sun, 16 Jun 2024 15:19:23 +0200, Krzysztof Kozlowski wrote:
> intel,lgm-syscon is not a simple syscon device - it has children - thus
> it should be fully documented in its own binding.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Context might depend on patch in Lee's MFD tree:
> https://lore.kernel.org/all/171828959006.2643902.8308227314531523435.b4-ty@kernel.org/
> and also further patches here depend on this one.
> ---
> Documentation/devicetree/bindings/mfd/syscon.yaml | 1 -
> .../bindings/soc/intel/intel,lgm-syscon.yaml | 56 ++++++++++++++++++++++
> 2 files changed, 56 insertions(+), 1 deletion(-)
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2024-06-24 20:34 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-16 13:19 [PATCH v2 0/7] dt-bindings: mfd: syscon: Document more compatibles and require simpe-mfd description Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 1/7] dt-bindings: mfd: syscon: Drop hwlocks Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 2/7] dt-bindings: soc: sprd: sc9863a-glbregs: Document SC9863A syscon Krzysztof Kozlowski
2024-06-18 8:52 ` Baolin Wang
2024-06-16 13:19 ` [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema Krzysztof Kozlowski
2024-06-17 16:46 ` Conor Dooley
2024-06-17 16:47 ` Conor Dooley
2024-06-17 17:39 ` Krzysztof Kozlowski
2024-06-24 20:34 ` Rob Herring (Arm)
2024-06-16 13:19 ` [PATCH v2 4/7] dt-bindings: soc: microchip: sparx5-cpu-syscon: " Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 5/7] dt-bindings: soc: ti: am654-serdes-ctrl: " Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children Krzysztof Kozlowski
2024-06-17 16:44 ` Conor Dooley
2024-06-17 16:46 ` Conor Dooley
2024-06-17 17:35 ` Krzysztof Kozlowski
2024-06-18 18:04 ` Conor Dooley
2024-06-17 17:33 ` Krzysztof Kozlowski
2024-06-24 20:28 ` Rob Herring (Arm)
2024-06-16 13:19 ` [PATCH v2 7/7] dt-bindings: mfd: syscon: Add APM poweroff mailbox Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).