Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
98806b0
Revert "FROMLIST: dt-bindings: PCI: Add binding for Toshiba TC9563 PC…
krishnachaitanya-linux Feb 11, 2026
5a25b4d
Revert "FROMLIST: PCI: Add new start_link() & stop_link function ops"
krishnachaitanya-linux Feb 11, 2026
c37579d
Revert "FROMLIST: PCI: dwc: Add host_start_link() & host_start_link()…
krishnachaitanya-linux Feb 11, 2026
1ac2800
Revert "FROMLIST: PCI: dwc: Implement .start_link(), .stop_link() hooks"
krishnachaitanya-linux Feb 11, 2026
35452e1
Revert "FROMLIST: PCI: qcom: Add support for host_stop_link() & host_…
krishnachaitanya-linux Feb 11, 2026
260127e
Revert "FROMLIST: PCI: Add pcie_link_is_active() to determine if the …
krishnachaitanya-linux Feb 11, 2026
7d894ce
Revert "FROMLIST: PCI: pwrctrl: Add power control driver for tc9563"
krishnachaitanya-linux Feb 11, 2026
d9f0c2b
BACKPORT: dt-bindings: PCI: Add binding for Toshiba TC9563 PCIe switch
krishnachaitanya-linux Nov 1, 2025
eca824f
BACKPORT: PCI: Add assert_perst() operation to control PCIe PERST#
krishnachaitanya-linux Nov 1, 2025
04db9b4
BACKPORT: PCI: dwc: Add assert_perst() hook for dwc glue drivers
krishnachaitanya-linux Nov 1, 2025
845e008
BACKPORT: PCI: dwc: Implement .assert_perst() hook
krishnachaitanya-linux Nov 1, 2025
c15ac07
BACKPORT: PCI: qcom: Add support for assert_perst()
krishnachaitanya-linux Nov 1, 2025
68615ec
BACKPORT: PCI: pwrctrl: Add power control driver for TC9563
krishnachaitanya-linux Nov 1, 2025
99cf5e1
BACKPORT: PCI/pwrctrl: tc9563: Enforce I2C dependency
Mani-Sadhasivam Nov 20, 2025
98d8e20
BACKPORT: PCI/pwrctrl: tc9563: Remove unnecessary semicolons
Mani-Sadhasivam Nov 20, 2025
dd9954b
FROMLIST: PCI/pwrctrl: pwrseq: Rename private struct and pointers for…
bjorn-helgaas Jan 15, 2026
465c214
FROMLIST: PCI/pwrctrl: slot: Rename private struct and pointers for c…
bjorn-helgaas Jan 15, 2026
19ff27d
FROMLIST: PCI/pwrctrl: tc9563: Use put_device() instead of i2c_put_ad…
Mani-Sadhasivam Jan 15, 2026
5d6d896
FROMLIST: PCI/pwrctrl: tc9563: Clean up whitespace
bjorn-helgaas Jan 15, 2026
fbe8c52
FROMLIST: PCI/pwrctrl: tc9563: Add local variables to reduce repetition
bjorn-helgaas Jan 15, 2026
41a2cda
FROMLIST: PCI/pwrctrl: tc9563: Rename private struct and pointers for…
bjorn-helgaas Jan 15, 2026
eeb58b7
FROMLIST: PCI/pwrctrl: slot: Factor out power on/off code to helpers
Mani-Sadhasivam Jan 15, 2026
f5b81d8
FROMLIST: PCI/pwrctrl: pwrseq: Factor out power on/off code to helpers
Mani-Sadhasivam Jan 15, 2026
44376a3
FROMLIST: PCI/pwrctrl: Add 'struct pci_pwrctrl::power_{on/off}' callb…
Mani-Sadhasivam Jan 15, 2026
94b60d9
FROMLIST: PCI/pwrctrl: Add APIs to create, destroy pwrctrl devices
krishnachaitanya-linux Jan 15, 2026
c88c181
FROMLIST: PCI/pwrctrl: Add APIs to power on/off pwrctrl devices
Mani-Sadhasivam Jan 15, 2026
a538351
FROMLIST: PCI/pwrctrl: Switch to pwrctrl create, power on/off, destro…
Mani-Sadhasivam Jan 15, 2026
e72d9a5
FROMLIST: PCI: qcom: Drop the assert_perst() callbacks
Mani-Sadhasivam Jan 15, 2026
f7a5f96
FROMLIST: PCI: Drop the assert_perst() callback
Mani-Sadhasivam Jan 15, 2026
5d29f82
FROMLIST: PCI: qcom: Rename PERST# assert/deassert helpers for unifor…
Mani-Sadhasivam Jan 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Documentation/devicetree/bindings/pci/toshiba,tc9563.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Toshiba TC9563 PCIe switch

