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: 1849861 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by patchwork1.kernel.org (Postfix) with ESMTP id 353A03FC71 for ; Fri, 7 Dec 2012 10:31:35 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id qB7ARbvU015626; Fri, 7 Dec 2012 04:27:37 -0600 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qB7ARbVx026105; Fri, 7 Dec 2012 04:27:37 -0600 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Fri, 7 Dec 2012 04:27:37 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id qB7ARbff003975; Fri, 7 Dec 2012 04:27:37 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id F0AAE80627; Fri, 7 Dec 2012 04:27:36 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp20.itg.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by linux.omap.com (Postfix) with ESMTP id 0EC6480626 for ; Fri, 7 Dec 2012 04:27:34 -0600 (CST) 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 CC: , , , , X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com 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