Skip to contentSkip to conversation

ARM: dts: vf610: make pinctrl nodes board specific

PATCH New Shawn Guo 3 participants 10 messages Dec 9, 2013 – Dec 16, 2013 Device tree bindings

lore
Share & tools
lore

Shawn Guo

author
#0 lore raw

PATCH 1/1 ARM: dts: vf610: make pinctrl nodes board specific

Currently, all pinctrl setting nodes are defined in <soc>.dtsi, so that boards that share the same pinctrl setting do not have to define it time and time again in <board>.dts. However, along with the devices and use cases being added continuously, the pinctrl setting nodes under iomuxc becomes more than expected. This bloats device tree blob for particular board unnecessarily since only a small subset of those pinctrl setting nodes will be used by the board. It impacts not only the DTB file size but also the run-time device tree lookup efficiency.

The patch provides a solution to avoid this device tree bloating problem while still keeping boards share the common pinctrl setting data by using DTC macro support. It creates <soc>-pingrp.h and move all those pinctrl setting data into there as macro definitions. The <board>.dts will instead define the pinctrl setting nodes that are necessary for the board by referring to the macros in <soc>-pingrp.h, so that only the pinctrl setting data that will be used by the board will get compiled into the DTB for the board.

With the changes, the pinctrl setting nodes becomes local to particular board, and it makes no sense to continue numbering the setting for given peripheral. Thus, all the pinctrl phandler name gets updated to have only peripheral name in there.

---
This should have been done in the patch series [1], but somehow got missed in the first place. So add one more patch to take care of VF610.

[1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/277649

 arch/arm/boot/dts/vf610-cosmic.dts |   16 +++-
 arch/arm/boot/dts/vf610-twr.dts    |   34 +++++--
 arch/arm/boot/dts/vf610.dtsi       |  172 +-----------------------------------
 3 files changed, 44 insertions(+), 178 deletions(-)
arch/arm/boot/dts/vf610-cosmic.dts +14 -2
index c42e4f9..432960a 100644
@@ -36,12 +36,24 @@
 &fec1 {
 	phy-mode = "rmii";
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_fec1_1>;
+	pinctrl-0 = <&pinctrl_fec1>;
 	status = "okay";
 };
 
+&iomuxc {
+	vf610-cosmic {
+		pinctrl_fec1: fec1grp {
+			fsl,pins = <VF610_FEC1_PINGRP1>;
+		};
+
+		pinctrl_uart1: uart1grp {
+			fsl,pins = <VF610_UART1_PINGRP1>;
+		};
+	};
+};
+
 &uart1 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_uart1_1>;
+	pinctrl-0 = <&pinctrl_uart1>;
 	status = "okay";
 };
