Skip to contentSkip to conversation

Initial Solid Run Cubox-i carrier-1 support

RFC PATCH New Russell King - ARM Linux 4 participants 12 messages Oct 5, 2013 – Oct 25, 2013

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

cover Initial Solid Run Cubox-i carrier-1 support

This is where I am at the moment with the SolidRun Cubox-i Carrier-1 board support with v3.12-rc3. What's included and tested here is:

- Consumer IR
- SD card slot
- AR8035 ethernet phy
- HDMI DDC I2C
- USB

What isn't included:
- RTC (commented out) since the chip is not fitted to developer boards yet
- HDMI output
- SPDIF output
- Audio output (codec not fitted)
- Wireless (not fitted)

I'm sending this out as an RFC as it's not at the point for merging, but those with the developer board should find it useful to get their boards up and running with recent kernels.

#1 lore raw

RFC PATCH 1/2 ARM: imx6qdl: provide pinctrl configurations for DAT3 pull-down

DAT3 needs to be pulled down if the USDHC card detection facility is used rather than GPIO mode. This is due to there being two methods to detect a card - one via the card detect signal, and the other via DAT3 being pulled up by the inserted card via an internal 50k resistor.

This requires DAT3 to be pulled down to hold the signal in the "no card" state, using a 100k pull down setting.

Provide pinctrl settings for this for all USDHC controllers.

---
 arch/arm/boot/dts/imx6qdl.dtsi |  104 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 104 insertions(+), 0 deletions(-)
arch/arm/boot/dts/imx6qdl.dtsi +104 -0
index ccd55c2..199fdab 100644
@@ -1138,6 +1138,32 @@
 							MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059
 						>;
 					};
+
+					pinctrl_usdhc1_1_dat3cd: usdhc1grp-3 {
+						fsl,pins = <
+							MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17059
+							MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10059
+							MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059
+							MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059
+							MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059
+							MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x13059
+							MX6QDL_PAD_NANDF_D0__SD1_DATA4 0x17059
+							MX6QDL_PAD_NANDF_D1__SD1_DATA5 0x17059
+							MX6QDL_PAD_NANDF_D2__SD1_DATA6 0x17059
+							MX6QDL_PAD_NANDF_D3__SD1_DATA7 0x17059
+						>;
+					};
+
+					pinctrl_usdhc1_2_dat3cd: usdhc1grp-4 {
+						fsl,pins = <
+							MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17059
+							MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10059
+							MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059
+							MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059
+							MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059
+							MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x13059
+						>;
+					};
 				};
 
 				usdhc2 {
@@ -1166,6 +1192,32 @@
 							MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
 						>;
 					};
+
+					pinctrl_usdhc2_1_dat3cd: usdhc2grp-3 {
+						fsl,pins = <
+							MX6QDL_PAD_SD2_CMD__SD2_CMD    0x17059
+							MX6QDL_PAD_SD2_CLK__SD2_CLK    0x10059
+							MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
+							MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
+							MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
+							MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059
+							MX6QDL_PAD_NANDF_D4__SD2_DATA4 0x17059
+							MX6QDL_PAD_NANDF_D5__SD2_DATA5 0x17059
+							MX6QDL_PAD_NANDF_D6__SD2_DATA6 0x17059
+							MX6QDL_PAD_NANDF_D7__SD2_DATA7 0x17059
+						>;
+					};
+
+					pinctrl_usdhc2_2_dat3cd: usdhc2grp-4 {
+						fsl,pins = <
+							MX6QDL_PAD_SD2_CMD__SD2_CMD    0x17059
+							MX6QDL_PAD_SD2_CLK__SD2_CLK    0x10059
+							MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
+							MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
+							MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
+							MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059
+						>;
+					};
 				};
 
 				usdhc3 {
@@ -1194,6 +1246,32 @@
 							MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
 						>;
 					};
