From: "Heiko Stübner" <heiko@sntech.de>
To: Damon Ding <damon.ding@rock-chips.com>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
rfoss@kernel.org, vkoul@kernel.org,
sebastian.reichel@collabora.com,
cristian.ciocaltea@collabora.com, l.stach@pengutronix.de,
andy.yan@rock-chips.com, hjc@rock-chips.com,
algea.cao@rock-chips.com, kever.yang@rock-chips.com,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-phy@lists.infradead.org
Subject: Re: [PATCH v1 04/10] phy: phy-rockchip-samsung-hdptx: Add support for eDP mode
Date: Sat, 30 Nov 2024 21:25:12 +0100 [thread overview]
Message-ID: <2886747.Y6S9NjorxK@diego> (raw)
In-Reply-To: <6e1f35c0-5ea8-414f-b3ea-4e7222c605ef@rock-chips.com>
Hi Damon,
Am Freitag, 29. November 2024, 03:43:57 CET schrieb Damon Ding:
> On 2024/11/27 19:04, Heiko Stübner wrote:
> > Am Mittwoch, 27. November 2024, 12:00:10 CET schrieb Damon Ding:
> >> On 2024/11/27 17:29, Heiko Stübner wrote:
> >>> Am Mittwoch, 27. November 2024, 08:51:51 CET schrieb Damon Ding:
> >>>> +static int rk_hdptx_phy_set_mode(struct phy *phy, enum phy_mode mode,
> >>>> + int submode)
> >>>> +{
> >>>> + return 0;
> >>>> +}
> >>>
> >>> I think it might make sense to go the same way as the DCPHY and also
> >>> naneng combophy, to use #phy-cells = 1 to select the phy-mode via DT .
> >>>
> >>> See [0] for Sebastians initial suggestion regarding the DC-PHY.
> >>> The naneng combophy already uses that scheme of mode-selection too.
> >>>
> >>> There is of course the issue of backwards-compatibility, but that can be
> >>> worked around in the binding with something like:
> >>>
> >>> '#phy-cells':
> >>> enum: [0, 1]
> >>> description: |
> >>> If #phy-cells is 0, PHY mode is set to PHY_TYPE_HDMI
> >>> If #phy-cells is 1 mode is set in the PHY cells. Supported modes are:
> >>> - PHY_TYPE_HDMI
> >>> - PHY_TYPE_DP
> >>> See include/dt-bindings/phy/phy.h for constants.
> >>>
> >>> PHY_TYPE_HDMI needs to be added to include/dt-bindings/phy/phy.h
> >>> but PHY_TYPE_DP is already there.
> >>>
> >>> That way we would standardize on one form of accessing phy-types
> >>> on rk3588 :-) .
> >>>
> >>> Also see the Mediatek CSI rx phy doing this too already [1]
> >>>
> >>>
> >>> Heiko
> >>>
> >>> [0] https://lore.kernel.org/linux-rockchip/udad4qf3o7kt45nuz6gxsvsmprh4rnyfxfogopmih6ucznizih@7oj2jrnlfonz/
> >>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/phy/mediatek,mt8365-csi-rx.yaml
> >>>
> >>
> >> It is really a nice way to separate HDMI and DP modes.
>
> I apologize for reopening the discussion about the phy-types setting.
there is definitly no need to apologize. We're trying to find the best
solution afterall :-) .
> With the .set_mode() of struct phy_ops, the HDMI and eDP dynamic
> switching can be achieved, which just depends on the right setting of
> enum phy_mode in include/linux/phy/phy.h. So the previous way of
> configuring phy mode may be also good.
I think the deciding factor is, is there a use-case for needing to switch
modes at runtime.
I do think the mode for the dc-phy and also the hdptx-phy is pretty much
decided by the board design.
I.e. when you end up in a DP-connector (or eDP-panel) on your board you
need DP mode, and when you end up in a hdmi-connector you need the
HDMI phy mode.
So I think the phy-mode for the hdptx-phy is largely dictated by the static
board definition (like devicetree), hence going with the dt-argument for
the mode.
Like similar to the Naneng combophy, selecting its mode via argument
because deciding if it ends up in a sata port is a board-design thing.
Is there a use-case where you need to switch at runtime between
hdmi and eDP? Like starting the phy in eDP mode but then needing
to switch to HDMI mode, while the device is running?
> And other phys may want to support dynamic switching too, like the
> Rockchip USBDP combo phy.
I guess USBDP is special in that in also does both modes dynamical
depending on its use (like type-c with option DP altmode)
Have a great weekend
Heiko
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2024-11-30 20:26 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 7:51 [PATCH v1 00/10] Add eDP support for RK3588 Damon Ding
2024-11-27 7:51 ` [PATCH v1 01/10] drm/rockchip: analogix_dp: Use formalized struct definition for grf field Damon Ding
2024-11-27 7:51 ` [PATCH v1 02/10] dt-bindings: display: rockchip: analogix-dp: Add support for RK3588 Damon Ding
2024-11-27 10:23 ` Krzysztof Kozlowski
2024-12-02 2:03 ` Damon Ding
2024-11-27 7:51 ` [PATCH v1 03/10] drm/rockchip: analogix_dp: " Damon Ding
2024-11-27 7:51 ` [PATCH v1 04/10] phy: phy-rockchip-samsung-hdptx: Add support for eDP mode Damon Ding
2024-11-27 9:29 ` Heiko Stübner
2024-11-27 11:00 ` Damon Ding
2024-11-27 11:04 ` Heiko Stübner
2024-11-29 2:43 ` Damon Ding
2024-11-30 20:25 ` Heiko Stübner [this message]
2024-12-01 22:59 ` Sebastian Reichel
2024-12-02 3:28 ` Damon Ding
2024-12-02 14:41 ` Sebastian Reichel
2024-12-05 1:13 ` Damon Ding
2024-12-05 18:04 ` Sebastian Reichel
2024-12-06 3:28 ` Damon Ding
2024-11-27 7:51 ` [PATCH v1 05/10] drm/bridge: analogix_dp: add support for RK3588 Damon Ding
2024-11-27 7:51 ` [PATCH v1 06/10] drm/bridge: analogix_dp: Add support for phy configuration Damon Ding
2024-11-30 8:53 ` Dmitry Baryshkov
2024-12-12 8:55 ` Damon Ding
2024-11-27 7:51 ` [PATCH v1 07/10] dt-bindings: display: rockchip: Fix label name of hdptxphy for RK3588 HDMI TX Controller Damon Ding
2024-12-03 16:58 ` Rob Herring (Arm)
2024-11-27 7:51 ` [PATCH v1 08/10] arm64: dts: rockchip: Fix label name of hdptxphy for RK3588 Damon Ding
2024-11-27 7:51 ` [PATCH v1 09/10] arm64: dts: rockchip: Add eDP0 node " Damon Ding
2024-11-27 7:51 ` [PATCH v1 10/10] arch64: dts: rockchip: Enable eDP0 display on RK3588S EVB1 board Damon Ding
2024-11-27 9:02 ` Heiko Stübner
2024-12-06 14:35 ` [PATCH v1 00/10] Add eDP support for RK3588 Heiko Stübner
2024-12-15 2:32 ` Damon Ding
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=2886747.Y6S9NjorxK@diego \
--to=heiko@sntech.de \
--cc=algea.cao@rock-chips.com \
--cc=andy.yan@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=cristian.ciocaltea@collabora.com \
--cc=damon.ding@rock-chips.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hjc@rock-chips.com \
--cc=kever.yang@rock-chips.com \
--cc=krzk+dt@kernel.org \
--cc=l.stach@pengutronix.de \
--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=rfoss@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).