Odroid n2+ usb broken on reboot

Christian Hewitt christianshewitt at gmail.com
Mon May 12 02:35:13 PDT 2025


> On 12 May 2025, at 10:59 am, Anand Moon via groups.io <linux.amoon=gmail.com at groups.io> wrote:
> 
> Hi Wayne,
> 
> On Sun, 11 May 2025 at 01:51, Wayne Schroeder <raz at 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 at ffe05000: 0, mmc at ffe07000: 1
> Loading Environment from nowhere... OK
> In:    usbkbd,serial
> Out:   vidconsole,serial
> Err:   vidconsole,serial
> Board variant: n2-plus
> Net:   eth0: ethernet at ff3f0000
> 
> Hit any key to stop autoboot:  0
> starting USB...
> Register 3000140 NbrPorts 3
> Starting the controller
> USB XHCI 1.10
> Bus usb at 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 at 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 at gmail.com> wrote:
>>>> 
>>>> Hi Wayne,
>>>> 
>>>> On Fri, 9 May 2025 at 01:25, Wayne Schroeder <raz at 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 at 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 at 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 at groups.io
> Unsubscribe: https://groups.io/g/u-boot-amlogic/unsub [christianshewitt at gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-





More information about the linux-amlogic mailing list