Skip to contentSkip to conversation

p3450: reduce size of Jetson Nano u-boot.bin

PATCH In review Peter Robinson 3 participants 7 messages Aug 19, 2025 – Aug 20, 2025

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

PATCH 1/2 p3450: reduce size of Jetson Nano u-boot.bin

The Jetson Nano contains all it's firmware on a 4Mb SPI flash, the allocated size in that flash for U-Boot is 753664 bytes so we need to ensure the u-boot.bin doesn't exceed that else it will fail.

Add a BOARD_SIZE_LIMIT and drop a few large, and somewhat esoteric, options to bring us back under that limit.

---
 configs/p3450-0000_defconfig | 8 ++++++++
 1 file changed, 8 insertions(+)
configs/p3450-0000_defconfig +8 -0
index a002178b7fb..518ed6b37a2 100644
@@ -14,6 +14,8 @@ CONFIG_ENV_SECT_SIZE=0x1000
 CONFIG_DEFAULT_DEVICE_TREE="tegra210-p3450-0000"
 CONFIG_SYS_BOOTM_LEN=0x800000
 CONFIG_SYS_LOAD_ADDR=0x80080000
+CONFIG_HAS_BOARD_SIZE_LIMIT=y
+CONFIG_BOARD_SIZE_LIMIT=753664
 CONFIG_TEGRA210=y
 CONFIG_TARGET_P3450_0000=y
 CONFIG_TEGRA_GPU=y
@@ -24,8 +26,14 @@ CONFIG_SYS_PBSIZE=2089
 CONFIG_CONSOLE_MUX=y
 CONFIG_SYS_STDIO_DEREGISTER=y
 CONFIG_SYS_PROMPT="Tegra210 (P3450-0000) # "
+# CONFIG_BOOTM_RTEMS is not set
+# CONFIG_BOOTM_VXWORKS is not set
+# CONFIG_BOOTM_PLAN9 is not set
 # CONFIG_CMD_IMI is not set
+# CONFIG_CRC32_VERIFY is not set
 CONFIG_CMD_DFU=y
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_GO is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
Signature · 1 line
2.50.1
#1 lore raw

PATCH 2/2 p3450: fix Jetson Nano SPI flash

The Nano's SPI flash stopped working in U-Boot, as the prior stage loaded U-Boot, the only thing it was used for was save/loading env vars so update the DT so it can now initialise it. It also drops enabling the old TEGRA114_SPI driver, as the flash hangs off the faster TEGRA210_QSPI interface, nothing on the Nano uses the old interface by default so it's surplus.

---
 arch/arm/dts/tegra210-p3450-0000.dts | 9 ++++++++-
 arch/arm/dts/tegra210.dtsi           | 6 +++---
 configs/p3450-0000_defconfig         | 1 -
 3 files changed, 11 insertions(+), 5 deletions(-)
arch/arm/dts/tegra210-p3450-0000.dts +8 -1
index 9ef744ac8b0..ddeeb232de2 100644
@@ -124,7 +124,14 @@
 
 	spi@70410000 {
 		status = "okay";
-		spi-max-frequency = <80000000>;
+
+		flash@0 {
+			compatible = "jedec,spi-nor";
+			reg = <0>;
+			spi-max-frequency = <104000000>;
+			spi-tx-bus-width = <2>;
+			spi-rx-bus-width = <2>;
+		};
 	};
 
 	usb@7d000000 {
arch/arm/dts/tegra210.dtsi +3 -3
index 28ecd2b467a..6dd8fe26c38 100644
@@ -762,10 +762,10 @@
 		interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
 		#address-cells = <1>;
 		#size-cells = <0>;
-		clocks = <&tegra_car TEGRA210_CLK_QSPI>;
-		clock-names = "qspi";
+		clocks = <&tegra_car TEGRA210_CLK_QSPI>,
+			<&tegra_car TEGRA210_CLK_QSPI_PM>;
+		clock-names = "qspi", "qspi_out";
 		resets = <&tegra_car 211>;
-		reset-names = "qspi";
 		dmas = <&apbdma 5>, <&apbdma 5>;
 		dma-names = "rx", "tx";
 		status = "disabled";
configs/p3450-0000_defconfig +0 -1
index 518ed6b37a2..3b4b863100f 100644
@@ -61,7 +61,6 @@ CONFIG_RTL8169=y
 CONFIG_NVME_PCI=y
 CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
-CONFIG_TEGRA114_SPI=y
 CONFIG_TEGRA210_QSPI=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
Signature · 1 line
2.50.1
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] p3450: fix Jetson Nano SPI flash

Quoted 40 lines · Peter Robinson

The Nano's SPI flash stopped working in U-Boot, as the prior stage loaded U-Boot, the only thing it was used for was save/loading env vars so update the DT so it can now initialise it. It also drops enabling the old TEGRA114_SPI driver, as the flash hangs off the faster TEGRA210_QSPI interface, nothing on the Nano uses the old interface by default so it's surplus.

---
 arch/arm/dts/tegra210-p3450-0000.dts | 9 ++++++++-
 arch/arm/dts/tegra210.dtsi           | 6 +++---
 configs/p3450-0000_defconfig         | 1 -
 3 files changed, 11 insertions(+), 5 deletions(-)
