Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1399604pxb; Fri, 21 Jan 2022 17:41:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTT4/azV1B7IzzTpZzptwLvDwEExF1ROgY0iHl5Gmj8cncrMDXBYjhn9SW1RftNatrUil1 X-Received: by 2002:a17:90b:3a82:: with SMTP id om2mr3293918pjb.54.1642815690918; Fri, 21 Jan 2022 17:41:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642815690; cv=none; d=google.com; s=arc-20160816; b=L/vKXdII/S7bsLy/8HJ6c80ttFAylD9JBDm+93ow1CLwSX2N2T/HVl9Eij5oKmsVaF ZplWyJjLxe8AMiaJkd707hxr0FIN3sg5M/oLPwr2LcBDlvxmAycZYQtx9+LLuQnuoL7T OJrKNDJ0P+0qBJzmWmsz1KgIQPcfvrvlWYV26hl05HaID9+j/eSOPfnvcQGc+Py8aDpu /bPJHyzWIKPUv6A4p5k37XCIkBdOSGjUkb5VMuyEJQ7aE/rR/XR9bCM1lS9Wfi/0Rv7m 3zQmVvqEO+suhQzcCzzK+sfuX07kGJBDPsyF5oFDtQrX0smt/XQdFIiRXt22ziQ3S9ex 7LjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=C15GD333u2dlFDIS89CpDK65jwsFW00MaLZn7bJW6aM=; b=gCZ+h9A0B+LHMKoIoaTD4b4JA2f0BziIiVVMzH4YSO4TW4+zhkDU73ZCOO15vwlugf YMNghp9yL9W/3upIMq5soPcEeD+lnIj78yQ3RSdrG4KuPY3m68zajPSSJop0Nffaek2p coJ2lsd611761OExECa1i/DZbjKjn5l1wGtrxNYBEudYaTLhWxG5Jgp5JdvyXn6rE/D6 7eaoZLu+UrGnD3T/dpCbUAFA+50f38YCNhhTLcp2c5jmCet56XzeVahSmsF4VRS7Ql6X XLs6EnIb3stm06qnMvuLOLuARUE2p4zTvKccP1O/IcmXGeGVo1N6ZfHHggNw5Dbn3y6/ sRvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=HO0VqGjt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k64si8251419pgc.175.2022.01.21.17.41.18; Fri, 21 Jan 2022 17:41:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=HO0VqGjt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380926AbiAUORj (ORCPT + 99 others); Fri, 21 Jan 2022 09:17:39 -0500 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:44800 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350707AbiAUORc (ORCPT ); Fri, 21 Jan 2022 09:17:32 -0500 Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 0DD403F32C for ; Fri, 21 Jan 2022 14:17:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1642774651; bh=C15GD333u2dlFDIS89CpDK65jwsFW00MaLZn7bJW6aM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=HO0VqGjtPHAW4zTrp6tLVPKu2yamcSIgNywRZECfZFHPG4QWljdwy9imxsb+ls8gw xDLE8p9FFuaNH4n+oJwhBGXPHSfz84wVQbn+APoEYjjpDAIhWgxEHXd7V0geGvANVA Zh2HPmwcZrLsIkytDC5fCnIyufGNUdF8DOAsTGjRDXh2TI/IOGyiHoQ4OFpdlZYPL2 cZKLadFmp5eIbXDZzMUvqhZ76U/JKqJnRpKsEgBoR6u23rbfHNBylGkww+jk9Xa1x1 rgJsa34F6J1DykLTsBEGRcjxKT8vN69fY5jKmEV+sWlN8OSefeXzeeOpGzGAEWp4SF TlU6CyMnhYpUw== Received: by mail-ot1-f71.google.com with SMTP id t1-20020a9d7481000000b005919e9a1347so5567352otk.2 for ; Fri, 21 Jan 2022 06:17:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C15GD333u2dlFDIS89CpDK65jwsFW00MaLZn7bJW6aM=; b=xhTiT2vVldznSCpI/yZg2fsiwsj+7+OxzmG69jPabGh9ZvNJynFiZP6ub8IP3Tu8Rp vYywhJalxOuUNHrsGPWHZ8jmq9l1uobI3NXGOmM53xKtDrs72A4Y303YrIDpf2xwIcJ9 ozZtenqARQgJvBisZnCpbDdi3f7dWycoZK13pKbEkbxCe6n9sqp8FN5wAK20AIowbnV3 bQls2ZOWzzZGM0LAUOxB14llP5zHocuW8+lCvJiHBCjhcckDocdchArk5MW49SfjDdKX 8uVP0NkQNnw1HWdvq5xmaqW+I+PI7PWCchFHyxLb5qGg5Ddfx0/yb9a5TtXI5KkeLV57 JIgA== X-Gm-Message-State: AOAM5326TQjX/lt+iZkf8W8sWnUkHNlhCUau0/6kCeCy8x3yCxKuTby8 wGrLPUgdImf7EXcybdiq3Ga4bsrHE7QLVZDiu4viCxj7lSd2FXEVTMfgHM+zQCH+jjLOrjitI0H xxbp3n3GGGdQS9/LHxvtzH+K4M45NAjVYS2vjk/l9Z6ZuIqOK7vsFBOgV5A== X-Received: by 2002:a9d:6f0e:: with SMTP id n14mr2868609otq.269.1642774649891; Fri, 21 Jan 2022 06:17:29 -0800 (PST) X-Received: by 2002:a9d:6f0e:: with SMTP id n14mr2868583otq.269.1642774649588; Fri, 21 Jan 2022 06:17:29 -0800 (PST) MIME-Version: 1.0 References: <20220120051929.1625791-1-kai.heng.feng@canonical.com> In-Reply-To: From: Kai-Heng Feng Date: Fri, 21 Jan 2022 22:17:18 +0800 Message-ID: Subject: Re: [PATCH v2] net: phy: marvell: Honor phy LED set by system firmware on a Dell hardware To: Andrew Lunn Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 21, 2022 at 9:22 PM Andrew Lunn wrote: > > On Fri, Jan 21, 2022 at 12:01:35PM +0800, Kai-Heng Feng wrote: > > On Thu, Jan 20, 2022 at 10:26 PM Andrew Lunn wrote: > > > > > > On Thu, Jan 20, 2022 at 01:19:29PM +0800, Kai-Heng Feng wrote: > > > > BIOS on Dell Edge Gateway 3200 already makes its own phy LED setting, so > > > > instead of setting another value, keep it untouched and restore the saved > > > > value on system resume. > > > > > > > > Introduce config_led() callback in phy_driver() to make the implemtation > > > > generic. > > > > > > I'm also wondering if we need to take a step back here and get the > > > ACPI guys involved. I don't know much about ACPI, but shouldn't it > > > provide a control method to configure the PHYs LEDs? > > > > > > We already have the basics for defining a PHY in ACPI. See: > > > > > > https://www.kernel.org/doc/html/latest/firmware-guide/acpi/dsd/phy.html > > > > These properties seem to come from device-tree. > > They are similar to what DT has, but expressed in an ACPI way. DT has > been used with PHY drivers for a long time, but ACPI is new. The ACPI > standard also says nothing about PHYs. So Linux has defined its own > properties, which we expect all ACPI machine to use. According to the > ACPI maintainers, this is within the ACPI standard. Maybe at some > point somebody will submit the current definitions to the standards > body for approval, or maybe the standard will do something completely > different, but for the moment, this is what we have, and what you > should use. Right, so we can add a new property, document it, and just use it? Maybe others will use the new property once we set the precedence? > > > > so you could extend this to include a method to configure the LEDs for > > > a specific PHY. > > > > How to add new properties? Is it required to add new properties to > > both DT and ACPI? > > Since all you are adding is a boolean, 'Don't touch the PHY LED > configuration', it should be easy to do for both. If adding a brand new property is acceptable, let me discuss it the vendor. > > What is interesting for Marvell PHYs is WoL, which is part of LED > configuration. I've not checked, but i guess there are other PHYs > which reuse LED output for a WoL interrupt. So it needs to be clearly > defined if we expect the BIOS to also correctly configure WoL, or if > Linux is responsible for configuring WoL, even though it means > changing the LED configuration. How about what Heiner proposed? Maybe we should leave the LED as is, and restore it on system resume? Kai-Heng > > Andrew