Re: [PATCH 1/4] dt-bindings: Document new common property: has-inaccessible-regs

From: Krzysztof Kozlowski

Date: Sat Nov 29 2025 - 10:44:50 EST


On 29/11/2025 16:33, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
>> Von: "Krzysztof Kozlowski" <krzk@xxxxxxxxxx>
>> 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