media: rc: sunxi-cir: support the A523/H728/T527 IR receiver
v2 cover media: rc: sunxi-cir: support the A523/H728/T527 IR receiver
Sorry for the delay,
This is v2 of the series that adds support for the CIR receiver found in the Allwinner A523/T527/H728 family (sun55i).
Unlike the previous version of the series, this version has no driver changes, and just uses a fallback compatible and enables the receiver.
Tested again on my X96Q Pro+ (H728) TV box with the Google TV remote that came in the box (using NEC keymap). Was able to press buttons and get readings from lirc / ir-keytable again.
The series is (re)based on tag v7.2-rc4 on mainline.
Justin Suess (3):
media: dt-bindings: allwinner,sun4i-a10-ir: add A523 compatible
arm64: dts: allwinner: a523: add IR receiver nodes
arm64: dts: allwinner: a523: enable IR receiver on the X96Q Pro+
.../media/allwinner,sun4i-a10-ir.yaml | 8 ++++-- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 28 +++++++++++++++++++ .../dts/allwinner/sun55i-h728-x96qpro+.dts | 6 ++++ 3 files changed, 39 insertions(+), 3 deletions(-)
base-commit: 1590cf0329716306e948a8fc29f1d3ee87d3989f
Signature · 1 line
2.54.0
PATCH v2 1/3 media: dt-bindings: allwinner,sun4i-a10-ir: add A523 compatible
The A523 (sun55i) contains a newer revision of the sunxi CIR receiver. The reset defaults match the fixed behaviour of the older IP, so the device works fine when driven as an A31 CIR receiver.
Add the A523 compatible, with allwinner,sun6i-a31-ir as the fallback.
While at it, merge the standalone compatible entries into a single enum.
--- .../devicetree/bindings/media/allwinner,sun4i-a10-ir.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-ir.yaml +5 -3
@@ -16,9 +16,10 @@ allOf: properties: compatible: oneOf: - - const: allwinner,sun4i-a10-ir - - const: allwinner,sun5i-a13-ir - - const: allwinner,sun6i-a31-ir + - enum: + - allwinner,sun4i-a10-ir + - allwinner,sun5i-a13-ir + - allwinner,sun6i-a31-ir - items: - enum: - allwinner,suniv-f1c100s-ir
@@ -27,6 +28,7 @@ properties: - allwinner,sun50i-a64-ir - allwinner,sun50i-h6-ir - allwinner,sun50i-h616-ir + - allwinner,sun55i-a523-ir - const: allwinner,sun6i-a31-ir reg:
Signature · 1 line
2.54.0
PATCH v2 2/3 arm64: dts: allwinner: a523: add IR receiver nodes
In reply to Justin SuessThe A523 has two CIR receivers, both compatible with the A31 CIR: one in the CPUX domain, clocked from the main CCU, and one in the RTC power domain, clocked from the R-CCU.
Add nodes for both instances, disabled by default. Since the RX signal of each instance can be routed to more than one pin, boards with an IR receiver are expected to add the pinctrl properties next to where they enable the node. Keep the PL11 pin description in the dtsi, as boards commonly use that pin for the RTC domain instance.
--- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +28 -0
@@ -327,6 +327,17 @@ ccu: clock-controller@2001000 { #reset-cells = <1>; }; + ir: ir@2005000 { + compatible = "allwinner,sun55i-a523-ir", + "allwinner,sun6i-a31-ir"; + reg = <0x02005000 0x400>; + interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ccu CLK_BUS_IR_RX>, <&ccu CLK_IR_RX>; + clock-names = "apb", "ir"; + resets = <&ccu RST_BUS_IR_RX>; + status = "disabled"; + }; + ledc: led-controller@2008000 { compatible = "allwinner,sun55i-a523-ledc", "allwinner,sun50i-a100-ledc";
@@ -927,6 +938,23 @@ r_i2c_pins: r-i2c-pins { allwinner,pinmux = <2>; function = "r_i2c0"; }; + + r_ir_rx_pin: r-ir-rx-pin { + pins = "PL11"; + allwinner,pinmux = <2>; + function = "s_cir"; + }; + }; + + r_ir: ir@7040000 { + compatible = "allwinner,sun55i-a523-ir", + "allwinner,sun6i-a31-ir"; + reg = <0x07040000 0x400>; + interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&r_ccu CLK_BUS_R_IR_RX>, <&r_ccu CLK_R_IR_RX>; + clock-names = "apb", "ir"; + resets = <&r_ccu RST_BUS_R_IR_RX>; + status = "disabled"; }; pck600: power-controller@7060000 {
Signature · 1 line
2.54.0
Re: [PATCH v2 2/3] arm64: dts: allwinner: a523: add IR receiver nodes
On Wed, 22 Jul 2026 16:17:16 -0400
Justin Suess <[email protected]> wrote:
Hi Justin,
thanks for the update!
Quoted 4 lines
The A523 has two CIR receivers, both compatible with the A31 CIR: one in the CPUX domain, clocked from the main CCU, and one in the RTC power domain, clocked from the R-CCU.
Quoted 8 lines
Add nodes for both instances, disabled by default. Since the RX signal of each instance can be routed to more than one pin, boards with an IR receiver are expected to add the pinctrl properties next to where they enable the node. Keep the PL11 pin description in the dtsi, as boards commonly use that pin for the RTC domain instance.
Cc Andre Przywara <[email protected]>Signed-off-by Justin Suess <[email protected]>
I compared the values against the manual, and can confirm that they match. Also tested both interfaces. Just one nit below, but regardless:
Quoted 27 lines
--- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+)arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +11
-0@@ -327,6 +327,17 @@ ccu: clock-controller@2001000 { #reset-cells = <1>; }; + ir: ir@2005000 { + compatible = "allwinner,sun55i-a523-ir", + "allwinner,sun6i-a31-ir"; + reg = <0x02005000 0x400>; + interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ccu CLK_BUS_IR_RX>, <&ccu CLK_IR_RX>; + clock-names = "apb", "ir"; + resets = <&ccu RST_BUS_IR_RX>; + status = "disabled"; + }; + ledc: led-controller@2008000 { compatible = "allwinner,sun55i-a523-ledc", "allwinner,sun50i-a100-ledc";
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi r_i2c_pins: r-i2c-pins { · line 945
Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +5
-0@@ -927,6 +938,23 @@ r_i2c_pins: r-i2c-pins { allwinner,pinmux = <2>; function = "r_i2c0"; }; + + r_ir_rx_pin: r-ir-rx-pin { + pins = "PL11"; + allwinner,pinmux = <2>; + function = "s_cir";
I think the function name should be "s_cir_rx", as there are IR TX pins as well. And we used "{s_,}[c]ir_rx" for previous SoCs already.
Cheers,
Andre
Quoted 15 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +12
-0+ }; + }; + + r_ir: ir@7040000 { + compatible = "allwinner,sun55i-a523-ir", + "allwinner,sun6i-a31-ir"; + reg = <0x07040000 0x400>; + interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&r_ccu CLK_BUS_R_IR_RX>, <&r_ccu CLK_R_IR_RX>; + clock-names = "apb", "ir"; + resets = <&r_ccu RST_BUS_R_IR_RX>; + status = "disabled"; }; pck600: power-controller@7060000 {
PATCH v2 3/3 arm64: dts: allwinner: a523: enable IR receiver on the X96Q Pro+
In reply to Justin SuessThe X96Q Pro+ TV box has an IR receiver window on the front panel, wired to the SoC CIR input on PL11.
Enable the CIR receiver in the RTC power domain and mux its RX signal to PL11.
Tested on an X96 Pro+ with ir-keytable and nec keybindings with the remote that it came with in the box.
--- arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts +6 -0
@@ -266,6 +266,12 @@ reg_dcdc3_323: dcdc3 { }; }; +&r_ir { + pinctrl-names = "default"; + pinctrl-0 = <&r_ir_rx_pin>; + status = "okay"; +}; + &r_pio { /* * Specifying the supply would create a circular dependency.
Signature · 1 line
2.54.0
Re: [PATCH v2 3/3] arm64: dts: allwinner: a523: enable IR receiver on the X96Q Pro+
On Wed, 22 Jul 2026 16:17:17 -0400
Justin Suess <[email protected]> wrote:
Hi,
Quoted 10 lines
The X96Q Pro+ TV box has an IR receiver window on the front panel, wired to the SoC CIR input on PL11.
Enable the CIR receiver in the RTC power domain and mux its RX signal to PL11.
Tested on an X96 Pro+ with ir-keytable and nec keybindings with the remote that it came with in the box.
Signed-off-by Justin Suess <[email protected]>
Confirmed with evtest and some random TV remote.
Cheers,
Andre
Quoted 21 lines
--- arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts +6
-0@@ -266,6 +266,12 @@ reg_dcdc3_323: dcdc3 { }; }; +&r_ir { + pinctrl-names = "default"; + pinctrl-0 = <&r_ir_rx_pin>; + status = "okay"; +}; + &r_pio { /* * Specifying the supply would create a circular dependency.
On Wed, 22 Jul 2026 16:17:14 -0400
Justin Suess <[email protected]> wrote:
Hi Justin,
Quoted 1 line
Sorry for the delay,
no worries, thanks for the update.
Quoted 9 lines
This is v2 of the series that adds support for the CIR receiver found in the Allwinner A523/T527/H728 family (sun55i).
Unlike the previous version of the series, this version has no driver changes, and just uses a fallback compatible and enables the receiver.
Tested again on my X96Q Pro+ (H728) TV box with the Google TV remote that came in the box (using NEC keymap). Was able to press buttons and get readings from lirc / ir-keytable again.
this all looks good to me. As mentioned on the individual patches, I tested this on two boards here. I sent a patch [1] to enable IR on the Avaota board, which goes on top of this series.
[1]
https://lore.kernel.org/linux-sunxi/[email protected]/T/#u
Quoted 1 line
The series is (re)based on tag v7.2-rc4 on mainline.
Please base your submissions on -rc1, that simplifies merging/rebasing for the maintainers, because then all new patches have the same base. Not a particular problem for this series, since everything still applies cleanly, but keep that in mind for future submissions.
Cheers,
Andre
Quoted 13 lines
Justin Suess (3):
media: dt-bindings: allwinner,sun4i-a10-ir: add A523 compatible
arm64: dts: allwinner: a523: add IR receiver nodes
arm64: dts: allwinner: a523: enable IR receiver on the X96Q Pro+.../media/allwinner,sun4i-a10-ir.yaml | 8 ++++-- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 28 +++++++++++++++++++ .../dts/allwinner/sun55i-h728-x96qpro+.dts | 6 ++++ 3 files changed, 39 insertions(+), 3 deletions(-)base-commit:
1590cf0329716306e948a8fc29f1d3ee87d3989f