Closed twu2 closed 5 years ago
add following setting in device tree will make MTD work (u-boot, u-boot environment partition).
&ecspi1 { fsl,spi-num-chipselects = <2>; cs-gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>, <&gpio3 19 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi1>; status = "okay";
flash: m25p80@0 { #address-cells = <1>; #size-cells = <1>; compatible = "m25p80", "jedec,spi-nor"; spi-max-frequency = <20000000>; reg = <0>; partition@0 { label = "uboot"; reg = <0x0 0xc0000>; }; partition@c0000 { label = "uboot environment"; reg = <0xc0000 0x40000>; }; partition@100000 { label = "reserved"; reg = <0x100000 0x100000>; }; };
};
Latest branch 5.2.8 has the MTD partitions visible in Linux.
add following setting in device tree will make MTD work (u-boot, u-boot environment partition).
&ecspi1 { fsl,spi-num-chipselects = <2>; cs-gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>, <&gpio3 19 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi1>; status = "okay";
};