mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Icenowy Zheng <zhengxingda@iscas.ac.cn>
To: Michal Wilczynski <m.wilczynski@samsung.com>,
	Vinod Koul <vkoul@kernel.org>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski	 <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Andrzej Hajda	 <andrzej.hajda@intel.com>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart	 <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Maarten Lankhorst	 <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	 Thomas Zimmermann <tzimmermann@suse.de>,
	Lee Jones <lee@kernel.org>, Andy Yan <andy.yan@rock-chips.com>,
	Philipp Zabel	 <p.zabel@pengutronix.de>,
	Emil Renner Berthing <kernel@esmil.dk>,
	Hal Feng	 <hal.feng@starfivetech.com>,
	Michael Turquette <mturquette@baylibre.com>,
	 Stephen Boyd <sboyd@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>, Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	 Dominique Belhachemi	 <db@domibel.de>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet	 <jbrunet+clk@baylibre.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	mfd@lists.linux.dev, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	linux-riscv@lists.infradead.org,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Maud Spierings" <maud_spierings@murena.io>,
	"Graham Markall" <hello@big-grey.co.uk>,
	"Chaoyi Chen" <chaoyi.chen@rock-chips.com>,
	"Joshua Peisach" <jpeisach@ubuntu.com>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Subject: Re: [PATCH v4 12/20] soc: starfive: Add jh7110-hdmi-subsystem driver
Date: Tue, 29 Sep 2026 23:04:57 +0800	[thread overview]
Message-ID: <fa05718e4767b44b3d4530533b48391562d0f614.camel@iscas.ac.cn> (raw)
In-Reply-To: <20260915-jh7110-clean-send-v4-12-f0e4fd6f2cc8@samsung.com>

在 2026-09-15二的 17:32 +0200,Michal Wilczynski写道:
> Add the parent driver for the monolithic JH7110 HDMI IP block.
> 
> This driver binds to the starfive,jh7110-hdmi-subsystem node. It maps
> the
> shared register block, creates a regmap, and calls
> devm_of_platform_populate() to create its hdmi_phy and
> hdmi_controller
> child devices, which retrieve the shared regmap from this parent.
> 
> The NoC display bus clock and reset that gate access to this region,
> and
> the PD_VOUT power domain it sits in, are held by the video output
> subsystem parent for as long as this device exists, so there is
> nothing
> for this driver to bring up itself.
> 
> Co-developed-by: Dominique Belhachemi <db@domibel.de>
> Signed-off-by: Dominique Belhachemi <db@domibel.de>
> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>

```
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
```

Thanks,
Icenowy

