Hi Maxime,
Hi,

This serie aims at fixing an issue we had to carry out of tree patches
for for a few years.

The issue is this: a significant number of Allwinner boards don't have
an Ethernet connection, while an Ethernet connection is pretty useful
for example during development to do some PXE/NFS boot.

However, we needed to have DM_ETH enabled for the boards that use our
Ethernet controller drivers that rely on it. It meant having to use
the newly introduced DM_ETH support in the usb_ether gadget, but our
musb peripheral wasn't converted to the device model, and therefore
not usable with it.

The other alternative was to use the old-style usb_ether driver, which
worked fine but were disabling the Ethernet controller driver.

Thus, none were good, upstreamable solution.

Fix this properly by adding support for the musb in peripheral mode in
the device model. While we're doing so, I also took the occasion to
move a number of configuration options to Kconfig, and rework the
dependencies between them to ease the selection of related options
while trying to avoid as much as possible the combinations that are
not valid.

This was tested on a Sinlinx SinA33 that is wired as a peripheral-only
mUSB.

Let me know what you think,

Thanks for your effort. I've ack'ed gadget relevant commits, so I think that this series should go through the sunxi tree.

Best regards,
Łukasz

Maxime

Changes from v1:
   - Rebased on v2017.09
   - Added some help on a number of options introduced
   - Added the various tags collected

