[PATCH 01/10] dt-bindings: soc: amlogic: meson-gx-hhi-sysctrl: Fix compatible matching in conditionals
From: Ronald Claveau via B4 Relay
Date: Tue Nov 17 2026 - 14:34:39 EST
From: Ronald Claveau <linux-kernel-dev@xxxxxxxx>
The conditional schemas select on "compatible" with a bare enum. On a
list such as:
compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd";
an enum applied to the whole array only matches single-entry lists, so
the if: blocks never match as intended and the per-variant constraints
are not applied reliably.
Wrap the enums in "contains" so that the conditions match on any entry
of the compatible list.
Doing so exposes the "phy" child node of "amlogic,meson-gx-hhi-sysctrl":
it was forbidden (phy: false), but some DT legitimately describe an
"amlogic,g12a-mipi-dphy-analog" PHY node under this system controller,
which resulted in dtbs_check warnings such as:
system-controller@0 (amlogic,meson-gx-hhi-sysctrl): False schema does
not allow {'compatible': ['amlogic,g12a-mipi-dphy-analog'],
'#phy-cells': 0, ...}
Allow the phy child node for amlogic,meson-gx-hhi-sysctrl by referencing
the amlogic,g12a-mipi-dphy-analog binding instead of rejecting it.
Signed-off-by: Ronald Claveau <linux-kernel-dev@xxxxxxxx>
---
.../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml | 32 +++++++++++++---------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
index f3a85c67ce8a..285edac4c082 100644
--- a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml
@@ -40,8 +40,9 @@ allOf:
- if:
properties:
compatible:
- enum:
- - amlogic,meson-hhi-sysctrl
+ contains:
+ enum:
+ - amlogic,meson-hhi-sysctrl
then:
properties:
clock-controller:
@@ -53,9 +54,10 @@ allOf:
- if:
properties:
compatible:
- enum:
- - amlogic,meson-gx-hhi-sysctrl
- - amlogic,meson-axg-hhi-sysctrl
+ contains:
+ enum:
+ - amlogic,meson-gx-hhi-sysctrl
+ - amlogic,meson-axg-hhi-sysctrl
then:
properties:
clock-controller:
@@ -67,9 +69,10 @@ allOf:
- if:
properties:
compatible:
- enum:
- - amlogic,meson-gx-ao-sysctrl
- - amlogic,meson-axg-ao-sysctrl
+ contains:
+ enum:
+ - amlogic,meson-gx-ao-sysctrl
+ - amlogic,meson-axg-ao-sysctrl
then:
properties:
clock-controller:
@@ -81,17 +84,20 @@ allOf:
- if:
properties:
compatible:
- enum:
- - amlogic,meson-gx-hhi-sysctrl
+ contains:
+ enum:
+ - amlogic,meson-gx-hhi-sysctrl
then:
properties:
- phy: false
+ phy:
+ $ref: /schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml
- if:
properties:
compatible:
- enum:
- - amlogic,meson-axg-hhi-sysctrl
+ contains:
+ enum:
+ - amlogic,meson-axg-hhi-sysctrl
then:
properties:
phy:
--
2.43.0