From patchwork Fri Apr 11 11:38:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelvin Zhang X-Patchwork-Id: 14048273 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 86DF2C36010 for ; Fri, 11 Apr 2025 11:51: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: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=GlTlVIuXWLQn7h7li2mK84Z8sX+WVCCQDwDkxSXuAQs=; b=Yd+3a4LlAIWD32T3sdd7+5e6Vm yLEP58ZiDtmkxnYbu/9D3aCwGsHs6CZcEfNirJ+hDVHRwaFt4kceC3rdcfdF7q/kQ6EOLTo9EZ/su 6u+t9xAYLDr+mtzr4VZc/bHZTUuyqOJbx57ppM22vbYfxAyEEHVZu4rBVeepomBOUnKxEeyMs//6t EJoSfyi7UNIJAWkAIv/J+Axyb4m1Ursbo2/vZeFCWPgph1DIXjvmizGEzz44Py6ydbKsHof0z1VJT dJjhmCcGU8AdDCFZnJiT4gpNN/z9i1iMEox+XhQBhyNxoeVlOCVGZuD8ulW3w7xQST4E0gcjK62zI WNwtOQkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u3CuP-0000000DdYL-2ckR; Fri, 11 Apr 2025 11:50:57 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u3CiD-0000000DbFk-07IG; Fri, 11 Apr 2025 11:38:22 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id BE0414A4DD; Fri, 11 Apr 2025 11:38:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 46315C4CEEC; Fri, 11 Apr 2025 11:38:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744371500; bh=m07n1i6EW5KXoabkxKV3BA5YXAEQROFJ/PT65oveu8Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=RLWZR7JDZQVmDTsMHkommj4Jv9FQXpu9xcwTEQWiV9WOVGZ3KSjWiU95cHKgwYHkj 1f9muvFc9fuWnnJH/f2MHN6rl31gNMoH6uYaVLb/2uFrhlHS8ewqXa2PDWlrjWcHbr Y4/aE/ypmFD5DUa4JhGerijbhjGyaJZozjRFib4Pu1Zcat0z/fuOHHFnVih9PJ9OjZ dyjfe2jz25cSlZScDkGZeNGPjjjJ9mVBMpcwhVFmJ6rdn0bxDFhK25hPp9lRrrSPVN zzhpFp3/fMnaf8+tIsLRvPuy3NUSG6HS3fUy8FjjgIsQtC9oJhjHvE6Y/7v8Kk7p+R Di26n/MUJqK1A== 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 371EEC369AD; Fri, 11 Apr 2025 11:38:20 +0000 (UTC) Date: Fri, 11 Apr 2025 19:38:17 +0800 Subject: [PATCH v6 3/3] arm64: dts: amlogic: Add A5 Reset Controller MIME-Version: 1.0 Message-Id: <20250411-a4-a5-reset-v6-3-89963278c686@amlogic.com> References: <20250411-a4-a5-reset-v6-0-89963278c686@amlogic.com> In-Reply-To: <20250411-a4-a5-reset-v6-0-89963278c686@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=1744371498; l=4039; i=kelvin.zhang@amlogic.com; s=20240329; h=from:subject:message-id; bh=39cgxEleCRWNGiMf9dZjnPoJH+4QSAKwm+85hqJrCUk=; b=PYZD7Sc+pTxBghbA1cA21hexU/OWuPj4rDnnZZ6WOBpv3nXbjtlIHPTwhBqUI0HHSNaobk/Qi tEf44laRPLJA3zSVhSqHI0O3qUP7QnvdvQEzT2+6XYwUAEI++as4w/a 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-20250411_043821_097312_99D9F311 X-CRM114-Status: GOOD ( 11.97 ) 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: Kelvin Zhang 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 Reviewed-by: Neil Armstrong Signed-off-by: Kelvin Zhang --- arch/arm64/boot/dts/amlogic/amlogic-a5-reset.h | 95 ++++++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi | 8 +++ 2 files changed, 103 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 32ed1776891bc7d1befd01a76c76048631606f5a..b1da8cbaa25a1844312a23bc39eb876df3c60df5 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 { @@ -50,6 +51,13 @@ pwrc: power-controller { }; &apb { + reset: reset-controller@2000 { + compatible = "amlogic,a5-reset", + "amlogic,meson-s4-reset"; + reg = <0x0 0x2000 0x0 0x98>; + #reset-cells = <1>; + }; + gpio_intc: interrupt-controller@4080 { compatible = "amlogic,a5-gpio-intc", "amlogic,meson-gpio-intc";