Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1618442rdb; Thu, 7 Dec 2023 04:33:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzP35I4ViZG2VbPHLAQfH+cF0031N+itXLHdG2Eb7qldtp/05xGguHlz/ZtKsCDd8rusI0 X-Received: by 2002:a17:90a:1a02:b0:286:6cc1:2cc1 with SMTP id 2-20020a17090a1a0200b002866cc12cc1mr2074465pjk.75.1701952437882; Thu, 07 Dec 2023 04:33:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701952437; cv=none; d=google.com; s=arc-20160816; b=bUj1tNS9/BJmSPubFdBH+tY5VxsN+dJFqrbW18tBPkWO32Wb1r3QJDF1zjhPDkXkgU C07RbLJSgFnZLNJoSLdmauN3OdErJXPvM2t/FxiGCDpROnVWNIMO8P+qYPwqjxERtaba oi+hAdS7POTSbdb1mzxNxejMXfJPp+41OkAqY4RCA3zlqPOEQNUjA/m8NCtDF9HNn1MJ rfSqzw2cgmyk/FF2+PraZoY58gU0U2PeU5Bhfq2eMny3GGf/voUewkBoyCwNfyT/BvjR 9//67esS6gsVHvIRUQfA99AifSpPcAlB24u/zys6op1BtWoSD9h/bugWETzq2wJuN93Q SPgg== 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=eoyF50C90+byNneOw67lraz5w5fqAkMLns+7xoj94Cw=; fh=n/7IIMEPNzp8MW81ND8IieOthIwlJjNyqWfdSXDNTbM=; b=jJxl5l3Nm4Ay5wsLNeWOHp9ahp5rfEPO3lSTly3jl2HdsXjcXNOcMVftjmzeaFMhay lwuKrHnop3XIHCwjlOvt4UFAj6grPWtCAcQP2g0EhqXZg8ONjwHq2jY25Q79n22e+l48 2J8fv/oSxqoOFpDurZ1K4TA7PH6IZklSwRTVz11AN5TLPHfmFhafu/6WaFztjfgtNmRX /Xc2VoVTDEz+iBZcH83wGr4g1A1/8nBdE17pJgKoih4Ma4aqB0Xbe/NrHEFdS33vTN3k zzkYxjAKn/H05Ue1rqlmjFuH3560m7yZisz74B1kd/PGlKVsxfUzVl+mhoaYZAFyEP1P x7Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Rz8pi5yV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id h22-20020a63f916000000b005c203ad2343si1149688pgi.94.2023.12.07.04.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 04:33:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Rz8pi5yV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id CF0CF804C6F4; Thu, 7 Dec 2023 04:33:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379272AbjLGMdj (ORCPT + 99 others); Thu, 7 Dec 2023 07:33:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232482AbjLGMdi (ORCPT ); Thu, 7 Dec 2023 07:33:38 -0500 Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB25AD5C; Thu, 7 Dec 2023 04:33:43 -0800 (PST) Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-58ce8513da1so322975eaf.2; Thu, 07 Dec 2023 04:33:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701952423; x=1702557223; 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=eoyF50C90+byNneOw67lraz5w5fqAkMLns+7xoj94Cw=; b=Rz8pi5yVV5X79T1Yez2j0uZYHI/gmkHZkfKOD9ZZlKQcOQpkXYXaB9LlZrKCwgLWdS 3ivpmDrPmoOwgakbf9qtR1Lwx0tCKTze93ONEyyx+QykcyrtEVA2H6mQ8b9yR27PDdV/ 5NKs1/9ZvnQy8gGfmJOb0mCW31qxE9jekaziOB6by2TO9LR8/KVxnAr9umI6In0cJDio OHFT5g3uqu8M0uqkZUdttxfrylqDbdH2mj442dFgC/bTm4m/DmV1SYjn26sOLGEUQg6X KVHZrgP9UIlKoadsWoirk7tQoKnNEcG0P7GPsBOzvXbT2tOTbGvyMpS8tv7vxQnKw77U qDuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701952423; x=1702557223; 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=eoyF50C90+byNneOw67lraz5w5fqAkMLns+7xoj94Cw=; b=Lw1pBjtyeWYT5MaLzlIxQRCai6PvZuaJmdqNolOdTHWuZGpxzIy7Fl18sFBTWWsGMZ jzzu8gprciVZ0/ufmLIfRnnOkeH9sylRqiRC+rwmagU7F1zEm5IPiklJIGA/pckHSsjd 2k1DwfCpD48FFIj/ep89W8d2rRhVmL5v086udBHhGVRCDfa44iydVsWMOTcWM6pEXLcP V9NY481Kd0JaboNK01jtCj2CKdA2KKoxKRvvYdDOGQ81sAmrc6OgqCGHmq+U9/N68d77 VupFXTCMRHI0CA0ItD3Nd5AfW/ul70rMp/cKrJ7grLWLyGCvXU/SLUWaTBC4S6LGad4u L7TA== X-Gm-Message-State: AOJu0YyOpuic+yskJHW0NK6fVC+DY2eebuT2YSyU7VmJExevIQmcxias kA6U1fac54T0uHrXWke1z5Dp+i/+iCdVrWrnZ0JvHpi++QZNQQ== X-Received: by 2002:a05:6820:1ac8:b0:58d:6ea3:8fc with SMTP id bu8-20020a0568201ac800b0058d6ea308fcmr2905570oob.2.1701952422933; Thu, 07 Dec 2023 04:33:42 -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> In-Reply-To: <21673bfd-bb87-4c7d-a53f-337c263f3a00@linaro.org> From: Anand Moon Date: Thu, 7 Dec 2023 18:03:25 +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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Thu, 07 Dec 2023 04:33:55 -0800 (PST) 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. required: - compatible - reg - reset-gpio 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