All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Morrison <lmorrison@nautel.com>
To: "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"vz@mleia.com" <vz@mleia.com>
Subject: RE: spi-pl022 on lpc32xx
Date: Wed, 1 Nov 2023 16:20:00 +0000	[thread overview]
Message-ID: <YT3PR01MB6339A54903A0DFDD3D1C1598C7A7A@YT3PR01MB6339.CANPRD01.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <e060912b-0a7d-9fd5-edde-c27a8da55569 () mleia ! com>

Hello,

I'm with a team that's working on picking up this work where Trevor had to
leave it behind. We've worked around the issue up until now with a hack
using a userspace program that talks to the SPI peripheral registers through
/dev/mem. This won't be viable over the longer term, and we're revisiting
the task of getting the pl022 driver up and running.

On 3/30/22 10:56, Vladimir Zapolskiy wrote:
> years ago you've asked the same question, and the answer is that there is no
> pinctrl IP or controls on the SoC. This sounds weird, but that's how it goes.
>
> There are just a few multiplexed pins, and a pin function selection is done on
> basis of powering up a corresponding particular IP while keeping conflicting
> ones disabled. Such implicit pin multiplexing is inconvenient, but working,
> fortunately the SoC is simple to have such a model supported.
>
> The newer LPC18xx/LPC43xx has a pin control IP, and it makes everything
> much more transparent and comprehensible, but it's not transferable to
> LPC32xx.
>
I am really curious about that statement. The LPC32xx reference manual does
document a number of registers related to selecting which peripheral gets to
control which shared pins. It's described in chapter 33. Specifically, the
P_MUX_*, P0_MUX_*, P1_MUX_*, P2_MUX_*, and P3_MUX_* registers.

I note that these registers are defined in the kernel, but it doesn't appear
that any drivers are written to actually make use of them. I think this might
be part of the problem that Trevor was hitting when he was working on this.
Since neither the kernel nor U-Boot ever attempt to set the bits that would
need to be set in order to give the SCU control of these pins, and we know
that our stage1 bootloader was previously also leaving these bits cleared,
it's reasonable to conclude that the SCU wouldn't be able to access them.

We are working on a change that directly set the P*_MUX_* registers to
appropriate values for use by the SCU, but I think the more appropriate
approach would be to figure out a way to map these registers into a
proper pinmux driver.

> Best wishes,
> Vladimir

Regards,
Luke
This communication, including any attached documentation, is intended only for the person or entity to which it is addressed, and may contain confidential, personal, and/or privileged information. Any unauthorized disclosure, copying, or taking action on the contents is strictly prohibited. If you have received this message in error, please contact us immediately so we may correct our records. Please then delete or destroy the original transmission and any subsequent reply. Thank you.

       reply	other threads:[~2023-11-01 16:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e060912b-0a7d-9fd5-edde-c27a8da55569 () mleia ! com>
2023-11-01 16:20 ` Luke Morrison [this message]
2023-11-03 19:28   ` spi-pl022 on lpc32xx Luke Morrison
2022-03-28 19:01 Trevor Woerner
2022-03-28 20:09 ` Alexandre Belloni
2022-03-29 13:15   ` Trevor Woerner
2022-03-29 16:06 ` Linus Walleij
2022-03-29 18:31   ` Trevor Woerner
2022-03-29 21:33     ` Linus Walleij
2022-03-29 22:03       ` Trevor Woerner
2022-03-30 10:56       ` Vladimir Zapolskiy
2022-03-29 18:59 ` Vladimir Zapolskiy
2022-03-29 22:34   ` Trevor Woerner

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=YT3PR01MB6339A54903A0DFDD3D1C1598C7A7A@YT3PR01MB6339.CANPRD01.PROD.OUTLOOK.COM \
    --to=lmorrison@nautel.com \
    --cc=linux-spi@vger.kernel.org \
    --cc=vz@mleia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.