Re: [PATCH v6 02/13] dt-bindings: soc: amlogic: meson-gx-hhi-sysctrl: Add #phy-cells
From: Neil Armstrong
Date: Wed Dec 02 2026 - 02:57:41 EST
Hi,
On 12/1/26 21:12, Ronald Claveau via B4 Relay wrote:
From: Ronald Claveau <linux-kernel-dev@xxxxxxxx>
The HDMI TX PHY found on GXBB, GXL, GXM and G12A SoCs is controlled
through registers of the HHI system controller and has no resources of
its own. Instead of describing it as a child node, let the HHI system
controller act as the PHY provider, so that the HDMI TX controller can
reference it with "phys = <&sysctrl>". The PHY itself is instantiated
by the meson-gx-hhi-sysctrl driver as an auxiliary device.
Add the "#phy-cells" property (const 0) and forbid it for the other
system controller variants. Add it to the example.
The HDMI TX PHY registers differ between SoC families, so the driver
needs to know which family it is running on. Add SoC-specific
compatibles (amlogic,meson-gxbb-hhi-sysctrl, amlogic,meson-gxl-hhi-sysctrl,
amlogic,meson-g12a-hhi-sysctrl) to select the PHY variant.
There's multiple PHYs in the HHI register zone, you can't consider the HHI zone
exposes an HDMI PHY and keep the dsi phy subnodes.
I disagree with Rob, the HDMI phy subnode is a continuity of the
actual bindings design, the current solution is wrong.
In subtance, HHI is a "system configuration register zone" which is
mix of registers for core system functions like clocks, power domains,
DSI analog PHY, HDMI phy (and plenty of other core registers).
As of today, the bindings is:
hhi: system-controller@0 {
compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
reg = <0 0 0 0x400>;
clkc: clock-controller {
compatible = "amlogic,g12a-clkc";
#clock-cells = <1>;
...
};
pwrc: power-controller {
compatible = "amlogic,meson-g12a-pwrc";
#power-domain-cells = <1>;
...
};
mipi_analog_dphy: phy {
compatible = "amlogic,g12a-mipi-dphy-analog";
#phy-cells = <0>;
...
};
}
There's no reg, because the registers used by those functions are
not linear for the clocks and pwrc, and even if the phy registers
are linear they are in the middle of the clock and pwrc registers,
this is why we omitted the reg property.
The HDMI will probably be the last one so it makes sense to document
it the same way as the mipi_analog_dphy
The alternative would be to add #phy-cells = <1> and expose the HDMI _and_
the mipi_analog_dphy, but this would break DT compatibility with older DT
using "amlogic,g12a-mipi-dphy-analog" as the mipi_analog_dphy provider.
Neil
Signed-off-by: Ronald Claveau <linux-kernel-dev@xxxxxxxx>
---
.../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
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 285edac4c082..f277e22a98ff 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
@@ -14,6 +14,9 @@ properties:
items:
- enum:
- amlogic,meson-hhi-sysctrl
+ - amlogic,meson-g12a-hhi-sysctrl
+ - amlogic,meson-gxl-hhi-sysctrl
+ - amlogic,meson-gxbb-hhi-sysctrl
- amlogic,meson-gx-hhi-sysctrl
- amlogic,meson-gx-ao-sysctrl
- amlogic,meson-axg-hhi-sysctrl
@@ -36,6 +39,12 @@ properties:
phy:
type: object
+ "#phy-cells":
+ const: 0
+ description:
+ Present on SoCs where the HDMI TX PHY is controlled through the
+ HHI registers. The system controller acts as the PHY provider.
+
allOf:
- if:
properties:
@@ -50,12 +59,16 @@ allOf:
pinctrl: false
phy: false
+ "#phy-cells": false
- if:
properties:
compatible:
contains:
enum:
+ - amlogic,meson-g12a-hhi-sysctrl
+ - amlogic,meson-gxl-hhi-sysctrl
+ - amlogic,meson-gxbb-hhi-sysctrl
- amlogic,meson-gx-hhi-sysctrl
- amlogic,meson-axg-hhi-sysctrl
then:
@@ -80,12 +93,14 @@ allOf:
power-controller: false
phy: false
+ "#phy-cells": false
- if:
properties:
compatible:
contains:
enum:
+ - amlogic,meson-g12a-hhi-sysctrl
- amlogic,meson-gx-hhi-sysctrl
then:
properties:
@@ -104,6 +119,7 @@ allOf:
oneOf:
- $ref: /schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml
- $ref: /schemas/phy/amlogic,meson-axg-mipi-pcie-analog.yaml
+ "#phy-cells": false
required:
- compatible
@@ -124,6 +140,7 @@ examples:
sysctrl: system-controller@0 {
compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
reg = <0 0x400>;
+ #phy-cells = <0>;
clock-controller {
compatible = "amlogic,gxbb-clkc";