* [PATCH net-next 0/2] net: macb: add some missing caps
@ 2026-11-13 15:59 Théo Lebrun
2026-11-13 15:59 ` [PATCH net-next 1/2] net: macb: add QUEUE_DISABLE capability to 3 compatibles Théo Lebrun
2026-11-13 15:59 ` [PATCH net-next 2/2] net: macb: add QBV capability to 4 compatibles Théo Lebrun
0 siblings, 2 replies; 3+ messages in thread
From: Théo Lebrun @ 2026-11-13 15:59 UTC (permalink / raw)
To: Conor Dooley, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel, Nicolai Buchwitz, Paolo Valerio,
Vladimir Kondratiev, Gregory CLEMENT, Benoît Monin,
Tawfik Bayouk, Thomas Petazzoni, Théo Lebrun
Out of all the compatibles modified, I only could test on Mobileye
EyeQ5. The rest is information pulled from public datasheets.
- QUEUE_DISABLE is important for suspend WoL (avoiding tieoff
descriptors) and will allow ethtool -L support for those platforms.
The QUEUE_DISABLE patch was sent once as part of the set_channels
series [0]. Comments from Nicolai were addressed. Split to keep the
series small.
- QBV is important, well, if you need QBV features.
Thanks,
Have a nice day,
Théo
[0]: https://lore.kernel.org/netdev/20261016-macb-set-channels-v5-1-90ce0c0b8e75@bootlin.com/
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
Théo Lebrun (2):
net: macb: add QUEUE_DISABLE capability to 3 compatibles
net: macb: add QBV capability to 4 compatibles
drivers/net/ethernet/cadence/macb_main.c | 34 ++++++++++++++++++++++++--------
1 file changed, 26 insertions(+), 8 deletions(-)
---
base-commit: 573af801552999954caa8347e4490b04cf4763f0
change-id: 20261113-macb-caps-be72fa7ce119
Best regards,
--
Théo Lebrun <theo.lebrun@bootlin.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH net-next 1/2] net: macb: add QUEUE_DISABLE capability to 3 compatibles
2026-11-13 15:59 [PATCH net-next 0/2] net: macb: add some missing caps Théo Lebrun
@ 2026-11-13 15:59 ` Théo Lebrun
2026-11-13 15:59 ` [PATCH net-next 2/2] net: macb: add QBV capability to 4 compatibles Théo Lebrun
1 sibling, 0 replies; 3+ messages in thread
From: Théo Lebrun @ 2026-11-13 15:59 UTC (permalink / raw)
To: Conor Dooley, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel, Nicolai Buchwitz, Paolo Valerio,
Vladimir Kondratiev, Gregory CLEMENT, Benoît Monin,
Tawfik Bayouk, Thomas Petazzoni, Théo Lebrun
According to datasheets, we know those 3 IP versions support Tx and Rx
queue disabling, ie bit 0 in RBQP and TBQP registers.
All revisions I've seen either support it on both Tx & Rx or don't
support it at all.
Sources:
Compatible | Match data | Datasheet
----------------------|--------------------|-------------------------
atmel,sama5d29-gem | sama5d29_config | DS60001764 [0]
microchip,mpfs-macb | mpfs_config | header files [1]
microchip,sama7g5-gem | sama7g5_gem_config | DS60001765 [2]
To contrast, check out the SAM9X60 DS60001579C datasheet [3] that does
not document bit 0 as anything special on page 1041 and page 1042.
This makes a big chance for those platforms when doing suspend WoL!
Instead of using a tieoff descriptor, they rely on hardware
capabilities of disabling queues.
[0]:
https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocuments/DataSheets/SAMA5D29-Data-Sheet-ds60001764.pdf
[1]:
https://github.com/polarfire-soc/polarfire-soc-bare-metal-library/blob/614a67ab/src/platform/drivers/mss/mss_ethernet_mac/mss_ethernet_mac_regs.h#L200-L207
[2]:
https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocuments/DataSheets/SAMA7G5-Series-Data-Sheet-DS60001765.pdf
[3]:
https://ww1.microchip.com/downloads/en/DeviceDoc/SAM9X60-Data-Sheet-DS60001579C.pdf
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
drivers/net/ethernet/cadence/macb_main.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 5bd299fc85a9..25d098a46965 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -6078,7 +6078,7 @@ static const struct macb_config sama5d2_config = {
static const struct macb_config sama5d29_config = {
.caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | MACB_CAPS_GEM_HAS_PTP |
- MACB_CAPS_USRIO_HAS_MII,
+ MACB_CAPS_USRIO_HAS_MII | MACB_CAPS_QUEUE_DISABLE,
.dma_burst_length = 16,
.usrio = &at91_default_usrio,
};
@@ -6134,7 +6134,8 @@ static const struct macb_config mpfs_config = {
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE |
MACB_CAPS_JUMBO |
MACB_CAPS_GEM_HAS_PTP |
- MACB_CAPS_USRIO_HAS_TSUCLK_SOURCE,
+ MACB_CAPS_USRIO_HAS_TSUCLK_SOURCE |
+ MACB_CAPS_QUEUE_DISABLE,
.dma_burst_length = 16,
.init = init_reset_optional,
.usrio = &mpfs_usrio,
@@ -6147,7 +6148,7 @@ static const struct macb_config sama7g5_gem_config = {
MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII |
MACB_CAPS_USRIO_HAS_REFCLK_SOURCE |
MACB_CAPS_MIIONRGMII | MACB_CAPS_GEM_HAS_PTP |
- MACB_CAPS_USRIO_HAS_MII,
+ MACB_CAPS_USRIO_HAS_MII | MACB_CAPS_QUEUE_DISABLE,
.dma_burst_length = 16,
.usrio = &sama7g5_gem_usrio,
};
--
2.56.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH net-next 2/2] net: macb: add QBV capability to 4 compatibles
2026-11-13 15:59 [PATCH net-next 0/2] net: macb: add some missing caps Théo Lebrun
2026-11-13 15:59 ` [PATCH net-next 1/2] net: macb: add QUEUE_DISABLE capability to 3 compatibles Théo Lebrun
@ 2026-11-13 15:59 ` Théo Lebrun
1 sibling, 0 replies; 3+ messages in thread
From: Théo Lebrun @ 2026-11-13 15:59 UTC (permalink / raw)
To: Conor Dooley, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel, Nicolai Buchwitz, Paolo Valerio,
Vladimir Kondratiev, Gregory CLEMENT, Benoît Monin,
Tawfik Bayouk, Thomas Petazzoni, Théo Lebrun
Add MACB_CAPS_QBV to four compatibles. Tested on EyeQ5 hardware.
The other ones are not tested. Datasheets indicate support.
Compatible | Datasheet
-----------------------+------------------------
mobileye,eyeq5-gem | Not public
microchip,mpfs-macb | Public header files [0]
microchip,sam9x7-gem | DS60001813 [1]
microchip,sama7d65-gem | DS60001851 [2]
For the latter two, upstream devicetrees and bindings know about the
compatible but the driver only used their "parent" compatible
microchip,sama7g5-gem. Therefore add match data for those two. Instead
of duplicating the long caps list, store it in a define which gets
called three times.
[0]:
https://github.com/polarfire-soc/hart-software-services/blob/445664ca8ac5/baremetal/polarfire-soc-bare-metal-library/src/platform/drivers/mss/mss_ethernet_mac/mss_ethernet_registers.h#L264-L278
[1]:
https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocuments/DataSheets/SAM9X7-Series-Data-Sheet-DS60001813.pdf
[2]:
https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocuments/DataSheets/SAMA7D6-Series-Data-Sheet-DS60001851.pdf
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
drivers/net/ethernet/cadence/macb_main.c | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 25d098a46965..9f6111661b40 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -6135,7 +6135,7 @@ static const struct macb_config mpfs_config = {
MACB_CAPS_JUMBO |
MACB_CAPS_GEM_HAS_PTP |
MACB_CAPS_USRIO_HAS_TSUCLK_SOURCE |
- MACB_CAPS_QUEUE_DISABLE,
+ MACB_CAPS_QUEUE_DISABLE | MACB_CAPS_QBV,
.dma_burst_length = 16,
.init = init_reset_optional,
.usrio = &mpfs_usrio,
@@ -6143,12 +6143,15 @@ static const struct macb_config mpfs_config = {
.jumbo_max_len = 4040,
};
+#define MACB_SAMA7G5_CAPS ( \
+ MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_CLK_HW_CHG | \
+ MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | \
+ MACB_CAPS_USRIO_HAS_REFCLK_SOURCE | \
+ MACB_CAPS_MIIONRGMII | MACB_CAPS_GEM_HAS_PTP | \
+ MACB_CAPS_USRIO_HAS_MII | MACB_CAPS_QUEUE_DISABLE)
+
static const struct macb_config sama7g5_gem_config = {
- .caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_CLK_HW_CHG |
- MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII |
- MACB_CAPS_USRIO_HAS_REFCLK_SOURCE |
- MACB_CAPS_MIIONRGMII | MACB_CAPS_GEM_HAS_PTP |
- MACB_CAPS_USRIO_HAS_MII | MACB_CAPS_QUEUE_DISABLE,
+ .caps = MACB_SAMA7G5_CAPS,
.dma_burst_length = 16,
.usrio = &sama7g5_gem_usrio,
};
@@ -6163,6 +6166,18 @@ static const struct macb_config sama7g5_emac_config = {
.usrio = &sama7g5_emac_usrio,
};
+static const struct macb_config sam9x7_config = {
+ .caps = MACB_SAMA7G5_CAPS | MACB_CAPS_QBV,
+ .dma_burst_length = 16,
+ .usrio = &sama7g5_gem_usrio,
+};
+
+static const struct macb_config sama7d65_config = {
+ .caps = MACB_SAMA7G5_CAPS | MACB_CAPS_QBV,
+ .dma_burst_length = 16,
+ .usrio = &sama7g5_gem_usrio,
+};
+
static const struct macb_config versal_config = {
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO |
MACB_CAPS_GEM_HAS_PTP | MACB_CAPS_BD_RD_PREFETCH |
@@ -6178,7 +6193,7 @@ static const struct macb_config versal_config = {
static const struct macb_config eyeq5_config = {
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO |
MACB_CAPS_GEM_HAS_PTP | MACB_CAPS_QUEUE_DISABLE |
- MACB_CAPS_NO_LSO | MACB_CAPS_EEE,
+ MACB_CAPS_NO_LSO | MACB_CAPS_EEE | MACB_CAPS_QBV,
.dma_burst_length = 16,
.init = eyeq5_init,
.jumbo_max_len = 10240,
@@ -6224,6 +6239,8 @@ static const struct of_device_id macb_dt_ids[] = {
{ .compatible = "microchip,pic64hpsc-gem", .data = &pic64hpsc_config},
{ .compatible = "microchip,sama7g5-gem", .data = &sama7g5_gem_config },
{ .compatible = "microchip,sama7g5-emac", .data = &sama7g5_emac_config },
+ { .compatible = "microchip,sam9x7-gem", .data = &sam9x7_config },
+ { .compatible = "microchip,sama7d65-gem", .data = &sama7d65_config },
{ .compatible = "mobileye,eyeq5-gem", .data = &eyeq5_config },
{ .compatible = "raspberrypi,rp1-gem", .data = &raspberrypi_rp1_config },
{ .compatible = "xlnx,zynqmp-gem", .data = &zynqmp_config},
--
2.56.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-13 15:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-13 15:59 [PATCH net-next 0/2] net: macb: add some missing caps Théo Lebrun
2026-11-13 15:59 ` [PATCH net-next 1/2] net: macb: add QUEUE_DISABLE capability to 3 compatibles Théo Lebrun
2026-11-13 15:59 ` [PATCH net-next 2/2] net: macb: add QBV capability to 4 compatibles Théo Lebrun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®