arm64: meson-g12a: Add Infrared Decoder support
Subsystems (2)
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
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
@@ -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
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
Signed-off-by Neil Armstrong <[email protected]>
apart from the description you can add my:
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
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 usingmesong12a.dtsifrom 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
Signed-off-by Neil Armstrong <[email protected]>apart from the description you can add my:
Reviewed-by Martin Blumenstingl<[email protected]>
Thanks,
Neil
Kevin Hilman
maintainerRe: [PATCH 1/3] arm64: dts: meson-g12a: Add IR nodes
In reply to Neil ArmstrongQuoted 13 lines · Neil Armstrong
Amlogic G12A SoCs uses the exact same IR decoder as previous families, add the IR node and the pintctrl setting.
Signed-off-by Neil Armstrong <[email protected]>--- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +0
-0
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
PATCH 2/3 arm64: dts: meson-g12a-x96-max: enable IR decoder
In reply to Neil ArmstrongAdd 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
@@ -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
Re: [PATCH 2/3] arm64: dts: meson-g12a-x96-max: enable IR decoder
Quoted 4 lines · Neil Armstrong
Add support for the IR decoder input on the X96 Max board.
Signed-off-by Neil Armstrong <[email protected]>
PATCH 3/3 arm64: dts: meson-g12a-u200: enable IR decoder
In reply to Neil ArmstrongAdd 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
@@ -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
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.
Signed-off-by Neil Armstrong <[email protected]>
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
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