devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Icenowy Zheng <uwu@icenowy.me>
To: Michal Wilczynski <m.wilczynski@samsung.com>,
	Conor Dooley <conor@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Emil Renner Berthing <kernel@esmil.dk>,
	Hal Feng <hal.feng@starfivetech.com>,
	Michael Turquette <mturquette@baylibre.com>,
	 Stephen Boyd <sboyd@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Xingyu Wu <xingyu.wu@starfivetech.com>,
	 Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	 Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	 Thomas Zimmermann <tzimmermann@suse.de>,
	Lee Jones <lee@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Maud Spierings <maudspierings@gocontroll.com>,
	 Andy Yan <andyshrk@163.com>, Heiko Stuebner <heiko@sntech.de>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-clk@vger.kernel.org, linux-phy@lists.infradead.org,
	 dri-devel@lists.freedesktop.org,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH RFC 13/13] riscv: dts: starfive: jh7110: Update DT for display subsystem
Date: Wed, 12 Nov 2025 00:07:24 +0800	[thread overview]
Message-ID: <c539eea383bb440269abd8a8d044277eebd3ef42.camel@icenowy.me> (raw)
In-Reply-To: <20251108-jh7110-clean-send-v1-13-06bf43bb76b1@samsung.com>

在 2025-11-08星期六的 02:04 +0100,Michal Wilczynski写道:
> Activate the display subsystem drivers by refactoring the device
> tree.
> 
> This change wraps the dc8200, hdmi, and voutcrg nodes within the new
> vout_subsystem node. This ensures the PD_VOUT power domain is enabled
> before the child drivers are probed.

Well a problem exist that some display muxes exist in the vout syscon.

Maybe this should be modelled in the device tree two?

