Skip to contentSkip to conversation

arm64: dts: allwinner: a523: enable IR on the Avaota A1

PATCH New Andre Przywara 2 participants 2 messages Jul 22

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: allwinner: a523: enable IR on the Avaota A1

The Avaota A1 board has an IR receiver chip on the PCB (next to the Ethernet jacks), wired to the PI8 pin on the SoC.

Add the pin description to the PIO DT node, and enable the CIR receiver in the main power domain.

Tested on the board with evtest and some random TV remote control.

---
Hi,

this goes on top of Justin's A523/H728/T527 IR receiver series.

Cheers,
Andre

 arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi          | 7 +++++++
 arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 6 ++++++
 2 files changed, 13 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +7 -0
index 19771aac68e53..770433b4f905b 100644
@@ -155,6 +155,13 @@ i2s2_pi_pins: i2s2-pi-pins {
 				bias-disable;
 			};
 
+			/omit-if-no-ref/
+			ir_rx_pin: ir-rx-pin {
+				pins = "PI8";
+				allwinner,pinmux = <3>;
+				function = "cir_rx";
+			};
+
 			/omit-if-no-ref/
 			ledc_ph_pin: ledc-ph-pin {
 				pins = "PH19";
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts +6 -0
index 474354fbfcec1..994f1e4f0ce7d 100644
@@ -100,6 +100,12 @@ &gpu {
 	status = "okay";
 };
 
+&ir {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ir_rx_pin>;
+	status = "okay";
+};
+
 &ledc {
 	pinctrl-names = "default";
 	pinctrl-0 = <&ledc_ph_pin>;

base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
prerequisite-patch-id: 7deae1861f99fd36ada1af9c830c337374a74980
prerequisite-patch-id: 0175281b3456fb2bfca8cc0e99238583682af0f1
prerequisite-patch-id: 93ebe68eb0b466e360c6a02e5d936be910c85752

Signature · 1 line
2.46.4
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Device tree compilation fails due to an unresolved reference to the `&ir` node label. --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Device tree compilation fails due to an unresolved reference to the &ir node label. --

--- Patch [1]: [PATCH] arm64: dts: allwinner: a523: enable IR on the Avaota A1 --- commit 357c50b8a0f2e8f0f484a1872fb40899f5baa624
Author: Andre Przywara <[email protected]>

arm64: dts: allwinner: a523: enable IR on the Avaota A1

This commit adds the IR receiver pin description to the PIO DT node and enables the CIR receiver in the main power domain for the Avaota A1 board.

Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts +0 -0

[ ... ]

arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts &gpu { · line 108

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts +6 -0
@@ -100,6 +100,12 @@ &gpu {
 	status = "okay";
 };
 
+&ir {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ir_rx_pin>;
+	status = "okay";
+};
+

[Severity: Low]
Does this node extension cause a build failure when compiling the device tree?

It looks like the &ir label is not defined in the base sun55i-a523.dtsi file or any of its dependencies, which would cause dtc to fail with an unresolved reference error.

The commit message notes that this patch goes on top of another IR receiver series. Should that base dependency be merged first to ensure the build remains unbroken?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1