Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- U-Boot-Amlogic
- Messages
Search
Re: [RFC v1 1/7] usb: onboard-hub: Add support for Genesys GL852G hub
On 09/05/2025 09:02, Anand Moon wrote:
Add support for the Genesys GL852G USB2.0 Hub on Odroid C1+What does that mean ? => dm tree |
Re: Odroid n2+ usb broken on reboot
Hi Wayne,
On Fri, 9 May 2025 at 01:25, Wayne Schroeder <raz@...> wrote: Can you test this series to see if this resolves the issue? Thanks -Anand _______________________________________________ |
[RFC v1 7/7] usb: onboard-hub: Add conditional compilation for I2C initialization
Add conditional compilation for the usb5744_i2c_init() function based
on the CONFIG_DM_I2C configuration, to avoid compilation failure. CC net/net-common.o AR net/built-in.o LDS u-boot.lds LD u-boot aarch64-linux-gnu-ld.bfd: common/usb_onboard_hub.o: in function `usb5744_i2c_init': /home/amoon/mainline/u-boot/amlogic/u-boot-maineline/common/usb_onboard_hub.c:74:(.text.usb5744_i2c_init+0xfc): undefined reference to `i2c_get_chip' aarch64-linux-gnu-ld.bfd: /home/amoon/mainline/u-boot/amlogic/u-boot-maineline/common/usb_onboard_hub.c:89:(.text.usb5744_i2c_init+0x1a0): undefined reference to `dm_i2c_write' aarch64-linux-gnu-ld.bfd: /home/amoon/mainline/u-boot/amlogic/u-boot-maineline/common/usb_onboard_hub.c:96:(.text.usb5744_i2c_init+0x1c8): undefined reference to `dm_i2c_write' aarch64-linux-gnu-ld.bfd: /home/amoon/mainline/u-boot/amlogic/u-boot-maineline/common/usb_onboard_hub.c:104:(.text.usb5744_i2c_init+0x1f0): undefined reference to `dm_i2c_write' Segmentation fault (core dumped) make: *** [Makefile:1824: u-boot] Error 139 make: *** Deleting file 'u-boot' Signed-off-by: Anand Moon <linux.amoon@...> --- common/usb_onboard_hub.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c index 1242513c631..92e3f3a92c9 100644 --- a/common/usb_onboard_hub.c +++ b/common/usb_onboard_hub.c @@ -30,6 +30,7 @@ struct onboard_hub_data { int (*init)(struct udevice *dev); }; +#if CONFIG_IS_ENABLED(DM_I2C) static int usb5744_i2c_init(struct udevice *dev) { /* @@ -109,6 +110,7 @@ static int usb5744_i2c_init(struct udevice *dev) return 0; } +#endif int usb_onboard_hub_reset(struct udevice *dev) { @@ -222,7 +224,9 @@ static const struct onboard_hub_data usb2514_data = { }; static const struct onboard_hub_data usb5744_data = { +#if CONFIG_IS_ENABLED(DM_I2C) .init = usb5744_i2c_init, +#endif .power_on_delay_us = 1000, .reset_us = 5, }; -- 2.49.0 |
[RFC v1 6/7] configs: odorid-c4: Enable Oboard HUB driver
Enable the onboard USB HUB driver to power the
Via labs VL817 USB 3.1 hub on the Odroid C4. Signed-off-by: Anand Moon <linux.amoon@...> --- configs/odroid-c4_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/odroid-c4_defconfig b/configs/odroid-c4_defconfig index cc3d7fc7484..3c5e53828a1 100644 --- a/configs/odroid-c4_defconfig +++ b/configs/odroid-c4_defconfig @@ -64,6 +64,7 @@ CONFIG_USB_DWC3=y # CONFIG_USB_DWC3_GADGET is not set CONFIG_USB_DWC3_MESON_G12A=y CONFIG_USB_KEYBOARD=y +CONFIG_USB_ONBOARD_HUB=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e CONFIG_USB_GADGET_PRODUCT_NUM=0xfada -- 2.49.0 |
[RFC v1 5/7] usb: onboard-hub: Add support for VL817 USB hub
Enable support for the Via labs VL817 USB2.0 and USB3.1 Hub
on the Odroid C4. The Via labs VL817 USB driver activates the hub reset signal, which toggles the GPIO. Signed-off-by: Anand Moon <linux.amoon@...> --- => dm tree simple_bus 11 [ + ] dwc3-meson-g12a | `-- usb@ffe09000 usb_gadget 0 [ ] dwc2-udc-otg | |-- usb@ff400000 usb 0 [ + ] xhci-dwc3 | `-- usb@ff500000 usb_hub 0 [ + ] usb_hub | `-- usb_hub usb_hub 1 [ + ] usb_hub | |-- usb_hub usb_mass_s 0 [ + ] usb_mass_storage | | `-- usb_mass_storage blk 2 [ + ] usb_storage_blk | | |-- usb_mass_storage.lun0 partition 0 [ + ] blk_partition | | | |-- usb_mass_storage.lun0:1 partition 1 [ + ] blk_partition | | | |-- usb_mass_storage.lun0:2 partition 2 [ + ] blk_partition | | | |-- usb_mass_storage.lun0:3 partition 3 [ + ] blk_partition | | | `-- usb_mass_storage.lun0:4 bootdev 3 [ ] usb_bootdev | | `-- usb_mass_storage.lun0.bootdev usb_hub 2 [ + ] usb_hub | `-- usb_hub --- common/usb_onboard_hub.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c index 3914e2f773d..1242513c631 100644 --- a/common/usb_onboard_hub.c +++ b/common/usb_onboard_hub.c @@ -235,6 +235,10 @@ static const struct onboard_hub_data genesys_gl853g_data = { .reset_us = 50, }; +static const struct onboard_hub_data vialab_vl817_data = { + .reset_us = 10, +}; + static const struct udevice_id usb_onboard_hub_ids[] = { /* Use generic usbVID,PID dt-bindings (usb-device.yaml) */ { .compatible = "usb424,2514", /* USB2514B USB 2.0 */ @@ -251,6 +255,12 @@ static const struct udevice_id usb_onboard_hub_ids[] = { }, { .compatible = "usb5e3,620", /* GL852G USB 3.1 */ .data = (ulong)&genesys_gl853g_data, + }, { + .compatible = "usb2109,817", /* Via labs VL817 2.0 */ + .data = (ulong)&vialab_vl817_data, + }, { + .compatible = "usb2109,2817", /* Via labs VL817 3.1 */ + .data = (ulong)&vialab_vl817_data, } }; -- 2.49.0 |
[RFC v1 4/7] configs: odorid-n2: Enable Oboard HUB driver
Enable the onboard USB HUB driver to power the
USB_HUB_GL853G-OHG on the Odroid N2 and Odroid N2-pluss. Signed-off-by: Anand Moon <linux.amoon@...> --- configs/odroid-n2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/odroid-n2_defconfig b/configs/odroid-n2_defconfig index a8cbaee3c96..1bf687c1e6d 100644 --- a/configs/odroid-n2_defconfig +++ b/configs/odroid-n2_defconfig @@ -64,6 +64,7 @@ CONFIG_USB_DWC3=y # CONFIG_USB_DWC3_GADGET is not set CONFIG_USB_DWC3_MESON_G12A=y CONFIG_USB_KEYBOARD=y +CONFIG_USB_ONBOARD_HUB=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e CONFIG_USB_GADGET_PRODUCT_NUM=0xfada -- 2.49.0 |
[RFC v1 3/7] usb: onboard-hub: Add support for Genesys GL853G
Enable support for the Genesys GL853G USB2.0 and USB3.1 Hub on
the Odroid N2 and N2-plus. The GL853G driver activates the hub reset signal, which toggles the GPIO. Signed-off-by: Anand Moon <linux.amoon@...> --- => dm tree simple_bus 11 [ + ] dwc3-meson-g12a | `-- usb@ffe09000 usb_gadget 0 [ ] dwc2-udc-otg | |-- usb@ff400000 usb 0 [ + ] xhci-dwc3 | `-- usb@ff500000 usb_hub 0 [ + ] usb_hub | `-- usb_hub usb_hub 1 [ + ] usb_hub | |-- usb_hub usb_mass_s 0 [ + ] usb_mass_storage | | `-- usb_mass_storage blk 2 [ + ] usb_storage_blk | | |-- usb_mass_storage.lun0 partition 0 [ + ] blk_partition | | | `-- usb_mass_storage.lun0:1 bootdev 3 [ ] usb_bootdev | | `-- usb_mass_storage.lun0.bootdev usb_hub 2 [ + ] usb_hub | `-- usb_hub clk 2 [ + ] fixed_clock |-- xtal-clk --- common/usb_onboard_hub.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c index 39bbc1aefa2..3914e2f773d 100644 --- a/common/usb_onboard_hub.c +++ b/common/usb_onboard_hub.c @@ -231,6 +231,10 @@ static const struct onboard_hub_data genesys_gl852g_data = { .reset_us = 50, }; +static const struct onboard_hub_data genesys_gl853g_data = { + .reset_us = 50, +}; + static const struct udevice_id usb_onboard_hub_ids[] = { /* Use generic usbVID,PID dt-bindings (usb-device.yaml) */ { .compatible = "usb424,2514", /* USB2514B USB 2.0 */ @@ -244,6 +248,9 @@ static const struct udevice_id usb_onboard_hub_ids[] = { }, { .compatible = "usb5e3,610", /* GL852G USB 2.0 */ .data = (ulong)&genesys_gl852g_data, + }, { + .compatible = "usb5e3,620", /* GL852G USB 3.1 */ + .data = (ulong)&genesys_gl853g_data, } }; -- 2.49.0 |
[RFC v1 2/7] configs: odorid-c2: Enable Onboard HUB driver
Enable the onboard USB HUB driver to power the
USB_HUB_GL852G-OHG on the Odroid C2. Signed-off-by: Anand Moon <linux.amoon@...> --- configs/odroid-c2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/odroid-c2_defconfig b/configs/odroid-c2_defconfig index bcaab46f8bc..f8a66a923c9 100644 --- a/configs/odroid-c2_defconfig +++ b/configs/odroid-c2_defconfig @@ -59,6 +59,7 @@ CONFIG_SYSINFO_SMBIOS=y CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_USB_KEYBOARD=y +CONFIG_USB_ONBOARD_HUB=y CONFIG_VIDEO=y # CONFIG_VIDEO_BPP8 is not set # CONFIG_VIDEO_BPP16 is not set -- 2.49.0 |
[RFC v1 1/7] usb: onboard-hub: Add support for Genesys GL852G hub
Add support for the Genesys GL852G USB2.0 Hub on Odroid C1+
and Odroid C2. The GL852G driver trigger hub reset signal which toggles the gpio. Signed-off-by: Anand Moon <linux.amoon@...> --- Still some issue with USB hub on Odroid C2 => dm tree vidconsole 0 [ + ] vidconsole0 | | `-- vpu@... display 0 [ ] meson_dw_hdmi | |-- hdmi-tx@c883a000 phy 0 [ + ] meson_gxbb_usb2_phy | |-- phy@c0000020 usb 0 [ + ] dwc2_usb | `-- usb@c9100000 usb_hub 0 [ + ] usb_hub | `-- usb_hub usb_hub 1 [ + ] usb_hub | `-- usb_hub regulator 0 [ + ] regulator_fixed |-- regulator-usb-pwrs --- common/usb_onboard_hub.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c index 7fe62b043e6..39bbc1aefa2 100644 --- a/common/usb_onboard_hub.c +++ b/common/usb_onboard_hub.c @@ -227,6 +227,10 @@ static const struct onboard_hub_data usb5744_data = { .reset_us = 5, }; +static const struct onboard_hub_data genesys_gl852g_data = { + .reset_us = 50, +}; + static const struct udevice_id usb_onboard_hub_ids[] = { /* Use generic usbVID,PID dt-bindings (usb-device.yaml) */ { .compatible = "usb424,2514", /* USB2514B USB 2.0 */ @@ -237,6 +241,9 @@ static const struct udevice_id usb_onboard_hub_ids[] = { }, { .compatible = "usb424,5744", /* USB5744 USB 3.0 */ .data = (ulong)&usb5744_data, + }, { + .compatible = "usb5e3,610", /* GL852G USB 2.0 */ + .data = (ulong)&genesys_gl852g_data, } }; -- 2.49.0 |
[RFC v1 0/7] common: usb_onboard_hub: Add support for Odroid onboard USB hub reset
Odroid C1+/C2/C4/N2/N2-plus devices have an onboard USB hub
controlled by a reset GPIO pin. Adds changes to the onboard USB hub driver to perform a proper reset of the USB hub. Added conditional compilation for I2C initialization based on CONFIG_DM_I2C for failed to compile. Thanks -Anand Anand Moon (7): usb: onboard-hub: Add support for Genesys GL852G hub configs: odorid-c2: Enable Onboard HUB driver usb: onboard-hub: Add support for Genesys GL853G configs: odorid-n2: Enable Oboard HUB driver usb: onboard-hub: Add support for VL817 USB hub configs: odorid-c4: Enable Oboard HUB driver usb: onboard-hub: Add conditional compilation for I2C initialization common/usb_onboard_hub.c | 28 ++++++++++++++++++++++++++++ configs/odroid-c2_defconfig | 1 + configs/odroid-c4_defconfig | 1 + configs/odroid-n2_defconfig | 1 + 4 files changed, 31 insertions(+) base-commit: 48db49b0977cc1c9c9abf82c0fb704238fcef4fd -- 2.49.0 |
Re: Odroid n2+ usb broken on reboot
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 loadingYou can send bytes via UART to abort boot, if you happen to have a UART adapter around. |
Re: [PATCH v2 12/22] amlogic: Include env.h to permit reading the environment
01/05/2025 04.04, Simon Glass via groups.io wrote:
This file reads from the environment but does not include the correctReviewed-by: Viacheslav Bocharov <adeep@...> |
Re: Odroid n2+ usb broken on reboot
Hi Wayne,
On Wed, 7 May 2025 at 17:31, Neil Armstrong via groups.io <neil.armstrong@...> wrote: I wanted to enable CONFIG_USB_ONBOARD_HUB on Odroid platform on u-boot I think this should help USB hub reset, I'll check this and let you know. Thanks -Anand |
Re: Odroid n2+ usb broken on reboot
Wayne Schroeder
It's hard for me to quantify if usb works in u-boot as I'm not loading
toggle quoted message
Show quoted text
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 get it to work, I have to do a usb reset and sleep some amount of time before doing distro boot. I picked 10 seconds. If you would like for me to do some scripted boot command additions before my extlinux to gather data, I can. Right now, what I have done is make a reboot hook in linux to touch a file on the boot partition that my bootcommand fatrms and if it was present, it resets usb and sleeps 10 seconds, so it's reliable to reboot remotely like that. Let me know how else I can gather any data. On Wed, May 7, 2025 at 7:01?AM <neil.armstrong@...> wrote:
|
Re: Odroid n2+ usb broken on reboot
On 05/05/2025 15:12, Wayne Schroeder wrote:
If I add the usb reset command, it works reliably at reboot, but itOK this means there's a dangling resource, Does USB always work within U-Boot or it breaks U-Boot and Linux in those cases ? On Mon, May 5, 2025 at 2:07?AM <neil.armstrong@...> wrote:I think it's a very long term issue, USB lacks a proper reset at probe on |
Re: Odroid n2+ usb broken on reboot
Wayne Schroeder
If I add the usb reset command, it works reliably at reboot, but it
toggle quoted message
Show quoted text
does not work on a fresh power-up with that change. On Mon, May 5, 2025 at 2:07?AM <neil.armstrong@...> wrote:
I think it's a very long term issue, USB lacks a proper reset at probe on |
Re: Odroid n2+ usb broken on reboot
Wayne Schroeder
It works at reboot with USB reset, but fails at a fresh power on now. I
toggle quoted message
Show quoted text
had to remove it unfortunately. On Mon, May 5, 2025, 2:07?AM <neil.armstrong@...> wrote:
Hi, |
Re: Odroid n2+ usb broken on reboot
Hi,
+CC [email protected] +CC linux-amlogic@... On 05/05/2025 00:34, Wayne Schroeder wrote: Hello. I am not sure if this is a bug, or even related to u-boot, but I amI think it's a very long term issue, USB lacks a proper reset at probe on warm reset, does USB still work from U-Boot after the reboot ? My apologies if this is not applicable to u-boot because it is a linuxI'm pretty sure there's driver callbacks we should implement to do the same here, I need to check. This has allowed me to reboot the system and successfully have access to |
[PATCH] net: mdio: mux-meson-gxl: set reversed bit when using internal phy
This bit is necessary to receive packets from the internal PHY.
Without this bit set, no activity occurs on the interface. Normally u-boot sets this bit, but if u-boot is compiled without net support, the interface will be up but without any activity. The vendor SDK sets this bit along with the PHY_ID bits. Ported from the Linux change at [1] from Da Xu merged in commit [2]. [1] [2] b23285e93bef ("net: mdio: mux-meson-gxl: set reversed bit when using internal phy") Suggested-by: Da Xue <da@...> Signed-off-by: Neil Armstrong <neil.armstrong@...> --- drivers/net/mdio_mux_meson_gxl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mdio_mux_meson_gxl.c b/drivers/net/mdio_mux_meson_gxl.c index 8ef3ae598b77fabf7b992900141d309708428b13..31898ed437e4857dd7027d311ab496be3e448d16 100644 --- a/drivers/net/mdio_mux_meson_gxl.c +++ b/drivers/net/mdio_mux_meson_gxl.c @@ -19,6 +19,7 @@ #define REG2_LEDACT GENMASK(23, 22) #define REG2_LEDLINK GENMASK(25, 24) #define REG2_DIV4SEL BIT(27) +#define REG2_REVERSED BIT(28) #define REG2_ADCBYPASS BIT(30) #define REG2_CLKINSEL BIT(31) #define ETH_REG3 0x4 @@ -66,7 +67,7 @@ static int meson_gxl_enable_internal_mdio(struct mdio_mux_meson_gxl_priv *priv) * The only constraint is that it must match the one in * drivers/net/phy/meson-gxl.c to properly match the PHY. */ - writel(FIELD_PREP(REG2_PHYID, EPHY_GXL_ID), + writel(REG2_REVERSED | FIELD_PREP(REG2_PHYID, EPHY_GXL_ID), priv->regs + ETH_REG2); /* Enable the internal phy */ --- base-commit: 98a898e58499c78245e4fe36ee404b1b1208e32b change-id: 20250502-u-boot-topic-mdio-mux-gxl-bit28-a6d03bf8e383 Best regards, -- Neil Armstrong <neil.armstrong@...> |
[PATCH v2 00/22] Deal with exfat versus byteorder
Simon Glass
Since exfat has its own byteorder functions we need to be careful about
including the normal U-Boot byteorder headers in code included by exfat. One chain for include/linux/byteorder/little_endian.h is like this: In file included from arch/sandbox/include/asm/byteorder.h:19, from arch/sandbox/include/asm/byteorder.h:19, from include/compiler.h:132, from include/env.h:12, from include/command.h:13, from include/net-common.h:7, from include/net.h:6, from include/efi.h:23, from include/blk.h:12, from include/part.h:9, from include/fs_internal.h:11, from fs/exfat/io.c:52: This series tidies things up so that efi.h can include net.h as required. Changes in v2: - Add patches for other files exposed by this change Simon Glass (22): net: Use a forward declaration for cmd_tbl in net-common.h congatec: Include env.h to permit reading the environment dhelectronics: Include env.h to permit reading the environment imx8ulp_evk: Include env.h to permit reading the environment venice: Include env.h to permit reading the environment phytec: Include env.h to permit reading the environment ronetix: Include env.h to permit reading the environment toradex: Include env.h to permit reading the environment advantech: Include env.h in imx8qm_dmsse20_a1 tegra: Include env.h to permit reading the environment synology: Include env.h to permit reading the environment amlogic: Include env.h to permit reading the environment freescale: Include env.h to permit reading the environment google: Include env.h to permit reading the environment liebherr: Include env.h to permit reading the environment technexion: Include env.h to permit reading the environment elf: Only use network environment-variables if net enabled net: Include byteorder in net6.h net: Include string.h in net-legacy.h net: Include env.h in pcap.c net: dc2114x: Include env.h to permit reading the environment net: Move env_get_ip() out of the header file arch/arm/mach-tegra/dt-setup.c | 1 + board/Synology/ds414/ds414.c | 1 + .../imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c | 1 + board/amlogic/jethub-j100/jethub-j100.c | 1 + board/congatec/cgtqmx8/cgtqmx8.c | 3 +- board/dhelectronics/common/dh_common.c | 1 + board/freescale/imx8ulp_evk/imx8ulp_evk.c | 1 + board/freescale/mx7dsabresd/mx7dsabresd.c | 1 + board/gateworks/venice/venice.c | 1 + board/google/chameleonv3/board.c | 2 + board/liebherr/xea/xea.c | 1 + .../common/phytec_som_detection_blocks.c | 1 + board/ronetix/imx8mq-cm/imx8mq_cm.c | 1 + board/technexion/pico-imx7d/pico-imx7d.c | 1 + board/toradex/colibri_imx7/colibri_imx7.c | 1 + board/toradex/verdin-imx8mm/verdin-imx8mm.c | 2 +- cmd/elf.c | 41 ++++++++++--------- drivers/net/dc2114x.c | 1 + include/net-common.h | 9 ++-- include/net-legacy.h | 1 + include/net6.h | 1 + net/net-common.c | 6 +++ net/pcap.c | 1 + 23 files changed, 53 insertions(+), 27 deletions(-) -- 2.43.0 base-commit: b5d6220dd2f4612912989f3c2b5a710f2248cb36 branch: fix-net2 |
to navigate to use esc to dismiss