Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4652270ybp; Mon, 7 Oct 2019 11:39:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDUsWTQvSNW+MTTDrVYQKFknMig9cLNJ9UYrY41RfE+i7ye7xB6/oQnUlgSXOCQ+hKOgmF X-Received: by 2002:a50:e79b:: with SMTP id b27mr30510826edn.186.1570473553612; Mon, 07 Oct 2019 11:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570473553; cv=none; d=google.com; s=arc-20160816; b=i1WgpORnC6wTfIG7CRqmubdiVarWzNvGR+fd9hcpyLH39fESfowfaIHYdUr8btr4NO /AzLhpxqlpwyyJfpViCwMYx4Cgua2IeQuI6EHTeuNcZQB9T1x1RhMsn6oQjSi/Oby6NF o1/WUcN8/MrWUtyTNtoYttrOJ6TGG9X9Ery1+iaP6Q91Bt/2kH2tJbQJp8NpHbJt27f3 LH4mZd4O64UXWfn3Q71dyMruqQLfrr0ExzECWMhcqxnkHb8CQH6Stu7qhYX8g+nzoXxw E3pOk+eonNDtl/Lx8U6JvMrJKBAGL2Fvz+xG90V4fbfweZ2AL+yf7QG5VTNBrLscFJow Q8AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=woW2QWq4BFwXkPRSb/RiBPISiL6iuYGaq7aXEwttBsQ=; b=iTsCUPFUpSrGMIRlgDxInTu8P2AXW9HQSS9pRakuEMyw+EQ+Cw0SghzT0y291aSg9X COVwk2cz8ODtJS+5qYG3qO9vhhtk7HtIUGS44OhErv1fHafOr/ydnTlUmbwpKkRnyVc9 7KdTWe8saQkTLY9QY50r8ib6m0Gj6VbwhDac+HtN0KdIuzk/+BYx48dFM77AC6Kf3oF1 klKaIm8sBeYuP+eucYakHD54RQH657CQcseHbJ3u0xZxPopCL9V8v5oEdpT37uQO3a6F +t78utsXE/iKMI5LsaY+s8T1RdR0/8+LKEYbMtR4WmNAxXSibR2dlTScwFtH1qJK7wzD kJ6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="h6OBPyL/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6si9586695edc.291.2019.10.07.11.38.49; Mon, 07 Oct 2019 11:39:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="h6OBPyL/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728665AbfJGSif (ORCPT + 99 others); Mon, 7 Oct 2019 14:38:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:34282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728081AbfJGSif (ORCPT ); Mon, 7 Oct 2019 14:38:35 -0400 Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 810AF21655; Mon, 7 Oct 2019 18:38:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570473513; bh=NAn+q6yf4CHs6Mu3N4wO/Uqn6OEuK70VfBhue/aQrmw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=h6OBPyL/UW1tVbfEOBO4SpOwNmrWpZKcca/DqzkkWBlQW89u7QwvHRvL5eWfgt5b9 jk0hyfEQaCOvfSHuhYr+gsoSZdrtb8IDXXbMTudalWPQ7BHV89kvap97lRstRxPXO+ wCNY3dXkEBaNBT0LxAFO25hBZMbmMzNixvTlekuY= Received: by mail-qk1-f182.google.com with SMTP id f16so13598023qkl.9; Mon, 07 Oct 2019 11:38:33 -0700 (PDT) X-Gm-Message-State: APjAAAWMktNLSAOM7GZb2N3v9iNLLYr3i98UObOKZ/LzUjsKOW8L99qk aDWb6mDLhTilcpk3TpPjAyRTi1CzltF/xiw4xg== X-Received: by 2002:a05:620a:549:: with SMTP id o9mr25361081qko.223.1570473512597; Mon, 07 Oct 2019 11:38:32 -0700 (PDT) MIME-Version: 1.0 References: <20191007175553.66940-1-john.stultz@linaro.org> <20191007175553.66940-5-john.stultz@linaro.org> In-Reply-To: <20191007175553.66940-5-john.stultz@linaro.org> From: Rob Herring Date: Mon, 7 Oct 2019 13:38:20 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC][PATCH v2 4/5] dt-bindings: usb: dwc3: of-simple: add compatible for HiSi To: John Stultz Cc: lkml , Greg Kroah-Hartman , Felipe Balbi , Andy Shevchenko , Mark Rutland , Yu Chen , Matthias Brugger , Chunfeng Yun , Linux USB List , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 7, 2019 at 12:56 PM John Stultz wrote: > > Add necessary compatible flag for HiSi's DWC3 so > dwc3-of-simple will probe. > > Cc: Greg Kroah-Hartman > Cc: Felipe Balbi > Cc: Andy Shevchenko > Cc: Rob Herring > Cc: Mark Rutland > Cc: Yu Chen > Cc: Matthias Brugger > Cc: Chunfeng Yun > Cc: linux-usb@vger.kernel.org > Cc: devicetree@vger.kernel.org > Signed-off-by: John Stultz > --- > v2: Tweaked clock names as clk_usb3phy_ref didn't seem right. > --- > .../devicetree/bindings/usb/hisi,dwc3.txt | 52 +++++++++++++++++++ > 1 file changed, 52 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/hisi,dwc3.txt Can you make this a schema. > diff --git a/Documentation/devicetree/bindings/usb/hisi,dwc3.txt b/Documentation/devicetree/bindings/usb/hisi,dwc3.txt > new file mode 100644 > index 000000000000..3a3e5c320f2a > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/hisi,dwc3.txt > @@ -0,0 +1,52 @@ > +HiSi SuperSpeed DWC3 USB SoC controller > + > +Required properties: > +- compatible: should contain "hisilicon,hi3660-dwc3" for HiSi SoC > +- clocks: A list of phandle + clock-specifier pairs for the > + clocks listed in clock-names > +- clock-names: Should contain the following: > + "clk_abb_usb" USB reference clk > + "aclk_usb3otg" USB3 OTG aclk > + > +- assigned-clocks: Should be: > + HI3660_ACLK_GATE_USB3OTG > +- assigned-clock-rates: Should be: > + 229Mhz (229000000) for HI3660_ACLK_GATE_USB3OTG > + > +Optional properties: > +- resets: Phandle to reset control that resets core and wrapper. Looks like 4 resets though. > + > +Required child node: > +A child node must exist to represent the core DWC3 IP block. The name of > +the node is not important. The content of the node is defined in dwc3.txt. > + > +Example device nodes: > + > + usb3: hisi_dwc3 { > + compatible = "hisilicon,hi3660-dwc3"; > + #address-cells = <2>; > + #size-cells = <2>; > + ranges; > + > + clocks = <&crg_ctrl HI3660_CLK_ABB_USB>, > + <&crg_ctrl HI3660_ACLK_GATE_USB3OTG>; > + clock-names = "clk_abb_usb", "aclk_usb3otg"; > + > + assigned-clocks = <&crg_ctrl HI3660_ACLK_GATE_USB3OTG>; > + assigned-clock-rates = <229 000 000>; > + resets = <&crg_rst 0x90 8>, > + <&crg_rst 0x90 7>, > + <&crg_rst 0x90 6>, > + <&crg_rst 0x90 5>; > + > + dwc3: dwc3@ff100000 { If it's only clocks and resets for the wrapper node, just make this all one node. And 'usb3' for the node name. > + compatible = "snps,dwc3"; > + reg = <0x0 0xff100000 0x0 0x100000>; > + interrupts = <0 159 4>, <0 161 4>; > + phys = <&usb_phy>; > + phy-names = "usb3-phy"; > + dr_mode = "otg"; > + > + ... > + }; > + }; > -- > 2.17.1 >