From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB844606A33D for ; Tue, 1 Dec 2026 20:13:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=o3A1zveu; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=L3sWXw9L DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=nrYmnMGSiBMNucbS29hSA3M13qJICeGS2BuP3hi+21g=; b=o3A1zveuTTZMZUU7Owjja4Ld74 aaQtCJO71ykYcTGEmo8VQXmjBi3P8KKAT2G4gB4on6InwulSMXRZVVQRnG47gD8bTyb80ULBRTywB SgKdcWAJW+evLX0VhUBlOgguMMxK/rkLBhzAPRKuPieZoriXnJPeJrNYwgg83Lu7fTHiK5K6UiDxW gS/Qh0i6kWh0gNhXRYq46N+qicZJl84wF39JgP83nshfih/EjangQiWy3BTQLmxB/W6v+gl96gFKe 7xDFqTa2XBH+EHZrLwZn98aD7nJSbp7YuVdpCl5Wb3i6AOwVeTC2n7vQAhggNdfZKTNbYghCy45Q0 ouyTFusQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYUEd-00000009JoY-0Eh8; Tue, 01 Dec 2026 20:13:55 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYUEa-00000009JlV-2SjF; Tue, 01 Dec 2026 20:13:52 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 58649403F3; Tue, 1 Dec 2026 20:13:52 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796156031; b=bhV4LkPDgoiKo5XizKeLgp/ALmq2HN/0Yo1+HUzyFNsuSQQ6xKW0Fge3iCaFagBS0fbz 6QP/85C9oQx0m7/oVAQdawLXgJ53xKFe7qQMcpJ+u2Q5ffGUGXCOcZmSUEkC3GxQPHhUh 98SqsDYnktgGijNbJy2rOzjD72X+dwR7amYHTPPJVD4cWhKiO1Q9b+cISMsDRTQoM1xkJ bybqCnYZiEyD9AFc+d6r76kPphTY2gFp64oC7Fm/pCcMY+T2v8n95k5mU+djgxpQARt4T Pn5pMy7BcVndsThCDghR8xJUz/lENhBbhQm2Pf9sK26dGBsE9P3HoXlRvS20TVjVLOg== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796156031; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=K1MGyfpimtcaWFgniTbXZJPa3UqLMcEW6Qwlgo8uP3E=; b=Wzs/GaWGjG1G9xPIjze3uzdXVH3UiDeaDIQOn/KGIlyyNUYrJ8qmufBWU+ci1NBHpxaH LVsFkFTx3zroGduPQPFv1v1XIMDltBbQdzAsCngkbc5S8WymW+GB/EsXtcmZVmxBOytJI L0BKDDLrRh0mf/ZeyVsh06R3lgHDtYm7q+k4Uk9ckoPzZm9OydjnpOdl7EaUB+IT+r0+V JwTbmWfHnJnk2ryVGSxCm2ae/RxnlmS7B5jcSQJtF5uhx1lXc04QaO272/qi4BuhoBrjV u1ULVTrlst4qEgjcoRxGVL4YFnA9wBvXYn3KzMTowVA2e2rYWUagdN1dDyGO/KHfv6A== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id D715A1F00899; Tue, 1 Dec 2026 20:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796156031; bh=K1MGyfpimtcaWFgniTbXZJPa3UqLMcEW6Qwlgo8uP3E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=L3sWXw9L+rs1oE1h9s0nYhOmY3fvPEtyOzXlT1YnnKCFSBJlo1BWQzEv8IkA2qsBo 21cj9/Od3aGoMvCJavFKlFFthQt21Xxy03jaLxadTzUNlc089PNiMPIcL/E850ZNcM e9+YbLAdteK/2TuTE4G+7/xqM0Do3i6HXJKuctPcx69i8LFN0hi0NXFXeJdaoz9zbN 1JrYXT6V2LPGazh6ts/moqdFqBmldeGIDB7puEhupbm7tjWV3YVmAtGwl9mvq0VLSL Fj4dd6J3TUEDxRv8/fUn02LYvhCXh/lDrgsjpMc74iCDIUtgCVYPqJBTioFGHZF8jI DyeadXjBJE+Xw== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 5C8F34F074; Tue, 1 Dec 2026 20:13:41 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Tue, 01 Dec 2026 21:12:51 +0100 Subject: [PATCH v6 03/13] soc: amlogic: Add Meson GX HHI system controller driver X-Archived-By: MIME-Version: 1.0 Message-Id: <20261201-meson-drm-create-hdmitx-phy-v6-3-5ccdf57a6cf5@aliel.fr> References: <20261201-meson-drm-create-hdmitx-phy-v6-0-5ccdf57a6cf5@aliel.fr> In-Reply-To: <20261201-meson-drm-create-hdmitx-phy-v6-0-5ccdf57a6cf5@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson 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-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4268; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=HaSieu6jx4MZRg6GOCITeSl8mFrR6SkXhXM/4vst2vA=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQza/Vvz0snev/l85HiS9Wk1ntoqcv2Nbr8ErtovTjvhNa RDnj13fUcrCIMbFICumyNI/1/LEu8tHz3zdo54CM4eVCWQIAxenAEykQ4qR4f41qZTJV44sMd/2 4ZFj2QWv64Vv5n6+VPamKKnKXfLaxEiGf8aFSf5rRM/PkanbdJjN7Wx8yJJgFdUzr230NthvT5z kxwoA X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: linux-kernel-dev@aliel.fr Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Ronald Claveau 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 --- 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 + */ + +#include +#include +#include +#include +#include + +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 "); +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