Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp911268rdb; Fri, 20 Oct 2023 03:11:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHV/KTSjGQhpzsPEtZJCKoreJeT4w9SsNxt/KzwrupAZS+kX5D/7OMl9Zyamq0FmAPegT3i X-Received: by 2002:a05:6a20:7925:b0:15c:7223:7bb1 with SMTP id b37-20020a056a20792500b0015c72237bb1mr1202530pzg.20.1697796676836; Fri, 20 Oct 2023 03:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697796676; cv=none; d=google.com; s=arc-20160816; b=EkKudpxu64BLeegCjzicbghz+dRuIQYeDbeMnm8j6Klgf9YDyhc5IvetJaFr0+hF7j nn1pbFP7SX9srQSRVnaABRg8PIj6mmxOgqpJ5lqxfIYm3arewxKngW1o92wptA/QLoST OwR6CkLPk/g0cfFP35U6oTJTlqRiERms8aEd6Ult8qAmngTXlwaXgNJb5ontFoNlWOmd gWvP8AdxnJAuLvCFOXJNqJOuHx1T0L4XbLRnEls1i1zoMlYuGJxrzwEwJ4V+dU0a7bAW jB57KEEvYvpBYbHN6yyLuKCHOIekzi2I0ZK8Hha8XFCXX+tHyh5DAhP+XUpzZ6CfDHNt uHOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=NPt+CEIhCocuFEjYEJNPHpjjDpAfwHYTgOkmzxyzoz0=; fh=ghpUNpHqcNrQIocPjfnwe/5quPeBE+ramd9T7xbSKxs=; b=twwW5SmgZfJLKr4pES2zkXW7q/8Wj0AHsV2gHUbB44j2+EYPW8bBG0oxlHGYnNZL1e taCTL3TMYD4u0gIKDAcgzTkiM9BLzbnNjMslwhj/DjKTGrfxP5pAYvMr2ol8RQzYRXOc ks71gi1yF06bloj7p1Le59McAvid6Wun0dpwuiUr1kOU+AScckPeApDj3teqmww1jLuy LMLNlMap2jh7zIn4XMOofX2Pzy64AQ5KRm0kjQXFNg6mAHw/4zgZmBom324RdwYTLX0P ouL1N8CC6LH+j41xhe/fXV2fyko3qWqfE/ACNUhmRJv4CqbsKf5AclTQtpJXoA22BmEj FlFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=zaGWjaxj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id m13-20020a17090a34cd00b002774cdc919csi3866870pjf.176.2023.10.20.03.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 03:11:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=zaGWjaxj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 07A5B82D996B; Fri, 20 Oct 2023 03:11:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376883AbjJTKKJ (ORCPT + 99 others); Fri, 20 Oct 2023 06:10:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376843AbjJTJdn (ORCPT ); Fri, 20 Oct 2023 05:33:43 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C1A8199F for ; Fri, 20 Oct 2023 02:33:24 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9be3b66f254so89116966b.3 for ; Fri, 20 Oct 2023 02:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1697794402; x=1698399202; darn=vger.kernel.org; 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=NPt+CEIhCocuFEjYEJNPHpjjDpAfwHYTgOkmzxyzoz0=; b=zaGWjaxjbEFFV3LGlU1SXBviOittO024w4VisuWiBTKh6M/sf0Gi8iR/x7LTmegJo2 PxSaDSqcL2SO028gkWNoHF0SM4f6sNNs9hUMGrwDqAz+I2aDzo7BMr+iBnbRBpT+ThBx lfx1ZJwPWUSOEKgRMCMDxqcQ4jy3IJ3GS+R/tXTdCMqOd4woPcFPAC6lH2vFj8hSLmxo 3JHYFNieswSrRRcz3NjKInKALq4e80ZUDqClOkxRn98azUJI1cbqHyNEGkytSAjxMAmz 7oOdEikDAwcmGR4m9s9pjYbtUUvJa7KbyCL1d57bnCJOSJl4NKIa4Evir24GJ8qqiuu4 qD6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697794402; x=1698399202; 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=NPt+CEIhCocuFEjYEJNPHpjjDpAfwHYTgOkmzxyzoz0=; b=sm1jxG4mvw6tOoi9TE4y/1nHUDjD/1CM/XkmObwheZ0M4oNEeM5Pg2wrgBYidNLlN4 4FVJFyWXJdkiJwGwwd4Cl6rKm/LBxj2RsEKKsNmo3OvgCQIETWdLEjUvTaR25kyCDSme FhBgyT9Jd5VpoJTCmoKlrT8Sqw2Su2r7ba5hcY3kUuY0erq3O2/EdFeFPcCunTa4TO6U W9ZjGUlN5GZJvFlFCX9wkYJrBmmAMNwIdGRqZXELE7iwJuzMURRIpB7u8kJDWia2+xgU cW07AXi1wLN1O0CA4mtwVta92yiBb0+zGZKWGnVFPkF3PqC2nEFT3EgQ7swPhixyeGG2 N8EA== X-Gm-Message-State: AOJu0YxBir0GA++xcIiAJwc5hCPNBoC47IAKYafquc4S9ywjdg5RjMtn a8U49v3cpuKmUcJfrufe9tCukg== X-Received: by 2002:a17:906:da82:b0:9ad:a4bd:dc67 with SMTP id xh2-20020a170906da8200b009ada4bddc67mr1041118ejb.50.1697794402540; Fri, 20 Oct 2023 02:33:22 -0700 (PDT) Received: from otso.luca.vpn.lucaweiss.eu (k10064.upc-k.chello.nl. [62.108.10.64]) by smtp.gmail.com with ESMTPSA id t15-20020a1709066bcf00b009a13fdc139fsm1102535ejs.183.2023.10.20.02.33.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 02:33:22 -0700 (PDT) From: Luca Weiss Date: Fri, 20 Oct 2023 11:33:18 +0200 Subject: [PATCH v2 1/3] dt-bindings: usb: fsa4480: Add data-lanes property to endpoint MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231020-fsa4480-swap-v2-1-9a7f9bb59873@fairphone.com> References: <20231020-fsa4480-swap-v2-0-9a7f9bb59873@fairphone.com> In-Reply-To: <20231020-fsa4480-swap-v2-0-9a7f9bb59873@fairphone.com> To: Heikki Krogerus , Greg Kroah-Hartman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 20 Oct 2023 03:11:08 -0700 (PDT) Allow specifying data-lanes to reverse the muxing orientation between AUX+/- and SBU1/2 where necessary by the hardware design. In the mux there's a switch that needs to be controlled from the OS, and it either connects AUX+ -> SBU1 and AUX- -> SBU2, or the reverse: AUX+ -> SBU2 and AUX- -> SBU1, depending on the orientation of how the USB-C connector is plugged in. With this data-lanes property we can now specify that AUX+ and AUX- connections are swapped between the SoC and the mux, therefore the OS needs to consider this and reverse the direction of this switch in the mux. _______ _______ | | | |-- HP --| | |-- MIC --| |or SoC | | MUX |-- SBU1 ---> To the USB-C Codec |-- AUX+ --| |-- SBU2 ---> connected |-- AUX- --| | ______| |_____| (thanks to Neil Armstrong for this ASCII art) Signed-off-by: Luca Weiss --- .../devicetree/bindings/usb/fcs,fsa4480.yaml | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml b/Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml index f6e7a5c1ff0b..86f6d633c2fb 100644 --- a/Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml +++ b/Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml @@ -32,10 +32,37 @@ properties: type: boolean port: - $ref: /schemas/graph.yaml#/properties/port + $ref: /schemas/graph.yaml#/$defs/port-base description: A port node to link the FSA4480 to a TypeC controller for the purpose of handling altmode muxing and orientation switching. + unevaluatedProperties: false + + properties: + endpoint: + $ref: /schemas/graph.yaml#/$defs/endpoint-base + unevaluatedProperties: false + + properties: + data-lanes: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + Specifies how the AUX+/- lines are connected to SBU1/2. + oneOf: + - items: + - const: 0 + - const: 1 + description: | + Default AUX/SBU layout + - AUX+ connected to SBU2 + - AUX- connected to SBU1 + - items: + - const: 1 + - const: 0 + description: | + Swapped AUX/SBU layout + - AUX+ connected to SBU1 + - AUX- connected to SBU2 required: - compatible -- 2.42.0