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: 9841723 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 D212C60381 for ; Fri, 14 Jul 2017 21:41:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C20C8287C0 for ; Fri, 14 Jul 2017 21:41:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B54BE287B3; Fri, 14 Jul 2017 21:41:32 +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 3449A287B3 for ; Fri, 14 Jul 2017 21:41:32 +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:References: In-Reply-To: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:List-Owner; bh=LAJgdq6ZTtZYV+wQKNf5p9MPLHHCEriTny7Bm6PVttM=; b=sNha6e4EVcFOaFMvt8gMICA4NX i19pkVI85PazbvjyfcMe+Ib6usn4Yf0wmDJivMS9vZAnX1rEN/wNehKsykGjcJdkAcH6PmMD/+B/4 TOjcJkerOI8mvC3aoaJMxIIPg6wl8o0t/739KsDsFrgex8wUKP9ycaZZdr2JBrNniZs/SzZY7b9Ok V5OD7+tCxh8xsIsxiKxVmLXjG8iDEv6UJbPvXrNSoIFBq4ppEIuhp2cwtc/M31+0WsjBcTX8VKElq vEEP9uyYE3UeX5nrzbME7kayZj8TreioLU5oM6G3VhrIqDfDFjBGnGCjZcNpVJz+dWx3p3MMVUq1g issAETyA==; 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 1dW8L2-0000bK-QU; Fri, 14 Jul 2017 21:41:28 +0000 Received: from mail-pg0-x231.google.com ([2607:f8b0:400e:c05::231]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dW8K8-00089d-6c for linux-arm-kernel@lists.infradead.org; Fri, 14 Jul 2017 21:40:33 +0000 Received: by mail-pg0-x231.google.com with SMTP id 123so744081pgd.3 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=tGSO5ytYB3i4chO41tGL1HRjiFyUX7VoGR0A/16GdhblUgpSlbY8BQP54Da4bRS0tO OPuNNkRG+5HtB4MUTJmn7XGCmmgAj2FYCN1BFdYMrBAFj62JgXwVoc2rCLP2AEGjy/xx R7fV81KxnPBeFnYW3Ab1A42DP4okHZ89clk+p/kj8U98dwa5TY5yKWkEBOaqfcwHgT+s 48eQse3nr16+NDZ6xYXv0q+5w7B7aX8GwMuGRsMYCaN1CrdM9WhjXJufZl2cXSjprlPH j1tQIbgjrEfTo0+jBGDFuucxFUEFD/jkKu4wBhR1DEwOzdl5fftM8N4iYQzDmJAHDXs8 UrWw== X-Gm-Message-State: AIVw111m98kCkbXO2HrKqIOm1rBSygSsE33ECn4LW6s15ESkEHzjUFhp WlN/5Bfvx+Wx0jfp 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170714_144032_270747_50F70746 X-CRM114-Status: GOOD ( 10.33 ) 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: Peter Chen , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Clark , Rob Herring , devicetree@vger.infradead.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 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(-) 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 {