about access uart device in cboot

Hi:

We would like to send and recv data to our device via uart on cboot.
because we found uart control in cboot need to fill in the address

static struct comb_uart_mailbox mailbox = {
[COMB_UART_BPMP_MAILBOX] = {
.tx_addr = NV_ADDRESS_MAP_AON_HSP_SM_6_7_BASE + HSP_SHRD_MBOX_MBOX_0_SHRD_MBOX_0,
.rx_addr = NV_ADDRESS_MAP_BPMP_HSP_SM_0_1_BASE + HSP_SHRD_MBOX_MBOX_1_SHRD_MBOX_0
},
[COMB_UART_CPU_MAILBOX] = {
.tx_addr = NV_ADDRESS_MAP_AON_HSP_SM_0_1_BASE + HSP_SHRD_MBOX_MBOX_1_SHRD_MBOX_0,
.rx_addr = NV_ADDRESS_MAP_TOP0_HSP_SM_0_1_BASE + HSP_SHRD_MBOX_MBOX_0_SHRD_MBOX_0
},

if we would like to control other uart port , is there any document or information
for development ?

BR,
Patrick

Hi:

Can anyone help with this part?

BR,
Patrick

Sorry that we don’t have document for this part.

What is the usecase here? Please note that tegra combined uart is not the common uart driver.

It is a mechanism nv designed for Xavier. There are six debug stream producers: CCPLEX, BPMP, TZ, SPE, RCE and SCE. They will all send debug streams to SPE by mailbox. SPE then sends it to UARTC.

If that is not what you want, please go to check common/drivers/uart/ instead of the comb_uart.

Hi WayneWWW:

Our usecase is communication with other MCU via UART1 in cboot stage.
So can we use those functions below to implement our UART communication ?

error = tegrabl_console_register(TEGRABL_CONSOLE_UART, counter, NULL);
if ((error != TEGRABL_NO_ERROR) && (TEGRABL_ERROR_REASON(error) != TEGRABL_ERR_NOT_SUPPORTED)) {
goto fail;
}

	hconsole->putchar = tegrabl_uart_console_putchar;
	hconsole->getchar = tegrabl_uart_console_getchar;
	hconsole->puts = tegrabl_uart_console_puts;
	hconsole->close = tegrabl_uart_console_close;

	huart = tegrabl_uart_open(hconsole->instance);
	if (huart != NULL) {
		hconsole->dev = huart;
		hconsole->is_registered = true;
	} else {
		error = TEGRABL_ERROR(TEGRABL_ERR_INIT_FAILED, 0);
	}

Because in Linux we used the dev ttyTHS0

fd = uart_open(“/dev/ttyTHS0”);
if(fd==-1){
fprintf(stderr, “uart_open error\n”);
exit(1);
}
if(uart_set(fd,115200,0,8,‘N’,1) == -1){
fprintf(stderr, “uart set failed\n”);
exit(1);
}

BR,
Patrick

Hi WayneWWW:

Did cboot support this usecase ?

BR,
Patrick