From patchwork Mon Feb 12 21:54:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 128172 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3622372ljc; Mon, 12 Feb 2018 13:56:14 -0800 (PST) X-Google-Smtp-Source: AH8x226KZnuCd1fZlAqxUSJ9nW6Ny5yIyyOK5p9hiaoPJxgCcAzzshAixLl3ZKo7zBUu/NMHCjtj X-Received: by 10.99.127.80 with SMTP id p16mr4099510pgn.144.1518472574534; Mon, 12 Feb 2018 13:56:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518472574; cv=none; d=google.com; s=arc-20160816; b=bscn02POd7E8bnIMMz00iOOFQCddfEDNUySQFdWHVWofNliUNdV5vNVVmJ3P+SeJP0 EiXqHngE4EWiJblifpL8LG/TIV7DZNU2bb7e3JWJUfAoda6nq9hKxSKsMJOpoVKFuaJa 0K/AU7ssbkFksjCTYGkOmV5UNuWsexV837GwZYsEKgNcbkhmGK1UOpiwJiitjDeqeidI FL9y88MStIzp/ON/nDulBCrTOZk5mfZzL2KAyT+pnLA82x/lg0SwbYPQiPbO0TTbXf91 Ui8q5I1jH/J8AbF0MlOFcLCA9G3ZuUJFw5lfWNIAhHcSypLJ9Qj3xDz/GTWQ8BBQBQGZ UksQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=ohkpfYaOI3Dtvzq0pyMsF3KGh+pc9KlXzO9G/iZQF3U=; b=iHQzp80UsgUOGRtWVzJg50y1UJBuhonaSSN8JzRCkCmCbPF6kyZCUhhF+jeesoH7vX JijuPgnzjUfwHYjPhRYVWga1VHy0OklVaT07SRopsN6sZsgszZWkPr4iH80ljxr7Nmsl fVQjEXkuRh773/PI2buqrrsHtyl/uFIqakeoaVhnVKb6GtG1A7aV2I0skJbIDeP8k+gG CbQFIIpUAYIUnVk8XkhJ1idrUNs28dAKb6gcPRttSGrJDFfbMhzxEO1u8ZVCA3irP0I7 H+hzK1oYtr3TBHv9lV2ZJy5japU6+DIbEDVmyKM9j/wN7+simoanOFujq/9O9FIgdCCA ue3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kjfYqc+y; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bg5-v6si4602477plb.822.2018.02.12.13.56.14; Mon, 12 Feb 2018 13:56:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kjfYqc+y; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932404AbeBLV4N (ORCPT + 5 others); Mon, 12 Feb 2018 16:56:13 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:41731 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932109AbeBLV4N (ORCPT ); Mon, 12 Feb 2018 16:56:13 -0500 Received: by mail-lf0-f65.google.com with SMTP id f136so22423219lff.8 for ; Mon, 12 Feb 2018 13:56:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=/AxIR9aHs7vGwBKM9a/XtJMLcwn4APM62aAztIDXWWg=; b=kjfYqc+yVZet+nTSAW4yZRiEhoOYCjPcf+0wNJ1iF9+QrhYsrGBg3CsLvd9ZvXo/Oc u9d2xZJFBVBBICMJUrwYxDCcOwFFJjZvT+YdMvj5OLVOXhgbt5IHi0rIML05iym2Hxul WFx4reWcoSshzATs4kDSA/nd9v+1h7C9qqvII= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/AxIR9aHs7vGwBKM9a/XtJMLcwn4APM62aAztIDXWWg=; b=lpj9HHI/NpRT34li7m24JS5g2Wb50sK6BxNZ6NK4im+1MkYz2vJ0g6n2h2ldcEXI08 vowWC2geCKXwAXxU7RJXHfctoWr6qBBninxXRKGLkwbyoP9dl1Vk1tGvz9uTfvZEucM7 Dj3q/6KJOjPTlkkOOgBY28QdMZB7OW9tz/AN8029o8WKVjnBQFcEIvM0v/o/pmkIsf5S +Ty/z/gb9wZzsUAz6GbjY8xYEFgZFr1Vs/i+yqGYqHWRcxShS4B8XRJW6u3TEZNEytoS 8x9cIDV2kai0gK0AGiPaCLV4CfIuefGkcG6VtPvE0IDxZVzUP/4eAnjKZa1Sxxs2fe3x Is3A== X-Gm-Message-State: APf1xPD1Tlfa4305yeWNxZQuqutbGClJfbk8Nk1PY99eYgjrKeJIXAVx 0/CH4eZTAtZQGsi6dWrlZrdxHUYByWQ= X-Received: by 10.25.196.66 with SMTP id u63mr164440lff.108.1518472571542; Mon, 12 Feb 2018 13:56:11 -0800 (PST) Received: from localhost.localdomain (c-cb7471d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.116.203]) by smtp.gmail.com with ESMTPSA id p14sm410652lje.56.2018.02.12.13.56.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 13:56:10 -0800 (PST) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij Subject: [PATCH] pinctrl: nomadik: add USB functions for STn8815 Date: Mon, 12 Feb 2018 22:54:06 +0100 Message-Id: <20180212215406.10987-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The MUSB block in the Nomadik has two pin settings: high speed or full speed. These correspond to two unique pin group settings: all pins set to function B for high speed and all set to function C for full speed. Full speed uses more pins than high speed. Signed-off-by: Linus Walleij --- drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c b/drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c index 7e814764da7d..8d944bb3a036 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c @@ -291,7 +291,17 @@ static const unsigned i2cusb_b_1_pins[] = { STN8815_PIN_C21, STN8815_PIN_C20 }; static const unsigned clcd_16_23_b_1_pins[] = { STN8815_PIN_AB6, STN8815_PIN_AA6, STN8815_PIN_Y6, STN8815_PIN_Y5, STN8815_PIN_AA5, STN8815_PIN_AB5, STN8815_PIN_AB4, STN8815_PIN_Y4 }; - +/* Full-speed and high-speed USB pins */ +static const unsigned usbfs_b_1_pins[] = { STN8815_PIN_E21, STN8815_PIN_E20, + STN8815_PIN_C22, STN8815_PIN_D21, + STN8815_PIN_D20, STN8815_PIN_C21, + STN8815_PIN_C20 }; +static const unsigned usbhs_c_1_pins[] = { STN8815_PIN_E21, STN8815_PIN_E20, + STN8815_PIN_C20, STN8815_PIN_C19, + STN8815_PIN_C22, STN8815_PIN_D21, + STN8815_PIN_D20, STN8815_PIN_C21, + STN8815_PIN_C16, STN8815_PIN_A15, + STN8815_PIN_D17, STN8815_PIN_C17 }; #define STN8815_PIN_GROUP(a, b) { .name = #a, .pins = a##_pins, \ .npins = ARRAY_SIZE(a##_pins), .altsetting = b } @@ -308,6 +318,8 @@ static const struct nmk_pingroup nmk_stn8815_groups[] = { STN8815_PIN_GROUP(u1_b_1, NMK_GPIO_ALT_B), STN8815_PIN_GROUP(i2cusb_b_1, NMK_GPIO_ALT_B), STN8815_PIN_GROUP(clcd_16_23_b_1, NMK_GPIO_ALT_B), + STN8815_PIN_GROUP(usbfs_b_1, NMK_GPIO_ALT_B), + STN8815_PIN_GROUP(usbhs_c_1, NMK_GPIO_ALT_C), }; /* We use this macro to define the groups applicable to a function */ @@ -321,6 +333,7 @@ STN8815_FUNC_GROUPS(i2c1, "i2c1_a_1"); STN8815_FUNC_GROUPS(i2c0, "i2c0_a_1"); STN8815_FUNC_GROUPS(i2cusb, "i2cusb_b_1"); STN8815_FUNC_GROUPS(clcd, "clcd_16_23_b_1"); +STN8815_FUNC_GROUPS(usb, "usbfs_b_1", "usbhs_c_1"); #define FUNCTION(fname) \ { \ @@ -337,6 +350,7 @@ static const struct nmk_function nmk_stn8815_functions[] = { FUNCTION(i2c0), FUNCTION(i2cusb), FUNCTION(clcd), + FUNCTION(usb), }; static const struct nmk_pinctrl_soc_data nmk_stn8815_soc = {