From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7983DC43613 for ; Mon, 24 Jun 2019 13:03:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4CE0F2063F for ; Mon, 24 Jun 2019 13:03:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AKm8/MSx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CE0F2063F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csie.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3b68b2SdHqugTR4/FOqylntffnOCyZzp21o1KUv0OtI=; b=AKm8/MSx0xA2IW BplaNbQW8b1FcbmTump0tOTKEIC52BVJIAixNW2a/GNAvMlbJOddQ84yAUf60J7PEKajqhpBnNmKD SOKXmKR33NvzzlsKQA+1YLkzvmTxJTOp++1sk4Y05+iKDJmxCRs8OqBpHMx2fprgpyANqOKChhPt6 YddnHyGgusBV4gFr4TgqYIzZS8UJOW2Earr3xHBjFMBf3h/vU2DKIegeBef82n8wVkdlohGIObaEK tks8urY7mzoFQbVoChnred2TjCm+ylDjvPOcRO5Akahu7H9CXfYQl/Q/7ubeUeX3GDtXyR1FItRgs 44haMPLxKfvhYbin5A4w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hfOdF-0002lI-SU; Mon, 24 Jun 2019 13:03:37 +0000 Received: from mail-ed1-f66.google.com ([209.85.208.66]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hfOdC-0002jy-FC for linux-arm-kernel@lists.infradead.org; Mon, 24 Jun 2019 13:03:35 +0000 Received: by mail-ed1-f66.google.com with SMTP id s49so21732341edb.1 for ; Mon, 24 Jun 2019 06:03:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sK9KCYx7Y79q1UCICxqVkwuoIa7WisAwW4VdXFnFOXM=; b=PRyBDWp0c3v9PPwnScKy5RHCWwSmd/Bl3J8QX+6kKmuDJEbK+IpuJIISG4clH+rzzt ffCQ3inJvEq4M+mBl8xNsWGMYhCd/mNv9LygftqpCEPZ17WDcbEVGSCi2Q405RZs79Th t0FsTJJwuRkUEvfNxaa9+LADgbVrLIlCbP2wwr/roGELRPIMNRybzR0JOmLJKrsNI++m PLL0KerJKWn7SuCflJjDQ58nWwLoQiDvdWuZLIAeyz5xCvBBk83o9HnJlTY+/tcIouGG V3QH0UUCFbiexn7RfNxDISxVsRyZZYjQmH3rjca8xU66CZnM0ua9LMHneIaV07afdT+Q qQ6w== X-Gm-Message-State: APjAAAXyxibYnM76qFzL2YillRAXwTv7lUws/Db12yF/Nfa/r53a61T+ xn6moGd0mnDD1DLf2cpuVv6XWeg32L0= X-Google-Smtp-Source: APXvYqw66BQKpN1Fv5cQ8mcaKPpv0q2W/FkoEbQRehJOJyQu688lsnZCQ6UfwQ+xtHhSgloHpv39Ow== X-Received: by 2002:a50:993c:: with SMTP id k57mr21184061edb.294.1561381409477; Mon, 24 Jun 2019 06:03:29 -0700 (PDT) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com. [209.85.221.48]) by smtp.gmail.com with ESMTPSA id k20sm1727528ede.66.2019.06.24.06.03.29 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 06:03:29 -0700 (PDT) Received: by mail-wr1-f48.google.com with SMTP id f9so13792887wre.12 for ; Mon, 24 Jun 2019 06:03:29 -0700 (PDT) X-Received: by 2002:a05:6000:114b:: with SMTP id d11mr42808528wrx.167.1561381408587; Mon, 24 Jun 2019 06:03:28 -0700 (PDT) MIME-Version: 1.0 References: <20190620010127.12071-1-andre.przywara@arm.com> <20190624135806.7bc78378@donnerap.cambridge.arm.com> In-Reply-To: <20190624135806.7bc78378@donnerap.cambridge.arm.com> From: Chen-Yu Tsai Date: Mon, 24 Jun 2019 21:03:17 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: dts: allwinner: properly connect USB PHY to port 0 To: Andre Przywara X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190624_060334_511671_24ED03C8 X-CRM114-Status: GOOD ( 24.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree , Rob Herring , Maxime Ripard , linux-sunxi , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 24, 2019 at 8:58 PM Andre Przywara wrote: > > On Mon, 24 Jun 2019 16:25:47 +0800 > Chen-Yu Tsai wrote: > > Hi, > > > On Thu, Jun 20, 2019 at 9:02 AM Andre Przywara wrote: > > > > > > In recent Allwinner SoCs the first USB host controller (HCI0) shares > > > the first PHY with the MUSB controller. Probably to make this sharing > > > work, we were avoiding to declare this in the DT. This has two > > > shortcomings: > > > - U-Boot (which uses the same .dts) cannot use this port without a PHY > > > linked, so we were loosing one USB port there. > > > - It requires the MUSB driver to be enabled and loaded, although we > > > don't actually use it. > > > > > > For those (64-bit) boards which use an USB-A socket for HCI0/MUSB, add > > > a "phys" property pointing to the USB PHY 0. > > > > > > This makes it work in U-Boot, also improves compatiblity when no MUSB > > > driver is loaded (for instance in distribution installers). > > > > > > Signed-off-by: Andre Przywara > > > --- > > > Hi, > > > > > > I have the feeling this belongs into the .dtsi, but cant't tell for sure > > > how this interacts with the MUSB driver. If need be, we can always pull > > > this up later, I guess. > > > > Have you tried if gadget mode and switching between gadget/host mode on > > an otg port still works? AFAICT that would be the main thing to worry > > about. > > I briefly tried gadget mode on a BPi-M64, and that still seemed to work, > but I couldn't switch it to host mode. IIRC that didn't even work without > this patch, but I didn't find the time to investigate yet. > > Is it supposed to switch automatically when the ID pin changes state? Do > you know a board/kernel combination which is known to work? Yes it's supposed to switch automatically when you insert or remove the OTG host mode cable. I think it worked during the last release cycle while I was adding support for VBUS polling. I'll do some tests on the current sunxi-next tomorrow and let you know. ChenYu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel