From: Artur Kowalski <arturkow2000@gmail.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>,
Stephen Warren <swarren@nvidia.com>,
Thierry Reding <treding@nvidia.com>,
Tom Rini <trini@konsulko.com>, Tom Warren <twarren@nvidia.com>
Subject: Re: [PATCH v2 3/3] tegra: allow to expose UART on microSD slot
Date: Tue, 1 Apr 2025 15:34:46 +0200 [thread overview]
Message-ID: <0709393f-51f7-43e9-91b0-18ef5a7c0866@gmail.com> (raw)
In-Reply-To: <CAPVz0n0fRLgc7aOCpjVVRaX=dPMB9D9UDyNck8gsCJTpfh1pBg@mail.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.
next prev parent reply other threads:[~2025-04-01 13:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2025-04-01 13:48 ` Svyatoslav Ryhel
2025-04-22 15:37 ` Artur Kowalski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0709393f-51f7-43e9-91b0-18ef5a7c0866@gmail.com \
--to=arturkow2000@gmail.com \
--cc=clamor95@gmail.com \
--cc=sjg@chromium.org \
--cc=swarren@nvidia.com \
--cc=treding@nvidia.com \
--cc=trini@konsulko.com \
--cc=twarren@nvidia.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.