| e5a2aac5 | 01-Dec-2021 |
Marek Behún <marek.behun@nic.cz> |
fix(drivers/marvell/comphy-3700): fix Generation Setting registers names
According to Functional Specification, the common PHY register at offset 0x3f is actually Generation 3 Setting 2, while the r
fix(drivers/marvell/comphy-3700): fix Generation Setting registers names
According to Functional Specification, the common PHY register at offset 0x3f is actually Generation 3 Setting 2, while the register at offset 0x112 is Generation 2 Setting 3.
Signed-off-by: Marek Behún <marek.behun@nic.cz> Change-Id: I4626672cbee2d08da1da7839a3cf3f90e78fa101
show more ...
|
| 0ee80f35 | 15-Nov-2021 |
Pali Rohár <pali@kernel.org> |
fix(plat/marvell/a3720/uart): do external reset during initialization
Sometimes when changing UART clock from TBG to XTAL, UART HW enters into some broken state. It does not transit characters from
fix(plat/marvell/a3720/uart): do external reset during initialization
Sometimes when changing UART clock from TBG to XTAL, UART HW enters into some broken state. It does not transit characters from TX FIFO anymore and TX FIFO stays always empty. TX FIFO reset does not recover UART HW from this broken state.
Experiments show that external reset can fix UART HW from this broken state.
TF-A fatal error handler calls console_a3700_core_init() function to initialize UART HW. This handler may be called anytime during CPU runtime, also when kernel is running.
U-Boot or Linux kernel may change UART clock to TBG to achieve higher baudrates. During initialization, console_a3700_core_init() resets UART configuration to default settings, which means that it also changes UART clock from TBG to XTAL.
Do an external reset of UART via North Bridge Peripheral reset register to prevent this UART hangup.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I8990bce24d1a6fd8ccc47a2cd0a5ff932fcfcf14
show more ...
|
| 15546dbf | 15-Nov-2021 |
Pali Rohár <pali@kernel.org> |
fix(plat/marvell/a3720/uart): configure UART after TX FIFO reset
If TX FIFO is not empty, do not touch UART settings and let UART HW transmit remaining bytes from TX FIFO. New UART settings are then
fix(plat/marvell/a3720/uart): configure UART after TX FIFO reset
If TX FIFO is not empty, do not touch UART settings and let UART HW transmit remaining bytes from TX FIFO. New UART settings are then set only after TX FIFO is reset.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I2976c0a4fbb841d3a79d42ef67c06e70174afc3b
show more ...
|
| 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 ...
|
| b9185c75 | 13-May-2021 |
Pali Rohár <pali@kernel.org> |
fix(plat/marvell/a3720/uart): fix configuring UART clock
When configuring the UART_BAUD_REG register, the function console_a3700_core_init() currently only changes the baud divisor field, leaving ot
fix(plat/marvell/a3720/uart): fix configuring UART clock
When configuring the UART_BAUD_REG register, the function console_a3700_core_init() currently only changes the baud divisor field, leaving other fields to their previous value.
This is incorrect, because the baud divisor is computed with the assumption that the parent clock rate is 25 MHz, and since the other fields in this register configure the parent clock, which could have been changed by U-Boot or Linux.
Fix this function to also configure the other fields so that the UART parent clock is selected to be the xtal clock.
For example without this change TF-A prints only
ERROR: a3700_system_off needs to be implemented
followed by garbage after plat_crash_console_init() is called.
After applying this change instead of garbage it also print crash info:
PANIC at PC : 0x0000000004023800
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I72f338355cc60d939b8bb978d9c7fdd576416b81
show more ...
|
| 667893ad | 18-Mar-2020 |
Grzegorz Jaszczyk <jaz@semihalf.com> |
drivers: marvell: misc-dfx: extend dfx whitelist
Linux cpu clk driver requires access to some dfx registers. By adding these registers to the white list, we enable access to them from non-secure wor
drivers: marvell: misc-dfx: extend dfx whitelist
Linux cpu clk driver requires access to some dfx registers. By adding these registers to the white list, we enable access to them from non-secure world.
Change-Id: Ic05c96b375121c025bfb41c2ac9474a530720155 Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com> Reviewed-on: https://sj1git1.cavium.com/25187 Tested-by: Kostya Porotchkin <kostap@marvell.com> Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
show more ...
|
| 81c2a044 | 03-Jan-2020 |
Grzegorz Jaszczyk <jaz@semihalf.com> |
drivers: marvell: add support for secure read/write of dfx register-set
Since the dfx register set is going to be marked as secure expose dfx secure read and write function via SiP services. In intr
drivers: marvell: add support for secure read/write of dfx register-set
Since the dfx register set is going to be marked as secure expose dfx secure read and write function via SiP services. In introduced misc_dfx driver some registers are white-listed so non-secure software can still access them.
This will allow non-secure word drivers access some white-listed registers related to e.g.: Sample at reset, efuses, SoC type and revision ID accesses.
Change-Id: If9ae2da51ab2e6ca62b9a2c940819259bf25edc0 Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com> Reviewed-on: https://sj1git1.cavium.com/25055 Tested-by: Kostya Porotchkin <kostap@marvell.com> Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
show more ...
|