From: Andrew Davis <afd@ti.com>
To: David Lechner <dlechner@baylibre.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Markus Schneider-Pargmann <msp@baylibre.com>
Cc: Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Siddharth Vadapalli <s-vadapalli@ti.com>,
Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
Tero Kristo <kristo@kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/5] dt-bindings: mfd: syscon: Add ti,am62-ddr-pmctrl
Date: Tue, 22 Apr 2025 11:45:41 -0500 [thread overview]
Message-ID: <39ead65c-0040-4a22-9cdc-081696b3d967@ti.com> (raw)
In-Reply-To: <8fe546e7-4fbc-4c63-ad0f-576ffb117508@baylibre.com>
On 4/22/25 11:12 AM, David Lechner wrote:
> On 4/21/25 12:03 PM, Andrew Davis wrote:
>
> ...
>
>> Which parent device? That is my point, if the top level node for the
>> whole CTRL_MMR region is made into one big syscon, then a big regmap
>> is made that covers the whole region. All the child devices also make
>> regmaps covering their device range. Now these registers under the child
>> device belong to two different regmaps. No synchronization is done as
>> these are not the same regmap, regmap only handles this for multiple
>> access to registers within the same regmap.
>>
>
> Why does the child device have to create a new/separate regmap? Can it not use
> something like syscon_regmap_lookup_by_phandle_args() to get the regmap from
> the "syscon" node along with 1 or more args specifying the one or few registers
> out of the full range that are assigned to that specific child node? This way,
> all child nodes would be using the same shared regmap.
>
> (And yes, I know technically they don't need to be child nodes - just using that
> terminology to be consistent with the previous discussion.)
Yes, this can be done, and is done for a couple drivers today. The issue is most
drivers do not expect to be a child node of a syscon nor fetch a regmap with
syscon_regmap_lookup_*() functions. The vast majority drivers do the normal thing,
which is platform_get_resource() and similar, that gets the memory from the standard
"reg" property inside their own node.
We have then two options, retrofit all the existing drivers we might use with
support for fetching syscon regmaps (some drivers do not use regmap in the
first place, so we would also have to add regmap support first). Or we do what
we are doing here, which is to have these devices not use overlapping register
regions (which has the minor side effect of sometimes causing some nodes to
cover only small range of registers, which seems to be a problem?).
We went for the latter option, and it has been working fine for all our
new devices. And we are fixing the same for some of our older devices, we
are actually almost done with that too (if we could get this patch and maybe
two others in we would be completely converted).
Andrew
next prev parent reply other threads:[~2025-04-22 19:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-22 10:24 [PATCH 0/5] arm64: dts: ti: k3-am62a/p: Add ddr-pmctrl, canuart-wake Markus Schneider-Pargmann
2025-01-22 10:24 ` [PATCH 1/5] dt-bindings: mfd: syscon: Add ti,j784s4-acspcie-proxy-ctrl to second list Markus Schneider-Pargmann
2025-01-22 10:34 ` Siddharth Vadapalli
2025-01-22 10:24 ` [PATCH 2/5] dt-bindings: mfd: syscon: Add ti,am62-ddr-pmctrl Markus Schneider-Pargmann
2025-01-24 8:19 ` Krzysztof Kozlowski
2025-01-24 8:22 ` Krzysztof Kozlowski
2025-01-24 16:05 ` Markus Schneider-Pargmann
2025-01-24 16:48 ` Krzysztof Kozlowski
2025-01-24 22:35 ` Andrew Davis
2025-01-27 12:09 ` Krzysztof Kozlowski
2025-02-07 14:40 ` Markus Schneider-Pargmann
2025-02-09 12:21 ` Krzysztof Kozlowski
2025-02-10 10:35 ` Markus Schneider-Pargmann
2025-02-12 19:35 ` Krzysztof Kozlowski
2025-04-09 17:39 ` Andrew Davis
2025-04-15 5:17 ` Krzysztof Kozlowski
2025-04-21 17:03 ` Andrew Davis
2025-04-22 16:12 ` David Lechner
2025-04-22 16:45 ` Andrew Davis [this message]
2025-04-23 12:07 ` Krzysztof Kozlowski
2025-04-23 14:30 ` Andrew Davis
2025-01-22 10:24 ` [PATCH 3/5] dt-bindings: mfd: syscon: Add ti,am62-canuart-wake compatible Markus Schneider-Pargmann
2025-01-24 8:21 ` Krzysztof Kozlowski
2025-01-22 10:24 ` [PATCH 4/5] arm64: dts: ti: k3-am62a-wakeup: Add ddr-pmctrl, canuart-wake Markus Schneider-Pargmann
2025-01-24 8:20 ` Krzysztof Kozlowski
2025-01-22 10:24 ` [PATCH 5/5] arm64: dts: ti: k3-am62p-j722s-common-wakeup: " Markus Schneider-Pargmann
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=39ead65c-0040-4a22-9cdc-081696b3d967@ti.com \
--to=afd@ti.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=kristo@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=msp@baylibre.com \
--cc=nm@ti.com \
--cc=robh@kernel.org \
--cc=s-vadapalli@ti.com \
--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;
as well as URLs for NNTP newsgroup(s).