Skip to content

cable_safety_feature: Add cable fault detection and low-power mode#982

Open
ShLiTT wants to merge 3 commits intotenstorrent:mainfrom
ShLiTT:cable_safety
Open

cable_safety_feature: Add cable fault detection and low-power mode#982
ShLiTT wants to merge 3 commits intotenstorrent:mainfrom
ShLiTT:cable_safety

Conversation

@ShLiTT
Copy link
Contributor

@ShLiTT ShLiTT commented Jan 30, 2026

Summary
This PR implements cable fault detection to protect the board when the 12V-2x6 power cable is missing or improperly installed. When a cable fault is detected, the SMC enters a low-power mode while maintaining PCIe communication with the host.

Problem
Without proper power cable detection, the board may attempt to power up components that could draw excessive current from the PCIe slot, damaging the cable.

Solution

DMC Side:

  • Detect cable power limit via GPIO sense pins (psu_sense0, psu_sense1)
  • Write power limit to SCRATCH_1 register via JTAG before ARC soft reset
  • A value of 0 indicates cable fault (no cable or improper installation)

SMC Side:

  • Read cable power limit from SCRATCH_1 during reset sequence
  • If power limit is 0, enter cable fault mode:
    1. Keep tensixes, ETH, GDDR, and L2CPU in reset to minimize power draw
    2. Deassert NOC, system, and PCIe resets (required for ARC-PCIe communication)
    3. Set cable_fault bit in STATUS_ERROR_STATUS0 for host visibility
  • If power limit > 0, proceed with normal initialization

- added `DMC_CABLE_POWER_LIMIT_REG_ADDR` definition using
  RESET_UNIT_SCRATCH_REG_ADDR(1) -- SCRATCH_1
- added cable_fault bit (bit 1) to STATUS_ERROR_STATUS0_reg_t

Signed-off-by: Sherry Li <xiaoruli@tenstorrent.com>
Implemented cable power limit communication from DMC to SMC:

- Added jtag_bootrom_set_cable_power_limit() to write power limit
  to SCRATCH_1 register via JTAG AXI
- Added cable_power_limit parameter to jtag_bootrom_reset_sequence()
  to write power limit after ASIC reset but before ARC soft reset
- Added cable_power_limit field to bh_chip_data to preserve the
  value for runtime resets
- DMC calls detect_max_power() and passes result to reset sequence

Signed-off-by: Sherry Li <xiaoruli@tenstorrent.com>
@ShLiTT ShLiTT closed this Jan 30, 2026
@ShLiTT ShLiTT reopened this Jan 30, 2026
Read cable power limit from SCRATCH_1 (written by DMC via JTAG).
If power limit is 0, enter cable fault mode to minimize power draw.
Add magic bits for backward compatibility

In cable fault mode:
- Keep tensixes, ETH, GDDR, and L2CPU in reset
- Always deassert NOC, system, and PCIe resets (needed for ARC-PCIe
  communication path)
- Skip RISC-V and soft reset sequences

This allows the board to remain accessible via PCIe even when the
12V-2x6 power cable is missing or improperly installed.

Signed-off-by: Sherry Li <xiaoruli@tenstorrent.com>
@ShLiTT ShLiTT marked this pull request as ready for review February 11, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant