From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 00D5C2DF135 for ; Wed, 3 Sep 2025 07:49:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756885796; cv=none; b=gR2KpH9Gl5dqYltKqVUwpeqQvNFc9lcr9zqtTFs/iYm/pU7CDdVplYZK7a9c3GOuiAEy1iXqrPgy7s4dCFT0dAIB4AB85TXp7uS6kbQOEJX7SLYCfxqY0LYyudHM5Sgdgjd5X95d8ejmqFkAkmPG5H4tyP7TW21mlJA1C1cWASs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756885796; c=relaxed/simple; bh=EJfrYL5HJI0QUtaBffL6WlEbo2xIumV+JPls7FbJoTI=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=WK3Mwm7ROKutCww2iCo8t0OreRcskpn3N2fSp5RjAec3Q3YhaUa21emGe+8dNOcYStk9ZV89HC17+CBcNtqyuciOjwmKBiwe2334ngN6696FazxZ3MDuOju8tQx6U5ysJnX27w1tWRhHSbKEhP2n8Hrz9Eqv3aoZJSLT9xKfNJk= 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.45 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-f45.google.com with SMTP id ffacd0b85a97d-3cf991e8bb8so3033079f8f.2 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=jUgvyo0oB0xWfq3HxOqyHqyJg7u4fc1wyBLWgqBwAJ99Ql9aGo24sHwhQhZ/LaMJLv ryzU8LRzHcmG/zbqBPhvdE65IrFrATurh8RUXUqRuhMuuRyIhvceldcbj4YYkZ9trHIw oW3UQDhsmSx5MnCtxasTpf8vrH1vGhYsztMkCPt4IQhTwdr/EShaqkpUrY1ESGMfC5uV Wm5i5W5ph5y7svqjpmDmVYxfGbAYsOd2TgrkhL9mvn2YtYUqXnJS47ZDFDeLvzHaZhfV a4k7jqY25vfOe1KxzTLI7A8rl5gz9KpxMkFlCWYrf5SOmvinqnJnl7Ou2hP4wF5wGeqG 55Bg== X-Forwarded-Encrypted: i=1; AJvYcCUfqT9ip1So3+O0pNkcuK1Ifh5451WaB8NJqBC18Qt9FtqVV1KBfkaECP3tpOLXOcYpasehP162Oygc@vger.kernel.org X-Gm-Message-State: AOJu0Yx0XabhWEqqNk059NHHoEB+6M+P5aC7BeoYKkdgqdhMrj/z/IKt Qz8FS4YHoys8b1h7uryWiShfeF+S4mwfb+LgdJiJcnn57B0SpkLiL75uSIbmQPyyiE4= X-Gm-Gg: ASbGncu3BdJid9XQGq0nmJbDviG6eQMQjVHr1hzdTMdGNa8YYG+m2IpUYSggZEAsMYY 1/8qwgudUzFyym+0Ufp8CpijCCW2dVp9cre7kvUhhbPaedCoulSTs9ASFVFMDZphXH+jogb15K+ 3HmDBcCjZdVwaCWfn4Sl3y8CJI9N2FIEtFeDgUNB+YZ7z4ty2WhtMHpdwgWPHLz+ncDiNzgzcPJ qlUB0sT6RpEcOJ6hVbhDM1vm6BaqWwT/0BjRQmfhgCzF3pjmdAt5WKFtaCrl6gPONijZboFQ82T 3Vzr1DJ8sqIhjUuwqFMCay7qDKS0ByhleWsE19sgs/lCTCKZfUnGdJIlPX/1SRleF6W9J8Nj9eB wOgWNE7NbYBmHUylYEzxL593J8zkdW1pyBnsq/o8Ta5CamcFjLLsX+HELJ4pv2Jk661kWpynrzx 3rjNi+JoBHT4LbzWCj9g== 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: 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 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/bURT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cwYOtgI8iL4oHcsGtUX 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 >