Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp512607rdh; Thu, 23 Nov 2023 09:57:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1MlnxJaUHwrnxp1FvJvtYX8oJLsn6jFRaUk2rhx5qlS1x4Je1gRopXKm+kte6BV0W4D6q X-Received: by 2002:a17:90b:3005:b0:27d:3be:8e13 with SMTP id hg5-20020a17090b300500b0027d03be8e13mr208314pjb.12.1700762270321; Thu, 23 Nov 2023 09:57:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700762270; cv=none; d=google.com; s=arc-20160816; b=FGz1KYXO712Pzs6wp4kP6MLzHL0ttC/DkpVO+3rU78Okg4dzKx4rUqM5Qme5vNxasG R2veg+vrEXI9H1mwh3C1XbuHgbMqsLW5sQYze4UxY1HR2ft2FeAEWrtX2xfSE8N5lPS4 a2gq0ZIlJCDo6HacHV0Qep0xHwKBKjEf0MaAGFlJCSMrdlUafYKhr3oFQDMNEeoId+A8 uvOWv8bz+WUfwpI+5y8u22QlO2ATKG3wGzchdbQ9x/YrjgH9qgAoSl+HNwan0n19KD5S PcvvYrMzd90DDAOjGdhXWq6UDJRRTVdBMSQ0h/s2Gj7ny+5nrGviuWy2lPLtOdCgSE1G fKdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=m0e/IyZgcRjYR1Bqlfxvhttk0W3QZ1C1rr79MORGOeY=; fh=u70xp9BeiCEvY1rXFByid2g5eDz85oXjXJO9t6pAboY=; b=oD4TkdXIUsRp7JZMTOqYn9lllDDcLC2ZNE36ixuY31yxn3t4oIIgp3VkfYnGzf2gYP 1j4ISObBAZRT9NedhUtRe8zm0R4Dirzz35b1QP3TMmv0OCwMkvWH4YHodBpajA2oEz75 Q5oxyZsBYtqWsLh0GTDtndNCem7VvPLX7vK0t8FiyP4VJK19oQnu2Ads5+dbyWNHhUct LoRYk0Fp04rUCl6BZjYMwReed3oyQWQgd2ssHYWMsQl0kDrJvbQ/ybPUmVsj/Z5y7XM9 L3e5IdUZD4fVLkU5/KtDkNgQYtM9YocMd6HH5dd1WYzm8QLb2F4+WAE2JdIck0hfKJ9x prGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="O/B7Gq1P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o5-20020a17090ab88500b00283a0b84bacsi1620812pjr.155.2023.11.23.09.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 09:57:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="O/B7Gq1P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A9C8F804F616; Thu, 23 Nov 2023 09:56:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229929AbjKWR4a (ORCPT + 99 others); Thu, 23 Nov 2023 12:56:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjKWR43 (ORCPT ); Thu, 23 Nov 2023 12:56:29 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9A84189 for ; Thu, 23 Nov 2023 09:56:35 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18489C433C7; Thu, 23 Nov 2023 17:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700762195; bh=lC5W7+Qr59rnhc4Jd20Dtf/HPxOyflR9v5IaOt+MbeI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O/B7Gq1PllfFYKi98tzgiIqm+eO8BZesekeW8ePGYfCsbyloLFTgwLYSMxT0530wP H+Ssfwp7bfx7zSXZXctFO9WA2fgL4RZtdO4hwFVdj1iS8t0ocJK8PDzdsrSGx/UgGg +uYFgEbpmzyah8WMmmzafyGLP5qVL3SLqobMJT9e+1kRv6bo9A45xCVRvSEEiclAEu rgTVTc4Gk3NQXt2cdrah+ibIjM9o1cXXnbOc6LDcLWz4fbWs8vbR/bdsCe2gUDlLkY rIPZ5h3uIJyKH1ayQ8BjtoS0oOo4Oq1n8NhuKi8G2pctnkhgv86pASLLIBJc6sL1ds iftxVyWj3Dl2Q== Date: Thu, 23 Nov 2023 17:56:30 +0000 From: Conor Dooley To: Anand Moon Cc: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Icenowy Zheng , Neil Armstrong , linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub Message-ID: <20231123-skeletal-smirk-390543e2d6ab@spud> References: <20231122182351.63214-1-linux.amoon@gmail.com> <20231122182351.63214-2-linux.amoon@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="V1sQe/A91J5XE2J3" Content-Disposition: inline In-Reply-To: <20231122182351.63214-2-linux.amoon@gmail.com> X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 23 Nov 2023 09:56:42 -0800 (PST) --V1sQe/A91J5XE2J3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 22, 2023 at 11:53:46PM +0530, Anand Moon wrote: > Add the binding example for the USB3.1 Genesys Logic GL3523 > integrates with USB 3.1 Gen 1 Super Speed and USB 2.0 High-Speed > hub. >=20 > Onboard USB hub supports USB 3.x and USB 2.0 peer controllers. > which has a common reset pin and power supply. > peer-hub phandle each peer controller with proper gpio reset > and help each peer power on during initialization > and power off during suspend. >=20 > Signed-off-by: Anand Moon > --- > v4: Fix the description of peer-hub and update the commit message. > Schematics of the Odroid N2+ > https://dn.odroid.com/S922X/ODROID-N2/Schematic/odroid-n2_rev0.6_20210121= =2Epdf > V3: fix the dt_binding_check error, added new example for Genesys GL3523 > v2: added Genesys GL3523 binding > v1: none > --- > .../bindings/usb/genesys,gl850g.yaml | 67 +++++++++++++++++-- > 1 file changed, 63 insertions(+), 4 deletions(-) >=20 > diff --git a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml b/= Documentation/devicetree/bindings/usb/genesys,gl850g.yaml > index ee08b9c3721f..bc3b3f4c8473 100644 > --- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml > +++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml > @@ -9,9 +9,6 @@ title: Genesys Logic USB hub controller > maintainers: > - Icenowy Zheng > =20 > -allOf: > - - $ref: usb-device.yaml# > - > properties: > compatible: > enum: > @@ -27,12 +24,48 @@ properties: > =20 > vdd-supply: > description: > - the regulator that provides 3.3V core power to the hub. > + phandle to the regulator that provides power to the hub. > + > + peer-hub: Should the property not be "peer-controller"? Your description refers to them as such. > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + onboard USB hub supports USB 3.x and USB 2.0 peer controllers. > + which has a common reset pin and power supply. > + peer-hub phandle each peer controller with proper gpio reset > + and help each peer power on during initialization > + and power off during suspend. I generally hate to talk about non-native speakers grammar etc, but what you have here is in need of a lot of improvement. The below is my attempt to understand what you are trying to say: "For onboard hubs that support USB 3.x and USB 2.0 controllers with shared resets and power supplies, this property is used to identify the controllers with which these are shared." Also - this is one particular system, what prevents there being a hub that has more than 2 controllers? Also, as you insist that this is generic, and not just for genesys, should this not be defined in a common location? Cheers, Conor. > =20 > required: > - compatible > - reg > =20 > +allOf: > + - $ref: usb-device.yaml# > + - if: > + properties: > + compatible: > + contains: > + enum: > + - usb5e3,608 > + then: > + properties: > + peer-hub: false > + vdd-supply: false > + reset-gpios: true > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - usb5e3,610 > + - usb5e3,620 > + then: > + properties: > + peer-hub: true > + vdd-supply: true > + reset-gpios: true > + > additionalProperties: false > =20 > examples: > @@ -49,3 +82,29 @@ examples: > reset-gpios =3D <&pio 7 2 GPIO_ACTIVE_LOW>; > }; > }; > + > + - | > + #include > + usb { > + dr_mode =3D "host"; > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + /* 2.0 hub on port 1 */ > + hub_2_0: hub@1 { > + compatible =3D "usb5e3,610"; > + reg =3D <1>; > + peer-hub =3D <&hub_3_0>; > + reset-gpios =3D <&gpio 20 GPIO_ACTIVE_LOW>; > + vdd-supply =3D <&vcc_5v>; > + }; > + > + /* 3.1 hub on port 4 */ > + hub_3_0: hub@2 { > + compatible =3D "usb5e3,620"; > + reg =3D <2>; > + peer-hub =3D <&hub_2_0>; > + reset-gpios =3D <&gpio 20 GPIO_ACTIVE_LOW>; > + vdd-supply =3D <&vcc_5v>; > + }; > + }; > --=20 > 2.42.0 >=20 --V1sQe/A91J5XE2J3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZV+STgAKCRB4tDGHoIJi 0mwwAP9s9qmiSd8TgU4ApJa6D+1a7mUjwbwVn5y9j9brD7RfmgD/bZI//2gN6ZT9 CAdWofSmLE0P+12w0jvV05yM8LwnvQE= =yviR -----END PGP SIGNATURE----- --V1sQe/A91J5XE2J3--