From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 BB45D1F4C87 for ; Mon, 11 Aug 2025 19:04:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754939091; cv=none; b=rvQBvEoWg8VOHW6VtbIdX/qSmYL30JhSyWjKftkjm/4coXOVCf0R1MX8gA2Wfn6GwLxqy3+q7BfQsqHjSPvgvV+A4y1xDez29/Kq0ze+VX4+puT/sY813ptMZyO0yYYS37ewJCfRV8ZjBlAsAAuA0gS3Zu/tRJl04nboLvC5+w0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754939091; c=relaxed/simple; bh=Jk1VP2qa7l0ygQ3fKCoTy74O9E70rUSr95ymu+ekJxA=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=EzFtJT0iuY69LVBaVRiVDApmZjWEGTxJo8rOzzJDNVcAsbw5VBN/7UAIXR1f8MAUOSSLM8Xz9MYUDmE29kimmODVvQPB8GFdGPCkck/0GPF9y/x5FI1o+HZXCWdtWpS2DjhpK0Jn7NE5DkBAriej9dcakPXtMnViPS0ozuNE0d0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=vzTAN3/h; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="vzTAN3/h" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-3b7910123a0so4351164f8f.1 for ; Mon, 11 Aug 2025 12:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1754939088; x=1755543888; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=NZZ4dukWfnrzGm5DUtUwAHWHllsDgcftC3XLB9SWVHU=; b=vzTAN3/hdFBHr5Tyc0/D9zd6GuGUjhStJlhRNZ5A6AtsYU9+OXjCA8bN+p08hxDJ79 /AkL/MPyzg9dqKhoV90p8n04ZWlX24JBAFrUCZ3tfi4lciGC5CogLgST0+FjTLUXjyw8 lnzzkkwBv20v++NtuiM1ZfW8bU4VKFCgrayI7i2KKiS7p6s/+DVowlGO4P/E2OY1a+IF cmUKbQ7NwbqnvOYngYzlNP+E+9ir+RoafelRNiNvEv8p+XUsQS90T9Tu9gaJ0lQjrf21 Ug61bkbOnLnIgCFKT0YiQMQEnA33Zr2G3rpYKOc0376PFxLwrld8B2ERqx0SjJJH+p4v sjZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754939088; x=1755543888; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=NZZ4dukWfnrzGm5DUtUwAHWHllsDgcftC3XLB9SWVHU=; b=hpiBQClw3eMEqELafPD9c31eHZu5ea62T/aGhQgaO3rmbQYwLJ99kuKNsx1CGQ5rrt 7g40o19+7cxUN24l1VXtile6ZMAbau3rt/hjeZTG6NCLkiA3pGQOoiX0RPw/3Rbad/Th Xayk0MUKU9c/ga1/c8p0r9zgkWZ7GpE5x0fN+u5KpumQPc2yzz9rBlcWK5Y+CkSdaIua I5QjaQGj6Ea0nK92mmptJc/m7lmWj5cSOLCSqVhsFVrKvcYnWcvajo7WtbwBOIIJRG84 y39CC6zgwNqkRewbiWb9c1FAyyRpJtUTjI3+ABOC44DBeLykag9nsovId2W7qvx2xba2 XIYA== X-Forwarded-Encrypted: i=1; AJvYcCWhjw8dZ9BpsgKC9RkIDeYraF+mGYvwsUTE3PZW11NpAog0Ik+xM3fmifNcqftjnr3qmbq8rrpGd3yD@vger.kernel.org X-Gm-Message-State: AOJu0YzgF061ZzNo1ZDYHRgzgFRM9zkqlaoMbBIAomkI584pYviSmc0e L0Lqq7aTVSc5OhWx2n/oQjUEruTdOPCzEVpB5wTYz8bBtRwwuoabkO3W+PhiERlEfCQ= X-Gm-Gg: ASbGncusurKS3kIjgCPEIgotaB1KUpvtqr4RHZMXHGH7/XZOaLsss66Ap7GgKroDNMu m/s+8vQkboGfKCEo6Bwwh27Jy5ug/GBfXcn6KH07YUaGnGmUGBDHuKHJ0eWox1DFPz6ylEadDhn bEd4mBi3WVeq+M8yDAL7mA0ftHFUgWCHTrp+E3NoWlm9r/oKUjuuksUaPqGI7K4LzO4C5EvDBs0 JsdxsStD7MNyQZABTEjqSvuT3ZbtuNdtLmt+2jEHcbR/rDtre7HlTWR3N9FHPbM8WuBQ5oEr42W j3P1I2hE9HP2l9Yak+x+pFcUwsFzYOUUXQPd7d+YVOmTyGR1ThkUVqOE+KDPA+hhDqYlKGmTGXX EbDP+FT4Eua9s5ARPGdYdz0s0AxKO6GjoI0VerrZ7fjFc1jD/Ut95CXobsIo1/xblS59A/lZuA4 uHyWTkPu8gbg== X-Google-Smtp-Source: AGHT+IGNyTELrMm8IxX2rL2JOAtkoqeNSDKaW9RX/7J+QSJpvnGTggjn4BTNIs5nO2xxLGv7gxVaQA== X-Received: by 2002:a05:6000:4282:b0:3b7:9c79:3293 with SMTP id ffacd0b85a97d-3b911015717mr614457f8f.58.1754939087798; Mon, 11 Aug 2025 12:04:47 -0700 (PDT) Received: from ?IPV6:2a01:e0a:3d9:2080:b0fa:b045:4b82:de09? ([2a01:e0a:3d9:2080:b0fa:b045:4b82:de09]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-458bb04c612sm384638515e9.0.2025.08.11.12.04.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Aug 2025 12:04:47 -0700 (PDT) Message-ID: <1ab2f4f0-94e5-413b-a87b-190b288b5f32@linaro.org> Date: Mon, 11 Aug 2025 21:04:46 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: Neil Armstrong Subject: Re: [PATCH v4 0/6] arm64: qcom: allow up to 4 lanes for the Type-C DisplayPort Altmode To: Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Krzysztof Kozlowski , Dmitry Baryshkov , Dmitry Baryshkov References: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8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RYkxXRQmTvqa3 3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: <20250807-topic-4ln_dp_respin-v4-0-43272d6eca92@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 07/08/2025 18:33, Konrad Dybcio wrote: > Register a typec mux in order to change the PHY mode on the Type-C > mux events depending on the mode and the svid when in Altmode setup. > > The DisplayPort phy should be left enabled if is still powered on > by the DRM DisplayPort controller, so bail out until the DisplayPort > PHY is not powered off. > > The Type-C Mode/SVID only changes on plug/unplug, and USB SAFE states > will be set in between of USB-Only, Combo and DisplayPort Only so > this will leave enough time to the DRM DisplayPort controller to > turn of the DisplayPort PHY. > > The patchset also includes bindings changes and DT changes. > > This has been successfully tested on an SM8550 board, but the > Thinkpad X13s deserved testing between non-PD USB, non-PD DisplayPort, > PD USB Hubs and PD Altmode Dongles to make sure the switch works > as expected. > > The DisplayPort 4 lanes setup can be check with: > $ cat /sys/kernel/debug/dri/ae01000.display-controller/DP-1/dp_debug > name = msm_dp > drm_dp_link > rate = 540000 > num_lanes = 4 > ... > > This patchset depends on [1] to allow broadcasting the type-c mode > to the PHY, otherwise the PHY will keep the combo state while the > retimer would setup the 4 lanes in DP mode. > > [1] https://lore.kernel.org/all/20240527-topic-sm8x50-upstream-retimer-broadcast-mode-v1-0-79ec91381aba@linaro.org/ > > Changes in v4: > - Default to USB3_ONLY if there's no DP SVID (Dmitry) > - Pick up tags, dropped T-bys due to the above change > - Add missing submitter's sign-off on some patches > - The odd 4-lane-DP + USB2 case remains unhandled for now, but it's > not a huge deal, see: > > - Link to v3: https://lore.kernel.org/r/20250527-topic-4ln_dp_respin-v3-0-f9a0763ec289@oss.qualcomm.com > Changes in v3: > - Take the series from Neil > - Rebase > - Rename many variables > - Test on X1E & X13s > - Apply a number of small cosmetic/codestyle changes > - Remove some unused variables > - Some smaller bugfixes > - Link to v2: https://lore.kernel.org/lkml/20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-0-a03e68d7b8fc@linaro.org/ > Changes in v2: > - Reference usb-switch.yaml in bindings patch > - Fix switch/case indenting > - Check svid for USB_TYPEC_DP_SID > - Fix X13s patch subject > - Update SM8650 patch to enable 4 lanes on HDK aswell > - Link to v1: https://lore.kernel.org/r/20240229-topic-sm8x50-upstream-phy-combo-typec-mux-v1-0-07e24a231840@linaro.org > > Signed-off-by: Konrad Dybcio > --- > Konrad Dybcio (1): > phy: qcom: qmp-combo: Rename 'mode' to 'phy_mode' > > Neil Armstrong (5): > dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Reference usb-switch.yaml to allow mode-switch > phy: qcom: qmp-combo: store DP phy power state > phy: qcom: qmp-combo: introduce QMPPHY_MODE > phy: qcom: qmp-combo: register a typec mux to change the QMPPHY_MODE > arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13: Set up 4-lane DP > > .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 7 +- > .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 6 +- > drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 179 +++++++++++++++++++-- > 3 files changed, 170 insertions(+), 22 deletions(-) > --- > base-commit: 442d93313caebc8ccd6d53f4572c50732a95bc48 > change-id: 20250527-topic-4ln_dp_respin-c6924a8825ce > > Best regards, Tested-by: Neil Armstrong # on Lenovo Thinkpad T14S Successfully got 4 lanes working with an USB-C to DP adapter with either orientation: dp_link: test_requested = 512 num_lanes = 4 bw_code = 20 lclk = 540000000 v_level = 2 p_level = 0 And 2 lanes is still working. I'll test on SM8550/SM8650 later this week. Thanks, Neil