Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5780549rdb; Wed, 13 Dec 2023 21:44:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHb8TpFvv4VvoTrvUWOTGmj+c7CPf9jwmiOrloaoOwjTvHRUCjsLndMBulD5FwtMLpcjkmw X-Received: by 2002:a17:902:d48d:b0:1d3:6a4a:5a39 with SMTP id c13-20020a170902d48d00b001d36a4a5a39mr59788plg.39.1702532686004; Wed, 13 Dec 2023 21:44:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702532685; cv=none; d=google.com; s=arc-20160816; b=RgIQ2GmGeyCY2dPJifUJRQQJDN1evQYE+2f2554AOmbnGD7uSg0TP9Htix2GDYs1aT aZeErRilFD1YJysBQuPY/S4wbdxR9qayCLl5/igjfkLqNa0MBzImzngw8LzGuScA8yNp B9Dg5wf5z1GO2FBDhvNbW3xEIeEwCGhQ4tf5awvb5yFrtuaTdS9vpv8qjL/F+7wHReB3 OBPMQdJdZWSLxGPznBrrCy7CUi6/p6dLdJkwQAyVoOBG4K2VgQgrOxGEiyTiFCa7IKgh aKljGEUYByRkIklGcX+WL2AqVoTxt/QRPXiq9DVw2lB5oV3jmmlZuuoktrgM/7C+24pg 3ixg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=5kcNwlTyEanZdUHbBRgU6blj9PGlRg0qWtcJ4LxQqsM=; fh=I3R74x40i7Qp9vK2Y7v+QlMK7V7tOO9jp4X6U3PF6no=; b=JgQi5iA2+hABh7WzoaCbZ8KWLQlar2fNBkIZxMX2YsFhDgE545MrLosae7eP/kvsFs cs2mSukB26yHvg//y8PqcvmV94eRy3ff2X0eFL2IOCzvhCvrl7zI2mav0erIP2CuyYA+ i53U3bpVmbdSorQ5d0k3QBBbuXdid1UkwCCtzbr43Tk/tPF2mIrEwz9eeIvO96+8G1bZ iCXLVHpyDgkasvXkqhB+hSGcbqmp79TZn9ieAoJ0RX21Z9UxJgPLC0OJDKQqg/VTr/wP co3ifIRcIJ4Pldm7Rb5jHFUPqNPeBTaVlIdXg9d34XQifzsgICVaUm40OHfIIveHR/9T lNiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=CG2uohMN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id m5-20020a170902db0500b001d015cec684si11102958plx.238.2023.12.13.21.44.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 21:44:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=CG2uohMN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 617CC81A329B; Wed, 13 Dec 2023 21:44:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443197AbjLNFo2 (ORCPT + 99 others); Thu, 14 Dec 2023 00:44:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443193AbjLNFo0 (ORCPT ); Thu, 14 Dec 2023 00:44:26 -0500 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 195D410A; Wed, 13 Dec 2023 21:44:29 -0800 (PST) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3BE5iJTW036923; Wed, 13 Dec 2023 23:44:19 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1702532659; bh=5kcNwlTyEanZdUHbBRgU6blj9PGlRg0qWtcJ4LxQqsM=; h=Date:CC:Subject:To:References:From:In-Reply-To; b=CG2uohMNvWz4M39s8NjgVAsGrJ/v0EhEoTrsUt5p5c+Ymy1jWdtm0EKnfvKBbpNMP KcuTjf19n4ryK7C2pYJeiM65TYh+vlwiotjfmP2WXyEF9/Wfyt54gIfIH8jtyu0SPz Jwd2PEhPqbEW2uyDyjw6XtyGw0Slw6hDQ35x1GIQ= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3BE5iJXH100306 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 13 Dec 2023 23:44:19 -0600 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 13 Dec 2023 23:44:18 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE108.ent.ti.com (10.64.6.29) 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; Wed, 13 Dec 2023 23:44:19 -0600 Received: from [172.24.227.9] (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3BE5iE9x080888; Wed, 13 Dec 2023 23:44:15 -0600 Message-ID: <6f1c1a59-cec0-46d1-8ecb-a82d9d444ccf@ti.com> Date: Thu, 14 Dec 2023 11:14:13 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird CC: , , , , , , , , , , , Subject: Re: [PATCH v2] arm64: dts: ti: k3-am654-icssg2: Enable PHY interrupts for ICSSG2 Content-Language: en-US To: Nishanth Menon References: <20231213080216.1710730-1-s-vadapalli@ti.com> <20231213123819.tqh3lm2ceir3qjbk@swimmer> From: Siddharth Vadapalli In-Reply-To: <20231213123819.tqh3lm2ceir3qjbk@swimmer> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Wed, 13 Dec 2023 21:44:43 -0800 (PST) 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. > > >> ti,rx-internal-delay = ; >> ti,fifo-depth = ; >> }; >> -- >> 2.34.1 >> > -- Regards, Siddharth.