Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1863300imd; Fri, 2 Nov 2018 01:46:28 -0700 (PDT) X-Google-Smtp-Source: AJdET5dghyIdcu4GIzin7Rsc7N7u8GnZjX6VBbH3ayqgo5TTC470ExUwdbill93ZA/ptiMlhubFa X-Received: by 2002:a62:500c:: with SMTP id e12-v6mr11155324pfb.30.1541148387937; Fri, 02 Nov 2018 01:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541148387; cv=none; d=google.com; s=arc-20160816; b=uiWD73CqcIcM1t66a6nMy5HyPJaSPgPaWo6wRGp21fxdYKZNpuiMXilFBRWijfPSHa rd5LHFBXN2RXNHGuv4KqPtjRt6V4ph/1jP965PH8L+WGCzlL+Kp4Xu57iP5Kzw8BfptB t5YPXVSPw9/fF+iWdhHA/aSY0z6VqkX1V+QJOPqotCnOL/2GJKjW/6s4Xouwcln5gJze Qz9auJ6brIaCZ4P2lkDMXCoXyugvtqibJF+qrcufc0edqjPvsSYKR88bizRG7Z2OoT+g oewUdkT33euKRucz4Tloh9IgVvV80mT7taBeEFnG2kOpQvZQfNXxqPhEW5SLYW8Y6WAu nlDQ== 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; bh=6Hy2UPlKiE2FxV+uAHoaEBOfx481Cdq3J57VKwmkIHU=; b=XQW/QH2V/rJfDWYRruHHu2qf+ABmosvOh77I0vYNADaCgyp5t2VyD5Hr3z2gQ0PtAx S9Kn1xH8gk6HekpvJ0cRXB8H9uqpmFXeZtQmhQp0xeoG/cREyQc7SIrtNMfjVK7vdJx6 oiTeOeHkYC1RiMSLvHt+/hTePEj3o5yk5T3o3BxgoLZ+ifCzF97sSrIO0x0PfswJIXLM xkaB3Y5Nh3Vf9DUa3Ty0TFFWHB1XR+itdTB3qvM4fonRx7sUxi03F4hbLb9ShnUA12ux 2tLYS/0QsJSPolmcJEb9WAWrstRCy1PadAyh6wOVyLU8TycTA2xIVpjgxgNoWI784L5s bLpA== 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; dmarc=fail (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 y40-v6si14099943pla.391.2018.11.02.01.46.12; Fri, 02 Nov 2018 01:46:27 -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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbeKBRu6 (ORCPT + 99 others); Fri, 2 Nov 2018 13:50:58 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:43310 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbeKBRu6 (ORCPT ); Fri, 2 Nov 2018 13:50:58 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id wA28i6o3124228; Fri, 2 Nov 2018 03:44:06 -0500 Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wA28i6tP107886 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 2 Nov 2018 03:44:06 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 2 Nov 2018 03:44:06 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Fri, 2 Nov 2018 03:44:06 -0500 Received: from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id wA28i30V027758; Fri, 2 Nov 2018 03:44:04 -0500 Subject: Re: [PATCH v4 03/10] phy: sun4i-usb: add support for H6 USB2 PHY To: Icenowy Zheng , Rob Herring , Maxime Ripard , Chen-Yu Tsai CC: , , , References: <20181004122855.22981-1-icenowy@aosc.io> <20181004122855.22981-4-icenowy@aosc.io> <9cca3453d646f38793df411c4471d062769b4f72.camel@aosc.io> From: Kishon Vijay Abraham I Message-ID: Date: Fri, 2 Nov 2018 14:13:38 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <9cca3453d646f38793df411c4471d062769b4f72.camel@aosc.io> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit 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 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. 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); >