Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6906362rwp; Tue, 18 Jul 2023 07:27:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlFSLJZDeELcOKCGdAPiKaDu2XqUe3xR0rdyQnxPwjYSvcDGw4BdoMyWObyqw0nY+4ev9kup X-Received: by 2002:a17:906:3f45:b0:994:62ee:7531 with SMTP id f5-20020a1709063f4500b0099462ee7531mr37913ejj.58.1689690455240; Tue, 18 Jul 2023 07:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689690455; cv=none; d=google.com; s=arc-20160816; b=bNuEZVYkHbi06wKncxxFFtB/RAAK8ctVV9j+dKUBmblzBVdb/mTU27h4kgzeTz7Oso GpwLEjv0Tu1dRzDmcvNTWctfqelyVbJEvLIthojSNG7+IYWO/Nt2da4bx3bftiHmKpke LGThsiDWDk59U5/Wg2ETTB6DYl59aR46F6q7BoW4HqfUs/MVQmbTKgeEtfmnfBltgodI 7iWnBiGKhEi8uDSs/2h5QoSl7lU4Ifx9b2DbtcHWySSir0u/0IULc5JEfpAyCfZNFk/n WWec2l5Cel6Zn3YKWOIYJnidhbzRv3nmEwBG9dVGjdgE0B5ibIwF9OBea/K/RdVodL0S w6Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:from:date:dkim-signature; bh=DjU8QbWwoYzSGBCbnklVIsE6FxMt00a2BFKbWomZUJc=; fh=WSk3ggsb3cqa1VVHHyrJEIILVI0QkDPwHWYLFjxo4y4=; b=R/FCzF3+In0hkOBY4V7JXXX005ShiOh/FTy2xM5aZ7w1zwzrhyuKDFLQ2QHGm5tx8H E7dlAKmn4XlaumRSZAE8ez9opoWuq31skxXevJ1dFbv6lVIec36dbcXaxNkb9IwyHGWY MHV+8eXhNiXew+85pFs/FxsQCno309PavBLf7QvURCIT1CvG0wbffe6TuVWfU12eS1ei v8/AxKokUMZKxNommvwnh8FIw0O/4pGHF6U2CghGk6NdkStHq7A9aI9f7VEXOZ5JV9jg yJb7QdJZ/J+HB1BypLCDd+ypAxVOJ0U8uI6gkJQTqfZvovV2UOYhAcfwjHEAz7/fUNvH 7kGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=LnRMIpe7; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v13-20020a170906338d00b00992b8854f48si1238919eja.556.2023.07.18.07.27.10; Tue, 18 Jul 2023 07:27:35 -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=fail header.i=@hugovil.com header.s=x header.b=LnRMIpe7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233231AbjGROFL (ORCPT + 99 others); Tue, 18 Jul 2023 10:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233243AbjGROEx (ORCPT ); Tue, 18 Jul 2023 10:04:53 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 400261FD3; Tue, 18 Jul 2023 07:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:Content-Type:Mime-Version: References:In-Reply-To:Message-Id:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=DjU8QbWwoYzSGBCbnklVIsE6FxMt00a2BFKbWomZUJc=; b=LnRMIpe7rVTL9UeO05+vSQqoSd K0jcAOh+HhQNmQ5+PyRUU76awBMAhKxcK6Lrk+mzJVOXaKGrGDKP6dWKTbnQ4EJFQCgh/2mpszRt1 p9v9wBd4hq7IqnZjhPT2ym2L10N0kB+crm6AEYrpaG78+tumxZx6fSR1PUtdDGDjOC6Q=; Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:53212 helo=pettiford) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1qLlIm-0004C8-Rm; Tue, 18 Jul 2023 10:03:45 -0400 Date: Tue, 18 Jul 2023 10:03:44 -0400 From: Hugo Villeneuve To: Shawn Guo Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Hugo Villeneuve , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Message-Id: <20230718100344.ebeae4ee79c299bcd6fee733@hugovil.com> In-Reply-To: <20230718063715.GL9559@dragon> References: <20230705174932.3652479-1-hugo@hugovil.com> <20230718063715.GL9559@dragon> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 184.161.19.61 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Subject: Re: [PATCH v2] arm64: dts: imx8mn-var-som-symphony: fix USB OTG X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Jul 2023 14:37:15 +0800 Shawn Guo wrote: > On Wed, Jul 05, 2023 at 01:49:32PM -0400, Hugo Villeneuve wrote: > > From: Hugo Villeneuve > > > > USB OTG is currently broken on the Variscite Symphony EVK and imx8mn > > nano SOM. > > > > The PTN5150 circuitry on newer versions of the Symphony EVK board has > > a non-standard configuration in which the PTN5150 IRQ pin is left > > unconnected, and the PTN5150 ID pin is connected to GPIO1_IO11. This > > requires changes to the ptn5150 driver to support this new mode. > > Variscite have indicated their intention to submit those changes > > upstream. > > > > In the meantime, import device tree changes from linux-5.15 branch of > > varigit repos to at least make the USB OTG port operate correctly in > > host mode. > > > > Fixes: 7358e05bddca ("arm64: dts: imx8mn-var-som-symphony: Add Variscite Symphony board with VAR-SOM-MX8MN") > > Has USB OTG been ever worked at all? If the answer is no, it's not > a fix but a new feature, and I would suggest you rework the patch > subject and drop the Fixes tag. Hi Shawn, it never worked for me since commit 7358e05bddca, but it may have something to do with the new hardware board version (>=1.4a) that I have. It probably worked for older boards (< 1.4a) altough I cannot confirm it without old hardware. Let me know if you want me to remove the Fixes tag. Hugo. > > Shawn > > > Signed-off-by: Hugo Villeneuve > > --- > > Link: [v1] https://lkml.org/lkml/2023/7/4/702 > > > > Changes from v1: > > - Add comments about PTN5150 IRQ/ID line connections > > - Remove "typec1_con: connector" node > > - Change IRQ type to IRQ_TYPE_EDGE_FALLING > > > > .../dts/freescale/imx8mn-var-som-symphony.dts | 32 +++++++++++++++++-- > > 1 file changed, 30 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts b/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts > > index 406a711486da..a7a57442cb81 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts > > +++ b/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts > > @@ -1,11 +1,14 @@ > > // SPDX-License-Identifier: (GPL-2.0+ OR MIT) > > /* > > + * Supports Symphony evaluation board versions >= 1.4a. > > + * > > * Copyright 2019-2020 Variscite Ltd. > > * Copyright (C) 2020 Krzysztof Kozlowski > > */ > > > > /dts-v1/; > > > > +#include > > #include "imx8mn-var-som.dtsi" > > > > / { > > @@ -100,14 +103,26 @@ enet-sel-hog { > > }; > > }; > > > > + /* > > + * For Symphony board version <= 1.4, the PTN5150 IRQ pin is connected > > + * to GPIO1_IO11 on the SoM (R106 present, R132 absent). From Symphony > > + * board version >= 1.4a, the PTN5150 ID pin is connected to GPIO1_IO11 > > + * on the SoM (R106 absent, R132 present). > > + */ > > extcon_usbotg1: typec@3d { > > compatible = "nxp,ptn5150"; > > reg = <0x3d>; > > interrupt-parent = <&gpio1>; > > - interrupts = <11 IRQ_TYPE_LEVEL_LOW>; > > + interrupts = <11 IRQ_TYPE_EDGE_FALLING>; > > pinctrl-names = "default"; > > pinctrl-0 = <&pinctrl_ptn5150>; > > status = "okay"; > > + > > + port { > > + typec1_dr_sw: endpoint { > > + remote-endpoint = <&usb1_drd_sw>; > > + }; > > + }; > > }; > > }; > > > > @@ -148,8 +163,21 @@ &uart3 { > > }; > > > > &usbotg1 { > > + dr_mode = "otg"; > > + hnp-disable; > > + srp-disable; > > + adp-disable; > > + usb-role-switch; > > disable-over-current; > > - extcon = <&extcon_usbotg1>, <&extcon_usbotg1>; > > + samsung,picophy-pre-emp-curr-control = <3>; > > + samsung,picophy-dc-vol-level-adjust = <7>; > > + status = "okay"; > > + > > + port { > > + usb1_drd_sw: endpoint { > > + remote-endpoint = <&typec1_dr_sw>; > > + }; > > + }; > > }; > > > > &iomuxc { > > > > base-commit: d528014517f2b0531862c02865b9d4c908019dc4 > > -- > > 2.30.2 > > >