Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4075576ybg; Fri, 25 Oct 2019 12:58:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNuU7N+gl3/xI5JTZV/YhVWlCCMTJJnDCAQJa2KG5a3yI83J/89hNjoWOc93JB9swjJyia X-Received: by 2002:a05:6402:128c:: with SMTP id w12mr6059568edv.284.1572033523384; Fri, 25 Oct 2019 12:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572033523; cv=none; d=google.com; s=arc-20160816; b=cFb4U1EfIayrET8+DoYWDLkGmq+/dqvS1YP65qbZY6FaV9yWCwKQ8WdpHVdHDNmlR2 emVS2Ni9JzsDClADnDSvHCleJtViWc71OJKxmVZ+yAdpBwbi8GBToSPe06C2Rckidqj5 W8lZGJhPj4jxXRrdhFQ9g/Eoh8qHV3frqqKuaHz+8cmtjOhDVRNPZKswG+aQNboX+25s jjxEjyZzdOc3F91E34kkAF3F0KznlHmI4Tto/V2ZYg8PCa7xklJYaynu+ML8E5hjuIiZ jp0HxbBEtADO9KxhyCmhO3HI0wS8wjnFm9VC2gQ4QIo3PXsN9LDL5gb7S1S/vxmAwYgE cA4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=gipLVgrX2XvJaGiONhXv6tXJVahdjiAPKwWbGchh4eE=; b=reQ9tbkp6sJG2Xo5yN4WPCyvQBNUwJwJH9qfevS2MiO6F3hTpwU7Ohwe1BdH3AkMSw OmOeLl0PzoyqS1xDBONUsJsbbs54EJRLLdvHhW73A8NB793xsESG8wEH7IH2waudO926 7mX0TLHwmQQRu+wo5dccl+4rl3cgXn85qvQ1jfgipZSKYVVcp19Z4sE9hTYEnnVeZYwr DXNFG03ShEiF5mwj1mVs1t8GKiZ31J252YSu3r/Xa0U5ck6ZuxLsION537QQTZs6QYFu +aG5f1FV8q0NDST6zm3kXeuwmKu10BJ2ZrHM1eSpvySb8BTrF58R4ojn04dVFe+fjC/8 uWfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=l4T7eKbt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f54si1842597edb.255.2019.10.25.12.58.16; Fri, 25 Oct 2019 12:58:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=l4T7eKbt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502194AbfJYLqo (ORCPT + 99 others); Fri, 25 Oct 2019 07:46:44 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:38454 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730727AbfJYLqo (ORCPT ); Fri, 25 Oct 2019 07:46:44 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9PBk0uX092059; Fri, 25 Oct 2019 06:46:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1572003960; bh=gipLVgrX2XvJaGiONhXv6tXJVahdjiAPKwWbGchh4eE=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=l4T7eKbtrPl8WPLWtvgXYBxbPq69m9YNnxDLyDkSgbLDCelIyUzFUOucKMsGVWK0V KGLjWoXCvcSTwCI/HfGyYuA/BjiMhcXOkfeDkdMHzds+s61L9TR1xJwVmJE7dE53Pt Nd4KFvobxMjsHHNsrr15z6mUbKGU121x2FhEc4Jg= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9PBk0VY051064; Fri, 25 Oct 2019 06:46:00 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 25 Oct 2019 06:46:00 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 25 Oct 2019 06:45:49 -0500 Received: from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9PBjt0R102018; Fri, 25 Oct 2019 06:45:56 -0500 Subject: Re: [PATCH v2 2/4] phy: allwinner: add phy driver for USB3 PHY on Allwinner H6 SoC To: Ondrej Jirman , , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Thomas Gleixner , Arnd Bergmann CC: Greg Kroah-Hartman , Paul Kocialkowski , , , , Kishon Vijay Abraham I References: <20191024105500.2252707-1-megous@megous.com> <20191024105500.2252707-3-megous@megous.com> From: Kishon Vijay Abraham I Message-ID: Date: Fri, 25 Oct 2019 17:15:25 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191024105500.2252707-3-megous@megous.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 24/10/19 4:24 PM, Ondrej Jirman wrote: > From: Icenowy Zheng > > Allwinner H6 SoC contains a USB3 PHY (with USB2 DP/DM lines also > controlled). > > Add a driver for it. > > The register operations in this driver is mainly extracted from the BSP > USB3 driver. > > Signed-off-by: Ondrej Jirman > Signed-off-by: Icenowy Zheng > Reviewed-by: Chen-Yu Tsai > Acked-by: Maxime Ripard > --- > drivers/phy/allwinner/Kconfig | 12 ++ > drivers/phy/allwinner/Makefile | 1 + > drivers/phy/allwinner/phy-sun50i-usb3.c | 195 ++++++++++++++++++++++++ > 3 files changed, 208 insertions(+) > create mode 100644 drivers/phy/allwinner/phy-sun50i-usb3.c > > diff --git a/drivers/phy/allwinner/Kconfig b/drivers/phy/allwinner/Kconfig > index 215425296c77..fcae35ddd430 100644 > --- a/drivers/phy/allwinner/Kconfig > +++ b/drivers/phy/allwinner/Kconfig > @@ -45,3 +45,15 @@ config PHY_SUN9I_USB > sun9i SoCs. > > This driver controls each individual USB 2 host PHY. > + > +config PHY_SUN50I_USB3 > + tristate "Allwinner sun50i SoC USB3 PHY driver" > + depends on ARCH_SUNXI && HAS_IOMEM && OF > + depends on RESET_CONTROLLER > + select USB_COMMON Looks like USB_COMMON is not required here. > + select GENERIC_PHY > + help > + Enable this to support the USB3.0-capable transceiver that is > + part of some Allwinner sun50i SoCs. > + > + This driver controls each individual USB 2+3 host PHY combo. > diff --git a/drivers/phy/allwinner/Makefile b/drivers/phy/allwinner/Makefile > index 799a65c0b58d..bd74901a1255 100644 > --- a/drivers/phy/allwinner/Makefile > +++ b/drivers/phy/allwinner/Makefile > @@ -2,3 +2,4 @@ > obj-$(CONFIG_PHY_SUN4I_USB) += phy-sun4i-usb.o > obj-$(CONFIG_PHY_SUN6I_MIPI_DPHY) += phy-sun6i-mipi-dphy.o > obj-$(CONFIG_PHY_SUN9I_USB) += phy-sun9i-usb.o > +obj-$(CONFIG_PHY_SUN50I_USB3) += phy-sun50i-usb3.o > diff --git a/drivers/phy/allwinner/phy-sun50i-usb3.c b/drivers/phy/allwinner/phy-sun50i-usb3.c > new file mode 100644 > index 000000000000..8e170a4d0a11 > --- /dev/null > +++ b/drivers/phy/allwinner/phy-sun50i-usb3.c > @@ -0,0 +1,195 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Allwinner sun50i(H6) USB 3.0 phy driver > + * > + * Copyright (C) 2017 Icenowy Zheng > + * > + * Based on phy-sun9i-usb.c, which is: > + * > + * Copyright (C) 2014-2015 Chen-Yu Tsai > + * > + * Based on code from Allwinner BSP, which is: > + * > + * Copyright (c) 2010-2015 Allwinner Technology Co., Ltd. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include this too.. Thanks Kishon