+
+					pinctrl_usdhc3_1_dat3cd: usdhc3grp-3 {
+						fsl,pins = <
+							MX6QDL_PAD_SD3_CMD__SD3_CMD    0x17059
+							MX6QDL_PAD_SD3_CLK__SD3_CLK    0x10059
+							MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
+							MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
+							MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
+							MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x13059
+							MX6QDL_PAD_SD3_DAT4__SD3_DATA4 0x17059
+							MX6QDL_PAD_SD3_DAT5__SD3_DATA5 0x17059
+							MX6QDL_PAD_SD3_DAT6__SD3_DATA6 0x17059
+							MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059
+						>;
+					};
+
+					pinctrl_usdhc3_2_dat3cd: usdhc3grp-4 {
+						fsl,pins = <
+							MX6QDL_PAD_SD3_CMD__SD3_CMD    0x17059
+							MX6QDL_PAD_SD3_CLK__SD3_CLK    0x10059
+							MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
+							MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
+							MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
+							MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x13059
+						>;
+					};
 				};
 
 				usdhc4 {
@@ -1222,6 +1300,32 @@
 							MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
 						>;
 					};
+
+					pinctrl_usdhc4_1_dat3cd: usdhc4grp-3 {
+						fsl,pins = <
+							MX6QDL_PAD_SD4_CMD__SD4_CMD    0x17059
+							MX6QDL_PAD_SD4_CLK__SD4_CLK    0x10059
+							MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
+							MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
+							MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
+							MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x13059
+							MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
+							MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
+							MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
+							MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
+						>;
+					};
+
+					pinctrl_usdhc4_2_dat3cd: usdhc4grp-4 {
+						fsl,pins = <
+							MX6QDL_PAD_SD4_CMD__SD4_CMD    0x17059
+							MX6QDL_PAD_SD4_CLK__SD4_CLK    0x10059
+							MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
+							MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
+							MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
+							MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x13059
+						>;
+					};
 				};
 
 				weim {
Signature · 1 line
1.7.4.4
#2 lore raw

RFC PATCH 1/2 ARM: imx6qdl: provide pinctrl configurations for DAT3 pull-down

Quoted 28 lines · Russell King

DAT3 needs to be pulled down if the USDHC card detection facility is used rather than GPIO mode. This is due to there being two methods to detect a card - one via the card detect signal, and the other via DAT3 being pulled up by the inserted card via an internal 50k resistor.

This requires DAT3 to be pulled down to hold the signal in the "no card" state, using a 100k pull down setting.

Provide pinctrl settings for this for all USDHC controllers.

---
 arch/arm/boot/dts/imx6qdl.dtsi |  104 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 104 insertions(+), 0 deletions(-)
arch/arm/boot/dts/imx6qdl.dtsi +5 -0
index ccd55c2..199fdab 100644
@@ -1138,6 +1138,32 @@
 							MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059
 						>;
 					};
+
+					pinctrl_usdhc1_1_dat3cd: usdhc1grp-3 {
+						fsl,pins = <
+							MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17059
+							MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10059

arch/arm/boot/dts/imx6qdl.dtsi line 1155

Quoted 10 lines
arch/arm/boot/dts/imx6qdl.dtsi +10 -0
+							MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059
+							MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059
+							MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059
+							MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x13059
+							MX6QDL_PAD_NANDF_D0__SD1_DATA4 0x17059
+							MX6QDL_PAD_NANDF_D1__SD1_DATA5 0x17059
+							MX6QDL_PAD_NANDF_D2__SD1_DATA6 0x17059
+							MX6QDL_PAD_NANDF_D3__SD1_DATA7 0x17059
+						>;
+					};

I think we can redefine only pad DAT3 in pinctrl_usdhc1_1_dat3cd, and overwrite the DAT3 configuration in pinctrl_usdhc1_1 to save the redundant data of other pads, something like the following.

pinctrl_usdhc1_1_dat3cd: usdhc1grp-3 {
	fsl,pins = <
		MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x13059
	>;
};
&usdhc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1_1 &pinctrl_usdhc1_1_dat3cd>;
	...
	status = "okay";
};

Shawn

Quoted 121 lines
arch/arm/boot/dts/imx6qdl.dtsi +89 -0
+
+					pinctrl_usdhc1_2_dat3cd: usdhc1grp-4 {
+						fsl,pins = <
+							MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17059
+							MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10059
+							MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059
+							MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059
+							MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059
+							MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x13059
+						>;
+					};
 				};
 
 				usdhc2 {
@@ -1166,6 +1192,32 @@
 							MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
 						>;
 					};
