Skip to contentSkip to conversation

arm64: meson-g12a: Add Infrared Decoder support

PATCH Applied Neil Armstrong 3 participants 10 messages Apr 12, 2019 – May 8, 2019

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

cover arm64: meson-g12a: Add Infrared Decoder support

Add Infrared Decoder support for the Amlogic G12A and enable it on the X96 Max and U200 Reference Design boards.

Neil Armstrong (3):
arm64: dts: meson-g12a: Add IR nodes
arm64: dts: meson-g12a-x96-max: enable IR decoder
arm64: dts: meson-g12a-u200: enable IR decoder

 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts    |  6 ++++++
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts |  6 ++++++
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi        | 14 ++++++++++++++
 3 files changed, 26 insertions(+)
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/3 arm64: dts: meson-g12a: Add IR nodes

Amlogic G12A SoCs uses the exact same IR decoder as previous families, add the IR node and the pintctrl setting.

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +14 -0
index 734c5ee60efa..9cb76d325bb7 100644
@@ -559,6 +559,13 @@
 						mux {
 							groups = "pwm_ao_d_e";
 							function = "pwm_ao_d";
+						};
+					};
+
+					remote_input_ao_pins: remote-input-ao {
+						mux {
+							groups = "remote_ao_input";
+							function = "remote_ao_input";
 							bias-disable;
 						};
 					};
@@ -623,6 +630,13 @@
 				status = "disabled";
 			};
 
+			ir: ir@8000 {
+				compatible = "amlogic,meson-gxbb-ir";
+				reg = <0x0 0x8000 0x0 0x20>;
+				interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+				status = "disabled";
+			};
+
 			saradc: adc@9000 {
 				compatible = "amlogic,meson-g12a-saradc",
 					     "amlogic,meson-saradc";
Signature · 1 line
2.21.0
reviewer Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] arm64: dts: meson-g12a: Add IR nodes

Hi Neil,

Quoted 3 lines · Neil Armstrong

Amlogic G12A SoCs uses the exact same IR decoder as previous families, add the IR node and the pintctrl setting.

as far as I can tell there are either two IR decoders or one updated IR decoder in G12A and G12B.
I'm using mesong12a.dtsi from buildroot_openlinux_kernel_4.9_fbdev_20180706 as reference:

  remote:rc@0xff808040 {
      compatible = "amlogic, aml_remote";
      reg = <0x0 0xff808040 0x00 0x44>, /*Multi-format IR controller*/
                <0x0 0xff808000 0x00 0x20>; /*Legacy IR controller*/
      ...

the registers which you are mapping are for the "Legacy IR controller", so our existing meson-ir driver will probably work (I haven't tested it myself yet).

can you please be explicit about this in the patch description?

Quoted 1 line

apart from the description you can add my:

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#3 lore raw

Re: [PATCH 1/3] arm64: dts: meson-g12a: Add IR nodes

Hi Martin,

Quoted 16 lines · Martin Blumenstingl

Hi Neil,

Quoted 3 lines · Neil Armstrong

Amlogic G12A SoCs uses the exact same IR decoder as previous families, add the IR node and the pintctrl setting.

as far as I can tell there are either two IR decoders or one updated IR decoder in G12A and G12B.
I'm using mesong12a.dtsi from buildroot_openlinux_kernel_4.9_fbdev_20180706 as reference:

  remote:rc@0xff808040 {
      compatible = "amlogic, aml_remote";
      reg = <0x0 0xff808040 0x00 0x44>, /*Multi-format IR controller*/
                <0x0 0xff808000 0x00 0x20>; /*Legacy IR controller*/
      ...
Quoted 3 lines

the registers which you are mapping are for the "Legacy IR controller", so our existing meson-ir driver will probably work (I haven't tested it myself yet).

We use only the "legacy IR decoder" since GXBB, we never had a driver for the "Multi-format IR controller".

Quoted 2 lines

can you please be explicit about this in the patch description?

Sure

Quoted 5 lines
Quoted 2 lines

apart from the description you can add my:

Thanks,
Neil

maintainer
#4 lore raw

Re: [PATCH 1/3] arm64: dts: meson-g12a: Add IR nodes

In reply to Neil Armstrong
Quoted 13 lines · Neil Armstrong

Amlogic G12A SoCs uses the exact same IR decoder as previous families, add the IR node and the pintctrl setting.

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +0 -0
index 734c5ee60efa..9cb76d325bb7 100644

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 563

Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +2 -0
@@ -559,6 +559,13 @@
 						mux {
 							groups = "pwm_ao_d_e";
 							function = "pwm_ao_d";
+						};
+					};

nit: you had applied this based on top of the PWM series, but didn't mention that in the cover letter.

Kevin

Quoted 23 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +11 -0
+					remote_input_ao_pins: remote-input-ao {
+						mux {
+							groups = "remote_ao_input";
+							function = "remote_ao_input";
 							bias-disable;
 						};
 					};
@@ -623,6 +630,13 @@
 				status = "disabled";
 			};
 
+			ir: ir@8000 {
+				compatible = "amlogic,meson-gxbb-ir";
+				reg = <0x0 0x8000 0x0 0x20>;
+				interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+				status = "disabled";
+			};
+
 			saradc: adc@9000 {
 				compatible = "amlogic,meson-g12a-saradc",
 					     "amlogic,meson-saradc";
Signature · 1 line
2.21.0
#5 lore raw

PATCH 2/3 arm64: dts: meson-g12a-x96-max: enable IR decoder

In reply to Neil Armstrong

Add support for the IR decoder input on the X96 Max board.

---
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +6 -0
index b3d913f28f12..5cdc263b03e6 100644
@@ -144,6 +144,12 @@
 	};
 };
 
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
+
 &uart_A {
 	status = "okay";
 	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
Signature · 1 line
2.21.0
#7 lore raw

PATCH 3/3 arm64: dts: meson-g12a-u200: enable IR decoder

In reply to Neil Armstrong

Add support for the IR decoder input on the U200 Reference Design board.

---
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +6 -0
index cc86d6491af6..8dbf620affe6 100644
@@ -155,6 +155,12 @@
 	};
 };
 
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
+
 &uart_AO {
 	status = "okay";
 	pinctrl-0 = <&uart_ao_a_pins>;
Signature · 1 line
2.21.0
reviewer Reviewed-by on v1 3/3
#8 lore raw

Re: [PATCH 3/3] arm64: dts: meson-g12a-u200: enable IR decoder

Quoted 4 lines · Neil Armstrong

Add support for the IR decoder input on the U200 Reference Design board.

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

maintainer Applied
#9 lore raw
In reply to Neil Armstrong
Quoted 2 lines · Neil Armstrong

Add Infrared Decoder support for the Amlogic G12A and enable it on the X96 Max and U200 Reference Design boards.

Queued for v5.3 (branch: v5.3/dt64)

Kevin