From patchwork Fri Nov 5 03:35:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 1551209 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=HhHEAGDK; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HlmMN2K3Mz9sfG for ; Fri, 5 Nov 2021 14:34:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232211AbhKEDgn (ORCPT ); Thu, 4 Nov 2021 23:36:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231697AbhKEDgl (ORCPT ); Thu, 4 Nov 2021 23:36:41 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75F13C061203 for ; Thu, 4 Nov 2021 20:34:02 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id t30so11628106wra.10 for ; Thu, 04 Nov 2021 20:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=28ILwbMYYFYo+iwfSu1OAenWdD1ePSsQXhSvTodKWcU=; b=HhHEAGDK2IjCv2CBs5WF0mta/GRYPDsyYQmRLzp2CK8tUu2Th0Ty8RtSKG7r+sSSSh 229b2PLb/4TnmDMpbAY+wFLFGvt28D5D0cYriIG35eRRevKs4CG853xawj0BytHSlKpF 7UpULrjozx/+iT1+E7/t8MTV/xfrwyiG7XpQvOz4zjLQxufOWI9TKq5QI6Bv9xD17xAN FwJoe7/7y2nDqK4ockJStJeglwLfYaroytvMzT6hOHx9xm3e8SI7h4xpkDG71vA0H04f Wf9K6nHRCVP0HzlBR0mBRyym9Rb2UDWmva0ddLGFW5+IkkUkVyF+ZixHiWGRmMqS4XDp w9sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=28ILwbMYYFYo+iwfSu1OAenWdD1ePSsQXhSvTodKWcU=; b=BYP243tZI1p0BlyYEW2QrEw/FPSxerh5MoiQ9sb+EWLEWXAqH3FkhFSpBqKyaFH91F 729BZaDJpIW62lo0JlS9wnnI3xh8DuOcF1+qd4LwT9Stv+dDBSnUNwVa770xqyTrsWs2 M6oPsVaNojPy2jwSjB6FhOme7uNtqvmiwNOiJAhoekl3r7UJov7POXo5FZ9Co8L6v4Gq SGwnbY/rqJMwc5v+aDcpP1JnBJ6AR2q8jG0gri/sM5bBAwtYdl5Dv6uSakc4wkBUJlit fFNFTavI/BKxHv3KJBgv45LODu1dbMDnPo5ZbeSQptL17xyIVHuHeHL/U0kJEgxnqIRy brdA== X-Gm-Message-State: AOAM533eqHKN46he+NmYyn3KSmqze6oKVnGFgy1eXuke0bDbSubJHd5m DG8fzCOp6LiHNaAEUBZd2KRplw== X-Google-Smtp-Source: ABdhPJwuFzFUhLQ6Z0rTNlK73tfbbfJ/2AwH112xirfs9SRXhWLsPl2JYNTJKydkJziC59D9gYUNjA== X-Received: by 2002:adf:c986:: with SMTP id f6mr74183765wrh.216.1636083241011; Thu, 04 Nov 2021 20:34:01 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id l15sm2546296wme.47.2021.11.04.20.33.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 20:34:00 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, bjorn.andersson@linaro.org, robh+dt@kernel.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: wcheng@codeaurora.org, bryan.odonoghue@linaro.org Subject: [PATCH v3 1/7] dt-bindings: usb: Add qcom,pmic-usb-typec dt-binding header Date: Fri, 5 Nov 2021 03:35:52 +0000 Message-Id: <20211105033558.1573552-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211105033558.1573552-1-bryan.odonoghue@linaro.org> References: <20211105033558.1573552-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Adds a series of defines which are used in the DTS and type-c driver for identifying interrupts. Signed-off-by: Bryan O'Donoghue --- .../usb/typec/tcpm/qcom,pmic-usb-typec.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/dt-bindings/usb/typec/tcpm/qcom,pmic-usb-typec.h diff --git a/include/dt-bindings/usb/typec/tcpm/qcom,pmic-usb-typec.h b/include/dt-bindings/usb/typec/tcpm/qcom,pmic-usb-typec.h new file mode 100644 index 0000000000000..263c999b59b8d --- /dev/null +++ b/include/dt-bindings/usb/typec/tcpm/qcom,pmic-usb-typec.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +#ifndef _DT_BINDINGS_TCPM_QCOM_PMIC_USB_TYPEC_H +#define _DT_BINDINGS_TCPM_QCOM_PMIC_USB_TYPEC_H + +#define PMIC_TYPEC_OR_RID_IRQ 0x0 +#define PMIC_TYPEC_VPD_IRQ 0x1 +#define PMIC_TYPEC_CC_STATE_IRQ 0x2 +#define PMIC_TYPEC_VCONN_OC_IRQ 0x3 +#define PMIC_TYPEC_VBUS_IRQ 0x4 +#define PMIC_TYPEC_ATTACH_DETACH_IRQ 0x5 +#define PMIC_TYPEC_LEGACY_CABLE_IRQ 0x6 +#define PMIC_TYPEC_TRY_SNK_SRC_IRQ 0x7 + +#endif From patchwork Fri Nov 5 03:35:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 1551210 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=mXE8Q0uG; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HlmMN4dmzz9t0G for ; Fri, 5 Nov 2021 14:34:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232222AbhKEDgn (ORCPT ); Thu, 4 Nov 2021 23:36:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232197AbhKEDgm (ORCPT ); Thu, 4 Nov 2021 23:36:42 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64323C061203 for ; Thu, 4 Nov 2021 20:34:03 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id t30so11628133wra.10 for ; Thu, 04 Nov 2021 20:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lhqgd3DToNAI8CEkZ8YF5NvSXYG7OMrxu1WLFPVO2rk=; b=mXE8Q0uGgaB/sqQru3B6TsxyXlgdh2VNQ1PDvumPEnEc4akYBreQxr1IRRyyeYYLCj PBdB2r5wIqrDJa3NzA3NKOY7c4PPEG8+wu0/xPbXbhm9xrsvo731P6gxHRfLSmnKY/fH vh8FVyfmn0RkByZu6z4Cpqa6zO+mbfNF9CbU8PpSJgRad/N7qmk3b1uRAlymgVDfcFDk R+FKO1OIeLAxqKeDOP4J2206HFuwsG+9JXCouXWByse93lxXtUbXFevFYaWzwCXCLg16 iB/eH9lZMMXSdGJBeLxpgDNCCvYCWqDKtvnF+WvsfIckhfZsAUWh+gv8oxjzhg4XSWRu 5KfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lhqgd3DToNAI8CEkZ8YF5NvSXYG7OMrxu1WLFPVO2rk=; b=wYwaoOmvLnvPirOiAGrZumN5EHcfTOZWJJ+uxq5hg032HBka7z6BA8BHrBc/p5FNuX PHc6qVb4jtSCUwWeCu4Tz1O57rIYON8CF1u7F6yw2ZEFmqtdycikyy/xPYDurLia9OmW 16nKmkKLMFgFkZvPG8cg7C90jsg+4cHKougkNfJGtNTRVrGbZEyUnejGSSn8H6KdiHla L7HLFlN40hAbj+3CILDoI1ZM3E41zAFSqdNfmq22EUSKb3wQDD50ufHNj7fSQ5Ig963F tboKSyVsLiDS+jh0d1MVdBz5MNyV4qBMWUZ6asSXXx951BEbXrkJKfmgpcY4Oqv63KJS NA/A== X-Gm-Message-State: AOAM532MZL3wKdpRgz8jrVsnxuMESQy3K0INwM8dlFU6yf1FiaaZgiIk j1SieIg6a6wFfgpX8jGKU/1UCA== X-Google-Smtp-Source: ABdhPJySZAj8LTU/Bpy78ibiDmGWtcrKnAuW1kkFvMguIassoLQ8Yw0Z1weO+fQjpprtCfzLalR5fQ== X-Received: by 2002:adf:fb09:: with SMTP id c9mr13110322wrr.223.1636083242075; Thu, 04 Nov 2021 20:34:02 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id l15sm2546296wme.47.2021.11.04.20.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 20:34:01 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, bjorn.andersson@linaro.org, robh+dt@kernel.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: wcheng@codeaurora.org, bryan.odonoghue@linaro.org Subject: [PATCH v3 2/7] dt-bindings: usb: Add Qualcomm PMIC type C controller YAML schema Date: Fri, 5 Nov 2021 03:35:53 +0000 Message-Id: <20211105033558.1573552-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211105033558.1573552-1-bryan.odonoghue@linaro.org> References: <20211105033558.1573552-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a YAML binding for the type-c silicon interface inside Qualcomm's pm8150b hardware block. The type-c driver operates with a pdphy driver inside of a high level single TCPM device. Based on original work by Wesley. Signed-off-by: Wesley Cheng Signed-off-by: Bryan O'Donoghue --- .../bindings/usb/qcom,pmic-typec.yaml | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml new file mode 100644 index 0000000000000..bbe07269e92b8 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml @@ -0,0 +1,91 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/usb/qcom,pmic-typec.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm PMIC based USB type C Detection Driver + +maintainers: + - Bryan O'Donoghue + +description: | + Qualcomm PMIC Type C Detect + +properties: + compatible: + enum: + - qcom,pm8150b-typec + + reg: + maxItems: 1 + description: Type C base address + + interrupts: + items: + - description: Bitmask of CC attach, VBUS error, tCCDebounce done and more + - description: VCONN Powered Detection + - description: CC state change + - description: VCONN over-current condition + - description: VBUS state change + - description: Attach Deteach notification + - description: Legacy cable detect + - description: Try.Src Try.Snk state change + + interrupt-names: + items: + - const: or-rid-detect-change + - const: vpd-detect + - const: cc-state-change + - const: vconn-oc + - const: vbus-change + - const: attach-detach + - const: legacy-cable-detect + - const: try-snk-src-detect + +required: + - compatible + - reg + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + #include + #include + pm8150b { + #address-cells = <1>; + #size-cells = <0>; + + pm8150b_typec: typec@1500 { + compatible = "qcom,pm8150b-typec"; + reg = <0x1500>; + interrupts = <0x2 0x15 PMIC_TYPEC_OR_RID_IRQ + IRQ_TYPE_EDGE_RISING>, + <0x2 0x15 PMIC_TYPEC_VPD_IRQ + IRQ_TYPE_EDGE_BOTH>, + <0x2 0x15 PMIC_TYPEC_CC_STATE_IRQ + IRQ_TYPE_EDGE_RISING>, + <0x2 0x15 PMIC_TYPEC_VCONN_OC_IRQ + IRQ_TYPE_EDGE_BOTH>, + <0x2 0x15 PMIC_TYPEC_VBUS_IRQ + IRQ_TYPE_EDGE_RISING>, + <0x2 0x15 PMIC_TYPEC_ATTACH_DETACH_IRQ + IRQ_TYPE_EDGE_RISING>, + <0x2 0x15 PMIC_TYPEC_LEGACY_CABLE_IRQ + IRQ_TYPE_EDGE_BOTH>, + <0x2 0x15 PMIC_TYPEC_TRY_SNK_SRC_IRQ + IRQ_TYPE_EDGE_RISING>; + interrupt-names = "or-rid-detect-change", + "vpd-detect", + "cc-state-change", + "vconn-oc", + "vbus-change", + "attach-detach", + "legacy-cable-detect", + "try-snk-src-detect"; + }; + }; +... From patchwork Fri Nov 5 03:35:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 1551211 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=PXKRs8Va; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HlmMP07Qdz9sf8 for ; Fri, 5 Nov 2021 14:34:09 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232241AbhKEDgp (ORCPT ); Thu, 4 Nov 2021 23:36:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231834AbhKEDgn (ORCPT ); Thu, 4 Nov 2021 23:36:43 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 988FFC061714 for ; Thu, 4 Nov 2021 20:34:04 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 77-20020a1c0450000000b0033123de3425so8683979wme.0 for ; Thu, 04 Nov 2021 20:34:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=q128a9lhY0ksiYIyPMAMQms4ozwMnmwzN8Z/nJ9OKEQ=; b=PXKRs8VaN+BUzZXJAHYO9LhedHihnSsFCU0wx+JaJgJZj65Ll7nCLr3LlaXScR6nyj Ctr5WXydQ7eZTZXVKc4ztmIllm9JcoB19iF9XL/1T49z99zFYWMDPRFfRbz2JIw4IUpp wCcHP3STYM4HFrUdQc7imYZwql6A/B1c2ncKZ/mc2RGAlhpLkjx7z1webanP4xmvSFwg t1LvdgWovA7n5s5C1GkKkMKOXB97Zr2ivFgVGz1tNEz0os9ZA4lRCokV38NBx8/liA+9 a5ZrzbIMR0APwEESPB18nMIdtw8MJpGWFm3HUo2OwN99iXsMFcm1YFfnP/SjhJtc029l 14Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q128a9lhY0ksiYIyPMAMQms4ozwMnmwzN8Z/nJ9OKEQ=; b=o4WkePBxrbjBfnpl662VXrHeiSD9M8Xohm5lns4dg7VeToV2PUGBaCORCYieBKYb2Z iKCxy4t2xQsgCj1YfmO4zVkhGjA2hbJ7HNpnqRxDP3ir+QdnpV9zm5/Vpc9+uVrrTwBS hAH77IDWkmH75DOWrSziDIckRtfS4hOhjkNGB9/UUrlcWczEoLCuNT6Ssg1G13mLANZX OpLG7gN5n+sTLCThx98u4/jRdwk7RCxpGjqX4DIzmFpbTsseGdvQSsI8xXxp5wmJiRGr KacV2zN5c3E838JWz/Fxnd8iBLkOYY2kMDkKM/4cmAs7QlETXaYPcqW4PBXlC34AJzjQ 5sdw== X-Gm-Message-State: AOAM530kr/+kcmjDriKSqYB/ziuOgfk8xqLlji4bHmFyCEjmInVx5thO w6BYHa1jtBOxqHRFfWb1CHjIZw== X-Google-Smtp-Source: ABdhPJzM2VjGTLCa03XPonF4uxQqi2O6WUGTTkDbyk3yztPmHu4huC877hPoOO1mFBx0E5U0BKoRmQ== X-Received: by 2002:a05:600c:ac2:: with SMTP id c2mr27632565wmr.118.1636083243239; Thu, 04 Nov 2021 20:34:03 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id l15sm2546296wme.47.2021.11.04.20.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 20:34:02 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, bjorn.andersson@linaro.org, robh+dt@kernel.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: wcheng@codeaurora.org, bryan.odonoghue@linaro.org Subject: [PATCH v3 3/7] dt-bindings: usb: Add qcom,pmic-usb-pdphy dt-binding header Date: Fri, 5 Nov 2021 03:35:54 +0000 Message-Id: <20211105033558.1573552-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211105033558.1573552-1-bryan.odonoghue@linaro.org> References: <20211105033558.1573552-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Adds a series of defines which are used in the DTS and pdphy driver for identifying interrupts. Signed-off-by: Bryan O'Donoghue --- .../usb/typec/tcpm/qcom,pmic-usb-pdphy.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/dt-bindings/usb/typec/tcpm/qcom,pmic-usb-pdphy.h diff --git a/include/dt-bindings/usb/typec/tcpm/qcom,pmic-usb-pdphy.h b/include/dt-bindings/usb/typec/tcpm/qcom,pmic-usb-pdphy.h new file mode 100644 index 0000000000000..0bb1ce677fe5c --- /dev/null +++ b/include/dt-bindings/usb/typec/tcpm/qcom,pmic-usb-pdphy.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2021, Linaro Ltd. All rights reserved. + */ + +#ifndef _DT_BINDINGS_TCPM_QCOM_PMIC_USB_PDPHY_H +#define _DT_BINDINGS_TCPM_QCOM_PMIC_USB_PDPHY_H + +#define PMIC_PDPHY_SIG_TX_IRQ 0x0 +#define PMIC_PDPHY_SIG_RX_IRQ 0x1 +#define PMIC_PDPHY_MSG_TX_IRQ 0x2 +#define PMIC_PDPHY_MSG_RX_IRQ 0x3 +#define PMIC_PDPHY_MSG_TX_FAIL_IRQ 0x4 +#define PMIC_PDPHY_MSG_TX_DISCARD_IRQ 0x5 +#define PMIC_PDPHY_MSG_RX_DISCARD_IRQ 0x6 +#define PMIC_PDPHY_FR_SWAP_IRQ 0x7 + +#endif From patchwork Fri Nov 5 03:35:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 1551212 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=jeil5/Yt; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HlmMQ1gX4z9sf8 for ; Fri, 5 Nov 2021 14:34:10 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231697AbhKEDgr (ORCPT ); Thu, 4 Nov 2021 23:36:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232197AbhKEDgo (ORCPT ); Thu, 4 Nov 2021 23:36:44 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91DD9C061203 for ; Thu, 4 Nov 2021 20:34:05 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id d24so11696897wra.0 for ; Thu, 04 Nov 2021 20:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LinCUed6dIxikoNS7KFJ+3JCI78Tz1AdQIW+pID0/eA=; b=jeil5/Ytm2mvaY8XSZnLWxPeWhqmKgSh9bYWNYq0i2CaAv1AWRyOia0PjTy3okDuVh NDbNNToqWBc4xtxnVpHwOSGDz9RZxbQn+tk5OpwA4/md3fcjECoDBjAGbwTdOkPecb6o 8BEmAlOyKZmXpU3WdvUBWl4dyu+O1Z+VEIWMhrG3w8ile4tYPI9IH3J8oR5pUP4T5nVi 0DMYNntdNpeqK3/hCMT/x173/EktA+LVosy3ksYyLSWEpFDgkzsUgX6iodcMz2c1Hqpi 0PmXz/dlenFw4JXIbK6hpo7R2cQ9LKYD+P+V0mdl1ZNLgSqZPtMICIEyXWB1vPQ/6K6L x4Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LinCUed6dIxikoNS7KFJ+3JCI78Tz1AdQIW+pID0/eA=; b=whXRnSf15pbOKrkj8O5HPVZ/dL3PuAzxE+HBetommN0zVgcdO9d/5oJdepNUHMCkng 80AhBPc65x4xLE2TLu/vU2vClR2Pu5t/D7NC/5fiqmRF66jvFFQgaRzcYCn2rtqWG9TS U9tZ3tsO4Y/CiCv3o75p2fr3U9KTZANqYrM4MO/XplOhQJ1drbhh/Qq86kYJy+TlgfYY ofX2kTH8by2ixYoeKofcgOSd1SXEjIhxrl4cV5QFGIWiJa8Vu//+Iv1ut6qTL5OBBmdJ QXTN7tJPtjUGpPIzzxQsxvn3uz0HMMDbxTLn0E7ZJyAMiiAjx/hXyIygTK2xYQCP7iHh Q4dg== X-Gm-Message-State: AOAM532QgRLUPci8rBK7fl6M8hoTwY2UQNUBfsybfY0El+ZuNnXs+C7a muOvFUXZVHdJh1Ig7vOcD9tlUQ== X-Google-Smtp-Source: ABdhPJw5jOtMGQWyzi5fbd8n6uazb1B6yalNWyNWEPliY8z462uMA0kpkGdlOk5WFnteotF5l4ApTw== X-Received: by 2002:adf:dc43:: with SMTP id m3mr71499157wrj.66.1636083244216; Thu, 04 Nov 2021 20:34:04 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id l15sm2546296wme.47.2021.11.04.20.34.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 20:34:03 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, bjorn.andersson@linaro.org, robh+dt@kernel.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: wcheng@codeaurora.org, bryan.odonoghue@linaro.org Subject: [PATCH v3 4/7] dt-bindings: usb: Add Qualcomm PMIC PDPHY controller YAML schema Date: Fri, 5 Nov 2021 03:35:55 +0000 Message-Id: <20211105033558.1573552-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211105033558.1573552-1-bryan.odonoghue@linaro.org> References: <20211105033558.1573552-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a YAML binding for the power-delivery PHY silicon interface inside Qualcomm's pm8150b hardware block. The pdphy driver operates with a type-c driver inside of a high level single TCPM device to provide overall TCPM functionality. Signed-off-by: Bryan O'Donoghue --- .../bindings/usb/qcom,pmic-pdphy.yaml | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml new file mode 100644 index 0000000000000..9774939f7260b --- /dev/null +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/usb/qcom,pmic-pdphy.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm PMIC based USB PDPHY driver + +maintainers: + - Bryan O'Donoghue + +description: | + Qualcomm PMIC Power Delivery PHY driver + +properties: + compatible: + enum: + - qcom,pm8150b-pdphy + + reg: + maxItems: 1 + description: PDPHY base address + + interrupts: + items: + - description: Sig TX - transmitted reset signal + - description: Sig RX - received reset signal + - description: TX completion + - description: RX completion + - description: TX fail + - description: TX discgard + - description: RX discgard + - description: Fast Role Swap event + + interrupt-names: + items: + - const: sig-tx + - const: sig-rx + - const: msg-tx + - const: msg-rx + - const: msg-tx-failed + - const: msg-tx-discarded + - const: msg-rx-discarded + - const: fr-swap + +required: + - compatible + - reg + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + #include + #include + + pm8150b { + #address-cells = <1>; + #size-cells = <0>; + + pm8150b_pdphy: pdphy@1700 { + compatible = "qcom,pm8150b-pdphy"; + reg = <0x1700>; + interrupts = <0x2 0x17 PMIC_PDPHY_SIG_TX_IRQ + IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 PMIC_PDPHY_SIG_RX_IRQ + IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 PMIC_PDPHY_MSG_TX_IRQ + IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 PMIC_PDPHY_MSG_RX_IRQ + IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 PMIC_PDPHY_MSG_TX_FAIL_IRQ + IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 PMIC_PDPHY_MSG_TX_DISCARD_IRQ + IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 PMIC_PDPHY_MSG_RX_DISCARD_IRQ + IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 PMIC_PDPHY_FR_SWAP_IRQ + IRQ_TYPE_EDGE_RISING>; + interrupt-names = "sig-tx", + "sig-rx", + "msg-tx", + "msg-rx", + "msg-tx-failed", + "msg-tx-discarded", + "msg-rx-discarded", + "fr-swap"; + }; + }; +... From patchwork Fri Nov 5 03:35:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 1551213 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GT4ozU+P; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HlmMT5phLz9sf8 for ; Fri, 5 Nov 2021 14:34:13 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232231AbhKEDgs (ORCPT ); Thu, 4 Nov 2021 23:36:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232251AbhKEDgp (ORCPT ); Thu, 4 Nov 2021 23:36:45 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A71ECC061205 for ; Thu, 4 Nov 2021 20:34:06 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id b2-20020a1c8002000000b0032fb900951eso8644016wmd.4 for ; Thu, 04 Nov 2021 20:34:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bqnyUfsYYPNQeEjNNd0ONT4yS5Ioj9JRLh97+jvvDrA=; b=GT4ozU+PJYK2bPgxbTJv4jKYnJyF3vms4fiRo20p/wL8XI4sgVJJLcBQbldQUOKmQg BP6ZsbD1veHbfFbKmCyK0aIP29IwCKsgj52+8kiDyQey5buSvMTlHBGQlPH80h38YmrB qZ9L8GI8h2PvsRegII1B08soUixAdwbMSedxjSE7aJP4A83Boiue7e4IhyNLCdcFzGem B5nekgJKUXu+l9Z4hvf0yUFa9Exv7AFzo95VYfvaT2g3I8KsmTxTi2SBhxseR/E6Xag5 JyWgw1+urjh2gSES95SRpTXBHf3HvJQK04CXcKnX01uHiUBzwX4NbfP2YT3dTKgpZ4sa sScQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bqnyUfsYYPNQeEjNNd0ONT4yS5Ioj9JRLh97+jvvDrA=; b=U+GON52cGhkoE7l5FPl3j+7uUpJ1LfE4STEBWa+Kt9ekZOp9MrZKDsQyIvFZ6C/qUP LBLn+LCJWKqeqMngiDeWrF8b2c5b284pTgWuHy/0HfcQRp8Ua0i5MsorDT6JKNOscUUE A8X3pPlqkHPXHw1UjqXUQMo0nzqCNeL8muiGR0wv8RNzETwaReWKxeMYz7+dzXBdtxmm Su1hwITH4nizjaykWhnm+ijBldQCAf05gkk6noD7kJp7TEfoXehSBjNsuPYk4b139zuh nHu/ziPYY3FWuFyZSOPKh74LZwnb57DV8YrYeDwL1bVzL3OUbduDppYbUI8xLNd1bRtw yqZg== X-Gm-Message-State: AOAM530xYXSl3x3RodXzlas+OcK1/i73g2Cf30pIZYw4Sr7Q9TlWE0zh 2toX4piepTSE3G3J0/KJGU6wZw== X-Google-Smtp-Source: ABdhPJxKMXbhnHmXf7bDM8k22SeoiU0oYRut5rKKQXbiVgxlGcUfENOSmh6oerDdCcSrpV5gExNUlg== X-Received: by 2002:a7b:cb17:: with SMTP id u23mr27744194wmj.183.1636083245256; Thu, 04 Nov 2021 20:34:05 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id l15sm2546296wme.47.2021.11.04.20.34.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 20:34:04 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, bjorn.andersson@linaro.org, robh+dt@kernel.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: wcheng@codeaurora.org, bryan.odonoghue@linaro.org Subject: [PATCH v3 5/7] dt-bindings: usb: Add Qualcomm PMIC TCPM YAML schema Date: Fri, 5 Nov 2021 03:35:56 +0000 Message-Id: <20211105033558.1573552-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211105033558.1573552-1-bryan.odonoghue@linaro.org> References: <20211105033558.1573552-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a YAML description for the pm8150b-tcpm driver. The pm8150b-tcpm encapsulates a type-c block and a pdphy block into one block presented to the tcpm Linux API. Signed-off-by: Bryan O'Donoghue --- .../bindings/usb/qcom,pmic-tcpm.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-tcpm.yaml diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-tcpm.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-tcpm.yaml new file mode 100644 index 0000000000000..29ab7e2d678e1 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-tcpm.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/usb/qcom,pmic-tcpm.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm PMIC TCPM Driver + +maintainers: + - Bryan O'Donoghue + +description: | + Qualcomm PMIC Type-C Port Manager Driver + +properties: + compatible: + enum: + - qcom,pm8150b-tcpm + + pmic_tcpm_typec: + $ref: /schemas/types.yaml#/definitions/phandle + description: + A phandle to the typec port hardware driver. + + pmic_tcpm_pdphy: + $ref: /schemas/types.yaml#/definitions/phandle + description: + A phandle to the type-c pdphy hardware driver. + +required: + - compatible + - pmic_tcpm_typec + - pmic_tcpm_pdphy + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + pm8150b_tcpm: pmic-tcpm { + compatible = "qcom,pm8150b-tcpm"; + + #address-cells = <1>; + #size-cells = <0>; + + pmic_tcpm_typec = <&pm8150b_typec>; + pmic_tcpm_pdphy = <&pm8150b_pdphy>; + + connector { + compatible = "usb-c-connector"; + + power-role = "source"; + data-role = "dual"; + self-powered; + + source-pdos = ; + + }; + }; + +...