From patchwork Fri Aug 10 21:51:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10563191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E7E0E1057 for ; Fri, 10 Aug 2018 21:53:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D799F2B0F0 for ; Fri, 10 Aug 2018 21:53:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C90522B191; Fri, 10 Aug 2018 21:53:21 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 74F392B0F0 for ; Fri, 10 Aug 2018 21:53:21 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=5pWVS6OWtJaNDEiwT1C9gzaM3Zvu2YoUA9CDv6XNp3E=; b=muhAFDxA9hUHMD bNn1Z8jIsUS87K6oyriZyH2rKPrfqv9or4jGMPot0st8Bn1bszQhKyTBdP47GUBs9TwZl7h9DLExy Kd9MPorBw0rSxgVUUZOLaelYvd3b5nPMZ1VxJ3ZoQ2OWgPNLrmA1vH3gMM9agovtl+sQ2I5IcpBT1 Cn/txt98/2NKk0njR7t8dosX62I4ZVbaoYdhKSgpUT3h87VGyy3S6nKA60DlIMkTpLdcX4aoOWfnm DMvlvPj7UOSJVn1INK0qt4s4iT96hNjx9Yx+UhZxcBlO5I16qrfXK17P/qYWn0eFWvvp3JpG/ilqW jVKnk5aKoEo4z+ICbBhw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1foFLM-0004QH-5Z; Fri, 10 Aug 2018 21:53:12 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1foFKd-0003Uh-HZ for linux-arm-kernel@lists.infradead.org; Fri, 10 Aug 2018 21:52:29 +0000 Received: by mail-pg1-x541.google.com with SMTP id f14-v6so4956839pgv.13 for ; Fri, 10 Aug 2018 14:52:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A59KG91HG7sB8r2YIt6FLFzdJGWUM4lD0M+IGFeOA04=; b=fLMGH6tbhkelo3cnhLFfFarS9blMlewrG6GhbverD/lG28tYnPMxprwjhZnZGYU6Co jdzfHl2yB8fhe2cekQbmTM5QLbg+IZOPNneRSFayw7LIBCgCF+G00k5JaOfo36pHXp/8 yaZnrpagGV+eYOzrn7jamwStnSKidQD0Aj2uE= 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:mime-version:content-transfer-encoding; bh=A59KG91HG7sB8r2YIt6FLFzdJGWUM4lD0M+IGFeOA04=; b=ZW0MDRkxxW8SQfBVJevlMZKdUurLC8lTptfgpS+jyxL2NFjpywBYsz6d/wYDF9PJVI G8lTLZloPSFLIdTm4A5NVXvIUVJxaK+/T/X2IQu2xkbhneJtIOi0Fw4FF5PVRKaW/Ddd qnEn8JWdOMtfvz5OeHono1xN3c6oX1ydDpvIoDzKCH0mAXuVa2p1/a/X/JsMcpIa4agO kLphDwapgVWXvzAq19PVgs05qOQixsqOcoZ+HGxDsDegzjgqzJNVSU9LOYdN9MRUoUo4 KLLcbwXKJlkJmW4pxPL/sOKTlpmzhqEJbtsM9F7lath1m+yRkfYcFUJN3ijLjlIRaEZ3 RBVw== X-Gm-Message-State: AOUpUlEsPlNryvPbk/4suoXgFxw9MaVWlDX7ZqBuLuDi0e6Ej+H7hvde gZr/FedD1nY90YHiSEmdQYqQUA== X-Google-Smtp-Source: AA+uWPx+uNzvTBxI7vBRQGpyEH9S/KHKSz8JuNkAZix4bWVGUXaX6wBuqayp+BmrLQMKMHyuIYCpkA== X-Received: by 2002:a63:fb07:: with SMTP id o7-v6mr8171281pgh.333.1533937936696; Fri, 10 Aug 2018 14:52:16 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id g11-v6sm25730102pgi.90.2018.08.10.14.52.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 14:52:15 -0700 (PDT) From: Douglas Anderson To: Andy Gross Subject: [PATCH 3/3] arm64: dts: qcom: sdm845-mtp: Add nodes for USB Date: Fri, 10 Aug 2018 14:51:50 -0700 Message-Id: <20180810215150.82490-4-dianders@chromium.org> X-Mailer: git-send-email 2.18.0.597.ga71716f1ad-goog In-Reply-To: <20180810215150.82490-1-dianders@chromium.org> References: <20180810215150.82490-1-dianders@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180810_145227_753115_E8EAF181 X-CRM114-Status: GOOD ( 15.28 ) 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: Mark Rutland , devicetree@vger.kernel.org, David Collins , David Brown , linux-arm-msm@vger.kernel.org, Will Deacon , Douglas Anderson , swboyd@chromium.org, Manu Gautam , Rob Herring , Bjorn Andersson , linux-arm-kernel@lists.infradead.org, Vivek Gautam , Catalin Marinas , tfiga@chromium.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org 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 Set the various nodes to "okay" and hook up the regulators. NOTE: For now the main USB port (the one that goes out the Type C connector) is forced to host. Eventually someone will need to get the Type C detection hooked up and get this all integrated with the PMI8998 PMIC. The reason for forcing to "host" in the meantime is that this will leave us with one "host" and one "peripheral" port. In order for host mode this to work, we assume that the bootloader left things configured enough for us. Apparently the magic for that is is to do these writes on pmi8998: - pm_comm_write_byte(2, 0x1153, 0x2C, 0); - pm_comm_write_byte(2, 0x1152, 0x07, 0); - pm_comm_write_byte(2, 0x1140, 0x00, 0); - pm_comm_write_byte(2, 0x1140, 0x01, 0); Signed-off-by: Douglas Anderson --- Changes in v2: None arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 61 +++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts index 839ef9125bf4..eb9400bf2cbf 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts @@ -480,6 +480,67 @@ status = "okay"; }; +&usb_1 { + status = "okay"; +}; + +&usb_1_dwc3 { + /* Until we have Type C hooked up we'll force this as host. */ + dr_mode = "host"; +}; + +&usb_1_hsphy { + status = "okay"; + + vdd-supply = <&vdda_usb1_ss_core>; + vdda-pll-supply = <&vdda_qusb_hs0_1p8>; + vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>; + + qcom,imp-res-offset-value = <8>; + qcom,hstx-trim-value = ; + qcom,preemphasis-level = ; + qcom,preemphasis-width = ; +}; + +&usb_1_qmpphy { + status = "okay"; + + vdda-phy-supply = <&vdda_usb1_ss_1p2>; + vdda-pll-supply = <&vdda_usb1_ss_core>; +}; + +&usb_2 { + status = "okay"; +}; + +&usb_2_dwc3 { + /* + * Though the USB block on SDM845 can support host, there's no vbus + * signal for this port on MTP. Thus (unless you have a non-compliant + * hub that works without vbus) the only sensible thing is to force + * peripheral mode. + */ + dr_mode = "peripheral"; +}; + +&usb_2_hsphy { + status = "okay"; + + vdd-supply = <&vdda_usb2_ss_core>; + vdda-pll-supply = <&vdda_qusb_hs0_1p8>; + vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>; + + qcom,imp-res-offset-value = <8>; + qcom,hstx-trim-value = ; +}; + +&usb_2_qmpphy { + status = "okay"; + + vdda-phy-supply = <&vdda_usb2_ss_1p2>; + vdda-pll-supply = <&vdda_usb2_ss_core>; +}; + /* PINCTRL - additions to nodes defined in sdm845.dtsi */ &qup_i2c10_default {