From nobody Sat Sep 21 22:48:03 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 8E17AC433EF for ; Wed, 20 Jul 2022 12:31:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240782AbiGTMbi (ORCPT ); Wed, 20 Jul 2022 08:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234483AbiGTMag (ORCPT ); Wed, 20 Jul 2022 08:30:36 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88D4048E92; Wed, 20 Jul 2022 05:30:33 -0700 (PDT) X-UUID: ee89a98b0a9645f69f88404e95b4eaa0-20220720 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.8,REQID:a474bfb0-74ef-464d-a6ab-d0254daa7b12,OB:10,L OB:10,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,RULE:Release_Ham,A CTION:release,TS:95 X-CID-INFO: VERSION:1.1.8,REQID:a474bfb0-74ef-464d-a6ab-d0254daa7b12,OB:10,LOB :10,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,RULE:Spam_GS981B3D,A CTION:quarantine,TS:95 X-CID-META: VersionHash:0f94e32,CLOUDID:78547d33-b9e4-42b8-b28a-6364427c76bb,C OID:bdb3ebc4ff7c,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: ee89a98b0a9645f69f88404e95b4eaa0-20220720 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 2114801822; Wed, 20 Jul 2022 20:30:26 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Wed, 20 Jul 2022 20:30:25 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 20 Jul 2022 20:30:24 +0800 From: Tinghan Shen To: Yong Wu , Joerg Roedel , "Will Deacon" , Robin Murphy , Rob Herring , Krzysztof Kozlowski , Lee Jones , Matthias Brugger , Tinghan Shen , AngeloGioacchino Del Regno , MandyJH Liu CC: , , , , , Subject: [PATCH v3 03/21] dt-bindings: power: mediatek: Refine multiple level power domain nodes Date: Wed, 20 Jul 2022 20:30:05 +0800 Message-ID: <20220720123023.13500-4-tinghan.shen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220720123023.13500-1-tinghan.shen@mediatek.com> References: <20220720123023.13500-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 Reviewed-by: Krzysztof Kozlowski --- .../power/mediatek,power-controller.yaml | 131 +++--------------- 1 file changed, 17 insertions(+), 114 deletions(-) diff --git a/Documentation/devicetree/bindings/power/mediatek,power-control= ler.yaml b/Documentation/devicetree/bindings/power/mediatek,power-controlle= r.yaml index b448101fac43..321802c95308 100644 --- a/Documentation/devicetree/bindings/power/mediatek,power-controller.yaml +++ b/Documentation/devicetree/bindings/power/mediatek,power-controller.yaml @@ -42,6 +42,23 @@ properties: =20 patternProperties: "^power-domain@[0-9a-f]+$": + $ref: "#/$defs/power-domain-node" + patternProperties: + "^power-domain@[0-9a-f]+$": + $ref: "#/$defs/power-domain-node" + patternProperties: + "^power-domain@[0-9a-f]+$": + $ref: "#/$defs/power-domain-node" + patternProperties: + "^power-domain@[0-9a-f]+$": + $ref: "#/$defs/power-domain-node" + unevaluatedProperties: false + unevaluatedProperties: false + unevaluatedProperties: false + unevaluatedProperties: false + +$defs: + power-domain-node: type: object description: | Represents the power domains within the power controller node as doc= umented @@ -100,123 +117,9 @@ 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 - required: - compatible =20 --=20 2.18.0