Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Yu-Chun Lin [林祐君]" <eleanor.lin@realtek.com>
Cc: "tglx@kernel.org" <tglx@kernel.org>,
	"radu@rendec.net" <radu@rendec.net>,
	"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>,
	"afaerber@suse.com" <afaerber@suse.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"mfd@lists.linux.dev" <mfd@lists.linux.dev>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-realtek-soc@lists.infradead.org"
	<linux-realtek-soc@lists.infradead.org>,
	"James Tai [戴志峰]" <james.tai@realtek.com>,
	"CY_Huang[黃鉦晏]" <cy.huang@realtek.com>,
	"Stanley Chang[昌育德]" <stanley_chang@realtek.com>
Subject: Re: [PATCH v5 3/8] dt-bindings: mfd: realtek,rtd1xxx: Add interrupt controller child node
Date: Thu, 22 Oct 2026 08:53:55 +0200	[thread overview]
Message-ID: <936769c6-c8e7-4bf2-b300-b287088c31af@kernel.org> (raw)
In-Reply-To: <ef63cc3df2424f888ba807701af0ce84@realtek.com>

On 22/10/2026 08:44, Yu-Chun Lin [林祐君] wrote:
> Hi Krzysztof,
> 
>>>>>  patternProperties:
>>>>> +  "^interrupt-controller":
>>>>> +    $ref: /schemas/interrupt-controller/realtek,rtd1319-intc-iso.yaml
>>>>> +    unevaluatedProperties: false
>>>>> +
>>>>>    '@[0-9a-f]+$':
>>>>>      type: object
>>>>
>>>> What is this for then? Should it be removed?
>>>>
>>>
>>> The original syscon compatible has other child nodes that do have 'reg'
>>> properties and unit addresses, so this pattern is still needed for them.
>>>
>>>>>
>>>>> @@ -76,3 +80,27 @@ required:
>>>>>    - reg
>>>>>
>>>>>  additionalProperties: false
>>>>> +
>>>>> +examples:
>>>>> +  - |
>>>>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>>>>> +    #include <dt-bindings/interrupt-controller/irq.h>
>>>>> +
>>>>> +    syscon@7000 {
>>>>> +        compatible = "realtek,rtd1625-iso", "syscon", "simple-mfd";
>>>>> +        reg = <0x7000 0x1000>;
>>>>> +        ranges = <0x0 0x7000 0x1000>;
>>>>> +        #address-cells = <1>;
>>>>> +        #size-cells = <1>;
>>>>
>>>> Why do you have cells it your child has no addressing?
>>>>
>>>>> +
>>>>> +        interrupt-controller {
>>>>
>>>> So the binding requires children with unit address, yes?
>>>>
>>>
>>> The interrupt-controller does not need a unit address because it
>>> accesses the registers via the parent's regmap.
>>
>> That's not really relevant. Child drivers still access via parent's regmap and
>> have unit address. This binding has bus addressing for children, so use it. Do
>> not add random or inconsistent code.
>>
> 
> The registers for interrupt controller are quite scattered within the parent
> syscon block. Take rtd1625-intc-misc as an example, the offsets are 0x4,
> 0xc, 0x80, and 0x88 After adding unit-address and reg.
> It would be like:
> 
> interrupt-controller@4 {
>     compatible = "realtek,rtd1625-intc-misc";
>     reg = <0x4 0x4>,
>           <0xc 0x4>,
>           <0x80 0x4>,
>           <0x88 0x4>;
>     interrupt-controller;

That would mean that this device is instead part of the parent. If you
do not have separate address space, how is it a separate device?

>     ...
> };
> 
> Could you please confirm if this is the correct and preferred approach?
> 
>>>
>>> Will update the example to remove the unnecessary properties from the
>>> parent as follows:
>>>
>>> syscon@7000 {
>>>     compatible = "realtek,rtd1625-iso", "syscon", "simple-mfd";
>>>     reg = <0x7000 0x1000>;
>>>
>>
>> Still incomplete. Where are other devices?
>>
> 
> In the past, Andreas used a generic '@[0-9a-f]+$"' to match child nodes.
> Because of this, in older SoCs (e.g., rtd129x.dtsi, rtd16xx.dtsi,
> rtd139x.dtsi), devices like reset-controller, watchdog, and serial were
> allowed and placed under the iso or misc syscon nodes.
> 
> However, I have some doubts about continuing to use that exact structure:
> 
> 1. We previously discussed and agreed [1] that devices like serial should
> actually be placed under rbus, not syscon.
> 2. For the SoCs introduced in this patch (rtd1319,rtd1319d, rtd1325,
> rtd1625), the drivers for the other child devices (like watchdog) are not
> upstreamed yet.
> 
> To properly fix the "incomplete example" for the simple-mfd structure,
> could you please advise:
> 
> 1. Should I replace the generic '@[0-9a-f]+$' in the YAML binding with
> explicit device definitions for these specific child nodes?
> 2. For the example section, should I just populate it with placeholders
> (e.g., watchdog) referencing Andreas's older DTs (like rtd129x.dtsi) to
> illustrate the MFD structure?
> 
> [1] https://lore.kernel.org/lkml/15951264289d44f797ebd4e05238b380@realtek.com/

If you know that existing pattern is not really correct, please do not
grow it.

Best regards,
Krzysztof


  reply	other threads:[~2026-10-22  6:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18 16:06 [PATCH v5 0/8] Initial support for the Realtek interrupt controller Yu-Chun Lin
2026-10-18 16:06 ` [PATCH v5 1/8] dt-bindings: interrupt-controller: Add support for Realtek DHC SoCs Yu-Chun Lin
2026-10-20  7:25   ` Krzysztof Kozlowski
2026-10-18 16:06 ` [PATCH v5 2/8] dt-bindings: mfd: realtek,rtd1xxx: Add new SoCs Yu-Chun Lin
2026-10-19  9:11   ` Krzysztof Kozlowski
2026-10-18 16:06 ` [PATCH v5 3/8] dt-bindings: mfd: realtek,rtd1xxx: Add interrupt controller child node Yu-Chun Lin
2026-10-19  9:13   ` Krzysztof Kozlowski
2026-10-19 11:19     ` Yu-Chun Lin [林祐君]
2026-10-20  5:51       ` Krzysztof Kozlowski
2026-10-22  6:44         ` Yu-Chun Lin [林祐君]
2026-10-22  6:53           ` Krzysztof Kozlowski [this message]
2026-10-18 16:06 ` [PATCH v5 4/8] irqchip/realtek-intc-common: Add basic support for Realtek DHC SoCs Yu-Chun Lin
2026-10-18 16:06 ` [PATCH v5 5/8] irqchip/realtek-rtd1319: Add driver for Realtek DHC RTD1319 SoC Yu-Chun Lin
2026-10-18 16:06 ` [PATCH v5 6/8] irqchip/realtek-rtd1319d: Add driver for Realtek RTD1319D and RTD1325 SoCs Yu-Chun Lin
2026-10-18 16:06 ` [PATCH v5 7/8] irqchip/realtek-rtd1619b: Add driver for Realtek DHC RTD1619B SoC Yu-Chun Lin
2026-10-18 16:06 ` [PATCH v5 8/8] irqchip/realtek-rtd1625: Add driver for Realtek DHC rtd1625 SoC 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=936769c6-c8e7-4bf2-b300-b287088c31af@kernel.org \
    --to=krzk@kernel.org \
    --cc=afaerber@suse.com \
    --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=mfd@lists.linux.dev \
    --cc=radu@rendec.net \
    --cc=robh@kernel.org \
    --cc=stanley_chang@realtek.com \
    --cc=tglx@kernel.org \
    /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