[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8b0e2b8a-314f-40ee-8f30-c281f3799705@kernel.org>
Date: Sat, 29 Nov 2025 16:44:44 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Richard Weinberger <richard@....at>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
linux-omap <linux-omap@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>, Arnd Bergmann <arnd@...db.de>,
Lee Jones <lee@...nel.org>, dakr <dakr@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mark Brown <broonie@...nel.org>, tony <tony@...mide.com>,
rogerq <rogerq@...nel.org>, khilman <khilman@...libre.com>,
Andreas Kemnade <andreas@...nade.info>, aaro koskinen
<aaro.koskinen@....fi>, Conor Dooley <conor+dt@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, robh <robh@...nel.org>
Subject: Re: [PATCH 1/4] dt-bindings: Document new common property:
has-inaccessible-regs
On 29/11/2025 16:33, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
>> Von: "Krzysztof Kozlowski" <krzk@...nel.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
Powered by blists - more mailing lists