From patchwork Wed Aug 22 20:42:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A0E44139B for ; Wed, 22 Aug 2018 20:44:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E99D2B052 for ; Wed, 22 Aug 2018 20:44:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 823EC2BB0E; Wed, 22 Aug 2018 20:44:32 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BD5322B052 for ; Wed, 22 Aug 2018 20:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=WCYrNX56MmviaSfXr7KhrW1HnolLz4FC7Ba9Qg1Sr6A=; b=cAKCFdz174p5u0x+iN4YDnBfLY Vp7MhackQoRw3ujMaPTdqLgnrzlLAeI35dmf+TfjvHkBW9ig3VlhKdYjPbqO5o6lo/N/97wOEM8pl i/FCOgETELwvbiHwsBaOi3CRaAuz4BSgzwF587wK1959VFpBHS59FQxexXvHPKuoStwf6ZNYMTYl/ n2L93cYjkQkmSQtulMyhZ9JKFi4G5ICQHg2gNGRo0eP5NTWbRHX0pre+IWrPZMcIs85IhKqdhgQKH rRWRbD0dFgTv5wV/CyUjKixNXTda1w9r4zNFVwrYtiumZicLjSM/NGtDQYxzc7tz8rFr+R2i5z8yS dh6KbQrQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZzO-00023G-Q8; Wed, 22 Aug 2018 20:44:26 +0000 Received: from shell.v3.sk ([90.176.6.54]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZyd-00014G-NJ for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:44:10 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id BDB48B5BAA; Wed, 22 Aug 2018 22:43:29 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id zyL9uXf5Pqtw; Wed, 22 Aug 2018 22:43:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id B1826B5B89; Wed, 22 Aug 2018 22:43:11 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Kieu4v-5ge8T; Wed, 22 Aug 2018 22:43:10 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 77793B5B8A; Wed, 22 Aug 2018 22:43:10 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 01/14] phy: phy-pxa-usb: add a new driver Date: Wed, 22 Aug 2018 22:42:54 +0200 Message-Id: <20180822204307.13251-2-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_134340_931407_EE8040A7 X-CRM114-Status: GOOD ( 17.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Turned from arch/arm/mach-mmp/devices.c into a proper PHY driver, so that in can be instantiated from a DT. Signed-off-by: Lubomir Rintel Acked-by: Kishon Vijay Abraham I --- drivers/phy/marvell/Kconfig | 11 + drivers/phy/marvell/Makefile | 1 + drivers/phy/marvell/phy-pxa-usb.c | 345 ++++++++++++++++++++++++++++++ 3 files changed, 357 insertions(+) create mode 100644 drivers/phy/marvell/phy-pxa-usb.c diff --git a/drivers/phy/marvell/Kconfig b/drivers/phy/marvell/Kconfig index 68e321225400..6fb4b56e4c14 100644 --- a/drivers/phy/marvell/Kconfig +++ b/drivers/phy/marvell/Kconfig @@ -59,3 +59,14 @@ config PHY_PXA_28NM_USB2 The PHY driver will be used by Marvell udc/ehci/otg driver. To compile this driver as a module, choose M here. + +config PHY_PXA_USB + tristate "Marvell PXA USB PHY Driver" + depends on ARCH_PXA || ARCH_MMP + select GENERIC_PHY + help + Enable this to support Marvell PXA USB PHY driver for Marvell + SoC. This driver will do the PHY initialization and shutdown. + The PHY driver will be used by Marvell udc/ehci/otg driver. + + To compile this driver as a module, choose M here. diff --git a/drivers/phy/marvell/Makefile b/drivers/phy/marvell/Makefile index 5c3ec5d10e0d..3975b144f8ec 100644 --- a/drivers/phy/marvell/Makefile +++ b/drivers/phy/marvell/Makefile @@ -6,3 +6,4 @@ obj-$(CONFIG_PHY_MVEBU_CP110_COMPHY) += phy-mvebu-cp110-comphy.o obj-$(CONFIG_PHY_MVEBU_SATA) += phy-mvebu-sata.o obj-$(CONFIG_PHY_PXA_28NM_HSIC) += phy-pxa-28nm-hsic.o obj-$(CONFIG_PHY_PXA_28NM_USB2) += phy-pxa-28nm-usb2.o +obj-$(CONFIG_PHY_PXA_USB) += phy-pxa-usb.o diff --git a/drivers/phy/marvell/phy-pxa-usb.c b/drivers/phy/marvell/phy-pxa-usb.c new file mode 100644 index 000000000000..87ff7550b912 --- /dev/null +++ b/drivers/phy/marvell/phy-pxa-usb.c @@ -0,0 +1,345 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2011 Marvell International Ltd. All rights reserved. + * Copyright (C) 2018 Lubomir Rintel + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* phy regs */ +#define UTMI_REVISION 0x0 +#define UTMI_CTRL 0x4 +#define UTMI_PLL 0x8 +#define UTMI_TX 0xc +#define UTMI_RX 0x10 +#define UTMI_IVREF 0x14 +#define UTMI_T0 0x18 +#define UTMI_T1 0x1c +#define UTMI_T2 0x20 +#define UTMI_T3 0x24 +#define UTMI_T4 0x28 +#define UTMI_T5 0x2c +#define UTMI_RESERVE 0x30 +#define UTMI_USB_INT 0x34 +#define UTMI_DBG_CTL 0x38 +#define UTMI_OTG_ADDON 0x3c + +/* For UTMICTRL Register */ +#define UTMI_CTRL_USB_CLK_EN (1 << 31) +/* pxa168 */ +#define UTMI_CTRL_SUSPEND_SET1 (1 << 30) +#define UTMI_CTRL_SUSPEND_SET2 (1 << 29) +#define UTMI_CTRL_RXBUF_PDWN (1 << 24) +#define UTMI_CTRL_TXBUF_PDWN (1 << 11) + +#define UTMI_CTRL_INPKT_DELAY_SHIFT 30 +#define UTMI_CTRL_INPKT_DELAY_SOF_SHIFT 28 +#define UTMI_CTRL_PU_REF_SHIFT 20 +#define UTMI_CTRL_ARC_PULLDN_SHIFT 12 +#define UTMI_CTRL_PLL_PWR_UP_SHIFT 1 +#define UTMI_CTRL_PWR_UP_SHIFT 0 + +/* For UTMI_PLL Register */ +#define UTMI_PLL_PLLCALI12_SHIFT 29 +#define UTMI_PLL_PLLCALI12_MASK (0x3 << 29) + +#define UTMI_PLL_PLLVDD18_SHIFT 27 +#define UTMI_PLL_PLLVDD18_MASK (0x3 << 27) + +#define UTMI_PLL_PLLVDD12_SHIFT 25 +#define UTMI_PLL_PLLVDD12_MASK (0x3 << 25) + +#define UTMI_PLL_CLK_BLK_EN_SHIFT 24 +#define CLK_BLK_EN (0x1 << 24) +#define PLL_READY (0x1 << 23) +#define KVCO_EXT (0x1 << 22) +#define VCOCAL_START (0x1 << 21) + +#define UTMI_PLL_KVCO_SHIFT 15 +#define UTMI_PLL_KVCO_MASK (0x7 << 15) + +#define UTMI_PLL_ICP_SHIFT 12 +#define UTMI_PLL_ICP_MASK (0x7 << 12) + +#define UTMI_PLL_FBDIV_SHIFT 4 +#define UTMI_PLL_FBDIV_MASK (0xFF << 4) + +#define UTMI_PLL_REFDIV_SHIFT 0 +#define UTMI_PLL_REFDIV_MASK (0xF << 0) + +/* For UTMI_TX Register */ +#define UTMI_TX_REG_EXT_FS_RCAL_SHIFT 27 +#define UTMI_TX_REG_EXT_FS_RCAL_MASK (0xf << 27) + +#define UTMI_TX_REG_EXT_FS_RCAL_EN_SHIFT 26 +#define UTMI_TX_REG_EXT_FS_RCAL_EN_MASK (0x1 << 26) + +#define UTMI_TX_TXVDD12_SHIFT 22 +#define UTMI_TX_TXVDD12_MASK (0x3 << 22) + +#define UTMI_TX_CK60_PHSEL_SHIFT 17 +#define UTMI_TX_CK60_PHSEL_MASK (0xf << 17) + +#define UTMI_TX_IMPCAL_VTH_SHIFT 14 +#define UTMI_TX_IMPCAL_VTH_MASK (0x7 << 14) + +#define REG_RCAL_START (0x1 << 12) + +#define UTMI_TX_LOW_VDD_EN_SHIFT 11 + +#define UTMI_TX_AMP_SHIFT 0 +#define UTMI_TX_AMP_MASK (0x7 << 0) + +/* For UTMI_RX Register */ +#define UTMI_REG_SQ_LENGTH_SHIFT 15 +#define UTMI_REG_SQ_LENGTH_MASK (0x3 << 15) + +#define UTMI_RX_SQ_THRESH_SHIFT 4 +#define UTMI_RX_SQ_THRESH_MASK (0xf << 4) + +#define UTMI_OTG_ADDON_OTG_ON (1 << 0) + +enum pxa_usb_phy_version { + PXA_USB_PHY_MMP2, + PXA_USB_PHY_PXA910, + PXA_USB_PHY_PXA168, +}; + +struct pxa_usb_phy { + struct phy *phy; + void __iomem *base; + enum pxa_usb_phy_version version; +}; + +/***************************************************************************** + * The registers read/write routines + *****************************************************************************/ + +static unsigned int u2o_get(void __iomem *base, unsigned int offset) +{ + return readl_relaxed(base + offset); +} + +static void u2o_set(void __iomem *base, unsigned int offset, + unsigned int value) +{ + u32 reg; + + reg = readl_relaxed(base + offset); + reg |= value; + writel_relaxed(reg, base + offset); + readl_relaxed(base + offset); +} + +static void u2o_clear(void __iomem *base, unsigned int offset, + unsigned int value) +{ + u32 reg; + + reg = readl_relaxed(base + offset); + reg &= ~value; + writel_relaxed(reg, base + offset); + readl_relaxed(base + offset); +} + +static void u2o_write(void __iomem *base, unsigned int offset, + unsigned int value) +{ + writel_relaxed(value, base + offset); + readl_relaxed(base + offset); +} + +static int pxa_usb_phy_init(struct phy *phy) +{ + struct pxa_usb_phy *pxa_usb_phy = phy_get_drvdata(phy); + void __iomem *base = pxa_usb_phy->base; + int loops; + + dev_info(&phy->dev, "initializing Marvell PXA USB PHY"); + + /* Initialize the USB PHY power */ + if (pxa_usb_phy->version == PXA_USB_PHY_PXA910) { + u2o_set(base, UTMI_CTRL, (1<version == PXA_USB_PHY_PXA168) { + /* + * fixing Microsoft Altair board interface with NEC hub issue - + * Set UTMI_IVREF from 0x4a3 to 0x4bf + */ + u2o_write(base, UTMI_IVREF, 0x4bf); + } + + /* toggle VCOCAL_START bit of UTMI_PLL */ + udelay(200); + u2o_set(base, UTMI_PLL, VCOCAL_START); + udelay(40); + u2o_clear(base, UTMI_PLL, VCOCAL_START); + + /* toggle REG_RCAL_START bit of UTMI_TX */ + udelay(400); + u2o_set(base, UTMI_TX, REG_RCAL_START); + udelay(40); + u2o_clear(base, UTMI_TX, REG_RCAL_START); + udelay(400); + + /* Make sure PHY PLL is ready */ + loops = 0; + while ((u2o_get(base, UTMI_PLL) & PLL_READY) == 0) { + mdelay(1); + loops++; + if (loops > 100) { + dev_warn(&phy->dev, "calibrate timeout, UTMI_PLL %x\n", + u2o_get(base, UTMI_PLL)); + break; + } + } + + if (pxa_usb_phy->version == PXA_USB_PHY_PXA168) { + u2o_set(base, UTMI_RESERVE, 1 << 5); + /* Turn on UTMI PHY OTG extension */ + u2o_write(base, UTMI_OTG_ADDON, 1); + } + + return 0; + +} + +static int pxa_usb_phy_exit(struct phy *phy) +{ + struct pxa_usb_phy *pxa_usb_phy = phy_get_drvdata(phy); + void __iomem *base = pxa_usb_phy->base; + + dev_info(&phy->dev, "deinitializing Marvell PXA USB PHY"); + + if (pxa_usb_phy->version == PXA_USB_PHY_PXA168) + u2o_clear(base, UTMI_OTG_ADDON, UTMI_OTG_ADDON_OTG_ON); + + u2o_clear(base, UTMI_CTRL, UTMI_CTRL_RXBUF_PDWN); + u2o_clear(base, UTMI_CTRL, UTMI_CTRL_TXBUF_PDWN); + u2o_clear(base, UTMI_CTRL, UTMI_CTRL_USB_CLK_EN); + u2o_clear(base, UTMI_CTRL, 1<dev; + struct resource *resource; + struct pxa_usb_phy *pxa_usb_phy; + struct phy_provider *provider; + const struct of_device_id *of_id; + + pxa_usb_phy = devm_kzalloc(dev, sizeof(struct pxa_usb_phy), GFP_KERNEL); + if (!pxa_usb_phy) + return -ENOMEM; + + of_id = of_match_node(pxa_usb_phy_of_match, dev->of_node); + if (of_id) + pxa_usb_phy->version = (enum pxa_usb_phy_version)of_id->data; + else + pxa_usb_phy->version = PXA_USB_PHY_MMP2; + + resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); + pxa_usb_phy->base = devm_ioremap_resource(dev, resource); + if (IS_ERR(pxa_usb_phy->base)) { + dev_err(dev, "failed to remap PHY regs\n"); + return PTR_ERR(pxa_usb_phy->base); + } + + pxa_usb_phy->phy = devm_phy_create(dev, NULL, &pxa_usb_phy_ops); + if (IS_ERR(pxa_usb_phy->phy)) { + dev_err(dev, "failed to create PHY\n"); + return PTR_ERR(pxa_usb_phy->phy); + } + + phy_set_drvdata(pxa_usb_phy->phy, pxa_usb_phy); + provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); + if (IS_ERR(provider)) { + dev_err(dev, "failed to register PHY provider\n"); + return PTR_ERR(provider); + } + + if (!dev->of_node) { + phy_create_lookup(pxa_usb_phy->phy, "usb", "mv-udc"); + phy_create_lookup(pxa_usb_phy->phy, "usb", "pxa-u2oehci"); + phy_create_lookup(pxa_usb_phy->phy, "usb", "mv-otg"); + } + + dev_info(dev, "Marvell PXA USB PHY"); + return 0; +} + +static struct platform_driver pxa_usb_phy_driver = { + .probe = pxa_usb_phy_probe, + .driver = { + .name = "pxa-usb-phy", + .of_match_table = pxa_usb_phy_of_match, + }, +}; +module_platform_driver(pxa_usb_phy_driver); + +MODULE_AUTHOR("Lubomir Rintel "); +MODULE_DESCRIPTION("Marvell PXA USB PHY Driver"); +MODULE_LICENSE("GPL v2"); From patchwork Wed Aug 22 20:42:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573233 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 169A4139B for ; Wed, 22 Aug 2018 20:44:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 047742B052 for ; Wed, 22 Aug 2018 20:44:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA7F72BB0E; Wed, 22 Aug 2018 20:44:40 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A550A2B052 for ; Wed, 22 Aug 2018 20:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=Wlb+IEVQQ25zEzdjlGBL/kWJFMC7tCI+nbSFozGsO/4=; b=Kb+7+5Zxd9Z5aQeLViUok0JKS/ kEh+Es/1tN08jEMJQ3VitrR7b24lPDVuYI+ecopGQkgyYncLqVxasQYVTxF9VAoozL0gunEjt+fZ/ QON4QPaS22my3u2ltqg5LBWpwDmB5hJKg5QqluYj+7D5IwsyXmh1buLr/gndo14fJJikpYcazq8ze 7OCztuQYtXzgietuhjldMQ+3whHdDPAeW0uYS/u+VLSCmds/vjKO6/nNF5tSr9U6jpEdQFMa9QVW4 inJ2JEjySA47a110DyplErPgMj66yT/xVcuN28qwsqVJwROnXlYWEhiHMUOYelQkFTJA8MQOhnz8K 5J4JaiLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZza-0002JV-IE; Wed, 22 Aug 2018 20:44:38 +0000 Received: from shell.v3.sk ([90.176.6.54]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZyf-00013P-3y for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:44:11 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id DE66AB5B0A; Wed, 22 Aug 2018 22:43:23 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 9LU4HOdq9Z5F; Wed, 22 Aug 2018 22:43:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id B8DDEB5AEE; Wed, 22 Aug 2018 22:43:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id antQhvyj8nfX; Wed, 22 Aug 2018 22:43:11 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id D7B20B5B8B; Wed, 22 Aug 2018 22:43:10 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 02/14] dt-bindings: phy-pxa-usb: add bindings Date: Wed, 22 Aug 2018 22:42:55 +0200 Message-Id: <20180822204307.13251-3-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_134341_664367_074CC11B X-CRM114-Status: UNSURE ( 9.97 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is the PHY chip for USB OTG on PXA platforms. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- .../devicetree/bindings/phy/phy-pxa-usb.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-pxa-usb.txt diff --git a/Documentation/devicetree/bindings/phy/phy-pxa-usb.txt b/Documentation/devicetree/bindings/phy/phy-pxa-usb.txt new file mode 100644 index 000000000000..5b12ab44c9e6 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-pxa-usb.txt @@ -0,0 +1,17 @@ +Marvell PXA USB PHY +------------------- + +Required properties: +- compatible: one of: "marvell,mmp2-usb-phy", "marvell,pxa910-usb-phy", + "marvell,pxa168-usb-phy", +- #phy-cells: must be 0 + +Example: + usb-phy: usbphy@d4207000 { + compatible = "marvell,mmp2-usb-phy"; + reg = <0xd4207000 0x40>; + #phy-cells = <0>; + status = "okay"; + }; +This document explains only the device tree data binding. For general +information about PHY subsystem refer to Documentation/phy.txt From patchwork Wed Aug 22 20:42:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573243 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E18BC112E for ; Wed, 22 Aug 2018 20:44:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF4E92BB0E for ; Wed, 22 Aug 2018 20:44:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C33492BC84; Wed, 22 Aug 2018 20:44: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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 52AC12BB0E for ; Wed, 22 Aug 2018 20:44:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=IYIjj7wKBVNkKtvTjYhG+/8SpCr8Ec5wSp3MmocaqmE=; b=fqp13ZKWc4TFLUDAy+DTkAj7Wq PP3wo8YRX/fWSgdQ6VWKvlXH+QtoIcyxSGCf4Blxpz3PI48MgaL+7WXHz+tAa1RRRMZX3Tn0xMfC2 oq8ntqsUbxu7gm8PyiWK5mTF4v+anT0vPG9YFbd2q0X5ukscPAXCLXbJkeTd7R9fu97OFFVzjtuP/ 8vG+al0h07XCll2lbC5Ub468Mrm2BqYqHSb7zdsFzzTZ9WWyYX1EGVr2aUWCrSU8+/t3faegLtGbw 9VO9vsKCGcE4NZ3Dwx30yFWa/mQu7+PTCdPP5VE99Vptkvx5Cxn+lJa12XLEzyaoeZwqHcNL+g0xV IyEQh02A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZzl-0002YF-Q5; Wed, 22 Aug 2018 20:44:49 +0000 Received: from shell.v3.sk ([90.176.6.54]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZye-00014P-Bk for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:44:13 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 6F77EB5B8E; Wed, 22 Aug 2018 22:43:31 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id YV8KnsStwmzd; Wed, 22 Aug 2018 22:43:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id ABBE6B5B91; Wed, 22 Aug 2018 22:43:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FX4bSI4UgD7e; Wed, 22 Aug 2018 22:43:11 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 51912B5B8D; Wed, 22 Aug 2018 22:43:11 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 03/14] USB: EHCI: make ehci-mv a separate driver Date: Wed, 22 Aug 2018 22:42:56 +0200 Message-Id: <20180822204307.13251-4-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_134341_564911_DA1BDC27 X-CRM114-Status: GOOD ( 15.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is done do that it could be enabled alongside other platform EHCI glue drivers on multiplatform kernels. Signed-off-by: Lubomir Rintel --- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-hcd.c | 5 -- drivers/usb/host/ehci-mv.c | 98 ++++++++++++++++--------------------- 4 files changed, 44 insertions(+), 62 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 1a4ea98cac2a..16758b12a5e9 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -276,7 +276,7 @@ config USB_EHCI_EXYNOS Enable support for the Samsung Exynos SOC's on-chip EHCI controller. config USB_EHCI_MV - bool "EHCI support for Marvell PXA/MMP USB controller" + tristate "EHCI support for Marvell PXA/MMP USB controller" depends on (ARCH_PXA || ARCH_MMP) select USB_EHCI_ROOT_HUB_TT ---help--- diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index e6235269c151..84514f71ae44 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -87,6 +87,7 @@ obj-$(CONFIG_USB_IMX21_HCD) += imx21-hcd.o obj-$(CONFIG_USB_FSL_USB2) += fsl-mph-dr-of.o obj-$(CONFIG_USB_EHCI_FSL) += fsl-mph-dr-of.o obj-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o +obj-$(CONFIG_USB_EHCI_MV) += ehci-mv.o obj-$(CONFIG_USB_HCD_BCMA) += bcma-hcd.o obj-$(CONFIG_USB_HCD_SSB) += ssb-hcd.o obj-$(CONFIG_USB_FOTG210_HCD) += fotg210-hcd.o diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 8608ac513fb7..e8d7667828eb 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1286,11 +1286,6 @@ MODULE_LICENSE ("GPL"); #define PLATFORM_DRIVER ehci_grlib_driver #endif -#ifdef CONFIG_USB_EHCI_MV -#include "ehci-mv.c" -#define PLATFORM_DRIVER ehci_mv_driver -#endif - static int __init ehci_hcd_init(void) { int retval = 0; diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c index de764459e05a..77a4ab1dcd07 100644 --- a/drivers/usb/host/ehci-mv.c +++ b/drivers/usb/host/ehci-mv.c @@ -12,12 +12,17 @@ #include #include #include +#include + +#include + +#include "ehci.h" #define CAPLENGTH_MASK (0xff) -struct ehci_hcd_mv { - struct usb_hcd *hcd; +#define hcd_to_ehci_hcd_mv(h) ((struct ehci_hcd_mv *)hcd_to_ehci(h)->priv) +struct ehci_hcd_mv { /* Which mode does this ehci running OTG/Host ? */ int mode; @@ -66,7 +71,7 @@ static void mv_ehci_disable(struct ehci_hcd_mv *ehci_mv) static int mv_ehci_reset(struct usb_hcd *hcd) { struct device *dev = hcd->self.controller; - struct ehci_hcd_mv *ehci_mv = dev_get_drvdata(dev); + struct ehci_hcd_mv *ehci_mv = hcd_to_ehci_hcd_mv(hcd); int retval; if (ehci_mv == NULL) { @@ -83,46 +88,11 @@ static int mv_ehci_reset(struct usb_hcd *hcd) return retval; } -static const struct hc_driver mv_ehci_hc_driver = { - .description = hcd_name, - .product_desc = "Marvell EHCI", - .hcd_priv_size = sizeof(struct ehci_hcd), - - /* - * generic hardware linkage - */ - .irq = ehci_irq, - .flags = HCD_MEMORY | HCD_USB2 | HCD_BH, - - /* - * basic lifecycle operations - */ - .reset = mv_ehci_reset, - .start = ehci_run, - .stop = ehci_stop, - .shutdown = ehci_shutdown, - - /* - * managing i/o requests and associated device resources - */ - .urb_enqueue = ehci_urb_enqueue, - .urb_dequeue = ehci_urb_dequeue, - .endpoint_disable = ehci_endpoint_disable, - .endpoint_reset = ehci_endpoint_reset, - .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, - - /* - * scheduling support - */ - .get_frame_number = ehci_get_frame, - - /* - * root hub support - */ - .hub_status_data = ehci_hub_status_data, - .hub_control = ehci_hub_control, - .bus_suspend = ehci_bus_suspend, - .bus_resume = ehci_bus_resume, +static struct hc_driver __read_mostly ehci_platform_hc_driver; + +static const struct ehci_driver_overrides platform_overrides __initconst = { + .reset = mv_ehci_reset, + .extra_priv_size = sizeof(struct ehci_hcd_mv), }; static int mv_ehci_probe(struct platform_device *pdev) @@ -143,19 +113,13 @@ static int mv_ehci_probe(struct platform_device *pdev) if (usb_disabled()) return -ENODEV; - hcd = usb_create_hcd(&mv_ehci_hc_driver, &pdev->dev, "mv ehci"); + hcd = usb_create_hcd(&ehci_platform_hc_driver, &pdev->dev, "mv ehci"); if (!hcd) return -ENOMEM; - ehci_mv = devm_kzalloc(&pdev->dev, sizeof(*ehci_mv), GFP_KERNEL); - if (ehci_mv == NULL) { - retval = -ENOMEM; - goto err_put_hcd; - } - - platform_set_drvdata(pdev, ehci_mv); + platform_set_drvdata(pdev, hcd); + ehci_mv = hcd_to_ehci_hcd_mv(hcd); ehci_mv->pdata = pdata; - ehci_mv->hcd = hcd; ehci_mv->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(ehci_mv->clk)) { @@ -262,8 +226,8 @@ static int mv_ehci_probe(struct platform_device *pdev) static int mv_ehci_remove(struct platform_device *pdev) { - struct ehci_hcd_mv *ehci_mv = platform_get_drvdata(pdev); - struct usb_hcd *hcd = ehci_mv->hcd; + struct usb_hcd *hcd = platform_get_drvdata(pdev); + struct ehci_hcd_mv *ehci_mv = hcd_to_ehci_hcd_mv(hcd); if (hcd->rh_registered) usb_remove_hcd(hcd); @@ -295,8 +259,8 @@ static const struct platform_device_id ehci_id_table[] = { static void mv_ehci_shutdown(struct platform_device *pdev) { - struct ehci_hcd_mv *ehci_mv = platform_get_drvdata(pdev); - struct usb_hcd *hcd = ehci_mv->hcd; + struct usb_hcd *hcd = platform_get_drvdata(pdev); + struct ehci_hcd_mv *ehci_mv = hcd_to_ehci_hcd_mv(hcd); if (!hcd->rh_registered) return; @@ -315,3 +279,25 @@ static struct platform_driver ehci_mv_driver = { }, .id_table = ehci_id_table, }; + +static int __init ehci_platform_init(void) +{ + if (usb_disabled()) + return -ENODEV; + + ehci_init_driver(&ehci_platform_hc_driver, &platform_overrides); + return platform_driver_register(&ehci_mv_driver); +} +module_init(ehci_platform_init); + +static void __exit ehci_platform_cleanup(void) +{ + platform_driver_unregister(&ehci_mv_driver); +} +module_exit(ehci_platform_cleanup); + +MODULE_DESCRIPTION("Marvell EHCI driver"); +MODULE_AUTHOR("Chao Xie "); +MODULE_AUTHOR("Neil Zhang "); +MODULE_ALIAS("mv-ehci"); +MODULE_LICENSE("GPL"); From patchwork Wed Aug 22 20:42:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573225 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 479D4139B for ; Wed, 22 Aug 2018 20:44:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36F212B052 for ; Wed, 22 Aug 2018 20:44:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2ADD42BB0E; Wed, 22 Aug 2018 20:44:19 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D087C2B052 for ; Wed, 22 Aug 2018 20:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=Ame1xXNfb76Wtg2akmTU5hA8s2cXMG3l4EwdjWg9dx8=; b=bWnyVcgs74PMdGd4Sa6TnW0onu +HUPyT0oJCrjHs4DuYDJ452XGa+5EB5gPq9vC65ne/ZdSGNIFQIT1FDbEXDo12+e8Wa/DggwFb7VO YK2ljYePmuZyZoJ8Ip7BEX9GrjaJzv6sD2qoEf2jjYj/QwEvgLotB90Kf1wlazl+Har/Jq295knOo 1K+rNIvuzyblNE2Q++DE4Ez4Ecpu2LFQ6Q5oXRZTv4y3RiM3LsV4qVCRHIvFQcb2XswObecQ1TKKq iCPq2UumRpA1NnQSzmKpq7FHv9SryoAbJc/FDs8HawPfsLmEJ1NcbeV/xglJfV9cIkfpoFlnN16ft lEE0YUkQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZzG-0001tV-0x; Wed, 22 Aug 2018 20:44:18 +0000 Received: from shell.v3.sk ([90.176.6.54]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZyd-00016N-A0 for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:44:03 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id CC3FAB5BAF; Wed, 22 Aug 2018 22:43:33 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Re3kFEHfsQWd; Wed, 22 Aug 2018 22:43:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id AFC54B5B98; Wed, 22 Aug 2018 22:43:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jNXVU1hubUyr; Wed, 22 Aug 2018 22:43:12 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id BB0FCB5B8C; Wed, 22 Aug 2018 22:43:11 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 04/14] ARM: mmp: add a pxa-usb-phy device Date: Wed, 22 Aug 2018 22:42:57 +0200 Message-Id: <20180822204307.13251-5-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_134339_867070_CADFD2ED X-CRM114-Status: GOOD ( 10.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is to replace the USB PHY initialization code (pxa_usb_phy_init(), pxa_usb_phy_deinit()) with a proper PHY driver. Signed-off-by: Lubomir Rintel --- arch/arm/mach-mmp/devices.c | 21 +++++++++++++++++++++ arch/arm/mach-mmp/pxa910.h | 1 + 2 files changed, 22 insertions(+) diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c index 671c7a09ab3d..d162fabd38e7 100644 --- a/arch/arm/mach-mmp/devices.c +++ b/arch/arm/mach-mmp/devices.c @@ -240,6 +240,27 @@ void pxa_usb_phy_deinit(void __iomem *phy_reg) #if IS_ENABLED(CONFIG_USB_SUPPORT) static u64 __maybe_unused usb_dma_mask = ~(u32)0; +#if IS_ENABLED(CONFIG_PHY_PXA_USB) +struct resource pxa168_usb_phy_resources[] = { + [0] = { + .start = PXA168_U2O_PHYBASE, + .end = PXA168_U2O_PHYBASE + USB_PHY_RANGE, + .flags = IORESOURCE_MEM, + }, +}; + +struct platform_device pxa168_device_usb_phy = { + .name = "pxa-usb-phy", + .id = -1, + .resource = pxa168_usb_phy_resources, + .num_resources = ARRAY_SIZE(pxa168_usb_phy_resources), + .dev = { + .dma_mask = &usb_dma_mask, + .coherent_dma_mask = 0xffffffff, + } +}; +#endif /* CONFIG_PHY_PXA_USB */ + #if IS_ENABLED(CONFIG_USB_MV_UDC) struct resource pxa168_u2o_resources[] = { /* regbase */ diff --git a/arch/arm/mach-mmp/pxa910.h b/arch/arm/mach-mmp/pxa910.h index 42009c349eae..2dfe38e4acc1 100644 --- a/arch/arm/mach-mmp/pxa910.h +++ b/arch/arm/mach-mmp/pxa910.h @@ -22,6 +22,7 @@ extern struct pxa_device_desc pxa910_device_pwm2; extern struct pxa_device_desc pxa910_device_pwm3; extern struct pxa_device_desc pxa910_device_pwm4; extern struct pxa_device_desc pxa910_device_nand; +extern struct platform_device pxa168_device_usb_phy; extern struct platform_device pxa168_device_u2o; extern struct platform_device pxa168_device_u2ootg; extern struct platform_device pxa168_device_u2oehci; From patchwork Wed Aug 22 20:42:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573283 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2803D13B6 for ; Wed, 22 Aug 2018 21:54:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 173282B5C8 for ; Wed, 22 Aug 2018 21:54:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BCA92BCF4; Wed, 22 Aug 2018 21:54:16 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BB0F82B5C8 for ; Wed, 22 Aug 2018 21:54:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=KZ8EkeNv+8urUhrvQCtgl8NZx/DGSpq1HDkQkyRg7rE=; b=PTwoBL7JbYvhNxXZo08BAJmoHZ YnHxVGjZnGb+jYw4r9k2yF/NvOtqGQyIKQOBby9ttjW7oO0WANQpHJWHtxthNcEEGYgEk9EPL6T0k DzI+XmWUjXXsQteAHMgaQSxyRE5cy74YnW8Y+7FX4CFt6Gxw3rAkCGJWtbBpR/b0kYLr6I0/iFegG afrsVsQueLvHaEyNefIi/VdA0GgmTCpnAtxJEw/Y4eh62vMPDcPPPEYzY1TqUaF37J1XN3JKFGp5O hN9et+KIho5hEoFMkDtPuz/6KmUknnuq4Zv5MhBki578AzNfriHifn43GusaiBdHkeregqJwdYZmb 5c+1/ZkQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb4q-0002cF-OP; Wed, 22 Aug 2018 21:54:08 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb44-0001Oj-NN for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Aug 2018 21:53:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jspuc/ASSZauzakofyQznI74osHtqkVbtQCGwlH7kp0=; b=vXG81Lb67WLqrW/qNivpAbtn2 Rd6gtTfacdiuCwfteX9SOFhCcQ9EfMwYXokBuSBSYPQjfLWPt8OC8wE4fCHR2aLtUvSvNPoLX4DHM iJNKDcWloqxzLOHk+aZzQaLm8gwT1WZCgoeZqQsfTCNVsqwX6zLO3iZb3cmMNtpCgCYmJDZPG/479 zzhqAMv0YqKkriZDLtRXEVeGl50acDvWs/MMzaJDYOMuwVEX7y7xroM3OKY58RVuvi82M+27B3fkT 5IT9RUmHSUq6U10lb81FqypV0zYtOAgfvsHqAPniHj+dAkV9ZiC8qPh0LXjJejrL4BDjhcWPxQF7R NJS+pDIdg==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZyr-0003CB-Po for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:43:54 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 880FBB5B98; Wed, 22 Aug 2018 22:43:36 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id NY7SLGES-mN4; Wed, 22 Aug 2018 22:43:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 6878CB5B8C; Wed, 22 Aug 2018 22:43:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id P3EuydLc0dgj; Wed, 22 Aug 2018 22:43:12 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 23363B5B8A; Wed, 22 Aug 2018 22:43:12 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 05/14] ARM: ttc_dkb: add an instance of pxa-usb-phy Date: Wed, 22 Aug 2018 22:42:58 +0200 Message-Id: <20180822204307.13251-6-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_164354_050173_83AC4BC8 X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This will replace the ttc_usb_pdata.phy_{de,}init()> Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/mach-mmp/ttc_dkb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c index c7897fb2b6da..767dcb23ee1c 100644 --- a/arch/arm/mach-mmp/ttc_dkb.c +++ b/arch/arm/mach-mmp/ttc_dkb.c @@ -282,6 +282,10 @@ static void __init ttc_dkb_init(void) sizeof(struct pxa_gpio_platform_data)); platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices)); +#if IS_ENABLED(CONFIG_PHY_PXA_USB) + platform_device_register(&pxa168_device_usb_phy); +#endif + #if IS_ENABLED(CONFIG_USB_MV_UDC) pxa168_device_u2o.dev.platform_data = &ttc_usb_pdata; platform_device_register(&pxa168_device_u2o); From patchwork Wed Aug 22 20:42:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 163BD139B for ; Wed, 22 Aug 2018 20:57:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 036B92A677 for ; Wed, 22 Aug 2018 20:57:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E99A62BA43; Wed, 22 Aug 2018 20:57:56 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 32FEC2A677 for ; Wed, 22 Aug 2018 20:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=hvol/3FPkabwzTvgIDKrgoC7Fc9TRxbyMtwD1jItcLI=; b=FWNE1PiWeDkysum0Bq92TiH18/ qQgaOvfLU96sxqWN7Eb3Gbi4WGEayIlys+XMOvDF0Uxi4COiz52gbYGakeTPQwE3xs+MVSGktQjaI pA6q6TIizV9quUJiCkCN8kiA4/6VV8QhCtIhn43uBSIqR9dMfISNADBiWawG57I4XK1kl/sPe5x/T GTD1npCSnakzp9UeQjdYi5NGOCHtOUrUIuBR5s3DXmA5B7HfvDY1t+nko4PNa6O1nsD3Xv/niGMHl ZV3OhlOi3PHpP+YHxYQNINJDECVmm8NiFI2Q+9pdBnin7Hl08zm495RvWPnD6PNwCSwQbzt//MUHS mSfMKuig==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsaCQ-00083l-GB; Wed, 22 Aug 2018 20:57:54 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsaCO-0007k7-NE for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Aug 2018 20:57:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=w3STcNZ9qTMoqYbSlsyJH6S9SteX/Ktj/zuZJymoIi8=; b=TbF0qU/bDkXmpM3P+4xgHW1/2 lNcy4bMAjaXIsF1FED7pCxfaMMLUCt4bqm0U+6V8sZZXosy//zM+8XxdfluRsyA7pPITys/+28gde gyp92yqiq+02XGUXeYGGQ8gKy6N7ruC/mY8julLpkfonPVXRXbUKxLm5zyQunicJyVfWqbjtbkAa+ b75j2Az7sLD601C7gNF+ErT2EaRHMDpOBTWNEaNmQUsgFE7pNl9JXS5OuUYmqmjeUobqt9Q0zJkO8 arknisI0fP+6zosnnJ2JaTqvcPp9f38OK/B0T0ibngw83LqUtGBrWRi039dkSh8kT8Y4QpeRR+Hsv lDWyvXTfA==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZyu-0003ZY-47 for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:43:58 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 6DC4BB5238; Wed, 22 Aug 2018 22:43:39 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id UjIByaSKzpvz; Wed, 22 Aug 2018 22:43:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id C979FB5B9C; Wed, 22 Aug 2018 22:43:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id R2_wPtFnWdGN; Wed, 22 Aug 2018 22:43:13 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 7E963B5238; Wed, 22 Aug 2018 22:43:12 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 06/14] ARM: aspenite: add an instance of pxa-usb-phy Date: Wed, 22 Aug 2018 22:42:59 +0200 Message-Id: <20180822204307.13251-7-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_214356_247875_BF0AF4D2 X-CRM114-Status: GOOD ( 10.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This will replace the pxa168_sph_pdata.phy_{de,}init(). Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/mach-mmp/aspenite.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 6c2ebf01893a..23f99976b5f5 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c @@ -256,6 +256,10 @@ static void __init common_init(void) /* off-chip devices */ platform_device_register(&smc91x_device); +#if IS_ENABLED(CONFIG_PHY_PXA_USB) + platform_device_register(&pxa168_device_usb_phy); +#endif + #if IS_ENABLED(CONFIG_USB_EHCI_MV) pxa168_add_usb_host(&pxa168_sph_pdata); #endif From patchwork Wed Aug 22 20:43:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573263 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5F75D13B8 for ; Wed, 22 Aug 2018 20:58:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DDBC2BCC6 for ; Wed, 22 Aug 2018 20:58:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 423AE2BCD2; Wed, 22 Aug 2018 20:58:28 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E2D6C2BCC6 for ; Wed, 22 Aug 2018 20:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=+SK1p6CUQ+4wdx9piyyJyGNYozpsrq9wGVyOxdoXZ4U=; b=DvacU79xV0OVDD+71L5g98J5ch TrA39Ly9ZvWhgQvHjOP8n3U9oB/J2Hd62PMOrasMkTRSuYf4J3I6qY3wcdl9Y0P11v6F8/l+PHgCl JPNAM4+Z/qTssCgd0YXmEfQ1SI0PGFf2/Ze77M2bJwzgYXsxk/tBbEClyPqCd0hpV0Yj4EWJZH00q qBbrRnenuGxqW5pm3VC3CIikXe6uY2tXkW5u8+WRYSUCtODw8Pz5/wRryQS8tdXii16E1y9TpnU3o c9d6NwzFAqvchHfI3qxo4dwnIHLOJAMZrc3HrxW0SA9aP4euSknbSyUmbGyF0fK/uFZfypHxbkuLn 1pBNK+gg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsaCw-0000Kq-EF; Wed, 22 Aug 2018 20:58:26 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsaCP-0007k7-Q4 for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Aug 2018 20:57:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KYeV0kYILLo9RVpyHRTQw8i7ld3/sH+K2qEBwE63uKc=; b=p1IJj+TtfVlDXyKC8tUmgst+E xwU0o0Brl59qxqHhBKMgYCyjEXJD5NTGbwsRYesPVWzD0+cx+NfdyPPPhB50PmhT37pJxHMHaEU4U dsNiCQFSs3d+S8ei8nJfMbpPzKWurStsUDjr7qx5M75rthxyey762LtcsbaNutNSR66j9JIvr4jx9 p9KdiWfHBMZXK+71Jf931UjTe7RX+VB432d7rHXLFqwfGDZT2z5fL5688Sp72LBoRFFaryw9we+ov ZF+m7/jH9//Q3M9pf4atBMg6+6gdjbKsWGsXq9yc/VPH7MgKSDmMfxR4QKPA17xGyp5lZxO/MSNCf KhI0iQP8Q==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZyu-0003ZZ-2g for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:43:57 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id AABD0B5BAD; Wed, 22 Aug 2018 22:43:41 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id GpcI8k25AVLd; Wed, 22 Aug 2018 22:43:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 2A0C6B5B8A; Wed, 22 Aug 2018 22:43:16 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wL2g8O5V3OSE; Wed, 22 Aug 2018 22:43:13 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id D72EBB5B90; Wed, 22 Aug 2018 22:43:12 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 07/14] USB: EHCI: ehci-mv: remove private_init Date: Wed, 22 Aug 2018 22:43:00 +0200 Message-Id: <20180822204307.13251-8-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_214356_164190_A8E4B298 X-CRM114-Status: GOOD ( 12.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP It's unused. Signed-off-by: Lubomir Rintel --- drivers/usb/host/ehci-mv.c | 4 ---- include/linux/platform_data/mv_usb.h | 1 - 2 files changed, 5 deletions(-) diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c index 77a4ab1dcd07..705d1b43b2dd 100644 --- a/drivers/usb/host/ehci-mv.c +++ b/drivers/usb/host/ehci-mv.c @@ -203,9 +203,6 @@ static int mv_ehci_probe(struct platform_device *pdev) device_wakeup_enable(hcd->self.controller); } - if (pdata->private_init) - pdata->private_init(ehci_mv->op_regs, ehci_mv->phy_regs); - dev_info(&pdev->dev, "successful find EHCI device with regs 0x%p irq %d" " working in %s mode\n", hcd->regs, hcd->irq, @@ -260,7 +257,6 @@ static const struct platform_device_id ehci_id_table[] = { static void mv_ehci_shutdown(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); - struct ehci_hcd_mv *ehci_mv = hcd_to_ehci_hcd_mv(hcd); if (!hcd->rh_registered) return; diff --git a/include/linux/platform_data/mv_usb.h b/include/linux/platform_data/mv_usb.h index 98b7925f1a2d..c0f624aca81c 100644 --- a/include/linux/platform_data/mv_usb.h +++ b/include/linux/platform_data/mv_usb.h @@ -48,6 +48,5 @@ struct mv_usb_platform_data { int (*phy_init)(void __iomem *regbase); void (*phy_deinit)(void __iomem *regbase); int (*set_vbus)(unsigned int vbus); - int (*private_init)(void __iomem *opregs, void __iomem *phyregs); }; #endif From patchwork Wed Aug 22 20:43:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573261 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D98F139B for ; Wed, 22 Aug 2018 20:58:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C9562BCBA for ; Wed, 22 Aug 2018 20:58:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20C172BCC6; Wed, 22 Aug 2018 20:58:11 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF14D2BCBA for ; Wed, 22 Aug 2018 20:58:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=AW0QVd84pc153+JVXWkv+/xnrqYhWtLy92GWAYEDIic=; b=tvEVTihRrj+o/V0PjMaWHY8i82 iyHAq7w/wFiOuXnhmzX1tmzUAfWv/h+RjOZQg67QltXifDL0EDCRD1rWlZX5vcop9qINreAlYiFX3 yNIBhFoo++jFbHShw484ze1/p4L7g2xPpzfcELDY36aomwfgybVDcD1YbaFc5opGdqhiyjVC/yEnW AIVauTdJ8OJqo3AG000L1GzKNvHD1sSLJkWxGt09/56XV/NR7kev6AYVf8DqUC/EKtj5JEEJqFBec jkHOUNsd0Yi/3hI6XzygcX8QQBdbKkyRqqWgqlSZsf12BC7X6qcyvSIkQmCG5LTqqiE4Ru6iZglT7 an+ZozMQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsaCY-0008Fh-JL; Wed, 22 Aug 2018 20:58:02 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsaCO-0007yE-NE for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Aug 2018 20:57:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Kcbf/srDSpiVd3m4qvfD+1By0lnckKmj2FTrfatlRi4=; b=BcHyf1UeLIucGz75fHMhx6zR2 l9YGS6BlJZBHgJ7ZwANdyqhOrDTUUVTGdq2fF2Q/XwSYwWrlEByWxHYEKHhYWxeGvMGPRFr/8EoIF HsTEGmqr/hU6QQ9QBT/rOjZ5NKisjAI1YNV5JCwBblaWkGJL0E+yjV4D/6UfY5Kq3tEI0fgRwHfMI BMoOyYBCASnQ3M5sMALIEgW2d1yB3px7xRna0FSjtKqjHu/zP31QV0gY08LLTqbQnbQBcGynqk9Z1 WHkdsZ9xYra3dEGEjhnkvNOgneexjjAb0U8sm4qv86uanea42wVb0fAgOGWUN3G4xYPoNnzAg9bHi fEyRkgi5w==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZyu-0003YS-2j for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:43:58 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 533C9B5B8D; Wed, 22 Aug 2018 22:43:38 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 8A3fa56tQZLn; Wed, 22 Aug 2018 22:43:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 91DB1B5238; Wed, 22 Aug 2018 22:43:16 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lyhnl9b2p60P; Wed, 22 Aug 2018 22:43:14 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 3582EB5B93; Wed, 22 Aug 2018 22:43:13 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 08/14] USB: EHCI: ehci-mv: use phy-pxa-usb Date: Wed, 22 Aug 2018 22:43:01 +0200 Message-Id: <20180822204307.13251-9-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_214356_276132_EBD76FAA X-CRM114-Status: GOOD ( 18.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use a proper PHY driver, instead of hooks to a board support package. Signed-off-by: Lubomir Rintel --- arch/arm/mach-mmp/devices.c | 11 +--------- drivers/usb/host/ehci-mv.c | 44 ++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c index d162fabd38e7..822b8be042b9 100644 --- a/arch/arm/mach-mmp/devices.c +++ b/arch/arm/mach-mmp/devices.c @@ -298,21 +298,12 @@ struct platform_device pxa168_device_u2o = { #if IS_ENABLED(CONFIG_USB_EHCI_MV_U2O) struct resource pxa168_u2oehci_resources[] = { - /* regbase */ [0] = { - .start = PXA168_U2O_REGBASE + U2x_CAPREGS_OFFSET, + .start = PXA168_U2O_REGBASE, .end = PXA168_U2O_REGBASE + USB_REG_RANGE, .flags = IORESOURCE_MEM, - .name = "capregs", }, - /* phybase */ [1] = { - .start = PXA168_U2O_PHYBASE, - .end = PXA168_U2O_PHYBASE + USB_PHY_RANGE, - .flags = IORESOURCE_MEM, - .name = "phyregs", - }, - [2] = { .start = IRQ_PXA168_USB1, .end = IRQ_PXA168_USB1, .flags = IORESOURCE_IRQ, diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c index 705d1b43b2dd..43b300c90875 100644 --- a/drivers/usb/host/ehci-mv.c +++ b/drivers/usb/host/ehci-mv.c @@ -18,6 +18,9 @@ #include "ehci.h" +/* registers */ +#define U2x_CAPREGS_OFFSET 0x100 + #define CAPLENGTH_MASK (0xff) #define hcd_to_ehci_hcd_mv(h) ((struct ehci_hcd_mv *)hcd_to_ehci(h)->priv) @@ -26,13 +29,14 @@ struct ehci_hcd_mv { /* Which mode does this ehci running OTG/Host ? */ int mode; - void __iomem *phy_regs; + void __iomem *base; void __iomem *cap_regs; void __iomem *op_regs; struct usb_phy *otg; struct mv_usb_platform_data *pdata; + struct phy *phy; struct clk *clk; }; @@ -49,22 +53,13 @@ static void ehci_clock_disable(struct ehci_hcd_mv *ehci_mv) static int mv_ehci_enable(struct ehci_hcd_mv *ehci_mv) { - int retval; - ehci_clock_enable(ehci_mv); - if (ehci_mv->pdata->phy_init) { - retval = ehci_mv->pdata->phy_init(ehci_mv->phy_regs); - if (retval) - return retval; - } - - return 0; + return phy_init(ehci_mv->phy); } static void mv_ehci_disable(struct ehci_hcd_mv *ehci_mv) { - if (ehci_mv->pdata->phy_deinit) - ehci_mv->pdata->phy_deinit(ehci_mv->phy_regs); + phy_exit(ehci_mv->phy); ehci_clock_disable(ehci_mv); } @@ -121,6 +116,14 @@ static int mv_ehci_probe(struct platform_device *pdev) ehci_mv = hcd_to_ehci_hcd_mv(hcd); ehci_mv->pdata = pdata; + ehci_mv->phy = devm_phy_get(&pdev->dev, "usb"); + if (IS_ERR(ehci_mv->phy)) { + retval = PTR_ERR(ehci_mv->phy); + if (retval != -EPROBE_DEFER) + dev_err(&pdev->dev, "Failed to get phy.\n"); + goto err_put_hcd; + } + ehci_mv->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(ehci_mv->clk)) { dev_err(&pdev->dev, "error getting clock\n"); @@ -128,17 +131,12 @@ static int mv_ehci_probe(struct platform_device *pdev) goto err_put_hcd; } - r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phyregs"); - ehci_mv->phy_regs = devm_ioremap_resource(&pdev->dev, r); - if (IS_ERR(ehci_mv->phy_regs)) { - retval = PTR_ERR(ehci_mv->phy_regs); - goto err_put_hcd; - } - r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "capregs"); - ehci_mv->cap_regs = devm_ioremap_resource(&pdev->dev, r); - if (IS_ERR(ehci_mv->cap_regs)) { - retval = PTR_ERR(ehci_mv->cap_regs); + + r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + ehci_mv->base = devm_ioremap_resource(&pdev->dev, r); + if (IS_ERR(ehci_mv->base)) { + retval = PTR_ERR(ehci_mv->base); goto err_put_hcd; } @@ -148,6 +146,8 @@ static int mv_ehci_probe(struct platform_device *pdev) goto err_put_hcd; } + ehci_mv->cap_regs = + (void __iomem *) ((unsigned long) ehci_mv->base + U2x_CAPREGS_OFFSET); offset = readl(ehci_mv->cap_regs) & CAPLENGTH_MASK; ehci_mv->op_regs = (void __iomem *) ((unsigned long) ehci_mv->cap_regs + offset); From patchwork Wed Aug 22 20:43:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573275 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 83CCA13B6 for ; Wed, 22 Aug 2018 21:53:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 702182B5C8 for ; Wed, 22 Aug 2018 21:53:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 634092BCF4; Wed, 22 Aug 2018 21:53:25 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9DA302B5C8 for ; Wed, 22 Aug 2018 21:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=iY/HdMogfE2s2tWuEoMVY8Rr383x3nUKkW2QvU2nXtU=; b=FwFVk7u8g2h5jz8c91vdS+Z7Hh Q4UMaqBCcGR4D/CE34YCYQbTAiOk4p5AmT8VzR0BveXkS2b3GGdmfEniKupadfjLjXADnrmFYeUyy DxJUOhBPY1QLN77XJsk2w6PDUFyezv2YBYz/P8TAosbk9RzCeoyj3hxR7c6TmHtxUT36eDBCBOH4E r7UCAtBrq061Yd8Ueujt1JmxE3qwzS5CyKlQ5WUufDYzFMqo0khLhzxNcCQ2y837iSuzm6TG5Et2X UkyL9TZz015njeVxSxRE7DRwGm1UHrznWI6kLi4Q03p0cvWiXFRDEAX3EaghAA3DECvQRuSMVkJOs TToFhS1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb47-0001Zy-D5; Wed, 22 Aug 2018 21:53:23 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb3w-0001Oj-Rr for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Aug 2018 21:53:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rCx5QwZNIh/XzDz0DXjfyj6WKxq0/lPUtOTEKbOxrNM=; b=Vta78H5zkUU2gwFt545cQZFdD YKlgUiVShReFSPAtYa0xdcTAXMxxWG5wILXUvsoNVbU+nn+F+6WBBsJacYcDwok2gO6V26tZYfIxT XxdzTXzMH/9x7xMFGXbm2RvJgLd37zHLXyN4/GJZ56GY2+QwHHaUz6ZyNN69TN6rm/x0NIVvONHUv Cl1Rf18RgoDTg/Xoyrsku2Ap7GXSxt3FT2QpuaNwubzDHGTOcbWwY65HHGo1nMW3XJ7h4YvaGqipz ZwdMuqIr/4d0MQ/c/mhItzgvQ5XVWC7CnpBlQaMF8YWEjxy+zGWzRnwsyXSSQF51INNACbBewtO+O uh/NDm+TA==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZz7-0003DO-8m for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:44:11 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 9BF8DB5B0C; Wed, 22 Aug 2018 22:43:47 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id q-FMXQYLJ8vd; Wed, 22 Aug 2018 22:43:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3F0D7B5B93; Wed, 22 Aug 2018 22:43:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0GrIrrwdIdF8; Wed, 22 Aug 2018 22:43:14 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 89A9FB5B8B; Wed, 22 Aug 2018 22:43:13 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 09/14] USB: phy-mv-usb: use phy-pxa-usb Date: Wed, 22 Aug 2018 22:43:02 +0200 Message-Id: <20180822204307.13251-10-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_164409_691293_EAAD224E X-CRM114-Status: GOOD ( 23.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use a proper PHY driver, instead of hooks to a board support package. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/mach-mmp/devices.c | 11 +--- drivers/usb/phy/phy-mv-usb.c | 123 ++++++++++++++++------------------- drivers/usb/phy/phy-mv-usb.h | 8 ++- 3 files changed, 62 insertions(+), 80 deletions(-) diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c index 822b8be042b9..eb9b3c34e90a 100644 --- a/arch/arm/mach-mmp/devices.c +++ b/arch/arm/mach-mmp/devices.c @@ -325,21 +325,12 @@ struct platform_device pxa168_device_u2oehci = { #if IS_ENABLED(CONFIG_USB_MV_OTG) struct resource pxa168_u2ootg_resources[] = { - /* regbase */ [0] = { - .start = PXA168_U2O_REGBASE + U2x_CAPREGS_OFFSET, + .start = PXA168_U2O_REGBASE, .end = PXA168_U2O_REGBASE + USB_REG_RANGE, .flags = IORESOURCE_MEM, - .name = "capregs", }, - /* phybase */ [1] = { - .start = PXA168_U2O_PHYBASE, - .end = PXA168_U2O_PHYBASE + USB_PHY_RANGE, - .flags = IORESOURCE_MEM, - .name = "phyregs", - }, - [2] = { .start = IRQ_PXA168_USB1, .end = IRQ_PXA168_USB1, .flags = IORESOURCE_IRQ, diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c index cfd9add10bf4..0f67c5b65fe9 100644 --- a/drivers/usb/phy/phy-mv-usb.c +++ b/drivers/usb/phy/phy-mv-usb.c @@ -50,7 +50,7 @@ static char *state_string[] = { static int mv_otg_set_vbus(struct usb_otg *otg, bool on) { - struct mv_otg *mvotg = container_of(otg->usb_phy, struct mv_otg, phy); + struct mv_otg *mvotg = container_of(otg->usb_phy, struct mv_otg, usb_phy); if (mvotg->pdata->set_vbus == NULL) return -ENODEV; @@ -193,7 +193,7 @@ static void mv_otg_init_irq(struct mv_otg *mvotg) static void mv_otg_start_host(struct mv_otg *mvotg, int on) { #ifdef CONFIG_USB - struct usb_otg *otg = mvotg->phy.otg; + struct usb_otg *otg = mvotg->usb_phy.otg; struct usb_hcd *hcd; if (!otg->host) @@ -214,12 +214,12 @@ static void mv_otg_start_host(struct mv_otg *mvotg, int on) static void mv_otg_start_periphrals(struct mv_otg *mvotg, int on) { - struct usb_otg *otg = mvotg->phy.otg; + struct usb_otg *otg = mvotg->usb_phy.otg; if (!otg->gadget) return; - dev_info(mvotg->phy.dev, "gadget %s\n", on ? "on" : "off"); + dev_info(mvotg->usb_phy.dev, "gadget %s\n", on ? "on" : "off"); if (on) usb_gadget_vbus_connect(otg->gadget); @@ -247,14 +247,11 @@ static int mv_otg_enable_internal(struct mv_otg *mvotg) dev_dbg(&mvotg->pdev->dev, "otg enabled\n"); otg_clock_enable(mvotg); - if (mvotg->pdata->phy_init) { - retval = mvotg->pdata->phy_init(mvotg->phy_regs); - if (retval) { - dev_err(&mvotg->pdev->dev, - "init phy error %d\n", retval); - otg_clock_disable(mvotg); - return retval; - } + retval = phy_init(mvotg->phy); + if (retval) { + dev_err(&mvotg->pdev->dev, "init phy error %d\n", retval); + otg_clock_disable(mvotg); + return retval; } mvotg->active = 1; @@ -274,8 +271,7 @@ static void mv_otg_disable_internal(struct mv_otg *mvotg) { if (mvotg->active) { dev_dbg(&mvotg->pdev->dev, "otg disabled\n"); - if (mvotg->pdata->phy_deinit) - mvotg->pdata->phy_deinit(mvotg->phy_regs); + phy_exit(mvotg->phy); otg_clock_disable(mvotg); mvotg->active = 0; } @@ -329,68 +325,68 @@ static void mv_otg_update_inputs(struct mv_otg *mvotg) static void mv_otg_update_state(struct mv_otg *mvotg) { struct mv_otg_ctrl *otg_ctrl = &mvotg->otg_ctrl; - int old_state = mvotg->phy.otg->state; + int old_state = mvotg->usb_phy.otg->state; switch (old_state) { case OTG_STATE_UNDEFINED: - mvotg->phy.otg->state = OTG_STATE_B_IDLE; + mvotg->usb_phy.otg->state = OTG_STATE_B_IDLE; /* FALL THROUGH */ case OTG_STATE_B_IDLE: if (otg_ctrl->id == 0) - mvotg->phy.otg->state = OTG_STATE_A_IDLE; + mvotg->usb_phy.otg->state = OTG_STATE_A_IDLE; else if (otg_ctrl->b_sess_vld) - mvotg->phy.otg->state = OTG_STATE_B_PERIPHERAL; + mvotg->usb_phy.otg->state = OTG_STATE_B_PERIPHERAL; break; case OTG_STATE_B_PERIPHERAL: if (!otg_ctrl->b_sess_vld || otg_ctrl->id == 0) - mvotg->phy.otg->state = OTG_STATE_B_IDLE; + mvotg->usb_phy.otg->state = OTG_STATE_B_IDLE; break; case OTG_STATE_A_IDLE: if (otg_ctrl->id) - mvotg->phy.otg->state = OTG_STATE_B_IDLE; + mvotg->usb_phy.otg->state = OTG_STATE_B_IDLE; else if (!(otg_ctrl->a_bus_drop) && (otg_ctrl->a_bus_req || otg_ctrl->a_srp_det)) - mvotg->phy.otg->state = OTG_STATE_A_WAIT_VRISE; + mvotg->usb_phy.otg->state = OTG_STATE_A_WAIT_VRISE; break; case OTG_STATE_A_WAIT_VRISE: if (otg_ctrl->a_vbus_vld) - mvotg->phy.otg->state = OTG_STATE_A_WAIT_BCON; + mvotg->usb_phy.otg->state = OTG_STATE_A_WAIT_BCON; break; case OTG_STATE_A_WAIT_BCON: if (otg_ctrl->id || otg_ctrl->a_bus_drop || otg_ctrl->a_wait_bcon_timeout) { mv_otg_cancel_timer(mvotg, A_WAIT_BCON_TIMER); mvotg->otg_ctrl.a_wait_bcon_timeout = 0; - mvotg->phy.otg->state = OTG_STATE_A_WAIT_VFALL; + mvotg->usb_phy.otg->state = OTG_STATE_A_WAIT_VFALL; otg_ctrl->a_bus_req = 0; } else if (!otg_ctrl->a_vbus_vld) { mv_otg_cancel_timer(mvotg, A_WAIT_BCON_TIMER); mvotg->otg_ctrl.a_wait_bcon_timeout = 0; - mvotg->phy.otg->state = OTG_STATE_A_VBUS_ERR; + mvotg->usb_phy.otg->state = OTG_STATE_A_VBUS_ERR; } else if (otg_ctrl->b_conn) { mv_otg_cancel_timer(mvotg, A_WAIT_BCON_TIMER); mvotg->otg_ctrl.a_wait_bcon_timeout = 0; - mvotg->phy.otg->state = OTG_STATE_A_HOST; + mvotg->usb_phy.otg->state = OTG_STATE_A_HOST; } break; case OTG_STATE_A_HOST: if (otg_ctrl->id || !otg_ctrl->b_conn || otg_ctrl->a_bus_drop) - mvotg->phy.otg->state = OTG_STATE_A_WAIT_BCON; + mvotg->usb_phy.otg->state = OTG_STATE_A_WAIT_BCON; else if (!otg_ctrl->a_vbus_vld) - mvotg->phy.otg->state = OTG_STATE_A_VBUS_ERR; + mvotg->usb_phy.otg->state = OTG_STATE_A_VBUS_ERR; break; case OTG_STATE_A_WAIT_VFALL: if (otg_ctrl->id || (!otg_ctrl->b_conn && otg_ctrl->a_sess_vld) || otg_ctrl->a_bus_req) - mvotg->phy.otg->state = OTG_STATE_A_IDLE; + mvotg->usb_phy.otg->state = OTG_STATE_A_IDLE; break; case OTG_STATE_A_VBUS_ERR: if (otg_ctrl->id || otg_ctrl->a_clr_err || otg_ctrl->a_bus_drop) { otg_ctrl->a_clr_err = 0; - mvotg->phy.otg->state = OTG_STATE_A_WAIT_VFALL; + mvotg->usb_phy.otg->state = OTG_STATE_A_WAIT_VFALL; } break; default: @@ -409,8 +405,8 @@ static void mv_otg_work(struct work_struct *work) run: /* work queue is single thread, or we need spin_lock to protect */ - phy = &mvotg->phy; - otg = mvotg->phy.otg; + phy = &mvotg->usb_phy; + otg = mvotg->usb_phy.otg; old_state = otg->state; if (!mvotg->active) @@ -419,24 +415,24 @@ static void mv_otg_work(struct work_struct *work) mv_otg_update_inputs(mvotg); mv_otg_update_state(mvotg); - if (old_state != mvotg->phy.otg->state) { + if (old_state != mvotg->usb_phy.otg->state) { dev_info(&mvotg->pdev->dev, "change from state %s to %s\n", state_string[old_state], - state_string[mvotg->phy.otg->state]); + state_string[mvotg->usb_phy.otg->state]); - switch (mvotg->phy.otg->state) { + switch (mvotg->usb_phy.otg->state) { case OTG_STATE_B_IDLE: otg->default_a = 0; if (old_state == OTG_STATE_B_PERIPHERAL) mv_otg_start_periphrals(mvotg, 0); mv_otg_reset(mvotg); mv_otg_disable(mvotg); - usb_phy_set_event(&mvotg->phy, USB_EVENT_NONE); + usb_phy_set_event(&mvotg->usb_phy, USB_EVENT_NONE); break; case OTG_STATE_B_PERIPHERAL: mv_otg_enable(mvotg); mv_otg_start_periphrals(mvotg, 1); - usb_phy_set_event(&mvotg->phy, USB_EVENT_ENUMERATED); + usb_phy_set_event(&mvotg->usb_phy, USB_EVENT_ENUMERATED); break; case OTG_STATE_A_IDLE: otg->default_a = 1; @@ -536,8 +532,8 @@ a_bus_req_store(struct device *dev, struct device_attribute *attr, return -1; /* We will use this interface to change to A device */ - if (mvotg->phy.otg->state != OTG_STATE_B_IDLE - && mvotg->phy.otg->state != OTG_STATE_A_IDLE) + if (mvotg->usb_phy.otg->state != OTG_STATE_B_IDLE + && mvotg->usb_phy.otg->state != OTG_STATE_A_IDLE) return -1; /* The clock may disabled and we need to set irq for ID detected */ @@ -566,7 +562,7 @@ a_clr_err_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct mv_otg *mvotg = dev_get_drvdata(dev); - if (!mvotg->phy.otg->default_a) + if (!mvotg->usb_phy.otg->default_a) return -1; if (count > 2) @@ -602,7 +598,7 @@ a_bus_drop_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct mv_otg *mvotg = dev_get_drvdata(dev); - if (!mvotg->phy.otg->default_a) + if (!mvotg->usb_phy.otg->default_a) return -1; if (count > 2) @@ -656,7 +652,7 @@ static int mv_otg_remove(struct platform_device *pdev) mv_otg_disable(mvotg); - usb_remove_phy(&mvotg->phy); + usb_remove_phy(&mvotg->usb_phy); return 0; } @@ -687,6 +683,10 @@ static int mv_otg_probe(struct platform_device *pdev) mvotg->pdev = pdev; mvotg->pdata = pdata; + mvotg->phy = devm_phy_get(&pdev->dev, "usb"); + if (IS_ERR(mvotg->phy)) + return PTR_ERR(mvotg->phy); + mvotg->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(mvotg->clk)) return PTR_ERR(mvotg->clk); @@ -701,12 +701,12 @@ static int mv_otg_probe(struct platform_device *pdev) /* OTG common part */ mvotg->pdev = pdev; - mvotg->phy.dev = &pdev->dev; - mvotg->phy.otg = otg; - mvotg->phy.label = driver_name; + mvotg->usb_phy.dev = &pdev->dev; + mvotg->usb_phy.otg = otg; + mvotg->usb_phy.label = driver_name; otg->state = OTG_STATE_UNDEFINED; - otg->usb_phy = &mvotg->phy; + otg->usb_phy = &mvotg->usb_phy; otg->set_host = mv_otg_set_host; otg->set_peripheral = mv_otg_set_peripheral; otg->set_vbus = mv_otg_set_vbus; @@ -715,36 +715,23 @@ static int mv_otg_probe(struct platform_device *pdev) timer_setup(&mvotg->otg_ctrl.timer[i], mv_otg_timer_await_bcon, 0); - r = platform_get_resource_byname(mvotg->pdev, - IORESOURCE_MEM, "phyregs"); - if (r == NULL) { - dev_err(&pdev->dev, "no phy I/O memory resource defined\n"); - retval = -ENODEV; - goto err_destroy_workqueue; - } - - mvotg->phy_regs = devm_ioremap(&pdev->dev, r->start, resource_size(r)); - if (mvotg->phy_regs == NULL) { - dev_err(&pdev->dev, "failed to map phy I/O memory\n"); - retval = -EFAULT; - goto err_destroy_workqueue; - } - - r = platform_get_resource_byname(mvotg->pdev, - IORESOURCE_MEM, "capregs"); + r = platform_get_resource(mvotg->pdev, IORESOURCE_MEM, 0); if (r == NULL) { dev_err(&pdev->dev, "no I/O memory resource defined\n"); retval = -ENODEV; goto err_destroy_workqueue; } - mvotg->cap_regs = devm_ioremap(&pdev->dev, r->start, resource_size(r)); - if (mvotg->cap_regs == NULL) { + mvotg->base = devm_ioremap(&pdev->dev, r->start, resource_size(r)); + if (mvotg->base == NULL) { dev_err(&pdev->dev, "failed to map I/O memory\n"); retval = -EFAULT; goto err_destroy_workqueue; } + mvotg->cap_regs = + (void __iomem *) ((unsigned long)mvotg->base + U2x_CAPREGS_OFFSET); + /* we will acces controller register, so enable the udc controller */ retval = mv_otg_enable_internal(mvotg); if (retval) { @@ -804,7 +791,7 @@ static int mv_otg_probe(struct platform_device *pdev) goto err_disable_clk; } - retval = usb_add_phy(&mvotg->phy, USB_PHY_TYPE_USB2); + retval = usb_add_phy(&mvotg->usb_phy, USB_PHY_TYPE_USB2); if (retval < 0) { dev_err(&pdev->dev, "can't register transceiver, %d\n", retval); @@ -831,7 +818,7 @@ static int mv_otg_probe(struct platform_device *pdev) return 0; err_remove_phy: - usb_remove_phy(&mvotg->phy); + usb_remove_phy(&mvotg->usb_phy); err_disable_clk: mv_otg_disable_internal(mvotg); err_destroy_workqueue: @@ -846,10 +833,10 @@ static int mv_otg_suspend(struct platform_device *pdev, pm_message_t state) { struct mv_otg *mvotg = platform_get_drvdata(pdev); - if (mvotg->phy.otg->state != OTG_STATE_B_IDLE) { + if (mvotg->usb_phy.otg->state != OTG_STATE_B_IDLE) { dev_info(&pdev->dev, "OTG state is not B_IDLE, it is %d!\n", - mvotg->phy.otg->state); + mvotg->usb_phy.otg->state); return -EAGAIN; } diff --git a/drivers/usb/phy/phy-mv-usb.h b/drivers/usb/phy/phy-mv-usb.h index 96701a1229ad..9b7bc6d958a8 100644 --- a/drivers/usb/phy/phy-mv-usb.h +++ b/drivers/usb/phy/phy-mv-usb.h @@ -8,6 +8,9 @@ #include +/* registers */ +#define U2x_CAPREGS_OFFSET 0x100 + /* Command Register Bit Masks */ #define USBCMD_RUN_STOP (0x00000001) #define USBCMD_CTRL_RESET (0x00000002) @@ -132,11 +135,11 @@ struct mv_otg_regs { }; struct mv_otg { - struct usb_phy phy; + struct usb_phy usb_phy; struct mv_otg_ctrl otg_ctrl; /* base address */ - void __iomem *phy_regs; + void __iomem *base; void __iomem *cap_regs; struct mv_otg_regs __iomem *op_regs; @@ -155,6 +158,7 @@ struct mv_otg { unsigned int active; unsigned int clock_gating; struct clk *clk; + struct phy *phy; }; #endif From patchwork Wed Aug 22 20:43:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573289 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47B5B1390 for ; Wed, 22 Aug 2018 22:08:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D8F72B7FC for ; Wed, 22 Aug 2018 22:08:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 714922B8CD; Wed, 22 Aug 2018 22:08:02 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AFF092B7FC for ; Wed, 22 Aug 2018 22:08:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=GAAcT09L5Y69yCbpgQRREbykINBZOE91H8DwJR5avBQ=; b=UkyVG14ZJAsgKduTtpNP0Ef/eu OsA5hF7XCoy8hLOfCkJzXHzp5QCe54z385X9xvQWshOo2ZZwYVA/SAGa4jjy+7kghnW53UgAHs0q/ JoGN5RiFVtLEbd8ZCLwGwg2LRMvSeue4gDunPLPAhDwbj5tkY1/BPNDjcjCfu4DT65hoDp5I3e9sL 409owQUEj6fxmZ4AKbWRvru2MIDAnozZ/c1m/5BJnbiE77UOGS8AeNrJuwT+tOTUGH80EIkOjh//z RttyExMTO/ARZuvpYMwYeJLeh74hQkcF18Rq9vFrCw9fe5qEen8RPT6SPeat3P5kTCjYF7Wk/I2io Txod16lg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsbIC-00081m-Sx; Wed, 22 Aug 2018 22:07:56 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb3y-0001Oj-M9 for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Aug 2018 21:53:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8fJ9XnSWjVpKVwWtfM+8Ec1aMkoLTpuqbj7Hm39SwSM=; b=lkiNIaNbeCmH9I1EcDlvBpu/m FqARe0impJR3tZ2m7Qxa+vd92YL8x19Wxdjsxz0ZD7y+5wggwVLE+J0xa5ZwjiIqgQNzLjENZNtkw IUVKAoMTO91fJy0jgezFvJhdm72F46OK/u++cYYDc+39frV7Ka2uVazoeZ7mAk1/TfVjPKnhwXosC 2PAyYskvuESVdTg75hi7BnFMcDHE4LzxwAikK/0Iyu2zf8AVc7nTeGQBa8nLyU6UZloYsRIDICmR0 lyChfu8gYNUld0ctbImpQF0kpwbw4mNr6/5GED89xMaq/XK5kpzuqCt7fS+yg1S/gFI5I/iMzaxMS L3oEP0SXw==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZz7-0003DR-8m for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:44:10 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 06FFEB5BA5; Wed, 22 Aug 2018 22:43:49 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id vYSUNHFsCMCc; Wed, 22 Aug 2018 22:43:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 866BDB5B9D; Wed, 22 Aug 2018 22:43:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id D3s7r6G-3Cjy; Wed, 22 Aug 2018 22:43:15 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id E60C0B5B95; Wed, 22 Aug 2018 22:43:13 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 10/14] USB: gadget: mv-udc: use phy-pxa-usb Date: Wed, 22 Aug 2018 22:43:03 +0200 Message-Id: <20180822204307.13251-11-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_164409_700928_B4C3BA59 X-CRM114-Status: GOOD ( 16.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use a proper PHY driver, instead of hooks to a board support package. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/mach-mmp/devices.c | 11 +------- drivers/usb/gadget/udc/mv_udc.h | 7 ++++- drivers/usb/gadget/udc/mv_udc_core.c | 38 ++++++++-------------------- 3 files changed, 17 insertions(+), 39 deletions(-) diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c index eb9b3c34e90a..d925be9f14a9 100644 --- a/arch/arm/mach-mmp/devices.c +++ b/arch/arm/mach-mmp/devices.c @@ -263,21 +263,12 @@ struct platform_device pxa168_device_usb_phy = { #if IS_ENABLED(CONFIG_USB_MV_UDC) struct resource pxa168_u2o_resources[] = { - /* regbase */ [0] = { - .start = PXA168_U2O_REGBASE + U2x_CAPREGS_OFFSET, + .start = PXA168_U2O_REGBASE, .end = PXA168_U2O_REGBASE + USB_REG_RANGE, .flags = IORESOURCE_MEM, - .name = "capregs", }, - /* phybase */ [1] = { - .start = PXA168_U2O_PHYBASE, - .end = PXA168_U2O_PHYBASE + USB_PHY_RANGE, - .flags = IORESOURCE_MEM, - .name = "phyregs", - }, - [2] = { .start = IRQ_PXA168_USB1, .end = IRQ_PXA168_USB1, .flags = IORESOURCE_IRQ, diff --git a/drivers/usb/gadget/udc/mv_udc.h b/drivers/usb/gadget/udc/mv_udc.h index b3f759c0962c..6f04f432964d 100644 --- a/drivers/usb/gadget/udc/mv_udc.h +++ b/drivers/usb/gadget/udc/mv_udc.h @@ -6,6 +6,9 @@ #ifndef __MV_UDC_H #define __MV_UDC_H +/* registers */ +#define U2x_CAPREGS_OFFSET 0x100 + #define VUSBHS_MAX_PORTS 8 #define DQH_ALIGNMENT 2048 @@ -174,9 +177,9 @@ struct mv_udc { struct platform_device *dev; int irq; + void __iomem *base; struct mv_cap_regs __iomem *cap_regs; struct mv_op_regs __iomem *op_regs; - void __iomem *phy_regs; unsigned int max_eps; struct mv_dqh *ep_dqh; size_t ep_dqh_size; @@ -219,6 +222,8 @@ struct mv_udc { /* some SOC has mutiple clock sources for USB*/ struct clk *clk; + + struct phy *phy; }; /* endpoint data structure */ diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c index 95f52232493b..c701c83d3af5 100644 --- a/drivers/usb/gadget/udc/mv_udc_core.c +++ b/drivers/usb/gadget/udc/mv_udc_core.c @@ -1069,14 +1069,11 @@ static int mv_udc_enable_internal(struct mv_udc *udc) if (retval) return retval; - if (udc->pdata->phy_init) { - retval = udc->pdata->phy_init(udc->phy_regs); - if (retval) { - dev_err(&udc->dev->dev, - "init phy error %d\n", retval); - udc_clock_disable(udc); - return retval; - } + retval = phy_init(udc->phy); + if (retval) { + dev_err(&udc->dev->dev, "init phy error %d\n", retval); + udc_clock_disable(udc); + return retval; } udc->active = 1; @@ -1095,8 +1092,7 @@ static void mv_udc_disable_internal(struct mv_udc *udc) { if (udc->active) { dev_dbg(&udc->dev->dev, "disable udc\n"); - if (udc->pdata->phy_deinit) - udc->pdata->phy_deinit(udc->phy_regs); + phy_exit(udc->phy); udc_clock_disable(udc); udc->active = 0; } @@ -2147,30 +2143,16 @@ static int mv_udc_probe(struct platform_device *pdev) if (IS_ERR(udc->clk)) return PTR_ERR(udc->clk); - r = platform_get_resource_byname(udc->dev, IORESOURCE_MEM, "capregs"); + r = platform_get_resource(udc->dev, IORESOURCE_MEM, 0); if (r == NULL) { dev_err(&pdev->dev, "no I/O memory resource defined\n"); return -ENODEV; } - udc->cap_regs = (struct mv_cap_regs __iomem *) - devm_ioremap(&pdev->dev, r->start, resource_size(r)); - if (udc->cap_regs == NULL) { - dev_err(&pdev->dev, "failed to map I/O memory\n"); - return -EBUSY; - } - - r = platform_get_resource_byname(udc->dev, IORESOURCE_MEM, "phyregs"); - if (r == NULL) { - dev_err(&pdev->dev, "no phy I/O memory resource defined\n"); - return -ENODEV; - } + udc->base = devm_ioremap(&pdev->dev, r->start, resource_size(r)); - udc->phy_regs = devm_ioremap(&pdev->dev, r->start, resource_size(r)); - if (udc->phy_regs == NULL) { - dev_err(&pdev->dev, "failed to map phy I/O memory\n"); - return -EBUSY; - } + udc->cap_regs = + (void __iomem *) ((unsigned long)udc->base + U2x_CAPREGS_OFFSET); /* we will acces controller register, so enable the clk */ retval = mv_udc_enable_internal(udc); From patchwork Wed Aug 22 20:43:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573277 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 036E913B6 for ; Wed, 22 Aug 2018 21:53:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E64522B5C8 for ; Wed, 22 Aug 2018 21:53:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA1862BCF4; Wed, 22 Aug 2018 21:53:36 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8AFBA2B5C8 for ; Wed, 22 Aug 2018 21:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=RXva/JMzzimfUdcpWeHQCE09fBQEi4U0FoDEMNaMZ7Y=; b=kBNkAKXPCVNj8GBCCsqyTKtUxo n/oAzir5QvdQyy/0au6AeUqnEpQEreYVm09RGi6ZdyPrttaXCognVc9/1lHjGbIobTKVKqS5PSATh yVmZvKwZlYMyatxw9WYApjUt4HL5eZ+rnPq4FzrQbjfuy0sntpf9Oc7n1s+JMjZ8WOYHQ7Ma//TqX 2Zmco95QKcT4BRrMZHHv1w6WN8fyw8UMM+VGil4fpYI/6RrVaXAvBqyagxJ18tCvoSxzv98tU/Zj/ 7SbK3grSX6khBbToW2+iyyfjnhaTiDJyyZPUttAYtR4gDaxyfjSbkBb3vskdp0Bgx6+Ggxb+FSJaK JFhibhRw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb4J-0001s6-8z; Wed, 22 Aug 2018 21:53:35 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb40-0001Oj-3J for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Aug 2018 21:53:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7zqY87UjxiFl2Ldz4To9z+jxMZld6NFWRKZKYQfxws4=; b=bONNP/WbVQN+OsrddaCP3fC3P pZyeLmeuaMmWUJSgIzHYfD1OjCzV90l5xF52Jp9igNkYA980+XeHhFFJok+edyFVWHJzMBxbfKFuD f1ssHOVjHPDxc6vtj1dPcpzAv0cQQe5kAgCGAXkaaeqv1s2GDnMID65wbH6bhXDJb4+Qoz3IaiKWJ PC5a/qYYL9ISNla1ljaHY18PDlYyknKFPiF+Hw77vvQKFH8jkQ+4jcZFDsAm8aoD34uGHwZkGbOY2 686IbQl5wsUw2a1/CJlWfT9cPDlr4vGaUZMyoBxfyb2LjHuLqyGE1azUvpq17IAM6BnVCf1hZCGKB 29Wp2HbRA==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZz7-0003DP-8k for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:44:10 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3809FB5B97; Wed, 22 Aug 2018 22:43:46 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ZKJfPONjqW_S; Wed, 22 Aug 2018 22:43:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id B7415B5B9F; Wed, 22 Aug 2018 22:43:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KafwWKzl1TPP; Wed, 22 Aug 2018 22:43:16 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 4B0BAB5B97; Wed, 22 Aug 2018 22:43:14 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 11/14] USB: EHCI: ehci-mv: add DT support Date: Wed, 22 Aug 2018 22:43:04 +0200 Message-Id: <20180822204307.13251-12-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_164409_698399_CB7D7A42 X-CRM114-Status: GOOD ( 15.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add Device tree support. Signed-off-by: Lubomir Rintel --- drivers/usb/host/ehci-mv.c | 41 +++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c index 43b300c90875..f26109eafdbf 100644 --- a/drivers/usb/host/ehci-mv.c +++ b/drivers/usb/host/ehci-mv.c @@ -34,11 +34,11 @@ struct ehci_hcd_mv { void __iomem *op_regs; struct usb_phy *otg; + struct clk *clk; - struct mv_usb_platform_data *pdata; struct phy *phy; - struct clk *clk; + int (*set_vbus)(unsigned int vbus); }; static void ehci_clock_enable(struct ehci_hcd_mv *ehci_mv) @@ -100,11 +100,6 @@ static int mv_ehci_probe(struct platform_device *pdev) int retval = -ENODEV; u32 offset; - if (!pdata) { - dev_err(&pdev->dev, "missing platform_data\n"); - return -ENODEV; - } - if (usb_disabled()) return -ENODEV; @@ -114,7 +109,12 @@ static int mv_ehci_probe(struct platform_device *pdev) platform_set_drvdata(pdev, hcd); ehci_mv = hcd_to_ehci_hcd_mv(hcd); - ehci_mv->pdata = pdata; + + ehci_mv->mode = MV_USB_MODE_HOST; + if (pdata) { + ehci_mv->mode = pdata->mode; + ehci_mv->set_vbus = pdata->set_vbus; + } ehci_mv->phy = devm_phy_get(&pdev->dev, "usb"); if (IS_ERR(ehci_mv->phy)) { @@ -166,7 +166,6 @@ static int mv_ehci_probe(struct platform_device *pdev) ehci = hcd_to_ehci(hcd); ehci->caps = (struct ehci_caps *) ehci_mv->cap_regs; - ehci_mv->mode = pdata->mode; if (ehci_mv->mode == MV_USB_MODE_OTG) { ehci_mv->otg = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); if (IS_ERR(ehci_mv->otg)) { @@ -191,8 +190,8 @@ static int mv_ehci_probe(struct platform_device *pdev) /* otg will enable clock before use as host */ mv_ehci_disable(ehci_mv); } else { - if (pdata->set_vbus) - pdata->set_vbus(1); + if (ehci_mv->set_vbus) + ehci_mv->set_vbus(1); retval = usb_add_hcd(hcd, hcd->irq, IRQF_SHARED); if (retval) { @@ -211,8 +210,8 @@ static int mv_ehci_probe(struct platform_device *pdev) return 0; err_set_vbus: - if (pdata->set_vbus) - pdata->set_vbus(0); + if (ehci_mv->set_vbus) + ehci_mv->set_vbus(0); err_disable_clk: mv_ehci_disable(ehci_mv); err_put_hcd: @@ -233,8 +232,8 @@ static int mv_ehci_remove(struct platform_device *pdev) otg_set_host(ehci_mv->otg->otg, NULL); if (ehci_mv->mode == MV_USB_MODE_HOST) { - if (ehci_mv->pdata->set_vbus) - ehci_mv->pdata->set_vbus(0); + if (ehci_mv->set_vbus) + ehci_mv->set_vbus(0); mv_ehci_disable(ehci_mv); } @@ -265,14 +264,20 @@ static void mv_ehci_shutdown(struct platform_device *pdev) hcd->driver->shutdown(hcd); } +static const struct of_device_id ehci_mv_dt_ids[] = { + { .compatible = "marvell,pxau2o-ehci", }, + {}, +}; + static struct platform_driver ehci_mv_driver = { .probe = mv_ehci_probe, .remove = mv_ehci_remove, .shutdown = mv_ehci_shutdown, .driver = { - .name = "mv-ehci", - .bus = &platform_bus_type, - }, + .name = "mv-ehci", + .bus = &platform_bus_type, + .of_match_table = ehci_mv_dt_ids, + }, .id_table = ehci_id_table, }; From patchwork Wed Aug 22 20:43:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573281 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2ED86920 for ; Wed, 22 Aug 2018 21:53:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B2202B5C8 for ; Wed, 22 Aug 2018 21:53:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C0642BCF4; Wed, 22 Aug 2018 21:53:59 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B941B2B5C8 for ; Wed, 22 Aug 2018 21:53:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=6mumStOaFxIuArE/EnK2tlSpJ+wnOCwlxYDJ8F6ix+g=; b=jlba7WRfcirgDoKvz2wGJjHwwE 8WRszFvuQOLqZyWm319X3siXAawRSk4RWXnyO9N8AO169FHW2CuNefkNaY1QTLcX1xr2SkjmCLy2w FBpMWKumCbJIcuERCJGAaQwQezlmlMDrL0oNOflrwkgNrgDhjsAJFnoLltJk0c3VyVgxOMqvtpFjo Ge7JTtpWs+rgtDv9u1ovW+F0FjFQkiaMIn6EO4tO7ALCxaxgz0eySBEELt+Fm2VZOFW2L0THv6Dyb AUWTBU0pkowyaDXGUiI/w6yOvKL3UqKXff/uhGYzZa6GuJCtLYT2q4YAsZbVFvFzQUO9jRdwcyfvz v7rggGMA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb4f-0002Mq-3t; Wed, 22 Aug 2018 21:53:57 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb43-0001Oj-94 for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Aug 2018 21:53:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XYo8GlubQ65nojf86vNKdIzIiY/AId5Iq6Z40DyCDXg=; b=nfksdant9C9+NHi54pAj5VBmC h/MAgfomg4142FwLri8qlLKDTdrqby6Kbn4dXdtDBB9kbR/xLKkVuuN0Dv5nPvOwTiVw19HUUheHZ R814Mpp0bN0u2TfKwdGelS1hHcys7e3eEbGVEENNHbyKAKRO3+WMJedRlHrr/MUwrN0xVq1GAS4aa o0Lgw5zOtXLpKhP+17SE6NFCvGgbIh8Wba8JisaKa9J1gvQHf6GNrfTUsfoA+a0ewwaJXy0ygeNJv 8/D62njRvvbsezKVMQRF0vC8MtRAOIul6fn/Eqjb1A+HVKK4EnBhvkiB5JJDqPnnU85xap+bIcnwn 22irallcA==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZz7-0003DM-8k for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:44:10 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 331D4B5BB7; Wed, 22 Aug 2018 22:43:43 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id HBsFBq-qV94k; Wed, 22 Aug 2018 22:43:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 6CDD7B5B97; Wed, 22 Aug 2018 22:43:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UG2cAdYFV3kr; Wed, 22 Aug 2018 22:43:16 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id A1578B5B99; Wed, 22 Aug 2018 22:43:14 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 12/14] dt-bindings: ehci-mv: add bindings Date: Wed, 22 Aug 2018 22:43:05 +0200 Message-Id: <20180822204307.13251-13-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_164409_598375_DEF8D750 X-CRM114-Status: GOOD ( 11.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- .../devicetree/bindings/usb/ehci-mv.txt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/ehci-mv.txt diff --git a/Documentation/devicetree/bindings/usb/ehci-mv.txt b/Documentation/devicetree/bindings/usb/ehci-mv.txt new file mode 100644 index 000000000000..335589895763 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ehci-mv.txt @@ -0,0 +1,23 @@ +* Marvell PXA/MMP EHCI controller. + +Required properties: + +- compatible: must be "marvell,pxau2o-ehci" +- reg: physical base addresses of the controller and length of memory mapped region +- interrupts: one EHCI controller interrupt should be described here +- clocks: phandle list of usb clocks +- clock-names: should be "USBCLK" +- phys: phandle for the PHY device +- phy-names: should be "usb" + +Example: + + ehci0: usb-ehci@d4208000 { + compatible = "marvell,pxau2o-ehci"; + reg = <0xd4208000 0x200>; + interrupts = <44>; + clocks = <&soc_clocks MMP2_CLK_USB>; + clock-names = "USBCLK"; + phys = <&usb_otg_phy>; + phy-names = "usb"; + }; From patchwork Wed Aug 22 20:43:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573279 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AEDBD920 for ; Wed, 22 Aug 2018 21:53:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E7B62B5C8 for ; Wed, 22 Aug 2018 21:53:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 925D42BCF4; Wed, 22 Aug 2018 21:53:53 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5075E2B5C8 for ; Wed, 22 Aug 2018 21:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=IRoIwfmZe5HtCEZUGN9YOaZtnhk1HgWbs0bqhsGIErc=; b=r7abRVJRgZaP4m0fW1EhFtO+Dj BtAFKKjncAqVJsgyYwtV2MaIeWVFh1rDu1upiLDmgpghAFEdHhfS0OAhex6SrfF3In/cCp1fLsFnZ 4W6VASgQp9jRW8MZ2OsOSNoT2y2fvx8HNxcOGnjRv6irCE3Ln2o+i+oJ9Q79VDMGPbj+tItwL/5J8 ieqNLeEzd2LE7dh5GNVemA3u4VFh2ovBu/+vy02C8xJKM0+M67hgtbvLEKdbMwUPeiO/+OH2tiHav qF14pJp8e+Lo3gyMpmnLxL75HpagINPh1MT9l2S15lI31sm1PPijWPwueF8HcE1F2wZd9VbKCFkg7 +uxOIh8A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb4T-00027W-UB; Wed, 22 Aug 2018 21:53:45 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb41-0001Oj-S7 for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Aug 2018 21:53:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+tFrIdAes/MvorsaLZaFixm6ftKDxWQ3TGwbi0IBt44=; b=MMc6wZ9q1HhcjkiDaDlZZP1YW XL3urAeHpl1HYydTrfvuDJZvcqzdoxdhPQyr76f9jGUlKZE+RsuD2zaU2FWqKLvkxeoOcCVIQmHOU rC6BiOcKSXk8uADR6mJbjvchPqjt5iLOAJn00D+xSe80cM7zpBLIeIW5QZ7F9NWEZuI+PtEunOOBq B70fqsnsoSwW0S9mKV7q/A9EJJ0IHxOHeEi6KNtyNcJ17jPiKPCdV7N9EaVjxUO8RTF+VMR75PTlv ccNu753yovvBjtF78j0IdXnwbI4jYiG7vhaAWqnDA/6KmYdR+0/o+tKCNJNaeYozNIX9dSiEDRVW+ WAWOTH6Gg==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZz7-0003DN-8n for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:44:10 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 254ECB5AEE; Wed, 22 Aug 2018 22:43:44 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id yJ8dVJ6Ryzrk; Wed, 22 Aug 2018 22:43:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id CEC5AB5BA0; Wed, 22 Aug 2018 22:43:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id OqFRnJoP10yJ; Wed, 22 Aug 2018 22:43:17 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 0A2CBB5B9B; Wed, 22 Aug 2018 22:43:15 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 13/14] DT: marvell,mmp2: add OTG PHY Date: Wed, 22 Aug 2018 22:43:06 +0200 Message-Id: <20180822204307.13251-14-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_164409_602305_98DC25D8 X-CRM114-Status: UNSURE ( 9.00 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The USB OTG PHY chip. To be used by the OTG controller. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/boot/dts/mmp2.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index 766bbb8495b6..14a3448f38b9 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -117,6 +117,13 @@ reg-names = "mux status", "mux mask"; mrvl,intc-nr-irqs = <2>; }; + + usb_otg_phy0: usb-otg-phy@d4207000 { + compatible = "marvell,mmp2-usb-phy"; + reg = <0xd4207000 0x40>; + #phy-cells = <0>; + status = "disabled"; + }; }; apb@d4000000 { /* APB */ From patchwork Wed Aug 22 20:43:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573273 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7E61920 for ; Wed, 22 Aug 2018 21:53:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95F9D205A8 for ; Wed, 22 Aug 2018 21:53:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89C0C22ADC; Wed, 22 Aug 2018 21:53:18 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CA497205A8 for ; Wed, 22 Aug 2018 21:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=PrVHR3Eq+R+5A2rqOku83TeMUlx+/hKvOgPW6To8KxQ=; b=opmR1IjczIOTMjhP3yIi6IuVe5 zClSff+P9o9AcWhjj9MavIt9lWg8Ndegvr5lyjt/KZZPEAS2WzQgE4LVt3vUmMaZoYEUMZ/+A1Zdu Xv/+K50DvEVT2+rey8gM9Wt2J2Mq+Fiooc27y+ZXzjPPHf+5DAWiaYN5r42JTFFIIUxVQSFeTyKLT 33gOUHX3wrNCeCl8KBnvOEGPBS4D4JhLKx/7UWWPTH3VBkZZ4XNo3bZd/njPnHm+rV+gccFBYnpt0 EvMwCrNtZnEUzV4kwdtmMhluIuBDBGOm5EMzFH5Dv5K/0nqbDgVNaSvfVsVYNae2+INAABBZEj5pq BTr+ryuQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb3x-0001PD-Vr; Wed, 22 Aug 2018 21:53:13 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsb3v-0001Oj-EY for linux-arm-kernel@bombadil.infradead.org; Wed, 22 Aug 2018 21:53:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=34AXksjGOabfm1vWmv9Lu7DHdkp7gjtrMmuhp9qMzKI=; b=dsitLxsHU8r+1avhJcp9wf+8t KwOCFWWP2CT44VsMTGOa/Xk1Lq5yzkrTM5SKBMf2FkM1AvOAC1OK/nps5+YEip6WqPavcHO3PIQ0u AnZW+VtFmT3N0Myk+OEcXRgXLt+WLTJAenkVWThAcZvN3JmKrR/3K7vWOfUuoIthMPioaQcM8puxw gDyMPxOnK0Faf90AJMkSUxzLdlRpXdsBrlPOEMnCWBbna5KBSCUs26lAntMyebCFNprQqZ7jKDVGF LAv7VPCuHVu4kD3LgBmQ4jfGIeLynJSHM2wjrNHBGqQQfyTgHwBXJbAk4xhTEwIdN6W5w8lV/hL51 WSQV6qCvA==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsZz7-0003DQ-8l for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2018 20:44:10 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 6E0F5B5B8A; Wed, 22 Aug 2018 22:43:50 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id APpEl16ePaH4; Wed, 22 Aug 2018 22:43:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 05884B5B99; Wed, 22 Aug 2018 22:43:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sfBipgWnvP2s; Wed, 22 Aug 2018 22:43:17 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 68962B5B94; Wed, 22 Aug 2018 22:43:15 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 14/14] DT: marvell,mmp2: add USB OTG host controller Date: Wed, 22 Aug 2018 22:43:07 +0200 Message-Id: <20180822204307.13251-15-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180822_164409_590273_ADC87B68 X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Eric Miao , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Haojian Zhuang , Kishon Vijay Abraham I , Lubomir Rintel , Rob Herring , Alan Stern , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/boot/dts/mmp2.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index 14a3448f38b9..63d4d5c6fd83 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -124,6 +124,17 @@ #phy-cells = <0>; status = "disabled"; }; + + usb_otg0: usb-otg@d4208000 { + compatible = "marvell,pxau2o-ehci"; + reg = <0xd4208000 0x200>; + interrupts = <44>; + clocks = <&soc_clocks MMP2_CLK_USB>; + clock-names = "USBCLK"; + phys = <&usb_otg_phy0>; + phy-names = "usb"; + status = "disabled"; + }; }; apb@d4000000 { /* APB */