maintainers:
- Krishna chaitanya chundru <quic_krichai@quicinc.com>
- Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>

description: |
Toshiba TC9563 PCIe switch has one upstream and three downstream ports.
Expand All @@ -26,7 +26,7 @@ properties:
reg:
maxItems: 1

reset-gpios:
resx-gpios:
maxItems: 1
description:
GPIO controlling the RESX# pin.
Expand All @@ -47,15 +47,15 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle-array
description:
A phandle to the parent I2C node and the slave address of the device
used to do configure tc9563 to change FTS, tx amplitude etc.
used to configure tc9563 to change FTS, tx amplitude etc.
items:
- description: Phandle to the I2C controller node
- description: I2C slave address

patternProperties:
"^pcie@[1-3],0$":
description:
child nodes describing the internal downstream ports
child nodes describing the internal downstream ports of
the tc9563 switch.
type: object
allOf:
Expand All @@ -76,10 +76,11 @@ $defs:
type: boolean
description:
Disable DFE (Decision Feedback Equalizer), which mitigates
intersymbol interference and some reflections caused by impedance mismatches.
intersymbol interference and some reflections caused by
impedance mismatches.

required:
- reset-gpios
- resx-gpios
- vdd18-supply
- vdd09-supply
- vddc-supply
Expand Down Expand Up @@ -130,7 +131,7 @@ examples:
vddio2-supply = <&vdd>;
vddio18-supply = <&vdd>;

reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
resx-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;

