kernel: bump 6.1 to 6.1.52
[openwrt/openwrt.git] / target / linux / generic / hack-6.1 / 765-mxl-gpy-control-LED-reg-from-DT.patch
index 8de3668def224dca08e21ff28673ace8d397afd8..d7165cb30ac7c0bf964489f21fe0fa4720fdde48 100644 (file)
@@ -23,15 +23,15 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
 
 --- a/drivers/net/phy/mxl-gpy.c
 +++ b/drivers/net/phy/mxl-gpy.c
-@@ -8,6 +8,7 @@
- #include <linux/module.h>
+@@ -10,6 +10,7 @@
  #include <linux/bitfield.h>
+ #include <linux/hwmon.h>
+ #include <linux/mutex.h>
 +#include <linux/of.h>
  #include <linux/phy.h>
+ #include <linux/polynomial.h>
  #include <linux/netdevice.h>
-@@ -30,6 +31,7 @@
+@@ -33,6 +34,7 @@
  #define PHY_MIISTAT           0x18    /* MII state */
  #define PHY_IMASK             0x19    /* interrupt mask */
  #define PHY_ISTAT             0x1A    /* interrupt status */
@@ -39,14 +39,14 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
  #define PHY_FWV                       0x1E    /* firmware version */
  
  #define PHY_MIISTAT_SPD_MASK  GENMASK(2, 0)
-@@ -53,10 +55,15 @@
+@@ -56,10 +58,15 @@
                                 PHY_IMASK_ADSC | \
                                 PHY_IMASK_ANC)
  
 +#define PHY_LED_NUM_LEDS      4
 +
  #define PHY_FWV_REL_MASK      BIT(15)
- #define PHY_FWV_TYPE_MASK     GENMASK(11, 8)
+ #define PHY_FWV_MAJOR_MASK    GENMASK(11, 8)
  #define PHY_FWV_MINOR_MASK    GENMASK(7, 0)
  
 +/* LED */
@@ -55,9 +55,9 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
  /* SGMII */
  #define VSPEC1_SGMII_CTRL     0x08
  #define VSPEC1_SGMII_CTRL_ANEN        BIT(12)         /* Aneg enable */
-@@ -80,6 +87,31 @@ static const struct {
-       {9, 0x73},
- };
+@@ -241,6 +248,31 @@ out:
+       return ret;
+ }
  
 +static int gpy_led_write(struct phy_device *phydev)
 +{
@@ -87,7 +87,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
  static int gpy_config_init(struct phy_device *phydev)
  {
        int ret;
-@@ -91,7 +123,10 @@ static int gpy_config_init(struct phy_de
+@@ -252,7 +284,10 @@ static int gpy_config_init(struct phy_de
  
        /* Clear all pending interrupts */
        ret = phy_read(phydev, PHY_ISTAT);
@@ -98,4 +98,4 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
 +      return gpy_led_write(phydev);
  }
  
- static int gpy_probe(struct phy_device *phydev)
+ static bool gpy_has_broken_mdint(struct phy_device *phydev)