Thread (19 messages) 19 messages, 5 authors, 11d ago

Re: [RFC PATCH 3/6] net: stmmac: dwmac-meson8b: add support for the Amlogic T7

flat view

From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2026-10-04 21:13:47
Also in: linux-amlogic, linux-arm-kernel, linux-devicetree, lkml

Hi Lucas,

On 10/4/26 16:40, Lucas Tanure wrote:
The glue registers on the T7 are laid out exactly as the G12A ones, RX
delay field included, so the T7 can reuse the G12A settings.

What the T7 does not share is how the controller reaches DRAM: the bus
path goes through a pipeline stage with a gate of its own, and no device
other than the controller has any use for that gate. Claim it and hold
it enabled for as long as the controller is bound, otherwise it is
switched off as unused and a transfer that has been started can never
complete.

Give the T7 match data of its own so that only it looks the clock up,
and require the clock instead of treating it as optional: the controller
cannot do DMA without it, and failing the probe with a clear message
beats booting and hitting an undiagnosable hang later.

Assisted-by: LLM
Signed-off-by: Lucas Tanure <redacted>
---
[...]
quoted hunk ↗ jump to hunk
 
+static const struct meson8b_dwmac_data meson_t7_dwmac_data = {
+	.set_phy_mode = meson_axg_set_phy_mode,
+	.has_prg_eth1_rgmii_rx_delay = true,
Hmpf sorry this falls onto your series, but looking at the code it seems
that this glue has the RGMII handling backwards...

In meson8b_init_rgmii_delays :

         switch (dwmac->phy_mode) {                           
         case PHY_INTERFACE_MODE_RGMII:                       
                 delay_config = tx_dly_config | rx_adj_config;
                 break;                                       
         case PHY_INTERFACE_MODE_RGMII_RXID:                  
                 delay_config = tx_dly_config;                
                 cfg_rxclk_dly = 0;                           
                 break;                                       
         case PHY_INTERFACE_MODE_RGMII_TXID:                  
                 delay_config = rx_adj_config;                
                 break;                                       
         case PHY_INTERFACE_MODE_RGMII_ID:                    
         case PHY_INTERFACE_MODE_RMII:                        
                 delay_config = 0;                            
                 cfg_rxclk_dly = 0;                           

This is the behaviour one would expect from a PHY perspective.

And indeed, 66 amlogic dts have "phy-mode = rgmii".

grep "phy-mode = \"rgmii\"" $(find arch/ | grep amlogic) | wc -l
66

I really think all these 66 "rgmii" instance should have been "rgmii-id"...

It's probably too late to change that though :(

Maxime
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help