From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EE812EA17C; Sat, 16 Aug 2025 14:13:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755353593; cv=none; b=jSvY9EiJwtD8YYre/sXiQxY44ZVPIJX+ma1K3jBbgoFU5fkQsSLwop+nUc0he/yFX72bhwVrsyeuAVd3Tbnu474Xd33aoWwTi65UDgysKL2l594ZUFObTQhmymCshRZ0Cq6V+zHU5I2aUwybF63xf1PmptcJU2QqnbSc7uPQ4MU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755353593; c=relaxed/simple; bh=MCwup8/VMzm2vt/sg3v0hqhdOZGr4LtLR5MBWmocvfU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dlkenrVEtZf+ok8GTJ4jrr/rZpRK2trkRnpYwOK3ypBEKHsaVU9UMQVaF1TalI6RU9SeqORtMZ++9NLfGexdTwZUxWEExy82VV6tcf2NP2GMQLkLu2cqxJrn81gc5enk9JraHJ+QLd5GGkB9gCWeBFdLx9UFfD9U0VYlxWfh4Mc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 2C1AA1595; Sat, 16 Aug 2025 07:13:02 -0700 (PDT) Received: from minigeek.lan (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BA4543F738; Sat, 16 Aug 2025 07:13:07 -0700 (PDT) Date: Sat, 16 Aug 2025 15:10:15 +0100 From: Andre Przywara To: iuncuim Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Michael Turquette , Stephen Boyd , Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH 6/7] arm64: dts: allwinner: a523: add DWC3 USB3.0 node Message-ID: <20250816151015.621f8da4@minigeek.lan> In-Reply-To: <20250816084700.569524-7-iuncuim@gmail.com> References: <20250816084700.569524-1-iuncuim@gmail.com> <20250816084700.569524-7-iuncuim@gmail.com> Organization: Arm Ltd. X-Mailer: Claws Mail 4.2.0 (GTK 3.24.31; x86_64-slackware-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 16 Aug 2025 16:46:59 +0800 iuncuim wrote: Hi, > From: Mikhail Kalashnikov > > After adding the phy bindings, we can also add dwc3 node, which uses the > previously added usbphy2 and part of usb3 from combophy. > All settings declared in dwc3 node are obtained from the x96qproplus' dtb. > BSP contains an additional glue driver for dwc3, but it seems that it is > not needed. > > Signed-off-by: Mikhail Kalashnikov > --- > .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 21 +++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi > index 233365496..ec170888a 100644 > --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi > @@ -606,6 +606,27 @@ mdio0: mdio { > }; > }; > > + dwc3: usb@4d00000 { > + compatible = "snps,dwc3"; Wouldn't we need an A523 specific compatible string first? > + reg = <0x04d00000 0x100000>; > + interrupts = ; > + dr_mode = "host"; > + clocks = <&ccu CLK_MBUS_USB3>, <&ccu CLK_USB3>, > + <&ccu CLK_USB2>, <&ccu CLK_USB3_SUSPEND>; > + clock-names = "bus_clk", "ref_clk3", "ref_clk2", "suspend"; How does this work, exactly? I see "bus_clk" (deprecated, should be "bus_early") and "suspend" in the bindings and the Linux driver, but where do ref_clk3 and ref_clk2 come from, and more importantly who is going to use them? IIUC, the binding hints that certain implementations could need more clocks, but then it's their responsibility to parse and enable them, in platform specific glue code, I think. > + maximum-speed = "super-speed"; > + phy_type = "utmi"; > + snps,dis_enblslpm_quirk; > + snps,dis-u1-entry-quirk; > + snps,dis-u2-entry-quirk; > + snps,dis_u3_susphy_quirk; > + snps,dis_u2_susphy_quirk; > + snps,dis_rxdet_inp3_quirk; > + phys = <&usbphy 2>, <&combophy>; Related to my comment on the other DT patch, this should be "<&combophy 0>" (with "#phy-cells = <1>;" in the PHY node, to be forward compatible. Cheers, Andre > + phy-names = "usb2-phy", "usb3-phy"; > + status = "disabled"; > + }; > + > combophy: phy@4f00000 { > compatible = "allwinner,sun55i-a523-usb3-pcie-phy"; > reg = <0x04f00000 0x100000>;