From: Xavier Drudis Ferran <xdrudis@tinet.cat>
To: u-boot@lists.denx.de
Subject: Re: [SPAM] [PATCH 0/4] mtd: spi: arm: rk3399: rock-pi-4: u-boot/next Support SPI NOR Flash in Rock Pi 4 (XTX xt25f32b)
Date: Tue, 12 Jul 2022 11:10:45 +0200 [thread overview]
Message-ID: <20220712091045.GA2218@begut> (raw)
In-Reply-To: <20220622084730.GA1798@begut>
El Wed, Jun 22, 2022 at 10:47:31AM +0200, Xavier Drudis Ferran deia:
> The Radxa Rock Pi 4 board is sold from revision 1.4 with a soldered
> 4Mb SPI NOR Flash. This series allows to use it from U-Boot and boot
> from it.
>
Hello.
Is there any interest in this ?
This weekend I did a v2 on next. But I don't know whether I should
send it or just save you all the trouble.
I can boot from SPI (I mean, bootrom loads TPL from SPI, TPL return to
bootrom, bootrom loads SPL from SPI, SPL loading U-Boot from SPI, then
U-Boot loads linux and dtb from SDMMC) and can stop U-Boot and read,
erase and write from SPI, But once I boot linux,
flashrom -V --programmer linux_mtd --write /boot/spi.rom
[...]
get_mtd_info: device_name: "loader", is_writeable: 1, numeraseregions: 0, total_size: 4194304, erasesize: 4096
Opened /dev/mtd0 successfully
The following protocols are supported: Programmer-specific.
Probing for Programmer Opaque flash chip, 0 kB: Found Programmer flash chip "Opaque flash chip" (4096 kB, Programmer-specific) on linux_mtd.
Found Programmer flash chip "Opaque flash chip" (4096 kB, Programmer-specific).
Reading old flash chip contents... done.
Erasing and writing flash chip... Trying erase function 0... 0x000000-0x000fff:WCannot write 0x001000 bytes at 0x000000
[...]
If I boot from SDMMC (shorting spiclk to ground) then linux doesn't have
a /dev/mtd0 device. But that's easy to fix. If I boot from SDMMC, stop
U-boot, disconnect spiclk from gnd, sf probe 1:0 and continue boot
then I can write /dev/mtd0 from flashrom in linux without a problem. I
can also read, erase and write SPI from U-Boot.
So there's something when booting from SPI that stops linux from
writing to it, despite U-Boot can. I tested also sf protect unlock 0
0x400000 but it doesn't help.
So should I send v2 ? wait until I understand what happens when booting
from SPI but not writing to /dev/mtd0 ? Forget it ?
next prev parent reply other threads:[~2022-07-12 9:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 8:47 [PATCH 0/4] mtd: spi: arm: rk3399: rock-pi-4: u-boot/next Support SPI NOR Flash in Rock Pi 4 (XTX xt25f32b) Xavier Drudis Ferran
2022-06-22 8:49 ` [PATCH 1/4] mtd: si: spi-nor: Add Rock pi 4b new flash chip Xavier Drudis Ferran
2022-06-22 8:51 ` [PATCH 2/4] arm: rockchip: rk3399: rock-pi-4: Add XTX SPI NOR 4MiB Flash chip in Rock Pi 4 boards from rev 1.4 on Xavier Drudis Ferran
2022-06-22 8:53 ` [PATCH 3/4] mtd: spi: spi-nor: Adapt soft reset to XTX25F32B in Rock Pi 4 rev 1.4 Xavier Drudis Ferran
2022-06-22 8:54 ` [PATCH 4/4] spi: spi-mem.c : Allow address 0 for SPI mem operations Xavier Drudis Ferran
2022-07-12 9:10 ` Xavier Drudis Ferran [this message]
2022-07-15 9:32 ` [SPAM] [PATCH 0/4] mtd: spi: arm: rk3399: rock-pi-4: u-boot/next Support SPI NOR Flash in Rock Pi 4 (XTX xt25f32b) 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=20220712091045.GA2218@begut \
--to=xdrudis@tinet.cat \
--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