mediatek: 6.6: refresh patches
[openwrt/staging/nbd.git] / target / linux / mediatek / patches-6.6 / 200-phy-phy-mtk-tphy-Add-hifsys-support.patch
index 6347533aa8f88352969d3311b850579b9199ac8c..e07aa5662bc472ed9e6715d5bebc62153e26cd7f 100644 (file)
@@ -9,7 +9,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
 
 --- a/drivers/phy/mediatek/phy-mtk-tphy.c
 +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
-@@ -17,6 +17,8 @@
+@@ -18,6 +18,8 @@
  #include <linux/phy/phy.h>
  #include <linux/platform_device.h>
  #include <linux/regmap.h>
@@ -18,9 +18,9 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
  
  #include "phy-mtk-io.h"
  
-@@ -264,6 +266,9 @@
+@@ -267,6 +269,9 @@
  
- #define TPHY_CLKS_CNT 2
+ #define USER_BUF_LEN(count) min_t(size_t, 8, (count))
  
 +#define HIF_SYSCFG1                   0x14
 +#define HIF_SYSCFG1_PHY2_MASK         (0x3 << 20)
@@ -28,7 +28,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
  enum mtk_phy_version {
        MTK_PHY_V1 = 1,
        MTK_PHY_V2,
-@@ -331,6 +336,7 @@ struct mtk_tphy {
+@@ -334,6 +339,7 @@ struct mtk_tphy {
        void __iomem *sif_base; /* only shared sif */
        const struct mtk_phy_pdata *pdata;
        struct mtk_phy_instance **phys;
@@ -36,7 +36,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
        int nphys;
        int src_ref_clk; /* MHZ, reference clock for slew rate calibrate */
        int src_coef; /* coefficient for slew rate calibrate */
-@@ -596,6 +602,10 @@ static void pcie_phy_instance_init(struc
+@@ -951,6 +957,10 @@ static void pcie_phy_instance_init(struc
        if (tphy->pdata->version != MTK_PHY_V1)
                return;
  
@@ -47,7 +47,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
        mtk_phy_update_bits(phya + U3P_U3_PHYA_DA_REG0,
                            P3A_RG_XTAL_EXT_PE1H | P3A_RG_XTAL_EXT_PE2H,
                            FIELD_PREP(P3A_RG_XTAL_EXT_PE1H, 0x2) |
-@@ -1241,6 +1251,16 @@ static int mtk_tphy_probe(struct platfor
+@@ -1597,6 +1607,16 @@ static int mtk_tphy_probe(struct platfor
                                         &tphy->src_coef);
        }