Unable to read or write from system SPI flash memory.
AKASH G J
akashgj91 at gmail.com
Thu Feb 14 15:29:56 AEDT 2019
I am using the following command to write data to SPI1 flash.
*pflash -e -a 0 -f -p <filename>*
On Thu, Feb 14, 2019 at 4:13 AM Andrew Jeffery <andrew at aj.id.au> wrote:
> On Wed, 13 Feb 2019, at 19:24, AKASH G J wrote:
> > Hi all,
> >
> > We have a test board containing BMC Aspeed AST-2500. It contains BMC
> flash
> > memory, SPI1 flash memory and SPI2 flash memory. we are using zaius
> machine
> > configuration for building Linux. When I am trying to write to SPI1 flash
> > at address 30000000 using pflash tool, the modified data is not reflected
> > after reboot. Same with SPI2 flash. With pflash tool I am able to write
> > data permanently to BMC flash memory. The device tree for SPI devices is
> > following.
> >
> > &fmc {
> > status = "okay";
> >
> > flash at 0 {
> > status = "okay";
> > label = "bmc";
> > m25p,fast-read;
> > spi-max-frequency = <50000000>;
> > #include "openbmc-flash-layout.dtsi"
> > };
> > };
> >
> > &spi1 {
> > status = "okay";
> > pinctrl-names = "default";
> > pinctrl-0 = <&pinctrl_spi1_default>;
> >
> > flash at 0 {
> > status = "okay";
> > label = "pnor";
> > m25p,fast-read;
> > spi-max-frequency = <100000000>;
> > };
> > };
> >
> > &spi2 {
> > status = "okay";
> > pinctrl-names = "default";
> > pinctrl-0 = <&pinctrl_spi2ck_default
> > &pinctrl_spi2cs0_default
> > &pinctrl_spi2cs1_default
> > &pinctrl_spi2miso_default
> > &pinctrl_spi2mosi_default>;
> >
> > flash at 0 {
> > status = "okay";
> > };
> > };
>
> How are you invoking pflash? You should not be using the /dev/mem backend
> when you have the flash controller and devices enabled via the devicetree.
> You
> should be using the mtd backend instead.
>
> Andrew
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190214/fde5256e/attachment.htm>
More information about the openbmc
mailing list