2024-06-14 05:34 AM
Hello,
I have created my own board in zephyr (using STM32U575).
Now I would like to configure the power mode pins (CSLEEP, CDSTOP, SRDSTOP ) in the devicetree of the board.
I have therefore implemented the configuration for the pins in the .dts file:
&pinctrl {
csleep: csleep {
pinmux = <STM32_PINMUX('A', 5, AF0)>;
};
cdstop: cdstop {
pinmux = <STM32_PINMUX('A', 6, AF0)>;
};
srdstop: srdstop {
pinmux = <STM32_PINMUX('A', 7, AF0)>;
};
};
However, the pins are not set correctly with this setting alone.
Normally, the pins should now be assigned to a periphery.
If I now assign these pins to any periphery, it works:
&lpuart1 {
pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3 &csleep &cdstop &srdstop>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};
But these pins have nothing to do with any peripheral.
How else could I solve this if I don't want to make any settings in the application code?
Thank you for the answers.
2024-06-14 11:49 AM - edited 2024-06-14 11:50 AM
The declaration of pinctrl by itself does not do anything. Notice the status = "okay" in the uart node, this is what causes activation of this node and pinctrl as its dependency. It looks like you need some fake device node with status = okay.
2024-06-17 12:51 AM
How can I do this?
Are any changes necessary in the soc driver?