Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "Alice Chao (趙珮均)" <Alice.Chao@mediatek.com>,
	"krzysztof.kozlowski@linaro.org" <krzysztof.kozlowski@linaro.org>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"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: Wed, 1 Jul 2026 06:35:20 +0000	[thread overview]
Message-ID: <d077d61fa0e22a2e602dc3c8b47512a847f1049e.camel@mediatek.com> (raw)
In-Reply-To: <4ac862d82690a850eeaa997f041f22ee61233ed7.camel@pengutronix.de>

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.

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.

Thanks
Peter


  parent reply	other threads:[~2026-07-01  6:35 UTC|newest]

Thread overview: 13+ 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 (王信友) [this message]
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
2026-07-02  9:39           ` Peter Wang (王信友)
2026-07-03  9:21       ` Philipp Zabel
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=d077d61fa0e22a2e602dc3c8b47512a847f1049e.camel@mediatek.com \
    --to=peter.wang@mediatek.com \
    --cc=Alice.Chao@mediatek.com \
    --cc=Chun-hung.Wu@mediatek.com \
    --cc=Ed.Tsai@mediatek.com \
    --cc=Naomi.Chu@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=conor+dt@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=matthias.bgg@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --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