This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: Nand flash not detected

Part Number: AM625

hello,

I have winbond w25n02jw flash IC. I and try to communicate over QSPI. but I am not able to detect that. please help me.

In dts file:

&ospi0 {
        flash@0 {
                compatible = "jedec,spi-nand","winbond,w25n02jw";
                reg = <0x0>;
                spi-tx-bus-width = <4>;
                spi-rx-bus-width = <4>;
                spi-max-frequency = <25000000>;
                cdns,tshsl-ns = <60>;
                cdns,tsd2d-ns = <60>;
                cdns,tchsh-ns = <60>;
                cdns,tslch-ns = <60>;
                cdns,read-delay = <4>;
                cdns,phy-mode;

                partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;

                        partition@0 {
                                label = "ospi.tiboot3";
                                reg = <0x0 0x80000>;
                        };

                        partition@80000 {
                                label = "ospi.tispl";
                                reg = <0x80000 0x200000>;
                        };

                        partition@280000 {
                                label = "ospi.u-boot";
                                reg = <0x280000 0x400000>;
                        };

                       partition@680000 {
                                label = "ospi.env";
                                reg = <0x680000 0x40000>;
                        };

                        partition@6c0000 {
                                label = "ospi.env.backup";
                                reg = <0x6c0000 0x40000>;
                        };

                        partition@800000 {
                                label = "ospi.rootfs";
                                reg = <0x800000 0x37c0000>;
                        };

                        partition@3fc0000 {
                                label = "ospi.phypattern";
                                reg = <0x3fc0000 0x40000>;
                        };
                };
        };
};

ospi0_pins_default: ospi0-pins-default {
                pinctrl-single,pins = <
                        AM62X_IOPAD(0x000, PIN_OUTPUT, 0) /* (H24) OSPI0_CLK */
                        AM62X_IOPAD(0x00c, PIN_INPUT, 0) /* (E25) OSPI0_D0 */
                        AM62X_IOPAD(0x010, PIN_INPUT, 0) /* (G24) OSPI0_D1 */
                        AM62X_IOPAD(0x014, PIN_INPUT, 0) /* (F25) OSPI0_D2 */
                        AM62X_IOPAD(0x018, PIN_INPUT, 0) /* (F24) OSPI0_D3*/
                >;
        };

&ospi0 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&ospi0_pins_default>;
};

please can you suggest what should change in my dts. and config flag.