Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3747873rwl; Tue, 27 Dec 2022 14:35:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXvB7kNNzyr/0nROxRbgD15jYDOK0aG76MrVP+LYhqJ/3zu8mEdH4QKrxu7OTrJ8/xZoANjt X-Received: by 2002:a17:906:9c85:b0:7c1:27a:80ed with SMTP id fj5-20020a1709069c8500b007c1027a80edmr19078818ejc.0.1672180524198; Tue, 27 Dec 2022 14:35:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672180524; cv=none; d=google.com; s=arc-20160816; b=kt0PM4o2Fmkp32r5P+NyIEpFYPoDxVB3vZQqZF9VTr+HJaXzaXAbzi5bVxDOAv6vzE kOv9BsYD4i+ikFgCT8hfXPMz1hbiMDJGOv9TUqoJWUNJXZ07EYtzQwRc4H3JhNuxcCjM 40qQGgn+6H/FTlybSV4vnq9ts6rebPsnN5WqdAcwB6+CndWWmSpcxgzzBFX+KmDtY+oh zn7gY2EBS1gA/JW1rIdibfbT6yi54TDfnsj4IJgTf798Xs/2+oN8PMhoUunrb4Fb3EJs T2go9lDa8ShPGKxhk2dLJFff7sRqO7Ts4iL+2PhQIg2/jia8KxaBgq3dSQ42eD/Z7Iqe z/Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=lTQ4/gerSsWEZq67/pHoPntbb9QKXuEY23piGKDGDBc=; b=tCCzz524uUdR9jL+mEuqGytEbY/xCi8Sv9Opj7objRytu04dQOtl4K0mf/3QkKmJML W0YmPOlfkovqjoJAfKNKZtwvOX8Kx6/gsgQWsT+0nlJKGJBDtKmWrrmrL7RtbtiBLrfV FatxnKCQ4F0wnI6Lbny78pHXrPbdTaHT55cYw91yKbWDpupymEf7poV0/mxhnggcE5HS bkTDC63Xx1Wgl3DSZ2RSAt8m8+DvlirCj7nH8tE6NcYi5i0c+LIFkW+2Wk0g1JHzk6dn TDc35uK5VrLAS3vStpS/z1vl3/1td+il5LsNi25keRcpyxM6ZEbGBR6GPxAvJE9/hbiH s5xA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hg3-20020a1709072cc300b0082b7e633998si11854858ejc.455.2022.12.27.14.35.08; Tue, 27 Dec 2022 14:35:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229786AbiL0WZW (ORCPT + 66 others); Tue, 27 Dec 2022 17:25:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbiL0WZU (ORCPT ); Tue, 27 Dec 2022 17:25:20 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8BF6CCD8; Tue, 27 Dec 2022 14:25:19 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 113C42F4; Tue, 27 Dec 2022 14:26:00 -0800 (PST) Received: from slackpad.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CC9FA3F663; Tue, 27 Dec 2022 14:25:16 -0800 (PST) Date: Tue, 27 Dec 2022 22:23:30 +0000 From: Andre Przywara To: Samuel Holland Cc: Sasha Levin , stable@vger.kernel.org, Vinod Koul , kishon@kernel.org, wens@csie.org, jernej.skrabec@gmail.com, wsa+renesas@sang-engineering.com, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.10 1/7] phy: sun4i-usb: Add support for the H616 USB PHY Message-ID: <20221227222330.5ebdf780@slackpad.lan> In-Reply-To: <530561e9-9ef8-7c8c-8e73-838c86a92266@sholland.org> References: <20221227203512.1214527-1-sashal@kernel.org> <530561e9-9ef8-7c8c-8e73-838c86a92266@sholland.org> Organization: Arm Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Dec 2022 15:58:16 -0600 Samuel Holland wrote: > Hi Sasha, > > On 12/27/22 14:35, Sasha Levin wrote: > > From: Andre Przywara > > > > [ Upstream commit 0f607406525d25019dd9c498bcc0b42734fc59d5 ] > > > > The USB PHY used in the Allwinner H616 SoC inherits some traits from its > > various predecessors: it has four full PHYs like the H3, needs some > > extra bits to be set like the H6, and puts SIDDQ on a different bit like > > the A100. Plus it needs this weird PHY2 quirk. > > > > Name all those properties in a new config struct and assign a new > > compatible name to it. > > > > Signed-off-by: Andre Przywara > > Reviewed-by: Samuel Holland > > Link: https://lore.kernel.org/r/20221031111358.3387297-5-andre.przywara@arm.com > > Signed-off-by: Vinod Koul > > Signed-off-by: Sasha Levin > > --- > > drivers/phy/allwinner/phy-sun4i-usb.c | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c > > index 651d5e2a25ce..230987e55ece 100644 > > --- a/drivers/phy/allwinner/phy-sun4i-usb.c > > +++ b/drivers/phy/allwinner/phy-sun4i-usb.c > > @@ -974,6 +974,17 @@ static const struct sun4i_usb_phy_cfg sun50i_h6_cfg = { > > .missing_phys = BIT(1) | BIT(2), > > }; > > > > +static const struct sun4i_usb_phy_cfg sun50i_h616_cfg = { > > + .num_phys = 4, > > + .type = sun50i_h6_phy, > > + .disc_thresh = 3, > > + .phyctl_offset = REG_PHYCTL_A33, > > + .dedicated_clocks = true, > > + .phy0_dual_route = true, > > + .hci_phy_ctl_clear = PHY_CTL_SIDDQ, > > + .needs_phy2_siddq = true, > > This will fail to compile without b45c6d80325b ("phy: sun4i-usb: > Introduce port2 SIDDQ quirk"). However, like Andre mentioned in > reference to the devicetree updates[1], we were not expecting any of > these patches to be backported. Since you already dropped the DT > portion, there is no need to bother with these two patches either. Well, definitely not for 5.4 and 5.10, since the essential pinctrl and clock patches for the H616 were only added in 5.12, so there is no point in having USB support. I don't know how useful it is for 6.0, but having both patches in 6.1 would make some sense, since it's an LTS kernel. The H616 SoC became usable in 6.0, with the USB patches being delayed back then. And it's only those two that are missing from enabling USB support, IIRC. The DT part is not really relevant, since you can always use U-Boot's DT (recommended) or the DT from any newer kernel. So from an user's perspective, it would be very helpful to just have: - [PATCH AUTOSEL 6.1 12/28] - [PATCH AUTOSEL 6.1 13/28] Personally I would support this, since it makes all H616 based devices much more usable with next year's distribution kernels. I don't know if this fulfils the stable kernel rules, though, since strictly speaking they don't fix anything, but add (USB) support to a new SoC. Then again they are little risk, since most of the code is guarded by H616 filters, so wouldn't be used by other SoCs. Cheers, Andre > > Regards, > Samuel > > [1]: https://lore.kernel.org/lkml/20221220000115.19c152fe@slackpad.lan/ > > > +}; > > + > > 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 }, > > @@ -988,6 +999,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = { > > { .compatible = "allwinner,sun50i-a64-usb-phy", > > .data = &sun50i_a64_cfg}, > > { .compatible = "allwinner,sun50i-h6-usb-phy", .data = &sun50i_h6_cfg }, > > + { .compatible = "allwinner,sun50i-h616-usb-phy", .data = &sun50i_h616_cfg }, > > { }, > > }; > > MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match); >