Re: [PATCH v6 3/3] ARM: sunxi: Add IR controller support in DT on A20
From: Александр Берсенев <hidden>
Date: 2014-05-14 19:58:04
Sending two changes as the patch. I am not using ir1_pins_a because cubietruck has only one ir port, but other A20 devices may have up to 2 ir ports. Signed-off-by: Alexander Bersenev <bay-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org>
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 40ded74..53a9ab1 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi@@ -731,6 +731,7 @@ allwinner,drive = <0>; allwinner,pull = <0>; }; + ir1_pins_a: ir1@0 { allwinner,pins = "PB22","PB23"; allwinner,function = "ir1";
@@ -965,7 +966,7 @@ clocks = <&apb0_gates 7>, <&ir1_clk>; clock-names = "apb", "ir"; interrupts = <0 6 4>; - reg = <0x01C21c00 0x40>; + reg = <0x01c21c00 0x40>; status = "disabled"; }; };
среда, 14 мая 2014 г., 13:50:17 UTC+6 пользователь Maxime Ripard написал:
On Wed, May 14, 2014 at 12:39:02AM +0600, Alexander Bersenev wrote:quoted
This patch adds IR controller in A20 Device-Tree: - Two IR devices found in A20 user manual - Pins for two devices - One IR device physically found on Cubieboard 2 - One IR device physically found on Cubietruck Signed-off-by: Alexander Bersenev <b...-d8LqKIyZzER6k2ZkT/Rh8A@public.gmane.org <javascript:>> Signed-off-by: Alexsey Shestacov <wing...-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org <javascript:>>quoted
--- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 6 ++++++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 6 ++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 31+++++++++++++++++++++++++++++quoted
3 files changed, 43 insertions(+)diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dtsb/arch/arm/boot/dts/sun7i-a20-cubieboard2.dtsquoted
index feeff64..2564e8c 100644--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts@@ -164,6 +164,12 @@ reg = <1>; }; }; + + ir0: ir@01c21800 { + pinctrl-names = "default"; + pinctrl-0 = <&ir0_pins_a>; + status = "okay"; + }; }; leds {diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dtsb/arch/arm/boot/dts/sun7i-a20-cubietruck.dtsquoted
index e288562..e375e89 100644--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts@@ -232,6 +232,12 @@ reg = <1>; }; }; + + ir0: ir@01c21800 { + pinctrl-names = "default"; + pinctrl-0 = <&ir0_pins_a>; + status = "okay"; + }; }; leds {Please make these two changes a separate patch.quoted
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsib/arch/arm/boot/dts/sun7i-a20.dtsiquoted
index 0ae2b77..40ded74 100644--- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi@@ -724,6 +724,19 @@ allwinner,drive = <2>; allwinner,pull = <0>; }; + + ir0_pins_a: ir0@0 { + allwinner,pins = "PB3","PB4"; + allwinner,function = "ir0"; + allwinner,drive = <0>; + allwinner,pull = <0>; + };Extra linequoted
+ ir1_pins_a: ir1@0 { + allwinner,pins = "PB22","PB23"; + allwinner,function = "ir1"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; };Do you use ir1_pins_a at all? I also prefer whenever such additions are in a patch of their own.quoted
timer@01c20c00 {@@ -937,5 +950,23 @@ #interrupt-cells = <3>; interrupts = <1 9 0xf04>; }; + + ir0: ir@01c21800 { + compatible = "allwinner,sun7i-a20-ir"; + clocks = <&apb0_gates 6>, <&ir0_clk>; + clock-names = "apb", "ir"; + interrupts = <0 5 4>; + reg = <0x01c21800 0x40>; + status = "disabled"; + }; + + ir1: ir@01c21c00 { + compatible = "allwinner,sun7i-a20-ir"; + clocks = <&apb0_gates 7>, <&ir1_clk>; + clock-names = "apb", "ir"; + interrupts = <0 6 4>; + reg = <0x01C21c00 0x40>;You're mixing upper and lower case letters here, please make it lower case. Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
-- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout.