Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2027300rdb; Thu, 7 Dec 2023 16:26:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqNvW612WXVpMvzpIG5aJ/4MMhV62A6IiI+yBXwXf7yH5k0c+N6v26uVjVbuYLGRQwLUPh X-Received: by 2002:a05:6a20:7fa1:b0:18c:8db0:2a2c with SMTP id d33-20020a056a207fa100b0018c8db02a2cmr3770608pzj.17.1701995184165; Thu, 07 Dec 2023 16:26:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701995184; cv=none; d=google.com; s=arc-20160816; b=b8l2zPys4vIAwzbpkWUTOFfgMqJKl2eQjeNfXDaocw5qFOIyyIo8YaIMw71gbpPxym 8yl4uysYWoFa5791gWOb/z0IiYBHKWYsWTRMg4bHm4we5UWBkVgqle+XuoKtez4bNIIk MT8aorOrZ7n+BSSJbwD0wREZeh3cTMX3WP1QY3/KAuLt2z+iT2IICv87KgdcY+IcaoM6 1sdBwz8XfiS075WP03MtXO28eU0Npr/4jCFVcKKFFzYDk35/wf9FFfJvNJYdFmFYNhS2 JafBYyUwo8qsyXjA8YOUI82YxLOROBjXZP62Jnhr1oP9UTsq4kycnI8tIgqWQzK5l2nf 0r7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MSN+KGwjWnynTpdt4z2HpHMekwKnkXSJkY0oqIZKp+Q=; fh=n/7IIMEPNzp8MW81ND8IieOthIwlJjNyqWfdSXDNTbM=; b=GbkZWOyUNGyO4vT70nithaBt0tLJPFgfCpPsCnTErnbKO4v54WhkfwSazEnRm4HhRy P7z+NENuS2jhGAFuXkiwKhzhf0DDLDzxiUkpjrm9kXtzd/zc9pa6zPeB1vdrJb4uV2/M JbVq37Vnf2v2EZpQEWJtOXbPMmhTOAgdxEC5tysg6nCz9ElWbFF7jbrCFssTlZtQKtID hgTeuYY+ChlDtwmIAgrlKhNeBZ6V+qh3PHMv+sjeN/1ee5dpG9fWlcAzC3Ntzt++BRY+ vDBe58wRAgpVsk+cw3t3OOBCKPqn43nL80VPhocC6xSvIs75EwUfYJx58IS9UM8oZl3D yR2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mXtbziia; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id x8-20020a17090a0bc800b00286a297bfd4si1846921pjd.127.2023.12.07.16.26.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 16:26:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mXtbziia; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CBB9A807C67D; Thu, 7 Dec 2023 16:25:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235627AbjLHAZ2 (ORCPT + 99 others); Thu, 7 Dec 2023 19:25:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235619AbjLHAZX (ORCPT ); Thu, 7 Dec 2023 19:25:23 -0500 Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42AE819BF; Thu, 7 Dec 2023 16:25:01 -0800 (PST) Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-59063f8455eso741440eaf.3; Thu, 07 Dec 2023 16:25:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701995101; x=1702599901; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MSN+KGwjWnynTpdt4z2HpHMekwKnkXSJkY0oqIZKp+Q=; b=mXtbziiaTLKymrhRZLBoQSvAVgt84GLrjsLnABE7Pr7LaIpruPaEMCXrmIpvEkrUzl Ln/alo/ubUSM3EZqsxDTRQrSg65T83nmKRun4+tWFqS5YjBxA+HvwDrUOEDvrjKrMiYR 23GZtmGmtXp2P4xsD6Eop0NOhoqG/hF/MEpQ8ka5v3UtV6/vtLLF630jaSpWJBynpNnh ZCaqZg7WG/2ZX/rz5lfAp8bIEAnRJiUtBBP5XXbQJv4it2kPQowmJh+xSqohR3zjEVPA RxzSf96pP2LwqlqiJSRnb2fpx8s/SJOhrKJjO97vDU7eGLvi4wpe968OOd4RlNvFoXka Mjaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701995101; x=1702599901; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MSN+KGwjWnynTpdt4z2HpHMekwKnkXSJkY0oqIZKp+Q=; b=V3CHJcxHr57pWzMlw2ZD/oPa2pWhgLjevBbkuxwrSpSI8acAe2N8IL8tqZU5BHVHXG Igp8o2Av+UOgyntusHDYl9XbFoXzOCiZb//2q12E4xCYrArq8GjIM6FWzmi3oypvs7fu WE7iI6XdxEAyQqpWdwBONDhh+SZoZ0uoFOVj0QNGmLrr2JtDQqAeJU4S5Cb291ourWtE M8XQEQ3pT/Xi2kV03WxdMbVNNP5Qg5G+AGKP0rtxqWiocIUtb19uEZ2rDovAa+lOIjiN 1imA5kG4RS4/dpNJyusK2WvwFUVxJyBPhBMWby7YG7chJxmxS0zwqyUcigo33CedAjsu AzRA== X-Gm-Message-State: AOJu0YxTXX5m/mVf2A6cHLx4fxOkIAZqodDRwTov/5abpADylnyFsTHZ F1EAWjHmxyI6rbIhlsC+FlkYFD9kAOLu6rjxOUSdFbPSh4X/Eg== X-Received: by 2002:a05:6820:1ac8:b0:58d:6ea3:8fc with SMTP id bu8-20020a0568201ac800b0058d6ea308fcmr4111694oob.2.1701995100761; Thu, 07 Dec 2023 16:25:00 -0800 (PST) MIME-Version: 1.0 References: <20231204144429.45197-1-linux.amoon@gmail.com> <20231204144429.45197-2-linux.amoon@gmail.com> <20231206135311.GA2043711-robh@kernel.org> <21673bfd-bb87-4c7d-a53f-337c263f3a00@linaro.org> <604e653d-c1e2-45c7-b121-8a6b4be5c6bb@linaro.org> In-Reply-To: <604e653d-c1e2-45c7-b121-8a6b4be5c6bb@linaro.org> From: Anand Moon Date: Fri, 8 Dec 2023 05:54:43 +0530 Message-ID: Subject: Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub To: Krzysztof Kozlowski Cc: Rob Herring , Greg Kroah-Hartman , Krzysztof Kozlowski , Conor Dooley , Icenowy Zheng , Neil Armstrong , linux-amlogic@lists.infradead.org, Conor Dooley , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Thu, 07 Dec 2023 16:25:50 -0800 (PST) Hi Krzysztof, On Thu, 7 Dec 2023 at 18:11, Krzysztof Kozlowski wrote: > > On 07/12/2023 13:33, Anand Moon wrote: > > Hi Krzysztof > > > > On Thu, 7 Dec 2023 at 14:00, Krzysztof Kozlowski > > wrote: > >> > >> On 06/12/2023 18:14, Anand Moon wrote: > >>> Hi Rob, > >>> > >>> On Wed, 6 Dec 2023 at 19:23, Rob Herring wrote: > >>>> > >>>> On Mon, Dec 04, 2023 at 08:14:25PM +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. > >>>>> > >>>>> For onboard hub controllers that support USB 3.x and USB 2.0 hubs > >>>>> with shared resets and power supplies, this property is used to identify > >>>>> the hubs with which these are shared. > >>>>> > >>>>> GL3523 has built-in 5V to 3.3V and 5V to 1.2V regulators, which serves > >>>>> power to the USB HUB, it uses 5V power regulator. > >>>>> > >>>>> Reviewed-by: Conor Dooley > >>>>> Signed-off-by: Anand Moon > >>>>> --- > >>>>> V6: fix the description of the regulators > >>>>> Updated the commit message for regulator updates. > >>>>> add reviewed by Conor Dooley > >>>>> [1] https://lore.kernel.org/all/20231130053130.21966-2-linux.amoon@gmail.com/ > >>>>> v5: upgrade peer-hub description : Conor Dooley > >>>>> [0] https://www.genesyslogic.com.tw/en/product_view.php?show=67 [Block Diagram] > >>>>> 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.pdf > >>>>> 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 | 65 +++++++++++++++++-- > >>>>> 1 file changed, 61 insertions(+), 4 deletions(-) > >>>>> > >>>>> diff --git a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml > >>>>> index ee08b9c3721f..c6f63a69396d 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 > >>>>> > >>>>> -allOf: > >>>>> - - $ref: usb-device.yaml# > >>>>> - > >>>>> properties: > >>>>> compatible: > >>>>> enum: > >>>>> @@ -27,12 +24,46 @@ properties: > >>>>> > >>>>> vdd-supply: > >>>>> description: > >>>>> - the regulator that provides 3.3V core power to the hub. > >>>>> + The regulator that provides 3.3V or 5.0V core power to the hub. > >>>>> + > >>>>> + peer-hub: > >>>>> + $ref: /schemas/types.yaml#/definitions/phandle > >>>>> + description: > >>>>> + For onboard hub controllers that support USB 3.x and USB 2.0 hubs > >>>>> + with shared resets and power supplies, this property is used to identify > >>>>> + the hubs with which these are shared. > >>>>> > >>>>> required: > >>>>> - compatible > >>>>> - reg > >>>>> > >>>>> +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 > >>>> > >>>> No need for this if schema. The default is they are allowed. > >>>> > >>> > >>> If I move reset-gpios to required, I observe the below warning. > >>> > >>> DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb > >>> /home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb: > >>> hub@1: 'reset-gpio' is a required property > >>> from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml# > >> > >> Where are the properties defined? If you open the binding you see: > >> nowhere. You cannot define properties in some variant with "true". > >> Please define all of them in top-level and only narrow/constrain when > >> applicable. > >> > > What I meant is the example below, required meant applicable for both > > the binding > > But it shows me the above warning. > > My explanation stands... So again: > > >> Please define all of them in top-level and only narrow/constrain when > >> applicable. > Apologies, But I have tried this multiple times but have not been able to fix the device tree warning I have verified that example Documentation/devicetree/bindings/usb/genesys,gl850g.example.dts generate is correct required: - compatible - reg - reset-gpio - peer-hub - vdd-supply allOf: - $ref: usb-device.yaml# - if: properties: compatible: contains: enum: - usb5e3,608 then: properties: peer-hub: false vdd-supply: false - if: properties: compatible: contains: enum: - usb5e3,610 - usb5e3,620 then: properties: peer-hub: true vdd-supply: true additionalProperties: false > Best regards, > Krzysztof > Thanks -Anand