From: Krzysztof Kozlowski <krzk@kernel.org>
To: Richard Weinberger <richard@nod.at>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-omap <linux-omap@vger.kernel.org>,
devicetree <devicetree@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>, Lee Jones <lee@kernel.org>,
dakr <dakr@kernel.org>, "Rafael J. Wysocki" <rafael@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Brown <broonie@kernel.org>, tony <tony@atomide.com>,
rogerq <rogerq@kernel.org>, khilman <khilman@baylibre.com>,
Andreas Kemnade <andreas@kemnade.info>,
aaro koskinen <aaro.koskinen@iki.fi>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>, robh <robh@kernel.org>
Subject: Re: [PATCH 1/4] dt-bindings: Document new common property: has-inaccessible-regs
Date: Sat, 29 Nov 2025 16:44:44 +0100 [thread overview]
Message-ID: <8b0e2b8a-314f-40ee-8f30-c281f3799705@kernel.org> (raw)
In-Reply-To: <771947541.4509.1764430418744.JavaMail.zimbra@nod.at>
On 29/11/2025 16:33, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
>> Von: "Krzysztof Kozlowski" <krzk@kernel.org>
>> On 29/11/2025 15:20, Richard Weinberger wrote:
>>> This property is used to denote that a certain register map contains
>>> registers that are inaccessible under conditions only a device driver
>>> can know.
>>
>> So device driver controls fully their exposure via sysfs.
>>
>> Binding cannot help here at all.
>
> The driver does not expose them via sysfs, it's the regmap framework via debugfs.
Driver always tells the regmap which registers are valid. This is not a
new problem, we had it in several devices and fixed drivers.
>
>>> The purpose of this property is to disable register access through debug
>>> facilities outside of the device driver.
>>
>> You described OS policy which is not suitable for bindings at all. Plus
>> commit msg really mixes up two separate points - buggy driver which
>> fails to properly set regmap (or other facility) with some DT-based
>> restrictions.
>
> I kind of expected this answer. ;-)
>
> Currently arch/arm/boot/dts/ti/omap/dra7-l4.dtsi binds CTRL_MODULE_CORE to the syscon mfd driver
> and various child nodes bind to subranges.
> e.g.
> scm_conf: scm_conf@0 {
> compatible = "syscon", "simple-bus";
> reg = <0x0 0x1400>;
> #address-cells = <1>;
> #size-cells = <1>;
> ranges = <0 0x0 0x1400>;
> has-inaccessible-regs;
>
> pbias_regulator: pbias_regulator@e00 {
> compatible = "ti,pbias-dra7", "ti,pbias-omap";
> reg = <0xe00 0x4>;
> syscon = <&scm_conf>;
> pbias_mmc_reg: pbias_mmc_omap5 {
> regulator-name = "pbias_mmc_omap5";
> regulator-min-microvolt = <1800000>;
> regulator-max-microvolt = <3300000>;
> };
> };
>
> phy_gmii_sel: phy-gmii-sel@554 {
> compatible = "ti,dra7xx-phy-gmii-sel";
> reg = <0x554 0x4>;
> #phy-cells = <1>;
> };
>
> scm_conf_clocks: clocks {
> #address-cells = <1>;
> #size-cells = <0>;
> };
> };
>
> So, drivers like ti,pbias-dra7 or ti,dra7xx-phy-gmii-sel touch only registers
> they know about and this works well.
> But syscon manages the whole register map via regmap, and regmap exposes it all
> via debugfs.
>
> What solution do you propose?
> Splitting reg = <0x0 0x1400> into many tiny fractions and not using an mfd anymore?
Fix the driver. In your case, the syscon driver.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-11-29 15:44 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-29 14:20 [PATCH 0/4] Add tooling to disable debugfs on OMAP based systems Richard Weinberger
2025-11-29 14:20 ` [PATCH 1/4] dt-bindings: Document new common property: has-inaccessible-regs Richard Weinberger
2025-11-29 15:23 ` Krzysztof Kozlowski
2025-11-29 15:33 ` Richard Weinberger
2025-11-29 15:44 ` Krzysztof Kozlowski [this message]
2025-11-29 15:49 ` Krzysztof Kozlowski
2025-11-29 23:02 ` Andreas Kemnade
2025-11-29 15:56 ` Richard Weinberger
2025-11-30 8:17 ` Krzysztof Kozlowski
2025-12-01 21:34 ` Richard Weinberger
2025-12-01 21:41 ` Krzysztof Kozlowski
2025-12-01 22:40 ` Richard Weinberger
2025-12-01 12:19 ` Mark Brown
2025-12-01 13:13 ` Rob Herring
2025-11-29 14:20 ` [PATCH 2/4] regmap: Allow disabling debugfs via regmap_config Richard Weinberger
2025-12-01 12:03 ` Mark Brown
2025-11-29 14:20 ` [PATCH 3/4] syscon: Wire up has-inaccessible-regs Richard Weinberger
2025-11-29 15:25 ` Krzysztof Kozlowski
2025-11-29 14:20 ` [PATCH 4/4] arm: dts: omap: Mark various register maps as dangerous Richard Weinberger
2025-11-29 15:26 ` Krzysztof Kozlowski
2025-11-29 15:35 ` Richard Weinberger
2025-11-29 15:54 ` Krzysztof Kozlowski
2025-11-29 16:02 ` Richard Weinberger
2025-11-29 16:48 ` Andreas Kemnade
2025-11-29 14:36 ` [PATCH 0/4] Add tooling to disable debugfs on OMAP based systems Andreas Kemnade
2025-11-29 15:18 ` Richard Weinberger
2025-12-01 12:27 ` Mark Brown
2025-12-01 12:26 ` Rob Herring
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=8b0e2b8a-314f-40ee-8f30-c281f3799705@kernel.org \
--to=krzk@kernel.org \
--cc=aaro.koskinen@iki.fi \
--cc=andreas@kemnade.info \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=dakr@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--cc=tony@atomide.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