ARM: dts: sun8i: Add ir receiver nodes for H3
Subsystems (2)
cover ARM: dts: sun8i: Add ir receiver nodes for H3
Hi All,
Here is a set of patches for H3 ir receiver support, tested on an orangepi pc. This series applies on top of the R_PIO series for H3.
Regards,
Hans
PATCH 1/2 ARM: dts: sun8i: Add ir receiver nodes to H3 dtsi
The H3 ir receiver is completely compatible with the one found in the A31.
--- arch/arm/boot/dts/sun8i-h3.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm/boot/dts/sun8i-h3.dtsi +25 -0
@@ -307,6 +307,14 @@ clock-indices = <0>, <1>; clock-output-names = "apb0_pio", "apb0_ir"; }; + + ir_clk: ir_clk at 01f01454 { + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01f01454 0x4>; + #clock-cells = <0>; + clocks = <&osc32k>, <&osc24M>; + clock-output-names = "ir"; + }; }; soc {
@@ -632,6 +640,16 @@ #reset-cells = <1>; }; + ir: ir at 01f02000 { + compatible = "allwinner,sun5i-a13-ir"; + clocks = <&apb0_gates 1>, <&ir_clk>; + clock-names = "apb", "ir"; + resets = <&apb0_reset 1>; + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; + reg = <0x01f02000 0x40>; + status = "disabled"; + }; + r_pio: pinctrl at 01f02c00 { compatible = "allwinner,sun8i-h3-r-pinctrl"; reg = <0x01f02c00 0x400>;
@@ -642,6 +660,13 @@ #gpio-cells = <3>; interrupt-controller; #interrupt-cells = <3>; + + ir_pins_a: ir at 0 { + allwinner,pins = "PL11"; + allwinner,function = "s_cir_rx"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; }; }; };
Signature · 1 line
2.7.1
Maxime Ripard
AppliedPATCH 1/2 ARM: dts: sun8i: Add ir receiver nodes to H3 dtsi
Quoted 3 lines · Hans de Goede
The H3 ir receiver is completely compatible with the one found in the A31.
Signed-off-by Hans de Goede <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160225/230266bd/attachment.sig>
PATCH 2/2 ARM: dts: sun8i: Enable ir receiver on orangepi pc
In reply to Hans de GoedeEnable the ir receiver found on the orangepi pc board.
--- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +6 -0
@@ -72,6 +72,12 @@ status = "okay"; }; +&ir { + pinctrl-names = "default"; + pinctrl-0 = <&ir_pins_a>; + status = "okay"; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
Signature · 1 line
2.7.1
PATCH 2/2 ARM: dts: sun8i: Enable ir receiver on orangepi pc
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
Quoted 8 lines · Hans de Goede
Enable the ir receiver found on the orangepi pc board.
Signed-off-by Hans de Goede <[email protected]>---
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts| 6 ++++++1 file changed, 6 insertions(+)arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +0
-0
I don't think this file is avaiable in mainline. Wouldn't it be better to use patch against existing orangepi-plus dts file?
Otherwise I tested this patch and it works fine on my Orangepi PC (some data is splitted out when reading /dev/input/event0).
Best regards,
Krzysztof Adamski
PATCH 2/2 ARM: dts: sun8i: Enable ir receiver on orangepi pc
Hi,
Quoted 8 lines · Krzysztof Adamski
Quoted 7 lines · Hans de Goede
Enable the ir receiver found on the orangepi pc board.
Signed-off-by Hans de Goede <[email protected]>---
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts| 6 ++++++1 file changed, 6 insertions(+)
Quoted 5 lines
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
Quoted 1 line
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +0
-0I don't think this file is avaiable in mainline. Wouldn't it be better to use patch against existing orangepi-plus dts file?
Otherwise I tested this patch and it works fine on my Orangepi PC (some data is splitted out when reading
/dev/input/event0).
Ah yes, that is my bad, I've been waiting with upstreaming an orangepi-pc dts until all the usb bits are upstream as my dts has usb host support enabled, I should probably split out the usb-host support and upstream the rest already.
Regards,
Hans