Maxime Ripard (14):
   usb: gadget: Move USBNET_DEVADDR option out of g_dnl
   usb: gadget: Document USBNET_DEVADDR
   usb: gadget: Move USBNET_HOST_ADDR to Kconfig
   usb: gadget: Convert USB_ETHER to Kconfig
   usb: gadget: usb_ether: Move the interfaces to Kconfig
   usb: gadget: Make g_dnl USB settings common
   usb: gadget: usb_ether: Move settings to common
   sunxi: provide default USB gadget setup
   sunxi: imply USB_GADGET
   cmd: fastboot: Rework fastboot dependency
   musb: sunxi: switch to the device model
   sunxi: Register usb_ether
   sunxi: Imply USB_ETHER
   sunxi: sina33: Sync the device tree with the kernel

  arch/arm/Kconfig                                 |   4 +-
  arch/arm/dts/axp223.dtsi                         |  58 ++-
  arch/arm/dts/axp22x.dtsi                         |  10 +-
  arch/arm/dts/sun8i-a23-a33.dtsi                  | 446 ++++++---------
  arch/arm/dts/sun8i-a33-sinlinx-sina33.dts        |  43 +-
  arch/arm/dts/sun8i-a33.dtsi                      | 477 +++++++++++++---
  arch/arm/include/asm/arch-sunxi/usb_phy.h        |   7 +-
  board/samsung/common/gadget.c                    |   4 +-
  board/siemens/common/factoryset.c                |   4 +-
  board/sunxi/board.c                              |   3 +-
  cmd/fastboot/Kconfig                             |   4 +-
  configs/A13-OLinuXino_defconfig                  |   5 +-
  configs/A20-OLinuXino-Lime2-eMMC_defconfig       |   5 +-
  configs/A20-OLinuXino-Lime2_defconfig            |   5 +-
  configs/CHIP_defconfig                           |   5 +-
  configs/CHIP_pro_defconfig                       |   5 +-
  configs/Cubietruck_defconfig                     |   5 +-
  configs/Nintendo_NES_Classic_Edition_defconfig   |   5 +-
  configs/Sinlinx_SinA33_defconfig                 |   5 +-
  configs/am335x_baltos_defconfig                  |   8 +-
  configs/am335x_boneblack_defconfig               |  10 +-
  configs/am335x_boneblack_vboot_defconfig         |   9 +-
  configs/am335x_evm_defconfig                     |   9 +-
  configs/am335x_evm_nor_defconfig                 |   9 +-
  configs/am335x_evm_norboot_defconfig             |  10 +-
  configs/am335x_evm_spiboot_defconfig             |   9 +-
  configs/am335x_evm_usbspl_defconfig              |   9 +-
  configs/am335x_hs_evm_defconfig                  |   7 +-
  configs/am43xx_evm_defconfig                     |   6 +-
  configs/am43xx_evm_ethboot_defconfig             |   6 +-
  configs/am43xx_evm_qspiboot_defconfig            |   6 +-
  configs/am43xx_evm_usbhost_boot_defconfig        |   6 +-
  configs/am43xx_hs_evm_defconfig                  |   6 +-
  configs/am57xx_evm_defconfig                     |   8 +-
  configs/am57xx_evm_nodt_defconfig                |   9 +-
  configs/am57xx_hs_evm_defconfig                  |   8 +-
  configs/apalis-tk1_defconfig                     |   6 +-
  configs/apalis_imx6_defconfig                    |   6 +-
  configs/apalis_imx6_nospl_com_defconfig          |   6 +-
  configs/apalis_imx6_nospl_it_defconfig           |   6 +-
  configs/apalis_t30_defconfig                     |   6 +-
  configs/bcm11130_defconfig                       |   6 +-
  configs/bcm11130_nand_defconfig                  |   6 +-
  configs/bcm23550_w1d_defconfig                   |   9 +-
  configs/bcm28155_ap_defconfig                    |   9 +-
  configs/bcm28155_w1d_defconfig                   |   6 +-
  configs/beaver_defconfig                         |   6 +-
  configs/birdland_bav335a_defconfig               |   9 +-
  configs/birdland_bav335b_defconfig               |   9 +-
  configs/cei-tk1-som_defconfig                    |   6 +-
  configs/cgtqmx6eval_defconfig                    |   9 +-
  configs/chromebit_mickey_defconfig               |   7 +-
  configs/chromebook_jerry_defconfig               |   7 +-
  configs/chromebook_minnie_defconfig              |   7 +-
  configs/colibri_imx6_defconfig                   |   6 +-
  configs/colibri_imx6_nospl_defconfig             |   6 +-
  configs/colibri_imx7_defconfig                   |   6 +-
  configs/colibri_t20_defconfig                    |   6 +-
  configs/colibri_t30_defconfig                    |   6 +-
  configs/colibri_vf_defconfig                     |   6 +-
  configs/corvus_defconfig                         |   6 +-
  configs/dalmore_defconfig                        |   6 +-
  configs/dms-ba16-1g_defconfig                    |   6 +-
  configs/dms-ba16_defconfig                       |   6 +-
  configs/dra7xx_evm_defconfig                     |   8 +-
  configs/dra7xx_hs_evm_defconfig                  |   8 +-
  configs/draco_defconfig                          |   7 +-
  configs/e2220-1170_defconfig                     |   6 +-
  configs/edison_defconfig                         |   6 +-
  configs/etamin_defconfig                         |   7 +-
  configs/evb-rk3036_defconfig                     |   7 +-
  configs/evb-rk3229_defconfig                     |   7 +-
  configs/evb-rk3288_defconfig                     |   7 +-
  configs/evb-rk3328_defconfig                     |   6 +-
  configs/fennec-rk3288_defconfig                  |   7 +-
  configs/firefly-rk3288_defconfig                 |   7 +-
  configs/gwventana_emmc_defconfig                 |   8 +-
  configs/gwventana_gw5904_defconfig               |   8 +-
  configs/gwventana_nand_defconfig                 |   8 +-
  configs/jetson-tk1_defconfig                     |   6 +-
  configs/kc1_defconfig                            |   9 +-
  configs/kylin-rk3036_defconfig                   |   7 +-
  configs/ma5d4evk_defconfig                       |   7 +-
  configs/miqi-rk3288_defconfig                    |   7 +-
  configs/mx6qsabrelite_defconfig                  |  11 +-
  configs/mx6sabreauto_defconfig                   |   6 +-
  configs/mx6sabresd_defconfig                     |   6 +-
  configs/mx7dsabresd_defconfig                    |   6 +-
  configs/mx7dsabresd_secure_defconfig             |   6 +-
  configs/nitrogen6dl2g_defconfig                  |  11 +-
  configs/nitrogen6dl_defconfig                    |  11 +-
  configs/nitrogen6q2g_defconfig                   |  11 +-
  configs/nitrogen6q_defconfig                     |  11 +-
  configs/nitrogen6s1g_defconfig                   |  11 +-
  configs/nitrogen6s_defconfig                     |  11 +-
  configs/novena_defconfig                         |   2 +-
  configs/nyan-big_defconfig                       |   6 +-
  configs/odroid-xu3_defconfig                     |   6 +-
  configs/odroid_defconfig                         |   6 +-
  configs/omap3_beagle_defconfig                   |  10 +-
  configs/omap3_evm_defconfig                      |   7 +-
  configs/omap3_logic_defconfig                    |   9 +-
  configs/omap5_uevm_defconfig                     |   6 +-
  configs/opos6uldev_defconfig                     |   6 +-
  configs/origen_defconfig                         |   6 +-
  configs/p2371-0000_defconfig                     |   6 +-
  configs/p2371-2180_defconfig                     |   6 +-
  configs/p2571_defconfig                          |   6 +-
  configs/parrot_r16_defconfig                     |   5 +-
  configs/pcm051_rev1_defconfig                    |   1 +-
  configs/pcm051_rev3_defconfig                    |   1 +-
  configs/phycore-rk3288_defconfig                 |   7 +-
  configs/pico-imx6ul_defconfig                    |   6 +-
  configs/pico-imx7d_defconfig                     |   6 +-
  configs/popmetal-rk3288_defconfig                |   7 +-
  configs/pxm2_defconfig                           |   8 +-
  configs/rastaban_defconfig                       |   8 +-
  configs/rock2_defconfig                          |   7 +-
  configs/rut_defconfig                            |   7 +-
  configs/s5p_goni_defconfig                       |   6 +-
  configs/s5pc210_universal_defconfig              |   6 +-
  configs/sama5d2_ptc_nandflash_defconfig          |   2 +-
  configs/sama5d2_ptc_spiflash_defconfig           |   2 +-
  configs/sansa_fuze_plus_defconfig                |   2 +-
  configs/smartweb_defconfig                       |   6 +-
  configs/sniper_defconfig                         |   9 +-
  configs/socfpga_arria5_defconfig                 |   6 +-
  configs/socfpga_cyclone5_defconfig               |   6 +-
  configs/socfpga_de0_nano_soc_defconfig           |   6 +-
  configs/socfpga_de10_nano_defconfig              |   6 +-
  configs/socfpga_mcvevk_defconfig                 |   6 +-
  configs/socfpga_sockit_defconfig                 |   6 +-
  configs/socfpga_socrates_defconfig               |   6 +-
  configs/socfpga_vining_fpga_defconfig            |   6 +-
  configs/taurus_defconfig                         |   6 +-
  configs/tbs2910_defconfig                        |   6 +-
  configs/thuban_defconfig                         |   7 +-
  configs/tinker-rk3288_defconfig                  |   7 +-
  configs/topic_miami_defconfig                    |   6 +-
  configs/topic_miamilite_defconfig                |   6 +-
  configs/topic_miamiplus_defconfig                |   6 +-
  configs/trats2_defconfig                         |   6 +-
  configs/trats_defconfig                          |   6 +-
  configs/venice2_defconfig                        |   6 +-
  configs/vinco_defconfig                          |   2 +-
  configs/warp7_defconfig                          |   9 +-
  configs/warp7_secure_defconfig                   |   9 +-
  configs/warp_defconfig                           |   6 +-
  configs/xfi3_defconfig                           |   2 +-
  configs/xilinx_zynqmp_ep_defconfig               |   6 +-
  configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig |   6 +-
  configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig |   6 +-
  configs/xilinx_zynqmp_zcu102_revA_defconfig      |   6 +-
  configs/xilinx_zynqmp_zcu102_revB_defconfig      |   6 +-
  configs/zynq_microzed_defconfig                  |   6 +-
  configs/zynq_picozed_defconfig                   |   6 +-
  configs/zynq_z_turn_defconfig                    |   6 +-
  configs/zynq_zc702_defconfig                     |   6 +-
  configs/zynq_zc706_defconfig                     |   6 +-
  configs/zynq_zed_defconfig                       |   6 +-
  configs/zynq_zybo_defconfig                      |   6 +-
  doc/README.android-fastboot                      |   8 +-
  drivers/usb/gadget/Kconfig                       |  78 ++-
  drivers/usb/gadget/ether.c                       |  16 +-
  drivers/usb/gadget/g_dnl.c                       |  12 +-
  drivers/usb/musb-new/sunxi.c                     |  56 +--
  include/configs/am335x_evm.h                     |   6 +-
  include/configs/am3517_evm.h                     |   5 +-
  include/configs/am43xx_evm.h                     |   6 +-
  include/configs/baltos.h                         |   6 +-
  include/configs/gw_ventana.h                     |   2 +-
  include/configs/h2200.h                          |   2 +-
  include/configs/ma5d4evk.h                       |   3 +-
  include/configs/nitrogen6x.h                     |   2 +-
  include/configs/novena.h                         |   2 +-
  include/configs/odroid_xu3.h                     |   2 +-
  include/configs/omap3_beagle.h                   |   1 +-
  include/configs/omap3_evm.h                      |   1 +-
  include/configs/omap3_logic.h                    |   1 +-
  include/configs/pcm051.h                         |   5 +-
  include/configs/sama5d2_ptc.h                    |   3 +-
  include/configs/sansa_fuze_plus.h                |   2 +-
  include/configs/siemens-am33x-common.h           |   6 +-
  include/configs/tao3530.h                        |   2 +-
  include/configs/vinco.h                          |   3 +-
  include/configs/warp7.h                          |   4 +-
  include/configs/xfi3.h                           |   2 +-
  include/dt-bindings/clock/sun8i-a23-a33-ccu.h    | 127 ++++-
  include/dt-bindings/reset/sun8i-a23-a33-ccu.h    |  87 +++-
  scripts/config_whitelist.txt                     |   5 +-
  190 files changed, 1509 insertions(+), 999 deletions(-)
  create mode 100644 arch/arm/dts/axp223.dtsi
  create mode 100644 include/dt-bindings/clock/sun8i-a23-a33-ccu.h
  create mode 100644 include/dt-bindings/reset/sun8i-a23-a33-ccu.h

base-commit: c98ac3487e413c71e5d36322ef3324b21c6f60f9




--
Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to