From patchwork Sun Nov 17 11:04:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 21577 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f70.google.com (mail-pb0-f70.google.com [209.85.160.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0C23620299 for ; Sun, 17 Nov 2013 11:05:17 +0000 (UTC) Received: by mail-pb0-f70.google.com with SMTP id rp16sf10707615pbb.5 for ; Sun, 17 Nov 2013 03:05:17 -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=hgvfBChCjuWqczySCQrjqcu/5ilu11C9t4G+nmPbtro=; b=LfGfo2ViMjQMkKw0vI41zixeI3d+hMfV0ATOO+gL8Br8DvkY2ET2YmgBgoQO9ydRKa dXocCBICnJlghFUvkQBmi5kuC3zm5SyJOGuAfhmZUc/KFt02TszA/1UZg1jyX7qXSbdI BUbjRCfna7F70bRj83hczHvj+FR9vXGZVbFKKQAZPzgfrk67llct3TyW6zahs+kjhI0s EgEtYGw7UrkZX1oAu4t9/77Bc8YoEca+ChX3q6BJEZs6vd2VtKyDRpSQyY+LkL5Rv95U p08GmKTe9T+3PQ1cL2LGfI1MQef2WFxWBwGeZevDGkJ4r7/garSQNW8dn1YFGp/sr8lR hLuw== X-Gm-Message-State: ALoCoQn5xqelyf0RzHrDY5JhS+FjCyJvEr9dtADv/bz5/HvHbpHfT1z1EgcTxGrN7w5uJ1LWq5gU X-Received: by 10.68.226.71 with SMTP id rq7mr3225843pbc.5.1384686317324; Sun, 17 Nov 2013 03:05:17 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.59.36 with SMTP id w4ls2315841qeq.67.gmail; Sun, 17 Nov 2013 03:05:17 -0800 (PST) X-Received: by 10.58.100.244 with SMTP id fb20mr9830650veb.6.1384686317214; Sun, 17 Nov 2013 03:05:17 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id on2si5587172vcb.15.2013.11.17.03.05.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Nov 2013 03:05:17 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 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.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so2853048vcb.23 for ; Sun, 17 Nov 2013 03:05:17 -0800 (PST) X-Received: by 10.220.17.131 with SMTP id s3mr1471639vca.20.1384686317124; Sun, 17 Nov 2013 03:05:17 -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 u4csp140403vcz; Sun, 17 Nov 2013 03:05:16 -0800 (PST) X-Received: by 10.180.95.202 with SMTP id dm10mr12964884wib.62.1384686316142; Sun, 17 Nov 2013 03:05:16 -0800 (PST) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by mx.google.com with ESMTPS id d8si2255284wiv.76.2013.11.17.03.05.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Nov 2013 03:05:16 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.42 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.42; Received: by mail-wg0-f42.google.com with SMTP id k14so3555034wgh.5 for ; Sun, 17 Nov 2013 03:05:15 -0800 (PST) X-Received: by 10.180.198.115 with SMTP id jb19mr12974912wic.28.1384686315716; Sun, 17 Nov 2013 03:05:15 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id fu1sm13156973wib.8.2013.11.17.03.05.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Nov 2013 03:05:15 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Lee Jones Cc: devicetree@vger.kernel.org, Linus Walleij Subject: [PATCH 21/21] ARM: ux500: move snowball pin configs to device tree Date: Sun, 17 Nov 2013 12:04:10 +0100 Message-Id: <1384686250-10542-22-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.178 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 few remaining snowball pin configurations to the device tree, reference these as hogs to the pin controller until there are real devices that can make use of them. Signed-off-by: Linus Walleij --- arch/arm/boot/dts/ste-snowball.dts | 59 +++++++++++++++++++++++++++++++++ arch/arm/mach-ux500/board-mop500-pins.c | 19 ----------- 2 files changed, 59 insertions(+), 19 deletions(-) diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts index 605188ba30cd..9070c3701c89 100644 --- a/arch/arm/boot/dts/ste-snowball.dts +++ b/arch/arm/boot/dts/ste-snowball.dts @@ -357,6 +357,16 @@ }; pinctrl { + /* + * Set this up using hogs, as time goes by and as seems fit, these + * can be moved over to being controlled by respective device. + */ + pinctrl-names = "default"; + pinctrl-0 = <&accel_snowball_mode>, + <&magneto_snowball_mode>, + <&gbf_snowball_mode>, + <&wlan_snowball_mode>; + ethernet { /* * Mux in "SM" which is used for the @@ -425,6 +435,55 @@ }; }; + accelerometer { + accel_snowball_mode: accel_snowball { + /* Accelerometer lines */ + snowball_cfg1 { + ste,pins = + "GPIO163_C20", /* ACCEL_IRQ1 */ + "GPIO164_B21"; /* ACCEL_IRQ2 */ + ste,config = <&gpio_in_pu>; + }; + }; + }; + magnetometer { + magneto_snowball_mode: magneto_snowball { + snowball_cfg1 { + ste,pins = "GPIO165_C21"; /* MAG_DRDY */ + ste,config = <&gpio_in_pu>; + }; + }; + }; + gbf { + gbf_snowball_mode: gbf_snowball { + /* + * GBF (GPS, Bluetooth, FM-radio) interface, + * pull low to reset state + */ + snowball_cfg1 { + ste,pins = "GPIO171_D23"; /* GBF_ENA_RESET */ + ste,config = <&gpio_out_lo>; + }; + }; + }; + wlan { + wlan_snowball_mode: wlan_snowball { + /* + * Activate this mode with the WLAN chip. + * These are plain GPIO pins used by WLAN + */ + snowball_cfg1 { + ste,pins = + "GPIO161_D21", /* WLAN_PMU_EN */ + "GPIO215_AH13"; /* WLAN_ENA */ + ste,config = <&gpio_out_lo>; + }; + snowball_cfg2 { + ste,pins = "GPIO216_AG12"; /* WLAN_IRQ */ + ste,config = <&gpio_in_pu>; + }; + }; + }; }; mcde@a0350000 { diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index aae9cfcfd56a..ff532ba30610 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c @@ -23,11 +23,6 @@ BIAS(abx500_out_lo, PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, 0)); BIAS(abx500_in_pd, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 1)); BIAS(abx500_in_nopull, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0)); -/* These also force them into GPIO mode */ -BIAS(gpio_in_pu, PIN_INPUT_PULLUP|PIN_GPIOMODE_ENABLED); -BIAS(gpio_out_hi, PIN_OUTPUT_HIGH|PIN_GPIOMODE_ENABLED); -BIAS(gpio_out_lo, PIN_OUTPUT_LOW|PIN_GPIOMODE_ENABLED); - /* We use these to define hog settings that are always done on boot */ #define DB8500_MUX_HOG(group,func) \ PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-db8500", group, func) @@ -296,18 +291,6 @@ static struct pinctrl_map __initdata ab8505_pinmap[] = { AB8505_PIN_HOG("GPIO53_D15", in_pd), }; -static struct pinctrl_map __initdata snowball_pinmap[] = { - /* Accelerometer/Magnetometer */ - DB8500_PIN_HOG("GPIO163_C20", gpio_in_pu), /* ACCEL_IRQ1 */ - DB8500_PIN_HOG("GPIO164_B21", gpio_in_pu), /* ACCEL_IRQ2 */ - DB8500_PIN_HOG("GPIO165_C21", gpio_in_pu), /* MAG_DRDY */ - /* WLAN/GBF */ - DB8500_PIN_HOG("GPIO161_D21", gpio_out_lo), /* WLAN_PMU_EN */ - DB8500_PIN_HOG("GPIO171_D23", gpio_out_hi), /* GBF_ENA */ - DB8500_PIN_HOG("GPIO215_AH13", gpio_out_lo), /* WLAN_ENA */ - DB8500_PIN_HOG("GPIO216_AG12", gpio_in_pu), /* WLAN_IRQ */ -}; - void __init mop500_pinmaps_init(void) { if (machine_is_u8520()) @@ -320,8 +303,6 @@ void __init mop500_pinmaps_init(void) void __init snowball_pinmaps_init(void) { - pinctrl_register_mappings(snowball_pinmap, - ARRAY_SIZE(snowball_pinmap)); pinctrl_register_mappings(ab8500_pinmap, ARRAY_SIZE(ab8500_pinmap)); }