From patchwork Tue Nov 1 09:30:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13026761 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8448C433FE for ; Tue, 1 Nov 2022 09:31:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=uBql+0vEppstD0MT+qh2jzCAESPxeTp9aFGuyaYzn3E=; b=swQgipnLsAkjZM qIvro0OddEfvKxYpZHVbOZ0hdWOeJZ0Yk3cymOLC/ernZ1p4yTlkrn5E660Gx8XMQMdqWwhQb8a4j ToOkUowWnZZ0eOtWJpz3dQbD0Uz6cMoMn853riQVUZZ3WqiF/gXE8Y6uh/KAgBVQk8RH7bb8y25TQ 3TD3suEA1BeT3G1PjGOQDVT8UylHPkhUzLvwYC+DH2voPqK2FAojOAFkxVwuzJW+s5UW/3bE1nZPz sHmLlBLJbBg87KvMJTTNzJ69WPkyxB6Z5+Duaoy8lgvSsDeY5c/isO0CkAhd3/Vmw1W/UOp7X5hr7 Qg0qnPc2Q91HA1OpjYQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opnbU-003eAO-DD; Tue, 01 Nov 2022 09:30:40 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1opnbR-003e92-1n for linux-arm-kernel@lists.infradead.org; Tue, 01 Nov 2022 09:30:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1667295037; x=1698831037; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eEIGsA/PvZNFQUyUhmTytwmzIaUYi4AT15RJYkS3FJU=; b=SeiiYhDC9SFSI+rqwPMolv3riNklfgnDnNplms5UGEhQWthXnGZ0Oah3 i5zxZKTgY7+0MVI9/jQdR5XAZEJb+PsVAMDFjmxvt3jz445u3vQQMdyPU cJIHy4BaZNRFp+fIwl5PFG9KzWSfpQe3WhD9c6wl5FOm/xmxy1qiCDI03 HrXlM4/qTrwHUepw32zoQw8daStTmHqlPHson7C6vdDRyKNFCn7wfBIvy PyQmjFeaylRvzUqs82m5mBvrjfB0SjMab29lFbb38WsSgwFaWzENXmtsG JGa+w5dnGP44wnruIa+a7PDJQcSl7jc3Y5i28p77tg2gCn4MMJsfWhfSf Q==; X-IronPort-AV: E=Sophos;i="5.95,230,1661810400"; d="scan'208";a="27083761" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 01 Nov 2022 10:30:35 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Tue, 01 Nov 2022 10:30:35 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Tue, 01 Nov 2022 10:30:35 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1667295035; x=1698831035; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eEIGsA/PvZNFQUyUhmTytwmzIaUYi4AT15RJYkS3FJU=; b=Sazd5WQtb3htTFfdYg7rR/qdMiUFLjJuaO5LzJd3yIVd3j+3oNKFo14d g1NPXRLWnCkCSGL4GsTHptpsSGwveTVnUJRCyxfGzMfcQOpcI0CwZaCsx x3PfvNukjbPbMXMPcEwMCrwwRgDcQjuU796wXor+1KO1sfnVoBf+U7Fi1 EkMddTnXApia6X3us8ERx1rE7BFPm3J2p9Ih7YkEFpwWlFQ8cDC8CgY0n MaB6OrUctVlmvURtx7MT/zWgO20oLEW/kWLwkCmHm1kLg7iCrdyra4TZ/ 2s9CnSZkXHrlSPpaFjWDXKmnhwqlpTVKcaFmjAM29O8Ov8ncgKt+1Yy/X w==; X-IronPort-AV: E=Sophos;i="5.95,230,1661810400"; d="scan'208";a="27083760" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 01 Nov 2022 10:30:34 +0100 Received: from steina-w.tq-net.de (unknown [10.123.53.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 9E84F280056; Tue, 1 Nov 2022 10:30:34 +0100 (CET) From: Alexander Stein To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Alexander Stein , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/1] arm64: dts: imx8mm-tqma8mqml-mba8mx: Fix USB DR Date: Tue, 1 Nov 2022 10:30:31 +0100 Message-Id: <20221101093031.278241-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221101_023037_494088_F003AFA9 X-CRM114-Status: GOOD ( 15.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Using extcon USB host mode works properly on DR interface, e.g. enabling/disabling VBUS. But USB device mode is not working. Fix this by switching to usb-role-switch instead. Fixes: dfcd1b6f7620 ("arm64: dts: freescale: add initial device tree for TQMa8MQML with i.MX8MM") Signed-off-by: Alexander Stein --- Changes in v2: * Improve the commit message describing the actual issue being fixed .../dts/freescale/imx8mm-tqma8mqml-mba8mx.dts | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts b/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts index bfb44630da6b..56323c989d55 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts +++ b/arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dts @@ -34,11 +34,25 @@ reg_usdhc2_vmmc: regulator-vmmc { off-on-delay-us = <12000>; }; - extcon_usbotg1: extcon-usbotg1 { - compatible = "linux,extcon-usb-gpio"; + connector { + compatible = "gpio-usb-b-connector", "usb-b-connector"; + type = "micro"; + label = "X19"; pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usb1_extcon>; - id-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&pinctrl_usb1_connector>; + id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usb_dr_connector: endpoint { + remote-endpoint = <&usb1_drd_sw>; + }; + }; + }; }; }; @@ -106,13 +120,19 @@ &usbotg1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg1>; dr_mode = "otg"; - extcon = <&extcon_usbotg1>; srp-disable; hnp-disable; adp-disable; power-active-high; over-current-active-low; + usb-role-switch; status = "okay"; + + port { + usb1_drd_sw: endpoint { + remote-endpoint = <&usb_dr_connector>; + }; + }; }; &usbotg2 { @@ -242,7 +262,7 @@ pinctrl_usbotg1: usbotg1grp { ; }; - pinctrl_usb1_extcon: usb1-extcongrp { + pinctrl_usb1_connector: usb1-connectorgrp { fsl,pins = ; };