* [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha
@ 2023-05-15 7:45 Krzysztof Kozlowski
2023-05-15 10:50 ` Vladimir Oltean
0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-15 7:45 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, netdev, devicetree,
linux-kernel
Cc: Krzysztof Kozlowski, Conor Dooley
Some boards use SJA1105 Ethernet Switch with SPI CPHA, while ones with
SJA1110 use SPI CPOL, so document this to fix dtbs_check warnings:
arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dtb: ethernet-switch@0: Unevaluated properties are not allowed ('spi-cpol' was unexpected)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
---
Changes since v4:
1. Order compatibles.
2. Add tag.
Changes since v3:
1. Rebase.
2. Require cpha/cpol properties on respective variants (thus update
example).
Changes since v2:
1. Add allOf:if:then, based on feedback from Vladimir.
Changes since v1:
1. Add also cpha.
---
.../bindings/net/dsa/nxp,sja1105.yaml | 32 ++++++++++++++++---
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
index 9a64ed658745..4d5f5cc6d031 100644
--- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
@@ -12,10 +12,6 @@ description:
cs_sck_delay of 500ns. Ensuring that this SPI timing requirement is observed
depends on the SPI bus master driver.
-allOf:
- - $ref: dsa.yaml#/$defs/ethernet-ports
- - $ref: /schemas/spi/spi-peripheral-props.yaml#
-
maintainers:
- Vladimir Oltean <vladimir.oltean@nxp.com>
@@ -36,6 +32,9 @@ properties:
reg:
maxItems: 1
+ spi-cpha: true
+ spi-cpol: true
+
# Optional container node for the 2 internal MDIO buses of the SJA1110
# (one for the internal 100base-T1 PHYs and the other for the single
# 100base-TX PHY). The "reg" property does not have physical significance.
@@ -109,6 +108,30 @@ $defs:
1860, 1880, 1900, 1920, 1940, 1960, 1980, 2000, 2020, 2040, 2060, 2080,
2100, 2120, 2140, 2160, 2180, 2200, 2220, 2240, 2260]
+allOf:
+ - $ref: dsa.yaml#/$defs/ethernet-ports
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - if:
+ properties:
+ compatible:
+ enum:
+ - nxp,sja1105e
+ - nxp,sja1105p
+ - nxp,sja1105q
+ - nxp,sja1105r
+ - nxp,sja1105s
+ - nxp,sja1105t
+ then:
+ properties:
+ spi-cpol: false
+ required:
+ - spi-cpha
+ else:
+ properties:
+ spi-cpha: false
+ required:
+ - spi-cpol
+
unevaluatedProperties: false
examples:
@@ -120,6 +143,7 @@ examples:
ethernet-switch@1 {
reg = <0x1>;
compatible = "nxp,sja1105t";
+ spi-cpha;
ethernet-ports {
#address-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha
2023-05-15 7:45 [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha Krzysztof Kozlowski
@ 2023-05-15 10:50 ` Vladimir Oltean
2023-05-17 3:10 ` Jakub Kicinski
0 siblings, 1 reply; 9+ messages in thread
From: Vladimir Oltean @ 2023-05-15 10:50 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Andrew Lunn, Florian Fainelli, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev, devicetree, linux-kernel, Conor Dooley
On Mon, May 15, 2023 at 09:45:25AM +0200, Krzysztof Kozlowski wrote:
> Some boards use SJA1105 Ethernet Switch with SPI CPHA, while ones with
> SJA1110 use SPI CPOL, so document this to fix dtbs_check warnings:
>
> arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dtb: ethernet-switch@0: Unevaluated properties are not allowed ('spi-cpol' was unexpected)
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>
> ---
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha
2023-05-15 10:50 ` Vladimir Oltean
@ 2023-05-17 3:10 ` Jakub Kicinski
2023-05-17 7:01 ` Krzysztof Kozlowski
2023-05-17 8:26 ` Krzysztof Kozlowski
0 siblings, 2 replies; 9+ messages in thread
From: Jakub Kicinski @ 2023-05-17 3:10 UTC (permalink / raw)
To: Vladimir Oltean
Cc: Krzysztof Kozlowski, Andrew Lunn, Florian Fainelli,
David S. Miller, Eric Dumazet, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, netdev, devicetree,
linux-kernel, Conor Dooley
On Mon, 15 May 2023 13:50:35 +0300 Vladimir Oltean wrote:
> On Mon, May 15, 2023 at 09:45:25AM +0200, Krzysztof Kozlowski wrote:
> > Some boards use SJA1105 Ethernet Switch with SPI CPHA, while ones with
> > SJA1110 use SPI CPOL, so document this to fix dtbs_check warnings:
> >
> > arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dtb: ethernet-switch@0: Unevaluated properties are not allowed ('spi-cpol' was unexpected)
> >
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>
> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Is my instinct that this should go to net-next correct?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha
2023-05-17 3:10 ` Jakub Kicinski
@ 2023-05-17 7:01 ` Krzysztof Kozlowski
2023-05-17 7:04 ` Vladimir Oltean
2023-05-17 8:26 ` Krzysztof Kozlowski
1 sibling, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 7:01 UTC (permalink / raw)
To: Jakub Kicinski, Vladimir Oltean
Cc: Andrew Lunn, Florian Fainelli, David S. Miller, Eric Dumazet,
Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
netdev, devicetree, linux-kernel, Conor Dooley
On 17/05/2023 05:10, Jakub Kicinski wrote:
> On Mon, 15 May 2023 13:50:35 +0300 Vladimir Oltean wrote:
>> On Mon, May 15, 2023 at 09:45:25AM +0200, Krzysztof Kozlowski wrote:
>>> Some boards use SJA1105 Ethernet Switch with SPI CPHA, while ones with
>>> SJA1110 use SPI CPOL, so document this to fix dtbs_check warnings:
>>>
>>> arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dtb: ethernet-switch@0: Unevaluated properties are not allowed ('spi-cpol' was unexpected)
>>>
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>>
>> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> Is my instinct that this should go to net-next correct?
Yes, apologies, I usually forget the net-next tag.
Shall I resend?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha
2023-05-17 7:01 ` Krzysztof Kozlowski
@ 2023-05-17 7:04 ` Vladimir Oltean
2023-05-17 7:08 ` Vladimir Oltean
0 siblings, 1 reply; 9+ messages in thread
From: Vladimir Oltean @ 2023-05-17 7:04 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Jakub Kicinski, Andrew Lunn, Florian Fainelli, David S. Miller,
Eric Dumazet, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev, devicetree, linux-kernel, Conor Dooley
On Wed, May 17, 2023 at 09:01:38AM +0200, Krzysztof Kozlowski wrote:
> Yes, apologies, I usually forget the net-next tag.
>
> Shall I resend?
Probably not.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha
2023-05-17 7:04 ` Vladimir Oltean
@ 2023-05-17 7:08 ` Vladimir Oltean
2023-05-17 8:23 ` Krzysztof Kozlowski
0 siblings, 1 reply; 9+ messages in thread
From: Vladimir Oltean @ 2023-05-17 7:08 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Jakub Kicinski, Andrew Lunn, Florian Fainelli, David S. Miller,
Eric Dumazet, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev, devicetree, linux-kernel, Conor Dooley
On Wed, May 17, 2023 at 10:04:37AM +0300, Vladimir Oltean wrote:
> On Wed, May 17, 2023 at 09:01:38AM +0200, Krzysztof Kozlowski wrote:
> > Yes, apologies, I usually forget the net-next tag.
> >
> > Shall I resend?
>
> Probably not.
Although patchwork marked it as "not a local patch", so no tests ran on
it. Let's see what Jakub says.
https://patchwork.kernel.org/project/netdevbpf/patch/20230515074525.53592-1-krzysztof.kozlowski@linaro.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha
2023-05-17 7:08 ` Vladimir Oltean
@ 2023-05-17 8:23 ` Krzysztof Kozlowski
0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 8:23 UTC (permalink / raw)
To: Vladimir Oltean
Cc: Jakub Kicinski, Andrew Lunn, Florian Fainelli, David S. Miller,
Eric Dumazet, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev, devicetree, linux-kernel, Conor Dooley
On 17/05/2023 09:08, Vladimir Oltean wrote:
> On Wed, May 17, 2023 at 10:04:37AM +0300, Vladimir Oltean wrote:
>> On Wed, May 17, 2023 at 09:01:38AM +0200, Krzysztof Kozlowski wrote:
>>> Yes, apologies, I usually forget the net-next tag.
>>>
>>> Shall I resend?
>>
>> Probably not.
>
> Although patchwork marked it as "not a local patch", so no tests ran on
> it. Let's see what Jakub says.
> https://patchwork.kernel.org/project/netdevbpf/patch/20230515074525.53592-1-krzysztof.kozlowski@linaro.org/
I will just resend in such case.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha
2023-05-17 3:10 ` Jakub Kicinski
2023-05-17 7:01 ` Krzysztof Kozlowski
@ 2023-05-17 8:26 ` Krzysztof Kozlowski
2023-05-17 15:06 ` Jakub Kicinski
1 sibling, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 8:26 UTC (permalink / raw)
To: Jakub Kicinski, Vladimir Oltean
Cc: Andrew Lunn, Florian Fainelli, David S. Miller, Eric Dumazet,
Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
netdev, devicetree, linux-kernel, Conor Dooley
On 17/05/2023 05:10, Jakub Kicinski wrote:
> On Mon, 15 May 2023 13:50:35 +0300 Vladimir Oltean wrote:
>> On Mon, May 15, 2023 at 09:45:25AM +0200, Krzysztof Kozlowski wrote:
>>> Some boards use SJA1105 Ethernet Switch with SPI CPHA, while ones with
>>> SJA1110 use SPI CPOL, so document this to fix dtbs_check warnings:
>>>
>>> arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dtb: ethernet-switch@0: Unevaluated properties are not allowed ('spi-cpol' was unexpected)
>>>
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>>
>> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> Is my instinct that this should go to net-next correct?
It would be great missing net-next was pointed out by checkpatch.pl.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha
2023-05-17 8:26 ` Krzysztof Kozlowski
@ 2023-05-17 15:06 ` Jakub Kicinski
0 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2023-05-17 15:06 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Vladimir Oltean, Andrew Lunn, Florian Fainelli, David S. Miller,
Eric Dumazet, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev, devicetree, linux-kernel, Conor Dooley
On Wed, 17 May 2023 10:26:38 +0200 Krzysztof Kozlowski wrote:
> On 17/05/2023 05:10, Jakub Kicinski wrote:
> > On Mon, 15 May 2023 13:50:35 +0300 Vladimir Oltean wrote:
> >> On Mon, May 15, 2023 at 09:45:25AM +0200, Krzysztof Kozlowski wrote:
> [...]
> >>
> >> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> >
> > Is my instinct that this should go to net-next correct?
>
> It would be great missing net-next was pointed out by checkpatch.pl.
FWIW, I'd have taken the patch as is. There isn't much the current
build tester can do for dt-bindings, anyway. But thanks for the resend
:)
I was wondering about checkpatch, too, but haven't come up with any
great solution. The problem is kind of at an intersection of checkpatch
and get_maintainer.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-05-17 15:07 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-15 7:45 [PATCH v5] dt-bindings: net: nxp,sja1105: document spi-cpol/cpha Krzysztof Kozlowski
2023-05-15 10:50 ` Vladimir Oltean
2023-05-17 3:10 ` Jakub Kicinski
2023-05-17 7:01 ` Krzysztof Kozlowski
2023-05-17 7:04 ` Vladimir Oltean
2023-05-17 7:08 ` Vladimir Oltean
2023-05-17 8:23 ` Krzysztof Kozlowski
2023-05-17 8:26 ` Krzysztof Kozlowski
2023-05-17 15:06 ` Jakub Kicinski
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).