Skip to contentSkip to conversation

pinctrl: ralink: fix ABI, improve driver, move to mediatek, improve dt-bindings

RFC PATCH In review [email protected] 5 participants 45 messages Feb 22, 2023 – Mar 3, 2023

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

cover pinctrl: ralink: fix ABI, improve driver, move to mediatek, improve dt-bindings

This is an ambitious effort I've been wanting to do for months.

Straight off the bat, I'm fixing the ABI that I broke a while back, by reintroducing the ralink,rt2880-pinmux compatible string.

If you take a look at the schema for mt7620 and rt305x, some functions got multiple lists for groups. Like refclk on mt7620. Because mt7620 and mt7628/mt7688 SoCs use the same compatible string, it's impossible to differentiate on the binding which SoC a devicetree is actually for. Therefore, the binding will allow all groups listed for that function. For example, if the SoC is mt7620, only the refclk function for the mdio group can be used. If one were to put "spi cs1" as the function there, there wouldn't be a warning.

I address this by introducing new compatible strings for these SoCs, then split the schemas. I also separate mt7628/mt7688 from mt7620 pinctrl subdriver in the process.

I wanted to split the rt305x driver too but too much code would be reused so I backed down from that.

Ralink was acquired by MediaTek in 2011. These SoCs have been rebranded as MediaTek. We're moving the Ralink pinctrl driver to MediaTek, and rename the schemas to mediatek.

I've renamed the ralink core driver to mtmips. I decided to call the core mtmips as I've seen folks from MediaTek use the same name when they added support for MT7621 pinctrl on U-Boot. Feel free to comment on this.

The MTMIPS pinctrl driver requires rt_sysc_membase from arch/mips/ralink/of.c, so, for COMPILE_TEST to be useful, RALINK must be selected. These headers, asm/mach-ralink/ralink_regs.h and asm/mach-ralink/mt7620.h, from arch/mips/include are also required but they can easily be included:

ifeq ($(CONFIG_COMPILE_TEST),y)
CFLAGS_pinctrl-mtmips.o += -I$(srctree)/arch/mips/include
endif

Sergio, do you see a way to make the pinctrl driver independent of architecture code? At least avoid using rt_sysc_membase.

dtbs_check will print warnings for DTs with the old strings as it will match multiple bindings. I assume that's acceptable in order to have the things properly documented without breaking the ABI. The bindings will work fine with the new compatible strings.

I could define the checks under $defs:, then refer to it if the compatible string is the one which would work fine. Or I could put only the new compatible strings on the documentation. What are your thoughts Krzysztof, Rob?

Arınç

#1 lore raw

RFC PATCH 1/16 pinctrl: ralink: reintroduce ralink,rt2880-pinmux compatible string

From: Arınç ÜNAL <[email protected]>

There have been stable releases with the ralink,rt2880-pinmux compatible string included. Having it removed breaks the ABI. Reintroduce it.

Fixes e5981cd46183 ("pinctrl: ralink: add new compatible strings for each pinctrl subdriver")
---
 drivers/pinctrl/ralink/pinctrl-mt7620.c | 1 +
 drivers/pinctrl/ralink/pinctrl-mt7621.c | 1 +
 drivers/pinctrl/ralink/pinctrl-rt2880.c | 1 +
 drivers/pinctrl/ralink/pinctrl-rt305x.c | 1 +
 drivers/pinctrl/ralink/pinctrl-rt3883.c | 1 +
 5 files changed, 5 insertions(+)
drivers/pinctrl/ralink/pinctrl-mt7620.c +1 -0
index 4e8d26bb3430..06b86c726839 100644
@@ -372,6 +372,7 @@ static int mt7620_pinctrl_probe(struct platform_device *pdev)
 
 static const struct of_device_id mt7620_pinctrl_match[] = {
 	{ .compatible = "ralink,mt7620-pinctrl" },
+	{ .compatible = "ralink,rt2880-pinmux" },
 	{}
 };
 MODULE_DEVICE_TABLE(of, mt7620_pinctrl_match);
drivers/pinctrl/ralink/pinctrl-mt7621.c +1 -0
index eddc0ba6d468..fb5824922e78 100644
@@ -97,6 +97,7 @@ static int mt7621_pinctrl_probe(struct platform_device *pdev)
 
 static const struct of_device_id mt7621_pinctrl_match[] = {
 	{ .compatible = "ralink,mt7621-pinctrl" },
+	{ .compatible = "ralink,rt2880-pinmux" },
 	{}
 };
 MODULE_DEVICE_TABLE(of, mt7621_pinctrl_match);
drivers/pinctrl/ralink/pinctrl-rt2880.c +1 -0
index 3e2f1aaaf095..d7a65fcc7755 100644
@@ -41,6 +41,7 @@ static int rt2880_pinctrl_probe(struct platform_device *pdev)
 
 static const struct of_device_id rt2880_pinctrl_match[] = {
 	{ .compatible = "ralink,rt2880-pinctrl" },
+	{ .compatible = "ralink,rt2880-pinmux" },
 	{}
 };
 MODULE_DEVICE_TABLE(of, rt2880_pinctrl_match);
drivers/pinctrl/ralink/pinctrl-rt305x.c +1 -0
index bdaee5ce1ee0..f6092c64383e 100644
@@ -118,6 +118,7 @@ static int rt305x_pinctrl_probe(struct platform_device *pdev)
 
 static const struct of_device_id rt305x_pinctrl_match[] = {
 	{ .compatible = "ralink,rt305x-pinctrl" },
+	{ .compatible = "ralink,rt2880-pinmux" },
 	{}
 };
 MODULE_DEVICE_TABLE(of, rt305x_pinctrl_match);
drivers/pinctrl/ralink/pinctrl-rt3883.c +1 -0
index 392208662355..5f766d76bafa 100644
@@ -88,6 +88,7 @@ static int rt3883_pinctrl_probe(struct platform_device *pdev)
 
 static const struct of_device_id rt3883_pinctrl_match[] = {
 	{ .compatible = "ralink,rt3883-pinctrl" },
+	{ .compatible = "ralink,rt2880-pinmux" },
 	{}
 };
 MODULE_DEVICE_TABLE(of, rt3883_pinctrl_match);
Signature · 1 line
2.37.2
#2 lore raw

RFC PATCH 2/16 pinctrl: ralink: add mediatek compatible strings

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

Ralink was acquired by MediaTek in 2011. These SoCs have been rebranded as MediaTek. Add new compatible strings to reflect that.

---
 drivers/pinctrl/ralink/pinctrl-mt7620.c | 1 +
 drivers/pinctrl/ralink/pinctrl-mt7621.c | 1 +
 drivers/pinctrl/ralink/pinctrl-rt2880.c | 1 +
 drivers/pinctrl/ralink/pinctrl-rt305x.c | 1 +
 drivers/pinctrl/ralink/pinctrl-rt3883.c | 1 +
 5 files changed, 5 insertions(+)
