Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5940197rdb; Thu, 14 Dec 2023 04:17:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAaiaj8jdiMFTo8jU57KTXtEfscYdw2DNGy1izROdHXr4lAp6otCLjCoYG3b7YSwitiE6R X-Received: by 2002:a05:6a21:1f03:b0:18f:354f:58bd with SMTP id ry3-20020a056a211f0300b0018f354f58bdmr9820150pzb.104.1702556264749; Thu, 14 Dec 2023 04:17:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702556264; cv=none; d=google.com; s=arc-20160816; b=SVOMx38edCk9cdI/E8fdgb9V4e3LSzSeVmyjD299mEnJ0snAWruvLDmyJIk1RkzC38 PvOglxP23zhRgL5/uaYvFEB1HxBHaVdLIrCSk+VbbkL9UmpsQ1wiKBSntnIzcbUNXWwv ft9jmJ8CW+ke0BItV1vas4o4gX0f8TScVUbLfmmaemDS7/ggUkOgFTHGJiai1yqjZdTq YwDBzeqWSq1FscgVElWPTt6daIqyQ5UdDUF1iwG/DyK6sdJKcszX+uv8vFqMM/ToKHVo uzA4Dlv+qqRrVZsjEz3osETTX0+u+mI9HfE5gFxl8AlhCnyswfpz78+EMHfMNHnYqg+s pCmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RUEys31RsDSUFYXrDwZ5JzMo7zxkvfU4HpC1RU/FMa0=; fh=cgr+i0oQbjzJOfCF9Iz3LM1pX/9aEH0Zkrl8pj2z4Go=; b=qQ9cjfxsAlYbKRQMyprm9aBPjfPozgYbyaSbeyZ2N0VD0NsZ8tjR6yzWcATPmyGTaL trOvgtY9Q468Zu3f4gv5f7qSWOpxu6u3QVKcizR32+d8Wh/EqQc0fANtEfOjDZGN+R3P fEcerAz0DYHIyzswH62o1yTqw8foEZ198SMb0QnQQZPOxwjBrOxV5CvbXiBRRApsgejq WKhjYJpD5Ryaxar925j316gJumUg9MS5OG3kE2GSAylw4B25kfaxSvWK8RRfZKpJYRd/ 7M/RimY1xaZ0iUzs4QW7PDWuEoagREPJXGOmYripvxK8u6GdwCt/W5+5jWL6rx3QITa4 ih5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gFGZLG9s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w3-20020a17090aad4300b0028a7de5f772si7749980pjv.119.2023.12.14.04.17.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:17:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gFGZLG9s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9FED380D31EB; Thu, 14 Dec 2023 04:17:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1572970AbjLNMRd (ORCPT + 99 others); Thu, 14 Dec 2023 07:17:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1572951AbjLNMRc (ORCPT ); Thu, 14 Dec 2023 07:17:32 -0500 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F6D1BD; Thu, 14 Dec 2023 04:17:38 -0800 (PST) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3BECHReC041436; Thu, 14 Dec 2023 06:17:27 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1702556247; bh=RUEys31RsDSUFYXrDwZ5JzMo7zxkvfU4HpC1RU/FMa0=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=gFGZLG9s7MkIjWs5tvPVQ7wZreEb2waw2R9TltiuVJiv4CskUQDdJLI3DH/RMQVPf eMVAJs55QAP0ZTbWs8diUuAu1u994fGRTlXWcXUxbd28XiS5hLp9E28TRpLRJdoxib tamSQ3jIRxUKCYuJ2ag+vo3TKbYSKYstipzwHshE= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3BECHROq045626 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Dec 2023 06:17:27 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 14 Dec 2023 06:17:27 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 14 Dec 2023 06:17:27 -0600 Received: from localhost (uda0133052.dhcp.ti.com [128.247.81.232]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3BECHRg3094684; Thu, 14 Dec 2023 06:17:27 -0600 Date: Thu, 14 Dec 2023 06:17:27 -0600 From: Nishanth Menon To: Siddharth Vadapalli CC: , , , , , , , , , , Subject: Re: [PATCH v2] arm64: dts: ti: k3-am654-icssg2: Enable PHY interrupts for ICSSG2 Message-ID: <20231214121727.ayrbqz2nmeb25rpw@striving> References: <20231213080216.1710730-1-s-vadapalli@ti.com> <20231213123819.tqh3lm2ceir3qjbk@swimmer> <6f1c1a59-cec0-46d1-8ecb-a82d9d444ccf@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <6f1c1a59-cec0-46d1-8ecb-a82d9d444ccf@ti.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Dec 2023 04:17:42 -0800 (PST) On 11:14-20231214, Siddharth Vadapalli wrote: > Hello Nishanth, > > On 13/12/23 18:08, Nishanth Menon wrote: > > On 13:32-20231213, Siddharth Vadapalli wrote: > >> Enable interrupt mode of operation of the DP83867 Ethernet PHY which is > >> used by ICSSG2. The DP83867 PHY driver already supports interrupt handling > >> for interrupts generated by the PHY. Thus, add the necessary device-tree > >> support to enable it. > >> > >> Since the GPIO1_87 line is muxed with EXT_REFCLK1 and SYNC1_OUT, update > >> the pinmux to select GPIO1_87 for routing the interrupt. > >> > >> As the same interrupt line and therefore the same pinmux configuration is > >> applicable to both Ethernet PHYs used by ICSSG2, allocate the pinmux > >> resource to the first Ethernet PHY alone. > > ... > > > > > https://www.ti.com/lit/ds/symlink/dp83867ir.pdf -> it looks like the > > interrupt pin is level event. but drivers/gpio/gpio-davinci.c:: > > gpio_irq_type() -> The SoC cannot handle level, only edge. > > > > A bit confused here.. GPIO 87 is shared between two phys. isn't it a > > case of race? > > > > PHY1 assets low > > phy1 handler starts, but before the driver it clears the condition: > > PHY2 asserts low - but since the signal is already low, there is no > > pulse > > phy1 handler clears phy1 condition, but signal is still low due to phy2? > > now phy2 OR phy1 never gets handled since there is never a pulse event > > ever again. > > Yes, you are right! Edge-Triggered interrupts shouldn't be shared. I missed > noticing this. Thank you for pointing it out. Since the SoC only supports > Edge-Triggered interrupts, I believe that the correct decision would be to use > the interrupt for only one of the two PHYs, while leaving the other PHY in > polled mode of operation which is the default. > > Kindly let me know if this is acceptable and I shall update this patch accordingly. Sounds like a bug in board design there (due to an choice of IP limitation) - I suggest getting it noted in board documentation and refer to the errata in the second phy (else folks will wonder why we aren't using interrupts on the second phy. > > > > > > >> ti,rx-internal-delay = ; > >> ti,fifo-depth = ; > >> }; > >> -- > >> 2.34.1 > >> > > > > -- > Regards, > Siddharth. -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D