Skip to content

plat-qcom: nord: add PIL bring-up for HPASS, SOCCP and Turing DSPs - #41

Draft
Taniya Das (taniyadas20) wants to merge 1 commit into
qualcomm-linux:qcom-nextfrom
taniyadas20:nord-pil-support
Draft

plat-qcom: nord: add PIL bring-up for HPASS, SOCCP and Turing DSPs#41
Taniya Das (taniyadas20) wants to merge 1 commit into
qualcomm-linux:qcom-nextfrom
taniyadas20:nord-pil-support

Conversation

@taniyadas20

Copy link
Copy Markdown

Add the clock and PAS bring-up support required to load the additional DSP images on the Nord platform:

  • clock-qcom: add a Lucid-OLE PLL enable helper. Lucid-OLE reuses the Lucid-EVO register layout but packs PLL_L_VAL as an 8-bit L value plus separate 8-bit process-cal and ring-osc-cal fields, and requires the PLL_TEST_CTL* trim registers to be programmed, so it gets its own config struct and enable path.
  • clk_qcom: add QCOM_CLKS_{SOCCP,HPASS0,HPASS1,HPASS2,TURING2,TURING3} clock groups and route them through the PAS enable path.
  • pas_data: add PAS IDs for TURING2/3, HPASS0-2 and SOCCP.
  • nord: add the per-platform clock-qcom-pas.c and clock_group_qcom.h describing the PLL and clock-group configuration for these subsystems.
  • arch/target config: add the register base/size definitions needed by the new bring-up code.

Add the clock and PAS bring-up support required to load the additional
DSP images on the Nord platform:

 - clock-qcom: add a Lucid-OLE PLL enable helper. Lucid-OLE reuses the
   Lucid-EVO register layout but packs PLL_L_VAL as an 8-bit L value plus
   separate 8-bit process-cal and ring-osc-cal fields, and requires the
   PLL_TEST_CTL* trim registers to be programmed, so it gets its own
   config struct and enable path.
 - clk_qcom: add QCOM_CLKS_{SOCCP,HPASS0,HPASS1,HPASS2,TURING2,TURING3}
   clock groups and route them through the PAS enable path.
 - pas_data: add PAS IDs for TURING2/3, HPASS0-2 and SOCCP.
 - nord: add the per-platform clock-qcom-pas.c and clock_group_qcom.h
   describing the PLL and clock-group configuration for these subsystems.
 - arch/target config: add the register base/size definitions needed by
   the new bring-up code.

Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
@ldts

Copy link
Copy Markdown
Contributor

Please modify the commit messages removing the how the change is done as to why the change is needed.
also please describe how this code was tested so that I can reproduce on my end.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds Nord clock and reset sequencing for HPASS, SOCCP, and Turing DSP bring-up.

Changes:

  • Adds Lucid-OLE PLL configuration and enable support.
  • Adds PAS IDs, clock groups, and subsystem bring-up sequences.
  • Defines Nord MMIO regions and clock/reset registers.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
core/pta/qcom/pas/platform/pas_data.h Adds subsystem PAS IDs.
core/include/drivers/clk_qcom.h Adds clock groups and Lucid-OLE API.
core/drivers/clk/qcom/platform/nord/clock-qcom-pas.c Implements Nord clock, reset, and processor sequencing.
core/drivers/clk/qcom/platform/nord/clock_group_qcom.h Defines Nord clock/reset registers.
core/drivers/clk/qcom/clock-qcom.c Implements Lucid-OLE PLL enablement and routing.
core/arch/arm/plat-qcom/wildcat/nord/target_config.h Adds Nord peripheral MMIO regions.
core/arch/arm/plat-qcom/wildcat/arch_config.h Adds Wildcat architecture register regions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +174 to +177
/* 6. Wait for the FSM to auto-break. */
while (!(io_read32(pub + CDSP_QDSP6SS_BOOT_STATUS) &
QDSP6SS_BOOT_STATUS_AUTO_BREAK_BIT))
udelay(5);
Comment on lines +406 to +422
{
uint64_t timeout = 0;

io_clrbits32(tcsr + TCSR_HPASS_AG_NOC_QCHANNEL_QREQN, qreqn_bit);
timeout = timeout_init_us(500);
while (io_read32(tcsr + TCSR_HPASS_AG_NOC_QCHANNEL_QACCEPTN) &
qaccept_bit) {
if (timeout_elapsed(timeout))
goto retry;
udelay(5);
}
return TEE_SUCCESS;

retry:
if (!(io_read32(tcsr + TCSR_HPASS_AG_NOC_QCHANNEL_QACCEPTN) &
qdeny_bit))
return TEE_SUCCESS;

#define TCSR_HPASS_AG_NOC_QDENY_BIT BIT(1)
#define TCSR_HPASS_ENPU_NOC_QDENY_BIT BIT(5)
#define TCSR_HPASS_AUDIO_NOC_QDENY_BIT TCSR_HPASS_AG_NOC_QDENY_BIT
Comment on lines +599 to +604
while (!timeout_elapsed(timeout)) {
if (io_read32(v + HPASS_QDSP6SS_BOOT_STATUS) &
QDSP6SS_BOOT_STATUS_AUTO_BREAK_BIT)
break;
udelay(5);
}
return TEE_SUCCESS;
}

TEE_Result qcom_clock_enable_pas(enum qcom_clk_group group)
#define TARGET_CONFIG_H

#define GENI_UART_REG_BASE UL(0x884000)
#define GCC_BASE UL(0x110000)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please explicit add some tag like WIP, if change is not tested. It will help to avoid review confusion.

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.

Sure, will add WIP

#define SE_GCC_CBCR_CLK_OFF_BIT BIT(31)
#define SE_GCC_CBCR_HW_CTL_ENABLE_BIT BIT(1)

#define CDSP_NSP_SS_CC_OFFSET 0x00000000

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

for one group of #define can follow same indent for macro value?

@zelvam95

Copy link
Copy Markdown
Contributor

If this change is not tested, can you please move the PR to draft Taniya Das (@taniyadas20). We can mark it as ready to review once all the dependent parts are avail/change is ready to review.

@taniyadas20
Taniya Das (taniyadas20) marked this pull request as draft August 14, 2026 05:10
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