]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: amlogic: vim3: fix phy-names property setup
authorArtem Lapkin <email2tema@gmail.com>
Tue, 13 Jul 2021 06:48:47 +0000 (14:48 +0800)
committerNeil Armstrong <narmstrong@baylibre.com>
Tue, 27 Jul 2021 08:29:31 +0000 (10:29 +0200)
phy-names was improperly implemented resulting in an inoperable USB-OTG
port.

- phy-names = "usb2-phy0\0\0usb2-phy1\0";
+ phy-names = "usb2-phy0\0usb2-phy1";

Signed-off-by: Artem Lapkin <art@khadas.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
board/amlogic/vim3/vim3.c

index 71aaa0d8041c5dfde3ef49e2e0b8f270fd086e05..18ef146218f916e5d1efe6163e460aada31da263 100644 (file)
@@ -104,8 +104,8 @@ int meson_ft_board_setup(void *blob, struct bd_info *bd)
                }
 
                /* Update PHY names (mandatory to disable USB3.0) */
-               len = strlcpy(data, "usb2-phy0", 32) + 1;
-               len += strlcpy(&data[len], "usb2-phy1", 32 - len) + 1;
+               len = strlcpy(data, "usb2-phy0", 32);
+               len += strlcpy(&data[len], "usb2-phy1", 32 - len);
                ret = fdt_setprop(blob, node, "phy-names", data, len);
                if (ret < 0) {
                        printf("vim3: failed to update usb phy names property (%d)\n", ret);