Skip to contentSkip to conversation

Support UART over MicroSD slot on Transformer T20

PATCH Superseded Artur Kowalski 2 participants 10 messages Mar 18, 2025 – Mar 31, 2025

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Support UART over MicroSD slot on Transformer T20

The first patch in the series brings general pinmux support for exposing UART over SDB/SDD pins on T20. The following patches bring support Transformer T20 allowing to enable UART over uSD by setting

CONFIG_TEGRA_ENABLE_UARTA=y CONFIG_DEVICE_TREE_INCLUDES="tegra20-asus-transformer-uart-usd.dtsi"

Similarily, support for UART over uSD could be brought to Ventana which has uSD on the same pins as TF101, and other Ventana-based boards.

Artur Kowalski (4):
tegra: add funcmux for exposing UART over uSD slot on Tegra 20
tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20
ARM: tegra: expose UART-A over uSD on Transformer T20
board: asus: transformer: add DTSI file for enabling UART over uSD
slot

 .../tegra20-asus-transformer-uart-usd.dtsi    | 31 +++++++++++++++++++
 arch/arm/include/asm/arch-tegra20/funcmux.h   |  1 +
 arch/arm/mach-tegra/board.c                   |  4 ++-
 arch/arm/mach-tegra/tegra20/Kconfig           |  4 +++
 drivers/pinctrl/tegra/funcmux-tegra20.c       |  9 +++++-
 include/configs/transformer-t20.h             | 10 ++++++
 6 files changed, 57 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/tegra20-asus-transformer-uart-usd.dtsi
Signature · 1 line
2.48.1
#1 lore raw

вт, 18 бер. 2025 р. о 10:31 Artur Kowalski <[email protected]> пише:

Quoted 6 lines

The first patch in the series brings general pinmux support for exposing UART over SDB/SDD pins on T20. The following patches bring support Transformer T20 allowing to enable UART over uSD by setting

Quoted 6 lines

CONFIG_TEGRA_ENABLE_UARTA=y CONFIG_DEVICE_TREE_INCLUDES="tegra20-asus-transformer-uart-usd.dtsi"

Similarily, support for UART over uSD could be brought to Ventana which has uSD on the same pins as TF101, and other Ventana-based boards.

Hey there, thank you for looking into U-Boot for Tegra. If something I will say hurts or offends you, I am sorry it was not intentional.

Anyway, apart funcmux changes, all other changes you propose are redundant. Asus dedicated uart for logging and console is UARTD any other uart configuration must not be added since it will disrupt existing configuration. If you need uart and cannot resolve an issue without it you can always solder to uart-d or locally mux sd to uart console fix your issue and remove it. Uart is not intended way to interact with Asus TF101 and doesn't need to be exposed, panel and fastboot console are and can be used to resolve most of issues.

Best regards,
Svyatoslav R.

Quoted 20 lines

Artur Kowalski (4):
tegra: add funcmux for exposing UART over uSD slot on Tegra 20
tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20
ARM: tegra: expose UART-A over uSD on Transformer T20
board: asus: transformer: add DTSI file for enabling UART over uSD
slot

 .../tegra20-asus-transformer-uart-usd.dtsi    | 31 +++++++++++++++++++
 arch/arm/include/asm/arch-tegra20/funcmux.h   |  1 +
 arch/arm/mach-tegra/board.c                   |  4 ++-
 arch/arm/mach-tegra/tegra20/Kconfig           |  4 +++
 drivers/pinctrl/tegra/funcmux-tegra20.c       |  9 +++++-
 include/configs/transformer-t20.h             | 10 ++++++
 6 files changed, 57 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/tegra20-asus-transformer-uart-usd.dtsi

--
2.48.1

#2 lore raw

Hello

Thanks for quick response. I know UARTD is the dedicated UART for debugging on TF101, but exposing UART over microSD is a handy trick useful for development. As I'm doing development on this tablet (bringing U-Boot's UEFI support and latest Linux), and also still using the device on old OS I'd like to avoid disassembling and reassembling it over and over again. Others too may find the feature useful e. g. to avoid having to solder which requires specialized equipment, skills and is potentially dangerous for the board. Also, there already seems to be support for that on Sunxi platforms through CONFIG_UART0_PORT_F.

