Received: from mail-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) (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 5349425E44D for ; Mon, 13 Oct 2025 12:33:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760358798; cv=none; b=UInrbseT7XJOlT/TFJ0SE/E3o/mFqDggV5RoQy8D9Ogu8odcFZ01CKBo+YBWO38yKDsiaF8gLgI6lYEXH5XJMA6I0XlagXwLf0tTJ/heRrXy8PShPeFC8ipjZ1lUrpbBqZkiFhx36+A/7niSj/xboCknP89r/CcS819K4yK7paI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760358798; c=relaxed/simple; bh=Kb8uM3f8qILwL0GDllY38o85KB9kJ69KatRC0T8EZTs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bdhDM1X3DbY31N+Z/3EnO4iOlzRtcxP7Wu8oBge6egyZXnW/gIDFzEjWTQ6hwQgrGvLRkNq/Q+2+nPj38ZLDUvcpOpKompfz+E3JbG8FdGS2JAVhqEYLO1IRTQk0mmfWwL68kG7TveMhyYrjYhqiBrtrRnYc4hCvmGRekDRPmQQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (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=pc4resdE; arc=none smtp.client-ip=209.85.166.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (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="pc4resdE" Received: by mail-il1-f195.google.com with SMTP id e9e14a558f8ab-4248b34fc8eso48654525ab.3 for ; Mon, 13 Oct 2025 05:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20230601.gappssmtp.com; s=20230601; t=1760358795; x=1760963595; 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=GhpKl/nn+BHTlTr14XOcXWGwJsMuOmqiPlR2ItDHNmo=; b=pc4resdE78oIC9903AM4VpgjxsYBNGu8XSMyn36UKV8V+e1PZfoqsPRKwKozoovXGU sZqHhkMT+1c7XPjRO25RVfEzn/8CJozOb89u6BA4SKJXYQslY0DxNWo9PpXbu6biGlYk 9g/6fcYnfn4fPzmdD8ECJh8zRw2gROjFuw3eFmOaXBw6RVLCkvlsG2w3Gu8u5fYZ6n2G fdL2znQFscpUZQ9tGEiCRN/oAeWfy3jmTKCr9dpxWzCwaK4bSQWS3wYn/WbaDk2FI6Yi Fo65LyJlwbJgctMpcFCvwnh9Nx/W4vy1OO3AREAFmmAW+9rMxjOhQutWxv3x/RD/tIt4 HeAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760358795; x=1760963595; 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=GhpKl/nn+BHTlTr14XOcXWGwJsMuOmqiPlR2ItDHNmo=; b=OLXrMEOXWm5hjp2/xaccc6DgH+zQ8acWkkP3H5e8YUgs/SlnPObs62lok97Jr80FpI Gx7woS80GkMOCG0h+GKr2yNpapeXz0pQ00YKM6kqhtgpfwEFYnkdQsCoZ3YKcO+b6/7K IZN+aVGmRheW3/YCLXL6XZzz05EnfSlRoOz6mQDwAuiZ9/Ib1kBnCdFc79TFQ/AzTiZm IBwvDauoe5ZccaM2wZl3NeHJzSH0J53A8rudeNeGPUUn120rjqkgIcApJO5T4qPu0UcC aNQ+rq9CmWZooExLu1qSWSYtLAkYpFW20mJVMPN0gkFXx3zzDoy9/5E6JMOzalND6fIK Wr+w== X-Forwarded-Encrypted: i=1; AJvYcCW830A1J/ivLYD0J3Ekimw22OZGxwVleTEEYxha1nk+1NYBAPpIx8EBUuLWzo65MmJO0GZS/sK0xHnR@vger.kernel.org X-Gm-Message-State: AOJu0YzeUBAR12oazvxSLtl1KL0CUbeApvdka59tI5eyJ09hq1yoW6AM gBpg1H0AVSJuss3U/bPmTXY3V1aBMnSTn1mZ8sGATdL39nhRrE57J6D6yGy2zhFUUpM= X-Gm-Gg: ASbGncubeUK1igniNc1M8UPmY34taKPDyoqgtbYSM/bE0nrvQOIkW8PC2LvOtIK1GWp +zFtceTHxnF+3f6nRRZ7l+eM+Ygm52Xh+A3derxE7Yd4G1kqTUeg+a1Vx1alMR0b/oH7LgRcRuy yQKExuMSHD8a8dimFPsCOR+tFVC+VXMO2rPKiJHPLZ3us5X+Ood8Y3aZhAUGT5VKd8oMpC84k2J wbeM86HOPvRyT2HHFnZC5HfNEZwOw9/nXT2NnRzWlwaijlV8L2OMQhpwP0h+ZOrCj0XtdDRY09F Ylrgz1V0+ixTuf/DfERs25YSA+dBPw5hofJErt3vdwtmhZVkWyxmX/JBznmEd41OsgitblbqELJ jRy79vyptRb704oC+GD1/FHsoG+8D1cL+JAEO8qeRkVKUpI4ObkU1wp+WCiM0p6hG48uo2ViB1M BcEEJBUSgoctKgpk2r7/o= X-Google-Smtp-Source: AGHT+IGJ80l8YVhjRo9dBel9J5Pq3aK8ulue475SHMoRD5VOgdZxLEedWtLm7lvh3HivwJo28VCMmg== X-Received: by 2002:a05:6e02:248f:b0:42f:8ae3:20c with SMTP id e9e14a558f8ab-42f8ae30b89mr224767205ab.19.1760358795380; Mon, 13 Oct 2025 05:33:15 -0700 (PDT) Received: from zippy.localdomain (c-75-72-117-212.hsd1.mn.comcast.net. [75.72.117.212]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-42f9037e344sm51529815ab.34.2025.10.13.05.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Oct 2025 05:33:15 -0700 (PDT) From: Alex Elder To: broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: dlan@gentoo.org, guodong@riscstar.com, pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-spi@vger.kernel.org, spacemit@lists.linux.dev, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Conor Dooley Subject: [PATCH v5 1/3] dt-bindings: spi: add SpacemiT K1 SPI support Date: Mon, 13 Oct 2025 07:33:06 -0500 Message-ID: <20251013123309.2252042-2-elder@riscstar.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20251013123309.2252042-1-elder@riscstar.com> References: <20251013123309.2252042-1-elder@riscstar.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add support for the SPI controller implemented by the SpacemiT K1 SoC. Acked-by: Conor Dooley Reviewed-by: Rob Herring (Arm) Signed-off-by: Alex Elder --- .../bindings/spi/spacemit,k1-spi.yaml | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spacemit,k1-spi.yaml diff --git a/Documentation/devicetree/bindings/spi/spacemit,k1-spi.yaml b/Documentation/devicetree/bindings/spi/spacemit,k1-spi.yaml new file mode 100644 index 0000000000000..e82c7f8d0b981 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spacemit,k1-spi.yaml @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/spacemit,k1-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SpacemiT K1 SoC Serial Peripheral Interface (SPI) + +maintainers: + - Alex Elder + +description: + The SpacemiT K1 SoC implements a SPI controller that has two 32-entry + FIFOs, for transmit and receive. Details are currently available in + section 18.2.1 of the K1 User Manual, found in the SpacemiT Keystone + K1 Documentation[1]. The controller transfers words using PIO. DMA + transfers are supported as well, if both TX and RX DMA channels are + specified, + + [1] https://developer.spacemit.com/documentation + +allOf: + - $ref: /schemas/spi/spi-controller.yaml# + +properties: + compatible: + const: spacemit,k1-spi + + reg: + maxItems: 1 + + clocks: + items: + - description: Core clock + - description: Bus clock + + clock-names: + items: + - const: core + - const: bus + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + dmas: + items: + - description: RX DMA channel + - description: TX DMA channel + + dma-names: + items: + - const: rx + - const: tx + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - interrupts + +unevaluatedProperties: false + +examples: + - | + + #include + spi@d401c000 { + compatible = "spacemit,k1-spi"; + reg = <0xd401c000 0x30>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&syscon_apbc CLK_SSP3>, + <&syscon_apbc CLK_SSP3_BUS>; + clock-names = "core", "bus"; + resets = <&syscon_apbc RESET_SSP3>; + interrupts = <55>; + dmas = <&pdma 20>, <&pdma 19>; + dma-names = "rx", "tx"; + }; -- 2.48.1