Skip to content

Add bare-metal RK356x support for ROC-RK3566-PC, YY3568, and ROCK 3A - #3

Open
hqnicolas wants to merge 1 commit into
petabyt:masterfrom
hqnicolas:master
Open

Add bare-metal RK356x support for ROC-RK3566-PC, YY3568, and ROCK 3A#3
hqnicolas wants to merge 1 commit into
petabyt:masterfrom
hqnicolas:master

Conversation

@hqnicolas

Copy link
Copy Markdown

Summary

Add bare-metal RK356x support for three explicitly described boards:

  • Firefly ROC-RK3566-PC (roc3566)
  • Youyeetoo YY3568 (yy3568)
  • Radxa ROCK 3A (rock3a)

This follows the existing purpose and boot model of the project:

Rockchip BootROM
  -> vendor DDR initialization blob
  -> bare-metal rk firmware
  -> optional appended EL2 payload

Platform support

The shared src/rk356x/ platform adds:

  • UART2 M0 at 1,500,000 baud
  • RK356x PMU, CRU, GRF and SGRF setup
  • DDR discovery using ATAGS, PMUGRF geometry, and a 1 GiB fallback
  • RK356x-specific MMU and low-memory layout
  • GPIO and board power control
  • VOP2 and DW-HDMI initialization
  • EDID-based progressive RGB modes through 4K30
  • 720p60 fallback for unusable EDID
  • Headless operation when HDMI HPD is absent
  • USB2 PHY and polled OHCI support
  • Directly attached HID boot-keyboard input
  • FUEFI framebuffer, keyboard, memory-map, DTB and device-information services
  • Reset and shutdown calls returning the SoC to MaskROM
  • Existing appended-payload handoff at EL2

Board identity and wiring remain isolated in separate descriptors and minimal DTBs.

New artifacts

make all now produces:

ROC-RK3566-PC

  • roc3566.bin
  • demo_roc3566.bin
  • roc3566.img
  • demo_roc3566.img

YY3568

  • yy3568.bin
  • demo_yy3568.bin
  • yy3568.img
  • demo_yy3568.img

ROCK 3A

  • rock3a.bin
  • demo_rock3a.bin
  • rock3a.img
  • demo_rock3a.img

The SD images use the existing RKNS v2 packaging path.

USB loading

Explicit board-qualified loading targets were added:

make usb_roc3566
make usb_yy3568
make usb_rock3a

Optional SoC-level xrock USB-plug targets are also available:

make maskrom3566
make maskrom3568

rock.out recognizes Rockchip PID 0x350a as RK356x with RC4 disabled.

Rockchip binaries

Only the required RK356x binaries were added under img/:

  • rk3566_ddr_1056MHz_v1.25.bin
  • rk3568_ddr_1560MHz_v1.25.bin
  • rk356x_usbplug_v1.17.bin

img/README.md records their pinned rkbin commit, original paths, sizes, SHA-256 hashes, and license provenance.

Existing-board compatibility

RK3399 and RK3588 retain their existing build commands and platform-specific object files.

RK356x objects use a separate .rk356x.o namespace and STACK_TOP=0x08000000, preventing RK356x memory-layout settings from leaking into other SoCs.

Shared firmware and demo changes are limited to:

  • Dynamic framebuffer width, height and stride
  • The existing FuScreenList.type field being defined as XRGB8888
  • Functional keyboard FUEFI calls when a platform configures an input poller
  • A freestanding memcmp() required by EDID parsing

Platforms without the new hooks retain their previous behavior.

Documentation

Added docs/rk356x/ with:

  • A common RK356x bare-metal overview
  • Memory layout and artifact documentation
  • One wiring/status page for each supported board
  • Direct MaskROM loading and SD demo instructions
  • Explicit hardware-validation status

@hqnicolas

Copy link
Copy Markdown
Author

chainloaders now live under https://github.com/hqnicolas/RK-SPI-NOR-Chainloader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant