Re: [PATCH v5 4/6] pinctrl: mediatek: add pinctrl support for MT6779 SoC

From: Hanks Chen
Date: Thu May 28 2020 - 08:34:45 EST


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@xxxxxxxxxxxx> 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@xxxxxxxxxx>
>
Got it, I'll add it in next version.
Thanks for the advices.

> > Signed-off-by: Hanks Chen <hanks.chen@xxxxxxxxxxxx>
> > Signed-off-by: Mars Cheng <mars.cheng@xxxxxxxxxxxx>
> > Signed-off-by: Andy Teng <andy.teng@xxxxxxxxxxxx>
> > ---
> > 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@xxxxxxxxxxxx>
> > + *
> > + */
> > +
> > +#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@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-mediatek