mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
To: Trent Piepho <trent.piepho@igorinstitute.com>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH v2] ARM: imx: add support for TQMa6UL SoM on MBa6ulxl
Date: Mon, 07 Feb 2022 16:15:30 +0100	[thread overview]
Message-ID: <539a6e7c24765fd225c55833c87827873120378d.camel@pengutronix.de> (raw)
In-Reply-To: <CAMHeXxNHnqwoBx7w_Hchrp4ZAM9PPtrgu1q0A5k-YW-1-W31gw@mail.gmail.com>

Hi Trent,

On Thu, 2021-06-17 at 17:03 -0700, Trent Piepho wrote:
> On Thu, Jun 17, 2021 at 2:25 AM Rouven Czerwinski
> <r.czerwinski@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.

No, while imx_setup_pad can include the pad control, the mux defines
above do not include one and in this case the pad configuration is not
written (iomux-v3.h:137). So the imx_setup_pad above only touches the
mux configuration, but keeps the pad configuration as is.

> 
> > +       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.

Yes, on my board this adds a newline within the PBL console.

> 
> > +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.

Because this boards supports the PBL console and setup_uart is required
for the PBL console to work, since the PBL does not parse this
information from the DT.

> 
> > +
> > +       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?

No, conveniently the board uses the default configuration for UART one.
The muxing setup for the PBL console could be removed. Sascha, what do
you think?


-- 
Pengutronix e.K.           | Rouven Czerwinski          |
Steuerwalder Str. 21       | http://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-0   |


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


      reply	other threads:[~2022-02-07 15:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17  9:23 Rouven Czerwinski
2021-06-18  0:03 ` Trent Piepho
2022-02-07 15:15   ` Rouven Czerwinski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=539a6e7c24765fd225c55833c87827873120378d.camel@pengutronix.de \
    --to=r.czerwinski@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=trent.piepho@igorinstitute.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox