From nobody Tue Dec 16 21:42:25 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DAAECDB474 for ; Fri, 20 Oct 2023 10:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376911AbjJTKKM (ORCPT ); Fri, 20 Oct 2023 06:10:12 -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-Google-Smtp-Source: AGHT+IGKQwW17Fy4T1BraCaYfTjGgV0tF528AbO3jxsar61meA0nxPsdWi7srJYGCContnpddhZyYQ== 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: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Rob Herring --- .../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/Docum= entation/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 =20 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 purpos= e 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 =20 required: - compatible --=20 2.42.0 From nobody Tue Dec 16 21:42:25 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53B9CC25B43 for ; Fri, 20 Oct 2023 09:34:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376756AbjJTJeT (ORCPT ); Fri, 20 Oct 2023 05:34:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376853AbjJTJdq (ORCPT ); Fri, 20 Oct 2023 05:33:46 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72D3F10E9 for ; Fri, 20 Oct 2023 02:33:27 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-53e2308198eso843967a12.1 for ; Fri, 20 Oct 2023 02:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1697794403; x=1698399203; 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=8HAqgphO8/nmhxveYYWq+PwS2fkw9vCkjtGCsYcP8DE=; b=FYeQJxToEaN56qaSjTi3xRkXXFxyQCFqoO9YHmFtdDCoeL1iwFeClkv8LCZPlFhEzQ Laj94aMaSp0ObpaFepN5IsHCkBJAlI0nxiUe62fgR/ahMYbMyT1ThaSnjKFtFPJrzjBE OaInWd+rCFYFqYGkoHNJ7QWmsR1x1Wgp1rVHZJa0vo9KemFrDJcx4jx1bAnIbd3dMAXH ekqHIp/GF/zWBeyvolfi2OK70RWRAtnSs/OWgvdAjLp54PlPuktGNmLoAAWNcVIQuHBO HlRwv3kfTSY7L/C4/iBbKoWKDAqBWySmUTSdK5KVyRTtZnNtG3bka/2Z+CRIm57pQ0vG HCIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697794403; x=1698399203; 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=8HAqgphO8/nmhxveYYWq+PwS2fkw9vCkjtGCsYcP8DE=; b=o9cBXblF+fvW0zyR3zPU6ZlCfFeKZmvgSp8z7TKCJ5BjAoOAfBd9rpOx0x5+QRRzOR EH84DRg6skgtTCEjiDX4zdLvLhZpxzFYrt/x8mDeytnWwvcGS5mFvx01v33ib0y+NJDJ hUeMQmrQ0Ym1XaVX48vqKxx9lzU5ZloP2W8imdo1wUVI0CkNJWyFC4jLkM52+ixiG/7G NrlpZT43f15kV2b+QLxpp/10E3HFrAMriGlMFBh8Buj8ywTENLA+EDbzHZ3LLLzNwyph 2x3/+Eei/skosFiK+l4bV+U+DYgU78oGKsKUkjjfol/UbLbO28YRalu6WSundJHwpLY6 /CZw== X-Gm-Message-State: AOJu0YzhmxvuR00Nr2gztpqDpxhmzV+/RTY3lvxyKo7fXVGL1YY9iaCa xDp+TurfSmpqWOummXDFI3MsUA== X-Google-Smtp-Source: AGHT+IFP1JXUdkDGNVp03jbl+ZSC03News4HiarnwyTD2JABp9j7F8z4tTvDzgffGBOsPBTwQNK6FA== X-Received: by 2002:a17:907:9724:b0:9bd:f3b0:c087 with SMTP id jg36-20020a170907972400b009bdf3b0c087mr922647ejc.2.1697794403304; Fri, 20 Oct 2023 02:33:23 -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.22 (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:19 +0200 Subject: [PATCH v2 2/3] usb: typec: fsa4480: Add support to swap SBU orientation MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231020-fsa4480-swap-v2-2-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On some hardware designs the AUX+/- lanes are connected reversed to SBU1/2 compared to the expected design by FSA4480. Made more complicated, the otherwise compatible Orient-Chip OCP96011 expects the lanes to be connected reversed compared to FSA4480. * FSA4480 block diagram shows AUX+ connected to SBU2 and AUX- to SBU1. * OCP96011 block diagram shows AUX+ connected to SBU1 and AUX- to SBU2. So if OCP96011 is used as drop-in for FSA4480 then the orientation handling in the driver needs to be reversed to match the expectation of the OCP96011 hardware. Support parsing the data-lanes parameter in the endpoint node to swap this in the driver. The parse_data_lanes_mapping function is mostly taken from nb7vpq904m.c. Reviewed-by: Neil Armstrong Signed-off-by: Luca Weiss Reviewed-by: Heikki Krogerus --- drivers/usb/typec/mux/fsa4480.c | 71 +++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 71 insertions(+) diff --git a/drivers/usb/typec/mux/fsa4480.c b/drivers/usb/typec/mux/fsa448= 0.c index e0ee1f621abb..cb7cdf90cb0a 100644 --- a/drivers/usb/typec/mux/fsa4480.c +++ b/drivers/usb/typec/mux/fsa4480.c @@ -60,6 +60,7 @@ struct fsa4480 { unsigned int svid; =20 u8 cur_enable; + bool swap_sbu_lanes; }; =20 static const struct regmap_config fsa4480_regmap_config =3D { @@ -76,6 +77,9 @@ static int fsa4480_set(struct fsa4480 *fsa) u8 enable =3D FSA4480_ENABLE_DEVICE; u8 sel =3D 0; =20 + if (fsa->swap_sbu_lanes) + reverse =3D !reverse; + /* USB Mode */ if (fsa->mode < TYPEC_STATE_MODAL || (!fsa->svid && (fsa->mode =3D=3D TYPEC_MODE_USB2 || @@ -179,12 +183,75 @@ static int fsa4480_mux_set(struct typec_mux_dev *mux,= struct typec_mux_state *st return ret; } =20 +enum { + NORMAL_LANE_MAPPING, + INVERT_LANE_MAPPING, +}; + +#define DATA_LANES_COUNT 2 + +static const int supported_data_lane_mapping[][DATA_LANES_COUNT] =3D { + [NORMAL_LANE_MAPPING] =3D { 0, 1 }, + [INVERT_LANE_MAPPING] =3D { 1, 0 }, +}; + +static int fsa4480_parse_data_lanes_mapping(struct fsa4480 *fsa) +{ + struct fwnode_handle *ep; + u32 data_lanes[DATA_LANES_COUNT]; + int ret, i, j; + + ep =3D fwnode_graph_get_next_endpoint(dev_fwnode(&fsa->client->dev), NULL= ); + if (!ep) + return 0; + + ret =3D fwnode_property_read_u32_array(ep, "data-lanes", data_lanes, DATA= _LANES_COUNT); + if (ret =3D=3D -EINVAL) + /* Property isn't here, consider default mapping */ + goto out_done; + if (ret) { + dev_err(&fsa->client->dev, "invalid data-lanes property: %d\n", ret); + goto out_error; + } + + for (i =3D 0; i < ARRAY_SIZE(supported_data_lane_mapping); i++) { + for (j =3D 0; j < DATA_LANES_COUNT; j++) { + if (data_lanes[j] !=3D supported_data_lane_mapping[i][j]) + break; + } + + if (j =3D=3D DATA_LANES_COUNT) + break; + } + + switch (i) { + case NORMAL_LANE_MAPPING: + break; + case INVERT_LANE_MAPPING: + fsa->swap_sbu_lanes =3D true; + break; + default: + dev_err(&fsa->client->dev, "invalid data-lanes mapping\n"); + ret =3D -EINVAL; + goto out_error; + } + +out_done: + ret =3D 0; + +out_error: + fwnode_handle_put(ep); + + return ret; +} + static int fsa4480_probe(struct i2c_client *client) { struct device *dev =3D &client->dev; struct typec_switch_desc sw_desc =3D { }; struct typec_mux_desc mux_desc =3D { }; struct fsa4480 *fsa; + int ret; =20 fsa =3D devm_kzalloc(dev, sizeof(*fsa), GFP_KERNEL); if (!fsa) @@ -193,6 +260,10 @@ static int fsa4480_probe(struct i2c_client *client) fsa->client =3D client; mutex_init(&fsa->lock); =20 + ret =3D fsa4480_parse_data_lanes_mapping(fsa); + if (ret) + return ret; + fsa->regmap =3D devm_regmap_init_i2c(client, &fsa4480_regmap_config); if (IS_ERR(fsa->regmap)) return dev_err_probe(dev, PTR_ERR(fsa->regmap), "failed to initialize re= gmap\n"); --=20 2.42.0 From nobody Tue Dec 16 21:42:25 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0F9ACDB474 for ; Fri, 20 Oct 2023 10:10:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376973AbjJTKKT (ORCPT ); Fri, 20 Oct 2023 06:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376859AbjJTJds (ORCPT ); Fri, 20 Oct 2023 05:33:48 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 637C719B9 for ; Fri, 20 Oct 2023 02:33:28 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-53de0d1dc46so836505a12.3 for ; Fri, 20 Oct 2023 02:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1697794404; x=1698399204; 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=wBM6ErArjaeuBbIlwBAlMfcfi+6e43gtVVtakkQbEgY=; b=aBYf6lF9OSoYYDPCHhRiksf2aJVMbKAK+E69a1WdAN9bnaaEF2vOud7VRVAQScOcna 6CoYbcm+aCLtPOhj0aqPuc+yTpwpjrjFDptuxwPcrECww+bGFiirr1ua/4SVesOU4mnl tQvt7tLPg5AuVLyLc2JYLDwZvlo5RIblVG4YDfy/6sI/8Scq6htvmmyXwqsinRnCy3Ys IHGXUDg31gx65gHdLLqHO2Is1MaOSkrp5ZfMRSPk8yfrY84AHVZBROpoKScHxJylCUMj Bz0ywNAd7vmBE0S44ERwaS+akUeITa8Q+02bzzlIeNppdyArdQSG75KpP6V0E3hYutsX fJ1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697794404; x=1698399204; 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=wBM6ErArjaeuBbIlwBAlMfcfi+6e43gtVVtakkQbEgY=; b=B/VvDyjWgcDnB/EkTjQ3Rnaj4Sg3AQAEawp/iEd1hcfE7Yyw3ZiNuHwqolzCzXuo2P l3YO97sGnCAoY2pFlVh8cfnrah79CBaONhObIyZYVZpXe8Xq40SvYJDZRQOwh3X0wjjp N5f8SD7QW9+sAu5C3f8a9LromuKickLSlAlzlr/SxGr6ncYrll+nXzkX7+O9iwYpLsaV DBunYWm2iXGk5VcNtkP5x8QyaZheBrRh59kmUTObjX09x0DdF/jVZXFaT5r+2Vn1n4vh 4WEKLdb1VenP5XhPTblAgJHI2s/PnwarwUOoqD9fVODNU0wF/eqx9bmw9rz3KW1xhMfd xPdw== X-Gm-Message-State: AOJu0YxuTvKY6Rai4adFxzdXx36CD5whBvzfT6HRrPF/nmfXzwSZjCm5 WxaNYBFTLHFrOsdASj8Mb3x7EQ== X-Google-Smtp-Source: AGHT+IEmwTBub4TTdlz1jMLWOrqXIJ66kAQDBOiG76tfqbcR00lkfhKrg/qt9xMsw3VGkkS/X7RPHA== X-Received: by 2002:a17:907:786:b0:9c4:41c9:6ac6 with SMTP id xd6-20020a170907078600b009c441c96ac6mr1006182ejb.33.1697794404139; Fri, 20 Oct 2023 02:33:24 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 02:33:23 -0700 (PDT) From: Luca Weiss Date: Fri, 20 Oct 2023 11:33:20 +0200 Subject: [PATCH v2 3/3] dt-bindings: usb: fsa4480: Add compatible for OCP96011 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231020-fsa4480-swap-v2-3-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Orient-Chip OCP96011 is generally compatible with the FSA4480, add a compatible for it with the fallback on fsa4480. However the AUX/SBU connections are expected to be swapped compared to FSA4480, so document this in the data-lanes description. Signed-off-by: Luca Weiss Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml | 18 ++++++++++++++= ---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml b/Docum= entation/devicetree/bindings/usb/fcs,fsa4480.yaml index 86f6d633c2fb..f9410eb76a62 100644 --- a/Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml +++ b/Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml @@ -11,8 +11,12 @@ maintainers: =20 properties: compatible: - enum: - - fcs,fsa4480 + oneOf: + - const: fcs,fsa4480 + - items: + - enum: + - ocs,ocp96011 + - const: fcs,fsa4480 =20 reg: maxItems: 1 @@ -53,16 +57,22 @@ properties: - const: 0 - const: 1 description: | - Default AUX/SBU layout + Default AUX/SBU layout (FSA4480) - AUX+ connected to SBU2 - AUX- connected to SBU1 + Default AUX/SBU layout (OCP96011) + - AUX+ connected to SBU1 + - AUX- connected to SBU2 - items: - const: 1 - const: 0 description: | - Swapped AUX/SBU layout + Swapped AUX/SBU layout (FSA4480) - AUX+ connected to SBU1 - AUX- connected to SBU2 + Swapped AUX/SBU layout (OCP96011) + - AUX+ connected to SBU2 + - AUX- connected to SBU1 =20 required: - compatible --=20 2.42.0