From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Yu-Chun Lin [林祐君]" <eleanor.lin@realtek.com>,
"afaerber@suse.de" <afaerber@suse.de>,
"robh@kernel.org" <robh@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"lee@kernel.org" <lee@kernel.org>,
"James Tai [戴志峰]" <james.tai@realtek.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-realtek-soc@lists.infradead.org"
<linux-realtek-soc@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"CY_Huang[黃鉦晏]" <cy.huang@realtek.com>,
"Stanley Chang[昌育德]" <stanley_chang@realtek.com>
Subject: Re: [PATCH v2 2/3] dt-bindings: mfd: Add Realtek MISC system controller
Date: Mon, 17 Nov 2025 12:10:46 +0100 [thread overview]
Message-ID: <94198d5f-e49f-4b38-8288-3be29efd142b@kernel.org> (raw)
In-Reply-To: <e799389ce8b4449baba83a893361bdd4@realtek.com>
On 17/11/2025 12:03, Yu-Chun Lin [林祐君] wrote:
> Hi Conor and Krzysztof,
>
>> Documentation/devicetree/bindings/mfd/realtek,misc.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/realtek,misc.yaml
>> b/Documentation/devicetree/bindings/mfd/realtek,misc.yaml
>> new file mode 100644
>> index 000000000000..4f4a9ae250be
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/mfd/realtek,misc.yaml
>> @@ -0,0 +1,72 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/mfd/realtek,misc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Realtek MISC System Controller
>> +
>> +description:
>> + The Realtek MISC System Controller is a register area that contains
>> + miscellaneous system registers for the SoC and serves as a parent
>> +node
>> + for other functions.
>> +
>> +maintainers:
>> + - James Tai <james.tai@realtek.com>
>> + - Yu-Chun Lin <eleanor.lin@realtek.com>
>> +
>> +properties:
>> + compatible:
>> + items:
>> + - enum:
>> + - realtek,misc
>
> I apologize for the current compatible string, which was initially named
> by referencing existing patterns like 'brcm,misc' and thus violates the
> naming guidance against "wildcards" and general non-SoC specific names.
>
> Let me explain the purpose of the device node (Realtek system controller).
>
> This MISC area contains several peripheral sub-modules such as uart,
> watchdog, rtc or i2c ..... These blocks share a unified register region
> implemented as a single hardware module, which remains powered during
> system suspend states (e.g., S3). These blocks share the same MMIO region
> and appear as child nodes under the MISC syscon node. Currently, it
No, you are mixing hardware with DT representation. This device cannot
appear as child node, because there is no such concept in hardware as
child node. You cannot use argument of DT representation when you
justify how this is represented in DT. It is invalid.
You need to start argumentation in terms of hardware.
> includes uart.
>
> Regarding the current structure, the device node is defined in a kent.dtsi
> and is included by each SoC's DTSI.
>
> I've considered two ways to write compatible string naming.
>
> Option 1: Use a single SoC-specific compatible string
>
> Rename "realtek,misc" to "realtek,rtd1861-misc"
>
> /* kent.dtsi */
> misc: syscon@... {
> compatible = "realtek,rtd1861-misc", "syscon", "simple-mfd";
> };
>
> Pros: Only one compatible string is needed, simplifying maintenance across
> the driver and DTS.
>
> Cons: Violates the "SoC-specific compatible" rule for other SoCs
> (RTD1501, RTD1920).
>
> Option 2: SoC-specific + fallback (Compliant but Verbose)
>
> Define the full list in the schema, and override the compatible string in each SoC DTSI.
>
> /* schema binding */
>
> compatible:
> items:
> - enum:
> - realtek,rtd1501-misc
> - realtek,rtd1861-misc
> - realtek,rtd1920-misc
> # ... add new SoCs here
> - const: realtek,kent-misc
> - const: syscon
> - const: simple-mfd
>
>
> /* kent.dtsi */
>
> misc: syscon@... {
> compatible = "realtek,kent-misc", "syscon", "simple-mfd";
> };
>
> SoC-specific override (e.g. rtd1920s-smallville.dtsi):
>
> &misc {
> compatible = "realtek,rtd1920-misc", "realtek,kent-misc", "syscon",
> "simple-mfd";
> };
>
> Pros: Fully compliant with DT rules
>
> Cons: Requires override in every SoC file; slight duplication.
>
> Is Option 2 the expected pattern?
> Thanks for your guidance!
>
None of them. You need SoC specific compatibles which can be used as
fallbacks for SoC specific compatibles. There is plenty of examples for
this already, but anyway this does not solve the problem that you still
did not properly describe the hardware but instead use your downstream
as arguments.
This will get you nowhere.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-11-17 11:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 12:30 [PATCH v2 0/3] arm64: dts: Add support for Kent SoC family Yu-Chun Lin
2025-11-13 12:30 ` [PATCH v2 1/3] dt-bindings: arm: realtek: Add Kent Soc family compatibles Yu-Chun Lin
2025-11-13 19:28 ` Conor Dooley
2025-11-17 10:55 ` Yu-Chun Lin
2025-11-17 14:36 ` Conor Dooley
2025-11-13 12:30 ` [PATCH v2 2/3] dt-bindings: mfd: Add Realtek MISC system controller Yu-Chun Lin
2025-11-13 19:31 ` Conor Dooley
2025-11-13 19:36 ` Krzysztof Kozlowski
2025-11-17 11:03 ` Yu-Chun Lin [林祐君]
2025-11-17 11:10 ` Krzysztof Kozlowski [this message]
2025-11-17 12:41 ` Yu-Chun Lin [林祐君]
2025-11-17 13:31 ` Krzysztof Kozlowski
2025-11-19 6:46 ` Yu-Chun Lin [林祐君]
2025-11-13 12:30 ` [PATCH v2 3/3] arm64: dts: realtek: Add Kent SoC and EVB device trees Yu-Chun Lin
2025-11-13 19:39 ` Krzysztof Kozlowski
2025-11-13 19:50 ` Krzysztof Kozlowski
2025-11-17 12:43 ` Yu-Chun Lin [林祐君]
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=94198d5f-e49f-4b38-8288-3be29efd142b@kernel.org \
--to=krzk@kernel.org \
--cc=afaerber@suse.de \
--cc=conor+dt@kernel.org \
--cc=cy.huang@realtek.com \
--cc=devicetree@vger.kernel.org \
--cc=eleanor.lin@realtek.com \
--cc=james.tai@realtek.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-realtek-soc@lists.infradead.org \
--cc=robh@kernel.org \
--cc=stanley_chang@realtek.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).