+
+					pinctrl_usdhc2_1_dat3cd: usdhc2grp-3 {
+						fsl,pins = <
+							MX6QDL_PAD_SD2_CMD__SD2_CMD    0x17059
+							MX6QDL_PAD_SD2_CLK__SD2_CLK    0x10059
+							MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
+							MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
+							MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
+							MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059
+							MX6QDL_PAD_NANDF_D4__SD2_DATA4 0x17059
+							MX6QDL_PAD_NANDF_D5__SD2_DATA5 0x17059
+							MX6QDL_PAD_NANDF_D6__SD2_DATA6 0x17059
+							MX6QDL_PAD_NANDF_D7__SD2_DATA7 0x17059
+						>;
+					};
+
+					pinctrl_usdhc2_2_dat3cd: usdhc2grp-4 {
+						fsl,pins = <
+							MX6QDL_PAD_SD2_CMD__SD2_CMD    0x17059
+							MX6QDL_PAD_SD2_CLK__SD2_CLK    0x10059
+							MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
+							MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
+							MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
+							MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059
+						>;
+					};
 				};
 
 				usdhc3 {
@@ -1194,6 +1246,32 @@
 							MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
 						>;
 					};
+
+					pinctrl_usdhc3_1_dat3cd: usdhc3grp-3 {
+						fsl,pins = <
+							MX6QDL_PAD_SD3_CMD__SD3_CMD    0x17059
+							MX6QDL_PAD_SD3_CLK__SD3_CLK    0x10059
+							MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
+							MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
+							MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
+							MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x13059
+							MX6QDL_PAD_SD3_DAT4__SD3_DATA4 0x17059
+							MX6QDL_PAD_SD3_DAT5__SD3_DATA5 0x17059
+							MX6QDL_PAD_SD3_DAT6__SD3_DATA6 0x17059
+							MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059
+						>;
+					};
+
+					pinctrl_usdhc3_2_dat3cd: usdhc3grp-4 {
+						fsl,pins = <
+							MX6QDL_PAD_SD3_CMD__SD3_CMD    0x17059
+							MX6QDL_PAD_SD3_CLK__SD3_CLK    0x10059
+							MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
+							MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
+							MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
+							MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x13059
+						>;
+					};
 				};
 
 				usdhc4 {
@@ -1222,6 +1300,32 @@
 							MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
 						>;
 					};
+
+					pinctrl_usdhc4_1_dat3cd: usdhc4grp-3 {
+						fsl,pins = <
+							MX6QDL_PAD_SD4_CMD__SD4_CMD    0x17059
+							MX6QDL_PAD_SD4_CLK__SD4_CLK    0x10059
+							MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
+							MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
+							MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
+							MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x13059
+							MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
+							MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
+							MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
+							MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
+						>;
+					};
+
+					pinctrl_usdhc4_2_dat3cd: usdhc4grp-4 {
+						fsl,pins = <
+							MX6QDL_PAD_SD4_CMD__SD4_CMD    0x17059
+							MX6QDL_PAD_SD4_CLK__SD4_CLK    0x10059
+							MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
+							MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
+							MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
+							MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x13059
+						>;
+					};
 				};
 
 				weim {
Signature · 7 lines
1.7.4.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#3 lore raw

RFC PATCH 1/2 ARM: imx6qdl: provide pinctrl configurations for DAT3 pull-down

Quoted 10 lines · Shawn Guo

I think we can redefine only pad DAT3 in pinctrl_usdhc1_1_dat3cd, and overwrite the DAT3 configuration in pinctrl_usdhc1_1 to save the redundant data of other pads, something like the following.

pinctrl_usdhc1_1_dat3cd: usdhc1grp-3 {
	fsl,pins = <
		MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x13059
	>;
};
Quoted 6 lines
&usdhc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1_1 &pinctrl_usdhc1_1_dat3cd>;
	...
	status = "okay";
};

Are you sure that this will always be the case? This would assume that the pinctrl entries are always processed sequentially.

#4 lore raw

