From patchwork Fri Jul 14 21:40:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 107827 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1445195qge; Fri, 14 Jul 2017 14:40:21 -0700 (PDT) X-Received: by 10.98.94.5 with SMTP id s5mr7387576pfb.138.1500068421100; Fri, 14 Jul 2017 14:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500068421; cv=none; d=google.com; s=arc-20160816; b=YcFB0yOt9OksngyPBdX3qS3xHN8HF37+tzAGpEvTmjjPdGIHKPOmD9qayBXbgWy+B0 cFOh/Kd/Brq+Aj8f8IaVOXtJyhyEMdjT+RV4CQl1sDZ2HXMJ/LmSWzk6H1fp7Ac0yfgp v7b0h0t8irifwwkLpMYmoKGO/5TpMDV9v3V10YnYp70SdPrjeVZStv2Yik2EhFB0lgSK BYcCrrup452x5c+BgJFDgeh2n4X/texhk6KsGBvsAFQ94w6fjW54ZtYEjtkqZ616a6Kx nYNwwiF1lGbwe7Q1nlbIrJCCu+lKGpOl+dcv18CMzV5Zv/w7b1XCl1dVtY1cFMC2JnHP 4ABQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=G2tRaYqAPwpFciGzMfhXjur1S7x1qFLHJtLRM/9X2gs=; b=cJdlfU0ys3elgC2THQGmtd5j63IMAqasaa5IUQ2mgCw24dGN1VKOj/mr3r/1JHtbwi IWYp7auYk9WScrOjGUPeOJ6FyvtJ2K7xqriBJktp19eJABKvH4j6bBXdKQGxawkEUIyh Am7ZVK1TSMkTNTAv95Aw6ivPtlYquTSLYBw2Ldx/HoUfJiDlA5bH8JHJTGSpG39QHdxs LRgQ6u0TB4nk7SXCIxZGU1MF7ZJBffxRX47aegV7gQnlIwcprjonLkt/TTB8NbVUiGMt C5feq6PZlwLbpVrQBovdVDKzKf6bsubKC0pkNAwIQIs/GCCYzog9IPCvuk44Q5YZ2cEe YKEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=PwY6iGq4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si7694566plb.102.2017.07.14.14.40.20; Fri, 14 Jul 2017 14:40:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=PwY6iGq4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751223AbdGNVkR (ORCPT + 25 others); Fri, 14 Jul 2017 17:40:17 -0400 Received: from mail-pg0-f51.google.com ([74.125.83.51]:35758 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751069AbdGNVkL (ORCPT ); Fri, 14 Jul 2017 17:40:11 -0400 Received: by mail-pg0-f51.google.com with SMTP id j186so51130258pge.2 for ; Fri, 14 Jul 2017 14:40:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G2tRaYqAPwpFciGzMfhXjur1S7x1qFLHJtLRM/9X2gs=; b=PwY6iGq4t08PPMc8JIlAEnsESEKIhcygTx/WImbsB2H6z4LHUAD6TAVsNQwz9gYIzs U/QHpJmGrmww6xUxQh7EQum/IFN8tdbq7mjwqEzCdihyK56v0FckHcPuuNQFb+tL8lfM Z9v3nNwIRjffeuZAFrzeJjhIUGll5PFJMtMV4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G2tRaYqAPwpFciGzMfhXjur1S7x1qFLHJtLRM/9X2gs=; b=dwS2BH6rkUv+YQgplW/gj6RllEeBmfy6JSYULgIIp+1hUD0cS0BSFEsrZn7PeLkuYk /x5qFbRy/AmrOJyHJAORf3S1Mc02yB5Z4PKLMMLUkOdF7tvtd2mzcvB940+BXC3audBA mxaFJKmBgqIBsB+pFCL9ABfgICY+u5UCHFdnu+FbBVbKLD9RjOcayiaIhDvr/yh/gxkH HLn4sYzm0vXEj0Xi0ytK3vOHKEusc2bwBt/K0vYrYazAY7+0Z5J2y3ARhg4HEtW2RzrD wFZqrlY4MGkRyCEGfxRvQAcfnMhHkeCR415Worgh2ZBp6fYpbxBbS6L7mfvfhnVy+LZL afyg== X-Gm-Message-State: AIVw111lrOZ8JmLFGEkqrf52xM6CGhZNC01U4N4tJ/64ypnO3f2FBiye VLs2BRoYqlVEehC6 X-Received: by 10.84.193.101 with SMTP id e92mr17839013pld.209.1500068411410; Fri, 14 Jul 2017 14:40:11 -0700 (PDT) Received: from localhost.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id e13sm17795271pfh.96.2017.07.14.14.40.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Jul 2017 14:40:10 -0700 (PDT) From: Stephen Boyd To: Andy Gross Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.infradead.org, Rob Herring , Rob Clark , Peter Chen Subject: [PATCH v2 3/3] arm64: dts: qcom: Collapse usb support into one node Date: Fri, 14 Jul 2017 14:40:05 -0700 Message-Id: <20170714214005.14967-4-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.10.0.297.gf6727b0 In-Reply-To: <20170714214005.14967-1-stephen.boyd@linaro.org> References: <20170714214005.14967-1-stephen.boyd@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We currently have three device nodes for the same USB hardware block, as evident by the reuse of the same reg address multiple times. Now that the chipidea driver fully supports OTG with the MSM wrapper we can collapse all these nodes into one USB device node, reflecting the true nature of the hardware. Signed-off-by: Stephen Boyd --- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 38 ++++++++++--------- arch/arm64/boot/dts/qcom/msm8916.dtsi | 62 +++++++++++++++---------------- 2 files changed, 50 insertions(+), 50 deletions(-) -- 2.10.0.297.gf6727b0 diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi index f326f4fb4d72..494560a1a6ef 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi @@ -213,24 +213,20 @@ }; usb@78d9000 { - extcon = <&usb_id>, <&usb_id>; + extcon = <&usb_id>; status = "okay"; - }; - - ehci@78d9000 { - status = "okay"; - }; - - phy@78d9000 { - v1p8-supply = <&pm8916_l7>; - v3p3-supply = <&pm8916_l13>; - vddcx-supply = <&pm8916_s1>; - extcon = <&usb_id>, <&usb_id>; - dr_mode = "otg"; - status = "okay"; - switch-gpio = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&usb_sw_sel_pm>; + adp-disable; + hnp-disable; + srp-disable; + mux-controls = <&usb_switch>; + mux-control-names = "usb_switch"; + + ulpi { + phy { + v1p8-supply = <&pm8916_l7>; + v3p3-supply = <&pm8916_l13>; + }; + }; }; lpass@07708000 { @@ -348,6 +344,14 @@ pinctrl-0 = <&usb_id_default>; }; + usb_switch: usb-switch { + compatible = "gpio-mux"; + mux-gpios = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>; + #mux-control-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_sw_sel_pm>; + }; + hdmi-out { compatible = "hdmi-connector"; type = "a"; diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 17691abea608..039991f80831 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -546,44 +546,40 @@ status = "disabled"; }; - usb_dev: usb@78d9000 { + otg: usb@78d9000 { compatible = "qcom,ci-hdrc"; - reg = <0x78d9000 0x400>; - dr_mode = "peripheral"; - interrupts = ; - usb-phy = <&usb_otg>; - status = "disabled"; - }; - - usb_host: ehci@78d9000 { - compatible = "qcom,ehci-host"; - reg = <0x78d9000 0x400>; - interrupts = ; - usb-phy = <&usb_otg>; - status = "disabled"; - }; - - usb_otg: phy@78d9000 { - compatible = "qcom,usb-otg-snps"; - reg = <0x78d9000 0x400>; + reg = <0x78d9000 0x200>, + <0x78d9200 0x200>; interrupts = , ; - - qcom,vdd-levels = <500000 1000000 1320000>; - qcom,phy-init-sequence = <0x44 0x6B 0x24 0x13>; - dr_mode = "peripheral"; - qcom,otg-control = <2>; // PMIC - qcom,manual-pullup; - clocks = <&gcc GCC_USB_HS_AHB_CLK>, - <&gcc GCC_USB_HS_SYSTEM_CLK>, - <&gcc GCC_USB2A_PHY_SLEEP_CLK>; - clock-names = "iface", "core", "sleep"; - - resets = <&gcc GCC_USB2A_PHY_BCR>, - <&gcc GCC_USB_HS_BCR>; - reset-names = "phy", "link"; + <&gcc GCC_USB_HS_SYSTEM_CLK>; + clock-names = "iface", "core"; + assigned-clocks = <&gcc GCC_USB_HS_SYSTEM_CLK>; + assigned-clock-rates = <80000000>; + resets = <&gcc GCC_USB_HS_BCR>; + reset-names = "core"; + phy_type = "ulpi"; + dr_mode = "otg"; + ahb-burst-config = <0>; + phy-names = "usb-phy"; + phys = <&usb_hs_phy>; status = "disabled"; + #reset-cells = <1>; + + ulpi { + usb_hs_phy: phy { + compatible = "qcom,usb-hs-phy-msm8916", + "qcom,usb-hs-phy"; + #phy-cells = <0>; + clocks = <&xo_board>, <&gcc GCC_USB2A_PHY_SLEEP_CLK>; + clock-names = "ref", "sleep"; + resets = <&gcc GCC_USB2A_PHY_BCR>, <&otg 0>; + reset-names = "phy", "por"; + qcom,init-seq = /bits/ 8 <0x0 0x44 + 0x1 0x6b 0x2 0x24 0x3 0x13>; + }; + }; }; intc: interrupt-controller@b000000 {