[PATCH 1/5] board: rockchip: Add Pine64 Quartz64-A Board

Christopher Obbard chris.obbard at collabora.com
Thu Oct 12 11:51:18 CEST 2023


Hi Jonas,

Sorry for the late response, I've been meaning to test this for a while but not got around to it.

On Thu, 2023-08-17 at 23:56 +0000, Jonas Karlman wrote:
> Hi Christopher,
> 
> On 2023-08-08 16:25, Christopher Obbard wrote:
> > Hi Jonas,
> > 
> > On Sun, 2023-07-23 at 15:04 +0000, Jonas Karlman wrote:
> > > On 2023-07-23 16:55, Jonas Karlman wrote:
> > > > The Pine64 Quartz64 Model A is a single-board computer based on the
> > > > Rockchip RK3566 SoC. The board features USB3, SATA, PCIe, HDMI, USB2.0,
> > > > CSI, DSI, eDP, eMMC, SD, and an e-paper parallel port, as well as a
> > > > 20 pin GPIO header.
> > > > 
> > > > Features tested on a Quartz64-A 8GB v2.0 2021-04-27:
> > > > - SD-card boot
> > > > - eMMC boot
> > > > - PCIe/NVMe/AHCI
> > > > - USB host
> > > > 
> > > > Device tree is imported from linux v6.4.
> > > > 
> > > > Co-developed-by: Nicolas Frattaroli <frattaroli.nicolas at gmail.com>
> > > > Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas at gmail.com>
> > > > Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
> > > > ---
> > > 
> > > [...]
> > > 
> > > Boot log with ROCKCHIP_TPL=rk3566_ddr_1056MHz_v1.17.bin and
> > > BL31=rk3568_bl31_v1.43.elf:
> > > 
> > > [...]
> > > 
> > > U-Boot 2023.07 (Jul 23 2023 - 12:42:18 +0000)
> > > 
> > > Model: Pine64 RK3566 Quartz64-A Board
> > > DRAM:  8 GiB (effective 7.7 GiB)
> > > PMIC:  RK8170 (on=0x10, off=0x00)
> > > Core:  321 devices, 27 uclasses, devicetree: separate
> > > MMC:   rockchip_sdhci_probe clk set rate fail!
> > > mmc at fe2b0000: 1, mmc at fe2c0000: 2, mmc at fe310000: 0
> > > Loading Environment from nowhere... OK
> > > In:    serial at fe660000
> > > Out:   serial at fe660000
> > > Err:   serial at fe660000
> > > Model: Pine64 RK3566 Quartz64-A Board
> > > Net:   No ethernet found.
> > > 
> > > Hit any key to stop autoboot:  0
> > > =>
> > 
> > 
> > I just tried booting U-Boot v2023.10-rc2 with ROCKCHIP_TPL=rk3566_ddr_1056MHz_v1.17.bin and BL31=rk3568_bl31_v1.43.elf, on my Quartz64-A but it fails during
> > loading of some parts. I removed the output of the RK TPL from my logs as there were no errors.
> 
> Try with latest rk3566_ddr_1056MHz_v1.18.bin and see if that makes any
> difference.

No difference.

I've also checked, there is no other maskrom bootable media such as SPI flash connected to the board.

> 
> > This is when booting from eMMC.
> 
> Does it boot with SD-card or other eMMC modules?

Booting from SD card (without eMMC connected), everything works fine.

> 

> > I also tried building your branch from https://github.com/Kwiboo/u-boot-rockchip/tree/rk3568-2023.10 and 
> 
> Please try with a GitHub actions built u-boot-rockchip.bin based on my
> rk3568-2023.07.02 branch at
> https://github.com/Kwiboo/u-boot-build/actions/runs/5777761235

With that exact artifact, flashed with:

> rkdeveloptool db rk356x_spl_loader_v1.18.113.bin
> rkdeveloptool ef
> rkdeveloptool wl 64 u-boot-rockchip.bin
> rkdeveloptool rd

it fails to boot with with:

> DDR V1.18 f366f69a7d typ 23/07/17-15:48:58
> ln
> LP4/4x derate en, other dram:1x trefi
> SRX
> ddrconfig:7
> LPDDR4X, 324MHz
> BW=32 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=8192MB
> 
> change to: 324MHz
> clk skew:0x60
> 
> change to: 528MHz
> clk skew:0x58
> 
> change to: 780MHz
> clk skew:0x58
> 
> change to: 1056MHz(final freq)
> clk skew:0x32
> out
> 
> U-Boot SPL 2023.07.02-g09919887 (Aug 06 2023 - 16:59:31 +0000)
> Trying to boot from MMC1
> spl: mmc init failed with error: -70
> Trying to boot from MMC2
> Card did not respond to voltage select! : -110
> spl: mmc init failed with error: -95
> Trying to boot from MMC1
> mmc fail to send stop cmd
> mmc_load_image_raw_sector: mmc block read error
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###

