Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp34370rwb; Wed, 10 Aug 2022 14:17:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR7nmENmaff6Z4IbW49V88XARVOHbFFEV+nkzw6s6UT46A/fGlm44CODh2CIv39JhxXWkrdn X-Received: by 2002:a63:905:0:b0:415:fcde:2423 with SMTP id 5-20020a630905000000b00415fcde2423mr25031474pgj.374.1660166265444; Wed, 10 Aug 2022 14:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660166265; cv=none; d=google.com; s=arc-20160816; b=zM6GDuv+nlWsh8QbJd/D8gjvzJmlbS8JDYK94j1jVgs9VsXw3nTV6nJggr/r6Wmwj9 ptq4TqZ3nbFU4VCN6df4YQIcqDK0SYEGsZMyyyyBQ8HZYWhQ/d4egPTo2jo8KLr2W+0o RESONZ/f9UcX0FMo6UY2SjKGtGjT+tNflontlZcpDjjoR0ier1aHnm+lsyn7qLcPE7x0 0VJmqQk8Omfxkml64A43Ns+tm98Oc8uLuRMP2YGwkPRenoZl4ZDPgd6g3Ff83L5ncP5K Pc95ul1V0AzJvxIZQv9zh4Z99hQKlnaFR9DI2TtInKjImQsFj92XC1DVeXp7mBUJcM5l zw0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0jz01lGJEb0t3lu10zSjIgJPn+MnHrxkIduNnoao9H4=; b=MAEAPI54Kiwr3frGS+kgXjNuRgjscfD3/0dJ4G8/1C2Qgn6ixBkKg/W+kPfj9dCJRc uYbc6qumeMeQIBOOp5p4H7xNWswROpTAe44x/Fqa1kPOw/xEe5ZLY88GPoqtHicfJ9BM IUOyg36KbMj3voNDpx4rTYHYfvz8aEHOCvi601rPanUmhQ8p9RluAHPAtHLJxXeRMk5y FBYMy6bkDaZGTLY/snHms+/oANcT2P9JTVvsFgucMIl3aoLB/FlZi+ZYUmNYsq3v2N7w fCEKGibol5unOuMFh+GmFMZchDGoufO5qgxZERyiIkLCIkFfMSCAdgJe5gQXuzyhiOdx zFZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GeyWze8A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l14-20020a056a00140e00b0052b1e2f86ccsi3442703pfu.321.2022.08.10.14.17.07; Wed, 10 Aug 2022 14:17:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GeyWze8A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233423AbiHJUpW (ORCPT + 99 others); Wed, 10 Aug 2022 16:45:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233227AbiHJUpR (ORCPT ); Wed, 10 Aug 2022 16:45:17 -0400 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60C6C18E3B for ; Wed, 10 Aug 2022 13:45:15 -0700 (PDT) Received: by mail-ot1-x336.google.com with SMTP id f3-20020a9d0383000000b00636d99775a2so7744660otf.2 for ; Wed, 10 Aug 2022 13:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=0jz01lGJEb0t3lu10zSjIgJPn+MnHrxkIduNnoao9H4=; b=GeyWze8A/Hj6zZTRKWs43aYe2s2c2hOLFuen/89ktPtJe/C0cZIvHbaw8dVdRS21zT z+tYFsbYoQKV1lQdgPQQmljNT2/lJcoBBksJ+wGbfMCVOL3YJnLFxjehw7RFSyNQtFZh QT5V1hruB1vcoQV796EbHngJ+k4GkMTbamPR2OWGINtEGQPKj1skB1SzGZx2mxXn/jix ApRVTeqf9G1o51ZH3sR3cPUToyEiToCUDcO7h5bmMFzPfPVCU8duDCfeJWWi/h4DkBH6 mXnxA0Q38v2xoW7YpN6It+DoreRLALYLviMbDGzRgNhc6/nwIaSFwjwjH55fnU/6QW45 tI4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=0jz01lGJEb0t3lu10zSjIgJPn+MnHrxkIduNnoao9H4=; b=1+wTtu4Q1oZRZx6Iln/M6MX+3V6NuKYNf9SAEEZEGl/IJmnrEUh1RVz6sZ57hWLZsc gC+MsjMW5hbSfODCPZTQ8hSNCHZUmQCSLoZTyzAy41DfZ1qnSqXnYSv2hSshFspVxdkF kBN9mFb2G8BoRMRfuBeOQnhE2t3eFQUDWrMJ6oXD4P+ArQHp/JixBT/zAItVyzVUvr1M fIVnwc4qobIv7EfwT6ykP8v3amjlPl77MsJf19jibOqWdMPJg1iWKCBL24KgSVr3uFRz YtJQAKmkQUHiXL709hfnMnDTVf9b3AwW5LhMZxnB0PBPLc/Q9/PAQqjKFfUwKCFN+iZg 7Cng== X-Gm-Message-State: ACgBeo0dJsymSV3SeLX3nkJYgIISlxg30NWzL01NO4VN02uGTaCK25ef strq3SH+m1/69bN+QLINjSiRHw== X-Received: by 2002:a9d:6314:0:b0:614:d56f:c7a with SMTP id q20-20020a9d6314000000b00614d56f0c7amr11273906otk.281.1660164314682; Wed, 10 Aug 2022 13:45:14 -0700 (PDT) Received: from ripper.. (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id f12-20020a056870548c00b000f2455e26acsm3968218oan.48.2022.08.10.13.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 13:45:14 -0700 (PDT) From: Bjorn Andersson To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Heikki Krogerus Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: usb: Introduce GPIO-based SBU mux Date: Wed, 10 Aug 2022 13:47:49 -0700 Message-Id: <20220810204750.3672362-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220810204750.3672362-1-bjorn.andersson@linaro.org> References: <20220810204750.3672362-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce a binding for GPIO-based mux hardware used for connecting, disconnecting and switching orientation of the SBU lines in USB Type-C applications. Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/usb/gpio-sbu-mux.yaml | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml diff --git a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml new file mode 100644 index 000000000000..7d8aca40c7ca --- /dev/null +++ b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/usb/gpio-sbu-mux.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: GPIO-based SBU mux + +maintainers: + - Bjorn Andersson + +description: + In USB Type-C applications the SBU lines needs to be connected, disconnected + and swapped depending on the altmode and orientation. This binding describes + a family of hardware which perform this based on GPIO controls. + +properties: + compatible: + items: + - enum: + - onnn,fsusb43l10x + - pericom,pi3usb102 + - const: gpio-sbu-mux + + enable-gpios: + description: Switch enable GPIO + + select-gpios: + description: Orientation select + + vcc-supply: + description: power supply + + mode-switch: + description: Flag the port as possible handle of altmode switching + type: boolean + + orientation-switch: + description: Flag the port as possible handler of orientation switching + type: boolean + + port: + $ref: /schemas/graph.yaml#/properties/port + description: + A port node to link the SBU mux to a TypeC controller for the purpose of + handling altmode muxing and orientation switching. + +required: + - compatible + - enable-gpios + - select-gpios + - mode-switch + - orientation-switch + - port + +additionalProperties: false + +examples: + - | + #include + + sbu-mux { + compatible = "pericom,pi3usb102", "gpio-sbu-mux"; + + enable-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>; + select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>; + + mode-switch; + orientation-switch; + + port { + endpoint { + remote-endpoint = <&pmic_glink_dp0_sbu>; + }; + }; + }; +... -- 2.35.1