From patchwork Mon Apr 22 10:53:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13638364 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 043E214658C for ; Mon, 22 Apr 2024 10:54:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783245; cv=none; b=fbo+Uv5+Dszdci8/gPHmZYJxjWm9M+7znakeV/rvE/28LifdjR819/XZ5hHyqmg+868vDszPIaPNfnU7qCnhDzVzXRL5M+QZ+srvZTcmwMVUUUjQMBn/XRLPmb7DxRBf/NyA9s3fUvJfoN20a9jhLyZsts167dDBQ1LyosTMgC0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783245; c=relaxed/simple; bh=nasE2d/SaWmaI1mXEgsloYfjMTW1nFFlm9lGYxvJ7Jw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=N3hvDhcT+Fhb7q0mo080Adv7GWy9pVJLf7MKETkXB6WCh+pHtdVeDytdRVr0iVClhZ8Huc5a0u6m4a5B7B7AcDWAZAhKOaoxanFXirbZ+8dS19nEwzMLJAFWX45tBycN/fZzrj4i+QA0/v7Xz3HN81fGdbMI4jO/eC4CzUtZj7w= 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=qOYB3O6D; arc=none smtp.client-ip=209.85.128.50 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="qOYB3O6D" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-41a5b68ed85so4200145e9.1 for ; Mon, 22 Apr 2024 03:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1713783241; x=1714388041; 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=542/ywAaHZGwPc69BIK8qmVTXHU1k2NH/XrpCYbWuDs=; b=qOYB3O6DYWjf7HhQQMCiR5UKeAk2VxsobubHQsbdYv5U/sYH5BsrlGe0IEo4uI+Rfb B51ihq9Ep0Cv34Mh+LWdk/9zErYsRUI3Cu6LpkMjaKlHyvt9A7VTMemjvRDHD9UNmBBl ul3hQU8IkZQOoP8kwe6gKlGJWl7FkaMRPsOHvyU9IlVsVlylkGE5ppaLNUFhrheUUxuc 00Ar7lCO8YWeTSIxuq5IXwcrW94nxQ3Hecy4jahQVDAcjo6jarNn8ihK8ZN9gTGQ0Zle uhU9uRZMFIn6VT0MV59Mwz3/B1z2CBxASFqqJaZbnlmPnLwPAu3byxuA1PQRdC0Bnu4p aotA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713783241; x=1714388041; 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=542/ywAaHZGwPc69BIK8qmVTXHU1k2NH/XrpCYbWuDs=; b=RZxNKM6GDp4mPVcblIEanjRS/LeSFBC8fEfKJQEqlJOK8N1Fl8dasqJgZptWcWrh4W SUfxu5fgN9H8JYkngY41XMsQkYZTK4k6a1bLR4CE+uMHpOKok4q3wUmO+v1XvS8Y5LAs EfwVjWxcPiVE1t0o/AfiNu58TLCTCkUItxjYdHHRGtVqXsTRz/Ayzs6r0rPA4zZ97SXu szvMFtoGhat7TjK858fMycjfv4/6XOU0EQ6P1c9xpIje66t6CRcAlhMgbsVBTlVA8Qra nspCCuK9tO6yLPvzkBSmddKtKXqUK8ZEi3N9Z4QOO+zf9JwEfCGY4tMmnmfVZi0Ops17 wEYQ== X-Forwarded-Encrypted: i=1; AJvYcCUsnC97ghrIXwzXx3F5nD66JTwrmbprgo0Iy4ipbW37SVGNUMtj9cALhQMFTlJBGT+q/b2sxjMaCIOqki2zylaS0gs5omhcMcg= X-Gm-Message-State: AOJu0Yy5rA+zcJK9XW1/sF63RS7bmnCFHc1TH1FQyvnUX8l2qzG+dcWi j5CjKd1Pjg81Ka2fuC7OORK5cwfApSwQjKNYVYg4Lw7Ym8adHq4NqpYeBQO9hqY= X-Google-Smtp-Source: AGHT+IHabouCTcJMeIW5AmQvEPKkFqlkcfdmP2ze+pndbXNYk3F+ugclHS1ird1ge/bIOeLjtDi57g== X-Received: by 2002:a05:600c:3513:b0:418:91ae:befc with SMTP id h19-20020a05600c351300b0041891aebefcmr9060599wmq.0.1713783241285; Mon, 22 Apr 2024 03:54:01 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.53]) by smtp.gmail.com with ESMTPSA id v13-20020a05600c444d00b0041a3f700ccesm4321037wmn.40.2024.04.22.03.53.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:54:00 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com, ulf.hansson@linaro.org Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v4 1/8] dt-bindings: clock: r9a07g043-cpg: Add power domain IDs Date: Mon, 22 Apr 2024 13:53:48 +0300 Message-Id: <20240422105355.1622177-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> References: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@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 v4: - none 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 Mon Apr 22 10:53: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: 13638365 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 D6CF61465B4 for ; Mon, 22 Apr 2024 10:54:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783246; cv=none; b=GA5z5InDPPaBnIvP/23U4t8IWpbtgdN9cEHYGGAxrmo6OQGQ8ZJgKSSHlZTArea7ygmQ8fK4+qTobNpL6JQg4btWDusFlPRdR+m9TOBTxlFFg4g77hIkCHCCLkRoX4spZddT7Onum89mIcIdG6BFOmfsr13kqW2zQohqYpr5x6E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783246; c=relaxed/simple; bh=zuBydgDK8eySkvZTtgHumqD0x7INAbqhfmpZNRl7iZI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Kfvi3guS6ccFj6EPDnAAsZ59gfeCLptkwlAqPGVhZ8bYLgDbF2RH5+KFeUvQnYOpag3um+hAdMR6WuU+wa43uBZnpbY7Xlhz0UO5cA9HSmQBRhlNn8UzunfXv/v2rO8ol/SlE/98ISQ0XoTxAHbIJ6G7zz7cP4+PzIfxrNtrbSI= 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=l6q05YOv; arc=none smtp.client-ip=209.85.128.45 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="l6q05YOv" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-41a1d88723bso7818125e9.0 for ; Mon, 22 Apr 2024 03:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1713783243; x=1714388043; 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=2ARMUZPHrxZWnn6veFR4DVaFmlfvykL4Uf0lprJBp4A=; b=l6q05YOv/NICmclNiouKl5ViNuTPfVroav2ATHjaamWPSVxJY3sMzBWp+iL7pAkPlT +7C8hdW/N0wHBKiOnMziTRXvXRfrJ1pd1BwoGoq2SFCvHm+0fXH0QWLW+jHnrY5YncYU qwzbhR8VO1KXypTJgR7EPLtUKEY3YSa3IBymeAai6H9fg+45bpfiVOmxchj8bnEYlGXP McvEhw1DLD4YU/Q+Xx3iumUhzJmtKOC2w6zCe4stw6fUTadEZdsEndOmhjLBJjxFQcPs bj72sZq40vvuyRAG0FROysaEz5U2pEUZEfNoFTV7c9c+UENhLpsX2rn04HSmjJ9Hvqpo 14AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713783243; x=1714388043; 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=2ARMUZPHrxZWnn6veFR4DVaFmlfvykL4Uf0lprJBp4A=; b=ZGkwdz/ybjY8BADmarYLdliA5x5G0Td4s/wJlExZzk5J6EExv7FNCTObz9yw9QSQHg W2rBTFHJf9Brw+Dmy8YOEwnWwLcjs897gxpAY6ljg2ARwpBxQXQ125E37N9wz+pxQgxR y1PauAnUoE1hbp7K21D14OD1A7M5dyVVVF0BIW1VmbRD21LQlhNZv3qY6iKidnXcU98g rWaXkmUekDW0Hd/QkgEB1dauuGTLV/uVzX9uMgv0yEycmxV3NULMZgGAj1zoL3dpfkGd JMXqyosMq6M2kScfYS3yNySitklPeTQY7FPqBpF+YY4sEQMURoJNVbx7K7B/AWIH28Pf uEzw== X-Forwarded-Encrypted: i=1; AJvYcCVayM13J6H+atJvV/km7+m7+F9P8FqNcSSk8fBSSjX3F6OfA3pH7wnEUJJs+8rfXbm6eFzyNJ3bliALJDI5xxQ+weWTVtoUpRU= X-Gm-Message-State: AOJu0YyZ2T9SgxW7+P8nmag9S1mpPHE4guIFKWW2Odx6Died0TCiu7R3 mLKGzzrqXw/DMZD4A1nLArAW75estizZWVCfESdKlf6pO7tEyou7dWWvh7Vl2n0= X-Google-Smtp-Source: AGHT+IG/XJfjVTtfgJu/B4SxRIVqJ7/0zbQ8suItMSeCB50ek873cr/z9HpliECLOR1uLqeG0AMU2Q== X-Received: by 2002:a05:600c:198b:b0:418:ea91:a579 with SMTP id t11-20020a05600c198b00b00418ea91a579mr6499785wmq.23.1713783243094; Mon, 22 Apr 2024 03:54:03 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.53]) by smtp.gmail.com with ESMTPSA id v13-20020a05600c444d00b0041a3f700ccesm4321037wmn.40.2024.04.22.03.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:54:02 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com, ulf.hansson@linaro.org Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v4 2/8] dt-bindings: clock: r9a07g044-cpg: Add power domain IDs Date: Mon, 22 Apr 2024 13:53:49 +0300 Message-Id: <20240422105355.1622177-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> References: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@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 v4: - none 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 Mon Apr 22 10:53: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: 13638366 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.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 87D9D145342 for ; Mon, 22 Apr 2024 10:54:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783248; cv=none; b=FNnpzAmNhtzD3j6ZCWC2uidiuTf4FJB22u07hF/jL+XNuuAOA2uPbWdCe4pGjQUigCuresydvzk1LCWcNrbakZIBZl66NZzaZEvw2OJ7Aep/UJ0BADWi6EQb8tgeFxZykEHkUMPbMziEf8YXl9oxkYR5zeigaONs3fX5l4/C1j8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783248; c=relaxed/simple; bh=DAURA/SctP3A5mGX8sS9JbsxOWN2+gRI7JV51DX+W2g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iFQztWRg3xaY0VsSn0MFPtnEAO/z25ZswL+iVPY6eWV+6ckXiKopRAWDn1VAWmfNVMGwV7X7Od+BOUuc6csiFgeJE+b3NpoIIvrBmNLt5VAbfwo23Z1WqXhQbLrvJgNqjpdPHADOmSeg5vlD42mL4tnOu+XgRzjPiaZsZAM/oYI= 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=PiCsSLE6; arc=none smtp.client-ip=209.85.221.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="PiCsSLE6" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-343d7ff2350so3131098f8f.0 for ; Mon, 22 Apr 2024 03:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1713783245; x=1714388045; 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=YtPB6ctP7od8zgdwyqg5bLwGVgQvxXp2ISVh1oG7rJs=; b=PiCsSLE6ERJ6uUPCKaqo2i3bd8ho/Qd3PJGqRkMU28FM9uLuE3NaTuCYz0DUKc7Ifr 30r/r/VROkZIERpjSF4P2wtURQxhaAlOMGIVZ6Iamn2CGICvyxaJAHl4xyEN/nsA/C7G QmgZzkAWAxUK9XlE3dYinQqaAHLro9dHBo2/+o80snczC+1c360DINIeB3mPgGxZA6Th BLfIXdixJNvpKVE7jVsQHTR4qWcWzIVtJHtUJHcnxIV+C94X1mUUgBR6Jq6IwDQB6oLH KH1RTy7+u7P5mQLTYLx5OoHX7TrlzBH3Rq9u+F+cFR7rieqqlE+DE+KNUy6V7zsXbnfG EkfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713783245; x=1714388045; 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=YtPB6ctP7od8zgdwyqg5bLwGVgQvxXp2ISVh1oG7rJs=; b=gP3pUW0iDR9lMARfXtMH4Yy5Vi8TIUMs60VZxfgcZGZC4JpiV6uQPOFmAun72d14WV 8Dz1Pe1h5CU/fuo+dQiECz9d5iByNmDqjDslFQJIqs5jpTkeasxqIvgUAW0Rwt2fOoi4 KJxetS4v4Ke0HKUHNV8gx4t2BozJFZXdw0VabjqFthPqDsqKkfsYH0ULW4+x3FiTeQPa lMzhd0tEPuTRP/TQkycFV/w/BK+N2qCyXV7XivAFgix1CT/R5loGR0iiYNztRKQCzYiH +5ceBJJ2kk1+LPdqgzjWrMXSfaDdrH42Rpy0F1e6ArhuWTj1OgI7oyc0xefOpXIzy4Zd Ok8g== X-Forwarded-Encrypted: i=1; AJvYcCWmcdyzFCuKoU7Ktiahl6n6y0IszxgjiBD9Sc7J2EMCrIynq97jZwJWzUpjAjm7PZo9SPubItswr0Mov3rvqHztCFL23m1r594= X-Gm-Message-State: AOJu0YxyoHQ2lJmXdwkw/6rSwBtZa+qyXDtKSeStza1PiZXXNaiUpi9G rf+38I+XP1QRw+r0jJnu0K9RBtYi05wmQ2Y9NEzsaAB2y8Pe1fut+Fu2SHk5yZM= X-Google-Smtp-Source: AGHT+IFLCJwMoJjU6D0NWaWvNE1gp038ynHMSy1TehAKgDSlKi/ffr0hQ2I4cGne8RszfNJgK/2ZdA== X-Received: by 2002:adf:ed84:0:b0:34a:e6bb:bd9e with SMTP id c4-20020adfed84000000b0034ae6bbbd9emr3145768wro.46.1713783244989; Mon, 22 Apr 2024 03:54:04 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.53]) by smtp.gmail.com with ESMTPSA id v13-20020a05600c444d00b0041a3f700ccesm4321037wmn.40.2024.04.22.03.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:54:04 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com, ulf.hansson@linaro.org Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v4 3/8] dt-bindings: clock: r9a07g054-cpg: Add power domain IDs Date: Mon, 22 Apr 2024 13:53:50 +0300 Message-Id: <20240422105355.1622177-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> References: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@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 v4: - none 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 Mon Apr 22 10:53: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: 13638367 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 748011474C2 for ; Mon, 22 Apr 2024 10:54:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783250; cv=none; b=eDS4Bx+CesvHK4y2xGAHzeCokR9PMthDmVaoAMwjLVHZquTtVJVLM03gEC0hkq3hALzGR/OTN+K1y/6rFj9ccviyJREaleFivP+FZFx7DA6H7Vw42+CIibvX2ZUu8eVJ0+ODgW3rIfcQyAT9kz/G4hJu8C0082IyfQwQgS5Bccs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783250; c=relaxed/simple; bh=jBL0JWjfGth/MHnnCju+Zzypdjywr5OYaa+Xd2xpy0k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tDwM4vbA5plz+PKS6FYvvlEL/5r9lvtfK11OE7Wg4RDCPTuadq1Ru0PlAT51ydtfEu7gGq8KxODc4kYWTWFUrvuafY/WXZf4N43+5svt8KwwyjKe2pWzfG6cXE4/GgZyRSHWHEzwumTLhgYJJEIw/m2oCX89D/5VdYhoQx2lxJE= 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=VsiNJsI7; arc=none smtp.client-ip=209.85.128.46 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="VsiNJsI7" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-41a7c7abed9so2847845e9.3 for ; Mon, 22 Apr 2024 03:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1713783247; x=1714388047; 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=DujxY81OusTjOSIAeK9ewJpf/aHOeWDHdo6vi/BYgw0=; b=VsiNJsI7eAekPmWG2ad9AUoy/p97RYqUwzM2luMo2IEA33zEUt4HHD+lLJ1b4weuzu 32CQ0nKR7Rg3NahHz9VirIbssWGsAJxMC/WPp3CDm0NwNMgIUDGsmDQ97TTWEUHXTz5m E558pjIoxnD8ncpE8P9SjWGDKN4N3u7GXewNiemLUuegqlLNm4HBNlSBx7IIyvHOCHcp U2v60LH4WB+pdPgXf9g8dD+gdgqMhJBkPAQdCHozxFtERNOK8qX5ydT6ZJGdgcY92zru FdGTjiCJXvICpk5RgWthOx8fZUzeY6KNYLfJm5+mMZJI/BdTav+d1QfizipFM0af98TO HrIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713783247; x=1714388047; 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=DujxY81OusTjOSIAeK9ewJpf/aHOeWDHdo6vi/BYgw0=; b=px4/Qu03OjvsvuY1APybtgT//WkOfL2IqwD5aqbhQy4NejDu3p9CZESH8zV4TmDzCY ms9Xp5/etAEFu7DqFDZ67aAj1Gl+k9kOyRome1DISAWlZcSjlBLlHX42PGwXKF9ZVb6T Rj/ayp7P29Fm8EQQNlwNhME9TKNVzAYA3F7b35jn9H2jL4wBu9bAN+rl4NdA4Hvmrv7n LaXT4/MGtKjow08VUoRx0ORKqK4qpxtYT8g6yo0aiP0s/PWalEza/0qS85gDE4inhxLq lvE3K4pjRiQAH4pG+TgCyQvwOj9dieM6tICix+jQR4wiL8OYH/G1ukmDylqHBEEdG+O/ YJpw== X-Forwarded-Encrypted: i=1; AJvYcCX1ufzvwlN+H1rN4tJfpGGbeQOuhQywWp5gV/Dm5LrrKcw/E1jJjg8HMe3L1cDl3D8mN8o+8f4UMqteo5kA/d2gO7tHNnZKoco= X-Gm-Message-State: AOJu0Yz7UvZxNsDALRyxpy3w0J87yGHu1vZ7Ctjf3u3f+i3EqOyYnRXH suyXWTrC89+fiXloVewz0qabPDIBWa8XF2cBniBSE31NdpydOJsZXnZNZtMYDMbTB5DC2ZhU7Hc gHjw= X-Google-Smtp-Source: AGHT+IH6F32OmRNhUIxW1tBTqqfyu31kv89EAgKtlxPomEw0pOhp793hqWUc42QYmPoPxxHUWRWTTQ== X-Received: by 2002:a05:600c:3582:b0:418:e304:4a13 with SMTP id p2-20020a05600c358200b00418e3044a13mr5184864wmq.19.1713783246988; Mon, 22 Apr 2024 03:54:06 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.53]) by smtp.gmail.com with ESMTPSA id v13-20020a05600c444d00b0041a3f700ccesm4321037wmn.40.2024.04.22.03.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:54:06 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com, ulf.hansson@linaro.org Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v4 4/8] dt-bindings: clock: r9a08g045-cpg: Add power domain IDs Date: Mon, 22 Apr 2024 13:53:51 +0300 Message-Id: <20240422105355.1622177-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> References: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@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 v4: - none 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 Mon Apr 22 10:53: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: 13638368 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.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 6745914A084 for ; Mon, 22 Apr 2024 10:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783252; cv=none; b=ikwjIzqMWoGe3/mYlhIILXrJB9WNVR7xo/6LIyRLomNd2yGJNLoKNdKdU650XqHeNK2Eg382rPN5NrKbkIcfyf4gNg5izDYMZNtGRl1TsQgV+KrFPBhgAXZhgy8Lh50yCLD/saRQV0WttwI6Bs2CtceAg5azXjtC9BdkFI19Nfc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783252; c=relaxed/simple; bh=kzfvIn5qFtOm6vevv9sfzeyre/RzrlRI0FWCZfrI0GU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q5+rDh+gAtAZDOqOfdMOal8TWxPY2ntclDwbdhW+UDO5s8ClKeO2ApVMeKMPLqR8h3RopXW70S2K1I0O1DIEvKoFopObapLOsaL/kmb9gybDkg/DOOyJefpSD5Gs+9Rr/wIfpP5jf+0JyC5K4SZY+omrmrIu8xLDIXYNN+f3O6Y= 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=SQ4hJWQy; arc=none smtp.client-ip=209.85.128.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="SQ4hJWQy" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-41a7820620dso3181165e9.0 for ; Mon, 22 Apr 2024 03:54:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1713783249; x=1714388049; 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=bAwRmO5huM+GW70T/FweuVU9CTXqYucZc7ooxGC0kuI=; b=SQ4hJWQyAtvmdGSz4SPh+XAXccAatxOvppBULVv4ubGy27283MCeWt9IdbxeoiUbcN yOtrlStrZDMNtn/TUIJ1m7KDpA5O//ZCijp64Wn8t5IhWfxp6RVPbNOzrmkMlt/TvZWR J//2B9E+LehGJFt5oDERe/BxtnOm78LkCdoNWs+PAj7R5d4isr5SSyShfv0EHt4YC7kW SuEZVThW2dwDSclnaLqoNMQesjbCiuMrSOGH6CQsjheITB3pCEMNJqRtaplFHdsjbINt 1Rs6+tgysxGGbmPUMSwK1O98nUtsTl631zuAzgcO2GZ05tR9dfKpqcy+/7a0XLdb4LRI xbvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713783249; x=1714388049; 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=bAwRmO5huM+GW70T/FweuVU9CTXqYucZc7ooxGC0kuI=; b=d0sbRqLB//PwBA4Fu3/92XCDg9nXML/cpjf4ZuDKLGK8kuJvyjNuEnQTo6ynxteuU4 6shsj3vmKDtCVx5W0ZGPf7HI6vy8Hp6cV3fGtex4KfDKmA7mfv7WztPCmb6KEyVUcG1G ZWFB6N964+jcbCNr8zKvhweqXdem2yd8BKJRYbNmaKGTq5I5+1EBOuOlHx7nkgrlMzDU LkyeETCrull2uivps65sraYCKriOnsJsz/eAXrMfiagGplpKRIYtI64uZXVENIegWGf2 Gy6ZTiVPpOIVQ2Rp8jdVyFfytWwBnyovdycWxZZC/9rKDVhoTcQT3U7zcJ2nLfUiidka PmMA== X-Forwarded-Encrypted: i=1; AJvYcCVGujrO+mGuu3TUELpTd0l9VxKniFvmBtIPOtdaP7cfw/hcdRL7EctDahzOZd/qlDn+hxsYnHRPricDTJhLl7hbxnAFCtubjlQ= X-Gm-Message-State: AOJu0YwoMIGe/KMk8jAi55KjWiKVa5XEM+DYWYF5Fiod17CE02t2buOz 195r1l3WrLUMPS8xgni3I5UOF480o79qkxJ1cDeqryBuKz3BWCon4GmY2KlNhqg= X-Google-Smtp-Source: AGHT+IEgDwCgT5pzkeoswqG4nrQ8rtrCIWqKFBOLuvMt3yy55K/3kxVfAmsfO2HIlU7iiEbI5HsUnA== X-Received: by 2002:a05:600c:1c9e:b0:418:a5fc:5a5b with SMTP id k30-20020a05600c1c9e00b00418a5fc5a5bmr6945379wms.36.1713783248921; Mon, 22 Apr 2024 03:54:08 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.53]) by smtp.gmail.com with ESMTPSA id v13-20020a05600c444d00b0041a3f700ccesm4321037wmn.40.2024.04.22.03.54.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:54:08 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com, ulf.hansson@linaro.org Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v4 5/8] dt-bindings: clock: renesas,rzg2l-cpg: Update #power-domain-cells = <1> for RZ/G3S Date: Mon, 22 Apr 2024 13:53:52 +0300 Message-Id: <20240422105355.1622177-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> References: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@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 v4: - none 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 Mon Apr 22 10:53: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: 13638369 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 8EDE014EC67 for ; Mon, 22 Apr 2024 10:54:12 +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=1713783255; cv=none; b=q/tX1ZWlqkOb1m08L2IpDqA+gR/xre8FFPGRfC7umMXS9Gt7+ncPsVoV+cQhNKap6LAib8cmsuFJIreiF7Yjk3gFuKAxORCpvCSG9Ot9Kn1/+UQqrbAlw41XNRUtC9P0nYj1BJLq6Ou4+A0MO6xAm7oLk4FbOb7q+MHLVZOMN58= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783255; c=relaxed/simple; bh=UeipTPQfxZcyVz6WZs6qIK/wXFSLrBCbDAqvBu/wJrs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u3RHTQBIS1hEGWb8ZVsvT93MBvlG9DWXjN7KK8/wY9pjO6Ll+fwQcMqghqc35intRl4SxDT7bruiWL5zptEc97a9yjk9ku0aqZ+R9IxEW9CWNsPAR7BlZMmpXlRWphRLELYCZODhz4hqvIoBn/lNMg0ENBe8Go0QQRar9+2w+/Y= 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=BmVLUBkE; 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="BmVLUBkE" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4155819f710so35087025e9.2 for ; Mon, 22 Apr 2024 03:54:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1713783251; x=1714388051; 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=arj/N1skZQ+Mci7A32xTTOverIinR2Ho91O7tfvBIdc=; b=BmVLUBkE0xUThDC1Beyn83ppU7fE22stCkgXM5O7raqLAuOzOd5b/MwmCnVE7B40BP 8bk1NgmZpYr6lUKAodup5CaukWUyd4wf4LC0asaWUHdc/uAiXMlHmXDDrjziaB8aTu+R cGEEnw4bbwNoyUzpY616uPNHBW7al9im2ACyJlUZk3LxQkmHb6sq5gkf8dsrHaAA2sK3 jJDQf2lFBaANd1mV+4mQhvRl67WdGJa6wJZya9ozjfTXNszROGrBkweM2xmMdL4WvLyE kdYIQ9kbYXK2HA+EA//BmtyvWWWiRZ9nOK1UA6vfyzbAfotWtOOqjr+JRxoNUnrKn3T9 znXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713783251; x=1714388051; 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=arj/N1skZQ+Mci7A32xTTOverIinR2Ho91O7tfvBIdc=; b=p6mnuP3JK/59fAhJDNsZizCnWqqsNePANOiUUhS95rynJi8H6bvELZYqUcgf+Pz2wC qHqXFfHpZQOR4hNPhMOrjiq5u6sn+d8L0DKvkYNySkP8MOII2Ay+C+ihRWKc788j3gDD 3NA2xciYel8ycc6rpPJ3xgyKsj5/3uDUuYGbErO+DvKsb1NjxJlJRHqzAu3QTexoQ50u shKkwq2aiJphloUn34zSu38jRtM1NJnSEcF0REdopm0lOs/GyBKrzZ48v+C8UZBwUAio Baof95/p8W4m1C+2thZAj7r9/s7kkmuzkKNxavei+e3dOofoqenOcBgz6wDYZ0rG6Vm9 zUuA== X-Forwarded-Encrypted: i=1; AJvYcCXqvQqktjsBVwIcKausOh/pVTsQcTuti97Jwflnw5gLVHq/EXVwP3GXD+7otsTakCHK1qQWqxqkhptX9UrDhyBquehhpzvJ9E8= X-Gm-Message-State: AOJu0YyxSKwUzaaogt4sLYoPvBRUIjILwGg1XsdeU/WltRcmmF+Z5G3y Lm/Ge3A8F8INtY4ou5WIPYjSR3wmwlYkgk39Rp/odvWMbbs+TbNJcTAjtanZYz8= X-Google-Smtp-Source: AGHT+IGH12ifHAtZ9arczl0FJzuvKuFpAd12aJXuD5o0I19naBmFqdGJOF0kGfJ9LFGU6GRVBlZbRQ== X-Received: by 2002:a05:600c:4748:b0:41a:6edd:47ed with SMTP id w8-20020a05600c474800b0041a6edd47edmr1489578wmo.4.1713783250986; Mon, 22 Apr 2024 03:54:10 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.53]) by smtp.gmail.com with ESMTPSA id v13-20020a05600c444d00b0041a3f700ccesm4321037wmn.40.2024.04.22.03.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:54:10 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com, ulf.hansson@linaro.org Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v4 6/8] clk: renesas: rzg2l: Extend power domain support Date: Mon, 22 Apr 2024 13:53:53 +0300 Message-Id: <20240422105355.1622177-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> References: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@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. The MSTOP was 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. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- Changes in v2: - dropped the pwrdn functionality until it is better understanded; at the same time kept the code ready for pwrd being added by keeping struct rzg2l_cpg_pm_domain_conf, DEF_REG_CONF(); please let me know if you prefer otherwise - @Geert, @Ulf: I dropped your previous Rb tags due to dropping pwrdn 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 | 199 +++++++++++++++++++++++++++++--- drivers/clk/renesas/rzg2l-cpg.h | 67 +++++++++++ 2 files changed, 252 insertions(+), 14 deletions(-) diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c index 3d2daa4ba2a4..04b78064d4e0 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,180 @@ 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_priv *priv = pd->priv; + + /* 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_priv *priv = pd->priv; + + /* Set MSTOP. */ + if (mstop.mask) + writel(mstop.mask | (mstop.mask << 16), priv->base + mstop.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; + + 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_simple, &pd->genpd); + if (ret) + return ret; + + 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; - 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); + 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; - ret = devm_add_action_or_reset(dev, rzg2l_cpg_genpd_remove, genpd); + 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; - return of_genpd_add_provider_simple(np, genpd); + return 0; } static int __init rzg2l_cpg_probe(struct platform_device *pdev) @@ -1697,7 +1868,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..ecfe7e7ea8a1 100644 --- a/drivers/clk/renesas/rzg2l-cpg.h +++ b/drivers/clk/renesas/rzg2l-cpg.h @@ -27,6 +27,18 @@ #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_OTHERFUNC1_REG (0xBE8) #define CPG_SIPLL5_STBY_RESETB BIT(0) @@ -234,6 +246,55 @@ 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 + */ +struct rzg2l_cpg_pm_domain_conf { + struct rzg2l_cpg_reg_conf mstop; +}; + +/** + * 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, _flags) \ + { \ + .name = (_name), \ + .id = (_id), \ + .conf = { \ + .mstop = (_mstop_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 +313,8 @@ 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 * @has_clk_mon_regs: Flag indicating whether the SoC has CLK_MON registers */ struct rzg2l_cpg_info { @@ -278,6 +341,10 @@ 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 has_clk_mon_regs; }; From patchwork Mon Apr 22 10:53: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: 13638370 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.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 59AA614F10C for ; Mon, 22 Apr 2024 10:54:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783255; cv=none; b=CXN8Wv/jjM1KGeNa0sjWcxUGfqth5WLSI7jbNk5RIsGWznF7KJBN8bmvK/JNy7tc9q+l0Mai/GZwtiEB/FolzgG084RCPqM3xgOuD8x34VstaQ0IMNndKjQUy9U+ogjvW4HPKETQ6W0iKzJPm84eExzhYKJf49IPy1cySjjR1kg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783255; c=relaxed/simple; bh=sdehE+zn1RQvIdReWR+XY+nVCRWOxX0wiMQ32N7tCn4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rFTBqcz2YcGw+lhqMYT6kfMDfKzmHHHaPAuehaTSvIcYQnXL6Q04/bjUCrwLSU6ZR5bMQWr8UEgSXo5o6IqrMEg1NvwZsfKh4zidFJAlRo16kngZnRC8u8xv1yjuBSsLC4aDVoKRgOvf0R58DhmUE9NFG2V/ApsDrnZw4Apm4CA= 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=nLEbod0l; arc=none smtp.client-ip=209.85.128.53 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="nLEbod0l" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-41a1d2a7b81so6325975e9.0 for ; Mon, 22 Apr 2024 03:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1713783253; x=1714388053; 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=k1N7C9y6FANsDWlj/dSgm/X0vOo9KMVHsfxdkeCTUls=; b=nLEbod0lXZ92+d0VG1rK4TelU0qV1ZOkB3G487b5EbCdYNezO+NSUl6SdpkRac87Zp pBg52h6CzlrTu0eAx0bcKx85AiUU6yqjsQJmAlUGmheEICyuvQTfwIZaGxOgOEZdwRWc Vc97Wu54wkU3KNumaFEeBJqwMTjRsYqhgOlSg8lUHAk5P5y3H2MpLrhbTvtHgNQz8mgS ZIznqhsKWPDaITcQqrYdk6k6zUdVCDpK61O/36r5pw9A/eoCgUqhWyLfYXFN9hbABJ+v 83fVqxobxgw3O3CFYAhdV/ELm64zzWec74+x1Ciet2jDQ7G2h/nd1umAMDj7Y7GtPHdL uzwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713783253; x=1714388053; 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=k1N7C9y6FANsDWlj/dSgm/X0vOo9KMVHsfxdkeCTUls=; b=IWkMDBxceRIW6bgrWpawO+5Gwxp7UMfBrkrkhcXzGEjsrVF/NcYVIDSkO9XKDTb6NW EqWka6Yd0vuRj6ymSvU5Yicu9JcVikD7dPmXbY+WD6+8lTmdCp5lQw9INHpn3G028sJQ /vCMyMhzMma5QrIaPeKUcK5CnjtuXD8BYwGTnE7UqWqIj4k/V25+AbR1iXGK1yIsXu3U awXFP43qIiqRJIrudbVKXMFXf84BSEyIwMrLE1XMMC7tpa943KxVAxTOPU8cczDTPtl4 8wAZ29pujubjlGLcz9Z4RVuOKSx7K9ir4IxvWTUuX/FQ+geDcSfWPT++RVxjTpR0t6SJ cmhA== X-Forwarded-Encrypted: i=1; AJvYcCXfvtxckY3n3nVmQX8zJCdnVvX7nPTUTLttjrhb5k25q2BOzjfqI2IfHgodb+EA8kunLfLKFW+KXw7ieAszvzrRmfKwHpfjL/Y= X-Gm-Message-State: AOJu0YzWVv7MvMy0jh9OSp6aXc/mcUrwWuZ/bvlmgFEIp64jZF+yUEvo wGMakFmYnnBn2NojLVgfo/ChVz+HbufM2Oloxof/hGSQrcr6J3TGXtCb2DKJJ8I= X-Google-Smtp-Source: AGHT+IF6X7R+CnfnuWa+fl+Pf5YiSAINpYi8IL6p/62UKQojmoQFTVGPGQijrRA+F6G+VcEY6bhYXw== X-Received: by 2002:a05:600c:358b:b0:418:2ab6:7123 with SMTP id p11-20020a05600c358b00b004182ab67123mr6892154wmq.10.1713783252902; Mon, 22 Apr 2024 03:54:12 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.53]) by smtp.gmail.com with ESMTPSA id v13-20020a05600c444d00b0041a3f700ccesm4321037wmn.40.2024.04.22.03.54.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:54:12 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com, ulf.hansson@linaro.org Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v4 7/8] clk: renesas: r9a08g045: Add support for power domains Date: Mon, 22 Apr 2024 13:53:54 +0300 Message-Id: <20240422105355.1622177-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> References: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@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. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- Changes in v4: - dropped DEF_REG_CONF() specific to pwrdn functionality - dropped ddr, tzcddr, oftde_ddr domains as these were there due to the pwrdn functionality - added wdt0 domain; this will not impact currently integrated watchdog support - @Geert: I dropped your previous Rb tag due to the changes in v4 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 | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/drivers/clk/renesas/r9a08g045-cpg.c b/drivers/clk/renesas/r9a08g045-cpg.c index c3e6da2de197..b068733b145f 100644 --- a/drivers/clk/renesas/r9a08g045-cpg.c +++ b/drivers/clk/renesas/r9a08g045-cpg.c @@ -240,6 +240,43 @@ 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), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("gic", R9A08G045_PD_GIC, + DEF_REG_CONF(CPG_BUS_ACPU_MSTOP, BIT(3)), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("ia55", R9A08G045_PD_IA55, + DEF_REG_CONF(CPG_BUS_PERI_CPU_MSTOP, BIT(13)), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("dmac", R9A08G045_PD_DMAC, + DEF_REG_CONF(CPG_BUS_REG1_MSTOP, GENMASK(3, 0)), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("wdt0", R9A08G045_PD_WDT0, + DEF_REG_CONF(CPG_BUS_REG0_MSTOP, BIT(0)), + RZG2L_PD_F_NONE), + DEF_PD("sdhi0", R9A08G045_PD_SDHI0, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(0)), + RZG2L_PD_F_NONE), + DEF_PD("sdhi1", R9A08G045_PD_SDHI1, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(1)), + RZG2L_PD_F_NONE), + DEF_PD("sdhi2", R9A08G045_PD_SDHI2, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(11)), + RZG2L_PD_F_NONE), + DEF_PD("eth0", R9A08G045_PD_ETHER0, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(2)), + RZG2L_PD_F_NONE), + DEF_PD("eth1", R9A08G045_PD_ETHER1, + DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(3)), + RZG2L_PD_F_NONE), + DEF_PD("scif0", R9A08G045_PD_SCIF0, + DEF_REG_CONF(CPG_BUS_MCPU2_MSTOP, BIT(1)), + RZG2L_PD_F_NONE), +}; + const struct rzg2l_cpg_info r9a08g045_cpg_info = { /* Core Clocks */ .core_clks = r9a08g045_core_clks, @@ -260,5 +297,9 @@ 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), + .has_clk_mon_regs = true, }; From patchwork Mon Apr 22 10:53: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: 13638371 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 7787E14F134 for ; Mon, 22 Apr 2024 10:54:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783258; cv=none; b=sx2BVnAsFUMqk1evpWgwu70wc5G6NlGYugzvvEYe2yVh6DYVOldhJwjzCCwcH4704Dmp5VllZ3KWV/kifitYRU9IAHxmOX7zRc+xA2yqUn2DaYJkAHVwm8vzGj3BpLc1xHD622yCAOxEoREgn21f+FgGd+DZDh06GNoKRuHI90I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713783258; c=relaxed/simple; bh=I2lRI2LTUHkrS++EyWkYEsH9iuZgVVZOFwo9y7A7AfQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=p/pYnDwiteHAi3qpSK/LY1n6I/E2ST3MSMM9Q/9FD6P0DKuwVeCadEbEcV9fFn2OI1Xi0GfK/Z/jQE3Prtt/u8ZTQIn8xjQwBC7wPpboeoL2xJGCznhHOkbipjp5xF4egLqp6O3RwS+KvMr4/C1v2ofrZRiaZFMNC+vQLDhc8B4= 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=M+8oKAWf; arc=none smtp.client-ip=209.85.208.182 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="M+8oKAWf" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2d895e2c6efso64106301fa.0 for ; Mon, 22 Apr 2024 03:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1713783255; x=1714388055; 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=ZPJr778Ev6Y11o0pQBjtnRdIdmYy85v8EnkZOWn+JYo=; b=M+8oKAWfzpO/bdPR1P0ovntK0pIld3DfAR/Un8VCIi6G90bSoKIxdn28Yd4pO6Z0mC DP3vcxxgBuOKYaw++R49vwDrVkoRS47YwEJpPs2mb745f7cJVvi5Y5eUlcVVKAL9EmKj 6BdNLQ14Stsykn3XoXED2gI2h+ROyND2Je5Mn8QLEXo+vuHv6U/swghsNeCQ3/Ram+nD LTKJLaqHDEWwZzCrWuVLVM0lp+qXuKjiWClkuGGl5brDYEYyjGm7qeLiLq7ijx3LNvOJ 5wB6vTa0qHLHc+pLlizCe0BAnXWH5yNT6zkkM5UM5FkfmeHPH0S3Xan6uGoiWPBlER8W C1IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713783255; x=1714388055; 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=ZPJr778Ev6Y11o0pQBjtnRdIdmYy85v8EnkZOWn+JYo=; b=OF2NXJSH4gheiUkBFNTSsqnX6tWz+NbaOpkwEAEZgF3d5ey5LNqnMhDQG810InKCGw k977o7XlG//eMfIdFiP5odZI/8Xnu3Du1NVRnwWFXTTdeBwF7ArF3F9EXprhu/uCOVB1 F27yAoVN+sTnM9jVLaXq/+Wzz2ucAqHU2WEvZ0AUROm//IdtIU43rY1CGWJfvBF4Iles OY1iDhbX2/iQCq5yTy0uH/hccDzdDg2O5N6nW8FTfY7qDYSgNXP1tKpncsLaNUVN00WE 2cphTUbLu3ImxJZnyqkiDkO978tdQg6WFUQWmTmUf2CAH9SxDY8Jx5lvci+HIRbPXh21 1nsA== X-Forwarded-Encrypted: i=1; AJvYcCXRop8iG4mDeUey/99irxMdPllrwaXkJm8Q/Sw26sYw090P8+Jxy0NPPCcjxTiGhjQO5ukjBVhaomWCLW3JJffc6TUcYBv9jww= X-Gm-Message-State: AOJu0YyK9UyvimITWnd6Aaf/TCF7+x7l2An7PjBm4B89tPhKr9TOkyZp kSb5RwdNCiYOIU8Ogn8cTXyDJSYvQGjleMIvbfu4ZRExSdLt0DNgWgwZhfChBpk= X-Google-Smtp-Source: AGHT+IFCe6+Tw9xCPOXSOhayYTKBLJgcOmhNZgY6qzTYOl+giiT1YCrX3Rjh77W+zlTRx3fD2JUwtw== X-Received: by 2002:a05:651c:1a06:b0:2d8:34ec:54e6 with SMTP id by6-20020a05651c1a0600b002d834ec54e6mr6649160ljb.33.1713783254631; Mon, 22 Apr 2024 03:54:14 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.53]) by smtp.gmail.com with ESMTPSA id v13-20020a05600c444d00b0041a3f700ccesm4321037wmn.40.2024.04.22.03.54.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:54:14 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com, ulf.hansson@linaro.org Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v4 8/8] arm64: dts: renesas: r9a08g045: Update #power-domain-cells = <1> Date: Mon, 22 Apr 2024 13:53:55 +0300 Message-Id: <20240422105355.1622177-9-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> References: <20240422105355.1622177-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-pm@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 v4: - none 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"; }; };