u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Daniel Wagenknecht <dwagenk@mailbox.org>
To: Andre Przywara <andre.przywara@arm.com>
Cc: u-boot@lists.denx.de, "Jagan Teki" <jagan@amarulasolutions.com>,
	"Samuel Holland" <samuel@sholland.org>,
	"Jernej Škrabec" <jernej.skrabec@gmail.com>
Subject: Re: [PATCH 1/1] sunxi: SPI: fix pinmuxing for Allwinner H6 SoCs
Date: Thu, 16 Dec 2021 20:38:39 +0100	[thread overview]
Message-ID: <395756d9-07c6-3051-6fb2-ca2da49776f8@mailbox.org> (raw)
In-Reply-To: <20211214235434.44dfbfe7@slackpad.fritz.box>

Hi Andre,

On 12/15/21 12:54 AM, Andre Przywara wrote:

> please don't just resend without saying why. If you messed up the mail,
> or forgot to CC: the list, then please put "RESEND" in the subject, and
> briefly say why you resend.

yes, this was a RESEND. The original submission was rejected by the
mailinglist because I wasn't a subscriber yet. You and the other CC'd
people got the mail multiple times without an obvious reason, sorry.

> If you have some spare cycles ;-) you can look whether we can fix up
> the DT when no eMMC is detected, and how to make this work so this not
> only applies to the kernel, but also to U-Boot itself.

I'm not sure if implementing some magic here would be good. I did
experiment with adapting the fdt in the u-boot shell, but if implemented
correctly this would probably live in the board initialization code,
right? I haven't looked for references of similar implementations in the
u-boot tree yet.
The sunxi mmc and spi driver both initialize the pins before starting a
transfer, correct? So activating both in the u-boot fdt would probably
work due to the single-threaded execution. But when that same fdt would
be passed to the linux kernel (as with UEFI on U-Boot) it would cause
conflict there.

Like I mentioned above: I wouldn't want to implement too much magic here.

> Please have
> a look at Samuel's pinctrl series to see if it fixes your problem, and
> possibly help reviewing this:
> https://lists.denx.de/pipermail/u-boot/2021-October/464248.html

That looks promising, [PATCH
22/23](https://lists.denx.de/pipermail/u-boot/2021-October/464267.html)
defines the correct pinctrl value for spi0:
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c
> index d80886269c..b3b5228214 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c
> +++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c
> @@ -15,6 +15,7 @@ static const struct sunxi_pinctrl_function sun50i_h6_pinctrl_functions[] = {
>  	{ "mmc0",	2 },	/* PF0-PF5 */
>  	{ "mmc1",	2 },	/* PG0-PG5 */
>  	{ "mmc2",	3 },	/* PC1-PC14 */
> +	{ "spi0",	4 },	/* PC0-PC7 */
>  #if IS_ENABLED(CONFIG_UART0_PORT_F)
>  	{ "uart0",	3 },	/* PF2-PF4 */
>  #else

I'll give it a try and provide feedback in that thread. If this get's
included my fix becomes obsolete.

>>  
>> -			if (IS_ENABLED(CONFIG_MACH_SUN50I))
>> +			if (IS_ENABLED(CONFIG_MACH_SUN50I) ||
>> +			    IS_ENABLED(CONFIG_MACH_SUN50I_H6))
> [...]
> So please put CONFIG_SUN50I_GEN_H6 in there.

I'll send a fixup anyhow!

Best Wishes
Daniel

  reply	other threads:[~2021-12-16 19:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-12 19:29 [PATCH 1/1] sunxi: SPI: fix pinmuxing for Allwinner H6 SoCs Daniel Wagenknecht
2021-12-14 23:54 ` Andre Przywara
2021-12-16 19:38   ` Daniel Wagenknecht [this message]
2021-12-16 19:42   ` [PATCH v2] " Daniel Wagenknecht
2021-12-14 20:53 [PATCH 0/1] fix SPI " Daniel Wagenknecht
2021-12-14 20:53 ` [PATCH 1/1] sunxi: SPI: fix " Daniel Wagenknecht

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=395756d9-07c6-3051-6fb2-ca2da49776f8@mailbox.org \
    --to=dwagenk@mailbox.org \
    --cc=andre.przywara@arm.com \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=samuel@sholland.org \
    --cc=u-boot@lists.denx.de \
    /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;
as well as URLs for NNTP newsgroup(s).