From patchwork Tue Mar 3 15:07:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 184129 Delivered-To: patches@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp3767899ile; Tue, 3 Mar 2020 07:08:04 -0800 (PST) X-Received: by 2002:ac2:532f:: with SMTP id f15mr3025951lfh.3.1583248084009; Tue, 03 Mar 2020 07:08:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583248084; cv=none; d=google.com; s=arc-20160816; b=0tnU+Q3NT4CAE5wekT6JdeHcwqwhNFQMH93FosJiHK9MNqGvi5NRuZMnQCy+H0LXLI w0gHDkGQSeATqFkroYetSY+cJGaKaCga2lkzBS6/D8gsj3Q7h4AZ8n+ZLNg5dcwYQRt2 xBW4j6N5sUd8BEfGNbjuPwn4Q1bkUSnbbfxBWI9ew1GHF4gdPoqOajOhfT+1hfmDHzpr Jnvg92ghREudYaJB7oKwNSDeNYb6CmwxFrviltJbQZpgXn4slKQYU5OgGvIf+0Bt/OCg 3CfmFqG2bwX98UVJIkhUdWfLADC/Lsst0cYjE3xMpQ0HpA4Pv/mueazZ/odPbIKN6FMX Pdww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=/NDACQevUaDc6JLaPGhMJ8UIpdipROa3WbiIGkpAEKo=; b=QknDgtSOVVpWjh1QiDfyl+/MBh/4zakqSHhn6+t1a46mNB0eEg/lw2PI0ynlLYLs/D PlpMvApb5CG+GIcU2ND9od2eVZWWm3NHG41y3GkbDi8bfrqQnaPt3INtud/18R443tpt 8BoRqedLFR2kMvZk5+THJsSS/G3ML+t1pDIe6u7U7bxSFMolnYsWt4fPj0+wYUfCSPHa wziE5POqdVkZN21IQLBwypophNq0EgPN/6s0xbEv2YSkgqujvQh0pSgY8Dh6r7MJs8aJ vvdH+R9vfB/uE0JKpYJ8F1nXqrMQ2TuxL1Pci4G1/OoizKPG0yYR7tld0/OYlDQ4nKWS /2Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T4WeVLCj; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y26sor4728043lfy.33.2020.03.03.07.08.03 for (Google Transport Security); Tue, 03 Mar 2020 07:08:04 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T4WeVLCj; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/NDACQevUaDc6JLaPGhMJ8UIpdipROa3WbiIGkpAEKo=; b=T4WeVLCjzQGfNUrES9Hy941MNj53A0yQWbbAPWTiPENyy1q1vpfzLRYqgm7ZJZQABy n+t9IXXQ7k6vZ+zUAh62pucstlgWBz/uF9VNQM44sUO7whZqXxMo85IQZT81qliVMizQ EzNMzQgacBQyzjLqjyxeGcTKGbWRyVSM7ZLqcsXGXlBSyPiUROa/VZQjo/Z8dLIHLlCq WeRU8WycVDsUECgE480sgW58hWtWUSyIG4TRTLVzh1WYazOzYYyichLNmT2WsEdetIuF j6weAufoJjq/B4ZsvsvymH2zVRnn4ENR5tsItmkzrxFQe0CmrvtMRL4IdtqwsOvwbKPP B+vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/NDACQevUaDc6JLaPGhMJ8UIpdipROa3WbiIGkpAEKo=; b=Q8iRqgMRpJE2LAdypX6MGcaiVCBUOxaMv5phTxB/uzPzzhEju/sYcwUu6JdAP9naL1 JKG9QW/H521fGgUEEseAwKSvMunCz8jAMbLhybo1s4CdtGd20PbP9XX4Nes8UiokVygI 04qYzMvZfZl/BjP7Ne15XXd7FgEFSoDUY2JTcXDsa6EdipxnS6rvULjw8ELH4bRXLkGz yvpk7E0dVug8BTtE+BqWCTJcN4/XF5nLsul+WGK/VLubwMWIJbDrlike4ctV/1y1Im13 3flnkiyumMpnfDnmyZ2WECmJIMbP3gyzZOp8VBMGNA8eoTCvG+F5sF3CP850MtpLW3mm bODA== X-Gm-Message-State: ANhLgQ0eMWW0DEHCFDA+DoneXA8D9PNtYdBUvTO+JwIKQva/kxkacWjV /DDMlXHQLPVxq7fHccDWICktKpJh X-Google-Smtp-Source: ADFU+vuGkkQiguth40cp1bw44U/CLR3j6mkPP+xXUr5/Vlp3zdPzogFaLS0srx11FKpgV5fWvZTJhg== X-Received: by 2002:ac2:59c7:: with SMTP id x7mr2953144lfn.148.1583248083583; Tue, 03 Mar 2020 07:08:03 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id n189sm12143135lfa.14.2020.03.03.07.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2020 07:08:02 -0800 (PST) From: Ulf Hansson To: Rob Herring , Sudeep Holla , Lorenzo Pieralisi , devicetree@vger.kernel.org Cc: "Rafael J . Wysocki" , Daniel Lezcano , Lina Iyer , Stephen Boyd , Bjorn Andersson , Benjamin Gaignard , Ulf Hansson , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH 5/7] dt-bindings: arm: Fixup the DT bindings for hierarchical PSCI states Date: Tue, 3 Mar 2020 16:07:47 +0100 Message-Id: <20200303150749.30566-6-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200303150749.30566-1-ulf.hansson@linaro.org> References: <20200303150749.30566-1-ulf.hansson@linaro.org> MIME-Version: 1.0 The hierarchical topology with power-domain should be described through child nodes, rather than as currently described in the PSCI root node. Fix this by adding a patternProperties with a corresponding reference to the power-domain DT binding. Additionally, update the example to conform to the new pattern, but also to the adjusted domain-idle-state DT binding. Fixes: a3f048b5424e ("dt: psci: Update DT bindings to support hierarchical PSCI states") Signed-off-by: Ulf Hansson --- .../devicetree/bindings/arm/psci.yaml | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) -- 2.20.1 diff --git a/Documentation/devicetree/bindings/arm/psci.yaml b/Documentation/devicetree/bindings/arm/psci.yaml index 0bc3c43a525a..cae668b61265 100644 --- a/Documentation/devicetree/bindings/arm/psci.yaml +++ b/Documentation/devicetree/bindings/arm/psci.yaml @@ -102,11 +102,15 @@ properties: [1] Kernel documentation - ARM idle states bindings Documentation/devicetree/bindings/arm/idle-states.yaml - "#power-domain-cells": - description: - The number of cells in a PM domain specifier as per binding in [3]. - Must be 0 as to represent a single PM domain. +required: + - compatible + - method +patternProperties: + "^(power-controller|power-domain)([@-].*)?$": + $ref: "../power/power-domain.yaml#" + type: object + description: | ARM systems can have multiple cores, sometimes in an hierarchical arrangement. This often, but not always, maps directly to the processor power topology of the system. Individual nodes in a topology have their @@ -122,19 +126,9 @@ properties: helps to implement support for OSI mode and OS implementations may choose to mandate it. - [3] Documentation/devicetree/bindings/power/power_domain.txt + [3] Documentation/devicetree/bindings/power/power-domain.yaml [4] Documentation/devicetree/bindings/power/domain-idle-state.yaml - power-domains: - $ref: '/schemas/types.yaml#/definitions/phandle-array' - description: - List of phandles and PM domain specifiers, as defined by bindings of the - PM domain provider. - -required: - - compatible - - method - allOf: - if: properties: @@ -224,6 +218,9 @@ examples: exit-latency-us = <10>; min-residency-us = <100>; }; + }; + + domain-idle-states { CLUSTER_RET: cluster-retention { compatible = "domain-idle-state"; @@ -247,19 +244,19 @@ examples: compatible = "arm,psci-1.0"; method = "smc"; - CPU_PD0: cpu-pd0 { + CPU_PD0: power-domain-cpu0 { #power-domain-cells = <0>; domain-idle-states = <&CPU_PWRDN>; power-domains = <&CLUSTER_PD>; }; - CPU_PD1: cpu-pd1 { + CPU_PD1: power-domain-cpu1 { #power-domain-cells = <0>; domain-idle-states = <&CPU_PWRDN>; power-domains = <&CLUSTER_PD>; }; - CLUSTER_PD: cluster-pd { + CLUSTER_PD: power-domain-cluster { #power-domain-cells = <0>; domain-idle-states = <&CLUSTER_RET>, <&CLUSTER_PWRDN>; };