[PW_SID:987622] Fix broken link with TH1520 GMAC when linkspeed changes - #717
[PW_SID:987622] Fix broken link with TH1520 GMAC when linkspeed changes#717linux-riscv-bot wants to merge 3 commits into
Conversation
Besides ones for GMAC core and peripheral registers, the TH1520 GMAC requires one more clock for configuring APB glue registers. Describe it in the binding. Fixes: f920ce0 ("dt-bindings: net: Add T-HEAD dwmac support") Signed-off-by: Yao Zi <ziyao@disroot.org> Tested-by: Drew Fustini <fustini@kernel.org> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
It's necessary to adjust the MAC TX clock when the linkspeed changes, but it's noted such adjustment always fails on TH1520 SoC, and reading back from APB glue registers that control clock generation results in garbage, causing broken link. With some testing, it's found a clock must be ungated for access to APB glue registers. Without any consumer, the clock is automatically disabled during late kernel startup. Let's get and enable it if it's described in devicetree. Fixes: 33a1a01 ("net: stmmac: Add glue layer for T-HEAD TH1520 SoC") Signed-off-by: Yao Zi <ziyao@disroot.org> Reviewed-by: Drew Fustini <fustini@kernel.org> Tested-by: Drew Fustini <fustini@kernel.org> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Describe perisys-apb4-hclk as the APB clock for TH1520 SoC, which is essential for accessing GMAC glue registers. Fixes: 7e75667 ("riscv: dts: thead: Add TH1520 ethernet nodes") Signed-off-by: Yao Zi <ziyao@disroot.org> Reviewed-by: Drew Fustini <fustini@kernel.org> Tested-by: Drew Fustini <fustini@kernel.org> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 1: "[net,v2,1/3] dt-bindings: net: thead,th1520-gmac: Describe APB interface clock" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 2: "[net,v2,2/3] net: stmmac: thead: Get and enable APB clock on initialization" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
|
Patch 3: "[net,v2,3/3] riscv: dts: thead: Add APB clocks for TH1520 GMACs" |
PR for series 987622 applied to workflow__riscv__fixes
Name: Fix broken link with TH1520 GMAC when linkspeed changes
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=987622
Version: 2