From patchwork Tue Jan 9 09:17:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Wang X-Patchwork-Id: 186295 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp1534817dyq; Tue, 9 Jan 2024 01:25:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9j0025b8XfjXhw4CRPaKbVmvCBKRzOs6bGg9TILyFOKmv4B2mDUm1ta0UdP+g2eh2LoRF X-Received: by 2002:a05:6358:7606:b0:172:b387:51bd with SMTP id r6-20020a056358760600b00172b38751bdmr3265032rwg.25.1704792328641; Tue, 09 Jan 2024 01:25:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704792328; cv=none; d=google.com; s=arc-20160816; b=POM0H1Mg7ulsDKXNrQe/cEz8M3WNho9KEHbR8EgMNDqMwp/b4MGEVkG4LNBBvm2FZQ J+IDZN3c3iDlgDJsHEvwrLDrzpkhFhyFv88tXWlLDl36gwYQMmiyZyCHwBTmj1+vUOGv gNYSBq7otJdUQJWlSYP7L9/3s4twmY+Ly0mLQEu5ZAiHvyT4l9cbUNSDtdPsLoACxxny UWwX6ff5bS4//Zj6X8gxgvBY7aAkx/zxqiQIiuFY1E+fL3XRzylwpUTP+hzrR84aIa4L a4xhdjoJQMLAzm1F+yESEg9NCfmSAwfYBi4oVWt8AJAbvzc6BHyZFi/BVfWBHPZ4XmUw vlWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=aWGh9TyULl5axYB+y4TjSKeR1pcTY+hQLJUbaZKUyYM=; fh=jX9fIh1bjB8RAhn5HixkcmbcyJAY/8c89PNT5AUyArY=; b=H8RB4yzGj7o+pHCH7P0Uqd+kfazoF9TxuZF1hPeW5ggEjOkzzFL2ROd5F3EOEWzGbK x8Daj85Oe7RscgXMivWpqPDnkhIj7KyX7ct51IpMF9KTYrdcW3SHZH67KvKzV9sSYz45 XxN4b+0m+87aucE32D5lwFnCiMIxW27/W3Isyq/zHD8SLFs1Q/urUPdCzlgbTbOtHRJZ 5FZfJB8y7ZBXXTNVBMmDK7PGF83lrsOi7LWlqFO4hazMj0xnNApsqsjQj2p8li44182k KbJPsqQouPyubE9NAZGd5mlnE//hK+NSJIlZq086KEqHy9xxgLg/mAbx4HO/FCluhLSp E6vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HiF51jzn; spf=pass (google.com: domain of linux-kernel+bounces-20641-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20641-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u22-20020a63f656000000b005ce0b70d2a0si1179603pgj.88.2024.01.09.01.25.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 01:25:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20641-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HiF51jzn; spf=pass (google.com: domain of linux-kernel+bounces-20641-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20641-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 37065B2556C for ; Tue, 9 Jan 2024 09:17:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 930322EB1C; Tue, 9 Jan 2024 09:17:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HiF51jzn" Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (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 B3CD932C63; Tue, 9 Jan 2024 09:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f173.google.com with SMTP id 5614622812f47-3bbbf5a59b7so2503769b6e.3; Tue, 09 Jan 2024 01:17:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704791844; x=1705396644; 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=aWGh9TyULl5axYB+y4TjSKeR1pcTY+hQLJUbaZKUyYM=; b=HiF51jznc9NSNV0q/6NkKsvjyj+wwcomj/A+bXkQFSNydKRMfilsPErMy+96qxMlLU SBI2g4PskJimlX+xcvQrrDQx4U02rdMAhsAj4p6qZxBdPcCsE2VqjGMHp1AVExhdiHjP +uNBgtqNlMl8Xed7pmAELSShOBslAN8wfJZ2IyIL6yPPnJNnvRPQMk+uerICILra1nzV OTq2MtjwhzYDE7ZpRGXD2V/f1H7EvwpFaoCIs7+gtQ16s7Dol5kEQYXHw6wmNanHlFCc dZssazuBqkhd4xN5wBkBOJYFTxy69XulyJXRZ9niN3Ma02DWbrQqDmpOfoD0iSp/TphV sccA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704791844; x=1705396644; 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=aWGh9TyULl5axYB+y4TjSKeR1pcTY+hQLJUbaZKUyYM=; b=gooakEFkaifFs2CzYWJpTEwpned+qMmVZVgbIzw1kBGHYUzarkgnu8luptWFrBj0kP HVIs5S16EWr/SCPCS50cBjom3+ZFiBgks5zvo8/9bL4rsYtNsB2NPxXFlbNQ8HkhOhRR wjEWemzXnEvCjHf8owwl1ulCHWsL/7ioPSknNabCthZ6iobNLUe+7eVQwebf/L7bL9wj 9W+dvRJb0nx8l4GLal+W7QTerI5Bf6MIn6udA+QggkXmmhv22KNARLA/U3TfuaCcgRxp Bo+6bjWeTIdLvbc1xh84fvInaDsgqijWx2I4y4EW6/YQ8hEvYaRu+kgr3GNcqANe0SKD 9/Cw== X-Gm-Message-State: AOJu0YxUY24s6qyTcA5Y27ujA2/9yIvADZFuE7s0k/nAh7gkVy/IjYza deGXj7DhFyRkahxuAPvPuMlsdczZZ/g= X-Received: by 2002:a05:6871:3a26:b0:1fb:17cc:1786 with SMTP id pu38-20020a0568713a2600b001fb17cc1786mr6467549oac.4.1704791844714; Tue, 09 Jan 2024 01:17:24 -0800 (PST) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id o22-20020a9d5c16000000b006dc0802ddf5sm305361otk.5.2024.01.09.01.17.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 01:17:24 -0800 (PST) From: Chen Wang To: aou@eecs.berkeley.edu, chao.wei@sophgo.com, conor@kernel.org, krzysztof.kozlowski+dt@linaro.org, palmer@dabbelt.com, paul.walmsley@sifive.com, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, haijiao.liu@sophgo.com, xiaoguang.xing@sophgo.com, guoren@kernel.org, jszhang@kernel.org, inochiama@outlook.com Cc: Chen Wang Subject: [PATCH 2/4] reset: sophgo: add SG2042 reset generator driver Date: Tue, 9 Jan 2024 17:17:15 +0800 Message-Id: <06e493ad0d64c1ba5c5897eb452ff04095f05e7a.1704790558.git.unicorn_wang@outlook.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787604320827400143 X-GMAIL-MSGID: 1787604320827400143 From: Chen Wang Reuse reset-simple driver for the Sophgo SG2042 reset generator. Signed-off-by: Chen Wang --- drivers/reset/Kconfig | 1 + drivers/reset/reset-simple.c | 2 ++ drivers/reset/sophgo/Kconfig | 10 ++++++++++ 3 files changed, 13 insertions(+) create mode 100644 drivers/reset/sophgo/Kconfig diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index ccd59ddd7610..09ba59cc4bc5 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -318,6 +318,7 @@ config RESET_ZYNQ help This enables the reset controller driver for Xilinx Zynq SoCs. +source "drivers/reset/sophgo/Kconfig" source "drivers/reset/starfive/Kconfig" source "drivers/reset/sti/Kconfig" source "drivers/reset/hisilicon/Kconfig" diff --git a/drivers/reset/reset-simple.c b/drivers/reset/reset-simple.c index 7ea5adbf2097..69b631eb8127 100644 --- a/drivers/reset/reset-simple.c +++ b/drivers/reset/reset-simple.c @@ -151,6 +151,8 @@ static const struct of_device_id reset_simple_dt_ids[] = { { .compatible = "snps,dw-high-reset" }, { .compatible = "snps,dw-low-reset", .data = &reset_simple_active_low }, + { .compatible = "sophgo,sg2042-reset", + .data = &reset_simple_active_low }, { /* sentinel */ }, }; diff --git a/drivers/reset/sophgo/Kconfig b/drivers/reset/sophgo/Kconfig new file mode 100644 index 000000000000..9ad96e49e1dd --- /dev/null +++ b/drivers/reset/sophgo/Kconfig @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0-only + +config RESET_SOPHGO_SG2042 + bool "Sophgo SG2042 Reset Driver" + depends on ARCH_SOPHGO || COMPILE_TEST + select RESET_SIMPLE + default ARCH_SOPHGO + help + This enables the reset controller driver for the Sophgo SG2042 SoC. +