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: 872415 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="kjfYqc+y"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zgKHf6pqqz9s7M for ; Tue, 13 Feb 2018 08:56:14 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932404AbeBLV4N (ORCPT ); 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-Google-Smtp-Source: AH8x2244Lm7VMxJhzxraeOmGJQUMwU1SmILdgx2nbCev+gIppWdpBdou0BK6R4hwPcdyhmnPodovyw== 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(-) 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 = {