56cfc976 | 17-Jun-2025 |
Kory Maincent (Dent Project) <kory.maincent@bootlin.com> |
net: pse-pd: tps23881: Add support for static port priority feature
This patch enhances PSE callbacks by introducing support for the static port priority feature. It extends interrupt management to
net: pse-pd: tps23881: Add support for static port priority feature
This patch enhances PSE callbacks by introducing support for the static port priority feature. It extends interrupt management to handle and report detection, classification, and disconnection events. Additionally, it introduces the pi_get_pw_req() callback, which provides information about the power requested by the Powered Devices.
Interrupt support is essential for the proper functioning of the TPS23881 controller. Without it, after a power-on (PWON), the controller will no longer perform detection and classification. This could lead to potential hazards, such as connecting a non-PoE device after a PoE device, which might result in magic smoke.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-12-78a1a645e2ee@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
24a4e3a0 | 17-Jun-2025 |
Kory Maincent (Dent Project) <kory.maincent@bootlin.com> |
net: pse-pd: pd692x0: Add support for controller and manager power supplies
Add support for managing the VDD and VDDA power supplies for the PD692x0 PSE controller, as well as the VAUX5 and VAUX3P3
net: pse-pd: pd692x0: Add support for controller and manager power supplies
Add support for managing the VDD and VDDA power supplies for the PD692x0 PSE controller, as well as the VAUX5 and VAUX3P3 power supplies for the PD6920x PSE managers.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-10-78a1a645e2ee@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
35975401 | 17-Jun-2025 |
Kory Maincent (Dent Project) <kory.maincent@bootlin.com> |
net: pse-pd: pd692x0: Add support for PSE PI priority feature
This patch extends the PSE callbacks by adding support for the newly introduced pi_set_prio() callback, enabling the configuration of PS
net: pse-pd: pd692x0: Add support for PSE PI priority feature
This patch extends the PSE callbacks by adding support for the newly introduced pi_set_prio() callback, enabling the configuration of PSE PI priorities. The current port priority is now also included in the status information returned to users.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-9-78a1a645e2ee@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
ffef61d6 | 17-Jun-2025 |
Kory Maincent (Dent Project) <kory.maincent@bootlin.com> |
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation strategies. Budget evaluation strategies is utilized by PSE cont
net: pse-pd: Add support for budget evaluation strategies
This patch introduces the ability to configure the PSE PI budget evaluation strategies. Budget evaluation strategies is utilized by PSE controllers to determine which ports to turn off first in scenarios such as power budget exceedance.
The pis_prio_max value is used to define the maximum priority level supported by the controller. Both the current priority and the maximum priority are exposed to the user through the pse_ethtool_get_status call.
This patch add support for two mode of budget evaluation strategies. 1. Static Method:
This method involves distributing power based on PD classification. It’s straightforward and stable, the PSE core keeping track of the budget and subtracting the power requested by each PD’s class.
Advantages: Every PD gets its promised power at any time, which guarantees reliability.
Disadvantages: PD classification steps are large, meaning devices request much more power than they actually need. As a result, the power supply may only operate at, say, 50% capacity, which is inefficient and wastes money.
Priority max value is matching the number of PSE PIs within the PSE.
2. Dynamic Method:
To address the inefficiencies of the static method, vendors like Microchip have introduced dynamic power budgeting, as seen in the PD692x0 firmware. This method monitors the current consumption per port and subtracts it from the available power budget. When the budget is exceeded, lower-priority ports are shut down.
Advantages: This method optimizes resource utilization, saving costs.
Disadvantages: Low-priority devices may experience instability.
Priority max value is set by the PSE controller driver.
For now, budget evaluation methods are not configurable and cannot be mixed. They are hardcoded in the PSE driver itself, as no current PSE controller supports both methods.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com> Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-7-78a1a645e2ee@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
c394e757 | 17-Jun-2025 |
Kory Maincent (Dent Project) <kory.maincent@bootlin.com> |
net: pse-pd: Add helper to report hardware enable status of the PI
Refactor code by introducing a helper function to retrieve the hardware enabled state of the PI, avoiding redundant implementations
net: pse-pd: Add helper to report hardware enable status of the PI
Refactor code by introducing a helper function to retrieve the hardware enabled state of the PI, avoiding redundant implementations in the future.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-6-78a1a645e2ee@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
1176978e | 17-Jun-2025 |
Kory Maincent (Dent Project) <kory.maincent@bootlin.com> |
net: ethtool: Add support for new power domains index description
Report the index of the newly introduced PSE power domain to the user, enabling improved management of the power budget for PSE devi
net: ethtool: Add support for new power domains index description
Report the index of the newly introduced PSE power domain to the user, enabling improved management of the power budget for PSE devices.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-5-78a1a645e2ee@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
50f8b341 | 17-Jun-2025 |
Kory Maincent (Dent Project) <kory.maincent@bootlin.com> |
net: pse-pd: Add support for PSE power domains
Introduce PSE power domain support as groundwork for upcoming port priority features. Multiple PSE PIs can now be grouped under a single PSE power doma
net: pse-pd: Add support for PSE power domains
Introduce PSE power domain support as groundwork for upcoming port priority features. Multiple PSE PIs can now be grouped under a single PSE power domain, enabling future enhancements like defining available power budgets, port priority modes, and disconnection policies. This setup will allow the system to assess whether activating a port would exceed the available power budget, preventing over-budget states proactively.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-4-78a1a645e2ee@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
f5e7aeca | 17-Jun-2025 |
Kory Maincent (Dent Project) <kory.maincent@bootlin.com> |
net: pse-pd: tps23881: Add support for PSE events and interrupts
Add support for PSE event reporting through interrupts. Set up the newly introduced devm_pse_irq_helper helper to register the interr
net: pse-pd: tps23881: Add support for PSE events and interrupts
Add support for PSE event reporting through interrupts. Set up the newly introduced devm_pse_irq_helper helper to register the interrupt. Events are reported for over-current and over-temperature conditions.
Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20250617-feature_poe_port_prio-v14-3-78a1a645e2ee@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
5385f1e1 | 10-Jan-2025 |
Kory Maincent <kory.maincent@bootlin.com> |
net: pse-pd: Clean ethtool header of PSE structures
Remove PSE-specific structures from the ethtool header to improve code modularity, maintain independent headers, and reduce incremental build time
net: pse-pd: Clean ethtool header of PSE structures
Remove PSE-specific structures from the ethtool header to improve code modularity, maintain independent headers, and reduce incremental build time.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
10276f3e | 10-Jan-2025 |
Kory Maincent <kory.maincent@bootlin.com> |
net: pse-pd: Fix missing PI of_node description
The PI of_node was not assigned in the regulator_config structure, leading to failures in resolving the correct supply when different power supplies a
net: pse-pd: Fix missing PI of_node description
The PI of_node was not assigned in the regulator_config structure, leading to failures in resolving the correct supply when different power supplies are assigned to multiple PIs of a PSE controller. This fix ensures that the of_node is properly set in the regulator_config, allowing accurate supply resolution for each PI.
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
7f076ce3 | 10-Jan-2025 |
Kory Maincent <kory.maincent@bootlin.com> |
net: pse-pd: tps23881: Add support for power limit and measurement features
Expand PSE callbacks to support the newly introduced pi_get/set_pw_limit() and pi_get_voltage() functions. These callbacks
net: pse-pd: tps23881: Add support for power limit and measurement features
Expand PSE callbacks to support the newly introduced pi_get/set_pw_limit() and pi_get_voltage() functions. These callbacks allow for power limit configuration in the TPS23881 controller.
Additionally, the patch includes the pi_get_pw_class() the pi_get_actual_pw(), and the pi_get_pw_limit_ranges') callbacks providing more comprehensive PoE status reporting.
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
4640a1f0 | 10-Jan-2025 |
Kory Maincent <kory.maincent@bootlin.com> |
net: pse-pd: Remove is_enabled callback from drivers
The is_enabled callback is now redundant as the admin_state can be obtained directly from the driver and provides the same information.
To simpl
net: pse-pd: Remove is_enabled callback from drivers
The is_enabled callback is now redundant as the admin_state can be obtained directly from the driver and provides the same information.
To simplify functionality, the core will handle this internally, making the is_enabled callback unnecessary at the driver level. Remove the callback from all drivers.
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
3e9dbfec | 10-Jan-2025 |
Kory Maincent <kory.maincent@bootlin.com> |
net: pse-pd: Split ethtool_get_status into multiple callbacks
The ethtool_get_status callback currently handles all status and PSE information within a single function. This approach has two key dra
net: pse-pd: Split ethtool_get_status into multiple callbacks
The ethtool_get_status callback currently handles all status and PSE information within a single function. This approach has two key drawbacks:
1. If the core requires some information for purposes other than ethtool_get_status, redundant code will be needed to fetch the same data from the driver (like is_enabled).
2. Drivers currently have access to all information passed to ethtool. New variables will soon be added to ethtool status, such as PSE ID, power domain IDs, and budget evaluation strategies, which are meant to be managed solely by the core. Drivers should not have the ability to modify these variables.
To resolve these issues, ethtool_get_status has been split into multiple callbacks, with each handling a specific piece of information required by ethtool or the core.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
e0a5e2bb | 10-Jan-2025 |
Kory Maincent <kory.maincent@bootlin.com> |
net: pse-pd: Use power limit at driver side instead of current limit
The regulator framework uses current limits, but the PSE standard and known PSE controllers rely on power limits. Instead of conv
net: pse-pd: Use power limit at driver side instead of current limit
The regulator framework uses current limits, but the PSE standard and known PSE controllers rely on power limits. Instead of converting current to power within each driver, perform the conversion in the PSE core. This avoids redundancy in driver implementation and aligns better with the standard, simplifying driver development.
Remove at the same time the _pse_ethtool_get_status() function which is not needed anymore.
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
f3cb3c7b | 10-Jan-2025 |
Kory Maincent <kory.maincent@bootlin.com> |
net: pse-pd: tps23881: Add missing configuration register after disable
When setting the PWOFF register, the controller resets multiple configuration registers. This patch ensures these registers ar
net: pse-pd: tps23881: Add missing configuration register after disable
When setting the PWOFF register, the controller resets multiple configuration registers. This patch ensures these registers are reconfigured as needed following a disable operation.
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
4c2bab50 | 10-Jan-2025 |
Kory Maincent <kory.maincent@bootlin.com> |
net: pse-pd: tps23881: Use helpers to calculate bit offset for a channel
This driver frequently follows a pattern where two registers are read or written in a single operation, followed by calculati
net: pse-pd: tps23881: Use helpers to calculate bit offset for a channel
This driver frequently follows a pattern where two registers are read or written in a single operation, followed by calculating the bit offset for a specific channel.
Introduce helpers to streamline this process and reduce code redundancy, making the codebase cleaner and more maintainable.
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
0b567519 | 10-Jan-2025 |
Kory Maincent <kory.maincent@bootlin.com> |
net: pse-pd: tps23881: Simplify function returns by removing redundant checks
Cleaned up several functions in tps23881 by removing redundant checks on return values at the end of functions. These ch
net: pse-pd: tps23881: Simplify function returns by removing redundant checks
Cleaned up several functions in tps23881 by removing redundant checks on return values at the end of functions. These check has been removed, and the return statement now directly returns the function result, reducing the code's complexity and making it more concise.
Reviewed-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Kyle Swenson <kyle.swenson@est.tech> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
6e56a6d4 | 10-Jan-2025 |
Kory Maincent <kory.maincent@bootlin.com> |
net: pse-pd: Add power limit check
Checking only the current limit is not sufficient. According to the standard, voltage can reach up to 57V and current up to 1.92A, which exceeds the power limit de
net: pse-pd: Add power limit check
Checking only the current limit is not sufficient. According to the standard, voltage can reach up to 57V and current up to 1.92A, which exceeds the power limit described in the standard (99.9W). Add a power limit check to prevent this.
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|