From: "Cathy Xu (许华婷)" <ot_cathy.xu@mediatek.com>
To: "robh@kernel.org" <robh@kernel.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"sean.wang@kernel.org" <sean.wang@kernel.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"Lei Xue (薛磊)" <Lei.Xue@mediatek.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"Wenbin Mei (梅文彬)" <Wenbin.Mei@mediatek.com>,
"Guodong Liu (刘国栋)" <Guodong.Liu@mediatek.com>,
"Yong Mao (毛勇)" <yong.mao@mediatek.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Axe Yang (杨磊)" <Axe.Yang@mediatek.com>
Subject: Re: [PATCH v4 3/3] pinctrl: mediatek: Add pinctrl driver on mt8196
Date: Fri, 28 Feb 2025 08:59:30 +0000 [thread overview]
Message-ID: <b3b8b1afb7410a779eae4009db76352e921695e3.camel@mediatek.com> (raw)
In-Reply-To: <4ae2ef45-93c8-4cac-8331-0962085cea10@collabora.com>
On Fri, 2025-02-28 at 09:49 +0100, AngeloGioacchino Del Regno wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Il 28/02/25 02:16, Cathy Xu ha scritto:
> > From: Guodong Liu <guodong.liu@mediatek.com>
> >
> > Add pinctrl driver support for MediaTek Soc mt8196.
> >
> > Signed-off-by: Guodong Liu <guodong.liu@mediatek.com>
> > Signed-off-by: Cathy Xu <ot_cathy.xu@mediatek.com>
> > ---
> > drivers/pinctrl/mediatek/Kconfig | 12 +
> > drivers/pinctrl/mediatek/Makefile | 1 +
> > drivers/pinctrl/mediatek/pinctrl-mt8196.c | 1857 +++++++++++
> > drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h | 2789
> > +++++++++++++++++
> > 4 files changed, 4659 insertions(+)
> > create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt8196.c
> > create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h
> >
> > diff --git a/drivers/pinctrl/mediatek/Kconfig
> > b/drivers/pinctrl/mediatek/Kconfig
> > index 58f32818a0e6..b59d94a0fe3b 100644
> > --- a/drivers/pinctrl/mediatek/Kconfig
> > +++ b/drivers/pinctrl/mediatek/Kconfig
> > @@ -263,6 +263,18 @@ config PINCTRL_MT8195
> > default ARM64 && ARCH_MEDIATEK
> > select PINCTRL_MTK_PARIS
> >
> > +config PINCTRL_MT8196
> > + bool "MediaTek MT8196 pin control"
> > + depends on OF
> > + depends on ARM64 || COMPILE_TEST
> > + default ARM64 && ARCH_MEDIATEK
> > + select PINCTRL_MTK_PARIS
> > + help
> > + Say yes here to support pin controller and gpio driver
> > + on MediaTek MT8196 SoC.
> > + In MTK platform, we support virtual gpio and use it to
> > + map specific eint which doesn't have real gpio pin.
> > +
> > config PINCTRL_MT8365
> > bool "MediaTek MT8365 pin control"
> > depends on OF
> > diff --git a/drivers/pinctrl/mediatek/Makefile
> > b/drivers/pinctrl/mediatek/Makefile
> > index 721ae83476d0..08e7239fcd8b 100644
> > --- a/drivers/pinctrl/mediatek/Makefile
> > +++ b/drivers/pinctrl/mediatek/Makefile
> > @@ -36,6 +36,7 @@ obj-$(CONFIG_PINCTRL_MT8186) +=
> > pinctrl-mt8186.o
> > obj-$(CONFIG_PINCTRL_MT8188) += pinctrl-mt8188.o
> > obj-$(CONFIG_PINCTRL_MT8192) += pinctrl-mt8192.o
> > obj-$(CONFIG_PINCTRL_MT8195) += pinctrl-mt8195.o
> > +obj-$(CONFIG_PINCTRL_MT8196) += pinctrl-mt8196.o
> > obj-$(CONFIG_PINCTRL_MT8365) += pinctrl-mt8365.o
> > obj-$(CONFIG_PINCTRL_MT8516) += pinctrl-mt8516.o
> > obj-$(CONFIG_PINCTRL_MT6397) += pinctrl-mt6397.o
> > diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8196.c
> > b/drivers/pinctrl/mediatek/pinctrl-mt8196.c
> > new file mode 100644
> > index 000000000000..1baefdc7e36d
> > --- /dev/null
> > +++ b/drivers/pinctrl/mediatek/pinctrl-mt8196.c
> > @@ -0,0 +1,1857 @@
>
> ..snip..
>
> > +
> > +static const struct mtk_pin_soc mt8196_data = {
> > + .reg_cal = mt8196_reg_cals,
> > + .pins = mtk_pins_mt8196,
> > + .npins = ARRAY_SIZE(mtk_pins_mt8196),
> > + .ngrps = ARRAY_SIZE(mtk_pins_mt8196),
> > + .eint_hw = &mt8196_eint_hw,
> > + .nfuncs = 8,
> > + .gpio_m = 0,
> > + .base_names = mt8196_pinctrl_register_base_names,
> > + .nbase_names =
> > ARRAY_SIZE(mt8196_pinctrl_register_base_names),
> > + .pull_type = mt8196_pull_type,
> > + .pin_rsel = mt8196_pin_rsel_val_range,
> > + .npin_rsel = ARRAY_SIZE(mt8196_pin_rsel_val_range),
> > + .bias_set_combo = mtk_pinconf_bias_set_combo,
> > + .bias_get_combo = mtk_pinconf_bias_get_combo,
> > + .drive_set = mtk_pinconf_drive_set_rev1,
> > + .drive_get = mtk_pinconf_drive_get_rev1,
> > + .adv_drive_get = mtk_pinconf_adv_drive_get_raw,
> > + .adv_drive_set = mtk_pinconf_adv_drive_set_raw,
>
> In the cover letter, you said:
>
> "Add values in SI units option to |struct mtk_pin_soc| in pinctrl-
> mt8196.c"
>
> ....I don't see that here though?
Thank you for your review.
I add |.pin_rsel = mt8196_pin_rsel_val_range| to support SI units,
you can see |mt8196_pin_rsel_val_range| array.
>
> > +};
> > +
> > +static const struct of_device_id mt8196_pinctrl_of_match[] = {
> > + { .compatible = "mediatek,mt8196-pinctrl", .data =
> > &mt8196_data },
> > + { }
>
> { /* sentinel */ }
>
> > +};
> > +
> > +static struct platform_driver mt8196_pinctrl_driver = {
> > + .driver = {
> > + .name = "mt8196-pinctrl",
> > + .of_match_table = mt8196_pinctrl_of_match,
> > + .pm = pm_sleep_ptr(&mtk_paris_pinctrl_pm_ops),
> > + },
> > + .probe = mtk_paris_pinctrl_probe,
> > +};
> > +
> > +static int __init mt8196_pinctrl_init(void)
> > +{
> > + return platform_driver_register(&mt8196_pinctrl_driver);
> > +}
> > +arch_initcall(mt8196_pinctrl_init);
> > +
> > +MODULE_DESCRIPTION("MediaTek MT8196 Pinctrl Driver");
>
> MODULE_LICENSE is missing!
>
> Cheers,
> Angelo
>
> > diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h
> > b/drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h
> > new file mode 100644
> > index 000000000000..d342d091672c
next prev parent reply other threads:[~2025-02-28 9:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 1:16 [PATCH v4 0/3] pinctrl: mediatek: Add pinctrl driver on mt8196 Cathy Xu
2025-02-28 1:16 ` [PATCH v4 1/3] dt-bindings: pinctrl: mediatek: Add support for mt8196 Cathy Xu
2025-02-28 2:26 ` Rob Herring (Arm)
2025-02-28 3:11 ` Cathy Xu (许华婷)
2025-02-28 7:16 ` Krzysztof Kozlowski
2025-02-28 8:54 ` Cathy Xu (许华婷)
2025-02-28 1:16 ` [PATCH v4 2/3] arm64: dts: mediatek: mt8196: Add pinmux macro header file Cathy Xu
2025-02-28 1:16 ` [PATCH v4 3/3] pinctrl: mediatek: Add pinctrl driver on mt8196 Cathy Xu
2025-02-28 8:49 ` AngeloGioacchino Del Regno
2025-02-28 8:59 ` Cathy Xu (许华婷) [this message]
2025-02-28 9:12 ` Cathy Xu (许华婷)
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=b3b8b1afb7410a779eae4009db76352e921695e3.camel@mediatek.com \
--to=ot_cathy.xu@mediatek.com \
--cc=Axe.Yang@mediatek.com \
--cc=Guodong.Liu@mediatek.com \
--cc=Lei.Xue@mediatek.com \
--cc=Wenbin.Mei@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=robh@kernel.org \
--cc=sean.wang@kernel.org \
--cc=yong.mao@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