From c7c29f42d969bcbce1033c9158b105988868fb16 Mon Sep 17 00:00:00 2001 From: Andrei Gansari Date: Fri, 13 Dec 2019 13:54:16 +0200 Subject: [PATCH 1/2] west: hal_nxp update to pull #24 https://github.com/zephyrproject-rtos/hal_nxp/pull/24 Add a mask for KSZ8081 PHY's control register to set power down. Signed-off-by: Andrei Gansari --- west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/west.yml b/west.yml index e10cb92b800fd..a0c8d476c56c7 100644 --- a/west.yml +++ b/west.yml @@ -83,7 +83,7 @@ manifest: revision: 00dd4fab1a00f2f6e995ef3f2e7c3814689f8885 path: modules/fs/nffs - name: hal_nxp - revision: ef000ff5d902c938e3d4763155b0511b043017c8 + revision: pull/24/head path: modules/hal/nxp - name: open-amp revision: 9b591b289e1f37339bd038b5a1f0e6c8ad39c63a From 6d5eee440088c708ad96c64733e4c8474986ed25 Mon Sep 17 00:00:00 2001 From: Andrei Gansari Date: Fri, 13 Dec 2019 13:56:44 +0200 Subject: [PATCH 2/2] drivers: eth_mcux power down Power down PHY in eth_mcux driver and set carrier off. Signed-off-by: Andrei Gansari --- drivers/ethernet/eth_mcux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/ethernet/eth_mcux.c b/drivers/ethernet/eth_mcux.c index 115c92da31a49..1ed6a2910b078 100644 --- a/drivers/ethernet/eth_mcux.c +++ b/drivers/ethernet/eth_mcux.c @@ -295,8 +295,11 @@ static void eth_mcux_phy_event(struct eth_context *context) if (context->enabled) { eth_mcux_phy_enter_reset(context); } else { - /* @todo, actually power down the PHY ? */ context->phy_state = eth_mcux_phy_state_initial; + net_eth_carrier_off(context->iface); + ENET_StartSMIWrite(ENET, phy_addr, PHY_BASICCONTROL_REG, + kENET_MiiWriteValidFrame, + PHY_BCTL_POWER_DOWN_MASK); } break; case eth_mcux_phy_state_reset: