Skip to content

Commit 798bebe

Browse files
committed
drivers: ethernet: vsc8541: Fixed inverted reset GPIO
For GPIOs driving active-low signals, such as the VSC8541's reset pin, they are supposed to be declared as active low in the device tree, and set to 1 to assert and 0 to clear. Change the driver as such so that it does not leave the PHY stuck in reset when so configured. Signed-off-by: Robert Hancock <robert.hancock@calian.com>
1 parent 9303ff1 commit 798bebe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ethernet/phy/phy_microchip_vsc8541.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static int phy_mc_vsc8541_reset(const struct device *dev)
170170

171171
for (uint32_t i = 0; i < 2; i++) {
172172
/* Start reset */
173-
ret = gpio_pin_set_dt(&cfg->reset_gpio, 0);
173+
ret = gpio_pin_set_dt(&cfg->reset_gpio, 1);
174174
if (ret) {
175175
LOG_WRN("failed to set reset gpio");
176176
return -EINVAL;
@@ -180,7 +180,7 @@ static int phy_mc_vsc8541_reset(const struct device *dev)
180180
k_sleep(K_MSEC(200));
181181

182182
/* Reset over */
183-
gpio_pin_set_dt(&cfg->reset_gpio, 1);
183+
gpio_pin_set_dt(&cfg->reset_gpio, 0);
184184

185185
/* After de-asserting reset, must wait before using the config interface */
186186
k_sleep(K_MSEC(200));

0 commit comments

Comments
 (0)