diff mbox series

[v3,3/4] dt-bindings: spi: stm32: disable spi-slave property for stm32f4-f7

Message ID 20230615075815.310261-4-valentin.caron@foss.st.com (mailing list archive)
State Accepted
Commit e6afe03351ac81fbc4f2b93bf3b356f7b662939d
Headers show
Series spi: stm32: add spi device mode | expand

Commit Message

Valentin Caron June 15, 2023, 7:58 a.m. UTC
From: Alain Volmat <alain.volmat@foss.st.com>

STM32F4 and STM32F7 can't switch to spi device mode.
Forbid this property with compatible "st,stm32f4-spi".

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
---
 Documentation/devicetree/bindings/spi/st,stm32-spi.yaml | 1 +
 1 file changed, 1 insertion(+)

Comments

Krzysztof Kozlowski June 15, 2023, 1:36 p.m. UTC | #1
On 15/06/2023 09:58, Valentin Caron wrote:
> From: Alain Volmat <alain.volmat@foss.st.com>
> 
> STM32F4 and STM32F7 can't switch to spi device mode.
> Forbid this property with compatible "st,stm32f4-spi".

Just to clarify - driver cannot switch or hardware does not support it?

Please use subject prefixes matching the subsystem. You can get them for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching. (spi: dt-bindings:)

Best regards,
Krzysztof
Valentin Caron June 15, 2023, 5:38 p.m. UTC | #2
Hi Krzysztof,

On 6/15/23 15:36, Krzysztof Kozlowski wrote:
> On 15/06/2023 09:58, Valentin Caron wrote:
>> From: Alain Volmat <alain.volmat@foss.st.com>
>>
>> STM32F4 and STM32F7 can't switch to spi device mode.
>> Forbid this property with compatible "st,stm32f4-spi".
> Just to clarify - driver cannot switch or hardware does not support it?

Driver can't support it right now but hardware can.

> Please use subject prefixes matching the subsystem. You can get them for
> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
> your patch is touching. (spi: dt-bindings:)
Sorry, I missed that.
> Best regards,
> Krzysztof

Regards,
Valentin
Mark Brown June 15, 2023, 5:40 p.m. UTC | #3
On Thu, Jun 15, 2023 at 07:38:36PM +0200, Valentin CARON wrote:
> On 6/15/23 15:36, Krzysztof Kozlowski wrote:
> > On 15/06/2023 09:58, Valentin Caron wrote:

> > > STM32F4 and STM32F7 can't switch to spi device mode.
> > > Forbid this property with compatible "st,stm32f4-spi".

> > Just to clarify - driver cannot switch or hardware does not support it?

> Driver can't support it right now but hardware can.

That shouldn't be a restriction in the DT then, please send a patch
dropping this.
Krzysztof Kozlowski June 15, 2023, 8:20 p.m. UTC | #4
On 15/06/2023 19:38, Valentin CARON wrote:
> Hi Krzysztof,
> 
> On 6/15/23 15:36, Krzysztof Kozlowski wrote:
>> On 15/06/2023 09:58, Valentin Caron wrote:
>>> From: Alain Volmat <alain.volmat@foss.st.com>
>>>
>>> STM32F4 and STM32F7 can't switch to spi device mode.
>>> Forbid this property with compatible "st,stm32f4-spi".
>> Just to clarify - driver cannot switch or hardware does not support it?
> 
> Driver can't support it right now but hardware can.
> 

DT is independent of some chosen (or current) Linux drivers. Imagine
Linux cannot support it but OpenBSD does.

As Mark pointed out, this needs a follow up commit.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml b/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml
index 9ca1a843c820..f1c86e694af1 100644
--- a/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml
+++ b/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml
@@ -27,6 +27,7 @@  allOf:
     then:
       properties:
         st,spi-midi-ns: false
+        spi-slave: false
 
 properties:
   compatible: