Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp46119rwd; Wed, 17 May 2023 14:25:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6QHzQ1wRW5qL+QVY3/HdGtwJs0iuO091KlkXaOFaOyF6rBGwgYSkz7BaZ4+QLUnC31sDVH X-Received: by 2002:a05:6a00:80a:b0:624:7c9a:c832 with SMTP id m10-20020a056a00080a00b006247c9ac832mr1531618pfk.8.1684358706784; Wed, 17 May 2023 14:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684358706; cv=none; d=google.com; s=arc-20160816; b=rI4Ssxz0x4T3+zaKoHA+R8AakbFGoodR9SVbHTTUyYPXeDmo6/0gL8hvd7y/4Q6M0z 3Xc22sWwHbGC5HVQJfEy59EfISjUkaJKIOFvok7+dCeuL9Ve7Tk+f7CV4bTn03VoIjdD xN+lDvidohIXSFkiW6xDURvqe3kYXHjr7T6XIAg5PZ3BghavpEL4hjHzYScC1iwldkB0 D5vSyDHJPVpndbay6eoJ0RhHQtlySvPFCLEW10Fm3eXBT9eGqsBX14gd/BuJqTqtDTx2 AzXDazjnfRiiSfR0zdDR++cuA5JzKPfUwDbyFiQXQzHa4MVAPyJMvIEG7yMJRwT0LGeM ICuQ== 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=TaOxHre3ovU7Pucxt1LaFOdz4xHkq3r9vi0PelhMX8M=; b=CVsb7qcv2aSv9KGhW97i+F/Ey/vQxdJTecOpZdFkm8Nnaq+a6L464vWf3apVqJcNQ3 YuSJdk5WBcBVknXKtHA0GRBrgwbZaOvEdsx0Y3dUBhLRpCriAI+OUTdquPKnVZZptCEU dy7laOjPgJ7KNf1ZSxCYt+QM2TOT54k5fkdcNm5AbfYL0vWdC72E32VnYsKP86s2MSNy iihDL712pFY6PzaxHqFu6AexOn1ID8gW1FnwuE1Dt8t9GToHhnBTWw5lojmGilsbdFXZ YjAeSdm8/y+1P8RnS/NSrbXeJ7UWMwGbYgD5F33a0KN4Ib4kWbXdXnFq/SDRWMju03qd evuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pyXV4Fhl; 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 w18-20020a63af12000000b0053076a4da8asi16976016pge.770.2023.05.17.14.24.48; Wed, 17 May 2023 14:25:06 -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=pyXV4Fhl; 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 S230187AbjEQVTZ (ORCPT + 99 others); Wed, 17 May 2023 17:19:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbjEQVTN (ORCPT ); Wed, 17 May 2023 17:19:13 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 141BFD2CE for ; Wed, 17 May 2023 14:18:56 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6436dfa15b3so929336b3a.1 for ; Wed, 17 May 2023 14:18:55 -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=EZnWMFNC5YGBUOeogFhmVz6QF4zG5LyC9fkpRvjCJaek1GzQLYEuY1z3JBiR4sLoAJ /2XPgtDeZqQ7bRdKpHxm8tWB6TOZ3NjZ+58nj+LeT0ub4hnXD6Hq2D+A6njYtP5xX4Nx A3/GGqFuXVePUmF97mCt5Zx0iNXnCHaYPvymei75dsMwbrkWbURi8Utf7oP0IG9iUY8G Ab/LkeZ47P7hDZW8Nb6fQIrs+fAq1vG/1yL5vxnAh8mPXm29Sg/95xgerBWwD2icfQIc 7X2UFEI/eiaD/WJaKE5kTdgyOhIapV4V21sDkpgqbcmnsrspb3A1T4TVcnqLL0dgFb6c nXnw== X-Gm-Message-State: AC+VfDwR1r6jCz9objvvJKuCNARvJGgxNXqTVCkNBUWYoLkNJCJFsbu+ zQ9HXwaN+x/NKFSxfJNyWnp/7A== 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 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,URIBL_BLOCKED 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 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>; + }; + }; }; }; -- 2.38.1