mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-23 13:29:33 +00:00
124 lines
3.6 KiB
Diff
124 lines
3.6 KiB
Diff
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,17 @@
|
|
+# SPDX-License-Identifier: GPL-2.0
|
|
+dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
|
|
+ rockchip-i2c8.dtbo \
|
|
+ rockchip-w1-gpio.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/arch/arm64/boot/dts/rockchip/overlay/rockchip-w1-gpio.dts b/arch/arm64/boot/dts/rockchip/overlay/rockchip-w1-gpio.dts
|
|
new file mode 100644
|
|
index 0000000..bfbc16a
|
|
--- /dev/null
|
|
+++ b/arch/arm64/boot/dts/rockchip/overlay/rockchip-w1-gpio.dts
|
|
@@ -0,0 +1,20 @@
|
|
+// Definitions for w1-gpio module (without external pullup)
|
|
+/dts-v1/;
|
|
+/plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "rockchip,rk3399";
|
|
+
|
|
+ fragment@0 {
|
|
+ target-path = "/";
|
|
+ __overlay__ {
|
|
+
|
|
+ w1: onewire@0 {
|
|
+ compatible = "w1-gpio";
|
|
+ pinctrl-names = "default";
|
|
+ gpios = <&gpio1 4 0 0xae>; // GPIO1_A4
|
|
+ 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))
|