I also tried a second eMMC, but it also failed to boot with the same "mmc block read error" message.


> 
> What happens if you write u-boot-rockchip.bin to eMMC module usinga USB adapter:
> 
>   dd if=u-boot-rockchip.bin of=/dev/<device> bs=32k seek=1 conv=fsync
> 
> or using U-Boot cmd when booted from a SD-card?
> 
>   # Read u-boot-rockchip.bin from first partition of a SD card
>   load mmc 1:1 10000000 u-boot-rockchip.bin
> 
>   # Change to eMMC
>   mmc dev 0
> 
>   # Write 10 MiB (0x5000 blocks) at sector 64 (0x40)
>   mmc write $fileaddr 40 5000
> 
> Does that make any difference?

I don't think I have an eMMC writer for Pine64 eMMCs, I will try to get hold of one this week.
But it fails to write to the eMMC with:

> => load mmc 1:2 10000000 u-boot-rockchip.bin
> 9510400 bytes read in 791 ms (11.5 MiB/s)
> 
> => mmc dev 0
> switch to partitions #0, OK
> mmc0(part 0) is current device
> 
> 
> => mmc write $fileaddr 40 5000
> MMC write: dev # 0, block # 64, count 20480 ... mmc write failed
> 0 blocks written: ERROR
> 
> => mmc info
> Device: mmc at fe310000
> Manufacturer ID: 45
> OEM: 0
> Name: DF4016 
> Bus Speed: 52000000
> Mode: MMC DDR52 (52MHz)
> Rd Block Len: 512
> MMC version 5.1
> High Capacity: Yes
> Capacity: 14.7 GiB
> Bus Width: 8-bit DDR
> Erase Group Size: 512 KiB
> HC WP Group Size: 8 MiB
> User Capacity: 14.7 GiB WRREL
> Boot Capacity: 4 MiB ENH
> RPMB Capacity: 4 MiB ENH

I think this points to some issue with the mmc driver in U-Boot, or possibly some issue with my board. But I find that hard to believe because the Rockchip usbloader seems to write to the eMMC just
fine ?

> 
> > 
> > Boot log (v2023.10-rc2):
> > 
> > U-Boot SPL 2023.10-rc2 (Aug 08 2023 - 14:02:34 +0100)
> > rockchip_sdhci_probe clk set rate fail!
> > Trying to boot from MMC1
> > spl: mmc init failed with error: -110
> > Trying to boot from MMC2
> > Card did not respond to voltage select! : -110
> > spl: mmc init failed with error: -95
> > Trying to boot from MMC1
> 
> Strange that second try of eMMC (MMC1) gets little bit longer.
> 
> > ## Checking hash(es) for config config-1 ... OK
> > ## Checking hash(es) for Image atf-1 ... sha256+ OK
> > spl_load_simple_fit: can't load image loadables index 0 (ret = -5)
> > mmc_load_image_raw_sector: mmc block read error
> > SPL: failed to boot from all boot devices
> > ### ERROR ### Please RESET the board ###
> > 
> > 
> > Boot log (your branch):
> > 
> > U-Boot SPL 2023.10-rc1-00368-g16cb31d427 (Aug 08 2023 - 15:17:35 +0100)
> > Trying to boot from MMC1
> > spl: mmc init failed with error: -70
> > Trying to boot from MMC2
> > Card did not respond to voltage select! : -110
> > spl: mmc init failed with error: -95
> > Trying to boot from MMC1
> > ## Checking hash(es) for config config-1 ... OK
> > mmc_load_image_raw_sector: mmc block read error
> > SPL: failed to boot from all boot devices
> > ### ERROR ### Please RESET the board ###
> 
> I have not been able to reproduce this kind of issue on any of my two
> Quartz64-A boards, tested with different eMMC modules.
> 
> Does your eMMC module have some compatibility issue?
> Do you have any more details on the eMMC module you have tested with?

I have two eMMCs, one from FORESEE which came with a Pine64 and one marked SanDisk (which I posted the mmc info for above).

My hardware is marked Quartz64-RK3399-V2.0 2021-04-27
Maybe there is some difference with your board?

I will also try an image with vendor u-boot as a next step.

> There was also some clk and pinctrl changes recently merged into master
> branch, but they was probably included in the build from my branch based
> on the lack of "rockchip_sdhci_probe clk set rate fail!" message.

I tried with your build, but I will investigate more with master.


Thanks!

Chris



More information about the U-Boot mailing list