From patchwork Tue Sep 12 19:01:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 112369 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp5602376qgf; Tue, 12 Sep 2017 12:01:56 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCUU3aPKYU2l5wXsJQg/DqIU4eMfFl3HdJfvRipNcnB5elXooTmDSLOtbjmT1X5yLdONQOW X-Received: by 10.80.140.219 with SMTP id r27mr3646582edr.72.1505242915967; Tue, 12 Sep 2017 12:01:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505242915; cv=none; d=google.com; s=arc-20160816; b=ilnmWFgdUasXYoVw9kYY9Z8w0N1EjEkZgX+o3fy1XQM4PncBc0px7THmocMZIjIKxs udRIb6EvelASvOawt5OkpbEtrvyHinCmGoBz/+bpUzUWQhNsHjod5loefsNFNiLPVNXb c9l04qa0Sf02kUk78cklAEYxQya9WHmPNYrWgjREODDvN9mQTpc9hPeGeZo8aTk2rS9i Xzt9DWACNI8pSh2gqH7sRa/43HaUNisuzxudYNy+kpEdYKvRR0eF3HbqZWCvf7Mrv2Bj qtop/CfVYB8ATHojG01+7LUnqxuZqxptMixW/XKvBA9k2iS3KfC8O2FqK2HRII3AgLYe CBBg== 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=m9qlOS0OXXD70C8ccGjgGi34UgnabdmV3PdQJQwnp60=; b=LI0Hu+3lVcI+vfhrL3p2s/DKhHSMgs9SPVAUoj2Bjz5PAL9G9UPNNIq0yPP59D0TRa m2FRQayYhgr+3KpxRD3vOplG2m3jwjW3tGQc7p1vWaOBajGFYICBN8cCApIYa3sQ4cYw XdYx2sPnc/Zj3/jZ9ExrK1QDvp0XKyP5fkpGX/x9T6s9LW6T7Wylp+dXml6ljJQguFVp IazVvCcEMVKsihYOwNnYFSfietFCm26ewPzVS1Vd+QDx7wNsn7OMTcldxUjlWkwnsgaX lsS8pum4ZPlFCUtwk/0hPdtd//41K1E9zrxL2MHNwvl80TGzVf+v9afDzvBHHcXJQoBv IzNQ== 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 z8si11774510edi.476.2017.09.12.12.01.54; Tue, 12 Sep 2017 12:01:55 -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 7CE71C22149; Tue, 12 Sep 2017 19:01:50 +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 1CFF4C21DAC; Tue, 12 Sep 2017 19:01:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D257BC21D78; Tue, 12 Sep 2017 19:01:46 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 8A1F5C21C40 for ; Tue, 12 Sep 2017 19:01:46 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 46A2420970; Tue, 12 Sep 2017 21:01:46 +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 147822091D; Tue, 12 Sep 2017 21:01:46 +0200 (CEST) From: Maxime Ripard To: Tom Rini , Jagan Teki Date: Tue, 12 Sep 2017 21:01:28 +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 v2 00/14] 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 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