From patchwork Sun Nov 17 11:04:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 21571 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0A59620299 for ; Sun, 17 Nov 2013 11:05:03 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id p10sf371346pdj.3 for ; Sun, 17 Nov 2013 03:05:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Cxip0nX+fOXzMIxytCU5EjZC7dfpwT0VWBNPSr2sW0Q=; b=f17DbCclEODycm1BLwXoU9LZW/oGYjQ0evWuU27CPYhWqU3Gjm1iYnqNR8zdQL2msr g6V2z4fdaNkTu2TW70Uy5MiSgmaEck2MDDx927IG0bB8hCKOwYZuKRFBrBgM7OcpkMlB TM/qFXV4wH81tTkNWnthF0tzrFEJolON+d0KTRy5cNuX7ZmFDbj5NCw62ttrJEpz2s36 NZS+s+YUDiU7O/SKkJw3AlKnOq4VyfeA1u9Dr6Hf7hhK3oN0Lsfyf05cX5zVjYdyUP2T bGgqtrdJvCd8EsPPx4VCiqLe0ufVK/r0x0JkGgsbLi3aVQ9wC6DCZr+y7hh3QaWuJI5g 0CCQ== X-Gm-Message-State: ALoCoQkOcAuqvS5c5YGVB7r/vToyoySYeza0Ct4htB4564tK3UZkYqv6mTr1HqCxcelh7NuSwBpA X-Received: by 10.66.164.41 with SMTP id yn9mr6458016pab.7.1384686303296; Sun, 17 Nov 2013 03:05:03 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.2.69 with SMTP id 5ls979791qes.98.gmail; Sun, 17 Nov 2013 03:05:03 -0800 (PST) X-Received: by 10.220.64.69 with SMTP id d5mr9948656vci.11.1384686303187; Sun, 17 Nov 2013 03:05:03 -0800 (PST) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id tw10si5590659vec.6.2013.11.17.03.05.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Nov 2013 03:05:03 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id if17so2878993vcb.19 for ; Sun, 17 Nov 2013 03:05:03 -0800 (PST) X-Received: by 10.58.146.71 with SMTP id ta7mr1457980veb.23.1384686303102; Sun, 17 Nov 2013 03:05:03 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp140388vcz; Sun, 17 Nov 2013 03:05:02 -0800 (PST) X-Received: by 10.194.122.99 with SMTP id lr3mr12479574wjb.21.1384686302133; Sun, 17 Nov 2013 03:05:02 -0800 (PST) Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) by mx.google.com with ESMTPS id c9si4641860wjy.47.2013.11.17.03.05.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Nov 2013 03:05:02 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.180 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.180; Received: by mail-we0-f180.google.com with SMTP id u57so4587035wes.25 for ; Sun, 17 Nov 2013 03:05:01 -0800 (PST) X-Received: by 10.180.92.10 with SMTP id ci10mr13169790wib.61.1384686301694; Sun, 17 Nov 2013 03:05:01 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id fu1sm13156973wib.8.2013.11.17.03.05.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Nov 2013 03:05:01 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Lee Jones Cc: devicetree@vger.kernel.org, Linus Walleij Subject: [PATCH 15/21] ARM: ux500: move the HREFv60plus IPGPIO pins to device tree Date: Sun, 17 Nov 2013 12:04:04 +0100 Message-Id: <1384686250-10542-16-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1384686250-10542-1-git-send-email-linus.walleij@linaro.org> References: <1384686250-10542-1-git-send-email-linus.walleij@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Move the control of muxing and enabling the IPGPIO (image processor GPIO) from the static set-up to the device tree. Use a hog as we have no device for the flash controller yet. Signed-off-by: Linus Walleij --- arch/arm/boot/dts/ste-hrefv60plus.dtsi | 31 +++++++++++++++++++++++++++++++ arch/arm/mach-ux500/board-mop500-pins.c | 16 ---------------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/arch/arm/boot/dts/ste-hrefv60plus.dtsi b/arch/arm/boot/dts/ste-hrefv60plus.dtsi index 6e0105d2f461..ecd26848f24f 100644 --- a/arch/arm/boot/dts/ste-hrefv60plus.dtsi +++ b/arch/arm/boot/dts/ste-hrefv60plus.dtsi @@ -62,6 +62,10 @@ }; pinctrl { + /* Set this up using hogs */ + pinctrl-names = "default"; + pinctrl-0 = <&ipgpio_hrefv60_mode>; + sdi0 { /* SD card detect GPIO pin, extend default state */ sdi0_default_mode: sdi0_default { @@ -71,6 +75,33 @@ }; }; }; + ipgpio { + /* + * XENON Flashgun on image processor GPIO (controlled from image + * processor firmware), mux in these image processor GPIO lines 0 + * (XENON_FLASH_ID), 1 (XENON_READY) and there is an assistant + * LED on IP GPIO 4 (XENON_EN2) on altfunction C, that need bias + * from GPIO21 so pull up 0, 1 and drive 4 and GPIO21 low as output. + */ + ipgpio_hrefv60_mode: ipgpio_hrefv60 { + hrefv60_mux { + ste,function = "ipgpio"; + ste,pins = "ipgpio0_c_1", "ipgpio1_c_1", "ipgpio4_c_1"; + }; + hrefv60_cfg1 { + ste,pins = "GPIO6_AF6", "GPIO7_AG5"; + ste,config = <&in_pu>; + }; + hrefv60_cfg2 { + ste,pins = "GPIO21_AB3"; + ste,config = <&gpio_out_lo>; + }; + hrefv60_cfg3 { + ste,pins = "GPIO64_F3"; + ste,config = <&out_lo>; + }; + }; + }; }; }; }; diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index d0d527a3d205..e208dddfeda9 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c @@ -20,8 +20,6 @@ #define BIAS(a,b) static unsigned long a[] = { b } BIAS(pd, PIN_PULL_DOWN); -BIAS(in_pu, PIN_INPUT_PULLUP); -BIAS(out_lo, PIN_OUTPUT_LOW); BIAS(abx500_out_lo, PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, 0)); BIAS(abx500_in_pd, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 1)); @@ -307,20 +305,6 @@ static struct pinctrl_map __initdata ab8505_pinmap[] = { * and SSP1 ports (previously connected to the AB8500) as generic GPIO lines. */ static struct pinctrl_map __initdata hrefv60_pinmap[] = { - /* - * XENON Flashgun on image processor GPIO (controlled from image - * processor firmware), mux in these image processor GPIO lines 0 - * (XENON_FLASH_ID), 1 (XENON_READY) and there is an assistant - * LED on IP GPIO 4 (XENON_EN2) on altfunction C, that need bias - * from GPIO21 so pull up 0, 1 and drive 4 and GPIO21 low as output. - */ - DB8500_MUX_HOG("ipgpio0_c_1", "ipgpio"), - DB8500_MUX_HOG("ipgpio1_c_1", "ipgpio"), - DB8500_MUX_HOG("ipgpio4_c_1", "ipgpio"), - DB8500_PIN_HOG("GPIO6_AF6", in_pu), /* XENON_FLASH_ID */ - DB8500_PIN_HOG("GPIO7_AG5", in_pu), /* XENON_READY */ - DB8500_PIN_HOG("GPIO21_AB3", gpio_out_lo), /* XENON_EN1 */ - DB8500_PIN_HOG("GPIO64_F3", out_lo), /* XENON_EN2 */ /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */ DB8500_PIN_HOG("GPIO31_V3", gpio_in_pu), /* EN1 */ DB8500_PIN_HOG("GPIO32_V2", gpio_in_pd), /* DRDY */