linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM64: dts: meson-axg: enable IR controller
@ 2017-12-01  1:36 Yixun Lan
  2017-12-01  9:25 ` Jerome Brunet
  0 siblings, 1 reply; 2+ messages in thread
From: Yixun Lan @ 2017-12-01  1:36 UTC (permalink / raw)
  To: Kevin Hilman, Rob Herring, devicetree
  Cc: Neil Armstrong, Jerome Brunet, Mark Rutland, Carlo Caione,
	Yixun Lan, linux-amlogic, linux-arm-kernel, linux-kernel

Enable IR remote controller which find in Amlogic's Meson-AXG SoC.

Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts |  6 ++++++
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi     | 14 ++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index 0864d1ff2d9b..ca676cafdbb3 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -34,3 +34,9 @@
 	pinctrl-0 = <&i2c1_z_pins>;
 	pinctrl-names = "default";
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index 9bb85893c1b7..80d5b8c13fac 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -616,6 +616,13 @@
 					#gpio-cells = <2>;
 					gpio-ranges = <&pinctrl_aobus 0 0 15>;
 				};
+
+				remote_input_ao_pins: remote_input_ao {
+					mux {
+						groups = "remote_input_ao";
+						function = "remote_input_ao";
+					};
+				};
 			};
 
 			i2c_AO: i2c@5000 {
@@ -664,6 +671,13 @@
 				clock-names = "xtal", "pclk", "baud";
 				status = "disabled";
 			};
+
+			ir: ir@8000 {
+				compatible = "amlogic,meson-gx-ir", "amlogic,meson-gxbb-ir";
+				reg = <0x0 0x8000 0x0 0x20>;
+				interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+				status = "disabled";
+			};
 		};
 	};
 };
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM64: dts: meson-axg: enable IR controller
  2017-12-01  1:36 [PATCH] ARM64: dts: meson-axg: enable IR controller Yixun Lan
@ 2017-12-01  9:25 ` Jerome Brunet
  0 siblings, 0 replies; 2+ messages in thread
From: Jerome Brunet @ 2017-12-01  9:25 UTC (permalink / raw)
  To: Yixun Lan, Kevin Hilman, Rob Herring, devicetree
  Cc: Neil Armstrong, Mark Rutland, Carlo Caione, linux-amlogic,
	linux-arm-kernel, linux-kernel

On Fri, 2017-12-01 at 09:36 +0800, Yixun Lan wrote:
> Enable IR remote controller which find in Amlogic's Meson-AXG SoC.
> 
> Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
> ---
>  arch/arm64/boot/dts/amlogic/meson-axg-s400.dts |  6 ++++++
>  arch/arm64/boot/dts/amlogic/meson-axg.dtsi     | 14 ++++++++++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> index 0864d1ff2d9b..ca676cafdbb3 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> @@ -34,3 +34,9 @@
>  	pinctrl-0 = <&i2c1_z_pins>;
>  	pinctrl-names = "default";
>  };
> +
> +&ir {
> +	status = "okay";
> +	pinctrl-0 = <&remote_input_ao_pins>;
> +	pinctrl-names = "default";
> +};
> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> index 9bb85893c1b7..80d5b8c13fac 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> @@ -616,6 +616,13 @@
>  					#gpio-cells = <2>;
>  					gpio-ranges = <&pinctrl_aobus 0 0
> 15>;
>  				};
> +
> +				remote_input_ao_pins: remote_input_ao {
> +					mux {
> +						groups = "remote_input_ao";
> +						function = "remote_input_ao";
> +					};
> +				};
>  			};
>  
>  			i2c_AO: i2c@5000 {
> @@ -664,6 +671,13 @@
>  				clock-names = "xtal", "pclk", "baud";
>  				status = "disabled";
>  			};
> +
> +			ir: ir@8000 {
> +				compatible = "amlogic,meson-gx-
> ir","amlogic,meson-gxbb-ir";

The order is bad here (Yes the same mistake is present a *LOT* in the gx family
- I'm preparing a patch for that). In addition, "amlogic,meson-gx-ir" is
unmatched, undocumented and unlikely to be ever used since every compatible SoC
will use the gxbb compatible string. You may as well drop it and just keep the
gxbb one

> +				reg = <0x0 0x8000 0x0 0x20>;
> +				interrupts = <GIC_SPI 196
> IRQ_TYPE_EDGE_RISING>;
> +				status = "disabled";
> +			};
>  		};
>  	};
>  };

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-01  9:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01  1:36 [PATCH] ARM64: dts: meson-axg: enable IR controller Yixun Lan
2017-12-01  9:25 ` Jerome Brunet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).