From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70A5838E5FD for ; Mon, 9 Mar 2026 22:24:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773095065; cv=none; b=BFnCKssOTHJvFHewCsd1clU+EG94WBz9mutfv2TjT5o2HGo9bsDZVdcg0B6FkVGCe26dCG7eXp7l8rE5ysgS6L/Ge66cUCV8GAgxA6TdHZIOqivWGOqQEM2zAcbUgOpUpMD9xrgDr0ZiD6wwn7qwBydT/eel9Pn0P/XwLqA+dB8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773095065; c=relaxed/simple; bh=Cko55lCeKXrZHbjiIu641PYW/o6VsGwurcqaGD8aeKU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=kfj2Ny2Ea15MZX4QLriLrvEUkUS7/LCUFpqqVhtebpuMySQ8K6ZZJjrQnfru4P90Z02Rx2DVgERWkfTWuOaiwKufOhlw5hbYQ8ygd2nmeBnmoCsTaEQ/+mxQnX0ZKBdyrcLxHvAJNfzYfyGj89yUuCeXVQB/d7OiF3nhFcECiyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=jVF5okI6; arc=none smtp.client-ip=209.85.216.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="jVF5okI6" Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-359a5d8b3f8so3880117a91.3 for ; Mon, 09 Mar 2026 15:24:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1773095063; x=1773699863; darn=vger.kernel.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=hrSbyZBA5Px2iidq6W57qtYbXFOmMx8uhJF7gt5CJ8A=; b=jVF5okI6grO3WmYQmX7ieTSbpXd7nFlp0AdRF12AxZtiXqh5Gd9Y915QWbCXNM9YgS y71SjSgVb7qQPJJwOgIzm+mTk0TvDUEuzWPdCR0KLzQ1+OMfJB0qLlGT+SpKjTJKKGpN XhZpG3UwwoJR6nvdyufAcfNWZo8TCb2GY2t2cbhSZNMdZPWWlQt1FUMKgQhzhIP/GmYV /PhwLjSgCbFzWQDL3rstliKTJRC8Nr5GIYmwI6taLvhTJ5jXQMrX97lHYGvrcVKvw5Mh WwtxPRoTpvWwHA02z4F1zhd8tjNoy8Bs9IRKfZxwy06WZQec7hsufnL8xiG3qP3V2YjR YZUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773095063; x=1773699863; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hrSbyZBA5Px2iidq6W57qtYbXFOmMx8uhJF7gt5CJ8A=; b=i6P9/ZOizboqdmBFTHfg+HDqOXZFJjq/auzfN5citA0RrjTyDoUihRlovKH/FkbFxR qXvKIhUC8Q3aC5Fk1JQSxFq7p0peqcHep+vUGLTohrAo0ke7ifunBzaE/P1/AMSKu6UK 0p5wrxOtoXGFXXryiTu/265HZzVuJngfFmgn60S42Av4eucpQBOCyNMQwGMETl7WKJaV spVoliWxoNKF1d4iLsGii12cWt5nncNX5lA1hiftj7ZNIZVfI8yGgeYQuLM23/cdWV78 YilT8gB5TX4OZ6CEiso1kaJVUMUZGE/yhozdyrhafmWF9XfXbVlphQkf7eO5tD2efAiS Fkmg== X-Forwarded-Encrypted: i=1; AJvYcCX4cVypeBDcZWWbjQEOqMcwgBMqRSn9zRADzmWESDr50htjzh9J0BG3duvH+UwIk3WAW2YLksu916WruIE=@vger.kernel.org X-Gm-Message-State: AOJu0YymRCQY2GE5oqKYHuBNy8d9sSEJWNKbYyj0YHTeLgKM0qmF0j6o 2mbmJLA8/dHKAmj47tIDPH0DcRMlg4ZjpuCnA2TjAyNzLmpD8tNcB0iCUUQ1eAYKd/A= X-Gm-Gg: ATEYQzx9hhyXSmUPo/i0LaVKrjZUdSCQ9U11u06MZ15PqKP5nqgcyw7G+t3sEWSPPXB tjHsxz+ZThLbBMxVbbwMhptg1UtcE7gSi00d4Ozm6JSiTgK2KBGkjkBwLPpDY+tB6i7jcbMu0W3 wpkFhNI9A3YalhTkYb9HztMnty5D/SoiG09ynUXi5uI/gisYkswmU05AoOK7EtwYyx16iRTAf53 POvr04GGUh75yOgRZ8aBFG55dWceerpuqk9waB7ESNYi4bLIOL+GmOZ6e3FHws3khAxZkWg+YV1 qQWJqYGf1kHhH+y+Vlc7+e9yxAwBhJbIwPQpRrxklG7C4OY6jwk4WxU81a891jgcL+5rWTRcj5q 9jbqS+CmPwhodB6TqswtCFUKr8BbIO32z6l0650qE3GSQNFIuDtxKK1LZgJMLnKbZnADaDKcJsp 8mWh2hTrTKeIQK+87eei9r X-Received: by 2002:a17:902:f78b:b0:2ae:55c1:ba8a with SMTP id d9443c01a7336-2ae823851bamr116227635ad.14.1773095062734; Mon, 09 Mar 2026 15:24:22 -0700 (PDT) Received: from localhost ([71.212.200.220]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ae83fa2fa5sm130946135ad.70.2026.03.09.15.24.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2026 15:24:22 -0700 (PDT) From: Kevin Hilman To: Ulf Hansson Cc: Geert Uytterhoeven , Rob Herring , "Rafael J. Wysocki" , Sudeep Holla , Cristian Marussi , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, arm-scmi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH RFC v5 1/2] pmdomain: core: support domain hierarchy via power-domain-map In-Reply-To: References: <20260122-pmdomain-hierarchy-onecell-v5-0-76855ec856bd@baylibre.com> <20260122-pmdomain-hierarchy-onecell-v5-1-76855ec856bd@baylibre.com> <20260127151735.GA1699112-robh@kernel.org> <7hjywtzaiy.fsf@baylibre.com> <7hv7flrb36.fsf@baylibre.com> Date: Mon, 09 Mar 2026 15:24:21 -0700 Message-ID: <7hqzpszlnu.fsf@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Ulf Hansson writes: > On Wed, 25 Feb 2026 at 00:11, Kevin Hilman wrote: >> >> Geert Uytterhoeven writes: >> >> > Hi Kevin, >> > >> > Thanks for your series! I became aware of it only recently, and read >> > it and its history with great interest... >> > >> > On Wed, 4 Feb 2026 at 00:13, Kevin Hilman wrote: >> >> Rob Herring writes: >> >> > On Thu, Jan 22, 2026 at 05:14:00PM -0800, Kevin Hilman (TI) wrote: >> >> >> Add of_genpd_[add|remove]_subdomain_map() helper functions to support >> >> >> hierarchical PM domains defined by using power-domains-map >> >> > >> >> > power-domain-map. No 's'. >> >> > >> >> >> property (c.f. nexus node maps in DT spec, section 2.5.1). >> >> >> >> >> >> This enables PM domain providers with #power-domain-cells > 0 to >> >> >> establish subdomain relationships via the power-domain-map property, >> >> >> which was not previously possible. >> >> >> >> >> >> These new helper functions: >> >> >> - uses an OF helper to iterate to over entries in power-domain-map >> >> >> - For each mapped entry: extracts child specifier, resolves parent phandle, >> >> >> extracts parent specifier args, and establishes subdomain relationship >> >> >> - Calls genpd_[add|remove]_subdomain() with proper gpd_list_lock mutex protection >> >> >> >> >> >> Example from k3-am62l.dtsi: >> >> >> >> >> >> scmi_pds: protocol@11 { >> >> >> #power-domain-cells = <1>; >> >> >> power-domain-map = <15 &MAIN_PD>, /* TIMER0 */ >> >> >> <19 &WKUP_PD>; /* WKUP_TIMER0 */ >> >> >> }; >> >> >> >> >> >> MAIN_PD: power-controller-main { >> >> >> #power-domain-cells = <0>; >> >> >> }; >> >> >> >> >> >> WKUP_PD: power-controller-main { >> >> >> #power-domain-cells = <0>; >> >> >> }; >> >> >> >> >> >> This allows SCMI power domain 15 to become a subdomain of MAIN_PD, and >> >> >> domain 19 to become a subdomain of WKUP_PD. >> >> > >> >> > One concern I have here is generally *-map is transparent meaning when >> >> > you lookup <&scmi_pds 15>, &MAIN_PD is returned as the provider. It's >> >> > also possible to have a map point to another map until you get to the >> >> > final provider. The only way we have to support both behaviors is the >> >> > consumer has to specify (i.e. with of_parse_phandle_with_args_map() vs. >> >> > of_parse_phandle_with_args()), but the consumer shouldn't really know >> >> > this detail. >> > >> > This is also the first thing I was worried about, when I noticed you are >> > not doing transparent mapping, but add an explicit hierarchy instead, >> > based on the map. >> >> Yeah, the map wasn't my original idea, and TBH, I had never really even >> heard of nexus node maps before it was suggested by Rob[1] that I could >> use it to describe hierarchy. >> >> But... I'm gathering from Rob's and your recent feedback that my current >> approach to using a map is an abuse/misuse of the map because it's just >> being used to describe hierarchy, and because it's not transparent. >> >> I'm still waiting to hear from Rob to see if I understood that right, >> but your feedback is making me think that's the case. >> >> If so, I'm honestly not sure where to go next. >> >> >> > Maybe a transparent map of power-domains would never make sense. IDK. If >> >> > so, then there's not really any issue since the pmdomain core handles >> >> > everyone the same way. >> > >> > AFAIUI, SCMI is not limited to the SoC, but may be used for the whole >> > hardware platform, so it could control power to external devices, too. >> > Once we need to map a power domain through a connector, we need >> > support for transparent mapping through a nexus node. >> > >> >> I don't really know enough about potential usage of maps to know if >> >> there's ever a usecase for transparent maps. However, the problem I'm >> >> trying to solve is less about transparent maps, and more about >> >> describing hierarchy in a situation where "leaf" domains of the same >> >> type (e.g. SCMI) can have different parent domains. >> > >> > Hierarchy is indeed something that cannot be described with the current >> > SCMI power domain management protocol. This includes external hierarchy >> > (your use case), and internal hierarchy: AFAIK, Linux cannot be made >> > aware of the hierarchical relationship among the different power >> > domains controlled through SCMI either. >> >> Yes, the limitations of SCMI (both the protocol, and the Linux >> implementation) are the root cause here. In case you didn't see it, >> before I posted the original version of this series, I started a thread >> on the arm-scmi list to discuss implementation options[2] >> >> So since this is primarily and SCMI limitation, maybe I should just go >> back to the original proposal of using power-domains-child-ids[3]? >> >> I'm definitely open to suggestions here as I'm a bit out of my depth >> here. > > FWIW, I favor re-trying the "power-domains-child-ids" [3] approach. > > The main reason is that we already have the "power-domains" property, > which allows us to describe parents using a list of phandles. > > To me, it seems more sensible to extend this with a new > "power-domains-child-ids" property, which can be used when needed, > rather than inventing an entirely new property, that would replace the > existing one. OK, in the absence of any feedback from the DT maintainers, I'll go back to the original approach of using `power-domain-child-ids`. Kevin