RFC PATCH 1/2 ARM: imx6qdl: provide pinctrl configurations for DAT3 pull-down

Quoted 18 lines · Russell King - ARM Linux
Quoted 10 lines · Shawn Guo

I think we can redefine only pad DAT3 in pinctrl_usdhc1_1_dat3cd, and overwrite the DAT3 configuration in pinctrl_usdhc1_1 to save the redundant data of other pads, something like the following.

pinctrl_usdhc1_1_dat3cd: usdhc1grp-3 {
	fsl,pins = <
		MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x13059
	>;
};
Quoted 6 lines
&usdhc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1_1 &pinctrl_usdhc1_1_dat3cd>;
	...
	status = "okay";
};
Quoted 2 lines

Are you sure that this will always be the case? This would assume that the pinctrl entries are always processed sequentially.

That will always be the case per my understanding. Otherwise, I would be so surprised. Are you seeing any case that the entries are not processed sequentially?

Shawn

#5 lore raw

RFC PATCH 1/2 ARM: imx6qdl: provide pinctrl configurations for DAT3 pull-down

Quoted 19 lines · Shawn Guo
Quoted 18 lines · Russell King - ARM Linux
Quoted 16 lines · Shawn Guo

I think we can redefine only pad DAT3 in pinctrl_usdhc1_1_dat3cd, and overwrite the DAT3 configuration in pinctrl_usdhc1_1 to save the redundant data of other pads, something like the following.

pinctrl_usdhc1_1_dat3cd: usdhc1grp-3 {
	fsl,pins = <
		MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x13059
	>;
};
&usdhc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1_1 &pinctrl_usdhc1_1_dat3cd>;
	...
	status = "okay";
};
Quoted 6 lines
Quoted 2 lines

Are you sure that this will always be the case? This would assume that the pinctrl entries are always processed sequentially.

That will always be the case per my understanding. Otherwise, I would be so surprised. Are you seeing any case that the entries are not processed sequentially?

Given the way the Linux code currently works, I think that will currently happen in practice. However, there's nothing in the pinctrl DT binding documentation that guarantees (or even mentions) such semantics.

#6 lore raw

RFC PATCH 1/2 ARM: imx6qdl: provide pinctrl configurations for DAT3 pull-down

Quoted 10 lines · Stephen Warren
Quoted 10 lines
Quoted 9 lines
Quoted 6 lines
&usdhc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1_1 &pinctrl_usdhc1_1_dat3cd>;
	...
	status = "okay";
};

Are you sure that this will always be the case? This would assume that the pinctrl entries are always processed sequentially.

Quoted 7 lines
Quoted 3 lines

That will always be the case per my understanding. Otherwise, I would be so surprised. Are you seeing any case that the entries are not processed sequentially?

Given the way the Linux code currently works, I think that will currently happen in practice. However, there's nothing in the pinctrl DT binding documentation that guarantees (or even mentions) such semantics.

Ah, that's Russell's point, I guess. I think it makes perfect sense to make this clear in the binding doc, as this "overwrite mechanism" can be very helpful. I will send a patch for it.

Shawn

#7 lore raw

RFC PATCH 1/2 ARM: imx6qdl: provide pinctrl configurations for DAT3 pull-down

Quoted 15 lines · Shawn Guo
Quoted 14 lines · Stephen Warren
Quoted 13 lines
Quoted 9 lines
Quoted 6 lines
&usdhc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1_1 &pinctrl_usdhc1_1_dat3cd>;
	...
	status = "okay";
};

Are you sure that this will always be the case? This would assume that the pinctrl entries are always processed sequentially.

That will always be the case per my understanding. Otherwise, I would be so surprised. Are you seeing any case that the entries are not processed sequentially?

Quoted 7 lines
Quoted 3 lines

Given the way the Linux code currently works, I think that will currently happen in practice. However, there's nothing in the pinctrl DT binding documentation that guarantees (or even mentions) such semantics.

Ah, that's Russell's point, I guess. I think it makes perfect sense to make this clear in the binding doc, as this "overwrite mechanism" can be very helpful. I will send a patch for it.