arch/arm/boot/dts/vf610-twr.dts +29 -5
index c8047ca..80db14e 100644
@@ -39,7 +39,7 @@
 &dspi0 {
 	bus-num = <0>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_dspi0_1>;
+	pinctrl-0 = <&pinctrl_dspi0>;
 	status = "okay";
 
 	sflash: at26df081a at 0 {
@@ -56,26 +56,50 @@
 &fec0 {
 	phy-mode = "rmii";
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_fec0_1>;
+	pinctrl-0 = <&pinctrl_fec0>;
 	status = "okay";
 };
 
 &fec1 {
 	phy-mode = "rmii";
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_fec1_1>;
+	pinctrl-0 = <&pinctrl_fec1>;
 	status = "okay";
 };
 
 &i2c0 {
 	clock-frequency = <100000>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_i2c0_1>;
+	pinctrl-0 = <&pinctrl_i2c0>;
 	status = "okay";
 };
 
+&iomuxc {
+	vf610-twr {
+		pinctrl_dspi0: dspi0grp {
+			fsl,pins = <VF610_DSPI0_PINGRP1>;
+		};
+
+		pinctrl_fec0: fec0grp {
+			fsl,pins = <VF610_FEC0_PINGRP1>;
+		};
+
+		pinctrl_fec1: fec1grp {
+			fsl,pins = <VF610_FEC1_PINGRP1>;
+		};
+
+		pinctrl_i2c0: i2c0grp {
+			fsl,pins = <VF610_I2C0_PINGRP1>;
+		};
+
+		pinctrl_uart1: uart1grp {
+			fsl,pins = <VF610_UART1_PINGRP1>;
+		};
+	};
+};
+
 &uart1 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_uart1_1>;
+	pinctrl-0 = <&pinctrl_uart1>;
 	status = "okay";
 };
arch/arm/boot/dts/vf610.dtsi +1 -171

184 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ARM: dts: vf610: make pinctrl nodes board specific

From: Shawn Guo <[email protected]>
Data: Monday, December 09, 2013 2:51 PM + 800

Quoted 54 lines

To: linux-arm-kernel at lists.infradead.org
Cc: Lu Jingchang-B35083; Duan Fugang-B38611; Shawn Guo
Subject: [PATCH] ARM: dts: vf610: make pinctrl nodes board specific

Currently, all pinctrl setting nodes are defined in <soc>.dtsi, so that boards that share the same pinctrl setting do not have to define it time and time again in <board>.dts. However, along with the devices and use cases being added continuously, the pinctrl setting nodes under iomuxc becomes more than expected. This bloats device tree blob for particular board unnecessarily since only a small subset of those pinctrl setting nodes will be used by the board. It impacts not only the DTB file size but also the run-time device tree lookup efficiency.

The patch provides a solution to avoid this device tree bloating problem while still keeping boards share the common pinctrl setting data by using DTC macro support. It creates <soc>-pingrp.h and move all those pinctrl setting data into there as macro definitions. The <board>.dts will instead define the pinctrl setting nodes that are necessary for the board by referring to the macros in <soc>-pingrp.h, so that only the pinctrl setting data that will be used by the board will get compiled into the DTB for the board.

With the changes, the pinctrl setting nodes becomes local to particular board, and it makes no sense to continue numbering the setting for given peripheral. Thus, all the pinctrl phandler name gets updated to have only peripheral name in there.

---
This should have been done in the patch series [1], but somehow got missed in the first place. So add one more patch to take care of VF610.

[1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/277649

arch/arm/boot/dts/vf610-cosmic.dts |   16 +++-
arch/arm/boot/dts/vf610-twr.dts    |   34 +++++--
arch/arm/boot/dts/vf610.dtsi       |  172 +-----------------------------------
3 files changed, 44 insertions(+), 178 deletions(-)
arch/arm/boot/dts/vf610- renamed from arch/arm/boot/dts/vf610-cosmic.dts +0 -0

cosmic.dts
index c42e4f9..432960a 100644

arch/arm/boot/dts/vf610-cosmic.dts +3 -1
@@ -36,12 +36,24 @@
 &fec1 {
 	phy-mode = "rmii";
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_fec1_1>;
+	pinctrl-0 = <&pinctrl_fec1>;
 	status = "okay";
 };
 
+&iomuxc {
+	vf610-cosmic {

arch/arm/boot/dts/vf610-cosmic.dts line 54

Quoted 10 lines
arch/arm/boot/dts/vf610-cosmic.dts +10 -0
+		pinctrl_fec1: fec1grp {
+			fsl,pins = <VF610_FEC1_PINGRP1>;
+		};
+
+		pinctrl_uart1: uart1grp {
+			fsl,pins = <VF610_UART1_PINGRP1>;
+		};
+	};
+};
+

Keep things in alphabetical order...

arch/arm/boot/dts/vf610-cosmic.dts line 59

Quoted 6 lines
arch/arm/boot/dts/vf610-cosmic.dts +1 -1
 &uart1 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_uart1_1>;
+	pinctrl-0 = <&pinctrl_uart1>;
 	status = "okay";
 };

Other is fine.

author
#2 lore raw

PATCH 1/1 ARM: dts: vf610: make pinctrl nodes board specific

Quoted 9 lines · fugang.duan at freescale.com
Quoted 9 lines
arch/arm/boot/dts/vf610-cosmic.dts +1 -1
@@ -36,12 +36,24 @@
 &fec1 {
 	phy-mode = "rmii";
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_fec1_1>;
+	pinctrl-0 = <&pinctrl_fec1>;
 	status = "okay";
 };
 
Quoted 13 lines

arch/arm/boot/dts/vf610-cosmic.dts line 54

Quoted 12 lines
arch/arm/boot/dts/vf610-cosmic.dts +12 -0
+&iomuxc {
+	vf610-cosmic {
+		pinctrl_fec1: fec1grp {
+			fsl,pins = <VF610_FEC1_PINGRP1>;
+		};
+
+		pinctrl_uart1: uart1grp {
+			fsl,pins = <VF610_UART1_PINGRP1>;
+		};
+	};
+};
+

Keep things in alphabetical order...

Hmm, what is not in alphabetic order?

Shawn

Quoted 7 lines
Quoted 7 lines
arch/arm/boot/dts/vf610-cosmic.dts +1 -1
 &uart1 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_uart1_1>;
+	pinctrl-0 = <&pinctrl_uart1>;
 	status = "okay";
 };
#3 lore raw

PATCH 1/1 ARM: dts: vf610: make pinctrl nodes board specific

From: Shawn Guo [mailto:shawn.guo at linaro.org]
Data: Monday, December 09, 2013 4:02 PM

Quoted 28 lines

To: Duan Fugang-B38611
Cc: linux-arm-kernel at lists.infradead.org; Lu Jingchang-B35083
Subject: Re: [PATCH] ARM: dts: vf610: make pinctrl nodes board specific

Quoted 9 lines · fugang.duan at freescale.com
Quoted 9 lines
arch/arm/boot/dts/vf610-cosmic.dts +1 -1
@@ -36,12 +36,24 @@
 &fec1 {
 	phy-mode = "rmii";
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_fec1_1>;
+	pinctrl-0 = <&pinctrl_fec1>;
 	status = "okay";
 };
 
Quoted 13 lines

arch/arm/boot/dts/vf610-cosmic.dts line 54

Quoted 12 lines
arch/arm/boot/dts/vf610-cosmic.dts +12 -0
+&iomuxc {
+	vf610-cosmic {
+		pinctrl_fec1: fec1grp {
+			fsl,pins = <VF610_FEC1_PINGRP1>;
+		};
+
+		pinctrl_uart1: uart1grp {
+			fsl,pins = <VF610_UART1_PINGRP1>;
+		};
+	};
+};
+

Keep things in alphabetical order...

Quoted 3 lines

Hmm, what is not in alphabetic order?

Shawn

Hehe, my eyes deceive me.

Quoted 8 lines
Quoted 8 lines

arch/arm/boot/dts/vf610-cosmic.dts line 59

Quoted 8 lines
arch/arm/boot/dts/vf610-cosmic.dts +1 -1
 &uart1 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_uart1_1>;
+	pinctrl-0 = <&pinctrl_uart1>;
 	status = "okay";
 };
author
#4 lore raw

PATCH v2 1/1 ARM: dts: vf610: make pinctrl nodes board specific

In reply to Shawn Guo

Currently, all pinctrl setting nodes are defined in <soc>.dtsi, so that boards that share the same pinctrl setting do not have to define it time and time again in <board>.dts. However, along with the devices and use cases being added continuously, the pinctrl setting nodes under iomuxc becomes more than expected. This bloats device tree blob for particular board unnecessarily since only a small subset of those pinctrl setting nodes will be used by the board. It impacts not only the DTB file size but also the run-time device tree lookup efficiency.

The patch provides a solution to avoid this device tree bloating problem while still keeping boards share the common pinctrl setting data by using DTC macro support. It creates <soc>-pingrp.h and move all those pinctrl setting data into there as macro definitions. The <board>.dts will instead define the pinctrl setting nodes that are necessary for the board by referring to the macros in <soc>-pingrp.h, so that only the pinctrl setting data that will be used by the board will get compiled into the DTB for the board.

With the changes, the pinctrl setting nodes becomes local to particular board, and it makes no sense to continue numbering the setting for given peripheral. Thus, all the pinctrl phandler name gets updated to have only peripheral name in there.

---
Changes since v1:
The vf610-pingrp.h was missed from the v1 patch, add it.

 arch/arm/boot/dts/vf610-cosmic.dts |   16 +++-
 arch/arm/boot/dts/vf610-pingrp.h   |  127 ++++++++++++++++++++++++++
 arch/arm/boot/dts/vf610-twr.dts    |   34 +++++--
 arch/arm/boot/dts/vf610.dtsi       |  172 +-----------------------------------
 4 files changed, 171 insertions(+), 178 deletions(-)
 create mode 100644 arch/arm/boot/dts/vf610-pingrp.h
arch/arm/boot/dts/vf610-cosmic.dts +14 -2
index c42e4f9..432960a 100644
@@ -36,12 +36,24 @@
 &fec1 {
 	phy-mode = "rmii";
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_fec1_1>;
+	pinctrl-0 = <&pinctrl_fec1>;
 	status = "okay";
 };
 
+&iomuxc {
+	vf610-cosmic {
+		pinctrl_fec1: fec1grp {
+			fsl,pins = <VF610_FEC1_PINGRP1>;
+		};
+
+		pinctrl_uart1: uart1grp {
+			fsl,pins = <VF610_UART1_PINGRP1>;
+		};
+	};
+};
+
 &uart1 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_uart1_1>;
+	pinctrl-0 = <&pinctrl_uart1>;
 	status = "okay";
 };
arch/arm/boot/dts/vf610-pingrp.h new file +127 -0

127 lines not on this page · raw message

