From b52cbea878a4cab848e6ff39be56651fc4fcf870 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 29 Jul 2025 22:46:12 -0400 Subject: [PATCH] u-boot-pine64-pinenote: upgrade to 2025.07 Incidently, move to upstream source Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6844 [ci:skip-build]: already built successfully in CI --- ...1-board-rockchip-add-pine64-pinenote.patch | 326 ++++++++++++++++++ .../testing/u-boot-pine64-pinenote/APKBUILD | 16 +- 2 files changed, 333 insertions(+), 9 deletions(-) create mode 100644 device/testing/u-boot-pine64-pinenote/0001-board-rockchip-add-pine64-pinenote.patch diff --git a/device/testing/u-boot-pine64-pinenote/0001-board-rockchip-add-pine64-pinenote.patch b/device/testing/u-boot-pine64-pinenote/0001-board-rockchip-add-pine64-pinenote.patch new file mode 100644 index 000000000..1ef9d2e83 --- /dev/null +++ b/device/testing/u-boot-pine64-pinenote/0001-board-rockchip-add-pine64-pinenote.patch @@ -0,0 +1,326 @@ +Patch-Source: https://gitlab.com/a-wai/u-boot-pinenote/-/commit/9275d23e62aa31787b27bf601a78f761e9afb6a9 +From 7103630cff3316df12c8abc633e2a25b4ed78ccb Mon Sep 17 00:00:00 2001 +From: Arnaud Ferraris +Date: Thu, 23 Mar 2023 15:14:56 +0100 +Subject: [PATCH] board: rockchip: Add Pine64 PineNote + +The PineNote is an e-ink tablet by PINE64. It is built around a Rockchip +RK3566 SoC and has the following specifications: +- 4GB LPDDR4 +- 128GB eMMC +- 10.3" 1404x1872 e-ink display + +This board is very similar to other RK356x-based boards, with the +exception that its download-mode "key" (actually a Hall sensor) is on +ADC channel 0 instead of 1. + +As such, this patch is heavily based on the evb_3568 board +implementation with the addition of a simple board setup code, meant to +account for the above difference. + +Signed-off-by: Arnaud Ferraris +Signed-off-by: Jonas Karlman +--- + arch/arm/dts/rk3566-pinenote-u-boot.dtsi | 42 +++++++++ + arch/arm/dts/rk3566-pinenote-v1.1-u-boot.dtsi | 6 ++ + arch/arm/dts/rk3566-pinenote-v1.2-u-boot.dtsi | 6 ++ + arch/arm/mach-rockchip/rk3568/Kconfig | 7 ++ + board/pine64/pinenote-rk3566/Kconfig | 15 ++++ + board/pine64/pinenote-rk3566/MAINTAINERS | 7 ++ + board/pine64/pinenote-rk3566/Makefile | 7 ++ + .../pine64/pinenote-rk3566/pinenote-rk3566.c | 26 ++++++ + configs/pinenote-rk3566_defconfig | 89 +++++++++++++++++++ + doc/board/rockchip/rockchip.rst | 1 + + 10 files changed, 206 insertions(+) + create mode 100644 arch/arm/dts/rk3566-pinenote-u-boot.dtsi + create mode 100644 arch/arm/dts/rk3566-pinenote-v1.1-u-boot.dtsi + create mode 100644 arch/arm/dts/rk3566-pinenote-v1.2-u-boot.dtsi + create mode 100644 board/pine64/pinenote-rk3566/Kconfig + create mode 100644 board/pine64/pinenote-rk3566/MAINTAINERS + create mode 100644 board/pine64/pinenote-rk3566/Makefile + create mode 100644 board/pine64/pinenote-rk3566/pinenote-rk3566.c + create mode 100644 configs/pinenote-rk3566_defconfig + +diff --git a/arch/arm/dts/rk3566-pinenote-u-boot.dtsi b/arch/arm/dts/rk3566-pinenote-u-boot.dtsi +new file mode 100644 +index 00000000000..bd6797f25a3 +--- /dev/null ++++ b/arch/arm/dts/rk3566-pinenote-u-boot.dtsi +@@ -0,0 +1,42 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (c) 2023 Collabora Ltd. ++ */ ++ ++#include "rk356x-u-boot.dtsi" ++ ++/ { ++ chosen { ++ u-boot,spl-boot-order = "same-as-spl", &sdhci; ++ }; ++}; ++ ++&i2c0 { ++ bootph-pre-ram; ++}; ++ ++&i2c0_xfer { ++ bootph-pre-ram; ++}; ++ ++&i2s1m0_mclk { ++ bootph-pre-ram; ++}; ++ ++&pmic_int_l { ++ bootph-pre-ram; ++}; ++ ++&pmic_sleep { ++ bootph-pre-ram; ++}; ++ ++&rk817 { ++ regulators { ++ bootph-pre-ram; ++ }; ++}; ++ ++&sdhci { ++ cap-mmc-highspeed; ++}; +diff --git a/arch/arm/dts/rk3566-pinenote-v1.1-u-boot.dtsi b/arch/arm/dts/rk3566-pinenote-v1.1-u-boot.dtsi +new file mode 100644 +index 00000000000..8e86ad67bf0 +--- /dev/null ++++ b/arch/arm/dts/rk3566-pinenote-v1.1-u-boot.dtsi +@@ -0,0 +1,6 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (c) 2023 Collabora Ltd. ++ */ ++ ++#include "rk3566-pinenote-u-boot.dtsi" +diff --git a/arch/arm/dts/rk3566-pinenote-v1.2-u-boot.dtsi b/arch/arm/dts/rk3566-pinenote-v1.2-u-boot.dtsi +new file mode 100644 +index 00000000000..8e86ad67bf0 +--- /dev/null ++++ b/arch/arm/dts/rk3566-pinenote-v1.2-u-boot.dtsi +@@ -0,0 +1,6 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (c) 2023 Collabora Ltd. ++ */ ++ ++#include "rk3566-pinenote-u-boot.dtsi" +diff --git a/arch/arm/mach-rockchip/rk3568/Kconfig b/arch/arm/mach-rockchip/rk3568/Kconfig +index c589fd58699..fd351aa7bf3 100644 +--- a/arch/arm/mach-rockchip/rk3568/Kconfig ++++ b/arch/arm/mach-rockchip/rk3568/Kconfig +@@ -27,6 +27,12 @@ config TARGET_ODROID_M1S_RK3566 + help + Hardkernel ODROID-M1S single board computer with a RK3566 SoC. + ++config TARGET_PINENOTE_RK3566 ++ bool "Pinenote" ++ help ++ Pinenote is an eInk tablet based on the Rockchip RK3566 SoC ++ with 4Gb RAM, onboard eMMC and a 10.3" (1404x1872) screen. ++ + config TARGET_POWKIDDY_X55_RK3566 + bool "Powkiddy X55" + help +@@ -78,6 +84,7 @@ source "board/rockchip/evb_rk3568/Kconfig" + source "board/anbernic/rgxx3_rk3566/Kconfig" + source "board/hardkernel/odroid_m1/Kconfig" + source "board/hardkernel/odroid_m1s/Kconfig" ++source "board/pine64/pinenote-rk3566/Kconfig" + source "board/pine64/quartz64_rk3566/Kconfig" + source "board/powkiddy/x55/Kconfig" + source "board/qnap/ts433/Kconfig" +diff --git a/board/pine64/pinenote-rk3566/Kconfig b/board/pine64/pinenote-rk3566/Kconfig +new file mode 100644 +index 00000000000..ac4d77538ba +--- /dev/null ++++ b/board/pine64/pinenote-rk3566/Kconfig +@@ -0,0 +1,15 @@ ++if TARGET_PINENOTE_RK3566 ++ ++config SYS_BOARD ++ default "pinenote-rk3566" ++ ++config SYS_VENDOR ++ default "pine64" ++ ++config SYS_CONFIG_NAME ++ default "evb_rk3568" ++ ++config BOARD_SPECIFIC_OPTIONS ++ def_bool y ++ ++endif +diff --git a/board/pine64/pinenote-rk3566/MAINTAINERS b/board/pine64/pinenote-rk3566/MAINTAINERS +new file mode 100644 +index 00000000000..60c93887518 +--- /dev/null ++++ b/board/pine64/pinenote-rk3566/MAINTAINERS +@@ -0,0 +1,7 @@ ++PINENOTE-RK3566 ++M: Arnaud Ferraris ++S: Maintained ++F: board/pine64/pinenote-rk3566 ++F: include/configs/pinenote-rk3566.h ++F: configs/pinenote-rk3566_defconfig ++F: arch/arm/dts/rk3566-pinenote* +diff --git a/board/pine64/pinenote-rk3566/Makefile b/board/pine64/pinenote-rk3566/Makefile +new file mode 100644 +index 00000000000..8baf80c48b1 +--- /dev/null ++++ b/board/pine64/pinenote-rk3566/Makefile +@@ -0,0 +1,7 @@ ++# ++# (C) Copyright 2023 Collabora Ltd ++# ++# SPDX-License-Identifier: GPL-2.0 ++# ++ ++obj-y += pinenote-rk3566.o +diff --git a/board/pine64/pinenote-rk3566/pinenote-rk3566.c b/board/pine64/pinenote-rk3566/pinenote-rk3566.c +new file mode 100644 +index 00000000000..aa4beb46697 +--- /dev/null ++++ b/board/pine64/pinenote-rk3566/pinenote-rk3566.c +@@ -0,0 +1,26 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * (C) Copyright 2019 Rockchip Electronics Co., Ltd ++ * (C) Copyright 2023 Collabora Ltd ++ */ ++ ++#include ++#include ++ ++#define KEY_DOWN_MIN_VAL 0 ++#define KEY_DOWN_MAX_VAL 30 ++ ++int rockchip_dnl_key_pressed(void) ++{ ++ unsigned int val; ++ ++ if (adc_channel_single_shot("saradc@fe720000", 0, &val)) { ++ printf("%s read adc key val failed\n", __func__); ++ return false; ++ } ++ ++ if (val >= KEY_DOWN_MIN_VAL && val <= KEY_DOWN_MAX_VAL) ++ return true; ++ else ++ return false; ++} +diff --git a/configs/pinenote-rk3566_defconfig b/configs/pinenote-rk3566_defconfig +new file mode 100644 +index 00000000000..aec403708b0 +--- /dev/null ++++ b/configs/pinenote-rk3566_defconfig +@@ -0,0 +1,89 @@ ++CONFIG_ARM=y ++CONFIG_SKIP_LOWLEVEL_INIT=y ++CONFIG_COUNTER_FREQUENCY=24000000 ++CONFIG_ARCH_ROCKCHIP=y ++CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3566-pinenote-v1.2" ++CONFIG_ROCKCHIP_RK3568=y ++CONFIG_ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON=y ++CONFIG_SPL_SERIAL=y ++CONFIG_TARGET_PINENOTE_RK3566=y ++CONFIG_SYS_LOAD_ADDR=0xc00800 ++CONFIG_DEBUG_UART_BASE=0xFE660000 ++CONFIG_DEBUG_UART_CLOCK=24000000 ++CONFIG_DEBUG_UART=y ++CONFIG_FIT=y ++CONFIG_FIT_VERBOSE=y ++CONFIG_SPL_FIT_SIGNATURE=y ++CONFIG_SPL_LOAD_FIT=y ++CONFIG_LEGACY_IMAGE_FORMAT=y ++CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-pinenote-v1.2.dtb" ++# CONFIG_DISPLAY_CPUINFO is not set ++CONFIG_DISPLAY_BOARDINFO_LATE=y ++CONFIG_SPL_MAX_SIZE=0x40000 ++CONFIG_SPL_PAD_TO=0x7f8000 ++# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set ++CONFIG_SPL_I2C=y ++CONFIG_SPL_POWER=y ++CONFIG_SPL_ATF=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_I2C=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_POWEROFF=y ++CONFIG_CMD_USB=y ++CONFIG_CMD_ROCKUSB=y ++CONFIG_CMD_USB_MASS_STORAGE=y ++# CONFIG_CMD_SETEXPR is not set ++CONFIG_CMD_PMIC=y ++CONFIG_CMD_REGULATOR=y ++# CONFIG_SPL_DOS_PARTITION is not set ++CONFIG_SPL_OF_CONTROL=y ++CONFIG_OF_LIVE=y ++CONFIG_OF_LIST="rockchip/rk3566-pinenote-v1.1 rockchip/rk3566-pinenote-v1.2" ++CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_NO_NET=y ++CONFIG_SPL_DM_SEQ_ALIAS=y ++CONFIG_SPL_REGMAP=y ++CONFIG_SPL_SYSCON=y ++CONFIG_BUTTON=y ++CONFIG_BUTTON_ADC=y ++CONFIG_BUTTON_GPIO=y ++CONFIG_SPL_CLK=y ++# CONFIG_USB_FUNCTION_FASTBOOT is not set ++CONFIG_ROCKCHIP_GPIO=y ++CONFIG_SYS_I2C_ROCKCHIP=y ++CONFIG_LED=y ++CONFIG_LED_GPIO=y ++CONFIG_MISC=y ++CONFIG_SUPPORT_EMMC_RPMB=y ++CONFIG_MMC_DW=y ++CONFIG_MMC_DW_ROCKCHIP=y ++CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_SDMA=y ++CONFIG_MMC_SDHCI_ROCKCHIP=y ++CONFIG_PHY_ROCKCHIP_INNO_USB2=y ++CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y ++CONFIG_SPL_PINCTRL=y ++CONFIG_DM_PMIC=y ++CONFIG_PMIC_RK8XX=y ++CONFIG_SPL_PMIC_RK8XX=y ++CONFIG_REGULATOR_RK8XX=y ++CONFIG_SPL_RAM=y ++CONFIG_BAUDRATE=1500000 ++CONFIG_DEBUG_UART_SHIFT=2 ++CONFIG_SYS_NS16550_MEM32=y ++CONFIG_SYSRESET=y ++CONFIG_SYSRESET_PSCI=y ++CONFIG_USB=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_DWC3=y ++CONFIG_USB_DWC3_GENERIC=y ++CONFIG_USB_HOST_ETHER=y ++CONFIG_USB_ETHER_ASIX=y ++CONFIG_USB_ETHER_ASIX88179=y ++CONFIG_USB_ETHER_RTL8152=y ++CONFIG_USB_GADGET=y ++CONFIG_USB_GADGET_DOWNLOAD=y ++CONFIG_USB_FUNCTION_ROCKUSB=y ++CONFIG_ERRNO_STR=y +diff --git a/doc/board/rockchip/rockchip.rst.orig b/doc/board/rockchip/rockchip.rst +index b88299cbba..a1cb20e73f 100644 +--- a/doc/board/rockchip/rockchip.rst.orig ++++ b/doc/board/rockchip/rockchip.rst +@@ -108,6 +108,7 @@ List of mainline supported Rockchip boards: + - FriendlyElec NanoPi R3S (nanopi-r3s-rk3566) + - Hardkernel ODROID-M1S (odroid-m1s-rk3566) + - LCKFB TaishanPi (lckfb-tspi-rk3566) ++ - Pine64 PineNote (pinenote-rk3566) + - Pine64 PineTab2 (pinetab2-rk3566) + - Pine64 Quartz64-A Board (quartz64-a-rk3566) + - Pine64 Quartz64-B Board (quartz64-b-rk3566) diff --git a/device/testing/u-boot-pine64-pinenote/APKBUILD b/device/testing/u-boot-pine64-pinenote/APKBUILD index 2002c6558..d32979113 100644 --- a/device/testing/u-boot-pine64-pinenote/APKBUILD +++ b/device/testing/u-boot-pine64-pinenote/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Antoine Martin (ayakael) pkgname=u-boot-pine64-pinenote -pkgver=2025.04_git20250211 -pkgrel=1 +pkgver=2025.07 +pkgrel=0 pkgdesc="u-boot bootloader for the Pinenote (rk3566)" url="https://gitlab.com/a-wai/u-boot-pinenote" arch="aarch64" @@ -23,17 +23,14 @@ makedepends=" python3-dev swig " - -_commit="228e9e5b3502ec0e3aac3fae38d9d99f77e9ede1" _rkbin_commit="fd73dcf27702e1efc2065055215320adeaadee84" - -builddir=$srcdir/u-boot-rockchip-$_commit - +builddir="$srcdir"/u-boot-$pkgver source=" - $pkgname-$_commit.tar.gz::https://github.com/Kwiboo/u-boot-rockchip/archive/$_commit.tar.gz + https://ftp.denx.de/pub/u-boot/u-boot-${pkgver//_/-}.tar.bz2 https://github.com/m-weigand/rkbin/raw/$_rkbin_commit/bin/rk35/rk3566_ddr_1056MHz_ultra_v1.20.bin https://github.com/m-weigand/rkbin/raw/$_rkbin_commit/bin/rk35/rk3568_bl31_ultra_v2.17.elf https://github.com/PNDeb/pinenote-debian-image/releases/download/v20250101_01/rk356x_spl_loader_v1.12.112.bin + 0001-board-rockchip-add-pine64-pinenote.patch update-u-boot " @@ -58,9 +55,10 @@ package() { } sha512sums=" -a89f5ac2a726d32b634603f14ceb76d20a05f444df1a3c4dd2fbf12e913ef8f5c909fc431cf4424573905ee341cfb4e0ddfc93aa9a237d973d01bbc4a6130b1d u-boot-pine64-pinenote-228e9e5b3502ec0e3aac3fae38d9d99f77e9ede1.tar.gz +0d9a4906aaee134c6b6c496aaf7f54c653ede8e878f851e877ec7876e26cd14e356cd29112849295deeb72bee6b4d292151fb4d9db23d23608350c3fe567d955 u-boot-2025.07.tar.bz2 0791395e4afeb287bc3b6a33aad9ba7c913b5a9aa2259ad1c4a8ef4c667097e47e919d76c568bae64907f38b5a5f824bb16d79ee3d5467f57c6781c644e6387e rk3566_ddr_1056MHz_ultra_v1.20.bin 1f257e9da6a80661235c62800b4b4b0ac6a7dffe7840d5bfa423737f8bd6de9184f4a8f57cd57b31e40389f695a33fa2875c5fcd9624e44fa081d0529daa6aaf rk3568_bl31_ultra_v2.17.elf 386fcd19d53cf2af5bb7a704d9c6e9fc5b05bf5c1aba7d4e052dc83e57c416b4e85074b2486c7f31f7618e50931bce00fbe425e46e01445653445b0fded67537 rk356x_spl_loader_v1.12.112.bin +276309b6917899b3cb6e061dbe6ef4635b71f785fbc2f5c09fbbc185a25773cd775dea7ede92f15ff6bd749e7294d51219b526f84454ba61e1b1defa30fc9f0e 0001-board-rockchip-add-pine64-pinenote.patch 0296588a73bdb968f1413c1e416b05da01202dd8bdeadb9fe9530ab08ed071c60ec44f6591d88453da0ea82c4d9364f85d74bb5830093c0cf97f63080f4011e5 update-u-boot "