From patchwork Tue Dec 6 05:52:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 30089 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2649243wrr; Mon, 5 Dec 2022 21:54:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf7v3JQF73b01pBQfGPCARKDGYJX3RRKxTFsbJsitKRKbB3Y0h9ALKO3VfqQpyIkXdfrRW2k X-Received: by 2002:a17:902:8604:b0:186:fe2d:f3cb with SMTP id f4-20020a170902860400b00186fe2df3cbmr71633350plo.132.1670306063135; Mon, 05 Dec 2022 21:54:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670306063; cv=pass; d=google.com; s=arc-20160816; b=zN7QrnBgZO9mvxCvWiIkvX8NZrhONP8RYUiz1x4jGvNzXPQR/KmPtP1Rrrk/XrCFUh U0ZRJ22ckzbM+bA4+cx+xorkDlHT2sSAyAOXTvUrKN6kOJAtgZE/4eARalMHUp0iW7we MSE3CL/vVQ1k24QPjNzdXuV9mtW7ybzZXAi7LiI8x1HUzyUxjyUl4DQHlwrnRS14wCHy ElUVGD2nIOtOf7++ZwFaW0CfTbcv9gdqkv7+Y855oM8c1BrQ3K+XISs5j2N9dW8mNvC+ B7ZbvaNSbRpIoHg296Ez4S4kIzvb1Dvvi3Nf84E+ztEq7flhWEYGnYf3AzQVs/PUK/rE /mwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BuIw4xDgq4VV/tg/CyfdQWLefl/clo1mTq+M3vk5PqY=; b=xZ7gLTq7ZhdSM14ac8Gt2/A9nXopvn0GvAMN6YAglCaoYpYXnWhZVR1F3bvnqDNUHR +JPE/VV3npc606dGu+zjVYxlCh44BMiO9+gtH4SJ2HIAa6hM5TprUUoPIsy5NLQY8iCf Q29tfUbm/1UHhq0bZB7S13ftBJFPcOdgFuBfbZMDPRBQb0iTnbUiKgB6CKcpPLBlnWBF V/qwT6T8IDaktQ/Lzak5NZ/s1otcEaD1dlKprRz4ofWr0YaIpVShEpMxd6zDonJS8chA YUzaWjt3xfR50pF66IGa7xFK3fKKcYyiOIt+mn5OtsmzgUBRP5jibnItbfsb8sAKX7lE dVYQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail header.b=LOWNcfXr; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); 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 f64-20020a636a43000000b00461b7568ad2si14327560pgc.527.2022.12.05.21.54.09; Mon, 05 Dec 2022 21:54:23 -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=@icenowy.me header.s=zmail header.b=LOWNcfXr; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); 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 S230182AbiLFFxf (ORCPT + 99 others); Tue, 6 Dec 2022 00:53:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233443AbiLFFxa (ORCPT ); Tue, 6 Dec 2022 00:53:30 -0500 Received: from sender4-op-o16.zoho.com (sender4-op-o16.zoho.com [136.143.188.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A7C626AD2; Mon, 5 Dec 2022 21:53:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670305995; cv=none; d=zohomail.com; s=zohoarc; b=IXR+/KxxXp9HGmlxDhlYiIY7RdIlDRqki80PPtRNA2DhfRCHGHSOpPQBPlAslwJ6rtkZQuTuyk1Nd9nObvlAjmmddKzf84hJ7v9vztEYUG16oy4/fpPJvDZa1jOPZfPt3yokeIsbKEhuGnWoynpJIdocxsxRmr+VNq/mSxmmiho= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670305995; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=BuIw4xDgq4VV/tg/CyfdQWLefl/clo1mTq+M3vk5PqY=; b=jyL6ZUdo3zlWA8k11LtSRvoH2AQK2y0eQtysyl4cFpnkR+zmuNx5TqFZ9sRZfEUO1+ZBeLrA0yp7sT0A6pKzHHh3ZC0ahkiC3TkRUCBbB7esP0+4vVRbDhr9PNrLrhepoWqjrtvfW1bPMGBuzo6bncVvRgP3Plu9fa7r3B4dDXc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1670305995; s=zmail; d=icenowy.me; i=uwu@icenowy.me; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=BuIw4xDgq4VV/tg/CyfdQWLefl/clo1mTq+M3vk5PqY=; b=LOWNcfXrbnfUjGAeWSk6wCdxWeK52iK5u2oc34nP+iNuhlBe3nZxoWT1oA6MRc0i RXtMZ7rW0mTbqusodtyOZKu5ft9W8HNI/dnZrOZijVLTQHzXJyNApAnhz83LpVpqwqQ rCuJI2dsuqNVbZId3GMqtTONAlFY+YciwdOy+GP8= Received: from edelgard.fodlan.icenowy.me (120.85.99.143 [120.85.99.143]) by mx.zohomail.com with SMTPS id 1670305993579283.89111808030043; Mon, 5 Dec 2022 21:53:13 -0800 (PST) From: Icenowy Zheng To: Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Greg Kroah-Hartman , Matthias Kaehlcke , Andre Przywara Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Icenowy Zheng Subject: [PATCH v3 2/6] dt-bindings: usb: Add binding for Genesys Logic GL850G hub controller Date: Tue, 6 Dec 2022 13:52:24 +0800 Message-Id: <20221206055228.306074-3-uwu@icenowy.me> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221206055228.306074-1-uwu@icenowy.me> References: <20221206055228.306074-1-uwu@icenowy.me> MIME-Version: 1.0 X-ZohoMailClient: External X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,URIBL_BLACK autolearn=no 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?1751442850484634811?= X-GMAIL-MSGID: =?utf-8?q?1751442850484634811?= The Genesys Logic GL850G is a USB 2.0 Single TT hub controller that features 4 downstream ports, an internal 5V-to-3.3V LDO regulator (can be bypassed) and an external reset pin. Add a device tree binding for its USB protocol part. The internal LDO is not covered by this and can just be modelled as a fixed regulator. Signed-off-by: Icenowy Zheng Reviewed-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski --- Changes in v3: - Re-introduce GPIO flags. Changes in v2: - Misc fixes suggested by Krzysztof, including property descriptions, single-item "items" and fixing the example's gpio property. - Fixed $id. .../bindings/usb/genesys,gl850g.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/genesys,gl850g.yaml diff --git a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml new file mode 100644 index 000000000000..a9f831448cca --- /dev/null +++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Genesys Logic GL850G USB 2.0 hub controller + +maintainers: + - Icenowy Zheng + +allOf: + - $ref: usb-device.yaml# + +properties: + compatible: + enum: + - usb5e3,608 + + reg: true + + reset-gpios: + description: GPIO controlling the RESET# pin. + + vdd-supply: + description: + the regulator that provides 3.3V core power to the hub. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + usb { + dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + + hub: hub@1 { + compatible = "usb5e3,608"; + reg = <1>; + reset-gpios = <&pio 7 2 GPIO_ACTIVE_LOW>; + }; + };