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: OSPI NAND flash support

Part Number: AM625


Tool/software:

#1. What change needed to support a OSPI NAND flash? The SK board configuration based on OSPI NOR flash. Need a example.

	ospi0_pins_default: ospi0-pins-default {
		pinctrl-single,pins = <						
			
			AM62X_IOPAD(0x0000, PIN_OUTPUT, 0) /* (H24) OSPI0_CLK */
			AM62X_IOPAD(0x002c, PIN_OUTPUT, 0) /* (F23) OSPI0_CSn0 */
			
			AM62X_IOPAD(0x000c, PIN_OUTPUT, 0) /* (E25) OSPI0_D0 */
			AM62X_IOPAD(0x0010, PIN_OUTPUT, 0) /* (G24) OSPI0_D1 */
			AM62X_IOPAD(0x0014, PIN_OUTPUT, 0) /* (F25) OSPI0_D2 */
			AM62X_IOPAD(0x0018, PIN_OUTPUT, 0) /* (F24) OSPI0_D3 */

						
			AM62X_IOPAD(0x01c, PIN_INPUT, 0) /* (J23) OSPI0_D4 */
			AM62X_IOPAD(0x020, PIN_INPUT, 0) /* (J25) OSPI0_D5 */
			AM62X_IOPAD(0x024, PIN_INPUT, 0) /* (H25) OSPI0_D6 */
			AM62X_IOPAD(0x028, PIN_INPUT, 0) /* (J22) OSPI0_D7 */
			AM62X_IOPAD(0x008, PIN_INPUT, 0) /* (J24) OSPI0_DQS */	
		>;
	};
	

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

	flash@0{
		compatible = "spi-nand";
		reg = <0x0>;
		spi-tx-bus-width = <8>;
		spi-rx-bus-width = <8>;
		spi-max-frequency = <25000000>;  /* 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>;
			};
		};
	};
};	

on customer's board with upper configuration in SDK9.1. got below with mtd list"

#2. According to this post, need to modify source code to support a new OSPI NAND flash part number? How to adapt W35N04JWTBIF?

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1348933/am62a7-configure-ospi-nand-for-custom-board/

#3. There is not mtd command in my uboot, (SDK9.2), need specific configuration in uboot?

=> mtd list
Unknown command 'mtd' - try 'help'
=>

#4. Is there difference between OSPI NOR and OSPI NAND to user? same command?