pcie@1,0 {
compatible = "pciclass,0604";
Expand Down
19 changes: 0 additions & 19 deletions drivers/pci/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ void __weak pcibios_bus_add_device(struct pci_dev *pdev) { }
void pci_bus_add_device(struct pci_dev *dev)
{
struct device_node *dn = dev->dev.of_node;
struct platform_device *pdev;

/*
* Can not put in pci_device_add yet because resources
Expand All @@ -357,24 +356,6 @@ void pci_bus_add_device(struct pci_dev *dev)
pci_proc_attach_device(dev);
pci_bridge_d3_update(dev);

/*
* If the PCI device is associated with a pwrctrl device with a
* power supply, create a device link between the PCI device and
* pwrctrl device. This ensures that pwrctrl drivers are probed
* before PCI client drivers.
*/
pdev = of_find_device_by_node(dn);
if (pdev) {
if (of_pci_supply_present(dn)) {
if (!device_link_add(&dev->dev, &pdev->dev,
DL_FLAG_AUTOREMOVE_CONSUMER)) {
pci_err(dev, "failed to add device link to power control device %s\n",
pdev->name);
}
}
put_device(&pdev->dev);
}

if (!dn || of_device_is_available(dn))
pci_dev_allow_binding(dev);

Expand Down
18 changes: 0 additions & 18 deletions drivers/pci/controller/dwc/pcie-designware-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,28 +856,10 @@ static void __iomem *dw_pcie_ecam_conf_map_bus(struct pci_bus *bus, unsigned int
return pci->dbi_base + where;
}

static int dw_pcie_op_start_link(struct pci_bus *bus)
{
struct dw_pcie_rp *pp = bus->sysdata;
struct dw_pcie *pci = to_dw_pcie_from_pp(pp);

return dw_pcie_host_start_link(pci);
}

static void dw_pcie_op_stop_link(struct pci_bus *bus)
{
struct dw_pcie_rp *pp = bus->sysdata;
struct dw_pcie *pci = to_dw_pcie_from_pp(pp);

dw_pcie_host_stop_link(pci);
}

static struct pci_ops dw_pcie_ops = {
.map_bus = dw_pcie_own_conf_map_bus,
.read = pci_generic_config_read,
.write = pci_generic_config_write,
.start_link = dw_pcie_op_start_link,
.stop_link = dw_pcie_op_stop_link,
};

static struct pci_ops dw_pcie_ecam_ops = {
Expand Down
16 changes: 0 additions & 16 deletions drivers/pci/controller/dwc/pcie-designware.h
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,6 @@ struct dw_pcie_ops {
enum dw_pcie_ltssm (*get_ltssm)(struct dw_pcie *pcie);
int (*start_link)(struct dw_pcie *pcie);
void (*stop_link)(struct dw_pcie *pcie);
int (*host_start_link)(struct dw_pcie *pcie);
void (*host_stop_link)(struct dw_pcie *pcie);
};

struct debugfs_info {
Expand Down Expand Up @@ -789,20 +787,6 @@ static inline void dw_pcie_stop_link(struct dw_pcie *pci)
pci->ops->stop_link(pci);
}

static inline int dw_pcie_host_start_link(struct dw_pcie *pci)
{
if (pci->ops && pci->ops->host_start_link)
return pci->ops->host_start_link(pci);

return 0;
}

static inline void dw_pcie_host_stop_link(struct dw_pcie *pci)
{
if (pci->ops && pci->ops->host_stop_link)
pci->ops->host_stop_link(pci);
}

static inline enum dw_pcie_ltssm dw_pcie_get_ltssm(struct dw_pcie *pci)
{
u32 val;
Expand Down
77 changes: 31 additions & 46 deletions drivers/pci/controller/dwc/pcie-qcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/of_pci.h>
#include <linux/pci.h>
#include <linux/pci-ecam.h>
#include <linux/pci-pwrctrl.h>
#include <linux/pm_opp.h>
#include <linux/pm_runtime.h>
#include <linux/platform_device.h>
Expand Down Expand Up @@ -250,7 +251,6 @@ struct qcom_pcie_ops {
void (*host_post_init)(struct qcom_pcie *pcie);
void (*deinit)(struct qcom_pcie *pcie);
void (*ltssm_enable)(struct qcom_pcie *pcie);
void (*ltssm_disable)(struct qcom_pcie *pcie);
int (*config_sid)(struct qcom_pcie *pcie);
};

Expand Down Expand Up @@ -290,7 +290,7 @@ struct qcom_pcie {

#define to_qcom_pcie(x) dev_get_drvdata((x)->dev)

static void qcom_perst_assert(struct qcom_pcie *pcie, bool assert)
static void __qcom_pcie_perst_assert(struct qcom_pcie *pcie, bool assert)
{
struct qcom_pcie_port *port;
int val = assert ? 1 : 0;
Expand All @@ -301,16 +301,16 @@ static void qcom_perst_assert(struct qcom_pcie *pcie, bool assert)
usleep_range(PERST_DELAY_US, PERST_DELAY_US + 500);
}

static void qcom_ep_reset_assert(struct qcom_pcie *pcie)
static void qcom_pcie_perst_assert(struct qcom_pcie *pcie)
{
qcom_perst_assert(pcie, true);
__qcom_pcie_perst_assert(pcie, true);
}

static void qcom_ep_reset_deassert(struct qcom_pcie *pcie)
static void qcom_pcie_perst_deassert(struct qcom_pcie *pcie)
{
/* Ensure that PERST has been asserted for at least 100 ms */
msleep(PCIE_T_PVPERL_MS);
qcom_perst_assert(pcie, false);
__qcom_pcie_perst_assert(pcie, false);
}

static int qcom_pcie_start_link(struct dw_pcie *pci)
Expand Down Expand Up @@ -642,37 +642,6 @@ static int qcom_pcie_post_init_1_0_0(struct qcom_pcie *pcie)
return 0;
}

static int qcom_pcie_host_start_link(struct dw_pcie *pci)
{
struct qcom_pcie *pcie = to_qcom_pcie(pci);

qcom_ep_reset_deassert(pcie);

if (pcie->cfg->ops->ltssm_enable)
pcie->cfg->ops->ltssm_enable(pcie);

return 0;
}

static void qcom_pcie_host_stop_link(struct dw_pcie *pci)
{
struct qcom_pcie *pcie = to_qcom_pcie(pci);

qcom_ep_reset_assert(pcie);

if (pcie->cfg->ops->ltssm_disable)
pcie->cfg->ops->ltssm_disable(pcie);
}

static void qcom_pcie_2_3_2_ltssm_disable(struct qcom_pcie *pcie)
{
u32 val;

val = readl(pcie->parf + PARF_LTSSM);
val &= ~LTSSM_EN;
writel(val, pcie->parf + PARF_LTSSM);
}

static void qcom_pcie_2_3_2_ltssm_enable(struct qcom_pcie *pcie)
{
u32 val;
Expand Down Expand Up @@ -1318,7 +1287,7 @@ static int qcom_pcie_host_init(struct dw_pcie_rp *pp)
struct qcom_pcie *pcie = to_qcom_pcie(pci);
int ret;

qcom_ep_reset_assert(pcie);
qcom_pcie_perst_assert(pcie);

ret = pcie->cfg->ops->init(pcie);
if (ret)
Expand All @@ -1328,13 +1297,21 @@ static int qcom_pcie_host_init(struct dw_pcie_rp *pp)
if (ret)
goto err_deinit;

ret = pci_pwrctrl_create_devices(pci->dev);
if (ret)
goto err_disable_phy;

ret = pci_pwrctrl_power_on_devices(pci->dev);
if (ret)
goto err_pwrctrl_destroy;

if (pcie->cfg->ops->post_init) {
ret = pcie->cfg->ops->post_init(pcie);
if (ret)
goto err_disable_phy;
goto err_pwrctrl_power_off;
}

qcom_ep_reset_deassert(pcie);
qcom_pcie_perst_deassert(pcie);

if (pcie->cfg->ops->config_sid) {
ret = pcie->cfg->ops->config_sid(pcie);
Expand All @@ -1345,7 +1322,12 @@ static int qcom_pcie_host_init(struct dw_pcie_rp *pp)
return 0;

err_assert_reset:
qcom_ep_reset_assert(pcie);
qcom_pcie_perst_assert(pcie);
err_pwrctrl_power_off:
pci_pwrctrl_power_off_devices(pci->dev);
err_pwrctrl_destroy:
if (ret != -EPROBE_DEFER)
pci_pwrctrl_destroy_devices(pci->dev);
err_disable_phy:
qcom_pcie_phy_power_off(pcie);
err_deinit:
Expand All @@ -1359,7 +1341,13 @@ static void qcom_pcie_host_deinit(struct dw_pcie_rp *pp)
struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
struct qcom_pcie *pcie = to_qcom_pcie(pci);

qcom_ep_reset_assert(pcie);
qcom_pcie_perst_assert(pcie);

/*
* No need to destroy pwrctrl devices as this function only gets called
* during system suspend as of now.
*/
pci_pwrctrl_power_off_devices(pci->dev);
qcom_pcie_phy_power_off(pcie);
pcie->cfg->ops->deinit(pcie);
}
Expand Down Expand Up @@ -1441,7 +1429,6 @@ static const struct qcom_pcie_ops ops_1_9_0 = {
.host_post_init = qcom_pcie_host_post_init_2_7_0,
.deinit = qcom_pcie_deinit_2_7_0,
.ltssm_enable = qcom_pcie_2_3_2_ltssm_enable,
.ltssm_disable = qcom_pcie_2_3_2_ltssm_disable,
.config_sid = qcom_pcie_config_sid_1_9_0,
};

Expand Down Expand Up @@ -1513,8 +1500,6 @@ static const struct qcom_pcie_cfg cfg_fw_managed = {
static const struct dw_pcie_ops dw_pcie_ops = {
.link_up = qcom_pcie_link_up,
.start_link = qcom_pcie_start_link,
.host_start_link = qcom_pcie_host_start_link,
.host_stop_link = qcom_pcie_host_stop_link,
};

static int qcom_pcie_icc_init(struct qcom_pcie *pcie)
Expand Down Expand Up @@ -1968,7 +1953,7 @@ static int qcom_pcie_probe(struct platform_device *pdev)

ret = dw_pcie_host_init(pp);
if (ret) {
dev_err(dev, "cannot initialize host\n");
dev_err_probe(dev, ret, "cannot initialize host\n");
goto err_phy_exit;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/pci/hotplug/pciehp.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ int pciehp_query_power_fault(struct controller *ctrl);
int pciehp_card_present(struct controller *ctrl);
int pciehp_card_present_or_link_active(struct controller *ctrl);
int pciehp_check_link_status(struct controller *ctrl);
int pciehp_check_link_active(struct controller *ctrl);
bool pciehp_device_replaced(struct controller *ctrl);
void pciehp_release_ctrl(struct controller *ctrl);

Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/hotplug/pciehp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void pciehp_handle_presence_or_link_change(struct controller *ctrl, u32 events)
/* Turn the slot on if it's occupied or link is up */
mutex_lock(&ctrl->state_lock);
present = pciehp_card_present(ctrl);
link_active = pcie_link_is_active(ctrl->pcie->port);
link_active = pciehp_check_link_active(ctrl);
if (present <= 0 && link_active <= 0) {
if (ctrl->state == BLINKINGON_STATE) {
ctrl->state = OFF_STATE;
Expand Down
Loading