AnsweredAssumed Answered

How to use Serial Flash Memory (imx6ull)

Question asked by seunghan kwon on Sep 2, 2019
Latest reply on Sep 5, 2019 by seunghan kwon

Sorry poor english. I need help or some hint.

 

I use I.mx6ull (var-dart-custom? from DART-6UL - Variscite Wiki )

and I should use IS25LP016D (It's serial flash memory http://www.issi.com/WW/pdf/25LP-WP016D.pdf )

I'm poor about linux build or device tree set.

but I found about SPI(DART-6UL SPI - Variscite Wiki )

 

//example.

&ecspi1 {
     fsl,spi-num-chipselects = <1>;
     cs-gpios = <&gpio4 26 0>;
     pinctrl-names = "default";
     pinctrl-0 = <&pinctrl_ecspi1_1>;
     status = "okay";
          chip1: spidev@0 {
                compatible = "spidev";
                spi-max-frequency = <12000000>;
                reg = <0>;
         };
};
&iomuxc {
     //imx6ul-evk {
          pinctrl_ecspi1_1: ecspi1grp {
               fsl,pins = <
                    MX6UL_PAD_CSI_DATA07__ECSPI1_MISO       0x100b1
                    MX6UL_PAD_CSI_DATA06__ECSPI1_MOSI       0x100b1
                    MX6UL_PAD_CSI_DATA04__ECSPI1_SCLK       0x100b1
                    MX6UL_PAD_CSI_DATA05__GPIO4_IO26        0x100b1
               >;
          };
     //};
};
but I use spidev by python. but It looks like doesn't work. I use spidev's method like 
(readbytes, writebytes, xfer) all of them return just [0].
actually, I want to this one [IS25LP016D] to flash disk. like just mount.
what should I do? I found like this.
//m25p80 is like a common spi flash driver.?
&ecspi1 {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_ecspi1_1>;
    status = "okay";
    cs-gpios = <&gpio4 24 0>;
    flash@0 {
       compatible = "m25p80", "jedec,spi-nor";
       spi-max-frequency = <20000000>;
       reg = <0>;
    };
};
&iomuxc ・・・・
         pinctrl_ecspi1_1: ecspi1grp {
                 fsl,pins = <
                         MX6UL_PAD_CSI_DATA07__ECSPI1_MISO       0x100b1
                         MX6UL_PAD_CSI_DATA06__ECSPI1_MOSI       0x100b1
                         MX6UL_PAD_CSI_DATA04__ECSPI1_SCLK       0x100b1
                 >;
         };
but It's error like this. sorry about poor skill.
m25p80 spi0.0: unrecognized JEDEC id bytes: 9d, 60, 15
I found spi-nor / mtd / something else.
but I need more helpful info or some advise or uage example.

thanks.

Outcomes