EC21 - enable UART1 changing to multiplexing function 3

I’m using:
Quectel
EC21
Revision: EC21EUGAR08A04M4G
SDK is: EC21EUGAR08A04M4G_OCPU_01.200.01.200_SDK

I need to use the 3 UART (1,2,3), that are multiplexed by default.
For instance, UART1 should be PIN 38 and PIN39, that are by default SPI_MOSI and SPI_MISO.

Could you explain me how to change to the multiplexing Function 3 to enable UART_TXD_BLSP6 (TX) and UART_RXD_BLSP6 (RX)?

Could you explain me what I should write in my C code?

Thank you for the support!

Please check the patch.
You need to modify the device tree settings.

Dear Bean,
Thank you!

Do you have the patch also for UART2 and UART3? I must use all all them.

UART1:
PIN 38,39 - SPI_MOSI, SPI_MISO => UART_TXD_BLSP6 (DO), UART_RXD_BLSP6 (DI)

UART2:
PIN 129, 130 - SDC1_DATA3, SDC1_DATA2 => UART_TXD_BLSP1 (DO), UART_RXD_BLSP1 (DI)

UART3:
PIN 133, 134 - SDC1_CLK, SDC1_CMD => UART_TXD_BLSP4 (DO), UART_RXD_BLSP4 (DI)

You can follow the patch I sent to modify the device tree settings.
I don’t have it right now. I need to check the quectel sdk.
Please wait.

Thank you, I will wait your answer.
I also need to know the name of those 3 UART, to address properly in my C code.
Thank you!!

Dear Bean,
Thanks to the DIFF I have two UART working properly.
Unfortunately the UART 1, that is by default disabled and used as SPI, is not working.

Looking the file: mdm9607-mtp.dtsi, it reports by default the following:

&spi_6 {
status = “ok”;
};
&blsp1_uart6 {
status = “disabled”;
};

We changed with:

&spi_6 {
status = “disabled”;

};
&blsp1_uart6 {
status = “ok”;
};

But the result is the same, the UART is not yet working. Most probably it requests other modifications in the linux tree. Could you help on it?

Have you modified the pinctrl?

Do you have the Quectel_EC21&EC25_Series_QuecOpen_GPIO_Assignment_Speadsheet_V1.1_20181225.xlsx?

Dear Bean,
I commented in mdm9607-mtp.dtsi the spi6 and added uart6.
They were already defined in the pinctrl file.

//add by carola
//&spi_6 {
// status = “ok”;
//};

&blsp1_uart6 {
status = “ok”;
};

Now all the three more serials are working properly!
Thank you for the support!