All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Marangi <ansuelsmth@gmail.com>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Pratyush Yadav <pratyush@kernel.org>,
	Michael Walle <mwalle@kernel.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	David Bauer <mail@david-bauer.net>
Subject: Re: [PATCH v2] mtd: spi-nor: Add support for BoHong bh25q128as
Date: Sat, 24 Feb 2024 12:18:36 +0100	[thread overview]
Message-ID: <65d9d08f.df0a0220.988bb.3177@mx.google.com> (raw)
In-Reply-To: <f7c45e7b-993c-444b-8710-042da7512bbf@linaro.org>

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

WARNING: multiple messages have this Message-ID (diff)
From: Christian Marangi <ansuelsmth@gmail.com>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Pratyush Yadav <pratyush@kernel.org>,
	Michael Walle <mwalle@kernel.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	David Bauer <mail@david-bauer.net>
Subject: Re: [PATCH v2] mtd: spi-nor: Add support for BoHong bh25q128as
Date: Sat, 24 Feb 2024 12:18:36 +0100	[thread overview]
Message-ID: <65d9d08f.df0a0220.988bb.3177@mx.google.com> (raw)
In-Reply-To: <f7c45e7b-993c-444b-8710-042da7512bbf@linaro.org>

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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2024-02-24 11:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 20:03 [PATCH v2] mtd: spi-nor: Add support for BoHong bh25q128as Christian Marangi
2024-02-20 20:03 ` Christian Marangi
2024-02-20 20:15 ` Michael Walle
2024-02-20 20:15   ` Michael Walle
2024-02-22  9:19 ` Tudor Ambarus
2024-02-22  9:19   ` Tudor Ambarus
2024-02-24 11:18   ` Christian Marangi [this message]
2024-02-24 11:18     ` Christian Marangi
2024-02-26  8:51     ` Michael Walle
2024-02-26  8:51       ` Michael Walle
2024-02-26  8:53       ` Tudor Ambarus
2024-02-26  8:53         ` Tudor Ambarus
2024-02-27  9:33         ` Christian Marangi
2024-02-27  9:33           ` Christian Marangi
2024-02-27 10:08           ` Tudor Ambarus
2024-02-27 10:08             ` Tudor Ambarus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65d9d08f.df0a0220.988bb.3177@mx.google.com \
    --to=ansuelsmth@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mail@david-bauer.net \
    --cc=miquel.raynal@bootlin.com \
    --cc=mwalle@kernel.org \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@linaro.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.