From patchwork Thu Mar 13 09:05:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelvin Zhang via B4 Relay X-Patchwork-Id: 14014589 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 1D855C282DE for ; Thu, 13 Mar 2025 09:08:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3cNPhfn56hhnyntPjEfHke2lx/LZF8+QUZgYQm+CWUo=; b=NS3Bhb7wTmasUCRG1gkV4w/7p4 Ucr4p8rYS470LhtW8pT/UVoNFK6FIMxKAGPnD3qdx8E4NGfWmPW/YRfxfbmI/i3uFLHKz1iUqvggz zYOEUiMLJ1aL1Xlp6jJFdlEsEKBfmzbbiBPUL7ovwcpt3Obx6NY/5upBlknGw3XrNs9CLVi+1nyyD vn+wvUFZrDZszooukEQI8CzuWRNjXTEDbzXon2Ic6Q5nkPkUtx/Qbf3Pq9cO9ghZu78tmCkXWHIjM 1KdvGp+ofXko6aPd/MXhjTNmTbVc8iQr/pXGI7g5K//1LO3kaN6daCly6wbtYUs/5bL72iK6NnB3P aFTJJSAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tseY3-0000000AfnX-0nip; Thu, 13 Mar 2025 09:08:15 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tseWN-0000000AfPL-2HPL; Thu, 13 Mar 2025 09:06:32 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D0F255C59B2; Thu, 13 Mar 2025 09:04:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 3DDF8C4CEEA; Thu, 13 Mar 2025 09:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741856788; bh=rcZ4hUqkPHAzf/+Hghm6DmFVxWHcdR3LRlMwrsk358A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=o2tKgqttg+IrzwqcRJSBH46YNitpjH2/Inzl5Hqly8q08RRSw+9TyNK8lGYI0/nRF BcQ0SiCixJZpWtdXqr+zd9k6zsSnXaWvR0NSDtQAhqAtwb2NQZjd+iQAggRW/NoVVt E4pZ1qmqgQYR1q9UcBCMqc20R8WjQEM0+D2kOrzex5OLyi/hvyVPPzD0n8OnbAzDBo x+5wJf3jUyRjkyN+60nhH24AXWChhTCvirNXF3oOCqSCMl3lxJGK9m/iOp5lijGUSd gnbPIe5NVuH/6cBfyT30/SZ0FghvU5wYEP4seNrVyQszkm7w0EGyZOYIQ5IVh7V4UR OkQTglES4/X5A== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CD21C28B28; Thu, 13 Mar 2025 09:06:28 +0000 (UTC) From: Kelvin Zhang via B4 Relay Date: Thu, 13 Mar 2025 17:05:34 +0800 Subject: [PATCH v4 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller MIME-Version: 1.0 Message-Id: <20250313-a4-a5-reset-v4-1-8076f684d6cf@amlogic.com> References: <20250313-a4-a5-reset-v4-0-8076f684d6cf@amlogic.com> In-Reply-To: <20250313-a4-a5-reset-v4-0-8076f684d6cf@amlogic.com> To: Philipp Zabel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Zelong Dong , Conor Dooley , Kelvin Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1741856786; l=2254; i=kelvin.zhang@amlogic.com; s=20240329; h=from:subject:message-id; bh=RBPG6lp45fxsEDVQ6Y1mIySEYTUUWfsM6OujOhVw3vA=; b=JCc17KCO/vZFwG4kiG7RGpV4Q7ntH3awp5/UxBjM4/ryfjUXlI8ceBJaUjO6BexJJnfCWr1aU jRYu0G1MUD7A4hXQqUzVzR7Su3BBygjqvihxq3h2fwr5RN7kxfhuJHe X-Developer-Key: i=kelvin.zhang@amlogic.com; a=ed25519; pk=pgnle7HTNvnNTcOoGejvtTC7BJT30HUNXfMHRRXSylI= X-Endpoint-Received: by B4 Relay for kelvin.zhang@amlogic.com/20240329 with auth_id=148 X-Original-From: Kelvin Zhang X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250313_020631_677174_DE4EBA99 X-CRM114-Status: UNSURE ( 7.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: kelvin.zhang@amlogic.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Zelong Dong Add compatibles for Amlogic A4 and A5 reset controllers, which fall back to 'amlogic,meson-s4-reset'. Signed-off-by: Zelong Dong Acked-by: Conor Dooley Acked-by: Philipp Zabel Link: https://lore.kernel.org/r/20240918074211.8067-2-zelong.dong@amlogic.com Signed-off-by: Kelvin Zhang --- .../bindings/reset/amlogic,meson-reset.yaml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml index 695ef38a7bb346c92b4cf428e7615d45682c940a..150e95c0d9bed74c7045942610a311114a257889 100644 --- a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml +++ b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml @@ -12,14 +12,20 @@ maintainers: properties: compatible: - enum: - - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs - - amlogic,meson-gxbb-reset # Reset Controller on GXBB and compatible SoCs - - amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs - - amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs - - amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs - - amlogic,c3-reset # Reset Controller on C3 and compatible SoCs - - amlogic,t7-reset + oneOf: + - enum: + - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs + - amlogic,meson-gxbb-reset # Reset Controller on GXBB and compatible SoCs + - amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs + - amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs + - amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs + - amlogic,c3-reset # Reset Controller on C3 and compatible SoCs + - amlogic,t7-reset + - items: + - enum: + - amlogic,a4-reset + - amlogic,a5-reset + - const: amlogic,meson-s4-reset reg: maxItems: 1 From patchwork Thu Mar 13 09:05:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelvin Zhang via B4 Relay X-Patchwork-Id: 14014603 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 CED81C28B28 for ; Thu, 13 Mar 2025 09:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uh54B9Y5BZqGLTp//ATn/bqNZ6HWUOmrq3C5Y60b8Qc=; b=oSSLqrp5w7jYzwhRKf1fVvL/wr o4wxj0Sfin0Zqdtpzrs+dp8x2qdTQEIetbj0Jwoj3OF9vJWK+ZC/ju84euysxDOpn1aIj1pmI7JV/ +b9QEoZHz6LOzlQdA9COnRty8eJIJi7DgXEm2RujdnY4RnwtfzFV9oKMKuS+uj2uEfSx285ZWfRqw /fPKZ3kvmqogUGsdTW+0xiivft3l3dZuge/yWXc3znvYU71CnPljOAyvSnEJAQWQuhJZG9Hzk+n1w aA7cKtB3pQ28SujTR+B5y5B7ViExbIMSCLmSHXAdgmpuQmQuw9SVLqRB6XOixaUjfBa5aoZzJ6o22 3bNBSrcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsebJ-0000000AgWo-2RCy; Thu, 13 Mar 2025 09:11:37 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tseWN-0000000AfPV-2EQ8; Thu, 13 Mar 2025 09:06:33 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 1A33DA46577; Thu, 13 Mar 2025 09:00:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 4EC5DC4CEEB; Thu, 13 Mar 2025 09:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741856788; bh=oAdkOQ8gBjz0ay9HBEF2zcXH0F4dtE5TaZqzy8nV3Nw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=YNL7Uyp+Q45jqarTXWrVLyBRgv5Q6uVkoNeWd9IksBORbrnNxMvj43YmK2v7FZw3Y bM1a8eho5qLcSY2O1hlqumUs9gYk6zvhNEQKeecBqD4AnVagrwFOyr0UP7b8X69rKq Td8yRI9pKdoh042h25yJ+0sPAwTBMJaJ/x1fK+ngjMaKcEMAWn1f/pRFcJOuychA7n SVj/JxvPFOsWUItVY4K7RybpwFfxRQW1rl5TqBraGsUGRCwAXMbGc3hPif2y8FHLPt n2w/vWXwWYNpq4yiKAGAHkB5CVWhNEGkoJGhoSI4wwyDiTLz+dRLeccYFxSrzxZBFd 0uNDmw7rLaDvg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36AEFC2BA1B; Thu, 13 Mar 2025 09:06:28 +0000 (UTC) From: Kelvin Zhang via B4 Relay Date: Thu, 13 Mar 2025 17:05:35 +0800 Subject: [PATCH v4 2/3] arm64: dts: amlogic: Add A4 Reset Controller MIME-Version: 1.0 Message-Id: <20250313-a4-a5-reset-v4-2-8076f684d6cf@amlogic.com> References: <20250313-a4-a5-reset-v4-0-8076f684d6cf@amlogic.com> In-Reply-To: <20250313-a4-a5-reset-v4-0-8076f684d6cf@amlogic.com> To: Philipp Zabel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Zelong Dong , Kelvin Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1741856786; l=3846; i=kelvin.zhang@amlogic.com; s=20240329; h=from:subject:message-id; bh=3wgP2tWcYm0WqWBwyu5Znx0BI/LoQVm4PvQJrojr2U0=; b=F0eD24wVRcS75K+YpS2UxVOvd9oN29dHjYSiBdJgg0l1jEobSiqnwvJHvscbgYqP/VLf7gKE6 hOM2wPARKiUCHG2R53X8o/IOSQQe5Su3itFzVodcLOZJg/moM3jVfSg X-Developer-Key: i=kelvin.zhang@amlogic.com; a=ed25519; pk=pgnle7HTNvnNTcOoGejvtTC7BJT30HUNXfMHRRXSylI= X-Endpoint-Received: by B4 Relay for kelvin.zhang@amlogic.com/20240329 with auth_id=148 X-Original-From: Kelvin Zhang X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250313_020631_758642_A4B6F693 X-CRM114-Status: GOOD ( 12.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: kelvin.zhang@amlogic.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Zelong Dong Add the device node and related header file for Amlogic A4 reset controller. Signed-off-by: Zelong Dong Link: https://lore.kernel.org/r/20240918074211.8067-3-zelong.dong@amlogic.com Signed-off-by: Kelvin Zhang --- arch/arm64/boot/dts/amlogic/amlogic-a4-reset.h | 93 ++++++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi | 8 +++ 2 files changed, 101 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/amlogic-a4-reset.h b/arch/arm64/boot/dts/amlogic/amlogic-a4-reset.h new file mode 100644 index 0000000000000000000000000000000000000000..f6a4c90bab3cf7cfaa3c98c522bed5e455b73bd3 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/amlogic-a4-reset.h @@ -0,0 +1,93 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Copyright (c) 2024 Amlogic, Inc. All rights reserved. + */ + +#ifndef __DTS_AMLOGIC_A4_RESET_H +#define __DTS_AMLOGIC_A4_RESET_H + +/* RESET0 */ +/* 0-3 */ +#define RESET_USB 4 +/* 5-6*/ +#define RESET_U2PHY22 7 +#define RESET_USBPHY20 8 +#define RESET_U2PHY21 9 +#define RESET_USB2DRD 10 +#define RESET_U2H 11 +#define RESET_LED_CTRL 12 +/* 13-31 */ + +/* RESET1 */ +#define RESET_AUDIO 32 +#define RESET_AUDIO_VAD 33 +/* 34*/ +#define RESET_DDR_APB 35 +#define RESET_DDR 36 +#define RESET_VOUT_VENC 37 +#define RESET_VOUT 38 +/* 39-47 */ +#define RESET_ETHERNET 48 +/* 49-63 */ + +/* RESET2 */ +#define RESET_DEVICE_MMC_ARB 64 +#define RESET_IRCTRL 65 +/* 66*/ +#define RESET_TS_PLL 67 +/* 68-72*/ +#define RESET_SPICC_0 73 +#define RESET_SPICC_1 74 +/* 75-79*/ +#define RESET_MSR_CLK 80 +/* 81*/ +#define RESET_SAR_ADC 82 +/* 83-87*/ +#define RESET_ACODEC 88 +/* 89-90*/ +#define RESET_WATCHDOG 91 +/* 92-95*/ + +/* RESET3 */ +/* 96-127 */ + +/* RESET4 */ +/* 128-131 */ +#define RESET_PWM_AB 132 +#define RESET_PWM_CD 133 +#define RESET_PWM_EF 134 +#define RESET_PWM_GH 135 +/* 136-137*/ +#define RESET_UART_A 138 +#define RESET_UART_B 139 +/* 140*/ +#define RESET_UART_D 141 +#define RESET_UART_E 142 +/* 143-144*/ +#define RESET_I2C_M_A 145 +#define RESET_I2C_M_B 146 +#define RESET_I2C_M_C 147 +#define RESET_I2C_M_D 148 +/* 149-151*/ +#define RESET_SDEMMC_A 152 +/* 153*/ +#define RESET_SDEMMC_C 154 +/* 155-159*/ + +/* RESET5 */ +/* 160-175*/ +#define RESET_BRG_AO_NIC_SYS 176 +/* 177*/ +#define RESET_BRG_AO_NIC_MAIN 178 +#define RESET_BRG_AO_NIC_AUDIO 179 +/* 180-183*/ +#define RESET_BRG_AO_NIC_ALL 184 +/* 185*/ +#define RESET_BRG_NIC_SDIO 186 +#define RESET_BRG_NIC_EMMC 187 +#define RESET_BRG_NIC_DSU 188 +#define RESET_BRG_NIC_CLK81 189 +#define RESET_BRG_NIC_MAIN 190 +#define RESET_BRG_NIC_ALL 191 + +#endif diff --git a/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi index efba8565af3cf5298f894819572d78e0c0041f71..02365494d8655f8cf97f0ffdc9a9566e42ab61ae 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi +++ b/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi @@ -4,6 +4,7 @@ */ #include "amlogic-a4-common.dtsi" +#include "amlogic-a4-reset.h" #include #include / { @@ -51,6 +52,13 @@ pwrc: power-controller { }; &apb { + reset: reset-controller@2000 { + compatible = "amlogic,a4-reset", + "amlogic,meson-s4-reset"; + reg = <0x0 0x2000 0x0 0x98>; + #reset-cells = <1>; + }; + periphs_pinctrl: pinctrl { compatible = "amlogic,pinctrl-a4"; #address-cells = <2>; From patchwork Thu Mar 13 09:05:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelvin Zhang via B4 Relay X-Patchwork-Id: 14014604 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 C7061C282DE for ; Thu, 13 Mar 2025 09:13:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=z+mqWE4weE3NAeMx7pvQj3/FwpOBj58eMt0LMBWFpaA=; b=GwM4k1ucuf34MYeRk+InBWX2Ax y4+sffnHsabeB/xvrWeNcU8ODz4o3daaHVn0EjhpnncsUaWmsTgU8UXZE3gd6XZ9/hxCon1OWnJh+ bDedlLrInrQbeqZVnDVNJGaI38aUmgnPFAh6P9EjRaBhDqJs9o7OjRlNihKDiQa8758UoKDOcrfze RdPPqbcg21CZbfTHR8AFLQsoYG4TPaxSYmK47WKhR0sv3LgnOHThmYm24NvBfNdevTH0+xZZGQrN3 QIe9WHZSbzF/koc2mhr9gtS8khyWTQ5oF6Mcw8sav4GbTRDgAi5MQTy4UaELvP71OBnfEtK5doqZS n+owqYwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsecw-0000000Agkl-3q9q; Thu, 13 Mar 2025 09:13:18 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tseWN-0000000AfPQ-3EVS; Thu, 13 Mar 2025 09:06:34 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 0E058A4656C; Thu, 13 Mar 2025 09:00:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 63062C4CEF0; Thu, 13 Mar 2025 09:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741856788; bh=YXiUli/WnPSiXJRM/EVl/O2uwm9SmmG+SyqZj8ttVLw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=HenPTuLbM1iACB9VGTK+amOxvGeph8CSVO7GVyZudDFpdzp8Q2pYFXDxbr2yBJ92c cMfNOP6mCi52+ii9BtvrfjBnRDA6CMWgY7kI0un+8/nL6JbsU4oDBG4stL/9MO1jpb rXHilE+bRaC5Q2yOg6kE5Bg+AO8wWm5r82V67dw7sktcu1vMrCEy3rPWdm7+lyMg26 1Qpu9oXvlVTC8DewKcp/Dnvrf1tO0dCtvz63gqMFBCfE1cdBu0Xij8RAPGFB58e5+u bjAE0MTXCDB03X3jsTJVb032vD6FfNcgd2tP7S5nuDK4iMty7SQ72UjrddLTJGSXaX iRyK6rLpSb79A== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E23AC28B2E; Thu, 13 Mar 2025 09:06:28 +0000 (UTC) From: Kelvin Zhang via B4 Relay Date: Thu, 13 Mar 2025 17:05:36 +0800 Subject: [PATCH v4 3/3] arm64: dts: amlogic: Add A5 Reset Controller MIME-Version: 1.0 Message-Id: <20250313-a4-a5-reset-v4-3-8076f684d6cf@amlogic.com> References: <20250313-a4-a5-reset-v4-0-8076f684d6cf@amlogic.com> In-Reply-To: <20250313-a4-a5-reset-v4-0-8076f684d6cf@amlogic.com> To: Philipp Zabel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Zelong Dong , Kelvin Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1741856786; l=3877; i=kelvin.zhang@amlogic.com; s=20240329; h=from:subject:message-id; bh=ZFu/iq6Br16B1GmXZXg+n7u5XDIS+7iiJRB1TMYOhs4=; b=8WsA+Mm77eVUAT3YgjZQzAi9J3yuCVLHAYgwmSKS8l6fcCTikKBtv+PoxXMtrweg0qyrUt9n4 19h7CXmFbd3DXsUYHDxicwR7642QUCitxBuP0WfbwV/EQKeIIjb976U X-Developer-Key: i=kelvin.zhang@amlogic.com; a=ed25519; pk=pgnle7HTNvnNTcOoGejvtTC7BJT30HUNXfMHRRXSylI= X-Endpoint-Received: by B4 Relay for kelvin.zhang@amlogic.com/20240329 with auth_id=148 X-Original-From: Kelvin Zhang X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250313_020632_000928_6E759752 X-CRM114-Status: GOOD ( 11.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: kelvin.zhang@amlogic.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Zelong Dong Add the device node and related header file for Amlogic A5 reset controller. Signed-off-by: Zelong Dong Link: https://lore.kernel.org/r/20240918074211.8067-4-zelong.dong@amlogic.com Signed-off-by: Kelvin Zhang --- arch/arm64/boot/dts/amlogic/amlogic-a5-reset.h | 95 ++++++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi | 10 +++ 2 files changed, 105 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/amlogic-a5-reset.h b/arch/arm64/boot/dts/amlogic/amlogic-a5-reset.h new file mode 100644 index 0000000000000000000000000000000000000000..cdf0f515962097c606e4c53badb19df7d21606ec --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/amlogic-a5-reset.h @@ -0,0 +1,95 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Copyright (c) 2024 Amlogic, Inc. All rights reserved. + */ + +#ifndef __DTS_AMLOGIC_A5_RESET_H +#define __DTS_AMLOGIC_A5_RESET_H + +/* RESET0 */ +/* 0-3 */ +#define RESET_USB 4 +/* 5-7 */ +#define RESET_USBPHY20 8 +/* 9 */ +#define RESET_USB2DRD 10 +/* 11-31 */ + +/* RESET1 */ +#define RESET_AUDIO 32 +#define RESET_AUDIO_VAD 33 +/* 34 */ +#define RESET_DDR_APB 35 +#define RESET_DDR 36 +/* 37-40 */ +#define RESET_DSPA_DEBUG 41 +/* 42 */ +#define RESET_DSPA 43 +/* 44-46 */ +#define RESET_NNA 47 +#define RESET_ETHERNET 48 +/* 49-63 */ + +/* RESET2 */ +#define RESET_ABUS_ARB 64 +#define RESET_IRCTRL 65 +/* 66 */ +#define RESET_TS_PLL 67 +/* 68-72 */ +#define RESET_SPICC_0 73 +#define RESET_SPICC_1 74 +#define RESET_RSA 75 + +/* 76-79 */ +#define RESET_MSR_CLK 80 +#define RESET_SPIFC 81 +#define RESET_SAR_ADC 82 +/* 83-90 */ +#define RESET_WATCHDOG 91 +/* 92-95 */ + +/* RESET3 */ +/* 96-127 */ + +/* RESET4 */ +#define RESET_RTC 128 +/* 129-131 */ +#define RESET_PWM_AB 132 +#define RESET_PWM_CD 133 +#define RESET_PWM_EF 134 +#define RESET_PWM_GH 135 +/* 104-105 */ +#define RESET_UART_A 138 +#define RESET_UART_B 139 +#define RESET_UART_C 140 +#define RESET_UART_D 141 +#define RESET_UART_E 142 +/* 143*/ +#define RESET_I2C_S_A 144 +#define RESET_I2C_M_A 145 +#define RESET_I2C_M_B 146 +#define RESET_I2C_M_C 147 +#define RESET_I2C_M_D 148 +/* 149-151 */ +#define RESET_SDEMMC_A 152 +/* 153 */ +#define RESET_SDEMMC_C 154 +/* 155-159*/ + +/* RESET5 */ +/* 160-175 */ +#define RESET_BRG_AO_NIC_SYS 176 +#define RESET_BRG_AO_NIC_DSPA 177 +#define RESET_BRG_AO_NIC_MAIN 178 +#define RESET_BRG_AO_NIC_AUDIO 179 +/* 180-183 */ +#define RESET_BRG_AO_NIC_ALL 184 +#define RESET_BRG_NIC_NNA 185 +#define RESET_BRG_NIC_SDIO 186 +#define RESET_BRG_NIC_EMMC 187 +#define RESET_BRG_NIC_DSU 188 +#define RESET_BRG_NIC_SYSCLK 189 +#define RESET_BRG_NIC_MAIN 190 +#define RESET_BRG_NIC_ALL 191 + +#endif diff --git a/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi index 17a6316de8918f31f3f7625f2eda06a60664139a..b97e2f3091bf62f4bdaaebeaf5d1dfe695cfc6d5 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi +++ b/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi @@ -4,6 +4,7 @@ */ #include "amlogic-a4-common.dtsi" +#include "amlogic-a5-reset.h" #include / { cpus { @@ -48,3 +49,12 @@ pwrc: power-controller { }; }; }; + +&apb { + reset: reset-controller@2000 { + compatible = "amlogic,a5-reset", + "amlogic,meson-s4-reset"; + reg = <0x0 0x2000 0x0 0x98>; + #reset-cells = <1>; + }; +};