From nobody Mon Nov 25 02:36:23 2024 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93CC51C7B68; Wed, 30 Oct 2024 18:22:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730312525; cv=none; b=AfY8WyzO/6wZY/F2e1ZTkxn3pK8Ija+ZDGSVBrDHdAnl9wvd6v7PbfboiXjnUR0Ur9gjU/nhImEhavrWaoMjaf+0E8MischNqIuoeZVpC0vGqCB5gw9MM5B3SPJjyyOc7D7nE7EtWm0UgLh/4Q2Vx0VSuqYKvIQ+KBSBeHLka/Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730312525; c=relaxed/simple; bh=r3Pn7i/2ydcwsFF9NdbJfG1QjGwV3zk0jWvh9EKgtYs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rn2vukszGfG/4vXCvukwVUAGWG9eHgmdCQSc44Bi3UjHR+Ogtv2ihScbrXHnhuGydh31lIkax0F5qrmcp6jDQvWV+Kgt8jcyzaemRN8e7SU14Wy6HjegHdFOtjQiiEwiUt8D0SylICElFrXgWcDS/K6Yxj+rP2hNZlKMYJCOjeE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gGJHVSPP; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gGJHVSPP" Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a9acafdb745so25791266b.0; Wed, 30 Oct 2024 11:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730312521; x=1730917321; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XpV+8ASolFfSxpBtygT6FdU6yWA+qcVKoRSCRnzKFQw=; b=gGJHVSPPZSROJWJw4t3FDm1fjSZ8LGGvjmgd4TyKn44NEGHIks9JzqiDKONMrtiGtz zWugD2qKJ0LgVyoj0flXeU4+npO4Rkun7cC5i1hHNfAyY8mkqqtPnysw6SV+KnUMLv6C LgPnHwQojHBRunlW13xoOWm4zGnv7CfCbyO4ZRBd4aH0MvuOJXGStr3C9BdR85mVSbw7 fLSPQWVHe3edwhv0Rzz0LUozPU1if02gjVZ/AIUo4gqHexfgmg3YoqwL/Pp2NtNZhENw ktuOuC5pedK6UkjC9hR8etQ60pUZs/IFNTryZkNEDYndJBHvl/YctZljZ3JjAQZyaqzR 6uig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730312521; x=1730917321; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XpV+8ASolFfSxpBtygT6FdU6yWA+qcVKoRSCRnzKFQw=; b=K6/DMddEcoTbgsPDpyoMnbY5klsXZ4WMq18C645CRfTcCiCKocEj1xcqHkF6wndqwN /s7FCjc9D6k/6hvfVVqhBzxZte2uUl0HUoDMIsAFaSN3cXYowErVjf9BJ97SlvmEIvjK ObBbHcDRJjrl/MZCA/7BCNCXIqrr1SAQNwINSLt21Ewq5csW/hJn+qhl86l9UvmQ/2sN bjlo6yp56XYz0P/G9L5V9gNuDa0E8w+PSEEL+wZ7lM30sjFbd0/Lv4HVNR+WvlkyAu6Y +O+lo+c/Yg2H/O0caR4eQ9upvVIRmC+yEaPo0GJyDkRVnSYeO2QWU3qhg3UxPCSRyIBE 4OVA== X-Forwarded-Encrypted: i=1; AJvYcCVDQM8YJM8qqgCBlBTDh2MML7osmtoXjiKN4rZN51SOcXZatUcTnCdnZw81/qrT/UyxCchkBE87jb59@vger.kernel.org, AJvYcCWoeokefPNB4VECWQkzxGJxtrPumtSxOePNUymPa8d3Zc0PlyHEckc5YRjYE6oN4GX6H2Mo1CPJsvSD1k3K7A==@vger.kernel.org, AJvYcCXS+HJz+ByJ97SoqJmJaS2VQq98g6MQb7SgxEkd+m+uW1/urNa14b+Ez0Qf9U1JUXrqE6Y2IPzacIXx9jC/@vger.kernel.org X-Gm-Message-State: AOJu0YzCBJ0zKB5DC9n8OT74cDNCtLXZB2lbivsbQtvDQLOHq6WtUtlH 69VHsTs+HY21vJYNdr2ALce50H04FE6AeV8b+ED7YrJ4QuPxq4Q= X-Google-Smtp-Source: AGHT+IEDCuaGve5sRyZ+CNuDzm3eNy1YkPNEwh41AMCociQOoET50xx+6rp4PtgCqsDqXZ4x3TfF8A== X-Received: by 2002:a17:907:98b:b0:a9a:1ef0:837b with SMTP id a640c23a62f3a-a9e40bccaa7mr317973666b.10.1730312520450; Wed, 30 Oct 2024 11:22:00 -0700 (PDT) Received: from localhost.. (adsl-178-39-53-103.adslplus.ch. [178.39.53.103]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f2982ecsm586588466b.106.2024.10.30.11.21.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 11:22:00 -0700 (PDT) From: Aleksandrs Vinarskis To: Bjorn Andersson , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan.Kemp@dell.com, tudor.laurentiu.oss@gmail.com, Aleksandrs Vinarskis Subject: [PATCH v1 1/1] arm64: dts: qcom: x1e80100-dell-xps13-9345: Introduce retimer support Date: Wed, 30 Oct 2024 19:19:36 +0100 Message-ID: <20241030182153.16256-2-alex.vinarskis@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241030182153.16256-1-alex.vinarskis@gmail.com> References: <20241030182153.16256-1-alex.vinarskis@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Describe x2 Parade PS8830 retimers for left and right USB Type-C ports respectively. Adjust graphs between connectors and the PHYs accordingly, add the voltage regulators. Dell XPS 13" 9345's DSDT describes 3rd retimer, but its not actually present. Regulators are _assumed_ to be correct, since: * tlmm pins match DSDT definition. * tlmm and pmic gpios were tested and confirmed to be powering off/resetting respective retimers. * USB3.0 now works correctly in both orientation, pre and post suspend. Derived from: arm64: dts: qcom: x1e80100-t14s: Add external DP support Signed-off-by: Aleksandrs Vinarskis Reviewed-by: Konrad Dybcio --- .../dts/qcom/x1e80100-dell-xps13-9345.dts | 293 +++++++++++++++++- 1 file changed, 283 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts b/arch/a= rm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts index 05624226faf9..b112092fbb9f 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts +++ b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts @@ -89,7 +89,15 @@ port@1 { reg =3D <1>; =20 pmic_glink_ss0_ss_in: endpoint { - remote-endpoint =3D <&usb_1_ss0_qmpphy_out>; + remote-endpoint =3D <&retimer_ss0_ss_out>; + }; + }; + + port@2 { + reg =3D <2>; + + pmic_glink_ss0_con_sbu_in: endpoint { + remote-endpoint =3D <&retimer_ss0_con_sbu_out>; }; }; }; @@ -118,7 +126,15 @@ port@1 { reg =3D <1>; =20 pmic_glink_ss1_ss_in: endpoint { - remote-endpoint =3D <&usb_1_ss1_qmpphy_out>; + remote-endpoint =3D <&retimer_ss1_ss_out>; + }; + }; + + port@2 { + reg =3D <2>; + + pmic_glink_ss1_con_sbu_in: endpoint { + remote-endpoint =3D <&retimer_ss1_con_sbu_out>; }; }; }; @@ -166,6 +182,102 @@ vreg_nvme: regulator-nvme { regulator-boot-on; }; =20 + vreg_rtmr0_1p15: regulator-rtmr0-1p15 { + compatible =3D "regulator-fixed"; + + regulator-name =3D "VREG_RTMR0_1P15"; + regulator-min-microvolt =3D <1150000>; + regulator-max-microvolt =3D <1150000>; + + gpio =3D <&pmc8380_5_gpios 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 =3D <&rtmr0_1p15_reg_en>; + pinctrl-names =3D "default"; + + regulator-boot-on; + }; + + vreg_rtmr0_1p8: regulator-rtmr0-1p8 { + compatible =3D "regulator-fixed"; + + regulator-name =3D "VREG_RTMR0_1P8"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + + gpio =3D <&pm8550ve_9_gpios 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 =3D <&rtmr0_1p8_reg_en>; + pinctrl-names =3D "default"; + + regulator-boot-on; + }; + + vreg_rtmr0_3p3: regulator-rtmr0-3p3 { + compatible =3D "regulator-fixed"; + + regulator-name =3D "VREG_RTMR0_3P3"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + + gpio =3D <&pm8550_gpios 11 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 =3D <&rtmr0_3p3_reg_en>; + pinctrl-names =3D "default"; + + regulator-boot-on; + }; + + vreg_rtmr1_1p15: regulator-rtmr1-1p15 { + compatible =3D "regulator-fixed"; + + regulator-name =3D "VREG_RTMR1_1P15"; + regulator-min-microvolt =3D <1150000>; + regulator-max-microvolt =3D <1150000>; + + gpio =3D <&tlmm 188 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 =3D <&rtmr1_1p15_reg_en>; + pinctrl-names =3D "default"; + + regulator-boot-on; + }; + + vreg_rtmr1_1p8: regulator-rtmr1-1p8 { + compatible =3D "regulator-fixed"; + + regulator-name =3D "VREG_RTMR1_1P8"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + + gpio =3D <&tlmm 175 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 =3D <&rtmr1_1p8_reg_en>; + pinctrl-names =3D "default"; + + regulator-boot-on; + }; + + vreg_rtmr1_3p3: regulator-rtmr1-3p3 { + compatible =3D "regulator-fixed"; + + regulator-name =3D "VREG_RTMR1_3P3"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + + gpio =3D <&tlmm 186 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 =3D <&rtmr1_3p3_reg_en>; + pinctrl-names =3D "default"; + + regulator-boot-on; + }; + vreg_vph_pwr: regulator-vph-pwr { compatible =3D "regulator-fixed"; =20 @@ -492,9 +604,60 @@ keyboard@5 { =20 &i2c3 { clock-frequency =3D <400000>; - status =3D "disabled"; - /* PS8830 Retimer @0x8 */ - /* Unknown device @0x9 */ + status =3D "okay"; + + /* Right-side USB Type-C port */ + typec-mux@8 { + compatible =3D "parade,ps8830"; + reg =3D <0x08>; + + clocks =3D <&rpmhcc RPMH_RF_CLK3>; + clock-names =3D "xo"; + + vdd-supply =3D <&vreg_rtmr0_1p15>; + vdd33-supply =3D <&vreg_rtmr0_3p3>; + vdd33-cap-supply =3D <&vreg_rtmr0_3p3>; + vddar-supply =3D <&vreg_rtmr0_1p15>; + vddat-supply =3D <&vreg_rtmr0_1p15>; + vddio-supply =3D <&vreg_rtmr0_1p8>; + + reset-gpios =3D <&pm8550_gpios 10 GPIO_ACTIVE_LOW>; + + pinctrl-0 =3D <&rtmr0_default>; + pinctrl-names =3D "default"; + + retimer-switch; + orientation-switch; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + + retimer_ss0_ss_out: endpoint { + remote-endpoint =3D <&pmic_glink_ss0_ss_in>; + }; + }; + + port@1 { + reg =3D <1>; + + retimer_ss0_ss_in: endpoint { + remote-endpoint =3D <&usb_1_ss0_qmpphy_out>; + }; + }; + + port@2 { + reg =3D <2>; + + retimer_ss0_con_sbu_out: endpoint { + remote-endpoint =3D <&pmic_glink_ss0_con_sbu_in>; + }; + }; + }; + }; }; =20 &i2c5 { @@ -505,9 +668,61 @@ &i2c5 { =20 &i2c7 { clock-frequency =3D <400000>; - status =3D "disabled"; - /* PS8830 Retimer @0x8 */ - /* Unknown device @0x9 */ + status =3D "okay"; + + /* Left-side USB Type-C port */ + typec-mux@8 { + compatible =3D "parade,ps8830"; + reg =3D <0x8>; + + clocks =3D <&rpmhcc RPMH_RF_CLK4>; + clock-names =3D "xo"; + + vdd-supply =3D <&vreg_rtmr1_1p15>; + vdd33-supply =3D <&vreg_rtmr1_3p3>; + vdd33-cap-supply =3D <&vreg_rtmr1_3p3>; + vddar-supply =3D <&vreg_rtmr1_1p15>; + vddat-supply =3D <&vreg_rtmr1_1p15>; + vddio-supply =3D <&vreg_rtmr1_1p8>; + + reset-gpios =3D <&tlmm 176 GPIO_ACTIVE_LOW>; + + pinctrl-0 =3D <&rtmr1_default>; + pinctrl-names =3D "default"; + + retimer-switch; + orientation-switch; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + + retimer_ss1_ss_out: endpoint { + remote-endpoint =3D <&pmic_glink_ss1_ss_in>; + }; + }; + + port@1 { + reg =3D <1>; + + retimer_ss1_ss_in: endpoint { + remote-endpoint =3D <&usb_1_ss1_qmpphy_out>; + }; + }; + + port@2 { + reg =3D <2>; + + retimer_ss1_con_sbu_out: endpoint { + remote-endpoint =3D <&pmic_glink_ss1_con_sbu_in>; + }; + }; + + }; + }; }; =20 &i2c8 { @@ -634,6 +849,36 @@ &pcie6a_phy { status =3D "okay"; }; =20 +&pm8550_gpios { + rtmr0_default: rtmr0-reset-n-active-state { + pins =3D "gpio10"; + function =3D "normal"; + power-source =3D <1>; /* 1.8V */ + }; + + rtmr0_3p3_reg_en: rtmr0-3p3-reg-en-state { + pins =3D "gpio11"; + function =3D "normal"; + power-source =3D <1>; /* 1.8V */ + }; +}; + +&pmc8380_5_gpios { + rtmr0_1p15_reg_en: rtmr0-1p15-reg-en-state { + pins =3D "gpio8"; + function =3D "normal"; + power-source =3D <1>; /* 1.8V */ + }; +}; + +&pm8550ve_9_gpios { + rtmr0_1p8_reg_en: rtmr0-1p8-reg-en-state { + pins =3D "gpio8"; + function =3D "normal"; + power-source =3D <1>; /* 1.8V */ + }; +}; + &qupv3_0 { status =3D "okay"; }; @@ -762,6 +1007,34 @@ wake-n-pins { }; }; =20 + rtmr1_1p15_reg_en: rtmr1-1p15-reg-en-state { + pins =3D "gpio188"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + rtmr1_1p8_reg_en: rtmr1-1p8-reg-en-state { + pins =3D "gpio175"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + rtmr1_3p3_reg_en: rtmr1-3p3-reg-en-state { + pins =3D "gpio186"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + rtmr1_default: rtmr1-reset-n-active-state { + pins =3D "gpio176"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + tpad_default: tpad-default-state { disable-pins { pins =3D "gpio38"; @@ -839,7 +1112,7 @@ &usb_1_ss0_dwc3_hs { }; =20 &usb_1_ss0_qmpphy_out { - remote-endpoint =3D <&pmic_glink_ss0_ss_in>; + remote-endpoint =3D <&retimer_ss0_ss_in>; }; =20 &usb_1_ss1_hsphy { @@ -871,5 +1144,5 @@ &usb_1_ss1_dwc3_hs { }; =20 &usb_1_ss1_qmpphy_out { - remote-endpoint =3D <&pmic_glink_ss1_ss_in>; + remote-endpoint =3D <&retimer_ss1_ss_in>; }; --=20 2.45.2