Skip to contentSkip to conversation

dt-bindings: imx: Add pinctrl binding doc for i.MX8MN

PATCH In review [email protected] 4 participants 9 messages May 30, 2019 – Jun 12, 2019

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

PATCH 1/3 dt-bindings: imx: Add pinctrl binding doc for i.MX8MN

From: Anson Huang <[email protected]>

Add binding doc for i.MX8MN pinctrl driver.

---
 .../bindings/pinctrl/fsl,imx8mn-pinctrl.txt        |  39 ++
 arch/arm64/boot/dts/freescale/imx8mn-pinfunc.h     | 646 +++++++++++++++++++++
 2 files changed, 685 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.txt
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-pinfunc.h
Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.txt new file +39 -0
new file mode 100644
index 0000000..330716c
@@ -0,0 +1,39 @@
+* Freescale IMX8MN IOMUX Controller
+
+Please refer to fsl,imx-pinctrl.txt and pinctrl-bindings.txt in this directory
+for common binding part and usage.
+
+Required properties:
+- compatible: "fsl,imx8mn-iomuxc"
+- reg: should contain the base physical address and size of the iomuxc
+  registers.
+
+Required properties in sub-nodes:
+- fsl,pins: each entry consists of 6 integers and represents the mux and config
+  setting for one pin.  The first 5 integers <mux_reg conf_reg input_reg mux_val
+  input_val> are specified using a PIN_FUNC_ID macro, which can be found in
+  <arch/arm64/boot/dts/freescale/imx8mn-pinfunc.h>. The last integer CONFIG is
+  the pad setting value like pull-up on this pin. Please refer to i.MX8M Nano
+  Reference Manual for detailed CONFIG settings.
+
+Examples:
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+};
+
+iomuxc: pinctrl@30330000 {
+        compatible = "fsl,imx8mn-iomuxc";
+        reg = <0x0 0x30330000 0x0 0x10000>;
+
+        pinctrl_uart1: uart1grp {
+                fsl,pins = <
+			MX8MN_IOMUXC_UART1_RXD_UART1_DCE_RX	0x140
+			MX8MN_IOMUXC_UART1_TXD_UART1_DCE_TX	0x140
+			MX8MN_IOMUXC_UART3_RXD_UART1_DCE_CTS_B	0x140
+			MX8MN_IOMUXC_UART3_TXD_UART1_DCE_RTS_B	0x140
+			MX8MN_IOMUXC_SD1_DATA4_GPIO2_IO6	0x19
+                >;
+        };
+};
arch/arm64/boot/dts/freescale/imx8mn-pinfunc.h new file +646 -0

646 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/3 pinctrl: freescale: Add i.MX8MN pinctrl driver support

From: Anson Huang <[email protected]>

Add the pinctrl driver support for i.MX8MN.

---
 drivers/pinctrl/freescale/Kconfig          |   7 +
 drivers/pinctrl/freescale/Makefile         |   1 +
 drivers/pinctrl/freescale/pinctrl-imx8mn.c | 348 +++++++++++++++++++++++++++++
 3 files changed, 356 insertions(+)
 create mode 100644 drivers/pinctrl/freescale/pinctrl-imx8mn.c
drivers/pinctrl/freescale/Kconfig +7 -0
index aeab0d9..4ff52fa 100644
@@ -123,6 +123,13 @@ config PINCTRL_IMX7ULP
 	help
 	  Say Y here to enable the imx7ulp pinctrl driver
 
+config PINCTRL_IMX8MN
+	bool "IMX8MN pinctrl driver"
+	depends on ARCH_MXC && ARM64
+	select PINCTRL_IMX
+	help
+	  Say Y here to enable the imx8mn pinctrl driver
+
 config PINCTRL_IMX8MM
 	bool "IMX8MM pinctrl driver"
 	depends on ARCH_MXC && ARM64
drivers/pinctrl/freescale/Makefile +1 -0
index 02020a7..18225da 100644
@@ -18,6 +18,7 @@ obj-$(CONFIG_PINCTRL_IMX6SX)	+= pinctrl-imx6sx.o
 obj-$(CONFIG_PINCTRL_IMX6UL)	+= pinctrl-imx6ul.o
 obj-$(CONFIG_PINCTRL_IMX7D)	+= pinctrl-imx7d.o
 obj-$(CONFIG_PINCTRL_IMX7ULP)	+= pinctrl-imx7ulp.o
+obj-$(CONFIG_PINCTRL_IMX8MN)	+= pinctrl-imx8mn.o
 obj-$(CONFIG_PINCTRL_IMX8MM)	+= pinctrl-imx8mm.o
 obj-$(CONFIG_PINCTRL_IMX8MQ)	+= pinctrl-imx8mq.o
 obj-$(CONFIG_PINCTRL_IMX8QM)	+= pinctrl-imx8qm.o
drivers/pinctrl/freescale/pinctrl-imx8mn.c new file +348 -0

348 lines not on this page · raw message

Signature · 1 line
2.7.4
maintainer Acked-by on v1 2/3
#2 lore raw