arch/arm/dts/tegra210-p3450-0000.dts +8 -1
index 9ef744ac8b0..ddeeb232de2 100644
@@ -124,7 +124,14 @@
 
 	spi@70410000 {
 		status = "okay";
-		spi-max-frequency = <80000000>;
+
+		flash@0 {
+			compatible = "jedec,spi-nor";
+			reg = <0>;
+			spi-max-frequency = <104000000>;
+			spi-tx-bus-width = <2>;
+			spi-rx-bus-width = <2>;
+		};
 	};
 
 	usb@7d000000 {
arch/arm/dts/tegra210.dtsi +0 -0
index 28ecd2b467a..6dd8fe26c38 100644

arch/arm/dts/tegra210.dtsi line 766

Quoted 7 lines
arch/arm/dts/tegra210.dtsi +2 -2
@@ -762,10 +762,10 @@
 		interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
 		#address-cells = <1>;
 		#size-cells = <0>;
-		clocks = <&tegra_car TEGRA210_CLK_QSPI>;
-		clock-names = "qspi";
+		clocks = <&tegra_car TEGRA210_CLK_QSPI>,
+			<&tegra_car TEGRA210_CLK_QSPI_PM>;

Nit: We usually indent so that subsequent lines align with the first, so an extra space would be required here. I don't feel strongly about it, though, so no need to resend just for this.

Reviewed-by
#3 lore raw

Re: [PATCH 2/2] p3450: fix Jetson Nano SPI flash

ср, 20 серп. 2025 р. о 13:09 Thierry Reding <[email protected]> пише:

Quoted 54 lines · Peter Robinson
Quoted 40 lines

The Nano's SPI flash stopped working in U-Boot, as the prior stage loaded U-Boot, the only thing it was used for was save/loading env vars so update the DT so it can now initialise it. It also drops enabling the old TEGRA114_SPI driver, as the flash hangs off the faster TEGRA210_QSPI interface, nothing on the Nano uses the old interface by default so it's surplus.

---
 arch/arm/dts/tegra210-p3450-0000.dts | 9 ++++++++-
 arch/arm/dts/tegra210.dtsi           | 6 +++---
 configs/p3450-0000_defconfig         | 1 -
 3 files changed, 11 insertions(+), 5 deletions(-)
arch/arm/dts/tegra210-p3450-0000.dts +8 -1
index 9ef744ac8b0..ddeeb232de2 100644
@@ -124,7 +124,14 @@
 
      spi@70410000 {
              status = "okay";
-             spi-max-frequency = <80000000>;
+
+             flash@0 {
+                     compatible = "jedec,spi-nor";
+                     reg = <0>;
+                     spi-max-frequency = <104000000>;
+                     spi-tx-bus-width = <2>;
+                     spi-rx-bus-width = <2>;
+             };
      };
 
      usb@7d000000 {
arch/arm/dts/tegra210.dtsi +0 -0
index 28ecd2b467a..6dd8fe26c38 100644

arch/arm/dts/tegra210.dtsi line 766

Quoted 7 lines
arch/arm/dts/tegra210.dtsi +2 -2
@@ -762,10 +762,10 @@
              interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
              #address-cells = <1>;
              #size-cells = <0>;
-             clocks = <&tegra_car TEGRA210_CLK_QSPI>;
-             clock-names = "qspi";
+             clocks = <&tegra_car TEGRA210_CLK_QSPI>,
+                     <&tegra_car TEGRA210_CLK_QSPI_PM>;

Nit: We usually indent so that subsequent lines align with the first, so an extra space would be required here. I don't feel strongly about it, though, so no need to resend just for this.

Quoted 1 line

Applied to u-boot-tegra/staging, thank you!

#4 lore raw
In reply to Peter Robinson

вт, 19 серп. 2025 р. о 18:40 Peter Robinson <[email protected]> пише:

Quoted 6 lines

The Jetson Nano contains all it's firmware on a 4Mb SPI flash, the allocated size in that flash for U-Boot is 753664 bytes so we need to ensure the u-boot.bin doesn't exceed that else it will fail.

Quoted 8 lines

Add a BOARD_SIZE_LIMIT and drop a few large, and somewhat esoteric, options to bring us back under that limit.

---
 configs/p3450-0000_defconfig | 8 ++++++++
 1 file changed, 8 insertions(+)

Thank you for your contribution! Both patches LGTM, but I would like to run a few tests and checks. If all goes well, I will pick them.

Best regards,
Svyatoslav R.

Acked-by on v1 1/2
#5 lore raw
In reply to Peter Robinson
Quoted 5 lines · Peter Robinson

The Jetson Nano contains all it's firmware on a 4Mb SPI flash, the allocated size in that flash for U-Boot is 753664 bytes so we need to ensure the u-boot.bin doesn't exceed that else it will fail.

Quoted 7 lines

Add a BOARD_SIZE_LIMIT and drop a few large, and somewhat esoteric, options to bring us back under that limit.

---
 configs/p3450-0000_defconfig | 8 ++++++++
 1 file changed, 8 insertions(+)
Reviewed-by
#6 lore raw

ср, 20 серп. 2025 р. о 13:06 Thierry Reding <[email protected]> пише:

Quoted 10 lines · Peter Robinson
Quoted 8 lines

The Jetson Nano contains all it's firmware on a 4Mb SPI flash, the allocated size in that flash for U-Boot is 753664 bytes so we need to ensure the u-boot.bin doesn't exceed that else it will fail.

Add a BOARD_SIZE_LIMIT and drop a few large, and somewhat esoteric, options to bring us back under that limit.

Quoted 6 lines
Quoted 4 lines
---
 configs/p3450-0000_defconfig | 8 ++++++++
 1 file changed, 8 insertions(+)

Applied to u-boot-tegra/staging, thank you!