Skip to content

Commit af2eab1

Browse files
krzkdavem330
authored andcommitted
dt-bindings: net: nxp,sja1105: document spi-cpol/cpha
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) Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 96ba44c commit af2eab1

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ description:
1212
cs_sck_delay of 500ns. Ensuring that this SPI timing requirement is observed
1313
depends on the SPI bus master driver.
1414

15-
allOf:
16-
- $ref: dsa.yaml#/$defs/ethernet-ports
17-
- $ref: /schemas/spi/spi-peripheral-props.yaml#
18-
1915
maintainers:
2016
- Vladimir Oltean <vladimir.oltean@nxp.com>
2117

@@ -36,6 +32,9 @@ properties:
3632
reg:
3733
maxItems: 1
3834

35+
spi-cpha: true
36+
spi-cpol: true
37+
3938
# Optional container node for the 2 internal MDIO buses of the SJA1110
4039
# (one for the internal 100base-T1 PHYs and the other for the single
4140
# 100base-TX PHY). The "reg" property does not have physical significance.
@@ -109,6 +108,30 @@ $defs:
109108
1860, 1880, 1900, 1920, 1940, 1960, 1980, 2000, 2020, 2040, 2060, 2080,
110109
2100, 2120, 2140, 2160, 2180, 2200, 2220, 2240, 2260]
111110

111+
allOf:
112+
- $ref: dsa.yaml#/$defs/ethernet-ports
113+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
114+
- if:
115+
properties:
116+
compatible:
117+
enum:
118+
- nxp,sja1105e
119+
- nxp,sja1105p
120+
- nxp,sja1105q
121+
- nxp,sja1105r
122+
- nxp,sja1105s
123+
- nxp,sja1105t
124+
then:
125+
properties:
126+
spi-cpol: false
127+
required:
128+
- spi-cpha
129+
else:
130+
properties:
131+
spi-cpha: false
132+
required:
133+
- spi-cpol
134+
112135
unevaluatedProperties: false
113136

114137
examples:
@@ -120,6 +143,7 @@ examples:
120143
ethernet-switch@1 {
121144
reg = <0x1>;
122145
compatible = "nxp,sja1105t";
146+
spi-cpha;
123147
124148
ethernet-ports {
125149
#address-cells = <1>;

0 commit comments

Comments
 (0)