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.

66AK2G12: How to Customize Partition of 64MiB QSPI NOR Flash

Part Number: 66AK2G12

HI,

I'm booting 66ak2g12 EVM from 64MiB QSPI NOR flash. It has default partitions.

Is there is any way to customize the partition ?

Thanks & Regards

Asif Malek

  • Hi Asif,
    QSPI MTD partition for K2G EVM is defined in the "u-boot/arch/arm/dts/keystone-k2g-evm.dts" for u-boot dtb as listed below,
    and similarly in the kernel dtb file "kernel/arch/arm/boot/dts/keystone-k2g-evm.dts".

    &qspi {
    	status = "okay";
    
    	flash0: m25p80@0 {
    		compatible = "s25fl512s","spi-flash";
    		reg = <0>;
    		spi-tx-bus-width = <1>;
    		spi-rx-bus-width = <4>;
    		spi-max-frequency = <96000000>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		cdns,tshsl-ns = <392>;
    		cdns,tsd2d-ns = <392>;
    		cdns,tchsh-ns = <100>;
    		cdns,tslch-ns = <100>;
    		block-size = <18>;
    
    		partition@0 {
    			label = "QSPI.u-boot-spl-os";
    			reg = <0x00000000 0x00100000>;
    		};
    		partition@1 {
    			label = "QSPI.u-boot-env";
    			reg = <0x00100000 0x00040000>;
    		};
    		partition@2 {
    			label = "QSPI.skern";
    			reg = <0x00140000 0x0040000>;
    		};
    		partition@3 {
    			label = "QSPI.pmmc-firmware";
    			reg = <0x00180000 0x0040000>;
    		};
    		partition@4 {
    			label = "QSPI.kernel";
    			reg = <0x001C0000 0x0800000>;
    		};
    		partition@5 {
    			label = "QSPI.file-system";
    			reg = <0x009C0000 0x3640000>;
    		};
    	};
    };

    Best,

    -Hong

  • Hi Hong,

    Thanks for the quick reply. Is there any way to customize this partition as per our choice or requirement ?

    Thanks & Regards

    Asif Malek

  • Hi Asif,
    Yes, it is ok to modify the "kernel/arch/arm/boot/dts/keystone-k2g-evm.dts" file to reconfigure QSPI MTD partition per your use case.
    Best,
    -Hong

  • HI Hong,

    i've tried to compile keystone-k2g-evm.dts (for the time without any changes) using below command,

    dtc -I dts -O dtb keystone-k2g-evm.dts > keystone-k2g-evm.dtb


    but it throwing error,


    ERROR: keystone-k2g-evm.dts:12.1-9 syntax error
    FATAL ERROR: Unable to parse input tree

    line 12 is : #include "keystone-k2g-evm-dtsi"

    Though every header file is there at appropriate location.


    Regards
    Asif Malek


  • Hi Asif,
    DTB is auto-built while you build u-boot/kernel from source.
    In case you want to build the DTB, there's a section <Compiling the Device Tree Binaries> from the following link:
    software-dl.ti.com/.../Foundational_Components_Kernel_Users_Guide.html
    Best,
    -Hong