aboutsummaryrefslogtreecommitdiff
path: root/drivers/phy/mscc
AgeCommit message (Collapse)AuthorFilesLines
2024-02-23phy: constify of_phandle_args in xlateKrzysztof Kozlowski1-1/+1
The xlate callbacks are supposed to translate of_phandle_args to proper provider without modifying the of_phandle_args. Make the argument pointer to const for code safety and readability. Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Florian Fainelli <[email protected]> #Broadcom Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2023-03-20phy: phy-ocelot-serdes: add ability to be used in a non-syscon configurationColin Foster1-0/+9
The phy-ocelot-serdes module has exclusively been used in a syscon setup, from an internal CPU. The addition of external control of ocelot switches via an existing MFD implementation means that syscon is no longer the only interface that phy-ocelot-serdes will see. In the MFD configuration, an IORESOURCE_REG resource will exist for the device. Utilize this resource to be able to function in both syscon and non-syscon configurations. Signed-off-by: Colin Foster <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2-0/+2
Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-04-18phy: ocelot-serdes: Add support for SERDES6G muxingKavya Sree Kotagiri1-2/+238
Adding support for SERDES6G muxing required for QSGMII mode of operation. Signed-off-by: Kavya Sree Kotagiri <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Signed-off-by: Steen Hegelund <[email protected]> Co-developed-by: Quentin Schulz <[email protected]> Co-developed-by: Steen Hegelund <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]>
2018-12-12phy: ocelot-serdes: convert to use eth phy mode and submodeGrygorii Strashko1-6/+16
Convert ocelot-serdes PHY driver to use recently introduced PHY_MODE_ETHERNET and phy_set_mode_ext(). Cc: Quentin Schulz <[email protected]> Signed-off-by: Grygorii Strashko <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Tested-by: Quentin Schulz <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]>
2018-12-12phy: core: rework phy_set_mode to accept phy mode and submodeGrygorii Strashko1-1/+1
Currently the attempt to add support for Ethernet interface mode PHY (MII/GMII/RGMII) will lead to the necessity of extending enum phy_mode and duplicate there values from phy_interface_t enum (or introduce more PHY callbacks) [1]. Both approaches are ineffective and would lead to fast bloating of enum phy_mode or struct phy_ops in the process of adding more PHYs for different subsystems which will make them unmaintainable. As discussed in [1] the solution could be to introduce dual level PHYs mode configuration - PHY mode and PHY submode. The PHY mode will define generic PHY type (subsystem - PCIE/ETHERNET/USB_) while the PHY submode - subsystem specific interface mode. The last is usually already defined in corresponding subsystem headers (phy_interface_t for Ethernet, enum usb_device_speed for USB). This patch is cumulative change which refactors PHY framework code to support dual level PHYs mode configuration - PHY mode and PHY submode. It extends .set_mode() callback to support additional parameter "int submode" and converts all corresponding PHY drivers to support new .set_mode() callback declaration. The new extended PHY API int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode) is introduced to support dual level PHYs mode configuration and existing phy_set_mode() API is converted to macros, so PHY framework consumers do not need to be changed (~21 matches). [1] http://lkml.kernel.org/r/[email protected] Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]>
2018-10-22phy: ocelot-serdes: fix out-of-bounds readGustavo A. R. Silva1-2/+2
Currently, there is an out-of-bounds read on array ctrl->phys, once variable i reaches the maximum array size of SERDES_MAX in the for loop. Fix this by changing the condition in the for loop from i <= SERDES_MAX to i < SERDES_MAX. Addresses-Coverity-ID: 1473966 ("Out-of-bounds read") Addresses-Coverity-ID: 1473959 ("Out-of-bounds read") Fixes: 51f6b410fc22 ("phy: add driver for Microsemi Ocelot SerDes muxing") Reviewed-by: Quentin Schulz <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-10-10phy: phy-ocelot-serdes: fix return value check in serdes_probe()Wei Yongjun1-2/+2
In case of error, the function syscon_node_to_regmap() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 51f6b410fc22 ("phy: add driver for Microsemi Ocelot SerDes muxing") Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-10-05phy: add driver for Microsemi Ocelot SerDes muxingQuentin Schulz3-0/+311
The Microsemi Ocelot can mux SerDes lanes (aka macros) to different switch ports or even make it act as a PCIe interface. This adds support for the muxing of the SerDes. Signed-off-by: Quentin Schulz <[email protected]> Signed-off-by: David S. Miller <[email protected]>