plat-stm32mp1: bumping to pinctrl framework - #6082
Conversation
|
This series it too long. I'll shorten it and rebase it. |
247d861 to
c465cac
Compare
|
I've kept only the 5 first commits initially posted (15 patches) in the P-R, the one that introduce PINCTRL support in stm32_gpio.c, leaving out activation of Some of these platform updates are proposed to review in P-R #6091. |
9a10c45 to
80081a0
Compare
|
for info, CI checkpatch error reports are false positives (build error trace messages dumped in commit messages). |
|
review comments addressed |
|
may I squash the fixup commits? |
For clearer view, yes please |
ac43e7e to
0efc5f8
Compare
|
Fixup commits squashed + addressed comment on |
|
Thank you,
|
0efc5f8 to
04ab092
Compare
|
tag applied |
|
I need to rebase due to #6098 being recently merged. |
04ab092 to
6c75935
Compare
|
@GseoC, I added a fixup commit to "drivers: stm32_gpio: support CFG_DRIVERS_PINCTRL", to address the rebase issue. |
|
I have restarted IBART which failed on a socket test (rcu_sched stalls), looks unrelated to this PR. |
|
thanks |
|
Seems fine, tag applies |
6c75935 to
f961c56
Compare
|
Some changes in the series, to finalize bumping stm32_gpio.c to GPIO and PINCTRL frameworks:
|
|
Changed title has the seire finalizes stm32mp1 upgrades to pinctrl framework. |
| size_t conf_index = 0; | ||
|
|
||
| if (!pinctrl) | ||
| return; |
There was a problem hiding this comment.
Maybe add a message as we may think we secure a pin that will not be secure?
There was a problem hiding this comment.
if there is no pinctrl, there is no pin to configure so returning straight is fine, IMO.
f961c56 to
3e2805e
Compare
|
I do not catch why the code style check fails, I guess it did not restart
|
It did, but the way the code style check works might be a bit counter-intuitive 😉 It is actually run twice:
The rationale is, we want to check the code but also the commit descriptions, so each commit is checked (the |
Thanks for the explanation :) |
|
I'll sqaush the fixup commits. Once done, checkpatch should be happy. |
Changes stm32_gpio driver to support generic pin control framework (CFG_DRIVERS_PINCTRL=y). Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Adds helper function stm32_gpio_pinctrl_bank_pin() to get an array of bank and pin IDs related to a pin control state. Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Adds helper function stm32_pinctrl_set_secure_cfg() to set the GPIO pin secure state (secure or non-secure) for each pin referenced by a pin control state. Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Adds shared resources helper functions stm32mp_register_secure_pinctrl() and stm32mp_register_non_secure_pinctrl() for when a platform driver registers pins from a pin control state with secure or non-secure attribute. These function are required when CFG_DRIVERS_PINCTRL is enabled. Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Updates stm32_uart driver for when CFG_DRIVERS_PINCTRL is enabled making UART driver to get pin control configuration using the generic pin control framework. Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Updates stm32_i2c driver for when CFG_DRIVERS_PINCTRL is enabled making I2C driver to get pin control configuration using the generic pin control framework. When enabled, stm32_i2c driver get the active and sleep pin control configuration from the device tree. Sleep pinctrl configuration is optional. SE050 and STM32MP1 PMIC drivers that use the stm32_i2c bus are both updated accordingly. Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Changes platform stm32mp1 configuration to always enable CFG_DRIVERS_PINCTRL. The platform requires pinctrl_apply_state() to be unpaged has it can be used during PM suspend and resume sequences. Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Removes implementation when CFG_DRIVERS_PINCTRL is disables as stm32mp1 platform configuration enforces the switch is enabled. Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
3e2805e to
634db3f
Compare
Removes implementation when CFG_DRIVERS_PINCTRL is disables as stm32mp1 platform configuration enforces the switch is enabled. Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Removes implementation when CFG_DRIVERS_PINCTRL is disables as stm32mp1 platform configuration enforces the switch is enabled. Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Moves macros and structures definitions from stm32_gpio.h header file to the driver source file as these definition do not need to be visible from other drivers thank to pin control abstraction. Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
634db3f to
b3aec61
Compare
|
Thakns for the review. I also removed a suprious inline comment in comment "drivers: stm32_i2c: remove cases when CFG_DRIVERS_PINCTRL is disabled" (below). @GseoC, I preserved your review tag on that commit, I think it still applies :) @@ -113,7 +113,6 @@ struct i2c_cfg {
* @sec_cfg: I2C registers configuration storage
* @pinctrl: Pin control configuration for the I2C bus in active state
* @pinctrl_sleep: Pin control configuration for the I2C bus in standby state
- * @pinctrl_count: Number of PINCTRLs elements
*/
struct i2c_handle_s {
struct io_pa_va base; |
|
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
Bump stm32_gpio driver to recently merged pinctrl device driver probing support.
For STM32MP13 variant to comply with pinctrl support (and not panic on driver probe errors), I needed to update STM32MP13 DTS and DTSI file and 2 stm32 drivers (stm32_etzpc and stm32_rstctrl). They are part of this series.
A patch fixing a pinctrl driver probe function in under review at #6081.