From: Tom Rini <trini@konsulko.com>
To: "Marek Behún" <marek.behun@nic.cz>
Cc: "Masami Hiramatsu" <masami.hiramatsu@linaro.org>,
"Jagan Teki" <jagan@amarulasolutions.com>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"U-Boot Mailing List" <u-boot@lists.denx.de>,
"Priyanka Jain" <priyanka.jain@nxp.com>,
"Simon Glass" <sjg@chromium.org>, "Heiko Schocher" <hs@denx.de>,
"Patrick Delaunay" <patrick.delaunay@st.com>,
"Patrice CHOTARD" <patrice.chotard@foss.st.com>,
"Pali Rohár" <pali@kernel.org>
Subject: Re: [PATCH u-boot-dm + u-boot-spi v4 04/10] mtd: spi-nor: allow registering multiple MTDs when DM is enabled
Date: Thu, 8 Jul 2021 10:56:36 -0400 [thread overview]
Message-ID: <20210708145636.GC9516@bill-the-cat> (raw)
In-Reply-To: <20210708161517.18ff7e56@dellmb>
[-- Attachment #1: Type: text/plain, Size: 3431 bytes --]
On Thu, Jul 08, 2021 at 04:15:17PM +0200, Marek Behún wrote:
> On Thu, 8 Jul 2021 08:54:51 +0900
> Masami Hiramatsu <masami.hiramatsu@linaro.org> wrote:
>
> > Hi Marek,
> >
> > I found that this changes the mtd device name and makes 'mtdparts'
> > doesn't work on my developerbox platform.
> >
> > Before this change,
> > -------
> > => sf probe
> > SF: Detected mx66u51235f with page size 256 Bytes, erase size 4 KiB,
> > total 64 MiB
> > => mtd list
> > List of MTD devices:
> > * nor1
> > - type: NOR flash
> > - block size: 0x1000 bytes
> > - min I/O: 0x1 bytes
> > - 0x000000000000-0x000004000000 : "nor1"
> > - 0x000000000000-0x000000070000 : "BootStrap-BL1"
> > - 0x000000070000-0x000000100000 : "Flash-Writer"
> > - 0x000000100000-0x000000180000 : "SCP-BL2"
> > - 0x000000180000-0x0000001f8000 : "FIP-TFA"
> > - 0x0000001f8000-0x000000200000 : "Stg2-Tables"
> > - 0x000000200000-0x000000400000 : "EDK2"
> > - 0x000000400000-0x000000500000 : "UEFI-Vars"
> > - 0x000000500000-0x000000700000 : "OPTEE"
> > - 0x000000700000-0x000000800000 : "UBoot-Env"
> > - 0x000000800000-0x000000900000 : "U-Boot"
> > - 0x000000900000-0x000004000000 : "Free"
> > =>
> > -------
> > after this change,
> > -------
> > => sf probe
> > SF: Detected mx66u51235f with page size 256 Bytes, erase size 4 KiB,
> > total 64 MiB
> > => mtd list
> > Could not find a valid device for nor1
> > List of MTD devices:
> > * mx66u51235f
> > - device: spi-flash@0
> > - parent: spi@54800000
> > - driver: jedec_spi_nor
> > - path: /spi@54800000/spi-flash@0
> > - type: NOR flash
> > - block size: 0x1000 bytes
> > - min I/O: 0x1 bytes
> > - 0x000000000000-0x000004000000 : "mx66u51235f"
> > -------
> >
> > I think I should update CONFIG_MTDIDS_DEFAULT and
> > CONFIG_MTDPARTS_DEFAULT. But before that, I would like to confirm
> > that this is an intended change, and what should I do. (replace nor1
> > with mx66u51235f ?)
>
> Hi Masami,
>
> no. The intended solution here for you is to remove MTDIDS / MTDPARTS
> completely and instead define the partitions in your device tree:
> https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi
>
> You should add something like this into the spi-flash@0 node:
>
> partitions {
> compatible = "fixed-partitions";
> #address-cells = <1>;
> #size-cells = <1>;
>
> partition@0 {
> label = "BootStrap-BL1";
> reg = <0x0 0x70000>;
> };
>
> partition@70000 {
> label = "Flash-Writer";
> reg = <0x70000 0x90000>;
> };
>
> partition@100000 {
> label = "SCP-BL2";
> reg = <0x100000 0x80000>;
> };
>
> ...
> };
>
> I wonder though now whether we should force other boards to do this or
> whether we should fix the code to be backwards compatible with the old
> names.
>
> Tom, Miquel, Jagan, what do you think?
I think we need for passing mtdparts/mtdids via the kernel command line
to continue to work like they used it. And some checkpatch magic to
catch people introducing new ones? It certainly would be best for
people to define them in dts as allowed, but there's a good size
existing base that doesn't. Thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2021-07-08 14:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 12:08 [PATCH u-boot-dm + u-boot-spi v4 00/10] Support SPI NORs and OF partitions in `mtd list` Marek Behún
2021-05-26 12:08 ` [PATCH u-boot-dm + u-boot-spi v4 01/10] dm: core: add non-translating version of ofnode_get_addr_size_index() Marek Behún
2021-05-26 12:08 ` [PATCH u-boot-dm + u-boot-spi v4 02/10] dm: core: add ofnode_get_path() Marek Behún
2021-05-26 12:08 ` [PATCH u-boot-dm + u-boot-spi v4 03/10] mtd: add support for parsing partitions defined in OF Marek Behún
2021-05-26 12:08 ` [PATCH u-boot-dm + u-boot-spi v4 04/10] mtd: spi-nor: allow registering multiple MTDs when DM is enabled Marek Behún
2021-07-07 23:54 ` Masami Hiramatsu
2021-07-08 14:15 ` Marek Behún
2021-07-08 14:56 ` Tom Rini [this message]
2021-07-09 0:19 ` Masami Hiramatsu
2021-05-26 12:08 ` [PATCH u-boot-dm + u-boot-spi v4 05/10] mtd: spi-nor: fill-in mtd->dev member Marek Behún
2021-05-26 12:08 ` [PATCH u-boot-dm + u-boot-spi v4 06/10] mtd: remove mtd_probe() function Marek Behún
2021-05-26 12:08 ` [PATCH u-boot-dm + u-boot-spi v4 07/10] mtd: probe SPI NOR devices in mtd_probe_devices() Marek Behún
2021-05-26 12:08 ` [PATCH u-boot-dm + u-boot-spi v4 08/10] cmd: mtd: print device OF path in listing Marek Behún
2021-05-26 12:08 ` [PATCH u-boot-dm + u-boot-spi v4 09/10] mtd: compare also with OF path and device name in get_mtd_device_nm() Marek Behún
2021-05-26 12:08 ` [PATCH u-boot-dm + u-boot-spi v4 10/10] cmd: mtd: expand <name> argument definition in command help Marek Behún
2021-05-26 16:58 ` [PATCH u-boot-dm + u-boot-spi v4 00/10] Support SPI NORs and OF partitions in `mtd list` Jagan Teki
2021-05-26 17:54 ` Marek Behún
2021-05-26 18:04 ` Jagan Teki
2021-06-02 14:03 ` Marek Behún
2021-06-24 11:36 ` Jagan Teki
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=20210708145636.GC9516@bill-the-cat \
--to=trini@konsulko.com \
--cc=hs@denx.de \
--cc=jagan@amarulasolutions.com \
--cc=marek.behun@nic.cz \
--cc=masami.hiramatsu@linaro.org \
--cc=miquel.raynal@bootlin.com \
--cc=pali@kernel.org \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@st.com \
--cc=priyanka.jain@nxp.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox