Skip to content

Commit

Permalink
net: phy: bcm54140: add hwmon support
Browse files Browse the repository at this point in the history
The PHY supports monitoring its die temperature as well as two analog
voltages. Add support for it.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Walle authored and David S. Miller committed Apr 22, 2020
1 parent 6937602 commit 4406d36
Show file tree
Hide file tree
Showing 4 changed files with 443 additions and 0 deletions.
45 changes: 45 additions & 0 deletions Documentation/hwmon/bcm54140.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.. SPDX-License-Identifier: GPL-2.0-only
Broadcom BCM54140 Quad SGMII/QSGMII PHY
=======================================

Supported chips:

* Broadcom BCM54140

Datasheet: not public

Author: Michael Walle <michael@walle.cc>

Description
-----------

The Broadcom BCM54140 is a Quad SGMII/QSGMII PHY which supports monitoring
its die temperature as well as two analog voltages.

The AVDDL is a 1.0V analogue voltage, the AVDDH is a 3.3V analogue voltage.
Both voltages and the temperature are measured in a round-robin fashion.

Sysfs entries
-------------

The following attributes are supported.

======================= ========================================================
in0_label "AVDDL"
in0_input Measured AVDDL voltage.
in0_min Minimum AVDDL voltage.
in0_max Maximum AVDDL voltage.
in0_alarm AVDDL voltage alarm.

in1_label "AVDDH"
in1_input Measured AVDDH voltage.
in1_min Minimum AVDDH voltage.
in1_max Maximum AVDDH voltage.
in1_alarm AVDDH voltage alarm.

temp1_input Die temperature.
temp1_min Minimum die temperature.
temp1_max Maximum die temperature.
temp1_alarm Die temperature alarm.
======================= ========================================================
1 change: 1 addition & 0 deletions Documentation/hwmon/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Hardware Monitoring Kernel Drivers
asb100
asc7621
aspeed-pwm-tacho
bcm54140
bel-pfe
coretemp
da9052
Expand Down
1 change: 1 addition & 0 deletions drivers/net/phy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ config BROADCOM_PHY
config BCM54140_PHY
tristate "Broadcom BCM54140 PHY"
depends on PHYLIB
depends on HWMON || HWMON=n
select BCM_NET_PHYLIB
help
Support the Broadcom BCM54140 Quad SGMII/QSGMII PHY.
Expand Down
Loading

0 comments on commit 4406d36

Please sign in to comment.