Skip to contentSkip to conversation

pinctrl: mediatek: Add support for MT8196

PATCH In review ot907280 3 participants 5 messages Nov 11, 2024 – Jan 13, 2025

Subsystems (4)
lore
Share & tools
lore

ot907280

author
#0 lore raw

PATCH 1/1 pinctrl: mediatek: Add support for MT8196

From: Guodong Liu <[email protected]>

Add register address for each pin config.
Add the function for each pin.

Cathy Xu <[email protected]>

---
 drivers/pinctrl/mediatek/Kconfig              |   12 +
 drivers/pinctrl/mediatek/Makefile             |    1 +
 drivers/pinctrl/mediatek/pinctrl-mt8196.c     | 1757 +++++++++++
 drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h | 2791 +++++++++++++++++
 4 files changed, 4561 insertions(+)
 create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt8196.c
 create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h
drivers/pinctrl/mediatek/Kconfig +12 -0
index a417a031659c..149a78e4216e 100644
@@ -256,6 +256,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
drivers/pinctrl/mediatek/Makefile +1 -0
index 1405d434218e..b4a39c1bafb7 100644
@@ -35,6 +35,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
drivers/pinctrl/mediatek/pinctrl-mt8196.c new file +1757 -0

1,757 lines not on this page · raw message

drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h new file +2791 -0

1,218 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.34.1

Part of the diff is not shown here. View the raw message.

#1 lore raw

Le 11/11/2024 à 09:53, ot907280 a écrit :

Quoted 8 lines

From: Guodong Liu <[email protected]>

Add register address for each pin config.
Add the function for each pin.

Cathy Xu <[email protected]>
---

Hi,

Quoted 16 lines
drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h new file +10 -0
new file mode 100644
index 000000000000..9732ede74d9b
@@ -0,0 +1,2791 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2024 Mediatek Inc.
+ * Author: Guodong Liu <[email protected]>
+ *
+ */
+
+#ifndef __PINCTRL_MTK_MT8196_H
+#define __PINCTRL_MTK_MT8196_H
+

...

drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h line 2791

Quoted 9 lines
drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h new file +9 -0
+	MTK_PIN(
+		292, "veint292",
+		MTK_EINT_FUNCTION(0, 292),
+		DRV_GRP4,
+		MTK_FUNCTION(0, NULL)
+	)
+};
+
+#endif /* __PINCTRL__MTK_MT8196_H */

Nitpick: there is an extra _ before MTK here.

#2 lore raw
Quoted 36 lines · Christophe JAILLET

External email : Please do not click links or open attachments until you have verified the sender or the content.

Quoted 8 lines · Le 11/11/2024 à 09:53, ot907280 a écrit :

From: Guodong Liu <[email protected]>

Add register address for each pin config.
Add the function for each pin.

Cathy Xu <[email protected]>
---

Hi,

Quoted 17 lines
drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h new file +10 -0
new file mode 100644
index 000000000000..9732ede74d9b
@@ -0,0 +1,2791 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2024 Mediatek Inc.
+ * Author: Guodong Liu <[email protected]>
+ *
+ */
+
+#ifndef __PINCTRL_MTK_MT8196_H
+#define __PINCTRL_MTK_MT8196_H
+

...

Quoted 11 lines

drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h line 2791

Quoted 9 lines
drivers/pinctrl/mediatek/pinctrl-mtk-mt8196.h new file +9 -0
+     MTK_PIN(
+             292, "veint292",
+             MTK_EINT_FUNCTION(0, 292),
+             DRV_GRP4,
+             MTK_FUNCTION(0, NULL)
+     )
+};
+
+#endif /* __PINCTRL__MTK_MT8196_H */

Nitpick: there is an extra _ before MTK here.

Thank you for your review. it will be fixed in next version.

Quoted 1 line
#3 lore raw
In reply to ot907280
Quoted 7 lines · On Mon, Nov 11, 2024 at 9:54 AM ot907280 <[email protected]> wrote:

From: Guodong Liu <[email protected]>

Add register address for each pin config.
Add the function for each pin.

Cathy Xu <[email protected]>

This looks fine, but there are no device tree bindings for mt8196? What do you expect me to do here, I can't merge a device tree based driver for a hardware without DT bindings.

Yours,
Linus Walleij

#4 lore raw
Quoted 12 lines · Linus Walleij

External email : Please do not click links or open attachments until you have verified the sender or the content.

Quoted 5 lines · On Mon, Nov 11, 2024 at 9:54 AM ot907280 <[email protected]> wrote:

From: Guodong Liu <[email protected]>

Add register address for each pin config.
Add the function for each pin.

Quoted 6 lines
Quoted 2 lines

Cathy Xu <[email protected]>

This looks fine, but there are no device tree bindings for mt8196? What do you expect me to do here, I can't merge a device tree based driver for a hardware without DT bindings.

Thank you for your review. mt8196 bindings will be add in next
version.

Quoted 3 lines

Yours,
Linus Walleij