diff --git a/config/boards/smart-am40.csc b/config/boards/smart-am40.csc index ae0ee4dd7..d3bede5e6 100644 --- a/config/boards/smart-am40.csc +++ b/config/boards/smart-am40.csc @@ -5,13 +5,13 @@ BOARD_MAINTAINER="" BOOTCONFIG="am40-rk3399_defconfig" KERNEL_TARGET="current,edge" KERNEL_TEST_TARGET="current" -MODULES_CURRENT="extcon_usbc_virtual_pd" -MODULES_EDGE="extcon_usbc_virtual_pd" +MODULES_CURRENT="extcon-usbc-virtual-pd" +MODULES_EDGE="extcon-usbc-virtual-pd" FULL_DESKTOP="yes" BOOT_LOGO="desktop" BOOT_FDT_FILE="rockchip/rk3399-am40.dtb" -BOOTBRANCH_BOARD="tag:v2024.10" -BOOTPATCHDIR="v2024.10" +BOOTBRANCH_BOARD="tag:v2025.04" +BOOTPATCHDIR="v2025.04" BOOT_SCENARIO="binman" SRC_EXTLINUX="yes" SRC_CMDLINE="console=ttyS2,1500000 console=tty0" diff --git a/patch/kernel/archive/rockchip64-6.12/dt/rk3399-am40.dts b/patch/kernel/archive/rockchip64-6.12/dt/rk3399-am40.dts index 9c402bc13..a9f293851 100644 --- a/patch/kernel/archive/rockchip64-6.12/dt/rk3399-am40.dts +++ b/patch/kernel/archive/rockchip64-6.12/dt/rk3399-am40.dts @@ -18,6 +18,7 @@ ethernet0 = &gmac; mmc0 = &sdhci; mmc1 = &sdmmc; + rtc0 = &pt7c4563; /* * The rk808 circuit design on this board does not have the ability to maintain real-time time after a power outage. * Registering rk808 as rtc99 (most kernel configurations read time from rtc0) can prevent the kernel from reading the time (2013) from rk808 during startup. @@ -499,6 +500,20 @@ &i2c4 { status = "okay"; + i2c-scl-rising-time-ns = <300>; + i2c-scl-falling-time-ns = <300>; + + pt7c4563: rtc@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + #clock-cells = <0>; + clock-output-names = "rtc_xin32k"; + wakeup-source; + interrupt-parent = <&gpio0>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&rtc_int>; + pinctrl-names = "default"; + }; }; &i2s2 { @@ -583,6 +598,12 @@ }; }; + rtc { + rtc_int: rtc-int { + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + usb2 { vcc5v0_host_en: vcc5v0-hots-en { rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; diff --git a/patch/kernel/archive/rockchip64-6.14/dt/rk3399-am40.dts b/patch/kernel/archive/rockchip64-6.14/dt/rk3399-am40.dts index 9c402bc13..a9f293851 100644 --- a/patch/kernel/archive/rockchip64-6.14/dt/rk3399-am40.dts +++ b/patch/kernel/archive/rockchip64-6.14/dt/rk3399-am40.dts @@ -18,6 +18,7 @@ ethernet0 = &gmac; mmc0 = &sdhci; mmc1 = &sdmmc; + rtc0 = &pt7c4563; /* * The rk808 circuit design on this board does not have the ability to maintain real-time time after a power outage. * Registering rk808 as rtc99 (most kernel configurations read time from rtc0) can prevent the kernel from reading the time (2013) from rk808 during startup. @@ -499,6 +500,20 @@ &i2c4 { status = "okay"; + i2c-scl-rising-time-ns = <300>; + i2c-scl-falling-time-ns = <300>; + + pt7c4563: rtc@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + #clock-cells = <0>; + clock-output-names = "rtc_xin32k"; + wakeup-source; + interrupt-parent = <&gpio0>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&rtc_int>; + pinctrl-names = "default"; + }; }; &i2s2 { @@ -583,6 +598,12 @@ }; }; + rtc { + rtc_int: rtc-int { + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + usb2 { vcc5v0_host_en: vcc5v0-hots-en { rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; diff --git a/patch/u-boot/v2024.10/board_smart-am40/add-board-smart-am40.patch b/patch/u-boot/v2025.04/board_smart-am40/add-board-smart-am40.patch similarity index 96% rename from patch/u-boot/v2024.10/board_smart-am40/add-board-smart-am40.patch rename to patch/u-boot/v2025.04/board_smart-am40/add-board-smart-am40.patch index 1cc91ab39..16cad3019 100644 --- a/patch/u-boot/v2024.10/board_smart-am40/add-board-smart-am40.patch +++ b/patch/u-boot/v2025.04/board_smart-am40/add-board-smart-am40.patch @@ -17,7 +17,7 @@ index 00000000..1f5fda1d +}; diff --git a/configs/am40-rk3399_defconfig b/configs/am40-rk3399_defconfig new file mode 100644 -index 00000000..d3ccdf6f +index 00000000..8ea5266f --- /dev/null +++ b/configs/am40-rk3399_defconfig @@ -0,0 +1,71 @@ @@ -33,9 +33,9 @@ index 00000000..d3ccdf6f +CONFIG_DM_RESET=y +CONFIG_ROCKCHIP_RK3399=y +CONFIG_TARGET_EVB_RK3399=y ++CONFIG_SYS_LOAD_ADDR=0x800800 +CONFIG_DEBUG_UART_BASE=0xFF1A0000 +CONFIG_DEBUG_UART_CLOCK=24000000 -+CONFIG_SYS_LOAD_ADDR=0x800800 +CONFIG_PCI=y +CONFIG_DEBUG_UART=y +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-am40.dtb" @@ -94,10 +94,10 @@ index 00000000..d3ccdf6f +CONFIG_ERRNO_STR=y diff --git a/dts/upstream/src/arm64/rockchip/rk3399-am40.dts b/dts/upstream/src/arm64/rockchip/rk3399-am40.dts new file mode 100644 -index 00000000..184b8d08 +index 00000000..a9f29385 --- /dev/null +++ b/dts/upstream/src/arm64/rockchip/rk3399-am40.dts -@@ -0,0 +1,756 @@ +@@ -0,0 +1,776 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd. @@ -109,7 +109,6 @@ index 00000000..184b8d08 +#include +#include +#include "rk3399.dtsi" -+#include "rk3399-opp.dtsi" + +/ { + model = "SMART AM40"; @@ -119,6 +118,7 @@ index 00000000..184b8d08 + ethernet0 = &gmac; + mmc0 = &sdhci; + mmc1 = &sdmmc; ++ rtc0 = &pt7c4563; + /* + * The rk808 circuit design on this board does not have the ability to maintain real-time time after a power outage. + * Registering rk808 as rtc99 (most kernel configurations read time from rtc0) can prevent the kernel from reading the time (2013) from rk808 during startup. @@ -392,7 +392,7 @@ index 00000000..184b8d08 + clock-output-names = "xin32k", "rk808-clkout2"; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int_l>; -+ rockchip,system-power-controller; ++ system-power-controller; + wakeup-source; + + vcc1-supply = <&vcc_sys>; @@ -600,6 +600,20 @@ index 00000000..184b8d08 + +&i2c4 { + status = "okay"; ++ i2c-scl-rising-time-ns = <300>; ++ i2c-scl-falling-time-ns = <300>; ++ ++ pt7c4563: rtc@51 { ++ compatible = "haoyu,hym8563"; ++ reg = <0x51>; ++ #clock-cells = <0>; ++ clock-output-names = "rtc_xin32k"; ++ wakeup-source; ++ interrupt-parent = <&gpio0>; ++ interrupts = <6 IRQ_TYPE_LEVEL_LOW>; ++ pinctrl-0 = <&rtc_int>; ++ pinctrl-names = "default"; ++ }; +}; + +&i2s2 { @@ -684,6 +698,12 @@ index 00000000..184b8d08 + }; + }; + ++ rtc { ++ rtc_int: rtc-int { ++ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; ++ }; ++ }; ++ + usb2 { + vcc5v0_host_en: vcc5v0-hots-en { + rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;