From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "Conor Dooley" <conor@kernel.org>,
"Peter Wang (王信友)" <peter.wang@mediatek.com>,
"Arnaud Ferraris" <arnaud.ferraris@collabora.com>,
"Louis-Alexis Eyraud" <louisalexis.eyraud@collabora.com>
Cc: "p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Alice Chao (趙珮均)" <Alice.Chao@mediatek.com>,
"krzysztof.kozlowski@linaro.org" <krzysztof.kozlowski@linaro.org>,
"robh@kernel.org" <robh@kernel.org>,
wsd_upstream <wsd_upstream@mediatek.com>,
"Chun-Hung Wu (巫駿宏)" <Chun-hung.Wu@mediatek.com>,
"linux-devicetree@vger.kernel.org"
<linux-devicetree@vger.kernel.org>,
"Naomi Chu (朱詠田)" <Naomi.Chu@mediatek.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"Ed Tsai (蔡宗軒)" <Ed.Tsai@mediatek.com>
Subject: Re: [PATCH v1 1/2] Documentation: dt: reset: add mediatek,syscon-reset binding
Date: Thu, 2 Jul 2026 10:55:43 +0200 [thread overview]
Message-ID: <7ad86380-6fc3-40d0-8908-22ab2943ac55@collabora.com> (raw)
In-Reply-To: <20260701-city-during-7d76a326f2f4@spud>
On 7/1/26 18:57, Conor Dooley wrote:
> On Wed, Jul 01, 2026 at 06:35:20AM +0000, Peter Wang (王信友) wrote:
>> On Fri, 2026-06-26 at 10:33 +0200, Philipp Zabel wrote
>>>
>>> Where is the binding doc for mediatek,mt8183-ufs0cfg_ao? Is this
>>> simple-mfd just to load the reset driver?
>>>
>>
>> Hi Philipp,
>>
>> Thanks for the review, and sorry for the late reply.
>> Yes, "mediatek,mt8183-ufs0cfg_ao" should be removed.
>> I will remove it in the next version.
>>
>>>> + reg = <0x16840000 0x1000>;
>>>> + #address-cells = <1>;
>>>> + #size-cells = <1>;
>>>> +
>>>> + ufs0cfgao_rst: reset-controller {
>>>> + compatible = "mediatek,syscon-reset";
>>>
>>> It looks to me like this is just two registers inside ufs0cfg_ao, not
>>> a
>>> separate device. Why don't you just add #reset-cells to the parent
>>> node?
>>>
>>>> + #reset-cells = <1>;
>>>> + mediatek,reset-bits =
>>>> + <0x48 3 0x4c 3 100>,
>>>> + <0x148 0 0x14c 0 100>,
>>>> + <0x148 1 0x14c 1 100>,
>>>> + <0x148 2 0x14c 2 0>;
>>>> + };
>>>
>>> Why is this in DT? This should be a table in the reset driver.
>>>
>>> regards
>>> Philipp
>>
>> Regarding the child node and reset-bits in DT,
>> We chose the child node approach with 'mediatek,reset-bits' defined
>> in DT to keep the reset line descriptions self-contained and reusable
>> across different SoC variants. MediaTek has many SoCs (mt8183, mt6985,
>> mt6989, ...) where the same UFS subsystem may have different register
>> offsets for reset lines. By describing them in DT, we can support new
>> SoC variants by updating the DT alone, without requiring a new driver
>> patch for every new SoC.
>
> From what I recall, mediatek ufs is a mess with lots of vendor kernel
> type things slipping into mainline without proper review on the DT
> front.
> Because of that, I at least am going to require that everything is done
> completely (and perhaps excessively) by the book here, including
> introducing complete bindings for syscon regions rather than partial
> bits for components like this one.
>
Conor, thanks for chiming in.
I would've done that earlier but I'm going through a bit of busy period here, so
thanks x2.
Yes the UFS driver is quite a bit messy.
The latest version of our series that cleans it up is version 9, sent quite a while
ago at this point:
https://patchwork.kernel.org/project/linux-scsi/cover/20260306-mt8196-ufs-v9-0-55b073f7a830@collabora.com/
...but anyway, during these months we kept going on with it and we do have a newer
version of this series in our tree, which we're planning to send in a week or two.
That'll start fixing stuff around, at least, in both bindings and code.
>> This approach is also consistent with the existing 'ti,syscon-reset'
>> binding, which uses a similar per-entry table property 'ti,reset-bits'
>> to describe reset lines within a syscon block.
>
> This was done about 10 years ago, I would not consider it a guide for
> what's acceptable today.
>
I completely agree about that. Honestly, I'm not even sure why MediaTek needs the
resets in the ufscfg0-ao space (because I didn't do extensive research, but that
might be rightful), but this is getting a bit annoying as they keep pushing for
adding something similar to the TI syscon reset at least at every new chip that
comes out (or every 6-8 months if I recall correctly), and we keep doing the same
review over and over.
Please MediaTek, stop trying to add syscon-reset. Please!
I know that you're trying to do that because in your downstream you never stopped
using ti,syscon-reset: if that works better for you in your downstream, that's ok
as it's purely yours but, as a matter of fact, in this form, it's not upstreamable.
If you have to upstream a *pure* reset controller, make a reset controller driver
and put it in the appropriate kernel subsystem - but I also want to remind you
that I know MediaTek SoCs, and I know that up until MT8196 there shouldn't be any
hardware that is purely a reset controller (as in, there's no IP that manages only
resets).
Thanks everyone!
Angelo
next prev parent reply other threads:[~2026-07-02 8:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 7:46 [PATCH v1 0/2] reset: mediatek: add syscon-based reset controller peter.wang
2026-06-26 7:46 ` [PATCH v1 1/2] Documentation: dt: reset: add mediatek,syscon-reset binding peter.wang
2026-06-26 8:33 ` Philipp Zabel
2026-06-26 15:53 ` Conor Dooley
2026-07-01 6:36 ` Peter Wang (王信友)
2026-07-01 6:35 ` Peter Wang (王信友)
2026-07-01 16:57 ` Conor Dooley
2026-07-02 8:52 ` Peter Wang (王信友)
2026-07-02 18:44 ` Conor Dooley
2026-07-02 8:55 ` AngeloGioacchino Del Regno [this message]
2026-07-02 9:39 ` Peter Wang (王信友)
2026-07-03 9:21 ` Philipp Zabel
2026-07-06 12:53 ` Peter Wang (王信友)
2026-06-26 7:46 ` [PATCH v1 2/2] reset: mediatek: add syscon-based reset controller driver peter.wang
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=7ad86380-6fc3-40d0-8908-22ab2943ac55@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=Alice.Chao@mediatek.com \
--cc=Chun-hung.Wu@mediatek.com \
--cc=Ed.Tsai@mediatek.com \
--cc=Naomi.Chu@mediatek.com \
--cc=arnaud.ferraris@collabora.com \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=louisalexis.eyraud@collabora.com \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=peter.wang@mediatek.com \
--cc=robh@kernel.org \
--cc=wsd_upstream@mediatek.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