Exactly - otherwise we're just relying on implementation details. There's nothing at present which mandates starting at the first entry and working through sequentially to the last entry, which means another implementation can choose to operate in the opposite order. If it does, what you're suggesting won't work so well.

However, there's another point to consider. In cases like this, we will cause a glitch on the pin. When we process the initial set, we will set the pull-up high, and then later set it low. That may not be a problem in this case, but that's not to say it won't be in every case, and that's something which also needs to be considered.

#8 lore raw

RFC PATCH 1/2 ARM: imx6qdl: provide pinctrl configurations for DAT3 pull-down

Quoted 30 lines · Russell King - ARM Linux
Quoted 15 lines · Shawn Guo
Quoted 14 lines · Stephen Warren
Quoted 13 lines
Quoted 9 lines
Quoted 6 lines
&usdhc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1_1 &pinctrl_usdhc1_1_dat3cd>;
	...
	status = "okay";
};

Are you sure that this will always be the case? This would assume that the pinctrl entries are always processed sequentially.

That will always be the case per my understanding. Otherwise, I would be so surprised. Are you seeing any case that the entries are not processed sequentially?

Quoted 7 lines
Quoted 3 lines

Given the way the Linux code currently works, I think that will currently happen in practice. However, there's nothing in the pinctrl DT binding documentation that guarantees (or even mentions) such semantics.

Ah, that's Russell's point, I guess. I think it makes perfect sense to make this clear in the binding doc, as this "overwrite mechanism" can be very helpful. I will send a patch for it.

Exactly - otherwise we're just relying on implementation details. There's nothing at present which mandates starting at the first entry and working through sequentially to the last entry, which means another implementation can choose to operate in the opposite order. If it does, what you're suggesting won't work so well.

Quoted 5 lines

However, there's another point to consider. In cases like this, we will cause a glitch on the pin. When we process the initial set, we will set the pull-up high, and then later set it low. That may not be a problem in this case, but that's not to say it won't be in every case, and that's something which also needs to be considered.

I can't find what the result of this discussion was, but from what I remember, we decided that we weren't going to do this override thing, and instead we were going to separate out the configuration of DAT3.

Who's going to do that? I'd rather not, because it means editing quite a number of DT files which I have no way to test, and the chances of messing this up are quite high. I've already developed a deep seated hatred for DT in general through my involvement with IMX, particularly how it's very easy to make an undetected mistake and then spend hours debugging it.

Until this is resolved, I'm sticking with my own method of redefining the entire pinctrl set for DAT3 pull-down, which I've tested as working.

#9 lore raw

RFC PATCH 1/2 ARM: imx6qdl: provide pinctrl configurations for DAT3 pull-down

Quoted 5 lines · Russell King - ARM Linux

I can't find what the result of this discussion was, but from what I remember, we decided that we weren't going to do this override thing, and instead we were going to separate out the configuration of DAT3.

Who's going to do that?

I'm going to do that. Thanks for reminding :)

Shawn

Quoted 9 lines

I'd rather not, because it means editing
quite a number of DT files which I have no way to test, and the chances of messing this up are quite high. I've already developed a deep seated hatred for DT in general through my involvement with IMX, particularly how it's very easy to make an undetected mistake and then spend hours debugging it.

Until this is resolved, I'm sticking with my own method of redefining the entire pinctrl set for DAT3 pull-down, which I've tested as working.

#10 lore raw

RFC PATCH 1/2 ARM: imx6qdl: provide pinctrl configurations for DAT3 pull-down

Quoted 8 lines · Shawn Guo
Quoted 5 lines · Russell King - ARM Linux

I can't find what the result of this discussion was, but from what I remember, we decided that we weren't going to do this override thing, and instead we were going to separate out the configuration of DAT3.

Who's going to do that?

I'm going to do that. Thanks for reminding :)

Okay, here is what I got so far. However, looking at the changes on imx6qdl.dtsi, I start being concerned by the point that Matt raises recently - the device tree blob for particular board is bloated with a lot of pinctrl setting nodes that the board does not use. The situation will become even worse when we have more pinctrl nodes to be added just for cases like this usdhc DAT3 thing. Thus, I'm considering to adopt Matt's proposal to avoid this problem. Will post a RFC patch to demonstrate the solution soon.

