mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-29 02:01:21 +00:00
add overlays framework for rockchip
This commit is contained in:
parent
9324bde9b9
commit
677cf44f46
1 changed files with 97 additions and 0 deletions
97
patch/kernel/rockchip64-dev/general-rockchip-overlays.patch
Normal file
97
patch/kernel/rockchip64-dev/general-rockchip-overlays.patch
Normal file
|
@ -0,0 +1,97 @@
|
|||
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
index 6a33eff..60fc91a 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -17,3 +17,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
|
||||
+
|
||||
+subdir-y := $(dts-dirs) overlay
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/overlay/Makefile b/arch/arm64/boot/dts/rockchip/overlay/Makefile
|
||||
index e69de29..576e190 100644
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/overlay/Makefile
|
||||
@@ -0,0 +1,16 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0
|
||||
+dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
+ rockchip-i2c8.dtbo
|
||||
+
|
||||
+scr-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
+ rockchip-fixup.scr
|
||||
+
|
||||
+dtbotxt-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
+ README.rockchip-overlays
|
||||
+
|
||||
+targets += $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||
+
|
||||
+always := $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||
+clean-files := *.dtbo *.scr
|
||||
+
|
||||
+
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays b/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
|
||||
index e69de29..9512445 100644
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
|
||||
@@ -0,0 +1,20 @@
|
||||
+This document describes overlays provided in the kernel packages
|
||||
+For generic Armbian overlays documentation please see
|
||||
+https://docs.armbian.com/User-Guide_Allwinner_overlays/
|
||||
+
|
||||
+### Platform:
|
||||
+
|
||||
+rockchip (Rockchip)
|
||||
+
|
||||
+### Provided overlays:
|
||||
+
|
||||
+- i2c8
|
||||
+
|
||||
+### Overlay details:
|
||||
+
|
||||
+### i2c8
|
||||
+
|
||||
+Activates TWI/I2C bus 8
|
||||
+
|
||||
+I2C8 pins (SCL, SDA): GPIO1-C4, GPIO1-C5
|
||||
+
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/overlay/rockchip-fixup.scr-cmd b/arch/arm64/boot/dts/rockchip/overlay/rockchip-fixup.scr-cmd
|
||||
new file mode 100644
|
||||
index 0000000..d4c39e2
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/overlay/rockchip-fixup.scr-cmd
|
||||
@@ -0,0 +1,4 @@
|
||||
+# overlays fixup script
|
||||
+# implements (or rather substitutes) overlay arguments functionality
|
||||
+# using u-boot scripting, environment variables and "fdt" command
|
||||
+
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/overlay/rockchip-i2c8.dts b/arch/arm64/boot/dts/rockchip/overlay/rockchip-i2c8.dts
|
||||
new file mode 100644
|
||||
index 0000000..54bc844
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/overlay/rockchip-i2c8.dts
|
||||
@@ -0,0 +1,11 @@
|
||||
+/dts-v1/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3399";
|
||||
+ fragment@0 {
|
||||
+ target-path = "/i2c@ff3e0000";
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
|
||||
index 26e6af4..65b9435 100644
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -65,6 +65,9 @@ real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)
|
||||
extra-y += $(dtb-y)
|
||||
extra-$(CONFIG_OF_ALL_DTBS) += $(dtb-)
|
||||
|
||||
+# Overlay targets
|
||||
+extra-y += $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||
+
|
||||
# Add subdir path
|
||||
|
||||
extra-y := $(addprefix $(obj)/,$(extra-y))
|
Loading…
Add table
Reference in a new issue