From nobody Sat Sep 21 23:19:42 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 5BC2CC19F2C for ; Fri, 29 Jul 2022 06:32:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234564AbiG2GcW (ORCPT ); Fri, 29 Jul 2022 02:32:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234074AbiG2GcU (ORCPT ); Fri, 29 Jul 2022 02:32:20 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77F517FE5B; Thu, 28 Jul 2022 23:32:18 -0700 (PDT) X-UUID: c1a08bd514c44a8bb1cd56e12d39f744-20220729 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.8,REQID:0b6ebd49-0d13-4679-b2cd-51959ac9c731,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:da60b9cf-a6cf-4fb6-be1b-c60094821ca2,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: c1a08bd514c44a8bb1cd56e12d39f744-20220729 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1139290130; Fri, 29 Jul 2022 14:32:13 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 29 Jul 2022 14:32:13 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 29 Jul 2022 14:32:13 +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 v4 03/20] dt-bindings: power: mediatek: Refine multiple level power domain nodes Date: Fri, 29 Jul 2022 14:31:51 +0800 Message-ID: <20220729063208.16799-4-tinghan.shen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220729063208.16799-1-tinghan.shen@mediatek.com> References: <20220729063208.16799-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 Reviewed-by: AngeloGioacchino Del Regno --- .../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 b448101fac43e..321802c95308f 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