Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: 楊智成 <jason98166@gmail.com>
Cc: 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>,
	Heiko Stuebner <heiko@sntech.de>,
	Guochun Huang <hero.huang@rock-chips.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Michael Riesch <michael.riesch@collabora.com>,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/7] dt-bindings: phy: Add PHY_TYPE_DSI and PHY_TYPE_CSI definitions
Date: Thu, 3 Sep 2026 11:50:15 +0200	[thread overview]
Message-ID: <8e10a8c0-3648-47b5-9131-a1abdd7eb8c5@kernel.org> (raw)
In-Reply-To: <CAPwA33K+XSRPDzv9xAcoPneUsp6A9OTwakJ1VJY=zXnHiH+5Wg@mail.gmail.com>

On 28/08/2026 11:35, 楊智成 wrote:
> Hi Krzysztof,
> 
> Thanks for the review.
> 
> (from the review of 2/7)
> 
>> Please link/show the upstream DTS using simultaneously transmitter and
>> receiver, where the consumer does not know with whom is it talking to.
> 
> I grepped the tree and found a device tree that has simultaneously
> transmitter and receiver. In the arch/arm/boot/dts/samsung/*,
> exynos4412-midas.dtsi enables csis_0, and exynos4412-galaxy-s3.dtsi, which
> includes it, enables dsi_0. Both consumers are declared in exynos4.dtsi,
> on the same phy node:
> 
>     dsi_0:  phys = <&mipi_phy 1>;
>     csis_0: phys = <&mipi_phy 0>;
> 
> Tracing that back, the provider is
> Documentation/devicetree/bindings/phy/samsung,mipi-video-phy.yaml and
> drivers/phy/samsung/phy-exynos-mipi-video.c.
> It registers several struct phy in one node, and the binding says:

Please do not bring 15 year old code as example how this should or could
be done.

And in Samsung - what makes you thinking this is the same phy? It's just
way how it was represented in PMU, which is controlling power of entire
SoC, including MIPI PHY0 and PHY1, even though there is only one device
node in the code. Why taking some random anti-pattern into discussion
here, really...

I want to see your upstream DTS code.


> 
>       For samsung,s5pv210-mipi-video-phy compatible PHYs the second cell in the
>       PHY specifier identifies the PHY and its meaning is as follows::
>         0 - MIPI CSIS 0,
>         1 - MIPI DSIM 0,
>         2 - MIPI CSIS 1,
>         3 - MIPI DSIM 1.
> 
> Resuming from the cover letter in v4, I treat this phy as one tx phy and one
> rx phy. Maybe I can follow this pattern and introduce phy 0 and phy 1 in
> rockchip,rk3588-mipi-dcphy.yaml, and add an enum for
> SAMSUNG_MIPI_DCPHY_TX/RX in the driver. The binding would then say:

But why is this one phy? Describe your hardware, show some diagrams from
user manual etc.


> 
>       Two cells select the mode and then one of the two PHYs that the
>       block contains:
>         0 - the transmitter, for a MIPI DSI host
>         1 - the receiver, for a MIPI CSI-2 host
> 
>       A single cell is equivalent to a second cell of 0.
> 
> In this way, I don't need to add PHY_TYPE_CSI/DSI to
> include/dt-bindings/phy/phy.h.
> And I think this will not go against the discussion in v2, where Michael pointed
> out that DSI and CSI are standard protocols and should not be named in
> a Rockchip
> specific header, and suggested introducing PHY_TYPE_CSI/DSI:
> 
>> How is that Rockchip specific? As you state above this is either MIPI
>> CSI or MIPI DSI, two perfectly standard protocols.
>>
>> @all Would it be reasonable to introduce PHY_TYPE_CSI and PHY_TYPE_DSI?
> 
> https://lore.kernel.org/r/82da3622-9c3a-454c-87bc-fb4ec7adb68d@collabora.com
> 
>> Where is any DTS using it? I did a search and no results of upstream
>> posting.
> 
> The user will be rk3588-base.dtsi. It adds csi0/1, which connect back
> to the existing vicap_mipi0/1 ports. It also sets #phy-cells

"Will" does not work that much because I doubt correctness of your
design and that DTS might never be sent upstream.

Post your complete upstream DTS.


Best regards,
Krzysztof

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2026-09-03  9:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 12:02 [PATCH v4 0/7] phy: rockchip-samsung-dcphy: Add the MIPI D-PHY receiver Jason Yang via B4 Relay
2026-08-21 12:02 ` [PATCH v4 1/7] dt-bindings: phy: Add PHY_TYPE_DSI and PHY_TYPE_CSI definitions Jason Yang via B4 Relay
2026-08-27 11:45   ` Krzysztof Kozlowski
2026-08-28  9:35     ` 楊智成
2026-09-03  9:50       ` Krzysztof Kozlowski [this message]
2026-08-31 11:32     ` Michael Riesch
2026-09-03  9:53       ` Krzysztof Kozlowski
2026-09-03 14:37         ` Michael Riesch
2026-08-21 12:02 ` [PATCH v4 2/7] dt-bindings: phy: rockchip,rk3588-mipi-dcphy: Allow DSI and CSI consumers Jason Yang via B4 Relay
2026-08-27 11:47   ` Krzysztof Kozlowski
2026-08-21 12:02 ` [PATCH v4 3/7] phy: rockchip-samsung-dcphy: Move block-level setup to runtime resume Jason Yang via B4 Relay
2026-08-21 12:02 ` [PATCH v4 4/7] phy: rockchip-samsung-dcphy: Name the transmitter helpers and ops Jason Yang via B4 Relay
2026-08-21 12:02 ` [PATCH v4 5/7] phy: rockchip-samsung-dcphy: Factor the transmitter teardown into a helper Jason Yang via B4 Relay
2026-08-21 12:02 ` [PATCH v4 6/7] phy: rockchip-samsung-dcphy: Add a second PHY for the receiver Jason Yang via B4 Relay
2026-08-21 12:02 ` [PATCH v4 7/7] phy: rockchip-samsung-dcphy: Add MIPI D-PHY receiver support Jason Yang 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=8e10a8c0-3648-47b5-9131-a1abdd7eb8c5@kernel.org \
    --to=krzk@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=hero.huang@rock-chips.com \
    --cc=jason98166@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=michael.riesch@collabora.com \
    --cc=neil.armstrong@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.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