#include <linux/of_platform.h>
 #include <linux/if_bridge.h>
 #include <linux/mdio.h>
+#include <linux/gpio.h>
 #include <linux/etherdevice.h>
 
 #include "qca8k.h"
        priv->bus = mdiodev->bus;
        priv->dev = &mdiodev->dev;
 
+       priv->reset_gpio = devm_gpiod_get_optional(priv->dev, "reset",
+                                                  GPIOD_ASIS);
+       if (IS_ERR(priv->reset_gpio))
+               return PTR_ERR(priv->reset_gpio);
+
+       if (priv->reset_gpio) {
+               gpiod_set_value_cansleep(priv->reset_gpio, 1);
+               /* The active low duration must be greater than 10 ms
+                * and checkpatch.pl wants 20 ms.
+                */
+               msleep(20);
+               gpiod_set_value_cansleep(priv->reset_gpio, 0);
+       }
+
        /* read the switches ID register */
        id = qca8k_read(priv, QCA8K_REG_MASK_CTRL);
        id >>= QCA8K_MASK_CTRL_ID_S;
 
 
 #include <linux/delay.h>
 #include <linux/regmap.h>
+#include <linux/gpio.h>
 
 #define QCA8K_NUM_PORTS                                        7
 
        struct mutex reg_mutex;
        struct device *dev;
        struct dsa_switch_ops ops;
+       struct gpio_desc *reset_gpio;
 };
 
 struct qca8k_mib_desc {