Apart from pinmux changes, would it be acceptable to include an option to allow switching UARTA mux to SDB/SDD (currently this has to be selected from board's Kconfig file). Doing so would allow to enable UART over microSD without patching U-Boot's source without changing any existing configuration. Then I would keep DTS overlays and config changes local.

Also, today, after running U-Boot with debug enabled, I discovered some failed assertions in pinmux code probably caused by my changes, I will get that fixed before sending v2.

Best regards
Artur Kowalski

W dniu 18.03.2025 o 09:54, Svyatoslav Ryhel pisze:

Quoted 46 lines

вт, 18 бер. 2025 р. о 10:31 Artur Kowalski <[email protected]> пише:

Quoted 11 lines

The first patch in the series brings general pinmux support for exposing UART over SDB/SDD pins on T20. The following patches bring support Transformer T20 allowing to enable UART over uSD by setting

CONFIG_TEGRA_ENABLE_UARTA=y CONFIG_DEVICE_TREE_INCLUDES="tegra20-asus-transformer-uart-usd.dtsi"

Similarily, support for UART over uSD could be brought to Ventana which has uSD on the same pins as TF101, and other Ventana-based boards.

Hey there, thank you for looking into U-Boot for Tegra. If something I will say hurts or offends you, I am sorry it was not intentional.

Anyway, apart funcmux changes, all other changes you propose are redundant. Asus dedicated uart for logging and console is UARTD any other uart configuration must not be added since it will disrupt existing configuration. If you need uart and cannot resolve an issue without it you can always solder to uart-d or locally mux sd to uart console fix your issue and remove it. Uart is not intended way to interact with Asus TF101 and doesn't need to be exposed, panel and fastboot console are and can be used to resolve most of issues.

Best regards,
Svyatoslav R.

Quoted 19 lines

Artur Kowalski (4):
tegra: add funcmux for exposing UART over uSD slot on Tegra 20
tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20
ARM: tegra: expose UART-A over uSD on Transformer T20
board: asus: transformer: add DTSI file for enabling UART over uSD
slot

  .../tegra20-asus-transformer-uart-usd.dtsi    | 31 +++++++++++++++++++
  arch/arm/include/asm/arch-tegra20/funcmux.h   |  1 +
  arch/arm/mach-tegra/board.c                   |  4 ++-
  arch/arm/mach-tegra/tegra20/Kconfig           |  4 +++
  drivers/pinctrl/tegra/funcmux-tegra20.c       |  9 +++++-
  include/configs/transformer-t20.h             | 10 ++++++
  6 files changed, 57 insertions(+), 2 deletions(-)

create mode 100644 arch/arm/dts/tegra20-asus-transformer-uart-usd.dtsi

--
2.48.1

#3 lore raw

пн, 24 бер. 2025 р. о 22:01 Artur Kowalski <[email protected]> пише:

Quoted 6 lines

Hello

Thanks for quick response. I know UARTD is the dedicated UART for debugging on TF101, but exposing UART over microSD
is a handy trick useful for development. As I'm doing development on

It is a handy trick indeed, but it is still just a trick and not smth that fits mainline. Maximum I can propose is picking funcmux change along with uart over sd section in transformer t20 documentation.

Quoted 3 lines

this tablet (bringing U-Boot's UEFI support and latest Linux), and also still using the device on old OS I'd like to avoid disassembling and reassembling it over and over again.

I am not sure what are you doing but TF101 has full support of U-Boot as primary bootloader along with full mainline support till 6.14 including. It uses extlinux boot method and needs no intermediates or chainloading.

If you wish to use U-Boot for tethered booting that is perfectly fine as well.

Quoted 6 lines

Others too may find the feature useful e. g. to avoid having to solder which requires specialized equipment, skills and
is potentially dangerous for the board. Also, there already seems to be support for that on Sunxi platforms through CONFIG_UART0_PORT_F.

Quoted 8 lines

Apart from pinmux changes, would it be acceptable to include an option to allow switching UARTA mux to
SDB/SDD (currently this has to be selected from board's Kconfig file). Doing so would allow to enable UART
over microSD without patching U-Boot's source without changing any existing configuration. Then I would
keep DTS overlays and config changes local.

I am fine with any changes which may simplify debugging for you as long as they do not invade into completed device configuration without a valid reason. Device must expose a dedicated UART for debug, not a mux which breaks some device features just because you do not want to contain them locally.

For example, patches which add UART-E support along with funcmux change which exposes uart-e over usd were accepted, but patch similar to yours which would reconfigure usd to uart for surface rt or p880 would be rejected.

Quoted 54 lines

Also, today, after running U-Boot with debug enabled, I discovered some failed assertions in pinmux code probably
caused by my changes, I will get that fixed before sending v2.

Best regards
Artur Kowalski

W dniu 18.03.2025 o 09:54, Svyatoslav Ryhel pisze:

Quoted 46 lines

вт, 18 бер. 2025 р. о 10:31 Artur Kowalski <[email protected]> пише:

Quoted 11 lines

The first patch in the series brings general pinmux support for exposing UART over SDB/SDD pins on T20. The following patches bring support Transformer T20 allowing to enable UART over uSD by setting

CONFIG_TEGRA_ENABLE_UARTA=y CONFIG_DEVICE_TREE_INCLUDES="tegra20-asus-transformer-uart-usd.dtsi"

Similarily, support for UART over uSD could be brought to Ventana which has uSD on the same pins as TF101, and other Ventana-based boards.

Hey there, thank you for looking into U-Boot for Tegra. If something I will say hurts or offends you, I am sorry it was not intentional.

Anyway, apart funcmux changes, all other changes you propose are redundant. Asus dedicated uart for logging and console is UARTD any other uart configuration must not be added since it will disrupt existing configuration. If you need uart and cannot resolve an issue without it you can always solder to uart-d or locally mux sd to uart console fix your issue and remove it. Uart is not intended way to interact with Asus TF101 and doesn't need to be exposed, panel and fastboot console are and can be used to resolve most of issues.

Best regards,
Svyatoslav R.

Quoted 19 lines

Artur Kowalski (4):
tegra: add funcmux for exposing UART over uSD slot on Tegra 20
tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20
ARM: tegra: expose UART-A over uSD on Transformer T20
board: asus: transformer: add DTSI file for enabling UART over uSD
slot

  .../tegra20-asus-transformer-uart-usd.dtsi    | 31 +++++++++++++++++++
  arch/arm/include/asm/arch-tegra20/funcmux.h   |  1 +
  arch/arm/mach-tegra/board.c                   |  4 ++-
  arch/arm/mach-tegra/tegra20/Kconfig           |  4 +++
  drivers/pinctrl/tegra/funcmux-tegra20.c       |  9 +++++-
  include/configs/transformer-t20.h             | 10 ++++++
  6 files changed, 57 insertions(+), 2 deletions(-)

create mode 100644 arch/arm/dts/tegra20-asus-transformer-uart-usd.dtsi

--
2.48.1

#4 lore raw

W dniu 25.03.2025 o 08:14, Svyatoslav Ryhel pisze:

Quoted 13 lines

пн, 24 бер. 2025 р. о 22:01 Artur Kowalski<[email protected]> пише:

Quoted 5 lines

Hello

Thanks for quick response. I know UARTD is the dedicated UART for debugging on TF101, but exposing UART over microSD
is a handy trick useful for development. As I'm doing development on

It is a handy trick indeed, but it is still just a trick and not smth that fits mainline. Maximum I can propose is picking funcmux change along with uart over sd section in transformer t20 documentation.

Quoted 3 lines

this tablet (bringing U-Boot's UEFI support and latest Linux), and also still using the device on old OS I'd like to avoid disassembling and reassembling it over and over again.

Quoted 6 lines

I am not sure what are you doing but TF101 has full support of U-Boot as primary bootloader along with full mainline support till 6.14 including. It uses extlinux boot method and needs no intermediates or chainloading.

If you wish to use U-Boot for tethered booting that is perfectly fine as well.

Booting with UEFI didn't work, I have solved that problem locally by forcing LMB allocator to not allocate at 0x0, any platform where RAM starts at 0x0 could be affected by it. Soon I will send patches. I want to use UEFI so that I can take advantage systemd-boot features such as one-time boot for system updates, some other software I plan to use also depends on UEFI. Also, with extlinux I can't use verified boot, but, eventually I plan to program PKC and have full secure boot with hardware RoT.

When bringing UEFI support I also made some changes so that U-Boot works with CONFIG_OF_UPSTREAM, I also plan to upstream the patches soon.

Linux lacks GPS support and possibly camera, also sorry for my mistake, I meant a complete Linux distro rather than the kernel only, which is lacking GPU acceleration. Also, when running preemptible kernel I can see multiple "scheduling while atomic" errors and random system freezes under load.

Quoted 20 lines
Quoted 6 lines

Others too may find the feature useful e. g. to avoid having to solder which requires specialized equipment, skills and
is potentially dangerous for the board. Also, there already seems to be support for that on Sunxi platforms through CONFIG_UART0_PORT_F.

Quoted 8 lines

Apart from pinmux changes, would it be acceptable to include an option to allow switching UARTA mux to
SDB/SDD (currently this has to be selected from board's Kconfig file). Doing so would allow to enable UART
over microSD without patching U-Boot's source without changing any existing configuration. Then I would
keep DTS overlays and config changes local.

I am fine with any changes which may simplify debugging for you as long as they do not invade into completed device configuration without a valid reason. Device must expose a dedicated UART for debug, not a mux which breaks some device features just because you do not want to contain them locally.

Quoted 4 lines

For example, patches which add UART-E support along with funcmux change which exposes uart-e over usd were accepted, but patch similar to yours which would reconfigure usd to uart for surface rt or p880 would be rejected.

I've sent v2, which besides few other fixes, adds dedicated Kconfig option for enabling UART. If disabled, the config is the same.

Quoted 3 lines
Quoted 3 lines

Also, today, after running U-Boot with debug enabled, I discovered some failed assertions in pinmux code probably
caused by my changes, I will get that fixed before sending v2.

Turns out it was something else. I've sent a patch to fix that:

https://patchwork.ozlabs.org/project/uboot/patch/20250330211153.RFC.1.Iebf436d41ff5f52c0b11aaf9e8f98d6a2d4d56bc@changeid/

Quoted 49 lines
Quoted 49 lines

Best regards
Artur Kowalski

W dniu 18.03.2025 o 09:54, Svyatoslav Ryhel pisze:

Quoted 45 lines

вт, 18 бер. 2025 р. о 10:31 Artur Kowalski<[email protected]> пише:

Quoted 10 lines

The first patch in the series brings general pinmux support for exposing UART over SDB/SDD pins on T20. The following patches bring support Transformer T20 allowing to enable UART over uSD by setting

CONFIG_TEGRA_ENABLE_UARTA=y CONFIG_DEVICE_TREE_INCLUDES="tegra20-asus-transformer-uart-usd.dtsi"

Similarily, support for UART over uSD could be brought to Ventana which has uSD on the same pins as TF101, and other Ventana-based boards.

Hey there, thank you for looking into U-Boot for Tegra. If something I will say hurts or offends you, I am sorry it was not intentional.

Anyway, apart funcmux changes, all other changes you propose are redundant. Asus dedicated uart for logging and console is UARTD any other uart configuration must not be added since it will disrupt existing configuration. If you need uart and cannot resolve an issue without it you can always solder to uart-d or locally mux sd to uart console fix your issue and remove it. Uart is not intended way to interact with Asus TF101 and doesn't need to be exposed, panel and fastboot console are and can be used to resolve most of issues.

Best regards,
Svyatoslav R.

Quoted 19 lines

Artur Kowalski (4):
tegra: add funcmux for exposing UART over uSD slot on Tegra 20
tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20
ARM: tegra: expose UART-A over uSD on Transformer T20
board: asus: transformer: add DTSI file for enabling UART over uSD
slot

   .../tegra20-asus-transformer-uart-usd.dtsi    | 31 +++++++++++++++++++
   arch/arm/include/asm/arch-tegra20/funcmux.h   |  1 +
   arch/arm/mach-tegra/board.c                   |  4 ++-
   arch/arm/mach-tegra/tegra20/Kconfig           |  4 +++
   drivers/pinctrl/tegra/funcmux-tegra20.c       |  9 +++++-
   include/configs/transformer-t20.h             | 10 ++++++
   6 files changed, 57 insertions(+), 2 deletions(-)

create mode 100644 arch/arm/dts/tegra20-asus-transformer-uart-usd.dtsi

--
2.48.1

#5 lore raw

нд, 30 бер. 2025 р. о 22:30 Artur Kowalski <[email protected]> пише:

Quoted 33 lines

W dniu 25.03.2025 o 08:14, Svyatoslav Ryhel pisze:

пн, 24 бер. 2025 р. о 22:01 Artur Kowalski <[email protected]> пише:

Hello

Thanks for quick response. I know UARTD is the dedicated UART for debugging on TF101, but exposing UART over microSD
is a handy trick useful for development. As I'm doing development on

It is a handy trick indeed, but it is still just a trick and not smth that fits mainline. Maximum I can propose is picking funcmux change along with uart over sd section in transformer t20 documentation.

this tablet (bringing U-Boot's UEFI support and latest Linux), and also still using the device on old OS I'd like to avoid disassembling and reassembling it over and over again.

I am not sure what are you doing but TF101 has full support of U-Boot as primary bootloader along with full mainline support till 6.14 including. It uses extlinux boot method and needs no intermediates or chainloading.

If you wish to use U-Boot for tethered booting that is perfectly fine as well.

Booting with UEFI didn't work, I have solved that problem locally by forcing LMB allocator to not allocate at 0x0, any platform where RAM starts at 0x0 could be affected by it. Soon I will send patches. I want to use UEFI so that I can take advantage systemd-boot features such as one-time boot for system updates, some other software I plan to use also depends on UEFI. Also, with extlinux I can't use verified boot, but, eventually I plan to program PKC and have full secure boot with hardware RoT.

Quoted 6 lines

When bringing UEFI support I also made some changes so that U-Boot works with CONFIG_OF_UPSTREAM, I also plan to upstream the patches soon.

Linux lacks GPS support and possibly camera, also sorry for my mistake, I meant a complete Linux distro rather than the kernel only, which is lacking GPU acceleration. Also, when running preemptible kernel I can see multiple "scheduling while atomic" errors and random system freezes under load.

PostmarketOS on Tegra group in Tg/Matrix. There you can find assist/help regards there U-Boot unrelated stuff.

Quoted 87 lines

Others too may find the feature useful e. g. to avoid having to solder which requires specialized equipment, skills and
is potentially dangerous for the board. Also, there already seems to be support for that on Sunxi platforms through CONFIG_UART0_PORT_F.

Apart from pinmux changes, would it be acceptable to include an option to allow switching UARTA mux to
SDB/SDD (currently this has to be selected from board's Kconfig file). Doing so would allow to enable UART
over microSD without patching U-Boot's source without changing any existing configuration. Then I would
keep DTS overlays and config changes local.

I am fine with any changes which may simplify debugging for you as long as they do not invade into completed device configuration without a valid reason. Device must expose a dedicated UART for debug, not a mux which breaks some device features just because you do not want to contain them locally.

For example, patches which add UART-E support along with funcmux change which exposes uart-e over usd were accepted, but patch similar to yours which would reconfigure usd to uart for surface rt or p880 would be rejected.

I've sent v2, which besides few other fixes, adds dedicated Kconfig option for enabling UART. If disabled, the config is the same.

Also, today, after running U-Boot with debug enabled, I discovered some failed assertions in pinmux code probably
caused by my changes, I will get that fixed before sending v2.

Turns out it was something else. I've sent a patch to fix that:

https://patchwork.ozlabs.org/project/uboot/patch/20250330211153.RFC.1.Iebf436d41ff5f52c0b11aaf9e8f98d6a2d4d56bc@changeid/

Best regards
Artur Kowalski

W dniu 18.03.2025 o 09:54, Svyatoslav Ryhel pisze:

вт, 18 бер. 2025 р. о 10:31 Artur Kowalski <[email protected]> пише:

The first patch in the series brings general pinmux support for exposing UART over SDB/SDD pins on T20. The following patches bring support Transformer T20 allowing to enable UART over uSD by setting

CONFIG_TEGRA_ENABLE_UARTA=y CONFIG_DEVICE_TREE_INCLUDES="tegra20-asus-transformer-uart-usd.dtsi"

Similarily, support for UART over uSD could be brought to Ventana which has uSD on the same pins as TF101, and other Ventana-based boards.

Hey there, thank you for looking into U-Boot for Tegra. If something I will say hurts or offends you, I am sorry it was not intentional.

Anyway, apart funcmux changes, all other changes you propose are redundant. Asus dedicated uart for logging and console is UARTD any other uart configuration must not be added since it will disrupt existing configuration. If you need uart and cannot resolve an issue without it you can always solder to uart-d or locally mux sd to uart console fix your issue and remove it. Uart is not intended way to interact with Asus TF101 and doesn't need to be exposed, panel and fastboot console are and can be used to resolve most of issues.

Best regards,
Svyatoslav R.

Artur Kowalski (4):
tegra: add funcmux for exposing UART over uSD slot on Tegra 20
tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20
ARM: tegra: expose UART-A over uSD on Transformer T20
board: asus: transformer: add DTSI file for enabling UART over uSD
slot

  .../tegra20-asus-transformer-uart-usd.dtsi    | 31 +++++++++++++++++++
  arch/arm/include/asm/arch-tegra20/funcmux.h   |  1 +
  arch/arm/mach-tegra/board.c                   |  4 ++-
  arch/arm/mach-tegra/tegra20/Kconfig           |  4 +++
  drivers/pinctrl/tegra/funcmux-tegra20.c       |  9 +++++-
  include/configs/transformer-t20.h             | 10 ++++++
  6 files changed, 57 insertions(+), 2 deletions(-)

create mode 100644 arch/arm/dts/tegra20-asus-transformer-uart-usd.dtsi

--
2.48.1

#6 lore raw

PATCH 1/4 tegra: add funcmux for exposing UART over uSD slot on Tegra 20

In reply to Artur Kowalski

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

---

 arch/arm/include/asm/arch-tegra20/funcmux.h | 1 +
 arch/arm/mach-tegra/board.c                 | 4 +++-
 arch/arm/mach-tegra/tegra20/Kconfig         | 3 +++
 drivers/pinctrl/tegra/funcmux-tegra20.c     | 9 ++++++++-
 4 files changed, 15 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-tegra20/funcmux.h +1 -0
index e9e96c1f933..bafcf857620 100644
@@ -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,
 
arch/arm/mach-tegra/board.c +3 -1
index 7ca56a3b081..d34152723b0 100644
@@ -169,7 +169,9 @@ static int uart_configs[] = {
 	FUNCMUX_UART1_GPU,
  #elif defined(CONFIG_TEGRA_UARTA_SDIO1)
 	FUNCMUX_UART1_SDIO1,
- #else
+#elif defined(CONFIG_TEGRA_UARTA_SDB_SDD)
+	FUNCMUX_UART1_SDB_SDD,
+#else
 	FUNCMUX_UART1_IRRX_IRTX,
 #endif
 	FUNCMUX_UART2_UAD,
arch/arm/mach-tegra/tegra20/Kconfig +3 -0
index e2735d93e28..3349f1e2786 100644
@@ -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
drivers/pinctrl/tegra/funcmux-tegra20.c +8 -1
index 951ae196161..f60d5aad3a4 100644
@@ -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
Signature · 1 line
2.48.1
#7 lore raw

PATCH 2/4 tegra: respect CONFIG_TEGRA_ENABLE_UART* options on Transformer T20

In reply to Artur Kowalski

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.

---

 include/configs/transformer-t20.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
include/configs/transformer-t20.h +10 -0
index 6a3d9b24036..d3a98cc5a70 100644
@@ -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"
 
Signature · 1 line
2.48.1
#8 lore raw

PATCH 3/4 ARM: tegra: expose UART-A over uSD on Transformer T20

In reply to Artur Kowalski

Default pinmux setting using IRTX and IRRX pins doesn't seem ever used. Change that to SDB and SDD pins, so that the device can be debugged through uSD slot when UART is set to UART-A.

---

 arch/arm/mach-tegra/tegra20/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-tegra/tegra20/Kconfig +1 -0
index 3349f1e2786..aa98b4d3d5f 100644
@@ -57,6 +57,7 @@ config TARGET_TEC
 config TARGET_TRANSFORMER_T20
 	bool "Asus Tegra20 Transformer board"
 	select BOARD_LATE_INIT
+	select TEGRA_UARTA_SDB_SDD
 
 config TARGET_TRIMSLICE
 	bool "Compulab TrimSlice board"
Signature · 1 line
2.48.1
#9 lore raw

PATCH 4/4 board: asus: transformer: add DTSI file for enabling UART over uSD slot

In reply to Artur Kowalski

It is required to set

CONFIG_DEVICE_TREE_INCLUDES="tegra20-asus-transformer-uart-usd.dtsi"

if CONFIG_TEGRA_ENABLE_UARTA (and only if) is enabled for U-Boot to boot properly, otherwise only SPL will work, but U-Boot when trying to use UART that wasn't enabled by SPL.

---

 .../tegra20-asus-transformer-uart-usd.dtsi    | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 arch/arm/dts/tegra20-asus-transformer-uart-usd.dtsi
arch/arm/dts/tegra20-asus-transformer-uart-usd.dtsi new file +31 -0
new file mode 100644
index 00000000000..accb086774c
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause
+
+/ {
+	chosen {
+		stdout-path = &uarta;
+	};
+
+	serial@70006300 {
+		status = "disabled";
+	};
+
+	serial@70006000 {
+		status = "okay";
+		clock-frequency = <216000000>;
+	};
+
+	sdhci@c8000400 {
+		status = "disabled";
+	};
+
+	pinmux@70000014 {
+		pinmux {
+			/delete-node/ sdb;
+
+			dbguart {
+				nvidia,pins = "sdb", "sdd";
+				nvidia,function = "uarta";
+			};
+		};
+	};
+};
Signature · 1 line
2.48.1