arch/arm/boot/dts/vf610-twr.dts +29 -5
index c8047ca..80db14e 100644
@@ -39,7 +39,7 @@
 &dspi0 {
 	bus-num = <0>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_dspi0_1>;
+	pinctrl-0 = <&pinctrl_dspi0>;
 	status = "okay";
 
 	sflash: at26df081a at 0 {
@@ -56,26 +56,50 @@
 &fec0 {
 	phy-mode = "rmii";
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_fec0_1>;
+	pinctrl-0 = <&pinctrl_fec0>;
 	status = "okay";
 };
 
 &fec1 {
 	phy-mode = "rmii";
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_fec1_1>;
+	pinctrl-0 = <&pinctrl_fec1>;
 	status = "okay";
 };
 
 &i2c0 {
 	clock-frequency = <100000>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_i2c0_1>;
+	pinctrl-0 = <&pinctrl_i2c0>;
 	status = "okay";
 };
 
+&iomuxc {
+	vf610-twr {
+		pinctrl_dspi0: dspi0grp {
+			fsl,pins = <VF610_DSPI0_PINGRP1>;
+		};
+
+		pinctrl_fec0: fec0grp {
+			fsl,pins = <VF610_FEC0_PINGRP1>;
+		};
+
+		pinctrl_fec1: fec1grp {
+			fsl,pins = <VF610_FEC1_PINGRP1>;
+		};
+
+		pinctrl_i2c0: i2c0grp {
+			fsl,pins = <VF610_I2C0_PINGRP1>;
+		};
+
+		pinctrl_uart1: uart1grp {
+			fsl,pins = <VF610_UART1_PINGRP1>;
+		};
+	};
+};
+
 &uart1 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_uart1_1>;
+	pinctrl-0 = <&pinctrl_uart1>;
 	status = "okay";
 };
arch/arm/boot/dts/vf610.dtsi +1 -171

184 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#5 lore raw

PATCH v2 1/1 ARM: dts: vf610: make pinctrl nodes board specific

Quoted 10 lines · shawn.guo at linaro.org

Currently, all pinctrl setting nodes are defined in <soc>.dtsi, so that boards that share the same pinctrl setting do not have to define it time and time again in <board>.dts. However, along with the devices and use cases being added continuously, the pinctrl setting nodes under iomuxc becomes more than expected. This bloats device tree blob for particular board unnecessarily since only a small subset of those pinctrl setting nodes will be used by the board. It impacts not only the DTB file size but also the run-time device tree lookup efficiency.

arch/arm/boot/dts/vf610-pingrp.h | 127 ++++++++++++++++++++++++++

Thanks for including this file. I was looking a NAND flash and the common configuration are 8/16 bit. This solution is better as,

   #define VF610_NFC_PINGRP_8BIT \
     ...

   #define VF610_NFC_PINGRP_16BIT \
     VF610_NFC_PINGRP_8BIT        \
     VF610_PAD_PTD31__NF_IO15	0x28df \
     VF610_PAD_PTD30__NF_IO14	0x28df \
     VF610_PAD_PTD29__NF_IO13	0x28df \
     ...

It makes the board file look more straight forward,

   &nfc {  /* 16 bit with group in group */
           /* ... */
           pinctrl-names = "default";
           pinctrl-0 = <&pinctrl_nfc_16bit>;
   };

Versus,

   &nfc {  /* old way _OR_ separate groups */
           /* ... */
           pinctrl-names = "default";
           pinctrl-0 = <&pinctrl_nfc_8bit>; /* 8-bit */
           pinctrl-1 = <&pinctrl_nfc_16_bit>; /* 16-bit extras */
   };

Although for a 'multi-machine' configuration, the sharing maybe appropriate? But I guess that is your point; it is not helpful.

Is a group within a group appropriate in vf610-pingrp.h? Maybe a comment?

Regards,
Bill Pringlemeir.

#6 lore raw

PATCH v2 1/1 ARM: dts: vf610: make pinctrl nodes board specific

Quoted 11 lines · bpringlemeir at nbsps.com
Quoted 8 lines · shawn.guo at linaro.org

Currently, all pinctrl setting nodes are defined in <soc>.dtsi, so that boards that share the same pinctrl setting do not have to define it time and time again in <board>.dts. However, along with the devices and use cases being added continuously, the pinctrl setting nodes under iomuxc becomes more than expected. This bloats device tree blob for particular board unnecessarily since only a small subset of those pinctrl setting nodes will be used by the board. It impacts not only the DTB file size but also the run-time device tree lookup efficiency.

Quoted 4 lines
Quoted 1 line

arch/arm/boot/dts/vf610-pingrp.h | 127 ++++++++++++++++++++++++++

Thanks for including this file. I was looking a NAND flash and the common configuration are 8/16 bit. This solution is better as,

Actually, this is a generic file but we have,

+#define VF610_SAI2_PINGRP1 \
+ VF610_PAD_PTA16__SAI2_TX_BCLK 0x02ed \
+ VF610_PAD_PTA18__SAI2_TX_DATA 0x02ee \
+ VF610_PAD_PTA19__SAI2_TX_SYNC 0x02ed \
+ VF610_PAD_PTA21__SAI2_RX_BCLK 0x02ed \
+ VF610_PAD_PTA22__SAI2_RX_DATA 0x02ed \
+ VF610_PAD_PTA23__SAI2_RX_SYNC 0x02ed \
+ VF610_PAD_PTB18__EXT_AUDIO_MCLK 0x02ed

The SAI might not use 'VF610_PAD_PTB18__EXT_AUDIO_MCLK' nor either 'VF610_PAD_PTA16__SAI2_TX_BCLK' or 'VF610_PAD_PTA21__SAI2_RX_BCLK'. There are some pins that are absolutely needed for a module to function and then there are some optional pins.

That said, this is nothing that you have changed. It was like this to begin with in the generic 'vf610.dtsi' file.

For instance some designs may have NAND flash CS0 and CS1 and other may only include one (or they have no NAND at all). Anything that uses the NAND flash driver needs at least,

	VF610_PAD_PTD23__NF_IO7		0x28df
	VF610_PAD_PTD22__NF_IO6		0x28df
	VF610_PAD_PTD21__NF_IO5		0x28df
	VF610_PAD_PTD20__NF_IO4		0x28df
	VF610_PAD_PTD19__NF_IO3		0x28df
	VF610_PAD_PTD18__NF_IO2		0x28df
	VF610_PAD_PTD17__NF_IO1		0x28df
	VF610_PAD_PTD16__NF_IO0		0x28df
	VF610_PAD_PTB24__NF_WE_B	0x28c2
	VF610_PAD_PTB27__NF_RE_B	0x28c2
	VF610_PAD_PTC26__NF_RB_B	0x280d
	VF610_PAD_PTC27__NF_ALE		0x28c2
	VF610_PAD_PTC28__NF_CLE		0x28c2

and one of,

	VF610_PAD_PTB25__NF_CE0_B	0x28c2
        VF610_PAD_PTB26__NF_CE1_B	0x28c2

For the SAI, I am pretty sure that there are multiple master clocks possible and that for synchronous modes, only one TX or RX clk is needed and possibly the SYNC as well (I am thinking I2S). If these are generic definitions for any board, then maybe they should be separated more or the group should be 'VF610_TWR_SAI2_PINGRP1'; Ie, particular to the machine.

Anyways, this is a pre-existing issue.

Fwiw,
Bill Pringlemeir.

author
#7 lore raw

PATCH v2 1/1 ARM: dts: vf610: make pinctrl nodes board specific

Quoted 29 lines · Bill Pringlemeir
Quoted 11 lines · bpringlemeir at nbsps.com
Quoted 8 lines · shawn.guo at linaro.org

Currently, all pinctrl setting nodes are defined in <soc>.dtsi, so that boards that share the same pinctrl setting do not have to define it time and time again in <board>.dts. However, along with the devices and use cases being added continuously, the pinctrl setting nodes under iomuxc becomes more than expected. This bloats device tree blob for particular board unnecessarily since only a small subset of those pinctrl setting nodes will be used by the board. It impacts not only the DTB file size but also the run-time device tree lookup efficiency.

Quoted 4 lines
Quoted 1 line

arch/arm/boot/dts/vf610-pingrp.h | 127 ++++++++++++++++++++++++++

Thanks for including this file. I was looking a NAND flash and the common configuration are 8/16 bit. This solution is better as,

Actually, this is a generic file but we have,

arch/arm/boot/dts/vf610-pingrp.h new file +8 -0
+#define VF610_SAI2_PINGRP1 \
+	VF610_PAD_PTA16__SAI2_TX_BCLK		0x02ed \
+	VF610_PAD_PTA18__SAI2_TX_DATA		0x02ee \
+	VF610_PAD_PTA19__SAI2_TX_SYNC		0x02ed \
+	VF610_PAD_PTA21__SAI2_RX_BCLK		0x02ed \
+	VF610_PAD_PTA22__SAI2_RX_DATA		0x02ed \
+	VF610_PAD_PTA23__SAI2_RX_SYNC		0x02ed \
+	VF610_PAD_PTB18__EXT_AUDIO_MCLK		0x02ed
Quoted 7 lines

The SAI might not use 'VF610_PAD_PTB18__EXT_AUDIO_MCLK' nor either 'VF610_PAD_PTA16__SAI2_TX_BCLK' or 'VF610_PAD_PTA21__SAI2_RX_BCLK'. There are some pins that are absolutely needed for a module to function and then there are some optional pins.

That said, this is nothing that you have changed. It was like this to begin with in the generic 'vf610.dtsi' file.

Yea, the PINGRP defined in vf610-pingrp.h should be generic rather than board specific. It seems that VF610_SAI2_PINGRP1 is used nowhere for now, so we can change it easily. Patch is welcomed.

Shawn

Quoted 35 lines

For instance some designs may have NAND flash CS0 and CS1 and other may only include one (or they have no NAND at all). Anything that uses the NAND flash driver needs at least,

	VF610_PAD_PTD23__NF_IO7		0x28df
	VF610_PAD_PTD22__NF_IO6		0x28df
	VF610_PAD_PTD21__NF_IO5		0x28df
	VF610_PAD_PTD20__NF_IO4		0x28df
	VF610_PAD_PTD19__NF_IO3		0x28df
	VF610_PAD_PTD18__NF_IO2		0x28df
	VF610_PAD_PTD17__NF_IO1		0x28df
	VF610_PAD_PTD16__NF_IO0		0x28df
	VF610_PAD_PTB24__NF_WE_B	0x28c2
	VF610_PAD_PTB27__NF_RE_B	0x28c2
	VF610_PAD_PTC26__NF_RB_B	0x280d
	VF610_PAD_PTC27__NF_ALE		0x28c2
	VF610_PAD_PTC28__NF_CLE		0x28c2

and one of,

	VF610_PAD_PTB25__NF_CE0_B	0x28c2
        VF610_PAD_PTB26__NF_CE1_B	0x28c2

For the SAI, I am pretty sure that there are multiple master clocks possible and that for synchronous modes, only one TX or RX clk is needed and possibly the SYNC as well (I am thinking I2S). If these are generic definitions for any board, then maybe they should be separated more or the group should be 'VF610_TWR_SAI2_PINGRP1'; Ie, particular to the machine.

Anyways, this is a pre-existing issue.

Fwiw,
Bill Pringlemeir.

#8 lore raw

PATCH v2 1/1 ARM: dts: vf610: make pinctrl nodes board specific

Quoted 10 lines · Bill Pringlemeir
Quoted 8 lines

The SAI might not use 'VF610_PAD_PTB18__EXT_AUDIO_MCLK' nor either 'VF610_PAD_PTA16__SAI2_TX_BCLK' or 'VF610_PAD_PTA21__SAI2_RX_BCLK'. There are some pins that are absolutely needed for a module to function and then there are some optional pins.

That said, this is nothing that you have changed. It was like this to begin with in the generic 'vf610.dtsi' file.

Quoted 3 lines · shawn.guo at linaro.org

Yea, the PINGRP defined in vf610-pingrp.h should be generic rather than board specific. It seems that VF610_SAI2_PINGRP1 is used nowhere for now, so we can change it easily. Patch is welcomed.

Alison Wang and Xiubo Li are working on this driver now,

http://mailman.alsa-project.org/pipermail/alsa-devel/2013-November/068060.html

I would wait until after that is accepted. I just wondered if my understanding was correct. Sorry, I missed all your IMX patches which probably explained this.

Thanks,
Bill Pringlemeir.

author
#9 lore raw

PATCH v2 1/1 ARM: dts: vf610: make pinctrl nodes board specific

In reply to Bill Pringlemeir
Quoted 26 lines · Bill Pringlemeir
Quoted 10 lines · shawn.guo at linaro.org

Currently, all pinctrl setting nodes are defined in <soc>.dtsi, so that boards that share the same pinctrl setting do not have to define it time and time again in <board>.dts. However, along with the devices and use cases being added continuously, the pinctrl setting nodes under iomuxc becomes more than expected. This bloats device tree blob for particular board unnecessarily since only a small subset of those pinctrl setting nodes will be used by the board. It impacts not only the DTB file size but also the run-time device tree lookup efficiency.

arch/arm/boot/dts/vf610-pingrp.h | 127 ++++++++++++++++++++++++++

Thanks for including this file. I was looking a NAND flash and the common configuration are 8/16 bit. This solution is better as,

   #define VF610_NFC_PINGRP_8BIT \
     ...

   #define VF610_NFC_PINGRP_16BIT \
     VF610_NFC_PINGRP_8BIT        \
     VF610_PAD_PTD31__NF_IO15	0x28df \
     VF610_PAD_PTD30__NF_IO14	0x28df \
     VF610_PAD_PTD29__NF_IO13	0x28df \
     ...
Quoted 1 line

It makes the board file look more straight forward,

Yes, I agree.

Quoted 16 lines
   &nfc {  /* 16 bit with group in group */
           /* ... */
           pinctrl-names = "default";
           pinctrl-0 = <&pinctrl_nfc_16bit>;
   };

Versus,

   &nfc {  /* old way _OR_ separate groups */
           /* ... */
           pinctrl-names = "default";
           pinctrl-0 = <&pinctrl_nfc_8bit>; /* 8-bit */
           pinctrl-1 = <&pinctrl_nfc_16_bit>; /* 16-bit extras */
   };
Quoted 5 lines

Although for a 'multi-machine' configuration, the sharing maybe appropriate? But I guess that is your point; it is not helpful.

Is a group within a group appropriate in vf610-pingrp.h? Maybe a comment?

Yes, it is. We already have something like that for USDHC in arch/arm/boot/dts/imx6qdl-pingrp.h if you're looking at my for-next branch.

Shawn