From: Andrew Lunn <andrew@lunn•ch>
To: Kai-Heng Feng <kai.heng.feng@canonical•com>
Cc: Heiner Kallweit <hkallweit1@gmail•com>,
linux@armlinux•org.uk, "David S. Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: [PATCH v2] net: phy: marvell: Honor phy LED set by system firmware on a Dell hardware
Date: Wed, 16 Feb 2022 08:39:16 +0100 [thread overview]
Message-ID: <YgyqJAokWhXvDPik@lunn.ch> (raw)
In-Reply-To: <CAAd53p4QXHe7XTv5ntsdnC1Z9EpDfXQECKHDEsRA++SEQSdbYQ@mail.gmail.com>
> > > This is an ACPI based platform and we are working on new firmware
> > > property "use-firmware-led" to give driver a hint:
> > > ...
> > > Scope (_SB.PC00.OTN0)
> > > {
> > > Name (_DSD, Package (0x02) // _DSD: Device-Specific Data
> > > {
> > > ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device
> > > Properties for _DSD */,
> > > Package (0x01)
> > > {
> > > Package (0x02)
> > > {
> > > "use-firmware-led",
> > > One
> > > }
> > > }
> > > })
> > > }
> > > ...
> > >
> > > Because the property is under PCI device namespace, I am not sure how
> > > to (cleanly) bring the property from the phylink side to phydev side.
> > > Do you have any suggestion?
> >
> > I'm no ACPI expert, but i think
> > Documentation/firmware-guide/acpi/dsd/phy.rst gives you the basis:
> >
> > During the MDIO bus driver initialization, PHYs on this bus are probed
> > using the _ADR object as shown below and are registered on the MDIO bus.
> >
> > Scope(\_SB.MDI0)
> > {
> > Device(PHY1) {
> > Name (_ADR, 0x1)
> > } // end of PHY1
> >
> > Device(PHY2) {
> > Name (_ADR, 0x2)
> > } // end of PHY2
> > }
> >
> > These are the PHYs on the MDIO bus. I _think_ that next to the Name,
> > you can add additional properties, like your "use-firmware-led". This
> > would then be very similar to DT, which is in effect what ACPI is
> > copying. So you need to update this document with your new property,
> > making it clear that this property only applies to boot, not
> > suspend/resume. And fwnode_mdiobus_register_phy() can look for the
> > property and set a flag in the phydev structure indicating that ACPI
> > is totally responsible for LEDs at boot time.
>
> The problem here is there's no MDIO bus in ACPI namespace, namely no
> "Scope(\_SB.MDI0)" on this platform.
So add it. Basically, copy what DT does. I assume there is a node for
the Ethernet device? And is the MDIO bus driver instantiated by the
Ethernet device? So you can add the MDIO node as a sub node of the
Ethernet device. When you register the MDIO bus using
acpi_mdiobus_register() pass a pointer to this MDIO sub node.
Andrew
next prev parent reply other threads:[~2022-02-16 7:58 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 5:19 [PATCH v2] net: phy: marvell: Honor phy LED set by system firmware on a Dell hardware Kai-Heng Feng
2022-01-20 7:58 ` Heiner Kallweit
2022-01-20 11:40 ` Kai-Heng Feng
2022-01-20 13:46 ` Andrew Lunn
2022-01-21 3:54 ` Kai-Heng Feng
2022-01-21 13:04 ` Andrew Lunn
2022-01-21 14:04 ` Kai-Heng Feng
2022-01-21 15:05 ` Andrew Lunn
2022-01-21 13:10 ` Andrew Lunn
2022-01-21 14:06 ` Kai-Heng Feng
2022-01-21 15:08 ` Andrew Lunn
2022-01-21 7:49 ` Heiner Kallweit
2022-01-20 14:26 ` Andrew Lunn
2022-01-21 4:01 ` Kai-Heng Feng
2022-01-21 13:22 ` Andrew Lunn
2022-01-21 14:17 ` Kai-Heng Feng
2022-01-21 15:15 ` Andrew Lunn
2022-01-22 19:13 ` Heiner Kallweit
2022-01-22 21:18 ` Andrew Lunn
2022-02-14 5:40 ` Kai-Heng Feng
2022-02-15 20:27 ` Andrew Lunn
2022-02-16 2:30 ` Kai-Heng Feng
2022-02-16 7:39 ` Andrew Lunn [this message]
2022-01-20 15:33 ` kernel test robot
2022-01-21 6:47 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YgyqJAokWhXvDPik@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=hkallweit1@gmail$(echo .)com \
--cc=kai.heng.feng@canonical$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox