diff mbox series

[4/5] arm64: dts: rockchip: Add NanoPC-T4 IR receiver

Message ID a21283067b8d5132df430f3eca6a01ed9eebf1b2.1546981251.git.robin.murphy@arm.com (mailing list archive)
State New, archived
Headers show
Series NanoPC-T4 (and a bit of NanoPi M4) support | expand

Commit Message

Robin Murphy Jan. 8, 2019, 9:57 p.m. UTC
In common with most Rockchip reference designs, NanoPC-T4 has a passive
IR receiver connected to PWM3. In lieu of a specialised driver for
PWM-based IR pulse measurement, running the pin as a GPIO with the basic
driver works perfectly well.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
 .../arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Heiko Stübner Jan. 10, 2019, 1:49 p.m. UTC | #1
Am Dienstag, 8. Januar 2019, 22:57:26 CET schrieb Robin Murphy:
> In common with most Rockchip reference designs, NanoPC-T4 has a passive
> IR receiver connected to PWM3. In lieu of a specialised driver for
> PWM-based IR pulse measurement, running the pin as a GPIO with the basic
> driver works perfectly well.
> 
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>

easy change and of course looks good.
As it doesn't apply due to coming after other changes, I'll have
to wait for v2 though.


Heiko
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
index 623a03f2548a..84433cf02be9 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
@@ -45,6 +45,22 @@ 
 			press-threshold-microvolt = <18000>;
 		};
 	};
+
+	ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_rx>;
+	};
+};
+
+&pinctrl {
+	ir {
+		ir_rx: ir-rx {
+			/* external pullup to VCC3V3_SYS, despite being 1.8V :/ */
+			rockchip,pins = <0 RK_PA6 RK_FUNC_1 &pcfg_pull_none>;
+		};
+	};
 };
 
 &sdhci {