Messages in this thread | | | Date | Sat, 24 Feb 2024 12:18:36 +0100 | From | Christian Marangi <> | Subject | Re: [PATCH v2] mtd: spi-nor: Add support for BoHong bh25q128as |
| |
On Thu, Feb 22, 2024 at 09:19:48AM +0000, Tudor Ambarus wrote: > > > On 2/20/24 20:03, Christian Marangi wrote: > > From: David Bauer <mail@david-bauer.net> > > > > Add MTD support for the BoHong bh25q128as SPI NOR chip. > > The chip has 16MB of total capacity, divided into a total of 256 > > sectors, each 64KB sized. The chip also supports 4KB sectors. > > Additionally, it supports dual and quad read modes. > > > > Datasheet is public and can be found at the referenced link. > > > > Functionality was verified on an Tenbay WR1800K / MTK MT7621 board. > > > > Link: https://www.e-interlink.com.tw/userUpload/files/BH25Q128AS_v1_0.pdf > > Signed-off-by: David Bauer <mail@david-bauer.net> > > [ reworked to new flash_info format ] > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> > > --- > > Read/write/erase test are done by flashing and installing an OpenWrt > > image on the spi and by using overlayfs on it confirming correct > > read/write. > > > > root@OpenWrt:/tmp/tmp2# cat /sys/bus/spi/devices/spi0.0/spi-nor/partname > > bh25q128as > > root@OpenWrt:/tmp/tmp2# cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id > > 684018 > > root@OpenWrt:/tmp/tmp2# cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer > > bohong > > > > root@OpenWrt:/# xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp > > 53464450000101ff00000109300000ff68000103600000ffffffffffffff > > ffffffffffffffffffffffffffffffffffffe520f1ffffffff0744eb086b > > 083b42bbeeffffffffff00ffffff44eb0c200f5210d800ffffffffffffff > > ffffffffffff003600279ef97764fcebffff > > > > Hey, Christian, > > Seems that the flash defines the SFDP tables, thus it's likely you won't > need a flash entry at all, and instead rely on the generic SFDP driver > to parse the flash settings from SFDP and initialize the flash based on > that. > > Have you tried testing the flash without adding a dedicated entry for > it? Just specifying the jedec,spi-nor compatible in dt will do the > trick. As you do now, but without this patch :). >
The user just tested this and It seems there is a problem in JEDEC id?
[ 0.726451] spi spi0.0: setup: ignoring unsupported mode bits a00 [ 0.732850] spi-nor spi0.0: unrecognized JEDEC id bytes: 68 40 18 68 40 18 [ 0.739725] spi-nor: probe of spi0.0 failed with error -2
-- Ansuel
| |