dts: bindings: ethernet: Remove fixed link
Remove ethernet-fixed-link binding as it is redundant with the phy bindings. Clearly, ethernet does not work without the L1 layer, which is a phy device, or an integrated mac/phy device, and all of these things should be described properly in DT. The schema did not even come with a compatible, meaning nodelabels were hardcoded into the drivers, which is unacceptable. - Remove the binding file for ethernet-fixed-link.yaml. - Remove fixed link functionality from the nxp s32 gmac driver. Since this functionality is already covered by the phy support, it is redundant. - Remove fixed link include from the s32 gmac binding. - Remove fixed link include from the nuvoton numaker binding. As far as I can tell the corresonding driver does not even use it anyways, and I did not find any board with this device that describes a "fixed link". - Move the definition into the nxp,kinetis-ethernet binding as the eth_mcux driver, which is already being deprecated, does use this, contain the debt to the legacy driver. Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
parent
b17712364c
commit
353c6a66cb
6 changed files with 21 additions and 49 deletions
|
@ -649,29 +649,6 @@ BUILD_ASSERT((CONFIG_ETH_NXP_S32_RX_RING_BUF_SIZE % FEATURE_GMAC_DATA_BUS_WIDTH_
|
||||||
BUILD_ASSERT((CONFIG_ETH_NXP_S32_TX_RING_BUF_SIZE % FEATURE_GMAC_DATA_BUS_WIDTH_BYTES) == 0,
|
BUILD_ASSERT((CONFIG_ETH_NXP_S32_TX_RING_BUF_SIZE % FEATURE_GMAC_DATA_BUS_WIDTH_BYTES) == 0,
|
||||||
"CONFIG_ETH_NXP_S32_TX_RING_BUF_SIZE must be multiple of the data bus width");
|
"CONFIG_ETH_NXP_S32_TX_RING_BUF_SIZE must be multiple of the data bus width");
|
||||||
|
|
||||||
#define ETH_NXP_S32_FIXED_LINK_NODE(n) \
|
|
||||||
DT_INST_CHILD(n, fixed_link)
|
|
||||||
|
|
||||||
#define ETH_NXP_S32_IS_FIXED_LINK(n) \
|
|
||||||
DT_NODE_EXISTS(ETH_NXP_S32_FIXED_LINK_NODE(n))
|
|
||||||
|
|
||||||
#define ETH_NXP_S32_FIXED_LINK_SPEED(n) \
|
|
||||||
DT_PROP(ETH_NXP_S32_FIXED_LINK_NODE(n), speed)
|
|
||||||
|
|
||||||
#define ETH_NXP_S32_FIXED_LINK_FULL_DUPLEX(n) \
|
|
||||||
DT_PROP(ETH_NXP_S32_FIXED_LINK_NODE(n), full_duplex)
|
|
||||||
|
|
||||||
#define ETH_NXP_S32_MAC_SPEED(n) \
|
|
||||||
COND_CODE_1(ETH_NXP_S32_IS_FIXED_LINK(n), \
|
|
||||||
(_CONCAT(_CONCAT(GMAC_SPEED_, ETH_NXP_S32_FIXED_LINK_SPEED(n)), M)), \
|
|
||||||
(GMAC_SPEED_100M))
|
|
||||||
|
|
||||||
#define ETH_NXP_S32_MAC_DUPLEX(n) \
|
|
||||||
COND_CODE_1(ETH_NXP_S32_IS_FIXED_LINK(n), \
|
|
||||||
(COND_CODE_1(ETH_NXP_S32_FIXED_LINK_FULL_DUPLEX(n), \
|
|
||||||
(GMAC_FULL_DUPLEX), (GMAC_HALF_DUPLEX))), \
|
|
||||||
(GMAC_FULL_DUPLEX))
|
|
||||||
|
|
||||||
#define ETH_NXP_S32_MAC_MII(n) \
|
#define ETH_NXP_S32_MAC_MII(n) \
|
||||||
_CONCAT(_CONCAT(GMAC_, DT_INST_STRING_UPPER_TOKEN(n, phy_connection_type)), _MODE)
|
_CONCAT(_CONCAT(GMAC_, DT_INST_STRING_UPPER_TOKEN(n, phy_connection_type)), _MODE)
|
||||||
|
|
||||||
|
@ -803,8 +780,8 @@ BUILD_ASSERT((CONFIG_ETH_NXP_S32_TX_RING_BUF_SIZE % FEATURE_GMAC_DATA_BUS_WIDTH_
|
||||||
.Callback = NULL, \
|
.Callback = NULL, \
|
||||||
.TxSchedAlgo = GMAC_SCHED_ALGO_SP, \
|
.TxSchedAlgo = GMAC_SCHED_ALGO_SP, \
|
||||||
.MiiMode = ETH_NXP_S32_MAC_MII(n), \
|
.MiiMode = ETH_NXP_S32_MAC_MII(n), \
|
||||||
.Speed = ETH_NXP_S32_MAC_SPEED(n), \
|
.Speed = GMAC_SPEED_100M, \
|
||||||
.Duplex = ETH_NXP_S32_MAC_DUPLEX(n), \
|
.Duplex = GMAC_FULL_DUPLEX, \
|
||||||
.MacConfig = ETH_NXP_S32_MAC_CONF(n), \
|
.MacConfig = ETH_NXP_S32_MAC_CONF(n), \
|
||||||
.MacPktFilterConfig = ETH_NXP_S32_MAC_PKT_FILTER(n), \
|
.MacPktFilterConfig = ETH_NXP_S32_MAC_PKT_FILTER(n), \
|
||||||
.EnableCtrl = false, \
|
.EnableCtrl = false, \
|
||||||
|
@ -837,9 +814,8 @@ BUILD_ASSERT((CONFIG_ETH_NXP_S32_TX_RING_BUF_SIZE % FEATURE_GMAC_DATA_BUS_WIDTH_
|
||||||
ETH_NXP_S32_HW_INSTANCE_CHECK, (|), n)
|
ETH_NXP_S32_HW_INSTANCE_CHECK, (|), n)
|
||||||
|
|
||||||
#define ETH_NXP_S32_PHY_DEV(n) \
|
#define ETH_NXP_S32_PHY_DEV(n) \
|
||||||
COND_CODE_1(ETH_NXP_S32_IS_FIXED_LINK(n), NULL, \
|
(COND_CODE_1(DT_INST_NODE_HAS_PROP(n, phy_handle), \
|
||||||
(COND_CODE_1(DT_INST_NODE_HAS_PROP(n, phy_handle), \
|
(DEVICE_DT_GET(DT_INST_PHANDLE(n, phy_handle))), NULL))
|
||||||
(DEVICE_DT_GET(DT_INST_PHANDLE(n, phy_handle))), NULL)))
|
|
||||||
|
|
||||||
#define ETH_NXP_S32_DEVICE(n) \
|
#define ETH_NXP_S32_DEVICE(n) \
|
||||||
ETH_NXP_S32_TX_CALLBACK(n) \
|
ETH_NXP_S32_TX_CALLBACK(n) \
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
# Copyright (c) 2020, DENX Software Engineering GmbH
|
|
||||||
# Lukasz Majewski <lukma@denx.de>
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
child-binding:
|
|
||||||
description: Fixed link ethernet node
|
|
||||||
properties:
|
|
||||||
speed:
|
|
||||||
type: int
|
|
||||||
required: true
|
|
||||||
description: The speed of fixed link
|
|
||||||
enum:
|
|
||||||
- 100
|
|
||||||
- 10
|
|
||||||
full-duplex:
|
|
||||||
type: boolean
|
|
||||||
description: The fixed link operates in full duplex mode
|
|
|
@ -7,7 +7,6 @@ compatible: "nuvoton,numaker-ethernet"
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- ethernet-controller.yaml
|
- ethernet-controller.yaml
|
||||||
- ethernet,fixed-link.yaml
|
|
||||||
- reset-device.yaml
|
- reset-device.yaml
|
||||||
- pinctrl-device.yaml
|
- pinctrl-device.yaml
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ description: NXP ENET MAC/L2 Device
|
||||||
|
|
||||||
compatible: "nxp,enet-mac"
|
compatible: "nxp,enet-mac"
|
||||||
|
|
||||||
include: ["ethernet-controller.yaml", "ethernet,fixed-link.yaml", "pinctrl-device.yaml"]
|
include: ["ethernet-controller.yaml", "pinctrl-device.yaml"]
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
interrupts:
|
interrupts:
|
||||||
|
|
|
@ -5,7 +5,7 @@ description: NXP Kinetis Ethernet
|
||||||
|
|
||||||
compatible: "nxp,kinetis-ethernet"
|
compatible: "nxp,kinetis-ethernet"
|
||||||
|
|
||||||
include: ["ethernet-controller.yaml", "ethernet,fixed-link.yaml", "pinctrl-device.yaml"]
|
include: ["ethernet-controller.yaml", "pinctrl-device.yaml"]
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
reg:
|
reg:
|
||||||
|
@ -23,3 +23,17 @@ properties:
|
||||||
type: phandle-array
|
type: phandle-array
|
||||||
description:
|
description:
|
||||||
interrupt GPIO for PHY. Will be pulled high before reset is asserted.
|
interrupt GPIO for PHY. Will be pulled high before reset is asserted.
|
||||||
|
|
||||||
|
child-binding:
|
||||||
|
description: Fixed link ethernet node
|
||||||
|
properties:
|
||||||
|
speed:
|
||||||
|
type: int
|
||||||
|
required: true
|
||||||
|
description: The speed of fixed link
|
||||||
|
enum:
|
||||||
|
- 100
|
||||||
|
- 10
|
||||||
|
full-duplex:
|
||||||
|
type: boolean
|
||||||
|
description: The fixed link operates in full duplex mode
|
||||||
|
|
|
@ -5,7 +5,7 @@ description: NXP S32 GMAC/EMAC driver
|
||||||
|
|
||||||
compatible: "nxp,s32-gmac"
|
compatible: "nxp,s32-gmac"
|
||||||
|
|
||||||
include: [ethernet-controller.yaml, "ethernet,fixed-link.yaml", pinctrl-device.yaml]
|
include: [ethernet-controller.yaml, pinctrl-device.yaml]
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
reg:
|
reg:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue