From patchwork Sat Apr 30 17:21:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlo Caione X-Patchwork-Id: 8987181 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A9E75BF29F for ; Sat, 30 Apr 2016 17:24:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B7DC9201FA for ; Sat, 30 Apr 2016 17:24:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CEA5620219 for ; Sat, 30 Apr 2016 17:24:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1awYap-0003Os-Ed; Sat, 30 Apr 2016 17:22:11 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1awYaT-0003La-S9 for linux-arm-kernel@lists.infradead.org; Sat, 30 Apr 2016 17:21:53 +0000 Received: by mail-wm0-x243.google.com with SMTP id w143so10782486wmw.3 for ; Sat, 30 Apr 2016 10:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=vjEZS9L6WPVlySU1POKNUSLlMQKYnDTr6OMLuJrjoIY=; b=UcRSDf0IrEj7oWUC1HcYDZ5IpD+Uvwrpfh9sOaGmcDZWDi735irOPNHWM1mF9ah0Ld CPpK6MevGXB2mNR0kdK4/HyJnY6G/CEMYfUYP+qRaMWA+aR2PVSVwu7raufEiN3PKvRo QdSiXHg7Zk2KRv4xMO0ZUGMZrYMVT9wR/XpzyIsf258ySIg9mZ5QAHBRncFTUNi4Hi9f zTwIzllk/u6jprSoqS3dW7G9AzykTfGwZpLeen1MQ+jfaszHGt4ZYgI1KBYBunkxuAeL u3er7UTiq3WcBBmWZP6I2I95pI5ut5nvAMoDs+PHC1IbuMZP0nB2Dr/eKtmOsGTZV/Zq Gulw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=vjEZS9L6WPVlySU1POKNUSLlMQKYnDTr6OMLuJrjoIY=; b=b8RfnQgpM9En9voMqGF7fRVe94v1ibk9ISqErCfB5PehceoC7vafS0GTSW0f3rMtfg UzX+OA0UClvn+JrLXS6GLOXh8cxA3yawOs/+0eTC6Th6GQ2h9J13kjizK2LBcxj0wgM3 Ctx+imk1gDUbLYn8rHueApwML5bg6V1ibKKqQEOX1/xe52A30NIBzNeEkapihf6WQF1p O+pGp06QduVSGFXI7Ww3iWII3ROP31+hFB2ppkRSusZo4UZWk3x1QCZoTUE6ZjFyjHUn bTc1fYWyfVRQfwcYGlTZ0VZZTnKGRU454AEMY4TpWuJKhjbJYEkg1EnfPSBNK4VaeZpP ZdnQ== X-Gm-Message-State: AOPr4FWbP5Vpz0bjHolMkfjQWhr1P+saPSrY/sSdPmVoL/7O9SI/kIx+48aNCqDvtcZGbA== X-Received: by 10.195.11.34 with SMTP id ef2mr843227wjd.101.1462036888399; Sat, 30 Apr 2016 10:21:28 -0700 (PDT) Received: from localhost.localdomain (2-238-57-164.ip242.fastwebnet.it. [2.238.57.164]) by smtp.gmail.com with ESMTPSA id e16sm9260366wmc.3.2016.04.30.10.21.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 30 Apr 2016 10:21:27 -0700 (PDT) From: Carlo Caione To: robh+dt@kernel.org, linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org, linux-meson@googlegroups.com, devicetree@vger.kernel.org, afaerber@suse.de, arnd@arndb.de, khilman@baylibre.com, linux@endlessm.com Subject: [PATCH 2/2] ARM64: dts: amlogic: Enable pin controller on GXBB-based platforms Date: Sat, 30 Apr 2016 19:21:15 +0200 Message-Id: <1462036875-22625-3-git-send-email-carlo@caione.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1462036875-22625-1-git-send-email-carlo@caione.org> References: <1462036875-22625-1-git-send-email-carlo@caione.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160430_102150_055542_65D78B49 X-CRM114-Status: GOOD ( 11.18 ) X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlo Caione MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Carlo Caione Update DTS and DTSI files to enable the pin controller. We also now support the blinking blue LED on the Odroid-C2. Signed-off-by: Carlo Caione Acked-by: Linus Walleij --- .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 +++++++ arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 2 ++ .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 3 ++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 41 ++++++++++++++++++++++ 4 files changed, 59 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts index 7f2c674..41e1e66 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts @@ -45,6 +45,7 @@ /dts-v1/; #include "meson-gxbb.dtsi" +#include / { compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb"; @@ -62,8 +63,20 @@ device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; + + leds { + compatible = "gpio-leds"; + blue { + label = "c2:blue:alive"; + gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + default-state = "off"; + }; + }; }; &uart_AO { status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; }; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi index bf7ff1d..22e6298 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi @@ -62,4 +62,6 @@ /* This UART is brought out to the DB9 connector */ &uart_AO { status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; }; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi index 012cdcc..54bb7c7 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi @@ -56,4 +56,7 @@ &uart_AO { status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; + }; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi index 3126f0c..6dd2768 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi @@ -43,6 +43,7 @@ #include #include #include +#include / { compatible = "amlogic,meson-gxbb"; @@ -158,6 +159,29 @@ #size-cells = <2>; ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>; + pinctrl_aobus: pinctrl@14 { + compatible = "amlogic,meson-gxbb-aobus-pinctrl"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + gpio_ao: bank@14 { + reg = <0x0 0x00014 0x0 0x8>, + <0x0 0x0002c 0x0 0x4>, + <0x0 0x00024 0x0 0x8>; + reg-names = "mux", "pull", "gpio"; + gpio-controller; + #gpio-cells = <2>; + }; + + uart_ao_a_pins: uart_ao_a { + mux { + groups = "uart_tx_ao_a", "uart_rx_ao_a"; + function = "uart_ao"; + }; + }; + }; + uart_AO: serial@4c0 { compatible = "amlogic,meson-uart"; reg = <0x0 0x004c0 0x0 0x14>; @@ -173,6 +197,23 @@ #address-cells = <2>; #size-cells = <2>; ranges = <0x0 0x0 0x0 0xc8834000 0x0 0x2000>; + + pinctrl_periphs: pinctrl@4b0 { + compatible = "amlogic,meson-gxbb-periphs-pinctrl"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + gpio: bank@4b0 { + reg = <0x0 0x004b0 0x0 0x28>, + <0x0 0x004e8 0x0 0x14>, + <0x0 0x00120 0x0 0x14>, + <0x0 0x00430 0x0 0x40>; + reg-names = "mux", "pull", "pull-enable", "gpio"; + gpio-controller; + #gpio-cells = <2>; + }; + }; }; hiubus: hiubus@c883c000 {