From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C538FC77B73 for ; Mon, 5 Jun 2023 15:04:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9EDCF84774; Mon, 5 Jun 2023 17:04:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id B40AE84665; Mon, 5 Jun 2023 17:04:42 +0200 (CEST) Received: from mx1.tinet.cat (mx1.tinet.cat [195.77.216.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 90B728471C for ; Mon, 5 Jun 2023 17:04:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xdrudis@tinet.cat X-ASG-Debug-ID: 1685977476-163e7b44ab412d0001-4l7tJC Received: from smtp01.tinet.cat (smtp.tinet.org [195.77.216.131]) by mx1.tinet.cat with ESMTP id nJWunzY68zF3P7g2; Mon, 05 Jun 2023 17:04:36 +0200 (CEST) X-Barracuda-Envelope-From: xdrudis@tinet.cat X-Barracuda-Effective-Source-IP: smtp.tinet.org[195.77.216.131] X-Barracuda-Apparent-Source-IP: 195.77.216.131 Received: from xdrudis.tinet.cat (180.red-79-152-181.dynamicip.rima-tde.net [79.152.181.180]) by smtp01.tinet.cat (Postfix) with ESMTPSA id DC09B605DE41; Mon, 5 Jun 2023 17:04:35 +0200 (CEST) Date: Mon, 5 Jun 2023 17:04:24 +0200 From: Xavier Drudis Ferran To: u-boot@lists.denx.de Cc: Simon Glass , Philipp Tomsich , Kever Yang , Lukasz Majewski , Sean Anderson , Marek Vasut , Christoph Fritz , Jagan Teki Subject: [PATCH v7 0/2] arm: dts: rockchip: rk3399: usb: ehci: Fix EHCI probe in rk3399 to access peripherals by USB 2 Message-ID: X-ASG-Orig-Subj: [PATCH v7 0/2] arm: dts: rockchip: rk3399: usb: ehci: Fix EHCI probe in rk3399 to access peripherals by USB 2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Barracuda-Connect: smtp.tinet.org[195.77.216.131] X-Barracuda-Start-Time: 1685977476 X-Barracuda-URL: https://webmail.tinet.cat:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 2003 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.8562 1.0000 2.7703 X-Barracuda-Spam-Score: 2.77 X-Barracuda-Spam-Status: No, SCORE=2.77 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=6.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.109641 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean EHCI probing in Rock pi 4 currently fails. Add a clock driver for usb2phy so that probing EHCI does not fail when missing one of the clocks in the bundle for usb_host0_ehci, since usb2phy is UCLASS_PHY but not UCLASS_CLK. Xavier Drudis Ferran (2): phy: rockchip-inno-usb2: Add usb2phy clock provider of 480MHz clock phy: rockchip-inno-usb2: Implement clock operations for usb2phy clock drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 109 +++++++++++++++++- 1 file changed, 106 insertions(+), 3 deletions(-) Cc: Simon Glass Cc: Philipp Tomsich Cc: Kever Yang Cc: Lukasz Majewski Cc: Sean Anderson Cc: Marek Vasut Cc: Christoph Fritz Cc: Jagan Teki Signed-off-by: Xavier Drudis Ferran --- Changes: v7: Error handling. Remove unnecessary if. Adding config data for rk3568 (untested). v6: just retested over current next branch and some corrections to message and headers (no changes to code). v5: fixes a bug that Christoph Fritz discovered, consisting in the wrong eror code returned when enabling or disabling the clock because property_enable() returns an error code in linux but the modified register value in U-Boot. This caused the clk disable to abort before freeing the clock. v4: move v3 to one patch in the series and add a second patch to add operations to enable disable the usb2phy 480Mhz clock. Also, honour clock-output-names for what is worth. v3: implement option 5 (bind usb2phy as a clk driver too) instead of option 1 (ehci-generic.c tolerates missing clocks). v2: implement option 1 (ehci-generic.c tolerates missing clocks) instead of option 3 (change dts node to remove the missing clock). -- 2.20.1