Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934109AbaD3PQ7 (ORCPT ); Wed, 30 Apr 2014 11:16:59 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:37140 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933831AbaD3PQy (ORCPT ); Wed, 30 Apr 2014 11:16:54 -0400 From: Alexander Bersenev To: linux-sunxi@googlegroups.com, david@hardeman.nu, devicetree@vger.kernel.org, galak@codeaurora.org, grant.likely@linaro.org, ijc+devicetree@hellion.org.uk, james.hogan@imgtec.com, linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk, m.chehab@samsung.com, mark.rutland@arm.com, maxime.ripard@free-electrons.com, pawel.moll@arm.com, rdunlap@infradead.org, robh+dt@kernel.org, sean@mess.org, srinivas.kandagatla@st.com, wingrime@linux-sunxi.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Alexander Bersenev Subject: [PATCH v5 3/3] ARM: sunxi: Add IR controller support in DT on A20 Date: Wed, 30 Apr 2014 21:16:50 +0600 Message-Id: <1398871010-30681-4-git-send-email-bay@hackerdom.ru> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1398871010-30681-1-git-send-email-bay@hackerdom.ru> References: <1398871010-30681-1-git-send-email-bay@hackerdom.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Alexsey Shestacov --- 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 +++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts 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.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts 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 { diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 0ae2b77..bb655a5 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>; + }; + ir1_pins_a: ir1@0 { + allwinner,pins = "PB22","PB23"; + allwinner,function = "ir1"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; }; 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>; + status = "disabled"; + }; }; }; -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/