p3450: reduce size of Jetson Nano u-boot.bin
Subsystems (2)
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
@@ -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
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
@@ -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
@@ -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
@@ -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
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_SPIdriver, as the flash hangs off the fasterTEGRA210_QSPIinterface, nothing on the Nano uses the old interface by default so it's surplus.Signed-off-by Peter Robinson <[email protected]>--- 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@@ -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
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.
Svyatoslav Ryhel
Reviewed-byRe: [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_SPIdriver, as the flash hangs off the fasterTEGRA210_QSPIinterface, nothing on the Nano uses the old interface by default so it's surplus.Signed-off-by Peter Robinson <[email protected]>--- 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@@ -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
-0arch/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
Acked-by Thierry Reding <[email protected]>
Applied to u-boot-tegra/staging, thank you!
вт, 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_LIMITand drop a few large, and somewhat esoteric, options to bring us back under that limit.Signed-off-by Peter Robinson <[email protected]>--- 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.
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_LIMITand drop a few large, and somewhat esoteric, options to bring us back under that limit.Signed-off-by Peter Robinson <[email protected]>--- configs/p3450-0000_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
Svyatoslav Ryhel
Reviewed-byср, 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_LIMITand drop a few large, and somewhat esoteric, options to bring us back under that limit.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Peter Robinson <[email protected]>--- configs/p3450-0000_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+)Acked-by Thierry Reding <[email protected]>
Applied to u-boot-tegra/staging, thank you!