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 CA3C6C77B75 for ; Sat, 6 May 2023 10:07:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C597185B0A; Sat, 6 May 2023 12:07:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=rock-chips.com 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 B737B85C96; Sat, 6 May 2023 12:07:35 +0200 (CEST) Received: from mail-m11879.qiye.163.com (mail-m11879.qiye.163.com [115.236.118.79]) (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 AA28484D2A for ; Sat, 6 May 2023 12:07:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kever.yang@rock-chips.com Received: from [192.168.60.65] (unknown [103.29.142.67]) by mail-m11879.qiye.163.com (Hmail) with ESMTPA id 9B3B06803E3; Sat, 6 May 2023 18:07:08 +0800 (CST) Message-ID: Date: Sat, 6 May 2023 18:07:06 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v5 1/6] ARM: dts: rockchip: rk3588-rock-5b-u-boot: add USB 2.0 host Content-Language: en-US To: Eugen Hristev , jonas@kwiboo.se, u-boot@lists.denx.de Cc: u-boot-amlogic@groups.io, xdrudis@tinet.cat, jagan@edgeble.ai, neil.armstrong@linaro.org, anarsoul@gmail.com, William Wu References: <20230419134014.128461-1-eugen.hristev@collabora.com> From: Kever Yang In-Reply-To: <20230419134014.128461-1-eugen.hristev@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVkZGE1NVhkZSkgYGU0ZHUhDGlUTARMWGhIXJBQOD1 lXWRgSC1lBWUpLSFVJQlVKT0lVTUxZV1kWGg8SFR0UWUFZT0tIVUpKS0hKTFVKS0tVS1kG X-HM-Tid: 0a87f08793f92eb5kusn9b3b06803e3 X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PT46DCo4Pz0PLzICAkgPNhMz Nk0aCgxVSlVKTUNISE1MTUhLTU1MVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlKS0hVSUJVSk9JVU1MWVdZCAFZQUNLSEs3Bg++ 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 Hi Eugen,     When I try to apply this patch, I got conflict for rk3588-rock-5b-u-boot.dtsi, could you please help to send a rebase? Thanks, - Kever On 2023/4/19 21:40, Eugen Hristev wrote: > Add USB 2.0 host nodes and PHYs. > > Co-developed-by: William Wu > Signed-off-by: William Wu > Signed-off-by: Eugen Hristev > --- > Changes in v5: > - none > > Changes in v4: > - removed u-boot,dm-spl on regulator which was useless > - moved usb nodes to rk3588s-u-boot-dtsi > > Changes in v2,v3: > - none > > arch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 82 +++++++++++++++++++++++ > arch/arm/dts/rk3588s-u-boot.dtsi | 86 +++++++++++++++++++++++++ > 2 files changed, 168 insertions(+) > > diff --git a/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi b/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi > index bee4c32e8965..93942b105c3d 100644 > --- a/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi > +++ b/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi > @@ -4,6 +4,9 @@ > */ > > #include "rk3588-u-boot.dtsi" > +#include > +#include > +#include > > / { > aliases { > @@ -13,6 +16,18 @@ > chosen { > u-boot,spl-boot-order = &sdmmc; > }; > + > + vcc5v0_host: vcc5v0-host-regulator { > + compatible = "regulator-fixed"; > + regulator-name = "vcc5v0_host"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + enable-active-high; > + gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; > + pinctrl-names = "default"; > + pinctrl-0 = <&vcc5v0_host_en>; > + vin-supply = <&vcc5v0_sys>; > + }; > }; > > &sdmmc { > @@ -20,3 +35,70 @@ > bootph-pre-ram; > status = "okay"; > }; > + > +&pinctrl { > + usb { > + vcc5v0_host_en: vcc5v0-host-en { > + rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; > + }; > + }; > +}; > + > +&usb_host0_ehci { > + companion = <&usb_host0_ohci>; > + phys = <&u2phy2_host>; > + phy-names = "usb2-phy"; > + status = "okay"; > +}; > + > +&usb_host0_ohci { > + phys = <&u2phy2_host>; > + phy-names = "usb2-phy"; > + status = "okay"; > +}; > + > +&usb2phy2_grf { > + status = "okay"; > +}; > + > +&u2phy2 { > + resets = <&cru SRST_OTGPHY_U2_0>, <&cru SRST_P_USB2PHY_U2_0_GRF0>; > + reset-names = "phy", "apb"; > + clock-output-names = "usb480m_phy2"; > + status = "okay"; > +}; > + > +&u2phy2_host { > + phy-supply = <&vcc5v0_host>; > + status = "okay"; > +}; > + > +&usb_host1_ehci { > + companion = <&usb_host1_ohci>; > + phys = <&u2phy3_host>; > + phy-names = "usb2-phy"; > + status = "okay"; > +}; > + > +&usb_host1_ohci { > + phys = <&u2phy3_host>; > + phy-names = "usb2-phy"; > + status = "okay"; > +}; > + > +&usb2phy3_grf { > + status = "okay"; > +}; > + > +&u2phy3 { > + resets = <&cru SRST_OTGPHY_U2_1>, <&cru SRST_P_USB2PHY_U2_1_GRF0>; > + reset-names = "phy", "apb"; > + clock-output-names = "usb480m_phy3"; > + status = "okay"; > +}; > + > +&u2phy3_host { > + phy-supply = <&vcc5v0_host>; > + status = "okay"; > +}; > + > diff --git a/arch/arm/dts/rk3588s-u-boot.dtsi b/arch/arm/dts/rk3588s-u-boot.dtsi > index 1e225d71efc2..fb1b802fd273 100644 > --- a/arch/arm/dts/rk3588s-u-boot.dtsi > +++ b/arch/arm/dts/rk3588s-u-boot.dtsi > @@ -12,12 +12,98 @@ > status = "okay"; > }; > > + usb_host0_ehci: usb@fc800000 { > + compatible = "generic-ehci"; > + reg = <0x0 0xfc800000 0x0 0x40000>; > + interrupts = ; > + clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST_ARB0>; > + clock-names = "usbhost", "arbiter"; > + power-domains = <&power RK3588_PD_USB>; > + status = "disabled"; > + }; > + > + usb_host0_ohci: usb@fc840000 { > + compatible = "generic-ohci"; > + reg = <0x0 0xfc840000 0x0 0x40000>; > + interrupts = ; > + clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST_ARB0>; > + clock-names = "usbhost", "arbiter"; > + power-domains = <&power RK3588_PD_USB>; > + status = "disabled"; > + }; > + > + usb_host1_ehci: usb@fc880000 { > + compatible = "generic-ehci"; > + reg = <0x0 0xfc880000 0x0 0x40000>; > + interrupts = ; > + clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST_ARB1>; > + clock-names = "usbhost", "arbiter"; > + power-domains = <&power RK3588_PD_USB>; > + status = "disabled"; > + }; > + > + usb_host1_ohci: usb@fc8c0000 { > + compatible = "generic-ohci"; > + reg = <0x0 0xfc8c0000 0x0 0x40000>; > + interrupts = ; > + clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST_ARB1>; > + clock-names = "usbhost", "arbiter"; > + power-domains = <&power RK3588_PD_USB>; > + status = "disabled"; > + }; > + > pmu1_grf: syscon@fd58a000 { > bootph-all; > compatible = "rockchip,rk3588-pmu1-grf", "syscon"; > reg = <0x0 0xfd58a000 0x0 0x2000>; > }; > > + usb2phy2_grf: syscon@fd5d8000 { > + compatible = "rockchip,rk3588-usb2phy-grf", "syscon", > + "simple-mfd"; > + reg = <0x0 0xfd5d8000 0x0 0x4000>; > + #address-cells = <1>; > + #size-cells = <1>; > + > + u2phy2: usb2-phy@8000 { > + compatible = "rockchip,rk3588-usb2phy"; > + reg = <0x8000 0x10>; > + interrupts = ; > + clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>; > + clock-names = "phyclk"; > + #clock-cells = <0>; > + status = "disabled"; > + > + u2phy2_host: host-port { > + #phy-cells = <0>; > + status = "disabled"; > + }; > + }; > + }; > + > + usb2phy3_grf: syscon@fd5dc000 { > + compatible = "rockchip,rk3588-usb2phy-grf", "syscon", > + "simple-mfd"; > + reg = <0x0 0xfd5dc000 0x0 0x4000>; > + #address-cells = <1>; > + #size-cells = <1>; > + > + u2phy3: usb2-phy@c000 { > + compatible = "rockchip,rk3588-usb2phy"; > + reg = <0xc000 0x10>; > + interrupts = ; > + clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>; > + clock-names = "phyclk"; > + #clock-cells = <0>; > + status = "disabled"; > + > + u2phy3_host: host-port { > + #phy-cells = <0>; > + status = "disabled"; > + }; > + }; > + }; > + > sdmmc: mmc@fe2c0000 { > compatible = "rockchip,rk3588-dw-mshc", "rockchip,rk3288-dw-mshc"; > reg = <0x0 0xfe2c0000 0x0 0x4000>;