| c0a909cd | 24-Sep-2021 |
Pali Rohár <pali@kernel.org> |
fix(drivers/marvell/comphy-cp110): fix error code in pcie power on
Function polling_with_timeout() returns last value from polled register on failure and zero on success. So set "ret" variable to er
fix(drivers/marvell/comphy-cp110): fix error code in pcie power on
Function polling_with_timeout() returns last value from polled register on failure and zero on success. So set "ret" variable to error code -ETIMEDOUT on error like it is done in other functions.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I16cac81bbcbe2113e139722dc0e8fc2b85428d1b
show more ...
|
| 49b664e7 | 23-Sep-2021 |
Pali Rohár <pali@kernel.org> |
fix(drivers/marvell/comphy-3700): handle failures in power functions
Subroutines in power functions may fail. So propagate failures from subroutines back to the caller of power function with appropr
fix(drivers/marvell/comphy-3700): handle failures in power functions
Subroutines in power functions may fail. So propagate failures from subroutines back to the caller of power function with appropriate error code in return value.
Function polling_with_timeout() returns last value from polled register on failure and zero on success. So return -ETIMEDOUT on error from power functions like it is doing Marvell comphy-cp110 driver.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I6c709c0c9616ab26829616a42a85b713f314b201
show more ...
|
| c074f70c | 23-Sep-2021 |
Pali Rohár <pali@kernel.org> |
fix(drivers/marvell/comphy-3700): fix address overflow
Physical address has to be stored in 64-bit data type as Armada 3720 is 64-bit platform. Driver already uses uintptr_t type for this purpise.
fix(drivers/marvell/comphy-3700): fix address overflow
Physical address has to be stored in 64-bit data type as Armada 3720 is 64-bit platform. Driver already uses uintptr_t type for this purpise.
Change type of 'offset' variables in mvebu_a3700_comphy_usb3_power_on() and mvebu_a3700_comphy_sgmii_power_on() / off() functions to uintptr_t as in this variable is stored physical address of registers.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I69581714f8899d21cc1a27005747708f0f1cd933
show more ...
|
| 0694b813 | 23-Sep-2021 |
Pali Rohár <pali@kernel.org> |
refactor(drivers/marvell/comphy-3700): simplify usage of comphy_sgmii_phy_init()
Parameter 'comphy_index' is not used and parameter 'mode' is used only to check if speed is 1 Gbps or not.
Remove pa
refactor(drivers/marvell/comphy-3700): simplify usage of comphy_sgmii_phy_init()
Parameter 'comphy_index' is not used and parameter 'mode' is used only to check if speed is 1 Gbps or not.
Remove parameter 'comphy_index' and instead of 32-bit variable 'mode', pass only boolean value which represents 1 Gbps speed.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I018d158f689ddf7d1f57003717d709c00d988fba
show more ...
|
| be33dce7 | 23-Sep-2021 |
Pali Rohár <pali@kernel.org> |
refactor(drivers/marvell/comphy-3700): simplify usage of indirect access on lane2
For code cleanup add two helper functions comphy_sata_set_indirect() and comphy_usb_set_indirect() for SATA and USB
refactor(drivers/marvell/comphy-3700): simplify usage of indirect access on lane2
For code cleanup add two helper functions comphy_sata_set_indirect() and comphy_usb_set_indirect() for SATA and USB 3.0 modes and remove additional 'mode' argument which is not needed anymore.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I23146f569db318dbaed5d411d7d175abf6efff85
show more ...
|
| 40d08192 | 24-Mar-2021 |
Pali Rohár <pali@kernel.org> |
drivers: marvell: comphy-a3700: Set TXDCLK_2X_SEL bit during PCIe initialization
Marvell Armada 3700 Functional Specifications, section 52.2 PCIe Link Initialization says that TXDCLK_2X_SEL bit need
drivers: marvell: comphy-a3700: Set TXDCLK_2X_SEL bit during PCIe initialization
Marvell Armada 3700 Functional Specifications, section 52.2 PCIe Link Initialization says that TXDCLK_2X_SEL bit needs to be enabled for PCIe Root Complex mode. Both U-Boot and Linux kernel support only Root Complex mode. Set this bit.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Id2a538c379b911b62597f9463b4842b7b5c24df7
show more ...
|
| ccec1bd5 | 24-Mar-2021 |
Pali Rohár <pali@kernel.org> |
drivers: marvell: comphy-a3700: Set mask parameter for every reg_set call
The third argument of the reg_set() function has name 'mask', which indicates that it is a mask applied to the register valu
drivers: marvell: comphy-a3700: Set mask parameter for every reg_set call
The third argument of the reg_set() function has name 'mask', which indicates that it is a mask applied to the register value which is going to be updated. But the implementation of this function uses this argument to clear prior value of the register, i.e. instead of new_val = (old_val & ~mask) | (data & mask); it does new_val = (new_val & ~mask) | data;
(The more proper name for this function should be reg_clrsetbits(), since internally it calls mmio_clrsetbits_32().)
To make code more readable set 'mask' argument to real mask, i.e. bits of register values which are going to be updated.
This patch does not make any functional change, only cosmetic, due to how 'mask' is interpreted.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Ifa0339e79c07d1994c7971b65d966b92cb735f65
show more ...
|
| ff9cfdc0 | 21-Jan-2020 |
Grzegorz Jaszczyk <jaz@semihalf.com> |
marvell: comphy: cp110: add support for USB comphy polarity invert
The polarity inversion for USB was not tested due to lack of hw design which requires it. Currently all supported boards doesn't re
marvell: comphy: cp110: add support for USB comphy polarity invert
The polarity inversion for USB was not tested due to lack of hw design which requires it. Currently all supported boards doesn't require USB phy polarity inversion, therefore COMPHY_POLARITY_NO_INVERT is set for all boards. Enable the option for the ones that need it.
Change-Id: Ia5f2ee313a93962e94963e2dd8a759ef6d9da369 Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
show more ...
|
| 2cae4a85 | 18-Jun-2019 |
Grzegorz Jaszczyk <jaz@semihalf.com> |
drivers: marvell: mg_conf_cm3: pass comphy lane number to AP FW
Since the AP process can be enabled on different setups, the information about used comphy lane should be passed to AP FW. For instanc
drivers: marvell: mg_conf_cm3: pass comphy lane number to AP FW
Since the AP process can be enabled on different setups, the information about used comphy lane should be passed to AP FW. For instance: - A8K development board uses comphy lane 2 for eth 0 - cn913x development board uses comphy lane 4 for eth 0
Change-Id: Icf001fb3eea4d9c24c09384e49844ecaf8655ad2 Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
show more ...
|
| 050eb19c | 28-Mar-2019 |
Grzegorz Jaszczyk <jaz@semihalf.com> |
marvell: comphy: initialize common phy selector for AP mode
Configuring common phy selector which was missing for AP mode.
Change-Id: I15be1ba50b8aafe9094734abec139d72c18bb224 Signed-off-by: Grzego
marvell: comphy: initialize common phy selector for AP mode
Configuring common phy selector which was missing for AP mode.
Change-Id: I15be1ba50b8aafe9094734abec139d72c18bb224 Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
show more ...
|
| 629dd61f | 05-Nov-2019 |
Marek Behún <marek.behun@nic.cz> |
drivers: marvell: comphy-a3700: support SGMII COMPHY power off
Add support for powering off the SGMII COMPHY (on lanes 0 and 1). This is needed sometimes on Turris Mox when using KEXEC.
There is al
drivers: marvell: comphy-a3700: support SGMII COMPHY power off
Add support for powering off the SGMII COMPHY (on lanes 0 and 1). This is needed sometimes on Turris Mox when using KEXEC.
There is also another benefit of a little energy saving when the given network interface is down.
Signed-off-by: Marek Behún <marek.behun@nic.cz> Change-Id: I55ae0fe3627e7cc0f65c78a00771939d8bf5399f
show more ...
|