]> www.infradead.org Git - users/dwmw2/linux.git/commit
PCI: aardvark: Issue PERST via GPIO
authorPali Rohár <pali@kernel.org>
Thu, 30 Apr 2020 08:06:18 +0000 (10:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:48 +0000 (17:48 +0200)
commit18ecb9e7f75d3f7c4cc1386e6dbe0c00d3670485
tree397d1d03536c7ac904009400e9703c8f32d4ef81
parent313ce530eb0462e0ffe6032aa8a087eca875b369
PCI: aardvark: Issue PERST via GPIO

[ Upstream commit 5169a9851daaa2782a7bd2bb83d5b1bd224b2879 ]

Add support for issuing PERST via GPIO specified in 'reset-gpios'
property (as described in PCI device tree bindings).

Some buggy cards (e.g. Compex WLE900VX or WLE1216) are not detected
after reboot when PERST is not issued during driver initialization.

If bootloader already enabled link training then issuing PERST has no
effect for some buggy cards (e.g. Compex WLE900VX) and these cards are
not detected. We therefore clear the LINK_TRAINING_EN register before.

It was observed that Compex WLE900VX card needs to be in PERST reset
for at least 10ms if bootloader enabled link training.

Tested on Turris MOX.

Link: https://lore.kernel.org/r/20200430080625.26070-6-pali@kernel.org
Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/pci-aardvark.c