Skip to content

Commit b2c1ca9

Browse files
FROMLIST: PCI: pwrctrl: Add power control driver for tc9563
TC9563 is a PCIe switch which has one upstream and three downstream ports. To one of the downstream ports integrated ethernet MAC is connected as endpoint device. Other two downstream ports are supposed to connect to external device. One Host can connect to TC9563 by upstream port. TC9563 switch needs to be configured after powering on and before the PCIe link was up. The PCIe controller driver already enables link training at the host side even before this driver probe happens, due to this when driver enables power to the switch it participates in the link training and PCIe link may come up before configuring the switch through i2c. Once the link is up the configuration done through i2c will not have any affect.To prevent the host from participating in link training, disable link training on the host side to ensure the link does not come up before the switch is configured via I2C. Based up on dt property and type of the port, tc9563 is configured through i2c. Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
1 parent e5fcd75 commit b2c1ca9

File tree

3 files changed

+652
-0
lines changed

3 files changed

+652
-0
lines changed

drivers/pci/pwrctrl/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ config PCI_PWRCTRL_SLOT
2222
PCI slots. The voltage regulators powering the rails of the PCI slots
2323
are expected to be defined in the devicetree node of the PCI bridge.
2424

25+
config PCI_PWRCTRL_TC9563
26+
tristate "PCI Power Control driver for TC9563 PCIe switch"
27+
select PCI_PWRCTRL
28+
help
29+
Say Y here to enable the PCI Power Control driver of TC9563 PCIe
30+
switch.
31+
32+
This driver enables power and configures the TC9563 PCIe switch
33+
through i2c.TC9563 is a PCIe switch which has one upstream and three
34+
downstream ports. To one of the downstream ports integrated ethernet
35+
MAC is connected as endpoint device. Other two downstream ports are
36+
supposed to connect to external device.
37+
2538
# deprecated
2639
config HAVE_PWRCTL
2740
bool

drivers/pci/pwrctrl/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ obj-$(CONFIG_PCI_PWRCTRL_PWRSEQ) += pci-pwrctrl-pwrseq.o
77

88
obj-$(CONFIG_PCI_PWRCTRL_SLOT) += pci-pwrctrl-slot.o
99
pci-pwrctrl-slot-y := slot.o
10+
11+
obj-$(CONFIG_PCI_PWRCTRL_TC9563) += pci-pwrctrl-tc9563.o

0 commit comments

Comments
 (0)