mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Christian Hewitt <christianshewitt@gmail.com>
To: u-boot-amlogic@groups.io, linux.amoon@gmail.com
Cc: Wayne Schroeder <raz@chewies.net>,
	Ferass El Hafidi <funderscore@postmarketos.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	u-boot@lists.denx.de,
	"linux-amlogic@lists.infradead.org"
	<linux-amlogic@lists.infradead.org>
Subject: Re: Odroid n2+ usb broken on reboot
Date: Mon, 12 May 2025 13:35:13 +0400	[thread overview]
Message-ID: <7BAB0A37-3DA8-4FC9-AFFE-7CAE6FA92367@gmail.com> (raw)
In-Reply-To: <CANAwSgRvtgsejhsj=TyRAYWdQRfGRigvw9+=HzcdxbDopoiFYw@mail.gmail.com>

> On 12 May 2025, at 10:59 am, Anand Moon via groups.io <linux.amoon=gmail.com@groups.io> wrote:
> 
> Hi Wayne,
> 
> On Sun, 11 May 2025 at 01:51, Wayne Schroeder <raz@chewies.net> wrote:
>> 
>> Applied patches to 2025.04 release (applied clean).  Made stock
>> defconfig for odroid n2, built, signed, installed.  The reboot issue
>> remains and usb ports are unavailable to linux kernel after reboot.
>> 
>> It is worth noting that linux does see some enumeration of devices
>> after a while, but even if it logs to the console about device
>> attachment, the devices don't actually function.  This was the same
>> behavior with the release version.
>> 
> Thanks for testing these patches.
> We need to modify the boot order to probe USB before MMC

Why? Most Amlogic boards boot from an mmc device (SD or internal flash
storage) not USB. It smells like a workaround not a fix, and I wonder
what the performance impact on boot will be?

Christian

