From: Xavier Drudis Ferran <xdrudis@tinet.cat>
To: Johan Jonker <jbx6244@gmail.com>
Cc: Kever Yang <kever.yang@rock-chips.com>,
Simon Glass <sjg@chromium.org>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
xypron.glpk@gmx.de, U-Boot-Denx <u-boot@lists.denx.de>,
Yifeng Zhao <yifeng.zhao@rock-chips.com>,
jon.lin@rock-chips.com,
"open list:ARM/Rockchip SoC support"
<linux-rockchip@lists.infradead.org>,
miquel.raynal@bootlin.com, michael@amarulasolutions.com,
dario.binacchi@amarulasolutions.com
Subject: Re: [PATCH v1 1/6] rockchip: block: add Rockchip IDB block device
Date: Tue, 5 Jul 2022 16:17:12 +0200 [thread overview]
Message-ID: <20220705141712.GB2037@begut> (raw)
In-Reply-To: <1816d342-1bd1-ff1e-efe6-af4595850946@gmail.com>
Thanks for your work.
El Tue, Jul 05, 2022 at 03:04:15PM +0200, Johan Jonker deia:
> From: Johan Jonker <jbx6244@gmail.com>
>
> The Rockchip SoCs with a NAND as boot device need
> a special Rockchip IDB block device to transfer the data
> from the rockusb gadget to the NAND driver.
>
Sorry for the fast browsing, lack of experience and possibly wrong and
noisy comment (I'm no U-Boot expert), but if you have patience for my
curiosity... This isn't a review, I haven't read it all, just some
small parts.
> diff --git a/arch/arm/mach-rockchip/rockchip_idb.c b/arch/arm/mach-rockchip/rockchip_idb.c
> new file mode 100644
> index 00000000..6243131d
> --- /dev/null
> +++ b/arch/arm/mach-rockchip/rockchip_idb.c
[...]
> +struct NandParaInfo {
> + u8 id_bytes;
> + u8 nand_id[6];
> + u8 vendor;
> + u8 die_per_chip;
> + u8 sec_per_page;
> + u16 page_per_blk;
> + u8 cell;
> + u8 plane_per_die;
> + u16 blk_per_plane;
> + u16 operation_opt;
> + u8 lsb_mode;
> + u8 read_retry_mode;
> + u8 ecc_bits;
> + u8 access_freq;
> + u8 opt_mode;
> + u8 die_gap;
> + u8 bad_block_mode;
> + u8 multi_plane_mode;
> + u8 slc_mode;
> + u8 reserved[5];
> +};
> +
Is part of this info already represented in
nand_flash_dev in include/linux/mtd/rawnand.h ?
And is it worth merging somehow ? Or should
this be synced to something external and the
.h file I mentioned be synced to linux, so merging
would be more trouble than it is worth ?
> +
> +u16 random_seed[] = {
> + 0x576a, 0x05e8, 0x629d, 0x45a3,
> + 0x649c, 0x4bf0, 0x2342, 0x272e,
> + 0x7358, 0x4ff3, 0x73ec, 0x5f70,
[...]
> + 0x3b2e, 0x7ec7, 0x4fd2, 0x5d28,
> + 0x751f, 0x3ef8, 0x39b1, 0x4e49,
> + 0x746b, 0x6ef6, 0x44be, 0x6db7,
> +};
Where does this come from ? Is it copyrightable ? If so, is it
licensed ? fair use ? Does it need to be synced every so often with
some external source ?
> +
> +struct NandParaInfo NandFlashParaTbl[] = {
> + {6, {0x2c, 0x64, 0x44, 0x4b, 0xa9, 0x00}, 4, 1, 16, 256, 2, 2, 2048, 0x01df, 3, 17, 40, 32, 1, 0, 1, 0, 0, {0, 0, 0, 0, 0}},
> + {6, {0x2c, 0x44, 0x44, 0x4b, 0xa9, 0x00}, 4, 1, 16, 256, 2, 2, 1064, 0x01df, 3, 17, 40, 32, 1, 0, 1, 0, 0, {0, 0, 0, 0, 0}},
> + {6, {0x2c, 0x68, 0x04, 0x4a, 0xa9, 0x00}, 4, 1, 8, 256, 2, 2, 2048, 0x011f, 1, 0, 24, 32, 1, 0, 1, 0, 0, {0, 0, 0, 0, 0}},
[...]
> + {6, {0x98, 0xde, 0x94, 0x82, 0x76, 0x56}, 1, 1, 16, 256, 2, 2, 2062, 0x05d1, 1, 33, 40, 32, 2, 1, 1, 0, 0, {0, 0, 0, 0, 0}},
[...]
> + {6, {0xec, 0xd5, 0x94, 0x76, 0x54, 0x43}, 0, 1, 16, 128, 2, 2, 1038, 0x0119, 2, 0, 24, 36, 3, 1, 3, 0, 0, {0, 0, 0, 0, 0}},
> + {6, {0xec, 0xd7, 0x14, 0x76, 0x54, 0xc2}, 0, 1, 16, 128, 2, 2, 2076, 0x0491, 2, 0, 24, 40, 3, 1, 3, 0, 0, {0, 0, 0, 0, 0}},
> + {6, {0xec, 0xde, 0x94, 0xc3, 0xa4, 0xca}, 0, 1, 32, 792, 2, 1, 688, 0x04c1, 11, 50, 40, 32, 3, 1, 1, 0, 1, {0, 0, 0, 0, 0}},
> +};
> +
Is this info partially duplicated in drivers/mtd/nand/raw/nand_ids.c ?
Should it be merged and this added there somehow ? It seems to have
more data, but I don't know if some items are deductible from others.
Could some constants be used to make it easier to read ?
next prev parent reply other threads:[~2022-07-05 14:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220701094304.1846-1-jbx6244@yandex.com>
2022-07-05 13:04 ` [PATCH v1 1/6] rockchip: block: add Rockchip IDB block device Johan Jonker
2022-07-05 14:17 ` Xavier Drudis Ferran [this message]
2022-07-06 21:09 ` Johan Jonker
2022-07-05 13:04 ` [PATCH v1 2/6] rockchip: spl: allow more boot devices Johan Jonker
2022-07-05 13:04 ` [PATCH v1 3/6] rockchip: rk3066: add Rockchip IDB block device as boot action Johan Jonker
2022-07-05 13:04 ` [PATCH v1 4/6] arm: dts: rockchip: sync rk3066/rk3188 DT files from Linux Johan Jonker
2022-07-05 13:05 ` [PATCH v1 5/6] arm: dts: rockchip: enable nfc node in spl for rk3066 mk808 Johan Jonker
2022-07-05 13:05 ` [PATCH v1 6/6] rockchip: configs: mk808: add idb configs Johan Jonker
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=20220705141712.GB2037@begut \
--to=xdrudis@tinet.cat \
--cc=dario.binacchi@amarulasolutions.com \
--cc=jbx6244@gmail.com \
--cc=jon.lin@rock-chips.com \
--cc=kever.yang@rock-chips.com \
--cc=linux-rockchip@lists.infradead.org \
--cc=michael@amarulasolutions.com \
--cc=miquel.raynal@bootlin.com \
--cc=philipp.tomsich@vrull.eu \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
--cc=yifeng.zhao@rock-chips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox