From: Kaustabh Chakraborty <kauschluss@disroot.org>
To: Inki Dae <daeinki@gmail.com>
Cc: Jagan Teki <jagan@amarulasolutions.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
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>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH v2 01/13] drm/bridge: samsung-dsim: separate LINK and DPHY status registers
Date: Fri, 27 Jun 2025 12:29:01 +0000 [thread overview]
Message-ID: <922117777d718b77c86be3a43e86dd7f@disroot.org> (raw)
In-Reply-To: <CAAQKjZOHUGg8WEZxfhVxrUPS3O68BQJ6=cDnUSk6BomYjuY62Q@mail.gmail.com>
On 2025-06-27 10:07, Inki Dae wrote:
> 2025년 6월 27일 (금) 오전 4:42, Kaustabh Chakraborty
> <kauschluss@disroot.org>님이 작성:
>>
>> Exynos7870's DSIM has separate registers for LINK and DPHY status.
>> This
>> is in contrast to other devices in the driver which use a single
>> register for both.
>>
>> Add their respective entries in the register list. Devices having a
>> single status register have been assigned the same offset for both
>> entries.
>>
>> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
>> ---
>> drivers/gpu/drm/bridge/samsung-dsim.c | 15 +++++++++------
>> 1 file changed, 9 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c
>> b/drivers/gpu/drm/bridge/samsung-dsim.c
>> index
>> f2f666b27d2d5ec016d7a7f47c87fcdf1377d41a..7fd4c34cdc3170d363942f98feec048097da3c06
>> 100644
>> --- a/drivers/gpu/drm/bridge/samsung-dsim.c
>> +++ b/drivers/gpu/drm/bridge/samsung-dsim.c
>> @@ -30,7 +30,7 @@
>> /* returns true iff both arguments logically differs */
>> #define NEQV(a, b) (!(a) ^ !(b))
>>
>> -/* DSIM_STATUS */
>> +/* DSIM_DPHY_STATUS */
>> #define DSIM_STOP_STATE_DAT(x) (((x) & 0xf) << 0)
>> #define DSIM_STOP_STATE_CLK BIT(8)
>> #define DSIM_TX_READY_HS_CLK BIT(10)
>> @@ -239,7 +239,8 @@ enum samsung_dsim_transfer_type {
>> };
>>
>> enum reg_idx {
>> - DSIM_STATUS_REG, /* Status register */
>
> According to the datasheets I have, both Exynos5422 and Exynos7420 use
> DSIM_STATUS, while Exynos8890 splits this into DSIM_LINK_STATUS and
> DSIM_PHY_STATUS. It appears that Exynos7870 follows the same approach
> as Exynos8890.
>
> The current modification removes the legacy DSIM_STATUS_REG and adds
> new DSIM_LINK_STATUS_REG and DSIM_DPHY_STATUS_REG. However, this
> change causes the register names used for older SoC versions to differ
> from those in the datasheets, so I think it is better to keep the
> legacy name for backward compatibility.
>
> How about modifying it as follows?
> enum reg_idx {
> DSIM_STATUS_REG, /* Status register (legacy) */
> DSIM_LINK_STATUS_REG, /* Link status register (Exynos7870, ...)
> */
> DSIM_PHY_STATUS_REG, /* PHY status register (Exynos7870, ...)
> */
> ...
> };
>
> static const unsigned int exynos7870_reg_ofs[] = {
> [DSIM_STATUS_REG] = 0x00, /* Legacy compatibility - use
> LINK_STATUS */
> [DSIM_LINK_STATUS_REG] = 0x04, /* Link status register */
> [DSIM_PHY_STATUS_REG] = 0x08, /* PHY status register */
> ...
> };
>
> Additionally, by configuring the hw_type field in the
> samsung_dsim_plat_data structure like you did with the patch[1], you
> can use the appropriate register name for each SoC as shown below:
> if (dsi->plat_data->hw_type == DSIM_TYPE_EXYNOS7870)
I've instead added a flag to the driver data indicating the
availability of legacy status register. In my opinion, this
approach quickly turns cumbersome as the number of variants
increase.
Thanks for the suggestion.
> reg = samsung_dsim_read(dsi, DSIM_LINK_STATUS_REG);
> else
> reg = samsung_dsim_read(dsi, DSIM_STATUS_REG);
>
>
> [1] [PATCH v2 12/13] drm/bridge: samsung-dsim: add driver support for
> exynos7870 DSIM bridge
>
> Thanks,
> Inki Dae
next prev parent reply other threads:[~2025-06-27 12:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 19:38 [PATCH v2 00/13] Support for Exynos7870 DSIM bridge Kaustabh Chakraborty
2025-06-26 19:38 ` [PATCH v2 01/13] drm/bridge: samsung-dsim: separate LINK and DPHY status registers Kaustabh Chakraborty
2025-06-27 10:07 ` Inki Dae
2025-06-27 12:29 ` Kaustabh Chakraborty [this message]
2025-06-26 19:38 ` [PATCH v2 02/13] drm/bridge: samsung-dsim: add SFRCTRL register Kaustabh Chakraborty
2025-06-26 19:38 ` [PATCH v2 03/13] drm/bridge: samsung-dsim: add flag to control header FIFO wait Kaustabh Chakraborty
2025-06-26 19:38 ` [PATCH v2 04/13] drm/bridge: samsung-dsim: allow configuring bits and offsets of CLKCTRL register Kaustabh Chakraborty
2025-06-26 19:38 ` [PATCH v2 05/13] drm/bridge: samsung-dsim: allow configuring the MAIN_VSA offset Kaustabh Chakraborty
2025-06-26 19:38 ` [PATCH v2 06/13] drm/bridge: samsung-dsim: allow configuring the VIDEO_MODE bit Kaustabh Chakraborty
2025-06-26 19:38 ` [PATCH v2 07/13] drm/bridge: samsung-dsim: allow configuring PLL_M and PLL_S offsets Kaustabh Chakraborty
2025-06-26 19:38 ` [PATCH v2 08/13] drm/bridge: samsung-dsim: allow configuring the PLL_STABLE bit Kaustabh Chakraborty
2025-06-26 19:38 ` [PATCH v2 09/13] drm/bridge: samsung-dsim: increase timeout value for PLL_STABLE Kaustabh Chakraborty
2025-06-26 19:38 ` [PATCH v2 10/13] drm/bridge: samsung-dsim: add ability to define clock names for every variant Kaustabh Chakraborty
2025-06-26 19:39 ` [PATCH v2 11/13] dt-bindings: samsung,mipi-dsim: document exynos7870 DSIM compatible Kaustabh Chakraborty
2025-06-27 21:41 ` Rob Herring (Arm)
2025-06-26 19:39 ` [PATCH v2 12/13] drm/bridge: samsung-dsim: add driver support for exynos7870 DSIM bridge Kaustabh Chakraborty
2025-06-26 19:39 ` [PATCH v2 13/13] drm/exynos: dsi: add support for exynos7870 Kaustabh Chakraborty
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=922117777d718b77c86be3a43e86dd7f@disroot.org \
--to=kauschluss@disroot.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=andrzej.hajda@intel.com \
--cc=conor+dt@kernel.org \
--cc=daeinki@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=sw0312.kim@samsung.com \
--cc=tzimmermann@suse.de \
/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).