From patchwork Mon Mar 6 09:52:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 64564 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1760609wrd; Mon, 6 Mar 2023 02:25:19 -0800 (PST) X-Google-Smtp-Source: AK7set9lVmwPbGpjUzqJAk3Vxfz4LLkynEqkiMXn2jGd9q6QHav9taYAAv9cB2Yn44RrTBxuRSd1 X-Received: by 2002:a17:906:fe44:b0:88f:8a5:b4cd with SMTP id wz4-20020a170906fe4400b0088f08a5b4cdmr11577759ejb.1.1678098319544; Mon, 06 Mar 2023 02:25:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678098319; cv=none; d=google.com; s=arc-20160816; b=wqXYnM9UEKzSjOSEllO4O9sqN7UxEX3/+fo/ODt4fmW3TBtOzWgoCe1q9Z+JRrcKJx xZF//x9xAsXh4ynYRHpZHuI6Bw41I6yt8wExbEGuWZNsAKENvEqHY3mWXE85gooyPcpf 2FvBEUNM7US6ANBlyBl2NlsTS+uygGaBSRr9qC/PXnWMgNvahrcQ9b53lUW5nbfo6G7d I47dLhBi2vM2YflVkMAZaV2No+H4wk/viPqXYFsUt7depDARYR30gwNvwwCzjN/McH2Y Oy06fjZLXP2AZPQcXj+JjXUEgVBJiyxvWzzVNK3VWolUV4HkPzkb+Rpi+CKWy7EAJkZu Qx/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=u8wUq6pUZ1l6dZlMKukFMXuRD+BORAM2bdE6p8Lo3oA=; b=gI/hYOzcwNg8hgZwDbEDLACit4K3Dr4OsOG4MwqF16p+mvqwBcOmODeWPYQiup8PTX ZlGiuHxT3wMOHml43AfRjz0L+Ae9heKrkisIibDvXCuhBrrTafYSLI+D5tazps6gkBJe qGYGxIFMFR5FLCk8/bgDPfjcIzLPgCeaZuHI3853thMleTLBdeu49YhApnX2VCwcpSEz 3TTUnETt2ipsZSim2M5hAYrQTDYQVpZsaPtbsaPRXAv9fxNN5SAtzTVilYaBIY46mKvJ MzzJZ1QburyMzoQGoz7PZHZcgR5PoDZThdrYxciZtVNJ+hKghanV/p5WBIbMyBbBI0Qb Bw7Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x17-20020a1709064a9100b008df5a5088ccsi2434797eju.94.2023.03.06.02.24.56; Mon, 06 Mar 2023 02:25:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230019AbjCFJxH (ORCPT + 99 others); Mon, 6 Mar 2023 04:53:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229842AbjCFJxE (ORCPT ); Mon, 6 Mar 2023 04:53:04 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11557D516; Mon, 6 Mar 2023 01:53:01 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id BCDE024E2EE; Mon, 6 Mar 2023 17:52:59 +0800 (CST) Received: from EXMBX071.cuchost.com (172.16.6.81) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 6 Mar 2023 17:52:59 +0800 Received: from ubuntu.localdomain (183.27.97.46) by EXMBX071.cuchost.com (172.16.6.81) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 6 Mar 2023 17:52:59 +0800 From: Minda Chen To: Emil Renner Berthing , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski CC: , , , Minda Chen Subject: [PATCH 1/3] dt-bindings: phy: Add StarFive JH7110 USB dt-binding Date: Mon, 6 Mar 2023 17:52:57 +0800 Message-ID: <20230306095257.25957-1-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [183.27.97.46] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX071.cuchost.com (172.16.6.81) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759613623769672499?= X-GMAIL-MSGID: =?utf-8?q?1759613623769672499?= Add StarFive JH7110 SoC USB 3.0 phy dt-binding. USB controller is cadence USB 3.0 IP. Signed-off-by: Minda Chen --- .../bindings/phy/starfive,jh7110-usb-phy.yaml | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/starfive,jh7110-usb-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/starfive,jh7110-usb-phy.yaml b/Documentation/devicetree/bindings/phy/starfive,jh7110-usb-phy.yaml new file mode 100644 index 000000000000..05b6c47d4a86 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/starfive,jh7110-usb-phy.yaml @@ -0,0 +1,116 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/starfive,jh7110-usb-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive USB 2.0 and 3.0 PHY + +maintainers: + - Minda Chen + +properties: + compatible: + items: + - const: starfive,jh7110-usb-phy + + reg: + maxItems: 2 + + reg-names: + items: + - const: usb3 + - const: usb2 + + clocks: + maxItems: 8 + + clock-names: + items: + - const: usb_125m + - const: usb0_app_125 + - const: usb0_lpm + - const: usb0_stb + - const: usb0_apb + - const: usb0_axi + - const: usb0_utmi_apb + + resets: + items: + - description: USB0_PWRUP reset + - description: USB0_APB reset + - description: USB0_AXI reset + - description: USB0_UTMI_APB reset + + starfive,sys-syscon: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + items: + - description: phandle to System Register Controller sys_syscon node. + - description: offset of SYS_SYSCONSAIF__SYSCFG register for USB. + description: + The phandle to System Register Controller syscon node and the offset + of SYS_SYSCONSAIF__SYSCFG register for USB. + + starfive,stg-syscon: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - description: phandle to System Register Controller stg_syscon node. + - description: offset of STG_SYSCONSAIF__SYSCFG register for USB. + description: + The phandle to System Register Controller syscon node and the offset + of STG_SYSCONSAIF__SYSCFG register for USB. Total 4 regsisters offset + for USB. + + dr_mode: + description: PHY mode. + enum: + - host + - peripheral + - otg + + starfive,usb2-only + description: Set USB using usb 2.0 phy. Supprt USB 2.0 only + + '#phy-cells': + const: 0 + +required: + - compatible + - reg + - reg-names + - clocks + - clock-names + - reset + - starfive,sys-syscon + - starfive,stg-syscon + - dr_mode + - '#phy-cells' + +additionalProperties: false + +examples: + - | + usbphy@10200000 { + compatible = "starfive,jh7110-usb"; + reg = <0x0 0x10210000 0x0 0x1000>, + <0x0 0x10200000 0x0 0x1000>; + reg-names = "usb3", "usb2"; + clocks = <&syscrg 95>, + <&stgcrg 6>, + <&stgcrg 4>, + <&stgcrg 5>, + <&stgcrg 1>, + <&stgcrg 3>, + <&stgcrg 2>; + clock-names = "usb_125m", "usb0_app_125", "usb0_lpm", + "usb0_stb", "usb0_apb", "usb0_axi", "usb0_utmi_apb"; + resets = <&stgcrg 10>, + <&stgcrg 8>, + <&stgcrg 7>, + <&stgcrg 9>; + starfive,stg-syscon = <&stg_syscon 0x4 0xc4 0x148 0x1f4>; + starfive,sys-syscon = <&sys_syscon 0x18>; + dr_mode = "host"; + #phy-cells = <0>; + };