From patchwork Mon Jul 17 10:32:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 121195 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1025868vqt; Mon, 17 Jul 2023 03:38:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlHrygpE5pq5AXPAu684BBxfzm5bQs/zuV5YSNdbNHx2yH8vA8XdHPnE6f2ciHOqY8E6kpou X-Received: by 2002:a17:907:3f10:b0:994:55ce:1630 with SMTP id hq16-20020a1709073f1000b0099455ce1630mr10143570ejc.42.1689590319684; Mon, 17 Jul 2023 03:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689590319; cv=none; d=google.com; s=arc-20160816; b=wQDo1LvWZce+1K5aHqRoyiFIBYyTGpartIPdVfj1KlEVaDNUUURdRVw2cwBXxreX/j CTAF1PhWXzsgmQSX5QMuDZ5egDhIzmdywvCw4tMB5AENB0tuiuT32vkvllylpj29ZU9A 57dKt6b9BbkoX9tGZx38aKuhrmZj3tI7KYZEorzEugFal7KQIyxYs4q2X1LLabsaBHYT FZsNfp6DPWNP4683nWOZ41JVJQlZFKvVophK4v3axrkUtOYAMmWngOpiB873o4MyRiCT Tefzk45XvtA/OIOSR9FOQIKUZA3hFqUaL1IodG/gKHWaL3y/eRAJwd4I08FZ7iftecME glAQ== 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=EpmhsCJ53Xk7LwEhS9AhHTV+oP3v1t43CrLSIzR2Qco=; b=T6MLLKYRxBC3Viw9yl3jWuz6uBaMfk19bsPdjhYnf2bO5F9EP7Ph2Yet+O55F0SwJb xTurRPzwkCQ/iNZw87MMZoX8fiqXHZ2rNyGq2zQ6uYegfwi16SW3Y0sTSFrOLCbucpCX MHwcUJ8/1RSrRbtINEm5rotu9PUX1q1pfZpTBTBjbUbE/P4+Dq/mvLK/MR3WPO/97nHB 04Bd6VAS0RPVzauZDlXF7FizYFVLBbFqok0ha/KM6eo42JYF4hAAYnYH/FGdytLUvgHp WhPusrjeloYwwos9wu+WGNboHwN+wj7bj+5S5PWZDBGLJDh9hxYGGkgVqFQhxsH5F2tw W5qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g519a+G7; 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 gq7-20020a170906e24700b009886c420b37si12270811ejb.941.2023.07.17.03.38.15; Mon, 17 Jul 2023 03:38:39 -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=g519a+G7; 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 S231290AbjGQKdx (ORCPT + 99 others); Mon, 17 Jul 2023 06:33:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230333AbjGQKde (ORCPT ); Mon, 17 Jul 2023 06:33:34 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57F191BD2 for ; Mon, 17 Jul 2023 03:33:14 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1b8b318c5cfso34330955ad.1 for ; Mon, 17 Jul 2023 03:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689589992; x=1692181992; 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=g519a+G7tOuP5AGM99e4AMmxik1Mq8hK7gBhqN7FfI+fi/u8RiwEdZteCyakYGYPp6 LSJRF5Km6sXgyIAlc90wqM1qSPKCKc+H3LTr9jpdfZwmbJEbEka5ynRujS7NNNEB1CoS WHVeD8s+JTtarzKaGi2LDeJU8uJKCpuRSm9DJp142XsIcjzRrRByl9XNuIlqcYjHLsSI w8EoI4s1yeYtJRXOsfuf3TyVwtvx8DNZhLTifve1u6pdFo+iv8eD02apBZJqGs4Bedkk OGkhqV1yml1BoYdBsrB8DRKy9k7pjQH+j+nacouB8lEz7suiSGB2L70kIZ1ouOXOgALy ITPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689589992; x=1692181992; 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=CSfCLU7Zt/0Eb6yDGODF0bJsbxj8KxrrjpVwiFfpOG2Mi7djgIGxTHFO7Fg3Gm4oyS T+/wzndDQoGI/mIKMstlJKb522TmyS/eg7WXxoN2PFj6n7lEc1H6jfY2p2kUBs3z2mJR 6QrlBZLfEjr2OZoiFcBIiG/HC11k39D2aVPZmF9jSoKfaQZ3xMVjj+LRfGh1VkVWkv8R f0GtB37GZTnWMOqdcxW9UUwavSlsWE9rdT4RAD3TFak2XFBoioJ5Yk9EUFE1G46c9t/0 qgmZt9HOjBhyHVTWw4MbNkEZX2cozH1KjIBkz9Wvlcl1w4LfoCPRxGFzNJ0uab8r5ld2 rnIQ== X-Gm-Message-State: ABy/qLaMeEH3rtM87TPUaKk2t45+/H8Rk0tApA0B2C2o8PeX/hZxEq2F 5JMQLKZH1mSv9lk7sCloRS5oMg== X-Received: by 2002:a17:902:9347:b0:1b8:a12e:d655 with SMTP id g7-20020a170902934700b001b8a12ed655mr1968934plp.11.1689589991826; Mon, 17 Jul 2023 03:33:11 -0700 (PDT) Received: from localhost.localdomain ([223.233.68.54]) by smtp.gmail.com with ESMTPSA id ij9-20020a170902ab4900b001b9de67285dsm12633616plb.156.2023.07.17.03.33.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 03:33:11 -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 v8 4/4] arm64: dts: qcom: qrb4210-rb2: Enable EUD debug peripheral Date: Mon, 17 Jul 2023 16:02:36 +0530 Message-Id: <20230717103236.1246771-5-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230717103236.1246771-1-bhupesh.sharma@linaro.org> References: <20230717103236.1246771-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 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: 1771663859174521225 X-GMAIL-MSGID: 1771663859174521225 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 {