From patchwork Wed May 17 21:17:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 682995 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 5C5FDC7EE2C for ; Wed, 17 May 2023 21:19:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229885AbjEQVTK (ORCPT ); Wed, 17 May 2023 17:19:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjEQVTF (ORCPT ); Wed, 17 May 2023 17:19:05 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CEBE9023 for ; Wed, 17 May 2023 14:18:40 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-64388cf3263so928328b3a.3 for ; Wed, 17 May 2023 14:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684358293; x=1686950293; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/foJvy2H11hs5U0azHSnrQ7t4rS3XX0dM/KWP8Ep2ME=; b=Th60rWvh2iNisgtghM6ZzEq9K0EkgEr4VXi3UlJyUyiP+460PFZ5JqtkZK3BGSvoTH K/WWkEN4lkHF1N1DhYEIZuvJyKLDgPYVP4gGU4guA0fqzj3dC5GbZfK549hMUtWRXalT fT9Ou4y9cO1PL7TG6RA7IDohMOS3DsLW2tCg4llfTOZ4xBBkB6vUN/p4Vbg4teMs7KSu 3ilkh4td/bBuHntwo6d/JCNgsAj7NuI72hbuNPpal8JPyLDpTOxyNoesFNcctHJp6qUk ysLmYetj/28I4Q3c/9uQNjVULqMSqq0xrjSM9E3bgpM2iIquXeZ8CXltJFavolf/eAFF ckqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684358293; x=1686950293; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/foJvy2H11hs5U0azHSnrQ7t4rS3XX0dM/KWP8Ep2ME=; b=Zj+gEr0xbY4yOcxxnvTQcLgBUgLe2E6dhouECCl9QflhQlB4stBUSbDmWxBTmsbRiC s7T8P9unRPWWEWcFI6t+t4G/PNeWC873R5nqPspk+ZKxf3enwRfQjIjrqcRT66ZPdxtm vx7ELS9q+Sesb8MIiGMc6Nay3RMa8gdO95XbWWJpLQCfu2J4I+CC8G1egOV15WJqGYD7 eOXATCWfK3/3Oq1+UZXRQrWdbkfbNTidXGpRpVJmfNhRLVQafFo2ERm7doCS4PU1kuBW QeQ/cb+SLW8LMEYSoPVKuQidQtfyZjf7lhseL85cQjM0GIlGG+XlXixnr/UBTTJI206F DMHg== X-Gm-Message-State: AC+VfDzTTn+XuKV8W+IBjAXv0yi/RzjTk6OGttOukPdNXvYA0qM9qTy7 cJvkGlAQOOkjVNxT/jTxxBAeiaWjrNd7IjWDmoc= X-Google-Smtp-Source: ACHHUZ6yw7WIHip5dqJcUZxgerTW+/OJRBY0G1K6ZjqYzK9H3Gmq6HfpJEcdVnlBedsu0lLoLPtqvQ== X-Received: by 2002:a05:6a00:1908:b0:646:59e4:9514 with SMTP id y8-20020a056a00190800b0064659e49514mr1434833pfi.7.1684358293326; Wed, 17 May 2023 14:18:13 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1c60:6bed:7a51:340a:a439:1b87]) by smtp.gmail.com with ESMTPSA id n18-20020aa79052000000b0064cb6206463sm4359210pfo.85.2023.05.17.14.18.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 14:18:13 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, linux-kernel@vger.kernel.org, bhupesh.linux@gmail.com, bhupesh.sharma@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, krzysztof.kozlowski@linaro.org, quic_schowdhu@quicinc.com, gregkh@linuxfoundation.org, Manivannan Sadhasivam Subject: [PATCH v6 1/6] usb: misc: eud: Fix eud sysfs path (use 'qcom_eud') Date: Thu, 18 May 2023 02:47:51 +0530 Message-Id: <20230517211756.2483552-2-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230517211756.2483552-1-bhupesh.sharma@linaro.org> References: <20230517211756.2483552-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The eud sysfs enablement path is currently mentioned in the Documentation as: /sys/bus/platform/drivers/eud/.../enable Instead it should be: /sys/bus/platform/drivers/qcom_eud/.../enable Fix the same. Fixes: 9a1bf58ccd44 ("usb: misc: eud: Add driver support for Embedded USB Debugger(EUD)") Reviewed-by: Konrad Dybcio Acked-by: Manivannan Sadhasivam Signed-off-by: Bhupesh Sharma --- Documentation/ABI/testing/sysfs-driver-eud | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-driver-eud b/Documentation/ABI/testing/sysfs-driver-eud index 83f3872182a4..2bab0db2d2f0 100644 --- a/Documentation/ABI/testing/sysfs-driver-eud +++ b/Documentation/ABI/testing/sysfs-driver-eud @@ -1,4 +1,4 @@ -What: /sys/bus/platform/drivers/eud/.../enable +What: /sys/bus/platform/drivers/qcom_eud/.../enable Date: February 2022 Contact: Souradeep Chowdhury Description: From patchwork Wed May 17 21:17:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 682994 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 4F35AC7EE2A for ; Wed, 17 May 2023 21:19:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230010AbjEQVTQ (ORCPT ); Wed, 17 May 2023 17:19:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230008AbjEQVTJ (ORCPT ); Wed, 17 May 2023 17:19:09 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B20E1D053 for ; Wed, 17 May 2023 14:18:48 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-643a1656b79so1026088b3a.3 for ; Wed, 17 May 2023 14:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684358302; x=1686950302; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zF+7RIYO2NHXGA6P5+vCgbOZX4fdEtvPnQSZuYHbKNI=; b=ww4ish6tk4YHTz2au/iHbJFIyrXvLDXsq8IWHUekpRD0/FCDdPLFHU5fzmlorGRTLD XW2tpFrTSLlBQABfRh9xJx6UGXTS2hP3jUzCWj+k/LYt3Mgxixpjn3cqcK838Did/9WV rfooWUwHGQwUV3N62VtvZ37mnmiWAa0DK/bQpTg9dMC2/ojWDo7WVtKnZuUlNeOjxN7R jdxIF+XbnPR304UpWoUsXz5IjHqz7hlkv41Kv4aBd8/FOtphgtBy5LFybgE06CxBJtsG 0daUnChB+/MVFy6k7ZHqJsjo3M0cSYsNjJjbmFXnSZgZN2sXTD0xVrB4vqGaeQJuevT+ 9GAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684358302; x=1686950302; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zF+7RIYO2NHXGA6P5+vCgbOZX4fdEtvPnQSZuYHbKNI=; b=Ro+uoPp5f1FqtAa6RAzfCaV4OJl1ijoafgl16vpbVmtZ0jWLiuvK9w40yUfgiUdZmD Y3tfKT+o6/KXqdrJxS5eqtOI2H61NiZTnJeEohkVrXBQ8cE4ZxbNqYIOmB2CDo1SBNZx h97KXyZ9q0BxqVqi20SVGOglacFOLcAlaLeM10T/F+oE5yFaOY06s0zgRsoYc/CgKldI RzylCY+H6syNNvKwqPCko476SV7l7v7XA+H/YrPWjxx6VfZ3dNJiic2rFzqjSlZcDfnD cFuZLm5T3zhSqd/C+MQ0fs4xli/GiPI9sB3x5rZANabQx+XCDH/eYIKkjxQT/CVOxQwF Jr9A== X-Gm-Message-State: AC+VfDzDpH3Lvg4OQVeCmZgb7caNCmEoeVz9yUvRwqicM4aCkZ6fp5xf dRQMwrBGKKxRvvWYWTxCS52X+5yjacV+KtDUVs0= X-Google-Smtp-Source: ACHHUZ4l/I0VpnhhBMLrBn7uwuEZNrxShjfe+DfG2+bGSu3lNggX7kQ+10Sv+Y4Qiph6nD7QsMFCPQ== X-Received: by 2002:a05:6a00:15cd:b0:646:5f98:6bb4 with SMTP id o13-20020a056a0015cd00b006465f986bb4mr1412622pfu.33.1684358302552; Wed, 17 May 2023 14:18:22 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1c60:6bed:7a51:340a:a439:1b87]) by smtp.gmail.com with ESMTPSA id n18-20020aa79052000000b0064cb6206463sm4359210pfo.85.2023.05.17.14.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 14:18:22 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, linux-kernel@vger.kernel.org, bhupesh.linux@gmail.com, bhupesh.sharma@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, krzysztof.kozlowski@linaro.org, quic_schowdhu@quicinc.com, gregkh@linuxfoundation.org Subject: [PATCH v6 3/6] usb: misc: eud: Fix indentation issues Date: Thu, 18 May 2023 02:47:53 +0530 Message-Id: <20230517211756.2483552-4-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230517211756.2483552-1-bhupesh.sharma@linaro.org> References: <20230517211756.2483552-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Fix a couple of indentation issues in EUD driver. Signed-off-by: Bhupesh Sharma --- drivers/usb/misc/qcom_eud.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index b7f13df00764..74f2aeaccdcb 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -22,10 +22,10 @@ #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_REG_EUD_EN2 0x0000 #define EUD_ENABLE BIT(0) -#define EUD_INT_PET_EUD 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) From patchwork Wed May 17 21:17:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 682993 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 CB35FC7EE22 for ; Wed, 17 May 2023 21:19:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230074AbjEQVTZ (ORCPT ); Wed, 17 May 2023 17:19:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbjEQVTO (ORCPT ); Wed, 17 May 2023 17:19:14 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C4E7D2D7 for ; Wed, 17 May 2023 14:18:56 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6436dfa15b3so929340b3a.1 for ; Wed, 17 May 2023 14:18:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684358311; x=1686950311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TaOxHre3ovU7Pucxt1LaFOdz4xHkq3r9vi0PelhMX8M=; b=pyXV4Fhls1HBbuAaTrUbGFCRy5EipRtmSV3hfUir2wZPT3hVCHakLcBc7lgbqkKy8X xV6s9Haquqh2efKd7ts10jabPFQOhBOF5i3aqlcA/DjOmv7HdENvJuA0MDkVg4TyPDUe MZ6iy1HW6oPuChk7VrU8CAGss/JZs3jqjqSjNbrvNDcfzns8eDzFA3GyOXBGyYOT6/64 hIjApE19ySrr1ATionl25OKoNaNdriNIYVhDlcE1lz7RjrLkkWz/CdDR0lNlJzbY++4p gBHfy+BhbAf4/GGPByCiCKk1oxmJGpYAsAnM28R9CtClLHT6kVPFJsM8nITOmFWtkbz7 YeUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684358311; x=1686950311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TaOxHre3ovU7Pucxt1LaFOdz4xHkq3r9vi0PelhMX8M=; b=ev3NvtNhDn2Yno3qrUWxtpwnwU6MuKMcwlzzRMM4uBNABXuM1AJF7aQIj7SmSRNk0d iWLSg7KcUFH1yjOQnf7GfrhMXQJjZ8BAGTFUG1EOPtSY1y030ji62NlUdkCtN7Ijh9s5 n2VgsBDP+XkVG9VFk1Wtv9WBX0ebZmBWLx+7wzcKiY8GSP44xmVe2X2MHUc0zzEj99ME pc3dNvjjFpjocndbwyjfIc9jDgef8wLbUJU0v+Y/dh+hXNNh3tEhsp4/5306ed/VglOo cvOEHZ/8A0y/nuHpN/FAKev8CGxhN6HRc/qO/P7G8vNd+/csFMGVHGnZ/JXliROhndBN ipIw== X-Gm-Message-State: AC+VfDzTyWJPmRukkyfE4BMdfHyrPkBT8g5ITNCYgB8i8beRSJ4L2rN3 O5SoLW0B5yJ5Qatq/OVcVrdAYEwy/uOD8TnN5Yw= X-Google-Smtp-Source: ACHHUZ7masePph0GCUOSSsLvYgjE1D6uV20rKtOgRKNVUwYOlgLJUvuBZ2R9P7oPXxVe1uRK1WyD5w== X-Received: by 2002:a05:6a00:1948:b0:63d:47ab:65ed with SMTP id s8-20020a056a00194800b0063d47ab65edmr1558870pfk.7.1684358311634; Wed, 17 May 2023 14:18:31 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1c60:6bed:7a51:340a:a439:1b87]) by smtp.gmail.com with ESMTPSA id n18-20020aa79052000000b0064cb6206463sm4359210pfo.85.2023.05.17.14.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 14:18:31 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, linux-kernel@vger.kernel.org, bhupesh.linux@gmail.com, bhupesh.sharma@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, krzysztof.kozlowski@linaro.org, quic_schowdhu@quicinc.com, gregkh@linuxfoundation.org Subject: [PATCH v6 5/6] arm64: dts: qcom: sm6115: Add EUD dt node and dwc3 connector Date: Thu, 18 May 2023 02:47:55 +0530 Message-Id: <20230517211756.2483552-6-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230517211756.2483552-1-bhupesh.sharma@linaro.org> References: <20230517211756.2483552-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the Embedded USB Debugger(EUD) device tree node for SM6115 / SM4250 SoC. The node contains EUD base register region, EUD mode manager register region and TCSR Base register region along with the interrupt entry. Also add the typec connector node for EUD which is attached to EUD node via port. EUD is also attached to DWC3 node via port. To enable the role switch, we need to set dr_mode = "otg" property for 'usb_dwc3' sub-node in the board dts file. Also the EUD device can be enabled on a board once linux is boot'ed by setting: $ echo 1 > /sys/bus/platform/drivers/qcom_eud/../enable Reviewed-by: Konrad Dybcio Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/sm6115.dtsi | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index f67863561f3f..92a82d7172ca 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -180,6 +180,18 @@ core3 { }; }; + eud_typec: connector { + compatible = "usb-c-connector"; + + ports { + port@0 { + con_eud: endpoint { + remote-endpoint = <&eud_con>; + }; + }; + }; + }; + firmware { scm: scm { compatible = "qcom,scm-sm6115", "qcom,scm"; @@ -647,6 +659,37 @@ gcc: clock-controller@1400000 { #power-domain-cells = <1>; }; + eud: eud@1610000 { + compatible = "qcom,sm6115-eud", "qcom,eud"; + reg = <0x0 0x01610000 0x0 0x2000>, + <0x0 0x01612000 0x0 0x1000>, + <0x0 0x003c0000 0x0 0x40000>; + reg-names = "eud-base", "eud-mode-mgr", "tcsr-base"; + interrupts = ; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + eud_ep: endpoint { + remote-endpoint = <&usb2_role_switch>; + }; + }; + + port@1 { + reg = <1>; + + eud_con: endpoint { + remote-endpoint = <&con_eud>; + }; + }; + }; + }; + usb_hsphy: phy@1613000 { compatible = "qcom,sm6115-qusb2-phy"; reg = <0x0 0x01613000 0x0 0x180>; @@ -1144,6 +1187,13 @@ usb_dwc3: usb@4e00000 { snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x10>; snps,usb3_lpm_capable; + usb-role-switch; + + port { + usb2_role_switch: endpoint { + remote-endpoint = <&eud_ep>; + }; + }; }; };