Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2190036imm; Tue, 10 Jul 2018 15:05:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeer9YoiX7y2fxdOERJeNalNsxgBe4bMOAcAstilJQsL8dAvO1g8reBT1kQP0bGbDwc1mQF X-Received: by 2002:a17:902:8a95:: with SMTP id p21-v6mr26318749plo.91.1531260316988; Tue, 10 Jul 2018 15:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531260316; cv=none; d=google.com; s=arc-20160816; b=uckf5yfZMMarayOrC7UpZ1TyigmeGSCADoSzxL9rZlhpcH29FBw5BICVcXFb1i+Kp/ wgyXdcVhhKE59q8xqi0dxMfBOCxP5UQPt4jyJzszAYWYzJmnggljJCxzcTjnvohZjgqE b1Pjri5nK5nqEX4COHxSB4KTyV6jrv6G10RfEXpUiiTpXegYiDttH6EPTepGqxP4S4zo 3YHmf8YdJw94evmok6NUoq5cE0tjSYOv3hw7j3TMZwNqXD99RTFKlOEyqOYjofwQXmlN GjNxCqr2blyyyayWqTTAmyIivrpHq2xoOLPaLAcJNfpDNIF+CPTt+yBnYV1jpKVlOjs1 4ugA== 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=IushQ/ZLyaPZtkjLas+JFecM/MPWlXvMRXEQXvLDlAI=; b=x1ZoxgEgPpG6jEb+I/Es/jccLOiPlvvxMVJPl4tBLjjdLfI+5ay3RB7DTxLtE6TjB/ ByoIp7l9e45obQKDh5Eq3dg3Sp2clsLueSiz3Oud+8jo3XHRAzCe0rJZv3iSfhJURy/Z w8omtwLxVCtQsOLQQZBf/CRGdVgsabrW9DiN6PovKMQOixjrB1HQ1JCMjK8wbKkKWGXe VD/RavqrwVGgzjgxw15UqDxaNhXtM5VCPj1DSqkznRltO11CAEZhJg3ay9BGfzYBMTNa bRzBiioqFbSkq2U30hJccNUVetrXlTBJQZnTUbxVyEFAwwswTLr1ALHRxgYJB5d950YG DwsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bUrqhTzA; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7-v6si1684038pfj.245.2018.07.10.15.04.47; Tue, 10 Jul 2018 15:05:16 -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=@chromium.org header.s=google header.b=bUrqhTzA; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732384AbeGJWFD (ORCPT + 99 others); Tue, 10 Jul 2018 18:05:03 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:42787 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732361AbeGJWFD (ORCPT ); Tue, 10 Jul 2018 18:05:03 -0400 Received: by mail-pf0-f194.google.com with SMTP id l9-v6so5360937pff.9 for ; Tue, 10 Jul 2018 15:03:58 -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; bh=IushQ/ZLyaPZtkjLas+JFecM/MPWlXvMRXEQXvLDlAI=; b=bUrqhTzAvqZ7dVeroUjlYDwwqVlkPARw13Np9B85fcp2+GHFdkMbFAsU+rKZjhVdVF 4WjfOtaYGqKu5i/KNO3BWENXBdRBbikDvHl7J3B0Pah4c1Gp9gVbtXo8TpOCYN1yek8Z 9Kfh0QNlZ1UwRN95RyGKUdq5kKPmaFUAkUT0E= 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=IushQ/ZLyaPZtkjLas+JFecM/MPWlXvMRXEQXvLDlAI=; b=qi2iWtL/iyZqd2ueeafBpM4tMs80VnRQ1LwVx3N16DQU8VwTOLkSndSMOBRCoDp+t/ eeu7sOYrVqaUMYdf5gJZeg63C53CjFhdhDXS5Mj5+HNn/Mw/oNXCZ674x6cJNHasMn2x AmOstRvuAIVaFBE787vyz61qmuJgMX1vOGyCmMZurs2juozIe1und5UoijayHMPhWssV av7v6fqB0eG9XLyqQpbPYI0zPXkAiF3gBqLIWCbcbKeRGP01EgrhYb6IHq/7Gt+/8YPt 05CafQDxznxf6oasJZFOk1N+illXaN5dBBmdJZ3JGUC8laJzO8nKF6vo3AsKwoWBbIGg dKkQ== X-Gm-Message-State: APt69E2P/Ja8g3mV6EbyMuMhxzki0WMPsSMGpCDQa32D7IvuYVGuelzV v4SxgROq/jvhtGkLZsdWQWFmHg== X-Received: by 2002:a63:6d8b:: with SMTP id i133-v6mr24766612pgc.215.1531260238057; Tue, 10 Jul 2018 15:03:58 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:0:1000:1501:38e4:86fe:ec0c:4007]) by smtp.gmail.com with ESMTPSA id y69-v6sm34939756pfd.36.2018.07.10.15.03.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jul 2018 15:03:57 -0700 (PDT) From: Douglas Anderson To: Andy Gross Cc: Bjorn Andersson , swboyd@chromium.org, tfiga@chromium.org, Manu Gautam , David Collins , Vivek Gautam , Douglas Anderson , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , David Brown , Will Deacon , Mark Rutland , linux-soc@vger.kernel.org, Catalin Marinas , linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] arm64: dts: qcom: sdm845-mtp: Add nodes for USB Date: Tue, 10 Jul 2018 15:02:02 -0700 Message-Id: <20180710220202.116404-4-dianders@chromium.org> X-Mailer: git-send-email 2.18.0.203.gfac676dfb9-goog In-Reply-To: <20180710220202.116404-1-dianders@chromium.org> References: <20180710220202.116404-1-dianders@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 1db4b9735e70..4e14f5f5c2f7 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts @@ -481,6 +481,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 { -- 2.18.0.203.gfac676dfb9-goog