From patchwork Fri Jul 14 02:20:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9839807 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 88F8C60212 for ; Fri, 14 Jul 2017 02:21:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E06F2876B for ; Fri, 14 Jul 2017 02:21:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72CAA28777; Fri, 14 Jul 2017 02:21:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F093128773 for ; Fri, 14 Jul 2017 02:21:13 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=35GAAOolt3o88oDsOiaN62irJrvHi7IeEPUwxRVXSsA=; b=lcc d2oFyP2sU2t6yu1oWDALBSH95fevOvD02rHmTjFUktjXasXEhPvypElpiawh8kqfYBoB8nOX5JEpA pUAALZAGu9vozTH97CcocWyXyy+q/sz4LmSTxlOfzVOwzktzsgFMrdrR1u6s8PTj9ZHBcLjwK80wW 8HbcW41sSWl67cDg+PrmgNC71cGCrtfegZmzhiK8ixDZGOFR9h7tT7MKM3/U0zndAv3l7UPyrJQzv LGwe0nRwAKAj0ngj7/+ToMVuOJ7g881UtBNQP+lDxyxdQS0Jm5tF1jgiH3c0PSvBpuobo5mYY0BG1 qeoVkOyra3sFD+Zo9T9AoPRl6UR1iOg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dVqEC-0004Hd-0E; Fri, 14 Jul 2017 02:21:12 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dVqE6-0004Er-Mn for linux-arm-kernel@lists.infradead.org; Fri, 14 Jul 2017 02:21:10 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 16B3E612CC; Fri, 14 Jul 2017 02:20:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1499998846; bh=SWoWxCtsyhrRAzZsFc4BoqYYmdTr4wsiO5lhy3uuXvM=; h=From:To:Cc:Subject:Date:From; b=SI4o0G/YOQDsgqKyK3JAsvci9CK6j7jJw/tD4FvQovrLaBHLFlsfffoRfmvSiDCot dQfWameaxsxhAi5R+K7ET0D0JB3dLOw7gqrBpTMNCrtqERqqjdT9SMcRmgTdqRoZVJ y5G5HMDNoDoU7UnhDI4I/Xf6wEd56s/jZwdVKa14= Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id BDD9260224; Fri, 14 Jul 2017 02:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1499998845; bh=SWoWxCtsyhrRAzZsFc4BoqYYmdTr4wsiO5lhy3uuXvM=; h=From:To:Cc:Subject:Date:From; b=YTrktJMO3moxiQpnbXcJlUB8eEq/TVSDAFGRmn7/zIt2K3ocQskcou7R/u3N/g5Pz n2KsleUILALECe5tyqt86uN/Z7KLZimX3OqKLUorOHkPBQwiC7lnl1Vpv1NupZoIJ5 b7KR9s+oFAlZryiOECu3MacZELqF6CYsB3ZE4aTg= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BDD9260224 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org From: Stephen Boyd To: Andy Gross Subject: [PATCH v2] arm64: dts: qcom: Force host mode for USB on apq8016-sbc Date: Thu, 13 Jul 2017 19:20:42 -0700 Message-Id: <20170714022042.13886-1-sboyd@codeaurora.org> X-Mailer: git-send-email 2.13.0.67.g10c78a162fa8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170713_192106_924177_92AED700 X-CRM114-Status: GOOD ( 17.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, Rob Clark , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Commit ed75d6a96905 ("arm64: dts: qcom: Collapse usb support into one node") breaks host mode support on apq8016-sbc boards. This is because the mux driver (tc7usb40mu) hasn't been merged. Without that driver, we can't toggle the GPIO going to the mux to route out the D+/D- lines to the USB hub that's on the board. One solution would be to totally revert this change, but that opens us up to other problems when two USB drivers are operating the same hardware block at the same time. Let's modify the DT so that the USB controller is always in host mode and connected to the hub so that things like USB keyboards and mouses work. This is the mode that most people prefer anyway with these devices. We also delete the usb-switch node because the binding was never accepted upstream. In the future, we can add muxing support and then update the DT to support both modes at runtime. Patches to support this are already on the mailing list. Fixes: ed75d6a96905 ("arm64: dts: qcom: Collapse usb support into one node") Reported-by: Rob Clark Signed-off-by: Stephen Boyd --- I noticed that I accidently removed the vbus notifier part of the phy. Without it, we'll change settings that shouldn't changed. The thing that we don't have is the ID pin on this board, not the vbus. That's the only difference from v1. arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi | 1 + arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 13 ++++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi index d94640812194..790b7775b901 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi @@ -17,6 +17,7 @@ function = PMIC_GPIO_FUNC_NORMAL; power-source = ; input-disable; + output-high; }; }; diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi index bd310ac1967a..bb9e29e6b164 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi @@ -213,11 +213,14 @@ }; usb@78d9000 { - extcon = <&usb_id>, <&usb_id>; + extcon = <&usb_id>; status = "okay"; adp-disable; hnp-disable; srp-disable; + dr_mode = "host"; + pinctrl-names = "default"; + pinctrl-0 = <&usb_sw_sel_pm>; ulpi { phy { v1p8-supply = <&pm8916_l7>; @@ -342,14 +345,6 @@ pinctrl-0 = <&usb_id_default>; }; - usb-switch { - compatible = "toshiba,tc7usb40mu"; - switch-gpios = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>; - extcon = <&usb_id>; - pinctrl-names = "default"; - pinctrl-0 = <&usb_sw_sel_pm>; - }; - hdmi-out { compatible = "hdmi-connector"; type = "a";