From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9054C433E0 for ; Wed, 30 Dec 2020 16:54:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8233C207B0 for ; Wed, 30 Dec 2020 16:54:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726561AbgL3Qya (ORCPT ); Wed, 30 Dec 2020 11:54:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726488AbgL3Qy3 (ORCPT ); Wed, 30 Dec 2020 11:54:29 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA611C061799; Wed, 30 Dec 2020 08:53:48 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id m5so17902224wrx.9; Wed, 30 Dec 2020 08:53:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=4+FCAThIBIBFdy0r2/jkB586OQFEipavyVIcBnethw0=; b=mqmIhO72s60cwuD0oDiVpSfkhde9VyeMYqzZmMbbb+eDtuKVl/3X7LzWlOXpy67/6y 9m7M9SFoPODnL++6qWDJ8hm6XIkOSRcXc3uNN/LLcjoVJLfPC+gsWlJc+0yeYCxia8R3 0tIY/fZqTj5I0BX5K+sW15CMR+re1GoqtfZv6B6wdx5nIxgXBCa+vn5QGyPNJjM40ejv 10z8bASFSoEt9jCBr3v6yNjCktAcZOE7JWFg/a0BkKfRpOSFRq+6J2QJ0wz42Ar8j4d1 lfbXl9ynI3fLR1HbBJpfuEcbPYwtQ5g2ejz1ErOzvcKp7lW3YRMEwiO22QhQFvouJoDo 4Cyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4+FCAThIBIBFdy0r2/jkB586OQFEipavyVIcBnethw0=; b=Yr+VODHoAvQx9lWRSOVu2tV2OxipWNenaqWry9b3c4xclpupvhBnLh0ebvs58frRh9 2O0gJptEZ3uynPfC7lBS8ymbI4rESDq4k7PUqQ0q0oou9hDy5P8TCSmYOMHfi6iiUQN3 FIgZjMzuLRZN+cE+85mVt/V9/XQ9+cMpsKAQHPxJLexfW7iOufMwSPw7JMprDERHZ4LF m+zY+aX8y6EgVXD/sL7r+QKPaiffC4/Ogy++8HS5QLTt/oLXGO3QNzSyp87DPpGXxfpt Lb3PpR3ofT+ITKDxN4Msu2hiDaxqigIwwb7cPuENxHKgTpZBBgyX/yOEFTHOtPLTG28F TsCQ== X-Gm-Message-State: AOAM531xNk4oHeonpei4BtFMViy41U9BRsu34tvltHhWsuE+BbA/p3bo bKV1w9SDEO5Wix/vY7liIyae9I6z3RY= X-Google-Smtp-Source: ABdhPJwSv/9ZnH6VH/dRJu04QXa1elZhFfM8JLE/J/KanLfYdg9OIb2EZRcVl2bWtJz5DcDUUvS2mA== X-Received: by 2002:adf:fdce:: with SMTP id i14mr61682832wrs.58.1609347227453; Wed, 30 Dec 2020 08:53:47 -0800 (PST) Received: from ?IPv6:2003:ea:8f06:5500:a1e5:2a55:c7d0:ad89? (p200300ea8f065500a1e52a55c7d0ad89.dip0.t-ipconnect.de. [2003:ea:8f06:5500:a1e5:2a55:c7d0:ad89]) by smtp.googlemail.com with ESMTPSA id l5sm65692614wrv.44.2020.12.30.08.53.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 08:53:46 -0800 (PST) Subject: Re: Registering IRQ for MT7530 internal PHYs To: Florian Fainelli , DENG Qingfang Cc: "David S. Miller" , Andrew Lunn , Jakub Kicinski , Landen Chao , Marc Zyngier , Matthias Brugger , Philipp Zabel , Russell King , Sean Wang , Thomas Gleixner , Vivien Didelot , Vladimir Oltean , linux-kernel@vger.kernel.org, netdev , Weijie Gao , Chuanhong Guo , Linus Walleij , =?UTF-8?Q?Ren=c3=a9_van_Dorst?= References: <20201230042208.8997-1-dqfext@gmail.com> <546a8430-8865-1be8-4561-6681c7fa8ef8@gmail.com> From: Heiner Kallweit Message-ID: <11ca856b-1d0f-06ed-cf73-58fb9b757928@gmail.com> Date: Wed, 30 Dec 2020 17:53:40 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <546a8430-8865-1be8-4561-6681c7fa8ef8@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30.12.2020 17:15, Florian Fainelli wrote: > > > On 12/30/2020 1:12 AM, Heiner Kallweit wrote: >> On 30.12.2020 10:07, DENG Qingfang wrote: >>> Hi Heiner, >>> Thanks for your reply. >>> >>> On Wed, Dec 30, 2020 at 3:39 PM Heiner Kallweit wrote: >>>> I don't think that's the best option. >>> >>> I'm well aware of that. >>> >>>> You may want to add a PHY driver for your chip. Supposedly it >>>> supports at least PHY suspend/resume. You can use the RTL8366RB >>>> PHY driver as template. >>> >>> There's no MediaTek PHY driver yet. Do we really need a new one just >>> for the interrupts? >>> >> Not only for the interrupts. The genphy driver e.g. doesn't support >> PHY suspend/resume. And the PHY driver needs basically no code, >> just set the proper callbacks. > > That statement about not supporting suspend/resume is not exactly true, > the generic "1g" PHY driver only implements suspend/resume through the > use of the standard BMCR power down bit, but not anything more > complicated than that. > Oh, right. Somehow I had in the back of my mind that the genphy driver has no suspend/resume callbacks set. > Interrupt handling within the PHY itself is not defined by the existing > standard registers and will typically not reside in a standard register > space either, so just for that reason you do need a custom PHY driver. > There are other advantages if you need to expose additional PHY features > down the road like PHY counters, energy detection, automatic power down etc. > > I don't believe we will see discrete/standalone Mediatek PHY chips, but > if that happens, then you would already have a framework for supporting > them. >