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 5BA56C352A1 for ; Tue, 6 Dec 2022 18:45:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B512A84F81; Tue, 6 Dec 2022 19:45:27 +0100 (CET) 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 C335F82F69; Tue, 6 Dec 2022 19:45:26 +0100 (CET) Received: from mx1.tinet.cat (mx1.dipta.cat [195.76.233.59]) (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 B65E784F81 for ; Tue, 6 Dec 2022 19:45:23 +0100 (CET) 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: 1670352322-12aaf263c951b7e0001-4l7tJC Received: from smtp01.tinet.cat (smtp.tinet.cat [195.77.216.131]) by mx1.tinet.cat with ESMTP id yMpbSgfXxOTST4IV; Tue, 06 Dec 2022 19:45:22 +0100 (CET) X-Barracuda-Envelope-From: xdrudis@tinet.cat X-Barracuda-Effective-Source-IP: smtp.tinet.cat[195.77.216.131] X-Barracuda-Apparent-Source-IP: 195.77.216.131 Received: from localhost (190.red-79-152-181.dynamicip.rima-tde.net [79.152.181.190]) by smtp01.tinet.cat (Postfix) with ESMTPSA id 30701605DE49; Tue, 6 Dec 2022 19:45:22 +0100 (CET) Date: Tue, 6 Dec 2022 19:45:08 +0100 From: Xavier Drudis Ferran To: Marek Vasut Cc: Xavier Drudis Ferran , u-boot@lists.denx.de, Simon Glass , Philipp Tomsich , Kever Yang , Lukasz Majewski , Sean Anderson Subject: Re: [PATCH v2] arm: dts: rockchip: rk3399: usb: ehci: Fix EHCI probe in rk3399 to access peripherals by USB 2. Message-ID: X-ASG-Orig-Subj: Re: [PATCH v2] arm: dts: rockchip: rk3399: usb: ehci: Fix EHCI probe in rk3399 to access peripherals by USB 2. References: <1d03c21b-19f9-dfb2-9560-848ccaeef425@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1d03c21b-19f9-dfb2-9560-848ccaeef425@denx.de> X-Barracuda-Connect: smtp.tinet.cat[195.77.216.131] X-Barracuda-Start-Time: 1670352322 X-Barracuda-URL: https://webmail.tinet.cat:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 898 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: SPAM GLOBAL 0.9809 1.0000 4.1220 X-Barracuda-Spam-Score: 4.12 X-Barracuda-Spam-Status: No, SCORE=4.12 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.102648 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.6 at phobos.denx.de X-Virus-Status: Clean El Mon, Dec 05, 2022 at 08:08:40PM +0100, Marek Vasut deia: > On 12/5/22 19:54, Xavier Drudis Ferran wrote: > > 5- Trying to replicate linux and have usb2phy somehow provide a clk, > > or have a separate clock device for usb2phy in addition to the phy > > device. I just can't seem to imagine how to achieve this with the > > U-Boot driver model, maybe because of my limited familiarity with > > it. > > Yes please > > Have a look at the end of drivers/led/led_gpio.c and how gpio_led_wrap binds > a gpio_led driver to each LED. You can bind an UCLASS_PHY and UCLASS_CLK > driver to the u2phy0 the same way, the u2phy0 would behave the same way as > gpio_led_wrap wrapper . You would likely be using device_bind_driver() > instead of device_bind_driver_to_node() in the bind callback. > Ok, I will take a look and send a v3 if I understand it. Thank you.