Shawn

--------8<----------------------

 arch/arm/boot/dts/imx6q-arm2.dts           |    3 +-
 arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi |    2 +-
 arch/arm/boot/dts/imx6q-sabrelite.dts      |    2 +-
 arch/arm/boot/dts/imx6qdl-sabreauto.dtsi   |    6 +--
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi     |    4 +-
 arch/arm/boot/dts/imx6qdl-wandboard.dtsi   |    4 +-
 arch/arm/boot/dts/imx6qdl.dtsi             |   74 +++++++++++++++++++++++++---
 7 files changed, 79 insertions(+), 16 deletions(-)
arch/arm/boot/dts/imx6q-arm2.dts +2 -1
index edf1bd9..b804cf7 100644
@@ -85,6 +85,7 @@
 	vmmc-supply = <&reg_3p3v>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_usdhc3_1
+		     &pinctrl_usdhc3_dat3
 		     &pinctrl_usdhc3_arm2>;
 	status = "okay";
 };
@@ -93,7 +94,7 @@
 	non-removable;
 	vmmc-supply = <&reg_3p3v>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_usdhc4_1>;
+	pinctrl-0 = <&pinctrl_usdhc4_1 &pinctrl_usdhc4_dat3>;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6q-phytec-pfla02.dtsi +1 -1
index 1a3b50d..01df035 100644
@@ -164,7 +164,7 @@
 
 &usdhc2 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_usdhc2_2>;
+	pinctrl-0 = <&pinctrl_usdhc2_2 &pinctrl_usdhc2_dat3>;
 	cd-gpios = <&gpio1 4 0>;
 	wp-gpios = <&gpio1 2 0>;
 	status = "disabled";
arch/arm/boot/dts/imx6q-sabrelite.dts +1 -1
index f004913..b1bffa8 100644
@@ -192,7 +192,7 @@
 
 &usdhc4 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_usdhc4_2>;
+	pinctrl-0 = <&pinctrl_usdhc4_2 &pinctrl_usdhc4_dat3>;
 	cd-gpios = <&gpio2 6 0>;
 	wp-gpios = <&gpio2 7 0>;
 	vmmc-supply = <&reg_3p3v>;
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +3 -3
index ff6f1e8..5421c8e 100644
@@ -76,9 +76,9 @@
 
 &usdhc3 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz";
-	pinctrl-0 = <&pinctrl_usdhc3_1>;
-	pinctrl-1 = <&pinctrl_usdhc3_1_100mhz>;
-	pinctrl-2 = <&pinctrl_usdhc3_1_200mhz>;
+	pinctrl-0 = <&pinctrl_usdhc3_1 &pinctrl_usdhc3_dat3>;
+	pinctrl-1 = <&pinctrl_usdhc3_1_100mhz &pinctrl_usdhc3_dat3_100mhz>;
+	pinctrl-2 = <&pinctrl_usdhc3_1_200mhz &pinctrl_usdhc3_dat3_200mhz>;
 	cd-gpios = <&gpio6 15 0>;
 	wp-gpios = <&gpio1 13 0>;
 	status = "okay";
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +2 -2
index e75e11b..c4b7fda 100644
@@ -244,7 +244,7 @@
 
 &usdhc2 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_usdhc2_1>;
+	pinctrl-0 = <&pinctrl_usdhc2_1 &pinctrl_usdhc2_dat3>;
 	bus-width = <8>;
 	cd-gpios = <&gpio2 2 0>;
 	wp-gpios = <&gpio2 3 0>;
@@ -253,7 +253,7 @@
 
 &usdhc3 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_usdhc3_1>;
+	pinctrl-0 = <&pinctrl_usdhc3_1 &pinctrl_usdhc3_dat3>;
 	bus-width = <8>;
 	cd-gpios = <&gpio2 0 0>;
 	wp-gpios = <&gpio2 1 0>;
arch/arm/boot/dts/imx6qdl-wandboard.dtsi +2 -2
index 35f5479..b1b84ec 100644
@@ -140,14 +140,14 @@
 
 &usdhc1 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_usdhc1_2>;
