devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Add the dwmac driver support for T-HEAD TH1520 SoC
@ 2024-10-01  6:23 Drew Fustini
  2024-10-01  6:23 ` [PATCH v3 1/3] dt-bindings: net: Add T-HEAD dwmac support Drew Fustini
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Drew Fustini @ 2024-10-01  6:23 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alexandre Torgue,
	Giuseppe Cavallaro, Jose Abreu, Jisheng Zhang, Maxime Coquelin,
	Emil Renner Berthing, Drew Fustini, Guo Ren, Fu Wei, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Drew Fustini
  Cc: netdev, devicetree, linux-kernel, linux-arm-kernel, linux-riscv

This series is based on 6.12-rc1 and depends on this pinctrl series:

 20240930-th1520-pinctrl-v3-0-32cea2bdbecb@tenstorrent.com

I have a branch with this series and the dependencies:

 https://github.com/pdp7/linux/tree/b4/th1520-dwmac

Regarding clocks, the gmac nodes in th1520.dtsi have the "stmmac_clk"
clock set to CLK_GMAC_AXI in the AP_SUBSYS clock controller. This
corresponds to the enable bit for the GMAC axi4_clk gate which is
handled by the clk-th1520-ap driver. thead_dwmac_fix_speed() does not
modify anything in the AP_SUBSYS clock controller. It only writes to
GMAC APB registers. It seems unnecessary to create a new clock driver
just for the GMAC APB registers. Refer to section 1.6.2 in the TH1520
Peripheral Interface User Manual [1].

I've removed the properties that I added in v2: thead,rx-internal-delay
and thead,tx-internal-delay. The units for the delay field in the rgmii
delay control registers are not documented. Andrew Lunn suggested I
just hard code the delay field to 0 since I don't know the units and
the boards work with the hardware reset value of 0.

[1] https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs

Changes in v3:
 - Rebase on v6.12-rc1
 - Remove thead,rx-internal-delay and thead,tx-internal-delay properties
 - Remove unneeded call to thead_dwmac_fix_speed() during probe
 - Fix filename for the yaml file in MAINTAINERS patch

Changes in v2:
 - Drop the first patch as it is no longer needed due to upstream commit
   d01e0e98de31 ("dt-bindings: net: dwmac: Validate PBL for all IP-cores")
 - Rename compatible from "thead,th1520-dwmac" to "thead,th1520-gmac"
 - Add thead,rx-internal-delay and thead,tx-internal-delay properties
   and check that it does not exceed the maximum value
 - Convert from stmmac_dvr_probe() to devm_stmmac_pltfr_probe() and
   delete the .remove_new hook as it is no longer needed
 - Handle return value of regmap_write() in case it fails
 - Add phy reset delay properties to the BeagleV Ahead device tree
 - Link: https://lore.kernel.org/linux-riscv/20240926-th1520-dwmac-v2-0-f34f28ad1dc9@tenstorrent.com/

Changes in v1:
 - remove thead,gmacapb that references syscon for APB registers
 - add a second memory region to gmac nodes for the APB registers
 - Link: https://lore.kernel.org/all/20240713-thead-dwmac-v1-0-81f04480cd31@tenstorrent.com/

---
Emil Renner Berthing (1):
      riscv: dts: thead: Add TH1520 ethernet nodes

Jisheng Zhang (2):
      dt-bindings: net: Add T-HEAD dwmac support
      net: stmmac: Add glue layer for T-HEAD TH1520 SoC

 .../devicetree/bindings/net/snps,dwmac.yaml        |   1 +
 .../devicetree/bindings/net/thead,th1520-gmac.yaml |  97 +++++++
 MAINTAINERS                                        |   2 +
 arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts |  91 +++++++
 .../boot/dts/thead/th1520-lichee-module-4a.dtsi    | 129 +++++++++
 arch/riscv/boot/dts/thead/th1520.dtsi              |  50 ++++
 drivers/net/ethernet/stmicro/stmmac/Kconfig        |  11 +
 drivers/net/ethernet/stmicro/stmmac/Makefile       |   1 +
 drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c  | 291 +++++++++++++++++++++
 9 files changed, 673 insertions(+)
---
base-commit: 6b16e599500bd0002164d9edcb8bf7652d9888fa
change-id: 20240930-th1520-dwmac-34f5dd0cccf8

Best regards,
-- 
Drew Fustini <dfustini@tenstorrent.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-10-03 10:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01  6:23 [PATCH v3 0/3] Add the dwmac driver support for T-HEAD TH1520 SoC Drew Fustini
2024-10-01  6:23 ` [PATCH v3 1/3] dt-bindings: net: Add T-HEAD dwmac support Drew Fustini
2024-10-01  6:58   ` Krzysztof Kozlowski
2024-10-02 19:08     ` Drew Fustini
2024-10-03 10:42       ` Krzysztof Kozlowski
2024-10-01  6:23 ` [PATCH v3 2/3] net: stmmac: Add glue layer for T-HEAD TH1520 SoC Drew Fustini
2024-10-01  9:48   ` Emil Renner Berthing
2024-10-03  5:52     ` Drew Fustini
2024-10-01  6:23 ` [PATCH v3 3/3] riscv: dts: thead: Add TH1520 ethernet nodes Drew Fustini
2024-10-02 15:34 ` [PATCH v3 0/3] Add the dwmac driver support for T-HEAD TH1520 SoC Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).