Skip to content

Conversation

@natto1784
Copy link
Contributor

This patchset aims to:

  • make ti_k3 pinctrl multi-instance
  • add soc support for am2434 r5 and m4 cores
  • introduce am243x evaluation module as a board

@zephyrbot zephyrbot added area: Pinctrl platform: TI K3 Texas Instruments Keystone 3 Processors platform: TI SimpleLink Texas Instruments SimpleLink MCU labels Mar 19, 2025
@natto1784 natto1784 force-pushed the am243x branch 3 times, most recently from 1d084f5 to c2c270b Compare March 19, 2025 07:07
@natto1784 natto1784 force-pushed the am243x branch 6 times, most recently from bee4707 to 0e3f8d9 Compare March 19, 2025 09:05
@zephyrbot zephyrbot requested a review from jonas-rem March 19, 2025 09:22
@natto1784 natto1784 requested a review from dnltz March 19, 2025 09:28
Copy link
Contributor

@m-braunschweig m-braunschweig left a comment

Choose a reason for hiding this comment

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

Thanks for adding the initial Cortex-R5F support. I looked at the changes for it and the main domain and found a few possible improvements that are in the single comments.

Also the NUM_IRQS and SYS_CLOCK_HW_CYCLES_PER_SEC Kconfig options need to be adjusted for this SoC. But to keep the scope of this PR limited I would suggest changing this later by splitting up the Kconfig into multiple files in a different PR.

Can you also share how you are booting the SoC and which changes you have done to the TI MCU+ SDK SBL, if you use it?

@natto1784
Copy link
Contributor Author

natto1784 commented Mar 19, 2025

Hello @m-braunschweig

Also the NUM_IRQS and SYS_CLOCK_HW_CYCLES_PER_SEC Kconfig options need to be adjusted for this SoC. But to keep the scope of this PR limited I would suggest changing this later by splitting up the Kconfig into multiple files in a different PR.

noted

Can you also share how you are booting the SoC and which changes you have done to the TI MCU+ SDK SBL, if you use it?

I actually saw your documentation from the patchset here a few days ago: TexasInstruments#1 and I must say I am not doing it much differently. We are primarily using sbl_null and sbl_ospi to test out the zephyr ELFs. Additionally I also enable clocks for some modules from the SBL itself - for instance this allows me to use the mcu_uart0 for both m4 and r5

         status = SOC_moduleClockEnable(TISCI_DEV_MCU_UART0, 1);
         status = SOC_moduleSetClockFrequency(
                     TISCI_DEV_MCU_UART0,
                     TISCI_DEV_MCU_UART0_FCLK_CLK,
                     48000000
                     );

For now there is also the need to set the timer clock source manually if I am using a timer different from the SBL.

I appreciate your review and suggestions and will get to working on them tomorrow, might also edit this comment as I remember things.

@m-braunschweig
Copy link
Contributor

Can you also share how you are booting the SoC and which changes you have done to the TI MCU+ SDK SBL, if you use it?

I actually saw your documentation from the patchset here a few days ago: TexasInstruments#1 and I must say I am not doing it much differently. We are primarily using sbl_null and sbl_ospi to test out the zephyr ELFs.

Ok. Did you do any modifications for using sbl_ospi? Because you have the exception vector on the start of the SRAM partition of the core while I put it to 0x0 and I needed to change the bootloader for it to boot (which I don't really like).

@natto1784
Copy link
Contributor Author

natto1784 commented Mar 20, 2025

Ok. Did you do any modifications for using sbl_ospi? Because you have the exception vector on the start of the SRAM partition of the core while I put it to 0x0 and I needed to change the bootloader for it to boot (which I don't really like).

For R5, did nothing, the vector table at the start of SRAM (0x70000000) gets relocated to 0x0 via z_arm_relocate_vector_table

For M4, you need to set the CONFIG_KERNEL_ENTRY="__start" since that is how it's configured in SBL

edit: actually just realised i had set ROMSTART_RELOCATION_ROM earlier in the local board defconfig, forgot about it. for future readers, what @m-braunschweig says above is correct.

@m-braunschweig
Copy link
Contributor

The relocation itself wasn't the problem in my case. It was either parsing or setting the entryPoint via the DMSC-L which is why I hardcoded it. I will look at this again later to see, if it is really necessary or whether there was something else going on

};

sram1: memory1@40000 {
sram1: memory1@30000 {
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks correct, but it is a fix unrelated to this refactor. Should this go in its own commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's fine if it does not affect other boards negatively

nordicjm
nordicjm previously approved these changes Jun 9, 2025
vaishnavachath
vaishnavachath previously approved these changes Jun 10, 2025
Copy link
Contributor

@m-braunschweig m-braunschweig left a comment

Choose a reason for hiding this comment

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

Seems good except the small typo in the model property (I will already approve it anyway, since it's only a minor thing).
With the compatible property I'm also with how it currently is

Some devices have multiple pinctrl regions; for instance, main pinctrl and
mcu pinctrl. Currently there can only be a single pinctrl instance picked
form a DT label. This patch makes the pinctrl driver initialise one
instance for each node with correct compatible string.

Signed-off-by: Amneesh Singh <a-singh7@ti.com>
@natto1784 natto1784 force-pushed the am243x branch 2 times, most recently from 3e7c9fe to 0d65b23 Compare June 16, 2025 12:31
Amneesh Singh and others added 5 commits June 16, 2025 18:06
Add SoC support and device trees for Texas Instruments AM2434 SoC. Both R5
and M4 cores are supported here.

Signed-off-by: Amneesh Singh <a-singh7@ti.com>
Reflect changes from the new am64x_m4.dtsi file.

Affected boards:
- phyboard_electra
- sk_am64

Signed-off-by: Amneesh Singh <a-singh7@ti.com>
Add board support for am2434_evm board

Signed-off-by: Amneesh Singh <a-singh7@ti.com>
Add documentation for am243x_evm and while at it, add the openocd
configuration as well.

Co-authored-by: Mika Braunschweig <mika.braunschweig@siemens.com>
Signed-off-by: Amneesh Singh <a-singh7@ti.com>
Add DT overlay for am243x_evm/am2434/r5f0_0 in one of the ADC samples

Signed-off-by: Amneesh Singh <a-singh7@ti.com>
@sonarqubecloud
Copy link

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@danieldegrasse danieldegrasse merged commit 2f59ccf into zephyrproject-rtos:main Jun 16, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ADC Analog-to-Digital Converter (ADC) area: Pinctrl area: Samples Samples area: Timer Timer platform: PHYTEC platform: TI K3 Texas Instruments Keystone 3 Processors platform: TI SimpleLink Texas Instruments SimpleLink MCU

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants