From patchwork Mon Jun 19 07:58:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 694201 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F6F0EB64DD for ; Mon, 19 Jun 2023 07:58:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230150AbjFSH6v (ORCPT ); Mon, 19 Jun 2023 03:58:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229807AbjFSH6q (ORCPT ); Mon, 19 Jun 2023 03:58:46 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A2D2E61 for ; Mon, 19 Jun 2023 00:58:42 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4f85966b0f2so3299110e87.3 for ; Mon, 19 Jun 2023 00:58:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687161521; x=1689753521; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=8W4DDI67tlbAaFkIpRMuH4m4GXyLOYQLIt7UXn6qsRg=; b=RQt3m4J4Da/tuK8Zr7xcxMZ4jMfOpQCtBBssjfPgcE2rfOPo+ipfSAbt0HMrZMx0Dv tfuTOWC2gx2gH0VwvHBQ0PCHlGjEa+gdQAhvjec+iSUgRhuz6HwG9KGlVnEv7JNuWczL nyjhzISwF5yVkzMvW7IkiGpZvnr3ywvE15XagXitmuAYYxzG9Cj+EF+l1J4nmu+oRC+k gN3VtWaOlMj7xmNRhR14Y2IMxlM/ljL7yO+/wogm4/oamjuB5uK7u0qpq/7aFVov+O+Z GY8UuQD0DvN0xMJcE5R6UiiQnSUQLufTlx47WglX3oHVFRe2nOZr9H+f1fEx9JrMYMgU mxbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687161521; x=1689753521; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8W4DDI67tlbAaFkIpRMuH4m4GXyLOYQLIt7UXn6qsRg=; b=R/KE99MLllndZV5jVOgj0GeoOY4efuG6nezD0rKSQF9iqL8w+ZjwhA2Ct6HpEsI/RN Dqo87+68b3QcQEVSqaN4UumDGVdw8N8n58UEEdIEvARKRYBhVhU+KGadBRB3pkCC6sxY fppxxEq3My768csxyAt3dmd4KBGDoNgUwj1dUorsFdoQIi4Ue5YeO82RCfQv5Wkz2jCi gYPh2+9VR2u1qegsUEo90rw93dKJH4iR8BrA6aTgGkXgHby+tGuZmEeF2S73VEnytH2e IYGq9WquJN0fR+5Ons2lTsnnylwAFIGAl6EhhBg+A/AlAdvSacxSPBFq9kiJSuwYuNSd 0gww== X-Gm-Message-State: AC+VfDxynGdgu2annDfUaUrw/b/offClcoYu0GvfLQWAVmbncLAcsjfq 3AVJOACBqBhY557gm+lFm3kbAA== X-Google-Smtp-Source: ACHHUZ7XGvKnV3yJAy5//KAzL08FM8XkI69KFiNDDy7AAxhwdpdQh8KKDUkpNE2XOzRdZACCyZ81EQ== X-Received: by 2002:a19:385a:0:b0:4f4:b38c:1f8a with SMTP id d26-20020a19385a000000b004f4b38c1f8amr3885028lfj.53.1687161520705; Mon, 19 Jun 2023 00:58:40 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id v5-20020a05600c214500b003f7f87ba116sm7091491wml.19.2023.06.19.00.58.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 00:58:40 -0700 (PDT) From: Neil Armstrong Date: Mon, 19 Jun 2023 09:58:17 +0200 Subject: [PATCH v4 2/6] qcom: pmic_glink_altmode: add retimer-switch support MIME-Version: 1.0 Message-Id: <20230601-topic-sm8550-upstream-type-c-v4-2-eb2ae960b8dc@linaro.org> References: <20230601-topic-sm8550-upstream-type-c-v4-0-eb2ae960b8dc@linaro.org> In-Reply-To: <20230601-topic-sm8550-upstream-type-c-v4-0-eb2ae960b8dc@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3944; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=fCvaaaAL0Gx7Xnks6/BexPRt3VhZDwY4J3jOffW33Do=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkkAqr+oPppKm8uZmmn0MEZmkNcfdKZZnK4rEpqr6u NMCVHfuJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZJAKqwAKCRB33NvayMhJ0YvwD/ 9DbP8N9jvpgqvOx0972X413z5tywwCs3FQ3i/fc7wn2PkjCzlo//ORWwH03fjmuzH17DbVmvB0vpJF DEbjl03DdUHUaUwRdLSfVWb4Tu3kWkutrfcZ6q756aayzO8O/kr2Q1lxqESzuCh7eFJVgQagXPIUjj 6crg87jFDwn3+yt7jxmWZVdFWkFF4MuGKVpTEdcZ1UwWO6zkpNoBuOte2w4Y037I/6W7FNfYMCRq3U CvER9TwUUs8NXweEq58qcqDc+OdlqItqicrLPljSNof+q8FwreWh7ZOiwquRmLGZzRAQ5cuauILLqy rHlMY3ur7fzcDjyzmt/bUJLE0zg2dtvgq87fPa10BN7585gnObYTLaqbfR3w+HGovlPSvaE1cLAyrY RSP6v3UCLs0yh7P6ePxVcjK1i3fDaYKUEw2S1hX9ro67wwUX3isDWQzzYcPDodgR5LRPoYSWmAhezJ 1AYqiU/nAoV7vQe4TB2kH+w0mEioRrSnvn3IetGXwfexobr6tAYNMtmIjE4pa1vncNn6IWHfG7Sb8I G3lAfIbZS2zzThCHUpuM8ZJ5+TvaBBey3Q6eEnzGPCKBWq9ZUQGsbStC6ymRKp0ChesfHbtJmkZrOH grV1SW15pN2mo6OjHz6kTu/fP5MZqDNLYHJx/s5aQzKN44q3IO9fuUUWuCEQ== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Some boards have a retimer/redriver between the SuperSpeed PHY and the USB-C connector to compensates signal integrity losses mainly due to PCB & transmission cables. Add support for an optional retimer-switch in the USB-C connector graph. Signed-off-by: Neil Armstrong --- drivers/soc/qcom/pmic_glink_altmode.c | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/drivers/soc/qcom/pmic_glink_altmode.c b/drivers/soc/qcom/pmic_glink_altmode.c index 007d308e2f15..41d732f5b647 100644 --- a/drivers/soc/qcom/pmic_glink_altmode.c +++ b/drivers/soc/qcom/pmic_glink_altmode.c @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -68,6 +69,8 @@ struct pmic_glink_altmode_port { struct typec_switch *typec_switch; struct typec_mux *typec_mux; struct typec_mux_state state; + struct typec_retimer *typec_retimer; + struct typec_retimer_state retimer_state; struct typec_altmode dp_alt; struct work_struct work; @@ -157,6 +160,14 @@ static void pmic_glink_altmode_enable_dp(struct pmic_glink_altmode *altmode, ret = typec_mux_set(port->typec_mux, &port->state); if (ret) dev_err(altmode->dev, "failed to switch mux to DP\n"); + + port->retimer_state.alt = &port->dp_alt; + port->retimer_state.data = &dp_data; + port->retimer_state.mode = TYPEC_MODAL_STATE(mode); + + ret = typec_retimer_set(port->typec_retimer, &port->retimer_state); + if (ret) + dev_err(altmode->dev, "failed to setup retimer to DP\n"); } static void pmic_glink_altmode_enable_usb(struct pmic_glink_altmode *altmode, @@ -171,6 +182,14 @@ static void pmic_glink_altmode_enable_usb(struct pmic_glink_altmode *altmode, ret = typec_mux_set(port->typec_mux, &port->state); if (ret) dev_err(altmode->dev, "failed to switch mux to USB\n"); + + port->retimer_state.alt = NULL; + port->retimer_state.data = NULL; + port->retimer_state.mode = TYPEC_STATE_USB; + + ret = typec_retimer_set(port->typec_retimer, &port->retimer_state); + if (ret) + dev_err(altmode->dev, "failed to setup retimer to USB\n"); } static void pmic_glink_altmode_safe(struct pmic_glink_altmode *altmode, @@ -185,6 +204,14 @@ static void pmic_glink_altmode_safe(struct pmic_glink_altmode *altmode, ret = typec_mux_set(port->typec_mux, &port->state); if (ret) dev_err(altmode->dev, "failed to switch mux to safe mode\n"); + + port->retimer_state.alt = NULL; + port->retimer_state.data = NULL; + port->retimer_state.mode = TYPEC_STATE_SAFE; + + ret = typec_retimer_set(port->typec_retimer, &port->retimer_state); + if (ret) + dev_err(altmode->dev, "failed to setup retimer to USB\n"); } static void pmic_glink_altmode_worker(struct work_struct *work) @@ -347,6 +374,11 @@ static const struct drm_bridge_funcs pmic_glink_altmode_bridge_funcs = { .attach = pmic_glink_altmode_attach, }; +static void pmic_glink_altmode_put_retimer(void *data) +{ + typec_retimer_put(data); +} + static void pmic_glink_altmode_put_mux(void *data) { typec_mux_put(data); @@ -453,6 +485,17 @@ static int pmic_glink_altmode_probe(struct auxiliary_device *adev, if (ret) return ret; + alt_port->typec_retimer = fwnode_typec_retimer_get(fwnode); + if (IS_ERR(alt_port->typec_retimer)) + return dev_err_probe(dev, PTR_ERR(alt_port->typec_retimer), + "failed to acquire retimer-switch for port: %d\n", + port); + + ret = devm_add_action_or_reset(dev, pmic_glink_altmode_put_retimer, + alt_port->typec_retimer); + if (ret) + return ret; + alt_port->typec_switch = fwnode_typec_switch_get(fwnode); if (IS_ERR(alt_port->typec_switch)) return dev_err_probe(dev, PTR_ERR(alt_port->typec_switch), From patchwork Mon Jun 19 07:58:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 694200 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EE59EB64DC for ; Mon, 19 Jun 2023 07:59:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229604AbjFSH7E (ORCPT ); Mon, 19 Jun 2023 03:59:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229824AbjFSH6r (ORCPT ); Mon, 19 Jun 2023 03:58:47 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28ED4E77 for ; Mon, 19 Jun 2023 00:58:44 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3f8c65020dfso33957615e9.2 for ; Mon, 19 Jun 2023 00:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687161522; x=1689753522; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hXgCX8dNw6x02jPRHVLJkaCju40zMsClluJj0tjYPUQ=; b=goniO1Q5zS6Qc1WMtyGyn/H6GrqFKUSeqHS8qorKEZJ3xuHR7ddVFLAsZAA4eWcR4h Q2oTdeYJGGBtQLv5N+8qp/3pmck+H/w6Y1eJdXVqqRITGbK9jeHjXOPiZNSRbZfg33bR n6rKmRc13+LT4EFtJMl/O5e7k7FoVjpAPr7wkHl2erypzSbfKCs26tRTUvovoQFiM+c9 5vLA5HuBjCqxdMlon3rQIrjzLuiPrv/c3DoB+FHH947d5HeJ8OL4hzsugDrV0xH1nA9n LZlDdWoSTajTCOkDmkaj+TCKYUs/dADacH94TBLCFNU/wrqBRGMWuPmvcwAUKfrGNCJ5 Bnmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687161522; x=1689753522; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hXgCX8dNw6x02jPRHVLJkaCju40zMsClluJj0tjYPUQ=; b=V9QRp+hARVED3AlHS059YedkC3XW+f13Y/eC8sBf/ZEmHjJby+RWFeI9ghbn0GDqyi u225t1GPgczuvGpg5iBqZyA/FzxWCQupWteCTmySbIKFOtdUYQC6MLLTT/nmEIuwZXqj o16jpigplyA2MWi6KBiY2LMb0k8PB1yQsb6oV3QXc+5otm3fDEWAAmo9pXG9KLp/XhsW 9X2N9MyhQl/trPllRety/pkuLBoI/ui8gK2ka9j4hcdlvTvy26adFMOedEsZs48OwBP+ +bWQHpGodmH5bGbMjE5LYI9JuRA3Co+mZ6ZkGiEPJYFlxLJrbDojhTCfDdWtYoKz3BND DSrQ== X-Gm-Message-State: AC+VfDylJ5Oe04+Qlcoq+uD+DDqUmkWgxVfq4a1EQofpdG+uyRYcFXcn cX/N8qrXTjb4oc7EUo+mb3G+ig== X-Google-Smtp-Source: ACHHUZ5bbMpTQUZNWoi72b+2cAS378+3f6948vxdFglsfrrxGzQEE4DuW9tdeMGbzZoTPuStk8qaJA== X-Received: by 2002:a05:600c:25a:b0:3f6:76e:604b with SMTP id 26-20020a05600c025a00b003f6076e604bmr7993832wmj.0.1687161522536; Mon, 19 Jun 2023 00:58:42 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id v5-20020a05600c214500b003f7f87ba116sm7091491wml.19.2023.06.19.00.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 00:58:42 -0700 (PDT) From: Neil Armstrong Date: Mon, 19 Jun 2023 09:58:19 +0200 Subject: [PATCH v4 4/6] arm64: dts: qcom: sm8550: add ports subnodes in usb/dp qmpphy node MIME-Version: 1.0 Message-Id: <20230601-topic-sm8550-upstream-type-c-v4-4-eb2ae960b8dc@linaro.org> References: <20230601-topic-sm8550-upstream-type-c-v4-0-eb2ae960b8dc@linaro.org> In-Reply-To: <20230601-topic-sm8550-upstream-type-c-v4-0-eb2ae960b8dc@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1083; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=YCpe2uXLy9w3nWR5fQNPmqhcnIYVQV3CZ+KVZfbwGls=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkkAqsfY/f1YwkWKHE8b7CB+66jp+kswZcDcUlJYyK 1Wt7e2KJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZJAKrAAKCRB33NvayMhJ0cTTD/ 4s3uWX5fZ1A3rs0bIcfpjPqE7nfAqGs6SHtiGmCJjMMdHek8eDVy38pv4GHb8vQN7TGOr6GB0+ybhm t/gkigHPTLTPhA40BMA4ZH3wTEYUZWGIHiZiOQKg+f79wHMsH+U2CvP8MYS6U/62bpqpa8bzH3zPT7 yIZoZ/hltvxPnDygDGcPYRayX1cJYFyQwcqtK0l+UX4qXo2j8k2sLajUKMVT8bXtmepwKv1+dea/iP /3Zi/STQefkJUAlgMudQHjI4x9jBoWcNFmwABHH+wmKBv32nWQgOq7cl1glw/gfCcoRo9SZo1fHIvb zo48y/1yNm8wSKt6ZMiPJIGXqzyUMqZC4dSORc4KfTTB9HeFg2OXslBZjZu2GyUDwXldxmQSl7v1/+ 8TzIOxBnSG3XyLa0ML12mSxEa7oME45nUj/NjGrqOY0ZtMhS3B5eazbmCRlbcW0gFrMiRX+1OFu9/P bov61F3EwpSvPNWtFk0Lg2O2gV34pwVLws5kFvv0vfOKU561PC17ZBilMfncPLro5ZtraoHSnQ0Ln7 b6tv5tPtjLtn1MqMpD76zAqnrynQLUSnnaqqG3NcdBhTROTbmH3lDuH/0ZPFd3OKZaRL5Dt0lYAv++ 954bx78QMykVf28zqnG9pFmYlM+BoWjgDJljCjMfRwIHTOfO5qxXHUKHTLOw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the USB3+DP Combo QMP PHY port subnodes in the SM8550 SoC DTSI to avoid duplication in the devices DTs. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sm8550.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi index 41d60af93692..54636f475306 100644 --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi @@ -2838,6 +2838,32 @@ usb_dp_qmpphy: phy@88e8000 { #phy-cells = <1>; status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usb_dp_qmpphy_out: endpoint { + }; + }; + + port@1 { + reg = <1>; + + usb_dp_qmpphy_usb_ss_in: endpoint { + }; + }; + + port@2 { + reg = <2>; + + usb_dp_qmpphy_dp_in: endpoint { + }; + }; + }; }; usb_1: usb@a6f8800 { From patchwork Mon Jun 19 07:58:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 694199 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3360EB64DA for ; Mon, 19 Jun 2023 07:59:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229718AbjFSH7f (ORCPT ); Mon, 19 Jun 2023 03:59:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjFSH6s (ORCPT ); Mon, 19 Jun 2023 03:58:48 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0850E7A for ; Mon, 19 Jun 2023 00:58:45 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f904dcc1e2so19946915e9.3 for ; Mon, 19 Jun 2023 00:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687161524; x=1689753524; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Ey93zvDWmAyVYw5EBP9isEy9sNithaduekGNmQfFFGQ=; b=N5icVU0PSF41RihqxzsAkvJ9RJVhig286Lb7vj26kCoHesAK1Tup3jpf9ect3qmoR1 omch3Az7GNXs8T5+w4fTifcol6nxcCfEIEYQ/2AEC65OqyrtHcf0xC+k6qyFf88FKC+1 6OuVzjOdw9JPZOodboRiHGYNr0fB02HDlqKBs8F0S2wS9sfBjxL2Ak/JY+y2wJwWCsD4 IPrH8xH5o7xRNWcQYmjBv1Fxsya5ktRlbPI5JQ//N5+GIMbHNeLBhuDz4f7M5AKfVGYo CyyZ/C0ZI6RNxAhoMKO7X/9a97EczwfBhwEz71qjDKJk/k+3aOCZP1U8MhUgAo2UjHRT 7Mbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687161524; x=1689753524; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ey93zvDWmAyVYw5EBP9isEy9sNithaduekGNmQfFFGQ=; b=JZkf75trK68Tqcc4TGJEL65+rcx17RYCPC2TiQ+4/FvS0VSU3gk8LfVc3Qfj2x9ggo TtoZD3XegwpeMjCAIJERwISdFQByNhGFA828Nk5Og06mGKG+YysxgYuxho2bJTeIuj30 2JkAxKae5E/cmXMISkx8Pv+vpZVnocb3QVqudq2Vi9f7N6/+p/5DDnEitOA8JdLB4PX/ pWNR09Hg0hjoA8gcj+VJAG7ctkIzkgcaA+X/keH7p8/vNEBXvd/CufSUJPY+aK47M6mB JRUxWWsx5qxVYW62dQ1hSt+Zi+Adloliqmo/cuiOGMdkRHFUtlODHyaIcf5mL3ihCczm bOQA== X-Gm-Message-State: AC+VfDw1qc+UWFEWeNlhsXX6sK4VXqbPewGePiLOavM8uc+oDO8MGKfT r4WsdvIs8bPE8PieLskN9qJNSGe+eAExYWVqoPdvMw== X-Google-Smtp-Source: ACHHUZ7swazqpjf4YIvGKwWPr0yHd4Tdgftum7sW7Y7htMVgRNeSAnWx/NLSyUX7Qgm4kDqLk+sozQ== X-Received: by 2002:a7b:ca4c:0:b0:3f9:b30f:a013 with SMTP id m12-20020a7bca4c000000b003f9b30fa013mr562627wml.6.1687161524273; Mon, 19 Jun 2023 00:58:44 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id v5-20020a05600c214500b003f7f87ba116sm7091491wml.19.2023.06.19.00.58.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 00:58:43 -0700 (PDT) From: Neil Armstrong Date: Mon, 19 Jun 2023 09:58:21 +0200 Subject: [PATCH v4 6/6] arm64: dts: qcom: sm8550-qrd: add pmic glink port/endpoints MIME-Version: 1.0 Message-Id: <20230601-topic-sm8550-upstream-type-c-v4-6-eb2ae960b8dc@linaro.org> References: <20230601-topic-sm8550-upstream-type-c-v4-0-eb2ae960b8dc@linaro.org> In-Reply-To: <20230601-topic-sm8550-upstream-type-c-v4-0-eb2ae960b8dc@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2915; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=nQ57g+TpUs6IW4Huo12DlEfzkTqpyQ3GQ6hDouNNOss=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkkAqtdlOdpbWirg2zesObhYva7aodzC+nAqudDdI9 M17NY4mJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZJAKrQAKCRB33NvayMhJ0YERD/ wJYC4PyTvN17OJNLolK8sGa5KwXiqRlXHYAcxX1z9FA3NVObnZw4smeyEjUAVu8SKJF0r71oP/Hu1i t3H3+htr6aIbUz15JOpP2tvzzuqxjgE2iP4jJ7tDAVYf6mCcFbvXNBd9aQrLgnCUrG3BX/BDetGqxg htBEKMNyQJXQg4mREQkwLMBRXQBAbkGe9DLyqKFpZiZCVEn+EIdd8zgGnJ4mUW6bHVLJQWnsVWA2ke 3RiWsF3Q9y2NHn/anpWYm+oTUnivMQzdshhKN23HeUyaBd0APVQjJZlGwPgMkp8LZsGpYgUSTv8xom c5Ale+Mm1WCkrf4Cs6cTxr/jl+JswJTLZxmeS+GEMO45eDjr/VZZFFhUPsYNsQb+vn6J86lOsySatk oMOXKyAeL5GKX6FhV1pobWbhEiFYzYts6hNHkkdwTTbmD5uDbLlyV4FZ8e6X3KqgTBPXj58By3PQ4p PHzMEGT4Pl6Beo12LUwrAWNn5ahXfm9eYEMvo5AiSUW10nse6KrGUv/2ZlWaYf9hNoqFFupchK263y /ndErnE6m/+a8bczYksbC1H+8VYUzlfl0MyQcHzig1Ea3EVh5yb9et9XZDH72RlO3MciK5cNl9VquC xmvbynXPFUYjGH5Ykw+8ZcFZ2EwvlaD4TwHeD9BcmcSNfG2ycLqEfIjLR3kw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add nodes to support Type-C USB/DP functionality. On this platform, a Type-C redriver is added to the SuperSpeed graph. Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 98 ++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts index ec4feee6837d..c921ecccd322 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts @@ -97,7 +97,15 @@ port@1 { reg = <1>; pmic_glink_ss_in: endpoint { - remote-endpoint = <&usb_1_dwc3_ss>; + remote-endpoint = <&redriver_ss_out>; + }; + }; + + port@2 { + reg = <2>; + + pmic_glink_sbu: endpoint { + remote-endpoint = <&fsa4480_sbu_mux>; }; }; }; @@ -517,6 +525,69 @@ vreg_l3g_1p2: ldo3 { }; }; +&i2c_master_hub_0 { + status = "okay"; +}; + +&i2c_hub_2 { + status = "okay"; + + typec-retimer@1c { + compatible = "onnn,nb7vpq904m"; + reg = <0x1c>; + + vcc-supply = <&vreg_l15b_1p8>; + + retimer-switch; + orientation-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + redriver_ss_out: endpoint { + remote-endpoint = <&pmic_glink_ss_in>; + }; + }; + + port@1 { + reg = <1>; + + redriver_ss_in: endpoint { + data-lanes = <3 2 1 0>; + remote-endpoint = <&usb_dp_qmpphy_out>; + }; + }; + }; + }; + + typec-mux@42 { + compatible = "fcs,fsa4480"; + reg = <0x42>; + + vcc-supply = <&vreg_bob1>; + + mode-switch; + orientation-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + fsa4480_sbu_mux: endpoint { + remote-endpoint = <&pmic_glink_sbu>; + }; + }; + }; + }; +}; + &gcc { clocks = <&bi_tcxo_div2>, <&sleep_clk>, <&pcie0_phy>, @@ -586,6 +657,15 @@ &mdss_dsi0_phy { status = "okay"; }; +&mdss_dp0 { + status = "okay"; +}; + +&mdss_dp0_out { + data-lanes = <0 1>; + remote-endpoint = <&usb_dp_qmpphy_dp_in>; +}; + &pcie_1_phy_aux_clk { status = "disabled"; }; @@ -842,7 +922,7 @@ &usb_1_dwc3_hs { }; &usb_1_dwc3_ss { - remote-endpoint = <&pmic_glink_ss_in>; + remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>; }; &usb_1_hsphy { @@ -858,9 +938,23 @@ &usb_dp_qmpphy { vdda-phy-supply = <&vreg_l3e_1p2>; vdda-pll-supply = <&vreg_l3f_0p88>; + orientation-switch; + status = "okay"; }; +&usb_dp_qmpphy_dp_in { + remote-endpoint = <&mdss_dp0_out>; +}; + +&usb_dp_qmpphy_out { + remote-endpoint = <&redriver_ss_in>; +}; + +&usb_dp_qmpphy_usb_ss_in { + remote-endpoint = <&usb_1_dwc3_ss>; +}; + &xo_board { clock-frequency = <76800000>; };