faizan
June 5, 2020, 11:11am
#1
Hello, Please tell how to enable UART7 on Odyssey STM32MP157 provided on the 40-pin header. I want to enable UART7 on pins 18 and 20 (GPIO_E7 and GPIO_E8) respectively as shown in figure.
I have already enabled UART2 using the overlay file available in seeed_linux_dtoverlays package but there is no ovelay file for UART7 or any other UART.
Hansen
June 8, 2020, 1:28am
#2
Hi @faizan
Thank you for your feedback. we will add the overlay this week.we will contact you as soon as we complete this overlay.
Hansen
June 15, 2020, 2:13am
#3
Hi @faizan
we have been complete this overlay. the code as below:
/*
* Device tree overlay for uart7
*/
#include "dt-bindings/gpio/gpio.h"
#include "dt-bindings/pinctrl/stm32-pinfunc.h"
/dts-v1/;
/plugin/;
/ {
compatible = "seeed,npi-stm32mp1", "st,stm32mp157";
fragment@0 {
target = <&pinctrl>;
__overlay__ {
uart7_pins_s: uart7-1 {
pins1 {
pinmux = <STM32_PINMUX('E', 8, AF7)>;/* uart7_TX */
// <STM32_PINMUX('D', 4, AF7)>; /* uart7_RTS */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
pins2 {
pinmux = <STM32_PINMUX('E', 7, AF7)>; /* uart7_RX */
// <STM32_PINMUX('E',15, AF7)>; /* uart7_CTS_NSS */
bias-disable;
};
};
uart7_idle_pins_a: uart7-idle-0 {
pins1 {
pinmux = <STM32_PINMUX('D', 5, ANALOG)>; /* uart7_TX */
// <STM32_PINMUX('D', 4, ANALOG)>, /* uart7_RTS */
// <STM32_PINMUX('D', 3, ANALOG)>; /* uart7_CTS_NSS */
};
pins2 {
pinmux = <STM32_PINMUX('D', 6, AF7)>; /* uart7_RX */
bias-disable;
};
};
uart7_sleep_pins_a: uart7-sleep-0 {
pins {
pinmux = <STM32_PINMUX('D', 5, ANALOG)>, /* uart7_TX */
<STM32_PINMUX('D', 4, ANALOG)>;/* uart7_RTS */
// <STM32_PINMUX('D', 6, ANALOG)>, /* uart7_RX */
// <STM32_PINMUX('D', 3, ANALOG)>; /* uart7_CTS_NSS */
};
};
};
};
fragment@1 {
target = <&uart7>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&uart7_pins_s>;
pinctrl-1 = <&uart7_sleep_pins_a>;
pinctrl-2 = <&uart7_idle_pins_a>;
st,hw-flow-ctrl;
status = "okay";
};
};
fragment@2 {
target-path = "/aliases";
__overlay__ {
serial7 = "/soc/serial@40018000";
};
};
};
1 Like
Baozhu
June 16, 2020, 12:02am
#4
@Hansen Please save this overlay to
1 Like
Hansen
June 16, 2020, 1:29am
#5
1 Like
faizan
June 21, 2020, 5:16pm
#6
Thank You @Hansen and @Baozhu
wx4cb
September 19, 2020, 1:38pm
#7
how do we add these in?
is it in the wiki how to enable the ports?