From: Pavan Chebbi <pavan.chebbi@broadcom.com>
To: michael.chan@broadcom.com, kuba@kernel.org
Cc: andrew+netdev@lunn.ch, andrew.gospodarek@broadcom.com,
davem@davemloft.net, edumazet@kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com, Pavan Chebbi <pavan.chebbi@broadcom.com>
Subject: [PATCH net-next] tg3: Add support for boards integrated with security SoCs
Date: Wed, 18 Nov 2026 20:32:47 +0530 [thread overview]
Message-ID: <20261118150247.1145764-1-pavan.chebbi@broadcom.com> (raw)
Add support for Broadcom NetXtreme NX1 network interface controllers
integrated with security SoCs. This enables proper driver recognition
and initialization for these hardware Root of Trust enabled network
adapters.
The boards are identified by their PCI subsystem IDs. Add the new
subsystem device IDs and a helper that matches them.
These boards need the following deviations from the default behavior:
- Never drive GPIO1. These boards use GPIO1 for mailbox communication
between SoC and the NIC, internal to the board, so it must not
be driven externally and is always kept cleared. Skip it when
switching to Vaux or Vmain power, and do not set it in
tp->grc_local_ctrl.
- Do not enable EEPROM write protection, even if the NIC config in
SRAM requests it.
- Do not enable Wake-on-LAN. These boards reuse the GPIO that
Wake-on-LAN depends on for other purposes, so Wake-on-LAN cannot
work on these devices. Clear WOL_CAP so that it is not advertised.
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
---
drivers/net/ethernet/broadcom/tg3.c | 52 ++++++++++++++++++++++++++++-
drivers/net/ethernet/broadcom/tg3.h | 13 ++++++++
2 files changed, 64 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 95827df4cf6a..9c431f76d4a5 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -2840,6 +2840,9 @@ static void tg3_pwrsrc_die_with_vmain(struct tg3 *tp)
tg3_asic_rev(tp) == ASIC_REV_5701)
return;
+ if (tg3_flag(tp, CITADEL))
+ return;
+
grc_local_ctrl = tp->grc_local_ctrl | GRC_LCLCTRL_GPIO_OE1;
tw32_wait_f(GRC_LOCAL_CTRL,
@@ -2913,6 +2916,9 @@ static void tg3_pwrsrc_switch_to_vaux(struct tg3 *tp)
grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 |
GRC_LCLCTRL_GPIO_OUTPUT2);
}
+ if (tg3_flag(tp, CITADEL))
+ grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE1 |
+ GRC_LCLCTRL_GPIO_OUTPUT1);
tw32_wait_f(GRC_LOCAL_CTRL,
tp->grc_local_ctrl | grc_local_ctrl,
TG3_GRC_LCLCTL_PWRSW_DELAY);
@@ -10537,7 +10543,10 @@ static int tg3_reset_hw(struct tg3 *tp, bool reset_phy)
tp->grc_local_ctrl |= tr32(GRC_LOCAL_CTRL) & gpio_mask;
/* GPIO1 must be driven high for eeprom write protect */
- if (tg3_flag(tp, EEPROM_WRITE_PROT))
+ if (tg3_flag(tp, CITADEL))
+ tp->grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE1 |
+ GRC_LCLCTRL_GPIO_OUTPUT1);
+ else if (tg3_flag(tp, EEPROM_WRITE_PROT))
tp->grc_local_ctrl |= (GRC_LCLCTRL_GPIO_OE1 |
GRC_LCLCTRL_GPIO_OUTPUT1);
}
@@ -15220,6 +15229,38 @@ static struct subsys_tbl_ent *tg3_lookup_by_subsys(struct tg3 *tp)
return NULL;
}
+static bool tg3_is_citadel(struct tg3 *tp)
+{
+ if (tp->pdev->subsystem_vendor == TG3PCI_SUBVENDOR_ID_BROADCOM) {
+ switch (tp->pdev->subsystem_device) {
+ case TG3PCI_SUBDEVICE_ID_CITADEL_BEVERLYWOOD:
+ case TG3PCI_SUBDEVICE_ID_CITADEL_BEL_AIR:
+ case TG3PCI_SUBDEVICE_ID_CHANNEL_2908:
+ case TG3PCI_SUBDEVICE_ID_CHANNEL_2909:
+ case TG3PCI_SUBDEVICE_ID_CHANNEL_2906:
+ case TG3PCI_SUBDEVICE_ID_CHANNEL_E14A:
+ case TG3PCI_SUBDEVICE_ID_CHANNEL_E34A:
+ case TG3PCI_SUBDEVICE_ID_CHANNEL_2904:
+ case TG3PCI_SUBDEVICE_ID_CHANNEL_2905:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ if (tp->pdev->subsystem_vendor == TG3PCI_SUBVENDOR_ID_DELL) {
+ switch (tp->pdev->subsystem_device) {
+ case TG3PCI_SUBDEVICE_ID_DELL_5720_L21T00:
+ case TG3PCI_SUBDEVICE_ID_DELL_5720_XE9880L:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ return false;
+}
+
static void tg3_get_eeprom_hw_cfg(struct tg3 *tp)
{
u32 val;
@@ -15231,6 +15272,9 @@ static void tg3_get_eeprom_hw_cfg(struct tg3 *tp)
tg3_flag_set(tp, EEPROM_WRITE_PROT);
tg3_flag_set(tp, WOL_CAP);
+ if (tg3_is_citadel(tp))
+ tg3_flag_set(tp, CITADEL);
+
if (tg3_asic_rev(tp) == ASIC_REV_5906) {
if (!(tr32(PCIE_TRANSACTION_CFG) & PCIE_TRANS_CFG_LOM)) {
tg3_flag_clear(tp, EEPROM_WRITE_PROT);
@@ -15430,6 +15474,12 @@ static void tg3_get_eeprom_hw_cfg(struct tg3 *tp)
tp->phy_flags |= TG3_PHYFLG_DISABLE_1G_HD_ADV;
}
done:
+ if (tg3_flag(tp, CITADEL)) {
+ tg3_flag_clear(tp, EEPROM_WRITE_PROT);
+ tg3_flag_clear(tp, WOL_CAP);
+ tg3_flag_clear(tp, WOL_ENABLE);
+ }
+
if (tg3_flag(tp, WOL_CAP))
device_set_wakeup_enable(&tp->pdev->dev,
tg3_flag(tp, WOL_ENABLE));
diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h
index a9e7f88fa26d..713fe9c821e2 100644
--- a/drivers/net/ethernet/broadcom/tg3.h
+++ b/drivers/net/ethernet/broadcom/tg3.h
@@ -100,6 +100,8 @@
#define TG3PCI_SUBDEVICE_ID_DELL_MERLOT 0x0109
#define TG3PCI_SUBDEVICE_ID_DELL_SLIM_MERLOT 0x010a
#define TG3PCI_SUBDEVICE_ID_DELL_5762 0x07f0
+#define TG3PCI_SUBDEVICE_ID_DELL_5720_L21T00 0x0e19
+#define TG3PCI_SUBDEVICE_ID_DELL_5720_XE9880L 0x0ea1
#define TG3PCI_SUBVENDOR_ID_COMPAQ PCI_VENDOR_ID_COMPAQ
#define TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE 0x007c
#define TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE_2 0x009a
@@ -111,6 +113,16 @@
#define TG3PCI_SUBDEVICE_ID_ACER_57780_A 0x0601
#define TG3PCI_SUBDEVICE_ID_ACER_57780_B 0x0612
#define TG3PCI_SUBDEVICE_ID_LENOVO_5787M 0x3056
+/* NetXtreme NX1 boards integrated with Citadel security SoCs */
+#define TG3PCI_SUBDEVICE_ID_CITADEL_BEVERLYWOOD 0xd346
+#define TG3PCI_SUBDEVICE_ID_CITADEL_BEL_AIR 0xd146
+#define TG3PCI_SUBDEVICE_ID_CHANNEL_2908 0x2908
+#define TG3PCI_SUBDEVICE_ID_CHANNEL_2909 0x2909
+#define TG3PCI_SUBDEVICE_ID_CHANNEL_2906 0x2906
+#define TG3PCI_SUBDEVICE_ID_CHANNEL_E14A 0xe14a
+#define TG3PCI_SUBDEVICE_ID_CHANNEL_E34A 0xe34a
+#define TG3PCI_SUBDEVICE_ID_CHANNEL_2904 0x2904
+#define TG3PCI_SUBDEVICE_ID_CHANNEL_2905 0x2905
/* 0x30 --> 0x64 unused */
#define TG3PCI_MSI_DATA 0x00000064
@@ -3122,6 +3134,7 @@ enum TG3_FLAGS {
TG3_FLAG_ROBOSWITCH,
TG3_FLAG_ONE_DMA_AT_ONCE,
TG3_FLAG_RGMII_MODE,
+ TG3_FLAG_CITADEL,
/* Add new flags before this comment and TG3_FLAG_NUMBER_OF_FLAGS */
TG3_FLAG_NUMBER_OF_FLAGS, /* Last entry in enum TG3_FLAGS */
--
2.52.0
reply other threads:[~2026-11-18 15:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261118150247.1145764-1-pavan.chebbi@broadcom.com \
--to=pavan.chebbi@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew.gospodarek@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox