Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Rob Herring <robh@kernel.org>
Cc: 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>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>,
	Aradhya Bhatia <aradhya.bhatia@linux.dev>,
	Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
	Swamil Jain <s-jain1@ti.com>, Devarsh Thakkar <devarsht@ti.com>,
	Louis Chauvet <louis.chauvet@bootlin.com>,
	devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 03/15] dt-bindings: mfd: syscon: Add ti,am625-dss-dpi0-clk-ctrl compatible
Date: Wed, 13 May 2026 10:55:55 +0300	[thread overview]
Message-ID: <af7006a6-6048-42c9-8771-4687a51cc245@ideasonboard.com> (raw)
In-Reply-To: <20260505193538.GA3785056-robh@kernel.org>

Hi,

On 05/05/2026 22:35, Rob Herring wrote:
> On Mon, Apr 20, 2026 at 03:54:10PM +0300, Tomi Valkeinen wrote:
>> The DPI output pipeline in K3 SoCs contains the display subsystem (DSS)
>> which produces the in-SoC parallel video signal, and a DPI block which
>> adjusts the signal to the external MIPI DPI output.
>>
>> The DSS IP has registers to configure whether the data and sync signals
>> are driven on rising or falling clock edge, and on some SoCs these are
>> automatically conveyed to the DPI block which needs that configuration
>> to properly output the MIPI DPI signal.
>>
>> However, on some SoCs the DPI block configuration has to be done
>> manually, using an extra register outside the DSS, DPI0_CLK_CTRL in
>> MAIN_CTRL_MMR_CFG0 block, which controls the DPI block's behavior. Note
>> that while the register is named "CLK_CTRL", it's not really related to
>> clocks, but the sync and data signals.
>>
>> Currently the DPI0_CLK_CTRL is never written, so it's always 0, meaning
>> the data and sync are always driven on a rising clock edge regardless of
>> the DSS configuration.
>>
>> DPI0_CLK_CTRL register seems to be an independent "quirk" register,
>> inside MAIN_CTRL_MMR_CFG0 block, which contains general purpose system
>> registers. The registers surrounding DPI0_CLK_CTRL seem to be controlled
>> by the system firmware or linux clock drivers. So, it is just this
>> single register we can map, and we can't create a syscon node for the
>> whole (or big parts of) MAIN_CTRL_MMR_CFG0.
>>
>> I see two options to handle the register:
>>
>> 1) We could add that single register to the DSS binding as a new reg
>>     block. That feels wrong, as it's not a DSS register.
>> 2) Add it as a syscon node, which can then be used by tidss driver.
>>     It is a bit silly to create a syscon node for a single 32-bit
>>     register, though.
> 
> Is it really 1 register and nothing else in that h/w block? That's quite
> unusual.
It is just this one register that the DSS driver is interested in, and 
that register is surrounded by registers used by other, unrelated, 
drivers or the system firmware.

This has been discussed in some older threads, and to summarize:

The Soc has a so called CTRL_MMR (control memory-mapped-registers) area 
at 0x100000, size 0x20000. It's a dumping ground for all kinds of system 
integration registers. In the current binding, this has been just a 
simple-bus, containing some sub-nodes (shortened version):

main_conf: bus@100000 {
	compatible = "simple-bus";
	reg = <0x00 0x00100000 0x00 0x20000>;

	phy_gmii_sel: phy@4044 {
		compatible = "ti,am654-phy-gmii-sel";
	};

	audio_refclk0: clock-controller@82e0 {
		compatible = "ti,am62-audio-refclk";
	};

	dss_oldi_io_ctrl: dss-oldi-io-ctrl@8600 {
		compatible = "ti,am625-dss-oldi-io-ctrl", "syscon";
	};
};

There already was the dss-oldi-io-ctrl, so this new 
am625-dss-dpi0-clk-ctrl was added the same way as we needed a syscon.

