Message ID | 20221228100321.15949-9-linux.amoon@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1813158wrt; Wed, 28 Dec 2022 02:08:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXs67EKIwT5btQN2LuHCLdUlaT1JUJzGMWVv//Z8wpqIWAmHK+RvAfvkq2opEPv+zTVyiGPK X-Received: by 2002:a17:906:8517:b0:7c0:a48b:2dff with SMTP id i23-20020a170906851700b007c0a48b2dffmr25661364ejx.43.1672222080461; Wed, 28 Dec 2022 02:08:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672222080; cv=none; d=google.com; s=arc-20160816; b=J7r37cXBBVqd60++606RZBmmAR7NO0XZWSkYee0W+Lgq1Paz/04azJLlRY2FyPikXd lmD0ll+C35w0XQfIdrYtOP2FLeDW0E1rYlnuL1en/RccaZO/PxvHpZxXMd2bSqyA+HzK CJt+yyUPpaobI90BLyBNT8beop5gu553ws5MAIsTW0PC2+m/P9azYCtJeKhcXKH0zYqV U84uu7IZJIk+0Kk7awMS1LvEJ0m78NCPJNIVF0hNYZoMKNxfzmWjj0iSH1nh7EZd6guT imO/xcuxq832/9uFinvNVSJRrRDltBL1zhtoVzh30UguYdQaMgpTnXkSckb++24+uCkn H/Jg== ARC-Message-Signature: i=1; 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=XddeMIQqpQATN+V02+mnCt6s/9dpQm+lysoFjgM/iXM=; b=YEFQraZL9T0DOlAUuq/d4xaHfI45L0O04MItxDKe9PVUDIQJJzU5Q1HpL/qAEHCD36 3hL//zKyHuo6sFT6LDLJDc4xCUnKimLAmFcsE6rL7KaWHxJ3lxg6TllZweYIYVT9IMJm H3ymwDGeSuiMUSHZjD9HIzLd1CqIpoRwM+3rAqCOlm4y/6f11ekk6Lp6DOrfE7jcyNeM SQLaLHo5v8WwnKqV0VzPSkFEM8talUcxaBgvyE3Yb1JZdR6vg3s4za0MDaJ+l7XbdGNC yEClRJ3lQWeHjf14SkMHd5sSFB+hCtyHGa/o9GVluHKm2A6jRWYL7EL8aYxZkLT36XTl s4Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bk9fPXdU; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mm6-20020a170906cc4600b007ae72fcabb3si10369105ejb.838.2022.12.28.02.07.36; Wed, 28 Dec 2022 02:08:00 -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=bk9fPXdU; 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 S232982AbiL1KG3 (ORCPT <rfc822;eddaouddi.ayoub@gmail.com> + 99 others); Wed, 28 Dec 2022 05:06:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232898AbiL1KFz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 28 Dec 2022 05:05:55 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E52A0DF2; Wed, 28 Dec 2022 02:05:51 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id u4-20020a17090a518400b00223f7eba2c4so15604888pjh.5; Wed, 28 Dec 2022 02:05:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XddeMIQqpQATN+V02+mnCt6s/9dpQm+lysoFjgM/iXM=; b=bk9fPXdUuyhpiB21Zc6lECqP3DGFcZuDaRjM9NiTQcDW49oyZnaprUVChuBu13cveQ +tuR2ei4Gmmks6GNZpxuFlZ48YVzWw+gkqvpwyUiSGGq/Y2syUZgKcfFTnDPhxp3VgIC BpOrcy7TMVP3fdt3Ik2ZrM5IVJRK9/7SH+CxvzZgWFQNNwfov1ra7ELkyAC7d6Y4EqHn F5nagEcXFH3dZzg3tuNpg9MQsoqD03c8DCLicI0G+mRDOd4fj51Bny/By7Ut0BsCtl8D J1F8UKUC0yEtzECuDGWz7qceGVaLHeKQ7RyFNkYllKcWZxwBbvn5aHZQ+miHxIV/waIE z0xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XddeMIQqpQATN+V02+mnCt6s/9dpQm+lysoFjgM/iXM=; b=xKMPbeXG91DdqmU7AJFR+BW06R4hbFDFpjr6SkVWaqZEkF/xV+EZtx+sWT91Ucr3G2 OcZm1zqR2r88uPxnyZGZonSNI7enIB9jcYNGzpa4+iUFlIWFC1psYforF58W6ja1aodg +e2a/MJF/aKVTG6uH+98SZnQ3VEXForycdYB01WfiAtIt93tZn4n4fd8FATSIcBGs9Pl 9v5egeuI2rSFbzc9qoHmWcFVye8ZY9sx12qd8o4CTLeH6UsAajx3Wl8ZRITIeNXUtJkV bqaRmBvhulQZbys0O83wRzR7wyjcBvLWprtYUyPr5+hnqmRAUL/n/6+kuZqPLkqKq+13 JrrA== X-Gm-Message-State: AFqh2kpxkfKi1BvjDE4x+XzcNsA5hxr98V0z5lMkQQy/UtKwkd1Ssybr +zEaPxvfXbKTqySmsV5peuTpwS9iSDyj5A== X-Received: by 2002:a17:902:da86:b0:189:747e:97cc with SMTP id j6-20020a170902da8600b00189747e97ccmr35072825plx.26.1672221951502; Wed, 28 Dec 2022 02:05:51 -0800 (PST) Received: from localhost.localdomain ([45.112.3.26]) by smtp.gmail.com with ESMTPSA id t6-20020a1709027fc600b0019277df45a6sm5794915plb.53.2022.12.28.02.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Dec 2022 02:05:51 -0800 (PST) From: Anand Moon <linux.amoon@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> Cc: linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller Date: Wed, 28 Dec 2022 10:03:17 +0000 Message-Id: <20221228100321.15949-9-linux.amoon@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221228100321.15949-1-linux.amoon@gmail.com> References: <20221228100321.15949-1-linux.amoon@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753451940110672792?= X-GMAIL-MSGID: =?utf-8?q?1753451940110672792?= |
Series |
[v1,01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller
|
|
Commit Message
Anand Moon
Dec. 28, 2022, 10:03 a.m. UTC
The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that
features 4 downstream ports, an internal 5V regulator and has
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: Anand Moon <linux.amoon@gmail.com>
---
.../bindings/usb/vialab,vl817q7.yaml | 47 +++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
Comments
On Wed, Dec 28, 2022 at 10:03:17AM +0000, Anand Moon wrote: > The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that > features 4 downstream ports, an internal 5V regulator and has > 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: Anand Moon <linux.amoon@gmail.com> > --- > .../bindings/usb/vialab,vl817q7.yaml | 47 +++++++++++++++++++ > 1 file changed, 47 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > > diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > new file mode 100644 > index 000000000000..4ae995160fd5 > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > @@ -0,0 +1,47 @@ > +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause > +%YAML 1.2 > +--- > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Via labs VL817Q7 USB 3.1 hub controller > + > +maintainers: > + - Anand Moon <linux.amoon@gmail.com> > + > +allOf: > + - $ref: usb-device.yaml# > + > +properties: > + compatible: > + enum: > + - vialab,usb2109 This isn't a valid compatible string for USB devices (should be "usb<vid>,<pid>"). Same for the other binding. Also the bindings should go before the driver changes in the series. Johan
Hi Johan Thanks for your review comments. On Wed, 28 Dec 2022 at 16:32, Johan Hovold <johan@kernel.org> wrote: > > On Wed, Dec 28, 2022 at 10:03:17AM +0000, Anand Moon wrote: > > The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that > > features 4 downstream ports, an internal 5V regulator and has > > 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: Anand Moon <linux.amoon@gmail.com> > > --- > > .../bindings/usb/vialab,vl817q7.yaml | 47 +++++++++++++++++++ > > 1 file changed, 47 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > > > > diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > > new file mode 100644 > > index 000000000000..4ae995160fd5 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > > @@ -0,0 +1,47 @@ > > +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause > > +%YAML 1.2 > > +--- > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Via labs VL817Q7 USB 3.1 hub controller > > + > > +maintainers: > > + - Anand Moon <linux.amoon@gmail.com> > > + > > +allOf: > > + - $ref: usb-device.yaml# > > + > > +properties: > > + compatible: > > + enum: > > + - vialab,usb2109 > > This isn't a valid compatible string for USB devices (should be > "usb<vid>,<pid>"). > > Same for the other binding. > ok, I will change this in the next version. > Also the bindings should go before the driver changes in the series. > > Johan Thanks -Anand
On Wed, 28 Dec 2022 10:03:17 +0000, Anand Moon wrote: > The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that > features 4 downstream ports, an internal 5V regulator and has > 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: Anand Moon <linux.amoon@gmail.com> > --- > .../bindings/usb/vialab,vl817q7.yaml | 47 +++++++++++++++++++ > 1 file changed, 47 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml: '$id' is a required property hint: Metaschema for devicetree binding documentation from schema $id: http://devicetree.org/meta-schemas/base.yaml# Error: Documentation/devicetree/bindings/usb/vialab,vl817q7.example.dts:26.17-18 syntax error FATAL ERROR: Unable to parse input tree make[1]: *** [scripts/Makefile.lib:434: Documentation/devicetree/bindings/usb/vialab,vl817q7.example.dtb] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1508: dt_binding_check] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221228100321.15949-9-linux.amoon@gmail.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On Wed, Dec 28, 2022 at 10:03:17AM +0000, Anand Moon wrote: > The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that > features 4 downstream ports, an internal 5V regulator and has > 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: Anand Moon <linux.amoon@gmail.com> > --- > .../bindings/usb/vialab,vl817q7.yaml | 47 +++++++++++++++++++ > 1 file changed, 47 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > > diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > new file mode 100644 > index 000000000000..4ae995160fd5 > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > @@ -0,0 +1,47 @@ > +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause > +%YAML 1.2 > +--- > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Via labs VL817Q7 USB 3.1 hub controller nit: VIA Labs VL817-Q7 > + > +maintainers: > + - Anand Moon <linux.amoon@gmail.com> > + > +allOf: > + - $ref: usb-device.yaml# > + > +properties: > + compatible: > + enum: > + - vialab,usb2109 This is not a valid compatible string as Johan already noted. Besides that the VL817-Q7 provides both a 3.1 and a 2.0 USB hub, which are enumerated separately. Please also add a compatible string for the 2.0 hub (assuming 0x2109 is the 3.1 hub). > + > + reg: true > + > + reset-gpios: > + description: GPIO controlling the RESET# pin. > + > + vdd-supply: > + description: > + the regulator that provides 5.0V core power to the hub. > + > +required: > + - compatible > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/gpio/gpio.h> > + usb { > + dr_mode = "host"; > + #address-cells = <1>; > + #size-cells = <0>; > + > + hub: hub@1 { > + compatible = "vialab,usb2109" > + reg = <1>; > + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; > + }; Please also add a node for the other hub and link the two nodes with each other through the 'peer-hub' property. See realtek,rts5411.yaml for reference.
Hi Matthias, On Thu, 5 Jan 2023 at 04:07, Matthias Kaehlcke <mka@chromium.org> wrote: > > On Wed, Dec 28, 2022 at 10:03:17AM +0000, Anand Moon wrote: > > The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that > > features 4 downstream ports, an internal 5V regulator and has > > 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: Anand Moon <linux.amoon@gmail.com> > > --- > > .../bindings/usb/vialab,vl817q7.yaml | 47 +++++++++++++++++++ > > 1 file changed, 47 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > > > > diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > > new file mode 100644 > > index 000000000000..4ae995160fd5 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml > > @@ -0,0 +1,47 @@ > > +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause > > +%YAML 1.2 > > +--- > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Via labs VL817Q7 USB 3.1 hub controller > > nit: VIA Labs VL817-Q7 > Ok > > + > > +maintainers: > > + - Anand Moon <linux.amoon@gmail.com> > > + > > +allOf: > > + - $ref: usb-device.yaml# > > + > > +properties: > > + compatible: > > + enum: > > + - vialab,usb2109 > > This is not a valid compatible string as Johan already noted. > > Besides that the VL817-Q7 provides both a 3.1 and a 2.0 USB hub, which > are enumerated separately. Please also add a compatible string for the > 2.0 hub (assuming 0x2109 is the 3.1 hub). > Yes, correct, actually, I would like to rename this file to vialab,vl817.yaml since vialab,vl817-q7 is used for USB 3.1 hub and vialab,vl817-q5 is used for USB 2.0 hub. [0] https://datasheet.lcsc.com/lcsc/1808111624_VIA-Tech-VL817-Q7-B0_C209756.pdf > > + > > + reg: true > > + > > + reset-gpios: > > + description: GPIO controlling the RESET# pin. > > + > > + vdd-supply: > > + description: > > + the regulator that provides 5.0V core power to the hub. > > + > > +required: > > + - compatible > > + - reg > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/gpio/gpio.h> > > + usb { > > + dr_mode = "host"; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + hub: hub@1 { > > + compatible = "vialab,usb2109" > > + reg = <1>; > > + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; > > + }; > > Please also add a node for the other hub and link the two nodes with > each other through the 'peer-hub' property. See realtek,rts5411.yaml > for reference. Ok, I will update the example according, Thanks -Anand.
diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml new file mode 100644 index 000000000000..4ae995160fd5 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause +%YAML 1.2 +--- +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Via labs VL817Q7 USB 3.1 hub controller + +maintainers: + - Anand Moon <linux.amoon@gmail.com> + +allOf: + - $ref: usb-device.yaml# + +properties: + compatible: + enum: + - vialab,usb2109 + + reg: true + + reset-gpios: + description: GPIO controlling the RESET# pin. + + vdd-supply: + description: + the regulator that provides 5.0V core power to the hub. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + usb { + dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + + hub: hub@1 { + compatible = "vialab,usb2109" + reg = <1>; + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; + }; + };