+	pinctrl-0 = <&pinctrl_usdhc1_2 &pinctrl_usdhc1_dat3>;
 	cd-gpios = <&gpio1 2 0>;
 	status = "okay";
 };
 
 &usdhc2 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_usdhc2_2>;
+	pinctrl-0 = <&pinctrl_usdhc2_2 &pinctrl_usdhc2_dat3>;
 	non-removable;
 	status = "okay";
 };
arch/arm/boot/dts/imx6qdl.dtsi +68 -6

146 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#11 lore raw

RFC PATCH 2/2 ARM: imx: initial IMX6 Cubox-i carrier-1 support

In reply to Russell King - ARM Linux
---
 arch/arm/boot/dts/Makefile                     |    1 +
 arch/arm/boot/dts/imx6dl-cubox-i-carrier-1.dts |   64 +++++++++++
 arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi |   54 +++++++++
 arch/arm/boot/dts/imx6qdl-microsom.dtsi        |  137 ++++++++++++++++++++++++
 arch/arm/mach-imx/mach-imx6q.c                 |   35 ++++++
 5 files changed, 291 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/imx6dl-cubox-i-carrier-1.dts
 create mode 100644 arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi
 create mode 100644 arch/arm/boot/dts/imx6qdl-microsom.dtsi
arch/arm/boot/dts/Makefile +1 -0
index e95af3f..8e0fb04 100644
@@ -131,6 +131,7 @@ dtb-$(CONFIG_ARCH_MXC) += \
 	imx53-mba53.dtb \
 	imx53-qsb.dtb \
 	imx53-smd.dtb \
+	imx6dl-cubox-i-carrier-1.dtb \
 	imx6dl-sabreauto.dtb \
 	imx6dl-sabresd.dtb \
 	imx6dl-wandboard.dtb \
arch/arm/boot/dts/imx6dl-cubox-i-carrier-1.dts new file +64 -0

64 lines not on this page · raw message

arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi new file +54 -0

54 lines not on this page · raw message

arch/arm/boot/dts/imx6qdl-microsom.dtsi new file +137 -0

137 lines not on this page · raw message

arch/arm/mach-imx/mach-imx6q.c +35 -0
index 90372a2..222edbd 100644
@@ -164,6 +164,39 @@ static int ar8031_phy_fixup(struct phy_device *dev)
 
 #define PHY_ID_AR8031	0x004dd074
 
+static int ar8035_phy_fixup(struct phy_device *dev)
+{
+	u16 val;
+
+	/* Ar803x phy SmartEEE feature cause link status generates glitch,
+	 * which cause ethernet link down/up issue, so disable SmartEEE
+	 */
+	phy_write(dev, 0xd, 0x3);
+	phy_write(dev, 0xe, 0x805d);
+	phy_write(dev, 0xd, 0x4003);
+
+	val = phy_read(dev, 0xe);
+	phy_write(dev, 0xe, val & ~(1 << 8));
+
+	/*
+	 * Enable 125MHz clock from CLK_25M on the AR8031.  This
+	 * is fed in to the IMX6 on the ENET_REF_CLK (V22) pad.
+	 * Also, introduce a tx clock delay.
+	 *
+	 * This is the same as is the AR8031 fixup.
+	 */
+	ar8031_phy_fixup(dev);
+
+	/*check phy power*/
+	val = phy_read(dev, 0x0);
+	if (val & BMCR_PDOWN)
+		phy_write(dev, 0x0, val & ~BMCR_PDOWN);
+
+	return 0;
+}
+
+#define PHY_ID_AR8035 0x004dd072
+
 static void __init imx6q_enet_phy_init(void)
 {
 	if (IS_BUILTIN(CONFIG_PHYLIB)) {
@@ -173,6 +206,8 @@ static void __init imx6q_enet_phy_init(void)
 				ksz9031rn_phy_fixup);
 		phy_register_fixup_for_uid(PHY_ID_AR8031, 0xffffffff,
 				ar8031_phy_fixup);
+		phy_register_fixup_for_uid(PHY_ID_AR8035, 0xffffffef,
+				ar8035_phy_fixup);
 	}
 }
 
Signature · 1 line
1.7.4.4