From patchwork Fri Dec 30 18:49:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 709860 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3tqwVv5Z51z9sfH for ; Sat, 31 Dec 2016 05:49:27 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754085AbcL3StU (ORCPT ); Fri, 30 Dec 2016 13:49:20 -0500 Received: from muru.com ([72.249.23.125]:53980 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753491AbcL3StT (ORCPT ); Fri, 30 Dec 2016 13:49:19 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 1734D816A; Fri, 30 Dec 2016 18:49:43 +0000 (UTC) Date: Fri, 30 Dec 2016 10:49:15 -0800 From: Tony Lindgren To: Linus Walleij Cc: Gary Bisson , Grygorii Strashko , Mark Rutland , Nishanth Menon , Rob Herring , devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, Lokesh Vutla Subject: [PATCH] ARM: dts: Add dra7 iodelay configuration and use it for MMC Message-ID: <20161230184914.GC3940@atomide.com> References: <20161230183732.5595-1-tony@atomide.com> <20161230183732.5595-3-tony@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161230183732.5595-3-tony@atomide.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Add dra7 iodelay configuration and use it for MMC. Signed-off-by: Tony Lindgren Acked-by: Linus Walleij Signed-off-by: Nishanth Menon --- arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 21 ++++++++++++++++++++- arch/arm/boot/dts/dra7.dtsi | 8 ++++++++ include/dt-bindings/pinctrl/dra.h | 4 ++++ 3 files changed, 32 insertions(+), 1 deletion(-) --- And ere are the related dts changes. diff --git a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi --- a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi +++ b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi @@ -190,6 +190,25 @@ >; }; }; + +&dra7_iodelay_core +{ + mmc2_iodelay_3v3_conf: mmc2_iodelay_3v3_conf { + pinctrl-pin-array = < + 0x18c A_DELAY_PS(0) G_DELAY_PS(120) /* CFG_GPMC_A19_IN */ + 0x1a4 A_DELAY_PS(265) G_DELAY_PS(360) /* CFG_GPMC_A20_IN */ + 0x1b0 A_DELAY_PS(0) G_DELAY_PS(120) /* CFG_GPMC_A21_IN */ + 0x1bc A_DELAY_PS(0) G_DELAY_PS(120) /* CFG_GPMC_A22_IN */ + 0x1c8 A_DELAY_PS(287) G_DELAY_PS(420) /* CFG_GPMC_A23_IN */ + 0x1d4 A_DELAY_PS(144) G_DELAY_PS(240) /* CFG_GPMC_A24_IN */ + 0x1e0 A_DELAY_PS(0) G_DELAY_PS(0) /* CFG_GPMC_A25_IN */ + 0x1ec A_DELAY_PS(120) G_DELAY_PS(0) /* CFG_GPMC_A26_IN */ + 0x1f8 A_DELAY_PS(120) G_DELAY_PS(180) /* CFG_GPMC_A27_IN */ + 0x360 A_DELAY_PS(0) G_DELAY_PS(0) /* CFG_GPMC_CS1_IN */ + >; + }; +}; + &i2c1 { status = "okay"; clock-frequency = <400000>; @@ -452,7 +471,7 @@ status = "okay"; pinctrl-names = "default"; - pinctrl-0 = <&mmc2_pins_default>; + pinctrl-0 = <&mmc2_pins_default &mmc2_iodelay_3v3_conf>; vmmc-supply = <&vdd_3v3>; bus-width = <8>; diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi @@ -401,6 +401,14 @@ reg = <0x40d00000 0x100>; }; + dra7_iodelay_core: padconf@4844a000 { + compatible = "ti,dra7-iodelay"; + reg = <0x4844a000 0x0d1c>; + #address-cells = <1>; + #size-cells = <0>; + #pinctrl-cells = <2>; + }; + sdma: dma-controller@4a056000 { compatible = "ti,omap4430-sdma"; reg = <0x4a056000 0x1000>; diff --git a/include/dt-bindings/pinctrl/dra.h b/include/dt-bindings/pinctrl/dra.h --- a/include/dt-bindings/pinctrl/dra.h +++ b/include/dt-bindings/pinctrl/dra.h @@ -73,5 +73,9 @@ */ #define DRA7XX_CORE_IOPAD(pa, val) (((pa) & 0xffff) - 0x3400) (val) +/* DRA7 IODELAY configuration parameters */ +#define A_DELAY_PS(val) ((val) & 0xffff) +#define G_DELAY_PS(val) ((val) & 0xffff) + #endif