Skip to contentSkip to conversation

ARM: tegra: Enable TPM on tegra124 nyan boards

PATCH New Simon Glass 3 participants 10 messages May 13, 2015 – Jul 3, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: tegra: Enable TPM on tegra124 nyan boards

Regenerate the pinmux from the latest tegra-pinmux-scripts.

---

 arch/arm/boot/dts/tegra124-nyan-big.dts   | 22 +++++++++++-----------
 arch/arm/boot/dts/tegra124-nyan-blaze.dts | 30 +++++++++++++++---------------
 2 files changed, 26 insertions(+), 26 deletions(-)
arch/arm/boot/dts/tegra124-nyan-big.dts +11 -11
index 2d21253..0eb2b0f 100644
@@ -30,7 +30,7 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinmux_default>;
 
-		pinmux_default: common {
+		state_default: pinmux {
 			clk_32k_out_pa0 {
 				nvidia,pins = "clk_32k_out_pa0";
 				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1098,19 +1098,19 @@
 			};
 			cam_i2c_scl_pbb1 {
 				nvidia,pins = "cam_i2c_scl_pbb1";
-				nvidia,function = "rsvd3";
-				nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
-				nvidia,tristate = <TEGRA_PIN_ENABLE>;
-				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
-				nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+				nvidia,function = "i2c3";
+				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+				nvidia,tristate = <TEGRA_PIN_DISABLE>;
+				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				nvidia,open-drain = <TEGRA_PIN_ENABLE>;
 			};
 			cam_i2c_sda_pbb2 {
 				nvidia,pins = "cam_i2c_sda_pbb2";
-				nvidia,function = "rsvd3";
-				nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
-				nvidia,tristate = <TEGRA_PIN_ENABLE>;
-				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
-				nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+				nvidia,function = "i2c3";
+				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+				nvidia,tristate = <TEGRA_PIN_DISABLE>;
+				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				nvidia,open-drain = <TEGRA_PIN_ENABLE>;
 			};
 			pbb3 {
 				nvidia,pins = "pbb3";
arch/arm/boot/dts/tegra124-nyan-blaze.dts +15 -15
index 0d30c51..1fc0da9 100644
@@ -26,7 +26,7 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinmux_default>;
 
-		pinmux_default: common {
+		state_default: pinmux {
 			clk_32k_out_pa0 {
 				nvidia,pins = "clk_32k_out_pa0";
 				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -437,18 +437,18 @@
 			usb_vbus_en0_pn4 {
 				nvidia,pins = "usb_vbus_en0_pn4";
 				nvidia,function = "usb";
-				nvidia,pull = <TEGRA_PIN_PULL_UP>;
+				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
 				nvidia,tristate = <TEGRA_PIN_DISABLE>;
 				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-				nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+				nvidia,open-drain = <TEGRA_PIN_ENABLE>;
 			};
 			usb_vbus_en1_pn5 {
 				nvidia,pins = "usb_vbus_en1_pn5";
 				nvidia,function = "usb";
-				nvidia,pull = <TEGRA_PIN_PULL_UP>;
+				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
 				nvidia,tristate = <TEGRA_PIN_DISABLE>;
 				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-				nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+				nvidia,open-drain = <TEGRA_PIN_ENABLE>;
 			};
 			hdmi_int_pn7 {
 				nvidia,pins = "hdmi_int_pn7";
@@ -1094,19 +1094,19 @@
 			};
 			cam_i2c_scl_pbb1 {
 				nvidia,pins = "cam_i2c_scl_pbb1";
-				nvidia,function = "rsvd3";
-				nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
-				nvidia,tristate = <TEGRA_PIN_ENABLE>;
-				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
-				nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+				nvidia,function = "i2c3";
+				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+				nvidia,tristate = <TEGRA_PIN_DISABLE>;
+				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				nvidia,open-drain = <TEGRA_PIN_ENABLE>;
 			};
 			cam_i2c_sda_pbb2 {
 				nvidia,pins = "cam_i2c_sda_pbb2";
-				nvidia,function = "rsvd3";
-				nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
-				nvidia,tristate = <TEGRA_PIN_ENABLE>;
-				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
-				nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+				nvidia,function = "i2c3";
+				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+				nvidia,tristate = <TEGRA_PIN_DISABLE>;
+				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				nvidia,open-drain = <TEGRA_PIN_ENABLE>;
 			};
 			pbb3 {
 				nvidia,pins = "pbb3";
Signature · 1 line
2.2.0.rc0.207.ga3a616c
#1 lore raw

PATCH 1/1 ARM: tegra: Enable TPM on tegra124 nyan boards

Quoted 1 line · Simon Glass

Regenerate the pinmux from the latest tegra-pinmux-scripts.

(Dropping most CCs; DT maintainers and lists generally don't get CC'd on simple DT content changes but rather on schema adds/changes and perhaps major DT content changes depending on context)

arch/arm/boot/dts/tegra124-nyan-big.dts line 33

Quoted 7 lines
arch/arm/boot/dts/tegra124-nyan-big.dts +1 -1
 
  		pinctrl-names = "default";
  		pinctrl-0 = <&pinmux_default>;
 
-		pinmux_default: common {
+		state_default: pinmux {

This change will break compilation, since it changes the label name, yet the old name is still referenced in pinctrl-0 above. Same applies in the other file too.

Quoted 13 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +2 -2
@@ -437,18 +437,18 @@
  			usb_vbus_en0_pn4 {
  				nvidia,pins = "usb_vbus_en0_pn4";
  				nvidia,function = "usb";
-				nvidia,pull = <TEGRA_PIN_PULL_UP>;
+				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  				nvidia,tristate = <TEGRA_PIN_DISABLE>;
  				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-				nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+				nvidia,open-drain = <TEGRA_PIN_ENABLE>;
  			};

arch/arm/boot/dts/tegra124-nyan-blaze.dts line 452

Quoted 10 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +2 -2
  			usb_vbus_en1_pn5 {
  				nvidia,pins = "usb_vbus_en1_pn5";
  				nvidia,function = "usb";
-				nvidia,pull = <TEGRA_PIN_PULL_UP>;
+				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  				nvidia,tristate = <TEGRA_PIN_DISABLE>;
  				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-				nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+				nvidia,open-drain = <TEGRA_PIN_ENABLE>;
  			};

Tomeu, can you comment on those changes? Evidently the pinmux configuration that's you added to the kernel doesn't exactly match the pinmux configuration that you added to tegra-pinmux-scripts. Is the change above correct, or do we need to propagate this change from the kernel DT into tegra-pinmux-scripts, and hence also into the U-Boot pinmux setup table?

My understanding of how these pins are generally used is that open-drain is likely correct. I have no idea whether Tegra should supply the pullup for these pins, or whether the board has a pullup resistor in which case Tegra doesn't need to pull up.

#2 lore raw

PATCH 1/1 ARM: tegra: Enable TPM on tegra124 nyan boards

Hi Stephen,

Quoted 8 lines · Stephen Warren
Quoted 2 lines · Simon Glass

Regenerate the pinmux from the latest tegra-pinmux-scripts.

(Dropping most CCs; DT maintainers and lists generally don't get CC'd on simple DT content changes but rather on schema adds/changes and perhaps major DT content changes depending on context)

OK, I'll try to remember to use patman -m.

Quoted 8 lines
Quoted 8 lines
arch/arm/boot/dts/tegra124-nyan-big.dts +0 -0
 
 
                pinctrl-names = "default";
                pinctrl-0 = <&pinmux_default>;
Quoted 7 lines

arch/arm/boot/dts/tegra124-nyan-big.dts

Quoted 2 lines
arch/arm/boot/dts/tegra124-nyan-big.dts +1 -1
-               pinmux_default: common {
+               state_default: pinmux {

This change will break compilation, since it changes the label name, yet the old name is still referenced in pinctrl-0 above. Same applies in the other file too.

Yes I saw that, but assumed that the tool was doing the right thing. Is the tool wrong?

Quoted 34 lines
Quoted 16 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +2 -2
@@ -437,18 +437,18 @@
                        usb_vbus_en0_pn4 {
                                nvidia,pins = "usb_vbus_en0_pn4";
                                nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };

arch/arm/boot/dts/tegra124-nyan-blaze.dts line 452

Quoted 10 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +2 -2
                        usb_vbus_en1_pn5 {
                                nvidia,pins = "usb_vbus_en1_pn5";
                                nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };

Tomeu, can you comment on those changes? Evidently the pinmux configuration that's you added to the kernel doesn't exactly match the pinmux configuration that you added to tegra-pinmux-scripts. Is the change above correct, or do we need to propagate this change from the kernel DT into tegra-pinmux-scripts, and hence also into the U-Boot pinmux setup table?

Quoted 4 lines

My understanding of how these pins are generally used is that open-drain is likely correct. I have no idea whether Tegra should supply the pullup for these pins, or whether the board has a pullup resistor in which case Tegra doesn't need to pull up.

Regards,
Simon

#3 lore raw

PATCH 1/1 ARM: tegra: Enable TPM on tegra124 nyan boards

Quoted 26 lines · Simon Glass

Hi Stephen,

Quoted 8 lines · Stephen Warren
Quoted 2 lines · Simon Glass

Regenerate the pinmux from the latest tegra-pinmux-scripts.

(Dropping most CCs; DT maintainers and lists generally don't get CC'd on simple DT content changes but rather on schema adds/changes and perhaps major DT content changes depending on context)

OK, I'll try to remember to use patman -m.

Quoted 12 lines
Quoted 10 lines
arch/arm/boot/dts/tegra124-nyan-big.dts +1 -1
 
 
                 pinctrl-names = "default";
                 pinctrl-0 = <&pinmux_default>;
 
-               pinmux_default: common {
+               state_default: pinmux {
Quoted 6 lines
Quoted 3 lines

This change will break compilation, since it changes the label name, yet the old name is still referenced in pinctrl-0 above. Same applies in the other file too.

Yes I saw that, but assumed that the tool was doing the right thing. Is the tool wrong?

Well, it includes the outer node to make it obvious where to put the generated data, but since this one line doesn't exactly match what's in some of the kernel DTs, it's probably just confusing. I've sent a patch to remove that one line from the generated output of the tool; find it on the linux-tegra mailing list.

#4 lore raw

PATCH 1/1 ARM: tegra: Enable TPM on tegra124 nyan boards

In reply to Stephen Warren
Quoted 46 lines · Stephen Warren
Quoted 2 lines · Simon Glass

Regenerate the pinmux from the latest tegra-pinmux-scripts.

(Dropping most CCs; DT maintainers and lists generally don't get CC'd on simple DT content changes but rather on schema adds/changes and perhaps major DT content changes depending on context)

arch/arm/boot/dts/tegra124-nyan-big.dts line 33

Quoted 9 lines
arch/arm/boot/dts/tegra124-nyan-big.dts +1 -1
 
 
                pinctrl-names = "default";
                pinctrl-0 = <&pinmux_default>;
 
-               pinmux_default: common {
+               state_default: pinmux {

This change will break compilation, since it changes the label name, yet the old name is still referenced in pinctrl-0 above. Same applies in the other file too.

Quoted 22 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +3 -3
@@ -437,18 +437,18 @@
                        usb_vbus_en0_pn4 {
                                nvidia,pins = "usb_vbus_en0_pn4";
                                nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };
                        usb_vbus_en1_pn5 {
                                nvidia,pins = "usb_vbus_en1_pn5";
                                nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
Quoted 8 lines

arch/arm/boot/dts/tegra124-nyan-blaze.dts line 452

Quoted 3 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +1 -1
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };

Tomeu, can you comment on those changes? Evidently the pinmux configuration that's you added to the kernel doesn't exactly match the pinmux configuration that you added to tegra-pinmux-scripts.

Are you sure? Just checked and what tegra-pinmux-scripts currently generates matches what is currently in the kernel, for both nyans.

Quoted 10 lines

Is the change above
correct, or do we need to propagate this change from the kernel DT into tegra-pinmux-scripts, and hence also into the U-Boot pinmux setup table?

My understanding of how these pins are generally used is that open-drain is likely correct. I have no idea whether Tegra should supply the pullup for these pins, or whether the board has a pullup resistor in which case Tegra doesn't need to pull up.

From what Andrew (added to CC) said when these changes were discussed,

it shouldn't matter as a fixed regulator is used to drive those pins high.

Regards,

Tomeu

Quoted 4 lines

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#5 lore raw

PATCH 1/1 ARM: tegra: Enable TPM on tegra124 nyan boards

Quoted 56 lines · Tomeu Vizoso
Quoted 46 lines · Stephen Warren
Quoted 2 lines · Simon Glass

Regenerate the pinmux from the latest tegra-pinmux-scripts.

(Dropping most CCs; DT maintainers and lists generally don't get CC'd on simple DT content changes but rather on schema adds/changes and perhaps major DT content changes depending on context)

arch/arm/boot/dts/tegra124-nyan-big.dts line 33

Quoted 9 lines
arch/arm/boot/dts/tegra124-nyan-big.dts +1 -1
 
 
                 pinctrl-names = "default";
                 pinctrl-0 = <&pinmux_default>;
 
-               pinmux_default: common {
+               state_default: pinmux {

This change will break compilation, since it changes the label name, yet the old name is still referenced in pinctrl-0 above. Same applies in the other file too.

Quoted 22 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +3 -3
@@ -437,18 +437,18 @@
                         usb_vbus_en0_pn4 {
                                 nvidia,pins = "usb_vbus_en0_pn4";
                                 nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                 nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                         };
                         usb_vbus_en1_pn5 {
                                 nvidia,pins = "usb_vbus_en1_pn5";
                                 nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                 nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
Quoted 8 lines

arch/arm/boot/dts/tegra124-nyan-blaze.dts line 452

Quoted 3 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +1 -1
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                         };

Tomeu, can you comment on those changes? Evidently the pinmux configuration that's you added to the kernel doesn't exactly match the pinmux configuration that you added to tegra-pinmux-scripts.

Quoted 2 lines

Are you sure? Just checked and what tegra-pinmux-scripts currently generates matches what is currently in the kernel, for both nyans.

My apologies; you're correct.

This patch to the kernel DTs includes changes that aren't generated by either current tegra-pinmux-scripts, nor by tegra-pinmux-scripts with Simon's "[pinmux scripts PATCH] Support TPM on nyan boards" applied. Simon, can you double-check you didn't have any local patches to tegra-pinmux-scripts applied when you generated the DT content for this patch?

Quoted 4 lines
Quoted 4 lines

Is the change above
correct, or do we need to propagate this change from the kernel DT into tegra-pinmux-scripts, and hence also into the U-Boot pinmux setup table?

Quoted 8 lines
Quoted 4 lines

My understanding of how these pins are generally used is that open-drain is likely correct. I have no idea whether Tegra should supply the pullup for these pins, or whether the board has a pullup resistor in which case Tegra doesn't need to pull up.

From what Andrew (added to CC) said when these changes were discussed,
it shouldn't matter as a fixed regulator is used to drive those pins high.

It looks like nyan-big and nyan-blaze configure these pins differently, which may be incorrect if the boards are truly almost identical. Is that expected? Nyan-big sets them both to open-drain but Nyan-blaze sets them to push-pull. The pull-up enable is different too. Typically these pins are open-drain, because there's often a current sensor chip on the USB port power rail which asserts (pulls low in open-drain mode) these signals to turn off the power when an over-current condition is detected. Not all boards do this though, so the difference may be perfectly expected; someone with access to the schematics would have to check.

#6 lore raw

PATCH 1/1 ARM: tegra: Enable TPM on tegra124 nyan boards

Hi Stephen,

Quoted 75 lines · Stephen Warren
Quoted 70 lines · Tomeu Vizoso
Quoted 58 lines · Stephen Warren
Quoted 3 lines · Simon Glass

Regenerate the pinmux from the latest tegra-pinmux-scripts.

(Dropping most CCs; DT maintainers and lists generally don't get CC'd on simple DT content changes but rather on schema adds/changes and perhaps major DT content changes depending on context)

arch/arm/boot/dts/tegra124-nyan-big.dts line 33

Quoted 10 lines
arch/arm/boot/dts/tegra124-nyan-big.dts +1 -1
 
 
 
                 pinctrl-names = "default";
                 pinctrl-0 = <&pinmux_default>;
 
-               pinmux_default: common {
+               state_default: pinmux {

This change will break compilation, since it changes the label name, yet the
old name is still referenced in pinctrl-0 above. Same applies in the other
file too.

Quoted 27 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +4 -4
@@ -437,18 +437,18 @@
                         usb_vbus_en0_pn4 {
                                 nvidia,pins = "usb_vbus_en0_pn4";
                                 nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                 nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                 nvidia,enable-input =
 <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                         };
                         usb_vbus_en1_pn5 {
                                 nvidia,pins = "usb_vbus_en1_pn5";
                                 nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                 nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                 nvidia,enable-input =
 <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
Quoted 8 lines

arch/arm/boot/dts/tegra124-nyan-blaze.dts line 454

Quoted 1 line
arch/arm/boot/dts/tegra124-nyan-blaze.dts +0 -0
                         };

Tomeu, can you comment on those changes? Evidently the pinmux configuration
that's you added to the kernel doesn't exactly match the pinmux configuration that you added to tegra-pinmux-scripts.

Quoted 2 lines

Are you sure? Just checked and what tegra-pinmux-scripts currently generates matches what is currently in the kernel, for both nyans.

Quoted 8 lines

My apologies; you're correct.

This patch to the kernel DTs includes changes that aren't generated by either current tegra-pinmux-scripts, nor by tegra-pinmux-scripts with Simon's "[pinmux scripts PATCH] Support TPM on nyan boards" applied. Simon, can you double-check you didn't have any local patches to tegra-pinmux-scripts applied when you generated the DT content for this patch?

Yes. Apart from my patch the top commit is 39af.

Quoted 18 lines
Quoted 13 lines
Quoted 11 lines

Is the change above
correct, or do we need to propagate this change from the kernel DT into tegra-pinmux-scripts, and hence also into the U-Boot pinmux setup table?

My understanding of how these pins are generally used is that open-drain is
likely correct. I have no idea whether Tegra should supply the pullup for these pins, or whether the board has a pullup resistor in which case Tegra
doesn't need to pull up.

Quoted 3 lines

From what Andrew (added to CC) said when these changes were discussed,
it shouldn't matter as a fixed regulator is used to drive those pins high.

Quoted 9 lines

It looks like nyan-big and nyan-blaze configure these pins differently, which may be incorrect if the boards are truly almost identical. Is that expected? Nyan-big sets them both to open-drain but Nyan-blaze sets them to push-pull. The pull-up enable is different too. Typically these pins are open-drain, because there's often a current sensor chip on the USB port power rail which asserts (pulls low in open-drain mode) these signals to turn off the power when an over-current condition is detected. Not all boards do this though, so the difference may be perfectly expected; someone with access to the schematics would have to check.

Regards,
Simon

#7 lore raw

PATCH 1/1 ARM: tegra: Enable TPM on tegra124 nyan boards

Quoted 80 lines · Simon Glass

Hi Stephen,

Quoted 77 lines · Stephen Warren
Quoted 70 lines · Tomeu Vizoso
Quoted 58 lines · Stephen Warren
Quoted 3 lines · Simon Glass

Regenerate the pinmux from the latest tegra-pinmux-scripts.

(Dropping most CCs; DT maintainers and lists generally don't get CC'd on simple DT content changes but rather on schema adds/changes and perhaps major DT content changes depending on context)

arch/arm/boot/dts/tegra124-nyan-big.dts line 33

Quoted 10 lines
arch/arm/boot/dts/tegra124-nyan-big.dts +1 -1
 
 
 
                  pinctrl-names = "default";
                  pinctrl-0 = <&pinmux_default>;
 
-               pinmux_default: common {
+               state_default: pinmux {

This change will break compilation, since it changes the label name, yet the
old name is still referenced in pinctrl-0 above. Same applies in the other
file too.

Quoted 27 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +4 -4
@@ -437,18 +437,18 @@
                          usb_vbus_en0_pn4 {
                                  nvidia,pins = "usb_vbus_en0_pn4";
                                  nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                  nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                  nvidia,enable-input =
 <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                          };
                          usb_vbus_en1_pn5 {
                                  nvidia,pins = "usb_vbus_en1_pn5";
                                  nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                  nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                  nvidia,enable-input =
 <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
Quoted 8 lines

arch/arm/boot/dts/tegra124-nyan-blaze.dts line 454

Quoted 1 line
arch/arm/boot/dts/tegra124-nyan-blaze.dts +0 -0
                          };

Tomeu, can you comment on those changes? Evidently the pinmux configuration
that's you added to the kernel doesn't exactly match the pinmux configuration that you added to tegra-pinmux-scripts.

Quoted 2 lines

Are you sure? Just checked and what tegra-pinmux-scripts currently generates matches what is currently in the kernel, for both nyans.

My apologies; you're correct.

Quoted 8 lines
Quoted 6 lines

This patch to the kernel DTs includes changes that aren't generated by either current tegra-pinmux-scripts, nor by tegra-pinmux-scripts with Simon's "[pinmux scripts PATCH] Support TPM on nyan boards" applied. Simon, can you double-check you didn't have any local patches to tegra-pinmux-scripts applied when you generated the DT content for this patch?

Yes. Apart from my patch the top commit is 39af.

OK, did you paste the same DT content into both DTs then, instead of generating each DT separately?

When I re-generate the DT using commit 39af, I don't get any changes to usb_vbus_en*.

#8 lore raw

PATCH 1/1 ARM: tegra: Enable TPM on tegra124 nyan boards

Hi Stephen,

Quoted 102 lines · Stephen Warren
Quoted 100 lines · Simon Glass

Hi Stephen,

Quoted 94 lines · Stephen Warren
Quoted 79 lines · Tomeu Vizoso
Quoted 69 lines · Stephen Warren
Quoted 4 lines · Simon Glass

Regenerate the pinmux from the latest tegra-pinmux-scripts.

(Dropping most CCs; DT maintainers and lists generally don't get CC'd on simple DT content changes but rather on schema adds/changes and perhaps major DT content changes depending on context)

arch/arm/boot/dts/tegra124-nyan-big.dts line 33

Quoted 11 lines
arch/arm/boot/dts/tegra124-nyan-big.dts +1 -1
 
 
 
 
                  pinctrl-names = "default";
                  pinctrl-0 = <&pinmux_default>;
 
-               pinmux_default: common {
+               state_default: pinmux {

This change will break compilation, since it changes the label name, yet the
old name is still referenced in pinctrl-0 above. Same applies in the other
file too.

Quoted 19 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +2 -2
@@ -437,18 +437,18 @@
                          usb_vbus_en0_pn4 {
                                  nvidia,pins = "usb_vbus_en0_pn4";
                                  nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                  nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                  nvidia,enable-input =
 <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                          };
                          usb_vbus_en1_pn5 {

arch/arm/boot/dts/tegra124-nyan-blaze.dts line 454

Quoted 10 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +2 -2
                                  nvidia,pins = "usb_vbus_en1_pn5";
                                  nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                  nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                  nvidia,enable-input =
 <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                          };
Quoted 4 lines

Tomeu, can you comment on those changes? Evidently the pinmux configuration
that's you added to the kernel doesn't exactly match the pinmux configuration that you added to tegra-pinmux-scripts.

Quoted 2 lines

Are you sure? Just checked and what tegra-pinmux-scripts currently generates matches what is currently in the kernel, for both nyans.

My apologies; you're correct.

This patch to the kernel DTs includes changes that aren't generated by either current tegra-pinmux-scripts, nor by tegra-pinmux-scripts with Simon's "[pinmux scripts PATCH] Support TPM on nyan boards" applied. Simon, can you double-check you didn't have any local patches to tegra-pinmux-scripts applied when you generated the DT content for this patch?

Quoted 5 lines
Quoted 1 line

Yes. Apart from my patch the top commit is 39af.

OK, did you paste the same DT content into both DTs then, instead of generating each DT separately?

Not intentionally, but I wonder if I failed to change the board parameter?

Quoted 1 line

When I re-generate the DT using commit 39af, I don't get any changes to usb_vbus_en*.

I can't explain that. I'll try it again when I get a chance.

Regards,
Simon

#9 lore raw

PATCH 1/1 ARM: tegra: Enable TPM on tegra124 nyan boards

Hi,

Quoted 108 lines · Simon Glass

Hi Stephen,

Quoted 105 lines · Stephen Warren
Quoted 101 lines · Simon Glass

Hi Stephen,

Quoted 86 lines · Stephen Warren
Quoted 79 lines · Tomeu Vizoso
Quoted 69 lines · Stephen Warren
Quoted 4 lines · Simon Glass

Regenerate the pinmux from the latest tegra-pinmux-scripts.

(Dropping most CCs; DT maintainers and lists generally don't get CC'd on simple DT content changes but rather on schema adds/changes and perhaps major DT content changes depending on context)

arch/arm/boot/dts/tegra124-nyan-big.dts

Quoted 11 lines
arch/arm/boot/dts/tegra124-nyan-big.dts +1 -1
 
 
 
 
                  pinctrl-names = "default";
                  pinctrl-0 = <&pinmux_default>;
 
-               pinmux_default: common {
+               state_default: pinmux {

This change will break compilation, since it changes the label name, yet the
old name is still referenced in pinctrl-0 above. Same applies in the other
file too.

Quoted 19 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +2 -2
@@ -437,18 +437,18 @@
                          usb_vbus_en0_pn4 {
                                  nvidia,pins = "usb_vbus_en0_pn4";
                                  nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                  nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                  nvidia,enable-input =
 <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                          };
                          usb_vbus_en1_pn5 {

arch/arm/boot/dts/tegra124-nyan-blaze.dts line 454

Quoted 10 lines
arch/arm/boot/dts/tegra124-nyan-blaze.dts +2 -2
                                  nvidia,pins = "usb_vbus_en1_pn5";
                                  nvidia,function = "usb";
-                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                  nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                  nvidia,enable-input =
 <TEGRA_PIN_ENABLE>;
-                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                          };
Quoted 4 lines

Tomeu, can you comment on those changes? Evidently the pinmux configuration
that's you added to the kernel doesn't exactly match the pinmux configuration that you added to tegra-pinmux-scripts.

Quoted 2 lines

Are you sure? Just checked and what tegra-pinmux-scripts currently generates matches what is currently in the kernel, for both nyans.

Quoted 8 lines

My apologies; you're correct.

This patch to the kernel DTs includes changes that aren't generated by either current tegra-pinmux-scripts, nor by tegra-pinmux-scripts with Simon's "[pinmux scripts PATCH] Support TPM on nyan boards" applied. Simon, can you double-check you didn't have any local patches to tegra-pinmux-scripts applied when you generated the DT content for this patch?

Yes. Apart from my patch the top commit is 39af.

Quoted 8 lines
Quoted 2 lines

OK, did you paste the same DT content into both DTs then, instead of generating each DT separately?

Not intentionally, but I wonder if I failed to change the board parameter?

Quoted 1 line

When I re-generate the DT using commit 39af, I don't get any changes to usb_vbus_en*.

I can't explain that. I'll try it again when I get a chance.

It doesn't seem to happen now, I must have done something wrong.

I'll send a v2 patch.

Regards,
Simon