Skip to contentSkip to conversation

arm: pdu001: Setup pinmux for console UART as early as possible

PATCH In review Felix Brack 2 participants 5 messages Feb 21, 2022 – Feb 28, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: pdu001: Setup pinmux for console UART as early as possible

To make sure we get a working console as soon as possible in the SPL the UART pins require to be configured earlier. This is especially true for the pins of UART3, since the PDU001 board uses this UART for the console by default.

---

 board/eets/pdu001/board.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
board/eets/pdu001/board.c +30 -0
index 9f3cfd4f84..4aeb84071b 100644
@@ -216,6 +216,36 @@ const struct dpll_params *get_dpll_ddr_params(void)
 	return &dpll_ddr;
 }
 
+void set_uart_mux_conf(void)
+{
+	switch (CONFIG_CONS_INDEX) {
+		case 1: {
+			enable_uart0_pin_mux();
+			break;
+		}
+		case 2: {
+			enable_uart1_pin_mux();
+			break;
+		}
+		case 3: {
+			enable_uart2_pin_mux();
+			break;
+		}
+		case 4: {
+			enable_uart3_pin_mux();
+			break;
+		}
+		case 5: {
+			enable_uart4_pin_mux();
+			break;
+		}
+		case 6: {
+			enable_uart5_pin_mux();
+			break;
+		}
+	}
+}
+
 void set_mux_conf_regs(void)
 {
 	/* done first by the ROM and afterwards by the pin controller driver */
Signature · 1 line
2.25.1
#1 lore raw
Quoted 10 lines · Felix Brack

To make sure we get a working console as soon as possible in the SPL the UART pins require to be configured earlier. This is especially true for the pins of UART3, since the PDU001 board uses this UART for the console by default.

---

 board/eets/pdu001/board.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Does this replace
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
or go in addition to it? Thanks!

Signature · 1 line
Tom
#2 lore raw

Hi Tom,

Quoted 10 lines · Tom Rini
Quoted 8 lines · Felix Brack

To make sure we get a working console as soon as possible in the SPL the UART pins require to be configured earlier. This is especially true for the pins of UART3, since the PDU001 board uses this UART for the console by default.

---

Quoted 7 lines
Quoted 2 lines
 board/eets/pdu001/board.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Does this replace
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
or go in addition to it? Thanks!

No it's not a replacement. It is kind of addition but not related to the early debugging UART, hence a second patch.

Signature · 1 line
Regards, Felix
#3 lore raw
Quoted 16 lines · Felix Brack

Hi Tom,

Quoted 13 lines · Tom Rini
Quoted 10 lines · Felix Brack

To make sure we get a working console as soon as possible in the SPL the UART pins require to be configured earlier. This is especially true for the pins of UART3, since the PDU001 board uses this UART for the console by default.

---

 board/eets/pdu001/board.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
Quoted 6 lines
Quoted 4 lines

Does this replace
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
or go in addition to it? Thanks!

No it's not a replacement. It is kind of addition but not related to the early debugging UART, hence a second patch.

OK, thanks just confirming.

Signature · 1 line
Tom
#4 lore raw
In reply to Felix Brack
Quoted 6 lines · Felix Brack

To make sure we get a working console as soon as possible in the SPL the UART pins require to be configured earlier. This is especially true for the pins of UART3, since the PDU001 board uses this UART for the console by default.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom