Skip to content

Commit

Permalink
Move known non working rockhip64 boards to previous boot loader (#4392)
Browse files Browse the repository at this point in the history
* Move known non working rockhip64 boards to previous boot loader

* Auto label trigger this several times in a row
  • Loading branch information
igorpecovnik committed Nov 7, 2022
1 parent b395e2a commit 2813365
Show file tree
Hide file tree
Showing 60 changed files with 11,017 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-kernel-pr.yml
Expand Up @@ -7,7 +7,7 @@ name: Build Kernels at PR
on:
workflow_dispatch:
pull_request:
types: [opened,synchronize,reopened,ready_for_review,review_requested,labeled]
types: [opened,synchronize,reopened,ready_for_review,review_requested]
paths:
- 'config/kernel/**'
- 'config/sources/**'
Expand Down
2 changes: 2 additions & 0 deletions config/boards/nanopim4.conf
Expand Up @@ -6,3 +6,5 @@ KERNEL_TARGET="legacy,current,edge"
FULL_DESKTOP="yes"
ASOUND_STATE="asound.state.rt5651"
BOOT_LOGO="desktop"
BOOTBRANCH_BOARD="tag:v2022.04"
BOOTPATCHDIR="u-boot-rockchip64-v2022.04"
2 changes: 2 additions & 0 deletions config/boards/orangepi4-lts.conf
Expand Up @@ -11,3 +11,5 @@ MODULES_EDGE="sprdbt_tty sprdwl_ng"
FULL_DESKTOP="yes"
ASOUND_STATE="asound.state.rk3399"
BOOT_LOGO="desktop"
BOOTBRANCH_BOARD="tag:v2022.04"
BOOTPATCHDIR="u-boot-rockchip64-v2022.04"
2 changes: 2 additions & 0 deletions config/boards/orangepi4.conf
Expand Up @@ -6,3 +6,5 @@ KERNEL_TARGET="legacy,current,edge"
FULL_DESKTOP="yes"
ASOUND_STATE="asound.state.rt5651"
BOOT_LOGO="desktop"
BOOTBRANCH_BOARD="tag:v2022.04"
BOOTPATCHDIR="u-boot-rockchip64-v2022.04"
2 changes: 2 additions & 0 deletions config/boards/rockpi-s.conf
Expand Up @@ -9,3 +9,5 @@ KERNEL_TARGET="legacy,current,edge"
BOOT_FDT_FILE="rockchip/rk3308-rock-pi-s.dtb"
MODULES_BLACKLIST="rockchipdrm analogix_dp dw_mipi_dsi dw_hdmi gpu_sched lima hantro_vpu panfrost"
HAS_VIDEO_OUTPUT="no"
BOOTBRANCH_BOARD="tag:v2022.04"
BOOTPATCHDIR="u-boot-rockchip64-v2022.04"
2 changes: 2 additions & 0 deletions config/boards/rockpro64.conf
Expand Up @@ -7,3 +7,5 @@ FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_SCENARIO="tpl-spl-blob"
BOOT_SUPPORT_SPI=yes
BOOTBRANCH_BOARD="tag:v2022.04"
BOOTPATCHDIR="u-boot-rockchip64-v2022.04"
7 changes: 6 additions & 1 deletion config/kernel/linux-rockchip64-current.config
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.15.72 Kernel Configuration
# Linux/arm64 5.15.77 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0"
CONFIG_CC_IS_GCC=y
Expand Down Expand Up @@ -355,6 +355,7 @@ CONFIG_ARM64_ERRATUM_824069=y
CONFIG_ARM64_ERRATUM_819472=y
CONFIG_ARM64_ERRATUM_832075=y
CONFIG_ARM64_ERRATUM_834220=y
CONFIG_ARM64_ERRATUM_1742098=y
CONFIG_ARM64_ERRATUM_845719=y
CONFIG_ARM64_ERRATUM_843419=y
CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
Expand All @@ -365,6 +366,7 @@ CONFIG_ARM64_ERRATUM_1165522=y
CONFIG_ARM64_ERRATUM_1319367=y
CONFIG_ARM64_ERRATUM_1530923=y
CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
CONFIG_ARM64_ERRATUM_2441007=y
CONFIG_ARM64_ERRATUM_1286807=y
CONFIG_ARM64_ERRATUM_1463225=y
CONFIG_ARM64_ERRATUM_1542419=y
Expand Down Expand Up @@ -491,6 +493,7 @@ CONFIG_ARM64_MODULE_PLTS=y
# CONFIG_ARM64_PSEUDO_NMI is not set
CONFIG_RELOCATABLE=y
CONFIG_RANDOMIZE_BASE=y
CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
# end of Kernel Features

#
Expand Down Expand Up @@ -9306,6 +9309,8 @@ CONFIG_SYMBOLIC_ERRNAME=y
CONFIG_DEBUG_BUGVERBOSE=y
# end of printk and dmesg options

CONFIG_AS_HAS_NON_CONST_LEB128=y

#
# Compile-time checks and compiler options
#
Expand Down
3 changes: 2 additions & 1 deletion config/sources/common.conf
Expand Up @@ -6,7 +6,8 @@ export MAIN_CMDLINE='rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repa
# boot loader configuration
[[ -z $BOOTSOURCE ]] && export BOOTSOURCE="$MAINLINE_UBOOT_SOURCE"
[[ -z $BOOTDIR ]] && export BOOTDIR="$MAINLINE_UBOOT_DIR"
[[ -z $BOOTBRANCH ]] && export BOOTBRANCH='tag:v2022.07'
[[ -z $BOOTBRANCH ]] && export BOOTBRANCH="${BOOTBRANCH_BOARD:-"tag:v2022.07"}"
[[ -z $BOOTPATCHDIR ]] && export BOOTPATCHDIR="${BOOTPATCHDIR:-"v2022.07"}"

# kernel configuration
[[ -z $KERNELDIR ]] && export KERNELDIR="$MAINLINE_KERNEL_DIR"
Expand Down
3 changes: 1 addition & 2 deletions config/sources/families/include/rockchip64_common.inc
Expand Up @@ -10,8 +10,7 @@ OVERLAY_PREFIX='rockchip'
SERIALCON=${SERIALCON:=$([ $BRANCH == "legacy" ] && echo "ttyFIQ0:1500000" || echo "ttyS2:1500000")}
GOVERNOR="ondemand"
ATFPATCHDIR='atf-rockchip64'
BOOTBRANCH="tag:v2022.07"
BOOTPATCHDIR="u-boot-rockchip64"
BOOTPATCHDIR="${BOOTPATCHDIR:-"u-boot-rockchip64"}"
PACKAGE_LIST_FAMILY="ethtool"

RKBIN_DIR="$SRC/cache/sources/rkbin-tools"
Expand Down
2 changes: 1 addition & 1 deletion config/sources/families/rockpis.conf
@@ -1,5 +1,5 @@
source "${BASH_SOURCE%/*}/include/rockchip64_common.inc"
BOOTPATCHDIR="u-boot-rockchip64"
#BOOTPATCHDIR="u-boot-rockchip64"
BOOTENV_FILE='rockpis.txt'
OVERLAY_PREFIX='rk3308'
BOOTSCRIPT=boot-rockpis.cmd:boot.cmd
Expand Down
@@ -0,0 +1,274 @@
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 9fb38682e6..a6d8361602 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -120,6 +120,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \
rk3368-px5-evb.dtb \

dtb-$(CONFIG_ROCKCHIP_RK3399) += \
+ rk3399-clockworkpi-a06.dtb \
rk3399-evb.dtb \
rk3399-ficus.dtb \
rk3399-firefly.dtb \
diff --git a/arch/arm/dts/rk3399-clockworkpi-a06-u-boot.dtsi b/arch/arm/dts/rk3399-clockworkpi-a06-u-boot.dtsi
new file mode 100644
index 0000000000..82d4a5db44
--- /dev/null
+++ b/arch/arm/dts/rk3399-clockworkpi-a06-u-boot.dtsi
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include "rk3399-u-boot.dtsi"
+#include "rk3399-sdram-lpddr4-100.dtsi"
+
+/ {
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
+ };
+};
+
+&i2c0 {
+ u-boot,dm-pre-reloc;
+};
+
+&rk808 {
+ u-boot,dm-pre-reloc;
+};
+
+&sdmmc {
+ u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/rk3399-clockworkpi-a06.dts b/arch/arm/dts/rk3399-clockworkpi-a06.dts
new file mode 100644
index 0000000000..b32b74abb5
--- /dev/null
+++ b/arch/arm/dts/rk3399-clockworkpi-a06.dts
@@ -0,0 +1,162 @@
+/*
+ * (C) Copyright 2016 Rockchip Electronics Co., Ltd
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+/dts-v1/;
+#include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3399.dtsi"
+#include "rk3399-opp.dtsi"
+
+/ {
+ model = "Clockworkpi A06";
+ compatible = "clockwork,devterm-a06", "rockchip,rk3399";
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ vdd_center: vdd-center {
+ compatible = "pwm-regulator";
+ pwms = <&pwm3 0 25000 1>;
+ regulator-name = "vdd_center";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-init-microvolt = <950000>;
+ regulator-always-on;
+ regulator-boot-on;
+ status = "okay";
+ };
+
+ vccsys: vccsys {
+ compatible = "regulator-fixed";
+ regulator-name = "vccsys";
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ vcc3v3_sys: vcc3v3-sys {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ vcc_phy: vcc-phy-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_phy";
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vcc5v0_host: vcc5v0-host-en {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_host";
+ gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
+ };
+
+ vcc5v0_typec0: vcc5v0-typec0-en {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_typec0";
+ gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ vcc5v0_typec1: vcc5v0-typec1-en {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_typec1";
+ gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
+ };
+
+ clkin_gmac: external-gmac-clock {
+ compatible = "fixed-clock";
+ clock-frequency = <125000000>;
+ clock-output-names = "clkin_gmac";
+ #clock-cells = <0>;
+ };
+
+};
+
+&saradc {
+ status = "okay";
+};
+
+&sdmmc {
+ bus-width = <4>;
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+ non-removable;
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+ clock-frequency = <400000>;
+ i2c-scl-falling-time-ns = <50>;
+ i2c-scl-rising-time-ns = <100>;
+
+ rk808: pmic@1b {
+ compatible = "rockchip,rk808";
+ clock-output-names = "xin32k", "wifibt_32kin";
+ interrupt-parent = <&gpio0>;
+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_int_l>;
+ reg = <0x1b>;
+ rockchip,system-power-controller;
+ #clock-cells = <1>;
+ status = "okay";
+
+ vcc12-supply = <&vcc3v3_sys>;
+
+ regulators {
+ vcc33_lcd: SWITCH_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vcc33_lcd";
+ };
+ };
+ };
+};
+
+&pinctrl {
+ pmic {
+ pmic_int_l: pmic-int-l {
+ rockchip,pins =
+ <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ pmic_dvs2: pmic-dvs2 {
+ rockchip,pins =
+ <1 18 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ };
+};
diff --git a/configs/clockworkpi-a06-rk3399_defconfig b/configs/clockworkpi-a06-rk3399_defconfig
new file mode 100644
index 0000000000..398ed3592f
--- /dev/null
+++ b/configs/clockworkpi-a06-rk3399_defconfig
@@ -0,0 +1,56 @@
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SYS_TEXT_BASE=0x00200000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_OFFSET=0x3F8000
+CONFIG_ROCKCHIP_RK3399=y
+CONFIG_TARGET_EVB_RK3399=y
+CONFIG_DEBUG_UART_BASE=0xFF1A0000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_DEFAULT_DEVICE_TREE="rk3399-clockworkpi-a06"
+CONFIG_DEBUG_UART=y
+CONFIG_SYS_LOAD_ADDR=0x800800
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-clockworkpi-a06.dtb"
+CONFIG_MISC_INIT_R=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_STACK_R=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
+CONFIG_TPL=y
+CONFIG_CMD_BOOTZ=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_TIME=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_ROCKCHIP_GPIO=y
+CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_MMC_DW=y
+CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_PMIC_RK8XX=y
+CONFIG_REGULATOR_RK8XX=y
+CONFIG_RAM_RK3399_LPDDR4=y
+CONFIG_RAM_ROCKCHIP_DEBUG=y
+CONFIG_BAUDRATE=1500000
+CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_SYSRESET=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_DM_VIDEO=y
+CONFIG_DISPLAY=y
+CONFIG_VIDEO_ROCKCHIP=y
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
+CONFIG_SPL_TINY_MEMSET=y
+CONFIG_ERRNO_STR=y
--
2.25.1

0 comments on commit 2813365

Please sign in to comment.