Skip to content

Commit 243996d

Browse files
nxpfranklikuba-moo
authored andcommitted
dt-bindings: net: Convert fsl-fman to yaml
Convert fsl-fman from txt to yaml format and split it fsl,fman.yam, fsl,fman-port.yaml, fsl-muram.yaml, fsl-mdio.yaml. Addition changes: fsl,fman.yaml: - Fixed interrupts in example. - Fixed ethernet@e8000 miss } in example. - ptp-timer add label in example. - Ref to new fsl,fman*.yaml. - Reorder property in example. - Keep only one example. - Add const for #address-cells and #size-cells. - Use defined interrupt type. - ptp example use node name phc. fsl,fman-port: - Keep only one example. fsl,fman-mdio: - Add little-endian property. - Add ref to mdio.yaml. - Remove suppress-preamble. - Add #address-cells and #size-cells in example. - Remove clock-frequency, which already describe in mmio.yaml. fsl,muram.yaml: - Add reg property. - Remove range property. - Use reg instead of range in example. Signed-off-by: Frank Li <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 01479f1 commit 243996d

File tree

6 files changed

+443
-549
lines changed

6 files changed

+443
-549
lines changed
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/fsl,fman-mdio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale Frame Manager MDIO Device
8+
9+
maintainers:
10+
- Frank Li <[email protected]>
11+
12+
description: FMan MDIO Node.
13+
The MDIO is a bus to which the PHY devices are connected.
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- fsl,fman-mdio
19+
- fsl,fman-xmdio
20+
- fsl,fman-memac-mdio
21+
description:
22+
Must include "fsl,fman-mdio" for 1 Gb/s MDIO from FMan v2.
23+
Must include "fsl,fman-xmdio" for 10 Gb/s MDIO from FMan v2.
24+
Must include "fsl,fman-memac-mdio" for 1/10 Gb/s MDIO from
25+
FMan v3.
26+
27+
reg:
28+
maxItems: 1
29+
30+
clocks:
31+
items:
32+
- description: A reference to the input clock of the controller
33+
from which the MDC frequency is derived.
34+
35+
interrupts:
36+
maxItems: 1
37+
38+
fsl,fman-internal-mdio:
39+
$ref: /schemas/types.yaml#/definitions/flag
40+
description:
41+
Fman has internal MDIO for internal PCS(Physical
42+
Coding Sublayer) PHYs and external MDIO for external PHYs.
43+
The settings and programming routines for internal/external
44+
MDIO are different. Must be included for internal MDIO.
45+
46+
fsl,erratum-a009885:
47+
$ref: /schemas/types.yaml#/definitions/flag
48+
description: Indicates the presence of the A009885
49+
erratum describing that the contents of MDIO_DATA may
50+
become corrupt unless it is read within 16 MDC cycles
51+
of MDIO_CFG[BSY] being cleared, when performing an
52+
MDIO read operation.
53+
54+
fsl,erratum-a011043:
55+
$ref: /schemas/types.yaml#/definitions/flag
56+
description:
57+
Indicates the presence of the A011043 erratum
58+
describing that the MDIO_CFG[MDIO_RD_ER] bit may be falsely
59+
set when reading internal PCS registers. MDIO reads to
60+
internal PCS registers may result in having the
61+
MDIO_CFG[MDIO_RD_ER] bit set, even when there is no error and
62+
read data (MDIO_DATA[MDIO_DATA]) is correct.
63+
Software may get false read error when reading internal
64+
PCS registers through MDIO. As a workaround, all internal
65+
MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit.
66+
67+
For internal PHY device on internal mdio bus, a PHY node should be created.
68+
See the definition of the PHY node in booting-without-of.txt for an
69+
example of how to define a PHY (Internal PHY has no interrupt line).
70+
- For "fsl,fman-mdio" compatible internal mdio bus, the PHY is TBI PHY.
71+
- For "fsl,fman-memac-mdio" compatible internal mdio bus, the PHY is PCS PHY.
72+
The PCS PHY address should correspond to the value of the appropriate
73+
MDEV_PORT.
74+
75+
little-endian:
76+
$ref: /schemas/types.yaml#/definitions/flag
77+
description:
78+
IP block is little-endian mode. The default endian mode is big-endian.
79+
80+
required:
81+
- compatible
82+
- reg
83+
84+
allOf:
85+
- $ref: mdio.yaml#
86+
87+
unevaluatedProperties: false
88+
89+
examples:
90+
- |
91+
mdio@f1000 {
92+
compatible = "fsl,fman-xmdio";
93+
reg = <0xf1000 0x1000>;
94+
interrupts = <101 2 0 0>;
95+
};
96+
97+
- |
98+
mdio@e3120 {
99+
compatible = "fsl,fman-mdio";
100+
reg = <0xe3120 0xee0>;
101+
fsl,fman-internal-mdio;
102+
#address-cells = <1>;
103+
#size-cells = <0>;
104+
105+
tbi-phy@8 {
106+
reg = <0x8>;
107+
device_type = "tbi-phy";
108+
};
109+
};
110+
111+
- |
112+
mdio@f1000 {
113+
compatible = "fsl,fman-memac-mdio";
114+
reg = <0xf1000 0x1000>;
115+
fsl,fman-internal-mdio;
116+
#address-cells = <1>;
117+
#size-cells = <0>;
118+
119+
pcsphy6: ethernet-phy@0 {
120+
reg = <0x0>;
121+
};
122+
};
123+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/fsl,fman-muram.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale Frame Manager MURAM Device
8+
9+
maintainers:
10+
- Frank Li <[email protected]>
11+
12+
description: |
13+
FMan Internal memory - shared between all the FMan modules.
14+
It contains data structures that are common and written to or read by
15+
the modules.
16+
17+
FMan internal memory is split into the following parts:
18+
Packet buffering (Tx/Rx FIFOs)
19+
Frames internal context
20+
21+
properties:
22+
compatible:
23+
enum:
24+
- fsl,fman-muram
25+
26+
reg:
27+
maxItems: 1
28+
29+
required:
30+
- compatible
31+
- reg
32+
33+
additionalProperties: false
34+
35+
examples:
36+
- |
37+
muram@0 {
38+
compatible = "fsl,fman-muram";
39+
reg = <0x0 0x28000>;
40+
};
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/fsl,fman-port.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale Frame Manager Port Device
8+
9+
maintainers:
10+
- Frank Li <[email protected]>
11+
12+
description: |
13+
The Frame Manager (FMan) supports several types of hardware ports:
14+
Ethernet receiver (RX)
15+
Ethernet transmitter (TX)
16+
Offline/Host command (O/H)
17+
18+
properties:
19+
compatible:
20+
enum:
21+
- fsl,fman-v2-port-oh
22+
- fsl,fman-v2-port-rx
23+
- fsl,fman-v2-port-tx
24+
- fsl,fman-v3-port-oh
25+
- fsl,fman-v3-port-rx
26+
- fsl,fman-v3-port-tx
27+
28+
cell-index:
29+
$ref: /schemas/types.yaml#/definitions/uint32
30+
description:
31+
Specifies the hardware port id.
32+
Each hardware port on the FMan has its own hardware PortID.
33+
Super set of all hardware Port IDs available at FMan Reference
34+
Manual under "FMan Hardware Ports in Freescale Devices" table.
35+
36+
Each hardware port is assigned a 4KB, port-specific page in
37+
the FMan hardware port memory region (which is part of the
38+
FMan memory map). The first 4 KB in the FMan hardware ports
39+
memory region is used for what are called common registers.
40+
The subsequent 63 4KB pages are allocated to the hardware
41+
ports.
42+
The page of a specific port is determined by the cell-index.
43+
44+
reg:
45+
items:
46+
- description: There is one reg region describing the port
47+
configuration registers.
48+
49+
fsl,fman-10g-port:
50+
$ref: /schemas/types.yaml#/definitions/flag
51+
description: The default port rate is 1G.
52+
If this property exists, the port is s 10G port.
53+
54+
fsl,fman-best-effort-port:
55+
$ref: /schemas/types.yaml#/definitions/flag
56+
description: The default port rate is 1G.
57+
Can be defined only if 10G-support is set.
58+
This property marks a best-effort 10G port (10G port that
59+
may not be capable of line rate).
60+
61+
required:
62+
- compatible
63+
- reg
64+
- cell-index
65+
66+
additionalProperties: false
67+
68+
examples:
69+
- |
70+
port@a8000 {
71+
compatible = "fsl,fman-v2-port-tx";
72+
reg = <0xa8000 0x1000>;
73+
cell-index = <0x28>;
74+
};
75+

0 commit comments

Comments
 (0)