From patchwork Fri Apr 11 11:38:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelvin Zhang X-Patchwork-Id: 14048275 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 5EAD4C36010 for ; Fri, 11 Apr 2025 11:52:57 +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=TGAfEhyhsCiKw7mPQpDPipS2Kl ew6y9tdF9VgCbgwU4yEmyrLQ0eXpesWeEEJeVGo4u3yweku+feuAfWh6LzOejDMNUGbq1ns0ZjQ2I jvK7XWpkcG1oVY2AOWQ3Ghr+MUxpvtwGXj3giXW3wQfHu0HE81i1yYD96cnv//FD0filMv49ttqfB KXanZP2/5KYpFnKwLE1zVW4mVTC0f89VxQ8fuMAzsGMwBJhxp5dXs79ITPLh+hkTPX5fqMK8a3v+t 0Txokqh4jRlylc0FjVg524DITY8emuo9GaXZGVzGGmYAl/q6IjIr75dct93JgJFiLbOFA9Uw5eqWO Nq4W6bvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u3CwC-0000000Ddu2-1QXn; Fri, 11 Apr 2025 11:52:48 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u3CiD-0000000DbFl-1IEj; Fri, 11 Apr 2025 11:38:22 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id F3DE9A4AAC1; Fri, 11 Apr 2025 11:32:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 2DA64C4CEE8; 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=rcZ4hUqkPHAzf/+Hghm6DmFVxWHcdR3LRlMwrsk358A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=KAu2Zp8IpSVm7oGFMTnjiqtKOCAd2TQMswJvUI2l8LCuMlWm/2CRtCOA/a6lUJmLI 0N2x3MWRY4oOx+YkxLJ316CcM4kdSue8Uk3IE7/QifXMAepZ+W8hmrqXzeT/ep6HFq El55EsAq4kQfqXExJgIrh3nHLn3zkZp1PuTvIINWSjUt6jW87b+Wicvee0cw8Z/DaN fqEN8QewKc6JV4T/HPrkTGKEwMFKAeYg00hqDOoYyC80FpDu/k+9Ss+Ea/ZqVj5jTt cDAF8yjyT9bRNqwczRmVCRo1VMv9f3EUqA06gWURVCpGVKwxku1gVamOh1X4VOXaca bisDRtroJ56dQ== 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 19058C369A8; Fri, 11 Apr 2025 11:38:20 +0000 (UTC) Date: Fri, 11 Apr 2025 19:38:15 +0800 Subject: [PATCH v6 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller MIME-Version: 1.0 Message-Id: <20250411-a4-a5-reset-v6-1-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 , Conor Dooley , Kelvin Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1744371498; l=2254; i=kelvin.zhang@amlogic.com; s=20240329; h=from:subject:message-id; bh=RBPG6lp45fxsEDVQ6Y1mIySEYTUUWfsM6OujOhVw3vA=; b=RzJQ4KLDu1/uYzvPUgLAK47lwY8WHwnKpeAC3wbWB/M5syynOzodZMBDPY8mZKQ2W42Ssx6zC aZ56m5MqTlgBXcNUF8TuewWWQBOSgrFuXd+lAeqJbEQ8sUQyNosoXUm 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_470355_11F9FD0E X-CRM114-Status: UNSURE ( 7.66 ) 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: Kelvin Zhang 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 Fri Apr 11 11:38:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelvin Zhang X-Patchwork-Id: 14048271 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 6F440C36010 for ; Fri, 11 Apr 2025 11:47:25 +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=qZXc/rYn15EddB7CP/7l0eTDJIAGXvnnYj8DuU4OJas=; b=WWTT0eLsyYbj1Qc4fEo4K30dp/ gxLkwDidW+HpbgupP/9nhHWxwxPmW8OnOJfmIIHhIt1Mzx1nFqQJa3PBAhFM3Q4SAeeTWswp14QXx F2o+gklcczBwSokcOqdMG+8FPanaDmTmFBemZgEtGgsg2c5JIsF9PdFBaJHTyjlzmZ6Q3sbpFizkW pTsGE3dhIwiffRLbN+u/g177U4BtRltc43b6TouWVsOQDKabib2Au81P221kOLx3ATzASIhWfjBCV w52SV8BL6CuRwE8r2TqxazoGsDp7IkUhoVjyhosV8ZGrW1k6nhLDjUtye8IQ3DFKRB/rJ4Djepqll 6ecI2zmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u3Cqp-0000000Dcy3-0rh1; Fri, 11 Apr 2025 11:47:15 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u3CiD-0000000DbGB-3WCq; Fri, 11 Apr 2025 11:38:23 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 7B0CA4A4ED; Fri, 11 Apr 2025 11:38:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 37FB2C4CEEA; 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=1744371501; bh=nSJeRVzzaivIB88gKQyatucRpKgXoP8b+63uudU5lDw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=X5JMA9EmZ/Z3iU7lsOo2pwlY9L7j1bCn+5X3lG4/6O2k+ubp9P4vX12ewy058W6zn dqhKv5HAyEmD7RA+eZDABEE/YTHGsMWUMdm4WZIT/wBZ8mVg7g89HaXuDUh0veyrF5 +7P8slov3QxjY5DMr/yp8UiRMZ1v36LAq8IT6EIKUnt62+fUJ9TgDLr4uCQhse/0wS KClYcrxJzSCayMDjiV05qm1F629hakXeVpHwABNp90T6+JQzuWEJcxSEMhgUEpxYsO scNDOAhHFvv+Ve/LegrHQyOdo377P61XH5GQL++A++CDFlzvuKPZR5MedOJDuE8fSI +7Vzb9UlQRCZg== 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 29568C369AC; Fri, 11 Apr 2025 11:38:20 +0000 (UTC) Date: Fri, 11 Apr 2025 19:38:16 +0800 Subject: [PATCH v6 2/3] arm64: dts: amlogic: Add A4 Reset Controller MIME-Version: 1.0 Message-Id: <20250411-a4-a5-reset-v6-2-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=3908; i=kelvin.zhang@amlogic.com; s=20240329; h=from:subject:message-id; bh=oF2MZH3lmYKfr/9G4rTMkISCrbGCYT5binySnJgFGrM=; b=1hCD4X3dmHRDlOzmN0G8PlfVSAjgwdH0vodvKUmlTu9AACO4KmKo73RpO8sQSr6GCQN1dI7Iw IGMcKjlXhMpAN6RLt0JFTgzg2xD+AsFaCt6LjKFQr1PV5hp/5ZHy3hc 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_911474_9416BA2F X-CRM114-Status: GOOD ( 12.18 ) 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 A4 reset controller. Signed-off-by: Zelong Dong Link: https://lore.kernel.org/r/20240918074211.8067-3-zelong.dong@amlogic.com Reviewed-by: Neil Armstrong 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 c02fa5ee9fd22285ebad2ef52939e2fc4c4dd019..563bc2e662fac5f2ec3d0b9cc3fca0de39ec0553 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@4000 { compatible = "amlogic,pinctrl-a4"; #address-cells = <2>; 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";