From patchwork Mon Jun 25 00:12:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 10484945 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8CA8660230 for ; Mon, 25 Jun 2018 00:12:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D12E28829 for ; Mon, 25 Jun 2018 00:12:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7050E28866; Mon, 25 Jun 2018 00:12:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2539628829 for ; Mon, 25 Jun 2018 00:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752292AbeFYAMu (ORCPT ); Sun, 24 Jun 2018 20:12:50 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:33781 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752206AbeFYAMp (ORCPT ); Sun, 24 Jun 2018 20:12:45 -0400 Received: by mail-io0-f196.google.com with SMTP id d185-v6so10869412ioe.0; Sun, 24 Jun 2018 17:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9r+ru1ywI/e2TZrMJcUkUD6xUsM9cUvPEXew8YntCMw=; b=qq+t8ybkNxFlpQmb6OXsmDFJRkeMeky3sannldtPngjL7XQyw07o/A2JA2Gn8lTfuP FjHht+nPgKVuYBxH75klvzVdbfgL2QeqvP0CToZHGauaWIG1isarpFnIe8AGYiaGjbmU waYb35FOn/GN90reCXRxTuyfk9ubJ9OhhHnJyZ9XL9B7n9on4rbu40RvgBdUsLN/+Xr/ IAwUgTClQ+9o8BtECaDBuc8d8L1cU9B6fYfcDc/i+TTrgbo/LROB1rCtu91J16/cVpAj bemDs0gBFmYuqTdbDI6bvg7PLE+nvLhRJHpDQBm8Lr89TYZ8D0GduIDwI1/M0roAChG+ oDCg== 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:in-reply-to :references; bh=9r+ru1ywI/e2TZrMJcUkUD6xUsM9cUvPEXew8YntCMw=; b=DZf3vvJ0E/DeZTke0IcqiUcABGUarWPdeEb8548yLEFducI2K12OS9FP36Zng1lTdt sQ0GRjnkCTidjHVle7bTimLTo3jm+3beh1smJWYK7AhQvHsyuRBYftDaIvq+HMB9CDOc tJtSCKK/ftL4DNOqT2MPrakUeIK+HJ8Pp9AbRNLKrswI+skBv7fk0r/PQINPV9n0T8z7 6w5SLV2RrKPMgXHX7WEEhv5FUxxdlFhh5tKsXZCUIq5NNz3BAq0i2xaHKvnMcAa+h4b8 jFQkLPOyk1OgRRiIXOy03xW7wmVZGQv098P3OEDzHVmWQF9zrA9Y3iD0gEVvUrSLPRrJ GrDA== X-Gm-Message-State: APt69E3GFeYF30GwEhVGmDbnBoI2f+GN5I4hRgMPybAjmtxfDxKb3E69 FXHFYFoutJPCF4GPd7yRCfc= X-Google-Smtp-Source: ADUXVKIKsKPWsbHsDDeAGDh0MbG0JBQRG0J/Qyo+UqcKCwtaIRDnd2m2DiJnpwopLT9b8lqQO1kZ7A== X-Received: by 2002:a6b:33d1:: with SMTP id z200-v6mr9159329ioz.112.1529885563977; Sun, 24 Jun 2018 17:12:43 -0700 (PDT) Received: from localhost.localdomain (c-75-73-34-135.hsd1.mn.comcast.net. [75.73.34.135]) by smtp.gmail.com with ESMTPSA id g191-v6sm3290340itg.0.2018.06.24.17.12.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jun 2018 17:12:43 -0700 (PDT) From: Adam Ford To: adam.ford@logicpd.com Cc: bcousson@baylibre.com, tony@atomide.com, robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, b-liu@ti.com, gregkh@linuxfoundation.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, Adam Ford Subject: [RFC 3/5] ARM: OMAP2+: Add AM3517 MUSB setup to pdata quirks. Date: Sun, 24 Jun 2018 19:12:31 -0500 Message-Id: <20180625001233.9785-4-aford173@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180625001233.9785-1-aford173@gmail.com> References: <20180625001233.9785-1-aford173@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The pin muxing and clock definitions for the MUSB controller are not done through the same registers/pin mux options, so this explicitly configures the registers and pin-mux options for MUSB on AM3517-EVM Signed-off-by: Adam Ford diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 7f02743edbe4..e0c7ac2c87c1 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -258,9 +258,28 @@ static void __init omap3_sbc_t3517_legacy_init(void) omap3_sbc_t3517_wifi_init(); } +/* The pin muxing for AM3517 OTG isn't done through the normal means */ +static __init void am3517_evm_musb_init(void) +{ + u32 devconf2; + + /* + * Set up USB clock/mode in the DEVCONF2 register. + */ + devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); + + /* USB2.0 PHY reference clock is 13 MHz */ + devconf2 &= ~(CONF2_REFFREQ | CONF2_OTGMODE | CONF2_PHY_GPIOMODE); + devconf2 |= CONF2_REFFREQ_13MHZ | CONF2_SESENDEN | CONF2_VBDTCTEN + | CONF2_DATPOL; + + omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); +} + static void __init am3517_evm_legacy_init(void) { am35xx_emac_reset(); + am3517_evm_musb_init(); } static struct platform_device omap3_rom_rng_device = {