From nobody Sat Sep 21 22:41:02 2024 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 A9CA6C433EF for ; Thu, 14 Jul 2022 12:29:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238875AbiGNM32 (ORCPT ); Thu, 14 Jul 2022 08:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238935AbiGNM2x (ORCPT ); Thu, 14 Jul 2022 08:28:53 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06FAF1054B; Thu, 14 Jul 2022 05:28:50 -0700 (PDT) X-UUID: 65b558e2ab0749bfa146cd90295bd5f8-20220714 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.8,REQID:a92aacbf-ed9d-4173-8c57-23e192915e30,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:0 X-CID-META: VersionHash:0f94e32,CLOUDID:5ea37fd7-5d6d-4eaf-a635-828a3ee48b7c,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil ,QS:nil,BEC:nil,COL:0 X-UUID: 65b558e2ab0749bfa146cd90295bd5f8-20220714 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1864765187; Thu, 14 Jul 2022 20:28:41 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Thu, 14 Jul 2022 20:28:40 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Thu, 14 Jul 2022 20:28:40 +0800 From: Tinghan Shen To: Yong Wu , Joerg Roedel , Will Deacon , Rob Herring , Krzysztof Kozlowski , Lee Jones , Matthias Brugger , Tinghan Shen , Chun-Jie Chen , AngeloGioacchino Del Regno , MandyJH Liu , Weiyi Lu CC: , , , , , Subject: [PATCH v2 05/19] dt-bindings: power: mediatek: Refine multiple level power domain nodes Date: Thu, 14 Jul 2022 20:28:23 +0800 Message-ID: <20220714122837.20094-6-tinghan.shen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220714122837.20094-1-tinghan.shen@mediatek.com> References: <20220714122837.20094-1-tinghan.shen@mediatek.com> MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Extract duplicated properties and support more levels of power domain nodes. This change fix following error when do dtbs_check, arch/arm64/boot/dts/mediatek/mt8195-evb.dtb: power-controller: power-do= main@15:power-domain@16:power-domain@18: 'power-domain@19', 'power-domain@2= 0', 'power-domain@21' do not match any of the regexes: 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/power/mediatek,power-contr= oller.yaml Signed-off-by: Tinghan Shen --- .../power/mediatek,power-controller.yaml | 119 +----------------- 1 file changed, 6 insertions(+), 113 deletions(-) diff --git a/Documentation/devicetree/bindings/power/mediatek,power-control= ler.yaml b/Documentation/devicetree/bindings/power/mediatek,power-controlle= r.yaml index be81cd97afa4..e5494a330716 100644 --- a/Documentation/devicetree/bindings/power/mediatek,power-controller.yaml +++ b/Documentation/devicetree/bindings/power/mediatek,power-controller.yaml @@ -42,6 +42,10 @@ properties: =20 patternProperties: "^power-domain@[0-9a-f]+$": + $ref: "#/$defs/power-domain-node" + +$defs: + power-domain-node: type: object description: | Represents the power domains within the power controller node as doc= umented @@ -100,122 +104,11 @@ patternProperties: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to the device containing the SMI register ran= ge. =20 - patternProperties: - "^power-domain@[0-9a-f]+$": - type: object - description: | - Represents a power domain child within a power domain parent nod= e. - - properties: - - '#power-domain-cells': - description: - Must be 0 for nodes representing a single PM domain and 1 fo= r nodes - providing multiple PM domains. - - '#address-cells': - const: 1 - - '#size-cells': - const: 0 - - reg: - maxItems: 1 - - clocks: - description: | - A number of phandles to clocks that need to be enabled durin= g domain - power-up sequencing. - - clock-names: - description: | - List of names of clocks, in order to match the power-up sequ= encing - for each power domain we need to group the clocks by name. B= ASIC - clocks need to be enabled before enabling the corresponding = power - domain, and should not have a '-' in their name (i.e mm, mfg= , venc). - SUSBYS clocks need to be enabled before releasing the bus pr= otection, - and should contain a '-' in their name (i.e mm-0, isp-0, cam= -0). - - In order to follow properly the power-up sequencing, the clo= cks must - be specified by order, adding first the BASIC clocks followe= d by the - SUSBSYS clocks. - - domain-supply: - description: domain regulator supply. - - mediatek,infracfg: - $ref: /schemas/types.yaml#/definitions/phandle - description: phandle to the device containing the INFRACFG reg= ister range. - - mediatek,smi: - $ref: /schemas/types.yaml#/definitions/phandle - description: phandle to the device containing the SMI register= range. - - patternProperties: - "^power-domain@[0-9a-f]+$": - type: object - description: | - Represents a power domain child within a power domain parent= node. - - properties: - - '#power-domain-cells': - description: - Must be 0 for nodes representing a single PM domain and = 1 for nodes - providing multiple PM domains. - - '#address-cells': - const: 1 - - '#size-cells': - const: 0 - - reg: - maxItems: 1 - - clocks: - description: | - A number of phandles to clocks that need to be enabled d= uring domain - power-up sequencing. - - clock-names: - description: | - List of names of clocks, in order to match the power-up = sequencing - for each power domain we need to group the clocks by nam= e. BASIC - clocks need to be enabled before enabling the correspond= ing power - domain, and should not have a '-' in their name (i.e mm,= mfg, venc). - SUSBYS clocks need to be enabled before releasing the bu= s protection, - and should contain a '-' in their name (i.e mm-0, isp-0,= cam-0). - - In order to follow properly the power-up sequencing, the= clocks must - be specified by order, adding first the BASIC clocks fol= lowed by the - SUSBSYS clocks. - - domain-supply: - description: domain regulator supply. - - mediatek,infracfg: - $ref: /schemas/types.yaml#/definitions/phandle - description: phandle to the device containing the INFRACFG= register range. - - mediatek,smi: - $ref: /schemas/types.yaml#/definitions/phandle - description: phandle to the device containing the SMI regi= ster range. - - required: - - reg - - additionalProperties: false - - required: - - reg - - additionalProperties: false - required: - reg =20 - additionalProperties: false + additionalProperties: + $ref: "#/$defs/power-domain-node" =20 required: - compatible --=20 2.18.0