[PATCH v2] ARM: imx: add support for TQMa6UL SoM on MBa6ulxl

Trent Piepho trent.piepho at igorinstitute.com
Thu Jun 17 17:03:00 PDT 2021


On Thu, Jun 17, 2021 at 2:25 AM Rouven Czerwinski
<r.czerwinski at pengutronix.de> wrote:
> +
> +static void setup_uart(void)
> +{
> +       void __iomem *iomuxbase = (void *)MX6_IOMUXC_BASE_ADDR;
> +
> +       imx6_ungate_all_peripherals();
> +
> +       imx_setup_pad(iomuxbase, MX6_PAD_UART1_TX_DATA__UART1_DCE_TX);
> +       imx_setup_pad(iomuxbase, MX6_PAD_UART1_RX_DATA__UART1_DCE_RX);

>From what I can tell, imx_setup_pad() will program the conf register
with 0.  Not a more typical value like 0x1b0b1 that is in most dts
files.  Does this actually work?  It seems like one needs to OR in the
pad conf value to the pinmux config constant to actually program this
correctly.

> +       imx6_uart_setup((void *)MX6_UART1_BASE_ADDR);
> +       pbl_set_putc(imx_uart_putc, (void *)MX6_UART1_BASE_ADDR);
> +
> +       pr_debug("\n");

Do you actually get the output from this?  I'm trying to add a new
imx6ul board and it seems like one needs a delay between the uart
setup and the uart actually working to output data.  Or perhaps this
is just my board.

> +static void noinline start_mba6ulx(void)
> +{
> +       setup_uart();

Why setup uart when LL_DEBUG is not enabled?  This dts should have
this working without any extra setup.

> +
> +       imx6ul_barebox_entry(__dtb_z_imx6ul_mba6ulx_start);
> +}
> +
> +ENTRY_FUNCTION(start_imx6ul_mba6ulx, r0, r1, r2)
> +{
> +
> +       imx6ul_cpu_lowlevel_init();
> +
> +       arm_setup_stack(0x00910000);
> +
> +       if (IS_ENABLED(CONFIG_DEBUG_LL)) {
> +               imx6_uart_setup_ll();

Don't you need the muxing and other code in setup_uart() for this to work?

> +               putc_ll('>');
> +       }
> +
> +       relocate_to_current_adr();
> +       setup_c();
> +       barrier();
> +
> +       start_mba6ulx();



More information about the barebox mailing list