* [PATCH v2 0/3] Support UART over MicroSD slot on Transformer T20
@ 2025-03-30 19:26 Artur Kowalski
2025-03-30 19:26 ` [PATCH v2 1/3] tegra: add funcmux for exposing UART over uSD slot on Tegra 20 Artur Kowalski
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Artur Kowalski @ 2025-03-30 19:26 UTC (permalink / raw)
To: u-boot
Cc: Artur Kowalski, Francesco Dolcini, Jonas Schwöbel,
Marek Vasut, Peter Robinson, Simon Glass, Stephen Warren,
Svyatoslav Ryhel, Thierry Reding, Tom Rini, Tom Warren
v2 no longer forces UARTA to SDB/SDD on Transformer 20. Instead
CONFIG_TEGRA_UARTA_MICROSD is used for this purpose. Additionally,
user does not needs to configure additional DT files as that is handled
internally with preprocessor directives.
Changes in v2:
- fixed indentation of preprocessor directives
- added TEGRA_UARTA_MICROSD Kconfig option
- removed .dtsi for enabling UART over microSD
- modified transformer DT to use UARTA and correct pinmux when
TEGRA_UARTA_MICROSD is enabled; it is enough to flip a single
switch to enable/disable UART over microSD
Artur Kowalski (3):
tegra: add funcmux for exposing UART over uSD slot on Tegra 20
tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20
tegra: allow to expose UART on microSD slot
arch/arm/dts/tegra20-asus-transformer.dtsi | 24 +++++++++++++++++++++
arch/arm/include/asm/arch-tegra20/funcmux.h | 1 +
arch/arm/mach-tegra/board.c | 2 ++
arch/arm/mach-tegra/tegra20/Kconfig | 18 ++++++++++++++++
drivers/pinctrl/tegra/funcmux-tegra20.c | 9 +++++++-
include/configs/transformer-t20.h | 10 +++++++++
6 files changed, 63 insertions(+), 1 deletion(-)
--
2.48.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/3] tegra: add funcmux for exposing UART over uSD slot on Tegra 20
2025-03-30 19:26 [PATCH v2 0/3] Support UART over MicroSD slot on Transformer T20 Artur Kowalski
@ 2025-03-30 19:26 ` Artur Kowalski
2025-03-31 5:42 ` Svyatoslav Ryhel
2025-03-30 19:26 ` [PATCH v2 2/3] tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20 Artur Kowalski
2025-03-30 19:26 ` [PATCH v2 3/3] tegra: allow to expose UART on microSD slot Artur Kowalski
2 siblings, 1 reply; 13+ messages in thread
From: Artur Kowalski @ 2025-03-30 19:26 UTC (permalink / raw)
To: u-boot
Cc: Artur Kowalski, Jonas Schwöbel, Marek Vasut, Peter Robinson,
Simon Glass, Stephen Warren, Svyatoslav Ryhel, Thierry Reding,
Tom Rini, Tom Warren
UART-A can be exposed through uSD, this was tested on Transformer T20
but should work on all Ventana-based boards.
TX is exported on SDD pingroup corresponding to uSD CLK pin
RX is exported on SDB which is CMD pin in uSD slot
Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
---
Changes in v2:
- fixed indentation of preprocessor directives
arch/arm/include/asm/arch-tegra20/funcmux.h | 1 +
arch/arm/mach-tegra/board.c | 2 ++
arch/arm/mach-tegra/tegra20/Kconfig | 3 +++
drivers/pinctrl/tegra/funcmux-tegra20.c | 9 ++++++++-
4 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/arch-tegra20/funcmux.h b/arch/arm/include/asm/arch-tegra20/funcmux.h
index e9e96c1f933..bafcf857620 100644
--- a/arch/arm/include/asm/arch-tegra20/funcmux.h
+++ b/arch/arm/include/asm/arch-tegra20/funcmux.h
@@ -19,6 +19,7 @@ enum {
FUNCMUX_UART1_UAA_UAB,
FUNCMUX_UART1_GPU,
FUNCMUX_UART1_SDIO1,
+ FUNCMUX_UART1_SDB_SDD,
FUNCMUX_UART2_UAD = 0,
FUNCMUX_UART4_GMC = 0,
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index 7ca56a3b081..7597034fa48 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -169,6 +169,8 @@ static int uart_configs[] = {
FUNCMUX_UART1_GPU,
#elif defined(CONFIG_TEGRA_UARTA_SDIO1)
FUNCMUX_UART1_SDIO1,
+ #elif defined(CONFIG_TEGRA_UARTA_SDB_SDD)
+ FUNCMUX_UART1_SDB_SDD,
#else
FUNCMUX_UART1_IRRX_IRTX,
#endif
diff --git a/arch/arm/mach-tegra/tegra20/Kconfig b/arch/arm/mach-tegra/tegra20/Kconfig
index e2735d93e28..3349f1e2786 100644
--- a/arch/arm/mach-tegra/tegra20/Kconfig
+++ b/arch/arm/mach-tegra/tegra20/Kconfig
@@ -17,6 +17,9 @@ config TEGRA_UARTA_GPU
config TEGRA_UARTA_SDIO1
bool
+config TEGRA_UARTA_SDB_SDD
+ bool
+
choice
prompt "Tegra20 board select"
optional
diff --git a/drivers/pinctrl/tegra/funcmux-tegra20.c b/drivers/pinctrl/tegra/funcmux-tegra20.c
index 951ae196161..f60d5aad3a4 100644
--- a/drivers/pinctrl/tegra/funcmux-tegra20.c
+++ b/drivers/pinctrl/tegra/funcmux-tegra20.c
@@ -62,8 +62,15 @@ int funcmux_select(enum periph_id id, int config)
pinmux_tristate_disable(PMUX_PINGRP_SDIO1);
bad_config = 0;
break;
+ case FUNCMUX_UART1_SDB_SDD:
+ pinmux_set_func(PMUX_PINGRP_SDB, PMUX_FUNC_UARTA);
+ pinmux_set_func(PMUX_PINGRP_SDD, PMUX_FUNC_UARTA);
+ pinmux_tristate_disable(PMUX_PINGRP_SDB);
+ pinmux_tristate_disable(PMUX_PINGRP_SDD);
+ bad_config = 0;
+ break;
}
- if (!bad_config) {
+ if (!bad_config && config != FUNCMUX_UART1_SDB_SDD) {
/*
* Tegra appears to boot with function UARTA pre-
* selected on mux group SDB. If two mux groups are
--
2.48.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/3] tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20
2025-03-30 19:26 [PATCH v2 0/3] Support UART over MicroSD slot on Transformer T20 Artur Kowalski
2025-03-30 19:26 ` [PATCH v2 1/3] tegra: add funcmux for exposing UART over uSD slot on Tegra 20 Artur Kowalski
@ 2025-03-30 19:26 ` Artur Kowalski
2025-03-31 5:48 ` Svyatoslav Ryhel
2025-03-30 19:26 ` [PATCH v2 3/3] tegra: allow to expose UART on microSD slot Artur Kowalski
2 siblings, 1 reply; 13+ messages in thread
From: Artur Kowalski @ 2025-03-30 19:26 UTC (permalink / raw)
To: u-boot
Cc: Artur Kowalski, Francesco Dolcini, Simon Glass, Stephen Warren,
Svyatoslav Ryhel, Tom Rini, Tom Warren
If debug UART is set to anything other than UARTD, U-Boot's SPL hangs
trying to communicate with UARTD which clock won't be ungated. With this
patch it is possible to boot with UARTA enabled.
Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
---
(no changes since v1)
include/configs/transformer-t20.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/configs/transformer-t20.h b/include/configs/transformer-t20.h
index 6a3d9b24036..d3a98cc5a70 100644
--- a/include/configs/transformer-t20.h
+++ b/include/configs/transformer-t20.h
@@ -16,7 +16,17 @@
#define CFG_TEGRA_BOARD_STRING "ASUS Transformer"
/* Board-specific serial config */
+#if defined(CONFIG_TEGRA_ENABLE_UARTA)
+#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
+#elif defined(CONFIG_TEGRA_ENABLE_UARTB)
+#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTB_BASE
+#elif defined(CONFIG_TEGRA_ENABLE_UARTC)
+#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARCD_BASE
+#elif defined(CONFIG_TEGRA_ENABLE_UARTD)
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
+#elif defined(CONFIG_TEGRA_ENABLE_UARTE)
+#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTE_BASE
+#endif
#include "tegra-common-post.h"
--
2.48.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 3/3] tegra: allow to expose UART on microSD slot
2025-03-30 19:26 [PATCH v2 0/3] Support UART over MicroSD slot on Transformer T20 Artur Kowalski
2025-03-30 19:26 ` [PATCH v2 1/3] tegra: add funcmux for exposing UART over uSD slot on Tegra 20 Artur Kowalski
2025-03-30 19:26 ` [PATCH v2 2/3] tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20 Artur Kowalski
@ 2025-03-30 19:26 ` Artur Kowalski
2025-03-31 5:51 ` Svyatoslav Ryhel
2 siblings, 1 reply; 13+ messages in thread
From: Artur Kowalski @ 2025-03-30 19:26 UTC (permalink / raw)
To: u-boot
Cc: Artur Kowalski, Simon Glass, Stephen Warren, Svyatoslav Ryhel,
Thierry Reding, Tom Rini, Tom Warren
Tegra20 has mux allowing to repurpose microSD as UART on boards which
use sdmmc3 controller for microSD. Add TEGRA_UARTA_MICROSD to enable
this feature. It is currently supported on Transformer T20, support for
other boards may require Device Tree changes.
Update Transformer T20 DTS to select correct pinmux and stdout-path
based on TEGRA_UARTA_MICROSD.
Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
---
Changes in v2:
- added TEGRA_UARTA_MICROSD Kconfig option
- removed .dtsi for enabling UART over microSD
- modified transformer DT to use UARTA and correct pinmux when
TEGRA_UARTA_MICROSD is enabled; it is enough to flip a single
switch to enable/disable UART over microSD
arch/arm/dts/tegra20-asus-transformer.dtsi | 24 ++++++++++++++++++++++
arch/arm/mach-tegra/tegra20/Kconfig | 15 ++++++++++++++
2 files changed, 39 insertions(+)
diff --git a/arch/arm/dts/tegra20-asus-transformer.dtsi b/arch/arm/dts/tegra20-asus-transformer.dtsi
index 49efabbfd92..9ea323c81f3 100644
--- a/arch/arm/dts/tegra20-asus-transformer.dtsi
+++ b/arch/arm/dts/tegra20-asus-transformer.dtsi
@@ -5,7 +5,13 @@
/ {
chosen {
+#if CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTA)
+ stdout-path = &uarta;
+#elif CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTD)
stdout-path = &uartd;
+#else
+#error Unsupported UART
+#endif
};
aliases {
@@ -195,10 +201,17 @@
nvidia,function = "i2c1";
};
+#if CONFIG_IS_ENABLED(TEGRA_UARTA_SDB_SDD)
+ dbguart {
+ nvidia,pins = "sdb", "sdd";
+ nvidia,function = "uarta";
+ };
+#else
sdb {
nvidia,pins = "sdb", "sdc", "sdd", "slxc", "slxk";
nvidia,function = "sdio3";
};
+#endif
sdio1 {
nvidia,pins = "sdio1";
@@ -376,7 +389,13 @@
};
};
+#if CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTA)
+ uarta: serial@70006000 {
+#elif CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTD)
uartd: serial@70006300 {
+#else
+#error Unsupported UART
+#endif
status = "okay";
clock-frequency = <216000000>;
};
@@ -434,7 +453,12 @@
};
sdmmc3: sdhci@c8000400 {
+#if CONFIG_IS_ENABLED(TEGRA_UARTA_MICROSD)
+ /* Can't use both at the same time */
+ status = "disabled";
+#else
status = "okay";
+#endif
bus-width = <4>;
cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
diff --git a/arch/arm/mach-tegra/tegra20/Kconfig b/arch/arm/mach-tegra/tegra20/Kconfig
index 3349f1e2786..c2c51660216 100644
--- a/arch/arm/mach-tegra/tegra20/Kconfig
+++ b/arch/arm/mach-tegra/tegra20/Kconfig
@@ -77,6 +77,21 @@ endchoice
config SYS_SOC
default "tegra20"
+config TEGRA_UARTA_MICROSD
+ bool "UARTA on MicroSD breakout board"
+ default n
+ depends on TEGRA_ENABLE_UARTA && TARGET_TRANSFORMER_T20
+ select TEGRA_UARTA_SDB_SDD
+ help
+ Repurpose the SD card slot for getting access to the UARTA serial
+ console. Primarily useful only for low level u-boot debugging on
+ tablets, where normal UARTD is difficult to access and requires
+ device disassembly and/or soldering. Enabling this option causes
+ UARTA TX to become exposed on SDD and RX on SDB pins which correspond
+ to microSD CLK and CMD pins respectively. Currently this is supported
+ only on Transformer T20, support for other platforms may require DT
+ and configs (from include/configs/*) updates.
+
source "board/nvidia/harmony/Kconfig"
source "board/avionic-design/medcom-wide/Kconfig"
source "board/compal/paz00/Kconfig"
--
2.48.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/3] tegra: add funcmux for exposing UART over uSD slot on Tegra 20
2025-03-30 19:26 ` [PATCH v2 1/3] tegra: add funcmux for exposing UART over uSD slot on Tegra 20 Artur Kowalski
@ 2025-03-31 5:42 ` Svyatoslav Ryhel
2025-04-12 9:53 ` Svyatoslav Ryhel
0 siblings, 1 reply; 13+ messages in thread
From: Svyatoslav Ryhel @ 2025-03-31 5:42 UTC (permalink / raw)
To: Artur Kowalski
Cc: u-boot, Jonas Schwöbel, Marek Vasut, Peter Robinson,
Simon Glass, Stephen Warren, Thierry Reding, Tom Rini, Tom Warren
нд, 30 бер. 2025 р. о 22:27 Artur Kowalski <arturkow2000@gmail.com> пише:
>
> UART-A can be exposed through uSD, this was tested on Transformer T20
> but should work on all Ventana-based boards.
>
> TX is exported on SDD pingroup corresponding to uSD CLK pin
> RX is exported on SDB which is CMD pin in uSD slot
>
> Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
> ---
>
> Changes in v2:
> - fixed indentation of preprocessor directives
>
> arch/arm/include/asm/arch-tegra20/funcmux.h | 1 +
> arch/arm/mach-tegra/board.c | 2 ++
> arch/arm/mach-tegra/tegra20/Kconfig | 3 +++
> drivers/pinctrl/tegra/funcmux-tegra20.c | 9 ++++++++-
> 4 files changed, 14 insertions(+), 1 deletion(-)
>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/3] tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20
2025-03-30 19:26 ` [PATCH v2 2/3] tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20 Artur Kowalski
@ 2025-03-31 5:48 ` Svyatoslav Ryhel
2025-04-01 13:30 ` Artur Kowalski
0 siblings, 1 reply; 13+ messages in thread
From: Svyatoslav Ryhel @ 2025-03-31 5:48 UTC (permalink / raw)
To: Artur Kowalski
Cc: u-boot, Francesco Dolcini, Simon Glass, Stephen Warren, Tom Rini,
Tom Warren
нд, 30 бер. 2025 р. о 22:27 Artur Kowalski <arturkow2000@gmail.com> пише:
>
> If debug UART is set to anything other than UARTD, U-Boot's SPL hangs
> trying to communicate with UARTD which clock won't be ungated. With this
> patch it is possible to boot with UARTA enabled.
>
> Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
> ---
>
> (no changes since v1)
>
> include/configs/transformer-t20.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/include/configs/transformer-t20.h b/include/configs/transformer-t20.h
> index 6a3d9b24036..d3a98cc5a70 100644
> --- a/include/configs/transformer-t20.h
> +++ b/include/configs/transformer-t20.h
> @@ -16,7 +16,17 @@
> #define CFG_TEGRA_BOARD_STRING "ASUS Transformer"
>
> /* Board-specific serial config */
> +#if defined(CONFIG_TEGRA_ENABLE_UARTA)
> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
> +#elif defined(CONFIG_TEGRA_ENABLE_UARTB)
> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTB_BASE
> +#elif defined(CONFIG_TEGRA_ENABLE_UARTC)
> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARCD_BASE
> +#elif defined(CONFIG_TEGRA_ENABLE_UARTD)
> #define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
> +#elif defined(CONFIG_TEGRA_ENABLE_UARTE)
> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTE_BASE
> +#endif
>
Here you are actually hitting much much deeper thing. You are applying
fix to the result, not the cause. Adjustment should be done in the
tegra board itself with amending all existing tegra boards. As a
maintainer I cannot insist on you doing this unless you willingly
agree. You have time to answer till 02.03.25 and if no answer I will
apply patch on my own to custodian tegra/staging branch.
> #include "tegra-common-post.h"
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] tegra: allow to expose UART on microSD slot
2025-03-30 19:26 ` [PATCH v2 3/3] tegra: allow to expose UART on microSD slot Artur Kowalski
@ 2025-03-31 5:51 ` Svyatoslav Ryhel
2025-04-01 13:34 ` Artur Kowalski
0 siblings, 1 reply; 13+ messages in thread
From: Svyatoslav Ryhel @ 2025-03-31 5:51 UTC (permalink / raw)
To: Artur Kowalski
Cc: u-boot, Simon Glass, Stephen Warren, Thierry Reding, Tom Rini,
Tom Warren
нд, 30 бер. 2025 р. о 22:27 Artur Kowalski <arturkow2000@gmail.com> пише:
>
> Tegra20 has mux allowing to repurpose microSD as UART on boards which
> use sdmmc3 controller for microSD. Add TEGRA_UARTA_MICROSD to enable
> this feature. It is currently supported on Transformer T20, support for
> other boards may require Device Tree changes.
>
> Update Transformer T20 DTS to select correct pinmux and stdout-path
> based on TEGRA_UARTA_MICROSD.
>
> Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
> ---
>
> Changes in v2:
> - added TEGRA_UARTA_MICROSD Kconfig option
> - removed .dtsi for enabling UART over microSD
> - modified transformer DT to use UARTA and correct pinmux when
> TEGRA_UARTA_MICROSD is enabled; it is enough to flip a single
> switch to enable/disable UART over microSD
>
> arch/arm/dts/tegra20-asus-transformer.dtsi | 24 ++++++++++++++++++++++
> arch/arm/mach-tegra/tegra20/Kconfig | 15 ++++++++++++++
> 2 files changed, 39 insertions(+)
>
> diff --git a/arch/arm/dts/tegra20-asus-transformer.dtsi b/arch/arm/dts/tegra20-asus-transformer.dtsi
> index 49efabbfd92..9ea323c81f3 100644
> --- a/arch/arm/dts/tegra20-asus-transformer.dtsi
> +++ b/arch/arm/dts/tegra20-asus-transformer.dtsi
> @@ -5,7 +5,13 @@
>
> / {
> chosen {
> +#if CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTA)
> + stdout-path = &uarta;
> +#elif CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTD)
> stdout-path = &uartd;
> +#else
> +#error Unsupported UART
> +#endif
> };
>
> aliases {
> @@ -195,10 +201,17 @@
> nvidia,function = "i2c1";
> };
>
> +#if CONFIG_IS_ENABLED(TEGRA_UARTA_SDB_SDD)
> + dbguart {
> + nvidia,pins = "sdb", "sdd";
> + nvidia,function = "uarta";
> + };
> +#else
> sdb {
> nvidia,pins = "sdb", "sdc", "sdd", "slxc", "slxk";
> nvidia,function = "sdio3";
> };
> +#endif
>
> sdio1 {
> nvidia,pins = "sdio1";
> @@ -376,7 +389,13 @@
> };
> };
>
> +#if CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTA)
> + uarta: serial@70006000 {
> +#elif CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTD)
> uartd: serial@70006300 {
> +#else
> +#error Unsupported UART
> +#endif
> status = "okay";
> clock-frequency = <216000000>;
> };
> @@ -434,7 +453,12 @@
> };
>
> sdmmc3: sdhci@c8000400 {
> +#if CONFIG_IS_ENABLED(TEGRA_UARTA_MICROSD)
> + /* Can't use both at the same time */
> + status = "disabled";
> +#else
> status = "okay";
> +#endif
> bus-width = <4>;
>
> cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
> diff --git a/arch/arm/mach-tegra/tegra20/Kconfig b/arch/arm/mach-tegra/tegra20/Kconfig
> index 3349f1e2786..c2c51660216 100644
> --- a/arch/arm/mach-tegra/tegra20/Kconfig
> +++ b/arch/arm/mach-tegra/tegra20/Kconfig
> @@ -77,6 +77,21 @@ endchoice
> config SYS_SOC
> default "tegra20"
>
> +config TEGRA_UARTA_MICROSD
> + bool "UARTA on MicroSD breakout board"
> + default n
> + depends on TEGRA_ENABLE_UARTA && TARGET_TRANSFORMER_T20
> + select TEGRA_UARTA_SDB_SDD
> + help
> + Repurpose the SD card slot for getting access to the UARTA serial
> + console. Primarily useful only for low level u-boot debugging on
> + tablets, where normal UARTD is difficult to access and requires
> + device disassembly and/or soldering. Enabling this option causes
> + UARTA TX to become exposed on SDD and RX on SDB pins which correspond
> + to microSD CLK and CMD pins respectively. Currently this is supported
> + only on Transformer T20, support for other platforms may require DT
> + and configs (from include/configs/*) updates.
> +
> source "board/nvidia/harmony/Kconfig"
> source "board/avionic-design/medcom-wide/Kconfig"
> source "board/compal/paz00/Kconfig"
> --
> 2.48.1
>
This is not applicable since this is a hack by nature, BUT if you
contain this in the transformer t20 board and Kconfig (no dts
changes), this may be applied.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/3] tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20
2025-03-31 5:48 ` Svyatoslav Ryhel
@ 2025-04-01 13:30 ` Artur Kowalski
2025-04-01 13:40 ` Svyatoslav Ryhel
0 siblings, 1 reply; 13+ messages in thread
From: Artur Kowalski @ 2025-04-01 13:30 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: u-boot, Francesco Dolcini, Simon Glass, Stephen Warren, Tom Rini,
Tom Warren
W dniu 31.03.2025 o 07:48, Svyatoslav Ryhel pisze:
> нд, 30 бер. 2025 р. о 22:27 Artur Kowalski <arturkow2000@gmail.com> пише:
>> If debug UART is set to anything other than UARTD, U-Boot's SPL hangs
>> trying to communicate with UARTD which clock won't be ungated. With this
>> patch it is possible to boot with UARTA enabled.
>>
>> Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
>> ---
>>
>> (no changes since v1)
>>
>> include/configs/transformer-t20.h | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/include/configs/transformer-t20.h b/include/configs/transformer-t20.h
>> index 6a3d9b24036..d3a98cc5a70 100644
>> --- a/include/configs/transformer-t20.h
>> +++ b/include/configs/transformer-t20.h
>> @@ -16,7 +16,17 @@
>> #define CFG_TEGRA_BOARD_STRING "ASUS Transformer"
>>
>> /* Board-specific serial config */
>> +#if defined(CONFIG_TEGRA_ENABLE_UARTA)
>> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
>> +#elif defined(CONFIG_TEGRA_ENABLE_UARTB)
>> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTB_BASE
>> +#elif defined(CONFIG_TEGRA_ENABLE_UARTC)
>> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARCD_BASE
>> +#elif defined(CONFIG_TEGRA_ENABLE_UARTD)
>> #define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
>> +#elif defined(CONFIG_TEGRA_ENABLE_UARTE)
>> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTE_BASE
>> +#endif
>>
> Here you are actually hitting much much deeper thing. You are applying
> fix to the result, not the cause. Adjustment should be done in the
> tegra board itself with amending all existing tegra boards. As a
> maintainer I cannot insist on you doing this unless you willingly
> agree. You have time to answer till 02.03.25 and if no answer I will
> apply patch on my own to custodian tegra/staging branch.
I'd like to do it but unfortunately I won't have enought time this week.
>> #include "tegra-common-post.h"
>>
>> --
>> 2.48.1
>>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] tegra: allow to expose UART on microSD slot
2025-03-31 5:51 ` Svyatoslav Ryhel
@ 2025-04-01 13:34 ` Artur Kowalski
2025-04-01 13:48 ` Svyatoslav Ryhel
0 siblings, 1 reply; 13+ messages in thread
From: Artur Kowalski @ 2025-04-01 13:34 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: u-boot, Simon Glass, Stephen Warren, Thierry Reding, Tom Rini,
Tom Warren
W dniu 31.03.2025 o 07:51, Svyatoslav Ryhel pisze:
> нд, 30 бер. 2025 р. о 22:27 Artur Kowalski <arturkow2000@gmail.com> пише:
>> Tegra20 has mux allowing to repurpose microSD as UART on boards which
>> use sdmmc3 controller for microSD. Add TEGRA_UARTA_MICROSD to enable
>> this feature. It is currently supported on Transformer T20, support for
>> other boards may require Device Tree changes.
>>
>> Update Transformer T20 DTS to select correct pinmux and stdout-path
>> based on TEGRA_UARTA_MICROSD.
>>
>> Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
>> ---
>>
>> Changes in v2:
>> - added TEGRA_UARTA_MICROSD Kconfig option
>> - removed .dtsi for enabling UART over microSD
>> - modified transformer DT to use UARTA and correct pinmux when
>> TEGRA_UARTA_MICROSD is enabled; it is enough to flip a single
>> switch to enable/disable UART over microSD
>>
>> arch/arm/dts/tegra20-asus-transformer.dtsi | 24 ++++++++++++++++++++++
>> arch/arm/mach-tegra/tegra20/Kconfig | 15 ++++++++++++++
>> 2 files changed, 39 insertions(+)
>>
>> diff --git a/arch/arm/dts/tegra20-asus-transformer.dtsi b/arch/arm/dts/tegra20-asus-transformer.dtsi
>> index 49efabbfd92..9ea323c81f3 100644
>> --- a/arch/arm/dts/tegra20-asus-transformer.dtsi
>> +++ b/arch/arm/dts/tegra20-asus-transformer.dtsi
>> @@ -5,7 +5,13 @@
>>
>> / {
>> chosen {
>> +#if CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTA)
>> + stdout-path = &uarta;
>> +#elif CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTD)
>> stdout-path = &uartd;
>> +#else
>> +#error Unsupported UART
>> +#endif
>> };
>>
>> aliases {
>> @@ -195,10 +201,17 @@
>> nvidia,function = "i2c1";
>> };
>>
>> +#if CONFIG_IS_ENABLED(TEGRA_UARTA_SDB_SDD)
>> + dbguart {
>> + nvidia,pins = "sdb", "sdd";
>> + nvidia,function = "uarta";
>> + };
>> +#else
>> sdb {
>> nvidia,pins = "sdb", "sdc", "sdd", "slxc", "slxk";
>> nvidia,function = "sdio3";
>> };
>> +#endif
>>
>> sdio1 {
>> nvidia,pins = "sdio1";
>> @@ -376,7 +389,13 @@
>> };
>> };
>>
>> +#if CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTA)
>> + uarta: serial@70006000 {
>> +#elif CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTD)
>> uartd: serial@70006300 {
>> +#else
>> +#error Unsupported UART
>> +#endif
>> status = "okay";
>> clock-frequency = <216000000>;
>> };
>> @@ -434,7 +453,12 @@
>> };
>>
>> sdmmc3: sdhci@c8000400 {
>> +#if CONFIG_IS_ENABLED(TEGRA_UARTA_MICROSD)
>> + /* Can't use both at the same time */
>> + status = "disabled";
>> +#else
>> status = "okay";
>> +#endif
>> bus-width = <4>;
>>
>> cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
>> diff --git a/arch/arm/mach-tegra/tegra20/Kconfig b/arch/arm/mach-tegra/tegra20/Kconfig
>> index 3349f1e2786..c2c51660216 100644
>> --- a/arch/arm/mach-tegra/tegra20/Kconfig
>> +++ b/arch/arm/mach-tegra/tegra20/Kconfig
>> @@ -77,6 +77,21 @@ endchoice
>> config SYS_SOC
>> default "tegra20"
>>
>> +config TEGRA_UARTA_MICROSD
>> + bool "UARTA on MicroSD breakout board"
>> + default n
>> + depends on TEGRA_ENABLE_UARTA && TARGET_TRANSFORMER_T20
>> + select TEGRA_UARTA_SDB_SDD
>> + help
>> + Repurpose the SD card slot for getting access to the UARTA serial
>> + console. Primarily useful only for low level u-boot debugging on
>> + tablets, where normal UARTD is difficult to access and requires
>> + device disassembly and/or soldering. Enabling this option causes
>> + UARTA TX to become exposed on SDD and RX on SDB pins which correspond
>> + to microSD CLK and CMD pins respectively. Currently this is supported
>> + only on Transformer T20, support for other platforms may require DT
>> + and configs (from include/configs/*) updates.
>> +
>> source "board/nvidia/harmony/Kconfig"
>> source "board/avionic-design/medcom-wide/Kconfig"
>> source "board/compal/paz00/Kconfig"
>> --
>> 2.48.1
>>
> This is not applicable since this is a hack by nature, BUT if you
> contain this in the transformer t20 board and Kconfig (no dts
> changes), this may be applied.
Ok, then I'll drop DTS changes. I will add few words about this option
in Transformer documentation
and a note in Kconfig help to not surprise users with not booting U-Boot
as enabling this option without
changing DTS causes U-Boot to hang.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/3] tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20
2025-04-01 13:30 ` Artur Kowalski
@ 2025-04-01 13:40 ` Svyatoslav Ryhel
0 siblings, 0 replies; 13+ messages in thread
From: Svyatoslav Ryhel @ 2025-04-01 13:40 UTC (permalink / raw)
To: Artur Kowalski
Cc: u-boot, Francesco Dolcini, Simon Glass, Stephen Warren, Tom Rini,
Tom Warren
вт, 1 квіт. 2025 р. о 16:30 Artur Kowalski <arturkow2000@gmail.com> пише:
>
>
> W dniu 31.03.2025 o 07:48, Svyatoslav Ryhel pisze:
> > нд, 30 бер. 2025 р. о 22:27 Artur Kowalski <arturkow2000@gmail.com> пише:
> >> If debug UART is set to anything other than UARTD, U-Boot's SPL hangs
> >> trying to communicate with UARTD which clock won't be ungated. With this
> >> patch it is possible to boot with UARTA enabled.
> >>
> >> Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
> >> ---
> >>
> >> (no changes since v1)
> >>
> >> include/configs/transformer-t20.h | 10 ++++++++++
> >> 1 file changed, 10 insertions(+)
> >>
> >> diff --git a/include/configs/transformer-t20.h b/include/configs/transformer-t20.h
> >> index 6a3d9b24036..d3a98cc5a70 100644
> >> --- a/include/configs/transformer-t20.h
> >> +++ b/include/configs/transformer-t20.h
> >> @@ -16,7 +16,17 @@
> >> #define CFG_TEGRA_BOARD_STRING "ASUS Transformer"
> >>
> >> /* Board-specific serial config */
> >> +#if defined(CONFIG_TEGRA_ENABLE_UARTA)
> >> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
> >> +#elif defined(CONFIG_TEGRA_ENABLE_UARTB)
> >> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTB_BASE
> >> +#elif defined(CONFIG_TEGRA_ENABLE_UARTC)
> >> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARCD_BASE
> >> +#elif defined(CONFIG_TEGRA_ENABLE_UARTD)
> >> #define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
> >> +#elif defined(CONFIG_TEGRA_ENABLE_UARTE)
> >> +#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTE_BASE
> >> +#endif
> >>
> > Here you are actually hitting much much deeper thing. You are applying
> > fix to the result, not the cause. Adjustment should be done in the
> > tegra board itself with amending all existing tegra boards. As a
> > maintainer I cannot insist on you doing this unless you willingly
> > agree. You have time to answer till 02.03.25 and if no answer I will
> > apply patch on my own to custodian tegra/staging branch.
> I'd like to do it but unfortunately I won't have enought time this week.
Thanks for responding. Don't worry, I was planning to remove
per-device headers anyway so I will include you into patchset which
should address the root of this issue you are facing.
> >> #include "tegra-common-post.h"
> >>
> >> --
> >> 2.48.1
> >>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] tegra: allow to expose UART on microSD slot
2025-04-01 13:34 ` Artur Kowalski
@ 2025-04-01 13:48 ` Svyatoslav Ryhel
2025-04-22 15:37 ` Artur Kowalski
0 siblings, 1 reply; 13+ messages in thread
From: Svyatoslav Ryhel @ 2025-04-01 13:48 UTC (permalink / raw)
To: Artur Kowalski
Cc: u-boot, Simon Glass, Stephen Warren, Thierry Reding, Tom Rini,
Tom Warren
вт, 1 квіт. 2025 р. о 16:34 Artur Kowalski <arturkow2000@gmail.com> пише:
>
>
> W dniu 31.03.2025 o 07:51, Svyatoslav Ryhel pisze:
> > нд, 30 бер. 2025 р. о 22:27 Artur Kowalski <arturkow2000@gmail.com> пише:
> >> Tegra20 has mux allowing to repurpose microSD as UART on boards which
> >> use sdmmc3 controller for microSD. Add TEGRA_UARTA_MICROSD to enable
> >> this feature. It is currently supported on Transformer T20, support for
> >> other boards may require Device Tree changes.
> >>
> >> Update Transformer T20 DTS to select correct pinmux and stdout-path
> >> based on TEGRA_UARTA_MICROSD.
> >>
> >> Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
> >> ---
> >>
> >> Changes in v2:
> >> - added TEGRA_UARTA_MICROSD Kconfig option
> >> - removed .dtsi for enabling UART over microSD
> >> - modified transformer DT to use UARTA and correct pinmux when
> >> TEGRA_UARTA_MICROSD is enabled; it is enough to flip a single
> >> switch to enable/disable UART over microSD
> >>
> >> arch/arm/dts/tegra20-asus-transformer.dtsi | 24 ++++++++++++++++++++++
> >> arch/arm/mach-tegra/tegra20/Kconfig | 15 ++++++++++++++
> >> 2 files changed, 39 insertions(+)
> >>
> >> diff --git a/arch/arm/dts/tegra20-asus-transformer.dtsi b/arch/arm/dts/tegra20-asus-transformer.dtsi
> >> index 49efabbfd92..9ea323c81f3 100644
> >> --- a/arch/arm/dts/tegra20-asus-transformer.dtsi
> >> +++ b/arch/arm/dts/tegra20-asus-transformer.dtsi
> >> @@ -5,7 +5,13 @@
> >>
> >> / {
> >> chosen {
> >> +#if CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTA)
> >> + stdout-path = &uarta;
> >> +#elif CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTD)
> >> stdout-path = &uartd;
> >> +#else
> >> +#error Unsupported UART
> >> +#endif
> >> };
> >>
> >> aliases {
> >> @@ -195,10 +201,17 @@
> >> nvidia,function = "i2c1";
> >> };
> >>
> >> +#if CONFIG_IS_ENABLED(TEGRA_UARTA_SDB_SDD)
> >> + dbguart {
> >> + nvidia,pins = "sdb", "sdd";
> >> + nvidia,function = "uarta";
> >> + };
> >> +#else
> >> sdb {
> >> nvidia,pins = "sdb", "sdc", "sdd", "slxc", "slxk";
> >> nvidia,function = "sdio3";
> >> };
> >> +#endif
> >>
> >> sdio1 {
> >> nvidia,pins = "sdio1";
> >> @@ -376,7 +389,13 @@
> >> };
> >> };
> >>
> >> +#if CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTA)
> >> + uarta: serial@70006000 {
> >> +#elif CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTD)
> >> uartd: serial@70006300 {
> >> +#else
> >> +#error Unsupported UART
> >> +#endif
> >> status = "okay";
> >> clock-frequency = <216000000>;
> >> };
> >> @@ -434,7 +453,12 @@
> >> };
> >>
> >> sdmmc3: sdhci@c8000400 {
> >> +#if CONFIG_IS_ENABLED(TEGRA_UARTA_MICROSD)
> >> + /* Can't use both at the same time */
> >> + status = "disabled";
> >> +#else
> >> status = "okay";
> >> +#endif
> >> bus-width = <4>;
> >>
> >> cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
> >> diff --git a/arch/arm/mach-tegra/tegra20/Kconfig b/arch/arm/mach-tegra/tegra20/Kconfig
> >> index 3349f1e2786..c2c51660216 100644
> >> --- a/arch/arm/mach-tegra/tegra20/Kconfig
> >> +++ b/arch/arm/mach-tegra/tegra20/Kconfig
> >> @@ -77,6 +77,21 @@ endchoice
> >> config SYS_SOC
> >> default "tegra20"
> >>
> >> +config TEGRA_UARTA_MICROSD
> >> + bool "UARTA on MicroSD breakout board"
> >> + default n
> >> + depends on TEGRA_ENABLE_UARTA && TARGET_TRANSFORMER_T20
> >> + select TEGRA_UARTA_SDB_SDD
> >> + help
> >> + Repurpose the SD card slot for getting access to the UARTA serial
> >> + console. Primarily useful only for low level u-boot debugging on
> >> + tablets, where normal UARTD is difficult to access and requires
> >> + device disassembly and/or soldering. Enabling this option causes
> >> + UARTA TX to become exposed on SDD and RX on SDB pins which correspond
> >> + to microSD CLK and CMD pins respectively. Currently this is supported
> >> + only on Transformer T20, support for other platforms may require DT
> >> + and configs (from include/configs/*) updates.
> >> +
> >> source "board/nvidia/harmony/Kconfig"
> >> source "board/avionic-design/medcom-wide/Kconfig"
> >> source "board/compal/paz00/Kconfig"
> >> --
> >> 2.48.1
> >>
> > This is not applicable since this is a hack by nature, BUT if you
> > contain this in the transformer t20 board and Kconfig (no dts
> > changes), this may be applied.
> Ok, then I'll drop DTS changes. I will add few words about this option
> in Transformer documentation
> and a note in Kconfig help to not surprise users with not booting U-Boot
> as enabling this option without
> changing DTS causes U-Boot to hang.
You should remove then Kconfig option as well. Add a new chapter to
Transformer T20 documentation which describes this method, here[1] you
may find a similar approach but info is in the commit message of
tegra30 uart-e funcmux. Additionally, as I have said previously, these
changes can be contained in the transformer t20 board file by using
some device tree manipulations from there.
---
1 https://source.denx.de/u-boot/u-boot/-/commit/b515d7ae0de51a26f73b2ddb5ea4db0d95b67d7a
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/3] tegra: add funcmux for exposing UART over uSD slot on Tegra 20
2025-03-31 5:42 ` Svyatoslav Ryhel
@ 2025-04-12 9:53 ` Svyatoslav Ryhel
0 siblings, 0 replies; 13+ messages in thread
From: Svyatoslav Ryhel @ 2025-04-12 9:53 UTC (permalink / raw)
To: Artur Kowalski
Cc: u-boot, Jonas Schwöbel, Marek Vasut, Peter Robinson,
Simon Glass, Thierry Reding, Tom Rini
пн, 31 бер. 2025 р. о 08:42 Svyatoslav Ryhel <clamor95@gmail.com> пише:
>
> нд, 30 бер. 2025 р. о 22:27 Artur Kowalski <arturkow2000@gmail.com> пише:
> >
> > UART-A can be exposed through uSD, this was tested on Transformer T20
> > but should work on all Ventana-based boards.
> >
> > TX is exported on SDD pingroup corresponding to uSD CLK pin
> > RX is exported on SDB which is CMD pin in uSD slot
> >
> > Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
> > ---
> >
> > Changes in v2:
> > - fixed indentation of preprocessor directives
> >
> > arch/arm/include/asm/arch-tegra20/funcmux.h | 1 +
> > arch/arm/mach-tegra/board.c | 2 ++
> > arch/arm/mach-tegra/tegra20/Kconfig | 3 +++
> > drivers/pinctrl/tegra/funcmux-tegra20.c | 9 ++++++++-
> > 4 files changed, 14 insertions(+), 1 deletion(-)
> >
>
> Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
Applied to u-boot-tegra/staging.
Thank you.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] tegra: allow to expose UART on microSD slot
2025-04-01 13:48 ` Svyatoslav Ryhel
@ 2025-04-22 15:37 ` Artur Kowalski
0 siblings, 0 replies; 13+ messages in thread
From: Artur Kowalski @ 2025-04-22 15:37 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: u-boot, Simon Glass, Stephen Warren, Thierry Reding, Tom Rini,
Tom Warren
W dniu 01.04.2025 o 15:48, Svyatoslav Ryhel pisze:
> вт, 1 квіт. 2025 р. о 16:34 Artur Kowalski <arturkow2000@gmail.com> пише:
>>
>> W dniu 31.03.2025 o 07:51, Svyatoslav Ryhel pisze:
>>> нд, 30 бер. 2025 р. о 22:27 Artur Kowalski <arturkow2000@gmail.com> пише:
>>>> Tegra20 has mux allowing to repurpose microSD as UART on boards which
>>>> use sdmmc3 controller for microSD. Add TEGRA_UARTA_MICROSD to enable
>>>> this feature. It is currently supported on Transformer T20, support for
>>>> other boards may require Device Tree changes.
>>>>
>>>> Update Transformer T20 DTS to select correct pinmux and stdout-path
>>>> based on TEGRA_UARTA_MICROSD.
>>>>
>>>> Signed-off-by: Artur Kowalski <arturkow2000@gmail.com>
>>>> ---
>>>>
>>>> Changes in v2:
>>>> - added TEGRA_UARTA_MICROSD Kconfig option
>>>> - removed .dtsi for enabling UART over microSD
>>>> - modified transformer DT to use UARTA and correct pinmux when
>>>> TEGRA_UARTA_MICROSD is enabled; it is enough to flip a single
>>>> switch to enable/disable UART over microSD
>>>>
>>>> arch/arm/dts/tegra20-asus-transformer.dtsi | 24 ++++++++++++++++++++++
>>>> arch/arm/mach-tegra/tegra20/Kconfig | 15 ++++++++++++++
>>>> 2 files changed, 39 insertions(+)
>>>>
>>>> diff --git a/arch/arm/dts/tegra20-asus-transformer.dtsi b/arch/arm/dts/tegra20-asus-transformer.dtsi
>>>> index 49efabbfd92..9ea323c81f3 100644
>>>> --- a/arch/arm/dts/tegra20-asus-transformer.dtsi
>>>> +++ b/arch/arm/dts/tegra20-asus-transformer.dtsi
>>>> @@ -5,7 +5,13 @@
>>>>
>>>> / {
>>>> chosen {
>>>> +#if CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTA)
>>>> + stdout-path = &uarta;
>>>> +#elif CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTD)
>>>> stdout-path = &uartd;
>>>> +#else
>>>> +#error Unsupported UART
>>>> +#endif
>>>> };
>>>>
>>>> aliases {
>>>> @@ -195,10 +201,17 @@
>>>> nvidia,function = "i2c1";
>>>> };
>>>>
>>>> +#if CONFIG_IS_ENABLED(TEGRA_UARTA_SDB_SDD)
>>>> + dbguart {
>>>> + nvidia,pins = "sdb", "sdd";
>>>> + nvidia,function = "uarta";
>>>> + };
>>>> +#else
>>>> sdb {
>>>> nvidia,pins = "sdb", "sdc", "sdd", "slxc", "slxk";
>>>> nvidia,function = "sdio3";
>>>> };
>>>> +#endif
>>>>
>>>> sdio1 {
>>>> nvidia,pins = "sdio1";
>>>> @@ -376,7 +389,13 @@
>>>> };
>>>> };
>>>>
>>>> +#if CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTA)
>>>> + uarta: serial@70006000 {
>>>> +#elif CONFIG_IS_ENABLED(TEGRA_ENABLE_UARTD)
>>>> uartd: serial@70006300 {
>>>> +#else
>>>> +#error Unsupported UART
>>>> +#endif
>>>> status = "okay";
>>>> clock-frequency = <216000000>;
>>>> };
>>>> @@ -434,7 +453,12 @@
>>>> };
>>>>
>>>> sdmmc3: sdhci@c8000400 {
>>>> +#if CONFIG_IS_ENABLED(TEGRA_UARTA_MICROSD)
>>>> + /* Can't use both at the same time */
>>>> + status = "disabled";
>>>> +#else
>>>> status = "okay";
>>>> +#endif
>>>> bus-width = <4>;
>>>>
>>>> cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
>>>> diff --git a/arch/arm/mach-tegra/tegra20/Kconfig b/arch/arm/mach-tegra/tegra20/Kconfig
>>>> index 3349f1e2786..c2c51660216 100644
>>>> --- a/arch/arm/mach-tegra/tegra20/Kconfig
>>>> +++ b/arch/arm/mach-tegra/tegra20/Kconfig
>>>> @@ -77,6 +77,21 @@ endchoice
>>>> config SYS_SOC
>>>> default "tegra20"
>>>>
>>>> +config TEGRA_UARTA_MICROSD
>>>> + bool "UARTA on MicroSD breakout board"
>>>> + default n
>>>> + depends on TEGRA_ENABLE_UARTA && TARGET_TRANSFORMER_T20
>>>> + select TEGRA_UARTA_SDB_SDD
>>>> + help
>>>> + Repurpose the SD card slot for getting access to the UARTA serial
>>>> + console. Primarily useful only for low level u-boot debugging on
>>>> + tablets, where normal UARTD is difficult to access and requires
>>>> + device disassembly and/or soldering. Enabling this option causes
>>>> + UARTA TX to become exposed on SDD and RX on SDB pins which correspond
>>>> + to microSD CLK and CMD pins respectively. Currently this is supported
>>>> + only on Transformer T20, support for other platforms may require DT
>>>> + and configs (from include/configs/*) updates.
>>>> +
>>>> source "board/nvidia/harmony/Kconfig"
>>>> source "board/avionic-design/medcom-wide/Kconfig"
>>>> source "board/compal/paz00/Kconfig"
>>>> --
>>>> 2.48.1
>>>>
>>> This is not applicable since this is a hack by nature, BUT if you
>>> contain this in the transformer t20 board and Kconfig (no dts
>>> changes), this may be applied.
>> Ok, then I'll drop DTS changes. I will add few words about this option
>> in Transformer documentation
>> and a note in Kconfig help to not surprise users with not booting U-Boot
>> as enabling this option without
>> changing DTS causes U-Boot to hang.
> You should remove then Kconfig option as well. Add a new chapter to
> Transformer T20 documentation which describes this method, here[1] you
> may find a similar approach but info is in the commit message of
> tegra30 uart-e funcmux. Additionally, as I have said previously, these
> changes can be contained in the transformer t20 board file by using
> some device tree manipulations from there.
Currently I'm working on few other things both in U-Boot in OS, some of
patches probably I will send to upstream
in the coming weeks, but eventually, I will come back to this.
> ---
> 1 https://source.denx.de/u-boot/u-boot/-/commit/b515d7ae0de51a26f73b2ddb5ea4db0d95b67d7a
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-04-22 15:37 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-30 19:26 [PATCH v2 0/3] Support UART over MicroSD slot on Transformer T20 Artur Kowalski
2025-03-30 19:26 ` [PATCH v2 1/3] tegra: add funcmux for exposing UART over uSD slot on Tegra 20 Artur Kowalski
2025-03-31 5:42 ` Svyatoslav Ryhel
2025-04-12 9:53 ` Svyatoslav Ryhel
2025-03-30 19:26 ` [PATCH v2 2/3] tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20 Artur Kowalski
2025-03-31 5:48 ` Svyatoslav Ryhel
2025-04-01 13:30 ` Artur Kowalski
2025-04-01 13:40 ` Svyatoslav Ryhel
2025-03-30 19:26 ` [PATCH v2 3/3] tegra: allow to expose UART on microSD slot Artur Kowalski
2025-03-31 5:51 ` Svyatoslav Ryhel
2025-04-01 13:34 ` Artur Kowalski
2025-04-01 13:48 ` Svyatoslav Ryhel
2025-04-22 15:37 ` Artur Kowalski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox