1. Mar 18, 2022
  2. Mar 17, 2022
  3. Mar 16, 2022
    • David S. Miller's avatar
      Merge branch 'mediatek-next' · 49045b9c
      David S. Miller authored
      Biao Huang says:
      
      ====================
      MediaTek Ethernet Patches on MT8195
      
      Changes in v13:
      1. add reviewed-by in "net: dt-bindings: dwmac: add support for mt8195"
         as Rob's comments.
      2. drop num_clks defined in mediatek_dwmac_plat_data struct in "stmmac:
         dwmac-mediatek: Reuse more common features" as Angelo's comments.
      
      Changes in v12:
      1. add a new patch "stmmac: dwmac-mediatek: re-arrange clock setting" to
         this series, to simplify clock handling in driver, which benefits to
         binding file mediatek-dwmac.yaml.
      2. modify dt-binding description in patch "net: dt-bindings: dwmac: add
         support for mt8195" as Rob's comments in v10 series, put mac_cg to the
         end of clock list.
      3. there are small changes in patch "stmmac: dwmac-mediatek: add support
         for mt8195", @AngeloGioacchino, please review it kindly.
      
      Changes in v11:
      1. add reivewed-by in "net: dt-bindings: dwmac: Convert mediatek-dwmac to
         DT schema" as Rob's comments.
      2. fall back "net: dt-bindings: dwmac: add support for mt8195" to v8 version
         as mentioned in previous reply(https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20211216055328.15953-7-biao.huang@mediatek.com/):
         2.1 there is already a special clock named "rmii_internal", which need to
             be put to the end of the clock list(driver special handling),
             so we can't simply put new "mac_cg" for mt8195 to the end of the clock
             list.
         2.2 we prefer the if-then schema, which will make mt8195 clock list clearer
             with some duplicated information.
         2.3 we expect the future IC will follow mt2712 or mt8195, so we only need
             add new IC name to compatible list for future IC, and will not make the
             clock list binding files worse.
      
      Changes in v10:
      1. add detailed description in "arm64: dts: mt2712: update ethernet
         device node" to make the modifications clearer as Matthias's comments.
      2. modify dt-binding description as Rob's comments, and "make dtbs_check" runs
         pass locally with "arm64: dts: mt2712: update ethernet device node"
         in this series.
      
      Changes in v9:
      1. remove oneOf for 1 entry as Rob's comments.
      2. add new clocks to the end of existing clocks to simplify
         the binding as Rob's comments.
      
      Changes in v8:
      1. add acked-by in "stmmac: dwmac-mediatek: add platform level clocks
         management" patch
      
      Changes in v7:
      1. fix uninitialized warning as Jakub's comments.
      
      Changes in v6:
      1. update commit message as Jakub's comments.
      2. split mt8195 eth dts patch("arm64: dts: mt8195: add ethernet device
         node") from this series, since mt8195 dtsi/dts basic patches is still
         under reviewing.
         https://patchwork.kernel.org/project/linux-mediatek/list/?series=579071
      
      
         we'll resend mt8195 eth dts patch once all the dependent patches are
         accepted.
      
      Changes in v5:
      1. remove useless inclusion in dwmac-mediatek.c as Angelo's comments.
      2. add acked-by in "net-next: stmmac: dwmac-mediatek: add support for
         mt8195" patch
      
      Changes in v4:
      1. add changes in commit message in "net-next: dt-bindings: dwmac:
         Convert mediatek-dwmac to DT schema" patch.
      2. remove ethernet-controller.yaml since snps,dwmac.yaml already include it.
      
      Changes in v3:
      1. Add prefix "net-next" to support new IC as Denis's suggestion.
      2. Split dt-bindings to two patches, one for conversion, and the other for
         new IC.
      3. add a new patch to update device node in mt2712-evb.dts to accommodate to
         changes in driver.
      4. remove unnecessary wrapper as Angelo's suggestion.
      5. Add acked-by in "net-next: stmmac: dwmac-mediatek: Reuse more common
         features" patch.
      
      Changes in v2:
      1. fix errors/warnings in mediatek-dwmac.yaml with upgraded dtschema tools
      
      Changes in v1:
      This series include 5 patches:
      1. add platform level clocks management for dwmac-mediatek
      2. resue more common features defined in stmmac_platform.c
      3. add ethernet entry for mt8195
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49045b9c
    • Biao Huang's avatar
      net: dt-bindings: dwmac: add support for mt8195 · ee410d51
      Biao Huang authored
      
      
      Add binding document for the ethernet on mt8195.
      
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ee410d51
    • Biao Huang's avatar
      stmmac: dwmac-mediatek: add support for mt8195 · f2d356a6
      Biao Huang authored
      
      
      Add Ethernet support for MediaTek SoCs from the mt8195 family.
      
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Acked-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f2d356a6
    • Biao Huang's avatar
      net: dt-bindings: dwmac: Convert mediatek-dwmac to DT schema · 150b6add
      Biao Huang authored
      
      
      Convert mediatek-dwmac to DT schema, and delete old mediatek-dwmac.txt.
      And there are some changes in .yaml than .txt, others almost keep the same:
        1. compatible "const: snps,dwmac-4.20".
        2. delete "snps,reset-active-low;" in example, since driver remove this
           property long ago.
        3. add "snps,reset-delay-us = <0 10000 10000>" in example.
        4. the example is for rgmii interface, keep related properties only.
      
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      150b6add
    • Biao Huang's avatar
      arm64: dts: mt2712: update ethernet device node · 79e11778
      Biao Huang authored
      Since there are some changes in ethernet driver:
      update ethernet device node in dts to accommodate to it.
      
      1. stmmac_probe_config_dt() in stmmac_platform.c will initialize specified
         parameters according to compatible string "snps,dwmac-4.20a", then,
         dwmac-mediatek.c can skip the initialization if add compatible string
         "snps,dwmac-4.20a" in eth device node.
      2. commit 882007ed
      
       ("net-next: dt-binding: dwmac-mediatek: add more
         description for RMII") added rmii internal support, we should add
         corresponding clocks/clocks-names in eth device node.
      3. add "snps,reset-delays-us = <0 10000 10000>;" to ensure reset delay
         can meet PHY requirement.
      
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79e11778
    • Biao Huang's avatar
      stmmac: dwmac-mediatek: re-arrange clock setting · 4fe3075f
      Biao Huang authored
      
      
      The rmii_internal clock is needed only when PHY
      interface is RMII, and reference clock is from MAC.
      
      Re-arrange the clock setting as following:
      1. the optional "rmii_internal" is controlled by devm_clk_get(),
      2. other clocks still be configured by devm_clk_bulk_get().
      
      Signed-off-by: default avatarBiao Huang <biao.huang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4fe3075f