From: Krzysztof Kozlowski <krzk@kernel.org>
To: Conor Dooley <conor@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Orson Zhai <orsonzhai@gmail.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>,
Jacky Huang <ychuang3@nuvoton.com>,
Shan-Chun Hung <schung@nuvoton.com>,
Khuong Dinh <khuong@os.amperecomputing.com>,
Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Lars Povlsen <lars.povlsen@microchip.com>,
Steen Hegelund <Steen.Hegelund@microchip.com>,
Daniel Machon <daniel.machon@microchip.com>,
UNGLinuxDriver@microchip.com, Nishanth Menon <nm@ti.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children
Date: Mon, 17 Jun 2024 19:33:49 +0200 [thread overview]
Message-ID: <0ea8ae6e-d841-4a5c-8a23-603ed9b4fa61@kernel.org> (raw)
In-Reply-To: <20240617-zoology-silica-2c8c78363b32@spud>
On 17/06/2024 18:44, Conor Dooley wrote:
>> +$id: http://devicetree.org/schemas/mfd/syscon-common.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: System Controller Registers R/W Common Properties
>> +
>> +description: |
>
> This | can go, right?
Ack
>
>> + System controller node represents a register region containing a set
>> + of miscellaneous registers. The registers are not cohesive enough to
>> + represent as any specific type of device. The typical use-case is
>> + for some other node's driver, or platform-specific code, to acquire
>> + a reference to the syscon node (e.g. by phandle, node path, or
>> + search using a specific compatible value), interrogate the node (or
>> + associated OS driver) to determine the location of the registers,
>> + and access the registers directly.
>> +
>> +maintainers:
>> + - Lee Jones <lee@kernel.org>
>> +
>> +select:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>
> And this can be const, given it's unlikely to grow?
ack
>
>> + - syscon
>> +
>> + required:
>> + - compatible
>> +
>> +properties:
>> + compatible:
>> + contains:
>> + const: syscon
>> + minItems: 2
>> + maxItems: 5 # Should be enough
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + reg-io-width:
>> + description: |
>
> Same with this one.
ack
>
>> + The size (in bytes) of the IO accesses that should be performed
>> + on the device.
>> + enum: [1, 2, 4, 8]
>> +
>> +required:
>> + - compatible
>> + - reg
>> +
>> +allOf:
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: simple-mfd
>> + then:
>> + properties:
>> + compatible:
>> + minItems: 3
>> + maxItems: 5
>> +
>> +additionalProperties: true
>> +
>> +examples:
>> + - |
>> + syscon: syscon@1c00000 {
>> + compatible = "allwinner,sun8i-h3-system-controller", "syscon";
>> + reg = <0x01c00000 0x1000>;
>> + };
>> +...
>> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
>> index d6fa58c9e4de..d4e9533cf3fe 100644
>> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml
>> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
>> @@ -4,7 +4,7 @@
>> $id: http://devicetree.org/schemas/mfd/syscon.yaml#
>> $schema: http://devicetree.org/meta-schemas/core.yaml#
>>
>> -title: System Controller Registers R/W
>> +title: System Controller Devices
>>
>> description: |
>> System controller node represents a register region containing a set
>> @@ -19,123 +19,196 @@ description: |
>> maintainers:
>> - Lee Jones <lee@kernel.org>
>>
>> +# Need a select with all compatibles listed for compatibility with older
>> +# dtschema (<2024.02), so this will not be selected for other schemas having
>> +# syscon fallback.
>> select:
>> properties:
>> compatible:
>> contains:
>> enum:
>> - - syscon
>
> Wow, this is noisy. Is it not possible to achieve something similar by
> making the select check for not: compatible: contains: simple-mfd? Or
> did I misunderstand the intention here?
See comment from Rob for v1. This is needed for older schema, although
2024.02 worked fine in my tests. The point is to select all schemas, not
by compatible property, because then we match this schema to anything
having syscon.
Kind of similar how it is woth arm,primecell.
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-06-17 17:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-16 13:19 [PATCH v2 0/7] dt-bindings: mfd: syscon: Document more compatibles and require simpe-mfd description Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 1/7] dt-bindings: mfd: syscon: Drop hwlocks Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 2/7] dt-bindings: soc: sprd: sc9863a-glbregs: Document SC9863A syscon Krzysztof Kozlowski
2024-06-18 8:52 ` Baolin Wang
2024-06-16 13:19 ` [PATCH v2 3/7] dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema Krzysztof Kozlowski
2024-06-17 16:46 ` Conor Dooley
2024-06-17 16:47 ` Conor Dooley
2024-06-17 17:39 ` Krzysztof Kozlowski
2024-06-24 20:34 ` Rob Herring (Arm)
2024-06-16 13:19 ` [PATCH v2 4/7] dt-bindings: soc: microchip: sparx5-cpu-syscon: " Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 5/7] dt-bindings: soc: ti: am654-serdes-ctrl: " Krzysztof Kozlowski
2024-06-16 13:19 ` [PATCH v2 6/7] dt-bindings: mfd: syscon: Split and enforce documenting MFD children Krzysztof Kozlowski
2024-06-17 16:44 ` Conor Dooley
2024-06-17 16:46 ` Conor Dooley
2024-06-17 17:35 ` Krzysztof Kozlowski
2024-06-18 18:04 ` Conor Dooley
2024-06-17 17:33 ` Krzysztof Kozlowski [this message]
2024-06-24 20:28 ` Rob Herring (Arm)
2024-06-16 13:19 ` [PATCH v2 7/7] dt-bindings: mfd: syscon: Add APM poweroff mailbox Krzysztof Kozlowski
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=0ea8ae6e-d841-4a5c-8a23-603ed9b4fa61@kernel.org \
--to=krzk@kernel.org \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=daniel.machon@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=khuong@os.amperecomputing.com \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lars.povlsen@microchip.com \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=nm@ti.com \
--cc=orsonzhai@gmail.com \
--cc=robh@kernel.org \
--cc=schung@nuvoton.com \
--cc=vadivel.muruganx.ramuthevar@linux.intel.com \
--cc=ychuang3@nuvoton.com \
--cc=zhang.lyra@gmail.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).