From: Hanks Chen <hanks.chen@mediatek.com>
To: Sean Wang <sean.wang@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>, <devicetree@vger.kernel.org>,
<wsd_upstream@mediatek.com>, Andy Teng <andy.teng@mediatek.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
lkml <linux-kernel@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Mars Cheng <mars.cheng@mediatek.com>
Subject: Re: [PATCH v5 4/6] pinctrl: mediatek: add pinctrl support for MT6779 SoC
Date: Thu, 28 May 2020 20:34:36 +0800 [thread overview]
Message-ID: <1590669276.4266.8.camel@mtkswgap22> (raw)
In-Reply-To: <CAGp9Lzrci=qhU6QXPfGg=-dGtKNq1Xn-rhYWvPp-8Wj6v6oJwA@mail.gmail.com>
On Thu, 2020-04-02 at 14:46 -0700, Sean Wang wrote:
> Hi Hanks,
>
> On Wed, Mar 25, 2020 at 2:31 AM Hanks Chen <hanks.chen@mediatek.com> wrote:
> >
> > This adds MT6779 pinctrl driver based on MediaTek pinctrl-paris core.
> >
>
> We can add some useful help text about MT6779 pinctrl, especially
> about specific parts like virtual gpio and its attributes
> Then Acked-by: Sean Wang <sean.wang@kernel.org>
>
Got it, I'll add it in next version.
Thanks for the advices.
> > Signed-off-by: Hanks Chen <hanks.chen@mediatek.com>
> > Signed-off-by: Mars Cheng <mars.cheng@mediatek.com>
> > Signed-off-by: Andy Teng <andy.teng@mediatek.com>
> > ---
> > drivers/pinctrl/mediatek/Kconfig | 7 +
> > drivers/pinctrl/mediatek/Makefile | 1 +
> > drivers/pinctrl/mediatek/pinctrl-mt6779.c | 775 +++++++++
> > drivers/pinctrl/mediatek/pinctrl-mtk-mt6779.h | 2085 +++++++++++++++++++++++++
> > 4 files changed, 2868 insertions(+)
> > create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt6779.c
> > create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt6779.h
> >
> > diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
> > index 701f9af..f628d01 100644
> > --- a/drivers/pinctrl/mediatek/Kconfig
> > +++ b/drivers/pinctrl/mediatek/Kconfig
> > @@ -86,6 +86,13 @@ config PINCTRL_MT6765
> > default ARM64 && ARCH_MEDIATEK
> > select PINCTRL_MTK_PARIS
> >
> > +config PINCTRL_MT6779
> > + bool "Mediatek MT6779 pin control"
> > + depends on OF
> > + depends on ARM64 || COMPILE_TEST
> > + default ARM64 && ARCH_MEDIATEK
> > + select PINCTRL_MTK_PARIS
> > +
> > config PINCTRL_MT6797
> > bool "Mediatek MT6797 pin control"
> > depends on OF
> > diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile
> > index a74325a..59c1c60 100644
> > --- a/drivers/pinctrl/mediatek/Makefile
> > +++ b/drivers/pinctrl/mediatek/Makefile
> > @@ -11,6 +11,7 @@ obj-$(CONFIG_PINCTRL_MT2712) += pinctrl-mt2712.o
> > obj-$(CONFIG_PINCTRL_MT8135) += pinctrl-mt8135.o
> > obj-$(CONFIG_PINCTRL_MT8127) += pinctrl-mt8127.o
> > obj-$(CONFIG_PINCTRL_MT6765) += pinctrl-mt6765.o
> > +obj-$(CONFIG_PINCTRL_MT6779) += pinctrl-mt6779.o
> > obj-$(CONFIG_PINCTRL_MT6797) += pinctrl-mt6797.o
> > obj-$(CONFIG_PINCTRL_MT7622) += pinctrl-mt7622.o
> > obj-$(CONFIG_PINCTRL_MT7623) += pinctrl-mt7623.o
> > diff --git a/drivers/pinctrl/mediatek/pinctrl-mt6779.c b/drivers/pinctrl/mediatek/pinctrl-mt6779.c
> > new file mode 100644
> > index 0000000..145bf22
> > --- /dev/null
> > +++ b/drivers/pinctrl/mediatek/pinctrl-mt6779.c
> > @@ -0,0 +1,775 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (C) 2019 MediaTek Inc.
> > + * Author: Andy Teng <andy.teng@mediatek.com>
> > + *
> > + */
> > +
> > +#include "pinctrl-mtk-mt6779.h"
> > +#include "pinctrl-paris.h"
> > +
> > +/* MT6779 have multiple bases to program pin configuration listed as the below:
> > + * gpio:0x10005000, iocfg_rm:0x11C20000, iocfg_br:0x11D10000,
> > + * iocfg_lm:0x11E20000, iocfg_lb:0x11E70000, iocfg_rt:0x11EA0000,
> > + * iocfg_lt:0x11F20000, iocfg_tl:0x11F30000
> > + * _i_based could be used to indicate what base the pin should be mapped into.
> > + */
> > +
> > +#define PIN_FIELD_BASE(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits) \
> > + PIN_FIELD_CALC(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits, \
> > + 32, 0)
> > +
>
> <snip>
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2020-05-28 12:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 9:31 [PATCH v5 0/6] Add basic SoC Support for Mediatek MT6779 SoC Hanks Chen
2020-03-25 9:31 ` [PATCH v5 1/6] dt-bindings: pinctrl: add bindings for MediaTek " Hanks Chen
2020-03-26 16:28 ` Rob Herring
2020-03-26 17:43 ` Rob Herring
2020-05-28 11:51 ` Hanks Chen
2020-03-25 9:31 ` [PATCH v5 2/6] pinctrl: mediatek: update pinmux definitions for mt6779 Hanks Chen
2020-04-02 21:54 ` Sean Wang
2020-05-28 11:59 ` Hanks Chen
2020-03-25 9:31 ` [PATCH v5 3/6] pinctrl: mediatek: avoid virtual gpio trying to set reg Hanks Chen
2020-04-02 21:33 ` Sean Wang
2020-03-25 9:31 ` [PATCH v5 4/6] pinctrl: mediatek: add pinctrl support for MT6779 SoC Hanks Chen
2020-03-25 15:05 ` Randy Dunlap
2020-04-02 21:46 ` Sean Wang
2020-05-28 12:34 ` Hanks Chen [this message]
2020-03-25 9:31 ` [PATCH v5 5/6] pinctrl: mediatek: add mt6779 eint support Hanks Chen
2020-03-25 9:31 ` [PATCH v5 6/6] arm64: dts: add dts nodes for MT6779 Hanks Chen
2020-03-25 16:39 ` Matthias Brugger
2020-06-16 13:34 ` Hanks Chen
2020-06-22 11:25 ` Matthias Brugger
2020-06-22 12:09 ` Hanks Chen
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=1590669276.4266.8.camel@mtkswgap22 \
--to=hanks.chen@mediatek.com \
--cc=andy.teng@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=mars.cheng@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=sean.wang@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;
as well as URLs for NNTP newsgroup(s).