MSPM0 MSPM0G51xx support#99344
Conversation
In flight PR includes necessary SDK and pinctrl hal changes. Signed-off-by: Dylan Philpot <d-philpot@ti.com>
Adds relevant SOC defines for MSPM0G51xx family. Signed-off-by: Dylan Philpot <d-philpot@ti.com>
Includes devices tree files for MSPM0G51xx family. Signed-off-by: Dylan Philpot <d-philpot@ti.com>
Adds dts, yaml, and support files for the MSPM0G5187 launchpad. Signed-off-by: Dylan Philpot <d-philpot@ti.com>
Adding UNICOMM_Inst_Regs to typedef to avoid compliance errors regarding consistent spacing '*' Signed-off-by: Dylan Philpot <d-philpot@ti.com>
UART on the MSPM0G51xx family is part of a singular comm peripheral (UNICOMM). Functionality is the same but requires additional overhead of managing the register type and include paths. Signed-off-by: Dylan Philpot <d-philpot@ti.com>
Adds IOMUX look up table for MSPM0G51xx family to GPIO driver. Signed-off-by: Dylan Philpot <d-philpot@ti.com>
|
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
dsseng
left a comment
There was a problem hiding this comment.
thanks, please see some minor comments
There was a problem hiding this comment.
Everything looks shared with mspm0g5117.dtsi
Could you please consider moving these definitions into a shared file of extend 5187 from 5117
Please disregard this comment if these SoCs will diverge vastly once more peripherals are added in
There was a problem hiding this comment.
I'm not a person responsible for this, but maybe this image is of too high resolution. @kartben should the board image be under ca 500 KiB?
There was a problem hiding this comment.
this needs to be about 50KiB or so
|
| config HAS_MSP_UNICOMM | ||
| bool |
There was a problem hiding this comment.
has no place in this file
There was a problem hiding this comment.
@nordicjm Can you provide more information on this comment?
There was a problem hiding this comment.
I think Kconfig.soc should only have SOC_<soc-name> symbols, see https://docs.zephyrproject.org/latest/hardware/porting/soc_porting.html#create-your-soc-directory
There was a problem hiding this comment.
this needs to be about 50KiB or so
|
|
||
| leds { | ||
| compatible = "gpio-leds"; | ||
| led0: led_0 { |
There was a problem hiding this comment.
this file is non compliant with the dts requirements
There was a problem hiding this comment.
@d-philpot check the compliance errors, there's a tool you can run to autoformat the dts file
| #if CONFIG_SOC_MSPM0G5187 | ||
| static uint8_t gpiob_pincm_lut[NUM_GPIOB_PIN] = { | ||
| IOMUX_PINCM12, IOMUX_PINCM13, IOMUX_PINCM15, IOMUX_PINCM16, IOMUX_PINCM17, | ||
| IOMUX_PINCM18, IOMUX_PINCM23, IOMUX_PINCM24, IOMUX_PINCM25, IOMUX_PINCM26, | ||
| IOMUX_PINCM27, IOMUX_PINCM28, IOMUX_PINCM29, IOMUX_PINCM30, IOMUX_PINCM31, | ||
| IOMUX_PINCM32, IOMUX_PINCM33, IOMUX_PINCM43, IOMUX_PINCM44, IOMUX_PINCM45, | ||
| IOMUX_PINCM48, IOMUX_PINCM49, IOMUX_PINCM50, IOMUX_PINCM51, IOMUX_PINCM52, | ||
| IOMUX_PINCM56 | ||
| }; |
There was a problem hiding this comment.
Not necessarily requesting any action at the moment, but I had to make similar updates for port B and port C pins for MSPM0G3519 SOC with 100-pin package. It could get ugly if people just start adding SOC-specific definitions here...
There was a problem hiding this comment.
Agree. This keeps expanding for each series. Not nice for longer run, we need better approach.
parthitce
left a comment
There was a problem hiding this comment.
Reorder the commit of serial before using it.
| Pwm | ||
| FILE | ||
| NRF_GPIO_Type | ||
| UNICOMM_Inst_Regs |
There was a problem hiding this comment.
Not related to this PR. IMO this needs to be separate PR
There was a problem hiding this comment.
This PR is the first to introduce UNICOMM_Inst_Regs, so I believe it is relevant. The complaince checks will not pass without it.
| @@ -0,0 +1,16 @@ | |||
| /* SPDX-License-Identifier: Apache-2.0 */ | |||
There was a problem hiding this comment.
add copyright, applies to all placed
| config USE_MSPM0_DL_UART | ||
| bool | ||
|
|
||
| config USE_MSPM0_DL_UNICOMM_UART |
There was a problem hiding this comment.
It is used in the kconfig of the serial driver to pull in the correct APIs from the hal.
| #if CONFIG_SOC_MSPM0G5187 | ||
| static uint8_t gpiob_pincm_lut[NUM_GPIOB_PIN] = { | ||
| IOMUX_PINCM12, IOMUX_PINCM13, IOMUX_PINCM15, IOMUX_PINCM16, IOMUX_PINCM17, | ||
| IOMUX_PINCM18, IOMUX_PINCM23, IOMUX_PINCM24, IOMUX_PINCM25, IOMUX_PINCM26, | ||
| IOMUX_PINCM27, IOMUX_PINCM28, IOMUX_PINCM29, IOMUX_PINCM30, IOMUX_PINCM31, | ||
| IOMUX_PINCM32, IOMUX_PINCM33, IOMUX_PINCM43, IOMUX_PINCM44, IOMUX_PINCM45, | ||
| IOMUX_PINCM48, IOMUX_PINCM49, IOMUX_PINCM50, IOMUX_PINCM51, IOMUX_PINCM52, | ||
| IOMUX_PINCM56 | ||
| }; |
There was a problem hiding this comment.
Agree. This keeps expanding for each series. Not nice for longer run, we need better approach.
| - hal | ||
| - name: hal_ti | ||
| revision: cc049020152585c4e968b83c084d230234b6d852 | ||
| revision: pull/74/head |
There was a problem hiding this comment.
hey there's some pending comments on zephyrproject-rtos/hal_ti#74
| config HAS_MSP_UNICOMM | ||
| bool |
There was a problem hiding this comment.
I think Kconfig.soc should only have SOC_<soc-name> symbols, see https://docs.zephyrproject.org/latest/hardware/porting/soc_porting.html#create-your-soc-directory
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config BOARD_LP_MSPM0G5187 | ||
| select SOC_MSPM0G5187 No newline at end of file |
There was a problem hiding this comment.
missing \n at EOF, check your editor config
|
|
||
| leds { | ||
| compatible = "gpio-leds"; | ||
| led0: led_0 { |
There was a problem hiding this comment.
@d-philpot check the compliance errors, there's a tool you can run to autoformat the dts file
| IF_ENABLED(CONFIG_HAS_MSP_UNICOMM, \ | ||
| (static UNICOMM_Inst_Regs uart_mspm0_uc_regs_##index = { \ | ||
| .inst = (UNICOMM_Regs *)DT_INST_REG_ADDR(index), \ | ||
| .uart = (UNICOMMUART_Regs *)UC_UART_BASE(DT_INST_REG_ADDR(index)), \ | ||
| .fixedMode = DT_CHILD_NUM(DT_PARENT(DT_DRV_INST(index))) == 1, \ | ||
| };) \ | ||
| ) \ | ||
| \ | ||
| static const struct uart_mspm0_config uart_mspm0_cfg_##index = { \ | ||
| .regs = COND_CODE_1(CONFIG_HAS_MSP_UNICOMM, \ | ||
| (&uart_mspm0_uc_regs_##index), ((UART_Regs *)DT_INST_REG_ADDR(index))), \ |
There was a problem hiding this comment.
the \ should be aligned, also the parenthesization is a bit all over, should be something like
IF_ENABLED(CONFIG_HAS_MSP_UNICOMM, ( \
static UNICOMM_Inst_Regs uart_mspm0_uc_regs_##index = { \
.inst = (UNICOMM_Regs *)DT_INST_REG_ADDR(index), \
.uart = (UNICOMMUART_Regs *)UC_UART_BASE(DT_INST_REG_ADDR(index)), \
.fixedMode = DT_CHILD_NUM(DT_PARENT(DT_DRV_INST(index))) == 1, \
}; \
))IMO, thogh people have different preferences just keep it coherent with the file if there's any other of those patterns
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |



This PR adds support for the MSPM0G51xx family of SoCs. Adds necessary dts, kconfig, and board files for this family. Also includes updates to the serial driver to account the new communication peripheral in this family: UNICOMM.