Thit patchset adds support for OTG Gadget mode on the GXL/GXM SoCs.
It adds a new API generic_phy_get_by_node() to get the PHY by it's node.
It enabled Gadget and USB Mass Storage for libretech-cc, libretech-ac,
khadas-vim, khadas-vim2, libretech-s905d-pc and libretech-s912-pc boards.
Neil Armstrong (10):
generic-phy: add generic_phy_get_by_node()
phy: meson-gxl-usb: add set_mode call to force switch to peripheral
mode
arm: meson-gx: add board_usb_init()/cleanup() for USB gadget
arm: dts: meson-gxl: Add USB Gadget nodes for U-Boot
configs: libretech-cc: Enable USB gadget with Mass Storage function
configs: libretech-ac: Enable USB gadget with Mass Storage function
configs: khadas-vim2: Enable USB gadget with Mass Storage function
configs: khadas-vim: Enable USB gadget with Mass Storage function
configs: libretech-s905d-pc: Enable USB gadget with Mass Storage
function
configs: libretech-s912-pc: Enable USB gadget with Mass Storage
function
.../meson-gxl-s905x-khadas-vim-u-boot.dtsi | 2 +-
.../meson-gxl-s905x-libretech-cc-u-boot.dtsi | 6 +-
arch/arm/dts/meson-gxl-s905x-p212-u-boot.dtsi | 2 +-
arch/arm/dts/meson-gxl-u-boot.dtsi | 23 ++++
arch/arm/include/asm/arch-meson/usb-gx.h | 16 +++
arch/arm/mach-meson/board-gx.c | 118 ++++++++++++++++++
configs/khadas-vim2_defconfig | 7 ++
configs/khadas-vim_defconfig | 7 ++
configs/libretech-ac_defconfig | 7 ++
configs/libretech-cc_defconfig | 7 ++
configs/libretech-s905d-pc_defconfig | 7 ++
configs/libretech-s912-pc_defconfig | 7 ++
drivers/phy/meson-gxl-usb2.c | 30 ++++-
drivers/phy/meson-gxl-usb3.c | 44 +++++--
drivers/phy/phy-uclass.c | 17 ++-
include/generic-phy.h | 27 ++++
16 files changed, 301 insertions(+), 26 deletions(-)
create mode 100644 arch/arm/dts/meson-gxl-u-boot.dtsi
create mode 100644 arch/arm/include/asm/arch-meson/usb-gx.h