Tool/software:
Hi TI experts,
Our project is booted from SD Card. but we need to save the u-boot environment to a spi-flash.
I use the TI-SDK 10 with the following DTS.
&main_pmx0 {
// MAIN_SPI0
main_spi0_pins_default: main-spi0-pins-default {
pinctrl-single,pins = <
AM62PX_IOPAD(0x01bc, PIN_INPUT, 0) /* (B21) SPI0_CLK */
AM62PX_IOPAD(0x01b4, PIN_INPUT, 0) /* (D20) SPI0_CS0 */
AM62PX_IOPAD(0x01c0, PIN_INPUT, 0) /* (B20) SPI0_D0 */
AM62PX_IOPAD(0x01c4, PIN_INPUT, 0) /* (C21) SPI0_D1 */
>;
};
}
&main_spi0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_spi0_pins_default>;
#address-cells = <1>;
#size-cells= <0>;
ti,pindir-d0-out-d1-in = <1>;
flash@0{
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
spi-max-frequency = <48000000>;
#address-cells = <1>;
#size-cells= <1>;
partition@0 {
label = "env";
reg = <0x0 0x20000>;
};
partition@1 {
label = "env.backup";
reg = <0x20000 0x20000>;
};
partition@2 {
label = "hwid";
reg = <0x40000 0x20000>;
};
partition@3 {
label = "persistent";
reg = <0x60000 0x80000>;
};
partition@4 {
label = "Application";
reg = <0xE0000 0x7F20000>;
};
};
};
But the u-boot will crash and restart when I issue the command "sf probe" in u-boot.

But I can access the flash in the kernel.

We have applied this patch in U-Boot: u-boot-2024.04-ram-usage-fixed.patch for this issue


