Call for testing: spi-mem driver for Aspeed SMC controllers

Lei Yu yulei.sh at bytedance.com
Tue Mar 8 12:53:57 AEDT 2022


On Mon, Mar 7, 2022 at 9:06 PM Cédric Le Goater <clg at kaod.org> wrote:
>
> Hello,
>
>   On 3/7/22 10:41, Lei Yu wrote:
> > We hit some issues with the new driver, and here is some detailed info.
> >
> > * Our system (not yet upstreamed) uses `mx66l51235f` as the FMC SPI
> > flash, and we created a QEMU model.
> >
> > * When the dts is like "default":
> >   &fmc {
> >          pinctrl-names = "default";
> >          status = "okay";
> >          flash at 0 {
> >                  status = "okay";
> >                  m25p,fast-read;
> >                  label = "bmc";
> >                  spi-max-frequency = <50000000>;
> >   #include "openbmc-flash-layout-64.dtsi"
> >          };
> >   };
> > 1. Run the image in ast2600-evb QEMU, it boots fine;
> > 2. We have a model (g220b) in QEMU that uses mx66l51235f as the fmc
> > SPI (`amc->fmc_model = "mx66l51235f";`), it boots with below error:
> >   [    1.848286] vmap allocation for size 268439552 failed: use
> > vmalloc=<size> to increase size
> >   [    1.848774] spi-aspeed-smc 1e620000.spi: ioremap failed for
> > resource [mem 0x20000000-0x2fffffff]
> >   [    1.849898] spi-aspeed-smc: probe of 1e620000.spi failed with error -12
> > 3. If I manually add vmalloc to the kernel command line (setenv
> > bootargs 'console=ttyS4,115200n8 root=/dev/ram rw vmalloc=400M'), the
> > above QEMU model boots fine.
> > 4. On the real system, it behaves the same as QEMU, that I need to add
> > `vmalloc=400M` to make it boot OK.
>
> I don't see why. Is that the same kernel version and config ?
>
> May be check the allocations in
>
>    /proc/vmallocinfo

It shows a large area as below:

 0xc1d30472-0x406b4a0c 268439552 __devm_ioremap_resource+0x178/0x1f0
phys=0x20000000 ioremap

>
> > * When the dts set `spi-tx-bus-width/spi-rx-bus-width = <4>`, and uses
> > pinctrl_fwqspid_default from @Joel Stanley's pinctrl patch:
> >   &fmc {
> >          pinctrl-names = "default";
> >          pinctrl-0 = <&pinctrl_fwqspid_default>;
> >          status = "okay";
> >          flash at 0 {
> >                  status = "okay";
> >                  m25p,fast-read;
> >                  label = "bmc";
> >                  spi-max-frequency = <50000000>;
> >                  spi-tx-bus-width = <4>;
> >                  spi-rx-bus-width = <4>;
> >   #include "openbmc-flash-layout-64.dtsi"
> >          };
> >   };
> > 1. It fails to boot in ast2600-evb QEMU:
> >   [    0.586654] spi-nor: probe of spi0.0 failed with error -5
> >   [    0.587654] spi-nor spi0.1: unrecognized JEDEC id bytes: 00 00 00 00 00 00
> > 2. It fails to boot in the g220b model with the same vmalloc failure issue.
> > 2. With `vmalloc=400M`, the g220b model boots fine in QEMU.
> > 3. On the real system, it still fails to boot with `vmalloc=400M` due
> > to the below error:
> >   [    0.970091] spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
> >   [    0.977902] spi-nor: probe of spi0.0 failed with error -2
>
>
> I could not make Quad work reliably on HW. This is the next step after the
> new driver is merged.

Got it.

>
> Thanks for tests !
>
> C.
>


More information about the openbmc mailing list