From: Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com>
To: Mark Brown <broonie@kernel.org>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
<linux-riscv@lists.infradead.org>, <linux-spi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
Conor Dooley <conor.dooley@microchip.com>,
Daire McNamara <daire.mcnamara@microchip.com>,
<valentina.fernandezalanis@microchip.com>,
Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com>
Subject: [PATCH 2/3] spi: dt-bindings: Add num-cs property for mpfs-spi
Date: Thu, 2 May 2024 15:34:09 +0100 [thread overview]
Message-ID: <20240502143410.12629-3-prajna.rajendrakumar@microchip.com> (raw)
In-Reply-To: <20240502143410.12629-1-prajna.rajendrakumar@microchip.com>
The PolarFire SoC SPI controller supports multiple chip selects,but in
the MSS, only one CS line is physically wired. To reflect this hardware
limitation in the device tree, the binding enforces that the 'num-cs'
property defaults to 1 and cannot exceed 1 unless additional
chip select lines are explicitly defined using GPIO descriptors.
Fixes: 2da187304e55 ("spi: add bindings for microchip mpfs spi")
Signed-off-by: Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com>
---
.../bindings/spi/microchip,mpfs-spi.yaml | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml b/Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
index 74a817cc7d94..19951951fdd6 100644
--- a/Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
+++ b/Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml
@@ -13,9 +13,6 @@ description:
maintainers:
- Conor Dooley <conor.dooley@microchip.com>
-allOf:
- - $ref: spi-controller.yaml#
-
properties:
compatible:
oneOf:
@@ -43,6 +40,22 @@ required:
- interrupts
- clocks
+allOf:
+ - $ref: spi-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: microchip,mpfs-spi
+ not:
+ required:
+ - cs-gpios
+ then:
+ properties:
+ num-cs:
+ default: 1
+ maximum: 1
+
unevaluatedProperties: false
examples:
--
2.25.1
next prev parent reply other threads:[~2024-05-02 14:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 14:34 [PATCH 0/3] Add support for GPIO based CS Prajna Rajendra Kumar
2024-05-02 14:34 ` [PATCH 1/3] spi: spi-microchip-core: " Prajna Rajendra Kumar
2024-05-02 15:54 ` Conor Dooley
2024-05-03 5:27 ` kernel test robot
2024-05-03 5:37 ` kernel test robot
2024-05-02 14:34 ` Prajna Rajendra Kumar [this message]
2024-05-02 14:53 ` [PATCH 2/3] spi: dt-bindings: Add num-cs property for mpfs-spi Krzysztof Kozlowski
2024-05-03 12:54 ` Prajna.Rajendrakumar
2024-05-03 14:46 ` Krzysztof Kozlowski
2024-05-03 16:11 ` Conor Dooley
2024-05-07 7:57 ` Prajna.Rajendrakumar
2024-05-03 10:40 ` Conor Dooley
2024-05-02 14:34 ` [PATCH 3/3] spi: spi-microchip-core: Fix the number of chip selects supported Prajna Rajendra Kumar
2024-05-02 15:47 ` Conor Dooley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240502143410.12629-3-prajna.rajendrakumar@microchip.com \
--to=prajna.rajendrakumar@microchip.com \
--cc=broonie@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=daire.mcnamara@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=robh@kernel.org \
--cc=valentina.fernandezalanis@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).