From patchwork Tue Jan 9 09:16: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: 13514688 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 3AAAAC46CD2 for ; Tue, 9 Jan 2024 09:17:03 +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=CR99Z3nme81ZyhH7Ich3zD3WmBCcmKZx6VV7ZhxmJYo=; b=llGJN5tMs0YVTh ZA8EYmQK6PwsvoPJWA3PMZQtCaO/yn0ylKm5VT/aYgojIm8pzvulCM5CXLO5pLuJamhG051PbA+Dt YtV5Pti8SHjFZ3mAGdIOQxyyK6KhcKGnnfas1syb96YaY8X4rL9BnhFUaKuxq8OBPH2vfp5RHLykR zoaaAbxdqdlqHqMpIYeyaZnWWXiHBOnTkNFBDgQ4M09Xf6Yj9wk2b6fGTasIfcOX9+JHg/4oGKV7t 0IFlRMabCMa1Wb7uKAiRQSrdmVrovgs9PSb6UUnOtrcNuwvsvcFdL2W/upqV/hY6zrxkVzuXC/BhX fSNDiHAWokNdO5DPnqRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rN8EC-007Sli-0n; Tue, 09 Jan 2024 09:16:56 +0000 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rN8E8-007Sji-27 for linux-riscv@lists.infradead.org; Tue, 09 Jan 2024 09:16:54 +0000 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-2053f5e97b2so1932342fac.3 for ; Tue, 09 Jan 2024 01:16:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704791811; x=1705396611; 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=uPNFZBbuaAO34pis2FOL3RIG+0DI0ThEyhDzqc1WUV0=; b=KXVoH7XQNQgQbND3vKLXiVCIbA1SMKMniicBE9eVgsrYp3sftAzGaNhd64tuJrt7/7 Kyo1zhVJfWIt7wBCDkmQ3FMZ5kDYaWBTfe6c1FXCw/EC4JK5tPaSA5ddYqpoblb033Ig lfqkh06huobNCjeXXtQ0YJCfMXGXOEahOaeQBrkAq0fZrskXmYv6Db5JMFNCAldr615p wk5d8Cm/eAWWsSKsCmaiEO7Home61uOqWjOy/KV/CqW5MVpAnozRVNATaycIXnRsHHi1 e7eQg4RF+T8QPvBKD0qNqEGA//FiQnGX8pQsiTKx+4naB8pWnfBpzSTKSJtzpzyeisxw afwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704791811; x=1705396611; 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=uPNFZBbuaAO34pis2FOL3RIG+0DI0ThEyhDzqc1WUV0=; b=G5nqjzVKOn5E1QDx0OrvkH32l0GB9SdgaymWfHufdqQ+aC+ylVkY95+YaZnHrAljXZ CcP5cEsMfgikExwHCFbzCar8dIMRBMr83O0IiM4eI1pd5K1wtTmpPp2wfXEho988Ah2m fiviZmc5gzGijv3BctjhJY1oRjUhwJ8tMRFi4iSRGLicb4FGm5rqL35qkRj3HE6kbmqM TZzO4UzLmJ5K72Dv3gESjc+ALGammsaAnp6jB4vCQNc4gd/zKrLIZMDsjPxWXRGYFCws O+mR6UsSJbVZuw/VPJEef+PIPA24OSjHcW7YMrfLZxksWNL4O0Yr2Bu9xW0DEKYo7WOm PLcg== X-Gm-Message-State: AOJu0Yy4BtuF+Tt6AJlscAy+C/JT1Tb2Dd6LeVA3dQLsU+Wemd6Yn5gl xuVPU1cGiYDfAmDkVuYfzpU= X-Google-Smtp-Source: AGHT+IESyX+yTTHmw6YPFuuFRd1KpXg//Na1hXFVDNcY7i0q5xVWxUMT5xawbpLyASDSNp3Jsn4piw== X-Received: by 2002:a05:6870:d886:b0:203:cac5:f217 with SMTP id oe6-20020a056870d88600b00203cac5f217mr6512941oac.109.1704791810405; Tue, 09 Jan 2024 01:16:50 -0800 (PST) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id dy51-20020a056870c7b300b00205eed77439sm390194oab.40.2024.01.09.01.16.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 01:16:50 -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 1/4] dt-bindings: reset: sophgo: support SG2042 Date: Tue, 9 Jan 2024 17:16:41 +0800 Message-Id: <9798e2ea0c4e339717cc5c411e0db0188befdc58.1704790558.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-20240109_011652_706107_D66F9C7D X-CRM114-Status: GOOD ( 13.36 ) 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 | 88 +++++++++++++++++++ 2 files changed, 123 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..750197e2c2ed --- /dev/null +++ b/include/dt-bindings/reset/sophgo,sg2042-reset.h @@ -0,0 +1,88 @@ +/* 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 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: 13514689 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 D2E58C46CD2 for ; Tue, 9 Jan 2024 09:17:37 +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=pppaE9U6xf4y//J++IQvEmmuRuR51kAhnbKFuLCBN2s=; b=f0glk48s2ojOGc CPaQjTFVKrHLTWm5N2SJTqhvInjgwM/0zYVvsmSNO1SE8n2PUwfz/q5TAt/NBGSiUagb2BrWfQoBq 3lqgEtyWQfUrPBAFWvRZeJ1vpGJ1SNXUN3oE0NEmh538/ahIYTaywQLzu+MbsjhxZcUONge2e5DUq tK5dALUEaE2uHqLQ1ZMUTMFiMwkLC3neT/c8NnS45Amb3d1Jo3qfRJ54wT7nbPI4P0/mg8l4NeoOD H2/qH/uBs92xHc33SZ0p2oeHG/3v/SS/MPvW0xmQwTZ/ZDraYavM7g6a7pS8NY+homAIuUmDYrUh8 ENSHV3yjFIM9zNU2Bkmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rN8Ek-007T7H-2s; Tue, 09 Jan 2024 09:17:30 +0000 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rN8Ei-007T5Y-0K for linux-riscv@lists.infradead.org; Tue, 09 Jan 2024 09:17:29 +0000 Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-6dbfdb41a63so1854142a34.0 for ; Tue, 09 Jan 2024 01:17:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704791844; x=1705396644; 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=aWGh9TyULl5axYB+y4TjSKeR1pcTY+hQLJUbaZKUyYM=; b=RhlvzdDtqINv+VfTP0A2+tvFAODORG3HI44b4XngynhPypywz9kEooF8s0rTlW3jxu rs3qV+JZAQ6IotNYJOXyqwmZdBd0GW2sCmB0JvyHYsnOkehWYbfHhJqspB7FKZj2R/do I7ysWK3JTZ6m6Z6jd4a8c9v1Zm5g//vj8rJy9Vt85HgTJiUogAmyhlgycimkkUCYWtqP eQp3Ybif1b8C0WqaTzoVAZTR4myPXtWj2FUCAjkO364fZP5bDsRqTXEQe8887I53uP2z SoPHP8rsHd9GjdXyLl0gTCwviebyL98RoipWGKuNwefhH7732odnpDnou/R1J7oiRiky HmpQ== 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=oWMwpCkDY2660TCSIbBvUe43FZDqqM6XHHoBm8hjT3RZdadb22iNsE7KB35BUc7MBE mUkZrqlBzLqu4AVAAbz8jRlSVyWdYhj4J+EEamSq9EbwMCdmkhatLet+DQco6K7MOFiY 8t9cjS5lKBA6N+69CujnNDPNsU046oyo8OV0ZWdhuLvZ20tfu2r000Fe0Tkxmmx5ZPfR ZI1HngFkd1lpcGkryTijWb6FMaupJRLWasMA2kAeqONUV6cUwDVM9brtu3uUBG8svwNR Q494U9BPpAqlUYT/ekegwV8aOhtvEyq6+FGYlSidr16Czjtt3dVXECTGX7cos3VrYNtf jeLA== X-Gm-Message-State: AOJu0Yyz0SiP9MJ5a/dm5IUMi3DInHPS2NtDVgGLuS6ruqYOzE3+Z3v8 +Zl2yLo4kLQewJ34F4TigQs= X-Google-Smtp-Source: AGHT+IFKxoZ8douUKwO8MFgZ99uh8kdpDWRiWeKVgDWpGH6Bgdpj0FIy2C86fhkHBmvt++YSJBspxA== 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: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240109_011728_139716_1F9585A5 X-CRM114-Status: GOOD ( 15.23 ) 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 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. + From patchwork Tue Jan 9 09:17:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Wang X-Patchwork-Id: 13514690 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 290F6C47073 for ; Tue, 9 Jan 2024 09:17:52 +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=zEMh1xHQJ5UwHS qMZO7eXjF8Dx4P/GMBqUX7+bqY2nLsoPS6jffSzZO21mmWBkg59O5xN1+oTsw5AY+qCW3Bv3TWgGz WSlGf9MaaMemN91+1kuF28sieBrUZedXt0r02/i4Y2QinqwusoBOlDNSY24m+34niQS7fVsc15TO8 dOKOua5VkNWkIrg7JqMRPT9c0lf/iweI9OxKImWlL3bqyOCKrFGX0AQDaXf64V3ydaa7Q7U34nTWX AuXqEUJzTxS/ZQAzoNjM9tkYDAGYtJdalI5C+TvLioxyrima2m0JGZKEvAADqLqad08UX+YOQ8MJY HOublFBUYmuhufdY4I4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rN8Ex-007TEm-38; Tue, 09 Jan 2024 09:17:43 +0000 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rN8Ev-007TCS-2N for linux-riscv@lists.infradead.org; Tue, 09 Jan 2024 09:17:43 +0000 Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3bbbc6bcc78so2730109b6e.1 for ; Tue, 09 Jan 2024 01:17:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704791860; x=1705396660; 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=aC3YMsFHCoRPHjQ05aGEUACyXacKvT9P2zE4Ud8A0yycVdJVVKiwuuDZ3GK2j2DVwZ BYsNiL1i4ttfh+yGmLekPbTx+noZln0BGYq3lMZ1Kk3St+5MEqxIBQmus2qRUQjwU0sI 1Y1Cr9FLuhwS2k1F/sSmTt1Bte2dK0pr8HXw4GCUGvYwpdVTuSSwVDu2v30CM5qaIqRF m3E31MmKFDKSUvvnQyAG2UMje0j5H49vcMnuMdPxOp8IbkUUXm+vqHw2N8I9Yct1TN3O iqKLbSMwj5FseCLgkhZlslUXOib5JoJ1UXPuM9izMinzGHn0Y4jC6ZdJ1e8y2Ziau4nc 0aSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704791860; x=1705396660; 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=XQkhy2aT+x6US1bVwo/wDSRladJib9CRARmLFShpmKPzQxE+mAjmjS50gjXphApbSX XrsEeLbBAUmO7kMgka+VT3vT0Cx64cZ2uZo+OYPYW2weNIbiOhf998ttO9Q/ynVXAaZW ofoUNUKbHM+1VscfqH9cUoBGn1DiALwIH2ShgJWdZiM/Du1kUW5g/a/+KEKXPLcTmOv0 guQ7t3qwfcvdJKTRQ9zixdCp+TZ1aaEFQ5JzjFID2FaV3RU6xVSZLIVvj8f53svZXjQT txg1IqDQq71vocKVGZ2ARSYuUKj+5gTRH/JOuDV6NtYZZresHyukuMsm0liNgzR3O/O4 8NPg== X-Gm-Message-State: AOJu0Yx8r2sSGF5VIq7j2AZQNWBWp2aM1463W+XF+6ZumM4CONC20I/X dCLsNErLd0ut4R4IcyKJsGg= X-Google-Smtp-Source: AGHT+IG5TJb1vDclA0CAeMnXEGX5CF/pIpS0qcbrdsN3/Y771f6XsB4pMSwsM6DHFg7COEhjJpI10Q== X-Received: by 2002:a05:6870:1686:b0:204:762a:f8a1 with SMTP id j6-20020a056870168600b00204762af8a1mr6833578oae.111.1704791860339; Tue, 09 Jan 2024 01:17:40 -0800 (PST) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id dh1-20020a056830484100b006dbaf72af27sm305243otb.1.2024.01.09.01.17.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 01:17:40 -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 3/4] riscv: dts: add reset generator for Sophgo SG2042 SoC Date: Tue, 9 Jan 2024 17:17:33 +0800 Message-Id: <66a3c846d26ab73227dfcd141d021a46cad6672b.1704790558.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-20240109_011741_869201_7676015F X-CRM114-Status: UNSURE ( 9.81 ) 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 Tue Jan 9 09:17:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Wang X-Patchwork-Id: 13514691 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 7A5BAC46CD2 for ; Tue, 9 Jan 2024 09:18:11 +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=Cc67/BiXro/KdY YD0AeC7wSnV7vf4zIeC76v2yNxoGD1OjhaZRmNLdI+8ljk48UbFuM79GBLDDgYMSlePCQC75HAqnS TPXKKdaCQzeOVDgz4kxuTG7TtiRB+9r3b56CwZz9/AqpvlzuzooAzN95WmvVjT3gwk0SrGXFWN7oO d9o9Gt7pBGn91tKqQ25LjCGolZPcRscyuH1UyGBFAHara7UftFc60R2cT7H26JzcOvvO+pJ3qb+t2 +ptW702ssYbDKSmR0/JriV+TmjS12wZI2VNk0Xp2CHrQQZuyvQOClYrfYMtZl5CGS1/YEpJ2oZfQS NMNLXNqkLR3vNKjctwRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rN8FH-007TSz-1t; Tue, 09 Jan 2024 09:18:03 +0000 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rN8FE-007TQB-1m for linux-riscv@lists.infradead.org; Tue, 09 Jan 2024 09:18:02 +0000 Received: by mail-oi1-x234.google.com with SMTP id 5614622812f47-3bbd1fab03cso2554828b6e.1 for ; Tue, 09 Jan 2024 01:17:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704791879; x=1705396679; 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=ZLQX3oe77eWp2FkPITxZj/R/sn2xCBcBYWTdnHPVKpRjEnFMXIMTx/ufls5Tjgt7eC gVuzH6OA6v54/9f95eSWFD2+FDwkcFTRygEhWRRDPa0tsUhxY2sheiBW2qPsMSpG232p QBhEnpuBoyQMILe3ZP19ND3iz2WTtHFJ9C73f1zPiZYkuL+5bEVbiXyH34CL+FaR162r 9+Ath7GzynuA24yH4RKcEO+jvxlzq+rl0IMoLdnr4mMDQ6EDX4zHhBUz3dZjWxfK9CG6 QP/BmoqvvZQChbgrkU7wULddrgxxjei9zmawfOH0RzUCBz/Ro1+TMDTvPweMhzrytB9I TcLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704791879; x=1705396679; 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=b7LzAYt2UCS1CSKaqhO7FtoFsbaKAp4x7Ll+xPe+IFKhDUO9WBK6DYPXD1jbGn9L1N 2iUqoLPpYYIoRwSVqoBM/jMWqa90Pzrf8MWWfLDX2x4hI6xZ38ktnXRnLHhGCXr+w5ia 9spbOTJuI9re8KWlxbxaMxlnMX+D4WFZqunkEzj6mDIpOLOegtJZdiWIXN7YFXuWzgSl rG9T9sNVj6qv1nfpMbRZBWW3YT9RSkDP/HL4vPN39ZsCFHLbuSf/LL687Kw3Un9LYYKY UfvZfMs0eBoEANQALyuVGK+lZlig8Nq8a7Adck/Hwj1/cuD2IlM0POKed2dAAw7mx5wC iohQ== X-Gm-Message-State: AOJu0Yy+B9ePp5d2ioJeoo6Cs/TUrCZdv6p69uD11IdnexVqzerBk1E7 7I/LnWoI/9Ua9O8K1shjVps= X-Google-Smtp-Source: AGHT+IF9asNbyA9kkyAZ3O4yJzTefiBP0hcPNyNfOXkQmcM6Og0+Eno5oA4eW2Y9x802ozv6mjy78g== X-Received: by 2002:a05:6808:309c:b0:3bd:3fa9:426c with SMTP id bl28-20020a056808309c00b003bd3fa9426cmr235310oib.52.1704791879121; Tue, 09 Jan 2024 01:17:59 -0800 (PST) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id o14-20020a05680803ce00b003bbe0c5195csm276580oie.26.2024.01.09.01.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 01:17:58 -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 4/4] riscv: dts: add resets property for uart node Date: Tue, 9 Jan 2024 17:17:51 +0800 Message-Id: <18e1093a7f1357af7d9e9df12ede2e99725632e3.1704790558.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-20240109_011800_585041_EFE5C994 X-CRM114-Status: UNSURE ( 9.25 ) 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"; }; };