mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jiaxun Yang" <jiaxun.yang@flygoat.com>
To: "Krzysztof Kozlowski" <krzk@kernel.org>,
	"Lee Jones" <lee@kernel.org>, "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"paulburton@kernel.org" <paulburton@kernel.org>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>
Subject: Re: [PATCH v3 7/8] dt-bindings: mfd: Add img,boston-platform-regs
Date: Sat, 22 Jun 2024 20:06:24 +0100	[thread overview]
Message-ID: <5eed908d-3943-4a4d-b0ec-c7acdae63c5e@app.fastmail.com> (raw)
In-Reply-To: <6ca74ccf-b93e-4d77-8609-a12a96c15f38@kernel.org>



在2024年6月22日六月 下午7:12,Krzysztof Kozlowski写道:
> On 21/06/2024 17:51, Jiaxun Yang wrote:
>> 
>> 
>> 在2024年6月20日六月 上午7:40,Krzysztof Kozlowski写道:
>> [...]
>>>>
>>>> Hi Krzysztof,
>>>>
>>>> I believe U-Boot's implementation is correct. As per simple-mfd binding:
>>>>
>>>> ```
>>>> simple-mfd" - this signifies that the operating system should
>>>>   consider all subnodes of the MFD device as separate devices akin to how
>>>>   "simple-bus" indicates when to see subnodes as children for a simple
>>>>   memory-mapped bus.
>>>> ```
>>>>
>>>> This reads to me as "if you want sub nodes to be populated as devices
>>>> you need this."
>>>>
>>>> In our case there are "clock" and "reset" node sub nodes which should be
>>>> probed as regular device, so it's true for us.
>>>
>>> No, you already got comment from Rob.
>>>
>>> Your children depend on parent to provide IO address, so this is not
>>> simple-mfd. Rule for simple-mfd is that children do not rely on parent
>>> at all.
>>>
>> Hi Krzysztof,
>> 
>> Sorry but can I ask for clarification on "depend on parent to provide IO
>> address", do you mind explaining it a little bit? Does it mean children
>> should get regmap node from a phandle property, not the parent node? Or there
>> should be a reg property for child node to tell register offset etc?
>> 
>> There are way too much usage that children "depends" on parents somehow
>> in tree, so I want to confirm my understanding.
>
>
> Your driver relies on parent IO address to be provided - what's more to
> explain here? If parent does not provide syscon, does the child work?
> No. Therefore it is not suited for simple-mfd.
>
I can name too much "simple-mfd" devices that depending on parent to get
it's syscon, in fact it's true for almost all "simple-mfd" users now.

I greped RISC-V's DTS, and all two users have child nodes depends on parent
node to get "IO address". For "canaan,k210-sysctl" it's both "canaan,k210-clk"
and "canaan,k210-rst", for "starfive,jh7110-sys-syscon" that's "starfive,jh7110-pll".

If that's something prohibited, then we may need a generic driver in kernel to
catch all those syscon devices lost eligibility to "simple-mfd" to get their childs
populated.

We also need to think about how to handle "syscon-reboot-mode" and "syscon-reboot".
"syscon-reboot-mode" is explicitly relying on parent IO address, for "syscon-reboot"
the ability of not relying on parent node (regmap property) is deprecated as well.

I think we need to make those rules explicit, I'm happy to write a document or update
Devicetree specification about that, but I need to make it crystal clear to myself first.

Thanks
[...]
>
> Best regards,
> Krzysztof

-- 
- Jiaxun

  reply	other threads:[~2024-06-22 19:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 15:11 [PATCH v3 0/8] MIPS: Boston: Fix syscon devicetree binding and node Jiaxun Yang
2024-06-18 15:11 ` [PATCH v3 1/8] MIPS: dts: Boston: Add simple-mfd compatible for syscon Jiaxun Yang
2024-06-18 15:11 ` [PATCH v3 2/8] MIPS: dts: Boston: Move syscon-reboot node under syscon Jiaxun Yang
2024-06-18 15:11 ` [PATCH v3 3/8] MIPS: dts: Boston: Rename clock node as clock-controller Jiaxun Yang
2024-06-18 15:11 ` [PATCH v3 4/8] MIPS: dts: Boston: Remove unused #interrupt-cells Jiaxun Yang
2024-06-18 15:11 ` [PATCH v3 5/8] MIPS: dts: Boston: Add model property Jiaxun Yang
2024-06-18 15:11 ` [PATCH v3 6/8] MIPS: dts: Boston: Rename uart node Jiaxun Yang
2024-06-18 15:11 ` [PATCH v3 7/8] dt-bindings: mfd: Add img,boston-platform-regs Jiaxun Yang
2024-06-19  9:28   ` Krzysztof Kozlowski
2024-06-19 11:20     ` Jiaxun Yang
2024-06-20  6:40       ` Krzysztof Kozlowski
2024-06-20 16:13         ` Jiaxun Yang
2024-06-20 16:16           ` Krzysztof Kozlowski
2024-06-20 16:32             ` Jiaxun Yang
2024-06-21 15:51         ` Jiaxun Yang
2024-06-22 18:12           ` Krzysztof Kozlowski
2024-06-22 19:06             ` Jiaxun Yang [this message]
2024-06-27 20:44       ` Rob Herring
2024-06-18 15:11 ` [PATCH v3 8/8] dt-bindings: mips: img: Add devices binding Jiaxun Yang
2024-06-20  6:43   ` 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=5eed908d-3943-4a4d-b0ec-c7acdae63c5e@app.fastmail.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=paulburton@kernel.org \
    --cc=robh@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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

all inboxes | Powered by JetHome®