From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A9A4C433EF for ; Sun, 19 Jun 2022 07:40:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234302AbiFSHkJ (ORCPT ); Sun, 19 Jun 2022 03:40:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234274AbiFSHkI (ORCPT ); Sun, 19 Jun 2022 03:40:08 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0412EE028; Sun, 19 Jun 2022 00:40:05 -0700 (PDT) X-UUID: 6c2507ca54b3497c8c3e8ceb1ed55296-20220619 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.6,REQID:b2b009e2-bac3-4a6d-9bea-3db8c1ec8af2,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:45,FILE:0,RULE:Release_Ham,ACT ION:release,TS:45 X-CID-INFO: VERSION:1.1.6,REQID:b2b009e2-bac3-4a6d-9bea-3db8c1ec8af2,OB:0,LOB: 0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:45,FILE:0,RULE:Release_Ham,ACTIO N:release,TS:45 X-CID-META: VersionHash:b14ad71,CLOUDID:6bcfcaf6-e099-41ba-a32c-13b8bfe63214,C OID:83ca1b803afe,Recheck:0,SF:28|17|19|48,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,QS:nil,BEC:nil,COL:0 X-UUID: 6c2507ca54b3497c8c3e8ceb1ed55296-20220619 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1347035379; Sun, 19 Jun 2022 15:40:02 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Sun, 19 Jun 2022 15:40:01 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 19 Jun 2022 15:40:00 +0800 Message-ID: Subject: Re: [PATCH 2/3] dt-bindings: usb: mtk-xhci: Allow middle optional clocks to be missing From: Chunfeng Yun To: "=?ISO-8859-1?Q?N=EDcolas?= F. R. A. Prado" , Greg Kroah-Hartman , Matthias Brugger CC: AngeloGioacchino Del Regno , , Krzysztof Kozlowski , Rob Herring , , , , , Date: Sun, 19 Jun 2022 15:40:00 +0800 In-Reply-To: <20220617222916.2435618-3-nfraprado@collabora.com> References: <20220617222916.2435618-1-nfraprado@collabora.com> <20220617222916.2435618-3-nfraprado@collabora.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Fri, 2022-06-17 at 18:29 -0400, NĂ­colas F. R. A. Prado wrote: > The current clock list in the binding doesn't allow for one of the > optional clocks to be missing and a subsequent clock to be present. > An > example where this is an issue is in mt8192.dtsi, which has "sys_ck", > "ref_ck", "xhci_ck" and would cause dtbs_check warnings. How about using fixed clock instead to fix the check warning? Using enum way seems make it more complex. > > Change the clock list in a way that allows the middle optional clocks > to > be missing, while still guaranteeing a fixed order. The "ref_ck" is > kept > as a const even though it is optional for simplicity, since it is > present in all current dts files. > > Signed-off-by: NĂ­colas F. R. A. Prado > --- > > .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 9 > +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk- > xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk- > xhci.yaml > index 63cbc2b62d18..99a1b233ec90 100644 > --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml > +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml > @@ -80,8 +80,13 @@ properties: > items: > - const: sys_ck # required, the following ones are optional > - const: ref_ck > - - const: mcu_ck > - - const: dma_ck > + - enum: > + - mcu_ck > + - dma_ck > + - xhci_ck > + - enum: > + - dma_ck > + - xhci_ck > - const: xhci_ck > > assigned-clocks: