Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3001994pxm; Mon, 28 Feb 2022 10:04:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJybeBSPbGTqiwc9fDbuiR+qIggU9vACxZ5buak07RTRvuYvojSE7q6svrcNR8YfNSXOlcq+ X-Received: by 2002:a63:2bc1:0:b0:35e:c54b:3be0 with SMTP id r184-20020a632bc1000000b0035ec54b3be0mr18217461pgr.105.1646071480227; Mon, 28 Feb 2022 10:04:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646071480; cv=none; d=google.com; s=arc-20160816; b=UlqoETKvJXMq579zqBnHKtxxsQo6NP12GSLEBPzy0jUmzkfbRt6W8cXF3nKzhyWkYb zBY2a7sgpQKLj5rAHQMRYYODRn0T1LtSOS5HjNbczHw3NL4tEgGZ4ythurDQ5b/U1ktl T1CqKGYgmKnh4l51qqbiDsnQQQz9cC5bm6DHyFuOA26OTWPpqUWRRoFMEaIfyOJnIHi6 wrCaog35EzdJNN2E2Lz1VFMtkHEQu9AKQhl3/CIGr/Pk4APzJXPGw3eGyThE95ofCH7j BR9rxsH/+1D6AlLxEpIPoCOz5kgF2JcMfX2ZgZ9bOlNboiBOvsVdZS9VoPV2KdN8koMO BQxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cPns1/npz7Dlc50rQYvlC2uiB8hqGLU7hoL0Zgx0XJ0=; b=KyI7c2xJFEelmx9C5coBRDVWwPY2ZUFFmyvIPop08bI9V5fVHeE/AR7ElvpLfBS7k8 0xHGRL/71ceGDZB3N6h0PO/7qE5vT1PaSl7uzqkpQUxf9XJsSsQlhpmOQm93TsBpSUC0 H4EW9WC+AN/C22T025AsDdUTveqZYjbUhqFxnWJr+wFuEH20vRJ7w2jcq4dJj91TyGb1 n8D66XaP4GX805atajFDdFSjQpKKp8pYV+h+U2Haezjo3DAZimRMlmrE4Ob1UyJld4qM sljSogMoFbL4OAk5hkoej2qML6gZHpoRyhA43fyyLRA9lE13uprCDZ4sj92pty4wQRal M6Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pEolgqNi; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020a170903111000b001514c2d7b0asi8142706plh.436.2022.02.28.10.04.24; Mon, 28 Feb 2022 10:04:40 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pEolgqNi; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232893AbiB1M6o (ORCPT + 99 others); Mon, 28 Feb 2022 07:58:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232605AbiB1M6n (ORCPT ); Mon, 28 Feb 2022 07:58:43 -0500 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB098506D7; Mon, 28 Feb 2022 04:58:04 -0800 (PST) Received: by mail-yb1-xb2d.google.com with SMTP id h126so5396815ybc.1; Mon, 28 Feb 2022 04:58:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cPns1/npz7Dlc50rQYvlC2uiB8hqGLU7hoL0Zgx0XJ0=; b=pEolgqNiqpxngoF3DgV5antmR2xK1ESw6GfdlgaC1VRT62KrVi1FE94NVxvHe2y040 DCgDJOZ8s0kSQSPw6C9sx78FJavBTotCFHL/anc4DfXGcrgvPo8okv1JUkhqVfi/se9i hW06Ah3qyMKaaKOTNtTu8wbusrbB7phNlPF+AySvdDIO7u1QsCzFU7mpPGJHlzk9Mby6 UdsH3Nd6/98kA7DwkBYhjYGX9ZL6TzuOELKMCJfbDGjyY8VVL4mqSLXGaumytYsPQ2HJ 9J/sCwpo1GpeL79zD5T/i/qLvHLVrKyKmbC72hCBVyK1VCZmw12EYO+c52RVTUKHhVzh rDoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cPns1/npz7Dlc50rQYvlC2uiB8hqGLU7hoL0Zgx0XJ0=; b=UDc3wWgvAiDsxDBd8oRzclr4XX1NBcSMdez0RVuFiFiclm12iU4YDvY1t5MjuwAu2+ E/XEm1iGejBesR9VoKpGeDyeVH2nLy5k7OmGXqgVIecpjJBPQfOA2JBtirMqtI4zuj3r DL7UT/K8St9v1zJ8eAEur0z1Qwz8sXRmAZgR+jDRaY2rBIzBUd96Bu3TYcsma70StjVD f+aENmhB1Uq3VTVu97q/LtfrlG0vUgkNNb0g7ukPx0DFy8xYzQpZJS1OIZhiyfm2B3l8 NTfWUf9oDFoIqhx2JE22sbWQZkOxIZAbCH7jWAKcJnM2dGx6BKuTss89Pg2Hr04etmW9 XSJg== X-Gm-Message-State: AOAM533bzQ0COzHYLi4oKO4LKs3kcpv5HJgz27uM9SkHHmclO38ckiNq l7LknXgYZTfWJdbMlL4FQT+QswfiFsqt5tHOLQM= X-Received: by 2002:a25:5145:0:b0:61d:ad99:6e5a with SMTP id f66-20020a255145000000b0061dad996e5amr18295765ybb.228.1646053084143; Mon, 28 Feb 2022 04:58:04 -0800 (PST) MIME-Version: 1.0 References: <20220227153016.950473-1-pgwipeout@gmail.com> <20220227153016.950473-6-pgwipeout@gmail.com> In-Reply-To: From: Peter Geis Date: Mon, 28 Feb 2022 07:57:52 -0500 Message-ID: Subject: Re: [PATCH v3 5/7] arm64: dts: rockchip: add rk356x dwc3 usb3 nodes To: Michael Riesch Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , "open list:ARM/Rockchip SoC..." , Johan Jonker , devicetree , arm-mail-list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Mon, Feb 28, 2022 at 2:24 AM Michael Riesch wrote: > > Hi Peter, > > On 2/27/22 16:30, Peter Geis wrote: > > Add the dwc3 device nodes to the rk356x device trees. > > The rk3566 has one usb2 capable dwc3 otg controller and one usb3 capable > > dwc3 host controller. > > The rk3568 has one usb3 capable dwc3 otg controller and one usb3 capable > > dwc3 host controller. > > > > Signed-off-by: Peter Geis > > --- > > arch/arm64/boot/dts/rockchip/rk3566.dtsi | 11 ++++++++ > > arch/arm64/boot/dts/rockchip/rk3568.dtsi | 9 ++++++ > > arch/arm64/boot/dts/rockchip/rk356x.dtsi | 35 +++++++++++++++++++++++- > > 3 files changed, 54 insertions(+), 1 deletion(-) > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3566.dtsi b/arch/arm64/boot/dts/rockchip/rk3566.dtsi > > index 3839eef5e4f7..0b957068ff89 100644 > > --- a/arch/arm64/boot/dts/rockchip/rk3566.dtsi > > +++ b/arch/arm64/boot/dts/rockchip/rk3566.dtsi > > @@ -6,6 +6,10 @@ / { > > compatible = "rockchip,rk3566"; > > }; > > > > +&pipegrf { > > + compatible = "rockchip,rk3566-pipe-grf", "syscon"; > > +}; > > + > > &power { > > power-domain@RK3568_PD_PIPE { > > reg = ; > > @@ -18,3 +22,10 @@ power-domain@RK3568_PD_PIPE { > > #power-domain-cells = <0>; > > }; > > }; > > + > > +&usb_host0_xhci { > > + phys = <&usb2phy0_otg>; > > + phy-names = "usb2-phy"; > > + extcon = <&usb2phy0>; > > I wonder what the correct place for this extcon property is. You defined > it on SoC (RK3566) level, in my patch for the RK3568 EVB1 it is added on > board level. Is this common to all RK356x variants? Yes, the usb2phy is always available as an extcon unless you make a device that doesn't have usb2 capability. In that case you'd have to override the device anyways. If we want to turn on default role otg here, we'd need this defined here as well or things break. > > Best regards, > Michael > > > + maximum-speed = "high-speed"; > > +}; > > diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts/rockchip/rk3568.dtsi > > index 5b0f528d6818..8ba9334f9753 100644 > > --- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi > > +++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi > > @@ -99,6 +99,10 @@ opp-1992000000 { > > }; > > }; > > > > +&pipegrf { > > + compatible = "rockchip,rk3568-pipe-grf", "syscon"; > > +}; > > + > > &power { > > power-domain@RK3568_PD_PIPE { > > reg = ; > > @@ -114,3 +118,8 @@ power-domain@RK3568_PD_PIPE { > > #power-domain-cells = <0>; > > }; > > }; > > + > > +&usb_host0_xhci { > > + phys = <&usb2phy0_otg>, <&combphy0 PHY_TYPE_USB3>; > > + phy-names = "usb2-phy", "usb3-phy"; > > +}; > > diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi > > index 7cdef800cb3c..072bb9080cd6 100644 > > --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi > > +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi > > @@ -230,6 +230,40 @@ scmi_shmem: sram@0 { > > }; > > }; > > > > + usb_host0_xhci: usb@fcc00000 { > > + compatible = "snps,dwc3"; > > + reg = <0x0 0xfcc00000 0x0 0x400000>; > > + interrupts = ; > > + clocks = <&cru CLK_USB3OTG0_REF>, <&cru CLK_USB3OTG0_SUSPEND>, > > + <&cru ACLK_USB3OTG0>; > > + clock-names = "ref_clk", "suspend_clk", > > + "bus_clk"; > > + dr_mode = "host"; > > + phy_type = "utmi_wide"; > > + power-domains = <&power RK3568_PD_PIPE>; > > + resets = <&cru SRST_USB3OTG0>; > > + snps,dis_u2_susphy_quirk; > > + status = "disabled"; > > + }; > > + > > + usb_host1_xhci: usb@fd000000 { > > + compatible = "snps,dwc3"; > > + reg = <0x0 0xfd000000 0x0 0x400000>; > > + interrupts = ; > > + clocks = <&cru CLK_USB3OTG1_REF>, <&cru CLK_USB3OTG1_SUSPEND>, > > + <&cru ACLK_USB3OTG1>; > > + clock-names = "ref_clk", "suspend_clk", > > + "bus_clk"; > > + dr_mode = "host"; > > + phys = <&usb2phy0_host>, <&combphy1 PHY_TYPE_USB3>; > > + phy-names = "usb2-phy", "usb3-phy"; > > + phy_type = "utmi_wide"; > > + power-domains = <&power RK3568_PD_PIPE>; > > + resets = <&cru SRST_USB3OTG1>; > > + snps,dis_u2_susphy_quirk; > > + status = "disabled"; > > + }; > > + > > gic: interrupt-controller@fd400000 { > > compatible = "arm,gic-v3"; > > reg = <0x0 0xfd400000 0 0x10000>, /* GICD */ > > @@ -297,7 +331,6 @@ pmu_io_domains: io-domains { > > }; > > > > pipegrf: syscon@fdc50000 { > > - compatible = "rockchip,rk3568-pipe-grf", "syscon"; > > reg = <0x0 0xfdc50000 0x0 0x1000>; > > }; > >