board: mediatek: pumpkin: add fastboot support
Subsystems (2)
cover board: mediatek: pumpkin: add fastboot support
This series adds USB/Fastboot support on MT8516 Pumpkin board.
Fabien Parent (5):
arm: dts: mt8516: add support for USB
arm: dts: mt8516-pumpkin: enable usb port
board: mediatek: pumpkin: initialize usb device
configs: pumpkin: enable USB gadget
configs: pumpkin: enable fastboot
arch/arm/dts/mt8516-pumpkin.dts | 10 ++++++++++ arch/arm/dts/mt8516.dtsi | 14 ++++++++++++++ board/mediatek/pumpkin/pumpkin.c | 17 +++++++++++++++++ configs/pumpkin_defconfig | 15 ++++++++++++++- 4 files changed, 55 insertions(+), 1 deletion(-)
Signature · 1 line
2.28.0
PATCH 1/5 arm: dts: mt8516: add support for USB
Add support for USB on mt8516 based SoC.
--- arch/arm/dts/mt8516.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/dts/mt8516.dtsi +14 -0
@@ -123,6 +123,20 @@ status = "disabled"; }; + usb0: usb at 11100000 { + compatible = "mediatek,mt8516-musb", + "mediatek,mt8518-musb"; + reg = <0x11100000 0x1000>; + interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "mc"; + clocks = <&topckgen CLK_TOP_USB_PHY48M>, + <&topckgen_cg CLK_TOP_USBIF>, + <&topckgen_cg CLK_TOP_USB>, + <&topckgen_cg CLK_TOP_USB_1P>; + clock-names = "usbpll", "usbmcu", "usb", "icusb"; + status = "disabled"; + }; + uart0: serial at 11005000 { compatible = "mediatek,hsuart"; reg = <0x11005000 0x1000>;
Signature · 1 line
2.28.0
PATCH 1/5 arm: dts: mt8516: add support for USB
Quoted 3 lines · Fabien Parent
Add support for USB on mt8516 based SoC.
Signed-off-by Fabien Parent <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210119/24fd1fe9/attachment.sig>
PATCH 2/5 arm: dts: mt8516-pumpkin: enable usb port
In reply to Fabien ParentEnable the USB port for MT8516 Pumpkin Board.
--- arch/arm/dts/mt8516-pumpkin.dts | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/dts/mt8516-pumpkin.dts +10 -0
@@ -108,3 +108,13 @@ &watchdog { status = "okay"; }; + +&usb0 { + status = "okay"; + dr_mode = "peripheral"; + + usb_con_c: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + }; +};
Signature · 1 line
2.28.0
PATCH 2/5 arm: dts: mt8516-pumpkin: enable usb port
Quoted 3 lines · Fabien Parent
Enable the USB port for MT8516 Pumpkin Board.
Signed-off-by Fabien Parent <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210119/9a711b80/attachment.sig>
PATCH 3/5 board: mediatek: pumpkin: initialize usb device
In reply to Fabien ParentInitialize USB device on pumpkin if it is enabled in the config.
--- board/mediatek/pumpkin/pumpkin.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
board/mediatek/pumpkin/pumpkin.c +17 -0
@@ -4,8 +4,25 @@*/ #include <common.h> +#include <dm.h> int board_init (void ) {return 0 ; } + +int board_late_init (void ) +{ +struct udevice *dev; +int ret; + +if (CONFIG_IS_ENABLED (USB_GADGET )) { + ret =uclass_get_device (UCLASS_USB_GADGET_GENERIC ,0 , &dev); +if (ret) { +pr_err ("%s: Cannot find USB device\n" , __func__); +return ret; + } + } + +return 0 ; +}
Signature · 1 line
2.28.0
PATCH 3/5 board: mediatek: pumpkin: initialize usb device
Quoted 3 lines · Fabien Parent
Initialize USB device on pumpkin if it is enabled in the config.
Signed-off-by Fabien Parent <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210119/2699bc05/attachment.sig>
PATCH 4/5 configs: pumpkin: enable USB gadget
In reply to Fabien ParentEnable USB gadget on pumpkin. This requires to also enable BOARD_LATE_INIT since the init is done in board_late_init function.
--- configs/pumpkin_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
configs/pumpkin_defconfig +8 -0
@@ -17,6 +17,7 @@ CONFIG_FIT=y # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_DEFAULT_FDT_FILE="mt8516-pumpkin" # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOARD_LATE_INIT=y CONFIG_HUSH_PARSER=y # CONFIG_CMD_BDI is not set # CONFIG_CMD_CONSOLE is not set
@@ -59,6 +60,13 @@ CONFIG_BAUDRATE=921600 CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_MTK_SERIAL=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_MUSB_GADGET=y +CONFIG_USB_MUSB_MT85XX=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_VENDOR_NUM=0x0e8d +CONFIG_USB_GADGET_PRODUCT_NUM=0x201c CONFIG_WDT=y CONFIG_WDT_MTK=y # CONFIG_EFI_LOADER is not set
Signature · 1 line
2.28.0
PATCH 4/5 configs: pumpkin: enable USB gadget
Quoted 4 lines · Fabien Parent
Enable USB gadget on pumpkin. This requires to also enable
BOARD_LATE_INITsince the init is done inboard_late_initfunction.Signed-off-by Fabien Parent <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210119/dbd4a856/attachment.sig>
PATCH 5/5 configs: pumpkin: enable fastboot
In reply to Fabien ParentEnable fastboot commands for mt8516 pumpkin board.
--- configs/pumpkin_defconfig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
configs/pumpkin_defconfig +6 -1
@@ -46,8 +46,13 @@ CONFIG_CMD_PART=y # CONFIG_CMD_MISC is not set CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set CONFIG_CLK=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x4d000000 +CONFIG_FASTBOOT_BUF_SIZE=0x4000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 +CONFIG_FASTBOOT_MMC_BOOT1_SUPPORT=y # CONFIG_INPUT is not set CONFIG_DM_MMC=y # CONFIG_MMC_QUIRKS is not set
Signature · 1 line
2.28.0
PATCH 5/5 configs: pumpkin: enable fastboot
Quoted 3 lines · Fabien Parent
Enable fastboot commands for mt8516 pumpkin board.
Signed-off-by Fabien Parent <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210119/7442a41a/attachment.sig>
Hi Fabien,
Quoted 10 lines · Fabien Parent
This series adds USB/Fastboot support on MT8516 Pumpkin board.
Fabien Parent (5):
arm: dts: mt8516: add support for USB
arm: dts: mt8516-pumpkin: enable usb port
board: mediatek: pumpkin: initialize usb device
configs: pumpkin: enable USB gadget
configs: pumpkin: enable fastboot
Quoted 5 lines
arch/arm/dts/mt8516-pumpkin.dts | 10 ++++++++++ arch/arm/dts/mt8516.dtsi | 14 ++++++++++++++ board/mediatek/pumpkin/pumpkin.c | 17 +++++++++++++++++ configs/pumpkin_defconfig | 15 ++++++++++++++- 4 files changed, 55 insertions(+), 1 deletion(-)
Do you have a link for this board, please? Also it would help to have some basic docs about it (building, installing U-Boot, basic specs)
Regards,
Simon
Hi Simon,
Quoted 14 lines · Simon Glass
Hi Fabien,
Quoted 10 lines · Fabien Parent
This series adds USB/Fastboot support on MT8516 Pumpkin board.
Fabien Parent (5):
arm: dts: mt8516: add support for USB
arm: dts: mt8516-pumpkin: enable usb port
board: mediatek: pumpkin: initialize usb device
configs: pumpkin: enable USB gadget
configs: pumpkin: enable fastboot
Quoted 7 lines
Quoted 5 lines
arch/arm/dts/mt8516-pumpkin.dts | 10 ++++++++++ arch/arm/dts/mt8516.dtsi | 14 ++++++++++++++ board/mediatek/pumpkin/pumpkin.c | 17 +++++++++++++++++ configs/pumpkin_defconfig | 15 ++++++++++++++- 4 files changed, 55 insertions(+), 1 deletion(-)Do you have a link for this board, please?
Sorry for the late reply. Here is a link to the board:
https://www.seeedstudio.com/Pumpkin-Evaluation-Kit-Smart-Audio-Edition-p-4263.html
Quoted 2 lines
Also it would help to have
some basic docs about it (building, installing U-Boot, basic specs)
Right now there is no public doc, but it will be released in the next couple of months alongside docs for the other pumpkin boards: mt8183 and mt8365.
Quoted 3 lines
Regards,
Simon