> ---
>  drivers/soc/Kconfig                          |  1 +
>  drivers/soc/Makefile                         |  1 +
>  drivers/soc/starfive/Kconfig                 | 28 +++++++++++
>  drivers/soc/starfive/Makefile                |  2 +
>  drivers/soc/starfive/jh7110-hdmi-subsystem.c | 73
> ++++++++++++++++++++++++++++
>  5 files changed, 105 insertions(+)
> 
> diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig
> index
> a2d65adffb8052c0ac5a6b60bf33fa9c644701bb..b3b01fc38139d98076c14f626a4
> 2ae3b7ef7c5d6 100644
> --- a/drivers/soc/Kconfig
> +++ b/drivers/soc/Kconfig
> @@ -24,6 +24,7 @@ source "drivers/soc/renesas/Kconfig"
>  source "drivers/soc/rockchip/Kconfig"
>  source "drivers/soc/samsung/Kconfig"
>  source "drivers/soc/sophgo/Kconfig"
> +source "drivers/soc/starfive/Kconfig"
>  source "drivers/soc/sunxi/Kconfig"
>  source "drivers/soc/tegra/Kconfig"
>  source "drivers/soc/ti/Kconfig"
> diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile
> index
> c9e689080ceb759384f690c2b65a82b3cb451c74..009f85ff891a15e0455f92c5d5a
> 4059d8b1fcd3f 100644
> --- a/drivers/soc/Makefile
> +++ b/drivers/soc/Makefile
> @@ -30,6 +30,7 @@ obj-y				+= renesas/
>  obj-y				+= rockchip/
>  obj-$(CONFIG_SOC_SAMSUNG)	+= samsung/
>  obj-y				+= sophgo/
> +obj-y				+= starfive/
>  obj-y				+= sunxi/
>  obj-$(CONFIG_ARCH_TEGRA)	+= tegra/
>  obj-y				+= ti/
> diff --git a/drivers/soc/starfive/Kconfig
> b/drivers/soc/starfive/Kconfig
> new file mode 100644
> index
> 0000000000000000000000000000000000000000..e738638ab0f755fbbabca259264
> abb56f3b6101f
> --- /dev/null
> +++ b/drivers/soc/starfive/Kconfig
> @@ -0,0 +1,28 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +#
> +# Starfive SoC drivers
> +#
> +
> +if ARCH_STARFIVE || COMPILE_TEST
> +menu "Starfive SoC drivers"
> +
> +config SOC_STARFIVE_JH7110_HDMI_SUBSYSTEM
> +	tristate "StarFive JH7110 HDMI subsystem driver"
> +	depends on OF
> +	select REGMAP_MMIO
> +	help
> +	  This option enables the parent driver
> +	  for the monolithic StarFive JH7110 HDMI peripheral.
> +
> +	  The JH7110 HDMI IP block contains both the digital
> controller
> +	  (DRM bridge) and the analog PHY (clock/phy provider) logic
> within
> +	  a single shared register space.
> +
> +	  This driver acts as a wrapper. Its only job is to map the
> +	  shared registers and create separate logical child devices
> +	  for the "PHY" and the "controller". This is required to
> +	  correctly manage resources and break a circular clock
> dependency
> +	  between the PHY and the VOUT clock generator at probe
> time.
> +
> +endmenu
> +endif
> diff --git a/drivers/soc/starfive/Makefile
> b/drivers/soc/starfive/Makefile
> new file mode 100644
> index
> 0000000000000000000000000000000000000000..be89d8119212b7a7038817c2f0e
> 8eac1984ada88
> --- /dev/null
> +++ b/drivers/soc/starfive/Makefile
> @@ -0,0 +1,2 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +obj-$(CONFIG_SOC_STARFIVE_JH7110_HDMI_SUBSYSTEM) += jh7110-hdmi-
> subsystem.o
> diff --git a/drivers/soc/starfive/jh7110-hdmi-subsystem.c
> b/drivers/soc/starfive/jh7110-hdmi-subsystem.c
> new file mode 100644
> index
> 0000000000000000000000000000000000000000..e64a22263045935ae69541cf8a1
> 44f6128170c11
> --- /dev/null
> +++ b/drivers/soc/starfive/jh7110-hdmi-subsystem.c
> @@ -0,0 +1,73 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Driver for the StarFive JH7110 HDMI subsystem
> + *
> + * Copyright (c) 2025 Samsung Electronics Co., Ltd.
> + * Author: Michal Wilczynski <m.wilczynski@samsung.com>
> + *
> + * This driver binds to the monolithic HDMI block and creates
> separate
> + * logical platform devices for the HDMI Controller (bridge) and the
> + * HDMI PHY (clock/phy provider), allowing them to share a single
> regmap
> + * and breaking the probing circular dependency.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/of_platform.h>
> +#include <linux/platform_device.h>
> +#include <linux/regmap.h>
> +
> +static const struct regmap_config starfive_hdmi_regmap_config = {
> +	.reg_bits = 32,
> +	.val_bits = 8,
> +	.max_register = 0x3fff,
> +};
> +
> +static int starfive_hdmi_subsys_probe(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct regmap *regmap;
> +	void __iomem *regs;
> +	int ret;
> +
> +	/*
> +	 * The NoC display bus clock and reset that gate access to
> this region,
> +	 * and the PD_VOUT power domain it sits in, are held by the
> video
> +	 * output subsystem parent for as long as this device
> exists.
> +	 */
> +	regs = devm_platform_ioremap_resource(pdev, 0);
> +	if (IS_ERR(regs))
> +		return PTR_ERR(regs);
> +
> +	regmap = devm_regmap_init_mmio(dev, regs,
> +				      
> &starfive_hdmi_regmap_config);
> +	if (IS_ERR(regmap))
> +		return dev_err_probe(dev, PTR_ERR(regmap),
> +				     "Failed to init shared
> regmap\n");
> +
> +	ret = devm_of_platform_populate(dev);
> +	if (ret)
> +		return dev_err_probe(dev, ret,
> +				     "Failed to populate child
> devices\n");
> +
> +	return 0;
> +}
> +
> +static const struct of_device_id starfive_hdmi_subsys_of_match[] = {
> +	{ .compatible = "starfive,jh7110-hdmi-subsystem", },
> +	{ /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, starfive_hdmi_subsys_of_match);
> +
> +static struct platform_driver starfive_hdmi_subsys_driver = {
> +	.probe = starfive_hdmi_subsys_probe,
> +	.driver = {
> +		.name = "starfive-hdmi-subsystem",
> +		.of_match_table = starfive_hdmi_subsys_of_match,
> +	},
> +};
> +module_platform_driver(starfive_hdmi_subsys_driver);
> +
> +MODULE_AUTHOR("Michal Wilczynski <m.wilczynski@samsung.com>");
> +MODULE_DESCRIPTION("StarFive JH7110 HDMI subsystem Driver");
> +MODULE_LICENSE("GPL");


  reply	other threads:[~2026-09-29 15:05 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260915153213eucas1p148f013af239a334fc78cdc249c0f8a61@eucas1p1.samsung.com>
2026-09-15 15:32 ` [PATCH v4 00/20] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
     [not found]   ` <CGME20260915153214eucas1p2b548f3236ef98fb0cbf320e397420125@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 01/20] dt-bindings: phy: Add starfive,jh7110-inno-hdmi-phy Michal Wilczynski
2026-09-17  6:51       ` Krzysztof Kozlowski
2026-09-18  0:34         ` Joshua Peisach
2026-09-18  6:16           ` Krzysztof Kozlowski
2026-09-18  6:21             ` Icenowy Zheng
2026-09-18  6:41               ` Krzysztof Kozlowski
2026-09-25 21:27             ` Michal Wilczynski
2026-09-25 21:05         ` Michal Wilczynski
2026-09-30 11:01           ` Krzysztof Kozlowski
2026-10-03 15:36             ` Michal Wilczynski
2026-10-03 20:45               ` Krzysztof Kozlowski
2026-10-03 22:35                 ` Michal Wilczynski
2026-10-04  7:15                   ` Krzysztof Kozlowski
2026-10-05  7:27                   ` Icenowy Zheng
     [not found]   ` <CGME20260915153216eucas1p2388b49e6b4c064ea49639d21f987e05e@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 02/20] dt-bindings: display: bridge: Add starfive,jh7110-inno-hdmi-controller Michal Wilczynski
     [not found]   ` <CGME20260915153218eucas1p278c4870936afe1aaa52438660418f8c8@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 03/20] dt-bindings: mfd: Add starfive,jh7110-hdmi-subsystem Michal Wilczynski
2026-09-17  6:54       ` Krzysztof Kozlowski
2026-09-28 18:34         ` Michal Wilczynski
     [not found]   ` <CGME20260915153220eucas1p1f5b0e03015500d9d66db8993426c8734@eucas1p1.samsung.com>
2026-09-15 15:32     ` [PATCH v4 04/20] dt-bindings: soc: starfive: Add starfive,jh7110-vout-syscon Michal Wilczynski
2026-09-17  6:55       ` Krzysztof Kozlowski
     [not found]   ` <CGME20260915153222eucas1p213b95b05ea7eb9a18700af8888ef5a44@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 05/20] dt-bindings: display: verisilicon: Add starfive,jh7110-dc8200 Michal Wilczynski
2026-09-18  5:58       ` Icenowy Zheng
2026-09-27 15:26         ` Michal Wilczynski
     [not found]   ` <CGME20260915153224eucas1p1c19b20f6af600b1c3228a9a8f4bb4490@eucas1p1.samsung.com>
2026-09-15 15:32     ` [PATCH v4 06/20] dt-bindings: soc: starfive: Add starfive,jh7110-vout-subsystem Michal Wilczynski
2026-09-24 15:30       ` Rob Herring (Arm)
     [not found]   ` <CGME20260915153226eucas1p1d69e9e853b4b5cfb1d42c2c585b57f95@eucas1p1.samsung.com>
2026-09-15 15:32     ` [PATCH v4 07/20] drm/bridge: inno-hdmi: Split probe out of bind Michal Wilczynski
     [not found]   ` <CGME20260915153227eucas1p2c51b87dc8da5d9dfacd6db6bb7d6774e@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 08/20] drm/bridge: inno-hdmi: Allow the register map to come from a parent Michal Wilczynski
     [not found]   ` <CGME20260915153229eucas1p2d1b02b6f3871d6b536f678b9ea293c1c@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 09/20] drm/bridge: inno-hdmi: Add .disable platform operation Michal Wilczynski
     [not found]   ` <CGME20260915153231eucas1p1e106fee2d6f7db2aa8bb93d18d0f5dc1@eucas1p1.samsung.com>
2026-09-15 15:32     ` [PATCH v4 10/20] drm/bridge: inno-hdmi: Add .mode_valid " Michal Wilczynski
     [not found]   ` <CGME20260915153233eucas1p2e26a6953a31c5f836aeaed03a4ae325e@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 11/20] drm/bridge: inno-hdmi: Make the PHY configuration table optional Michal Wilczynski
     [not found]   ` <CGME20260915153234eucas1p221dd53b5f1bccb6228c0a5a7d0be8394@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 12/20] soc: starfive: Add jh7110-hdmi-subsystem driver Michal Wilczynski
