From patchwork Tue Nov 23 04:28:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 12633407 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 0BD83C433F5 for ; Tue, 23 Nov 2021 04:30:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233318AbhKWEdg (ORCPT ); Mon, 22 Nov 2021 23:33:36 -0500 Received: from m43-7.mailgun.net ([69.72.43.7]:10723 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233339AbhKWEdc (ORCPT ); Mon, 22 Nov 2021 23:33:32 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1637641824; h=References: In-Reply-To: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=4vuW9ZMeOXYLQEHq1YEB6xUgb478Kj5Lmp0bLqBmSbU=; b=mnOO8vKzN26uoau0AihDoVYd4YwcgsmZt3yBdM9c+M0Mn0an+AtCIJF/UiRziP9dpAfkiaTo B8Rkpe3I/kU+BnEqgLSfy04YrAO5jFcXGc/XmEPdBx9CU+h2C0eHcv21Hzvi8ubA/euz7OU4 qEptlm3paqpz3psWgMOwEXLDXbY= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-west-2.postgun.com with SMTP id 619c6e602c7dc0a7643cf0fb (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 23 Nov 2021 04:30:24 GMT Sender: schowdhu=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id E5B75C43619; Tue, 23 Nov 2021 04:30:23 +0000 (UTC) Received: from blr-ubuntu-525.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: schowdhu) by smtp.codeaurora.org (Postfix) with ESMTPSA id F0569C43618; Tue, 23 Nov 2021 04:30:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org F0569C43618 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Souradeep Chowdhury To: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, pure.logic@nexus-software.ie, bjorn.andersson@linaro.org, greg@kroah.com Cc: linux-kernel@vger.kernel.org, tsoni@codeaurora.org, psodagud@codeaurora.org, satyap@codeaurora.org, pheragu@codeaurora.org, rnayak@codeaurora.org, sibis@codeaurora.org, saiprakash.ranjan@codeaurora.org, quic_schowdhu@quicinc.com, Souradeep Chowdhury Subject: [PATCH V1 1/8] dt-bindings: Add the yaml bindings for EUD Date: Tue, 23 Nov 2021 09:58:19 +0530 Message-Id: <472de38309fd5d773f903f7a0cfb4440ae1dd380.1637639009.git.schowdhu@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Documentation for Embedded USB Debugger(EUD) device tree bindings in yaml format. Signed-off-by: Souradeep Chowdhury --- .../devicetree/bindings/soc/qcom/qcom,eud.yaml | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml new file mode 100644 index 0000000..724552c --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/qcom/qcom,eud.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm Embedded USB Debugger + +maintainers: + - Souradeep Chowdhury + +description: | + This binding is used to describe the Qualcomm Embedded USB Debugger, which is + mini USB-hub implemented on chip to support USB-based debug capabilities. + +properties: + compatible: + items: + - enum: + - qcom,sc7280-eud + - const: qcom,eud + + reg: + items: + - description: EUD Base Register Region + - description: EUD Mode Manager Register + + interrupts: + description: + EUD interrupt + + + port: + description: + Any connector to the data bus of this controller should be modelled + using the OF graph bindings specified, if the "usb-role-switch" + property is used. See graph.txt + $ref: /schemas/graph.yaml#/properties/port + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + eud@88e0000 { + compatible = "qcom,sc7280-eud","qcom,eud"; + reg = <0 0x88e0000 0 0x2000>, + <0 0x88e2000 0 0x1000>; + }; From patchwork Tue Nov 23 04:28:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 12633409 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 59D29C4332F for ; Tue, 23 Nov 2021 04:30:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233533AbhKWEdj (ORCPT ); Mon, 22 Nov 2021 23:33:39 -0500 Received: from so254-9.mailgun.net ([198.61.254.9]:16971 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233428AbhKWEdh (ORCPT ); Mon, 22 Nov 2021 23:33:37 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1637641829; h=References: In-Reply-To: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=OwFZL1WoH6B7+W2CACodchUWwy/KRXMv0eFDp4cllTs=; b=PJQsxSLt8jO6qxvQ2kbnW29xcdE7gx1hgfgXagtRA9sVa+2cJeCMofJd3YixBiwM2wm3+jTS 1RmwvimmgIs9IyYLkErkZMAYF8Xm0GuwhmCe62P465WU2KbN7O4FCnG+AQNt5TcERpy6/a7+ BGyL7d4zzpK/tr0wBWOVtgJyN1Y= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-east-1.postgun.com with SMTP id 619c6e6586d0e4d888c0754b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 23 Nov 2021 04:30:29 GMT Sender: schowdhu=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id BEA8BC4361B; Tue, 23 Nov 2021 04:30:28 +0000 (UTC) Received: from blr-ubuntu-525.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: schowdhu) by smtp.codeaurora.org (Postfix) with ESMTPSA id BED1BC4360C; Tue, 23 Nov 2021 04:30:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org BED1BC4360C Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Souradeep Chowdhury To: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, pure.logic@nexus-software.ie, bjorn.andersson@linaro.org, greg@kroah.com Cc: linux-kernel@vger.kernel.org, tsoni@codeaurora.org, psodagud@codeaurora.org, satyap@codeaurora.org, pheragu@codeaurora.org, rnayak@codeaurora.org, sibis@codeaurora.org, saiprakash.ranjan@codeaurora.org, quic_schowdhu@quicinc.com, Souradeep Chowdhury Subject: [PATCH V1 2/8] dt-bindings: connector: Add property for EUD type-C connector Date: Tue, 23 Nov 2021 09:58:20 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Added the property for EUD(Embedded USB Debugger) connector. EUD is a mini usb hub with debug and trace capabilities and it has a type C connector attached to it for role-switching. This connector is attached to EUD via port. Signed-off-by: Souradeep Chowdhury --- Documentation/devicetree/bindings/connector/usb-connector.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml index 7eb8659..bd1823a 100644 --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml @@ -30,6 +30,10 @@ properties: - const: samsung,usb-connector-11pin - const: usb-b-connector + - items: + - const: qcom,usb-connector-eud + - const: usb-c-connector + label: description: Symbolic name for the connector. From patchwork Tue Nov 23 04:28:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 12633411 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 72D2EC433FE for ; Tue, 23 Nov 2021 04:30:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233508AbhKWEds (ORCPT ); Mon, 22 Nov 2021 23:33:48 -0500 Received: from so254-9.mailgun.net ([198.61.254.9]:63372 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233545AbhKWEdq (ORCPT ); Mon, 22 Nov 2021 23:33:46 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1637641839; h=References: In-Reply-To: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=qo0zU8er7sanVRDTA/I1E3JD+GOntYSS5HJVHZ4aQXA=; b=gM9qayMc8DYhe9yEXjqjXpcdGosraQVxiYLxrjiOcwNS4sVIFXWgpvhz0JPxyCzvHXOFeQt2 hwcSCRbVgvBmNSCLOW2z943blSx594u2ql7LBN2F1TJ5Kt84U29Tg54Ah3QOvGI+YL7Lu3oM QkgfrNFqSOcOEjPnzyQ0GAyf8JQ= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-west-2.postgun.com with SMTP id 619c6e6abebfa3d4d572b721 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 23 Nov 2021 04:30:34 GMT Sender: schowdhu=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 50CEEC43637; Tue, 23 Nov 2021 04:30:34 +0000 (UTC) Received: from blr-ubuntu-525.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: schowdhu) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9AE97C4361A; Tue, 23 Nov 2021 04:30:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 9AE97C4361A Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Souradeep Chowdhury To: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, pure.logic@nexus-software.ie, bjorn.andersson@linaro.org, greg@kroah.com Cc: linux-kernel@vger.kernel.org, tsoni@codeaurora.org, psodagud@codeaurora.org, satyap@codeaurora.org, pheragu@codeaurora.org, rnayak@codeaurora.org, sibis@codeaurora.org, saiprakash.ranjan@codeaurora.org, quic_schowdhu@quicinc.com, Souradeep Chowdhury Subject: [PATCH V1 3/8] bindings: usb: dwc3: Update dwc3 properties for EUD connector Date: Tue, 23 Nov 2021 09:58:21 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the connector property for dwc3 node. This connector can be used to role-switch the controller from device to host and vice versa. Signed-off-by: Souradeep Chowdhury --- Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml index 078fb78..9382168 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -318,6 +318,12 @@ properties: items: enum: [1, 4, 8, 16, 32, 64, 128, 256] + connector: + type: object + $ref: /connector/usb-connector.yaml# + description: + Connector for dual role switch, especially for "eud-usb-c-connector" + unevaluatedProperties: false required: From patchwork Tue Nov 23 04:28:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 12633413 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 E0A50C433F5 for ; Tue, 23 Nov 2021 04:30:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233516AbhKWEdt (ORCPT ); Mon, 22 Nov 2021 23:33:49 -0500 Received: from so254-9.mailgun.net ([198.61.254.9]:63372 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233479AbhKWEds (ORCPT ); Mon, 22 Nov 2021 23:33:48 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1637641840; h=References: In-Reply-To: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=wHXJ/MxIASMYxApYMi7k73v+mx2Wz+ksxiSEmwcXO6k=; b=cXuIiHsCH511vruK/VkvXFDv6rCwXOWA2aY9BilxtYviF+W2Jlb/kF7CQOZ4wO3CuvATwpBm j7AaKwZTbmsnAK8ZT+dOCA0hVdwOQSOAKqyPYCpCKv2I9zz6zt6u/MekuKxoUyKlyRXJVGdH hE28fdWaut/Jv/1lyShx4iv2bQs= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-east-1.postgun.com with SMTP id 619c6e706bacc185a5dc4bb3 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 23 Nov 2021 04:30:40 GMT Sender: schowdhu=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 97D23C43637; Tue, 23 Nov 2021 04:30:39 +0000 (UTC) Received: from blr-ubuntu-525.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: schowdhu) by smtp.codeaurora.org (Postfix) with ESMTPSA id 62112C4361B; Tue, 23 Nov 2021 04:30:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 62112C4361B Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Souradeep Chowdhury To: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, pure.logic@nexus-software.ie, bjorn.andersson@linaro.org, greg@kroah.com Cc: linux-kernel@vger.kernel.org, tsoni@codeaurora.org, psodagud@codeaurora.org, satyap@codeaurora.org, pheragu@codeaurora.org, rnayak@codeaurora.org, sibis@codeaurora.org, saiprakash.ranjan@codeaurora.org, quic_schowdhu@quicinc.com, Souradeep Chowdhury Subject: [PATCH V1 4/8] usb: dwc3: drd: Register the eud connector child node for dwc3 Date: Tue, 23 Nov 2021 09:58:22 +0530 Message-Id: <8cee25b11f1bcf0423728576ea9bc7c6a44a61c4.1637639009.git.schowdhu@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Register the child node for dwc3 which is the "eud_usb_connector". The eud driver will be able to switch the usb role from device to host and vice versa using the role switch property of dwc3 node. Signed-off-by: Souradeep Chowdhury --- drivers/usb/dwc3/drd.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c index d7f7683..b4ea55c 100644 --- a/drivers/usb/dwc3/drd.c +++ b/drivers/usb/dwc3/drd.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -164,6 +165,27 @@ static int dwc3_otg_get_irq(struct dwc3 *dwc) return irq; } +static int dwc3_register_eud(struct dwc3 *dwc) +{ + struct device *dev = dwc->dev; + struct device_node *np = dev->of_node; + int ret; + + of_get_child_by_name(np, "eud_usb_connector"); + if (!np) { + dev_dbg(dev, "no usb_connector child node specified\n"); + return 0; + } + + ret = of_platform_populate(np, NULL, NULL, dev); + if (ret) { + dev_err(dev, "failed to register usb_connector - %d\n", ret); + return ret; + } + + return 0; +} + void dwc3_otg_init(struct dwc3 *dwc) { u32 reg; @@ -580,6 +602,10 @@ int dwc3_drd_init(struct dwc3 *dwc) ret = dwc3_setup_role_switch(dwc); if (ret < 0) return ret; + + ret = dwc3_register_eud(dwc); + if (ret < 0) + return ret; } else if (dwc->edev) { dwc->edev_nb.notifier_call = dwc3_drd_notifier; ret = extcon_register_notifier(dwc->edev, EXTCON_USB_HOST, From patchwork Tue Nov 23 04:28:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 12633415 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 26326C433F5 for ; Tue, 23 Nov 2021 04:30:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233740AbhKWEd4 (ORCPT ); Mon, 22 Nov 2021 23:33:56 -0500 Received: from m43-7.mailgun.net ([69.72.43.7]:47156 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233553AbhKWEdz (ORCPT ); Mon, 22 Nov 2021 23:33:55 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1637641848; h=References: In-Reply-To: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=TWf6iK3oXE6LCqKiPlpcfVQCh6w4BzFJILxAECqAXZo=; b=IOycNHzVl7jmsvVZIKjVVXsW1aG6hxB5UYO4PE8+bbqdvskWtTH+wp7SYLad+Sr2XsWZ/vew ryGGvX+9p4gH2MbfXtCW9vkuitaO9RB0rYoKphUOeB0Bc/4Xfk8V0Gbv7Ykbv4omG8jfqnQr 6Wmc2PNGBzpZ1R1UMTzWwNKkMd8= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-east-1.postgun.com with SMTP id 619c6e786bacc185a5dc6049 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 23 Nov 2021 04:30:47 GMT Sender: schowdhu=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 156D2C43619; Tue, 23 Nov 2021 04:30:46 +0000 (UTC) Received: from blr-ubuntu-525.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: schowdhu) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5B4D3C43618; Tue, 23 Nov 2021 04:30:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 5B4D3C43618 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Souradeep Chowdhury To: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, pure.logic@nexus-software.ie, bjorn.andersson@linaro.org, greg@kroah.com Cc: linux-kernel@vger.kernel.org, tsoni@codeaurora.org, psodagud@codeaurora.org, satyap@codeaurora.org, pheragu@codeaurora.org, rnayak@codeaurora.org, sibis@codeaurora.org, saiprakash.ranjan@codeaurora.org, quic_schowdhu@quicinc.com, Souradeep Chowdhury Subject: [PATCH V1 5/8] soc: qcom: eud: Add driver support for Embedded USB Debugger(EUD) Date: Tue, 23 Nov 2021 09:58:23 +0530 Message-Id: <27dcf5f28a7187a397308419d7c779553711bc04.1637639009.git.schowdhu@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for control peripheral of EUD (Embedded USB Debugger) to listen to events such as USB attach/detach, pet EUD to indicate software is functional.Reusing the platform device kobj, sysfs entry 'enable' is created to enable or disable EUD. To enable the eud the following needs to be done echo 1 > /sys/bus/platform/.../enable To disable eud, following is the command echo 0 > /sys/bus/platform/.../enable Signed-off-by: Souradeep Chowdhury --- Documentation/ABI/testing/sysfs-driver-eud | 9 + drivers/soc/qcom/Kconfig | 10 ++ drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/qcom_eud.c | 268 +++++++++++++++++++++++++++++ 4 files changed, 288 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-eud create mode 100644 drivers/soc/qcom/qcom_eud.c diff --git a/Documentation/ABI/testing/sysfs-driver-eud b/Documentation/ABI/testing/sysfs-driver-eud new file mode 100644 index 0000000..eaf2e82 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-eud @@ -0,0 +1,9 @@ +What: /sys/bus/platform/drivers/eud/.../enable +Date: October 2021 +Contact: Souradeep Chowdhury +Description: + The Enable/Disable sysfs interface for Embedded + USB Debugger(EUD). This enables and disables the + EUD based on a 1 or a 0 value. By enabling EUD, + the user is able to activate the mini-usb hub of + EUD for debug and trace capabilities. diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index 79b568f..a4db41b 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -42,6 +42,16 @@ config QCOM_CPR To compile this driver as a module, choose M here: the module will be called qcom-cpr +config QCOM_EUD + tristate "QCOM Embedded USB Debugger(EUD) Driver" + select USB_ROLE_SWITCH + help + This module enables support for Qualcomm Technologies, Inc. + Embedded USB Debugger (EUD). The EUD is a control peripheral + which reports VBUS attach/detach events and has USB-based + debug and trace capabilities. On selecting m, the module name + that is built is qcom_eud.ko + config QCOM_GENI_SE tristate "QCOM GENI Serial Engine Driver" depends on ARCH_QCOM || COMPILE_TEST diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile index ad675a6..3331a40 100644 --- a/drivers/soc/qcom/Makefile +++ b/drivers/soc/qcom/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_QCOM_AOSS_QMP) += qcom_aoss.o obj-$(CONFIG_QCOM_GENI_SE) += qcom-geni-se.o obj-$(CONFIG_QCOM_COMMAND_DB) += cmd-db.o obj-$(CONFIG_QCOM_CPR) += cpr.o +obj-$(CONFIG_QCOM_EUD) += qcom_eud.o obj-$(CONFIG_QCOM_GSBI) += qcom_gsbi.o obj-$(CONFIG_QCOM_MDT_LOADER) += mdt_loader.o obj-$(CONFIG_QCOM_OCMEM) += ocmem.o diff --git a/drivers/soc/qcom/qcom_eud.c b/drivers/soc/qcom/qcom_eud.c new file mode 100644 index 0000000..613ac41 --- /dev/null +++ b/drivers/soc/qcom/qcom_eud.c @@ -0,0 +1,268 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define EUD_REG_INT1_EN_MASK 0x0024 +#define EUD_REG_INT_STATUS_1 0x0044 +#define EUD_REG_CTL_OUT_1 0x0074 +#define EUD_REG_VBUS_INT_CLR 0x0080 +#define EUD_REG_CSR_EUD_EN 0x1014 +#define EUD_REG_SW_ATTACH_DET 0x1018 +#define EUD_REG_EUD_EN2 0x0000 + +#define EUD_ENABLE BIT(0) +#define EUD_INT_PET_EUD BIT(0) +#define EUD_INT_VBUS BIT(2) +#define EUD_INT_SAFE_MODE BIT(4) +#define EUD_INT_ALL (EUD_INT_VBUS|EUD_INT_SAFE_MODE) + +struct eud_chip { + struct device *dev; + struct usb_role_switch *role_sw; + void __iomem *eud_reg_base; + void __iomem *eud_mode_mgr2_phys_base; + unsigned int int_status; + int eud_irq; + bool enable; + bool usb_attach; + +}; + +static int enable_eud(struct eud_chip *priv) +{ + writel(EUD_ENABLE, priv->eud_reg_base + EUD_REG_CSR_EUD_EN); + writel(EUD_INT_VBUS | EUD_INT_SAFE_MODE, + priv->eud_reg_base + EUD_REG_INT1_EN_MASK); + writel(1, priv->eud_mode_mgr2_phys_base + EUD_REG_EUD_EN2); + + return usb_role_switch_set_role(priv->role_sw, USB_ROLE_DEVICE); +} + +static void disable_eud(struct eud_chip *priv) +{ + writel(0, priv->eud_reg_base + EUD_REG_CSR_EUD_EN); + writel(0, priv->eud_mode_mgr2_phys_base + EUD_REG_EUD_EN2); +} + +static ssize_t enable_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct eud_chip *chip = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%d\n", chip->enable); +} + +static ssize_t enable_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct eud_chip *chip = dev_get_drvdata(dev); + bool enable; + int ret; + + if (kstrtobool(buf, &enable)) + return -EINVAL; + + if (enable) { + ret = enable_eud(chip); + if (!ret) + chip->enable = enable; + } else { + disable_eud(chip); + } + + return count; +} + +static DEVICE_ATTR_RW(enable); + +static struct attribute *eud_attrs[] = { + &dev_attr_enable.attr, + NULL, +}; + +static struct attribute_group attr_group = { + .attrs = eud_attrs, +}; + +static const struct attribute_group *attr_groups[] = { + &attr_group, + NULL +}; + +static void usb_attach_detach(struct eud_chip *chip) +{ + u32 reg; + + /* read ctl_out_1[4] to find USB attach or detach event */ + reg = readl(chip->eud_reg_base + EUD_REG_CTL_OUT_1); + if (reg & EUD_INT_SAFE_MODE) + chip->usb_attach = true; + else + chip->usb_attach = false; + + /* set and clear vbus_int_clr[0] to clear interrupt */ + writel(BIT(0), chip->eud_reg_base + EUD_REG_VBUS_INT_CLR); + writel(0, chip->eud_reg_base + EUD_REG_VBUS_INT_CLR); +} + +static void pet_eud(struct eud_chip *chip) +{ + u32 reg; + int ret; + + /* read sw_attach_det[0] to find attach/detach event */ + reg = readl(chip->eud_reg_base + EUD_REG_SW_ATTACH_DET); + if (reg & EUD_INT_PET_EUD) { + /* Detach & Attach pet for EUD */ + writel(0, chip->eud_reg_base + EUD_REG_SW_ATTACH_DET); + /* Delay to make sure detach pet is done before attach pet */ + ret = readl_poll_timeout(chip->eud_reg_base + EUD_REG_SW_ATTACH_DET, + reg, (reg == 0), 1, 100); + if (ret) { + dev_err(chip->dev, "Detach pet failed\n"); + return; + } + + writel(EUD_INT_PET_EUD, chip->eud_reg_base + + EUD_REG_SW_ATTACH_DET); + } else { + /* Attach pet for EUD */ + writel(EUD_INT_PET_EUD, chip->eud_reg_base + + EUD_REG_SW_ATTACH_DET); + } +} + +static irqreturn_t handle_eud_irq(int irq, void *data) +{ + struct eud_chip *chip = data; + u32 reg; + + /* read status register and find out which interrupt triggered */ + reg = readl(chip->eud_reg_base + EUD_REG_INT_STATUS_1); + switch (reg & EUD_INT_ALL) { + case EUD_INT_VBUS: + chip->int_status = EUD_INT_VBUS; + usb_attach_detach(chip); + return IRQ_WAKE_THREAD; + case EUD_INT_SAFE_MODE: + pet_eud(chip); + break; + default: + return IRQ_NONE; + } + return IRQ_HANDLED; +} + +static irqreturn_t handle_eud_irq_thread(int irq, void *data) +{ + struct eud_chip *chip = data; + int ret; + + if (chip->int_status == EUD_INT_VBUS) { + if (chip->usb_attach) + ret = usb_role_switch_set_role(chip->role_sw, USB_ROLE_DEVICE); + else + ret = usb_role_switch_set_role(chip->role_sw, USB_ROLE_HOST); + if (ret) + dev_err(chip->dev, "failed to set role switch\n"); + } + + return IRQ_HANDLED; +} + +static int eud_probe(struct platform_device *pdev) +{ + struct eud_chip *chip; + struct fwnode_handle *fwnode = pdev->dev.fwnode, *ep, *connector; + int ret; + + chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL); + if (!chip) + return -ENOMEM; + + chip->dev = &pdev->dev; + + ep = fwnode_graph_get_next_endpoint(fwnode, NULL); + if (!ep) + return -ENODEV; + + connector = fwnode_graph_get_remote_port_parent(ep); + fwnode_handle_put(ep); + if (!connector) + return -ENODEV; + + chip->role_sw = fwnode_usb_role_switch_get(connector); + if (IS_ERR(chip->role_sw)) { + return dev_err_probe(chip->dev, PTR_ERR(chip->role_sw), + "failed to get role switch\n"); + } + + chip->eud_reg_base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(chip->eud_reg_base)) + return PTR_ERR(chip->eud_reg_base); + + chip->eud_mode_mgr2_phys_base = devm_platform_ioremap_resource(pdev, 1); + if (IS_ERR(chip->eud_mode_mgr2_phys_base)) + return PTR_ERR(chip->eud_mode_mgr2_phys_base); + + chip->eud_irq = platform_get_irq(pdev, 0); + ret = devm_request_threaded_irq(&pdev->dev, chip->eud_irq, handle_eud_irq, + handle_eud_irq_thread, IRQF_ONESHOT, NULL, chip); + if (ret) + return dev_err_probe(chip->dev, ret, "failed to allocate irq\n"); + + enable_irq_wake(chip->eud_irq); + + platform_set_drvdata(pdev, chip); + + return 0; +} + +static int eud_remove(struct platform_device *pdev) +{ + struct eud_chip *chip = platform_get_drvdata(pdev); + + if (chip->enable) + disable_eud(chip); + + device_init_wakeup(&pdev->dev, false); + disable_irq_wake(chip->eud_irq); + + return 0; +} + +static const struct of_device_id eud_dt_match[] = { + { .compatible = "qcom,sc7280-eud" }, + { } +}; +MODULE_DEVICE_TABLE(of, eud_dt_match); + +static struct platform_driver eud_driver = { + .probe = eud_probe, + .remove = eud_remove, + .driver = { + .name = "eud", + .dev_groups = attr_groups, + .of_match_table = eud_dt_match, + }, +}; +module_platform_driver(eud_driver); + +MODULE_DESCRIPTION("QTI EUD driver"); +MODULE_LICENSE("GPL v2"); From patchwork Tue Nov 23 04:28:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 12633417 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 B9214C4332F for ; Tue, 23 Nov 2021 04:31:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233834AbhKWEeH (ORCPT ); Mon, 22 Nov 2021 23:34:07 -0500 Received: from m43-7.mailgun.net ([69.72.43.7]:10723 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233765AbhKWEd5 (ORCPT ); Mon, 22 Nov 2021 23:33:57 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1637641850; h=References: In-Reply-To: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=o5Z2j0fumANGjt04OboBMfLPmwhp2n40LFjs6YfNtlw=; b=n7R1ziH1X8NftWlqOmpFRUEE7Ksy7XXlqGGZteeX5dptFG+tjycHZOJREbPf3r4cydKll1YB uCU307qCrxI7Rw+2a+0GPIwofKLjupgEHoXFe7VQyQyu3oNvk7HC/+s7n8+AqNTiOTzlDU5D ZbLhylXdUZKLHxZlV9vAc4Re46c= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 619c6e7a5daaeec797f80851 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 23 Nov 2021 04:30:50 GMT Sender: schowdhu=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 19B15C4314C; Tue, 23 Nov 2021 04:30:49 +0000 (UTC) Received: from blr-ubuntu-525.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: schowdhu) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6D6B2C4363B; Tue, 23 Nov 2021 04:30:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 6D6B2C4363B Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Souradeep Chowdhury To: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, pure.logic@nexus-software.ie, bjorn.andersson@linaro.org, greg@kroah.com Cc: linux-kernel@vger.kernel.org, tsoni@codeaurora.org, psodagud@codeaurora.org, satyap@codeaurora.org, pheragu@codeaurora.org, rnayak@codeaurora.org, sibis@codeaurora.org, saiprakash.ranjan@codeaurora.org, quic_schowdhu@quicinc.com, Souradeep Chowdhury Subject: [PATCH V1 6/8] arm64: dts: qcom: sc7280: Add EUD dt node and dwc3 connector Date: Tue, 23 Nov 2021 09:58:24 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the Embedded USB Debugger(EUD) device tree node. The node contains EUD base register region and EUD mode manager register regions along with the interrupt entry. Also add the connector to EUD which is mapped as the child of dwc3. The connector is attached to EUD via port. Also add the role-switch property to dwc3 node. Signed-off-by: Souradeep Chowdhury --- arch/arm64/boot/dts/qcom/sc7280.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index 53a21d0..2d14e5c 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -1315,6 +1315,18 @@ phys = <&usb_2_hsphy>; phy-names = "usb2-phy"; maximum-speed = "high-speed"; + usb-role-switch; + usb_con: eud_usb_connector { + compatible = "qcom,usb-connector-eud", + "usb-c-connector"; + ports { + port@0 { + usb2_role_switch: endpoint { + remote-endpoint = <&eud_ep>; + }; + }; + }; + }; }; }; @@ -1339,6 +1351,19 @@ interrupts = ; }; + eud: eud@88e0000 { + compatible = "qcom,sc7280-eud","qcom,eud"; + reg = <0 0x88e0000 0 0x2000>, + <0 0x88e2000 0 0x1000>; + interrupt-parent = <&pdc>; + interrupts = <11 IRQ_TYPE_LEVEL_HIGH>; + port { + eud_ep: endpoint { + remote-endpoint = <&usb2_role_switch>; + }; + }; + }; + nsp_noc: interconnect@a0c0000 { reg = <0 0x0a0c0000 0 0x10000>; compatible = "qcom,sc7280-nsp-noc"; From patchwork Tue Nov 23 04:28:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 12633419 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 0B08AC433EF for ; Tue, 23 Nov 2021 04:31:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233479AbhKWEeK (ORCPT ); Mon, 22 Nov 2021 23:34:10 -0500 Received: from m43-7.mailgun.net ([69.72.43.7]:22718 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233730AbhKWEeC (ORCPT ); Mon, 22 Nov 2021 23:34:02 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1637641855; h=References: In-Reply-To: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=uLtUrPaxrs3TxQEsVzUffNucdpkhobfe2yKEGXRz+aM=; b=mgFYbrrobs7uPvu1tlrORoG7k4ljyJRAbBN4738pGdqxXmckyRJ+xL6wC0PHHST6GTMfC9G9 JZk88bylPJGHLjQ9TpeG3jN2DpG4uB6kNgLPWbFBJcs2E828cA2Fvl5/Oqf8YhObzCA1kemC /n8SceT2mTz+V1iIFNvAUHAonG4= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n08.prod.us-east-1.postgun.com with SMTP id 619c6e7edf12ba53c4f4d4ee (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 23 Nov 2021 04:30:54 GMT Sender: schowdhu=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id D711DC4363B; Tue, 23 Nov 2021 04:30:53 +0000 (UTC) Received: from blr-ubuntu-525.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: schowdhu) by smtp.codeaurora.org (Postfix) with ESMTPSA id 969A6C43638; Tue, 23 Nov 2021 04:30:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 969A6C43638 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Souradeep Chowdhury To: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, pure.logic@nexus-software.ie, bjorn.andersson@linaro.org, greg@kroah.com Cc: linux-kernel@vger.kernel.org, tsoni@codeaurora.org, psodagud@codeaurora.org, satyap@codeaurora.org, pheragu@codeaurora.org, rnayak@codeaurora.org, sibis@codeaurora.org, saiprakash.ranjan@codeaurora.org, quic_schowdhu@quicinc.com, Souradeep Chowdhury Subject: [PATCH V1 7/8] arm64: dts: qcom: sc7280: Set the default dr_mode for usb2 Date: Tue, 23 Nov 2021 09:58:25 +0530 Message-Id: <266a032cb9b45593707874da0ddc3faa29665baf.1637639009.git.schowdhu@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Set the default dr_mode for usb2 node to "otg" to enable. role-switch for EUD(Embedded USB Debugger) connector node. Signed-off-by: Souradeep Chowdhury --- arch/arm64/boot/dts/qcom/sc7280-idp.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dts b/arch/arm64/boot/dts/qcom/sc7280-idp.dts index 64fc22a..7c69c78 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dts +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dts @@ -61,6 +61,10 @@ modem-init; }; +&usb_2_dwc3 { + dr_mode = "otg"; +}; + &pmk8350_vadc { pmr735a_die_temp { reg = ; From patchwork Tue Nov 23 04:28:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 12633421 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 38326C433FE for ; Tue, 23 Nov 2021 04:31:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233842AbhKWEeU (ORCPT ); Mon, 22 Nov 2021 23:34:20 -0500 Received: from so254-9.mailgun.net ([198.61.254.9]:34839 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233888AbhKWEeJ (ORCPT ); Mon, 22 Nov 2021 23:34:09 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1637641861; h=References: In-Reply-To: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=q0VlsVC9HXyCfoVmkJHesTG3+OKO4gn+/PWCBxQNL7s=; b=M91zBpmAwq10HBtUwzovOkJ2gSMGmybhf+WnnDZJvtM1AllXLPzQhy0KG2e7xHlLMgOgXcWr LnwcVHml2xg0SevVbqjhUMQL2ukBwuBnSA+2+S7lfK0PQMH5zPYi/y9QffzRNdAWd72o5rZa Xt8jIoe/RUhyQyKlqSiDZ1V5/2A= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-east-1.postgun.com with SMTP id 619c6e8586d0e4d888c0ad70 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 23 Nov 2021 04:31:01 GMT Sender: schowdhu=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 2F23AC4314C; Tue, 23 Nov 2021 04:30:59 +0000 (UTC) Received: from blr-ubuntu-525.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: schowdhu) by smtp.codeaurora.org (Postfix) with ESMTPSA id C4A08C43618; Tue, 23 Nov 2021 04:30:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org C4A08C43618 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Souradeep Chowdhury To: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, pure.logic@nexus-software.ie, bjorn.andersson@linaro.org, greg@kroah.com Cc: linux-kernel@vger.kernel.org, tsoni@codeaurora.org, psodagud@codeaurora.org, satyap@codeaurora.org, pheragu@codeaurora.org, rnayak@codeaurora.org, sibis@codeaurora.org, saiprakash.ranjan@codeaurora.org, quic_schowdhu@quicinc.com, Souradeep Chowdhury Subject: [PATCH V1 8/8] MAINTAINERS: Add maintainer entry for EUD Date: Tue, 23 Nov 2021 09:58:26 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the entry for maintainer for EUD driver and other associated files. Signed-off-by: Souradeep Chowdhury --- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0227e15..54f616a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7018,6 +7018,14 @@ F: include/trace/events/mdio.h F: include/uapi/linux/mdio.h F: include/uapi/linux/mii.h +EUD-QCOM +M: Souradeep Chowdhury +L: linux-arm-msm@vger.kernel.org +S: Maintained +F: Documentation/ABI/testing/sysfs-driver-eud +F: Documentation/devicetree/bindings/arm/msm/qcom,eud.yaml +F: drivers/usb/common/qcom_eud.c + EXFAT FILE SYSTEM M: Namjae Jeon M: Sungjong Seo