Skip to content

Commit 2f9caba

Browse files
Wei Fangkuba-moo
authored andcommitted
dt-bindings: net: tja11xx: fix the broken binding
As Rob pointed in another mail thread [1], the binding of tja11xx PHY is completely broken, the schema cannot catch the error in the DTS. A compatiable string must be needed if we want to add a custom propety. So extract known PHY IDs from the tja11xx PHY drivers and convert them into supported compatible string list to fix the broken binding issue. Fixes: 52b2fe4 ("dt-bindings: net: tja11xx: add nxp,refclk_in property") Link: https://lore.kernel.org/[email protected] # [1] Signed-off-by: Wei Fang <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e8a63d4 commit 2f9caba

File tree

1 file changed

+46
-16
lines changed

1 file changed

+46
-16
lines changed

Documentation/devicetree/bindings/net/nxp,tja11xx.yaml

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,53 @@ maintainers:
1414
description:
1515
Bindings for NXP TJA11xx automotive PHYs
1616

17+
properties:
18+
compatible:
19+
enum:
20+
- ethernet-phy-id0180.dc40
21+
- ethernet-phy-id0180.dc41
22+
- ethernet-phy-id0180.dc48
23+
- ethernet-phy-id0180.dd00
24+
- ethernet-phy-id0180.dd01
25+
- ethernet-phy-id0180.dd02
26+
- ethernet-phy-id0180.dc80
27+
- ethernet-phy-id0180.dc82
28+
- ethernet-phy-id001b.b010
29+
- ethernet-phy-id001b.b013
30+
- ethernet-phy-id001b.b030
31+
- ethernet-phy-id001b.b031
32+
1733
allOf:
1834
- $ref: ethernet-phy.yaml#
35+
- if:
36+
properties:
37+
compatible:
38+
contains:
39+
enum:
40+
- ethernet-phy-id0180.dc40
41+
- ethernet-phy-id0180.dc41
42+
- ethernet-phy-id0180.dc48
43+
- ethernet-phy-id0180.dd00
44+
- ethernet-phy-id0180.dd01
45+
- ethernet-phy-id0180.dd02
46+
47+
then:
48+
properties:
49+
nxp,rmii-refclk-in:
50+
type: boolean
51+
description: |
52+
The REF_CLK is provided for both transmitted and received data
53+
in RMII mode. This clock signal is provided by the PHY and is
54+
typically derived from an external 25MHz crystal. Alternatively,
55+
a 50MHz clock signal generated by an external oscillator can be
56+
connected to pin REF_CLK. A third option is to connect a 25MHz
57+
clock to pin CLK_IN_OUT. So, the REF_CLK should be configured
58+
as input or output according to the actual circuit connection.
59+
If present, indicates that the REF_CLK will be configured as
60+
interface reference clock input when RMII mode enabled.
61+
If not present, the REF_CLK will be configured as interface
62+
reference clock output when RMII mode enabled.
63+
Only supported on TJA1100 and TJA1101.
1964
2065
patternProperties:
2166
"^ethernet-phy@[0-9a-f]+$":
@@ -32,22 +77,6 @@ patternProperties:
3277
description:
3378
The ID number for the child PHY. Should be +1 of parent PHY.
3479

35-
nxp,rmii-refclk-in:
36-
type: boolean
37-
description: |
38-
The REF_CLK is provided for both transmitted and received data
39-
in RMII mode. This clock signal is provided by the PHY and is
40-
typically derived from an external 25MHz crystal. Alternatively,
41-
a 50MHz clock signal generated by an external oscillator can be
42-
connected to pin REF_CLK. A third option is to connect a 25MHz
43-
clock to pin CLK_IN_OUT. So, the REF_CLK should be configured
44-
as input or output according to the actual circuit connection.
45-
If present, indicates that the REF_CLK will be configured as
46-
interface reference clock input when RMII mode enabled.
47-
If not present, the REF_CLK will be configured as interface
48-
reference clock output when RMII mode enabled.
49-
Only supported on TJA1100 and TJA1101.
50-
5180
required:
5281
- reg
5382

@@ -60,6 +89,7 @@ examples:
6089
#size-cells = <0>;
6190
6291
tja1101_phy0: ethernet-phy@4 {
92+
compatible = "ethernet-phy-id0180.dc40";
6393
reg = <0x4>;
6494
nxp,rmii-refclk-in;
6595
};

0 commit comments

Comments
 (0)