* [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board
@ 2024-08-15 15:50 Diogo Ivo
2024-08-15 15:50 ` [PATCH 1/2] arm64: tegra: Fix gpio for P2597 vmmc regulator Diogo Ivo
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Diogo Ivo @ 2024-08-15 15:50 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
Jonathan Hunter
Cc: devicetree, linux-tegra, linux-kernel, Diogo Ivo
Define the wp-gpio for the P2597 board.
For this, patch 1 fixes the assignment of the vmmc supply's gpio that
was incorrectly assigned to the wp-gpio of the external slot.
Patch 2 adds the definition of the wp-gpio.
Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
---
Diogo Ivo (2):
arm64: tegra: Fix gpio for P2597 vmmc regulator
arm64: tegra: Add wp-gpio for P2597's external card slot
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
base-commit: 1fb918967b56df3262ee984175816f0acb310501
change-id: 20240815-tx1_sdmmc-311e4802c843
Best regards,
--
Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] arm64: tegra: Fix gpio for P2597 vmmc regulator
2024-08-15 15:50 [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board Diogo Ivo
@ 2024-08-15 15:50 ` Diogo Ivo
2024-08-15 15:50 ` [PATCH 2/2] arm64: tegra: Add wp-gpio for P2597's external card slot Diogo Ivo
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Diogo Ivo @ 2024-08-15 15:50 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
Jonathan Hunter
Cc: devicetree, linux-tegra, linux-kernel, Diogo Ivo
The current declaration is off-by-one and actually corresponds to the
wp-gpio of the external slot.
Tested on a P2597 board.
Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
---
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
index b4a1108c2dd7..3662b513d623 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
@@ -1603,7 +1603,7 @@ vdd_3v3_sd: regulator-vdd-3v3-sd {
regulator-name = "VDD_3V3_SD";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- gpio = <&gpio TEGRA_GPIO(Z, 4) GPIO_ACTIVE_HIGH>;
+ gpio = <&gpio TEGRA_GPIO(Z, 3) GPIO_ACTIVE_HIGH>;
enable-active-high;
vin-supply = <&vdd_3v3_sys>;
--
2.46.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/2] arm64: tegra: Add wp-gpio for P2597's external card slot
2024-08-15 15:50 [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board Diogo Ivo
2024-08-15 15:50 ` [PATCH 1/2] arm64: tegra: Fix gpio for P2597 vmmc regulator Diogo Ivo
@ 2024-08-15 15:50 ` Diogo Ivo
2024-08-20 16:32 ` [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board Tomasz Maciej Nowak
2024-08-29 15:31 ` Thierry Reding
3 siblings, 0 replies; 10+ messages in thread
From: Diogo Ivo @ 2024-08-15 15:50 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
Jonathan Hunter
Cc: devicetree, linux-tegra, linux-kernel, Diogo Ivo
Add the definition for the wp-gpio of the P2597's external card slot,
enabling this functionality.
Tested on a P2597 board.
Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
---
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
index 3662b513d623..73ae63628f83 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
@@ -1517,6 +1517,7 @@ mmc@700b0000 {
bus-width = <4>;
cd-gpios = <&gpio TEGRA_GPIO(Z, 1) GPIO_ACTIVE_LOW>;
+ wp-gpios = <&gpio TEGRA_GPIO(Z, 4) GPIO_ACTIVE_HIGH>;
vqmmc-supply = <&vddio_sdmmc>;
vmmc-supply = <&vdd_3v3_sd>;
--
2.46.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board
2024-08-15 15:50 [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board Diogo Ivo
2024-08-15 15:50 ` [PATCH 1/2] arm64: tegra: Fix gpio for P2597 vmmc regulator Diogo Ivo
2024-08-15 15:50 ` [PATCH 2/2] arm64: tegra: Add wp-gpio for P2597's external card slot Diogo Ivo
@ 2024-08-20 16:32 ` Tomasz Maciej Nowak
2024-08-21 10:34 ` Diogo Ivo
2024-08-29 15:31 ` Thierry Reding
3 siblings, 1 reply; 10+ messages in thread
From: Tomasz Maciej Nowak @ 2024-08-20 16:32 UTC (permalink / raw)
To: Diogo Ivo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thierry Reding, Jonathan Hunter
Cc: devicetree, linux-tegra, linux-kernel
W dniu 15.08.2024 o 17:50, Diogo Ivo pisze:
> Define the wp-gpio for the P2597 board.
>
> For this, patch 1 fixes the assignment of the vmmc supply's gpio that
> was incorrectly assigned to the wp-gpio of the external slot.
>
> Patch 2 adds the definition of the wp-gpio.
>
> Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
> ---
> Diogo Ivo (2):
> arm64: tegra: Fix gpio for P2597 vmmc regulator
> arm64: tegra: Add wp-gpio for P2597's external card slot
Hi,
for both patches
Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
PS
I case You wish to save some digging for other features I enabled BT+WiFi, PWM-FAN
and power sensors in this tree: https://github.com/tmn505/linux/tree/jetson-tx1
For passing MAC addresses for BT+WiFi from cboot provided dtb check this U-Boot
tree: https://github.com/tmn505/u-boot/tree/jetson-tx1
>
> arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> ---
> base-commit: 1fb918967b56df3262ee984175816f0acb310501
> change-id: 20240815-tx1_sdmmc-311e4802c843
>
> Best regards,
Regards
--
TMN
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board
2024-08-20 16:32 ` [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board Tomasz Maciej Nowak
@ 2024-08-21 10:34 ` Diogo Ivo
2024-08-21 19:06 ` Tomasz Maciej Nowak
0 siblings, 1 reply; 10+ messages in thread
From: Diogo Ivo @ 2024-08-21 10:34 UTC (permalink / raw)
To: Tomasz Maciej Nowak
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
Jonathan Hunter, devicetree, linux-tegra, linux-kernel
On Tue, Aug 20, 2024 at 06:32:44PM GMT, Tomasz Maciej Nowak wrote:
>
> W dniu 15.08.2024 o 17:50, Diogo Ivo pisze:
> > Define the wp-gpio for the P2597 board.
> >
> > For this, patch 1 fixes the assignment of the vmmc supply's gpio that
> > was incorrectly assigned to the wp-gpio of the external slot.
> >
> > Patch 2 adds the definition of the wp-gpio.
> >
> > Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
> > ---
> > Diogo Ivo (2):
> > arm64: tegra: Fix gpio for P2597 vmmc regulator
> > arm64: tegra: Add wp-gpio for P2597's external card slot
>
> Hi,
> for both patches
> Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
>
> PS
> I case You wish to save some digging for other features I enabled BT+WiFi, PWM-FAN
> and power sensors in this tree: https://github.com/tmn505/linux/tree/jetson-tx1
> For passing MAC addresses for BT+WiFi from cboot provided dtb check this U-Boot
> tree: https://github.com/tmn505/u-boot/tree/jetson-tx1
Thanks for testing! Are you planning on sending your patches upstream?
It would be nice to have those features enabled, and I can add my
Tested-by once I test them.
Diogo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board
2024-08-21 10:34 ` Diogo Ivo
@ 2024-08-21 19:06 ` Tomasz Maciej Nowak
0 siblings, 0 replies; 10+ messages in thread
From: Tomasz Maciej Nowak @ 2024-08-21 19:06 UTC (permalink / raw)
To: Diogo Ivo
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
Jonathan Hunter, devicetree, linux-tegra, linux-kernel,
Nicolas Chauvet
W dniu 21.08.2024 o 12:34, Diogo Ivo pisze:
> On Tue, Aug 20, 2024 at 06:32:44PM GMT, Tomasz Maciej Nowak wrote:
>>
>> W dniu 15.08.2024 o 17:50, Diogo Ivo pisze:
>>> Define the wp-gpio for the P2597 board.
>>>
>>> For this, patch 1 fixes the assignment of the vmmc supply's gpio that
>>> was incorrectly assigned to the wp-gpio of the external slot.
>>>
>>> Patch 2 adds the definition of the wp-gpio.
>>>
>>> Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
>>> ---
>>> Diogo Ivo (2):
>>> arm64: tegra: Fix gpio for P2597 vmmc regulator
>>> arm64: tegra: Add wp-gpio for P2597's external card slot
>>
>> Hi,
>> for both patches
>> Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
>>
>> PS
>> I case You wish to save some digging for other features I enabled BT+WiFi, PWM-FAN
>> and power sensors in this tree: https://github.com/tmn505/linux/tree/jetson-tx1
>> For passing MAC addresses for BT+WiFi from cboot provided dtb check this U-Boot
>> tree: https://github.com/tmn505/u-boot/tree/jetson-tx1
>
> Thanks for testing! Are you planning on sending your patches upstream?
> It would be nice to have those features enabled, and I can add my
> Tested-by once I test them.
As Nicolas also requested it I sent the patches except the PWM-FAN ones, since
this will probably need enhancement of tegra pwm driver to handle inverted signal.
Also the GPU enable is left out, as pointed by Nicolas bootloader overwrites the
status of it to "okay".
>
> Diogo
Regards
--
TMN
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board
2024-08-15 15:50 [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board Diogo Ivo
` (2 preceding siblings ...)
2024-08-20 16:32 ` [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board Tomasz Maciej Nowak
@ 2024-08-29 15:31 ` Thierry Reding
2024-08-30 10:20 ` Diogo Ivo
3 siblings, 1 reply; 10+ messages in thread
From: Thierry Reding @ 2024-08-29 15:31 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
Jonathan Hunter, Diogo Ivo
Cc: devicetree, linux-tegra, linux-kernel
From: Thierry Reding <treding@nvidia.com>
On Thu, 15 Aug 2024 16:50:38 +0100, Diogo Ivo wrote:
> Define the wp-gpio for the P2597 board.
>
> For this, patch 1 fixes the assignment of the vmmc supply's gpio that
> was incorrectly assigned to the wp-gpio of the external slot.
>
> Patch 2 adds the definition of the wp-gpio.
>
> [...]
Applied, thanks!
[1/2] arm64: tegra: Fix gpio for P2597 vmmc regulator
commit: 46a26db82748a9434fae662738ff80e350b179ee
[2/2] arm64: tegra: Add wp-gpio for P2597's external card slot
commit: ebe899563a83c9bb578248eb4a4d56414275d9fa
Best regards,
--
Thierry Reding <treding@nvidia.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board
2024-08-29 15:31 ` Thierry Reding
@ 2024-08-30 10:20 ` Diogo Ivo
2024-09-16 8:38 ` Diogo Ivo
2024-09-23 11:01 ` Thierry Reding
0 siblings, 2 replies; 10+ messages in thread
From: Diogo Ivo @ 2024-08-30 10:20 UTC (permalink / raw)
To: Thierry Reding
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jonathan Hunter,
devicetree, linux-tegra, linux-kernel
Hi Thierry,
On Thu, Aug 29, 2024 at 05:31:23PM GMT, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
>
> On Thu, 15 Aug 2024 16:50:38 +0100, Diogo Ivo wrote:
> > Define the wp-gpio for the P2597 board.
> >
> > For this, patch 1 fixes the assignment of the vmmc supply's gpio that
> > was incorrectly assigned to the wp-gpio of the external slot.
> >
> > Patch 2 adds the definition of the wp-gpio.
> >
> > [...]
>
> Applied, thanks!
Thanks for picking up the patches! In my testing around SD/MMC I found that
currently UHS-I cards are broken on the P2597. When trying to use one
the system shows somewhat erratic behaviour where it sometimes hangs and
some other times it simply fails to read from the SD card. I have
tracked the point at which this happens to be around
tegra_sdhci_pad_autocalib() when switching to SDR104 mode, where there
is the possibility of using specific offsets for this mode. Currently
there are no values specified in tegra210.dtsi, so the 1.8V values are
being used. However, when I tried specifying them as
nvidia,pad-autocal-pull-up-offset-sdr104 = <0>;
nvidia,pad-autocal-pull-down-offset-sdr104 = <0>;
in the DT things started working fine. I did not send a patch with these
values since I could not find what they should be on the X1 TRM, are
there any recommended values for these parameters so that we can have
this fixed?
Diogo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board
2024-08-30 10:20 ` Diogo Ivo
@ 2024-09-16 8:38 ` Diogo Ivo
2024-09-23 11:01 ` Thierry Reding
1 sibling, 0 replies; 10+ messages in thread
From: Diogo Ivo @ 2024-09-16 8:38 UTC (permalink / raw)
To: diogo.ivo
Cc: conor+dt, devicetree, jonathanh, krzk+dt, linux-kernel,
linux-tegra, robh, thierry.reding
Hi Thierry,
Gentle ping on this topic.
Thanks,
Diogo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board
2024-08-30 10:20 ` Diogo Ivo
2024-09-16 8:38 ` Diogo Ivo
@ 2024-09-23 11:01 ` Thierry Reding
1 sibling, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2024-09-23 11:01 UTC (permalink / raw)
To: Diogo Ivo
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jonathan Hunter,
devicetree, linux-tegra, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2726 bytes --]
On Fri, Aug 30, 2024 at 11:20:45AM GMT, Diogo Ivo wrote:
> Hi Thierry,
>
> On Thu, Aug 29, 2024 at 05:31:23PM GMT, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> >
> > On Thu, 15 Aug 2024 16:50:38 +0100, Diogo Ivo wrote:
> > > Define the wp-gpio for the P2597 board.
> > >
> > > For this, patch 1 fixes the assignment of the vmmc supply's gpio that
> > > was incorrectly assigned to the wp-gpio of the external slot.
> > >
> > > Patch 2 adds the definition of the wp-gpio.
> > >
> > > [...]
> >
> > Applied, thanks!
>
> Thanks for picking up the patches! In my testing around SD/MMC I found that
> currently UHS-I cards are broken on the P2597. When trying to use one
> the system shows somewhat erratic behaviour where it sometimes hangs and
> some other times it simply fails to read from the SD card. I have
> tracked the point at which this happens to be around
> tegra_sdhci_pad_autocalib() when switching to SDR104 mode, where there
> is the possibility of using specific offsets for this mode. Currently
> there are no values specified in tegra210.dtsi, so the 1.8V values are
> being used. However, when I tried specifying them as
>
> nvidia,pad-autocal-pull-up-offset-sdr104 = <0>;
> nvidia,pad-autocal-pull-down-offset-sdr104 = <0>;
>
> in the DT things started working fine. I did not send a patch with these
> values since I could not find what they should be on the X1 TRM, are
> there any recommended values for these parameters so that we can have
> this fixed?
Sorry for the late reply. Looking at the Tegra X1 TRM, section 32.7
"Programming Guidelines" (starting on page 2473), I see there are a
few subsections called "Run Auto-Calibration", which list recommended
values for the auto-calibration pull-down/-up offsets, depending on the
signaling mode (3.3V vs. 1.8V).
They are:
3.3V 1.8V
PD PU PD PU
SDMMC1 125 0 123 123
SDMMC2 n/a n/a 5 5
SDMMC3 125 0 123 123
SDMMC4 n/a n/a 5 5
Now these aren't the ones you've been using, but it is what we have in
the Tegra210 DTSI file. Interestingly the TRM doesn't make those
specific to the mode (such as SDR104 and HS400 like the DT bindings
suggest they should be).
Also interestingly, on Tegra234 the recommended values in the TRM for
these fields is 0 (like you're using), irrespective of mode.
It's not entirely clear to me why we need these offsets during auto-
calibration, so 0 makes as much sense as any other value. The
documentation isn't very clear on what these values do, either. So I'd
be inclined to accept a patch such as yours based purely on the fact
that it makes things work.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-09-23 11:01 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-15 15:50 [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board Diogo Ivo
2024-08-15 15:50 ` [PATCH 1/2] arm64: tegra: Fix gpio for P2597 vmmc regulator Diogo Ivo
2024-08-15 15:50 ` [PATCH 2/2] arm64: tegra: Add wp-gpio for P2597's external card slot Diogo Ivo
2024-08-20 16:32 ` [PATCH 0/2] arm64: tegra: add wp-gpio to P2957 board Tomasz Maciej Nowak
2024-08-21 10:34 ` Diogo Ivo
2024-08-21 19:06 ` Tomasz Maciej Nowak
2024-08-29 15:31 ` Thierry Reding
2024-08-30 10:20 ` Diogo Ivo
2024-09-16 8:38 ` Diogo Ivo
2024-09-23 11:01 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®