2026-09-29 15:04       ` Icenowy Zheng [this message]
     [not found]   ` <CGME20260915153236eucas1p1712930425e569f894c870299f245e99f@eucas1p1.samsung.com>
2026-09-15 15:32     ` [PATCH v4 13/20] soc: starfive: Add jh7110-vout-subsystem driver Michal Wilczynski
2026-09-29 15:04       ` Icenowy Zheng
     [not found]   ` <CGME20260915153238eucas1p29917a31d10ce1aa55c1dcb44b62180f9@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 14/20] clk: starfive: jh7110-vout: Allow pixel clock rate propagation Michal Wilczynski
     [not found]   ` <CGME20260915153241eucas1p292a3312a0ca8aed99cc416c0e01c3b66@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 15/20] drm/bridge: starfive: Add JH7110 HDMI controller driver Michal Wilczynski
2026-09-29 15:03       ` Icenowy Zheng
     [not found]   ` <CGME20260915153242eucas1p1394a6a5e272f106b9cab2a0f709ddeb8@eucas1p1.samsung.com>
2026-09-15 15:32     ` [PATCH v4 16/20] phy: Add common Innosilicon HDMI PHY helpers Michal Wilczynski
2026-10-03 14:22       ` Vinod Koul
     [not found]   ` <CGME20260915153244eucas1p180f69e8f957a5c615d3c6a59a1c205b2@eucas1p1.samsung.com>
2026-09-15 15:32     ` [PATCH v4 17/20] phy: rockchip: inno-hdmi: Use the common Innosilicon " Michal Wilczynski
     [not found]   ` <CGME20260915153246eucas1p289987fd8757c89ff865c99b6465708a8@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 18/20] phy: starfive: Add jh7110-inno-hdmi-phy driver Michal Wilczynski
2026-09-26  3:31       ` Dominique Belhachemi
2026-09-27 12:05         ` Michal Wilczynski
     [not found]   ` <CGME20260915153248eucas1p27d8d2c9fa536bbd951e0102b04416dad@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 19/20] riscv: dts: starfive: jh7110: Update DT for display subsystem Michal Wilczynski
