406 lines
11 KiB
Diff
406 lines
11 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||
|
Date: Thu, 10 Jun 2021 11:58:00 +0200
|
||
|
Subject: [ARCHEOLOGY] Fix mainline kernel boot on Rockpi S (#2823)
|
||
|
|
||
|
> X-Git-Archeology: > recovered message: > https://armbian.atlassian.net/browse/AR-785
|
||
|
> X-Git-Archeology: - Revision 17b3da0a44d70b42c391f7c93f0683e2901486c9: https://github.com/armbian/build/commit/17b3da0a44d70b42c391f7c93f0683e2901486c9
|
||
|
> X-Git-Archeology: Date: Thu, 10 Jun 2021 11:58:00 +0200
|
||
|
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||
|
> X-Git-Archeology: Subject: Fix mainline kernel boot on Rockpi S (#2823)
|
||
|
> X-Git-Archeology:
|
||
|
> X-Git-Archeology: - Revision 86abac1fd4e169712a44d245cf7adef4ee17c420: https://github.com/armbian/build/commit/86abac1fd4e169712a44d245cf7adef4ee17c420
|
||
|
> X-Git-Archeology: Date: Tue, 26 Oct 2021 22:14:41 +0200
|
||
|
> X-Git-Archeology: From: Piotr Szczepanik <piter75@gmail.com>
|
||
|
> X-Git-Archeology: Subject: Cleanup u-boot configurations for rockchip64 derivatives (#3150)
|
||
|
> X-Git-Archeology:
|
||
|
> X-Git-Archeology: - Revision 26437e36c18bb09484f4150e396a1784cc6471b7: https://github.com/armbian/build/commit/26437e36c18bb09484f4150e396a1784cc6471b7
|
||
|
> X-Git-Archeology: Date: Thu, 16 Jun 2022 12:27:05 +0200
|
||
|
> X-Git-Archeology: From: Piotr Szczepanik <piter75@gmail.com>
|
||
|
> X-Git-Archeology: Subject: Switched rockchip64 u-boot to v2022.04 (#3871)
|
||
|
> X-Git-Archeology:
|
||
|
> X-Git-Archeology: - Revision 2813365dd25e3ad110936cbf014b95b38d7090ec: https://github.com/armbian/build/commit/2813365dd25e3ad110936cbf014b95b38d7090ec
|
||
|
> X-Git-Archeology: Date: Mon, 07 Nov 2022 21:29:00 +0100
|
||
|
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||
|
> X-Git-Archeology: Subject: Move known non working rockhip64 boards to previous boot loader (#4392)
|
||
|
> X-Git-Archeology:
|
||
|
---
|
||
|
arch/arm/dts/Makefile | 3 +-
|
||
|
arch/arm/dts/rk3308-rock-pi-s-u-boot.dtsi | 17 +
|
||
|
arch/arm/dts/rk3308-rock-pi-s.dts | 215 ++++++++++
|
||
|
configs/rock-pi-s-rk3308_defconfig | 105 +++++
|
||
|
4 files changed, 339 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||
|
index ce5f8c27c5..4cad0dfc9c 100644
|
||
|
--- a/arch/arm/dts/Makefile
|
||
|
+++ b/arch/arm/dts/Makefile
|
||
|
@@ -117,7 +117,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3288) += \
|
||
|
|
||
|
dtb-$(CONFIG_ROCKCHIP_RK3308) += \
|
||
|
rk3308-evb.dtb \
|
||
|
- rk3308-roc-cc.dtb
|
||
|
+ rk3308-roc-cc.dtb \
|
||
|
+ rk3308-rock-pi-s.dtb
|
||
|
|
||
|
dtb-$(CONFIG_ROCKCHIP_RK3328) += \
|
||
|
rk3328-evb.dtb \
|
||
|
diff --git a/arch/arm/dts/rk3308-rock-pi-s-u-boot.dtsi b/arch/arm/dts/rk3308-rock-pi-s-u-boot.dtsi
|
||
|
new file mode 100644
|
||
|
index 0000000000..40bb917ba9
|
||
|
--- /dev/null
|
||
|
+++ b/arch/arm/dts/rk3308-rock-pi-s-u-boot.dtsi
|
||
|
@@ -0,0 +1,17 @@
|
||
|
+// SPDX-License-Identifier: GPL-2.0+
|
||
|
+/*
|
||
|
+ * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd
|
||
|
+ */
|
||
|
+#include "rk3308-u-boot.dtsi"
|
||
|
+
|
||
|
+/ {
|
||
|
+ chosen {
|
||
|
+ u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc;
|
||
|
+ };
|
||
|
+};
|
||
|
+
|
||
|
+&uart2 {
|
||
|
+ u-boot,dm-pre-reloc;
|
||
|
+ clock-frequency = <24000000>;
|
||
|
+ status = "okay";
|
||
|
+};
|
||
|
diff --git a/arch/arm/dts/rk3308-rock-pi-s.dts b/arch/arm/dts/rk3308-rock-pi-s.dts
|
||
|
new file mode 100644
|
||
|
index 0000000000..678e7d704f
|
||
|
--- /dev/null
|
||
|
+++ b/arch/arm/dts/rk3308-rock-pi-s.dts
|
||
|
@@ -0,0 +1,215 @@
|
||
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||
|
+/*
|
||
|
+ * Copyright (c) 2019 Akash Gajjar <akash@openedev.com>
|
||
|
+ * Copyright (c) 2019 Jagan Teki <jagan@openedev.com>
|
||
|
+ */
|
||
|
+
|
||
|
+/dts-v1/;
|
||
|
+#include "rk3308.dtsi"
|
||
|
+
|
||
|
+/ {
|
||
|
+ model = "Radxa ROCK Pi S";
|
||
|
+ compatible = "radxa,rockpis", "rockchip,rk3308";
|
||
|
+
|
||
|
+ chosen {
|
||
|
+ stdout-path = "serial2:1500000n8";
|
||
|
+ };
|
||
|
+
|
||
|
+ leds {
|
||
|
+ compatible = "gpio-leds";
|
||
|
+ pinctrl-names = "default";
|
||
|
+ pinctrl-0 = <&green_led_gio>, <&heartbeat_led_gpio>;
|
||
|
+
|
||
|
+ green-led {
|
||
|
+ label = "rockpis:green:power";
|
||
|
+ gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||
|
+ linux,default-trigger = "default-on";
|
||
|
+ default-state = "on";
|
||
|
+ };
|
||
|
+
|
||
|
+ blue-led {
|
||
|
+ label = "rockpis:blue:user";
|
||
|
+ gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||
|
+ default-state = "on";
|
||
|
+ linux,default-trigger = "heartbeat";
|
||
|
+ };
|
||
|
+ };
|
||
|
+
|
||
|
+ vcc5v0_sys: vcc5v0-sys {
|
||
|
+ compatible = "regulator-fixed";
|
||
|
+ regulator-name = "vcc5v0_sys";
|
||
|
+ regulator-always-on;
|
||
|
+ regulator-boot-on;
|
||
|
+ regulator-min-microvolt = <5000000>;
|
||
|
+ regulator-max-microvolt = <5000000>;
|
||
|
+ };
|
||
|
+
|
||
|
+ vdd_core: vdd-core {
|
||
|
+ compatible = "pwm-regulator";
|
||
|
+ pwms = <&pwm0 0 5000 1>;
|
||
|
+ regulator-name = "vdd_core";
|
||
|
+ regulator-min-microvolt = <827000>;
|
||
|
+ regulator-max-microvolt = <1340000>;
|
||
|
+ regulator-init-microvolt = <1015000>;
|
||
|
+ regulator-settling-time-up-us = <250>;
|
||
|
+ regulator-always-on;
|
||
|
+ regulator-boot-on;
|
||
|
+ pwm-supply = <&vcc5v0_sys>;
|
||
|
+ };
|
||
|
+
|
||
|
+ vdd_log: vdd-log {
|
||
|
+ compatible = "regulator-fixed";
|
||
|
+ regulator-name = "vdd_log";
|
||
|
+ regulator-always-on;
|
||
|
+ regulator-boot-on;
|
||
|
+ regulator-min-microvolt = <1050000>;
|
||
|
+ regulator-max-microvolt = <1050000>;
|
||
|
+ vin-supply = <&vcc5v0_sys>;
|
||
|
+ };
|
||
|
+
|
||
|
+ vcc_ddr: vcc-ddr {
|
||
|
+ compatible = "regulator-fixed";
|
||
|
+ regulator-name = "vcc_ddr";
|
||
|
+ regulator-always-on;
|
||
|
+ regulator-boot-on;
|
||
|
+ regulator-min-microvolt = <1500000>;
|
||
|
+ regulator-max-microvolt = <1500000>;
|
||
|
+ vin-supply = <&vcc5v0_sys>;
|
||
|
+ };
|
||
|
+
|
||
|
+ vcc_1v8: vcc-1v8 {
|
||
|
+ compatible = "regulator-fixed";
|
||
|
+ regulator-name = "vcc_1v8";
|
||
|
+ regulator-always-on;
|
||
|
+ regulator-boot-on;
|
||
|
+ regulator-min-microvolt = <1800000>;
|
||
|
+ regulator-max-microvolt = <1800000>;
|
||
|
+ vin-supply = <&vcc_io>;
|
||
|
+ };
|
||
|
+
|
||
|
+ vcc_io: vcc-io {
|
||
|
+ compatible = "regulator-fixed";
|
||
|
+ regulator-name = "vcc_io";
|
||
|
+ regulator-always-on;
|
||
|
+ regulator-boot-on;
|
||
|
+ regulator-min-microvolt = <3300000>;
|
||
|
+ regulator-max-microvolt = <3300000>;
|
||
|
+ vin-supply = <&vcc5v0_sys>;
|
||
|
+ };
|
||
|
+
|
||
|
+ vcc_phy: vcc-phy-regulator {
|
||
|
+ compatible = "regulator-fixed";
|
||
|
+ regulator-name = "vcc_phy";
|
||
|
+ regulator-always-on;
|
||
|
+ regulator-boot-on;
|
||
|
+ };
|
||
|
+
|
||
|
+ vcc5v0_otg: vcc5v0-otg {
|
||
|
+ compatible = "regulator-fixed";
|
||
|
+ regulator-name = "vcc5v0_otg";
|
||
|
+ regulator-always-on;
|
||
|
+ gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||
|
+ enable-active-high;
|
||
|
+ pinctrl-names = "default";
|
||
|
+ pinctrl-0 = <&otg_vbus_drv>;
|
||
|
+ vin-supply = <&vcc5v0_sys>;
|
||
|
+ };
|
||
|
+};
|
||
|
+
|
||
|
+&cpu0 {
|
||
|
+ cpu-supply = <&vdd_core>;
|
||
|
+};
|
||
|
+
|
||
|
+&emmc {
|
||
|
+ bus-width = <4>; // Confirm if right value - <8>
|
||
|
+ cap-mmc-highspeed;
|
||
|
+ mmc-hs200-1_8v;
|
||
|
+ /* supports-sd; */
|
||
|
+ /* disable-wp; */
|
||
|
+ non-removable;
|
||
|
+ /* num-slots = <1>; */
|
||
|
+ /* please provide actual vmmc and vqmmc supplies
|
||
|
+ vin is not a valid supply for emmcs */
|
||
|
+ vin-supply = <&vcc_io>;
|
||
|
+ status = "okay";
|
||
|
+};
|
||
|
+
|
||
|
+&i2c1 {
|
||
|
+ status = "okay";
|
||
|
+};
|
||
|
+
|
||
|
+&sdmmc {
|
||
|
+ bus-width = <4>;
|
||
|
+ cap-mmc-highspeed;
|
||
|
+ cap-sd-highspeed;
|
||
|
+ disable-wp;
|
||
|
+ max-frequency = <150000000>;
|
||
|
+ pinctrl-names = "default";
|
||
|
+ pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
|
||
|
+ sd-uhs-sdr12;
|
||
|
+ sd-uhs-sdr25;
|
||
|
+ sd-uhs-sdr50;
|
||
|
+ sd-uhs-sdr104;
|
||
|
+ status = "okay";
|
||
|
+};
|
||
|
+
|
||
|
+&mac {
|
||
|
+ phy-supply = <&vcc_phy>;
|
||
|
+ clock_in_out = "output";
|
||
|
+ assigned-clocks = <&cru SCLK_MAC>;
|
||
|
+ assigned-clock-parents = <&cru SCLK_MAC_SRC>;
|
||
|
+ snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
|
||
|
+ snps,reset-active-low;
|
||
|
+ snps,reset-delays-us = <0 50000 50000>;
|
||
|
+ status = "okay";
|
||
|
+};
|
||
|
+
|
||
|
+&spi2 {
|
||
|
+ status = "okay";
|
||
|
+ max-freq = <10000000>;
|
||
|
+};
|
||
|
+
|
||
|
+&pinctrl {
|
||
|
+ pinctrl-names = "default";
|
||
|
+ pinctrl-0 = <&rtc_32k>;
|
||
|
+
|
||
|
+ leds {
|
||
|
+ green_led_gio: green-led-gpio {
|
||
|
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||
|
+ };
|
||
|
+
|
||
|
+ heartbeat_led_gpio: heartbeat-led-gpio {
|
||
|
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+
|
||
|
+ usb {
|
||
|
+ otg_vbus_drv: otg-vbus-drv {
|
||
|
+ rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+};
|
||
|
+
|
||
|
+&pwm0 {
|
||
|
+ status = "okay";
|
||
|
+ pinctrl-0 = <&pwm0_pin_pull_down>;
|
||
|
+};
|
||
|
+
|
||
|
+&saradc {
|
||
|
+ vref-supply = <&vcc_1v8>;
|
||
|
+ status = "okay";
|
||
|
+};
|
||
|
+
|
||
|
+&uart0 {
|
||
|
+ status = "okay";
|
||
|
+};
|
||
|
+
|
||
|
+&uart2 {
|
||
|
+ status = "okay";
|
||
|
+};
|
||
|
+
|
||
|
+&uart4 {
|
||
|
+ pinctrl-names = "default";
|
||
|
+ pinctrl-0 = <&uart4_xfer &uart4_rts &uart4_cts>;
|
||
|
+ status = "okay";
|
||
|
+};
|
||
|
diff --git a/configs/rock-pi-s-rk3308_defconfig b/configs/rock-pi-s-rk3308_defconfig
|
||
|
new file mode 100644
|
||
|
index 0000000000..2b4ab51d23
|
||
|
--- /dev/null
|
||
|
+++ b/configs/rock-pi-s-rk3308_defconfig
|
||
|
@@ -0,0 +1,105 @@
|
||
|
+CONFIG_ARM=y
|
||
|
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
||
|
+CONFIG_ARCH_ROCKCHIP=y
|
||
|
+CONFIG_SYS_TEXT_BASE=0x00600000
|
||
|
+CONFIG_SPL_GPIO_SUPPORT=y
|
||
|
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||
|
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||
|
+CONFIG_SYS_MALLOC_F_LEN=0x2000
|
||
|
+CONFIG_ROCKCHIP_RK3308=y
|
||
|
+CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x0
|
||
|
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
|
||
|
+CONFIG_TARGET_EVB_RK3308=y
|
||
|
+CONFIG_SPL_STACK_R_ADDR=0xc00000
|
||
|
+CONFIG_PRE_CON_BUF_ADDR=0x0f200000
|
||
|
+CONFIG_DEBUG_UART_BASE=0xFF0C0000
|
||
|
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||
|
+CONFIG_SPL_LIBDISK_SUPPORT=y
|
||
|
+CONFIG_DEFAULT_DEVICE_TREE="rk3308-rock-pi-s"
|
||
|
+CONFIG_DEBUG_UART=y
|
||
|
+CONFIG_SYS_LOAD_ADDR=0x800800
|
||
|
+CONFIG_BAUDRATE=1500000
|
||
|
+# CONFIG_LOCALVERSION_AUTO is not set
|
||
|
+CONFIG_ANDROID_BOOT_IMAGE=y
|
||
|
+CONFIG_FIT=y
|
||
|
+CONFIG_FIT_VERBOSE=y
|
||
|
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||
|
+CONFIG_CONSOLE_MUX=y
|
||
|
+CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
|
||
|
+# CONFIG_SYS_DEVICE_NULLDEV is not set
|
||
|
+CONFIG_DEFAULT_FDT_FILE="rk3308-rock-pi-s.dtb"
|
||
|
+CONFIG_MISC_INIT_R=y
|
||
|
+CONFIG_VERSION_VARIABLE=y
|
||
|
+# CONFIG_DISPLAY_CPUINFO is not set
|
||
|
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||
|
+CONFIG_BOARD_TYPES=y
|
||
|
+CONFIG_SPL_STACK_R=y
|
||
|
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y
|
||
|
+CONFIG_CMD_CONFIG=y
|
||
|
+# CONFIG_CMD_ELF is not set
|
||
|
+# CONFIG_CMD_IMI is not set
|
||
|
+# CONFIG_CMD_XIMG is not set
|
||
|
+CONFIG_CMD_GPT=y
|
||
|
+# CONFIG_CMD_LOADB is not set
|
||
|
+# CONFIG_CMD_LOADS is not set
|
||
|
+CONFIG_CMD_MMC=y
|
||
|
+CONFIG_CMD_USB=y
|
||
|
+CONFIG_CMD_USB_MASS_STORAGE=y
|
||
|
+# CONFIG_CMD_ITEST is not set
|
||
|
+# CONFIG_CMD_SETEXPR is not set
|
||
|
+# CONFIG_ISO_PARTITION is not set
|
||
|
+CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=64
|
||
|
+CONFIG_SPL_OF_CONTROL=y
|
||
|
+CONFIG_OF_LIVE=y
|
||
|
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||
|
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||
|
+CONFIG_REGMAP=y
|
||
|
+CONFIG_SYSCON=y
|
||
|
+CONFIG_CLK=y
|
||
|
+# CONFIG_USB_FUNCTION_FASTBOOT is not set
|
||
|
+CONFIG_SPL_FIRMWARE=y
|
||
|
+CONFIG_ROCKCHIP_GPIO=y
|
||
|
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||
|
+CONFIG_LED=y
|
||
|
+CONFIG_LED_GPIO=y
|
||
|
+CONFIG_MMC_DW=y
|
||
|
+CONFIG_MMC_DW_ROCKCHIP=y
|
||
|
+CONFIG_MMC_SDHCI=y
|
||
|
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||
|
+CONFIG_PHY_REALTEK=y
|
||
|
+CONFIG_DM_ETH=y
|
||
|
+CONFIG_PHY_GIGE=y
|
||
|
+CONFIG_ETH_DESIGNWARE=y
|
||
|
+CONFIG_RGMII=y
|
||
|
+CONFIG_MII=y
|
||
|
+CONFIG_GMAC_ROCKCHIP=y
|
||
|
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||
|
+CONFIG_PINCTRL=y
|
||
|
+CONFIG_DM_PMIC=y
|
||
|
+CONFIG_PMIC_RK8XX=y
|
||
|
+CONFIG_REGULATOR_PWM=y
|
||
|
+CONFIG_DM_REGULATOR_FIXED=y
|
||
|
+CONFIG_PWM_ROCKCHIP=y
|
||
|
+CONFIG_RAM=y
|
||
|
+CONFIG_ROCKCHIP_SDRAM_COMMON=y
|
||
|
+CONFIG_DM_RESET=y
|
||
|
+CONFIG_DEBUG_UART_SHIFT=2
|
||
|
+CONFIG_ROCKCHIP_SPI=y
|
||
|
+CONFIG_SYSRESET=y
|
||
|
+CONFIG_USB=y
|
||
|
+CONFIG_DM_USB_GADGET=y
|
||
|
+CONFIG_SPL_DM_USB_GADGET=y
|
||
|
+CONFIG_USB_EHCI_HCD=y
|
||
|
+CONFIG_USB_EHCI_GENERIC=y
|
||
|
+CONFIG_USB_DWC2=y
|
||
|
+CONFIG_USB_DWC3=y
|
||
|
+CONFIG_ROCKCHIP_USB2_PHY=y
|
||
|
+CONFIG_USB_KEYBOARD=y
|
||
|
+CONFIG_USB_GADGET=y
|
||
|
+CONFIG_USB_GADGET_DWC2_OTG=y
|
||
|
+CONFIG_USB_GADGET_DOWNLOAD=y
|
||
|
+CONFIG_EXT4_WRITE=y
|
||
|
+CONFIG_SPL_TINY_MEMSET=y
|
||
|
+CONFIG_LZO=y
|
||
|
+CONFIG_ERRNO_STR=y
|
||
|
+# CONFIG_EFI_LOADER is not set
|
||
|
--
|
||
|
Armbian
|
||
|
|