RE: [PATCH 2/3] pinctrl: freescale: Add i.MX8MN pinctrl driver support

Quoted 21 lines

From: [email protected] [mailto:[email protected]]
Sent: Thursday, May 30, 2019 11:06 AM

From: Anson Huang <[email protected]>

Add the pinctrl driver support for i.MX8MN.

---
 drivers/pinctrl/freescale/Kconfig          |   7 +
 drivers/pinctrl/freescale/Makefile         |   1 +
 drivers/pinctrl/freescale/pinctrl-imx8mn.c | 348
+++++++++++++++++++++++++++++
 3 files changed, 356 insertions(+)
 create mode 100644 drivers/pinctrl/freescale/pinctrl-imx8mn.c
drivers/pinctrl/freescale/Kconfig +0 -0
index aeab0d9..4ff52fa 100644

drivers/pinctrl/freescale/Kconfig config PINCTRL_IMX7ULP · line 126

Quoted 4 lines
drivers/pinctrl/freescale/Kconfig +1 -0
@@ -123,6 +123,13 @@ config PINCTRL_IMX7ULP
 	help
 	  Say Y here to enable the imx7ulp pinctrl driver
 
+config PINCTRL_IMX8MN

Nitpick: this seems should be under imx8mm if in alphabetical order

Quoted 15 lines
drivers/pinctrl/freescale/Kconfig +6 -0
+	bool "IMX8MN pinctrl driver"
+	depends on ARCH_MXC && ARM64
+	select PINCTRL_IMX
+	help
+	  Say Y here to enable the imx8mn pinctrl driver
+
 config PINCTRL_IMX8MM
 	bool "IMX8MM pinctrl driver"
 	depends on ARCH_MXC && ARM64
drivers/pinctrl/freescale/Makefile +0 -0
index 02020a7..18225da 100644

drivers/pinctrl/freescale/Makefile obj-$(CONFIG_PINCTRL_IMX6SX) += pinctrl-imx6sx.o · line 21

Quoted 4 lines
drivers/pinctrl/freescale/Makefile +1 -0
@@ -18,6 +18,7 @@ obj-$(CONFIG_PINCTRL_IMX6SX)	+= pinctrl-imx6sx.o
 obj-$(CONFIG_PINCTRL_IMX6UL)	+= pinctrl-imx6ul.o
 obj-$(CONFIG_PINCTRL_IMX7D)	+= pinctrl-imx7d.o
 obj-$(CONFIG_PINCTRL_IMX7ULP)	+= pinctrl-imx7ulp.o
+obj-$(CONFIG_PINCTRL_IMX8MN)	+= pinctrl-imx8mn.o

ditto

Quoted 10 lines
drivers/pinctrl/freescale/Makefile +0 -0
 obj-$(CONFIG_PINCTRL_IMX8MM)	+= pinctrl-imx8mm.o
 obj-$(CONFIG_PINCTRL_IMX8MQ)	+= pinctrl-imx8mq.o
 obj-$(CONFIG_PINCTRL_IMX8QM)	+= pinctrl-imx8qm.o
drivers/pinctrl/freescale/pinctrl-imx8mn.c new file +0 -0
new file mode 100644
index 0000000..67161df

drivers/pinctrl/freescale/pinctrl-imx8mn.c line 8

Quoted 8 lines
drivers/pinctrl/freescale/pinctrl-imx8mn.c new file +8 -0
@@ -0,0 +1,348 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright 2018-2019 NXP
+ */
+
+#include <linux/err.h>
+#include <linux/init.h>
+#include <linux/of_device.h>

This could be of.h

Otherwise:

Regards
Dong Aisheng

#3 lore raw

PATCH 3/3 arm64: defconfig: Select CONFIG_PINCTRL_IMX8MN by default

In reply to [email protected]

From: Anson Huang <[email protected]>

Enable CONFIG_PINCTRL_IMX8MN by default to support i.MX8MN pinctrl driver.

---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index 7c7b6b5..8d4f25c 100644
@@ -373,6 +373,7 @@ CONFIG_SPI_SUN6I=y
 CONFIG_SPMI=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_PINCTRL_MAX77620=y
+CONFIG_PINCTRL_IMX8MN=y
 CONFIG_PINCTRL_IMX8MM=y
 CONFIG_PINCTRL_IMX8MQ=y
 CONFIG_PINCTRL_IMX8QXP=y
Signature · 1 line
2.7.4
maintainer Reviewed-by on v1 3/3
#4 lore raw

RE: [PATCH 3/3] arm64: defconfig: Select CONFIG_PINCTRL_IMX8MN by default

Quoted 7 lines

From: [email protected] [mailto:[email protected]]
Sent: Thursday, May 30, 2019 11:06 AM

Enable CONFIG_PINCTRL_IMX8MN by default to support i.MX8MN pinctrl driver.

Nitpick: please check the alphabetical order,
Otherwise:

Regards
Dong Aisheng

