mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Changhuang Liang <changhuang.liang@starfivetech.com>
To: Brian Masney <bmasney@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	Changhuang Liang <changhuang.liang@starfivetech.com>
Subject: [PATCH v1 2/2] reset: starfive: jhb100: Add System-1 reset controller support
Date: Sat, 28 Nov 2026 00:35:54 -0800	[thread overview]
Message-ID: <20261128083554.2993-3-changhuang.liang@starfivetech.com> (raw)
In-Reply-To: <20261128083554.2993-1-changhuang.liang@starfivetech.com>

Add the reset controller of the JHB100 System-1 clock and reset
generator (SYS1CRG) to the JHB100 reset driver. Its reset IDs do not map
one-to-one to the hardware reset bits, so the controller is registered
with a reset ID map.

Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
---
 .../reset/starfive/reset-starfive-jhb100.c    | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/drivers/reset/starfive/reset-starfive-jhb100.c b/drivers/reset/starfive/reset-starfive-jhb100.c
index 883f67ff1fa6..2170c88810db 100644
--- a/drivers/reset/starfive/reset-starfive-jhb100.c
+++ b/drivers/reset/starfive/reset-starfive-jhb100.c
@@ -38,6 +38,25 @@ static const struct jh71x0_reset_info jhb100_sys0_info = {
 	.map = jhb100_sys0_map,
 };
 
+static const unsigned int jhb100_sys1_map[] = {
+	[JHB100_SYS1RST_SYS1_IOMUX_PRESETN]		= 1,
+	[JHB100_SYS1RST_MAIN_RSTN_CHIPTOP_SENSOR]	= 5,
+	[JHB100_SYS1RST_VOUT_RSTN_HOST0]		= 8,
+	[JHB100_SYS1RST_VOUT_RSTN_HOST1]		= 9,
+	[JHB100_SYS1RST_HOSTSS1_RSTN_BUS_ESPI]		= 10,
+	[JHB100_SYS1RST_HOSTSS1_RSTN_BUS_PCIE]		= 11,
+	[JHB100_SYS1RST_HOSTSS1_RSTN_CRG]		= 12,
+	[JHB100_SYS1RST_BMCPERIPH3_RSTN_CRG]		= 13,
+	[JHB100_SYS1RST_BMCPERIPH3_RSTN_BUS]		= 14,
+};
+
+static const struct jh71x0_reset_info jhb100_sys1_info = {
+	.nr_resets = ARRAY_SIZE(jhb100_sys1_map),
+	.assert_offset = 0x54,
+	.status_offset = 0x58,
+	.map = jhb100_sys1_map,
+};
+
 static int jhb100_reset_probe(struct auxiliary_device *adev,
 			      const struct auxiliary_device_id *id)
 {
@@ -59,6 +78,10 @@ static const struct auxiliary_device_id jhb100_reset_ids[] = {
 		.name = "clk_starfive_jh71x0.jhb100-r-sys0",
 		.driver_data = (kernel_ulong_t)&jhb100_sys0_info,
 	},
+	{
+		.name = "clk_starfive_jh71x0.jhb100-r-sys1",
+		.driver_data = (kernel_ulong_t)&jhb100_sys1_info,
+	},
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(auxiliary, jhb100_reset_ids);
-- 
2.25.1


      parent reply	other threads:[~2026-11-28  8:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-28  8:35 [PATCH v1 0/2] Add System-1 CRG for JHB100 SoC Changhuang Liang
2026-11-28  8:35 ` [PATCH v1 1/2] clk: starfive: Add JHB100 System-1 clock generator driver Changhuang Liang
2026-11-28  8:35 ` Changhuang Liang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261128083554.2993-3-changhuang.liang@starfivetech.com \
    --to=changhuang.liang@starfivetech.com \
    --cc=bmasney@redhat.com \
    --cc=jbrunet+clk@baylibre.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®