From patchwork Thu Jun 27 16:26:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13714799 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 C7C1FC2BD09 for ; Thu, 27 Jun 2024 16:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: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:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZygMn7uvC7jOC5Dk/T17fUNW5zArlioCIEC7mvrSJII=; b=t92xcdR9NPfRhHove32bY7nOw0 c8mVot8JOhYaGf8c8UF++R7a8/yFo6+oA+yJLg96Ty47guNSiq8hs7n8j+RlWxSW0cEgdr9YxSC8l YzdylvFX7Hz/kAMJV+jDbQadsdEq4XU8G0QsqjVaFNjWZDe0Frhy/+dWL2srAqPG7OJb0hOSwTP+L knMu1kEXL6Q0tmvt6lJGl8lzMIzzZ4XPYvBct/SEhnk3RoDon+JafxNXKaiQfA0JH1CUxgMSaA7pj hCz427XOjv6oddHH6e2JeRDfTCZHnZuwmhyhIxL8zSwKQ2jeAYo4Z33D1096Q5ptSVNitgPL5c2wx qonmbOBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMrzr-0000000B2rd-1T3u; Thu, 27 Jun 2024 16:29:19 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMrzf-0000000B2jr-0Auz for linux-arm-kernel@lists.infradead.org; Thu, 27 Jun 2024 16:29:08 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-70661ab747bso179309b3a.2 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=lists.infradead.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=pWdLopEAjTEF52HD5rz0zfcsX42yfoTcyBaGKOieA3BhcHOlwIYjQOfB9XVUM2gvH0 JqdN/cD9uc927wjNH3mbRgctQz5xfvxDimch2iozQb4iabyQRIYp7uOwnG0MrdXmb0j0 j2DWnMzsl3wo6WUeIKnjH9uxqZb1U/xd5hoJPvFTANcWvqDleqAAM65125PFRu/ouRnp N9SVBtqK9GUHhZ0cHfE1PfEdg4jedqs4n7/9GX+OwNrjOVvPcldpZF0AXx27GU+sXzvd DRkaVZpxmQNpugKASKqK2t2pfHVTlfiE5DPZh2J/ji2XCig5qSWHmmB6fDwVKioJvGhn 5HLQ== 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=M8GKnmwWjt6ZjO/SvpDOsbd/OF45n/0dR8ERDsiOaN8U76RCYBnXaAv9kif3qlVvQT uVOYDvtUg9D2ymm0U8jaKMZoY7nMnvtAhoZfo8BJRYbTkg8nCO473ajw9H2ABshSC91r AWDvNwTPoqTEgN9sdUqt0B7vHHI83qNRfaL2ByzmzcCmywGq+pQY02F//J1fHABvjNJB GP57Zw+JvTxPBgVJDkNkI2Wwif40UQPLqw5eM1etBm5P1f4Y2lu4j1tap6Tl5OsvZblI QXbt1QvbibjhN159+lLItSRXRz6lBVsQElHgqzroIrUIhlfEwRPIJ0GK/wrrLXyKAKz4 OjNg== X-Forwarded-Encrypted: i=1; AJvYcCUfOhNxXYH/s0KyVz7SIOqlQ6BtJ9pvfeylHQ3JRLzQceUiD8hs+tkwHR8ytNa91rknVlTCsv6wrNHRA03rQGAM1yC0wYlke8jI5qM5oTxYROTEhbo= X-Gm-Message-State: AOJu0YzulpfMEUYzTmci9U6Mj+8rlDcJESREGq7lLKE7HT746kawdpOo goPNfQ8y8DJhlHwsryM3/j0VT4l0268k8QjkjCCIfejMv/4YScNMLZTdzWQ/2A== 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 MIME-Version: 1.0 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240627_092907_167918_C16218D4 X-CRM114-Status: GOOD ( 16.87 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 = "maxim,max31855k", "mikrobus,spi"; + spi-max-frequency = <1000000>; + pinctrl-apply = "default", "spi_default"; + spi-cs-apply = "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 MIKROTIK CRS3XX 98DX3236 BOARD SUPPORT M: Luka Kovacic