Skip to contentSkip to conversation

i.MX51 iomux: Fixes MX51_PAD_UART2_TXD__UART2_TXD declaration

PATCH Superseded julien.boibessot at free.fr 4 participants 7 messages Feb 11, 2011 – Feb 12, 2011

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 i.MX51 iomux: Fixes MX51_PAD_UART2_TXD__UART2_TXD declaration

From: Julien Boibessot <[email protected]>

Fixes a regression of recent iomux changes: current MX51_PAD_UART2_TXD__UART2_TXD declaration overwrites IOMUXC_UART2_IPP_UART_RXD_MUX_SELECT_INPUT register (0x09ec) and prevent UART2 Rx from working properly.
(Tested on my custom i.MX51 board where UART2 is used as console)

---
Changes since v1:
- Improve patch description as requested by Sascha Hauer

 arch/arm/plat-mxc/include/mach/iomux-mx51.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-mxc/include/mach/iomux-mx51.h +1 -1
index b6767f9..df531aa 100644
@@ -473,7 +473,7 @@
 #define _MX51_PAD_UART2_RXD__UART2_RXD		IOMUX_PAD(0x628, 0x238, 0, 0x09ec, 2, 0)
 #define _MX51_PAD_UART2_TXD__FIRI_RXD		IOMUX_PAD(0x62c, 0x23c, 1, 0x0000, 0, 0)
 #define _MX51_PAD_UART2_TXD__GPIO1_21		IOMUX_PAD(0x62c, 0x23c, 3, 0x0000, 0, 0)
-#define _MX51_PAD_UART2_TXD__UART2_TXD		IOMUX_PAD(0x62c, 0x23c, 0, 0x09ec, 3, 0)
+#define _MX51_PAD_UART2_TXD__UART2_TXD		IOMUX_PAD(0x62c, 0x23c, 0, 0x0000, 0, 0)
 #define _MX51_PAD_UART3_RXD__CSI1_D0		IOMUX_PAD(0x630, 0x240, 2, 0x0000, 0, 0)
 #define _MX51_PAD_UART3_RXD__GPIO1_22		IOMUX_PAD(0x630, 0x240, 3, 0x0000, 0, 0)
 #define _MX51_PAD_UART3_RXD__UART1_DTR		IOMUX_PAD(0x630, 0x240, 0, 0x0000, 0, 0)
Signature · 1 line
1.6.0.4
#1 lore raw

PATCH v2 1/1 i.MX51 iomux: Fixes MX51_PAD_UART2_TXD__UART2_TXD declaration

Hi Julien,

#define _MX51_PAD_USBH1_DATA2__UART2_TXD IOMUX_PAD(0x690, 0x290, 1, 0x09ec, 5, 0)

Will you change the above line too?

Thanks
Richard

Quoted 36 lines · julien.boibessot at free.fr

From: Julien Boibessot <[email protected]>

Fixes a regression of recent iomux changes: current MX51_PAD_UART2_TXD__UART2_TXD declaration overwrites IOMUXC_UART2_IPP_UART_RXD_MUX_SELECT_INPUT register (0x09ec) and prevent UART2 Rx from working properly.
(Tested on my custom i.MX51 board where UART2 is used as console)

---
Changes since v1:
- Improve patch description as requested by Sascha Hauer

 arch/arm/plat-mxc/include/mach/iomux-mx51.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-mxc/include/mach/iomux-mx51.h +1 -1
index b6767f9..df531aa 100644
@@ -473,7 +473,7 @@
 #define _MX51_PAD_UART2_RXD__UART2_RXD		IOMUX_PAD(0x628, 0x238, 0, 0x09ec, 2, 0)
 #define _MX51_PAD_UART2_TXD__FIRI_RXD		IOMUX_PAD(0x62c, 0x23c, 1, 0x0000, 0, 0)
 #define _MX51_PAD_UART2_TXD__GPIO1_21		IOMUX_PAD(0x62c, 0x23c, 3, 0x0000, 0, 0)