drivers/pinctrl/ralink/pinctrl-mt7620.c +1 -0
index 06b86c726839..88b0c6a4ee18 100644
@@ -371,6 +371,7 @@ static int mt7620_pinctrl_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id mt7620_pinctrl_match[] = {
+	{ .compatible = "mediatek,mt7620-pinctrl" },
 	{ .compatible = "ralink,mt7620-pinctrl" },
 	{ .compatible = "ralink,rt2880-pinmux" },
 	{}
drivers/pinctrl/ralink/pinctrl-mt7621.c +1 -0
index fb5824922e78..2128a94f6d1b 100644
@@ -96,6 +96,7 @@ static int mt7621_pinctrl_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id mt7621_pinctrl_match[] = {
+	{ .compatible = "mediatek,mt7621-pinctrl" },
 	{ .compatible = "ralink,mt7621-pinctrl" },
 	{ .compatible = "ralink,rt2880-pinmux" },
 	{}
drivers/pinctrl/ralink/pinctrl-rt2880.c +1 -0
index d7a65fcc7755..e57b1c5d03dd 100644
@@ -40,6 +40,7 @@ static int rt2880_pinctrl_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id rt2880_pinctrl_match[] = {
+	{ .compatible = "mediatek,rt2880-pinctrl" },
 	{ .compatible = "ralink,rt2880-pinctrl" },
 	{ .compatible = "ralink,rt2880-pinmux" },
 	{}
drivers/pinctrl/ralink/pinctrl-rt305x.c +1 -0
index f6092c64383e..ca62997e716c 100644
@@ -117,6 +117,7 @@ static int rt305x_pinctrl_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id rt305x_pinctrl_match[] = {
+	{ .compatible = "mediatek,rt305x-pinctrl" },
 	{ .compatible = "ralink,rt305x-pinctrl" },
 	{ .compatible = "ralink,rt2880-pinmux" },
 	{}
drivers/pinctrl/ralink/pinctrl-rt3883.c +1 -0
index 5f766d76bafa..b687c70d3555 100644
@@ -87,6 +87,7 @@ static int rt3883_pinctrl_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id rt3883_pinctrl_match[] = {
+	{ .compatible = "mediatek,rt3883-pinctrl" },
 	{ .compatible = "ralink,rt3883-pinctrl" },
 	{ .compatible = "ralink,rt2880-pinmux" },
 	{}
Signature · 1 line
2.37.2
#3 lore raw

RFC PATCH 3/16 pinctrl: ralink: rt305x: add compatible string for every SoC

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

Add a compatible string for every SoC, or SoCs that use the same pinmux data. This ensures that the pin muxing information of every SoC, or a set of SoCs that use the same pinmux data can be properly documented.

---
 drivers/pinctrl/ralink/pinctrl-rt305x.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pinctrl/ralink/pinctrl-rt305x.c +2 -0
index ca62997e716c..a112a83085ea 100644
@@ -118,6 +118,8 @@ static int rt305x_pinctrl_probe(struct platform_device *pdev)
 
 static const struct of_device_id rt305x_pinctrl_match[] = {
 	{ .compatible = "mediatek,rt305x-pinctrl" },
+	{ .compatible = "mediatek,rt3352-pinctrl" },
+	{ .compatible = "mediatek,rt5350-pinctrl" },
 	{ .compatible = "ralink,rt305x-pinctrl" },
 	{ .compatible = "ralink,rt2880-pinmux" },
 	{}
Signature · 1 line
2.37.2
#4 lore raw

RFC PATCH 4/16 pinctrl: ralink: mt7620: split out to mt76x8

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

Split the driver out to pinctrl-mt76x8.c. Remove including the unnecessary headers since is_mt76x8() is not being used anymore.

Introduce a new compatible string to be able to document the pin muxing information properly.

---
 drivers/pinctrl/ralink/Kconfig          |   5 +
 drivers/pinctrl/ralink/Makefile         |   1 +
 drivers/pinctrl/ralink/pinctrl-mt7620.c | 257 +--------------------
 drivers/pinctrl/ralink/pinctrl-mt76x8.c | 283 ++++++++++++++++++++++++
 4 files changed, 290 insertions(+), 256 deletions(-)
 create mode 100644 drivers/pinctrl/ralink/pinctrl-mt76x8.c
drivers/pinctrl/ralink/Kconfig +5 -0
index 1e4c5e43d69b..c5fe4c31aaea 100644
@@ -17,6 +17,11 @@ config PINCTRL_MT7621
         depends on RALINK && SOC_MT7621
         select PINCTRL_RALINK
 
+config PINCTRL_MT76X8
+        bool "MT76X8 pinctrl subdriver"
+        depends on RALINK && SOC_MT7620
+        select PINCTRL_RALINK
+
 config PINCTRL_RT2880
         bool "RT2880 pinctrl subdriver"
         depends on RALINK && SOC_RT288X
drivers/pinctrl/ralink/Makefile +1 -0
index 0ebbe552526d..be9acf2e27fd 100644
@@ -3,6 +3,7 @@ obj-$(CONFIG_PINCTRL_RALINK)   += pinctrl-ralink.o
 
 obj-$(CONFIG_PINCTRL_MT7620)   += pinctrl-mt7620.o
 obj-$(CONFIG_PINCTRL_MT7621)   += pinctrl-mt7621.o
+obj-$(CONFIG_PINCTRL_MT76X8)   += pinctrl-mt76x8.o
 obj-$(CONFIG_PINCTRL_RT2880)   += pinctrl-rt2880.o
 obj-$(CONFIG_PINCTRL_RT305X)   += pinctrl-rt305x.o
 obj-$(CONFIG_PINCTRL_RT3883)   += pinctrl-rt3883.o
drivers/pinctrl/ralink/pinctrl-mt7620.c +1 -256

270 lines not on this page · raw message

drivers/pinctrl/ralink/pinctrl-mt76x8.c new file +283 -0

283 lines not on this page · raw message

Signature · 1 line
2.37.2
#5 lore raw

RFC PATCH 5/16 pinctrl: ralink: move to mediatek as mtmips

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

Ralink was acquired by MediaTek in 2011. These SoCs have been rebranded as MediaTek. Move the driver to mediatek pinctrl directory. Rename the ralink core driver to mtmips.

---
 drivers/pinctrl/Kconfig                       |  1 -
 drivers/pinctrl/Makefile                      |  1 -
 drivers/pinctrl/mediatek/Kconfig              | 51 ++++++++++-
 drivers/pinctrl/mediatek/Makefile             | 63 +++++++------
 .../{ralink => mediatek}/pinctrl-mt7620.c     | 34 +++----
 .../{ralink => mediatek}/pinctrl-mt7621.c     | 30 +++----
 .../{ralink => mediatek}/pinctrl-mt76x8.c     | 60 ++++++-------
 .../pinctrl-mtmips.c}                         | 90 +++++++++----------
 .../pinctrl-mtmips.h}                         | 16 ++--
 .../{ralink => mediatek}/pinctrl-rt2880.c     | 20 ++---
 .../{ralink => mediatek}/pinctrl-rt305x.c     | 44 ++++-----
 .../{ralink => mediatek}/pinctrl-rt3883.c     | 28 +++---
 drivers/pinctrl/ralink/Kconfig                | 40 ---------
 drivers/pinctrl/ralink/Makefile               |  9 --
 14 files changed, 246 insertions(+), 241 deletions(-)
 rename drivers/pinctrl/{ralink => mediatek}/pinctrl-mt7620.c (81%)
 rename drivers/pinctrl/{ralink => mediatek}/pinctrl-mt7621.c (80%)
 rename drivers/pinctrl/{ralink => mediatek}/pinctrl-mt76x8.c (81%)
 rename drivers/pinctrl/{ralink/pinctrl-ralink.c => mediatek/pinctrl-mtmips.c} (74%)
 rename drivers/pinctrl/{ralink/pinctrl-ralink.h => mediatek/pinctrl-mtmips.h} (75%)
 rename drivers/pinctrl/{ralink => mediatek}/pinctrl-rt2880.c (71%)
 rename drivers/pinctrl/{ralink => mediatek}/pinctrl-rt305x.c (75%)
 rename drivers/pinctrl/{ralink => mediatek}/pinctrl-rt3883.c (80%)
 delete mode 100644 drivers/pinctrl/ralink/Kconfig
 delete mode 100644 drivers/pinctrl/ralink/Makefile
drivers/pinctrl/Kconfig +0 -1
index dcb53c4a9584..8a6012770640 100644
@@ -537,7 +537,6 @@ source "drivers/pinctrl/nomadik/Kconfig"
 source "drivers/pinctrl/nuvoton/Kconfig"
 source "drivers/pinctrl/pxa/Kconfig"
 source "drivers/pinctrl/qcom/Kconfig"
-source "drivers/pinctrl/ralink/Kconfig"
 source "drivers/pinctrl/renesas/Kconfig"
 source "drivers/pinctrl/samsung/Kconfig"
 source "drivers/pinctrl/spear/Kconfig"
drivers/pinctrl/Makefile +0 -1
index d5939840bb2a..ada6ed1d4e91 100644
@@ -66,7 +66,6 @@ obj-y				+= nomadik/
 obj-y				+= nuvoton/
 obj-$(CONFIG_PINCTRL_PXA)	+= pxa/
 obj-$(CONFIG_ARCH_QCOM)		+= qcom/
-obj-$(CONFIG_PINCTRL_RALINK)	+= ralink/
 obj-$(CONFIG_PINCTRL_RENESAS)	+= renesas/
 obj-$(CONFIG_PINCTRL_SAMSUNG)	+= samsung/
 obj-$(CONFIG_PINCTRL_SPEAR)	+= spear/
drivers/pinctrl/mediatek/Kconfig +50 -1

68 lines not on this page · raw message

drivers/pinctrl/mediatek/Makefile +35 -28

67 lines not on this page · raw message

drivers/pinctrl/mediatek/pinctrl-mt7620.c renamed from drivers/pinctrl/ralink/pinctrl-mt7620.c +17 -17
similarity index 81%
rename from drivers/pinctrl/ralink/pinctrl-mt7620.c
rename to drivers/pinctrl/mediatek/pinctrl-mt7620.c
index b2245fd65c72..1a2dbbdd25f1 100644
@@ -3,7 +3,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
-#include "pinctrl-ralink.h"
+#include "pinctrl-mtmips.h"
 
 #define MT7620_GPIO_MODE_UART0_SHIFT	2
 #define MT7620_GPIO_MODE_UART0_MASK	0x7
@@ -52,20 +52,20 @@
 #define MT7620_GPIO_MODE_EPHY		15
 #define MT7620_GPIO_MODE_PA		20
 
-static struct ralink_pmx_func i2c_grp[] =  { FUNC("i2c", 0, 1, 2) };
-static struct ralink_pmx_func spi_grp[] = { FUNC("spi", 0, 3, 4) };
-static struct ralink_pmx_func uartlite_grp[] = { FUNC("uartlite", 0, 15, 2) };
-static struct ralink_pmx_func mdio_grp[] = {
+static struct mtmips_pmx_func i2c_grp[] =  { FUNC("i2c", 0, 1, 2) };
+static struct mtmips_pmx_func spi_grp[] = { FUNC("spi", 0, 3, 4) };
+static struct mtmips_pmx_func uartlite_grp[] = { FUNC("uartlite", 0, 15, 2) };
+static struct mtmips_pmx_func mdio_grp[] = {
 	FUNC("mdio", MT7620_GPIO_MODE_MDIO, 22, 2),
 	FUNC("refclk", MT7620_GPIO_MODE_MDIO_REFCLK, 22, 2),
 };
-static struct ralink_pmx_func rgmii1_grp[] = { FUNC("rgmii1", 0, 24, 12) };
-static struct ralink_pmx_func refclk_grp[] = { FUNC("spi refclk", 0, 37, 3) };
-static struct ralink_pmx_func ephy_grp[] = { FUNC("ephy", 0, 40, 5) };
-static struct ralink_pmx_func rgmii2_grp[] = { FUNC("rgmii2", 0, 60, 12) };
-static struct ralink_pmx_func wled_grp[] = { FUNC("wled", 0, 72, 1) };
-static struct ralink_pmx_func pa_grp[] = { FUNC("pa", 0, 18, 4) };
-static struct ralink_pmx_func uartf_grp[] = {
+static struct mtmips_pmx_func rgmii1_grp[] = { FUNC("rgmii1", 0, 24, 12) };
+static struct mtmips_pmx_func refclk_grp[] = { FUNC("spi refclk", 0, 37, 3) };
+static struct mtmips_pmx_func ephy_grp[] = { FUNC("ephy", 0, 40, 5) };
+static struct mtmips_pmx_func rgmii2_grp[] = { FUNC("rgmii2", 0, 60, 12) };
+static struct mtmips_pmx_func wled_grp[] = { FUNC("wled", 0, 72, 1) };
+static struct mtmips_pmx_func pa_grp[] = { FUNC("pa", 0, 18, 4) };
+static struct mtmips_pmx_func uartf_grp[] = {
 	FUNC("uartf", MT7620_GPIO_MODE_UARTF, 7, 8),
 	FUNC("pcm uartf", MT7620_GPIO_MODE_PCM_UARTF, 7, 8),
 	FUNC("pcm i2s", MT7620_GPIO_MODE_PCM_I2S, 7, 8),
@@ -74,20 +74,20 @@ static struct ralink_pmx_func uartf_grp[] = {
 	FUNC("gpio uartf", MT7620_GPIO_MODE_GPIO_UARTF, 7, 4),
 	FUNC("gpio i2s", MT7620_GPIO_MODE_GPIO_I2S, 7, 4),
 };
-static struct ralink_pmx_func wdt_grp[] = {
+static struct mtmips_pmx_func wdt_grp[] = {
 	FUNC("wdt rst", 0, 17, 1),
 	FUNC("wdt refclk", 0, 17, 1),
 	};
-static struct ralink_pmx_func pcie_rst_grp[] = {
+static struct mtmips_pmx_func pcie_rst_grp[] = {
 	FUNC("pcie rst", MT7620_GPIO_MODE_PCIE_RST, 36, 1),
 	FUNC("pcie refclk", MT7620_GPIO_MODE_PCIE_REF, 36, 1)
 };
-static struct ralink_pmx_func nd_sd_grp[] = {
+static struct mtmips_pmx_func nd_sd_grp[] = {
 	FUNC("nand", MT7620_GPIO_MODE_NAND, 45, 15),
 	FUNC("sd", MT7620_GPIO_MODE_SD, 47, 13)
 };
 
-static struct ralink_pmx_group mt7620a_pinmux_data[] = {
+static struct mtmips_pmx_group mt7620a_pinmux_data[] = {
 	GRP("i2c", i2c_grp, 1, MT7620_GPIO_MODE_I2C),
 	GRP("uartf", uartf_grp, MT7620_GPIO_MODE_UART0_MASK,
 		MT7620_GPIO_MODE_UART0_SHIFT),
@@ -112,7 +112,7 @@ static struct ralink_pmx_group mt7620a_pinmux_data[] = {
 
 static int mt7620_pinctrl_probe(struct platform_device *pdev)
 {
-	return ralink_pinctrl_init(pdev, mt7620a_pinmux_data);
+	return mtmips_pinctrl_init(pdev, mt7620a_pinmux_data);
 }
 
 static const struct of_device_id mt7620_pinctrl_match[] = {
drivers/pinctrl/mediatek/pinctrl-mt7621.c renamed from drivers/pinctrl/ralink/pinctrl-mt7621.c +15 -15
similarity index 80%
rename from drivers/pinctrl/ralink/pinctrl-mt7621.c
rename to drivers/pinctrl/mediatek/pinctrl-mt7621.c
index 2128a94f6d1b..96c5ef942cf4 100644
@@ -3,7 +3,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
-#include "pinctrl-ralink.h"
+#include "pinctrl-mtmips.h"
 
 #define MT7621_GPIO_MODE_UART1		1
 #define MT7621_GPIO_MODE_I2C		2
@@ -34,40 +34,40 @@
 #define MT7621_GPIO_MODE_SDHCI_SHIFT	18
 #define MT7621_GPIO_MODE_SDHCI_GPIO	1
 
-static struct ralink_pmx_func uart1_grp[] =  { FUNC("uart1", 0, 1, 2) };
-static struct ralink_pmx_func i2c_grp[] =  { FUNC("i2c", 0, 3, 2) };
-static struct ralink_pmx_func uart3_grp[] = {
+static struct mtmips_pmx_func uart1_grp[] =  { FUNC("uart1", 0, 1, 2) };
+static struct mtmips_pmx_func i2c_grp[] =  { FUNC("i2c", 0, 3, 2) };
+static struct mtmips_pmx_func uart3_grp[] = {
 	FUNC("uart3", 0, 5, 4),
 	FUNC("i2s", 2, 5, 4),
 	FUNC("spdif3", 3, 5, 4),
 };
-static struct ralink_pmx_func uart2_grp[] = {
+static struct mtmips_pmx_func uart2_grp[] = {
 	FUNC("uart2", 0, 9, 4),
 	FUNC("pcm", 2, 9, 4),
 	FUNC("spdif2", 3, 9, 4),
 };
-static struct ralink_pmx_func jtag_grp[] = { FUNC("jtag", 0, 13, 5) };
-static struct ralink_pmx_func wdt_grp[] = {
+static struct mtmips_pmx_func jtag_grp[] = { FUNC("jtag", 0, 13, 5) };
+static struct mtmips_pmx_func wdt_grp[] = {
 	FUNC("wdt rst", 0, 18, 1),
 	FUNC("wdt refclk", 2, 18, 1),
 };
-static struct ralink_pmx_func pcie_rst_grp[] = {
+static struct mtmips_pmx_func pcie_rst_grp[] = {
 	FUNC("pcie rst", MT7621_GPIO_MODE_PCIE_RST, 19, 1),
 	FUNC("pcie refclk", MT7621_GPIO_MODE_PCIE_REF, 19, 1)
 };
-static struct ralink_pmx_func mdio_grp[] = { FUNC("mdio", 0, 20, 2) };
-static struct ralink_pmx_func rgmii2_grp[] = { FUNC("rgmii2", 0, 22, 12) };
-static struct ralink_pmx_func spi_grp[] = {
+static struct mtmips_pmx_func mdio_grp[] = { FUNC("mdio", 0, 20, 2) };
+static struct mtmips_pmx_func rgmii2_grp[] = { FUNC("rgmii2", 0, 22, 12) };
+static struct mtmips_pmx_func spi_grp[] = {
 	FUNC("spi", 0, 34, 7),
 	FUNC("nand1", 2, 34, 7),
 };
-static struct ralink_pmx_func sdhci_grp[] = {
+static struct mtmips_pmx_func sdhci_grp[] = {
 	FUNC("sdhci", 0, 41, 8),
 	FUNC("nand2", 2, 41, 8),
 };
-static struct ralink_pmx_func rgmii1_grp[] = { FUNC("rgmii1", 0, 49, 12) };
+static struct mtmips_pmx_func rgmii1_grp[] = { FUNC("rgmii1", 0, 49, 12) };
 
-static struct ralink_pmx_group mt7621_pinmux_data[] = {
+static struct mtmips_pmx_group mt7621_pinmux_data[] = {
 	GRP("uart1", uart1_grp, 1, MT7621_GPIO_MODE_UART1),
 	GRP("i2c", i2c_grp, 1, MT7621_GPIO_MODE_I2C),
 	GRP_G("uart3", uart3_grp, MT7621_GPIO_MODE_UART3_MASK,
@@ -92,7 +92,7 @@ static struct ralink_pmx_group mt7621_pinmux_data[] = {
 
 static int mt7621_pinctrl_probe(struct platform_device *pdev)
 {
-	return ralink_pinctrl_init(pdev, mt7621_pinmux_data);
+	return mtmips_pinctrl_init(pdev, mt7621_pinmux_data);
 }
 
 static const struct of_device_id mt7621_pinctrl_match[] = {
drivers/pinctrl/mediatek/pinctrl-mt76x8.c renamed from drivers/pinctrl/ralink/pinctrl-mt76x8.c +30 -30

217 lines not on this page · raw message

drivers/pinctrl/mediatek/pinctrl-mtmips.c renamed from drivers/pinctrl/ralink/pinctrl-ralink.c +45 -45

219 lines not on this page · raw message

drivers/pinctrl/mediatek/pinctrl-mtmips.h renamed from drivers/pinctrl/ralink/pinctrl-ralink.h +8 -8
similarity index 75%
rename from drivers/pinctrl/ralink/pinctrl-ralink.h
rename to drivers/pinctrl/mediatek/pinctrl-mtmips.h
index e6037be1e153..a7c3dd724431 100644
@@ -3,8 +3,8 @@
  *  Copyright (C) 2012 John Crispin <[email protected]>
  */
 
-#ifndef _PINCTRL_RALINK_H__
-#define _PINCTRL_RALINK_H__
+#ifndef _PINCTRL_MTMIPS_H__
+#define _PINCTRL_MTMIPS_H__
 
 #define FUNC(name, value, pin_first, pin_count) \
 	{ name, value, pin_first, pin_count }
@@ -19,9 +19,9 @@
 	  .func = _func, .gpio = _gpio, \
 	  .func_count = ARRAY_SIZE(_func) }
 
-struct ralink_pmx_group;
+struct mtmips_pmx_group;
 
-struct ralink_pmx_func {
+struct mtmips_pmx_func {
 	const char *name;
 	const char value;
 
@@ -35,7 +35,7 @@ struct ralink_pmx_func {
 	int enabled;
 };
 
-struct ralink_pmx_group {
+struct mtmips_pmx_group {
 	const char *name;
 	int enabled;
 
@@ -43,11 +43,11 @@ struct ralink_pmx_group {
 	const char mask;
 	const char gpio;
 
-	struct ralink_pmx_func *func;
+	struct mtmips_pmx_func *func;
 	int func_count;
 };
 
-int ralink_pinctrl_init(struct platform_device *pdev,
-			struct ralink_pmx_group *data);
+int mtmips_pinctrl_init(struct platform_device *pdev,
+			struct mtmips_pmx_group *data);
 
 #endif
drivers/pinctrl/mediatek/pinctrl-rt2880.c renamed from drivers/pinctrl/ralink/pinctrl-rt2880.c +10 -10
similarity index 71%
rename from drivers/pinctrl/ralink/pinctrl-rt2880.c
rename to drivers/pinctrl/mediatek/pinctrl-rt2880.c
index e57b1c5d03dd..d3b21e6242e1 100644
@@ -4,7 +4,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
-#include "pinctrl-ralink.h"
+#include "pinctrl-mtmips.h"
 
 #define RT2880_GPIO_MODE_I2C		BIT(0)
 #define RT2880_GPIO_MODE_UART0		BIT(1)
@@ -15,15 +15,15 @@
 #define RT2880_GPIO_MODE_SDRAM		BIT(6)
 #define RT2880_GPIO_MODE_PCI		BIT(7)
 
-static struct ralink_pmx_func i2c_grp[] = { FUNC("i2c", 0, 1, 2) };
-static struct ralink_pmx_func spi_grp[] = { FUNC("spi", 0, 3, 4) };
-static struct ralink_pmx_func uartlite_grp[] = { FUNC("uartlite", 0, 7, 8) };
-static struct ralink_pmx_func jtag_grp[] = { FUNC("jtag", 0, 17, 5) };
-static struct ralink_pmx_func mdio_grp[] = { FUNC("mdio", 0, 22, 2) };
-static struct ralink_pmx_func sdram_grp[] = { FUNC("sdram", 0, 24, 16) };
-static struct ralink_pmx_func pci_grp[] = { FUNC("pci", 0, 40, 32) };
+static struct mtmips_pmx_func i2c_grp[] = { FUNC("i2c", 0, 1, 2) };
+static struct mtmips_pmx_func spi_grp[] = { FUNC("spi", 0, 3, 4) };
+static struct mtmips_pmx_func uartlite_grp[] = { FUNC("uartlite", 0, 7, 8) };
+static struct mtmips_pmx_func jtag_grp[] = { FUNC("jtag", 0, 17, 5) };
+static struct mtmips_pmx_func mdio_grp[] = { FUNC("mdio", 0, 22, 2) };
+static struct mtmips_pmx_func sdram_grp[] = { FUNC("sdram", 0, 24, 16) };
+static struct mtmips_pmx_func pci_grp[] = { FUNC("pci", 0, 40, 32) };
 
-static struct ralink_pmx_group rt2880_pinmux_data_act[] = {
+static struct mtmips_pmx_group rt2880_pinmux_data_act[] = {
 	GRP("i2c", i2c_grp, 1, RT2880_GPIO_MODE_I2C),
 	GRP("spi", spi_grp, 1, RT2880_GPIO_MODE_SPI),
 	GRP("uartlite", uartlite_grp, 1, RT2880_GPIO_MODE_UART0),
@@ -36,7 +36,7 @@ static struct ralink_pmx_group rt2880_pinmux_data_act[] = {
 
 static int rt2880_pinctrl_probe(struct platform_device *pdev)
 {
-	return ralink_pinctrl_init(pdev, rt2880_pinmux_data_act);
+	return mtmips_pinctrl_init(pdev, rt2880_pinmux_data_act);
 }
 
 static const struct of_device_id rt2880_pinctrl_match[] = {
drivers/pinctrl/mediatek/pinctrl-rt305x.c renamed from drivers/pinctrl/ralink/pinctrl-rt305x.c +22 -22

91 lines not on this page · raw message

drivers/pinctrl/mediatek/pinctrl-rt3883.c renamed from drivers/pinctrl/ralink/pinctrl-rt3883.c +14 -14
similarity index 80%
rename from drivers/pinctrl/ralink/pinctrl-rt3883.c
rename to drivers/pinctrl/mediatek/pinctrl-rt3883.c
index b687c70d3555..758350ce2ebe 100644
@@ -3,7 +3,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
-#include "pinctrl-ralink.h"
+#include "pinctrl-mtmips.h"
 
 #define RT3883_GPIO_MODE_UART0_SHIFT	2
 #define RT3883_GPIO_MODE_UART0_MASK	0x7
@@ -39,9 +39,9 @@
 #define RT3883_GPIO_MODE_LNA_G_GPIO	0x3
 #define RT3883_GPIO_MODE_LNA_G		_RT3883_GPIO_MODE_LNA_G(RT3883_GPIO_MODE_LNA_G_MASK)
 
-static struct ralink_pmx_func i2c_grp[] =  { FUNC("i2c", 0, 1, 2) };
-static struct ralink_pmx_func spi_grp[] = { FUNC("spi", 0, 3, 4) };
-static struct ralink_pmx_func uartf_grp[] = {
+static struct mtmips_pmx_func i2c_grp[] =  { FUNC("i2c", 0, 1, 2) };
+static struct mtmips_pmx_func spi_grp[] = { FUNC("spi", 0, 3, 4) };
+static struct mtmips_pmx_func uartf_grp[] = {
 	FUNC("uartf", RT3883_GPIO_MODE_UARTF, 7, 8),
 	FUNC("pcm uartf", RT3883_GPIO_MODE_PCM_UARTF, 7, 8),
 	FUNC("pcm i2s", RT3883_GPIO_MODE_PCM_I2S, 7, 8),
@@ -50,21 +50,21 @@ static struct ralink_pmx_func uartf_grp[] = {
 	FUNC("gpio uartf", RT3883_GPIO_MODE_GPIO_UARTF, 7, 4),
 	FUNC("gpio i2s", RT3883_GPIO_MODE_GPIO_I2S, 7, 4),
 };
-static struct ralink_pmx_func uartlite_grp[] = { FUNC("uartlite", 0, 15, 2) };
-static struct ralink_pmx_func jtag_grp[] = { FUNC("jtag", 0, 17, 5) };
-static struct ralink_pmx_func mdio_grp[] = { FUNC("mdio", 0, 22, 2) };
-static struct ralink_pmx_func lna_a_grp[] = { FUNC("lna a", 0, 32, 3) };
-static struct ralink_pmx_func lna_g_grp[] = { FUNC("lna g", 0, 35, 3) };
-static struct ralink_pmx_func pci_grp[] = {
+static struct mtmips_pmx_func uartlite_grp[] = { FUNC("uartlite", 0, 15, 2) };
+static struct mtmips_pmx_func jtag_grp[] = { FUNC("jtag", 0, 17, 5) };
+static struct mtmips_pmx_func mdio_grp[] = { FUNC("mdio", 0, 22, 2) };
+static struct mtmips_pmx_func lna_a_grp[] = { FUNC("lna a", 0, 32, 3) };
+static struct mtmips_pmx_func lna_g_grp[] = { FUNC("lna g", 0, 35, 3) };
+static struct mtmips_pmx_func pci_grp[] = {
 	FUNC("pci-dev", 0, 40, 32),
 	FUNC("pci-host2", 1, 40, 32),
 	FUNC("pci-host1", 2, 40, 32),
 	FUNC("pci-fnc", 3, 40, 32)
 };
-static struct ralink_pmx_func ge1_grp[] = { FUNC("ge1", 0, 72, 12) };
-static struct ralink_pmx_func ge2_grp[] = { FUNC("ge2", 0, 84, 12) };
+static struct mtmips_pmx_func ge1_grp[] = { FUNC("ge1", 0, 72, 12) };
+static struct mtmips_pmx_func ge2_grp[] = { FUNC("ge2", 0, 84, 12) };
 
-static struct ralink_pmx_group rt3883_pinmux_data[] = {
+static struct mtmips_pmx_group rt3883_pinmux_data[] = {
 	GRP("i2c", i2c_grp, 1, RT3883_GPIO_MODE_I2C),
 	GRP("spi", spi_grp, 1, RT3883_GPIO_MODE_SPI),
 	GRP("uartf", uartf_grp, RT3883_GPIO_MODE_UART0_MASK,
@@ -83,7 +83,7 @@ static struct ralink_pmx_group rt3883_pinmux_data[] = {
 
 static int rt3883_pinctrl_probe(struct platform_device *pdev)
 {
-	return ralink_pinctrl_init(pdev, rt3883_pinmux_data);
+	return mtmips_pinctrl_init(pdev, rt3883_pinmux_data);
 }
 
 static const struct of_device_id rt3883_pinctrl_match[] = {
drivers/pinctrl/ralink/Kconfig deleted +0 -40
deleted file mode 100644
index c5fe4c31aaea..000000000000
@@ -1,40 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-menu "Ralink pinctrl drivers"
-        depends on RALINK
-
-config PINCTRL_RALINK
-        bool "Ralink pinctrl driver"
-        select PINMUX
-        select GENERIC_PINCONF
-
-config PINCTRL_MT7620
-        bool "MT7620 pinctrl subdriver"
-        depends on RALINK && SOC_MT7620
-        select PINCTRL_RALINK
-
-config PINCTRL_MT7621
-        bool "MT7621 pinctrl subdriver"
-        depends on RALINK && SOC_MT7621
-        select PINCTRL_RALINK
-
-config PINCTRL_MT76X8
-        bool "MT76X8 pinctrl subdriver"
-        depends on RALINK && SOC_MT7620
-        select PINCTRL_RALINK
-
-config PINCTRL_RT2880
-        bool "RT2880 pinctrl subdriver"
-        depends on RALINK && SOC_RT288X
-        select PINCTRL_RALINK
-
-config PINCTRL_RT305X
-        bool "RT305X pinctrl subdriver"
-        depends on RALINK && SOC_RT305X
-        select PINCTRL_RALINK
-
-config PINCTRL_RT3883
-        bool "RT3883 pinctrl subdriver"
-        depends on RALINK && SOC_RT3883
-        select PINCTRL_RALINK
-
-endmenu
drivers/pinctrl/ralink/Makefile deleted +0 -9
deleted file mode 100644
index be9acf2e27fd..000000000000
@@ -1,9 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_PINCTRL_RALINK)   += pinctrl-ralink.o
-
-obj-$(CONFIG_PINCTRL_MT7620)   += pinctrl-mt7620.o
-obj-$(CONFIG_PINCTRL_MT7621)   += pinctrl-mt7621.o
-obj-$(CONFIG_PINCTRL_MT76X8)   += pinctrl-mt76x8.o
-obj-$(CONFIG_PINCTRL_RT2880)   += pinctrl-rt2880.o
-obj-$(CONFIG_PINCTRL_RT305X)   += pinctrl-rt305x.o
-obj-$(CONFIG_PINCTRL_RT3883)   += pinctrl-rt3883.o
Signature · 1 line
2.37.2
#6 lore raw

RFC PATCH 6/16 pinctrl: mediatek: remove OF_GPIO as reverse dependency

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

The OF_GPIO option is enabled by default when GPIOLIB is enabled, and cannot be disabled. Remove it as a reverse dependency where GPIOLIB is also set as a reverse dependency.

---
 drivers/pinctrl/mediatek/Kconfig | 3 ---
 1 file changed, 3 deletions(-)
drivers/pinctrl/mediatek/Kconfig +0 -3
index 3a6b99b23f35..809037b146a2 100644
@@ -17,7 +17,6 @@ config PINCTRL_MTK
 	select GENERIC_PINCONF
 	select GPIOLIB
 	select EINT_MTK
-	select OF_GPIO
 
 config PINCTRL_MTK_V2
 	tristate
@@ -35,7 +34,6 @@ config PINCTRL_MTK_MOORE
 	select GENERIC_PINCTRL_GROUPS
 	select GENERIC_PINMUX_FUNCTIONS
 	select GPIOLIB
-	select OF_GPIO
 	select EINT_MTK
 	select PINCTRL_MTK_V2
 
@@ -46,7 +44,6 @@ config PINCTRL_MTK_PARIS
 	select GENERIC_PINCONF
 	select GPIOLIB
 	select EINT_MTK
-	select OF_GPIO
 	select PINCTRL_MTK_V2
 
 # For MIPS SoCs
Signature · 1 line
2.37.2
#7 lore raw

RFC PATCH 7/16 dt-bindings: pinctrl: ralink: add new compatible strings

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

Add the ralink,rt2880-pinmux compatible string. It had been removed from the driver which broke the ABI.

Add the mediatek compatible strings. Change the compatible string on the examples with the mediatek compatible strings.

---
 .../devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml | 7 +++++--
 .../devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml | 7 +++++--
 .../devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml | 7 +++++--
 .../devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml | 7 +++++--
 .../devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml | 7 +++++--
 5 files changed, 25 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +5 -2
index 1e63ea34146a..531b5f616c3d 100644
@@ -17,7 +17,10 @@ description:
 
 properties:
   compatible:
-    const: ralink,mt7620-pinctrl
+    enum:
+      - mediatek,mt7620-pinctrl
+      - ralink,mt7620-pinctrl
+      - ralink,rt2880-pinmux
 
 patternProperties:
   '-pins$':
@@ -647,7 +650,7 @@ additionalProperties: false
 examples:
   - |
     pinctrl {
-      compatible = "ralink,mt7620-pinctrl";
+      compatible = "mediatek,mt7620-pinctrl";
 
       i2c_pins: i2c0-pins {
         pinmux {
Documentation/devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml +5 -2
index 1b1d37b981d9..74923ca35c81 100644
@@ -17,7 +17,10 @@ description:
 
 properties:
   compatible:
-    const: ralink,mt7621-pinctrl
+    enum:
+      - mediatek,mt7621-pinctrl
+      - ralink,mt7621-pinctrl
+      - ralink,rt2880-pinmux
 
 patternProperties:
   '-pins$':
@@ -251,7 +254,7 @@ additionalProperties: false
 examples:
   - |
     pinctrl {
-      compatible = "ralink,mt7621-pinctrl";
+      compatible = "mediatek,mt7621-pinctrl";
 
       i2c_pins: i2c0-pins {
         pinmux {
Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml +5 -2
index 7fd0df880a76..aceea6248614 100644
@@ -17,7 +17,10 @@ description:
 
 properties:
   compatible:
-    const: ralink,rt2880-pinctrl
+    enum:
+      - mediatek,rt2880-pinctrl
+      - ralink,rt2880-pinctrl
+      - ralink,rt2880-pinmux
 
 patternProperties:
   '-pins$':
@@ -131,7 +134,7 @@ additionalProperties: false
 examples:
   - |
     pinctrl {
-      compatible = "ralink,rt2880-pinctrl";
+      compatible = "mediatek,rt2880-pinctrl";
 
       i2c_pins: i2c0-pins {
         pinmux {
Documentation/devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml +5 -2
index 4d66ca752a30..4c87fe201809 100644
@@ -18,7 +18,10 @@ description:
 
 properties:
   compatible:
-    const: ralink,rt305x-pinctrl
+    enum:
+      - mediatek,rt305x-pinctrl
+      - ralink,rt305x-pinctrl
+      - ralink,rt2880-pinmux
 
 patternProperties:
   '-pins$':
@@ -264,7 +267,7 @@ additionalProperties: false
 examples:
   - |
     pinctrl {
-      compatible = "ralink,rt305x-pinctrl";
+      compatible = "mediatek,rt305x-pinctrl";
 
       i2c_pins: i2c0-pins {
         pinmux {
Documentation/devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml +5 -2
index 008d93181aea..71049a2b2779 100644
@@ -17,7 +17,10 @@ description:
 
 properties:
   compatible:
-    const: ralink,rt3883-pinctrl
+    enum:
+      - mediatek,rt3883-pinctrl
+      - ralink,rt3883-pinctrl
+      - ralink,rt2880-pinmux
 
 patternProperties:
   '-pins$':
@@ -251,7 +254,7 @@ additionalProperties: false
 examples:
   - |
     pinctrl {
-      compatible = "ralink,rt3883-pinctrl";
+      compatible = "mediatek,rt3883-pinctrl";
 
       i2c_pins: i2c0-pins {
         pinmux {
Signature · 1 line
2.37.2
maintainer
#8 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 22 lines · On Wed, Feb 22, 2023 at 09:39:23PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Add the ralink,rt2880-pinmux compatible string. It had been removed from the driver which broke the ABI.

Add the mediatek compatible strings. Change the compatible string on the examples with the mediatek compatible strings.

---
 .../devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml | 7 +++++--
 .../devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml | 7 +++++--
 .../devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml | 7 +++++--
 .../devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml | 7 +++++--
 .../devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml | 7 +++++--
 5 files changed, 25 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +0 -0
index 1e63ea34146a..531b5f616c3d 100644

Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml description: · line 22

Quoted 7 lines
Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +3 -1
@@ -17,7 +17,10 @@ description:
 
 properties:
   compatible:
-    const: ralink,mt7620-pinctrl
+    enum:
+      - mediatek,mt7620-pinctrl
+      - ralink,mt7620-pinctrl

We don't update compatible strings based on acquistions nor marketing whims. If you want to use 'mediatek' for new things, then fine.

Rob

#9 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 24 lines · Rob Herring
Quoted 23 lines · On Wed, Feb 22, 2023 at 09:39:23PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Add the ralink,rt2880-pinmux compatible string. It had been removed from the driver which broke the ABI.

Add the mediatek compatible strings. Change the compatible string on the examples with the mediatek compatible strings.

---
  .../devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml | 7 +++++--
  .../devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml | 7 +++++--
  .../devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml | 7 +++++--
  .../devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml | 7 +++++--
  .../devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml | 7 +++++--
  5 files changed, 25 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +0 -0
index 1e63ea34146a..531b5f616c3d 100644
@@ -17,7 +17,10 @@ description:
 
Quoted 9 lines

Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml description: · line 22

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +3 -1
  properties:
    compatible:
-    const: ralink,mt7620-pinctrl
+    enum:
+      - mediatek,mt7620-pinctrl
+      - ralink,mt7620-pinctrl

We don't update compatible strings based on acquistions nor marketing whims. If you want to use 'mediatek' for new things, then fine.

Understood. Only the SoCs with rtXXXX were rebranded, the mtXXXX SoCs share the same architecture from Ralink, so they were incorrectly called Ralink SoCs.

I can remove the new strings from Ralink SoCs and add them only for MediaTek SoCs. Or you could make an exception for this one, regarding the situation. Whatever you think is best.

Arınç

maintainer
#10 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 34 lines · Arınç ÜNAL
Quoted 18 lines · Rob Herring
Quoted 17 lines · On Wed, Feb 22, 2023 at 09:39:23PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Add the ralink,rt2880-pinmux compatible string. It had been removed from the driver which broke the ABI.

Add the mediatek compatible strings. Change the compatible string on the examples with the mediatek compatible strings.

---
  .../devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml | 7 +++++--
  .../devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml | 7 +++++--
  .../devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml | 7 +++++--
  .../devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml | 7 +++++--
  .../devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml | 7 +++++--
  5 files changed, 25 insertions(+), 10 deletions(-)
Quoted 14 lines

Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml description: · line 21

Quoted 11 lines
Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +3 -1
index 1e63ea34146a..531b5f616c3d 100644
@@ -17,7 +17,10 @@ description:
  properties:
    compatible:
-    const: ralink,mt7620-pinctrl
+    enum:
+      - mediatek,mt7620-pinctrl
+      - ralink,mt7620-pinctrl

We don't update compatible strings based on acquistions nor marketing whims. If you want to use 'mediatek' for new things, then fine.

Quoted 7 lines

Understood. Only the SoCs with rtXXXX were rebranded, the mtXXXX SoCs share the same architecture from Ralink, so they were incorrectly called Ralink SoCs.

I can remove the new strings from Ralink SoCs and add them only for MediaTek SoCs. Or you could make an exception for this one, regarding the situation. Whatever you think is best.

I'm not in a position to make an exception as I know little about this platform. Carrying both strings is a NAK. Either you (and everyone using these platforms) care about the ABI and are stuck with the "wrong" string. In the end, they are just unique identifiers. Or you don't care and break the ABI and rename everything. If you do that, do just that in your patches and make it crystal clear in the commit msg that is your intention and why that is okay.

Rob

#11 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 43 lines · Rob Herring
Quoted 34 lines · Arınç ÜNAL
Quoted 18 lines · Rob Herring
Quoted 17 lines · On Wed, Feb 22, 2023 at 09:39:23PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Add the ralink,rt2880-pinmux compatible string. It had been removed from the driver which broke the ABI.

Add the mediatek compatible strings. Change the compatible string on the examples with the mediatek compatible strings.

---
   .../devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml | 7 +++++--
   .../devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml | 7 +++++--
   .../devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml | 7 +++++--
   .../devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml | 7 +++++--
   .../devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml | 7 +++++--
   5 files changed, 25 insertions(+), 10 deletions(-)
Quoted 14 lines

Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml description: · line 21

Quoted 11 lines
Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +3 -1
index 1e63ea34146a..531b5f616c3d 100644
@@ -17,7 +17,10 @@ description:
   properties:
     compatible:
-    const: ralink,mt7620-pinctrl
+    enum:
+      - mediatek,mt7620-pinctrl
+      - ralink,mt7620-pinctrl

We don't update compatible strings based on acquistions nor marketing whims. If you want to use 'mediatek' for new things, then fine.

Quoted 7 lines

Understood. Only the SoCs with rtXXXX were rebranded, the mtXXXX SoCs share the same architecture from Ralink, so they were incorrectly called Ralink SoCs.

I can remove the new strings from Ralink SoCs and add them only for MediaTek SoCs. Or you could make an exception for this one, regarding the situation. Whatever you think is best.

Quoted 7 lines

I'm not in a position to make an exception as I know little about this platform. Carrying both strings is a NAK. Either you (and everyone using these platforms) care about the ABI and are stuck with the "wrong" string. In the end, they are just unique identifiers. Or you don't care and break the ABI and rename everything. If you do that, do just that in your patches and make it crystal clear in the commit msg that is your intention and why that is okay.

Ralink had their MIPS SoCs pre-acquisition, RT2880, etc. MediaTek introduced new SoCs post-acquisition, MT7620, MT7621, MT7628, and MT7688, utilising the same platform from Ralink, sharing the same architecture code, pinctrl core driver, etc.

I don't intend to break the ABI at all. On the contrary, I fix it where possible.

If I understand correctly, from this conversation and what Krzysztof said, all strings must be kept on the schemas so I can do what I said on the composed mail. Only match the pin muxing information on the strings that won't match multiple pin muxing information from other schemas.

This way we don't break the ABI, introduce new compatible strings while keeping the remaining ones, and make schemas match correctly.

Let me know if this is acceptable to you.

Arınç

#12 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 65 lines · Arınç ÜNAL
Quoted 43 lines · Rob Herring
Quoted 34 lines · Arınç ÜNAL
Quoted 18 lines · Rob Herring
Quoted 17 lines · On Wed, Feb 22, 2023 at 09:39:23PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Add the ralink,rt2880-pinmux compatible string. It had been removed from the driver which broke the ABI.

Add the mediatek compatible strings. Change the compatible string on the examples with the mediatek compatible strings.

---
   .../devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml | 7 +++++--
   .../devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml | 7 +++++--
   .../devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml | 7 +++++--
   .../devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml | 7 +++++--
   .../devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml | 7 +++++--
   5 files changed, 25 insertions(+), 10 deletions(-)
Quoted 14 lines

Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml description: · line 21

Quoted 11 lines
Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +3 -1
index 1e63ea34146a..531b5f616c3d 100644
@@ -17,7 +17,10 @@ description:
   properties:
     compatible:
-    const: ralink,mt7620-pinctrl
+    enum:
+      - mediatek,mt7620-pinctrl
+      - ralink,mt7620-pinctrl

We don't update compatible strings based on acquistions nor marketing whims. If you want to use 'mediatek' for new things, then fine.

Quoted 7 lines

Understood. Only the SoCs with rtXXXX were rebranded, the mtXXXX SoCs share the same architecture from Ralink, so they were incorrectly called Ralink SoCs.

I can remove the new strings from Ralink SoCs and add them only for MediaTek SoCs. Or you could make an exception for this one, regarding the situation. Whatever you think is best.

Quoted 7 lines

I'm not in a position to make an exception as I know little about this platform. Carrying both strings is a NAK. Either you (and everyone using these platforms) care about the ABI and are stuck with the "wrong" string. In the end, they are just unique identifiers. Or you don't care and break the ABI and rename everything. If you do that, do just that in your patches and make it crystal clear in the commit msg that is your intention and why that is okay.

Ralink had their MIPS SoCs pre-acquisition, RT2880, etc. MediaTek introduced new SoCs post-acquisition, MT7620, MT7621, MT7628, and MT7688, utilising the same platform from Ralink, sharing the same architecture code, pinctrl core driver, etc.

I don't intend to break the ABI at all. On the contrary, I fix it where possible.

If I understand correctly, from this conversation and what Krzysztof said, all strings must be kept on the schemas so I can do what I said on the composed mail. Only match the pin muxing information on the strings that won't match multiple pin muxing information from other schemas.

Quoted 4 lines

This way we don't break the ABI, introduce new compatible strings while keeping the remaining ones, and make schemas match correctly.

Let me know if this is acceptable to you.

If by "introduce new compatible strings" you mean duplicate compatibles to fix the ralink->mediatek, then you ignored entire email from Rob - this and previous. We don't do this. Leave them as is.

If you meant something else, explain more...

Best regards,
Krzysztof

#13 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 69 lines · Krzysztof Kozlowski
Quoted 68 lines · Arınç ÜNAL
Quoted 43 lines · Rob Herring
Quoted 34 lines · Arınç ÜNAL
Quoted 18 lines · Rob Herring
Quoted 17 lines · On Wed, Feb 22, 2023 at 09:39:23PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Add the ralink,rt2880-pinmux compatible string. It had been removed from the driver which broke the ABI.

Add the mediatek compatible strings. Change the compatible string on the examples with the mediatek compatible strings.

---
    .../devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml | 7 +++++--
    .../devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml | 7 +++++--
    .../devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml | 7 +++++--
    .../devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml | 7 +++++--
    .../devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml | 7 +++++--
    5 files changed, 25 insertions(+), 10 deletions(-)
Quoted 14 lines

Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml description: · line 21

Quoted 11 lines
Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +3 -1
index 1e63ea34146a..531b5f616c3d 100644
@@ -17,7 +17,10 @@ description:
    properties:
      compatible:
-    const: ralink,mt7620-pinctrl
+    enum:
+      - mediatek,mt7620-pinctrl
+      - ralink,mt7620-pinctrl

We don't update compatible strings based on acquistions nor marketing whims. If you want to use 'mediatek' for new things, then fine.

Quoted 7 lines

Understood. Only the SoCs with rtXXXX were rebranded, the mtXXXX SoCs share the same architecture from Ralink, so they were incorrectly called Ralink SoCs.

I can remove the new strings from Ralink SoCs and add them only for MediaTek SoCs. Or you could make an exception for this one, regarding the situation. Whatever you think is best.

Quoted 7 lines

I'm not in a position to make an exception as I know little about this platform. Carrying both strings is a NAK. Either you (and everyone using these platforms) care about the ABI and are stuck with the "wrong" string. In the end, they are just unique identifiers. Or you don't care and break the ABI and rename everything. If you do that, do just that in your patches and make it crystal clear in the commit msg that is your intention and why that is okay.

Ralink had their MIPS SoCs pre-acquisition, RT2880, etc. MediaTek introduced new SoCs post-acquisition, MT7620, MT7621, MT7628, and MT7688, utilising the same platform from Ralink, sharing the same architecture code, pinctrl core driver, etc.

I don't intend to break the ABI at all. On the contrary, I fix it where possible.

If I understand correctly, from this conversation and what Krzysztof said, all strings must be kept on the schemas so I can do what I said on the composed mail. Only match the pin muxing information on the strings that won't match multiple pin muxing information from other schemas.

This way we don't break the ABI, introduce new compatible strings while keeping the remaining ones, and make schemas match correctly.

Quoted 7 lines
Quoted 1 line

Let me know if this is acceptable to you.

If by "introduce new compatible strings" you mean duplicate compatibles to fix the ralink->mediatek, then you ignored entire email from Rob - this and previous. We don't do this. Leave them as is.

If you meant something else, explain more...

Let me put them in a group to better explain.

## Fix ABI

ralink,rt2880-pinmux was there before, it was removed which broke the ABI. I'm reintroducing it to fix it.

## New strings to be able to split bindings

New strings are needed for MT7628/MT7688 and some RT SoCs to be able to properly document the pin muxing information.

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

## Exception for RT SoCs to be called MediaTek

This is where I was asking an exception to be made. Rob told us here they know little about the platform so I explained it.

MediaTek acquired Ralink and then introduced new MediaTek SoCs utilising the same platform from Ralink.

Anyway, now that I look at this again, it makes sense to me as well not to rename the Ralink SoCs. I'll call the RT SoCs Ralink on the kconfig, pinctrl driver, and dt-binding schemas on my next version.

Arınç

#14 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 82 lines · Arınç ÜNAL
Quoted 69 lines · Krzysztof Kozlowski
Quoted 68 lines · Arınç ÜNAL
Quoted 43 lines · Rob Herring
Quoted 34 lines · Arınç ÜNAL
Quoted 18 lines · Rob Herring
Quoted 17 lines · On Wed, Feb 22, 2023 at 09:39:23PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Add the ralink,rt2880-pinmux compatible string. It had been removed from the driver which broke the ABI.

Add the mediatek compatible strings. Change the compatible string on the examples with the mediatek compatible strings.

---
    .../devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml | 7 +++++--
    .../devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml | 7 +++++--
    .../devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml | 7 +++++--
    .../devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml | 7 +++++--
    .../devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml | 7 +++++--
    5 files changed, 25 insertions(+), 10 deletions(-)
Quoted 14 lines

Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml description: · line 21

Quoted 11 lines
Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +3 -1
index 1e63ea34146a..531b5f616c3d 100644
@@ -17,7 +17,10 @@ description:
    properties:
      compatible:
-    const: ralink,mt7620-pinctrl
+    enum:
+      - mediatek,mt7620-pinctrl
+      - ralink,mt7620-pinctrl

We don't update compatible strings based on acquistions nor marketing whims. If you want to use 'mediatek' for new things, then fine.

Quoted 7 lines

Understood. Only the SoCs with rtXXXX were rebranded, the mtXXXX SoCs share the same architecture from Ralink, so they were incorrectly called Ralink SoCs.

I can remove the new strings from Ralink SoCs and add them only for MediaTek SoCs. Or you could make an exception for this one, regarding the situation. Whatever you think is best.

Quoted 7 lines

I'm not in a position to make an exception as I know little about this platform. Carrying both strings is a NAK. Either you (and everyone using these platforms) care about the ABI and are stuck with the "wrong" string. In the end, they are just unique identifiers. Or you don't care and break the ABI and rename everything. If you do that, do just that in your patches and make it crystal clear in the commit msg that is your intention and why that is okay.

Ralink had their MIPS SoCs pre-acquisition, RT2880, etc. MediaTek introduced new SoCs post-acquisition, MT7620, MT7621, MT7628, and MT7688, utilising the same platform from Ralink, sharing the same architecture code, pinctrl core driver, etc.

I don't intend to break the ABI at all. On the contrary, I fix it where possible.

If I understand correctly, from this conversation and what Krzysztof said, all strings must be kept on the schemas so I can do what I said on the composed mail. Only match the pin muxing information on the strings that won't match multiple pin muxing information from other schemas.

This way we don't break the ABI, introduce new compatible strings while keeping the remaining ones, and make schemas match correctly.

Quoted 7 lines
Quoted 1 line

Let me know if this is acceptable to you.

If by "introduce new compatible strings" you mean duplicate compatibles to fix the ralink->mediatek, then you ignored entire email from Rob - this and previous. We don't do this. Leave them as is.

If you meant something else, explain more...

Let me put them in a group to better explain.

## Fix ABI

Quoted 7 lines

ralink,rt2880-pinmux was there before, it was removed which broke the ABI. I'm reintroducing it to fix it.

## New strings to be able to split bindings

New strings are needed for MT7628/MT7688 and some RT SoCs to be able to properly document the pin muxing information.

Then ok.

Quoted 5 lines

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

So this part was addressed by Rob - we don't do it, because it does not matter. Ralink is now Mediatek, thus there is no conflict and no issues with different vendor used.

Quoted 6 lines

## Exception for RT SoCs to be called MediaTek

This is where I was asking an exception to be made. Rob told us here they know little about the platform so I explained it.

Quoted 6 lines

MediaTek acquired Ralink and then introduced new MediaTek SoCs utilising the same platform from Ralink.

Anyway, now that I look at this again, it makes sense to me as well not to rename the Ralink SoCs. I'll call the RT SoCs Ralink on the kconfig, pinctrl driver,

These are separate. We did not comment on how you call Linux drivers. The mail thread was only about:

Quoted 1 line

and dt-binding schemas on my next version.

Best regards,
Krzysztof

#15 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 94 lines · Krzysztof Kozlowski
Quoted 82 lines · Arınç ÜNAL
Quoted 69 lines · Krzysztof Kozlowski
Quoted 68 lines · Arınç ÜNAL
Quoted 43 lines · Rob Herring
Quoted 34 lines · Arınç ÜNAL
Quoted 18 lines · Rob Herring
Quoted 17 lines · On Wed, Feb 22, 2023 at 09:39:23PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Add the ralink,rt2880-pinmux compatible string. It had been removed from the driver which broke the ABI.

Add the mediatek compatible strings. Change the compatible string on the examples with the mediatek compatible strings.

---
     .../devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml | 7 +++++--
     .../devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml | 7 +++++--
     .../devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml | 7 +++++--
     .../devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml | 7 +++++--
     .../devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml | 7 +++++--
     5 files changed, 25 insertions(+), 10 deletions(-)
Quoted 14 lines

Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml description: · line 21

Quoted 11 lines
Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +3 -1
index 1e63ea34146a..531b5f616c3d 100644
@@ -17,7 +17,10 @@ description:
     properties:
       compatible:
-    const: ralink,mt7620-pinctrl
+    enum:
+      - mediatek,mt7620-pinctrl
+      - ralink,mt7620-pinctrl

We don't update compatible strings based on acquistions nor marketing whims. If you want to use 'mediatek' for new things, then fine.

Quoted 7 lines

Understood. Only the SoCs with rtXXXX were rebranded, the mtXXXX SoCs share the same architecture from Ralink, so they were incorrectly called Ralink SoCs.

I can remove the new strings from Ralink SoCs and add them only for MediaTek SoCs. Or you could make an exception for this one, regarding the situation. Whatever you think is best.

Quoted 7 lines

I'm not in a position to make an exception as I know little about this platform. Carrying both strings is a NAK. Either you (and everyone using these platforms) care about the ABI and are stuck with the "wrong" string. In the end, they are just unique identifiers. Or you don't care and break the ABI and rename everything. If you do that, do just that in your patches and make it crystal clear in the commit msg that is your intention and why that is okay.

Ralink had their MIPS SoCs pre-acquisition, RT2880, etc. MediaTek introduced new SoCs post-acquisition, MT7620, MT7621, MT7628, and MT7688, utilising the same platform from Ralink, sharing the same architecture code, pinctrl core driver, etc.

I don't intend to break the ABI at all. On the contrary, I fix it where possible.

If I understand correctly, from this conversation and what Krzysztof said, all strings must be kept on the schemas so I can do what I said on the composed mail. Only match the pin muxing information on the strings that won't match multiple pin muxing information from other schemas.

This way we don't break the ABI, introduce new compatible strings while keeping the remaining ones, and make schemas match correctly.

Quoted 7 lines
Quoted 1 line

Let me know if this is acceptable to you.

If by "introduce new compatible strings" you mean duplicate compatibles to fix the ralink->mediatek, then you ignored entire email from Rob - this and previous. We don't do this. Leave them as is.

If you meant something else, explain more...

Let me put them in a group to better explain.

## Fix ABI

Quoted 7 lines

ralink,rt2880-pinmux was there before, it was removed which broke the ABI. I'm reintroducing it to fix it.

## New strings to be able to split bindings

New strings are needed for MT7628/MT7688 and some RT SoCs to be able to properly document the pin muxing information.

Then ok.

Quoted 1 line
Quoted 8 lines
Quoted 4 lines

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

So this part was addressed by Rob - we don't do it, because it does not matter. Ralink is now Mediatek, thus there is no conflict and no issues with different vendor used.

I think Rob was rather addressing that updating compatible strings based on acquisition or marketing whims is not permitted. This condition does not apply here as these SoCs were never Ralink.

I understand your point that Ralink is now MediaTek but still, calling these SoCs Ralink would be a bit misleading, don't you think?

Quoted 10 lines
Quoted 10 lines

## Exception for RT SoCs to be called MediaTek

This is where I was asking an exception to be made. Rob told us here they know little about the platform so I explained it.

MediaTek acquired Ralink and then introduced new MediaTek SoCs utilising the same platform from Ralink.

Quoted 8 lines
Quoted 3 lines

Anyway, now that I look at this again, it makes sense to me as well not to rename the Ralink SoCs. I'll call the RT SoCs Ralink on the kconfig, pinctrl driver,

These are separate. We did not comment on how you call Linux drivers. The mail thread was only about:

Quoted 1 line

and dt-binding schemas on my next version.

Understood, thanks.

Arınç

#16 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 10 lines · Arınç ÜNAL
Quoted 9 lines
Quoted 5 lines

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

So this part was addressed by Rob - we don't do it, because it does not matter. Ralink is now Mediatek, thus there is no conflict and no issues with different vendor used.

Quoted 6 lines

I think Rob was rather addressing that updating compatible strings based on acquisition or marketing whims is not permitted. This condition does not apply here as these SoCs were never Ralink.

I understand your point that Ralink is now MediaTek but still, calling these SoCs Ralink would be a bit misleading, don't you think?

Misleading yes, but also does not matter. At least matter not enough to justify ABI break, so you would need to deprecate old ones and keep everything backwards compatible. You still would affect 3rd party users of DTS, though...

Best regards,
Krzysztof

#17 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 15 lines · Krzysztof Kozlowski
Quoted 14 lines · Arınç ÜNAL
Quoted 9 lines
Quoted 5 lines

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

So this part was addressed by Rob - we don't do it, because it does not matter. Ralink is now Mediatek, thus there is no conflict and no issues with different vendor used.

I think Rob was rather addressing that updating compatible strings based on acquisition or marketing whims is not permitted. This condition does not apply here as these SoCs were never Ralink.

Quoted 7 lines
Quoted 2 lines

I understand your point that Ralink is now MediaTek but still, calling these SoCs Ralink would be a bit misleading, don't you think?

Misleading yes, but also does not matter. At least matter not enough to justify ABI break, so you would need to deprecate old ones and keep everything backwards compatible. You still would affect 3rd party users of DTS, though...

I intend to do just that. Introduce new mediatek strings, keep the old ones so it's backwards compatible, therefore don't break the ABI.

Instead of deprecating old strings, I intend to introduce the checks I mentioned, on the schema, so the pin muxing bindings only apply if the DT has got a string that won't match multiple schemas. This way it shouldn't affect 3rd party DTs.

Arınç

#18 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 24 lines · Arınç ÜNAL
Quoted 15 lines · Krzysztof Kozlowski
Quoted 14 lines · Arınç ÜNAL
Quoted 9 lines
Quoted 5 lines

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

So this part was addressed by Rob - we don't do it, because it does not matter. Ralink is now Mediatek, thus there is no conflict and no issues with different vendor used.

I think Rob was rather addressing that updating compatible strings based on acquisition or marketing whims is not permitted. This condition does not apply here as these SoCs were never Ralink.

Quoted 7 lines
Quoted 2 lines

I understand your point that Ralink is now MediaTek but still, calling these SoCs Ralink would be a bit misleading, don't you think?

Misleading yes, but also does not matter. At least matter not enough to justify ABI break, so you would need to deprecate old ones and keep everything backwards compatible. You still would affect 3rd party users of DTS, though...

Quoted 7 lines

I intend to do just that. Introduce new mediatek strings, keep the old ones so it's backwards compatible, therefore don't break the ABI.

Instead of deprecating old strings, I intend to introduce the checks I mentioned, on the schema, so the pin muxing bindings only apply if the DT has got a string that won't match multiple schemas. This way it shouldn't affect 3rd party DTs.

I meant, 3rd party users of DTS. You will replace the compatible in the DTS, right? So the DTS exported and used in all other projects, OS, firmwares, bootloaders, out of tree kernel forks will stop working.

Best regards,
Krzysztof

#19 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 28 lines · Krzysztof Kozlowski
Quoted 27 lines · Arınç ÜNAL
Quoted 15 lines · Krzysztof Kozlowski
Quoted 14 lines · Arınç ÜNAL
Quoted 9 lines
Quoted 5 lines

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

So this part was addressed by Rob - we don't do it, because it does not matter. Ralink is now Mediatek, thus there is no conflict and no issues with different vendor used.

I think Rob was rather addressing that updating compatible strings based on acquisition or marketing whims is not permitted. This condition does not apply here as these SoCs were never Ralink.

Quoted 7 lines
Quoted 2 lines

I understand your point that Ralink is now MediaTek but still, calling these SoCs Ralink would be a bit misleading, don't you think?

Misleading yes, but also does not matter. At least matter not enough to justify ABI break, so you would need to deprecate old ones and keep everything backwards compatible. You still would affect 3rd party users of DTS, though...

I intend to do just that. Introduce new mediatek strings, keep the old ones so it's backwards compatible, therefore don't break the ABI.

Quoted 8 lines
Quoted 4 lines

Instead of deprecating old strings, I intend to introduce the checks I mentioned, on the schema, so the pin muxing bindings only apply if the DT has got a string that won't match multiple schemas. This way it shouldn't affect 3rd party DTs.

I meant, 3rd party users of DTS. You will replace the compatible in the DTS, right? So the DTS exported and used in all other projects, OS, firmwares, bootloaders, out of tree kernel forks will stop working.

I plan to change it on the DTs for MediaTek SoCs, yes. Is this a problem? From what I can tell, what must be ensured is that old DTs must work with newer kernels, not new DTs on older kernels.

Arınç

#20 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 34 lines · Arınç ÜNAL
Quoted 33 lines · Krzysztof Kozlowski
Quoted 31 lines · Arınç ÜNAL
Quoted 15 lines · Krzysztof Kozlowski
Quoted 14 lines · Arınç ÜNAL
Quoted 9 lines
Quoted 5 lines

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

So this part was addressed by Rob - we don't do it, because it does not matter. Ralink is now Mediatek, thus there is no conflict and no issues with different vendor used.

I think Rob was rather addressing that updating compatible strings based on acquisition or marketing whims is not permitted. This condition does not apply here as these SoCs were never Ralink.

Quoted 7 lines
Quoted 2 lines

I understand your point that Ralink is now MediaTek but still, calling these SoCs Ralink would be a bit misleading, don't you think?

Misleading yes, but also does not matter. At least matter not enough to justify ABI break, so you would need to deprecate old ones and keep everything backwards compatible. You still would affect 3rd party users of DTS, though...

I intend to do just that. Introduce new mediatek strings, keep the old ones so it's backwards compatible, therefore don't break the ABI.

Instead of deprecating old strings, I intend to introduce the checks I mentioned, on the schema, so the pin muxing bindings only apply if the DT has got a string that won't match multiple schemas. This way it shouldn't affect 3rd party DTs.

Quoted 7 lines
Quoted 3 lines

I meant, 3rd party users of DTS. You will replace the compatible in the DTS, right? So the DTS exported and used in all other projects, OS, firmwares, bootloaders, out of tree kernel forks will stop working.

I plan to change it on the DTs for MediaTek SoCs, yes. Is this a problem? From what I can tell, what must be ensured is that old DTs must work with newer kernels, not new DTs on older kernels.

Can I be clearer than this?

" So the DTS exported and used in all other projects, OS, firmwares, bootloaders, out of tree kernel forks will stop working."

Yes, this is a problem - they will stop working.

Best regards,
Krzysztof

#21 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 43 lines · Krzysztof Kozlowski
Quoted 34 lines · Arınç ÜNAL
Quoted 33 lines · Krzysztof Kozlowski
Quoted 31 lines · Arınç ÜNAL
Quoted 15 lines · Krzysztof Kozlowski
Quoted 14 lines · Arınç ÜNAL
Quoted 9 lines
Quoted 5 lines

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

So this part was addressed by Rob - we don't do it, because it does not matter. Ralink is now Mediatek, thus there is no conflict and no issues with different vendor used.

I think Rob was rather addressing that updating compatible strings based on acquisition or marketing whims is not permitted. This condition does not apply here as these SoCs were never Ralink.

Quoted 7 lines
Quoted 2 lines

I understand your point that Ralink is now MediaTek but still, calling these SoCs Ralink would be a bit misleading, don't you think?

Misleading yes, but also does not matter. At least matter not enough to justify ABI break, so you would need to deprecate old ones and keep everything backwards compatible. You still would affect 3rd party users of DTS, though...

I intend to do just that. Introduce new mediatek strings, keep the old ones so it's backwards compatible, therefore don't break the ABI.

Instead of deprecating old strings, I intend to introduce the checks I mentioned, on the schema, so the pin muxing bindings only apply if the DT has got a string that won't match multiple schemas. This way it shouldn't affect 3rd party DTs.

Quoted 7 lines
Quoted 3 lines

I meant, 3rd party users of DTS. You will replace the compatible in the DTS, right? So the DTS exported and used in all other projects, OS, firmwares, bootloaders, out of tree kernel forks will stop working.

I plan to change it on the DTs for MediaTek SoCs, yes. Is this a problem? From what I can tell, what must be ensured is that old DTs must work with newer kernels, not new DTs on older kernels.

Quoted 6 lines

Can I be clearer than this?

" So the DTS exported and used in all other projects, OS, firmwares, bootloaders, out of tree kernel forks will stop working."

Yes, this is a problem - they will stop working.

I've never seen any project just exporting DTs from the latest kernel version and slap it onto old versions, as a new devicetree that was introduced with a newer kernel version is not guaranteed to work with older kernel versions.

If someone is actually doing this on a project, I think it's the responsibility of the maintainers of these said projects to account for this and modify the DT for the kernel version they're running it on.

What's more usual is one'd run the kernel version where the new DT was introduced, which will work fine.

On to real life implications, popular projects like U-Boot and OpenWrt maintain their own DTs for this platform so I think the impact is very minimal.

Anyway, I'm not doing this change on this patch series so why don't we cross this bridge when we get to it.

Arınç

#22 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 46 lines · Arınç ÜNAL
Quoted 45 lines · Krzysztof Kozlowski
Quoted 34 lines · Arınç ÜNAL
Quoted 33 lines · Krzysztof Kozlowski
Quoted 31 lines · Arınç ÜNAL
Quoted 15 lines · Krzysztof Kozlowski
Quoted 14 lines · Arınç ÜNAL
Quoted 9 lines
Quoted 5 lines

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

So this part was addressed by Rob - we don't do it, because it does not matter. Ralink is now Mediatek, thus there is no conflict and no issues with different vendor used.

I think Rob was rather addressing that updating compatible strings based on acquisition or marketing whims is not permitted. This condition does not apply here as these SoCs were never Ralink.

Quoted 7 lines
Quoted 2 lines

I understand your point that Ralink is now MediaTek but still, calling these SoCs Ralink would be a bit misleading, don't you think?

Misleading yes, but also does not matter. At least matter not enough to justify ABI break, so you would need to deprecate old ones and keep everything backwards compatible. You still would affect 3rd party users of DTS, though...

I intend to do just that. Introduce new mediatek strings, keep the old ones so it's backwards compatible, therefore don't break the ABI.

Instead of deprecating old strings, I intend to introduce the checks I mentioned, on the schema, so the pin muxing bindings only apply if the DT has got a string that won't match multiple schemas. This way it shouldn't affect 3rd party DTs.

Quoted 7 lines
Quoted 3 lines

I meant, 3rd party users of DTS. You will replace the compatible in the DTS, right? So the DTS exported and used in all other projects, OS, firmwares, bootloaders, out of tree kernel forks will stop working.

I plan to change it on the DTs for MediaTek SoCs, yes. Is this a problem? From what I can tell, what must be ensured is that old DTs must work with newer kernels, not new DTs on older kernels.

Can I be clearer than this?

Quoted 7 lines
Quoted 4 lines

" So the DTS exported and used in all other projects, OS, firmwares, bootloaders, out of tree kernel forks will stop working."

Yes, this is a problem - they will stop working.

I've never seen any project just exporting DTs from the latest kernel version and slap it onto old versions, as a new devicetree that was

Really? U-Boot does it all the time, other projects (like BSD) do it periodically to some extend as well.

Quoted 2 lines

introduced with a newer kernel version is not guaranteed to work with older kernel versions.

Not guaranteed but it is expected, though, to some level and under some conditions. Therefore it might be or might not be a problem. For some platforms no one cares. For some people care.

Quoted 7 lines

If someone is actually doing this on a project, I think it's the responsibility of the maintainers of these said projects to account for this and modify the DT for the kernel version they're running it on.

What's more usual is one'd run the kernel version where the new DT was introduced, which will work fine.

"kernel" as Linux is only one part of it. I mentioned several other projects.

Quoted 4 lines

On to real life implications, popular projects like U-Boot and OpenWrt maintain their own DTs for this platform so I think the impact is very minimal.

And they sync with Linux kernel DTS.

Quoted 3 lines

Anyway, I'm not doing this change on this patch series so why don't we cross this bridge when we get to it.

Best regards,
Krzysztof

#23 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

Quoted 50 lines · Krzysztof Kozlowski
Quoted 49 lines · Arınç ÜNAL
Quoted 48 lines · Krzysztof Kozlowski
Quoted 34 lines · Arınç ÜNAL
Quoted 33 lines · Krzysztof Kozlowski
Quoted 31 lines · Arınç ÜNAL
Quoted 15 lines · Krzysztof Kozlowski
Quoted 14 lines · Arınç ÜNAL
Quoted 9 lines
Quoted 5 lines

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

So this part was addressed by Rob - we don't do it, because it does not matter. Ralink is now Mediatek, thus there is no conflict and no issues with different vendor used.

I think Rob was rather addressing that updating compatible strings based on acquisition or marketing whims is not permitted. This condition does not apply here as these SoCs were never Ralink.

Quoted 7 lines
Quoted 2 lines

I understand your point that Ralink is now MediaTek but still, calling these SoCs Ralink would be a bit misleading, don't you think?

Misleading yes, but also does not matter. At least matter not enough to justify ABI break, so you would need to deprecate old ones and keep everything backwards compatible. You still would affect 3rd party users of DTS, though...

I intend to do just that. Introduce new mediatek strings, keep the old ones so it's backwards compatible, therefore don't break the ABI.

Instead of deprecating old strings, I intend to introduce the checks I mentioned, on the schema, so the pin muxing bindings only apply if the DT has got a string that won't match multiple schemas. This way it shouldn't affect 3rd party DTs.

Quoted 7 lines
Quoted 3 lines

I meant, 3rd party users of DTS. You will replace the compatible in the DTS, right? So the DTS exported and used in all other projects, OS, firmwares, bootloaders, out of tree kernel forks will stop working.

I plan to change it on the DTs for MediaTek SoCs, yes. Is this a problem? From what I can tell, what must be ensured is that old DTs must work with newer kernels, not new DTs on older kernels.

Can I be clearer than this?

" So the DTS exported and used in all other projects, OS, firmwares, bootloaders, out of tree kernel forks will stop working."

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Yes, this is a problem - they will stop working.

I've never seen any project just exporting DTs from the latest kernel version and slap it onto old versions, as a new devicetree that was

Really? U-Boot does it all the time, other projects (like BSD) do it periodically to some extend as well.

They must do heavy reviewing before shipping it. Drivers like MediaTek ethernet on U-Boot is different than in Linux, the dt-bindings are all different. Under a review, these changes will pop out for them to address so there're no problems.

Quoted 7 lines
Quoted 3 lines

introduced with a newer kernel version is not guaranteed to work with older kernel versions.

Not guaranteed but it is expected, though, to some level and under some conditions. Therefore it might be or might not be a problem. For some platforms no one cares. For some people care.

I'm going to assume there's not much care for this platform, at least for mt7621, as I've heard no complaints when I did this before.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/mips/boot/dts/ralink/mt7621.dtsi?id=b4f209e32ba5c283e7b1dd00d867b0536d3e215e

Quoted 13 lines
Quoted 8 lines

If someone is actually doing this on a project, I think it's the responsibility of the maintainers of these said projects to account for this and modify the DT for the kernel version they're running it on.

What's more usual is one'd run the kernel version where the new DT was introduced, which will work fine.

"kernel" as Linux is only one part of it. I mentioned several other projects.

Quoted 1 line
Quoted 5 lines
Quoted 3 lines

On to real life implications, popular projects like U-Boot and OpenWrt maintain their own DTs for this platform so I think the impact is very minimal.

And they sync with Linux kernel DTS.

Again, the DTs must be reviewed so they will be modified and the potential issue will be addressed.

Arınç

#24 lore raw

Re: [RFC PATCH 07/16] dt-bindings: pinctrl: ralink: add new compatible strings

In reply to Arınç ÜNAL
Quoted 19 lines · Arınç ÜNAL
Quoted 18 lines · Krzysztof Kozlowski
Quoted 16 lines · Arınç ÜNAL
Quoted 9 lines
Quoted 5 lines

## Incorrect naming

MT7620, MT7621, MT7628, and MT7688 SoCs are incorrectly called Ralink, introduce new ralink->mediatek compatible strings to address it.

So this part was addressed by Rob - we don't do it, because it does not matter. Ralink is now Mediatek, thus there is no conflict and no issues with different vendor used.

I think Rob was rather addressing that updating compatible strings based on acquisition or marketing whims is not permitted. This condition does not apply here as these SoCs were never Ralink.

I understand your point that Ralink is now MediaTek but still, calling these SoCs Ralink would be a bit misleading, don't you think?

Quoted 8 lines
Quoted 4 lines

Misleading yes, but also does not matter. At least matter not enough to justify ABI break, so you would need to deprecate old ones and keep everything backwards compatible. You still would affect 3rd party users of DTS, though...

I intend to do just that. Introduce new mediatek strings, keep the old ones so it's backwards compatible, therefore don't break the ABI.

Instead of deprecating old strings, I intend to introduce the checks I mentioned, on the schema, so the pin muxing bindings only apply if the DT has got a string that won't match multiple schemas. This way it shouldn't affect 3rd party DTs.

I'm looking at this again and I see that doing this brings more issues than it solves. I think deprecating the old strings from the schemas is better. They will be on the driver anyway so newer kernels will still work fine with old DTs.

Arınç

#25 lore raw

RFC PATCH 8/16 dt-bindings: pinctrl: ralink: rename to mediatek

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

Ralink was acquired by MediaTek in 2011. These SoCs have been rebranded as MediaTek. Rename the schemas to mediatek.

---
 ...ink,mt7620-pinctrl.yaml => mediatek,mt7620-pinctrl.yaml} | 6 +++---
 ...ink,mt7621-pinctrl.yaml => mediatek,mt7621-pinctrl.yaml} | 6 +++---
 ...ink,rt2880-pinctrl.yaml => mediatek,rt2880-pinctrl.yaml} | 6 +++---
 ...ink,rt305x-pinctrl.yaml => mediatek,rt305x-pinctrl.yaml} | 6 +++---
 ...ink,rt3883-pinctrl.yaml => mediatek,rt3883-pinctrl.yaml} | 6 +++---
 5 files changed, 15 insertions(+), 15 deletions(-)
 rename Documentation/devicetree/bindings/pinctrl/{ralink,mt7620-pinctrl.yaml => mediatek,mt7620-pinctrl.yaml} (98%)
 rename Documentation/devicetree/bindings/pinctrl/{ralink,mt7621-pinctrl.yaml => mediatek,mt7621-pinctrl.yaml} (97%)
 rename Documentation/devicetree/bindings/pinctrl/{ralink,rt2880-pinctrl.yaml => mediatek,rt2880-pinctrl.yaml} (95%)
 rename Documentation/devicetree/bindings/pinctrl/{ralink,rt305x-pinctrl.yaml => mediatek,rt305x-pinctrl.yaml} (97%)
 rename Documentation/devicetree/bindings/pinctrl/{ralink,rt3883-pinctrl.yaml => mediatek,rt3883-pinctrl.yaml} (97%)
Documentation/devicetree/bindings/pinctrl/mediatek,mt7620-pinctrl.yaml renamed from Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml +3 -3
similarity index 98%
rename from Documentation/devicetree/bindings/pinctrl/ralink,mt7620-pinctrl.yaml
rename to Documentation/devicetree/bindings/pinctrl/mediatek,mt7620-pinctrl.yaml
index 531b5f616c3d..3bf58da8a394 100644
@@ -1,17 +1,17 @@
 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/pinctrl/ralink,mt7620-pinctrl.yaml#
+$id: http://devicetree.org/schemas/pinctrl/mediatek,mt7620-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Ralink MT7620 Pin Controller
+title: MediaTek MT7620 Pin Controller
 
 maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
 description:
-  Ralink MT7620 pin controller for MT7620, MT7628 and MT7688 SoCs.
+  MediaTek MT7620 pin controller for MT7620, MT7628 and MT7688 SoCs.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
 
Documentation/devicetree/bindings/pinctrl/mediatek,mt7621-pinctrl.yaml renamed from Documentation/devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml +3 -3
similarity index 97%
rename from Documentation/devicetree/bindings/pinctrl/ralink,mt7621-pinctrl.yaml
rename to Documentation/devicetree/bindings/pinctrl/mediatek,mt7621-pinctrl.yaml
index 74923ca35c81..4dfe3da5fd40 100644
@@ -1,17 +1,17 @@
 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/pinctrl/ralink,mt7621-pinctrl.yaml#
+$id: http://devicetree.org/schemas/pinctrl/mediatek,mt7621-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Ralink MT7621 Pin Controller
+title: MediaTek MT7621 Pin Controller
 
 maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
 description:
-  Ralink MT7621 pin controller for MT7621 SoC.
+  MediaTek MT7621 pin controller for MT7621 SoC.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
 
Documentation/devicetree/bindings/pinctrl/mediatek,rt2880-pinctrl.yaml renamed from Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml +3 -3
similarity index 95%
rename from Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinctrl.yaml
rename to Documentation/devicetree/bindings/pinctrl/mediatek,rt2880-pinctrl.yaml
index aceea6248614..7395e4434e64 100644
@@ -1,17 +1,17 @@
 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/pinctrl/ralink,rt2880-pinctrl.yaml#
+$id: http://devicetree.org/schemas/pinctrl/mediatek,rt2880-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Ralink RT2880 Pin Controller
+title: MediaTek RT2880 Pin Controller
 
 maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
 description:
-  Ralink RT2880 pin controller for RT2880 SoC.
+  MediaTek RT2880 pin controller for RT2880 SoC.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
 
Documentation/devicetree/bindings/pinctrl/mediatek,rt305x-pinctrl.yaml renamed from Documentation/devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml +3 -3
similarity index 97%
rename from Documentation/devicetree/bindings/pinctrl/ralink,rt305x-pinctrl.yaml
rename to Documentation/devicetree/bindings/pinctrl/mediatek,rt305x-pinctrl.yaml
index 4c87fe201809..61fcf3ab1091 100644
@@ -1,17 +1,17 @@
 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/pinctrl/ralink,rt305x-pinctrl.yaml#
+$id: http://devicetree.org/schemas/pinctrl/mediatek,rt305x-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Ralink RT305X Pin Controller
+title: MediaTek RT305X Pin Controller
 
 maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
 description:
-  Ralink RT305X pin controller for RT3050, RT3052, RT3350, RT3352 and RT5350
+  MediaTek RT305X pin controller for RT3050, RT3052, RT3350, RT3352 and RT5350
   SoCs.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
Documentation/devicetree/bindings/pinctrl/mediatek,rt3883-pinctrl.yaml renamed from Documentation/devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml +3 -3
similarity index 97%
rename from Documentation/devicetree/bindings/pinctrl/ralink,rt3883-pinctrl.yaml
rename to Documentation/devicetree/bindings/pinctrl/mediatek,rt3883-pinctrl.yaml
index 71049a2b2779..ab20f67c47f0 100644
@@ -1,17 +1,17 @@
 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/pinctrl/ralink,rt3883-pinctrl.yaml#
+$id: http://devicetree.org/schemas/pinctrl/mediatek,rt3883-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Ralink RT3883 Pin Controller
+title: MediaTek RT3883 Pin Controller
 
 maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
 description:
-  Ralink RT3883 pin controller for RT3883 SoC.
+  MediaTek RT3883 pin controller for RT3883 SoC.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
 
Signature · 1 line
2.37.2
#26 lore raw

RFC PATCH 9/16 dt-bindings: pinctrl: mediatek: rt305x: split binding

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

The RT3352 and RT5350 SoCs each contain different pin muxing information, therefore, should be split. This can be done now that there are compatible strings to distinguish them from other SoCs.

Split the schema out to mediatek,rt3352-pinctrl.yaml and mediatek,rt5350-pinctrl.yaml.

---
 .../pinctrl/mediatek,rt305x-pinctrl.yaml      |  78 +-----
 .../pinctrl/mediatek,rt3352-pinctrl.yaml      | 247 ++++++++++++++++++
 .../pinctrl/mediatek,rt5350-pinctrl.yaml      | 210 +++++++++++++++
 3 files changed, 462 insertions(+), 73 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml
 create mode 100644 Documentation/devicetree/bindings/pinctrl/mediatek,rt5350-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/mediatek,rt305x-pinctrl.yaml +5 -73
index 61fcf3ab1091..1e6c7e7f2fe2 100644
@@ -11,8 +11,7 @@ maintainers:
   - Sergio Paracuellos <[email protected]>
 
 description:
-  MediaTek RT305X pin controller for RT3050, RT3052, RT3350, RT3352 and RT5350
-  SoCs.
+  MediaTek RT305X pin controller for RT3050, RT3052, and RT3350 SoCs.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
 
@@ -36,21 +35,9 @@ patternProperties:
           function:
             description:
               A string containing the name of the function to mux to the group.
-            anyOf:
-              - description: For RT3050, RT3052 and RT3350 SoCs
-                enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, mdio,
-                       pcm gpio, pcm i2s, pcm uartf, rgmii, sdram, spi, uartf,
-                       uartlite]
-
-              - description: For RT3352 SoC
-                enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, led,
-                       lna, mdio, pa, pcm gpio, pcm i2s, pcm uartf, rgmii, spi,
-                       spi_cs1, uartf, uartlite, wdg_cs1]
-
-              - description: For RT5350 SoC
-                enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, led,
-                       pcm gpio, pcm i2s, pcm uartf, spi, spi_cs1, uartf,
-                       uartlite, wdg_cs1]
+            enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, mdio,
+                   pcm gpio, pcm i2s, pcm uartf, rgmii, sdram, spi, uartf,
+                   uartlite]
 
           groups:
             description:
@@ -69,17 +56,7 @@ patternProperties:
             then:
               properties:
                 groups:
-                  anyOf:
-                    - description: For RT3050, RT3052 and RT3350 SoCs
-                      enum: [i2c, jtag, mdio, rgmii, sdram, spi, uartf,
-                             uartlite]
-
-                    - description: For RT3352 SoC
-                      enum: [i2c, jtag, led, lna, mdio, pa, rgmii, spi, spi_cs1,
-                             uartf, uartlite]
-
-                    - description: For RT5350 SoC
-                      enum: [i2c, jtag, led, spi, spi_cs1, uartf, uartlite]
+                  enum: [i2c, jtag, mdio, rgmii, sdram, spi, uartf, uartlite]
 
           - if:
               properties:
@@ -126,24 +103,6 @@ patternProperties:
                 groups:
                   enum: [jtag]
 
-          - if:
-              properties:
-                function:
-                  const: led
-            then:
-              properties:
-                groups:
-                  enum: [led]
-
-          - if:
-              properties:
-                function:
-                  const: lna
-            then:
-              properties:
-                groups:
-                  enum: [lna]
-
           - if:
               properties:
                 function:
@@ -153,15 +112,6 @@ patternProperties:
                 groups:
                   enum: [mdio]
 
-          - if:
-              properties:
-                function:
-                  const: pa
-            then:
-              properties:
-                groups:
-                  enum: [pa]
-
           - if:
               properties:
                 function:
@@ -216,15 +166,6 @@ patternProperties:
                 groups:
                   enum: [spi]
 
-          - if:
-              properties:
-                function:
-                  const: spi_cs1
-            then:
-              properties:
-                groups:
-                  enum: [spi_cs1]
-
           - if:
               properties:
                 function:
@@ -243,15 +184,6 @@ patternProperties:
                 groups:
                   enum: [uartlite]
 
-          - if:
-              properties:
-                function:
-                  const: wdg_cs1
-            then:
-              properties:
-                groups:
-                  enum: [spi_cs1]
-
         additionalProperties: false
 
     additionalProperties: false
Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml new file +247 -0

247 lines not on this page · raw message

Documentation/devicetree/bindings/pinctrl/mediatek,rt5350-pinctrl.yaml new file +210 -0

210 lines not on this page · raw message

Signature · 1 line
2.37.2
maintainer
#27 lore raw

Re: [RFC PATCH 09/16] dt-bindings: pinctrl: mediatek: rt305x: split binding

Quoted 374 lines · On Wed, Feb 22, 2023 at 09:39:25PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

The RT3352 and RT5350 SoCs each contain different pin muxing information, therefore, should be split. This can be done now that there are compatible strings to distinguish them from other SoCs.

Split the schema out to mediatek,rt3352-pinctrl.yaml and mediatek,rt5350-pinctrl.yaml.

---
 .../pinctrl/mediatek,rt305x-pinctrl.yaml      |  78 +-----
 .../pinctrl/mediatek,rt3352-pinctrl.yaml      | 247 ++++++++++++++++++
 .../pinctrl/mediatek,rt5350-pinctrl.yaml      | 210 +++++++++++++++
 3 files changed, 462 insertions(+), 73 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml
 create mode 100644 Documentation/devicetree/bindings/pinctrl/mediatek,rt5350-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/mediatek,rt305x-pinctrl.yaml +5 -73
index 61fcf3ab1091..1e6c7e7f2fe2 100644
@@ -11,8 +11,7 @@ maintainers:
   - Sergio Paracuellos <[email protected]>
 
 description:
-  MediaTek RT305X pin controller for RT3050, RT3052, RT3350, RT3352 and RT5350
-  SoCs.
+  MediaTek RT305X pin controller for RT3050, RT3052, and RT3350 SoCs.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
 
@@ -36,21 +35,9 @@ patternProperties:
           function:
             description:
               A string containing the name of the function to mux to the group.
-            anyOf:
-              - description: For RT3050, RT3052 and RT3350 SoCs
-                enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, mdio,
-                       pcm gpio, pcm i2s, pcm uartf, rgmii, sdram, spi, uartf,
-                       uartlite]
-
-              - description: For RT3352 SoC
-                enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, led,
-                       lna, mdio, pa, pcm gpio, pcm i2s, pcm uartf, rgmii, spi,
-                       spi_cs1, uartf, uartlite, wdg_cs1]
-
-              - description: For RT5350 SoC
-                enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, led,
-                       pcm gpio, pcm i2s, pcm uartf, spi, spi_cs1, uartf,
-                       uartlite, wdg_cs1]
+            enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, mdio,
+                   pcm gpio, pcm i2s, pcm uartf, rgmii, sdram, spi, uartf,
+                   uartlite]
 
           groups:
             description:
@@ -69,17 +56,7 @@ patternProperties:
             then:
               properties:
                 groups:
-                  anyOf:
-                    - description: For RT3050, RT3052 and RT3350 SoCs
-                      enum: [i2c, jtag, mdio, rgmii, sdram, spi, uartf,
-                             uartlite]
-
-                    - description: For RT3352 SoC
-                      enum: [i2c, jtag, led, lna, mdio, pa, rgmii, spi, spi_cs1,
-                             uartf, uartlite]
-
-                    - description: For RT5350 SoC
-                      enum: [i2c, jtag, led, spi, spi_cs1, uartf, uartlite]
+                  enum: [i2c, jtag, mdio, rgmii, sdram, spi, uartf, uartlite]
 
           - if:
               properties:
@@ -126,24 +103,6 @@ patternProperties:
                 groups:
                   enum: [jtag]
 
-          - if:
-              properties:
-                function:
-                  const: led
-            then:
-              properties:
-                groups:
-                  enum: [led]
-
-          - if:
-              properties:
-                function:
-                  const: lna
-            then:
-              properties:
-                groups:
-                  enum: [lna]
-
           - if:
               properties:
                 function:
@@ -153,15 +112,6 @@ patternProperties:
                 groups:
                   enum: [mdio]
 
-          - if:
-              properties:
-                function:
-                  const: pa
-            then:
-              properties:
-                groups:
-                  enum: [pa]
-
           - if:
               properties:
                 function:
@@ -216,15 +166,6 @@ patternProperties:
                 groups:
                   enum: [spi]
 
-          - if:
-              properties:
-                function:
-                  const: spi_cs1
-            then:
-              properties:
-                groups:
-                  enum: [spi_cs1]
-
           - if:
               properties:
                 function:
@@ -243,15 +184,6 @@ patternProperties:
                 groups:
                   enum: [uartlite]
 
-          - if:
-              properties:
-                function:
-                  const: wdg_cs1
-            then:
-              properties:
-                groups:
-                  enum: [spi_cs1]
-
         additionalProperties: false
 
     additionalProperties: false
Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml new file +219 -0
new file mode 100644
index 000000000000..7a74c1602afc
@@ -0,0 +1,247 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/mediatek,rt3352-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek RT3352 Pin Controller
+
+maintainers:
+  - Arınç ÜNAL <[email protected]>
+  - Sergio Paracuellos <[email protected]>
+
+description:
+  MediaTek RT3352 pin controller for RT3352 SoC.
+  The pin controller can only set the muxing of pin groups. Muxing individual
+  pins is not supported. There is no pinconf support.
+
+properties:
+  compatible:
+    enum:
+      - mediatek,rt3352-pinctrl
+      - ralink,rt305x-pinctrl
+      - ralink,rt2880-pinmux
+
+patternProperties:
+  '-pins$':
+    type: object
+    patternProperties:
+      '^(.*-)?pinmux$':
+        type: object
+        description: node for pinctrl.
+        $ref: pinmux-node.yaml#
+
+        properties:
+          function:
+            description:
+              A string containing the name of the function to mux to the group.
+            enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, led, lna,
+                   mdio, pa, pcm gpio, pcm i2s, pcm uartf, rgmii, spi, spi_cs1,
+                   uartf, uartlite, wdg_cs1]
+
+          groups:
+            description:
+              An array of strings. Each string contains the name of a group.
+            maxItems: 1
+
+        required:
+          - groups
+          - function
+
+        allOf:
+          - if:
+              properties:
+                function:
+                  const: gpio
+            then:
+              properties:
+                groups:
+                  enum: [i2c, jtag, led, lna, mdio, pa, rgmii, spi, spi_cs1,
+                         uartf, uartlite]
+
+          - if:
+              properties:
+                function:
+                  const: gpio i2s
+            then:
+              properties:
+                groups:
+                  enum: [uartf]
+
+          - if:
+              properties:
+                function:
+                  const: gpio uartf
+            then:
+              properties:
+                groups:
+                  enum: [uartf]
+
+          - if:
+              properties:
+                function:
+                  const: i2c
+            then:
+              properties:
+                groups:
+                  enum: [i2c]
+
+          - if:
+              properties:
+                function:
+                  const: i2s uartf
+            then:
+              properties:
+                groups:
+                  enum: [uartf]
+
+          - if:
+              properties:
+                function:
+                  const: jtag
+            then:
+              properties:
+                groups:
+                  enum: [jtag]
+
+          - if:
+              properties:
+                function:
+                  const: led
+            then:
+              properties:
+                groups:
+                  enum: [led]
+
+          - if:
+              properties:
+                function:
+                  const: lna
+            then:
+              properties:
+                groups:
+                  enum: [lna]
+
+          - if:
+              properties:
+                function:
+                  const: mdio
+            then:
+              properties:
+                groups:
+                  enum: [mdio]
+
+          - if:
+              properties:
+                function:
+                  const: pa
+            then:
+              properties:
+                groups:
+                  enum: [pa]
+
+          - if:
+              properties:
+                function:
+                  const: pcm gpio
+            then:
+              properties:
+                groups:
+                  enum: [uartf]
+
+          - if:
+              properties:
+                function:
+                  const: pcm i2s
+            then:
+              properties:
+                groups:
+                  enum: [uartf]
+
+          - if:
+              properties:
+                function:
+                  const: pcm uartf
+            then:
+              properties:
+                groups:
+                  enum: [uartf]
+
+          - if:
+              properties:
+                function:
+                  const: rgmii
+            then:
+              properties:
+                groups:
+                  enum: [rgmii]
+
+          - if:
+              properties:
+                function:
+                  const: spi
+            then:
+              properties:
+                groups:
+                  enum: [spi]
+
+          - if:
+              properties:
+                function:
+                  const: spi_cs1
+            then:
+              properties:
+                groups:
+                  enum: [spi_cs1]
+
+          - if:
+              properties:
+                function:
+                  const: uartf
+            then:
+              properties:
+                groups:
+                  enum: [uartf]
+
+          - if:
+              properties:
+                function:
+                  const: uartlite
+            then:
+              properties:
+                groups:
+                  enum: [uartlite]
+
+          - if:
+              properties:
+                function:
+                  const: wdg_cs1
+            then:

Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml line 229

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml new file +10 -0
+              properties:
+                groups:
+                  enum: [spi_cs1]
+
+        additionalProperties: false
+
+    additionalProperties: false
+
+allOf:
+  - $ref: "pinctrl.yaml#"

Drop quotes here and other refs.

#28 lore raw

Re: [RFC PATCH 09/16] dt-bindings: pinctrl: mediatek: rt305x: split binding

In reply to [email protected]
Quoted 168 lines · On 22/02/2023 19:39, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

The RT3352 and RT5350 SoCs each contain different pin muxing information, therefore, should be split. This can be done now that there are compatible strings to distinguish them from other SoCs.

Split the schema out to mediatek,rt3352-pinctrl.yaml and mediatek,rt5350-pinctrl.yaml.

---
 .../pinctrl/mediatek,rt305x-pinctrl.yaml      |  78 +-----
 .../pinctrl/mediatek,rt3352-pinctrl.yaml      | 247 ++++++++++++++++++
 .../pinctrl/mediatek,rt5350-pinctrl.yaml      | 210 +++++++++++++++
 3 files changed, 462 insertions(+), 73 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml
 create mode 100644 Documentation/devicetree/bindings/pinctrl/mediatek,rt5350-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/mediatek,rt305x-pinctrl.yaml +5 -73
index 61fcf3ab1091..1e6c7e7f2fe2 100644
@@ -11,8 +11,7 @@ maintainers:
   - Sergio Paracuellos <[email protected]>
 
 description:
-  MediaTek RT305X pin controller for RT3050, RT3052, RT3350, RT3352 and RT5350
-  SoCs.
+  MediaTek RT305X pin controller for RT3050, RT3052, and RT3350 SoCs.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
 
@@ -36,21 +35,9 @@ patternProperties:
           function:
             description:
               A string containing the name of the function to mux to the group.
-            anyOf:
-              - description: For RT3050, RT3052 and RT3350 SoCs
-                enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, mdio,
-                       pcm gpio, pcm i2s, pcm uartf, rgmii, sdram, spi, uartf,
-                       uartlite]
-
-              - description: For RT3352 SoC
-                enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, led,
-                       lna, mdio, pa, pcm gpio, pcm i2s, pcm uartf, rgmii, spi,
-                       spi_cs1, uartf, uartlite, wdg_cs1]
-
-              - description: For RT5350 SoC
-                enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, led,
-                       pcm gpio, pcm i2s, pcm uartf, spi, spi_cs1, uartf,
-                       uartlite, wdg_cs1]
+            enum: [gpio, gpio i2s, gpio uartf, i2c, i2s uartf, jtag, mdio,
+                   pcm gpio, pcm i2s, pcm uartf, rgmii, sdram, spi, uartf,
+                   uartlite]
 
           groups:
             description:
@@ -69,17 +56,7 @@ patternProperties:
             then:
               properties:
                 groups:
-                  anyOf:
-                    - description: For RT3050, RT3052 and RT3350 SoCs
-                      enum: [i2c, jtag, mdio, rgmii, sdram, spi, uartf,
-                             uartlite]
-
-                    - description: For RT3352 SoC
-                      enum: [i2c, jtag, led, lna, mdio, pa, rgmii, spi, spi_cs1,
-                             uartf, uartlite]
-
-                    - description: For RT5350 SoC
-                      enum: [i2c, jtag, led, spi, spi_cs1, uartf, uartlite]
+                  enum: [i2c, jtag, mdio, rgmii, sdram, spi, uartf, uartlite]
 
           - if:
               properties:
@@ -126,24 +103,6 @@ patternProperties:
                 groups:
                   enum: [jtag]
 
-          - if:
-              properties:
-                function:
-                  const: led
-            then:
-              properties:
-                groups:
-                  enum: [led]
-
-          - if:
-              properties:
-                function:
-                  const: lna
-            then:
-              properties:
-                groups:
-                  enum: [lna]
-
           - if:
               properties:
                 function:
@@ -153,15 +112,6 @@ patternProperties:
                 groups:
                   enum: [mdio]
 
-          - if:
-              properties:
-                function:
-                  const: pa
-            then:
-              properties:
-                groups:
-                  enum: [pa]
-
           - if:
               properties:
                 function:
@@ -216,15 +166,6 @@ patternProperties:
                 groups:
                   enum: [spi]
 
-          - if:
-              properties:
-                function:
-                  const: spi_cs1
-            then:
-              properties:
-                groups:
-                  enum: [spi_cs1]
-
           - if:
               properties:
                 function:
@@ -243,15 +184,6 @@ patternProperties:
                 groups:
                   enum: [uartlite]
 
-          - if:
-              properties:
-                function:
-                  const: wdg_cs1
-            then:
-              properties:
-                groups:
-                  enum: [spi_cs1]
-
         additionalProperties: false
 
     additionalProperties: false
Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml new file +13 -0
new file mode 100644
index 000000000000..7a74c1602afc
@@ -0,0 +1,247 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/mediatek,rt3352-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek RT3352 Pin Controller
+
+maintainers:
+  - Arınç ÜNAL <[email protected]>
+  - Sergio Paracuellos <[email protected]>
+
+description:

Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml line 23

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml new file +10 -0
+  MediaTek RT3352 pin controller for RT3352 SoC.
+  The pin controller can only set the muxing of pin groups. Muxing individual
+  pins is not supported. There is no pinconf support.
+
+properties:
+  compatible:
+    enum:
+      - mediatek,rt3352-pinctrl
+      - ralink,rt305x-pinctrl
+      - ralink,rt2880-pinmux

Following Rob's comments, you need to keep old compatibles when splitting binding.

Best regards,
Krzysztof

#29 lore raw

RFC PATCH 10/16 dt-bindings: pinctrl: mediatek: mt7620: split binding

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

The MT7628 and MT7688 SoCs contain different pin muxing information, therefore, should be split. This can be done now that there are compatible strings to distinguish them from other SoCs.

Split the schema out to mediatek,mt76x8-pinctrl.yaml.

---
 .../pinctrl/mediatek,mt7620-pinctrl.yaml      | 375 +--------------
 .../pinctrl/mediatek,mt76x8-pinctrl.yaml      | 454 ++++++++++++++++++
 2 files changed, 462 insertions(+), 367 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/mediatek,mt7620-pinctrl.yaml +8 -367
index 3bf58da8a394..ea4a1194fbc4 100644
@@ -11,7 +11,7 @@ maintainers:
   - Sergio Paracuellos <[email protected]>
 
 description:
-  MediaTek MT7620 pin controller for MT7620, MT7628 and MT7688 SoCs.
+  MediaTek MT7620 pin controller for MT7620 SoC.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
 
@@ -35,19 +35,10 @@ patternProperties:
           function:
             description:
               A string containing the name of the function to mux to the group.
-            anyOf:
-              - description: For MT7620 SoC
-                enum: [ephy, gpio, gpio i2s, gpio uartf, i2c, i2s uartf, mdio, nand, pa,
-                       pcie refclk, pcie rst, pcm gpio, pcm i2s, pcm uartf, refclk,
-                       rgmii1, rgmii2, sd, spi, spi refclk, uartf, uartlite, wdt refclk,
-                       wdt rst, wled]
-
-              - description: For MT7628 and MT7688 SoCs
-                enum: [antenna, debug, gpio, i2c, i2s, jtag, p0led_an, p0led_kn,
-                       p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn,
-                       p4led_an, p4led_kn, pcie, pcm, perst, pwm, pwm0, pwm1, pwm_uart2,
-                       refclk, rsvd, sdxc, sdxc d5 d4, sdxc d6, sdxc d7, spi, spi cs1,
-                       spis, sw_r, uart0, uart1, uart2, utif, wdt, wled_an, wled_kn, -]
+            enum: [ephy, gpio, gpio i2s, gpio uartf, i2c, i2s uartf, mdio, nand,
+                   pa, pcie refclk, pcie rst, pcm gpio, pcm i2s, pcm uartf,
+                   refclk, rgmii1, rgmii2, sd, spi, spi refclk, uartf, uartlite,
+                   wdt refclk, wdt rst, wled]
 
           groups:
             description:
@@ -59,24 +50,6 @@ patternProperties:
           - function
 
         allOf:
-          - if:
-              properties:
-                function:
-                  const: antenna
-            then:
-              properties:
-                groups:
-                  enum: [i2s]
-
-          - if:
-              properties:
-                function:
-                  const: debug
-            then:
-              properties:
-                groups:
-                  enum: [i2c]
-
           - if:
               properties:
                 function:
@@ -93,17 +66,8 @@ patternProperties:
             then:
               properties:
                 groups:
-                  anyOf:
-                    - description: For MT7620 SoC
-                      enum: [ephy, i2c, mdio, nd_sd, pa, pcie, rgmii1, rgmii2,
-                             spi, spi refclk, uartf, uartlite, wdt, wled]
-
-                    - description: For MT7628 and MT7688 SoCs
-                      enum: [gpio, i2c, i2s, p0led_an, p0led_kn, p1led_an,
-                             p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn,
-                             p4led_an, p4led_kn, perst, pwm0, pwm1, refclk,
-                             sdmode, spi, spi cs1, spis, uart0, uart1, uart2,
-                             wdt, wled_an, wled_kn]
+                  enum: [ephy, i2c, mdio, nd_sd, pa, pcie, rgmii1, rgmii2, spi,
+                         spi refclk, uartf, uartlite, wdt, wled]
 
           - if:
               properties:
@@ -132,15 +96,6 @@ patternProperties:
                 groups:
                   enum: [i2c]
 
-          - if:
-              properties:
-                function:
-                  const: i2s
-            then:
-              properties:
-                groups:
-                  enum: [i2s]
-
           - if:
               properties:
                 function:
@@ -150,17 +105,6 @@ patternProperties:
                 groups:
                   enum: [uartf]
 
-          - if:
-              properties:
-                function:
-                  const: jtag
-            then:
-              properties:
-                groups:
-                  enum: [p0led_an, p0led_kn, p1led_an, p1led_kn, p2led_an,
-                         p2led_kn, p3led_an, p3led_kn, p4led_an, p4led_kn,
-                         sdmode]
-
           - if:
               properties:
                 function:
@@ -179,96 +123,6 @@ patternProperties:
                 groups:
                   enum: [nd_sd]
 
-          - if:
-              properties:
-                function:
-                  const: p0led_an
-            then:
-              properties:
-                groups:
-                  enum: [p0led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p0led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p0led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p1led_an
-            then:
-              properties:
-                groups:
-                  enum: [p1led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p1led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p1led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p2led_an
-            then:
-              properties:
-                groups:
-                  enum: [p2led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p2led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p2led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p3led_an
-            then:
-              properties:
-                groups:
-                  enum: [p3led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p3led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p3led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p4led_an
-            then:
-              properties:
-                groups:
-                  enum: [p4led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p4led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p4led_kn]
-
           - if:
               properties:
                 function:
@@ -278,15 +132,6 @@ patternProperties:
                 groups:
                   enum: [pa]
 
-          - if:
-              properties:
-                function:
-                  const: pcie
-            then:
-              properties:
-                groups:
-                  enum: [gpio]
-
           - if:
               properties:
                 function:
@@ -305,15 +150,6 @@ patternProperties:
                 groups:
                   enum: [pcie]
 
-          - if:
-              properties:
-                function:
-                  const: pcm
-            then:
-              properties:
-                groups:
-                  enum: [i2s]
-
           - if:
               properties:
                 function:
@@ -341,51 +177,6 @@ patternProperties:
                 groups:
                   enum: [uartf]
 
-          - if:
-              properties:
-                function:
-                  const: perst
-            then:
-              properties:
-                groups:
-                  enum: [perst]
-
-          - if:
-              properties:
-                function:
-                  const: pwm
-            then:
-              properties:
-                groups:
-                  enum: [uart1, uart2]
-
-          - if:
-              properties:
-                function:
-                  const: pwm0
-            then:
-              properties:
-                groups:
-                  enum: [pwm0]
-
-          - if:
-              properties:
-                function:
-                  const: pwm1
-            then:
-              properties:
-                groups:
-                  enum: [pwm1]
-
-          - if:
-              properties:
-                function:
-                  const: pwm_uart2
-            then:
-              properties:
-                groups:
-                  enum: [spis]
-
           - if:
               properties:
                 function:
@@ -393,12 +184,7 @@ patternProperties:
             then:
               properties:
                 groups:
-                  anyOf:
-                    - description: For MT7620 SoC
-                      enum: [mdio]
-
-                    - description: For MT7628 and MT7688 SoCs
-                      enum: [gpio, refclk, spi cs1]
+                  enum: [mdio]
 
           - if:
               properties:
@@ -418,15 +204,6 @@ patternProperties:
                 groups:
                   enum: [rgmii2]
 
-          - if:
-              properties:
-                function:
-                  const: rsvd
-            then:
-              properties:
-                groups:
-                  enum: [p0led_an, p0led_kn, wled_an, wled_kn]
-
           - if:
               properties:
                 function:
@@ -436,42 +213,6 @@ patternProperties:
                 groups:
                   enum: [nd_sd]
 
-          - if:
-              properties:
-                function:
-                  const: sdxc
-            then:
-              properties:
-                groups:
-                  enum: [sdmode]
-
-          - if:
-              properties:
-                function:
-                  const: sdxc d5 d4
-            then:
-              properties:
-                groups:
-                  enum: [uart2]
-
-          - if:
-              properties:
-                function:
-                  const: sdxc d6
-            then:
-              properties:
-                groups:
-                  enum: [pwm1]
-
-          - if:
-              properties:
-                function:
-                  const: sdxc d7
-            then:
-              properties:
-                groups:
-                  enum: [pwm0]
-
           - if:
               properties:
                 function:
@@ -481,15 +222,6 @@ patternProperties:
                 groups:
                   enum: [spi]
 
-          - if:
-              properties:
-                function:
-                  const: spi cs1
-            then:
-              properties:
-                groups:
-                  enum: [spi cs1]
-
           - if:
               properties:
                 function:
@@ -499,51 +231,6 @@ patternProperties:
                 groups:
                   enum: [spi refclk]
 
-          - if:
-              properties:
-                function:
-                  const: spis
-            then:
-              properties:
-                groups:
-                  enum: [spis]
-
-          - if:
-              properties:
-                function:
-                  const: sw_r
-            then:
-              properties:
-                groups:
-                  enum: [uart1]
-
-          - if:
-              properties:
-                function:
-                  const: uart0
-            then:
-              properties:
-                groups:
-                  enum: [uart0]
-
-          - if:
-              properties:
-                function:
-                  const: uart1
-            then:
-              properties:
-                groups:
-                  enum: [uart1]
-
-          - if:
-              properties:
-                function:
-                  const: uart2
-            then:
-              properties:
-                groups:
-                  enum: [uart2]
-
           - if:
               properties:
                 function:
@@ -562,25 +249,6 @@ patternProperties:
                 groups:
                   enum: [uartlite]
 
-          - if:
-              properties:
-                function:
-                  const: utif
-            then:
-              properties:
-                groups:
-                  enum: [p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an,
-                         p3led_kn, p4led_an, p4led_kn, pwm0, pwm1, sdmode, spis]
-
-          - if:
-              properties:
-                function:
-                  const: wdt
-            then:
-              properties:
-                groups:
-                  enum: [wdt]
-
           - if:
               properties:
                 function:
@@ -608,33 +276,6 @@ patternProperties:
                 groups:
                   enum: [wled]
 
-          - if:
-              properties:
-                function:
-                  const: wled_an
-            then:
-              properties:
-                groups:
-                  enum: [wled_an]
-
-          - if:
-              properties:
-                function:
-                  const: wled_kn
-            then:
-              properties:
-                groups:
-                  enum: [wled_kn]
-
-          - if:
-              properties:
-                function:
-                  const: "-"
-            then:
-              properties:
-                groups:
-                  enum: [i2c, spi cs1, uart0]
-
         additionalProperties: false
 
     additionalProperties: false
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +454 -0

454 lines not on this page · raw message

Signature · 1 line
2.37.2
maintainer
#30 lore raw

Re: [RFC PATCH 10/16] dt-bindings: pinctrl: mediatek: mt7620: split binding

Quoted 530 lines · On Wed, Feb 22, 2023 at 09:39:26PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

The MT7628 and MT7688 SoCs contain different pin muxing information, therefore, should be split. This can be done now that there are compatible strings to distinguish them from other SoCs.

Split the schema out to mediatek,mt76x8-pinctrl.yaml.

---
 .../pinctrl/mediatek,mt7620-pinctrl.yaml      | 375 +--------------
 .../pinctrl/mediatek,mt76x8-pinctrl.yaml      | 454 ++++++++++++++++++
 2 files changed, 462 insertions(+), 367 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/mediatek,mt7620-pinctrl.yaml +8 -367
index 3bf58da8a394..ea4a1194fbc4 100644
@@ -11,7 +11,7 @@ maintainers:
   - Sergio Paracuellos <[email protected]>
 
 description:
-  MediaTek MT7620 pin controller for MT7620, MT7628 and MT7688 SoCs.
+  MediaTek MT7620 pin controller for MT7620 SoC.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
 
@@ -35,19 +35,10 @@ patternProperties:
           function:
             description:
               A string containing the name of the function to mux to the group.
-            anyOf:
-              - description: For MT7620 SoC
-                enum: [ephy, gpio, gpio i2s, gpio uartf, i2c, i2s uartf, mdio, nand, pa,
-                       pcie refclk, pcie rst, pcm gpio, pcm i2s, pcm uartf, refclk,
-                       rgmii1, rgmii2, sd, spi, spi refclk, uartf, uartlite, wdt refclk,
-                       wdt rst, wled]
-
-              - description: For MT7628 and MT7688 SoCs
-                enum: [antenna, debug, gpio, i2c, i2s, jtag, p0led_an, p0led_kn,
-                       p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn,
-                       p4led_an, p4led_kn, pcie, pcm, perst, pwm, pwm0, pwm1, pwm_uart2,
-                       refclk, rsvd, sdxc, sdxc d5 d4, sdxc d6, sdxc d7, spi, spi cs1,
-                       spis, sw_r, uart0, uart1, uart2, utif, wdt, wled_an, wled_kn, -]
+            enum: [ephy, gpio, gpio i2s, gpio uartf, i2c, i2s uartf, mdio, nand,
+                   pa, pcie refclk, pcie rst, pcm gpio, pcm i2s, pcm uartf,
+                   refclk, rgmii1, rgmii2, sd, spi, spi refclk, uartf, uartlite,
+                   wdt refclk, wdt rst, wled]
 
           groups:
             description:
@@ -59,24 +50,6 @@ patternProperties:
           - function
 
         allOf:
-          - if:
-              properties:
-                function:
-                  const: antenna
-            then:
-              properties:
-                groups:
-                  enum: [i2s]
-
-          - if:
-              properties:
-                function:
-                  const: debug
-            then:
-              properties:
-                groups:
-                  enum: [i2c]
-
           - if:
               properties:
                 function:
@@ -93,17 +66,8 @@ patternProperties:
             then:
               properties:
                 groups:
-                  anyOf:
-                    - description: For MT7620 SoC
-                      enum: [ephy, i2c, mdio, nd_sd, pa, pcie, rgmii1, rgmii2,
-                             spi, spi refclk, uartf, uartlite, wdt, wled]
-
-                    - description: For MT7628 and MT7688 SoCs
-                      enum: [gpio, i2c, i2s, p0led_an, p0led_kn, p1led_an,
-                             p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn,
-                             p4led_an, p4led_kn, perst, pwm0, pwm1, refclk,
-                             sdmode, spi, spi cs1, spis, uart0, uart1, uart2,
-                             wdt, wled_an, wled_kn]
+                  enum: [ephy, i2c, mdio, nd_sd, pa, pcie, rgmii1, rgmii2, spi,
+                         spi refclk, uartf, uartlite, wdt, wled]
 
           - if:
               properties:
@@ -132,15 +96,6 @@ patternProperties:
                 groups:
                   enum: [i2c]
 
-          - if:
-              properties:
-                function:
-                  const: i2s
-            then:
-              properties:
-                groups:
-                  enum: [i2s]
-
           - if:
               properties:
                 function:
@@ -150,17 +105,6 @@ patternProperties:
                 groups:
                   enum: [uartf]
 
-          - if:
-              properties:
-                function:
-                  const: jtag
-            then:
-              properties:
-                groups:
-                  enum: [p0led_an, p0led_kn, p1led_an, p1led_kn, p2led_an,
-                         p2led_kn, p3led_an, p3led_kn, p4led_an, p4led_kn,
-                         sdmode]
-
           - if:
               properties:
                 function:
@@ -179,96 +123,6 @@ patternProperties:
                 groups:
                   enum: [nd_sd]
 
-          - if:
-              properties:
-                function:
-                  const: p0led_an
-            then:
-              properties:
-                groups:
-                  enum: [p0led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p0led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p0led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p1led_an
-            then:
-              properties:
-                groups:
-                  enum: [p1led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p1led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p1led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p2led_an
-            then:
-              properties:
-                groups:
-                  enum: [p2led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p2led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p2led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p3led_an
-            then:
-              properties:
-                groups:
-                  enum: [p3led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p3led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p3led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p4led_an
-            then:
-              properties:
-                groups:
-                  enum: [p4led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p4led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p4led_kn]
-
           - if:
               properties:
                 function:
@@ -278,15 +132,6 @@ patternProperties:
                 groups:
                   enum: [pa]
 
-          - if:
-              properties:
-                function:
-                  const: pcie
-            then:
-              properties:
-                groups:
-                  enum: [gpio]
-
           - if:
               properties:
                 function:
@@ -305,15 +150,6 @@ patternProperties:
                 groups:
                   enum: [pcie]
 
-          - if:
-              properties:
-                function:
-                  const: pcm
-            then:
-              properties:
-                groups:
-                  enum: [i2s]
-
           - if:
               properties:
                 function:
@@ -341,51 +177,6 @@ patternProperties:
                 groups:
                   enum: [uartf]
 
-          - if:
-              properties:
-                function:
-                  const: perst
-            then:
-              properties:
-                groups:
-                  enum: [perst]
-
-          - if:
-              properties:
-                function:
-                  const: pwm
-            then:
-              properties:
-                groups:
-                  enum: [uart1, uart2]
-
-          - if:
-              properties:
-                function:
-                  const: pwm0
-            then:
-              properties:
-                groups:
-                  enum: [pwm0]
-
-          - if:
-              properties:
-                function:
-                  const: pwm1
-            then:
-              properties:
-                groups:
-                  enum: [pwm1]
-
-          - if:
-              properties:
-                function:
-                  const: pwm_uart2
-            then:
-              properties:
-                groups:
-                  enum: [spis]
-
           - if:
               properties:
                 function:
@@ -393,12 +184,7 @@ patternProperties:
             then:
               properties:
                 groups:
-                  anyOf:
-                    - description: For MT7620 SoC
-                      enum: [mdio]
-
-                    - description: For MT7628 and MT7688 SoCs
-                      enum: [gpio, refclk, spi cs1]
+                  enum: [mdio]
 
           - if:
               properties:
@@ -418,15 +204,6 @@ patternProperties:
                 groups:
                   enum: [rgmii2]
 
-          - if:
-              properties:
-                function:
-                  const: rsvd
-            then:
-              properties:
-                groups:
-                  enum: [p0led_an, p0led_kn, wled_an, wled_kn]
-
           - if:
               properties:
                 function:
@@ -436,42 +213,6 @@ patternProperties:
                 groups:
                   enum: [nd_sd]
 
-          - if:
-              properties:
-                function:
-                  const: sdxc
-            then:
-              properties:
-                groups:
-                  enum: [sdmode]
-
-          - if:
-              properties:
-                function:
-                  const: sdxc d5 d4
-            then:
-              properties:
-                groups:
-                  enum: [uart2]
-
-          - if:
-              properties:
-                function:
-                  const: sdxc d6
-            then:
-              properties:
-                groups:
-                  enum: [pwm1]
-
-          - if:
-              properties:
-                function:
-                  const: sdxc d7
-            then:
-              properties:
-                groups:
-                  enum: [pwm0]
-
           - if:
               properties:
                 function:
@@ -481,15 +222,6 @@ patternProperties:
                 groups:
                   enum: [spi]
 
-          - if:
-              properties:
-                function:
-                  const: spi cs1
-            then:
-              properties:
-                groups:
-                  enum: [spi cs1]
-
           - if:
               properties:
                 function:
@@ -499,51 +231,6 @@ patternProperties:
                 groups:
                   enum: [spi refclk]
 
-          - if:
-              properties:
-                function:
-                  const: spis
-            then:
-              properties:
-                groups:
-                  enum: [spis]
-
-          - if:
-              properties:
-                function:
-                  const: sw_r
-            then:
-              properties:
-                groups:
-                  enum: [uart1]
-
-          - if:
-              properties:
-                function:
-                  const: uart0
-            then:
-              properties:
-                groups:
-                  enum: [uart0]
-
-          - if:
-              properties:
-                function:
-                  const: uart1
-            then:
-              properties:
-                groups:
-                  enum: [uart1]
-
-          - if:
-              properties:
-                function:
-                  const: uart2
-            then:
-              properties:
-                groups:
-                  enum: [uart2]
-
           - if:
               properties:
                 function:
@@ -562,25 +249,6 @@ patternProperties:
                 groups:
                   enum: [uartlite]
 
-          - if:
-              properties:
-                function:
-                  const: utif
-            then:
-              properties:
-                groups:
-                  enum: [p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an,
-                         p3led_kn, p4led_an, p4led_kn, pwm0, pwm1, sdmode, spis]
-
-          - if:
-              properties:
-                function:
-                  const: wdt
-            then:
-              properties:
-                groups:
-                  enum: [wdt]
-
           - if:
               properties:
                 function:
@@ -608,33 +276,6 @@ patternProperties:
                 groups:
                   enum: [wled]
 
-          - if:
-              properties:
-                function:
-                  const: wled_an
-            then:
-              properties:
-                groups:
-                  enum: [wled_an]
-
-          - if:
-              properties:
-                function:
-                  const: wled_kn
-            then:
-              properties:
-                groups:
-                  enum: [wled_kn]
-
-          - if:
-              properties:
-                function:
-                  const: "-"
-            then:
-              properties:
-                groups:
-                  enum: [i2c, spi cs1, uart0]
-
         additionalProperties: false
 
     additionalProperties: false
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +11 -0
new file mode 100644
index 000000000000..c818c8947866
@@ -0,0 +1,454 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/mediatek,mt76x8-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT76X8 Pin Controller
+
+maintainers:
+  - Arınç ÜNAL <[email protected]>
+  - Sergio Paracuellos <[email protected]>

Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml line 21

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +10 -0
+
+description:
+  MediaTek MT76X8 pin controller for MT7628 and MT7688 SoCs.
+  The pin controller can only set the muxing of pin groups. Muxing individual
+  pins is not supported. There is no pinconf support.
+
+properties:
+  compatible:
+    enum:
+      - mediatek,mt76x8-pinctrl

We generally don't do wildcards in compatible strings. Are these 2 SoCs really 'the same'?

Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml line 22

Quoted 1 line
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +1 -0
+      - ralink,mt7620-pinctrl

Huh? Doesn't this conflict with the mt7620 schema?

Quoted 402 lines
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +402 -0
+      - ralink,rt2880-pinmux
+
+patternProperties:
+  '-pins$':
+    type: object
+    patternProperties:
+      '^(.*-)?pinmux$':
+        type: object
+        description: node for pinctrl.
+        $ref: pinmux-node.yaml#
+
+        properties:
+          function:
+            description:
+              A string containing the name of the function to mux to the group.
+            enum: [antenna, debug, gpio, i2c, i2s, jtag, p0led_an, p0led_kn,
+                   p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn,
+                   p4led_an, p4led_kn, pcie, pcm, perst, pwm, pwm0, pwm1,
+                   pwm_uart2, refclk, rsvd, sdxc, sdxc d5 d4, sdxc d6, sdxc d7,
+                   spi, spi cs1, spis, sw_r, uart0, uart1, uart2, utif, wdt,
+                   wled_an, wled_kn, -]
+
+          groups:
+            description:
+              An array of strings. Each string contains the name of a group.
+            maxItems: 1
+
+        required:
+          - groups
+          - function
+
+        allOf:
+          - if:
+              properties:
+                function:
+                  const: antenna
+            then:
+              properties:
+                groups:
+                  enum: [i2s]
+
+          - if:
+              properties:
+                function:
+                  const: debug
+            then:
+              properties:
+                groups:
+                  enum: [i2c]
+
+          - if:
+              properties:
+                function:
+                  const: gpio
+            then:
+              properties:
+                groups:
+                  enum: [gpio, i2c, i2s, p0led_an, p0led_kn, p1led_an, p1led_kn,
+                         p2led_an, p2led_kn, p3led_an, p3led_kn, p4led_an,
+                         p4led_kn, perst, pwm0, pwm1, refclk, sdmode, spi,
+                         spi cs1, spis, uart0, uart1, uart2, wdt, wled_an,
+                         wled_kn]
+
+          - if:
+              properties:
+                function:
+                  const: i2c
+            then:
+              properties:
+                groups:
+                  enum: [i2c]
+
+          - if:
+              properties:
+                function:
+                  const: i2s
+            then:
+              properties:
+                groups:
+                  enum: [i2s]
+
+          - if:
+              properties:
+                function:
+                  const: jtag
+            then:
+              properties:
+                groups:
+                  enum: [p0led_an, p0led_kn, p1led_an, p1led_kn, p2led_an,
+                         p2led_kn, p3led_an, p3led_kn, p4led_an, p4led_kn,
+                         sdmode]
+
+          - if:
+              properties:
+                function:
+                  const: p0led_an
+            then:
+              properties:
+                groups:
+                  enum: [p0led_an]
+
+          - if:
+              properties:
+                function:
+                  const: p0led_kn
+            then:
+              properties:
+                groups:
+                  enum: [p0led_kn]
+
+          - if:
+              properties:
+                function:
+                  const: p1led_an
+            then:
+              properties:
+                groups:
+                  enum: [p1led_an]
+
+          - if:
+              properties:
+                function:
+                  const: p1led_kn
+            then:
+              properties:
+                groups:
+                  enum: [p1led_kn]
+
+          - if:
+              properties:
+                function:
+                  const: p2led_an
+            then:
+              properties:
+                groups:
+                  enum: [p2led_an]
+
+          - if:
+              properties:
+                function:
+                  const: p2led_kn
+            then:
+              properties:
+                groups:
+                  enum: [p2led_kn]
+
+          - if:
+              properties:
+                function:
+                  const: p3led_an
+            then:
+              properties:
+                groups:
+                  enum: [p3led_an]
+
+          - if:
+              properties:
+                function:
+                  const: p3led_kn
+            then:
+              properties:
+                groups:
+                  enum: [p3led_kn]
+
+          - if:
+              properties:
+                function:
+                  const: p4led_an
+            then:
+              properties:
+                groups:
+                  enum: [p4led_an]
+
+          - if:
+              properties:
+                function:
+                  const: p4led_kn
+            then:
+              properties:
+                groups:
+                  enum: [p4led_kn]
+
+          - if:
+              properties:
+                function:
+                  const: pcie
+            then:
+              properties:
+                groups:
+                  enum: [gpio]
+
+          - if:
+              properties:
+                function:
+                  const: pcm
+            then:
+              properties:
+                groups:
+                  enum: [i2s]
+
+          - if:
+              properties:
+                function:
+                  const: perst
+            then:
+              properties:
+                groups:
+                  enum: [perst]
+
+          - if:
+              properties:
+                function:
+                  const: pwm
+            then:
+              properties:
+                groups:
+                  enum: [uart1, uart2]
+
+          - if:
+              properties:
+                function:
+                  const: pwm0
+            then:
+              properties:
+                groups:
+                  enum: [pwm0]
+
+          - if:
+              properties:
+                function:
+                  const: pwm1
+            then:
+              properties:
+                groups:
+                  enum: [pwm1]
+
+          - if:
+              properties:
+                function:
+                  const: pwm_uart2
+            then:
+              properties:
+                groups:
+                  enum: [spis]
+
+          - if:
+              properties:
+                function:
+                  const: refclk
+            then:
+              properties:
+                groups:
+                  enum: [gpio, refclk, spi cs1]
+
+          - if:
+              properties:
+                function:
+                  const: rsvd
+            then:
+              properties:
+                groups:
+                  enum: [p0led_an, p0led_kn, wled_an, wled_kn]
+
+          - if:
+              properties:
+                function:
+                  const: sdxc
+            then:
+              properties:
+                groups:
+                  enum: [sdmode]
+
+          - if:
+              properties:
+                function:
+                  const: sdxc d5 d4
+            then:
+              properties:
+                groups:
+                  enum: [uart2]
+
+          - if:
+              properties:
+                function:
+                  const: sdxc d6
+            then:
+              properties:
+                groups:
+                  enum: [pwm1]
+
+          - if:
+              properties:
+                function:
+                  const: sdxc d7
+            then:
+              properties:
+                groups:
+                  enum: [pwm0]
+
+          - if:
+              properties:
+                function:
+                  const: spi
+            then:
+              properties:
+                groups:
+                  enum: [spi]
+
+          - if:
+              properties:
+                function:
+                  const: spi cs1
+            then:
+              properties:
+                groups:
+                  enum: [spi cs1]
+
+          - if:
+              properties:
+                function:
+                  const: spis
+            then:
+              properties:
+                groups:
+                  enum: [spis]
+
+          - if:
+              properties:
+                function:
+                  const: sw_r
+            then:
+              properties:
+                groups:
+                  enum: [uart1]
+
+          - if:
+              properties:
+                function:
+                  const: uart0
+            then:
+              properties:
+                groups:
+                  enum: [uart0]
+
+          - if:
+              properties:
+                function:
+                  const: uart1
+            then:
+              properties:
+                groups:
+                  enum: [uart1]
+
+          - if:
+              properties:
+                function:
+                  const: uart2
+            then:
+              properties:
+                groups:
+                  enum: [uart2]
+
+          - if:
+              properties:
+                function:
+                  const: utif
+            then:
+              properties:
+                groups:
+                  enum: [p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an,
+                         p3led_kn, p4led_an, p4led_kn, pwm0, pwm1, sdmode, spis]
+
+          - if:
+              properties:
+                function:
+                  const: wdt
+            then:
+              properties:
+                groups:
+                  enum: [wdt]
+
+          - if:
+              properties:
+                function:
+                  const: wled_an
+            then:
+              properties:
+                groups:
+                  enum: [wled_an]
+
+          - if:
+              properties:
+                function:
+                  const: wled_kn
+            then:
+              properties:
+                groups:
+                  enum: [wled_kn]
+
+          - if:
+              properties:
+                function:

Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml line 433

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +9 -0
+                  const: "-"
+            then:
+              properties:
+                groups:
+                  enum: [i2c, spi cs1, uart0]
+
 
+        additionalProperties: false
+
+    additionalProperties: false

Move these above 'properties'. It's easier to read than after a long indented section.

Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml line 436

Quoted 3 lines
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +3 -0
+
+allOf:
+  - $ref: "pinctrl.yaml#"

Drop quotes.

Rob

#31 lore raw

Re: [RFC PATCH 10/16] dt-bindings: pinctrl: mediatek: mt7620: split binding

Quoted 536 lines · Rob Herring
Quoted 535 lines · On Wed, Feb 22, 2023 at 09:39:26PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

The MT7628 and MT7688 SoCs contain different pin muxing information, therefore, should be split. This can be done now that there are compatible strings to distinguish them from other SoCs.

Split the schema out to mediatek,mt76x8-pinctrl.yaml.

---
  .../pinctrl/mediatek,mt7620-pinctrl.yaml      | 375 +--------------
  .../pinctrl/mediatek,mt76x8-pinctrl.yaml      | 454 ++++++++++++++++++
  2 files changed, 462 insertions(+), 367 deletions(-)

create mode 100644 Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml

Documentation/devicetree/bindings/pinctrl/mediatek,mt7620-pinctrl.yaml +8 -367
index 3bf58da8a394..ea4a1194fbc4 100644
@@ -11,7 +11,7 @@ maintainers:
    - Sergio Paracuellos <[email protected]>
 
  description:
-  MediaTek MT7620 pin controller for MT7620, MT7628 and MT7688 SoCs.
+  MediaTek MT7620 pin controller for MT7620 SoC.
    The pin controller can only set the muxing of pin groups. Muxing individual
    pins is not supported. There is no pinconf support.
 
@@ -35,19 +35,10 @@ patternProperties:
            function:
              description:
                A string containing the name of the function to mux to the group.
-            anyOf:
-              - description: For MT7620 SoC
-                enum: [ephy, gpio, gpio i2s, gpio uartf, i2c, i2s uartf, mdio, nand, pa,
-                       pcie refclk, pcie rst, pcm gpio, pcm i2s, pcm uartf, refclk,
-                       rgmii1, rgmii2, sd, spi, spi refclk, uartf, uartlite, wdt refclk,
-                       wdt rst, wled]
-
-              - description: For MT7628 and MT7688 SoCs
-                enum: [antenna, debug, gpio, i2c, i2s, jtag, p0led_an, p0led_kn,
-                       p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn,
-                       p4led_an, p4led_kn, pcie, pcm, perst, pwm, pwm0, pwm1, pwm_uart2,
-                       refclk, rsvd, sdxc, sdxc d5 d4, sdxc d6, sdxc d7, spi, spi cs1,
-                       spis, sw_r, uart0, uart1, uart2, utif, wdt, wled_an, wled_kn, -]
+            enum: [ephy, gpio, gpio i2s, gpio uartf, i2c, i2s uartf, mdio, nand,
+                   pa, pcie refclk, pcie rst, pcm gpio, pcm i2s, pcm uartf,
+                   refclk, rgmii1, rgmii2, sd, spi, spi refclk, uartf, uartlite,
+                   wdt refclk, wdt rst, wled]
 
            groups:
              description:
@@ -59,24 +50,6 @@ patternProperties:
            - function
 
          allOf:
-          - if:
-              properties:
-                function:
-                  const: antenna
-            then:
-              properties:
-                groups:
-                  enum: [i2s]
-
-          - if:
-              properties:
-                function:
-                  const: debug
-            then:
-              properties:
-                groups:
-                  enum: [i2c]
-
            - if:
                properties:
                  function:
@@ -93,17 +66,8 @@ patternProperties:
              then:
                properties:
                  groups:
-                  anyOf:
-                    - description: For MT7620 SoC
-                      enum: [ephy, i2c, mdio, nd_sd, pa, pcie, rgmii1, rgmii2,
-                             spi, spi refclk, uartf, uartlite, wdt, wled]
-
-                    - description: For MT7628 and MT7688 SoCs
-                      enum: [gpio, i2c, i2s, p0led_an, p0led_kn, p1led_an,
-                             p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn,
-                             p4led_an, p4led_kn, perst, pwm0, pwm1, refclk,
-                             sdmode, spi, spi cs1, spis, uart0, uart1, uart2,
-                             wdt, wled_an, wled_kn]
+                  enum: [ephy, i2c, mdio, nd_sd, pa, pcie, rgmii1, rgmii2, spi,
+                         spi refclk, uartf, uartlite, wdt, wled]
 
            - if:
                properties:
@@ -132,15 +96,6 @@ patternProperties:
                  groups:
                    enum: [i2c]
 
-          - if:
-              properties:
-                function:
-                  const: i2s
-            then:
-              properties:
-                groups:
-                  enum: [i2s]
-
            - if:
                properties:
                  function:
@@ -150,17 +105,6 @@ patternProperties:
                  groups:
                    enum: [uartf]
 
-          - if:
-              properties:
-                function:
-                  const: jtag
-            then:
-              properties:
-                groups:
-                  enum: [p0led_an, p0led_kn, p1led_an, p1led_kn, p2led_an,
-                         p2led_kn, p3led_an, p3led_kn, p4led_an, p4led_kn,
-                         sdmode]
-
            - if:
                properties:
                  function:
@@ -179,96 +123,6 @@ patternProperties:
                  groups:
                    enum: [nd_sd]
 
-          - if:
-              properties:
-                function:
-                  const: p0led_an
-            then:
-              properties:
-                groups:
-                  enum: [p0led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p0led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p0led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p1led_an
-            then:
-              properties:
-                groups:
-                  enum: [p1led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p1led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p1led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p2led_an
-            then:
-              properties:
-                groups:
-                  enum: [p2led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p2led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p2led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p3led_an
-            then:
-              properties:
-                groups:
-                  enum: [p3led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p3led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p3led_kn]
-
-          - if:
-              properties:
-                function:
-                  const: p4led_an
-            then:
-              properties:
-                groups:
-                  enum: [p4led_an]
-
-          - if:
-              properties:
-                function:
-                  const: p4led_kn
-            then:
-              properties:
-                groups:
-                  enum: [p4led_kn]
-
            - if:
                properties:
                  function:
@@ -278,15 +132,6 @@ patternProperties:
                  groups:
                    enum: [pa]
 
-          - if:
-              properties:
-                function:
-                  const: pcie
-            then:
-              properties:
-                groups:
-                  enum: [gpio]
-
            - if:
                properties:
                  function:
@@ -305,15 +150,6 @@ patternProperties:
                  groups:
                    enum: [pcie]
 
-          - if:
-              properties:
-                function:
-                  const: pcm
-            then:
-              properties:
-                groups:
-                  enum: [i2s]
-
            - if:
                properties:
                  function:
@@ -341,51 +177,6 @@ patternProperties:
                  groups:
                    enum: [uartf]
 
-          - if:
-              properties:
-                function:
-                  const: perst
-            then:
-              properties:
-                groups:
-                  enum: [perst]
-
-          - if:
-              properties:
-                function:
-                  const: pwm
-            then:
-              properties:
-                groups:
-                  enum: [uart1, uart2]
-
-          - if:
-              properties:
-                function:
-                  const: pwm0
-            then:
-              properties:
-                groups:
-                  enum: [pwm0]
-
-          - if:
-              properties:
-                function:
-                  const: pwm1
-            then:
-              properties:
-                groups:
-                  enum: [pwm1]
-
-          - if:
-              properties:
-                function:
-                  const: pwm_uart2
-            then:
-              properties:
-                groups:
-                  enum: [spis]
-
            - if:
                properties:
                  function:
@@ -393,12 +184,7 @@ patternProperties:
              then:
                properties:
                  groups:
-                  anyOf:
-                    - description: For MT7620 SoC
-                      enum: [mdio]
-
-                    - description: For MT7628 and MT7688 SoCs
-                      enum: [gpio, refclk, spi cs1]
+                  enum: [mdio]
 
            - if:
                properties:
@@ -418,15 +204,6 @@ patternProperties:
                  groups:
                    enum: [rgmii2]
 
-          - if:
-              properties:
-                function:
-                  const: rsvd
-            then:
-              properties:
-                groups:
-                  enum: [p0led_an, p0led_kn, wled_an, wled_kn]
-
            - if:
                properties:
                  function:
@@ -436,42 +213,6 @@ patternProperties:
                  groups:
                    enum: [nd_sd]
 
-          - if:
-              properties:
-                function:
-                  const: sdxc
-            then:
-              properties:
-                groups:
-                  enum: [sdmode]
-
-          - if:
-              properties:
-                function:
-                  const: sdxc d5 d4
-            then:
-              properties:
-                groups:
-                  enum: [uart2]
-
-          - if:
-              properties:
-                function:
-                  const: sdxc d6
-            then:
-              properties:
-                groups:
-                  enum: [pwm1]
-
-          - if:
-              properties:
-                function:
-                  const: sdxc d7
-            then:
-              properties:
-                groups:
-                  enum: [pwm0]
-
            - if:
                properties:
                  function:
@@ -481,15 +222,6 @@ patternProperties:
                  groups:
                    enum: [spi]
 
-          - if:
-              properties:
-                function:
-                  const: spi cs1
-            then:
-              properties:
-                groups:
-                  enum: [spi cs1]
-
            - if:
                properties:
                  function:
@@ -499,51 +231,6 @@ patternProperties:
                  groups:
                    enum: [spi refclk]
 
-          - if:
-              properties:
-                function:
-                  const: spis
-            then:
-              properties:
-                groups:
-                  enum: [spis]
-
-          - if:
-              properties:
-                function:
-                  const: sw_r
-            then:
-              properties:
-                groups:
-                  enum: [uart1]
-
-          - if:
-              properties:
-                function:
-                  const: uart0
-            then:
-              properties:
-                groups:
-                  enum: [uart0]
-
-          - if:
-              properties:
-                function:
-                  const: uart1
-            then:
-              properties:
-                groups:
-                  enum: [uart1]
-
-          - if:
-              properties:
-                function:
-                  const: uart2
-            then:
-              properties:
-                groups:
-                  enum: [uart2]
-
            - if:
                properties:
                  function:
@@ -562,25 +249,6 @@ patternProperties:
                  groups:
                    enum: [uartlite]
 
-          - if:
-              properties:
-                function:
-                  const: utif
-            then:
-              properties:
-                groups:
-                  enum: [p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an,
-                         p3led_kn, p4led_an, p4led_kn, pwm0, pwm1, sdmode, spis]
-
-          - if:
-              properties:
-                function:
-                  const: wdt
-            then:
-              properties:
-                groups:
-                  enum: [wdt]
-
            - if:
                properties:
                  function:
@@ -608,33 +276,6 @@ patternProperties:
                  groups:
                    enum: [wled]
 
-          - if:
-              properties:
-                function:
-                  const: wled_an
-            then:
-              properties:
-                groups:
-                  enum: [wled_an]
-
-          - if:
-              properties:
-                function:
-                  const: wled_kn
-            then:
-              properties:
-                groups:
-                  enum: [wled_kn]
-
-          - if:
-              properties:
-                function:
-                  const: "-"
-            then:
-              properties:
-                groups:
-                  enum: [i2c, spi cs1, uart0]
-
          additionalProperties: false
 
      additionalProperties: false
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +16 -0
new file mode 100644
index 000000000000..c818c8947866
@@ -0,0 +1,454 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/mediatek,mt76x8-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT76X8 Pin Controller
+
+maintainers:
+  - Arınç ÜNAL <[email protected]>
+  - Sergio Paracuellos <[email protected]>
+
+description:
+  MediaTek MT76X8 pin controller for MT7628 and MT7688 SoCs.
+  The pin controller can only set the muxing of pin groups. Muxing individual
+  pins is not supported. There is no pinconf support.
Quoted 8 lines

Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml line 21

Quoted 5 lines
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +5 -0
+
+properties:
+  compatible:
+    enum:
+      - mediatek,mt76x8-pinctrl

We generally don't do wildcards in compatible strings. Are these 2 SoCs really 'the same'?

They are very similar SoCs which have got the same pin configuration. Just like the RT305X SoCs.

Quoted 4 lines

Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml line 22

Quoted 2 lines
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +1 -0
+      - ralink,mt7620-pinctrl

Huh? Doesn't this conflict with the mt7620 schema?

It does, this is what I asked to you and Krzysztof on the composed mail for the patch series.

Quoted 414 lines
Quoted 403 lines
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +402 -0
+      - ralink,rt2880-pinmux
+
+patternProperties:
+  '-pins$':
+    type: object
+    patternProperties:
+      '^(.*-)?pinmux$':
+        type: object
+        description: node for pinctrl.
+        $ref: pinmux-node.yaml#
+
+        properties:
+          function:
+            description:
+              A string containing the name of the function to mux to the group.
+            enum: [antenna, debug, gpio, i2c, i2s, jtag, p0led_an, p0led_kn,
+                   p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an, p3led_kn,
+                   p4led_an, p4led_kn, pcie, pcm, perst, pwm, pwm0, pwm1,
+                   pwm_uart2, refclk, rsvd, sdxc, sdxc d5 d4, sdxc d6, sdxc d7,
+                   spi, spi cs1, spis, sw_r, uart0, uart1, uart2, utif, wdt,
+                   wled_an, wled_kn, -]
+
+          groups:
+            description:
+              An array of strings. Each string contains the name of a group.
+            maxItems: 1
+
+        required:
+          - groups
+          - function
+
+        allOf:
+          - if:
+              properties:
+                function:
+                  const: antenna
+            then:
+              properties:
+                groups:
+                  enum: [i2s]
+
+          - if:
+              properties:
+                function:
+                  const: debug
+            then:
+              properties:
+                groups:
+                  enum: [i2c]
+
+          - if:
+              properties:
+                function:
+                  const: gpio
+            then:
+              properties:
+                groups:
+                  enum: [gpio, i2c, i2s, p0led_an, p0led_kn, p1led_an, p1led_kn,
+                         p2led_an, p2led_kn, p3led_an, p3led_kn, p4led_an,
+                         p4led_kn, perst, pwm0, pwm1, refclk, sdmode, spi,
+                         spi cs1, spis, uart0, uart1, uart2, wdt, wled_an,
+                         wled_kn]
+
+          - if:
+              properties:
+                function:
+                  const: i2c
+            then:
+              properties:
+                groups:
+                  enum: [i2c]
+
+          - if:
+              properties:
+                function:
+                  const: i2s
+            then:
+              properties:
+                groups:
+                  enum: [i2s]
+
+          - if:
+              properties:
+                function:
+                  const: jtag
+            then:
+              properties:
+                groups:
+                  enum: [p0led_an, p0led_kn, p1led_an, p1led_kn, p2led_an,
+                         p2led_kn, p3led_an, p3led_kn, p4led_an, p4led_kn,
+                         sdmode]
+
+          - if:
+              properties:
+                function:
+                  const: p0led_an
+            then:
+              properties:
+                groups:
+                  enum: [p0led_an]
+
+          - if:
+              properties:
+                function:
+                  const: p0led_kn
+            then:
+              properties:
+                groups:
+                  enum: [p0led_kn]
+
+          - if:
+              properties:
+                function:
+                  const: p1led_an
+            then:
+              properties:
+                groups:
+                  enum: [p1led_an]
+
+          - if:
+              properties:
+                function:
+                  const: p1led_kn
+            then:
+              properties:
+                groups:
+                  enum: [p1led_kn]
+
+          - if:
+              properties:
+                function:
+                  const: p2led_an
+            then:
+              properties:
+                groups:
+                  enum: [p2led_an]
+
+          - if:
+              properties:
+                function:
+                  const: p2led_kn
+            then:
+              properties:
+                groups:
+                  enum: [p2led_kn]
+
+          - if:
+              properties:
+                function:
+                  const: p3led_an
+            then:
+              properties:
+                groups:
+                  enum: [p3led_an]
+
+          - if:
+              properties:
+                function:
+                  const: p3led_kn
+            then:
+              properties:
+                groups:
+                  enum: [p3led_kn]
+
+          - if:
+              properties:
+                function:
+                  const: p4led_an
+            then:
+              properties:
+                groups:
+                  enum: [p4led_an]
+
+          - if:
+              properties:
+                function:
+                  const: p4led_kn
+            then:
+              properties:
+                groups:
+                  enum: [p4led_kn]
+
+          - if:
+              properties:
+                function:
+                  const: pcie
+            then:
+              properties:
+                groups:
+                  enum: [gpio]
+
+          - if:
+              properties:
+                function:
+                  const: pcm
+            then:
+              properties:
+                groups:
+                  enum: [i2s]
+
+          - if:
+              properties:
+                function:
+                  const: perst
+            then:
+              properties:
+                groups:
+                  enum: [perst]
+
+          - if:
+              properties:
+                function:
+                  const: pwm
+            then:
+              properties:
+                groups:
+                  enum: [uart1, uart2]
+
+          - if:
+              properties:
+                function:
+                  const: pwm0
+            then:
+              properties:
+                groups:
+                  enum: [pwm0]
+
+          - if:
+              properties:
+                function:
+                  const: pwm1
+            then:
+              properties:
+                groups:
+                  enum: [pwm1]
+
+          - if:
+              properties:
+                function:
+                  const: pwm_uart2
+            then:
+              properties:
+                groups:
+                  enum: [spis]
+
+          - if:
+              properties:
+                function:
+                  const: refclk
+            then:
+              properties:
+                groups:
+                  enum: [gpio, refclk, spi cs1]
+
+          - if:
+              properties:
+                function:
+                  const: rsvd
+            then:
+              properties:
+                groups:
+                  enum: [p0led_an, p0led_kn, wled_an, wled_kn]
+
+          - if:
+              properties:
+                function:
+                  const: sdxc
+            then:
+              properties:
+                groups:
+                  enum: [sdmode]
+
+          - if:
+              properties:
+                function:
+                  const: sdxc d5 d4
+            then:
+              properties:
+                groups:
+                  enum: [uart2]
+
+          - if:
+              properties:
+                function:
+                  const: sdxc d6
+            then:
+              properties:
+                groups:
+                  enum: [pwm1]
+
+          - if:
+              properties:
+                function:
+                  const: sdxc d7
+            then:
+              properties:
+                groups:
+                  enum: [pwm0]
+
+          - if:
+              properties:
+                function:
+                  const: spi
+            then:
+              properties:
+                groups:
+                  enum: [spi]
+
+          - if:
+              properties:
+                function:
+                  const: spi cs1
+            then:
+              properties:
+                groups:
+                  enum: [spi cs1]
+
+          - if:
+              properties:
+                function:
+                  const: spis
+            then:
+              properties:
+                groups:
+                  enum: [spis]
+
+          - if:
+              properties:
+                function:
+                  const: sw_r
+            then:
+              properties:
+                groups:
+                  enum: [uart1]
+
+          - if:
+              properties:
+                function:
+                  const: uart0
+            then:
+              properties:
+                groups:
+                  enum: [uart0]
+
+          - if:
+              properties:
+                function:
+                  const: uart1
+            then:
+              properties:
+                groups:
+                  enum: [uart1]
+
+          - if:
+              properties:
+                function:
+                  const: uart2
+            then:
+              properties:
+                groups:
+                  enum: [uart2]
+
+          - if:
+              properties:
+                function:
+                  const: utif
+            then:
+              properties:
+                groups:
+                  enum: [p1led_an, p1led_kn, p2led_an, p2led_kn, p3led_an,
+                         p3led_kn, p4led_an, p4led_kn, pwm0, pwm1, sdmode, spis]
+
+          - if:
+              properties:
+                function:
+                  const: wdt
+            then:
+              properties:
+                groups:
+                  enum: [wdt]
+
+          - if:
+              properties:
+                function:
+                  const: wled_an
+            then:
+              properties:
+                groups:
+                  enum: [wled_an]
+
+          - if:
+              properties:
+                function:
+                  const: wled_kn
+            then:
+              properties:
+                groups:
+                  enum: [wled_kn]
+
+          - if:
+              properties:
+                function:

Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml line 433

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +9 -0
+                  const: "-"
+            then:
+              properties:
+                groups:
+                  enum: [i2c, spi cs1, uart0]
+
 
+        additionalProperties: false
+
+    additionalProperties: false
Quoted 8 lines

Move these above 'properties'. It's easier to read than after a long indented section.

Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml line 436

Quoted 3 lines
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml new file +3 -0
+
+allOf:
+  - $ref: "pinctrl.yaml#"

Drop quotes.

Will do.

Arınç

#32 lore raw

RFC PATCH 11/16 MAINTAINERS: move ralink pinctrl to mediatek mips pinctrl

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

The Ralink pinctrl driver is now under the name of MediaTek MIPS pin controller. Move the maintainer information accordingly. Add dt-binding schema files. Add [email protected] as an associated mailing list.

---
 MAINTAINERS | 29 ++++++++++++++++++++++-------
 1 file changed, 22 insertions(+), 7 deletions(-)
MAINTAINERS +22 -7
index 8a851eb053ca..a75e6ffc0866 100644
@@ -16541,6 +16541,28 @@ F:	Documentation/devicetree/bindings/pinctrl/mediatek,mt7622-pinctrl.yaml
 F:	Documentation/devicetree/bindings/pinctrl/mediatek,mt8183-pinctrl.yaml
 F:	drivers/pinctrl/mediatek/
 
+PIN CONTROLLER - MEDIATEK MIPS
+M:	Arınç ÜNAL <[email protected]>
+M:	Sergio Paracuellos <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/pinctrl/mediatek,mt7620-pinctrl.yaml
+F:	Documentation/devicetree/bindings/pinctrl/mediatek,mt7621-pinctrl.yaml
+F:	Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml
+F:	Documentation/devicetree/bindings/pinctrl/mediatek,rt2880-pinctrl.yaml
+F:	Documentation/devicetree/bindings/pinctrl/mediatek,rt305x-pinctrl.yaml
+F:	Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml
+F:	Documentation/devicetree/bindings/pinctrl/mediatek,rt3883-pinctrl.yaml
+F:	Documentation/devicetree/bindings/pinctrl/mediatek,rt5350-pinctrl.yaml
+F:	drivers/pinctrl/mediatek/pinctrl-mt7620.c
+F:	drivers/pinctrl/mediatek/pinctrl-mt7621.c
+F:	drivers/pinctrl/mediatek/pinctrl-mt76x8.c
+F:	drivers/pinctrl/mediatek/pinctrl-mtmips.*
+F:	drivers/pinctrl/mediatek/pinctrl-rt2880.c
+F:	drivers/pinctrl/mediatek/pinctrl-rt305x.c
+F:	drivers/pinctrl/mediatek/pinctrl-rt3883.c
+
 PIN CONTROLLER - MICROCHIP AT91
 M:	Ludovic Desroches <[email protected]>
 L:	[email protected] (moderated for non-subscribers)
@@ -17486,13 +17508,6 @@ L:	[email protected]
 S:	Maintained
 F:	arch/mips/boot/dts/ralink/mt7621*
 
-RALINK PINCTRL DRIVER
-M:	Arınç ÜNAL <[email protected]>
-M:	Sergio Paracuellos <[email protected]>
-L:	[email protected]
-S:	Maintained
-F:	drivers/pinctrl/ralink/
-
 RALINK RT2X00 WIRELESS LAN DRIVER
 M:	Stanislaw Gruszka <[email protected]>
 M:	Helmut Schaa <[email protected]>
Signature · 1 line
2.37.2
#33 lore raw

RFC PATCH 12/16 dt-bindings: pinctrl: mediatek: mt6795: rename to mediatek,mt6795-pinctrl

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

Rename mediatek,pinctrl-mt6795.yaml to mediatek,mt6795-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas.

---
 ...ediatek,pinctrl-mt6795.yaml => mediatek,mt6795-pinctrl.yaml} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename Documentation/devicetree/bindings/pinctrl/{mediatek,pinctrl-mt6795.yaml => mediatek,mt6795-pinctrl.yaml} (98%)
Documentation/devicetree/bindings/pinctrl/mediatek,mt6795-pinctrl.yaml renamed from Documentation/devicetree/bindings/pinctrl/mediatek,pinctrl-mt6795.yaml +1 -1
similarity index 98%
rename from Documentation/devicetree/bindings/pinctrl/mediatek,pinctrl-mt6795.yaml
rename to Documentation/devicetree/bindings/pinctrl/mediatek,mt6795-pinctrl.yaml
index 9399e0215526..c5131f053b61 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/pinctrl/mediatek,pinctrl-mt6795.yaml#
+$id: http://devicetree.org/schemas/pinctrl/mediatek,mt6795-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: Mediatek MT6795 Pin Controller
Signature · 1 line
2.37.2
maintainer Acked-by on v1 12/16
#34 lore raw

Re: [RFC PATCH 12/16] dt-bindings: pinctrl: mediatek: mt6795: rename to mediatek,mt6795-pinctrl

Quoted 11 lines · On Wed, 22 Feb 2023 21:39:28 +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Rename mediatek,pinctrl-mt6795.yaml to mediatek,mt6795-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas.

---
 ...ediatek,pinctrl-mt6795.yaml => mediatek,mt6795-pinctrl.yaml} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename Documentation/devicetree/bindings/pinctrl/{mediatek,pinctrl-mt6795.yaml => mediatek,mt6795-pinctrl.yaml} (98%)
#35 lore raw

RFC PATCH 13/16 dt-bindings: pinctrl: mediatek: mt8186: rename to mediatek,mt8186-pinctrl

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

Rename pinctrl-mt8186.yaml to mediatek,mt8186-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas.

---
 .../{pinctrl-mt8186.yaml => mediatek,mt8186-pinctrl.yaml}       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename Documentation/devicetree/bindings/pinctrl/{pinctrl-mt8186.yaml => mediatek,mt8186-pinctrl.yaml} (99%)
Documentation/devicetree/bindings/pinctrl/mediatek,mt8186-pinctrl.yaml renamed from Documentation/devicetree/bindings/pinctrl/pinctrl-mt8186.yaml +1 -1
similarity index 99%
rename from Documentation/devicetree/bindings/pinctrl/pinctrl-mt8186.yaml
rename to Documentation/devicetree/bindings/pinctrl/mediatek,mt8186-pinctrl.yaml
index 26573a793b57..32d64416eb16 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/pinctrl/pinctrl-mt8186.yaml#
+$id: http://devicetree.org/schemas/pinctrl/mediatek,mt8186-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: Mediatek MT8186 Pin Controller
Signature · 1 line
2.37.2
maintainer Acked-by on v1 13/16
#36 lore raw

Re: [RFC PATCH 13/16] dt-bindings: pinctrl: mediatek: mt8186: rename to mediatek,mt8186-pinctrl

Quoted 4 lines · On Wed, Feb 22, 2023 at 09:39:29PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Rename pinctrl-mt8186.yaml to mediatek,mt8186-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas.

These renames doing the same transform can all be 1 patch. Either way:

#37 lore raw

RFC PATCH 14/16 dt-bindings: pinctrl: mediatek: mt8192: rename to mediatek,mt8192-pinctrl

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

Rename pinctrl-mt8192.yaml to mediatek,mt8192-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas.

---
 .../{pinctrl-mt8192.yaml => mediatek,mt8192-pinctrl.yaml}       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename Documentation/devicetree/bindings/pinctrl/{pinctrl-mt8192.yaml => mediatek,mt8192-pinctrl.yaml} (98%)
Documentation/devicetree/bindings/pinctrl/mediatek,mt8192-pinctrl.yaml renamed from Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +1 -1
similarity index 98%
rename from Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml
rename to Documentation/devicetree/bindings/pinctrl/mediatek,mt8192-pinctrl.yaml
index e0e943e5b874..e764cb0f8c1a 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/pinctrl/pinctrl-mt8192.yaml#
+$id: http://devicetree.org/schemas/pinctrl/mediatek,mt8192-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: Mediatek MT8192 Pin Controller
Signature · 1 line
2.37.2
maintainer Acked-by on v1 14/16
#38 lore raw

Re: [RFC PATCH 14/16] dt-bindings: pinctrl: mediatek: mt8192: rename to mediatek,mt8192-pinctrl

Quoted 11 lines · On Wed, 22 Feb 2023 21:39:30 +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Rename pinctrl-mt8192.yaml to mediatek,mt8192-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas.

---
 .../{pinctrl-mt8192.yaml => mediatek,mt8192-pinctrl.yaml}       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename Documentation/devicetree/bindings/pinctrl/{pinctrl-mt8192.yaml => mediatek,mt8192-pinctrl.yaml} (98%)
#39 lore raw

RFC PATCH 15/16 dt-bindings: pinctrl: mediatek: mt8195: rename to mediatek,mt8195-pinctrl

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

Rename pinctrl-mt8195.yaml to mediatek,mt8195-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas.

---
 .../{pinctrl-mt8195.yaml => mediatek,mt8195-pinctrl.yaml}       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename Documentation/devicetree/bindings/pinctrl/{pinctrl-mt8195.yaml => mediatek,mt8195-pinctrl.yaml} (99%)
Documentation/devicetree/bindings/pinctrl/mediatek,mt8195-pinctrl.yaml renamed from Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +1 -1
similarity index 99%
rename from Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml
rename to Documentation/devicetree/bindings/pinctrl/mediatek,mt8195-pinctrl.yaml
index 66fe17e9e4d3..7b3dfc14eedc 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/pinctrl/pinctrl-mt8195.yaml#
+$id: http://devicetree.org/schemas/pinctrl/mediatek,mt8195-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: Mediatek MT8195 Pin Controller
Signature · 1 line
2.37.2
maintainer Acked-by on v1 15/16
#40 lore raw

Re: [RFC PATCH 15/16] dt-bindings: pinctrl: mediatek: mt8195: rename to mediatek,mt8195-pinctrl

Quoted 11 lines · On Wed, 22 Feb 2023 21:39:31 +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Rename pinctrl-mt8195.yaml to mediatek,mt8195-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas.

---
 .../{pinctrl-mt8195.yaml => mediatek,mt8195-pinctrl.yaml}       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename Documentation/devicetree/bindings/pinctrl/{pinctrl-mt8195.yaml => mediatek,mt8195-pinctrl.yaml} (99%)
#41 lore raw

RFC PATCH 16/16 dt-bindings: pinctrl: mediatek: improve schemas

In reply to [email protected]

From: Arınç ÜNAL <[email protected]>

Some schemas include "MediaTek", some "Mediatek". Rename all to "MediaTek" to address the naming inconsistency.

Change the style of description properties to plain style where there's no need to preserve the line endings, and vice versa.

Fit the schemas to 80 columns for each line.

Set patternProperties to '^.*mux.*$' on mediatek,mt7986-pinctrl.yaml.

---
 .../pinctrl/mediatek,mt65xx-pinctrl.yaml      | 24 +++---
 .../pinctrl/mediatek,mt6779-pinctrl.yaml      | 33 +++++----
 .../pinctrl/mediatek,mt6795-pinctrl.yaml      | 33 +++++----
 .../pinctrl/mediatek,mt7620-pinctrl.yaml      |  2 +-
 .../pinctrl/mediatek,mt7621-pinctrl.yaml      |  2 +-
 .../pinctrl/mediatek,mt7622-pinctrl.yaml      | 26 +++----
 .../pinctrl/mediatek,mt76x8-pinctrl.yaml      |  2 +-
 .../pinctrl/mediatek,mt7981-pinctrl.yaml      | 35 +++++----
 .../pinctrl/mediatek,mt7986-pinctrl.yaml      | 64 ++++++++--------
 .../pinctrl/mediatek,mt8183-pinctrl.yaml      | 26 ++++---
 .../pinctrl/mediatek,mt8186-pinctrl.yaml      | 47 ++++++------
 .../pinctrl/mediatek,mt8188-pinctrl.yaml      | 74 ++++++++++---------
 .../pinctrl/mediatek,mt8192-pinctrl.yaml      | 47 ++++++------
 .../pinctrl/mediatek,mt8195-pinctrl.yaml      | 38 +++++-----
 .../pinctrl/mediatek,mt8365-pinctrl.yaml      | 28 +++----
 .../pinctrl/mediatek,rt2880-pinctrl.yaml      |  2 +-
 .../pinctrl/mediatek,rt305x-pinctrl.yaml      |  2 +-
 .../pinctrl/mediatek,rt3352-pinctrl.yaml      |  2 +-
 .../pinctrl/mediatek,rt3883-pinctrl.yaml      |  2 +-
 .../pinctrl/mediatek,rt5350-pinctrl.yaml      |  2 +-
 20 files changed, 256 insertions(+), 235 deletions(-)
Documentation/devicetree/bindings/pinctrl/mediatek,mt65xx-pinctrl.yaml +12 -12
index a55c8e4ff26e..206fa8ba9502 100644
@@ -4,13 +4,13 @@
 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt65xx-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Mediatek MT65xx Pin Controller
+title: MediaTek MT65xx Pin Controller
 
 maintainers:
   - Sean Wang <[email protected]>
 
-description: |+
-  The Mediatek's Pin controller is used to control SoC pins.
+description:
+  The MediaTek's Pin controller is used to control SoC pins.
 
 properties:
   compatible:
@@ -30,7 +30,7 @@ properties:
 
   pins-are-numbered:
     $ref: /schemas/types.yaml#/definitions/flag
-    description: |
+    description:
       Specify the subnodes are using numbered pinmux to specify pins. (UNUSED)
     deprecated: true
 
@@ -38,10 +38,10 @@ properties:
 
   "#gpio-cells":
     const: 2
-    description: |
-      Number of cells in GPIO specifier. Since the generic GPIO
-      binding is used, the amount of cells must be specified as 2. See the below
-      mentioned gpio binding representation for description of particular cells.
+    description:
+      Number of cells in GPIO specifier. Since the generic GPIO binding is used,
+      the amount of cells must be specified as 2. See the below mentioned gpio
+      binding representation for description of particular cells.
 
   mediatek,pctl-regmap:
     $ref: /schemas/types.yaml#/definitions/phandle-array
@@ -49,7 +49,7 @@ properties:
       maxItems: 1
     minItems: 1
     maxItems: 2
-    description: |
+    description:
       Should be phandles of the syscfg node.
 
   interrupt-controller: true
@@ -77,7 +77,7 @@ patternProperties:
       '(^pins|pins?$)':
         type: object
         additionalProperties: false
-        description: |
+        description:
           A pinctrl node should contain at least one subnodes representing the
           pinctrl groups available on the machine. Each subnode will list the
           pins it needs, and how they should be configured, with regard to muxer
@@ -95,7 +95,7 @@ patternProperties:
           bias-disable: true
 
           bias-pull-up:
-            description: |
+            description:
               Besides generic pinconfig options, it can be used as the pull up
               settings for 2 pull resistors, R0 and R1. User can configure those
               special pins. Some macros have been defined for this usage, such
@@ -117,7 +117,7 @@ patternProperties:
           input-schmitt-disable: true
 
           drive-strength:
-            description: |
+            description:
               Can support some arguments, such as MTK_DRIVE_4mA, MTK_DRIVE_6mA,
               etc. See dt-bindings/pinctrl/mt65xx.h for valid arguments.
 
Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml +18 -15
index a2141eb0854e..17046d204087 100644
@@ -4,15 +4,15 @@
 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt6779-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Mediatek MT6779 Pin Controller
+title: MediaTek MT6779 Pin Controller
 
 maintainers:
   - Andy Teng <[email protected]>
   - Sean Wang <[email protected]>
 
 description:
-  The MediaTek pin controller on MT6779 is used to control pin
-  functions, pull up/down resistance and drive strength options.
+  The MediaTek pin controller on MT6779 is used to control pin functions, pull
+  up/down resistance and drive strength options.
 
 properties:
   compatible:
@@ -29,22 +29,22 @@ properties:
 
   "#gpio-cells":
     const: 2
-    description: |
-      Number of cells in GPIO specifier. Since the generic GPIO
-      binding is used, the amount of cells must be specified as 2. See the below
-      mentioned gpio binding representation for description of particular cells.
+    description:
+      Number of cells in GPIO specifier. Since the generic GPIO binding is used,
+      the amount of cells must be specified as 2. See the below mentioned gpio
+      binding representation for description of particular cells.
 
   gpio-ranges:
     minItems: 1
     maxItems: 5
-    description: |
+    description:
       GPIO valid number range.
 
   interrupt-controller: true
 
   interrupts:
     maxItems: 1
-    description: |
+    description:
       Specifies the summary IRQ.
 
   "#interrupt-cells":
@@ -118,19 +118,20 @@ patternProperties:
     patternProperties:
       '-pins*$':
         type: object
-        description: |
+        description:
           A pinctrl node should contain at least one subnodes representing the
           pinctrl groups available on the machine. Each subnode will list the
           pins it needs, and how they should be configured, with regard to muxer
-          configuration, pullups, drive strength, input enable/disable and input schmitt.
+          configuration, pullups, drive strength, input enable/disable and input
+          schmitt.
         $ref: "/schemas/pinctrl/pincfg-node.yaml"
 
         properties:
           pinmux:
             description:
               integer array, represents gpio pin number and mux setting.
-              Supported pin number and mux varies for different SoCs, and are defined
-              as macros in boot/dts/<soc>-pinfunc.h directly.
+              Supported pin number and mux varies for different SoCs, and are
+              defined as macros in boot/dts/<soc>-pinfunc.h directly.
 
           bias-disable: true
 
@@ -159,7 +160,8 @@ patternProperties:
           mediatek,pull-up-adv:
             description: |
               Pull up setings for 2 pull resistors, R0 and R1. User can
-              configure those special pins. Valid arguments are described as below:
+              configure those special pins. Valid arguments are described as
+              below:
               0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
               1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
               2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
@@ -170,7 +172,8 @@ patternProperties:
           mediatek,pull-down-adv:
             description: |
               Pull down settings for 2 pull resistors, R0 and R1. User can
-              configure those special pins. Valid arguments are described as below:
+              configure those special pins. Valid arguments are described as
+              below:
               0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
               1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
               2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
Documentation/devicetree/bindings/pinctrl/mediatek,mt6795-pinctrl.yaml +17 -16
index c5131f053b61..5bd78e88fea3 100644
@@ -4,14 +4,14 @@
 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt6795-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Mediatek MT6795 Pin Controller
+title: MediaTek MT6795 Pin Controller
 
 maintainers:
   - AngeloGioacchino Del Regno <[email protected]>
   - Sean Wang <[email protected]>
 
-description: |
-  The Mediatek's Pin controller is used to control SoC pins.
+description:
+  The MediaTek's MT6795 Pin controller is used to control SoC pins.
 
 properties:
   compatible:
@@ -22,8 +22,8 @@ properties:
   '#gpio-cells':
     description: |
       Number of cells in GPIO specifier. Since the generic GPIO binding is used,
-      the amount of cells must be specified as 2. See the below
-      mentioned gpio binding representation for description of particular cells.
+      the amount of cells must be specified as 2. See the below mentioned gpio
+      binding representation for description of particular cells.
     const: 2
 
   gpio-ranges:
@@ -65,8 +65,8 @@ patternProperties:
           A pinctrl node should contain at least one subnodes representing the
           pinctrl groups available on the machine. Each subnode will list the
           pins it needs, and how they should be configured, with regard to muxer
-          configuration, pullups, drive strength, input enable/disable and
-          input schmitt.
+          configuration, pullups, drive strength, input enable/disable and input
+          schmitt.
           An example of using macro:
           pincontroller {
             /* GPIO0 set as multifunction GPIO0 */
@@ -86,11 +86,10 @@ patternProperties:
 
         properties:
           pinmux:
-            description: |
+            description:
               Integer array, represents gpio pin number and mux setting.
               Supported pin number and mux varies for different SoCs, and are
-              defined as macros in dt-bindings/pinctrl/<soc>-pinfunc.h
-              directly.
+              defined as macros in dt-bindings/pinctrl/<soc>-pinfunc.h directly.
 
           drive-strength:
             enum: [2, 4, 6, 8, 10, 12, 14, 16]
@@ -100,7 +99,7 @@ patternProperties:
               - type: boolean
               - enum: [100, 101, 102, 103]
                 description: mt6795 pull down PUPD/R0/R1 type define value.
-            description: |
+            description:
                For normal pull down type, it is not necessary to specify R1R0
                values; When pull down type is PUPD/R0/R1, adding R1R0 defines
                will set different resistance values.
@@ -110,10 +109,10 @@ patternProperties:
               - type: boolean
               - enum: [100, 101, 102, 103]
                 description: mt6795 pull up PUPD/R0/R1 type define value.
-            description: |
+            description:
                For normal pull up type, it is not necessary to specify R1R0
-               values; When pull up type is PUPD/R0/R1, adding R1R0 defines
-               will set different resistance values.
+               values; When pull up type is PUPD/R0/R1, adding R1R0 defines will
+               set different resistance values.
 
           bias-disable: true
 
@@ -132,7 +131,8 @@ patternProperties:
           mediatek,pull-up-adv:
             description: |
               Pull up setings for 2 pull resistors, R0 and R1. User can
-              configure those special pins. Valid arguments are described as below:
+              configure those special pins. Valid arguments are described as
+              below:
               0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
               1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
               2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
@@ -143,7 +143,8 @@ patternProperties:
           mediatek,pull-down-adv:
             description: |
               Pull down settings for 2 pull resistors, R0 and R1. User can
-              configure those special pins. Valid arguments are described as below:
+              configure those special pins. Valid arguments are described as
+              below:
               0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
               1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
               2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
Documentation/devicetree/bindings/pinctrl/mediatek,mt7620-pinctrl.yaml +1 -1
index ea4a1194fbc4..2a5495a3a717 100644
@@ -10,7 +10,7 @@ maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
-description:
+description: |
   MediaTek MT7620 pin controller for MT7620 SoC.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
Documentation/devicetree/bindings/pinctrl/mediatek,mt7621-pinctrl.yaml +1 -1
index 4dfe3da5fd40..1fc227c27bd0 100644
@@ -10,7 +10,7 @@ maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
-description:
+description: |
   MediaTek MT7621 pin controller for MT7621 SoC.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
Documentation/devicetree/bindings/pinctrl/mediatek,mt7622-pinctrl.yaml +13 -13
index ac93eb8f01a6..740a26e1ede1 100644
@@ -4,12 +4,12 @@
 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt7622-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Mediatek MT7622 Pin Controller
+title: MediaTek MT7622 Pin Controller
 
 maintainers:
   - Sean Wang <[email protected]>
 
-description: |+
+description:
   The MediaTek's MT7622 Pin controller is used to control SoC pins.
 
 properties:
@@ -29,10 +29,10 @@ properties:
 
   "#gpio-cells":
     const: 2
-    description: |
-      Number of cells in GPIO specifier. Since the generic GPIO
-      binding is used, the amount of cells must be specified as 2. See the below
-      mentioned gpio binding representation for description of particular cells.
+    description:
+      Number of cells in GPIO specifier. Since the generic GPIO binding is used,
+      the amount of cells must be specified as 2. See the below mentioned gpio
+      binding representation for description of particular cells.
 
   interrupt-controller: true
 
@@ -68,18 +68,18 @@ patternProperties:
       '^mux(-|$)':
         type: object
         additionalProperties: false
-        description: |
+        description:
           pinmux configuration nodes.
         $ref: "/schemas/pinctrl/pinmux-node.yaml"
         properties:
           function:
-            description: |
+            description:
               A string containing the name of the function to mux to the group.
             enum: [emmc, eth, i2c, i2s, ir, led, flash, pcie, pmic, pwm, sd,
                    spi, tdm, uart, watchdog, wifi]
 
           groups:
-            description: |
+            description:
               An array of strings. Each string contains the name of a group.
 
           drive-strength:
@@ -247,7 +247,7 @@ patternProperties:
       '^conf(-|$)':
         type: object
         additionalProperties: false
-        description: |
+        description:
           pinconf configuration nodes.
         $ref: "/schemas/pinctrl/pincfg-node.yaml"
 
@@ -258,7 +258,7 @@ patternProperties:
               Valid values are the same as the pinmux node.
 
           pins:
-            description: |
+            description:
               An array of strings. Each string contains the name of a pin.
             enum: [GPIO_A, I2S1_IN, I2S1_OUT, I2S_BCLK, I2S_WS, I2S_MCLK, TXD0,
                    RXD0, SPI_WP, SPI_HOLD, SPI_CLK, SPI_MOSI, SPI_MISO, SPI_CS,
@@ -315,14 +315,14 @@ patternProperties:
             enum: [0, 1]
 
           mediatek,tdsel:
-            description: |
+            description:
               An integer describing the steps for output level shifter duty
               cycle when asserted (high pulse width adjustment). Valid arguments
               are from 0 to 15.
             $ref: /schemas/types.yaml#/definitions/uint32
 
           mediatek,rdsel:
-            description: |
+            description:
               An integer describing the steps for input level shifter duty cycle
               when asserted (high pulse width adjustment). Valid arguments are
               from 0 to 63.
Documentation/devicetree/bindings/pinctrl/mediatek,mt76x8-pinctrl.yaml +1 -1
index c818c8947866..48d563886e57 100644
@@ -10,7 +10,7 @@ maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
-description:
+description: |
   MediaTek MT76X8 pin controller for MT7628 and MT7688 SoCs.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
Documentation/devicetree/bindings/pinctrl/mediatek,mt7981-pinctrl.yaml +20 -15
index 74c66fbcb2ae..10717cee9058 100644
@@ -4,7 +4,7 @@
 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt7981-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Mediatek MT7981 Pin Controller
+title: MediaTek MT7981 Pin Controller
 
 maintainers:
   - Daniel Golle <[email protected]>
@@ -37,7 +37,7 @@ properties:
 
   "#gpio-cells":
     const: 2
-    description: >
+    description:
       Number of cells in GPIO specifier. Since the generic GPIO binding is used,
       the amount of cells must be specified as 2. See the below mentioned gpio
       binding representation for description of particular cells.
@@ -111,7 +111,9 @@ patternProperties:
           "watchdog1"            "watchdog"  13
           "udi"                  "udi"       9, 10, 11, 12, 13
           "drv_vbus"             "usb"       14
-          "emmc_45"              "flash"     15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25
+          "emmc_45"              "flash"     15, 16, 17, 18, 19, 20, 21, 22, 23,
+                                             24, 25
+
           "snfi"                 "flash"     16, 17, 18, 19, 20, 21
           "spi0"                 "spi"       16, 17, 18, 19
           "spi0_wp_hold"         "spi"       20, 21
@@ -148,7 +150,7 @@ patternProperties:
           "wf5g_led0"            "led"       31
           "wf5g_led1"            "led"       35
           "mt7531_int"           "eth"       38
-          "ant_sel"              "ant"       14, 15, 16, 17, 18, 19, 20, 21, 22
+          "ant_sel"              "ant"       14, 15, 16, 17, 18, 19, 20, 21, 22,
                                              23, 24, 25, 34, 35
 
         $ref: /schemas/pinctrl/pinmux-node.yaml
@@ -256,7 +258,8 @@ patternProperties:
             then:
               properties:
                 groups:
-                  enum: [gbe_led0, gbe_led1, wf2g_led0, wf2g_led1, wf5g_led0, wf5g_led1]
+                  enum: [gbe_led0, gbe_led1, wf2g_led0, wf2g_led1, wf5g_led0,
+                         wf5g_led1]
           - if:
               properties:
                 function:
@@ -275,7 +278,8 @@ patternProperties:
               properties:
                 groups:
                   items:
-                    enum: [spi1_0, spi0, spi0_wp_hold, spi1_1, spi2, spi2_wp_hold]
+                    enum: [spi1_0, spi0, spi0_wp_hold, spi1_1, spi2,
+                           spi2_wp_hold]
                   maxItems: 4
           - if:
               properties:
@@ -332,13 +336,14 @@ patternProperties:
                      JTAG_JTDO, JTAG_JTDI, JTAG_JTMS, JTAG_JTCLK, JTAG_JTRST_N,
                      WO_JTAG_JTDO, WO_JTAG_JTDI, WO_JTAG_JTMS, WO_JTAG_JTCLK,
                      WO_JTAG_JTRST_N, USB_VBUS, PWM0, SPI0_CLK, SPI0_MOSI,
-                     SPI0_MISO, SPI0_CS, SPI0_HOLD, SPI0_WP, SPI1_CLK, SPI1_MOSI,
-                     SPI1_MISO, SPI1_CS, SPI2_CLK, SPI2_MOSI, SPI2_MISO, SPI2_CS,
-                     SPI2_HOLD, SPI2_WP, UART0_RXD, UART0_TXD, PCIE_CLK_REQ,
-                     PCIE_WAKE_N, SMI_MDC, SMI_MDIO, GBE_INT, GBE_RESET,
-                     WF_DIG_RESETB, WF_CBA_RESETB, WF_XO_REQ, WF_TOP_CLK,
-                     WF_TOP_DATA, WF_HB1, WF_HB2, WF_HB3, WF_HB4, WF_HB0,
-                     WF_HB0_B, WF_HB5, WF_HB6, WF_HB7, WF_HB8, WF_HB9, WF_HB10]
+                     SPI0_MISO, SPI0_CS, SPI0_HOLD, SPI0_WP, SPI1_CLK,
+                     SPI1_MOSI, SPI1_MISO, SPI1_CS, SPI2_CLK, SPI2_MOSI,
+                     SPI2_MISO, SPI2_CS, SPI2_HOLD, SPI2_WP, UART0_RXD,
+                     UART0_TXD, PCIE_CLK_REQ, PCIE_WAKE_N, SMI_MDC, SMI_MDIO,
+                     GBE_INT, GBE_RESET, WF_DIG_RESETB, WF_CBA_RESETB,
+                     WF_XO_REQ, WF_TOP_CLK, WF_TOP_DATA, WF_HB1, WF_HB2, WF_HB3,
+                     WF_HB4, WF_HB0, WF_HB0_B, WF_HB5, WF_HB6, WF_HB7, WF_HB8,
+                     WF_HB9, WF_HB10]
             maxItems: 57
 
           bias-disable: true
@@ -348,7 +353,7 @@ patternProperties:
               - type: boolean
                 description: normal pull up.
               - enum: [100, 101, 102, 103]
-                description: >
+                description:
                   PUPD/R1/R0 pull down type. See MTK_PUPD_SET_R1R0 defines in
                   dt-bindings/pinctrl/mt65xx.h.
 
@@ -357,7 +362,7 @@ patternProperties:
               - type: boolean
                 description: normal pull down.
               - enum: [100, 101, 102, 103]
-                description: >
+                description:
                   PUPD/R1/R0 pull down type. See MTK_PUPD_SET_R1R0 defines in
                   dt-bindings/pinctrl/mt65xx.h.
 
Documentation/devicetree/bindings/pinctrl/mediatek,mt7986-pinctrl.yaml +33 -31

145 lines not on this page · raw message

Documentation/devicetree/bindings/pinctrl/mediatek,mt8183-pinctrl.yaml +14 -12
index c30cd0d010dd..3b1be7949e8c 100644
@@ -4,12 +4,12 @@
 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt8183-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Mediatek MT8183 Pin Controller
+title: MediaTek MT8183 Pin Controller
 
 maintainers:
   - Sean Wang <[email protected]>
 
-description: |+
+description:
   The MediaTek's MT8183 Pin controller is used to control SoC pins.
 
 properties:
@@ -37,15 +37,15 @@ properties:
 
   "#gpio-cells":
     const: 2
-    description: |
-      Number of cells in GPIO specifier. Since the generic GPIO
-      binding is used, the amount of cells must be specified as 2. See the below
-      mentioned gpio binding representation for description of particular cells.
+    description:
+      Number of cells in GPIO specifier. Since the generic GPIO binding is used,
+      the amount of cells must be specified as 2. See the below mentioned gpio
+      binding representation for description of particular cells.
 
   gpio-ranges:
     minItems: 1
     maxItems: 5
-    description: |
+    description:
       GPIO valid number range.
 
   interrupt-controller: true
@@ -74,7 +74,7 @@ patternProperties:
       '^pins':
         type: object
         additionalProperties: false
-        description: |
+        description:
           A pinctrl node should contain at least one subnodes representing the
           pinctrl groups available on the machine. Each subnode will list the
           pins it needs, and how they should be configured, with regard to muxer
@@ -139,7 +139,8 @@ patternProperties:
           mediatek,pull-up-adv:
             description: |
               Pull up setings for 2 pull resistors, R0 and R1. User can
-              configure those special pins. Valid arguments are described as below:
+              configure those special pins. Valid arguments are described as
+              below:
               0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
               1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
               2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
@@ -150,7 +151,8 @@ patternProperties:
           mediatek,pull-down-adv:
             description: |
               Pull down settings for 2 pull resistors, R0 and R1. User can
-              configure those special pins. Valid arguments are described as below:
+              configure those special pins. Valid arguments are described as
+              below:
               0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
               1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
               2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
@@ -159,14 +161,14 @@ patternProperties:
             enum: [0, 1, 2, 3]
 
           mediatek,tdsel:
-            description: |
+            description:
               An integer describing the steps for output level shifter duty
               cycle when asserted (high pulse width adjustment). Valid arguments
               are from 0 to 15.
             $ref: /schemas/types.yaml#/definitions/uint32
 
           mediatek,rdsel:
-            description: |
+            description:
               An integer describing the steps for input level shifter duty cycle
               when asserted (high pulse width adjustment). Valid arguments are
               from 0 to 63.
Documentation/devicetree/bindings/pinctrl/mediatek,mt8186-pinctrl.yaml +23 -24

107 lines not on this page · raw message

Documentation/devicetree/bindings/pinctrl/mediatek,mt8188-pinctrl.yaml +40 -34

118 lines not on this page · raw message

Documentation/devicetree/bindings/pinctrl/mediatek,mt8192-pinctrl.yaml +24 -23

101 lines not on this page · raw message

Documentation/devicetree/bindings/pinctrl/mediatek,mt8195-pinctrl.yaml +19 -19
index 7b3dfc14eedc..c1c8c99ba139 100644
@@ -4,13 +4,13 @@
 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt8195-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Mediatek MT8195 Pin Controller
+title: MediaTek MT8195 Pin Controller
 
 maintainers:
   - Sean Wang <[email protected]>
 
-description: |
-  The Mediatek's Pin controller is used to control SoC pins.
+description:
+  The MediaTek's MT8195 Pin controller is used to control SoC pins.
 
 properties:
   compatible:
@@ -19,10 +19,10 @@ properties:
   gpio-controller: true
 
   '#gpio-cells':
-    description: |
+    description:
       Number of cells in GPIO specifier. Since the generic GPIO binding is used,
-      the amount of cells must be specified as 2. See the below
-      mentioned gpio binding representation for description of particular cells.
+      the amount of cells must be specified as 2. See the below mentioned gpio
+      binding representation for description of particular cells.
     const: 2
 
   gpio-ranges:
@@ -32,13 +32,13 @@ properties:
   gpio-line-names: true
 
   reg:
-    description: |
-      Physical address base for gpio base registers. There are 8 GPIO
-      physical address base in mt8195.
+    description:
+      Physical address base for gpio base registers. There are 8 GPIO physical
+      address base in mt8195.
     maxItems: 8
 
   reg-names:
-    description: |
+    description:
       Gpio base register names.
     maxItems: 8
 
@@ -53,9 +53,9 @@ properties:
 
   mediatek,rsel-resistance-in-si-unit:
     type: boolean
-    description: |
-      Identifying i2c pins pull up/down type which is RSEL. It can support
-      RSEL define or si unit value(ohm) to set different resistance.
+    description:
+      Identifying i2c pins pull up/down type which is RSEL. It can support RSEL
+      define or si unit value(ohm) to set different resistance.
 
 # PIN CONFIGURATION NODES
 patternProperties:
@@ -70,8 +70,8 @@ patternProperties:
           A pinctrl node should contain at least one subnodes representing the
           pinctrl groups available on the machine. Each subnode will list the
           pins it needs, and how they should be configured, with regard to muxer
-          configuration, pullups, drive strength, input enable/disable and
-          input schmitt.
+          configuration, pullups, drive strength, input enable/disable and input
+          schmitt.
           An example of using macro:
           pincontroller {
             /* GPIO0 set as multifunction GPIO0 */
@@ -91,7 +91,7 @@ patternProperties:
 
         properties:
           pinmux:
-            description: |
+            description:
               Integer array, represents gpio pin number and mux setting.
               Supported pin number and mux varies for different SoCs, and are
               defined as macros in dt-bindings/pinctrl/<soc>-pinfunc.h
@@ -174,9 +174,9 @@ patternProperties:
               & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011"
               & "MTK_PULL_SET_RSEL_100" & "MTK_PULL_SET_RSEL_101"
               & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
-              define in mt8195. It can also support resistance value(ohm)
-              "1000" & "1500" & "2000" & "3000" & "4000" & "5000" & "10000" &
-              "75000" in mt8195.
+              define in mt8195. It can also support resistance value(ohm) "1000"
+              & "1500" & "2000" & "3000" & "4000" & "5000" & "10000" & "75000"
+              in mt8195.
               An example of using RSEL define:
               pincontroller {
                 i2c0-pins {
Documentation/devicetree/bindings/pinctrl/mediatek,mt8365-pinctrl.yaml +15 -13
index 4b96884a1afc..1cd9d6e55866 100644
@@ -4,13 +4,13 @@
 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt8365-pinctrl.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Mediatek MT8365 Pin Controller
+title: MediaTek MT8365 Pin Controller
 
 maintainers:
   - Zhiyong Tao <[email protected]>
   - Bernhard Rosenkränzer <[email protected]>
 
-description: |
+description:
   The MediaTek's MT8365 Pin controller is used to control SoC pins.
 
 properties:
@@ -26,17 +26,17 @@ properties:
       maxItems: 1
     minItems: 1
     maxItems: 2
-    description: |
+    description:
       Should be phandles of the syscfg node.
 
   gpio-controller: true
 
   "#gpio-cells":
     const: 2
-    description: |
-      Number of cells in GPIO specifier. Since the generic GPIO
-      binding is used, the amount of cells must be specified as 2. See the below
-      mentioned gpio binding representation for description of particular cells.
+    description:
+      Number of cells in GPIO specifier. Since the generic GPIO binding is used,
+      the amount of cells must be specified as 2. See the below mentioned gpio
+      binding representation for description of particular cells.
 
   interrupt-controller: true
 
@@ -54,7 +54,7 @@ patternProperties:
       "pins$":
         type: object
         additionalProperties: false
-        description: |
+        description:
           A pinctrl node should contain at least one subnode representing the
           pinctrl groups available on the machine. Each subnode will list the
           pins it needs, and how they should be configured, with regard to muxer
@@ -72,7 +72,7 @@ patternProperties:
           bias-disable: true
 
           bias-pull-up:
-            description: |
+            description:
               Besides generic pinconfig options, it can be used as the pull up
               settings for 2 pull resistors, R0 and R1. User can configure those
               special pins.
@@ -120,7 +120,8 @@ patternProperties:
           mediatek,pull-up-adv:
             description: |
               Pull up setings for 2 pull resistors, R0 and R1. User can
-              configure those special pins. Valid arguments are described as below:
+              configure those special pins. Valid arguments are described as
+              below:
               0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
               1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
               2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
@@ -131,7 +132,8 @@ patternProperties:
           mediatek,pull-down-adv:
             description: |
               Pull down settings for 2 pull resistors, R0 and R1. User can
-              configure those special pins. Valid arguments are described as below:
+              configure those special pins. Valid arguments are described as
+              below:
               0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
               1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
               2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
@@ -140,14 +142,14 @@ patternProperties:
             enum: [0, 1, 2, 3]
 
           mediatek,tdsel:
-            description: |
+            description:
               An integer describing the steps for output level shifter duty
               cycle when asserted (high pulse width adjustment). Valid arguments
               are from 0 to 15.
             $ref: /schemas/types.yaml#/definitions/uint32
 
           mediatek,rdsel:
-            description: |
+            description:
               An integer describing the steps for input level shifter duty cycle
               when asserted (high pulse width adjustment). Valid arguments are
               from 0 to 63.
Documentation/devicetree/bindings/pinctrl/mediatek,rt2880-pinctrl.yaml +1 -1
index 7395e4434e64..fa03560a13f8 100644
@@ -10,7 +10,7 @@ maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
-description:
+description: |
   MediaTek RT2880 pin controller for RT2880 SoC.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
Documentation/devicetree/bindings/pinctrl/mediatek,rt305x-pinctrl.yaml +1 -1
index 1e6c7e7f2fe2..11b46aee36d4 100644
@@ -10,7 +10,7 @@ maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
-description:
+description: |
   MediaTek RT305X pin controller for RT3050, RT3052, and RT3350 SoCs.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
Documentation/devicetree/bindings/pinctrl/mediatek,rt3352-pinctrl.yaml +1 -1
index 7a74c1602afc..c88b9fefb9ef 100644
@@ -10,7 +10,7 @@ maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
-description:
+description: |
   MediaTek RT3352 pin controller for RT3352 SoC.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
Documentation/devicetree/bindings/pinctrl/mediatek,rt3883-pinctrl.yaml +1 -1
index ab20f67c47f0..bafc2b820dd8 100644
@@ -10,7 +10,7 @@ maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
-description:
+description: |
   MediaTek RT3883 pin controller for RT3883 SoC.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
Documentation/devicetree/bindings/pinctrl/mediatek,rt5350-pinctrl.yaml +1 -1
index 5184cea62640..070a9d59e639 100644
@@ -10,7 +10,7 @@ maintainers:
   - Arınç ÜNAL <[email protected]>
   - Sergio Paracuellos <[email protected]>
 
-description:
+description: |
   MediaTek RT5350 pin controller for RT5350 SoC.
   The pin controller can only set the muxing of pin groups. Muxing individual
   pins is not supported. There is no pinconf support.
Signature · 1 line
2.37.2
maintainer
#42 lore raw

Re: [RFC PATCH 16/16] dt-bindings: pinctrl: mediatek: improve schemas

Quoted 11 lines · On Wed, Feb 22, 2023 at 09:39:32PM +0300, [email protected] wrote:

From: Arınç ÜNAL <[email protected]>

Some schemas include "MediaTek", some "Mediatek". Rename all to "MediaTek" to address the naming inconsistency.

Change the style of description properties to plain style where there's no need to preserve the line endings, and vice versa.

Fit the schemas to 80 columns for each line.

Set patternProperties to '^.*mux.*$' on mediatek,mt7986-pinctrl.yaml.

This at least should be a separate patch. Really, this is probably 3 patches.

The changes themselves look fine.

Rob

#43 lore raw
In reply to [email protected]

Hi Arınç,

All of this looks pretty good to me. You did a really big effort with this series. Thanks for doing this!

Quoted 36 lines · On Wed, Feb 22, 2023 at 7:39 PM <[email protected]> wrote:

This is an ambitious effort I've been wanting to do for months.

Straight off the bat, I'm fixing the ABI that I broke a while back, by reintroducing the ralink,rt2880-pinmux compatible string.

If you take a look at the schema for mt7620 and rt305x, some functions got multiple lists for groups. Like refclk on mt7620. Because mt7620 and mt7628/mt7688 SoCs use the same compatible string, it's impossible to differentiate on the binding which SoC a devicetree is actually for. Therefore, the binding will allow all groups listed for that function. For example, if the SoC is mt7620, only the refclk function for the mdio group can be used. If one were to put "spi cs1" as the function there, there wouldn't be a warning.

I address this by introducing new compatible strings for these SoCs, then split the schemas. I also separate mt7628/mt7688 from mt7620 pinctrl subdriver in the process.

I wanted to split the rt305x driver too but too much code would be reused so I backed down from that.

Ralink was acquired by MediaTek in 2011. These SoCs have been rebranded as MediaTek. We're moving the Ralink pinctrl driver to MediaTek, and rename the schemas to mediatek.

I've renamed the ralink core driver to mtmips. I decided to call the core mtmips as I've seen folks from MediaTek use the same name when they added support for MT7621 pinctrl on U-Boot. Feel free to comment on this.

The MTMIPS pinctrl driver requires rt_sysc_membase from arch/mips/ralink/of.c, so, for COMPILE_TEST to be useful, RALINK must be selected. These headers, asm/mach-ralink/ralink_regs.h and asm/mach-ralink/mt7620.h, from arch/mips/include are also required but they can easily be included:

Quoted 6 lines

ifeq ($(CONFIG_COMPILE_TEST),y)
CFLAGS_pinctrl-mtmips.o += -I$(srctree)/arch/mips/include
endif

Sergio, do you see a way to make the pinctrl driver independent of architecture code? At least avoid using rt_sysc_membase.

The only really dependent architecture code in these drivers now is because of the use of
'rt_sysc_r32()' and 'rt_sysc_w32()' in 'ralink_pmx_group_enable()' function [0]. This is just to set the gpio mode. The read and write registers here SYSC_REG_GPIO_MODE and SYSC_REG_GPIO_MODE2 are in the system controller area. In all single ralink platform 'sysc' nodes should be a syscon that can be accessed from the driver side. That way you can just get those syscon areas via regmap APIs and properly read and write desired registers. For the mt7621.dtsi file, the node is already a syscon [1]. Other ralink device tree files should also be modified to include this in its 'sysc' node (I think in openWRT dts files at least for mt7620 is already included). You have to add that in all of them since 'ralink_pmx_group_enable()' is common code for all. I think this can be done in a different patch series. I can help you to do this after this series is reviewed and accepted.

Quoted 6 lines

dtbs_check will print warnings for DTs with the old strings as it will match multiple bindings. I assume that's acceptable in order to have the things properly documented without breaking the ABI. The bindings will work fine with the new compatible strings.

Quoted 8 lines

I could define the checks under $defs:, then refer to it if the compatible string is the one which would work fine. Or I could put only the new compatible strings on the documentation. What are your thoughts Krzysztof, Rob?

Arınç

Best regards,
Sergio Paracuellos

[0]: https://elixir.bootlin.com/linux/v6.2/source/drivers/pinctrl/ralink/pinctrl-ralink.c#L117
[1]: https://elixir.bootlin.com/linux/v6.2/source/arch/mips/boot/dts/ralink/mt7621.dtsi#L62

#44 lore raw
Quoted 49 lines · Sergio Paracuellos

Hi Arınç,

All of this looks pretty good to me. You did a really big effort with this series. Thanks for doing this!

Quoted 36 lines · On Wed, Feb 22, 2023 at 7:39 PM <[email protected]> wrote:

This is an ambitious effort I've been wanting to do for months.

Straight off the bat, I'm fixing the ABI that I broke a while back, by reintroducing the ralink,rt2880-pinmux compatible string.

If you take a look at the schema for mt7620 and rt305x, some functions got multiple lists for groups. Like refclk on mt7620. Because mt7620 and mt7628/mt7688 SoCs use the same compatible string, it's impossible to differentiate on the binding which SoC a devicetree is actually for. Therefore, the binding will allow all groups listed for that function. For example, if the SoC is mt7620, only the refclk function for the mdio group can be used. If one were to put "spi cs1" as the function there, there wouldn't be a warning.

I address this by introducing new compatible strings for these SoCs, then split the schemas. I also separate mt7628/mt7688 from mt7620 pinctrl subdriver in the process.

I wanted to split the rt305x driver too but too much code would be reused so I backed down from that.

Ralink was acquired by MediaTek in 2011. These SoCs have been rebranded as MediaTek. We're moving the Ralink pinctrl driver to MediaTek, and rename the schemas to mediatek.

I've renamed the ralink core driver to mtmips. I decided to call the core mtmips as I've seen folks from MediaTek use the same name when they added support for MT7621 pinctrl on U-Boot. Feel free to comment on this.

The MTMIPS pinctrl driver requires rt_sysc_membase from arch/mips/ralink/of.c, so, for COMPILE_TEST to be useful, RALINK must be selected. These headers, asm/mach-ralink/ralink_regs.h and asm/mach-ralink/mt7620.h, from arch/mips/include are also required but they can easily be included:

Quoted 6 lines

ifeq ($(CONFIG_COMPILE_TEST),y)
CFLAGS_pinctrl-mtmips.o += -I$(srctree)/arch/mips/include
endif

Sergio, do you see a way to make the pinctrl driver independent of architecture code? At least avoid using rt_sysc_membase.

Quoted 15 lines

The only really dependent architecture code in these drivers now is because of the use of
'rt_sysc_r32()' and 'rt_sysc_w32()' in 'ralink_pmx_group_enable()' function [0]. This is just to set the gpio mode. The read and write registers here SYSC_REG_GPIO_MODE and SYSC_REG_GPIO_MODE2 are in the system controller area. In all single ralink platform 'sysc' nodes should be a syscon that can be accessed from the driver side. That way you can just get those syscon areas via regmap APIs and properly read and write desired registers. For the mt7621.dtsi file, the node is already a syscon [1]. Other ralink device tree files should also be modified to include this in its 'sysc' node (I think in openWRT dts files at least for mt7620 is already included). You have to add that in all of them since 'ralink_pmx_group_enable()' is common code for all. I think this can be done in a different patch series. I can help you to do this after this series is reviewed and accepted.

Awesome, thanks a lot! Note to self, "depends on RALINK" menu entries should be changed to "depends on OF" when this happens.

Arınç