Skip to content

Add support for the Cadence SD6 SDHCI controller#581

Open
renjithkumarnair wants to merge 1 commit into
sonic-net:masterfrom
renjithkumarnair:sonic_octeon_202605
Open

Add support for the Cadence SD6 SDHCI controller#581
renjithkumarnair wants to merge 1 commit into
sonic-net:masterfrom
renjithkumarnair:sonic_octeon_202605

Conversation

@renjithkumarnair

Copy link
Copy Markdown

What I did

Added support for Cadence Sdhci eMMC controller for octeon platform.
This includes enabling the Cadence SD6 controller, HS400/HS400ES modes,
ACPI integration, PHY delay tuning, and multiple fixes for timing,
tuning, and controller corner cases.
Also updated the OTX2 mailbox interface version and related structures.

Why I did it

Octeon platforms require specific controller handling and tuning for reliable
high-speed eMMC operation. Existing driver support lacked MMC
Controller-specific configurations, resulting in instability and incorrect
operation in HS400-class modes. Additionally, mailbox structure updates
were needed to align kernel and application interfaces

How I verified it

  • Booted Octeon platform with updated driver
  • Verified eMMC enumeration and initialisation
  • Tested HS400 / HS400ES mode transitions
  • Validated tuning execution and value population
  • Verified mailbox compatibility with updated structure

Details if related

  • Added Cadence SD6 SDHCI controller support
  • Enabled HS400 and HS400ES modes
  • Configured PHY delays and default tuning values when DT values are missing or invalid
  • Implemented delay element handling and Cadence-specific tuning logic, including multi-block read helpers
  • Improved handling of DDR, clocking, enhanced strobe, command delay, block gap, and interrupt corner cases
  • Added ACPI support for Octeon Cadence SDHCI instance
  • Updated OTX2_MBOX_VERSION to 0x000b
  • Extended struct nix_lf_alloc_rsp with hw_rx_tstamp_en

Patch upstreaming plan

  • These patches have to be upstreamed

@renjithkumarnair renjithkumarnair requested a review from a team as a code owner May 26, 2026 15:47
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@linux-foundation-easycla

linux-foundation-easycla Bot commented May 26, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: renjithkumarnair / name: Renjithkumar Raveendran Nair (8a7f142)

@paulmenzel paulmenzel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please send the patch upstream for review (the tool b4 helps, or normal git commands git format-patch … and git send-email …).

@@ -0,0 +1,2902 @@
From d1910de6f9c5de27eecf89dc12a165a600aac833 Mon Sep 17 00:00:00 2001
From: rnair <rnair@marvell.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use your full name.

struct nix_lf_alloc_rsp with hw_rx_tstamp_en to match the mbox
structure with applications.

Signed-off-by: rnair <rnair@marvell.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@renjithkumarnair renjithkumarnair left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review comments incorporated.

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@renjithkumarnair renjithkumarnair left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLA has been signed now.

@renjithkumarnair

renjithkumarnair commented Jun 5, 2026

Copy link
Copy Markdown
Author

Please send the patch upstream for review (the tool b4 helps, or normal git commands git format-patch … and git send-email …).

This patch is not to be upstreamed as it is. There is another Code change coming towards adding SD6 support by other party (which can overlap/clash over this) in progress in the linux-mmc forum. So basically, have to wait for that patch to reflect in upstream and only patch up this driver upon that as needed; else it would clash.

@renjithkumarnair renjithkumarnair left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream task will be delayed - Given justification.

@gbhatt07

gbhatt07 commented Jun 5, 2026

Copy link
Copy Markdown

@lizhijianrd @Blueve please help in getting this PR reviewed. Thanks

@saiarcot895

Copy link
Copy Markdown
Contributor

/easycla

@saiarcot895

Copy link
Copy Markdown
Contributor

You'll need to fix the author on the commit for EasyCLA purposes.

-----------
Added support for Cadence Sdhci eMMC controller for octeon platform
This includes enabling the Cadence SD6 controller, HS400/HS400ES modes,
ACPI integration, PHY delay tuning, and multiple fixes for timing,
tuning, and controller corner cases.
Also updated the OTX2 mailbox interface version and related structures.

Why I did it
------------
Octeon platforms require specific controller handling and tuning for
reliable high-speed eMMC operation. Existing driver support lacked
MMC Controller-specific configurations, resulting in instability and
incorrect operation in HS400-class modes. Additionally, mailbox
structure updates were needed to align kernel and application interfaces

How I verified it
-----------------
- Booted Octeon platform with updated driver
- Verified eMMC enumeration and initialization
- Tested HS400 / HS400ES mode transitions
- Validated tuning execution and value population
- Verified mailbox compatibility with updated structure

Details if related
------------------
- Added Cadence SD6 SDHCI controller support
- Enabled HS400 and HS400ES modes
- Configured PHY delays and default tuning values when DT
  values are missing or invalid
- Implemented delay element handling and Cadence-specific
  tuning logic, including multi-block read helpers
- Improved handling of DDR, clocking, enhanced strobe,
  command delay, block gap, and interrupt corner cases
- Added ACPI support for Octeon Cadence SDHCI instance
- Updated OTX2_MBOX_VERSION to 0x000b
- Extended struct nix_lf_alloc_rsp with hw_rx_tstamp_en

Patch upstreaming plan
----------------------

- These patches are not to be upstreamed.
- There are parallel threads in Progress to give sd6hc support,
  which needs to be evaluated first: https://lkml.org/lkml/2026/5/11/2580

Signed-off-by: Renjithkumar Raveendran Nair <renjithkumar@gmail.com>
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@paulmenzel paulmenzel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SONiC commit message is just wrong. Please amend it. Also, why did you change to Google Mail address?

Lastly, why not use the commit from Altera, and review this? I am against, adding a commit to SONiC which might be different, and then in the end has to be kept, because certain feature differ from upstream.

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.

5 participants