2026-09-29 15:06       ` Icenowy Zheng
     [not found]   ` <CGME20260915153250eucas1p2132ca4040b3c35a3aed471cb816b7857@eucas1p2.samsung.com>
2026-09-15 15:32     ` [PATCH v4 20/20] MAINTAINERS: Add StarFive JH7110 display subsystem entry Michal Wilczynski
2026-09-16  0:45   ` [PATCH v4 00/20] drm: starfive: jh7110: Enable display subsystem Joshua Peisach
2026-09-17 17:22     ` Michal Wilczynski
2026-09-18 15:32       ` Joshua Peisach
2026-09-27 12:24         ` Michal Wilczynski
2026-09-20  6:09   ` Byron Stanoszek
2026-09-20  7:35     ` Icenowy Zheng
2026-09-25 20:09       ` Michal Wilczynski
2026-09-25 13:55   ` (subset) " Brian Masney

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=fa05718e4767b44b3d4530533b48391562d0f614.camel@iscas.ac.cn \
    --to=zhengxingda@iscas.ac.cn \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=alex@ghiti.fr \
    --cc=andrzej.hajda@intel.com \
    --cc=andy.yan@rock-chips.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bmasney+clk@redhat.com \
    --cc=chaoyi.chen@rock-chips.com \
    --cc=conor+dt@kernel.org \
    --cc=db@domibel.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hal.feng@starfivetech.com \
    --cc=heiko@sntech.de \
    --cc=hello@big-grey.co.uk \
    --cc=jbrunet+clk@baylibre.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=jpeisach@ubuntu.com \
    --cc=kernel@esmil.dk \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=m.szyprowski@samsung.com \
    --cc=m.wilczynski@samsung.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maud_spierings@murena.io \
    --cc=mfd@lists.linux.dev \
    --cc=mripard@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=u.kleine-koenig@baylibre.com \
    --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®