Skip to content

Commit a187426

Browse files
rbqvqigorpecovnik
authored andcommitted
rockchip: add support for Graperain G3568 v2
The Graperain G3568 v2 is an RK3568-based development board, just like the RK3568-EVB. It always uses soldered connections between the GR3568CV2 core board and the RK3568BV2/GR3568BV2 I/O board. The G3568 board has multiple hardware revisions, and we currently support v2 (I/O board). Specification: - SoC: RockChip RK3568 ARM64 (4 cores) - eMMC: 16-128 GB - RAM: 2-16 GB - Power: DC 12V 2A - Ethernet: 2x RTL8211F RGMII (10/100/1000 Mbps) - Wireless radio: 802.11b/g/n/ac dual-band - LED: Power: AlwaysOn User: GPIO - Button: ESC: SARADC/0 <1100k µV> MENU: SARADC/0 <1400k µV> VOL-: SARADC/0 <430k µV> VOL+: SARADC/0 <50k µV> Power/Reset: PMIC RK809 - CAN CAN/1: 4-pin (PH 2.0) - PWM PWM/4: Backlight PWM/5: Backlight PWM/7: IR Receiver - UART: UART/2: Debug TTL - 1500000 8N1 (1.25mm) UART/3: TTL (PH 2.0) UART/4: TTL (PH 2.0) UART/8: AP6356S Bluetooth UART/9: TTL (PH 2.0) - I2C: I2C/0: PMIC RK809 I2C/1: Touchscreen I2C/4: Camera I2C/5: RTC@51 PCF8563 - I2S: I2S/0: HDMI Sound I2S/1: RK809 Audio Codec I2S/3: AP6356S Bluetooth Sound - SDMMC: SDMMC/0: microSD (TF) slot SDMMC/2: AP6356S SDIO WiFi card - Camera: 1x CSI - Video: HDMI / DSI0 (MIPI/LVDS) / DSI1 (MIPI/EDP) - Audio: HDMI / MIC / Speaker / SPDIF / 3.5mm Headphones / AP6356S Bluetooth - USB: USB 2.0 HOST x2 USB 2.0 OTG x1 (shared with USB 3.0 OTG/HOST) USB 3.0 HOST x1 USB 3.0 OTG/HOST x1 - SATA: 1x SATA 3.0 with Power/4-pin - PCIe: 1x PCIe 3.0 x2 (x4 connecter) Link: - https://image.chukouplus.com/upload/C_153/product_file/20211022/6daddec9e400458816dd4c57ba807fc3.pdf - https://blog.gov.cooking/archives/research-graperain-g3568-v2-and-flash.html Signed-off-by: Coia Prant <coiaprant@gmail.com>
1 parent 2121162 commit a187426

4 files changed

Lines changed: 2954 additions & 0 deletions

File tree

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Rockchip RK3568 quad core 2GB-16GB RAM SoC 2 x GBE eMMC USB3 WiFi/BT PCIe SATA NVMe
2+
BOARD_NAME="G3568 v2"
3+
BOARD_VENDOR="graperain"
4+
BOARDFAMILY="rockchip64"
5+
BOARD_MAINTAINER="rbqvq"
6+
INTRODUCED="2024"
7+
KERNEL_TARGET="current,edge"
8+
KERNEL_TEST_TARGET="current"
9+
FULL_DESKTOP="yes"
10+
BOOT_SOC="rk3568"
11+
BOOT_LOGO="desktop"
12+
BOOT_FDT_FILE="rockchip/rk3568-graperain-g3568-v2.dtb"
13+
IMAGE_PARTITION_TABLE="gpt"
14+
MODULES="ledtrig_netdev"
15+
16+
# Mainline U-Boot
17+
function post_family_config__graperain_g3568_v2_use_mainline_uboot() {
18+
display_alert "$BOARD" "Using mainline U-Boot for $BOARD / $BRANCH" "info"
19+
20+
declare -g BOOTCONFIG="graperain-g3568-v2-rk3568_defconfig"
21+
declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git"
22+
declare -g BOOTBRANCH="tag:v2026.04"
23+
declare -g BOOTPATCHDIR="v2026.04/board_${BOARD}"
24+
25+
declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin"
26+
27+
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd
28+
29+
function write_uboot_platform() {
30+
dd if=$1/u-boot-rockchip.bin of=$2 seek=64 conv=notrunc status=none
31+
}
32+
}
33+
34+
function post_family_tweaks__graperain_g3568_v2_udev_network_interfaces() {
35+
display_alert "$BOARD" "Renaming interfaces" "info"
36+
37+
mkdir -p $SDCARD/etc/udev/rules.d/
38+
cat <<- EOF > "${SDCARD}/etc/udev/rules.d/70-persistent-net.rules"
39+
SUBSYSTEM=="net", ACTION=="add", KERNELS=="fe010000.ethernet", NAME:="eth0"
40+
SUBSYSTEM=="net", ACTION=="add", KERNELS=="fe2a0000.ethernet", NAME:="eth1"
41+
EOF
42+
}
43+
44+
function post_family_tweaks_bsp__graperain_g3568_v2_enable_leds() {
45+
display_alert "$BOARD" "Creating Board Support LED Config" "info"
46+
cat <<- EOF > "$destination"/etc/armbian-leds.conf
47+
[/sys/class/leds/stmmac-0:01:amber:lan]
48+
trigger=netdev
49+
interval=52
50+
link_10=0
51+
link_100=0
52+
link_1000=0
53+
tx=1
54+
rx=1
55+
device_name=eth1
56+
57+
[/sys/class/leds/stmmac-0:01:green:lan]
58+
trigger=netdev
59+
interval=52
60+
link_10=1
61+
link_100=1
62+
link_1000=1
63+
tx=0
64+
rx=0
65+
device_name=eth1
66+
67+
[/sys/class/leds/stmmac-1:01:amber:lan]
68+
trigger=netdev
69+
interval=52
70+
link_10=0
71+
link_100=0
72+
link_1000=0
73+
tx=1
74+
rx=1
75+
device_name=eth0
76+
77+
[/sys/class/leds/stmmac-1:01:green:lan]
78+
trigger=netdev
79+
interval=52
80+
link_10=1
81+
link_100=1
82+
link_1000=1
83+
tx=0
84+
rx=0
85+
device_name=eth0
86+
EOF
87+
}

0 commit comments

Comments
 (0)