-
Notifications
You must be signed in to change notification settings - Fork 7.4k
stm32h7rs xspi Node with domain clock for peripheral clock configuration #88051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ae582e0
to
2d5937f
Compare
Can also select the HCLK 5 to be the domain clock of the XSPI peripheral:
|
5856ea0
to
4081d20
Compare
rebase on d453fb9 |
rebase on 88b108d (fixing typo and conflict) |
@@ -455,6 +461,10 @@ static int stm32_clock_control_get_subsys_rate(const struct device *clock, | |||
case STM32_CLOCK_BUS_AHB2: | |||
case STM32_CLOCK_BUS_AHB3: | |||
case STM32_CLOCK_BUS_AHB4: | |||
#if defined(CONFIG_SOC_SERIES_STM32H7RSX) | |||
/* HCLK5 i a possible source clock for some peripherals */ | |||
case STM32_SRC_HCLK5: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STM32_SRC_HCLK1/2/3/4 and STM32_CLOCK_BUS_AHB5 cases are still missing in this function.
Add the definitions of the PLL2 and PLL3 outputs for the stm32H7RS mcus and the HCLK 5 which is clock source for the XSPI instance. and other HCLKn for other peripherals. Signed-off-by: Francois Ramu <[email protected]>
Defines the corresponding memory area of the MPU for the external NOR xspi node. Signed-off-by: Francois Ramu <[email protected]>
Add the XSPI 2 which is an octoSPI connection to a octo NOR flash MX25UW25645GXDI00 (256 Mbits, 1.8 V, 200 MHz, DTR, rww) on the nucleo_h7s3l8 board. Signed-off-by: Francois Ramu <[email protected]>
Add the XSPI 2 which is an octoSPI connection to a octo NOR flash mx66uw1g45 on the stm32h7s78_dk disco kit Signed-off-by: Francois Ramu <[email protected]>
20adb4b
adding the HCLKn clocks |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with these suggestions/comments addressed of not.
@@ -2068,6 +2073,11 @@ static int flash_stm32_xspi_init(const struct device *dev) | |||
LOG_ERR("XSPI mode SPI|DUAL|QUAD/DTR is not valid"); | |||
return -ENOTSUP; | |||
} | |||
#if defined(CONFIG_SOC_SERIES_STM32H7RSX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking: may I suggest an empty line above?
.Refresh = 0, | ||
#endif /* OCTOSPI_DCR4_REFRESH */ | ||
#endif /* XSPI_DCR4_REFRESH */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default loading 0 values is not strictly needed. Maybe simpler if removed.
slot0_partition: partition@0 { | ||
label = "image-0"; | ||
reg = <0x00000000 DT_SIZE_K(512)>; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer with an empty line before each subnodes.
}; | ||
storage_partition: partition@110000 { | ||
label = "storage"; | ||
reg = <0x00110000 DT_SIZE_K(64)>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentionally waste the remaining of the internal flash? 64kB is not much. Maybe increase to 1 or 2 MByte, or even (DT_SIZE_M(30) - DT_SIZE_K(64))
.
slot0_partition: partition@0 { | ||
label = "image-0"; | ||
reg = <0x00000000 DT_SIZE_K(512)>; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an empty line between each subnode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm removing my +1, at leas tthe empty lines should be added in the DTS file (coding style conformance).
So quick! nevermind, we'll fix the DT later :-) |
This PR is adding the xspi nodes to the stm32h7rs serie with domain clock configuration for the peripheral clock and the XSPIMgr clock
The XSPI peripheral is clocked by the STM32_SRC_PLL2_S and the PLL2 is enabled in the board device tree