From patchwork Wed Apr 10 12:26:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624178 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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 BCDFB15B14E for ; Wed, 10 Apr 2024 12:27:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752035; cv=none; b=G5k3dSmn7z8TDzYWJ4/8TZcmZ4VRBaUEkbXm9Z2iLr73pj39rj8uPkoFaIE1tW8tWGtHQi6Lmopyo/zvtzmoQxFMHHDqKG99xMi7zUusP/Ke1UxUbcTB5PG6s9FLM5FPucPTOEZlZ+l24spfCWOj0S0XZSguUCbeE2tYY4dpsW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752035; c=relaxed/simple; bh=kt0T6oAjZ1lqWaIaUu8Sr09sefIFHdT0FJpsK8q8nM8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=d2HTRfksQbpgq/qqhIb+Rvya2EuKkOaJw5dVLbUE0a2/9aKp1t1+S9hI0TMjuYRGBgxGmbNSmqumCnE0/yx17C69wMLsfjvrqMi6oZQ2fnePJZtxkZcLJZYQMuxSOIjqxN3NEVCy7LFuOagpUWYO63iG0lPRMv/2UQSqG3ZcF8M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=P0Q3SB/7; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="P0Q3SB/7" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-516cdb21b34so8603154e87.1 for ; Wed, 10 Apr 2024 05:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712752031; x=1713356831; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TIDge7spa3NjlHFsGDVwHhao1cU+1T3vrFbJtXNX3p4=; b=P0Q3SB/74qhrxcW5rxZ2s59AdCM4X1hKKYU7Ebr2pM7wjPrrUh28mifYW468i7n/R+ DoWF2+x+9D8sAmEix2SMFbAex+kGgcDoTW+W0Kiu+9WjqwYGgZ83fTDnBrHWDKvvTrAE 3mdVA0GOxXrS7BinW4lCR/VAEV7eF1DAPTHnpW8VItdiKVHU70lx1iTyq5JedQDjiBUu Xt7fpmaS8QLI5odFyIy/+qqpo2DqP3Aee4FFPTEh4/niNAjqa7BFHLtwDPXCKDTtRdwJ VUuPebgVK094VSEsHnwCWWXHKDypcv3damhTNl2EkZ29lAMIYVf71pOGVBnpDJFWanfb 7AMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712752031; x=1713356831; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TIDge7spa3NjlHFsGDVwHhao1cU+1T3vrFbJtXNX3p4=; b=WW7OhZV38Q3exmRMNRtcAhQu3ZDBr/wwF5f+EunSTQY8MOyhQ1RB0+/Lzc/28LOJ4G MsSEHKVVZHyDtxnFSwnBUFTZ+mE3afp5BOPN2Roiiti31yZVwI2BNxYMF/TFVJUj8VhW N4j4b8Cl8VadQNGXcqRBxoRiWO553nxmQbZEp7sPCoP6QyagNI1k9yaMc8esbuXlwi7M TxSwZJupIqfZVZ86uDMr/3/rwMxknAbiq8eRmVHfoxpaoo5pXz9l9Ikl0896VRZJ2w2L kSZRdSuJek1oWhqaQ2CwugXFDR0H+duTaF3t4ZrCSKXg4FNMVqaYCFqc7rcBdePHKPy1 Jw0w== X-Gm-Message-State: AOJu0YzuWSYT3xZdt6dJGPduLnXkffkEobtF4+XBcfHp45enL1FxKKhr hpaQXMQ3LyfVDSf9B0ewZQAYC4R4dCJUpEu5JdrgPJ7ng2QUq2XT956lfCvKR44= X-Google-Smtp-Source: AGHT+IG7C1rxroDAU6W0bovwLXxkh24mVrENeNOi1KyVg7KJzkIr82Il2WrkW+2XbX41JWaolFOEXg== X-Received: by 2002:a05:6512:3d01:b0:516:d1bd:7743 with SMTP id d1-20020a0565123d0100b00516d1bd7743mr1970235lfv.64.1712752030947; Wed, 10 Apr 2024 05:27:10 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id m2-20020a05600c3b0200b004171f151a5csm1679446wms.16.2024.04.10.05.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:27:10 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 1/9] dt-bindings: clock: r9a07g043-cpg: Add power domain IDs Date: Wed, 10 Apr 2024 15:26:49 +0300 Message-Id: <20240410122657.2051132-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea Add power domain IDs for RZ/G2UL (R9A07G043) SoC. Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v3: - collected tags Changes in v2: - added "RZ/G2UL Only" comments to some defines - added RZ/Five specific defines include/dt-bindings/clock/r9a07g043-cpg.h | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/include/dt-bindings/clock/r9a07g043-cpg.h b/include/dt-bindings/clock/r9a07g043-cpg.h index a64139fec815..131993343777 100644 --- a/include/dt-bindings/clock/r9a07g043-cpg.h +++ b/include/dt-bindings/clock/r9a07g043-cpg.h @@ -200,5 +200,57 @@ #define R9A07G043_AX45MP_CORE0_RESETN 78 /* RZ/Five Only */ #define R9A07G043_IAX45_RESETN 79 /* RZ/Five Only */ +/* Power domain IDs. */ +#define R9A07G043_PD_ALWAYS_ON 0 +#define R9A07G043_PD_GIC 1 /* RZ/G2UL Only */ +#define R9A07G043_PD_IA55 2 /* RZ/G2UL Only */ +#define R9A07G043_PD_MHU 3 /* RZ/G2UL Only */ +#define R9A07G043_PD_CORESIGHT 4 /* RZ/G2UL Only */ +#define R9A07G043_PD_SYC 5 /* RZ/G2UL Only */ +#define R9A07G043_PD_DMAC 6 +#define R9A07G043_PD_GTM0 7 +#define R9A07G043_PD_GTM1 8 +#define R9A07G043_PD_GTM2 9 +#define R9A07G043_PD_MTU 10 +#define R9A07G043_PD_POE3 11 +#define R9A07G043_PD_WDT0 12 +#define R9A07G043_PD_SPI 13 +#define R9A07G043_PD_SDHI0 14 +#define R9A07G043_PD_SDHI1 15 +#define R9A07G043_PD_ISU 16 /* RZ/G2UL Only */ +#define R9A07G043_PD_CRU 17 /* RZ/G2UL Only */ +#define R9A07G043_PD_LCDC 18 /* RZ/G2UL Only */ +#define R9A07G043_PD_SSI0 19 +#define R9A07G043_PD_SSI1 20 +#define R9A07G043_PD_SSI2 21 +#define R9A07G043_PD_SSI3 22 +#define R9A07G043_PD_SRC 23 +#define R9A07G043_PD_USB0 24 +#define R9A07G043_PD_USB1 25 +#define R9A07G043_PD_USB_PHY 26 +#define R9A07G043_PD_ETHER0 27 +#define R9A07G043_PD_ETHER1 28 +#define R9A07G043_PD_I2C0 29 +#define R9A07G043_PD_I2C1 30 +#define R9A07G043_PD_I2C2 31 +#define R9A07G043_PD_I2C3 32 +#define R9A07G043_PD_SCIF0 33 +#define R9A07G043_PD_SCIF1 34 +#define R9A07G043_PD_SCIF2 35 +#define R9A07G043_PD_SCIF3 36 +#define R9A07G043_PD_SCIF4 37 +#define R9A07G043_PD_SCI0 38 +#define R9A07G043_PD_SCI1 39 +#define R9A07G043_PD_IRDA 40 +#define R9A07G043_PD_RSPI0 41 +#define R9A07G043_PD_RSPI1 42 +#define R9A07G043_PD_RSPI2 43 +#define R9A07G043_PD_CANFD 44 +#define R9A07G043_PD_ADC 45 +#define R9A07G043_PD_TSU 46 +#define R9A07G043_PD_PLIC 47 /* RZ/Five Only */ +#define R9A07G043_PD_IAX45 48 /* RZ/Five Only */ +#define R9A07G043_PD_NCEPLDM 49 /* RZ/Five Only */ +#define R9A07G043_PD_NCEPLMT 50 /* RZ/Five Only */ #endif /* __DT_BINDINGS_CLOCK_R9A07G043_CPG_H__ */ From patchwork Wed Apr 10 12:26:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624179 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 8448415CD42 for ; Wed, 10 Apr 2024 12:27:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752036; cv=none; b=dR//C32cxQg4pZcdpJCArpEXnpxE5GUxEio7mP0kLGujwsNnMRL/ntqGaWXYoyxMgA6A9ujahTO1s/7L3TPHE9f5+VqhoMJcQht5UCDjoxiBU+duF0270R0wPCIbnsJDrbIC3166nNrh6lsz4MVO4KP4FADNr3YPr6kUkeCi0/8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752036; c=relaxed/simple; bh=j5NkVwThTYOctnMRuOhsIyhDYIZOpNgQG2UaZ+Y5cEM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JW0LdSPH59in2vLX1uTwGHW7RsFZMDq10hVUsKEe1JL82yx9v0SMzNi6AVButJ4hRH3jTQyISWk8YA7UfP0uHjdkDMaLiKJdm3T+HODr4A3y5oozONAlpcUh/tG2KtM5FH4VYdNZ2fnGs5veeQYhHpm92s+0cKQEtocwcccOees= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Z+cKRR5x; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Z+cKRR5x" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-417c5cc6be0so572465e9.3 for ; Wed, 10 Apr 2024 05:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712752033; x=1713356833; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SHndeNmrhAYSgtndICjc+xdLbeIt1RU9dM0BrLcclVg=; b=Z+cKRR5x5FdJmagYDDg8UJuWPTZoyWp6Re3n/JPppetuotCnbmCpMkYo2cDbFn1rwQ 6yXhIwVGkE8XtLk6of7oRSj6vWBCmi2ls7dA4Gp7417/28cezJOHUBcs8GDCekVrLFmo B7TlLYBemLTNkpCxLOMYnufYuuGu9m6xdUcjoZxCtVV1Zbh6uzRvwS2JHkfI1tWzm50o auSo8kYjL+RSMWMXlu9SJeBTwY8cPAOx+PTEi462bOC8CVGtZNAyqyORmaNC1S1gNBEI Jz9gHdocSB/X91mTPg8j/jdgLay8PDrWGJnngq+N6gBxNgvsIarJg9p0cLVIosDYMUOS spfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712752033; x=1713356833; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SHndeNmrhAYSgtndICjc+xdLbeIt1RU9dM0BrLcclVg=; b=xI7umEvcDEb1MJmZkzEFy1SYax/zcKQcSVOfiokPSxEbfFEf+3IE/qcMG5Ok5W6ja/ sUPyMh2e052RxwVeWt/ON8g/uPG3y8VXLmeL9t4M7bQ61HtQmqnNRKH728BdF1MK26fT HU2OIWYZRIEQSOGJ5Hl1UAqsyesUXW35gJQUzktv1pXheJ5tUeLOvE6D9XFxiIMzsjeg HMmNWMy8Dqc+B+RmYEmnhoIsV7TXLMWWnO1rlo1v3jgUE4UcJaWBUtdihyKmUsvI0pub 1Db+xTuVqv1MHfIgqiNrprjFPqKY+fXQ6zN1lEfjko7flR474n2AtNByXMTAQ09aK+RD ptWw== X-Gm-Message-State: AOJu0Yxv3eb5QEROmHZBDXr/Ul89Oaj8L+USjXVB1y6MKr4S7hq6k0mw RshgHTmiUUq/jRFLmVUc7vfvQOl22Udf35yq/ogVaVDDN48mlfnMd0BhxkrWusY= X-Google-Smtp-Source: AGHT+IGXOBd33oqYWjMMGoLNAXTxZZ+JRVqjdww4qlZJX6f7d3dbGtXMBqHbp2ACuWM4VWRVrEHzDw== X-Received: by 2002:a05:600c:5012:b0:415:540e:760d with SMTP id n18-20020a05600c501200b00415540e760dmr1818730wmr.5.1712752032768; Wed, 10 Apr 2024 05:27:12 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id m2-20020a05600c3b0200b004171f151a5csm1679446wms.16.2024.04.10.05.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:27:12 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 2/9] dt-bindings: clock: r9a07g044-cpg: Add power domain IDs Date: Wed, 10 Apr 2024 15:26:50 +0300 Message-Id: <20240410122657.2051132-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea Add power domain IDs for RZ/G2L (R9A07G044) SoC. Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Claudiu Beznea --- Changes in v3: - collected tags Changes in v2: - collected tag include/dt-bindings/clock/r9a07g044-cpg.h | 58 +++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/include/dt-bindings/clock/r9a07g044-cpg.h b/include/dt-bindings/clock/r9a07g044-cpg.h index 0bb17ff1a01a..e209f96f92b7 100644 --- a/include/dt-bindings/clock/r9a07g044-cpg.h +++ b/include/dt-bindings/clock/r9a07g044-cpg.h @@ -217,4 +217,62 @@ #define R9A07G044_ADC_ADRST_N 82 #define R9A07G044_TSU_PRESETN 83 +/* Power domain IDs. */ +#define R9A07G044_PD_ALWAYS_ON 0 +#define R9A07G044_PD_GIC 1 +#define R9A07G044_PD_IA55 2 +#define R9A07G044_PD_MHU 3 +#define R9A07G044_PD_CORESIGHT 4 +#define R9A07G044_PD_SYC 5 +#define R9A07G044_PD_DMAC 6 +#define R9A07G044_PD_GTM0 7 +#define R9A07G044_PD_GTM1 8 +#define R9A07G044_PD_GTM2 9 +#define R9A07G044_PD_MTU 10 +#define R9A07G044_PD_POE3 11 +#define R9A07G044_PD_GPT 12 +#define R9A07G044_PD_POEGA 13 +#define R9A07G044_PD_POEGB 14 +#define R9A07G044_PD_POEGC 15 +#define R9A07G044_PD_POEGD 16 +#define R9A07G044_PD_WDT0 17 +#define R9A07G044_PD_WDT1 18 +#define R9A07G044_PD_SPI 19 +#define R9A07G044_PD_SDHI0 20 +#define R9A07G044_PD_SDHI1 21 +#define R9A07G044_PD_3DGE 22 +#define R9A07G044_PD_ISU 23 +#define R9A07G044_PD_VCPL4 24 +#define R9A07G044_PD_CRU 25 +#define R9A07G044_PD_MIPI_DSI 26 +#define R9A07G044_PD_LCDC 27 +#define R9A07G044_PD_SSI0 28 +#define R9A07G044_PD_SSI1 29 +#define R9A07G044_PD_SSI2 30 +#define R9A07G044_PD_SSI3 31 +#define R9A07G044_PD_SRC 32 +#define R9A07G044_PD_USB0 33 +#define R9A07G044_PD_USB1 34 +#define R9A07G044_PD_USB_PHY 35 +#define R9A07G044_PD_ETHER0 36 +#define R9A07G044_PD_ETHER1 37 +#define R9A07G044_PD_I2C0 38 +#define R9A07G044_PD_I2C1 39 +#define R9A07G044_PD_I2C2 40 +#define R9A07G044_PD_I2C3 41 +#define R9A07G044_PD_SCIF0 42 +#define R9A07G044_PD_SCIF1 43 +#define R9A07G044_PD_SCIF2 44 +#define R9A07G044_PD_SCIF3 45 +#define R9A07G044_PD_SCIF4 46 +#define R9A07G044_PD_SCI0 47 +#define R9A07G044_PD_SCI1 48 +#define R9A07G044_PD_IRDA 49 +#define R9A07G044_PD_RSPI0 50 +#define R9A07G044_PD_RSPI1 51 +#define R9A07G044_PD_RSPI2 52 +#define R9A07G044_PD_CANFD 53 +#define R9A07G044_PD_ADC 54 +#define R9A07G044_PD_TSU 55 + #endif /* __DT_BINDINGS_CLOCK_R9A07G044_CPG_H__ */ From patchwork Wed Apr 10 12:26:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624180 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 67A9E15B150 for ; Wed, 10 Apr 2024 12:27:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752038; cv=none; b=lwvQf1RtGhCXGPSZLZvspkJFlm5oKhiXJMfB7PdrACywWrmZjUpTpWfY8ViH+ZRHhWkjeI5DUYHKGCGz/kHhbxrmzDeMQtx0r7F/lQPWggzEz1Woe9sUevxliLVB6IwsO4WDjGZAg0bjb95pEDMa6GsUUssp7TivUYEDSbSmMBo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752038; c=relaxed/simple; bh=qwUuBzkqmFMkB1G/+OZHzUg/A5xX2xbrDS1cOPJmiKs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=O5h5Fil7s/SP6Zufqwt6NkjheCoYf5BoW6ehOqPFpu/JQoIvVc4BkFIXKECbnTjZF+yEO/4wC9O1iQpOMAgnVZ5m61tn5/YOdOR5aPz54IHR9mGd4mjlIgm9I6ny04QPMAaoq9jvykVcMQ8obCa8gesD7bITaviYeOa5Fm01Qtg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Uo9K46/Q; arc=none smtp.client-ip=209.85.167.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Uo9K46/Q" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-516cdb21b34so8603263e87.1 for ; Wed, 10 Apr 2024 05:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712752035; x=1713356835; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9CQk4ANjkf6oLJlEybK5vT/PONoV44QPRzZiNNLKPBg=; b=Uo9K46/QYI4NqetS3wnFs3wMejYzp3uulpUl4rO5aL+gXsdvL7mBd5VOAWiGk8MMl8 mg1MczAh4+eOdGoXelsVqWMiBN45LEc4PV7NKHjMCTHP5U1qi9cFzjWsgV7CXtJdjobc UypJtbzaH5nuOAlz1XTmnDlqK7msrMPX5GObZ5MjSpSuK+283h2Uw/mvXMaAFSbIhadb BR3TyZu82AZbiRWZygMln2ZaHzdlKRyppCfF7Z1WH/jGJN2afGGtgpKnYJXO3zmao66I B557GZ5y70v+84Pz0aphORL/iJhuxOqZyVjIL1M+9C4eQ/xZPsscrbcCkUXBX0CkErcK 2qAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712752035; x=1713356835; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9CQk4ANjkf6oLJlEybK5vT/PONoV44QPRzZiNNLKPBg=; b=lv71teAWG2m61vPhmw5qyKTTb7/cMgHolqLMkWuqlenO7ao8YZrFiPS2VlKANeqIZi ZcrBtVoBqh4vDGKHhYw0kx1zPk7hdPZRcPEYBWKimmqLk7sOUc/NknM1GLfnOxK77Qaa 9gwGObqvsZ19C3i2JtrHfcsO/ICftF8V7XA3TR22z3dCrr1Wx/qTWzV5g40H6rg+YGI8 UQFDkHdrDlNVZKD6xInoGfA5fwvJg0xqgPB/4RDm50AsanlDd16QmrAL3aSSIp8gT3ZC lYoKcPXq42oqD9vwFNVWctHCRx1sUG3VaNH/dVw+35LQYdIpJCSeIppcQ2vvyOqfK5jI kKng== X-Gm-Message-State: AOJu0YwEYa2XerkqxTHflrNmtjQAHQZtiWiGqK6upInxkBQbFkgZ/0Hb Al1Zl3VhMl89JKsav9VbC7ufffGm2w3H05tF+kuS1H2KuTGDQ42c1UGLRoDio8k= X-Google-Smtp-Source: AGHT+IFq4JZpnL7loI4m5HHRMYuldIhrZEXFuMk3nUIdnGcvfPA4mdWQ2OQo0yaitgoxb7bY7KpRPg== X-Received: by 2002:a05:651c:505:b0:2d8:3fbb:df69 with SMTP id o5-20020a05651c050500b002d83fbbdf69mr2097287ljp.11.1712752034539; Wed, 10 Apr 2024 05:27:14 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id m2-20020a05600c3b0200b004171f151a5csm1679446wms.16.2024.04.10.05.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:27:14 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 3/9] dt-bindings: clock: r9a07g054-cpg: Add power domain IDs Date: Wed, 10 Apr 2024 15:26:51 +0300 Message-Id: <20240410122657.2051132-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea Add power domain IDs for RZ/V2L (R9A07G054) SoC. Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Claudiu Beznea --- Changes in v3: - collected tags Changes in v2: - collected tag include/dt-bindings/clock/r9a07g054-cpg.h | 58 +++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/include/dt-bindings/clock/r9a07g054-cpg.h b/include/dt-bindings/clock/r9a07g054-cpg.h index 43f4dbda872c..2c99f89397c4 100644 --- a/include/dt-bindings/clock/r9a07g054-cpg.h +++ b/include/dt-bindings/clock/r9a07g054-cpg.h @@ -226,4 +226,62 @@ #define R9A07G054_TSU_PRESETN 83 #define R9A07G054_STPAI_ARESETN 84 +/* Power domain IDs. */ +#define R9A07G054_PD_ALWAYS_ON 0 +#define R9A07G054_PD_GIC 1 +#define R9A07G054_PD_IA55 2 +#define R9A07G054_PD_MHU 3 +#define R9A07G054_PD_CORESIGHT 4 +#define R9A07G054_PD_SYC 5 +#define R9A07G054_PD_DMAC 6 +#define R9A07G054_PD_GTM0 7 +#define R9A07G054_PD_GTM1 8 +#define R9A07G054_PD_GTM2 9 +#define R9A07G054_PD_MTU 10 +#define R9A07G054_PD_POE3 11 +#define R9A07G054_PD_GPT 12 +#define R9A07G054_PD_POEGA 13 +#define R9A07G054_PD_POEGB 14 +#define R9A07G054_PD_POEGC 15 +#define R9A07G054_PD_POEGD 16 +#define R9A07G054_PD_WDT0 17 +#define R9A07G054_PD_WDT1 18 +#define R9A07G054_PD_SPI 19 +#define R9A07G054_PD_SDHI0 20 +#define R9A07G054_PD_SDHI1 21 +#define R9A07G054_PD_3DGE 22 +#define R9A07G054_PD_ISU 23 +#define R9A07G054_PD_VCPL4 24 +#define R9A07G054_PD_CRU 25 +#define R9A07G054_PD_MIPI_DSI 26 +#define R9A07G054_PD_LCDC 27 +#define R9A07G054_PD_SSI0 28 +#define R9A07G054_PD_SSI1 29 +#define R9A07G054_PD_SSI2 30 +#define R9A07G054_PD_SSI3 31 +#define R9A07G054_PD_SRC 32 +#define R9A07G054_PD_USB0 33 +#define R9A07G054_PD_USB1 34 +#define R9A07G054_PD_USB_PHY 35 +#define R9A07G054_PD_ETHER0 36 +#define R9A07G054_PD_ETHER1 37 +#define R9A07G054_PD_I2C0 38 +#define R9A07G054_PD_I2C1 39 +#define R9A07G054_PD_I2C2 40 +#define R9A07G054_PD_I2C3 41 +#define R9A07G054_PD_SCIF0 42 +#define R9A07G054_PD_SCIF1 43 +#define R9A07G054_PD_SCIF2 44 +#define R9A07G054_PD_SCIF3 45 +#define R9A07G054_PD_SCIF4 46 +#define R9A07G054_PD_SCI0 47 +#define R9A07G054_PD_SCI1 48 +#define R9A07G054_PD_IRDA 49 +#define R9A07G054_PD_RSPI0 50 +#define R9A07G054_PD_RSPI1 51 +#define R9A07G054_PD_RSPI2 52 +#define R9A07G054_PD_CANFD 53 +#define R9A07G054_PD_ADC 54 +#define R9A07G054_PD_TSU 55 + #endif /* __DT_BINDINGS_CLOCK_R9A07G054_CPG_H__ */ From patchwork Wed Apr 10 12:26:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624181 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 C644315E81B for ; Wed, 10 Apr 2024 12:27:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752039; cv=none; b=vB7vg271DlDm8aEb5ad8P64IIwYgKukQpkGV/2DgamFT3d2KhulJJOzjkKNevyYWgv+9nim5Y08GzLwVrSsA2mv9cZyQV998X31gHfX+Tu4H4s9zfLh9HOdXuniVq5HHAF2i7mXjiHozOILcEM4ImHLwKonmLrcXAq7QIDbKuco= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752039; c=relaxed/simple; bh=/SapMZDbr7we3R/nDfhqB1tO55zkEkfLpHk1lnckIYc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PFEMi9fJnHgCxLpdf8vYkoWEbJWH9II8Xt3blJmfuJzE25+IuuheYCx+/vznLaDw+P9z4YP/7WgcwXvehbHT+43mwwAMTmHChHF8fdzVruzbxj8dCmzfzjn4wqHrcoIYmU+sCuPXMBrIT723ks4ce+3gIutCJnuxXilU8uOASck= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=bYNfsx1B; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="bYNfsx1B" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-417c5cc6be0so572825e9.3 for ; Wed, 10 Apr 2024 05:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712752036; x=1713356836; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U0RYIWJlebFDDwbIFrq3BSXmJNpUIeTjSZ+W2cRCXOM=; b=bYNfsx1BXcUrr8rkhb/+naFzoQNaZtTaVp9WCgttgNYaK1VRfkotX3gFt5TUz55ci0 cphuwdm+qW5sku4KAXUkmjEuO3DBSh1lEcockinXnYXwmzTM0WDWHeJ38VpYHhfmAk4P oSyrLu8WBztuDWg6ssuIUCJn4r31pzKJXjjC8zirUcvEo0kRAg0aeDS8japlCXheLULJ aerOsxBvBfHVfHYQ2BqSFmKVbn6m0wsEGbXZnPWi4TgLWhe82erXkCSnFNiFEMSJjVxB gZMfssgbVI4glVTWV3b8hVxGxyIU/Q98DJ5uLMMYsWw9xQNEkaXzd2jLE76lVln+QsDQ S4bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712752036; x=1713356836; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U0RYIWJlebFDDwbIFrq3BSXmJNpUIeTjSZ+W2cRCXOM=; b=eeVXEpO6SMr2+aJZQf1uUAsbgdijZpW3pv7tSsP9S80of4Tnn7xwJKYWQegeJFEhfb tns+56sqA6PGwy14u1splI8aVwmUyKu/NfOsL/Ei4EIYS8r83ZsCLOv2QygC++/hz+9m VXZPQQxMeTQjJOgM83VVkEs5S4XZR9blQdXpNuXwCHqygWh9GTQ+w36UP2260n4xiSk7 RW2NxHClWf7SwEkmk93d17vWHU+aHHSoRE5+86mWk1kWt4UcjThvxX+qsepVxmbF/fBc YsQjV2mmlY9XY35ys40ugO8vEAEBv88i0XYU75dVnRrxFpHDVbYbXEb7bM0V4MTYqSmc Dh9A== X-Gm-Message-State: AOJu0YyXBRLBbbn1KiVYyGHc5R0loj+3p0YzaLCaDUMCYS6QLydePNR7 TOeUlGRgmJ1RCZNySOOajoXy3e69MVlepsVIQzMAfpbOc2UzGuZFb503F+6QY5k= X-Google-Smtp-Source: AGHT+IHT2XZLgfUdbRTbKBeKWXnT/P22mEfSl1llZs6etbBbJQXiOcc7SepbiJe7Ofcyxfio1Su+7w== X-Received: by 2002:a05:600c:4586:b0:416:731e:4a6b with SMTP id r6-20020a05600c458600b00416731e4a6bmr2162471wmo.29.1712752036171; Wed, 10 Apr 2024 05:27:16 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id m2-20020a05600c3b0200b004171f151a5csm1679446wms.16.2024.04.10.05.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:27:15 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 4/9] dt-bindings: clock: r9a08g045-cpg: Add power domain IDs Date: Wed, 10 Apr 2024 15:26:52 +0300 Message-Id: <20240410122657.2051132-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea Add power domain IDs for RZ/G3S (R9A08G045) SoC. Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Claudiu Beznea --- Changes in v3: - collected tags Changes in v2: - collected tag include/dt-bindings/clock/r9a08g045-cpg.h | 70 +++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/include/dt-bindings/clock/r9a08g045-cpg.h b/include/dt-bindings/clock/r9a08g045-cpg.h index 410725b778a8..8281e9caf3a9 100644 --- a/include/dt-bindings/clock/r9a08g045-cpg.h +++ b/include/dt-bindings/clock/r9a08g045-cpg.h @@ -239,4 +239,74 @@ #define R9A08G045_I3C_PRESETN 92 #define R9A08G045_VBAT_BRESETN 93 +/* Power domain IDs. */ +#define R9A08G045_PD_ALWAYS_ON 0 +#define R9A08G045_PD_GIC 1 +#define R9A08G045_PD_IA55 2 +#define R9A08G045_PD_MHU 3 +#define R9A08G045_PD_CORESIGHT 4 +#define R9A08G045_PD_SYC 5 +#define R9A08G045_PD_DMAC 6 +#define R9A08G045_PD_GTM0 7 +#define R9A08G045_PD_GTM1 8 +#define R9A08G045_PD_GTM2 9 +#define R9A08G045_PD_GTM3 10 +#define R9A08G045_PD_GTM4 11 +#define R9A08G045_PD_GTM5 12 +#define R9A08G045_PD_GTM6 13 +#define R9A08G045_PD_GTM7 14 +#define R9A08G045_PD_MTU 15 +#define R9A08G045_PD_POE3 16 +#define R9A08G045_PD_GPT 17 +#define R9A08G045_PD_POEGA 18 +#define R9A08G045_PD_POEGB 19 +#define R9A08G045_PD_POEGC 20 +#define R9A08G045_PD_POEGD 21 +#define R9A08G045_PD_WDT0 22 +#define R9A08G045_PD_XSPI 23 +#define R9A08G045_PD_SDHI0 24 +#define R9A08G045_PD_SDHI1 25 +#define R9A08G045_PD_SDHI2 26 +#define R9A08G045_PD_SSI0 27 +#define R9A08G045_PD_SSI1 28 +#define R9A08G045_PD_SSI2 29 +#define R9A08G045_PD_SSI3 30 +#define R9A08G045_PD_SRC 31 +#define R9A08G045_PD_USB0 32 +#define R9A08G045_PD_USB1 33 +#define R9A08G045_PD_USB_PHY 34 +#define R9A08G045_PD_ETHER0 35 +#define R9A08G045_PD_ETHER1 36 +#define R9A08G045_PD_I2C0 37 +#define R9A08G045_PD_I2C1 38 +#define R9A08G045_PD_I2C2 39 +#define R9A08G045_PD_I2C3 40 +#define R9A08G045_PD_SCIF0 41 +#define R9A08G045_PD_SCIF1 42 +#define R9A08G045_PD_SCIF2 43 +#define R9A08G045_PD_SCIF3 44 +#define R9A08G045_PD_SCIF4 45 +#define R9A08G045_PD_SCIF5 46 +#define R9A08G045_PD_SCI0 47 +#define R9A08G045_PD_SCI1 48 +#define R9A08G045_PD_IRDA 49 +#define R9A08G045_PD_RSPI0 50 +#define R9A08G045_PD_RSPI1 51 +#define R9A08G045_PD_RSPI2 52 +#define R9A08G045_PD_RSPI3 53 +#define R9A08G045_PD_RSPI4 54 +#define R9A08G045_PD_CANFD 55 +#define R9A08G045_PD_ADC 56 +#define R9A08G045_PD_TSU 57 +#define R9A08G045_PD_OCTA 58 +#define R9A08G045_PD_PDM 59 +#define R9A08G045_PD_PCI 60 +#define R9A08G045_PD_SPDIF 61 +#define R9A08G045_PD_I3C 62 +#define R9A08G045_PD_VBAT 63 + +#define R9A08G045_PD_DDR 64 +#define R9A08G045_PD_TZCDDR 65 +#define R9A08G045_PD_OTFDE_DDR 66 + #endif /* __DT_BINDINGS_CLOCK_R9A08G045_CPG_H__ */ From patchwork Wed Apr 10 12:26:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624182 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 4D1AA15E213 for ; Wed, 10 Apr 2024 12:27:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752041; cv=none; b=oatH9q6nYXq/sjeQ3DtWGlZLWG/FUP4ljEEvP0TkellXAfAprcKlQa6NvqtjGd8BZdWmS2skKuHSFW3QBTsVLGXVTeOUAH1SQu6HgOnVSM5LSJEnG29pFTMbBpzNDEGG+QBspGlUL0omoFYapUUK8B00s9NjZ7RYbLrgNl120ZA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752041; c=relaxed/simple; bh=2Dn9zwoluUm9lOlv4owEz3lfChsm2AnVOIaAhDO5O5A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cj0WMo62yPO8riiWkRI7XI+EYvKDY+7QwpP3qDcuoAkKPlnYt7tRB7Vl43fnYQg5RCP8WK90zuTRHTfYWX4E8LPkOsS/sV3NvDyWI3Uq+0FraE13iKQ6Fi5cW+R1yK2ycEjmKo/AJMlbi8DWOkLpuYLvUgNJv/scb1jRFmv7m/s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=hjI6RZ4V; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="hjI6RZ4V" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-415515178ceso43260885e9.0 for ; Wed, 10 Apr 2024 05:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712752038; x=1713356838; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lzM8sQ3uQ3tHjk4LJ4TPWYY/Gu5/y3nmRsoLKfwtupQ=; b=hjI6RZ4VwVtAd3D7YuqJ9oBycxE88ajzGlNkXpwdJ68FnWuQAOYXrwfPpfVxHZnjNE lXeFVR+TdjOFF03j+9ov47z3rzg2Kz1A/RUYcc7F7buBfPf5QAF8zxjMUhck09uDWcGl 2SSFOkh/ad7LOHcPbpq1TgGWyr6HApGYKcm3gTd9oUIqSzFfend5F3zrstkWlzxMC+UL f4rHzw5ugyydnERUYeto2/85dHts2U8DWMlbhT9c434Pfw+q+L8vpDqD/0TefH8IDv9q efxDxFuA786ySICbjPtkjlIxqA0BEqiJA4XsSyFI+VXQhYGExI8pk5HLy7Y97kesQNRB zmfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712752038; x=1713356838; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lzM8sQ3uQ3tHjk4LJ4TPWYY/Gu5/y3nmRsoLKfwtupQ=; b=OwXI1gP8TIWH9RR6a8b41mk9O9elYmJ7AHQx76CdVZzkDJjw8Sdkc5+2vzfbaqymCs pmSRuwJrrS6ZopacGSvEc4fCPFctdmpbm5yklePqHWxhs7EYwYFEDTrHDLiShEvGuP+D wyEVQtdyNHKu2C63cCbCjifXmu+vd7e7C0156BPfl3pSAYfm8Eos+MltclsjR2ZSS7nc lF5X/D5UYDyWAXC1X17o0nEUd+YgTY8Kfx0ps0p06QRBBHMDEQL6bLEQqS8AngCbsw43 SkIXrfIvYqDuqunt4Sg/rC70vqizLOb8RqNUMf3g8l2ETYy9AeuREJa2RdcpJ5bvmgK0 LUNA== X-Gm-Message-State: AOJu0Ywjq+NJKE792aPPZk2QtdX7sG3vPZOmY3rygv/OAjv1FwOg5N9J BqFgqMX++oTUz6Gg942q8MXagsAAz7NjVKAEeVIzjpmZrcz0pv0VUkGr5qSnb3Qf6zPAVeVNYPW l X-Google-Smtp-Source: AGHT+IFRk5kC3MaMRtaKkbQqvr24Q262P3CbvQNlYZMqaD37NiQ9554hIb+fg3ZHw3VG+HvK3hTdJQ== X-Received: by 2002:a05:600c:1c8d:b0:414:8e7:cd60 with SMTP id k13-20020a05600c1c8d00b0041408e7cd60mr1592969wms.8.1712752037726; Wed, 10 Apr 2024 05:27:17 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id m2-20020a05600c3b0200b004171f151a5csm1679446wms.16.2024.04.10.05.27.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:27:17 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 5/9] dt-bindings: clock: renesas,rzg2l-cpg: Update #power-domain-cells = <1> for RZ/G3S Date: Wed, 10 Apr 2024 15:26:53 +0300 Message-Id: <20240410122657.2051132-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea The driver will be modified (in the next commits) to be able to specify individual power domain ID for each IP. The driver will still support #power-domain-cells = <0>, thus, previous users are not affected. The #power-domain-cells = <1> has been instantiated only for RZ/G3S at the moment as individual platform clock drivers need to be adapted for this to be supported on the rest of the SoCs. Also, the description for #power-domain-cells was updated with the links to per-SoC power domain IDs. Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Claudiu Beznea --- Changes in v3: - collected tags Changes in v2: - updated patch title and description - kept both 0 and 1 for #power-domain-cells as not all the drivers, device trees are adpated with this series - added a reference to dt-bindings/clock/r9a0*-cpg.h for power domain specifiers - dropped the changes from examples section .../bindings/clock/renesas,rzg2l-cpg.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/clock/renesas,rzg2l-cpg.yaml b/Documentation/devicetree/bindings/clock/renesas,rzg2l-cpg.yaml index 80a8c7114c31..4e3b0c45124a 100644 --- a/Documentation/devicetree/bindings/clock/renesas,rzg2l-cpg.yaml +++ b/Documentation/devicetree/bindings/clock/renesas,rzg2l-cpg.yaml @@ -57,7 +57,8 @@ properties: can be power-managed through Module Standby should refer to the CPG device node in their "power-domains" property, as documented by the generic PM Domain bindings in Documentation/devicetree/bindings/power/power-domain.yaml. - const: 0 + The power domain specifiers defined in could + be used to reference individual CPG power domains. '#reset-cells': description: @@ -76,6 +77,21 @@ required: additionalProperties: false +allOf: + - if: + properties: + compatible: + contains: + const: renesas,r9a08g045-cpg + then: + properties: + '#power-domain-cells': + const: 1 + else: + properties: + '#power-domain-cells': + const: 0 + examples: - | cpg: clock-controller@11010000 { From patchwork Wed Apr 10 12:26:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624183 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 4F71215E213 for ; Wed, 10 Apr 2024 12:27:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752043; cv=none; b=s6u/8cStpeYPR27+28n01LS1txmAGv/YaO0mLxaqchcSrG8qBj/vPUxyooF/WaasoKJmYFvZXJcineOvE+eEKwAHZhn8ylhC/7YyepUg7dqjnv/jfZwrBVF+TX0ripPq3DNVHZuJaOgM6ma+PEkcx1x6G5LOAlccmB+w3MavchI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752043; c=relaxed/simple; bh=IB1o3fON1K02vUTq5IibHV4JOuWv79CiAflSFeLnTtE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aTMtC9J7pgOciDkWmP0NeFD/XzK9AKxVjNvYc1UBzYP38DnPy/1SN3skAlmVOSWFLkUksI9oM7OAALVw+3fFdwr62QGaO05OtfVukQ9cXRxEy7aQJoMGymlg1elsDKsJVNeVvz7mXUyl6q9aOAPTn4z2yn3TTtXuYV6FpLmBhc4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=nwA5Yfob; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="nwA5Yfob" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-417c339d261so1066265e9.1 for ; Wed, 10 Apr 2024 05:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712752040; x=1713356840; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ns+ZjogkEZpUutNaBoyIwFEijav4Qx8Hsh2EXP8Fnlw=; b=nwA5YfobLpDmQnpJboZtnbxGLdYnCq/Cb+zjNZgyljWgvIeIvGuk2WPo0Rq64IcTSV INS0wmhYFls8sK24Xe97g3oP9EQbB8/TsY0W90Xk8a/Zp0QHdCXlgHjlRAEyBdmJBuIY lKYY1EC70F+3og4RSJpxKF8hN3oJs5QTKXAvEVtQQyaFBk1WJAp87zP0MVLrk3XXnmUE B+OPhMEMDnGIzMy5bIJ3eAZc+tKmDnFy4N08IIXNdoLkthilT5XRhrjSz095mhqXdbbI 78jB+iexsRTcNVrQ4xJ78ZjvCVpvJ6Nntltn2FU3yZbVRRt5UH+//q4qLJf47i27/h3j 1hwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712752040; x=1713356840; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ns+ZjogkEZpUutNaBoyIwFEijav4Qx8Hsh2EXP8Fnlw=; b=YZD3/5PkB/71F1UE/O+M+eG3GdXtTOZMueEU5aaUPLrVgNjCSTU+M4SFdYS1Ef+FI9 qoA3Q+f0sNMpCWlhe/luwy/562GxJSIQfGaV95ZfiEpa/71p6Q0SWrnHDicgAW0E6xZ3 rL1zQVEq0JK0Ld7uLNtYVfqIrNU7RDXesXhLvH17HvIXHYK7dq+0N0qW40y0/rNULqir HxxlMJa0PV/2N/j5kpB0jQDBbgXuDvu00xdmGsF7a8P0YaKTxDtvqpN2yf4FZc4TtR5r s4YrJdw8UMf7BdEkXNssh3EV5j8s+pNWUKBxMCkbeoZMdpMRKbM1E+FBgLJHrAqF3gML eZZQ== X-Gm-Message-State: AOJu0Yx/i6R3eUaGosq/ZQDmFrTSYazRRmQ6Y61NaX6oIRcDwZcDHeI+ AonDBIP5PeP7p2ptmzcRIIlzVOFEtpajra4c0VkjMrFw4peJnnaqM0HBU0TN7jE= X-Google-Smtp-Source: AGHT+IHdm77qTW6/+DTrdMfmPX0x5JYMgjgun+vlW47qZTB38x7FJdlSrNxJT250JJ4Qz4HqhHToNQ== X-Received: by 2002:a05:600c:3151:b0:416:f7d8:d87c with SMTP id h17-20020a05600c315100b00416f7d8d87cmr1092838wmo.41.1712752039750; Wed, 10 Apr 2024 05:27:19 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id m2-20020a05600c3b0200b004171f151a5csm1679446wms.16.2024.04.10.05.27.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:27:19 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 6/9] clk: renesas: rzg2l: Extend power domain support Date: Wed, 10 Apr 2024 15:26:54 +0300 Message-Id: <20240410122657.2051132-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea RZ/{G2L, V2L, G3S}-based CPG versions have support for saving extra power when clocks are disabled by activating module standby. This is done through MSTOP-specific registers that are part of CPG. Each individual module has one or more bits associated with one MSTOP register (see table "Registers for Module Standby Mode" from HW manuals). Hardware manual associates modules' clocks with one or more MSTOP bits. There are 3 mappings available (identified by researching RZ/G2L, RZ/G3S, RZ/V2L HW manuals): case 1: N clocks mapped to N MSTOP bits (with N={0, ..., X}) case 2: N clocks mapped to 1 MSTOP bit (with N={0, ..., X}) case 3: N clocks mapped to M MSTOP bits (with N={0, ..., X}, M={0, ..., Y}) Case 3 has been currently identified on RZ/V2L for the VCPL4 module. To cover all three cases, the individual platform drivers will provide to clock driver MSTOP register offset and associated bits in this register as a bitmask and the clock driver will apply this bitmask to proper MSTOP register. Apart from MSTOP support, RZ/G3S can save more power by powering down the individual IPs (after MSTOP has been set) if proper bits in CPG_PWRDN_IP{1,2} registers are set. The MSTOP and IP power down support were implemented through power domains. Platform-specific clock drivers will register an array of type struct rzg2l_cpg_pm_domain_init_data, which will be used to instantiate properly the power domains. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea Reviewed-by: Ulf Hansson --- Changes in v3: - collected tags Changes in v2: - called pm_genpd_init() with proper value for is_off argument - fixed typos - used flexible array for struct rzg2l_cpg_pm_domains::domains member - moved genpd member of struct rzg2l_cpg_pd at the beginning of struct - didn't initialize the parent variable in rzg2l_cpg_add_pm_domains() as it is already initialized in the for block from rzg2l_cpg_add_pm_domains() and that initialization should be enough - dropped RZG2L_PD_F_PARENT flag - used datasheet naming for all MSTOP registers - added all MSTOP registers to rzg2l-cpg.h - reworked the code that initializes the register offset and bits for domains - dropped MSTOP*(), PWRDN*() macros and introduced struct rzg2l_cpg_reg_conf and DEF_REG_CONF() for domain description - constified the 1st argument of rzg2l_cpg_pm_domain_xlate() - used dev instead of priv->dev where possible - dropped RZG2L_PD_F_PARENT - added RZG2L_PD_F_NONE for better description of domains in platform specific clock drivers drivers/clk/renesas/rzg2l-cpg.c | 213 +++++++++++++++++++++++++++++--- drivers/clk/renesas/rzg2l-cpg.h | 77 ++++++++++++ 2 files changed, 276 insertions(+), 14 deletions(-) diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c index 3d2daa4ba2a4..b36700f4a9f5 100644 --- a/drivers/clk/renesas/rzg2l-cpg.c +++ b/drivers/clk/renesas/rzg2l-cpg.c @@ -139,7 +139,6 @@ struct rzg2l_pll5_mux_dsi_div_param { * @num_resets: Number of Module Resets in info->resets[] * @last_dt_core_clk: ID of the last Core Clock exported to DT * @info: Pointer to platform data - * @genpd: PM domain * @mux_dsi_div_params: pll5 mux and dsi div parameters */ struct rzg2l_cpg_priv { @@ -156,8 +155,6 @@ struct rzg2l_cpg_priv { const struct rzg2l_cpg_info *info; - struct generic_pm_domain genpd; - struct rzg2l_pll5_mux_dsi_div_param mux_dsi_div_params; }; @@ -1559,9 +1556,34 @@ static bool rzg2l_cpg_is_pm_clk(struct rzg2l_cpg_priv *priv, return true; } +/** + * struct rzg2l_cpg_pm_domains - RZ/G2L PM domains data structure + * @onecell_data: cell data + * @domains: generic PM domains + */ +struct rzg2l_cpg_pm_domains { + struct genpd_onecell_data onecell_data; + struct generic_pm_domain *domains[]; +}; + +/** + * struct rzg2l_cpg_pd - RZ/G2L power domain data structure + * @genpd: generic PM domain + * @priv: pointer to CPG private data structure + * @conf: CPG PM domain configuration info + * @id: RZ/G2L power domain ID + */ +struct rzg2l_cpg_pd { + struct generic_pm_domain genpd; + struct rzg2l_cpg_priv *priv; + struct rzg2l_cpg_pm_domain_conf conf; + u16 id; +}; + static int rzg2l_cpg_attach_dev(struct generic_pm_domain *domain, struct device *dev) { - struct rzg2l_cpg_priv *priv = container_of(domain, struct rzg2l_cpg_priv, genpd); + struct rzg2l_cpg_pd *pd = container_of(domain, struct rzg2l_cpg_pd, genpd); + struct rzg2l_cpg_priv *priv = pd->priv; struct device_node *np = dev->of_node; struct of_phandle_args clkspec; bool once = true; @@ -1617,31 +1639,194 @@ static void rzg2l_cpg_detach_dev(struct generic_pm_domain *unused, struct device } static void rzg2l_cpg_genpd_remove(void *data) +{ + struct genpd_onecell_data *celldata = data; + + for (unsigned int i = 0; i < celldata->num_domains; i++) + pm_genpd_remove(celldata->domains[i]); +} + +static void rzg2l_cpg_genpd_remove_simple(void *data) { pm_genpd_remove(data); } +static int rzg2l_cpg_power_on(struct generic_pm_domain *domain) +{ + struct rzg2l_cpg_pd *pd = container_of(domain, struct rzg2l_cpg_pd, genpd); + struct rzg2l_cpg_reg_conf mstop = pd->conf.mstop; + struct rzg2l_cpg_reg_conf pwrdn = pd->conf.pwrdn; + struct rzg2l_cpg_priv *priv = pd->priv; + + /* Set PWRDN. */ + if (pwrdn.mask) + writel(pwrdn.mask << 16, priv->base + pwrdn.off); + + /* Set MSTOP. */ + if (mstop.mask) + writel(mstop.mask << 16, priv->base + mstop.off); + + return 0; +} + +static int rzg2l_cpg_power_off(struct generic_pm_domain *domain) +{ + struct rzg2l_cpg_pd *pd = container_of(domain, struct rzg2l_cpg_pd, genpd); + struct rzg2l_cpg_reg_conf mstop = pd->conf.mstop; + struct rzg2l_cpg_reg_conf pwrdn = pd->conf.pwrdn; + struct rzg2l_cpg_priv *priv = pd->priv; + + /* Set MSTOP. */ + if (mstop.mask) + writel(mstop.mask | (mstop.mask << 16), priv->base + mstop.off); + + /* Set PWRDN. */ + if (pwrdn.mask) + writel(pwrdn.mask | (pwrdn.mask << 16), priv->base + pwrdn.off); + + return 0; +} + +static int __init rzg2l_cpg_pd_setup(struct rzg2l_cpg_pd *pd, bool always_on) +{ + struct dev_power_governor *governor; + + pd->genpd.flags |= GENPD_FLAG_PM_CLK | GENPD_FLAG_ACTIVE_WAKEUP; + pd->genpd.attach_dev = rzg2l_cpg_attach_dev; + pd->genpd.detach_dev = rzg2l_cpg_detach_dev; + if (always_on) { + pd->genpd.flags |= GENPD_FLAG_ALWAYS_ON; + governor = &pm_domain_always_on_gov; + } else { + pd->genpd.power_on = rzg2l_cpg_power_on; + pd->genpd.power_off = rzg2l_cpg_power_off; + governor = &simple_qos_governor; + } + + return pm_genpd_init(&pd->genpd, governor, !always_on); +} + static int __init rzg2l_cpg_add_clk_domain(struct rzg2l_cpg_priv *priv) { struct device *dev = priv->dev; struct device_node *np = dev->of_node; - struct generic_pm_domain *genpd = &priv->genpd; + struct rzg2l_cpg_pd *pd; int ret; - genpd->name = np->name; - genpd->flags = GENPD_FLAG_PM_CLK | GENPD_FLAG_ALWAYS_ON | - GENPD_FLAG_ACTIVE_WAKEUP; - genpd->attach_dev = rzg2l_cpg_attach_dev; - genpd->detach_dev = rzg2l_cpg_detach_dev; - ret = pm_genpd_init(genpd, &pm_domain_always_on_gov, false); + pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); + if (!pd) + return -ENOMEM; + + pd->genpd.name = np->name; + pd->priv = priv; + ret = rzg2l_cpg_pd_setup(pd, true); if (ret) return ret; - ret = devm_add_action_or_reset(dev, rzg2l_cpg_genpd_remove, genpd); + ret = devm_add_action_or_reset(dev, rzg2l_cpg_genpd_remove_simple, &pd->genpd); if (ret) return ret; - return of_genpd_add_provider_simple(np, genpd); + return of_genpd_add_provider_simple(np, &pd->genpd); +} + +static struct generic_pm_domain * +rzg2l_cpg_pm_domain_xlate(const struct of_phandle_args *spec, void *data) +{ + struct generic_pm_domain *domain = ERR_PTR(-ENOENT); + struct genpd_onecell_data *genpd = data; + + if (spec->args_count != 1) + return ERR_PTR(-EINVAL); + + for (unsigned int i = 0; i < genpd->num_domains; i++) { + struct rzg2l_cpg_pd *pd = container_of(genpd->domains[i], struct rzg2l_cpg_pd, + genpd); + + if (pd->id == spec->args[0]) { + domain = &pd->genpd; + break; + } + } + + return domain; +} + +static int __init rzg2l_cpg_add_pm_domains(struct rzg2l_cpg_priv *priv) +{ + const struct rzg2l_cpg_info *info = priv->info; + struct device *dev = priv->dev; + struct device_node *np = dev->of_node; + struct rzg2l_cpg_pm_domains *domains; + struct generic_pm_domain *parent; + u32 ncells; + int ret; + + ret = of_property_read_u32(np, "#power-domain-cells", &ncells); + if (ret) + return ret; + + /* For backward compatibility. */ + if (!ncells) + return rzg2l_cpg_add_clk_domain(priv); + + domains = devm_kzalloc(dev, struct_size(domains, domains, info->num_pm_domains), + GFP_KERNEL); + if (!domains) + return -ENOMEM; + + domains->onecell_data.domains = domains->domains; + domains->onecell_data.num_domains = info->num_pm_domains; + domains->onecell_data.xlate = rzg2l_cpg_pm_domain_xlate; + + ret = devm_add_action_or_reset(dev, rzg2l_cpg_genpd_remove, &domains->onecell_data); + if (ret) + return ret; + + for (unsigned int i = 0; i < info->num_pm_domains; i++) { + bool always_on = !!(info->pm_domains[i].flags & RZG2L_PD_F_ALWAYS_ON); + struct rzg2l_cpg_pd *pd; + + pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); + if (!pd) + return -ENOMEM; + + pd->genpd.name = info->pm_domains[i].name; + pd->conf = info->pm_domains[i].conf; + pd->id = info->pm_domains[i].id; + pd->priv = priv; + + ret = rzg2l_cpg_pd_setup(pd, always_on); + if (ret) + return ret; + + if (always_on) { + ret = rzg2l_cpg_power_on(&pd->genpd); + if (ret) + return ret; + } + + domains->domains[i] = &pd->genpd; + /* Parent should be on the very first entry of info->pm_domains[]. */ + if (!i) { + parent = &pd->genpd; + continue; + } + + ret = pm_genpd_add_subdomain(parent, &pd->genpd); + if (ret) + return ret; + } + + ret = of_genpd_add_provider_onecell(np, &domains->onecell_data); + if (ret) + return ret; + + /* Prepare for power down the BUSes in power down mode. */ + if (info->pm_domain_pwrdn_mstop) + writel(CPG_PWRDN_MSTOP_ENABLE, priv->base + CPG_PWRDN_MSTOP); + + return 0; } static int __init rzg2l_cpg_probe(struct platform_device *pdev) @@ -1697,7 +1882,7 @@ static int __init rzg2l_cpg_probe(struct platform_device *pdev) if (error) return error; - error = rzg2l_cpg_add_clk_domain(priv); + error = rzg2l_cpg_add_pm_domains(priv); if (error) return error; diff --git a/drivers/clk/renesas/rzg2l-cpg.h b/drivers/clk/renesas/rzg2l-cpg.h index 6e38c8fc888c..d9a7357c4873 100644 --- a/drivers/clk/renesas/rzg2l-cpg.h +++ b/drivers/clk/renesas/rzg2l-cpg.h @@ -27,6 +27,21 @@ #define CPG_PL6_ETH_SSEL (0x418) #define CPG_PL5_SDIV (0x420) #define CPG_RST_MON (0x680) +#define CPG_BUS_ACPU_MSTOP (0xB60) +#define CPG_BUS_MCPU1_MSTOP (0xB64) +#define CPG_BUS_MCPU2_MSTOP (0xB68) +#define CPG_BUS_PERI_COM_MSTOP (0xB6C) +#define CPG_BUS_PERI_CPU_MSTOP (0xB70) +#define CPG_BUS_PERI_DDR_MSTOP (0xB74) +#define CPG_BUS_REG0_MSTOP (0xB7C) +#define CPG_BUS_REG1_MSTOP (0xB80) +#define CPG_BUS_TZCDDR_MSTOP (0xB84) +#define CPG_MHU_MSTOP (0xB88) +#define CPG_BUS_MCPU3_MSTOP (0xB90) +#define CPG_BUS_PERI_CPU2_MSTOP (0xB94) +#define CPG_PWRDN_IP1 (0xBB0) +#define CPG_PWRDN_IP2 (0xBB4) +#define CPG_PWRDN_MSTOP (0xBC0) #define CPG_OTHERFUNC1_REG (0xBE8) #define CPG_SIPLL5_STBY_RESETB BIT(0) @@ -70,6 +85,8 @@ #define EXTAL_FREQ_IN_MEGA_HZ (24) +#define CPG_PWRDN_MSTOP_ENABLE (BIT(16) | BIT(0)) + /** * Definitions of CPG Core Clocks * @@ -234,6 +251,58 @@ struct rzg2l_reset { #define DEF_RST(_id, _off, _bit) \ DEF_RST_MON(_id, _off, _bit, -1) +/** + * struct rzg2l_cpg_reg_conf - RZ/G2L register configuration data structure + * @off: register offset + * @mask: register mask + */ +struct rzg2l_cpg_reg_conf { + u16 off; + u16 mask; +}; + +#define DEF_REG_CONF(_off, _mask) ((struct rzg2l_cpg_reg_conf) { .off = (_off), .mask = (_mask) }) + +/** + * struct rzg2l_cpg_pm_domain_conf - PM domain configuration data structure + * @mstop: MSTOP register configuration + * @pwrdn: PWRDN register configuration + */ +struct rzg2l_cpg_pm_domain_conf { + struct rzg2l_cpg_reg_conf mstop; + struct rzg2l_cpg_reg_conf pwrdn; +}; + +/** + * struct rzg2l_cpg_pm_domain_init_data - PM domain init data + * @name: PM domain name + * @conf: PM domain configuration + * @flags: RZG2L PM domain flags (see RZG2L_PD_F_*) + * @id: PM domain ID (similar to the ones defined in + * include/dt-bindings/clock/-cpg.h) + */ +struct rzg2l_cpg_pm_domain_init_data { + const char * const name; + struct rzg2l_cpg_pm_domain_conf conf; + u32 flags; + u16 id; +}; + +#define DEF_PD(_name, _id, _mstop_conf, _pwrdn_conf, _flags) \ + { \ + .name = (_name), \ + .id = (_id), \ + .conf = { \ + .mstop = (_mstop_conf), \ + .pwrdn = (_pwrdn_conf), \ + }, \ + .flags = (_flags), \ + } + +/* Power domain flags. */ +#define RZG2L_PD_F_ALWAYS_ON BIT(0) +#define RZG2L_PD_F_NONE (0) + /** * struct rzg2l_cpg_info - SoC-specific CPG Description * @@ -252,6 +321,9 @@ struct rzg2l_reset { * @crit_mod_clks: Array with Module Clock IDs of critical clocks that * should not be disabled without a knowledgeable driver * @num_crit_mod_clks: Number of entries in crit_mod_clks[] + * @pm_domains: PM domains init data array + * @num_pm_domains: Number of PM domains + * @pm_domain_pwrdn_mstop: Specifies if PWRDN MSTOP is supported * @has_clk_mon_regs: Flag indicating whether the SoC has CLK_MON registers */ struct rzg2l_cpg_info { @@ -278,6 +350,11 @@ struct rzg2l_cpg_info { const unsigned int *crit_mod_clks; unsigned int num_crit_mod_clks; + /* Power domain. */ + const struct rzg2l_cpg_pm_domain_init_data *pm_domains; + unsigned int num_pm_domains; + bool pm_domain_pwrdn_mstop; + bool has_clk_mon_regs; }; From patchwork Wed Apr 10 12:26:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624201 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 F3D9E15EFCF for ; Wed, 10 Apr 2024 12:27:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752044; cv=none; b=VtylXUUyRF2UULfWDakDppCoxwemzJ4GcD0Yj570/xjFx5MRb4uh2Xz0gIjIV+/bMaKjCMfkKp0tfLp9UTleS5VeYXuQoSHF3K5+OXFN6JYTMKKQ2tfJJAzTQY/kggttaZnBerO4VRbenE+vAlOz29oZMxocezf8KkNfOhAWlOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752044; c=relaxed/simple; bh=6KPSD3CV6Jniy65UJWan4EwWxElAtg5Emo94UsSLQdo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LABVb4b3sgvqOtYfRsPiYWf4fNsGJCLDsacrspPoGxjmUSTdAyLOQWje10+f1g4do1XeHoRPBvQLxXFTerfyhRqoOaAyrO+BLyzQBko+Ir/Unj3sxgij5zVB4t/nV/dQHjjthbMBc6wtVmDpDnnruIGPDiLh8XecdWOqZXQ+BuY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=ldXdVDTk; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="ldXdVDTk" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4173f9e5d73so2888665e9.1 for ; Wed, 10 Apr 2024 05:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712752041; x=1713356841; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BpA2RlMoyu0BqLSW07AvttVgRisVX81MzCveYc+do0o=; b=ldXdVDTkqJZCSdBcESAimnuog7zgmJSXVUvW0rKyCfuMwqUC/0ZfR8xerEr0hAdcfm PKncaIWAWsdJq29vgzfz3DYXjyhNyC0jlRe6QP7WwDJzMxcGifEIiqhRpVDpwACnv5mI wszlS07OO39iHnbfatzxqxD8IggbHjB/2naYsO77+xWKSPVGCEUbrYhXeakYHaYPfbSA 4Bm5tOrtm+D1J/Ve6tnSsqkSvNw1iH4mJmo9RLVqSHiBP2P9cOonGd8K/lcysv6da8BB X5zqqKzfyuGaNgB2sHHl0YWVDX2jjMSV/qHrWsjWI3wREXIlJm01qG8OQSMUbFjMPEXr +SfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712752041; x=1713356841; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BpA2RlMoyu0BqLSW07AvttVgRisVX81MzCveYc+do0o=; b=rCpgmIG0OymI4LMNMzK/vDaaT44rpiUePGg8h7QJ550mxZiOAqfURBkvbgDlKbhrku 5bGKcGqX8QHFuL9Kvn2xo9n8MkV5N4wBGapGFemrRv42vuPEdWY3Ybi1RdrxzsafkGdQ cwzrbij/BQLDMojyrMNcMfsMRWzhhsnR80iprY+k/VtnM9b8RO5NN7QzDC4/QWcONYbR Z5B7PzfrfgvjJbFNSFRKyvBPAb2SYENeq7Mkk+iwFOGT1SAmd+dMiH5pqENcsXhuDODn pl3k1U5f1jek9QTG7CCcJJ9zmuSyVEotgCadOsqwOqv6MygDl2/R9vpgObBpx2SP4RjC 00OQ== X-Gm-Message-State: AOJu0YxVP80KbdUizpsZrLm/i2rQW5JkMxhUZw6ZdGOzWYdXS0lbY9iU Be/XCKQhHYLItBbV7mS9rCjQNvGr+fZJB0e0DEm1BiHlmKWcIF/2iZidZxGjuWY= X-Google-Smtp-Source: AGHT+IEslhXRTyTTc/rViVOTHJZ2hE6b2gDX+SYshnhaAeHiTdfgXPeMyGD5fUCcBpyALSarmD9OIg== X-Received: by 2002:a05:600c:54e5:b0:416:b8c9:e77a with SMTP id jb5-20020a05600c54e500b00416b8c9e77amr1740109wmb.16.1712752041353; Wed, 10 Apr 2024 05:27:21 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id m2-20020a05600c3b0200b004171f151a5csm1679446wms.16.2024.04.10.05.27.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:27:20 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 7/9] clk: renesas: r9a08g045: Add support for power domains Date: Wed, 10 Apr 2024 15:26:55 +0300 Message-Id: <20240410122657.2051132-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea Instantiate power domains for the currently enabled IPs of R9A08G045 SoC. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v3: - collected tags Change in v2: - used DEF_REG_CONF() to describe register offests and bits - updated MSTOP bitmask for ddr domain - updated MSTOP config for oftde_ddr - kept the same description for gic as the CPG_BUS_ACPU_MSTOP register documentation in the latest HW manual version is wrong and it will be fixed; proper description for GIC is located in "Registers for Module Standby Mode" table - haven't added watchdog domain (was missing in v1, too, by mistake) as the watchdog restart handler will fail w/o patch [1]; with this pm domain support the watchdog will fail to probe; not sure what is the best option until [1] will be integrated [1] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20240228083253.2640997-10-claudiu.beznea.uj@bp.renesas.com drivers/clk/renesas/r9a08g045-cpg.c | 61 +++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/drivers/clk/renesas/r9a08g045-cpg.c b/drivers/clk/renesas/r9a08g045-cpg.c index c3e6da2de197..c64769082f5b 100644 --- a/drivers/clk/renesas/r9a08g045-cpg.c +++ b/drivers/clk/renesas/r9a08g045-cpg.c @@ -240,6 +240,62 @@ static const unsigned int r9a08g045_crit_mod_clks[] __initconst = { MOD_CLK_BASE + R9A08G045_DMAC_ACLK, }; +static const struct rzg2l_cpg_pm_domain_init_data r9a08g045_pm_domains[] = { + /* Keep always-on domain on the first position for proper domains registration. */ + DEF_PD("always-on", R9A08G045_PD_ALWAYS_ON, + DEF_REG_CONF(0, 0), + DEF_REG_CONF(0, 0), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("gic", R9A08G045_PD_GIC, + DEF_REG_CONF(CPG_BUS_ACPU_MSTOP, BIT(3)), + DEF_REG_CONF(CPG_PWRDN_IP1, BIT(2)), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("ia55", R9A08G045_PD_IA55, + DEF_REG_CONF(CPG_BUS_PERI_CPU_MSTOP, BIT(13)), + DEF_REG_CONF(CPG_PWRDN_IP1, BIT(3)), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("dmac", R9A08G045_PD_DMAC, + DEF_REG_CONF(CPG_BUS_REG1_MSTOP, GENMASK(3, 0)), + DEF_REG_CONF(0, 0), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("ddr", R9A08G045_PD_DDR, + DEF_REG_CONF(CPG_BUS_PERI_DDR_MSTOP, GENMASK(1, 0)), + DEF_REG_CONF(CPG_PWRDN_IP2, BIT(0)), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("tzcddr", R9A08G045_PD_TZCDDR, + DEF_REG_CONF(CPG_BUS_TZCDDR_MSTOP, GENMASK(2, 0)), + DEF_REG_CONF(CPG_PWRDN_IP2, BIT(1)), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("otfde_ddr", R9A08G045_PD_OTFDE_DDR, + DEF_REG_CONF(CPG_BUS_PERI_CPU2_MSTOP, BIT(2)), + DEF_REG_CONF(CPG_PWRDN_IP2, BIT(2)), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("sdhi0", R9A08G045_PD_SDHI0, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(0)), + DEF_REG_CONF(CPG_PWRDN_IP1, BIT(13)), + RZG2L_PD_F_NONE), + DEF_PD("sdhi1", R9A08G045_PD_SDHI1, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(1)), + DEF_REG_CONF(CPG_PWRDN_IP1, BIT(14)), + RZG2L_PD_F_NONE), + DEF_PD("sdhi2", R9A08G045_PD_SDHI2, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(11)), + DEF_REG_CONF(CPG_PWRDN_IP1, BIT(15)), + RZG2L_PD_F_NONE), + DEF_PD("eth0", R9A08G045_PD_ETHER0, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(2)), + DEF_REG_CONF(CPG_PWRDN_IP1, BIT(11)), + RZG2L_PD_F_NONE), + DEF_PD("eth1", R9A08G045_PD_ETHER1, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(3)), + DEF_REG_CONF(CPG_PWRDN_IP1, BIT(12)), + RZG2L_PD_F_NONE), + DEF_PD("scif0", R9A08G045_PD_SCIF0, + DEF_REG_CONF(CPG_BUS_MCPU2_MSTOP, BIT(1)), + DEF_REG_CONF(0, 0), + RZG2L_PD_F_NONE), +}; + const struct rzg2l_cpg_info r9a08g045_cpg_info = { /* Core Clocks */ .core_clks = r9a08g045_core_clks, @@ -260,5 +316,10 @@ const struct rzg2l_cpg_info r9a08g045_cpg_info = { .resets = r9a08g045_resets, .num_resets = R9A08G045_VBAT_BRESETN + 1, /* Last reset ID + 1 */ + /* Power domains */ + .pm_domains = r9a08g045_pm_domains, + .num_pm_domains = ARRAY_SIZE(r9a08g045_pm_domains), + .pm_domain_pwrdn_mstop = true, + .has_clk_mon_regs = true, }; From patchwork Wed Apr 10 12:26:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624202 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 01C5515EFCF for ; Wed, 10 Apr 2024 12:27:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752046; cv=none; b=eUIFlogJ+qZsLbUdRS35ZLi1SYqB2VWSlsDj+w57Sr1b/TjiauJQD5y2TUkEq5G8lga5og9ydkCBRCiah0D6BOFKzbvEC0+ROKJL1CsY/BusGssXGVhMnxSqTdInHzIaiB10JpEfhzHn6GnAEVLUwevQx2c/pc94UJ4elYRrVA8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752046; c=relaxed/simple; bh=Fbb37erbt6o9FBAZisY/zSs6Y/9ORVWWdlKj8BfIVgc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WON4kuogKytUYFdxriFyvvosFTHByaq5phn18NxPJa4aPwwe7669qeoaIWAd8EPbQHsDcq16GZa7Cm/qzROhvOdeiQC6qGjLfj9nrTrpd8+eYlDTlTlnUFUmIn4SmixnAZkL0W4QA8w4IgXeB4P7jHybwl+f6O/uxR/+/kKpEo4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=cbBRxdHh; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="cbBRxdHh" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-417c5656adeso676005e9.2 for ; Wed, 10 Apr 2024 05:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712752043; x=1713356843; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=klnbeJmhe/ss/+rAur1j3pibXzpubUbesCFy0b7qat4=; b=cbBRxdHhURzRVAwycrpbpS4J8pI6/mvG80zt3HVDhwP9Q+rWob2hA6BTMW8BP59dD2 pVH6cidny5ElOyMgBV7oxwxswb2oXG6ySiNEMYbkGWRSNP4hlgMCEukCHtqykvUzXhCa 2pLaFNkvckm9UWgkz68pGkPmtK9Zab0vrpN9UlMToyTDwjklk2a8Mj88MyI4x6GzctCf KwJ8kUR7If8UufVpzK8g59dODJcxs+BsJLXICbMm03V1CExY/j5ShMiXXDiSMH5+u4tN zSoy4KZnMGZm1foNgs/E4Lhgec/8KbMPBFEsblX9Oe7a2UBo8iptyItUQxoT1xOOTTBa DDIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712752043; x=1713356843; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=klnbeJmhe/ss/+rAur1j3pibXzpubUbesCFy0b7qat4=; b=gEpHAdSPNHIHxOCINHgLBmkLLzDrA9elynu4BXaO/nQLcUBwRStvt95PH718iTZfXE 4nf7Z3Q1+7RBnZso6pyfyN9UMyWbUtE93KOXp6hThjpJXUZD55vkdjoOxPFf91wYlSiZ NY0wcKzzS0ytFdZnGsJxvrhkEyZEQsmBQb9H5kPg3ZTtxknIcgu5WiFNkCguCP8q4D0K Jnkx5R/F928AWwBIQnDKHJPcGnB6yQ2RIRm0D+tcPtxChU96lgoJFwwsJ6gNEjQv9SIx DG5ZILkav9BH6tJuw3zfSFzZa4dUbiJAkyXk8eFa23GPjCzGsJUWKUJOR08mgVTuPP5s Msjw== X-Gm-Message-State: AOJu0YyMR/87+a6/uiRXlKacIrlZPkGsms0BrjVOyLuVjuvHqm0CCMkW HjLSbTqQsnUADy+wepEREXW5wjaiVePEpibLu14wNSIgNk0jva4qcMUoTy4zvwo= X-Google-Smtp-Source: AGHT+IH1NKj/98RBwKSu1SCx1c/VGaNf8n2X2r4ZccgnQyON5LoYxu7bSTY0KpzihZ1hLvt2nPbz8w== X-Received: by 2002:a05:600c:5012:b0:415:540e:760d with SMTP id n18-20020a05600c501200b00415540e760dmr1819137wmr.5.1712752043495; Wed, 10 Apr 2024 05:27:23 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id m2-20020a05600c3b0200b004171f151a5csm1679446wms.16.2024.04.10.05.27.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:27:22 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 8/9] clk: renesas: rzg2l-cpg: Add suspend/resume support for power domains Date: Wed, 10 Apr 2024 15:26:56 +0300 Message-Id: <20240410122657.2051132-9-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea RZ/G3S supports deep sleep states that it can reach with the help of the TF-A. RZ/G3S has a few power domains (e.g. GIC) that need to be always-on while Linux is running. These domains are initialized (and powered on) when clock driver is probed. As the TF-A takes control at the very last(suspend)/first(resume) phase of configuring the deep sleep state, it can do it's own settings on power domains. Thus, to restore the proper Linux state, add rzg2l_cpg_resume() which powers on the always-on domains and rzg2l_cpg_complete() which activates the power down mode for the IPs selected through CPG_PWRDN_IP{1, 2}. Along with it, added the suspend_check member to the RZ/G2L power domain data structure whose purpose is to checks if a domain can be powered off while the system is going to suspend. This is necessary for the serial console domain which needs to be powered on if no_console_suspend is available in bootargs. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- Changes in v3: - populate pd->suspend_check on rzg2l_cpg_attach_dev() for serial console; due to this the rzg2l_pd_suspend_check_console() was moved before rzg2l_cpg_attach_dev() - removed RZG2L_PD_F_CONSOLE define Changes in v2: - none; this patch is new drivers/clk/renesas/rzg2l-cpg.c | 68 ++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c index b36700f4a9f5..baf08a8cc3f0 100644 --- a/drivers/clk/renesas/rzg2l-cpg.c +++ b/drivers/clk/renesas/rzg2l-cpg.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -139,6 +140,7 @@ struct rzg2l_pll5_mux_dsi_div_param { * @num_resets: Number of Module Resets in info->resets[] * @last_dt_core_clk: ID of the last Core Clock exported to DT * @info: Pointer to platform data + * @domains: generic PM domains * @mux_dsi_div_params: pll5 mux and dsi div parameters */ struct rzg2l_cpg_priv { @@ -155,6 +157,8 @@ struct rzg2l_cpg_priv { const struct rzg2l_cpg_info *info; + struct generic_pm_domain **domains; + struct rzg2l_pll5_mux_dsi_div_param mux_dsi_div_params; }; @@ -1570,16 +1574,23 @@ struct rzg2l_cpg_pm_domains { * struct rzg2l_cpg_pd - RZ/G2L power domain data structure * @genpd: generic PM domain * @priv: pointer to CPG private data structure + * @suspend_check: check if domain could be powered off in suspend * @conf: CPG PM domain configuration info * @id: RZ/G2L power domain ID */ struct rzg2l_cpg_pd { struct generic_pm_domain genpd; struct rzg2l_cpg_priv *priv; + int (*suspend_check)(void); struct rzg2l_cpg_pm_domain_conf conf; u16 id; }; +static int rzg2l_pd_suspend_check_console(void) +{ + return console_suspend_enabled ? 0 : -EBUSY; +} + static int rzg2l_cpg_attach_dev(struct generic_pm_domain *domain, struct device *dev) { struct rzg2l_cpg_pd *pd = container_of(domain, struct rzg2l_cpg_pd, genpd); @@ -1615,6 +1626,10 @@ static int rzg2l_cpg_attach_dev(struct generic_pm_domain *domain, struct device error); goto fail_put; } + + /* Add suspend check for console. */ + if (np == of_stdout) + pd->suspend_check = rzg2l_pd_suspend_check_console; } else { of_node_put(clkspec.np); } @@ -1676,6 +1691,13 @@ static int rzg2l_cpg_power_off(struct generic_pm_domain *domain) struct rzg2l_cpg_reg_conf pwrdn = pd->conf.pwrdn; struct rzg2l_cpg_priv *priv = pd->priv; + if (pd->suspend_check) { + int ret = pd->suspend_check(); + + if (ret) + return ret; + } + /* Set MSTOP. */ if (mstop.mask) writel(mstop.mask | (mstop.mask << 16), priv->base + mstop.off); @@ -1687,8 +1709,9 @@ static int rzg2l_cpg_power_off(struct generic_pm_domain *domain) return 0; } -static int __init rzg2l_cpg_pd_setup(struct rzg2l_cpg_pd *pd, bool always_on) +static int __init rzg2l_cpg_pd_setup(struct rzg2l_cpg_pd *pd, u32 flags) { + bool always_on = !!(flags & RZG2L_PD_F_ALWAYS_ON); struct dev_power_governor *governor; pd->genpd.flags |= GENPD_FLAG_PM_CLK | GENPD_FLAG_ACTIVE_WAKEUP; @@ -1719,7 +1742,7 @@ static int __init rzg2l_cpg_add_clk_domain(struct rzg2l_cpg_priv *priv) pd->genpd.name = np->name; pd->priv = priv; - ret = rzg2l_cpg_pd_setup(pd, true); + ret = rzg2l_cpg_pd_setup(pd, RZG2L_PD_F_ALWAYS_ON); if (ret) return ret; @@ -1778,13 +1801,13 @@ static int __init rzg2l_cpg_add_pm_domains(struct rzg2l_cpg_priv *priv) domains->onecell_data.domains = domains->domains; domains->onecell_data.num_domains = info->num_pm_domains; domains->onecell_data.xlate = rzg2l_cpg_pm_domain_xlate; + priv->domains = domains->domains; ret = devm_add_action_or_reset(dev, rzg2l_cpg_genpd_remove, &domains->onecell_data); if (ret) return ret; for (unsigned int i = 0; i < info->num_pm_domains; i++) { - bool always_on = !!(info->pm_domains[i].flags & RZG2L_PD_F_ALWAYS_ON); struct rzg2l_cpg_pd *pd; pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); @@ -1796,11 +1819,11 @@ static int __init rzg2l_cpg_add_pm_domains(struct rzg2l_cpg_priv *priv) pd->id = info->pm_domains[i].id; pd->priv = priv; - ret = rzg2l_cpg_pd_setup(pd, always_on); + ret = rzg2l_cpg_pd_setup(pd, info->pm_domains[i].flags); if (ret) return ret; - if (always_on) { + if (info->pm_domains[i].flags & RZG2L_PD_F_ALWAYS_ON) { ret = rzg2l_cpg_power_on(&pd->genpd); if (ret) return ret; @@ -1890,9 +1913,43 @@ static int __init rzg2l_cpg_probe(struct platform_device *pdev) if (error) return error; + dev_set_drvdata(dev, priv); + + return 0; +} + +static int rzg2l_cpg_resume(struct device *dev) +{ + struct rzg2l_cpg_priv *priv = dev_get_drvdata(dev); + const struct rzg2l_cpg_info *info = priv->info; + + /* Power on always ON domains. */ + for (unsigned int i = 0; i < info->num_pm_domains; i++) { + if (info->pm_domains[i].flags & RZG2L_PD_F_ALWAYS_ON) { + int ret = rzg2l_cpg_power_on(priv->domains[i]); + + if (ret) + return ret; + } + } + return 0; } +static void rzg2l_cpg_complete(struct device *dev) +{ + struct rzg2l_cpg_priv *priv = dev_get_drvdata(dev); + + /* Prepare for power down the BUSes in power down mode. */ + if (priv->info->pm_domain_pwrdn_mstop) + writel(CPG_PWRDN_MSTOP_ENABLE, priv->base + CPG_PWRDN_MSTOP); +} + +static const struct dev_pm_ops rzg2l_cpg_pm_ops = { + NOIRQ_SYSTEM_SLEEP_PM_OPS(NULL, rzg2l_cpg_resume) + .complete = rzg2l_cpg_complete, +}; + static const struct of_device_id rzg2l_cpg_match[] = { #ifdef CONFIG_CLK_R9A07G043 { @@ -1931,6 +1988,7 @@ static struct platform_driver rzg2l_cpg_driver = { .driver = { .name = "rzg2l-cpg", .of_match_table = rzg2l_cpg_match, + .pm = pm_sleep_ptr(&rzg2l_cpg_pm_ops), }, }; From patchwork Wed Apr 10 12:26:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13624203 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 CB2AE15E5CD for ; Wed, 10 Apr 2024 12:27:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752050; cv=none; b=OSDKzBKW1JnpUw8bN9PPz0OjuXbRDNtu1m/uUNmnX8AIhzxMi5Qxz/89sOBwb5EoNKBnvyHize0v0T5klV9dBfqGjCwxwqBLhXi+3f4u2A8EvitKlSkSepCao/Oi9bvx7iYg9Tz4c6v0g6E9RGSnfqMJe1uiOII7D6FmWCA4GMI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712752050; c=relaxed/simple; bh=86Zihs4RD1hn6SrBjcfMhYZUXFU5WO3C6czkJe0WKBI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BAPWZ3w9m5Yk0PGKjPBHxU3+rXmvfLi1NA1Hkb0ijkxVDYsHtVgWmrYZWrv71jYHU3aX5hoW58YSk4hWeHUTxgSq518CWvLii2/BiQQnVdDLNCguJzi7WarKyae+ViKcxxG6UMz2wEBVYlk8TqUq3MKRg/yTo+Q7vUeI4sIqqNM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Og8ORC8D; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Og8ORC8D" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-416b66163a9so15025195e9.2 for ; Wed, 10 Apr 2024 05:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1712752045; x=1713356845; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=m3u5zjVGbS3GaFiOQIAkLCz3dMJ6JpJB8ancu8bBNik=; b=Og8ORC8D138kesg0fVepRqkgRqRlWqkGijZKAa0SIfY90DejVv+e/aPXi6G78Sk7qZ yobZJkU5Bt3lJ1Xwbzp56H3UqNGt22wDQiIFjfMmGj4Yys29CiFaP64+ou9P1Js7sv+T PwujRf4HLaV54ro8F6KR5ex1kr9l/3o8Qmp9XrsROlklSsxxqp+mXooVS6CBaJ59SEDs pAIpyGjjyWmge6d6cRUYxdFAz4hL6olNzJ5k/JUQHLtuk2WFxTH/qNrMTfPQeIWqYlME rUUjfHHtWYilfbsLvPWuziY0aWKdw0idXuaFn02TDFr1zBkStojs7sTAughWUfvoG0IM jrOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712752045; x=1713356845; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m3u5zjVGbS3GaFiOQIAkLCz3dMJ6JpJB8ancu8bBNik=; b=sL5rsHTSJTL1XHz4zgP0MsU7w0OGGEH6+DIn/U7NXMGEzcbNRp1u299oQ6fNHlvVCx YOFuLhzkVYs5aB0yWBXoJW2xgB5QI1M9TK8MIcPZNNS0e6vYuF9WFz4x+nlmtCOos2Us UV0xyek28uc0tum8S1EagdpRqxGJNuAX8STAmwGtj4dgn9+9NmLJJN1tR4pVuAbUqgtF lEdmO2BZmZF4koum0whIHmZKWoohhYbLWIeT/NWHX2jCHCRzowffpHogO9egzlRbnk1P kU4Q6FiEyB+5378f8x4Y6pvADjydqcm/TkqN4tqBWsGZMIdQQ5cveDpgk7XIMq17LbZr 1hFA== X-Gm-Message-State: AOJu0YykdzO8B5BzGpRrmy8G4vXmZyCnjsfkALrBbREWVC3KIrggcNOH esSiYl9zgwHoHnfdvGrm+bodwiFqVwfmMgPYBna2v72afRKNb10KiH9pUjro4vk= X-Google-Smtp-Source: AGHT+IGldfn3q9XuKDouDY4NU4Zhmr0AFphI9W+EuFxgSw1Y0oiZ+SkBqR9dQCKsZKP30Y0nhzRM/g== X-Received: by 2002:a05:600c:198c:b0:416:6b95:c631 with SMTP id t12-20020a05600c198c00b004166b95c631mr2389838wmq.6.1712752045344; Wed, 10 Apr 2024 05:27:25 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.8]) by smtp.gmail.com with ESMTPSA id m2-20020a05600c3b0200b004171f151a5csm1679446wms.16.2024.04.10.05.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:27:24 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v3 9/9] arm64: dts: renesas: r9a08g045: Update #power-domain-cells = <1> Date: Wed, 10 Apr 2024 15:26:57 +0300 Message-Id: <20240410122657.2051132-10-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> References: <20240410122657.2051132-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Claudiu Beznea Update CPG #power-domain-cells = <1> and move all the IPs to be part of the IP specific power domain as the driver has been modified to support multiple power domains. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v3: - collected tags Changes in v2: - used proper domain ID for IA55 interrupt controller arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi index f5f3f4f4c8d6..bdd4f9376fc0 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi @@ -67,7 +67,7 @@ scif0: serial@1004b800 { "bri", "dri", "tei"; clocks = <&cpg CPG_MOD R9A08G045_SCIF0_CLK_PCK>; clock-names = "fck"; - power-domains = <&cpg>; + power-domains = <&cpg R9A08G045_PD_SCIF0>; resets = <&cpg R9A08G045_SCIF0_RST_SYSTEM_N>; status = "disabled"; }; @@ -79,7 +79,7 @@ cpg: clock-controller@11010000 { clock-names = "extal"; #clock-cells = <2>; #reset-cells = <1>; - #power-domain-cells = <0>; + #power-domain-cells = <1>; }; sysc: system-controller@11020000 { @@ -104,7 +104,7 @@ pinctrl: pinctrl@11030000 { interrupt-parent = <&irqc>; gpio-ranges = <&pinctrl 0 0 152>; clocks = <&cpg CPG_MOD R9A08G045_GPIO_HCLK>; - power-domains = <&cpg>; + power-domains = <&cpg R9A08G045_PD_ALWAYS_ON>; resets = <&cpg R9A08G045_GPIO_RSTN>, <&cpg R9A08G045_GPIO_PORT_RESETN>, <&cpg R9A08G045_GPIO_SPARE_RESETN>; @@ -177,7 +177,7 @@ irqc: interrupt-controller@11050000 { clocks = <&cpg CPG_MOD R9A08G045_IA55_CLK>, <&cpg CPG_MOD R9A08G045_IA55_PCLK>; clock-names = "clk", "pclk"; - power-domains = <&cpg>; + power-domains = <&cpg R9A08G045_PD_IA55>; resets = <&cpg R9A08G045_IA55_RESETN>; }; @@ -192,7 +192,7 @@ sdhi0: mmc@11c00000 { <&cpg CPG_MOD R9A08G045_SDHI0_ACLK>; clock-names = "core", "clkh", "cd", "aclk"; resets = <&cpg R9A08G045_SDHI0_IXRST>; - power-domains = <&cpg>; + power-domains = <&cpg R9A08G045_PD_SDHI0>; status = "disabled"; }; @@ -207,7 +207,7 @@ sdhi1: mmc@11c10000 { <&cpg CPG_MOD R9A08G045_SDHI1_ACLK>; clock-names = "core", "clkh", "cd", "aclk"; resets = <&cpg R9A08G045_SDHI1_IXRST>; - power-domains = <&cpg>; + power-domains = <&cpg R9A08G045_PD_SDHI1>; status = "disabled"; }; @@ -222,7 +222,7 @@ sdhi2: mmc@11c20000 { <&cpg CPG_MOD R9A08G045_SDHI2_ACLK>; clock-names = "core", "clkh", "cd", "aclk"; resets = <&cpg R9A08G045_SDHI2_IXRST>; - power-domains = <&cpg>; + power-domains = <&cpg R9A08G045_PD_SDHI2>; status = "disabled"; }; @@ -239,7 +239,7 @@ eth0: ethernet@11c30000 { <&cpg CPG_MOD R9A08G045_ETH0_REFCLK>; clock-names = "axi", "chi", "refclk"; resets = <&cpg R9A08G045_ETH0_RST_HW_N>; - power-domains = <&cpg>; + power-domains = <&cpg R9A08G045_PD_ETHER0>; #address-cells = <1>; #size-cells = <0>; status = "disabled"; @@ -258,7 +258,7 @@ eth1: ethernet@11c40000 { <&cpg CPG_MOD R9A08G045_ETH1_REFCLK>; clock-names = "axi", "chi", "refclk"; resets = <&cpg R9A08G045_ETH1_RST_HW_N>; - power-domains = <&cpg>; + power-domains = <&cpg R9A08G045_PD_ETHER1>; #address-cells = <1>; #size-cells = <0>; status = "disabled"; @@ -284,7 +284,7 @@ wdt0: watchdog@12800800 { ; interrupt-names = "wdt", "perrout"; resets = <&cpg R9A08G045_WDT0_PRESETN>; - power-domains = <&cpg>; + power-domains = <&cpg R9A08G045_PD_WDT0>; status = "disabled"; }; };