20
20
#include <zephyr/logging/log.h>
21
21
LOG_MODULE_REGISTER (LOG_MODULE_NAME , LOG_LEVEL );
22
22
23
+ #include "phy_common.h"
24
+
23
25
#define PHY_TI_DP83867_PHYSTS 0x11
24
26
#define PHY_TI_DP83867_PHYSTS_LINKSTATUS_MASK BIT(10)
25
27
#define PHY_TI_DP83867_PHYSTS_LINKDUPLEX_MASK BIT(13)
@@ -42,6 +44,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME, LOG_LEVEL);
42
44
struct ti_dp83867_config {
43
45
uint8_t addr ;
44
46
const struct device * mdio_dev ;
47
+ enum phy_link_speed default_speeds ;
45
48
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY (reset_gpios )
46
49
const struct gpio_dt_spec reset_gpio ;
47
50
#endif
@@ -520,6 +523,9 @@ static int phy_ti_dp83867_init(const struct device *dev)
520
523
#endif /* DT_ANY_INST_HAS_PROP_STATUS_OKAY(int_gpios) */
521
524
phy_ti_dp83867_monitor_work_handler (& data -> phy_monitor_work .work );
522
525
526
+ /* Advertise default speeds */
527
+ phy_ti_dp83867_cfg_link (dev , config -> default_speeds );
528
+
523
529
return 0 ;
524
530
}
525
531
@@ -547,6 +553,7 @@ static DEVICE_API(ethphy, ti_dp83867_phy_api) = {
547
553
static const struct ti_dp83867_config ti_dp83867_##n##_config = { \
548
554
.addr = DT_INST_REG_ADDR(n), \
549
555
.mdio_dev = DEVICE_DT_GET(DT_INST_PARENT(n)), \
556
+ .default_speeds = PHY_INST_GENERATE_DEFAULT_SPEEDS(n), \
550
557
RESET_GPIO(n) INTERRUPT_GPIO(n)}; \
551
558
\
552
559
static struct ti_dp83867_data ti_dp83867_##n##_data; \
0 commit comments