From patchwork Tue Jul 18 06:10:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 121782 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1537070vqt; Mon, 17 Jul 2023 23:17:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlEY+JvHtabP1ca4BV85RHsZHTkyx6FqU2Rp031SWat/rOcg2YWB/NK09Ubfu8NetT/JBTcY X-Received: by 2002:a05:6512:158d:b0:4f8:596a:4bb7 with SMTP id bp13-20020a056512158d00b004f8596a4bb7mr9467767lfb.57.1689661036687; Mon, 17 Jul 2023 23:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689661036; cv=none; d=google.com; s=arc-20160816; b=z1yenqrriZY44SFyM+6SINHjfH+sPnXHSO2W8KlVzazdTk4VRnUKulj/R8WGMEIDgP nYolr8ypo5wGoUyhcOWsLa601gg9mS7uZuZBnIcqRKxZW6PebwZ1JaltMssl2pynY117 RCdxPohuWU8dIsfArTvKsnBNS6lIa9Kxgqi+8txv6bSsRWe3j6EaOB0nBXruielBOviH 2Nx9yRxbQTE9FR+EAg7smMyEpzuwUZkwCGyxwLFwP8w1T7WQrP7umOtzo7ACQDq0sSe6 8jGg7/BPSVuQwKNIaapWxITP2GB0tZKLXw1FOdpd04RtuGdbIJPQVQ9mhj8II8BQvxjs a6pg== 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=aoaxiWdRTQIjlpKBPFLmbhlJ2o+zAdh4av4kyochmEo=; fh=m/g2beIBC/gUlgiFZ33vN+mjSQx49mQUAjZ4Ony+ssI=; b=0z0Hg93nK4yyiKU5uxb910ngLNjOfBNHS4D4+TTbebgZ+1VVILfuQl/zhBs7BBz0Zl hjhxXE11mkDT/RqmFmL2rbFVW4ltnade8fdeT7fPBJKPKpOGzxyOCK8NWCtu6qoKagct y5vjgxP/9ByS4MkSVtC+TqhqTwrDGAsIhWGBhoAfdgTIdqHpQjSWlancaYxfMVglzPE9 VwKwgV9rwG+99Y4JR6/uXpxhXM82pXL6XcIRnO/lz7a/i6LLkLZNAZZAKJNPEzDgkywP xBlGSkjuqx2Zn7IsW9vzPXk9gMZ8NeYbinbZaOZcCoWj/qIhA9rHhvBA6c6LE/bqFahb H/nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sn5U4MWG; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a50fc09000000b0051df544225csi686193edr.540.2023.07.17.23.16.53; Mon, 17 Jul 2023 23:17:16 -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=sn5U4MWG; 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 S231419AbjGRGMm (ORCPT + 99 others); Tue, 18 Jul 2023 02:12:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231417AbjGRGMN (ORCPT ); Tue, 18 Jul 2023 02:12:13 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D50751731 for ; Mon, 17 Jul 2023 23:11:48 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6726d5d92afso3944916b3a.1 for ; Mon, 17 Jul 2023 23:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689660700; x=1692252700; 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=aoaxiWdRTQIjlpKBPFLmbhlJ2o+zAdh4av4kyochmEo=; b=sn5U4MWGxnrt7DhiV2WWKv7dD7NLNlyt1BcEtCXTkOw/Uf8oIJ6PwmKIwF6FtLKPhg 8TlIKNSQAyZVe1gfVbgEx2k8bk5LMX+QAuclX+KMIcO0NFJoSrIERmxT118aoGWjIzCc fUmHl4YQZsx/3es7b/IVW1UOf/2CleLxq5vu/8l6FlBARVxbuw+8O7D528NGSBVVihRd Pj7faOnq6na2/+UZbhmoh6Nk4yfgUZ2Qz4qtTekyyv8G6nGfu5sTfSsW2JCbSsqAzq8m +1gff7MypqYM5gumiG3UP0JgnJp+awXH9VN26Zp0jgZTC4al32RLzwDOhW0f4ctfmDwr okbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689660700; x=1692252700; 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=aoaxiWdRTQIjlpKBPFLmbhlJ2o+zAdh4av4kyochmEo=; b=czk6pNfhECzoBfdpZZ9lyqCbyMWB05YI6r34PPpXsIQng+/gvxpsdnw/8yD1KmVrOf qw7DBDQg80npT82fqLPdDZTG3umh/OBAFJ+pJNZD9Jgg7wZXkORZLypzyiN2d+l1SmgE OEXUESyN6ss6PV2F69C1AJKA1sn/Hs8LoOKhh4WiEmd27ewGh8qMn8cW3M32LkC1e11t IC1t+nHGb4KqSdRKgWtmg7/sBnjVw/5eP0mhV9MgYZGvfmD4hTPrInQCsUdEGcEz1odN u3NrI1hz4tJU7xOHg16IeZMspZg7tJBrMmhk48pLFrS/aPlEGM05sC1IU8jO6tEWXomc yAog== X-Gm-Message-State: ABy/qLYhiiCU/x6RGeB/OR/IqvRh/V3NIiT3TnbCdTCzC2CYS92ocWi8 dDrcG8KPeNLg00D29c+Ze3/zFQ== X-Received: by 2002:a05:6a20:9189:b0:12f:d350:8a12 with SMTP id v9-20020a056a20918900b0012fd3508a12mr15193455pzd.21.1689660700254; Mon, 17 Jul 2023 23:11:40 -0700 (PDT) Received: from localhost.localdomain ([223.233.68.54]) by smtp.gmail.com with ESMTPSA id h21-20020a62b415000000b0067db7c32419sm778106pfn.15.2023.07.17.23.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 23:11:39 -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, stephan@gerhold.net Subject: [PATCH v9 7/7] arm64: dts: qcom: qrb4210-rb2: Enable EUD debug peripheral Date: Tue, 18 Jul 2023 11:40:52 +0530 Message-Id: <20230718061052.1332993-8-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230718061052.1332993-1-bhupesh.sharma@linaro.org> References: <20230718061052.1332993-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771738011245554132 X-GMAIL-MSGID: 1771738011245554132 Since the USB-C type port on the Qualcomm QRB4210-RB2 board can be set primarily in a 'device' configuration (with the default DIP switch settings), it makes sense to enable the EUD debug peripheral on the board by default by setting the USB 'dr_mode' property as 'otg'. Now, the EUD debug peripheral can be enabled by executing: $ echo 1 > /sys/bus/platform/drivers/qcom_eud/1610000.eud/enable Reviewed-by: Konrad Dybcio Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 27 +++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts index a7278a9472ed9..640668960deb0 100644 --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts @@ -264,6 +264,10 @@ &pon_resin { status = "okay"; }; +&eud { + status = "okay"; +}; + &qupv3_id_0 { status = "okay"; }; @@ -518,7 +522,28 @@ &usb { &usb_dwc3 { maximum-speed = "super-speed"; - dr_mode = "peripheral"; + + /* + * There is only one USB DWC3 controller on QRB4210 board and it is connected + * via a DIP Switch: + * - to either an USB - C type connector or an USB - A type connector + * (via a GL3590-S hub), and + * - to either an USB - A type connector (via a GL3590-S hub) or a connector + * for further connection with a mezzanine board. + * + * All of the above hardware muxes would allow us to hook things up in + * different ways to some potential benefit for static configurations (for e.g. + * on one hand we can have two USB - A type connectors and a USB - Ethernet + * connection available and on the other we can use the USB - C type in + * peripheral mode). + * + * Note that since the USB - C type can be used only in peripehral mode, + * so hardcoding the mode to 'peripheral' here makes sense. + * + * However since we want to use the EUD debug device, we set the mode as + * 'otg' here. + */ + dr_mode = "otg"; }; &usb_hsphy {