After some testing, changing the whole main_conf to a syscon seems to 
work ok, even if inside it there are devices mapping parts of the same 
memory area (although I'm not sure how to test all those devices). I 
originally thought mapping the same memory area from two different 
driers would immediately fail.

So, instead of adding a new special syscon node for this single 
register, as done in this patch, I think we can just make the whole 
main_conf a syscon, and point to it from the display subsystem node:

	ti,dpi-io-ctrl = <&main_conf>;

Then the driver would need to access the register with offset 0x8300. 
But I'm a bit reluctant to add such a SoC-integration related offset to 
the driver. Even if the register would stay the same from SoC model to 
another, the offset could change. So, we could, in the display subsystem 
node, do:

	ti,dpi-io-ctrl = <&main_conf 0x8300>;

The driver can use syscon_regmap_lookup_by_phandle_args() and thus get 
the offset from the dts. I think this works ok, so I'll make that change 
for v2 unless someone has better ideas.

  Tomi



  reply	other threads:[~2026-05-13  7:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 12:54 [PATCH 00/15] drm/tidss: Add BeagleY-AI display support (and some more) Tomi Valkeinen
2026-04-20 12:54 ` [PATCH 01/15] dt-bindings: display: ti: Move ti,am62l-dss binding to a new binding file Tomi Valkeinen
2026-05-05 19:30   ` Rob Herring (Arm)
2026-04-20 12:54 ` [PATCH 02/15] dt-bindings: display: ti,am65x-dss: Simplify binding Tomi Valkeinen
2026-05-05 19:31   ` Rob Herring (Arm)
2026-04-20 12:54 ` [PATCH 03/15] dt-bindings: mfd: syscon: Add ti,am625-dss-dpi0-clk-ctrl compatible Tomi Valkeinen
2026-05-05 19:35   ` Rob Herring
2026-05-13  7:55     ` Tomi Valkeinen [this message]
2026-04-20 12:54 ` [PATCH 04/15] dt-bindings: display: ti,am625-oldi: Add optional power-domain for OLDI Tomi Valkeinen
2026-05-05 19:39   ` Rob Herring
2026-04-20 12:54 ` [PATCH 05/15] dt-bindings: display: ti,am65x-dss: Add AM62P DSS Tomi Valkeinen
2026-05-05 19:39   ` Rob Herring (Arm)
2026-04-20 12:54 ` [PATCH 06/15] drm/tidss: Remove extra pm_runtime_mark_last_busy Tomi Valkeinen
2026-04-20 12:54 ` [PATCH 07/15] drm/tidss: oldi: Remove define for unused register OLDI_LB_CTRL Tomi Valkeinen
2026-04-20 12:54 ` [PATCH 08/15] drm/tidss: Add mechanism to detect DPI output Tomi Valkeinen
2026-04-20 12:54 ` [PATCH 09/15] drm/tidss: Add external data and sync signal edge configuration Tomi Valkeinen
2026-04-20 12:54 ` [PATCH 10/15] drm/tidss: Add support for DPIENABLE bit Tomi Valkeinen
2026-04-20 12:54 ` [PATCH 11/15] drm/tidss: oldi: Fix OLDI signal polarities Tomi Valkeinen
2026-04-20 12:54 ` [PATCH 12/15] drm/tidss: oldi: Convert OLDI to an aux driver Tomi Valkeinen
2026-04-20 12:54 ` [PATCH 13/15] drm/tidss: Add support for AM62P display subsystem Tomi Valkeinen
2026-04-20 12:54 ` [PATCH 14/15] arm64: dts: ti: k3-am62p-j722s-common-main: Add support for DSS Tomi Valkeinen
2026-04-20 12:54 ` [PATCH 15/15] arm64: dts: ti: beagley-ai: Enable HDMI display and audio Tomi Valkeinen
2026-04-24 16:16   ` Robert Nelson
2026-04-24 17:04     ` Tomi Valkeinen
2026-04-24 18:26       ` Robert Nelson
2026-05-11 13:19 ` [PATCH 00/15] drm/tidss: Add BeagleY-AI display support (and some more) Swamil Jain

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=af7006a6-6048-42c9-8771-4687a51cc245@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=aradhya.bhatia@linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=devarsht@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=louis.chauvet@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nm@ti.com \
    --cc=robh@kernel.org \
    --cc=s-jain1@ti.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=vigneshr@ti.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