-#define _MX51_PAD_UART2_TXD__UART2_TXD		IOMUX_PAD(0x62c, 0x23c, 0, 0x09ec, 3, 0)
+#define _MX51_PAD_UART2_TXD__UART2_TXD		IOMUX_PAD(0x62c, 0x23c, 0, 0x0000, 0, 0)
 #define _MX51_PAD_UART3_RXD__CSI1_D0		IOMUX_PAD(0x630, 0x240, 2, 0x0000, 0, 0)
 #define _MX51_PAD_UART3_RXD__GPIO1_22		IOMUX_PAD(0x630, 0x240, 3, 0x0000, 0, 0)
 #define _MX51_PAD_UART3_RXD__UART1_DTR		IOMUX_PAD(0x630, 0x240, 0, 0x0000, 0, 0)
Signature · 7 lines
1.6.0.4


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

PATCH v2 1/1 i.MX51 iomux: Fixes MX51_PAD_UART2_TXD__UART2_TXD declaration

Hi,

Quoted 6 lines · Richard Zhao

Hi Julien,

#define _MX51_PAD_USBH1_DATA2__UART2_TXD IOMUX_PAD(0x690, 0x290, 1, 0x09ec, 5, 0)

Will you change the above line too?

Seems like a general copy/paste error in the i.MX51 Ref Manual. For all pads that can have an UART RXD or TXD function the manual states that the UART*_IPP_UART_RXD_MUX_SELECT_INPUT register must be configured, while this is obviously only sensible for the RXD function.

Lothar Wa?mann

Signature · 9 lines
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
#3 lore raw

PATCH v2 1/1 i.MX51 iomux: Fixes MX51_PAD_UART2_TXD__UART2_TXD declaration

Quoted 7 lines · Lothar Wa?mann

Hi,

Quoted 4 lines · Richard Zhao

Hi Julien,

#define _MX51_PAD_USBH1_DATA2__UART2_TXD IOMUX_PAD(0x690, 0x290, 1, 0x09ec, 5, 0)

Quoted 7 lines
Quoted 2 lines

Will you change the above line too?

Seems like a general copy/paste error in the i.MX51 Ref Manual. For all pads that can have an UART RXD or TXD function the manual states that the UART*_IPP_UART_RXD_MUX_SELECT_INPUT register must be configured, while this is obviously only sensible for the RXD function.

Yes, it's for RXD. RXD can also select input from TXD.

Thanks
Richard

Quoted 13 lines

Lothar Wa?mann

Signature · 9 lines
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
#4 lore raw

PATCH v2 1/1 i.MX51 iomux: Fixes MX51_PAD_UART2_TXD__UART2_TXD declaration

Hi,

Quoted 8 lines · Richard Zhao
Quoted 7 lines · Lothar Wa?mann

Hi,

Quoted 4 lines · Richard Zhao

Hi Julien,

#define _MX51_PAD_USBH1_DATA2__UART2_TXD IOMUX_PAD(0x690, 0x290, 1, 0x09ec, 5, 0)

Quoted 9 lines
Quoted 7 lines
Quoted 2 lines

Will you change the above line too?

Seems like a general copy/paste error in the i.MX51 Ref Manual. For all pads that can have an UART RXD or TXD function the manual states that the UART*_IPP_UART_RXD_MUX_SELECT_INPUT register must be configured, while this is obviously only sensible for the RXD function.

Yes, it's for RXD. RXD can also select input from TXD.

The RXD function can be routed to the TXD pads via RXD_MUX_SELECT_INPUT, but IMO setting the INPUT_MUX for an OUTPUT function (TXD) is nonsense.

E.g.:

|Table A-1271. Register: IOMUXC_UART2_IPP_UART_RXD_MUX_SELECT_INPUT
|
|010: Selecting Pad: UART2_RXD for Mode: ALT0.
|011: Selecting Pad: UART2_TXD for Mode: ALT0.

so, the input path for the RXD function can be routed to either the UART2_RXD or UART2_TXD pad.

|Table A-286. Register IOMUXC_SW_MUX_CTL_PAD_UART2_RXD Bits Description
|000: Select mux mode: ALT0 mux port: RXD_MUX of instance: uart2.
|NOTE: Pad UART2_RXD is involved in Daisy Chain.
|- Config Register IOMUXC_UART2_IPP_UART_RXD_MUX_SELECT_INPUT for mode
|ALT0.

This is OK. RXD_MUX is an input whose source is defined by the RXD_MUX_SELECT_INPUT register.

But:

