From: Ronald Claveau via B4 Relay <devnull+linux-kernel-dev.aliel.fr@kernel.org>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.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,
Ronald Claveau <linux-kernel-dev@aliel.fr>,
linux-pm@vger.kernel.org
Subject: [PATCH v6 03/13] soc: amlogic: Add Meson GX HHI system controller driver
Date: Tue, 01 Dec 2026 21:12:51 +0100 [thread overview]
Message-ID: <20261201-meson-drm-create-hdmitx-phy-v6-3-5ccdf57a6cf5@aliel.fr> (raw)
In-Reply-To: <20261201-meson-drm-create-hdmitx-phy-v6-0-5ccdf57a6cf5@aliel.fr>
From: Ronald Claveau <linux-kernel-dev@aliel.fr>
The HDMI TX PHY on GXBB, GXL, GXM and G12A SoCs is controlled through
registers of the HHI system controller and has no resources of its
own, so it is not described in the device tree.
Add a driver binding the HHI system controller. It registers the
controller as a PHY provider ("#phy-cells = <0>") and creates an
auxiliary device named after the SoC family, selected from the
SoC-specific compatible. The auxiliary device is bound by the HDMI TX
PHY driver, which creates the PHY with the system controller node as
provider node.
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
drivers/soc/amlogic/Kconfig | 13 +++++++
drivers/soc/amlogic/Makefile | 1 +
drivers/soc/amlogic/meson-gx-hhi-sysctrl.c | 58 ++++++++++++++++++++++++++++++
3 files changed, 72 insertions(+)
diff --git a/drivers/soc/amlogic/Kconfig b/drivers/soc/amlogic/Kconfig
index d08e398bdad4..c0d05d92078b 100644
--- a/drivers/soc/amlogic/Kconfig
+++ b/drivers/soc/amlogic/Kconfig
@@ -36,4 +36,17 @@ config MESON_MX_SOCINFO
Meson8b and Meson8m2 SoC family information about the type
and version.
+config MESON_GX_HHI_SYSCTRL
+ tristate "Amlogic Meson GX HHI System Controller driver"
+ depends on ARCH_MESON || COMPILE_TEST
+ depends on OF
+ default ARCH_MESON
+ select AUXILIARY_BUS
+ select GENERIC_PHY
+ help
+ Say yes to enable the HHI system controller driver for
+ Amlogic Meson GXBB, GXL, GXM and G12 SoCs. It registers
+ the system controller as the provider of the internal
+ HDMI TX PHY.
+
endmenu
diff --git a/drivers/soc/amlogic/Makefile b/drivers/soc/amlogic/Makefile
index c25f835e6a26..b3cc34a5ae57 100644
--- a/drivers/soc/amlogic/Makefile
+++ b/drivers/soc/amlogic/Makefile
@@ -3,3 +3,4 @@ obj-$(CONFIG_MESON_CANVAS) += meson-canvas.o
obj-$(CONFIG_MESON_CLK_MEASURE) += meson-clk-measure.o
obj-$(CONFIG_MESON_GX_SOCINFO) += meson-gx-socinfo.o
obj-$(CONFIG_MESON_MX_SOCINFO) += meson-mx-socinfo.o
+obj-$(CONFIG_MESON_GX_HHI_SYSCTRL) += meson-gx-hhi-sysctrl.o
diff --git a/drivers/soc/amlogic/meson-gx-hhi-sysctrl.c b/drivers/soc/amlogic/meson-gx-hhi-sysctrl.c
new file mode 100644
index 000000000000..d4ef41e422a2
--- /dev/null
+++ b/drivers/soc/amlogic/meson-gx-hhi-sysctrl.c
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Amlogic Meson GX HHI System Controller
+ *
+ * Copyright (C) 2026 Ronald Claveau <linux-kernel-dev@aliel.fr>
+ */
+
+#include <linux/auxiliary_bus.h>
+#include <linux/err.h>
+#include <linux/module.h>
+#include <linux/phy/phy.h>
+#include <linux/platform_device.h>
+
+static int meson_gx_hhi_sysctrl_probe(struct platform_device *pdev)
+{
+ struct phy_provider *phy_provider;
+ struct auxiliary_device *auxdev;
+ const char *phy_aux_name;
+ struct device *dev = &pdev->dev;
+
+ phy_aux_name = device_get_match_data(dev);
+ if (!phy_aux_name)
+ return dev_err_probe(dev, -ENODEV, "missing PHY match data\n");
+
+ phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
+ if (IS_ERR(phy_provider))
+ return dev_err_probe(dev, PTR_ERR(phy_provider),
+ "failed to register PHY provider\n");
+
+ auxdev = devm_auxiliary_device_create(dev, phy_aux_name, NULL);
+ if (!auxdev)
+ return dev_err_probe(dev, -ENOMEM,
+ "failed to create %s auxiliary device\n",
+ phy_aux_name);
+
+ return 0;
+}
+
+static const struct of_device_id meson_gx_hhi_sysctrl_of_match[] = {
+ { .compatible = "amlogic,meson-gxbb-hhi-sysctrl", .data = "gxbb-hdmi-phy" },
+ { .compatible = "amlogic,meson-gxl-hhi-sysctrl", .data = "gxl-hdmi-phy" },
+ { .compatible = "amlogic,meson-g12a-hhi-sysctrl", .data = "g12a-hdmi-phy" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, meson_gx_hhi_sysctrl_of_match);
+
+static struct platform_driver meson_gx_hhi_sysctrl_driver = {
+ .probe = meson_gx_hhi_sysctrl_probe,
+ .driver = {
+ .name = "meson-gx-hhi-sysctrl",
+ .of_match_table = meson_gx_hhi_sysctrl_of_match,
+ },
+};
+module_platform_driver(meson_gx_hhi_sysctrl_driver);
+
+MODULE_AUTHOR("Ronald Claveau <linux-kernel-dev@aliel.fr>");
+MODULE_DESCRIPTION("Amlogic Meson GX HHI System Controller driver");
+MODULE_LICENSE("GPL");
--
2.56.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-12-01 20:13 UTC|newest]
Thread overview: 21+ 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-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-01 20:27 ` sashiko-bot
2026-12-02 7:57 ` Neil Armstrong
2026-12-01 20:12 ` Ronald Claveau via B4 Relay [this message]
2026-12-01 20:24 ` [PATCH v6 03/13] soc: amlogic: Add Meson GX HHI system controller driver sashiko-bot
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:25 ` sashiko-bot
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:30 ` sashiko-bot
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:32 ` sashiko-bot
2026-12-01 20:13 ` [PATCH v6 13/13] arm64: dts: amlogic: Add HDMI TX PHY node for GXL Ronald Claveau via B4 Relay
2026-12-01 20:23 ` sashiko-bot
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=20261201-meson-drm-create-hdmitx-phy-v6-3-5ccdf57a6cf5@aliel.fr \
--to=devnull+linux-kernel-dev.aliel.fr@kernel.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=neil.armstrong@linaro.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®