From nobody Fri Dec 19 02:49:30 2025 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (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 B34FC19A298 for ; Thu, 27 Jun 2024 16:29:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719505748; cv=none; b=At1Z0C2M/s8vtGanGVRcxtxgEAO3r2WrzgRaD1fZ4ky75UDnekooybf33KLfjGIH08c4Z1lmQnl3dqFkGkrupLJtR3Bm9QUfy2QDgFiVhH7zLJA5tJa2QQPQs+4ROhuAfqz6yhUx8bFU4sk5izscdiCufOOK74zIh5rZqMQ55bY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719505748; c=relaxed/simple; bh=+2qvP/Xn1mfOZRYqvXqWL+bWU40Wws67RBaWRqRKWkU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IAfm12rNFirwacN8Y2zYdaKycOOE7iLU1sbk3uhKl6qOFxYHPtZD7X9zehkp0wcDq+DsKvYzVaF89vV0BFaUzJqo6zotleLUDCYCD2xgEOAqSXRok01O/0JUMIFx5AN7xzmi4+OCLfhm3gQSWcZQIVveMFYZm9tjCh7+mlo9jKY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=beagleboard.org; spf=fail smtp.mailfrom=beagleboard.org; dkim=pass (2048-bit key) header.d=beagleboard-org.20230601.gappssmtp.com header.i=@beagleboard-org.20230601.gappssmtp.com header.b=sVyKVlVJ; arc=none smtp.client-ip=209.85.210.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=beagleboard.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=beagleboard.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=beagleboard-org.20230601.gappssmtp.com header.i=@beagleboard-org.20230601.gappssmtp.com header.b="sVyKVlVJ" Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-70675c617e7so249690b3a.0 for ; Thu, 27 Jun 2024 09:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20230601.gappssmtp.com; s=20230601; t=1719505746; x=1720110546; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ZygMn7uvC7jOC5Dk/T17fUNW5zArlioCIEC7mvrSJII=; b=sVyKVlVJOOVfjTxiN7v2uYdztofe5sx5tb3JNIv7Yls0t2pfLgmuaUccsgFXMgH5R5 fgIxJR0rXYiojvs4skEK6Kn4gbAQejM3IC512VVbzBVSuJ+3TkzI9IN8gcb5LW9J67iC 9BYksBqMoMngyWX4+fPlrF2D81e7qXy4LhEzhznmU+pazEvUSEMAC7D2hNQVa9u0uGo5 ySrbjLPKjA0s99MzAua0PDKbThORIkQxE1OuszNl+bySRHTMVJ5Zys0WN7n9Se1WbvJj o8KQNHTUvsaeWRzd2rzuyXE/9yu0npgU538NyooMCqslKY4iLSp2Z5m1k9b6sowIZmG9 TQlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719505746; x=1720110546; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZygMn7uvC7jOC5Dk/T17fUNW5zArlioCIEC7mvrSJII=; b=TE1UmKPh/ZkaGt7yp+ekPUb4lx3LlR6mGSwXnxvZDx8Y+J9ja7f160TQ16aA+VbNDZ fMwPGUZ2Dd/53FF1BEjNhd9EQGQ4lljngLSwn/BCoJP/22GXCZOfvq1Qk3QP1oJquwq3 9KNCu4C4bQ1NtRFR5uki5k+jMyTLj5WWAozzMhgL7rB95vHrApyo3Z9uu1uTCq4z+jgl QjS402xtW6Jblmz3qLkxxtgW3UgWwTQBpnWR0qYXV4/EsI74TU/l60zxqzhWOASZD9Gt 2k/RMQQOGQ5oGBfH7OFKwnK1Hw+tLFQuS+aymO8OhZExH8q0e8pJVo7PpVrDEiGN5e0S OGiQ== X-Forwarded-Encrypted: i=1; AJvYcCWoXMITF9AqlW3W6FPOJcMfI2U6jhJYja/1wZpPLzztjCdRKn2vNH6WViAqKwZLKAHr3txjOBHBUT04a02QR1gPhOl7aXczpMNjLfXI X-Gm-Message-State: AOJu0YwMBtFqdFo3k34IzC3UEckQ+Gp8023AY6KjeF710Fa2SDVwJo1f 7dbcREUko+1sHmy/2GYKy2trsH1Sfg1fVhNJFyHa09PXE/BwjJI8eAILUNObfQ== X-Google-Smtp-Source: AGHT+IHqbrEn/MzWqlaJoSGgZcxw7gHGkyhYPxfsB/waXYDQqYHNQq7LUMFy4l2KHYm4bXB3Fy1SLQ== X-Received: by 2002:a05:6a21:789a:b0:1be:d529:68b2 with SMTP id adf61e73a8af0-1bed529702amr1901349637.1.1719505745910; Thu, 27 Jun 2024 09:29:05 -0700 (PDT) Received: from [127.0.0.1] ([2401:4900:1f3e:18b0:e4e6:ed1:4c03:dcec]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-706b4a58dbdsm1560739b3a.198.2024.06.27.09.29.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 09:29:05 -0700 (PDT) From: Ayush Singh Date: Thu, 27 Jun 2024 21:56:13 +0530 Subject: [PATCH v5 3/7] dt-bindings: mikrobus: Add mikrobus-spi binding Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240627-mikrobus-scratch-spi-v5-3-9e6c148bf5f0@beagleboard.org> References: <20240627-mikrobus-scratch-spi-v5-0-9e6c148bf5f0@beagleboard.org> In-Reply-To: <20240627-mikrobus-scratch-spi-v5-0-9e6c148bf5f0@beagleboard.org> To: Mark Brown , Vaishnav M A , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Michael Walle , Andrew Lunn , jkridner@beagleboard.org, robertcnelson@beagleboard.org Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ayush Singh X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2720; i=ayush@beagleboard.org; h=from:subject:message-id; bh=+2qvP/Xn1mfOZRYqvXqWL+bWU40Wws67RBaWRqRKWkU=; b=owEBbQKS/ZANAwAIAQXO9ceJ5Vp0AcsmYgBmfZM3lAJFqmuXf/9R/f6QUc8jAUwTWHL8sDm0n zaRT+IOnhOJAjMEAAEIAB0WIQTfzBMe8k8tZW+lBNYFzvXHieVadAUCZn2TNwAKCRAFzvXHieVa dJtBEACq2bspM0xQ/MgwNhecatTUWuwJLDXryVNpVzGUeFH+1x/wPJJ7+RwikDxrwJ2rqzJgON6 MCCuZRlaDcV3VHyX9qXnrbIdrNj8Es55Ba33exrTiAdo2cIkqAaedFjk5+h27QQfvj5bP4n318v Rfg9I/VZ9Xe72YNbgGRIe/eZpODaJbXpMR/OUxREq46ezOEA0/rFbmYAyU5fFuGX+vBumR5YNXu 4k/jCNRXAHt2lH2D3s0RHsRwFSypPQQvLAVpRPJ34G+VBGtKAsShNsEpPA/9PcitKjIaK29eSaa baiWHbwt6iwiH5S15Q3JonCGg+smHQeziw/KqEjYWiV7B75fSCVrAxiO1uyYqtBuGmSugXHglIq LCKjcOhF688TYgxJCiW2O2yACllsekClGYyKv1L0zSkevJGxxDXwG8gf4bxEO4KArlAqkbcNmIo 9onNy87vJVOZ3sGg1FLP1X4OM8u8o+Bm8KBiMhV/PsMn3Cgw3nSY0ExnwRatjG17j5eCdqZC174 fF5Q5OCpVZJjXKnlofn0CB2FQkkDdLAEdNFWMx1UeVPexUfJX8vZo9O1LlZxj2Il5WDiQ4k15Q4 GDouJAvzTP3PucDdWiobFtWFvkEnW5jDy8NuBXZuoaOqUkUFCyfTSr8vjU/F86NmFsoBPpcobta 6HgDaZthkCq2Ieg== X-Developer-Key: i=ayush@beagleboard.org; a=openpgp; fpr=DFCC131EF24F2D656FA504D605CEF5C789E55A74 Add bindings for MikroBUS boards using SPI interface. Almost all of the properties that are valid for SPI devices can be used except reg. Since the goal is to allow use of the same MikroBUS board across different connectors, config needs to be independent of the actual SPI controller in mikroBUS port(s), it is not possible to define the chipselect by number in advance. Thus, `spi-cs-apply` property is used to specify the chipselect(s) by name. Another important fact is that while there is a CS pin in the mikroBUS connector, some boards (eg SPI Extend Click) use additional pins as chipselect. Thus we need a way to specify the CS pin(s) in terms of mikcrobus-connector which can then handle bindings the actual CS pin(s). Link: https://www.mikroe.com/spi-extend-click SPI Extend Click Signed-off-by: Ayush Singh --- .../devicetree/bindings/mikrobus/mikrobus-spi.yaml | 37 ++++++++++++++++++= ++++ MAINTAINERS | 1 + 2 files changed, 38 insertions(+) diff --git a/Documentation/devicetree/bindings/mikrobus/mikrobus-spi.yaml b= /Documentation/devicetree/bindings/mikrobus/mikrobus-spi.yaml new file mode 100644 index 000000000000..35ca2cce3b03 --- /dev/null +++ b/Documentation/devicetree/bindings/mikrobus/mikrobus-spi.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mikrobus/mikrobus-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: mikroBUS add-on board using SPI + +maintainers: + - Ayush Singh + +allOf: + - $ref: /schemas/mikrobus/mikrobus-board.yaml# + +properties: + compatible: + const: mikrobus-spi + + spi-cs-apply: + minItems: 1 + maxItems: 12 + items: + enum: [default, pwm, int, rx, tx, scl, sda, an, rst, sck, cipo, copi] + +required: + - compatible + +additionalProperties: false + +examples: + - | + thermo-click { + compatible =3D "maxim,max31855k", "mikrobus,spi"; + spi-max-frequency =3D <1000000>; + pinctrl-apply =3D "default", "spi_default"; + spi-cs-apply =3D "default"; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 14eba18832d5..88f2b3adc824 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15114,6 +15114,7 @@ M: Vaishnav M A S: Maintained F: Documentation/devicetree/bindings/connector/mikrobus-connector.yaml F: Documentation/devicetree/bindings/mikrobus/mikrobus-board.yaml +F: Documentation/devicetree/bindings/mikrobus/mikrobus-spi.yaml =20 MIKROTIK CRS3XX 98DX3236 BOARD SUPPORT M: Luka Kovacic --=20 2.45.2