Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752705AbdGMWL3 (ORCPT ); Thu, 13 Jul 2017 18:11:29 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33238 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbdGMWL1 (ORCPT ); Thu, 13 Jul 2017 18:11:27 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 13071601EA 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 Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Clark Subject: [PATCH] arm64: dts: qcom: Force host mode for USB on apq8016-sbc Date: Thu, 13 Jul 2017 15:11:25 -0700 Message-Id: <20170713221125.16195-1-sboyd@codeaurora.org> X-Mailer: git-send-email 2.13.0.67.g10c78a162fa8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2804 Lines: 82 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 --- arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi | 1 + arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 14 ++++---------- 2 files changed, 5 insertions(+), 10 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..8f2decf84bbf 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi @@ -213,16 +213,18 @@ }; 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>; v3p3-supply = <&pm8916_l13>; - extcon = <&usb_id>; }; }; }; @@ -342,14 +344,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"; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project