As mentioned in commit f46b06e62c86 ("spi: spi-fsl-lpspi: Read
chip-select amount from hardware for i.MX93"), some devices support up
to 3 chip selects so update the max value.
This isn't a fix or functional change because the devices with 3 chip
selects support reading the number of chip selects from hardware, so the
value wouldn't have needed to be set here. However the commit states
that the DT could be used to overwrite any HW value, so the full range
should be supported. This also avoids confusion for any readers about
how many chip selects there are.
Signed-off-by: James Clark <james.clark@linaro.org>
---
Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml
index a65a42ccaafe..ce7bd44ee17e 100644
--- a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml
@@ -64,7 +64,7 @@ properties:
description:
number of chip selects.
minimum: 1
- maximum: 2
+ maximum: 3
default: 1
power-domains:
--
2.34.1
On Thu, Aug 14, 2025 at 05:06:51PM +0100, James Clark wrote: > As mentioned in commit f46b06e62c86 ("spi: spi-fsl-lpspi: Read > chip-select amount from hardware for i.MX93"), some devices support up > to 3 chip selects so update the max value. > > This isn't a fix or functional change because the devices with 3 chip > selects support reading the number of chip selects from hardware, so the > value wouldn't have needed to be set here. However the commit states > that the DT could be used to overwrite any HW value, so the full range > should be supported. This also avoids confusion for any readers about > how many chip selects there are. If reading the h/w gives you 3, when would the DT need to override that with 3? You only need an override for 2 or less. > > Signed-off-by: James Clark <james.clark@linaro.org> > --- > Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml > index a65a42ccaafe..ce7bd44ee17e 100644 > --- a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml > +++ b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml > @@ -64,7 +64,7 @@ properties: > description: > number of chip selects. > minimum: 1 > - maximum: 2 > + maximum: 3 > default: 1 > > power-domains: > > -- > 2.34.1 >
On 14/08/2025 9:59 pm, Rob Herring wrote: > On Thu, Aug 14, 2025 at 05:06:51PM +0100, James Clark wrote: >> As mentioned in commit f46b06e62c86 ("spi: spi-fsl-lpspi: Read >> chip-select amount from hardware for i.MX93"), some devices support up >> to 3 chip selects so update the max value. >> >> This isn't a fix or functional change because the devices with 3 chip >> selects support reading the number of chip selects from hardware, so the >> value wouldn't have needed to be set here. However the commit states >> that the DT could be used to overwrite any HW value, so the full range >> should be supported. This also avoids confusion for any readers about >> how many chip selects there are. > > If reading the h/w gives you 3, when would the DT need to override that > with 3? You only need an override for 2 or less. > Maybe it should say "currently the devices with 3 chip selects". I suppose there could be one in the future that has 3 but can't probe it. TBH the main reason I added it was because it was confusing to work out what the actual max was. This says 2 when in reality it's 3. I suppose documenting that it should be left blank if reading from the hardware is supported might improve it too. >> >> Signed-off-by: James Clark <james.clark@linaro.org> >> --- >> Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml >> index a65a42ccaafe..ce7bd44ee17e 100644 >> --- a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml >> +++ b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml >> @@ -64,7 +64,7 @@ properties: >> description: >> number of chip selects. >> minimum: 1 >> - maximum: 2 >> + maximum: 3 >> default: 1 >> >> power-domains: >> >> -- >> 2.34.1 >>
On Thu, Aug 14, 2025 at 05:06:51PM +0100, James Clark wrote: > As mentioned in commit f46b06e62c86 ("spi: spi-fsl-lpspi: Read > chip-select amount from hardware for i.MX93"), some devices support up > to 3 chip selects so update the max value. > > This isn't a fix or functional change because the devices with 3 chip > selects support reading the number of chip selects from hardware, so the > value wouldn't have needed to be set here. However the commit states > that the DT could be used to overwrite any HW value, so the full range > should be supported. This also avoids confusion for any readers about > how many chip selects there are. > > Signed-off-by: James Clark <james.clark@linaro.org> > --- > Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml > index a65a42ccaafe..ce7bd44ee17e 100644 > --- a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml > +++ b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml > @@ -64,7 +64,7 @@ properties: > description: > number of chip selects. > minimum: 1 > - maximum: 2 > + maximum: 3 You need keep the same restriction for other compatible string, or need reason for other platform which also support up to 3. Frank > default: 1 > > power-domains: > > -- > 2.34.1 >
On 14/08/2025 7:28 pm, Frank Li wrote: > On Thu, Aug 14, 2025 at 05:06:51PM +0100, James Clark wrote: >> As mentioned in commit f46b06e62c86 ("spi: spi-fsl-lpspi: Read >> chip-select amount from hardware for i.MX93"), some devices support up >> to 3 chip selects so update the max value. >> >> This isn't a fix or functional change because the devices with 3 chip >> selects support reading the number of chip selects from hardware, so the >> value wouldn't have needed to be set here. However the commit states >> that the DT could be used to overwrite any HW value, so the full range >> should be supported. This also avoids confusion for any readers about >> how many chip selects there are. >> >> Signed-off-by: James Clark <james.clark@linaro.org> >> --- >> Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml >> index a65a42ccaafe..ce7bd44ee17e 100644 >> --- a/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml >> +++ b/Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml >> @@ -64,7 +64,7 @@ properties: >> description: >> number of chip selects. >> minimum: 1 >> - maximum: 2 >> + maximum: 3 > > You need keep the same restriction for other compatible string, or need Not sure I follow here. Don't the binding docs only cover the maximum range of valid inputs for all covered platforms? They don't go into details about which ranges are valid for every individual sub-platform. For example if a platform didn't support DMA we wouldn't say it's not valid to label DMA channels in the binding doc. If someone puts 3 instead of 2 then that's just a mistake, but documenting valid ranges can't really fix a mistake like that. And changing 2 to 3 doesn't break existing DTs, only making it smaller would. > reason for other platform which also support up to 3. The reason is that some platforms support 3, so I thought it made most sense to set the max to 3. I replied more on the thread with Rob, but we can just drop this one. > > Frank > >> default: 1 >> >> power-domains: >> >> -- >> 2.34.1 >>
© 2016 - 2025 Red Hat, Inc.