Commit b43ea9a
committed
NVIDIA: SAUCE: MEDIATEK: pinctrl: mediatek: Add EINT Driver for CX7 hot plug on DGX Spark
This driver is used to manage PCIe link for NVIDIA ConnectX-7 (CX7)
hot-plug/unplug on DGX Spark. We need to disable PCIe link when
CX7 cable plug out happens and enable pcie link when
CX7 cable plug in happens.
This behavior is needed to conserve power when the CX7 cable is unplugged.
Otherwise, the CX7 controllers would still consume power and negatively impact the
board’s overall power consumption.
This driver helps save power when the CX7 cable is absent.
The driver detects cable hot‑plug or unplug events, enables or disables the corresponding links,
emits udev events, and then the user space triggers removal and rescanning of the PCIe device.
It also creates a sysfs entry to emulate cable plug in/out
behavior as below:
plug in - echo 1 > /sys/devices/platform/MTKP0001:00/cx7_dbg/plugin
plug out - echo 0 > /sys/devices/platform/MTKP0001:00/cx7_dbg/plugin
We also implement uevent to notify user-space applications when a
cable is plugged in or removed. Below are the details of our process:
* cable plug-in:
Report plug-in uevent (driver)
Power on CX7
Enable PCIe link (application)
Rescan CX7 devices (application)
* cable removal:
Report removal uevent (driver)
Remove CX7 devices (application)
Disable PCIe link (application)
Power off CX7
Testing performed includes:
1. Repeated CX7 plug/unplug cycles, verifying that the PCIe link transitions correctly.
2. Ensured no side effects or hangs.
3. Hence, regression risk is considered to be low.
4. It is also being tested by SW QA.
Automated testing:
We have included the dgx-spark-mlnx-hotplug package in the BaseOS, which provides a
standalone userspace script that can be used for automated testing.
To validate the driver without manual intervention, run the following:
1. Plug-in:
/opt/nvidia/dgx-spark-mlnx-hotplug/mtk-hotplug-handler.sh plug-in
2. Unplug:
/opt/nvidia/dgx-spark-mlnx-hotplug/mtk-hotplug-handler.sh removal
3. After each operation, run lspci and verify the results:
* When plugged-in: The output should show
“Ethernet controller: Mellanox Technologies MT2910 Family [ConnectX-7]” PCIe devices.
* When plugged-out: There should be no PCIe device entry with
“Ethernet controller: Mellanox Technologies MT2910 Family [ConnectX-7]”.
We plan to upstream this driver during the merge window for the next Linux kernel release,
expected to open in the January-February 2026 timeframe(anticipated to be kernel 6.20).
Necessary support will be provided.
Signed-off-by: Vaibhav Vyas <vavyas@nvidia.com>
Signed-off-by: Jerry.Guo <jerry.guo@mediatek.com>
Signed-off-by: Yenchia Chen <yenchia.chen@mediatek.com>
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Signed-off-by: Abhishek Sahu <abhsahu@nvidia.com>
Signed-off-by: Surabhi Chythanya Kumar <schythanyaku@nvidia.com>1 parent be01c90 commit b43ea9a
File tree
4 files changed
+970
-0
lines changed- debian.nvidia-6.14/config
- drivers/pinctrl/mediatek
4 files changed
+970
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
13 | 22 | | |
14 | 23 | | |
15 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
0 commit comments