From patchwork Fri Dec 7 10:27:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kumar, Anil" X-Patchwork-Id: 1849841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 5D028DF2EE for ; Fri, 7 Dec 2012 10:31:06 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tgv9q-0002GR-6i; Fri, 07 Dec 2012 10:27:50 +0000 Received: from arroyo.ext.ti.com ([192.94.94.40]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tgv9n-0002G9-50 for linux-arm-kernel@lists.infradead.org; Fri, 07 Dec 2012 10:27:48 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id qB7ARZOC012800; Fri, 7 Dec 2012 04:27:35 -0600 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id qB7ARXBS025549; Fri, 7 Dec 2012 15:57:33 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Fri, 7 Dec 2012 15:57:32 +0530 Received: from ucmsshproxy.india.ext.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with SMTP id qB7ARWY3014976; Fri, 7 Dec 2012 15:57:32 +0530 Received: from symphony.india.ext.ti.com (unknown [192.168.247.13]) by ucmsshproxy.india.ext.ti.com (Postfix) with ESMTP id 5F555158002; Fri, 7 Dec 2012 15:57:32 +0530 (IST) Received: from localhost.localdomain (ubuntu-psp-linux [192.168.247.46]) by symphony.india.ext.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id qB7ARVR20282; Fri, 7 Dec 2012 15:57:31 +0530 (IST) From: "Kumar, Anil" To: , , , Subject: [PATCH 1/2] ARM: davinci: da850: add pinctrl driver entries Date: Fri, 7 Dec 2012 15:57:30 +0530 Message-ID: <1354876051-25938-2-git-send-email-anilkumar.v@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1354876051-25938-1-git-send-email-anilkumar.v@ti.com> References: <1354876051-25938-1-git-send-email-anilkumar.v@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121207_052747_399516_445C7DAD X-CRM114-Status: GOOD ( 12.25 ) X-Spam-Score: -4.6 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.94.94.40 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux@arm.linux.org.uk, nsekhar@ti.com, rob.herring@calxeda.com, grant.likely@secretlab.ca, rob@landley.net, "Kumar, Anil" , hs@denx.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org For DT, DaVinci platform can use pinctrl-single driver for handling padconf registers. Enable PINCTRL Kconfig for all DaVinci platform. Add required pinctrl DT entries in da850 dts file. Test procedure 1)Populate DT file with NAND node information. 2)Populate board DT file with pinmux information for NAND. 3)Boot and confirm NAND is detected by the kernel. 4)cat /proc/mtd to show partitions. Signed-off-by: Kumar, Anil --- :000000 100644 0000000... f999d9e... A Documentation/devicetree/bindings/arm/davinci/pinctrl.txt :100644 100644 06e0adf... 54a5405... M arch/arm/Kconfig :100644 100644 37dc5a3... 8cac9d2... M arch/arm/boot/dts/da850-evm.dts :100644 100644 fbada87... 94471bc... M arch/arm/boot/dts/da850.dtsi :100644 100644 f292239... 0892db4... M arch/arm/configs/da8xx_omapl_defconfig .../devicetree/bindings/arm/davinci/pinctrl.txt | 29 ++++++++++++++++++++ arch/arm/Kconfig | 1 + arch/arm/boot/dts/da850-evm.dts | 3 ++ arch/arm/boot/dts/da850.dtsi | 10 +++++++ arch/arm/configs/da8xx_omapl_defconfig | 1 + 5 files changed, 44 insertions(+), 0 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/davinci/pinctrl.txt b/Documentation/devicetree/bindings/arm/davinci/pinctrl.txt new file mode 100644 index 0000000..f999d9e --- /dev/null +++ b/Documentation/devicetree/bindings/arm/davinci/pinctrl.txt @@ -0,0 +1,29 @@ +* Texas Instruments Davinci pinctrl-single + +This file provides information, what the device node for the +davinci pinctrl-single interface contain. + +Required properties: +- compatible: "pinctrl-single"; + +- reg : offset and length of the register set for the mux registers + +- pinctrl-single,bit-per-mux: mask of allowed pinmux function bits in the + pinmux register + +- pinctrl-single,register-width: pinmux register access width in bits + +- pinctrl-single,function-mask: mask of allowed pinmux function bits in + the pinmux register + +Example: +pmx_core:pinmux@14120 { + compatible = "pinctrl-single"; + reg = <0x14120 0x50>; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-single,bit-per-mux; + pinctrl-single,register-width = <32>; + pinctrl-single,function-mask = <0xffffffff>; +}; +~ diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 06e0adf..54a5405 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -924,6 +924,7 @@ config ARCH_DAVINCI select GENERIC_IRQ_CHIP select HAVE_IDE select NEED_MACH_GPIO_H + select PINCTRL select USE_OF select ZONE_DMA help diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts index 37dc5a3..8cac9d2 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -15,6 +15,9 @@ model = "DA850/AM1808/OMAP-L138 EVM"; soc { + pmx_core:pinmux@14120 { + status = "okay"; + }; serial0: serial@1c42000 { status = "okay"; }; diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index fbada87..94471bc 100644 --- a/arch/arm/boot/dts/da850.dtsi +++ b/arch/arm/boot/dts/da850.dtsi @@ -29,6 +29,16 @@ #size-cells = <1>; ranges = <0x0 0x01c00000 0x400000>; + pmx_core:pinmux@14120 { + compatible = "pinctrl-single"; + reg = <0x14120 0x50>; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-single,bit-per-mux; + pinctrl-single,register-width = <32>; + pinctrl-single,function-mask = <0xffffffff>; + status = "disabled"; + }; serial0: serial@1c42000 { compatible = "ns16550a"; reg = <0x42000 0x100>; diff --git a/arch/arm/configs/da8xx_omapl_defconfig b/arch/arm/configs/da8xx_omapl_defconfig index f292239..0892db4 100644 --- a/arch/arm/configs/da8xx_omapl_defconfig +++ b/arch/arm/configs/da8xx_omapl_defconfig @@ -81,6 +81,7 @@ CONFIG_SERIAL_OF_PLATFORM=y CONFIG_I2C=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_DAVINCI=y +CONFIG_PINCTRL_SINGLE=y # CONFIG_HWMON is not set CONFIG_WATCHDOG=y CONFIG_REGULATOR=y