From patchwork Sun Sep 1 04:06:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 13786300 Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) (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 56F19149C7C for ; Sun, 1 Sep 2024 04:07:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725163652; cv=none; b=Hq5v9bsBfs+vP0uj47Y6l2vEToMJeK4EmsMfvjWBJTY4o7uKAmTq9CmC5AdnhyUzSsQu34S+09H/3GPmoTDEKoXl5+nggVE9pZeu1+EfHxIa/Q7zQhozuY+ynX33KRE7Zsk8oanQ70wk6hnNyIBlboMhcRRjmblm+/pGgYxVTOk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725163652; c=relaxed/simple; bh=RUpzr9ZKBqIyyOycrXXNoFY+qDo5GiSWo5OPRiGL5UY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZZhU7XiZbvO2L0FWYGu49TMl949AnVBwmM3KqNfM7r/lCXVmZeNC84+krEyhWtnGb74mZZqbeMH4rp3CUTvGgGlXnUlviytK3VSX509cMgAG4Thb4RRuxEvSQRpypOLa57GWkDOF4rNEW557SBwh8JrvyZkevmjJObJOAGVEaaY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=ZhCd7X2/; arc=none smtp.client-ip=209.85.167.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ZhCd7X2/" Received: by mail-oi1-f178.google.com with SMTP id 5614622812f47-3df02c407c4so1884740b6e.1 for ; Sat, 31 Aug 2024 21:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1725163650; x=1725768450; darn=lists.linux.dev; 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=Wd502yvg5fXt4u5g230ZTpdeyPtCH4Yq39fj6qZgjT4=; b=ZhCd7X2/kP+U/lHz25MZIHFr4eb23I9hd1KM//qokpy+Bqu9iRFItJOA43pBtAlFTN bc637f752voyA1gNex3UczECzb9eU+ogh0LOfd3WlAP23iYhBo3OwdRvLCN9zR34fsmI Eq6S9OELxVJxandyUcdwQNaV8y31+7VgY8ZzE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725163650; x=1725768450; 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=Wd502yvg5fXt4u5g230ZTpdeyPtCH4Yq39fj6qZgjT4=; b=Asguk4H53LMM4ahveD6pj/wHP7XzPKSob+BlOycTKlEZklqOSwhxRLrwoua+zaU6iu Qx2Lpd/pm8I3ul5a197mygPnujipl92Qvvsi/d7m5UdrKufbZmAE+dvlXs3MtDp1ssys b5//K+oKTJ7S9Fh71H74s4NwbAHeNF4/d0nzhj/c7rniFOJY4fIrzwnfonzfSyaxoH4p JyiLq9qAPNFh4BBHrEfAj4s9zwipPJrOqrWA7knQpO+1XWs//MEmVFsWKcxI0MMnV1fF 37Vc8p0CuGvkfp4aJ7JFmSLKVxnPk5MCZRZ0idCNK7j//6vpcSpKBAMWcEuJf/TBrtan JrqA== X-Gm-Message-State: AOJu0YyqdQtw4M7IJGTXzEwOZK7h6V9Q4JfabvDltH68hbB9JmRrxeWF 2WS4c7AfK/EuMzPfw2q0BjOavJtqnpHuWf755utoAzICthQkS09g3CNZaaiIyHmN4jFLeq3C1vM = X-Google-Smtp-Source: AGHT+IGL4OiCHHZFsgZPnNJ0c3FJUh9XkC9nxzYLew8976ZXhgGWIxU50B53RDoHj8H5q7Hy8p3c6w== X-Received: by 2002:a05:6808:318c:b0:3dc:299d:c505 with SMTP id 5614622812f47-3df22d06635mr3681624b6e.37.1725163650076; Sat, 31 Aug 2024 21:07:30 -0700 (PDT) Received: from localhost (210.73.125.34.bc.googleusercontent.com. [34.125.73.210]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-715e5763a67sm4833459b3a.216.2024.08.31.21.07.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 31 Aug 2024 21:07:29 -0700 (PDT) From: Stephen Boyd To: chrome-platform@lists.linux.dev Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, devicetree@vger.kernel.org, Douglas Anderson , Pin-yen Lin , Andrzej Hajda , Benson Leung , Conor Dooley , Daniel Vetter , David Airlie , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, Guenter Roeck , Jernej Skrabec , Jonas Karlman , Krzysztof Kozlowski , Laurent Pinchart , Lee Jones , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Prashant Malani , Robert Foss , Rob Herring , Thomas Zimmermann , Tzung-Bi Shih , Alexandre Belloni , Andy Shevchenko , Daniel Scally , Greg Kroah-Hartman , Heikki Krogerus , Ivan Orlov , linux-acpi@vger.kernel.org, linux-usb@vger.kernel.org, Mika Westerberg , "Rafael J . Wysocki" , Sakari Ailus , Vinod Koul , "Rob Herring (Arm)" Subject: [PATCH v4 13/18] dt-bindings: usb-switch: Extend for DisplayPort altmode Date: Sat, 31 Aug 2024 21:06:51 -0700 Message-ID: <20240901040658.157425-14-swboyd@chromium.org> X-Mailer: git-send-email 2.46.0.469.g59c65b2a67-goog In-Reply-To: <20240901040658.157425-1-swboyd@chromium.org> References: <20240901040658.157425-1-swboyd@chromium.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Extend the usb-switch binding to support DisplayPort (DP) alternate modes. A third port for the DP signal is necessary when a mode-switch is muxing USB and DP together onto a usb type-c connector. Add data-lanes to the usbc output node to allow a device using this binding to remap the data lanes on the output. Add an example to show how this new port can be used. Reviewed-by: Rob Herring (Arm) Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc: Benson Leung Cc: Guenter Roeck Cc: Prashant Malani Cc: Tzung-Bi Shih Cc: Cc: Cc: Pin-yen Lin Signed-off-by: Stephen Boyd --- .../devicetree/bindings/usb/usb-switch.yaml | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/usb-switch.yaml b/Documentation/devicetree/bindings/usb/usb-switch.yaml index f5dc7e23b134..816f295f322f 100644 --- a/Documentation/devicetree/bindings/usb/usb-switch.yaml +++ b/Documentation/devicetree/bindings/usb/usb-switch.yaml @@ -52,6 +52,14 @@ properties: endpoint: $ref: '#/$defs/usbc-in-endpoint' + port@2: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + + properties: + endpoint: + $ref: '#/$defs/dp-endpoint' + oneOf: - required: - port @@ -65,6 +73,19 @@ $defs: $ref: /schemas/graph.yaml#/$defs/endpoint-base description: Super Speed (SS) output endpoint to a type-c connector unevaluatedProperties: false + properties: + data-lanes: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + An array of physical USB Type-C data lane indexes. + - 0 is SSRX1 lane + - 1 is SSTX1 lane + - 2 is SSTX2 lane + - 3 is SSRX2 lane + minItems: 4 + maxItems: 4 + items: + maximum: 3 usbc-in-endpoint: $ref: /schemas/graph.yaml#/$defs/endpoint-base @@ -79,7 +100,75 @@ $defs: items: maximum: 8 + dp-endpoint: + $ref: /schemas/graph.yaml#/$defs/endpoint-base + description: DisplayPort (DP) input from the DP PHY + unevaluatedProperties: false + properties: + data-lanes: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + An array of physical DP data lane indexes + - 0 is DP ML0 lane + - 1 is DP ML1 lane + - 2 is DP ML2 lane + - 3 is DP ML3 lane + oneOf: + - items: + - const: 0 + - const: 1 + - items: + - const: 0 + - const: 1 + - const: 2 + - const: 3 + examples: + # A USB + DP mode and orientation switch which muxes DP altmode + # and USB onto a usb-c-connector node. + - | + device { + mode-switch; + orientation-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + endpoint { + remote-endpoint = <&usb_c_connector>; + data-lanes = <0 1 2 3>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + endpoint { + remote-endpoint = <&usb_ss_phy>; + }; + }; + + port@2 { + reg = <2>; + #address-cells = <1>; + #size-cells = <0>; + + endpoint { + remote-endpoint = <&dp_phy>; + data-lanes = <0 1 2 3>; + }; + }; + }; + }; + # A USB orientation switch which flips the pin orientation # for a usb-c-connector node. - |