Quoted 18 lines
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -1
index 7c7b6b5..8d4f25c 100644
@@ -373,6 +373,7 @@ CONFIG_SPI_SUN6I=y
 CONFIG_SPMI=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_PINCTRL_MAX77620=y
+CONFIG_PINCTRL_IMX8MN=y
 CONFIG_PINCTRL_IMX8MM=y
 CONFIG_PINCTRL_IMX8MQ=y
 CONFIG_PINCTRL_IMX8QXP=y
--

2.7.4

maintainer Reviewed-by on v1 3/3
#5 lore raw

RE: [PATCH 3/3] arm64: defconfig: Select CONFIG_PINCTRL_IMX8MN by default

In reply to [email protected]
Quoted 7 lines

From: [email protected] [mailto:[email protected]]
Sent: Thursday, May 30, 2019 11:06 AM

Enable CONFIG_PINCTRL_IMX8MN by default to support i.MX8MN pinctrl driver.

Nitpick: please check the alphabetical order,
Otherwise:

Regards
Dong Aisheng

Quoted 18 lines
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -1
index 7c7b6b5..8d4f25c 100644
@@ -373,6 +373,7 @@ CONFIG_SPI_SUN6I=y
 CONFIG_SPMI=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_PINCTRL_MAX77620=y
+CONFIG_PINCTRL_IMX8MN=y
 CONFIG_PINCTRL_IMX8MM=y
 CONFIG_PINCTRL_IMX8MQ=y
 CONFIG_PINCTRL_IMX8QXP=y
--

2.7.4

#6 lore raw
In reply to [email protected]
Quoted 5 lines · On Thu, May 30, 2019 at 5:04 AM <[email protected]> wrote:

From: Anson Huang <[email protected]>

Add binding doc for i.MX8MN pinctrl driver.

Looks mostly OK to me, but I'd like the maintainers to review, so Dong et al please look at this!

Quoted 2 lines

+Required properties:
+- compatible: "fsl,imx8mn-iomuxc"

So should this not be "nxp,imx8mn-iomuxc" or "nxp,freescale-imx8mn-iomuxc" or something these days? The vendor name is nxp is it not.

I was complaining to the DT maintainers at one point that these companies seem to buy each other left and right so this vendor nomenclature is dubious, but I guess at least it should reflect the vendor that produced the chip or something.

If everyone is happy with "fsl,*" I will not complain though. (i.e. if the maintainers ACK it.)

Yours,
Linus Walleij

maintainer Acked-by
#7 lore raw
Quoted 21 lines

From: Linus Walleij [mailto:[email protected]]
Sent: Saturday, June 8, 2019 5:04 AM

Quoted 5 lines · On Thu, May 30, 2019 at 5:04 AM <[email protected]> wrote:

From: Anson Huang <[email protected]>

Add binding doc for i.MX8MN pinctrl driver.

Looks mostly OK to me, but I'd like the maintainers to review, so Dong et al please look at this!

Quoted 2 lines

+Required properties:
+- compatible: "fsl,imx8mn-iomuxc"

So should this not be "nxp,imx8mn-iomuxc"
or "nxp,freescale-imx8mn-iomuxc" or something these days? The vendor name is nxp is it not.

Quoted 7 lines

I was complaining to the DT maintainers at one point that these companies seem to buy each other left and right so this vendor nomenclature is dubious, but I guess at least it should reflect the vendor that produced the chip or something.

If everyone is happy with "fsl,*" I will not complain though. (i.e. if the maintainers ACK it.)

We preferred to keep "fsl,*" for Freescale i.MX product line according to last discussion. And we already did this way for most i.MX devices.

So:

(Rob, please let us know if you have different idea)

Regards
Dong Aisheng

Quoted 3 lines

Yours,
Linus Walleij

#8 lore raw
Quoted 26 lines · Aisheng Dong
Quoted 26 lines

From: Linus Walleij [mailto:[email protected]]
Sent: Saturday, June 8, 2019 5:04 AM

Quoted 5 lines · On Thu, May 30, 2019 at 5:04 AM <[email protected]> wrote:

From: Anson Huang <[email protected]>

Add binding doc for i.MX8MN pinctrl driver.

Looks mostly OK to me, but I'd like the maintainers to review, so Dong et al please look at this!

Quoted 2 lines

+Required properties:
+- compatible: "fsl,imx8mn-iomuxc"

So should this not be "nxp,imx8mn-iomuxc"
or "nxp,freescale-imx8mn-iomuxc" or something these days? The vendor name is nxp is it not.

I was complaining to the DT maintainers at one point that these companies seem to buy each other left and right so this vendor nomenclature is dubious, but I guess at least it should reflect the vendor that produced the chip or something.

Quoted 5 lines
Quoted 2 lines

If everyone is happy with "fsl,*" I will not complain though. (i.e. if the maintainers ACK it.)

We preferred to keep "fsl,*" for Freescale i.MX product line according to last discussion. And we already did this way for most i.MX devices.

+1

We do not see serious problem with 'fsl' prefix, so would rather stay with it.

Shawn