Message ID | 20190708192459.187984-2-mka@chromium.org |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | net: phy: realtek: Enable configuration of RTL8211E LEDs and SSC | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success |
On Mon, Jul 08, 2019 at 12:24:53PM -0700, Matthias Kaehlcke wrote: > Add the 'realtek,eee-led-mode-disable' property to disable EEE > LED mode on Realtek PHYs that support it. > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > --- > TODO: adapt PHY core to deal with optional compatible strings Yes. Does this even work at the moment? I would expect of_mdiobus_child_is_phy() to return false, indicating the device is not actually a PHY. Andrew
On Mon, Jul 08, 2019 at 09:46:15PM +0200, Andrew Lunn wrote: > On Mon, Jul 08, 2019 at 12:24:53PM -0700, Matthias Kaehlcke wrote: > > Add the 'realtek,eee-led-mode-disable' property to disable EEE > > LED mode on Realtek PHYs that support it. > > > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > > --- > > TODO: adapt PHY core to deal with optional compatible strings > > Yes. Does this even work at the moment? I would expect > of_mdiobus_child_is_phy() to return false, indicating the device is > not actually a PHY. Indeed, it currently doesn't work atm. I found that removing the check for dev->of_node in of_mdiobus_link_mdiodev() helps, but I imagine doing (only) this might have undesired side-effects.
On Mon, Jul 08, 2019 at 01:01:36PM -0700, Matthias Kaehlcke wrote: > On Mon, Jul 08, 2019 at 09:46:15PM +0200, Andrew Lunn wrote: > > On Mon, Jul 08, 2019 at 12:24:53PM -0700, Matthias Kaehlcke wrote: > > > Add the 'realtek,eee-led-mode-disable' property to disable EEE > > > LED mode on Realtek PHYs that support it. > > > > > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > > > --- > > > TODO: adapt PHY core to deal with optional compatible strings > > > > Yes. Does this even work at the moment? I would expect > > of_mdiobus_child_is_phy() to return false, indicating the device is > > not actually a PHY. > > Indeed, it currently doesn't work atm. I found that removing the check > for dev->of_node in of_mdiobus_link_mdiodev() helps, but I imagine > doing (only) this might have undesired side-effects. O.K. Please put RFC in patches like this which don't actually work and so should not be merged. We don't want David accidentally merging them! Andrew
diff --git a/Documentation/devicetree/bindings/net/realtek.txt b/Documentation/devicetree/bindings/net/realtek.txt new file mode 100644 index 000000000000..db0333f23fec --- /dev/null +++ b/Documentation/devicetree/bindings/net/realtek.txt @@ -0,0 +1,31 @@ +Realtek PHY properties. + +This document describes properties of Realtek PHYs. + +Optional properties: +- compatible: should be one of the following: + "realtek,rtl8201cp", "realtek,rtl8201f", "realtek,rtl8211", + "realtek,rtl8211b", "realtek,rtl8211c", "realtek,rtl8211dn", + "realtek,rtl8211e", "realtek,rtl8211f", "rtl8366rb" + + the property is required if any of the properties are specified that + are only supported for certain Realtek PHYs. + +- realtek,eee-led-mode-disable: Disable EEE LED mode on this port. + + Only supported for "realtek,rtl8211e". + + +Example: + +mdio0 { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + ethphy: ethernet-phy@1 { + compatible = "realtek,rtl8211e"; + reg = <1>; + realtek,eee-led-mode-disable; + }; +};
Add the 'realtek,eee-led-mode-disable' property to disable EEE LED mode on Realtek PHYs that support it. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> --- TODO: adapt PHY core to deal with optional compatible strings Changes in v3: - added entry for compatible string - added compatible string to example - mention that the new property is only available for RTL8211E Changes in v2: - document 'realtek,eee-led-mode-disable' instead of 'realtek,enable-ssc' in the initial version --- .../devicetree/bindings/net/realtek.txt | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/realtek.txt