From patchwork Fri Sep 8 17:34:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 112100 Delivered-To: patch@linaro.org Received: by 10.37.128.210 with SMTP id c18csp1949283ybm; Fri, 8 Sep 2017 10:34:43 -0700 (PDT) X-Google-Smtp-Source: ADKCNb5wuBUOtsuPtxarycGbAUMR1FU6Dn39nKg94d/WNzZPBkdu48/AH3xHKN3IXoU5c2FAvnOp X-Received: by 10.80.192.5 with SMTP id r5mr2728747edb.37.1504892083537; Fri, 08 Sep 2017 10:34:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504892083; cv=none; d=google.com; s=arc-20160816; b=p6S27wZ2fAaeaQjp8nqLOOq0kgyATLrVVXw3Fjf4muxjQGLXuGE/HS0CI9QV+igy2y XA5od1tAXoVarGuvYvczswqV321TYK0I8SWqrn4SyyWCvA45xFGb3uSBDDcZa6bXBoam 4FUVO7Ba6HJ2vgTSSWDZldXfnDGeHpJUoyAbW3FDCsecTkkZgE0hvLmYS6moc86ZtKIM pTgEI3KZ5rIZjqRPXJpJikY9VAM/kwnoCWs2XM1Hi3mZ3OeXRFNC/xB07uRDqFdZuzua CA8Jmyhlc+HO0NCcGY0LVVEEp0IIzSezFrq54y5vtq+ge4dYSi0wRPuR3thvY0h1d+Ts kCrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :arc-authentication-results; bh=7zM5LK47pECfS7xiKvGD3Y3KzYS7DSJg3DmhpyPJcEY=; b=NAUgbIV6s8eb9rArO3+sxS8mvhr+CAAq4BXMmJHinkYUAL9YOwLLXprI9IoCOtli1Z B5+q5K12eJsdlTBcLVjTf7UFXD2jiQC60fW9aAjmMHI0vq7knyxxb8MTGjKqX38jrZ6X 8uU0L/dxHrMUTjEqPl11d0uJhVgZ7Aw1oRvAtzgOMSSlYi6CCQWwyItl/KmIYt4TWSLM yzv6YrtC9xPvha4N388agBsl3Pz0vHIwfX19w6G9tyywPe5WC3EwmHhw59PaPSYkuh+I 3iA+hi7ixGKvxCPUfo6v+QKzWQ6XHkTsj2oLYrTgA+BY8Wagvt1ib74FMDMzaPZNIWLQ L5XQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id i2si2335475edc.528.2017.09.08.10.34.43; Fri, 08 Sep 2017 10:34:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id DD29CC21EFB; Fri, 8 Sep 2017 17:34:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 73B14C21CB0; Fri, 8 Sep 2017 17:34:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A0171C21D88; Fri, 8 Sep 2017 17:34:32 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id C85C5C21C71 for ; Fri, 8 Sep 2017 17:34:30 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 6AB4620DD0; Fri, 8 Sep 2017 19:34:28 +0200 (CEST) Received: from localhost (LFbn-TOU-1-209-191.w86-201.abo.wanadoo.fr [86.201.56.191]) by mail.free-electrons.com (Postfix) with ESMTPSA id 3B92920882; Fri, 8 Sep 2017 19:34:28 +0200 (CEST) From: Maxime Ripard To: Tom Rini , Jagan Teki Date: Fri, 8 Sep 2017 19:34:11 +0200 Message-Id: X-Mailer: git-send-email 2.13.5 Cc: Thomas Petazzoni , marex@denx.de, u-boot@lists.denx.de, Maxime Ripard Subject: [U-Boot] [PATCH 00/13] sunxi: convert musb to the device model and enable usb_ether X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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, Maxime Maxime Ripard (13): usb: gadget: Move USBNET_DEVADDR option out of g_dnl 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 | 43 +- 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 | 1 +- 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, 1474 insertions(+), 998 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: 0e88cdd17da393e7dd6040de6a3fda289c00a51e