Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2974470pxm; Mon, 28 Feb 2022 09:31:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfDSsuDv7aFJduWYxfAuqKagFajc2b12tqE4E3kMgPzMaJfsvA7GTJq8+lO+2bHw4857j1 X-Received: by 2002:a17:906:b285:b0:6d6:e2ed:ff64 with SMTP id q5-20020a170906b28500b006d6e2edff64mr218599ejz.536.1646069513153; Mon, 28 Feb 2022 09:31:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646069513; cv=none; d=google.com; s=arc-20160816; b=SOMfpicPCSA2J1PcF1d0Y1nRlGJNLmn1jFNegRpHRqjMmO/FYayNIfWqW1nJlFJ+rC RERR0rcYm4WeNbZbo5IO57ZE8ExMXMM03Tvf5vOcLVnSn7JBmtfk7aLX4gFB/dEHM3r+ uEuEUifC3fyTeE70Nz+96AHYQrrh3AoqkrdhEM3OwB7yAicFsdZVSXlGyAfdmJfSluJE +qTbLz1HKPdIeNAOM0ykSR6DLatyfI9cBO+LQMOTIqedVFNT3AR3ag8H1z1fG/aub5RE lUo/VC9cb+2h9Q4nZ6jYRrJy7r4rDtCtLlqaudMrNL02AJCECJjw3von7ZxwkLXu65jx EW8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=gLyji2lXIIBrJ7pS+hjvr2Fre28Lj40SpMAVpenGsu8=; b=JTS2mSLrWvyrQKyjiCCkZcHkbSJnnMbJzerU8S/o1aF0zM6Akn5LYJ8PCEtHc31VYL XPsmhpZ8LBN+xSZoGuEUtONhC6L9nitE20QifnRJHhh8tyc7EA76k4VtthV3qHS9AqQb BJoPnsnnOXK9129R6UNYSi/c+z1YknuqpX0p68GmL0DTXQOKHv7T0OXOky7ajDDkYQQx 9P4Zv5y3lb32cAs1bvgMc3HhctgTQUWEsCkO0lqBde4B+Gh7DozjOKUh+vDPBjtUNh6J 8HNuurivzsghFm1p+AlHTBnM322/OsJRUMi+b3zFnAEwjl2kA6daqgG5KfG9U5xFrh/C dYnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NQivf7OX; 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 u20-20020aa7db94000000b00410b07efc3csi6651372edt.350.2022.02.28.09.31.30; Mon, 28 Feb 2022 09:31:53 -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=NQivf7OX; 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 S235142AbiB1NRn (ORCPT + 99 others); Mon, 28 Feb 2022 08:17:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235438AbiB1NRa (ORCPT ); Mon, 28 Feb 2022 08:17:30 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1685D7463D; Mon, 28 Feb 2022 05:16:38 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id a8so24679754ejc.8; Mon, 28 Feb 2022 05:16:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=gLyji2lXIIBrJ7pS+hjvr2Fre28Lj40SpMAVpenGsu8=; b=NQivf7OXRQw+/i2egcr1EYrZDOZzyJNpvwK6BB9CNMapN0ed+78zUcES21XNm/6/15 d+cUKMhv164xKNmhA74yZgGrvzZ+TfV14EIToEsRkDR820pkFJppFqlpvs08WPqkTAvq svdldf+LPmBq3dH78qbAfWRTiESmQ70EGMRzB3U1DhJQZughkbm7pMvrCgUVPNB0tNJP dcRkPIjLqCNtOezB1lY++uK7dsceyM8uPGB3SM0CaeUTSkEN0bpLtLOw+enu1S5B6QvB cUOxArA4suelgxAX/5FsZ0NvxYqDnmkQXmYp3VV/YzPoU1vMzKz+pzCd6WDqvUlUvZdY qRYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=gLyji2lXIIBrJ7pS+hjvr2Fre28Lj40SpMAVpenGsu8=; b=6GA9lzrxs28RWC9uIKew4O+mFPkAJL7OUsw3YF+2OCDWNR1GmQHzysJtac6vD/D3HZ /VY7g6QI/rVfGey4jm7zFS0HRfU7eTmM63L83Elr97ZdUlh2C7Z1XmiuYesDM5Kuj1R1 VFDo5R84tGcUc3zKvheDP+pfGUViL5kW1JmODN6IGlemELNvS8SkilZMtsDsCY4NzfO5 f5ZxKgv4vdzfAZjf5TLUnFrgHtiSBC9Fc60yBM1euHHKscYDBLUGOeC8EG+W2X+0D4dO XtAk4NYGLbdqJ+7FyQJeMYq5DNZvk1mOMu97AUJvt/gF3e8umExraoQozF2zzCnhEljp IbLQ== X-Gm-Message-State: AOAM531hWbTEATcAxTo374zvukJp1W6qVzRfYX73mf+lFegqVYO2Ya// 9BCop5sO6qzxQziOuXg5mm8= X-Received: by 2002:a17:906:9509:b0:6d0:fbc5:eb4a with SMTP id u9-20020a170906950900b006d0fbc5eb4amr15101640ejx.228.1646054196450; Mon, 28 Feb 2022 05:16:36 -0800 (PST) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id ju22-20020a17090798b600b006ce70fa8e4fsm4337983ejc.187.2022.02.28.05.16.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Feb 2022 05:16:36 -0800 (PST) Message-ID: Date: Mon, 28 Feb 2022 14:16:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v3 5/7] arm64: dts: rockchip: add rk356x dwc3 usb3 nodes Content-Language: en-US To: Peter Geis Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , "open list:ARM/Rockchip SoC..." , Michael Riesch , devicetree , arm-mail-list , Linux Kernel Mailing List References: <20220227153016.950473-1-pgwipeout@gmail.com> <20220227153016.950473-6-pgwipeout@gmail.com> <7b20fccd-4394-da3c-6556-4732d67cde3d@gmail.com> <3ac3cdf9-17c0-654f-b204-c5b4b0436c98@gmail.com> From: Johan Jonker In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,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 2/28/22 14:02, Peter Geis wrote: > On Mon, Feb 28, 2022 at 4:10 AM Johan Jonker wrote: >> >> >> >> On 2/27/22 23:44, Peter Geis wrote: >>> On Sun, Feb 27, 2022 at 12:50 PM Johan Jonker wrote: >>>> >>>> >>>> >>>> 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>; >>>>> + 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"; >>>> >>>> compatible = "rockchip,rk3568-dwc3", "snps,dwc3"; >>>> >>>> compatible strings must be SoC orientated. >>>> Add binding like you did before. >>> >>> Okay, should this go in the core yaml, since it's not really handled >>> by of-simple? >> >> Nothing to change in core.c, because the fall back string does the >> trick, so we don't have to change the driver for every new SoC. >> Change the node compatible here and add the binding. >> That's it. The rest comes later if needed. > > It's the binding I'm referring to here. > snps,dwc3.yaml seems the logical place, but I want to make sure you > concur first. rockchip,dwc3.yaml is the place be! Hurry up! Use Michael's patch, because his commit message is better.(no reference to rk3399) https://lore.kernel.org/linux-rockchip/20220225131602.2283499-3-michael.riesch@wolfvision.net/ vs. https://lore.kernel.org/linux-rockchip/20220226184147.769964-4-pgwipeout@gmail.com/ > >> >>> Also, should I add in the compatible for rk3328 as well? >> >> No, same story the fall back string does the trick in core.c > > Same thing here, since I'm in snps,dwc3.yaml anyways I can add the > rk3328 binding in and silence that error in one go. It's been done already: [PATCH v5 6/8] dt-bindings: usb: dwc3: add description for rk3328 https://lore.kernel.org/linux-rockchip/20210209192350.7130-6-jbx6244@gmail.com/ > >> >> >>> >>>> >>>>> + 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"; >>>> >>>> compatible = "rockchip,rk3568-dwc3", "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>; >>>>> }; >>>>>