stm32mp157c nand flash u-boot configuration
I am using stm32mp157c and working initialize mtd nand flash w25n512.
i was able to run it on kernel mode. Kernel device tree is;
aliases {
spinand0 = &qspi;
};
...
&qspi {
pinctrl-names = "default";
pinctrl-0 = <&quadspi_pins_mx>;
num-cs = <0x1>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
flash0: w25n512@0 {
compatible = "spi-nand";
reg = <0x0>;
spi-rx-bus-width = <2>;
spi-tx-bus-width = <2>;
spi-max-frequency = <166000000>;
#address-cells = <1>;
#size-cells = <1>;
};
};
...
&pinctrl {
quadspi_pins_mx: quadspi_mx-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 6, AF10)>, /* QUADSPI_BK1_NCS */
<STM32_PINMUX('F', 8, AF10)>, /* QUADSPI_BK1_IO0 */
<STM32_PINMUX('F', 9, AF10)>; /* QUADSPI_BK1_IO1 */
bias-disable;
drive-push-pull;
slew-rate = <1>;
};
pins2 {
pinmux = <STM32_PINMUX('F', 10, AF9)>; /* QUADSPI_CLK */
bias-disable;
drive-push-pull;
slew-rate = <2>;
};
};
...
};The mtd files appear under /dev list and i called the
cat /sys/class/mtd/mtd0/size
5242880
it is working. Likewise when i add to u-boot configuration it didn't work.
In u-boot mode is active, i called sf probe 0:0 0 0 or sf probe 0:1 0 0
Invalid bus 0 (err=-19)
Failed to initialize SPI flash at 0:0 (errror -19)
error occured.
Where can i wrong?
Best Regards
Ali Mesut Ince
