From patchwork Mon Feb 10 02:36:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1235595 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48G96Y5F2jz9sRX; Mon, 10 Feb 2020 13:37:24 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1j0ywo-0000JB-Dh; Mon, 10 Feb 2020 02:37:18 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1j0ywm-0000Is-7q for kernel-team@lists.ubuntu.com; Mon, 10 Feb 2020 02:37:16 +0000 Received: from [114.254.46.93] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1j0ywl-00083V-Cv for kernel-team@lists.ubuntu.com; Mon, 10 Feb 2020 02:37:16 +0000 From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][Eoan][linux-raspi2][PATCH 1/1] UBUNTU: [Config] raspi2: USB_DWC2_DUAL_ROLE=y Date: Mon, 10 Feb 2020 10:36:58 +0800 Message-Id: <20200210023658.12999-2-hui.wang@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200210023658.12999-1-hui.wang@canonical.com> References: <20200210023658.12999-1-hui.wang@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1861070 On the rpi4B board, the USB-C power supply port also works as an OTG port. And the driver dwc_otg is for this port by default, this driver can only work in the host mode, if users want to use the peripheral or OTG mode, users could add the line below in the config.txt: dtoverlay=dwc2,dr_mode=[host|otg|peripheral] Then the driver dwc2 will drive that port, but our original config set the dwc2 to host unconditionally in the kernel driver, now changing this setting, let dwc2 work in dual_role mode, after this change, that port could work in host|otg|peripheral mode according to the setting in the config.txt. BTW, so far in the RPI series boards, only PiZero and RPI4B boards have OTG port. Signed-off-by: Hui Wang Acked-by: Stefan Bader --- debian.raspi2/config/annotations | 7 +++++-- debian.raspi2/config/config.common.ubuntu | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debian.raspi2/config/annotations b/debian.raspi2/config/annotations index 5ef21cd41dfd..83095d85417a 100644 --- a/debian.raspi2/config/annotations +++ b/debian.raspi2/config/annotations @@ -7308,9 +7308,12 @@ CONFIG_USB_DWC2_DEBUG policy<{'amd64': 'n', 'arm64': ' CONFIG_USB_DWC2_TRACK_MISSED_SOFS policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'i386': 'n', 'ppc64el': 'n'}> # Menu: Device Drivers >> USB support >> Support for Host-side USB >> DesignWare USB2 DRD Core Support >> DWC2 Mode Selection -CONFIG_USB_DWC2_HOST policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'i386': 'y', 'ppc64el': 'y'}> +CONFIG_USB_DWC2_HOST policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'i386': 'n', 'ppc64el': 'n'}> CONFIG_USB_DWC2_PERIPHERAL policy<{'armhf': 'n'}> -CONFIG_USB_DWC2_DUAL_ROLE policy<{'armhf': 'n'}> +CONFIG_USB_DWC2_DUAL_ROLE policy<{'arm64': 'y', 'armhf': 'y'}> + +# +CONFIG_USB_DWC2_DUAL_ROLE note # Menu: Device Drivers >> USB support >> Support for Host-side USB >> DesignWare USB3 DRD Core Support CONFIG_USB_DWC3 policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'i386': 'm', 'ppc64el': 'm'}> diff --git a/debian.raspi2/config/config.common.ubuntu b/debian.raspi2/config/config.common.ubuntu index ec0807021ad8..1a175bff319d 100644 --- a/debian.raspi2/config/config.common.ubuntu +++ b/debian.raspi2/config/config.common.ubuntu @@ -7221,8 +7221,8 @@ CONFIG_USB_DSBR=m # CONFIG_USB_DUMMY_HCD is not set CONFIG_USB_DWC2=m # CONFIG_USB_DWC2_DEBUG is not set -# CONFIG_USB_DWC2_DUAL_ROLE is not set -CONFIG_USB_DWC2_HOST=y +CONFIG_USB_DWC2_DUAL_ROLE=y +# CONFIG_USB_DWC2_HOST is not set # CONFIG_USB_DWC2_PCI is not set # CONFIG_USB_DWC2_PERIPHERAL is not set # CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set