Skip to contentSkip to conversation

ARM: dts: rk3188-radxarock: add GPIO IR receiver node

PATCH In review Beniamino Galvani 2 participants 4 messages Jul 13, 2014 – Jul 22, 2014 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: rk3188-radxarock: add GPIO IR receiver node

This adds a device tree node for the infrared receiver connected to a GPIO pin on the Radxa Rock.

---
 arch/arm/boot/dts/rk3188-radxarock.dts |   13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/boot/dts/rk3188-radxarock.dts +13 -0
index 19d45b4..1d87bcb 100644
@@ -23,6 +23,13 @@
 		reg = <0x60000000 0x80000000>;
 	};
 
+	ir_recv: ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio0 10 1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_recv_pin>;
+	};
+
 	soc {
 		uart0: serial at 10124000 {
 			status = "okay";
@@ -117,6 +124,12 @@
 					rockchip,pins = <RK_GPIO3 27 RK_FUNC_GPIO &pcfg_output_low>;
 				};
 			};
+
+			ir-receiver {
+				ir_recv_pin: ir-recv-pin {
+					rockchip,pins = <RK_GPIO0 10 RK_FUNC_GPIO &pcfg_pull_none>;
+				};
+			};
 		};
 
 	};
Signature · 1 line
1.7.10.4
#1 lore raw

Am Sonntag, 13. Juli 2014, 14:10:01 schrieb Beniamino Galvani:

Quoted 13 lines

This adds a device tree node for the infrared receiver connected to a GPIO pin on the Radxa Rock.

---
 arch/arm/boot/dts/rk3188-radxarock.dts |   13 +++++++++++++
 1 file changed, 13 insertions(+)
(quoted diff) +0 -0

b/arch/arm/boot/dts/rk3188-radxarock.dts index 19d45b4..1d87bcb 100644

arch/arm/boot/dts/rk3188-radxarock.dts line 32

Quoted 10 lines
arch/arm/boot/dts/rk3188-radxarock.dts +7 -0
@@ -23,6 +23,13 @@
 		reg = <0x60000000 0x80000000>;
 	};
 
+	ir_recv: ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio0 10 1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_recv_pin>;
+	};
+

hmm, on second glance, I'm actually not sure if this shouldn't belong in the soc subnode, like the gpio-keys and leds.

Heiko

arch/arm/boot/dts/rk3188-radxarock.dts line 124

Quoted 5 lines
arch/arm/boot/dts/rk3188-radxarock.dts +0 -0
 	soc {
 		uart0: serial@10124000 {
 			status = "okay";
@@ -117,6 +124,12 @@
 					rockchip,pins = <RK_GPIO3 27 RK_FUNC_GPIO 

&pcfg_output_low>;

arch/arm/boot/dts/rk3188-radxarock.dts

Quoted 6 lines
arch/arm/boot/dts/rk3188-radxarock.dts +4 -0
 				};
 			};
+
+			ir-receiver {
+				ir_recv_pin: ir-recv-pin {
+					rockchip,pins = <RK_GPIO0 10 RK_FUNC_GPIO 

&pcfg_pull_none>;

Quoted 5 lines
arch/arm/boot/dts/rk3188-radxarock.dts +2 -0
+				};
+			};
 		};
 
 	};
#2 lore raw
Quoted 17 lines · Heiko St?bner

Am Sonntag, 13. Juli 2014, 14:10:01 schrieb Beniamino Galvani:

Quoted 16 lines

This adds a device tree node for the infrared receiver connected to a GPIO pin on the Radxa Rock.

---
 arch/arm/boot/dts/rk3188-radxarock.dts |   13 +++++++++++++
 1 file changed, 13 insertions(+)
(quoted diff) +0 -0

b/arch/arm/boot/dts/rk3188-radxarock.dts index 19d45b4..1d87bcb 100644

arch/arm/boot/dts/rk3188-radxarock.dts +0 -0
@@ -23,6 +23,13 @@
 		reg = <0x60000000 0x80000000>;
 	};
 
Quoted 10 lines

arch/arm/boot/dts/rk3188-radxarock.dts line 32

Quoted 7 lines
arch/arm/boot/dts/rk3188-radxarock.dts +7 -0
+	ir_recv: ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio0 10 1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_recv_pin>;
+	};
+

hmm, on second glance, I'm actually not sure if this shouldn't belong in the soc subnode, like the gpio-keys and leds.

(adding devicetree mailing list)

I placed the IR receiver under the root node after looking at what other boards do, for example:

imx6dl-hummingboard.dts
imx6qdl-cubox-i.dtsi
dove-cubox.dts

On the other hand, if gpio-keys and leds are under the soc node probably it makes sense to follow the same rule also for the IR receiver.

Beniamino

#3 lore raw

Am Montag, 14. Juli 2014, 21:04:26 schrieb Beniamino Galvani:

Quoted 37 lines · Heiko Stübner
Quoted 20 lines

Am Sonntag, 13. Juli 2014, 14:10:01 schrieb Beniamino Galvani:

Quoted 19 lines

This adds a device tree node for the infrared receiver connected to a GPIO pin on the Radxa Rock.

---

 arch/arm/boot/dts/rk3188-radxarock.dts |   13 +++++++++++++
 1 file changed, 13 insertions(+)
(quoted diff) +0 -0

b/arch/arm/boot/dts/rk3188-radxarock.dts index 19d45b4..1d87bcb 100644

arch/arm/boot/dts/rk3188-radxarock.dts +0 -0
@@ -23,6 +23,13 @@
 
 		reg = <0x60000000 0x80000000>;
 
 	};
 
Quoted 10 lines

arch/arm/boot/dts/rk3188-radxarock.dts line 32

Quoted 7 lines
arch/arm/boot/dts/rk3188-radxarock.dts +7 -0
+	ir_recv: ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio0 10 1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_recv_pin>;
+	};
+

hmm, on second glance, I'm actually not sure if this shouldn't belong in the soc subnode, like the gpio-keys and leds.

(adding devicetree mailing list)

I placed the IR receiver under the root node after looking at what other boards do, for example:

Quoted 7 lines

imx6dl-hummingboard.dts
imx6qdl-cubox-i.dtsi
dove-cubox.dts

On the other hand, if gpio-keys and leds are under the soc node probably it makes sense to follow the same rule also for the IR receiver.

your way was the right one actually ... using artificial subnodes is not encouraged at all - see comments I received , so the soc node itself also may go away.

I'll add the patch to my queue.

Heiko