From patchwork Mon Aug 31 12:56:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 11746371 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C5D4138A for ; Mon, 31 Aug 2020 13:21:49 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0535B204FD for ; Mon, 31 Aug 2020 13:21:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hP2fhhyz"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="R48jdp1I"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="PTnLbvIm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0535B204FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=geanix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=oB4/jfbz+GLUOT7eV/Vwo8XUlGPXWDM2q84T64133K0=; b=hP2fhhyzfoBRA/UjBkmU7fzQaR ETeX/cIe+UOx1LCZoRAJfgO2L+GF6Xo0dJnZRLc/GoYQVXtMJEmC36Tem8aBdCuOXdtmbnm62YaB3 oVrFJZT/FNf1crB76PGFvlD8MgGKLoji9XCRxAb4Zu6sI0qIsqksmwt5RcwZBIPJ8geHH2gLWiDwK 14LDkY0WaH3ckJkxjus8i2BO+Q/OS7TH8idKv3KgVIa20Ad1XPgadRj7RTZVdCWeExHbX4tYt8bgL t59y0cY3LHlAakZrYVfpfuAgl8HNm5jGUNLw4xM+CAAo7gjDoH0ZIgU6JRJgLpZO5KVXMXY43B0BJ tbErdcTA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCjka-0001py-Do; Mon, 31 Aug 2020 13:21:32 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCjju-0001Jk-PK for linux-arm-kernel@merlin.infradead.org; Mon, 31 Aug 2020 13:20:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=iaiNE12celyyjXfj5+k390/CzfM25lN6DF93kfZbRaU=; b=R48jdp1Idahutp0eE+zJDBUVjT 42QbqauJqLav3+hb/TxKfz1nPIDFeayvto2S/m0iUXXDLiCUUSdgTQo+GouTFftATO88FWu3Ao95H M2BWQB9tRvxaZmhY6kdMiSc3bWmOopcOzIAIIk699CF7iXEZpZN4qGqsU7pcaXHY/nt8hllR9viMp LLk390YJLC2phYK3viWh4Tl/l3GZD52LRd8v05y2vKnHxAJ8fUfAYXXnbPXPmV5VFmjMJfG0HEGDe hJNEYa6qQosdf+VEkLwFcSj0RQqgfY0waA1lXb/SIvdxIuEf18L6WYsSOh3m36Vm9iGSHYiIZRRcR 1GDLl9VA==; Received: from first.geanix.com ([116.203.34.67]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCjMX-0006aU-AI for linux-arm-kernel@lists.infradead.org; Mon, 31 Aug 2020 12:56:43 +0000 Received: from localhost (80-62-117-118-mobile.dk.customer.tdc.net [80.62.117.118]) by first.geanix.com (Postfix) with ESMTPSA id 4922DF046ED; Mon, 31 Aug 2020 12:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1598878595; bh=tu5xZLKP+oYwldtiKJB3m3bJEJQSfCGcKVq5GaIDaik=; h=From:To:Cc:Subject:Date; b=PTnLbvIm5xFQMPRaGH5L+dkkGn7Xw7eia4ou3ORpUkdj2zvbZF+QKxDeFE2iCC/u9 1kMV/9KrnfEZUu9sVy1f/UJGOG+/32f8V8TDkjlK0q9JgjW0LfB6W607XR0Ps7qByz FIog7xP90Yuf4O3MZ9De2P9A3LeT1JyEU8k7Hudrd+eL4R0PgsXoKb3mOBC3QzusnE jrsyrJwrS5hmMLvsv0pm1foe6qTVI7m3X+sSs+4+6PUdSfjzoMBy7RgWDdCX7Zceew uQudgqasM0lBEiwIiIOkdu/OaEwuR1n4LbTBPaRkqBOd47LEymdpqDMCYheDHaSy7G IeGzboYvZAohw== From: Esben Haabendal To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: davinci: mityomapl138: enable USB1 port Date: Mon, 31 Aug 2020 14:56:34 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Spam-Status: No, score=-3.1 required=4.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ff3d05386fc5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200831_135641_777407_00AE0B9C X-CRM114-Status: GOOD ( 10.01 ) X-Spam-Score: -2.1 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Williamson , Tim Iskander Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Tim Iskander Turn on the USB1 (USB 1.1) port by default for MityDSP-L138F family of SOMs. It is available on the SO-DIMM-200 connector. Signed-off-by: Tim Iskander Signed-off-by: Michael Williamson Signed-off-by: Esben Haabendal --- arch/arm/mach-davinci/board-mityomapl138.c | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 3382b93d9a2a..489f2dc0cf33 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -554,6 +554,35 @@ static void __init mityomapl138_config_emac(void) pr_warn("emac registration failed: %d\n", ret); } +static int mityomapl138_ocic_notify(da8xx_ocic_handler_t handler) +{ + return 0; +} + +static struct da8xx_ohci_root_hub mityomapl138_usb11_pdata = { + .set_power = 0, + .get_power = 0, + .get_oci = 0, + .ocic_notify = mityomapl138_ocic_notify, + .potpgt = 0, +}; + +static __init void mityomapl138_usb_init(void) +{ + int ret; + u32 cfgchip2; + + /* Setup the Ref. clock frequency for the MityDSP-L138 at 24 MHz. */ + cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)); + cfgchip2 &= ~CFGCHIP2_REFFREQ; + cfgchip2 |= CFGCHIP2_REFFREQ_24MHZ; + __raw_writel(cfgchip2, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)); + + ret = da8xx_register_usb11(&mityomapl138_usb11_pdata); + if (ret) + pr_warn("USB1 registration failed: %d\n", ret); +} + static void __init mityomapl138_init(void) { int ret; @@ -605,6 +634,8 @@ static void __init mityomapl138_init(void) if (ret) pr_warn("cpuidle registration failed: %d\n", ret); + mityomapl138_usb_init(); + davinci_pm_init(); }