mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: linux-kernel-dev@aliel.fr, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Vinod Koul <vkoul@kernel.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Ulf Hansson <ulfh@kernel.org>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH v6 02/13] dt-bindings: soc: amlogic: meson-gx-hhi-sysctrl: Add #phy-cells
Date: Wed, 2 Dec 2026 08:57:33 +0100	[thread overview]
Message-ID: <07f3e282-f83b-4c89-9ec0-6887f63c1882@linaro.org> (raw)
In-Reply-To: <20261201-meson-drm-create-hdmitx-phy-v6-2-5ccdf57a6cf5@aliel.fr>

Hi,

On 12/1/26 21:12, Ronald Claveau via B4 Relay wrote:
> From: Ronald Claveau <linux-kernel-dev@aliel.fr>
> 
> 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@aliel.fr>
> ---
>   .../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";
> 


  reply	other threads:[~2026-12-02  7:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 20:12 [PATCH v6 00/13] phy/drm: amlogic: Extract Meson HDMI TX PHY into a dedicated driver Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 01/13] dt-bindings: soc: amlogic: meson-gx-hhi-sysctrl: Fix compatible matching in conditionals Ronald Claveau via B4 Relay
2026-12-02 14:24   ` Krzysztof Kozlowski
2026-12-01 20:12 ` [PATCH v6 02/13] dt-bindings: soc: amlogic: meson-gx-hhi-sysctrl: Add #phy-cells Ronald Claveau via B4 Relay
2026-12-02  7:57   ` Neil Armstrong [this message]
2026-12-02 14:30     ` Krzysztof Kozlowski
2026-12-02 14:25   ` Krzysztof Kozlowski
2026-12-01 20:12 ` [PATCH v6 03/13] soc: amlogic: Add Meson GX HHI system controller driver Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 04/13] phy: amlogic: rename Meson8 HDMI TX PHY driver to be SoC-generic Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 05/13] phy: amlogic: meson-hdmi-tx: Add GXBB, GXL, GXM and G12A support Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 06/13] dt-bindings: display: amlogic,meson-dw-hdmi: Add phys Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 07/13] pmdomain: amlogic: meson-ee-pwrc: power up memories for boot-enabled domains Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 08/13] drm/meson: dw-hdmi: Drop manual HHI clock and memory PD setup Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 09/13] drm/meson: dw-hdmi: Use the generic PHY framework for the HDMI TX PHY Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 10/13] arm64: dts: amlogic: g12: Use the HHI system controller as HDMI PHY provider Ronald Claveau via B4 Relay
2026-12-01 20:12 ` [PATCH v6 11/13] arm64: dts: amlogic: meson-gx: Add #phy-cells to the HHI system controller Ronald Claveau via B4 Relay
2026-12-01 20:13 ` [PATCH v6 12/13] arm64: dts: amlogic: Add HDMI TX PHY node for GXBB Ronald Claveau via B4 Relay
2026-12-01 20:13 ` [PATCH v6 13/13] arm64: dts: amlogic: Add HDMI TX PHY node for GXL Ronald Claveau via B4 Relay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=07f3e282-f83b-4c89-9ec0-6887f63c1882@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=airlied@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel-dev@aliel.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mani@kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mripard@kernel.org \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=ulfh@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®