cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
atran17
Contributor
Contributor
171 Views
Registered: ‎01-25-2019

Zynqmp how to delete property node in petalinux 2019.1

Hi All,

How to remove a property in a node of the device tree?

In the system-conf.dtsi, it automatic generate a nand node like this.

system-conf.dtsi has a node like this

&nand0 {
	#address-cells = <1>;
	#size-cells = <1>;
	partition@0x00000000 {
		label = "boot";
		reg = <0x00000000 0x00040000>;
	};
	partition@0x00040000 {
		label = "bootenv";
		reg = <0x00040000 0x00020000>;
	};
	partition@0x00060000 {
		label = "kernel";
		reg = <0x00060000 0x00600000>;
	};
};

How to delete all partition of system-conf.dtsi in the system-user.dtsi?

/include/ "system-conf.dtsi"
/ {
};

.......

/* Wanted to remove all the partition system-conf.dtsi*/
/delete-property/ partition@0x00000000; //<-- try this, not work.
/delete-property/ partition@0x00040000;
/delete-property/ partition@0x00060000;

/* Create a new NAND partition*/
&nand0 {
   status = "okay";
   arasan,has-mdma;
    
   nand@0 {
     reg = <0x0>;
     #address-cells = <0x2>;
     #size-cells = <0x1>;
  partition@0 { /* for testing purpose */
    label = "nand-fsbl-uboot";
    reg = <0x0 0x0 0x400000>;
  };
  partition@1 { /* for testing purpose */
    label = "nand-linux";
    reg = <0x0 0x400000 0x1400000>;
  };
  partition@2 { /* for testing purpose */
    label = "nand-device-tree";
    reg = <0x0 0x1800000 0x400000>;
  };
  partition@3 { /* for testing purpose */
    label = "nand-rootfs";
    reg = <0x0 0x1C00000 0x1400000>;
  };
  partition@4 { /* for testing purpose */
    label = "nand-bitstream";
    reg = <0x0 0x3000000 0x400000>;
  };
  partition@5 { /* for testing purpose */
    label = "nand-misc";
    reg = <0x0 0x3400000 0xFCC00000>;
  };
 };
};

 

The system-user.dtsi include system-conf.dtsi. How to remove those partition that set in system-config and just use new partition that create in system-user.dtsi?

Thanks for any suggestion here.

Tags (1)
0 Kudos
1 Reply
jrhtech
Voyager
Voyager
106 Views
Registered: ‎10-04-2017

Put your deletes inside the &nand node.  Also, I think these sizes are set in the petalinux config so you don't need to change the DT if you just want to change the sizes.

 

jeff

0 Kudos