> diff --git a/include/configs/meson64.h b/include/configs/meson64.h
> index f3275b37a51..3ace59880bd 100644
> --- a/include/configs/meson64.h
> +++ b/include/configs/meson64.h
> @@ -119,8 +119,8 @@
> #define BOOT_TARGET_DEVICES(func) \
>        func(ROMUSB, romusb, na)  \
>        func(USB_DFU, usbdfu, na)  \
> -       BOOT_TARGET_MMC(func) \
>        BOOT_TARGET_DEVICES_USB(func) \
> +       BOOT_TARGET_MMC(func) \
>        BOOT_TARGET_NVME(func) \
>        BOOT_TARGET_SCSI(func) \
>        BOOT_TARGET_PXE(func) \
> 
> Here is the boot sequence at my end.
> ------------------------
> U-Boot 2025.07-rc1-00223-g704a4d1fd804 (May 12 2025 - 12:15:29 +0530)
> odroid-n2/n2-plus
> 
> Model: Hardkernel ODROID-N2
> SoC:   Amlogic Meson G12B (S922X) Revision 29:c (40:2)
> DRAM:  1 GiB (total 3.8 GiB)
> Core:  402 devices, 30 uclasses, devicetree: separate
> MMC:   mmc@ffe05000: 0, mmc@ffe07000: 1
> Loading Environment from nowhere... OK
> In:    usbkbd,serial
> Out:   vidconsole,serial
> Err:   vidconsole,serial
> Board variant: n2-plus
> Net:   eth0: ethernet@ff3f0000
> 
> Hit any key to stop autoboot:  0
> starting USB...
> Register 3000140 NbrPorts 3
> Starting the controller
> USB XHCI 1.10
> Bus usb@ff500000: 4 USB Device(s) found
>       scanning usb for storage devices... 1 Storage Device(s) found
> 
> Device 0: Vendor: ASMT     Rev: 0    Prod: 2115
>            Type: Hard Disk
>            Capacity: 114473.4 MB = 111.7 GB (234441648 x 512)
> ... is now current device
> Scanning usb 0:1...
> Card did not respond to voltage select! : -110
> Cannot persist EFI variables without system partition
> Loading Boot0000 'mmc 1' failed
> Loading Boot0001 'usb 0' failed
> EFI boot manager: Cannot load any image
> Card did not respond to voltage select! : -110
> switch to partitions #0, OK
> mmc1(part 0) is current device
> Scanning mmc 1:1...
> Found /extlinux/extlinux.conf
> Retrieving file: /extlinux/extlinux.conf
> 1:      Manjaro ARM
> Retrieving file: /Image
> Retrieving file: /initramfs-linux.img
> append: initrd=/initramfs-linux.img console=ttyAML0,115200n8
> root=PARTUUID=0efc7c36-02 rootwait audit=0 clk_ignore_unused
> plymouth.ignore-serial-consoles
> 
>> Wayne
>> 
>> On Fri, May 9, 2025 at 10:01 AM Wayne Schroeder <raz@chewies.net> wrote:
>>> 
>>> Yes.  Will report back how it works on the n2+.
>>> 
>>> 
>>> On Fri, May 9, 2025 at 2:08 AM Anand Moon <linux.amoon@gmail.com> wrote:
>>>> 
>>>> Hi Wayne,
>>>> 
>>>> On Fri, 9 May 2025 at 01:25, Wayne Schroeder <raz@chewies.net> wrote:
>>>>> 
>>>>> I actually already have a working solution that I documented in my
>>>>> github repo (dubschro/odroid-n2).  All I do is set BOOTCOMMAND to
>>>>> check/delete a flag file on my boot partition and if it is found, then
>>>>> reset usb and sleep for 10 seconds.  I then have a systemd shutdown
>>>>> script only on reboot to touch that file.
>>>>> 
>>>>> CONFIG_BOOTCOMMAND="fatrm mmc 0:1 reboot && echo Resetting USB on
>>>>> reboot... && usb reset && sleep 10; run distro_bootcmd"
>>>>> 
>>>>> It is a hack, but... the system reliably reboots remotely now, and
>>>>> that's the important part for now.
>>>>> 
>>>>> Wayne
> I did not modify this at my end. However, this is not required with
> the above fix.
> 
> Thanks
> -Anand
>>>>> 
>>>>> On Thu, May 8, 2025 at 11:22 AM Ferass El Hafidi
>>>>> <funderscore@postmarketos.org> wrote:
>>>>>> 
>>>>>> On Wed May 7, 2025 at 1:03 PM UTC, Wayne Schroeder wrote:
>>>>>>> It's hard for me to quantify if usb works in u-boot as I'm not loading
>>>>>>> off of any usb storage devices.  It certainly never lets me use the
>>>>>>> keyboard to abort auto boot, and never has.  On reboot, to reliably
>>>>>> 
>>>>>> You can send bytes via UART to abort boot, if you happen to have a UART
>>>>>> adapter around.
>>>>> 
>>>> Can you test this series to see if this resolves the issue?
>>>> 
>>>> https://patchwork.ozlabs.org/project/uboot/list/?series=456088
>>>> 
>>>> Thanks
>>>> -Anand
>>>> 
>>>>> _______________________________________________
>>>>> linux-amlogic mailing list
>>>>> linux-amlogic@lists.infradead.org
>>>>> http://lists.infradead.org/mailman/listinfo/linux-amlogic
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#2696): https://groups.io/g/u-boot-amlogic/message/2696
> Mute This Topic: https://groups.io/mt/112625435/6407323
> Group Owner: u-boot-amlogic+owner@groups.io
> Unsubscribe: https://groups.io/g/u-boot-amlogic/unsub [christianshewitt@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2025-05-12 10:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEUiLubXaPGZsE6y_X6mBTD1ZK-2w82fbRD5z8+MKvDZtZKOtA@mail.gmail.com>
2025-05-05  7:07 ` neil.armstrong
2025-05-05 13:12   ` Wayne Schroeder
2025-05-07 12:01     ` neil.armstrong
2025-05-07 13:01       ` Anand Moon
2025-05-07 13:03       ` Wayne Schroeder
2025-05-08 16:21         ` Ferass El Hafidi
2025-05-08 19:54           ` Wayne Schroeder
2025-05-09  7:08             ` Anand Moon
2025-05-09 15:01               ` Wayne Schroeder
2025-05-10 20:21                 ` Wayne Schroeder
2025-05-12  6:59                   ` Anand Moon
2025-05-12  9:35                     ` Christian Hewitt [this message]
2025-05-12 10:04                       ` Anand Moon

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=7BAB0A37-3DA8-4FC9-AFFE-7CAE6FA92367@gmail.com \
    --to=christianshewitt@gmail.com \
    --cc=funderscore@postmarketos.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux.amoon@gmail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=raz@chewies.net \
    --cc=u-boot-amlogic@groups.io \
    --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

all inboxes | Powered by JetHome®