arm64: dts: overlay: VIM3/VIM3L: add spi1
authorNick Xie <nick@khadas.com>
Wed, 12 Aug 2020 02:18:09 +0000 (10:18 +0800)
committerNick Xie <nick@khadas.com>
Thu, 13 Aug 2020 03:37:06 +0000 (11:37 +0800)
Signed-off-by: Nick Xie <nick@khadas.com>
arch/arm64/boot/dts/amlogic/overlays/kvim3/Makefile
arch/arm64/boot/dts/amlogic/overlays/kvim3/spi1.dts [new file with mode: 0644]
arch/arm64/boot/dts/amlogic/overlays/kvim3l/Makefile
arch/arm64/boot/dts/amlogic/overlays/kvim3l/spi1.dts [new file with mode: 0644]

index c45ee646be33961f16a013bbdc9930d8aa9cb25d..1763d09b8299cec8138d76156020a369e6868e77 100644 (file)
@@ -1,6 +1,7 @@
 dtbo-y += uart3.dtbo \
                  pwm_f.dtbo \
-                 i2c3.dtbo
+                 i2c3.dtbo \
+                 spi1.dtbo
 
 targets += $(dtbo-y)
 always  := $(dtbo-y)
diff --git a/arch/arm64/boot/dts/amlogic/overlays/kvim3/spi1.dts b/arch/arm64/boot/dts/amlogic/overlays/kvim3/spi1.dts
new file mode 100644 (file)
index 0000000..14b19c0
--- /dev/null
@@ -0,0 +1,31 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+       fragment@0 {
+               target = <&spicc1>;
+
+               __overlay__ {
+                       status = "okay";
+               };
+       };
+
+       fragment@1 {
+               target = <&pwm_ef>;
+
+               __overlay__ {
+                       // NOTE: This syntax DOES NOT work on device tree overlays
+                       // If you want to use SPI1, you have to remove pwm_f overlay
+                       /delete-property/ pinctrl-names;
+                       /delete-property/ pinctrl-0;
+               };
+       };
+
+       fragment@2 {
+               target = <&uart_C>;
+
+               __overlay__ {
+                       status = "disabled";
+               };
+       };
+};
index c45ee646be33961f16a013bbdc9930d8aa9cb25d..1763d09b8299cec8138d76156020a369e6868e77 100644 (file)
@@ -1,6 +1,7 @@
 dtbo-y += uart3.dtbo \
                  pwm_f.dtbo \
-                 i2c3.dtbo
+                 i2c3.dtbo \
+                 spi1.dtbo
 
 targets += $(dtbo-y)
 always  := $(dtbo-y)
diff --git a/arch/arm64/boot/dts/amlogic/overlays/kvim3l/spi1.dts b/arch/arm64/boot/dts/amlogic/overlays/kvim3l/spi1.dts
new file mode 100644 (file)
index 0000000..14b19c0
--- /dev/null
@@ -0,0 +1,31 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+       fragment@0 {
+               target = <&spicc1>;
+
+               __overlay__ {
+                       status = "okay";
+               };
+       };
+
+       fragment@1 {
+               target = <&pwm_ef>;
+
+               __overlay__ {
+                       // NOTE: This syntax DOES NOT work on device tree overlays
+                       // If you want to use SPI1, you have to remove pwm_f overlay
+                       /delete-property/ pinctrl-names;
+                       /delete-property/ pinctrl-0;
+               };
+       };
+
+       fragment@2 {
+               target = <&uart_C>;
+
+               __overlay__ {
+                       status = "disabled";
+               };
+       };
+};