[PATCH v6 8/8] pinctrl: mediatek: Add MT6735 pinctrl driver

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Mon Oct 14 00:55:07 PDT 2024


Il 11/10/24 14:03, Yassine Oudjana ha scritto:
> From: Yassine Oudjana <y.oudjana at protonmail.com>
> 
> Add a driver for the MediaTek MT6735 SoC pin controller. This driver
> also supports the pin controller on MT6735M, which lacks 6 physical
> pins (198-203) used for MSDC2 on MT6735.
> 
> Signed-off-by: Yassine Oudjana <y.oudjana at protonmail.com>
> ---
>   MAINTAINERS                                   |    3 +
>   drivers/pinctrl/mediatek/Kconfig              |    6 +
>   drivers/pinctrl/mediatek/Makefile             |    1 +
>   drivers/pinctrl/mediatek/pinctrl-mt6735.c     |  880 ++++
>   drivers/pinctrl/mediatek/pinctrl-mtk-mt6735.h | 3993 +++++++++++++++++
>   5 files changed, 4883 insertions(+)
>   create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt6735.c
>   create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt6735.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f95ae886f9fd8..28de4a76bc05a 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -18315,6 +18315,9 @@ PIN CONTROLLER - MEDIATEK MT6735
>   M:	Yassine Oudjana <y.oudjana at protonmail.com>
>   L:	linux-mediatek at lists.infradead.org (moderated for non-subscribers)
>   S:	Maintained
> +F:	Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
> +F:	drivers/pinctrl/mediatek/pinctrl-mt6735.c
> +F:	drivers/pinctrl/mediatek/pinctrl-mtk-mt6735.h
>   F:	include/dt-bindings/pinctrl/mediatek,mt6735-pinctrl.h
>   
>   PIN CONTROLLER - MICROCHIP AT91
> diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
> index 7af287252834a..73052dad0e4a1 100644
> --- a/drivers/pinctrl/mediatek/Kconfig
> +++ b/drivers/pinctrl/mediatek/Kconfig
> @@ -133,6 +133,12 @@ config PINCTRL_MT2712
>   	default ARM64 && ARCH_MEDIATEK
>   	select PINCTRL_MTK
>   
> +config PINCTRL_MT6735
> +	bool "MediaTek MT6735(M) pin control"

bool "MediaTek MT6735 and MT6735m pin control"

> +	depends on OF

depends on ARM64 || COMPILE_TEST

> +	default ARM64 && ARCH_MEDIATEK
> +	select PINCTRL_MTK_PARIS
> +
>   config PINCTRL_MT6765
>   	tristate "MediaTek MT6765 pin control"
>   	depends on OF
> diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile
> index 680f7e8526e00..f8ea0926b06db 100644
> --- a/drivers/pinctrl/mediatek/Makefile
> +++ b/drivers/pinctrl/mediatek/Makefile
> @@ -18,6 +18,7 @@ obj-$(CONFIG_PINCTRL_MT2701)		+= pinctrl-mt2701.o
>   obj-$(CONFIG_PINCTRL_MT2712)		+= pinctrl-mt2712.o
>   obj-$(CONFIG_PINCTRL_MT8135)		+= pinctrl-mt8135.o
>   obj-$(CONFIG_PINCTRL_MT8127)		+= pinctrl-mt8127.o
> +obj-$(CONFIG_PINCTRL_MT6735)		+= pinctrl-mt6735.o
>   obj-$(CONFIG_PINCTRL_MT6765)		+= pinctrl-mt6765.o
>   obj-$(CONFIG_PINCTRL_MT6779)		+= pinctrl-mt6779.o
>   obj-$(CONFIG_PINCTRL_MT6795)		+= pinctrl-mt6795.o
> diff --git a/drivers/pinctrl/mediatek/pinctrl-mt6735.c b/drivers/pinctrl/mediatek/pinctrl-mt6735.c
> new file mode 100644
> index 0000000000000..3366860d8b493
> --- /dev/null
> +++ b/drivers/pinctrl/mediatek/pinctrl-mt6735.c
> @@ -0,0 +1,880 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2022 Yassine Oudjana <y.oudjana at protonmail.com>
> + */
> +

..snip...


static const unsigned int debounce_time_mt6735[] = {
	1, 1000, 16000, 32000, 64000, 128000, 256000, 0
};

> +
> +static const struct mtk_eint_hw mt6735_eint_hw = {
> +	.port_mask = 7,
> +	.ports     = 6,
> +	.ap_num    = 224,
> +	.db_cnt    = 16,
	.db_time   = debounce_time_mt6735,

> +};

After which:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>





More information about the Linux-mediatek mailing list