Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp787186imu; Fri, 9 Nov 2018 06:10:22 -0800 (PST) X-Google-Smtp-Source: AJdET5dTlkfOn6vfptXrn0rsplckR/tMupyjfd6Fq2i0k2eun0xlKdiQe+WPiHs+nP4C0qTqQxEJ X-Received: by 2002:a17:902:e081:: with SMTP id cb1-v6mr9005173plb.206.1541772622527; Fri, 09 Nov 2018 06:10:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541772622; cv=none; d=google.com; s=arc-20160816; b=UaZIfnAFSmR243azh3YkSJCF1+B2jFDmgyq83hknr8EoNXLZ2coCk97YfHDudecoh7 4BmwM/nH7jG0wKmdvFjVuEhcdC9EsRqs2S1cb7LweYuCXtk0lqMuikeucfXBnT6RbKnY 2iUJu/mGRZ+djtJ4av7b2kgP/IfF4j+UuoD0vq/iU4l6XJ/J4qKxXFQu4n5ju66k+bA2 9Hgbpemy0lBNQGpsocsIT3yBkThr8FdomckVgyOkXCYUrJzu/uR0FfgESZRutx6WsD+J 2BBtr0XImg/OlMDYv9SalEq0qiotjlQZMdoRX3+Mi67U9eTzdCjKGilsydVqmn3Y6gvg Ejng== 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:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id; bh=U+dVTbYiqFEGD/xfxEkfpGBhr2aEFVLucuIhsPn4UNU=; b=aAwxH9xK8xXe/XJfKI5sL9FK+CrUx/USIN1UDE9p/ZiWxvvUxNsPhRPrgpzRWDmsb8 Xq0XIIOEu+7fZU1oVQfPtjK4EHA4H4BVWmts/0h1izE64tAeqdfQO4n2gS8BBKS5wd7R sXAIQKWOdkX3zykORqj2MyvfIK+qUhAS9QjAbmztsTz+KySqhQYqocfuhVmy4E5bWzka bEiwhWQ8CsuWnBBbTkXDW//2gQFSd19IxqrwaE3ZvkL6MoOSNphtyUo9xWkjUtJguzii r0j/49UfSz1yk1eic1nL6q5HNsZ55VYn2MYAqWyNWG2gCqRIuv5ZHvi6Ki4QNTxKk3Q4 822Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c68-v6si7666975pfa.267.2018.11.09.06.09.48; Fri, 09 Nov 2018 06:10:22 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728130AbeKIXpo (ORCPT + 99 others); Fri, 9 Nov 2018 18:45:44 -0500 Received: from hermes.aosc.io ([199.195.250.187]:42205 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728050AbeKIXpn (ORCPT ); Fri, 9 Nov 2018 18:45:43 -0500 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 7D83A15D7A2; Fri, 9 Nov 2018 14:04:54 +0000 (UTC) Message-ID: <95bd076d865d046b6ba6a929eb7a5ade50c05417.camel@aosc.io> Subject: Re: [PATCH v4 03/10] phy: sun4i-usb: add support for H6 USB2 PHY From: Icenowy Zheng To: Kishon Vijay Abraham I , Rob Herring , Maxime Ripard , Chen-Yu Tsai Cc: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Fri, 09 Nov 2018 22:04:47 +0800 In-Reply-To: References: <20181004122855.22981-1-icenowy@aosc.io> <20181004122855.22981-4-icenowy@aosc.io> <9cca3453d646f38793df411c4471d062769b4f72.camel@aosc.io> Organization: Anthon Open-Source Community Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2018-11-02五的 14:13 +0530,Kishon Vijay Abraham I写道: > > On 02/11/18 2:11 PM, Icenowy Zheng wrote: > > 在 2018-10-04四的 20:28 +0800,Icenowy Zheng写道: > > > The USB 2.0 PHY on Allwinner H6 SoC is similar to older Allwinner > > > SoCs, > > > with some USB0 quirk like A83T and PHY index 1/2 missing. > > > > > > Add support for it. > > > > > > Signed-off-by: Icenowy Zheng > > > Reviewed-by: Chen-Yu Tsai > > > > Excuse me. > > > > Kishon, could you check PATCH 1~3 and queue them? > > > > Even if USB3 support is pending, USB2 support will still be useful, > > and > > they're independent. > > I'll queue once -rc1 is tagged. Ping. 4.20-rc1 is out now. > > Thanks > Kishon > > > > --- > > > No changes in v4. > > > > > > Changes in v3: > > > - Added Chen-Yu's Review tag. > > > > > > drivers/phy/allwinner/phy-sun4i-usb.c | 19 +++++++++++++++++-- > > > 1 file changed, 17 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c > > > b/drivers/phy/allwinner/phy-sun4i-usb.c > > > index 881078ff73f6..ae16854a770a 100644 > > > --- a/drivers/phy/allwinner/phy-sun4i-usb.c > > > +++ b/drivers/phy/allwinner/phy-sun4i-usb.c > > > @@ -115,6 +115,7 @@ enum sun4i_usb_phy_type { > > > sun8i_r40_phy, > > > sun8i_v3s_phy, > > > sun50i_a64_phy, > > > + sun50i_h6_phy, > > > }; > > > > > > struct sun4i_usb_phy_cfg { > > > @@ -295,7 +296,8 @@ static int sun4i_usb_phy_init(struct phy > > > *_phy) > > > return ret; > > > } > > > > > > - if (data->cfg->type == sun8i_a83t_phy) { > > > + if (data->cfg->type == sun8i_a83t_phy || > > > + data->cfg->type == sun50i_h6_phy) { > > > if (phy->index == 0) { > > > val = readl(data->base + data->cfg- > > > > phyctl_offset); > > > val |= PHY_CTL_VBUSVLDEXT; > > > @@ -344,7 +346,8 @@ static int sun4i_usb_phy_exit(struct phy > > > *_phy) > > > struct sun4i_usb_phy_data *data = to_sun4i_usb_phy_data(phy); > > > > > > if (phy->index == 0) { > > > - if (data->cfg->type == sun8i_a83t_phy) { > > > + if (data->cfg->type == sun8i_a83t_phy || > > > + data->cfg->type == sun50i_h6_phy) { > > > void __iomem *phyctl = data->base + > > > data->cfg->phyctl_offset; > > > > > > @@ -959,6 +962,17 @@ static const struct sun4i_usb_phy_cfg > > > sun50i_a64_cfg = { > > > .phy0_dual_route = true, > > > }; > > > > > > +static const struct sun4i_usb_phy_cfg sun50i_h6_cfg = { > > > + .num_phys = 4, > > > + .type = sun50i_h6_phy, > > > + .disc_thresh = 3, > > > + .phyctl_offset = REG_PHYCTL_A33, > > > + .dedicated_clocks = true, > > > + .enable_pmu_unk1 = true, > > > + .phy0_dual_route = true, > > > + .missing_phys = BIT(1) | BIT(2), > > > +}; > > > + > > > static const struct of_device_id sun4i_usb_phy_of_match[] = { > > > { .compatible = "allwinner,sun4i-a10-usb-phy", .data = > > > &sun4i_a10_cfg }, > > > { .compatible = "allwinner,sun5i-a13-usb-phy", .data = > > > &sun5i_a13_cfg }, > > > @@ -972,6 +986,7 @@ static const struct of_device_id > > > sun4i_usb_phy_of_match[] = { > > > { .compatible = "allwinner,sun8i-v3s-usb-phy", .data = > > > &sun8i_v3s_cfg }, > > > { .compatible = "allwinner,sun50i-a64-usb-phy", > > > .data = &sun50i_a64_cfg}, > > > + { .compatible = "allwinner,sun50i-h6-usb-phy", .data = > > > &sun50i_h6_cfg }, > > > { }, > > > }; > > > MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match); > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel