From patchwork Thu Jan 25 06:10:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Wang X-Patchwork-Id: 13530025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6259C47258 for ; Thu, 25 Jan 2024 06:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QM6f3va/vu8ZpYe88MS+FnwEhja/J+sXkRD7sLod2D0=; b=kss5f5e+xnf3JG I9u0culUNk7DstJmTrKTgD4SiaYpagdmYouccC31SNytwVbeBKVvTfYU0WJO4XvWXWTn14pWc8e4c y/zz5qMN86g4m0EH8cfKE53qUApHrQWQeejPX9l+YGMJbokohZ3MzWzOuDV9kWlLmMdJkZLQ6Oyaz w62xt2vlxEwn79r6VB7JprIEEzpcID3t6aNmJIkM/6eiuQjd7/phaSDqVOLpAteMli7dpcQlAuLcb wus3CG+4snbyV+meaNUqAvAhULn0yTjP63idoMLa46YjYlq4c9k3fz+cHzQjuHlq9gNXL0OghEtrd PzDCTgoBffJJeoG0CfFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSswx-006fbp-23; Thu, 25 Jan 2024 06:10:55 +0000 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSswv-006faG-0e for linux-riscv@lists.infradead.org; Thu, 25 Jan 2024 06:10:54 +0000 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-20757468411so4244327fac.3 for ; Wed, 24 Jan 2024 22:10:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706163050; x=1706767850; darn=lists.infradead.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=juTltaRHemCcavfwicmcF+YQ/ilhPYwdWF3ZG+iZ1DY=; b=dHNMieqBHy16fyrPeR2Yz4e2Z+pLmPTB4+F/lB+sFcTAzS2lPuGYxuTW1JrTgJlAiE /IVnNY47DbDj4whhhPYruIAsd7bLWH6TlDdPPso2m+kS51V509lsTCS7zF3wF1/OCsI6 rkJ4YpwD6eC+CyW2fJgiZGUmeqwDE2j12j6DMcAVF9zNfgHhapYAKQ174ZP8MUopZqCp UuXaAkdwFJ+5Fy3ERvgIEZIREeaYUPOM3qA9m5Aze1ByU5I1s2cUKWbc/N0S9boKtLKn Pb9w7KT3lzNsB3GBT0T3/Wq4GJfvTuxSitImyMB6Cp0yqcIxJ1BRhGHjHMIMlwkU/s7K fzsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706163050; x=1706767850; 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=juTltaRHemCcavfwicmcF+YQ/ilhPYwdWF3ZG+iZ1DY=; b=YEAzPw4RTVS2UEGFrYLBrv8MOrDj60n+zFJR2c5Bv3y/lRJfgPzBJAC6F0BUCa9vRy WfTsuCPukTmU/wofmvmNdz1gGCgRWOOL2flIM478vxalLHAlJsNCZOBRaRQzh35PSOQc G5D4+chQGt/zfk6UYq2rIcb8mriodmDc7BpdOg4LBtOzqkHzaiDxmtp0XotPb6Vqr5M8 oBftekordHa7KlNZUB4M67gHlltcmriNaIo/Z05Cp1cwrPKXe3madKYpDcQfd/QvRhZU aezaOZZbXr1qkN2/dyEEXNIo7bHTTIjUthGF4R0mihrHjqQDQHySpxnSMfWYi3IEieO8 vZcA== X-Gm-Message-State: AOJu0YyGEo5M5UyG9XcoP723NXGDeYWe7Ect+GZQInkoCZJSWyqhRb9r L5epdwzwasjzWFtNJt1JuTF5MMQOu5VmJL3eqExMMVQulAojn4J6 X-Google-Smtp-Source: AGHT+IFxMBvucinN2QYuIClz4b7js+3wJ8BuY7lSJAxEiroFrkt2r6hiCal9FvJIMKTo2f5LgKDKZQ== X-Received: by 2002:a05:6870:9a1a:b0:210:9791:54f8 with SMTP id fo26-20020a0568709a1a00b00210979154f8mr448914oab.65.1706163050071; Wed, 24 Jan 2024 22:10:50 -0800 (PST) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id rb3-20020a056871618300b00214950bb6ecsm1034959oab.15.2024.01.24.22.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 22:10:49 -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, p.zabel@pengutronix.de, 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 , Krzysztof Kozlowski Subject: [PATCH v2 1/4] dt-bindings: reset: sophgo: support SG2042 Date: Thu, 25 Jan 2024 14:10:41 +0800 Message-Id: <0378935b41e9646b63fff282c995412aca41da13.1706161530.git.unicorn_wang@outlook.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240124_221053_241039_7385F36E X-CRM114-Status: GOOD ( 12.93 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Chen Wang Add bindings for the reset generator on the SOPHGO SG2042 RISC-V SoC. Signed-off-by: Chen Wang Reviewed-by: Krzysztof Kozlowski --- .../bindings/reset/sophgo,sg2042-reset.yaml | 35 ++++++++ .../dt-bindings/reset/sophgo,sg2042-reset.h | 87 +++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/sophgo,sg2042-reset.yaml create mode 100644 include/dt-bindings/reset/sophgo,sg2042-reset.h diff --git a/Documentation/devicetree/bindings/reset/sophgo,sg2042-reset.yaml b/Documentation/devicetree/bindings/reset/sophgo,sg2042-reset.yaml new file mode 100644 index 000000000000..76e1931f0908 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/sophgo,sg2042-reset.yaml @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/reset/sophgo,sg2042-reset.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sophgo SG2042 SoC Reset Controller + +maintainers: + - Chen Wang + +properties: + compatible: + const: sophgo,sg2042-reset + + reg: + maxItems: 1 + + "#reset-cells": + const: 1 + +required: + - compatible + - reg + - "#reset-cells" + +additionalProperties: false + +examples: + - | + rstgen: reset-controller@c00 { + compatible = "sophgo,sg2042-reset"; + reg = <0xc00 0xc>; + #reset-cells = <1>; + }; diff --git a/include/dt-bindings/reset/sophgo,sg2042-reset.h b/include/dt-bindings/reset/sophgo,sg2042-reset.h new file mode 100644 index 000000000000..9ab0980625c1 --- /dev/null +++ b/include/dt-bindings/reset/sophgo,sg2042-reset.h @@ -0,0 +1,87 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ +/* + * Copyright (C) 2023 Sophgo Technology Inc. All rights reserved. + */ + +#ifndef __DT_BINDINGS_RESET_SOPHGO_SG2042_H_ +#define __DT_BINDINGS_RESET_SOPHGO_SG2042_H_ + +#define RST_MAIN_AP 0 +#define RST_RISCV_CPU 1 +#define RST_RISCV_LOW_SPEED_LOGIC 2 +#define RST_RISCV_CMN 3 +#define RST_HSDMA 4 +#define RST_SYSDMA 5 +#define RST_EFUSE0 6 +#define RST_EFUSE1 7 +#define RST_RTC 8 +#define RST_TIMER 9 +#define RST_WDT 10 +#define RST_AHB_ROM0 11 +#define RST_AHB_ROM1 12 +#define RST_I2C0 13 +#define RST_I2C1 14 +#define RST_I2C2 15 +#define RST_I2C3 16 +#define RST_GPIO0 17 +#define RST_GPIO1 18 +#define RST_GPIO2 19 +#define RST_PWM 20 +#define RST_AXI_SRAM0 21 +#define RST_AXI_SRAM1 22 +#define RST_SF0 23 +#define RST_SF1 24 +#define RST_LPC 25 +#define RST_ETH0 26 +#define RST_EMMC 27 +#define RST_SD 28 +#define RST_UART0 29 +#define RST_UART1 30 +#define RST_UART2 31 +#define RST_UART3 32 +#define RST_SPI0 33 +#define RST_SPI1 34 +#define RST_DBG_I2C 35 +#define RST_PCIE0 36 +#define RST_PCIE1 37 +#define RST_DDR0 38 +#define RST_DDR1 39 +#define RST_DDR2 40 +#define RST_DDR3 41 +#define RST_FAU0 42 +#define RST_FAU1 43 +#define RST_FAU2 44 +#define RST_RXU0 45 +#define RST_RXU1 46 +#define RST_RXU2 47 +#define RST_RXU3 48 +#define RST_RXU4 49 +#define RST_RXU5 50 +#define RST_RXU6 51 +#define RST_RXU7 52 +#define RST_RXU8 53 +#define RST_RXU9 54 +#define RST_RXU10 55 +#define RST_RXU11 56 +#define RST_RXU12 57 +#define RST_RXU13 58 +#define RST_RXU14 59 +#define RST_RXU15 60 +#define RST_RXU16 61 +#define RST_RXU17 62 +#define RST_RXU18 63 +#define RST_RXU19 64 +#define RST_RXU20 65 +#define RST_RXU21 66 +#define RST_RXU22 67 +#define RST_RXU23 68 +#define RST_RXU24 69 +#define RST_RXU25 70 +#define RST_RXU26 71 +#define RST_RXU27 72 +#define RST_RXU28 73 +#define RST_RXU29 74 +#define RST_RXU30 75 +#define RST_RXU31 76 + +#endif /* __DT_BINDINGS_RESET_SOPHGO_SG2042_H_ */ From patchwork Thu Jan 25 06:11:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Wang X-Patchwork-Id: 13530026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1E45C47258 for ; Thu, 25 Jan 2024 06:11:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WY/wJmF1hjfL6TpGQn5jJwSvc69vHv7xF8sr8Jb88qw=; b=gpfYhFOE8YcgEe ltVpuq9IJD9g2fExl75wi5HmwulbbkugKVTLP5zO3WQCvxd78SGM6NXYcShdq+SWnh5sybr+YJVYJ iRhyp65iKgLq16nPeUN/zEg4FIUHv3FDdfFoHKQkj6Esiel0ynweHznfVDHzf1HrmUBtBgQSv1mrb Cb4Mc/TdTupDVi+mKKUxyZ8Uyu3I62eHnYVROKcwcfI9jamzO/HKsBK40Poet2KzGR2k+kQObs5a6 N293i/qOsoK78GZNpgpzbH8ZxIalC6n4lQ+NpYtmh4VSJ2W+LfDfoaDfRKTV72iSqM7kURvshcDLP mqRAIFRSxCg8Udz+gtsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSsxW-006fnH-0u; Thu, 25 Jan 2024 06:11:30 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSsxT-006fls-2y for linux-riscv@lists.infradead.org; Thu, 25 Jan 2024 06:11:29 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-2046b2cd2d3so4667037fac.0 for ; Wed, 24 Jan 2024 22:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706163084; x=1706767884; darn=lists.infradead.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=s517sYCaoEVuNYB9syue5DUwwMbcTuE6IgQKf5uVU5s=; b=BQnV+xKpYV7M/th3SDDVBuQgiNPm7SNNTLm0/hHO3+avooUPBqQq+Dz9wXIA/4lUH1 K3ym9lTw39ApQ2EFx3cR54p76qciyv3WhYg/vIUgKckPkeJpSWO3qtBL34QseZ53SyMg TBUWgpuZpNR/XzJpCmphwQM2TGrqRqVUZnXSaf2UMdSy8XCnCohdHG6JAhuv43lncRS5 IufMkMEjEVkqt23iNLVY0xFuz0d6D4AfqI24KWxFFQmy/rBTDRhni7uqUXrA6/HWM+sy Z/run0oYbAjJVj9Pi9t84xMNi040Oxvk4mbj3zUlnQDsHvxwfeb4EDW5Nj0rVMlsUp7S BMsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706163084; x=1706767884; 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=s517sYCaoEVuNYB9syue5DUwwMbcTuE6IgQKf5uVU5s=; b=iiG97nzvPGzH4yLskz3D2GWon12E0AJyVhE9RHJVRkchf+mka4mMzyptRJHqkEG5L+ QYi5SW9UaJxmQQ8yPm6OKqGKk+deXuQYvgpOPw9l3ggagKL8SjAmxvo61eFlACqRKvCE tOtaxUdn00796x65HbXssD4OxmZTYW214yyLPfNa46TAZ+02XDMyc/zy6nl9uFrTNw1s /hunyUa4UutN3WYTwQSqf4p+LX4yIo2SO4P2o3pL83SVR2dEgXY6KJScL8Dse7TR/dPr Ui+q9L6ARnOl3+MdItpTRb8FXrJgaPaKKasJeM2rT7kPDLS3TSBahE9JcOuowyWMNbRm CDWA== X-Gm-Message-State: AOJu0Yzw2rrFab36TnaazsDg8hPDZ0UA0oa1/MRxeLLHb8k2O8y4EoqS fq7qaUVPQZz5IADd38P6vF39xkyv+Dc/wyn1tSNzS1E1AWwS/bZ9 X-Google-Smtp-Source: AGHT+IEQ9QanoWE9WjkHB5disI5RqKPULpsFY5mHnV3nVO8tLPap+XHggGE5/ZXYYkVX3otzhrBTDQ== X-Received: by 2002:a05:6870:c0ce:b0:1fb:165c:473a with SMTP id e14-20020a056870c0ce00b001fb165c473amr524241oad.57.1706163084004; Wed, 24 Jan 2024 22:11:24 -0800 (PST) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id o6-20020a9d5c06000000b006dbffa39d39sm2910066otk.55.2024.01.24.22.11.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 22:11:23 -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, p.zabel@pengutronix.de, 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 v2 2/4] reset: sophgo: add SG2042 reset generator driver Date: Thu, 25 Jan 2024 14:11:14 +0800 Message-Id: <34650036ea5f1c500da54c67c3a67b91c4419399.1706161530.git.unicorn_wang@outlook.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240124_221127_965653_871C6F88 X-CRM114-Status: GOOD ( 15.26 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 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 */ }, }; 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. + From patchwork Thu Jan 25 06:11:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Wang X-Patchwork-Id: 13530027 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DBF52C47258 for ; Thu, 25 Jan 2024 06:12:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ANV1dhj8D6/O/ey5SStAnJ8SKwDdN0zLugNw48t/7oY=; b=3svmF8meqwa4UW ludlicxyyU5b77/tyNjxz0RtY/7QkDjE7mUaSxVd6ib9Q1yglM1pgkGWZSQd4kg4h4LMBCa5afJG3 9RT3tjYfRUPn+05EV2L9hF6H3VFQjt73TSluvLupnDFCupz0Tc2tnWw35Ya0HaARMD2J9dsCeqUqp 6eX7aBf8qiby7vyRnWWHZda0k0glkOYfTlr3cHfqnZiN/b5RdFGOgEvAHhiPEf+Wq20qVP1RNkHST RdB3xqRB1V/sUTSfKa4djkOFXkBG8IVidfQMyJ8e1GgBbr+YZCExCp8eZp62f5e9UpYYufFwmgIBq Vq5Oju4LCHafHpg99wuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSsxr-006fwP-1s; Thu, 25 Jan 2024 06:11:51 +0000 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSsxo-006fth-2o for linux-riscv@lists.infradead.org; Thu, 25 Jan 2024 06:11:50 +0000 Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-6dd8cba736aso4572380a34.3 for ; Wed, 24 Jan 2024 22:11:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706163106; x=1706767906; darn=lists.infradead.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=mXs4eXFLnV8TiKAn9u+8OI+mgIAVMlsd0Rv7wG5W1mg=; b=X2IeXYNM3uMkzHM5/PV5ZtrOqAL0KwfLcfoTqYd6G2qX6iaR1ks7ZNN4E2MmncXbeV 2qQju/EZcUjbAPeHmBr9xJN/lZQpcSeLqa1cKeLmm8e0UnaVW0erQSFlsY9jri8SyeS1 YFTMA9fT/S1/sU9uSZCvRkkIL8rtkN7GlyrKC+vimHoqAn1nozKmgbo93+EvbDs+s4lU favCDn+z+ZfYEej79I9vz17quNNWNIZoRETQnJOJHLqEL0SS8Msaku0GAcQBbYdy48w0 Vwk7LCRBdUcKAeXWVReNB0IRTwPaZV6+BoDrEi8xFrlmUCcXkpZrFmPaPOQ/ZXBZjRPV e0cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706163106; x=1706767906; 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=mXs4eXFLnV8TiKAn9u+8OI+mgIAVMlsd0Rv7wG5W1mg=; b=hvayL1CyWuksQgqlzXddUzLSPYx2w8sx2JTHGk3rpFefaqKxK0RtKHBOIf5yuL9jGF pyI2C22+YNzWz4/WFIn3YdISU60tm96IOEMWi8oykiZQPhL8pKcOCmb+3Ej5XmyyHinC Lz4rpxRqNV6YmPoINx+wlVORYkAp0e7sVeSH4Gf5GPqLAovRz2pGjlWdOiCUVFKksXnr g7k54bExIF6qu/chS3dt3DX00YivazMOAhNdXNmmWY4fTrLIqvocIES4IAOE0MdEiZDO QJ5KIiCuDit20MxUhaFN9ibBDJb9E2ZK3c31aWGnvk3E1MVWZ7fb/+RE6KjDqJQRVrD6 8zMQ== X-Gm-Message-State: AOJu0YxoKqaBJJ1UkLEYoNaV6+zl1bycevd20wwoqjLc3BxR+3Yz/1i5 hLcA8rsVCRKN26k1AYX1068gH/rLH8QPAv2JWcpdZMPaxxB21wbZ X-Google-Smtp-Source: AGHT+IGPv8XWHmnipQpI8c9vTBTtdJ/LiW9rOnrrb8ZlyCZnBJ3lppf9GtyMaw27UoUrBTpiCfqXsA== X-Received: by 2002:a05:6830:1cc:b0:6dc:12e9:f638 with SMTP id r12-20020a05683001cc00b006dc12e9f638mr440913ota.11.1706163105715; Wed, 24 Jan 2024 22:11:45 -0800 (PST) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id s18-20020a056830125200b006ddd602afccsm2886399otp.66.2024.01.24.22.11.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 22:11:45 -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, p.zabel@pengutronix.de, 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 v2 3/4] riscv: dts: add reset generator for Sophgo SG2042 SoC Date: Thu, 25 Jan 2024 14:11:36 +0800 Message-Id: <09cd6540365a44ba2f45062a6afd920f4f4a921f.1706161530.git.unicorn_wang@outlook.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240124_221148_909016_D93583C2 X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Chen Wang Add reset generator node to device tree for SG2042. Signed-off-by: Chen Wang --- arch/riscv/boot/dts/sophgo/sg2042.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/riscv/boot/dts/sophgo/sg2042.dtsi b/arch/riscv/boot/dts/sophgo/sg2042.dtsi index 93256540d078..f59081d4f0ee 100644 --- a/arch/riscv/boot/dts/sophgo/sg2042.dtsi +++ b/arch/riscv/boot/dts/sophgo/sg2042.dtsi @@ -6,6 +6,8 @@ /dts-v1/; #include +#include + #include "sg2042-cpus.dtsi" / { @@ -311,6 +313,12 @@ intc: interrupt-controller@7090000000 { riscv,ndev = <224>; }; + rstgen: reset-controller@7030013000 { + compatible = "sophgo,sg2042-reset"; + reg = <0x00000070 0x30013000 0x00000000 0x0000000c>; + #reset-cells = <1>; + }; + uart0: serial@7040000000 { compatible = "snps,dw-apb-uart"; reg = <0x00000070 0x40000000 0x00000000 0x00001000>; From patchwork Thu Jan 25 06:11:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Wang X-Patchwork-Id: 13530028 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5162AC47DDF for ; Thu, 25 Jan 2024 06:12:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nlOjlZjvHnw4y+3++QZ3TO0uJMwQ+C3KOhyGeRwEx5U=; b=csIauRnIe4cEaT 5++sLq5/eDk5kmHIvbaaXfjL97mPIJ8xiOBkAvatj/7ZeqGyjg9ERzzNEQIKcSJGxtOgPfWln9MqD z6+X69gm9EmaFdUf6o93X8tYXLDtfh/lGnoZLV4hJUEr/GrNF0t7wu7nExYlBg5f2x9K1tuLy/719 xzwu1pDq3spn3Jod1LDzUOBpJ5ZtGyQro6pd8fZM2YKsSZ8PU/T3/formY1VXtmgv+Wco7Gqx5bn8 yu7JXI/djev3stRiLwFscsrzsDNFRUC6nKCK20jSWh4HoXU+Kc+RhYTKu7cMw94mMRqxpK3/WLyKT 4+sZCVtoMTwUVOmmBNIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSsyB-006g4z-2v; Thu, 25 Jan 2024 06:12:11 +0000 Received: from mail-oa1-x2b.google.com ([2001:4860:4864:20::2b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSsy9-006g1v-0z for linux-riscv@lists.infradead.org; Thu, 25 Jan 2024 06:12:10 +0000 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-210ce33ea1aso3433635fac.0 for ; Wed, 24 Jan 2024 22:12:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706163125; x=1706767925; darn=lists.infradead.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=H81WNcgEuRcj9vRkVpM+pIQnKvMNYSKJ0QdzyPMV5tY=; b=nMh1fD90uC+N2AGG6JNk/4caYB2COwMl64vsuRcXcd0/NPsB9pvVxvTpaPU7B17ogF IS1Fb9Mq7ugYNT8FWYI8KCa4ZJ8oeZCfxqNYiAzwPYZVw1lyJIYmEorPbtZWxE8DSXpx i1eVbG/0uXYNMIN09TqeC4JQk89OxQvzMnO8ormonv4t78O/OOelKwHZxn5Z0hwH3Qat ZCq8EhcczS5UR0dRhXmL7JwJysfKeTdbhyYzVMfAjqnO4mgkFcMUErEPD1MWyXA3/Qmo U09uQXGOV2HsTDvq7+D7YI+C89kbNsVo7K1Y25J1EYyVlCcRJNvFAmD7N4McYzmPhIFS x1/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706163125; x=1706767925; 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=H81WNcgEuRcj9vRkVpM+pIQnKvMNYSKJ0QdzyPMV5tY=; b=rgYawlj+lSTPxQQ6BCnUsGTtObh8tuYJvRwnKx7J+H+3b5HjGZdEdS0kBRf6iukkJv pRaHcgT9rRht8oA0h2gstg0YtJuF/0tX+ZbpNSwkkbsTnK3JMQ+Jt1zHhB3Nt+8xekTW lH4nsVGWHlU/Vmkc+7Tcw/V34kvtmStuzXMPuZJkstEPfw31Zom/tZVWjRx9nDIuURGw 5yp6M+Ch1s2XgPcfkwrfrCtuSAQTFHhGbUco2kt/DMs5QTxUOVSkn4Tc9B+Qu2moJ4BR WQIwq205VmqHNIBvZ5TNg7pQNpxnV8nDpv3jvih7YKucR3gYbtm3rjaJBT5exnoasWfw djpA== X-Gm-Message-State: AOJu0YxnPjqAyAgkfOf/N91xDOBFV6agRSA0XQF0zlJWAEN+7+dHEn9L DBvA/HzfWaJW1r7vcMJpRXLEPyHsKvmKmqTwLAoUceWtEiNJ+Vl60DLgWiMnGCI= X-Google-Smtp-Source: AGHT+IFPAbDHMb1RVDBOGKQTTme4ARS/WDZd+tSOVRZYGMKOHH2zF50aLIbedrsXEpPlEeMYn1zKBQ== X-Received: by 2002:a05:6871:73a9:b0:210:d251:8180 with SMTP id na41-20020a05687173a900b00210d2518180mr417453oac.9.1706163125441; Wed, 24 Jan 2024 22:12:05 -0800 (PST) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id w4-20020a056870a2c400b0021453296524sm2006054oak.41.2024.01.24.22.12.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 22:12:04 -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, p.zabel@pengutronix.de, 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 v2 4/4] riscv: dts: add resets property for uart node Date: Thu, 25 Jan 2024 14:11:58 +0800 Message-Id: <685eeea20960d96ac2c37eb8990e1f7112ee4178.1706161530.git.unicorn_wang@outlook.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240124_221209_345951_B9843994 X-CRM114-Status: UNSURE ( 9.28 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Chen Wang Add resets property for uart0 for completeness, although it is deasserted by default. Signed-off-by: Chen Wang --- arch/riscv/boot/dts/sophgo/sg2042.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/boot/dts/sophgo/sg2042.dtsi b/arch/riscv/boot/dts/sophgo/sg2042.dtsi index f59081d4f0ee..03266f216021 100644 --- a/arch/riscv/boot/dts/sophgo/sg2042.dtsi +++ b/arch/riscv/boot/dts/sophgo/sg2042.dtsi @@ -327,6 +327,7 @@ uart0: serial@7040000000 { clock-frequency = <500000000>; reg-shift = <2>; reg-io-width = <4>; + resets = <&rstgen RST_UART0>; status = "disabled"; }; };