From patchwork Fri Mar 21 15:18:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 14025658 Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F46B1DDA09 for ; Fri, 21 Mar 2025 15:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742570320; cv=none; b=qe+VShpDH2fUTwu0sBlko5F8G7UmztBZFFTqVvIddszhSiqqcr90m9tcGAXaLkX6IrB5HPsFBMvaG4KYyA3RaQrWoomkERCxZS+xaZz8CrJlNtk5HTf6qPX7LoObEzKtkbXyEC+pio2vtYiHd6CoCQMH10vixFMzOM+0RJS/34o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742570320; c=relaxed/simple; bh=geLdGDfDppztif7o0rQLveIfzRTCzSWPOzmxcCRsJxg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nHRE6Fvru4pYpFgLnbjkENWM7hVItiyBCzsMw/TeOyrDUWzXlX8WrQefB11JpuevjWZ/1F13ulWf4B0ggSptbwKsaqSzOrB8jnskvRqksw76u+A/vKVX6b3B0W7I0Xj62oBSpTLegx0pgFBEpoTNptDX86NlwWIwkPT4gmatpsg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b=dZJ6cQN0; arc=none smtp.client-ip=209.85.166.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b="dZJ6cQN0" Received: by mail-io1-f47.google.com with SMTP id ca18e2360f4ac-85b4277d03fso79638139f.1 for ; Fri, 21 Mar 2025 08:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20230601.gappssmtp.com; s=20230601; t=1742570316; x=1743175116; darn=vger.kernel.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=BbvEkFGBoxFLcT+B9yfnDSBEgyYVKDqcuGRDBtDVFkg=; b=dZJ6cQN0Wj1874MARZtnEtf0VQzjTs5I4qDxGCcEnSgdcDGKx0Z4lQkCal4YED+oJN Rwmmv1kPwH2WFLqdbyUVAZRhQJsWi62T8+yotuXph4Y3IiW/1JkYSBFN3cSZ0GAb4e5z oCbR3n5/CWmux7LcJ1vx4LTkYVGycvG6fnyzva+5PNJubATxYigG5Zefj0YBF0IZWmWB 91LCindCy/xV80OQdibM8uiULDPogcOqQX0nNw+M11UfwQzt/LdHECJtc13vxyfKSabR E74wrW6kNVcBCkZLwhl1bedxURYKlyqdiVo9Q+lU2BH+D3ed93GVRYILeF+4ANjvTClU T1CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742570316; x=1743175116; 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=BbvEkFGBoxFLcT+B9yfnDSBEgyYVKDqcuGRDBtDVFkg=; b=lBEh2LT/h4a6/Gb3Y49WpaxR0DSqTHqMcHfGc/NHOc4jykneAohvUYZu7B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85b:59f3:2ebe with SMTP id ca18e2360f4ac-85e2cb1d274mr400667339f.11.1742570316462; Fri, 21 Mar 2025 08:18:36 -0700 (PDT) Received: from zoltan.localdomain (c-73-228-159-35.hsd1.mn.comcast.net. [73.228.159.35]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4f2cbdd0a21sm475553173.41.2025.03.21.08.18.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Mar 2025 08:18:36 -0700 (PDT) From: Alex Elder To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, mturquette@baylibre.com, sboyd@kernel.org, dlan@gentoo.org Cc: heylenay@4d2.org, guodong@riscstar.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, spacemit@lists.linux.dev, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 1/7] dt-bindings: soc: spacemit: define spacemit,k1-ccu resets Date: Fri, 21 Mar 2025 10:18:24 -0500 Message-ID: <20250321151831.623575-2-elder@riscstar.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250321151831.623575-1-elder@riscstar.com> References: <20250321151831.623575-1-elder@riscstar.com> Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There are additional SpacemiT syscon CCUs whose registers control both clocks and resets: RCPU, RCPU2, and APBC2. Unlike those defined previously, these will initially support only resets. They do not incorporate power domain functionality. Define the index values for resets associated with all SpacemiT K1 syscon nodes, including those with clocks already defined, as well as the new ones (without clocks). Signed-off-by: Alex Elder Reviewed-by: Rob Herring (Arm) --- .../soc/spacemit/spacemit,k1-syscon.yaml | 13 +- include/dt-bindings/clock/spacemit,k1-ccu.h | 134 ++++++++++++++++++ 2 files changed, 143 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml b/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml index 07a6728e6f864..333c28e075b6c 100644 --- a/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml +++ b/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml @@ -19,6 +19,9 @@ properties: - spacemit,k1-syscon-apbc - spacemit,k1-syscon-apmu - spacemit,k1-syscon-mpmu + - spacemit,k1-syscon-rcpu + - spacemit,k1-syscon-rcpu2 + - spacemit,k1-syscon-apbc2 reg: maxItems: 1 @@ -57,13 +60,15 @@ allOf: properties: compatible: contains: - const: spacemit,k1-syscon-apbc + enum: + - spacemit,k1-syscon-apmu + - spacemit,k1-syscon-mpmu then: - properties: - "#power-domain-cells": false - else: required: - "#power-domain-cells" + else: + properties: + "#power-domain-cells": false additionalProperties: false diff --git a/include/dt-bindings/clock/spacemit,k1-ccu.h b/include/dt-bindings/clock/spacemit,k1-ccu.h index 4a0c7163257e3..a1e1b1fe714ce 100644 --- a/include/dt-bindings/clock/spacemit,k1-ccu.h +++ b/include/dt-bindings/clock/spacemit,k1-ccu.h @@ -78,6 +78,9 @@ #define CLK_APB 31 #define CLK_WDT_BUS 32 +/* MPMU resets */ +#define RST_WDT 0 + /* APBC clocks */ #define CLK_UART0 0 #define CLK_UART2 1 @@ -109,6 +112,7 @@ #define CLK_PWM17 27 #define CLK_PWM18 28 #define CLK_PWM19 29 + #define CLK_SSP3 30 #define CLK_RTC 31 #define CLK_TWSI0 32 @@ -180,6 +184,60 @@ #define CLK_TSEN_BUS 98 #define CLK_IPC_AP2AUD_BUS 99 +/* APBC resets */ + +#define RST_UART0 0 +#define RST_UART2 1 +#define RST_UART3 2 +#define RST_UART4 3 +#define RST_UART5 4 +#define RST_UART6 5 +#define RST_UART7 6 +#define RST_UART8 7 +#define RST_UART9 8 +#define RST_GPIO 9 +#define RST_PWM0 10 +#define RST_PWM1 11 +#define RST_PWM2 12 +#define RST_PWM3 13 +#define RST_PWM4 14 +#define RST_PWM5 15 +#define RST_PWM6 16 +#define RST_PWM7 17 +#define RST_PWM8 18 +#define RST_PWM9 19 +#define RST_PWM10 20 +#define RST_PWM11 21 +#define RST_PWM12 22 +#define RST_PWM13 23 +#define RST_PWM14 24 +#define RST_PWM15 25 +#define RST_PWM16 26 +#define RST_PWM17 27 +#define RST_PWM18 28 +#define RST_PWM19 29 +#define RST_SSP3 30 +#define RST_RTC 31 +#define RST_TWSI0 32 +#define RST_TWSI1 33 +#define RST_TWSI2 34 +#define RST_TWSI4 35 +#define RST_TWSI5 36 +#define RST_TWSI6 37 +#define RST_TWSI7 38 +#define RST_TWSI8 39 +#define RST_TIMERS1 40 +#define RST_TIMERS2 41 +#define RST_AIB 42 +#define RST_ONEWIRE 43 +#define RST_SSPA0 44 +#define RST_SSPA1 45 +#define RST_DRO 46 +#define RST_IR 47 +#define RST_TSEN 48 +#define RST_IPC_AP2AUD 49 +#define RST_CAN0 50 + /* APMU clocks */ #define CLK_CCI550 0 #define CLK_CPU_C0_HI 1 @@ -244,4 +302,80 @@ #define CLK_V2D 60 #define CLK_EMMC_BUS 61 +/* APMU resets */ + +#define RST_CCIC_4X 0 +#define RST_CCIC1_PHY 1 +#define RST_SDH_AXI 2 +#define RST_SDH0 3 +#define RST_SDH1 4 +#define RST_SDH2 5 +#define RST_USBP1_AXI 6 +#define RST_USB_AXI 7 +#define RST_USB3_0 8 +#define RST_QSPI 9 +#define RST_QSPI_BUS 10 +#define RST_DMA 11 +#define RST_AES 12 +#define RST_VPU 13 +#define RST_GPU 14 +#define RST_EMMC 15 +#define RST_EMMC_X 16 +#define RST_AUDIO 17 +#define RST_HDMI 18 +#define RST_PCIE0 19 +#define RST_PCIE1 20 +#define RST_PCIE2 21 +#define RST_EMAC0 22 +#define RST_EMAC1 23 +#define RST_JPG 24 +#define RST_CCIC2PHY 25 +#define RST_CCIC3PHY 26 +#define RST_CSI 27 +#define RST_ISP_CPP 28 +#define RST_ISP_BUS 29 +#define RST_ISP 30 +#define RST_ISP_CI 31 +#define RST_DPU_MCLK 32 +#define RST_DPU_ESC 33 +#define RST_DPU_HCLK 34 +#define RST_DPU_SPIBUS 35 +#define RST_DPU_SPI_HBUS 36 +#define RST_V2D 37 +#define RST_MIPI 38 +#define RST_MC 39 + +/* RCPU resets */ + +#define RST_RCPU_SSP0 0 +#define RST_RCPU_I2C0 1 +#define RST_RCPU_UART1 2 +#define RST_RCPU_IR 3 +#define RST_RCPU_CAN 4 +#define RST_RCPU_UART0 5 +#define RST_RCPU_HDMI_AUDIO 6 + +/* RCPU2 resets */ + +#define RST_RCPU2_PWM0 0 +#define RST_RCPU2_PWM1 1 +#define RST_RCPU2_PWM2 2 +#define RST_RCPU2_PWM3 3 +#define RST_RCPU2_PWM4 4 +#define RST_RCPU2_PWM5 5 +#define RST_RCPU2_PWM6 6 +#define RST_RCPU2_PWM7 7 +#define RST_RCPU2_PWM8 8 +#define RST_RCPU2_PWM9 9 + +/* APBC2 resets */ + +#define RST_APBC2_UART1 0 +#define RST_APBC2_SSP2 1 +#define RST_APBC2_TWSI3 2 +#define RST_APBC2_RTC 3 +#define RST_APBC2_TIMERS0 4 +#define RST_APBC2_KPC 5 +#define RST_APBC2_GPIO 6 + #endif /* _DT_BINDINGS_SPACEMIT_CCU_H_ */