> 
> The monolithic hdmi node is replaced with the hdmi_mfd (MFD parent)
> node, containing the hdmi_phy and hdmi_controller children.
> 
> The voutcrg node is updated to consume the pixel clock from the
> &hdmi_phy node instead of the old fixed-clock. The dc8200 node is
> also
> updated to get its pixel clocks from voutcrg's MUXes.
> 
> Finally, the old, incorrect hdmitx0-pixel-clock fixed-clock node is
> removed.
> 
> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
> ---
>  arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 119
> +++++++++++++++++++++++-
>  arch/riscv/boot/dts/starfive/jh7110.dtsi        | 111
> +++++++++++++++++-----
>  2 files changed, 207 insertions(+), 23 deletions(-)
> 
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> index
> 2eaf01775ef57d884b4d662af3caa83da2d2ad48..ce459e297261393a35206170704
> 1db453819885c 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> @@ -33,6 +33,25 @@ memory@40000000 {
>                 bootph-pre-ram;
>         };
>  
> +       reserved-memory {
> +               #address-cells = <2>;
> +               #size-cells = <2>;
> +               ranges;
> +
> +               /* vout applies for space from this CMA
> +                * Without this CMA reservation,
> +                * vout may not work properly.
> +                */
> +               linux,cma {
> +                       compatible = "shared-dma-pool";
> +                       reusable;
> +                       size = <0x0 0x20000000>;
> +                       alignment = <0x0 0x1000>;
> +                       alloc-ranges = <0x0 0x70000000 0x0
> 0x20000000>;
> +                       linux,cma-default;
> +               };
> +       };
> +
>         gpio-restart {
>                 compatible = "gpio-restart";
>                 gpios = <&sysgpio 35 GPIO_ACTIVE_HIGH>;
> @@ -73,12 +92,47 @@ codec {
>                         };
>                 };
>         };
> +
> +       hdmi-connector {
> +               compatible = "hdmi-connector";
> +               type = "a";
> +
> +               port {
> +                       hdmi_con_in: endpoint {
> +                               remote-endpoint = <&hdmi_out_con>;
> +                       };
> +               };
> +       };
>  };
>  
>  &cpus {
>         timebase-frequency = <4000000>;
>  };
>  
> +&dc8200 {
> +       status = "okay";
> +
> +       ports {
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +
> +               dpu_port0: port@0 {
> +                       reg = <0>;
> +                       #address-cells = <1>;
> +                       #size-cells = <0>;
> +
> +                       dpu_out_dpi0: endpoint@0 {
> +                               reg = <0>;
> +                               remote-endpoint = <&hdmi_in>;
> +                       };
> +               };
> +
> +               dpu_port1: port@1 {
> +                       reg = <1>;
> +               };
> +       };
> +};
> +
>  &dvp_clk {
>         clock-frequency = <74250000>;
>  };
> @@ -99,8 +153,31 @@ &gmac1_rmii_refin {
>         clock-frequency = <50000000>;
>  };
>  
> -&hdmitx0_pixelclk {
> -       clock-frequency = <297000000>;
> +&hdmi_controller {
> +       status = "okay";
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&hdmi_pins>;
> +
> +       ports {
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +
> +               port@0 {
> +                       reg = <0>;
> +
> +                       hdmi_in: endpoint {
> +                               remote-endpoint = <&dpu_out_dpi0>;
> +                       };
> +               };
> +
> +               hdmi_out_port: port@1 {
> +                       reg = <1>;
> +                       hdmi_out_con: endpoint {
> +                               remote-endpoint = <&hdmi_con_in>;
> +                       };
> +
> +               };
> +       };
>  };
>  
>  &i2srx_bclk_ext {
> @@ -388,6 +465,40 @@ &syscrg {
>  };
>  
>  &sysgpio {
> +       hdmi_pins: hdmi-0 {
> +               hdmi-cec-pins {
> +                       pinmux = <GPIOMUX(14, GPOUT_SYS_HDMI_CEC_SDA,
> +                                             GPOEN_SYS_HDMI_CEC_SDA,
> +                                             GPI_SYS_HDMI_CEC_SDA)>;
> +                       input-enable;
> +                       bias-pull-up;
> +               };
> +
> +               hdmi-hpd-pins {
> +                       pinmux = <GPIOMUX(15, GPOUT_HIGH,
> +                                             GPOEN_ENABLE,
> +                                             GPI_SYS_HDMI_HPD)>;
> +                       input-enable;
> +                       bias-disable; /* external pull-up */
> +               };
> +
> +               hdmi-scl-pins {
> +                       pinmux = <GPIOMUX(0, GPOUT_SYS_HDMI_DDC_SCL,
> +                                            GPOEN_SYS_HDMI_DDC_SCL,
> +                                            GPI_SYS_HDMI_DDC_SCL)>;
> +                       input-enable;
> +                       bias-pull-up;
> +               };
> +
> +               hdmi-sda-pins {
> +                       pinmux = <GPIOMUX(1, GPOUT_SYS_HDMI_DDC_SDA,
> +                                            GPOEN_SYS_HDMI_DDC_SDA,
> +                                            GPI_SYS_HDMI_DDC_SDA)>;
> +                       input-enable;
> +                       bias-pull-up;
> +               };
> +       };
> +
>         i2c0_pins: i2c0-0 {
>                 i2c-pins {
>                         pinmux = <GPIOMUX(57, GPOUT_LOW,
> @@ -677,3 +788,7 @@ &U74_3 {
>  &U74_4 {
>         cpu-supply = <&vdd_cpu>;
>  };
> +
> +&voutcrg {
> +       status = "okay";
> +};
> diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi
> b/arch/riscv/boot/dts/starfive/jh7110.dtsi
> index
> 0ba74ef046792fd63ed6cf971fa1438609b06fb1..da670a44dcec0f3dae65a2612c2
> 4b79f3cdd7d6c 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi
> @@ -283,12 +283,6 @@ gmac1_rmii_refin: gmac1-rmii-refin-clock {
>                 #clock-cells = <0>;
>         };
>  
> -       hdmitx0_pixelclk: hdmitx0-pixel-clock {
> -               compatible = "fixed-clock";
> -               clock-output-names = "hdmitx0_pixelclk";
> -               #clock-cells = <0>;
> -       };
> -
>         i2srx_bclk_ext: i2srx-bclk-ext-clock {
>                 compatible = "fixed-clock";
>                 clock-output-names = "i2srx_bclk_ext";
> @@ -344,6 +338,14 @@ tdm_ext: tdm-ext-clock {
>                 #clock-cells = <0>;
>         };
>  
> +       xin24m: xin24m {
> +               compatible = "fixed-clock";
> +               #clock-cells = <0>;
> +               clock-frequency = <24000000>;
> +               clock-output-names = "xin24m";
> +       };
> +
> +
>         soc {
>                 compatible = "simple-bus";
>                 interrupt-parent = <&plic>;
> @@ -1203,22 +1205,89 @@ camss: isp@19840000 {
>                         status = "disabled";
>                 };
>  
> -               voutcrg: clock-controller@295c0000 {
> -                       compatible = "starfive,jh7110-voutcrg";
> -                       reg = <0x0 0x295c0000 0x0 0x10000>;
> -                       clocks = <&syscrg JH7110_SYSCLK_VOUT_SRC>,
> -                                <&syscrg
> JH7110_SYSCLK_VOUT_TOP_AHB>,
> -                                <&syscrg
> JH7110_SYSCLK_VOUT_TOP_AXI>,
> -                                <&syscrg
> JH7110_SYSCLK_VOUT_TOP_HDMITX0_MCLK>,
> -                                <&syscrg JH7110_SYSCLK_I2STX0_BCLK>,
> -                                <&hdmitx0_pixelclk>;
> -                       clock-names = "vout_src", "vout_top_ahb",
> -                                     "vout_top_axi",
> "vout_top_hdmitx0_mclk",
> -                                     "i2stx0_bclk",
> "hdmitx0_pixelclk";
> -                       resets = <&syscrg
> JH7110_SYSRST_VOUT_TOP_SRC>;
> -                       #clock-cells = <1>;
> -                       #reset-cells = <1>;
> +               vout_subsystem: display-subsystem@29400000 {
> +                       compatible = "starfive,jh7110-vout-
> subsystem";
> +                       reg = <0x0 0x29400000 0x0 0x200000>;
> +                       #address-cells = <2>;
> +                       #size-cells = <2>;
> +                       ranges;
> +
>                         power-domains = <&pwrc JH7110_PD_VOUT>;
> +                       clocks = <&syscrg
> JH7110_SYSCLK_NOC_BUS_DISP_AXI>;
> +                       resets = <&syscrg
> JH7110_SYSRST_NOC_BUS_DISP_AXI>;
> +
> +                       dc8200: display@29400000 {
> +                               compatible = "verisilicon,dc";
> +                               reg = <0x0 0x29400000 0x0 0x2800>;
> +                               interrupts = <95>;
> +
> +                               clocks = <&voutcrg
> JH7110_VOUTCLK_DC8200_CORE>,
> +                                       <&voutcrg
> JH7110_VOUTCLK_DC8200_AXI>,
> +                                       <&voutcrg
> JH7110_VOUTCLK_DC8200_AHB>,
> +                                       <&voutcrg
> JH7110_VOUTCLK_DC8200_PIX0>,
> +                                       <&voutcrg
> JH7110_VOUTCLK_DC8200_PIX1>;
> +                               clock-names = "core", "axi", "ahb",
> "pix0", "pix1";
> +
> +                               resets = <&voutcrg
> JH7110_VOUTRST_DC8200_CORE>,
> +                                        <&voutcrg
> JH7110_VOUTRST_DC8200_AXI>,
> +                                        <&voutcrg
> JH7110_VOUTRST_DC8200_AHB>;
> +                               reset-names = "core", "axi", "ahb";
> +                       };
> +
> +                       hdmi_mfd: hdmi@29590000 {
> +                               compatible = "starfive,jh7110-hdmi-
> mfd";
> +                               reg = <0x0 0x29590000 0x0 0x4000>;
> +
> +                               hdmi_phy: phy {
> +                                       compatible =
> "starfive,jh7110-inno-hdmi-phy";
> +
> +                                       clocks = <&xin24m>;
> +                                       clock-names = "refoclk";
> +
> +                                       /* Output clock: The variable
> pixel clock */
> +                                       #clock-cells = <0>;
> +                                       clock-output-names =
> "hdmi_pclk";
> +
> +                                       /* PHY provider for the
> controller */
> +                                       #phy-cells = <0>;
> +                               };
> +
> +                               hdmi_controller: controller {
> +                                       compatible =
> "starfive,jh7110-inno-hdmi-controller";
> +                                       interrupts = <99>;
> +
> +                                       clocks = <&voutcrg
> JH7110_VOUTCLK_HDMI_TX_SYS>,
> +                                                <&voutcrg
> JH7110_VOUTCLK_HDMI_TX_MCLK>,
> +                                                <&voutcrg
> JH7110_VOUTCLK_HDMI_TX_BCLK>,
> +                                                <&hdmi_phy>;
> +                                       clock-names = "sys", "mclk",
> "bclk", "pclk";
> +
> +                                       resets = <&voutcrg
> JH7110_VOUTRST_HDMI_TX_HDMI>;
> +                                       reset-names = "hdmi_tx";
> +
> +                                       phys = <&hdmi_phy>;
> +                                       phy-names = "hdmi-phy";
> +                               };
> +                       };
> +
> +                       voutcrg: clock-controller@295c0000 {
> +                               compatible = "starfive,jh7110-
> voutcrg";
> +                               reg = <0x0 0x295c0000 0x0 0x10000>;
> +
> +                               clocks = <&syscrg
> JH7110_SYSCLK_VOUT_SRC>,
> +                                        <&syscrg
> JH7110_SYSCLK_VOUT_TOP_AHB>,
> +                                        <&syscrg
> JH7110_SYSCLK_VOUT_TOP_AXI>,
> +                                        <&syscrg
> JH7110_SYSCLK_VOUT_TOP_HDMITX0_MCLK>,
> +                                        <&syscrg
> JH7110_SYSCLK_I2STX0_BCLK>,
> +                                        <&hdmi_phy>;
> +                               clock-names = "vout_src",
> "vout_top_ahb",
> +                                             "vout_top_axi",
> "vout_top_hdmitx0_mclk",
> +                                             "i2stx0_bclk",
> "hdmitx0_pixelclk";
> +
> +                               resets = <&syscrg
> JH7110_SYSRST_VOUT_TOP_SRC>;
> +                               #clock-cells = <1>;
> +                               #reset-cells = <1>;
> +                       };
>                 };
>  
>                 pcie0: pcie@940000000 {
> 


  reply	other threads:[~2025-11-11 16:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20251108010451eucas1p1c7bf340dbd2b1b7cbfb53d6debce7a2e@eucas1p1.samsung.com>
2025-11-08  1:04 ` [PATCH RFC 00/13] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
     [not found]   ` <CGME20251108010453eucas1p2403ec0dd2c69ae7f3eabe19cf686f345@eucas1p2.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 01/13] dt-bindings: soc: starfive: Add vout-subsystem IP block Michal Wilczynski
2025-11-11 18:18       ` Conor Dooley
2025-11-11 18:36         ` Conor Dooley
2025-11-12  6:34           ` Icenowy Zheng
2025-11-12 18:36             ` Conor Dooley
2025-11-13  0:48               ` Icenowy Zheng
2025-11-13 19:44                 ` Conor Dooley
2025-11-14  7:06                   ` Icenowy Zheng
     [not found]   ` <CGME20251108010454eucas1p103697b195125d853bd9f4d40662b681e@eucas1p1.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 02/13] dt-bindings: clock: jh7110: Make power-domain optional Michal Wilczynski
2025-11-11 18:26       ` Conor Dooley
     [not found]   ` <CGME20251108010456eucas1p2a8b17a5c7403ce133e8ed2dd3481c4f0@eucas1p2.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 03/13] dt-bindings: phy: Add starfive,jh7110-inno-hdmi-phy Michal Wilczynski
     [not found]   ` <CGME20251108010458eucas1p11d128a6dd0aab3171db7c001e69ecfc8@eucas1p1.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 04/13] dt-bindings: display: bridge: Add starfive,jh7110-hdmi-controller Michal Wilczynski
2025-11-11 18:23       ` Conor Dooley
     [not found]   ` <CGME20251108010500eucas1p1c8b73311765e359bea891ec783237910@eucas1p1.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 05/13] dt-bindings: mfd: Add starfive,jh7110-hdmi-mfd Michal Wilczynski
2025-11-11 18:29       ` Conor Dooley
     [not found]   ` <CGME20251108010501eucas1p1357090a298d586f1843280ac7f37178a@eucas1p1.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 06/13] drm: bridge: inno_hdmi: Refactor to support regmap and probe Michal Wilczynski
     [not found]   ` <CGME20251108010503eucas1p1be26568a176a11990d8d89487531803d@eucas1p1.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 07/13] drm: bridge: inno_hdmi: Add .disable platform operation Michal Wilczynski
     [not found]   ` <CGME20251108010504eucas1p26e8ee9aa88ab75bebd832eaea81720e9@eucas1p2.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 08/13] soc: starfive: Add jh7110-vout-subsystem driver Michal Wilczynski
2025-11-10 19:25       ` Conor Dooley
     [not found]   ` <CGME20251108010506eucas1p233e03b70f074720a659b5e3862f61905@eucas1p2.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 09/13] soc: starfive: Add jh7110-hdmi-mfd driver Michal Wilczynski
     [not found]   ` <CGME20251108010507eucas1p2aa5a2604f24e4cee2c116dd35f1132d5@eucas1p2.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 10/13] clk: starfive: voutcrg: Update the voutcrg Michal Wilczynski
     [not found]   ` <CGME20251108010509eucas1p1cabce45ee13f19249da4898088088146@eucas1p1.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 11/13] drm: bridge: starfive: Add hdmi-controller driver Michal Wilczynski
     [not found]   ` <CGME20251108010511eucas1p19bca04c74545fd6019de671cbf0413f5@eucas1p1.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 12/13] phy: starfive: Add jh7110-inno-hdmi-phy driver Michal Wilczynski
     [not found]   ` <CGME20251108010512eucas1p11f3e192a7b174f8585c98cb2efe68689@eucas1p1.samsung.com>
2025-11-08  1:04     ` [PATCH RFC 13/13] riscv: dts: starfive: jh7110: Update DT for display subsystem Michal Wilczynski
2025-11-11 16:07       ` Icenowy Zheng [this message]
2025-11-10 19:35   ` [PATCH RFC 00/13] drm: starfive: jh7110: Enable " Conor Dooley
2025-11-11 15:33     ` Michal Wilczynski
2025-11-11 18:14       ` Conor Dooley
2025-11-11 18:37         ` Conor Dooley
2025-11-13 14:57           ` Michal Wilczynski
2025-11-22 11:42             ` Michal Wilczynski

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=c539eea383bb440269abd8a8d044277eebd3ef42.camel@icenowy.me \
    --to=uwu@icenowy.me \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=alex@ghiti.fr \
    --cc=andrzej.hajda@intel.com \
    --cc=andyshrk@163.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hal.feng@starfivetech.com \
    --cc=heiko@sntech.de \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@esmil.dk \
    --cc=kishon@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.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=m.szyprowski@samsung.com \
    --cc=m.wilczynski@samsung.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maudspierings@gocontroll.com \
    --cc=mripard@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=vkoul@kernel.org \
    --cc=xingyu.wu@starfivetech.com \
    /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;
as well as URLs for NNTP newsgroup(s).