DESK-RZ-L/Peripherals/UART

From DAVE Developer's Wiki
Jump to: navigation, search
History
Issue Date Notes
2025/12/16 DESK-RZ-L-1.x.x release


Peripheral UART[edit | edit source]

Configuration[edit | edit source]

These peripheral(s) can only be used with the following ConfigID(s) (see the associated BOM):

ConfigID Note
2002 Available UARTs: console, A, B, D
2003 Available UARTs: console, A, D (B - Bluetooth interface - pins are required to drive motors)

Device tree configuration[edit | edit source]

Below is an example of a device tree configuration used on ZERO Evaluation Kit.

From rzt2h-dsab.dtsi:

...
// Console
&sci0 {
	pinctrl-0 = <&sci0_pins>;
	pinctrl-names = "default";
	status = "okay";
};
...
&pinctrl {
	// Done
	sci0_pins: sci0 {
		pinmux =    <RZT2H_PORT_PINMUX(27, 5, 0x14)>,   /* P27_5 TXD0   | B_D22 H26 */
			        <RZT2H_PORT_PINMUX(27, 4, 0x14)>;   /* P27_4 RXD0   | B_D23 F25 */
	};
...
};

From rzt2h-eb23-cb2002.dts:

...
// UART A
&sci3 {
	pinctrl-0 = <&sci3_pins>;
	pinctrl-names = "default";

	/delete-property/dmas;
	/delete-property/dma-names;

	uart-has-rtscts;

	status = "okay";
};

// UART B - BT
&sci1 {
	pinctrl-0 = <&sci1_pins>;
	pinctrl-names = "default";

	/delete-property/dmas;
	/delete-property/dma-names;

	uart-has-rtscts;

	status = "disabled";
};

// UART D
&sci5 {
	pinctrl-0 = <&sci5_pins>;
	pinctrl-names = "default";

	status = "okay";
};
...
&pinctrl {
	sci1_pins: sci1 {
		pinmux =    <RZT2H_PORT_PINMUX(11, 1, 0x14)>,   /* P11_1 TXD1   | B_D13 C1 */
			        <RZT2H_PORT_PINMUX(11, 0, 0x14)>,   /* P11_0 RXD0   | B_D14 C5 */
			        <RZT2H_PORT_PINMUX(11, 2, 0x14)>,   /* P11_2 RTS1   | B_D15 C3 */
			        <RZT2H_PORT_PINMUX(11, 3, 0x14)>;   /* P11_3 CTS1   | B_D16 D1 */
	};

	sci3_pins: sci3 {
		pinmux =    <RZT2H_PORT_PINMUX(13, 4, 0x14)>,   /* P13_4 RXD3   | B_A14 B8 */
			        <RZT2H_PORT_PINMUX(13, 5, 0x14)>,   /* P13_5 TXD3   | B_B13 B7 */
			        <RZT2H_PORT_PINMUX(13, 6, 0x14)>,   /* P13_6 RTS3   | B_C13 A8 */
			        <RZT2H_PORT_PINMUX(13, 7, 0x14)>;   /* P13_7 CTS3   | B_C14 C8 */
	};

	sci5_pins: sci5 {
		pinmux =    <RZT2H_PORT_PINMUX(16, 4, 0x14)>,   /* P16_4 TXD5   | B_C23 A12 */
			        <RZT2H_PORT_PINMUX(16, 3, 0x14)>;   /* P16_3 RXD5   | B_C22 B12 */
	};
...
};

Accessing the peripheral[edit | edit source]

Linux[edit | edit source]

...
[   60.513530] 80005000.serial: ttySC0 at MMIO 0x80005000 (irq = 14, base_baud = 0) is a scif
[   61.831885] 80005400.serial: ttySC1 at MMIO 0x80005400 (irq = 18, base_baud = 0) is a scif
[   61.841098] 80005c00.serial: ttySC3 at MMIO 0x80005c00 (irq = 22, base_baud = 0) is a scif
[   61.850337] 81005000.serial: ttySC5 at MMIO 0x81005000 (irq = 26, base_baud = 0) is a sci
...