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

John Wang wangzq.jn at gmail.com
Wed Mar 2 13:47:16 AEDT 2022


Cédric Le Goater <clg at kaod.org> 于2022年3月1日周二 18:25写道:
>
> On 3/1/22 10:57, John Wang wrote:
> > Joel Stanley <joel at jms.id.au> 于2022年2月25日周五 13:30写道:
> >>
> >> Cedric has authored a new drive for the SPI NOR devices on the ASPEED
> >> SoCs. It supports 2400, 2500 and 2600. It is written using the spi-mem
> >> subsystem, which should mean it can go upstream.
> >>
> >> This is great news, as our current driver is half upstream, half in
> >> the openbmc tree, due to some issues getting it merged as part of the
> >> spi-nor subsystem.
> >>
> >> It would be great to have testing. I've created a commit that patches
> >> in support to whatever kernel tree you're using. Hopefully this makes
> >> it easier to test atop your internal branches:
> >>
> >> https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/51551
> >
> > tested on a fp5280g2 (ast2500), it looks okay.
>
> Thanks !
>
> > root at fp5280g2:~# dmesg |grep spi
> > [    1.594677] spi-nor spi0.0: mx66l51235f (65536 Kbytes)
> > [    1.728194] spi-aspeed-smc 1e620000.spi: CE0 read buswidth:2 [0x203c0641]
> > [    1.992733] spi-nor spi1.0: mx66l51235f (65536 Kbytes)
> > [    2.211741] spi-aspeed-smc 1e630000.spi: CE0 read buswidth:2 [0x203c0741]
>
> Training was done on both controllers. It's a little faster on SPI1 because
> the clock is set at KCLK/2 whereas FMC uses HCLK/4. Dual IO 4B read command
> is the default setting for both.
>
> I test writing with :
>
>      dd if=/dev/random of=$tmp bs=1M count=$count
>      md5sum $tmp
>
>      time flashcp -v $tmp $mtd  # ~3min for 32MB
>      time md5sum $mtd # ~3s for 32MB
>
> but not on /dev/mtd0 !
>

test writing on a 2500 :)

root at fp5280g2:/tmp# time dd if=/dev/random of=/tmp/test bs=1M count=32
32+0 records in
32+0 records out

real 0m3.144s
user 0m0.002s
sys 0m2.278s
root at fp5280g2:/tmp# md5sum /tmp/test
bed6912a0b257cb7acb79f1c7f99cf6e  /tmp/test

root at fp5280g2:/tmp# time flashcp -v /tmp/test /dev/mtd4  # 32M
Erasing block: 512/512 (100%)
Writing kb: 32768/32768 (100%)
Verifying kb: 32768/32768 (100%)

real 4m12.713s
user 0m1.878s
sys 2m42.690s
root at fp5280g2:/tmp# time md5sum /dev/mtd4
bed6912a0b257cb7acb79f1c7f99cf6e  /dev/mtd4

real 0m7.668s
user 0m0.832s
sys 0m3.524s


More information about the openbmc mailing list