220 lines
5.6 KiB
Diff
220 lines
5.6 KiB
Diff
|
From c1268e4012c505dd8e2b0a3b4d5560de287364f1 Mon Sep 17 00:00:00 2001
|
||
|
From: Dongjin Kim <tobetter@gmail.com>
|
||
|
Date: Thu, 25 Feb 2021 16:27:27 +0900
|
||
|
Subject: [PATCH 086/109] ODROID-N2/C4: arm64/dts: add 'w1-gpio' device tree
|
||
|
overlay nodes
|
||
|
|
||
|
This patch is to add the device tree node to connect onewire device to
|
||
|
GPIOX_2 (P15) or GPIOX_7 (P22).
|
||
|
|
||
|
Change-Id: I6d547a285388b16885dea7a4b7730a6aa09874d3
|
||
|
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
||
|
---
|
||
|
.../dts/amlogic/overlays/odroidc4/Makefile | 6 ++--
|
||
|
.../amlogic/overlays/odroidc4/w1-gpio_p15.dts | 34 +++++++++++++++++++
|
||
|
.../amlogic/overlays/odroidc4/w1-gpio_p22.dts | 34 +++++++++++++++++++
|
||
|
.../dts/amlogic/overlays/odroidn2/Makefile | 4 ++-
|
||
|
.../amlogic/overlays/odroidn2/w1-gpio_p15.dts | 34 +++++++++++++++++++
|
||
|
.../amlogic/overlays/odroidn2/w1-gpio_p22.dts | 34 +++++++++++++++++++
|
||
|
6 files changed, 143 insertions(+), 3 deletions(-)
|
||
|
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p15.dts
|
||
|
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p22.dts
|
||
|
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p15.dts
|
||
|
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p22.dts
|
||
|
|
||
|
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
|
||
|
index e466486632de..0e01ffc53908 100644
|
||
|
--- a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
|
||
|
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
|
||
|
@@ -1,8 +1,10 @@
|
||
|
dtbo-y += \
|
||
|
+ hktft32.dtbo \
|
||
|
+ hktft35.dtbo \
|
||
|
spi0.dtbo \
|
||
|
sx865x-i2c1.dtbo \
|
||
|
- hktft32.dtbo \
|
||
|
- hktft35.dtbo
|
||
|
+ w1-gpio_p15.dtbo \
|
||
|
+ w1-gpio_p22.dtbo
|
||
|
|
||
|
targets += $(dtbo-y)
|
||
|
always-y := $(dtbo-y)
|
||
|
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p15.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p15.dts
|
||
|
new file mode 100644
|
||
|
index 000000000000..6134f057cdfc
|
||
|
--- /dev/null
|
||
|
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p15.dts
|
||
|
@@ -0,0 +1,34 @@
|
||
|
+/dts-v1/;
|
||
|
+/plugin/;
|
||
|
+
|
||
|
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||
|
+#include <dt-bindings/gpio/gpio.h>
|
||
|
+
|
||
|
+/ {
|
||
|
+ fragment@0 {
|
||
|
+ target = <&pwm_f_x_pins>;
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ mux {
|
||
|
+ groups = "GPIOX_7";
|
||
|
+ function = "gpio_periphs";
|
||
|
+ bias-disable;
|
||
|
+ drive-strength-microamp = <4000>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+
|
||
|
+ fragment@1 {
|
||
|
+ target-path = "/";
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ onewire: onewire {
|
||
|
+ compatible = "w1-gpio";
|
||
|
+ status = "okay";
|
||
|
+ pinctrl-names = "default";
|
||
|
+ pinctrl-0 = <&pdm_din1_x_pins>;
|
||
|
+ gpios = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+};
|
||
|
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p22.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p22.dts
|
||
|
new file mode 100644
|
||
|
index 000000000000..14e700b10a48
|
||
|
--- /dev/null
|
||
|
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p22.dts
|
||
|
@@ -0,0 +1,34 @@
|
||
|
+/dts-v1/;
|
||
|
+/plugin/;
|
||
|
+
|
||
|
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||
|
+#include <dt-bindings/gpio/gpio.h>
|
||
|
+
|
||
|
+/ {
|
||
|
+ fragment@0 {
|
||
|
+ target = <&pdm_din1_x_pins>;
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ mux {
|
||
|
+ groups = "GPIOX_2";
|
||
|
+ function = "gpio_periphs";
|
||
|
+ bias-disable;
|
||
|
+ drive-strength-microamp = <4000>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+
|
||
|
+ fragment@1 {
|
||
|
+ target-path = "/";
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ onewire: onewire {
|
||
|
+ compatible = "w1-gpio";
|
||
|
+ status = "okay";
|
||
|
+ pinctrl-names = "default";
|
||
|
+ pinctrl-0 = <&pdm_din1_x_pins>;
|
||
|
+ gpios = <&gpio GPIOX_2 GPIO_ACTIVE_HIGH>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+};
|
||
|
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile
|
||
|
index 1bbd8e741230..35dc85811b57 100644
|
||
|
--- a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile
|
||
|
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile
|
||
|
@@ -1,7 +1,9 @@
|
||
|
dtbo-y += \
|
||
|
hktft35.dtbo \
|
||
|
spi0.dtbo \
|
||
|
- sx865x-i2c1.dtbo
|
||
|
+ sx865x-i2c1.dtbo \
|
||
|
+ w1-gpio_p15.dtbo \
|
||
|
+ w1-gpio_p22.dtbo
|
||
|
|
||
|
targets += $(dtbo-y)
|
||
|
always-y := $(dtbo-y)
|
||
|
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p15.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p15.dts
|
||
|
new file mode 100644
|
||
|
index 000000000000..6134f057cdfc
|
||
|
--- /dev/null
|
||
|
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p15.dts
|
||
|
@@ -0,0 +1,34 @@
|
||
|
+/dts-v1/;
|
||
|
+/plugin/;
|
||
|
+
|
||
|
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||
|
+#include <dt-bindings/gpio/gpio.h>
|
||
|
+
|
||
|
+/ {
|
||
|
+ fragment@0 {
|
||
|
+ target = <&pwm_f_x_pins>;
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ mux {
|
||
|
+ groups = "GPIOX_7";
|
||
|
+ function = "gpio_periphs";
|
||
|
+ bias-disable;
|
||
|
+ drive-strength-microamp = <4000>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+
|
||
|
+ fragment@1 {
|
||
|
+ target-path = "/";
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ onewire: onewire {
|
||
|
+ compatible = "w1-gpio";
|
||
|
+ status = "okay";
|
||
|
+ pinctrl-names = "default";
|
||
|
+ pinctrl-0 = <&pdm_din1_x_pins>;
|
||
|
+ gpios = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+};
|
||
|
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p22.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p22.dts
|
||
|
new file mode 100644
|
||
|
index 000000000000..14e700b10a48
|
||
|
--- /dev/null
|
||
|
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p22.dts
|
||
|
@@ -0,0 +1,34 @@
|
||
|
+/dts-v1/;
|
||
|
+/plugin/;
|
||
|
+
|
||
|
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||
|
+#include <dt-bindings/gpio/gpio.h>
|
||
|
+
|
||
|
+/ {
|
||
|
+ fragment@0 {
|
||
|
+ target = <&pdm_din1_x_pins>;
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ mux {
|
||
|
+ groups = "GPIOX_2";
|
||
|
+ function = "gpio_periphs";
|
||
|
+ bias-disable;
|
||
|
+ drive-strength-microamp = <4000>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+
|
||
|
+ fragment@1 {
|
||
|
+ target-path = "/";
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ onewire: onewire {
|
||
|
+ compatible = "w1-gpio";
|
||
|
+ status = "okay";
|
||
|
+ pinctrl-names = "default";
|
||
|
+ pinctrl-0 = <&pdm_din1_x_pins>;
|
||
|
+ gpios = <&gpio GPIOX_2 GPIO_ACTIVE_HIGH>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+};
|
||
|
--
|
||
|
2.25.1
|
||
|
|