Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2366700pxb; Fri, 5 Feb 2021 16:35:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDjuUf5t2TgfvZu7xbYQzDXa1cylaHWcu+kB2LziKnU4ORznHtXPqoO6mgftL+fSUcAsMR X-Received: by 2002:a05:6402:558:: with SMTP id i24mr3965704edx.190.1612571715011; Fri, 05 Feb 2021 16:35:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612571715; cv=none; d=google.com; s=arc-20160816; b=TO653K/yK+Kr4Aabe5iaePq+iz6xCSNHt1KH0PxA00/WBjb7KRyKjWgykOgNj2pkBD 8kTnG2bi0nC4CJCqoe0gzSV0D20JBicnkMthWlNWBFYHtR7HyXUb+CpOEeHulB2cMZl1 EU9ZtE+o3Epuw6w6HTf0s40Z1sRA8NfH4NE004IbyDi262akJZRCWTgq5aBAUMj9tRIo HD60+dsL8x8T/DxWJJjy2OAsQfWX57zda4hWMioZ+W5yX7V6PIGRZPK4Vebmej3fr/FF BPPBeq1n3nca+/62+soGG6me6XZARTxpUj/bgnUusvCzSCzZYDSxQyDPsC5vPjfoON3W X7ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=bP2TkjSLtuteWO1JClrvBULCopI78AgBBGVLp8X9jmQ=; b=sm3UfahmygUfe9pmqmNacJvjCkuDAkz7Q1Ynz1XaA95nT35Z9GeL75Q/f+HCyc5ydY O/Y1tBkS9BEYcPynxrfJ7S5ats9CKjP3j0YurD9utbrmf5QHh6bK+Sn2M9kqpESEM5/q pUNvpuJIyn2jO2c1zgMT4ZPUnZRgqRfDrQOjQVcAvawH+OqKjnOQEkClnEhj5wTUaCnA //dSHcqLROwP5VX7y9Olar/VQaRFoK1uRa8cwaTc4X7CzCWGQI2OVHQuvZvw3xCWAEQY PLftjJiT1Bh35T7Cjw2HCAq4AxF87Du4hLcGbH1MPUp4RtDlEYJkAEswaHkVvyuisG80 XiCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="WbEmw6/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw10si6598288ejb.36.2021.02.05.16.34.51; Fri, 05 Feb 2021 16:35:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="WbEmw6/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230414AbhBFAbY (ORCPT + 99 others); Fri, 5 Feb 2021 19:31:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231424AbhBELlO (ORCPT ); Fri, 5 Feb 2021 06:41:14 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39372C0613D6; Fri, 5 Feb 2021 03:40:32 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id sa23so11536249ejb.0; Fri, 05 Feb 2021 03:40:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=bP2TkjSLtuteWO1JClrvBULCopI78AgBBGVLp8X9jmQ=; b=WbEmw6/Vz1nLwAr+gdpAGswlyFhuvsApUtNAtIHCywpR0lXlNSV5ptZ8ME15lFgBFg zf9D2AP4+XBGWTGiIoIy6SZS2rHIrcTAiCekzUdSJVAPzOEVrTAJvKw8Weuef3bGmZrf BW38RM2o9HeAcvj4ky7bGvc5vMAOxKpHi4GYAwM0NyVn6Tpn4elFm2BZbbIQ1F0cERbK 0as3Q1QsZpMY6lWX1ERV+JN4PY2BzhHI2ZSqY9mQ+jfFZKgcYMjS4l+p16tGCUdhspzx jBYUk9npifoO2jlbouI2ezr+lfz17A3YlcYaBAIMe/lZ5kTbV0NQ8htPVIQ+Rs1r+tM9 Xclw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bP2TkjSLtuteWO1JClrvBULCopI78AgBBGVLp8X9jmQ=; b=WCmEwMFk8Xx1dPk+eAdENu72NkmA/70igcj4l1gKKAfSI99k/IQhqrkXdY+DmESwVf lV/3lbyH6+VpAdymMWXHCsCPhN/A1+fgQzHsEHuGfwPV1NXMmM2v2oS5hXhmC/hFe4Zy cil1U3B5Ry9Hw8FQzIrN3zAalHxN0JUabDGvT0rBMGj9jml9ITRFBRlRXE4ET2xHvOkp 61LFBs8hzNdY1BjMg32VHzbMVRNNMwA8eqnkekI4WW1apa4/R6UXmhNfoFDoF8lxrMNt BlLSsO1729RhEdKFD71VPwnWeXKQf75PB+t8x8O5Hh+Puv6/8bSX5+FhWDvT1iNTauZZ dTzg== X-Gm-Message-State: AOAM532UXGKydeheVi4bmgsePVLU41jLsRYAbp0oaR29ewqyY6WosMJ9 ovLYI8jLVZi9cWfo1t9vBMsmt/ZocsQ= X-Received: by 2002:a17:906:f2ca:: with SMTP id gz10mr3523918ejb.285.1612525230965; Fri, 05 Feb 2021 03:40:30 -0800 (PST) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id o4sm3883476edw.78.2021.02.05.03.40.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Feb 2021 03:40:30 -0800 (PST) From: Johan Jonker To: heiko@sntech.de Cc: robh+dt@kernel.org, gregkh@linuxfoundation.org, balbi@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/8] dt-bindings: usb: convert rockchip,dwc3.txt to yaml Date: Fri, 5 Feb 2021 12:40:04 +0100 Message-Id: <20210205114011.10381-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the past Rockchip dwc3 usb nodes were manually checked. With the conversion of snps,dwc3.yaml as common document we now can convert rockchip,dwc3.txt to yaml as well. Remove node wrapper. Added properties for rk3399 are: power-domains resets reset-names Signed-off-by: Johan Jonker --- Changed V3: remove aclk_usb3_rksoc_axi_perf remove aclk_usb3 Changed V2: remove node wrapper --- .../devicetree/bindings/usb/rockchip,dwc3.txt | 56 ------------- .../devicetree/bindings/usb/rockchip,dwc3.yaml | 95 ++++++++++++++++++++++ 2 files changed, 95 insertions(+), 56 deletions(-) delete mode 100644 Documentation/devicetree/bindings/usb/rockchip,dwc3.txt create mode 100644 Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt b/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt deleted file mode 100644 index 945204932..000000000 --- a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt +++ /dev/null @@ -1,56 +0,0 @@ -Rockchip SuperSpeed DWC3 USB SoC controller - -Required properties: -- compatible: should contain "rockchip,rk3399-dwc3" for rk3399 SoC -- clocks: A list of phandle + clock-specifier pairs for the - clocks listed in clock-names -- clock-names: Should contain the following: - "ref_clk" Controller reference clk, have to be 24 MHz - "suspend_clk" Controller suspend clk, have to be 24 MHz or 32 KHz - "bus_clk" Master/Core clock, have to be >= 62.5 MHz for SS - operation and >= 30MHz for HS operation - "grf_clk" Controller grf clk - -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. - -Phy documentation is provided in the following places: -Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml - USB2.0 PHY -Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt - Type-C PHY - -Example device nodes: - - usbdrd3_0: usb@fe800000 { - compatible = "rockchip,rk3399-dwc3"; - clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>, - <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_GRF>; - clock-names = "ref_clk", "suspend_clk", - "bus_clk", "grf_clk"; - #address-cells = <2>; - #size-cells = <2>; - ranges; - usbdrd_dwc3_0: dwc3@fe800000 { - compatible = "snps,dwc3"; - reg = <0x0 0xfe800000 0x0 0x100000>; - interrupts = ; - dr_mode = "otg"; - }; - }; - - usbdrd3_1: usb@fe900000 { - compatible = "rockchip,rk3399-dwc3"; - clocks = <&cru SCLK_USB3OTG1_REF>, <&cru SCLK_USB3OTG1_SUSPEND>, - <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_GRF>; - clock-names = "ref_clk", "suspend_clk", - "bus_clk", "grf_clk"; - #address-cells = <2>; - #size-cells = <2>; - ranges; - usbdrd_dwc3_1: dwc3@fe900000 { - compatible = "snps,dwc3"; - reg = <0x0 0xfe900000 0x0 0x100000>; - interrupts = ; - dr_mode = "otg"; - }; - }; diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml new file mode 100644 index 000000000..d815aacfc --- /dev/null +++ b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/rockchip,dwc3.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip SuperSpeed DWC3 USB SoC controller + +maintainers: + - Heiko Stuebner + +description: + The common content of the node is defined in snps,dwc3.yaml. + + Phy documentation is provided in the following places. + + USB2.0 PHY + Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml + + Type-C PHY + Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt + +allOf: + - $ref: snps,dwc3.yaml# + +properties: + compatible: + items: + - enum: + - rockchip,rk3399-dwc3 + - const: snps,dwc3 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: + Controller reference clock, must to be 24 MHz + - description: + Controller suspend clock, must to be 24 MHz or 32 KHz + - description: + Master/Core clock, must to be >= 62.5 MHz for SS + operation and >= 30MHz for HS operation + - description: + Controller grf clock + + clock-names: + items: + - const: ref_clk + - const: suspend_clk + - const: bus_clk + - const: grf_clk + + power-domains: + maxItems: 1 + + resets: + maxItems: 1 + + reset-names: + const: usb3-otg + +unevaluatedProperties: false + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +examples: + - | + #include + #include + + bus { + #address-cells = <2>; + #size-cells = <2>; + + usbdrd3_0: usb@fe800000 { + compatible = "rockchip,rk3399-dwc3", "snps,dwc3"; + reg = <0x0 0xfe800000 0x0 0x100000>; + interrupts = ; + clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>, + <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_GRF>; + clock-names = "ref_clk", "suspend_clk", + "bus_clk", "grf_clk"; + dr_mode = "otg"; + }; + }; -- 2.11.0