Skip to content

Commit 3b29c46

Browse files
nsdrude-varnatashaKoval
authored andcommitted
dt-bindings: add device tree bindings and includes for mxl-8611x PHY
The MXL8611X driver has custom bindings for configuring the LEDs and RGMII internal delays. This patch adds the documentation and defines necessary to configure it from the device tree. Signed-off-by: Nate Drude <nate.d@variscite.com> (cherry picked from commit 2eb0e70)
1 parent 3d29a05 commit 3b29c46

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
* MaxLinear MXL8611x PHY Device Tree binding
2+
3+
Required properties:
4+
- reg: PHY address
5+
6+
Optional properties:
7+
- mxl-8611x,ledN_cfg: Register configuration for COM_EXT_LED0_CFG,
8+
COM_EXT_LED1_CFG, and COM_EXT_LED2_CFG
9+
- mxl-8611x,rx-internal-delay-ps: RGMII RX Clock Delay used only when PHY operates
10+
in RGMII mode with internal delay (phy-mode is 'rgmii-id' or
11+
'rgmii-rxid') in pico-seconds.
12+
- mxl-8611x,tx-internal-delay-ps-100m: RGMII TX Clock Delay used only when PHY operates
13+
in 10/100M RGMII mode with internal delay (phy-mode is 'rgmii-id' or
14+
'rgmii-txid') in pico-seconds.
15+
- mxl-8611x,tx-internal-delay-ps-1g: RGMII TX Clock Delay used only when PHY operates
16+
in 1G RGMII mode with internal delay (phy-mode is 'rgmii-id' or
17+
'rgmii-txid') in pico-seconds.
18+
19+
Example:
20+
21+
ethernet-phy@0 {
22+
reg = <0>;
23+
24+
mxl-8611x,led0_cfg = <(
25+
MXL8611X_LEDX_CFG_LINK_UP_RX_ACT_ON |
26+
MXL8611X_LEDX_CFG_LINK_UP_TX_ACT_ON |
27+
MXL8611X_LEDX_CFG_TRAFFIC_ACT_BLINK_IND
28+
)>;
29+
mxl-8611x,led1_cfg = <(
30+
MXL8611X_LEDX_CFG_LINK_UP_10MB_ON |
31+
MXL8611X_LEDX_CFG_LINK_UP_100MB_ON |
32+
MXL8611X_LEDX_CFG_LINK_UP_1GB_ON
33+
)>;
34+
mxl-8611x,rx-internal-delay-ps = <0>;
35+
mxl-8611x,tx-internal-delay-ps-100m = <2250>;
36+
mxl-8611x,tx-internal-delay-ps-1g = <150>;
37+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
2+
/*
3+
* Device Tree constants for MaxLinear MXL8611x PHYs
4+
*
5+
* Copyright 2023 Variscite Ltd.
6+
* Copyright 2023 MaxLinear Inc.
7+
*/
8+
9+
#ifndef _DT_BINDINGS_MXL_8611X_H
10+
#define _DT_BINDINGS_MXL_8611X_H
11+
12+
#define MXL8611X_LEDX_CFG_TRAFFIC_ACT_BLINK_IND (1 << 13)
13+
#define MXL8611X_LEDX_CFG_LINK_UP_FULL_DUPLEX_ON (1 << 12)
14+
#define MXL8611X_LEDX_CFG_LINK_UP_HALF_DUPLEX_ON (1 << 11)
15+
#define MXL8611X_LEDX_CFG_LINK_UP_TX_ACT_ON (1 << 10)
16+
#define MXL8611X_LEDX_CFG_LINK_UP_RX_ACT_ON (1 << 9)
17+
#define MXL8611X_LEDX_CFG_LINK_UP_TX_ON (1 << 8)
18+
#define MXL8611X_LEDX_CFG_LINK_UP_RX_ON (1 << 7)
19+
#define MXL8611X_LEDX_CFG_LINK_UP_1GB_ON (1 << 6)
20+
#define MXL8611X_LEDX_CFG_LINK_UP_100MB_ON (1 << 5)
21+
#define MXL8611X_LEDX_CFG_LINK_UP_10MB_ON (1 << 4)
22+
#define MXL8611X_LEDX_CFG_LINK_UP_COLLISION (1 << 3)
23+
#define MXL8611X_LEDX_CFG_LINK_UP_1GB_BLINK (1 << 2)
24+
#define MXL8611X_LEDX_CFG_LINK_UP_100MB_BLINK (1 << 1)
25+
#define MXL8611X_LEDX_CFG_LINK_UP_10MB_BLINK (1 << 0)
26+
27+
#endif

0 commit comments

Comments
 (0)