Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1861443imd; Fri, 2 Nov 2018 01:43:58 -0700 (PDT) X-Google-Smtp-Source: AJdET5cxBCvmP+ckGCQmTvfrfoNMaSzoa1Wcb//oDqovZ1KZYZf7/l3KoDFRGhVlLwXlrWpC5hIa X-Received: by 2002:a62:160c:: with SMTP id 12-v6mr10968736pfw.45.1541148238770; Fri, 02 Nov 2018 01:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541148238; cv=none; d=google.com; s=arc-20160816; b=N+z9LDPgjnV6/RNiPfLEDGz8E2dGSOdF0yovcn11v/uf+h7TAuE1XN0uTYCtBljxM0 hRW1RyYEuAiTYpWGRyAUW/ZK/9Vpgtv3z5zVdSW0yXEYuY5MNqDSY3GkPF7Vjg3fUP2K gcvlHL40HIeSO3m4+Jgi6mgO7OPA9lewwjAY0eS76ZXdYKbW+5J/rIUHtwTFqkBap2tu EtZv7fi6m/j4Qpvw9sL3QmUPgBndNJZ5mg+j5i+C34ABv5pqB+CfiqtVOZgwlFZPiFAd dP0oUgfg1Ku81GoLxSE6hBA4h3qbD5Yp7AjvCSGm8bJewoEReSOXTQiqEGX//83tMVHH oBVQ== 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=Prl9E4/PJJrDbdePLoebjpttrq1RP0r5KtgZS5oVLtw=; b=AbD3F4eQIMFQMLDGpT0EW4OycHrQGJozTUeqWvZZXMl0eGcanwHLcxnf1I5/Of4aqg kRSu/aFtjcxWePrUZjkYh0qFMyQWB/4I5EKJBhZFtDdrO2EZdi2VIXi9eVCr8/wZ7IEG /f2YrF4ic/eLeAlgCF1jXav/xVNXpBofhFzUCCB79kXeWMlTKiqdXbHjKc+EvXC5S+hc YlWpuQgztyw2QCXf6uf7RU6qp36P8fs9xhW8F3BWIri/vHGcFz4PHZUE+A/ebzWwxZWZ W63iqeiROaucdtioBw97SYbR0PONIxRcEHroLyw99fIwa7BN3/eASpYG+GuHgw4pwmBs MDmg== 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 y12-v6si7757489pgg.158.2018.11.02.01.43.43; Fri, 02 Nov 2018 01:43:58 -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; 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 S1726119AbeKBRsZ (ORCPT + 99 others); Fri, 2 Nov 2018 13:48:25 -0400 Received: from hermes.aosc.io ([199.195.250.187]:54447 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725986AbeKBRsZ (ORCPT ); Fri, 2 Nov 2018 13:48:25 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 15733215F98; Fri, 2 Nov 2018 08:41:57 +0000 (UTC) Message-ID: <9cca3453d646f38793df411c4471d062769b4f72.camel@aosc.io> Subject: Re: [PATCH v4 03/10] phy: sun4i-usb: add support for H6 USB2 PHY From: Icenowy Zheng To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , Kishon Vijay Abraham I Cc: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Fri, 02 Nov 2018 16:41:54 +0800 In-Reply-To: <20181004122855.22981-4-icenowy@aosc.io> References: <20181004122855.22981-1-icenowy@aosc.io> <20181004122855.22981-4-icenowy@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-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. > --- > 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);