|Table A-288. Register IOMUXC_SW_MUX_CTL_PAD_UART2_TXD Bits Description
|000: Select mux mode: ALT0 mux port: TXD_MUX of instance: uart2.
|
|NOTE: Pad UART2_TXD is involved in Daisy Chain.
|- Config Register IOMUXC_UART2_IPP_UART_RXD_MUX_SELECT_INPUT for mode
|ALT0.

IMO does not make any sense. TXD_MUX is an OUTPUT function. How can the INPUT MUX route an OUTPUT PAD?

Also, the table Table 4-3. i.MX51 Daisy Chain Settings only mentions the uart_rxd_mux pins, but not uart_txd_mux.

Lothar Wa?mann

Signature · 9 lines
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
#5 lore raw

PATCH v2 1/1 i.MX51 iomux: Fixes MX51_PAD_UART2_TXD__UART2_TXD declaration

Quoted 24 lines · Lothar Wa?mann

Hi,

Quoted 8 lines · Richard Zhao
Quoted 7 lines · Lothar Wa?mann

Hi,

Quoted 4 lines · Richard Zhao

Hi Julien,

#define _MX51_PAD_USBH1_DATA2__UART2_TXD IOMUX_PAD(0x690, 0x290, 1, 0x09ec, 5, 0)

Quoted 9 lines
Quoted 7 lines
Quoted 2 lines

Will you change the above line too?

Seems like a general copy/paste error in the i.MX51 Ref Manual. For all pads that can have an UART RXD or TXD function the manual states that the UART*_IPP_UART_RXD_MUX_SELECT_INPUT register must be configured, while this is obviously only sensible for the RXD function.

Yes, it's for RXD. RXD can also select input from TXD.

The RXD function can be routed to the TXD pads via RXD_MUX_SELECT_INPUT, but IMO setting the INPUT_MUX for an OUTPUT function (TXD) is nonsense.

Quoted 7 lines

E.g.:

|Table A-1271. Register: IOMUXC_UART2_IPP_UART_RXD_MUX_SELECT_INPUT
|
|010: Selecting Pad: UART2_RXD for Mode: ALT0.
|011: Selecting Pad: UART2_TXD for Mode: ALT0.

so, the input path for the RXD function can be routed to either the UART2_RXD or UART2_TXD pad.

Right. I double checked with IC guys. 011 means UART2_TXD/RXD swapped. When changing mode of DCE/DTE, TXD/RXD and RTS/CTS may need swapped. Using this setting, you don't need to swap the physical wires.

Thanks
Richard

Quoted 39 lines
|Table A-286. Register IOMUXC_SW_MUX_CTL_PAD_UART2_RXD Bits Description
|000: Select mux mode: ALT0 mux port: RXD_MUX of instance: uart2.
|NOTE: Pad UART2_RXD is involved in Daisy Chain.
|- Config Register IOMUXC_UART2_IPP_UART_RXD_MUX_SELECT_INPUT for mode
|ALT0.

This is OK. RXD_MUX is an input whose source is defined by the RXD_MUX_SELECT_INPUT register.

But:

|Table A-288. Register IOMUXC_SW_MUX_CTL_PAD_UART2_TXD Bits Description
|000: Select mux mode: ALT0 mux port: TXD_MUX of instance: uart2.
|
|NOTE: Pad UART2_TXD is involved in Daisy Chain.
|- Config Register IOMUXC_UART2_IPP_UART_RXD_MUX_SELECT_INPUT for mode
|ALT0.

IMO does not make any sense. TXD_MUX is an OUTPUT function. How can the INPUT MUX route an OUTPUT PAD?

Also, the table Table 4-3. i.MX51 Daisy Chain Settings only mentions the uart_rxd_mux pins, but not uart_txd_mux.

Lothar Wa?mann

Signature · 14 lines
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

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

PATCH v2 1/1 i.MX51 iomux: Fixes MX51_PAD_UART2_TXD__UART2_TXD declaration

In reply to Richard Zhao

Hi Richard,

Richard Zhao a ?crit :

Quoted 4 lines

#define _MX51_PAD_USBH1_DATA2__UART2_TXD IOMUX_PAD(0x690, 0x290, 1, 0x09ec, 5, 0)

Will you change the above line too?

yes, you're right, it needs too.

Julien