diff mbox series

[v3,2/4] reset: simple: add support for Sophgo SG2042

Message ID 1cfd7b3ba447942784c4f7aa595e962399e9f617.1706577450.git.unicorn_wang@outlook.com (mailing list archive)
State Handled Elsewhere
Delegated to: Conor Dooley
Headers show
Series riscv: sophgo: add reset support for SG2042 | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/patch-2-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh
conchuod/patch-2-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh
conchuod/patch-2-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh
conchuod/patch-2-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-2-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-2-test-6 success .github/scripts/patches/tests/checkpatch.sh
conchuod/patch-2-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh
conchuod/patch-2-test-8 success .github/scripts/patches/tests/header_inline.sh
conchuod/patch-2-test-9 success .github/scripts/patches/tests/kdoc.sh
conchuod/patch-2-test-10 success .github/scripts/patches/tests/module_param.sh
conchuod/patch-2-test-11 success .github/scripts/patches/tests/verify_fixes.sh
conchuod/patch-2-test-12 success .github/scripts/patches/tests/verify_signedoff.sh

Commit Message

Chen Wang Jan. 30, 2024, 1:50 a.m. UTC
From: Chen Wang <unicorn_wang@outlook.com>

Reuse reset-simple driver for the Sophgo SG2042 reset generator.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
---
 drivers/reset/Kconfig        | 3 ++-
 drivers/reset/reset-simple.c | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Chen Wang Feb. 15, 2024, 8:59 a.m. UTC | #1
ping ~~~

On 2024/1/30 9:50, Chen Wang wrote:
> From: Chen Wang <unicorn_wang@outlook.com>
>
> Reuse reset-simple driver for the Sophgo SG2042 reset generator.
>
> Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
> ---
>   drivers/reset/Kconfig        | 3 ++-
>   drivers/reset/reset-simple.c | 2 ++
>   2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index ccd59ddd7610..2034f69d5953 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -213,7 +213,7 @@ config RESET_SCMI
>   
>   config RESET_SIMPLE
>   	bool "Simple Reset Controller Driver" if COMPILE_TEST || EXPERT
> -	default ARCH_ASPEED || ARCH_BCMBCA || ARCH_BITMAIN || ARCH_REALTEK || ARCH_STM32 || (ARCH_INTEL_SOCFPGA && ARM64) || ARCH_SUNXI || ARC
> +	default ARCH_ASPEED || ARCH_BCMBCA || ARCH_BITMAIN || ARCH_REALTEK || ARCH_SOPHGO || ARCH_STM32 || (ARCH_INTEL_SOCFPGA && ARM64) || ARCH_SUNXI || ARC
>   	depends on HAS_IOMEM
>   	help
>   	  This enables a simple reset controller driver for reset lines that
> @@ -228,6 +228,7 @@ config RESET_SIMPLE
>   	   - RCC reset controller in STM32 MCUs
>   	   - Allwinner SoCs
>   	   - SiFive FU740 SoCs
> +	   - Sophgo SoCs
>   
>   config RESET_SOCFPGA
>   	bool "SoCFPGA Reset Driver" if COMPILE_TEST && (!ARM || !ARCH_INTEL_SOCFPGA)
> diff --git a/drivers/reset/reset-simple.c b/drivers/reset/reset-simple.c
> index 818cabcc9fb7..276067839830 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 */ },
>   };
>   

hello,  Philipp,

Can you please have a look of this, I have fixed the issue you raised in 
last version, any question please feel free let me know.

BTW, will you pick this for v6.9 if it is ok to you.

Thanks,

Chen
Philipp Zabel Feb. 15, 2024, 12:45 p.m. UTC | #2
On Di, 2024-01-30 at 09:50 +0800, Chen Wang wrote:
> From: Chen Wang <unicorn_wang@outlook.com>
> 
> Reuse reset-simple driver for the Sophgo SG2042 reset generator.
> 
> Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp
Philipp Zabel Feb. 15, 2024, 12:46 p.m. UTC | #3
Hi Chen,

On Do, 2024-02-15 at 16:59 +0800, Chen Wang wrote:
> ping ~~~ 
>
[...]
>
> hello,  Philipp,
> 
> Can you please have a look of this, I have fixed the issue you raised in 
> last version, any question please feel free let me know.
> 
> BTW, will you pick this for v6.9 if it is ok to you.

Yes, I intend to do this tomorrow.

regards
Philipp
Chen Wang Feb. 16, 2024, 1:38 a.m. UTC | #4
On 2024/2/15 20:46, Philipp Zabel wrote:
> Hi Chen,
>
> On Do, 2024-02-15 at 16:59 +0800, Chen Wang wrote:
>> ping ~~~
>>
> [...]
>> hello,  Philipp,
>>
>> Can you please have a look of this, I have fixed the issue you raised in
>> last version, any question please feel free let me know.
>>
>> BTW, will you pick this for v6.9 if it is ok to you.
> Yes, I intend to do this tomorrow.
>
> regards
> Philipp
Thank you Philipp. One more question, when you pick this patch (I mean 
2/4), will you pick the bindings (1/4 of this patchset). I will hanlde 
other patches about dts.
diff mbox series

Patch

diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
index ccd59ddd7610..2034f69d5953 100644
--- a/drivers/reset/Kconfig
+++ b/drivers/reset/Kconfig
@@ -213,7 +213,7 @@  config RESET_SCMI
 
 config RESET_SIMPLE
 	bool "Simple Reset Controller Driver" if COMPILE_TEST || EXPERT
-	default ARCH_ASPEED || ARCH_BCMBCA || ARCH_BITMAIN || ARCH_REALTEK || ARCH_STM32 || (ARCH_INTEL_SOCFPGA && ARM64) || ARCH_SUNXI || ARC
+	default ARCH_ASPEED || ARCH_BCMBCA || ARCH_BITMAIN || ARCH_REALTEK || ARCH_SOPHGO || ARCH_STM32 || (ARCH_INTEL_SOCFPGA && ARM64) || ARCH_SUNXI || ARC
 	depends on HAS_IOMEM
 	help
 	  This enables a simple reset controller driver for reset lines that
@@ -228,6 +228,7 @@  config RESET_SIMPLE
 	   - RCC reset controller in STM32 MCUs
 	   - Allwinner SoCs
 	   - SiFive FU740 SoCs
+	   - Sophgo SoCs
 
 config RESET_SOCFPGA
 	bool "SoCFPGA Reset Driver" if COMPILE_TEST && (!ARM || !ARCH_INTEL_SOCFPGA)
diff --git a/drivers/reset/reset-simple.c b/drivers/reset/reset-simple.c
index 818cabcc9fb7..276067839830 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 */ },
 };