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 E85622DE6FC for ; Wed, 3 Sep 2025 07:49:54 +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=1756885797; cv=none; b=GcBEcOXSpc2/l1DSVuznA8Ue1TlHq96eQXZMRtQhxtxscePFbenH5ly+O6qfyaVBGUmRuplx0IBQReRN8NldxeynKr1K8EdpLdrhAytqy5aLV/VVQjbk+KGCy5YvrvS1gR1eGHTCFSd7E7uMiW4GFURfooHzu/Z64cOMxsjZbw4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756885797; c=relaxed/simple; bh=EJfrYL5HJI0QUtaBffL6WlEbo2xIumV+JPls7FbJoTI=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=ol75Li+Vi3aw+bIbWVAmfTjP3iVDZyHEt1UtR2hNQWrOGh3fyWBWlVouh9r/yLAKP8KUPCIhZC2zelglLBEBBSPhn0pbZajWSpXjRa5SxzjOoIrsLECPIO381z0wLupcWJofTDAtRxa6TVDhFcc8sbBfOeKWl1/HTxCtecdSm3A= 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=Kz5u3PbT; 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="Kz5u3PbT" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-3df726ecff3so44776f8f.3 for ; Wed, 03 Sep 2025 00:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756885793; x=1757490593; 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=PioyJaDS8ksrS/yIYTZans1q2zfR8i6mk/EV1gul67A=; b=Kz5u3PbTnXQhIla15B4QrJUgKE/Bq1kyHRsyWJerX6SjoDavyhzSkYNT4/0Eg5DVZG jvEpKAgQA3QLS3cYCOGFAnNZ4UYFILGxCREqAJ/XK6dVFFKcWCYrj60aqUB8AXgmnymZ vBjEsl6ck9coPHCxJWJ2gwyPkwpqC688+XlJcptZ6ycs+uc1wWiSK07Z9IxzwHBV9b5j gMTbxRjCZcReV/u9JI7u8WyxgKtZ16r/tJrBxdt53QlKcezTwLdXx47ucZXdt0YLxDFa HTIEnPizgqEzbjxa/LK1LkUqBPfwHfwUvHnfW8vgT7azl4TRbYJaWZBl5g1mQN7C8Dri XlQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756885793; x=1757490593; 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=PioyJaDS8ksrS/yIYTZans1q2zfR8i6mk/EV1gul67A=; b=JF1Nvc4zY34FVwG3kC+LORWEa8i8+nNRAch3dDMKqRCcbZ/E4VKM1me1+UtlqhiK1q XRJhs55W/MRG6aJ1fsyoi0eP7C5F2ITtACAFRgoZaR67o+xg2xVZBxAQDh+Fo2v9hY0i Xuf1HhSqFTQAJ+hCb/DtnEu/v0MPDv45QNAgLeXZtJMilUMFd+orKiw3741YrWm4wdPw 3sy1NPzjaxmsSsupXBuUk3fwi7b7BcXZEogBe3flxZ1RWPbEN9I/STXAqXFz4UUltdXZ 4PiBtFuh1zCUkEQ4GLyOiCgHkMdHxkxx8zq+qTC48c+WOqQljj1rpRGjXeFoZbjswu6t O/PQ== X-Forwarded-Encrypted: i=1; AJvYcCUg9WcaSZVqS1lG2kz54cXinjGjovHMGxpuWx1Jy9jLPa9vun7SxMefBshuW8eWzAZRdEzsh1x7Eemt+4M=@vger.kernel.org X-Gm-Message-State: AOJu0YynRy0uZrWfmhtQaZSqFBPvw7G0cAeArsmNzaPDqV9KXCrhB9wz 2W4F09jcUX7QpfLZfPjVKL2rbWxbz8BFxWmWVL/sqXRsNg344lGNPreloI7mhkdnUFg= X-Gm-Gg: ASbGncs8T3tA1CeyDHuJQlhTHO7md0DT/zNrpwwsgDx71//BzNBuEGv0SHERNIpd+W5 /8aJcG9UaOj6B/6zxmPQAlLykPNwrbCuzKAwBoCOlfZQzUFqXWzuBZA7F49Wl5zJALueqVFCNhn VVjT+sDMa4eT17jGNv3h0pJUmHiBQuf7QEQPionm2WueP2QAH2kz3cRx8m6c7ZqGx2IDXSuq5hQ ddQ2grdQ1dAmBY76dI7sfDioY/wF86KfpGGOWiSzzdJWXv2CPGCGpCmG6tsicXMn81HDMQ35SFM hQwuK9qic2/Qn56goq7u6PCSssVp/0SbBXY5YblB6CHJkIBDJ7tSdp7QIyGY3gT7NRdofS5pZKT 84v8oXvx6Q7vFayDQUORQdtbv4Pj4JZ5KzZiFECotru36Kp454NwPE+GJyd1SgW99hHVss5jB0j aWernkRSRnLmKiwLEIkA== X-Google-Smtp-Source: AGHT+IGNcwf7dquah88p3kbUCZQzfg4W/YTjPdyhyrclopN+udAN3w1xt+8R2YdXZebjRcfFI3x01g== X-Received: by 2002:a05:6000:2011:b0:3c9:3f46:70eb with SMTP id ffacd0b85a97d-3d1def69bc3mr8693458f8f.52.1756885793260; Wed, 03 Sep 2025 00:49:53 -0700 (PDT) Received: from ?IPV6:2a01:e0a:3d9:2080:431c:dad5:266c:f97? ([2a01:e0a:3d9:2080:431c:dad5:266c:f97]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b93fae643sm75085675e9.3.2025.09.03.00.49.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Sep 2025 00:49:52 -0700 (PDT) Message-ID: <418ba924-7e3d-474f-ab1e-084ca8ad313d@linaro.org> Date: Wed, 3 Sep 2025 09:49:51 +0200 Precedence: bulk X-Mailing-List: linux-kernel@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 v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping To: Krzysztof Kozlowski Cc: Andrzej Hajda , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Bjorn Andersson , Konrad Dybcio , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org References: <20250902-topic-x1e80100-hdmi-v2-0-f4ccf0ef79ab@linaro.org> <20250902-topic-x1e80100-hdmi-v2-3-f4ccf0ef79ab@linaro.org> <20250903-amaranth-rhino-of-wind-3b8850@kuoka> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4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GtUX oUk33HEAEQEAAcLAXwQYAQIACQUCTVkGzwIbDAAKCRAWmrexpM/4rrXiB/sGbkQ6itMrAIfn M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3 3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: <20250903-amaranth-rhino-of-wind-3b8850@kuoka> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 03/09/2025 09:07, Krzysztof Kozlowski wrote: > On Tue, Sep 02, 2025 at 11:00:30AM +0200, Neil Armstrong wrote: >> The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top >> of a combo glue to route either lanes to the 4 shared physical lanes. >> >> The routing of the lanes can be: >> - 2 DP + 2 USB3 >> - 4 DP >> - 2 USB3 >> >> The layout of the lanes was designed to be mapped and swapped >> related to the USB-C Power Delivery negociation, so it supports >> a finite set of mappings inherited by the USB-C Altmode layouts. >> >> Nevertheless those QMP Comby PHY can be statically used to >> drive a DisplayPort connector, DP->HDMI bridge, USB3 A Connector, >> etc... without an USB-C connector and no PD events. > > What is the use case for static mapping? Embedded HDMI port on T14s > laptop? > >> >> Add a property that documents the static lanes mapping to >> each underlying PHY to allow supporting boards directly >> connecting USB3 and DisplayPort lanes to the QMP Combo >> lanes. >> >> Signed-off-by: Neil Armstrong >> --- >> .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 ++++++++++++++++++++++ >> 1 file changed, 29 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml >> index c8bc512df08b5694c8599f475de78679a4438449..12511a462bc6245e0b82726d053d8605148c5047 100644 >> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml >> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml >> @@ -76,6 +76,35 @@ properties: >> mode-switch: true >> orientation-switch: true >> >> + qcom,static-lanes-mapping: >> + $ref: /schemas/types.yaml#/definitions/uint32-array >> + minItems: 4 >> + items: >> + enum: >> + - 0 # Unconnected (PHY_NONE) >> + - 4 # USB3 (PHY_TYPE_USB3) >> + - 6 # DisplayPort (PHY_TYPE_DP) >> + description: >> + Describes the static mapping of the Combo PHY lanes, when not used >> + a in a Type-C dynamic setup using USB-C PD Events to change the mapping. >> + The 4 lanes can either routed to the underlying DP PHY or the USB3 PHY. >> + Only 2 of the lanes can be connected to the USB3 PHY, but the 4 lanes can >> + be connected to the DP PHY. >> + The numbers corresponds to the PHY Type the lanes are connected to. >> + The possible combinations are >> + <0 0 0 0> when none are connected >> + <4 4 0 6> USB3 and DP single lane >> + <4 4 6 6> USB3 and DP >> + <6 6 4 4> DP and USB3 >> + <6 0 4 4> DP and USB3 single lane > >> + <4 4 0 0> USB3 Only >> + <0 0 4 4> USB3 Only > > Why do you need to handle here and in few other places mirrored case? > Isn't enough to just say you only want USB3? Maybe my first question > (what is usecase for this) answers this, though. Usecase is larger than the HDMI on the T14s, we must handle boards directly connected some USB-A and DP stuff directly on the combo lanes. See https://lore.kernel.org/all/8A7C126C22789C9B+f30def47-302a-45ee-8f76-64ef277f773f@radxa.com/ > > This looks similar to rockchip,dp-lane-mux, from the objective point of > view. Please look there and if it is really similar concept this would > warrant having it as generic property in video-interfaces for example. Yes it's quite the same > > I also wonder if this should not be stored in the endpoint. But I'm trying to store this in the endpoint as [1], the Bindings & DT part looks fine, but the driver part looks horrible... I'll probably post an RFC of that shortly [1] https://lore.kernel.org/all/14f334fc-35de-4f21-8eb1-f6b41ac24704@linaro.org/ Neil > > Best regards, > Krzysztof >