Repository navigation
PENDING: PCI: qcom: pwrctrl: tc9563: Add embedded GPIO controller and reset-gpios support - #1521
Conversation
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
3 similar comments
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
PR #1521 — validate-patchPR: #1521
Final Summary
|
PR #1521 — checker-log-analyzerPR: #1521
Detailed report: Full report
|
| reg = <0x10000 0x0 0x0 0x0 0x0>; | ||
| #address-cells = <3>; | ||
| #size-cells = <2>; | ||
| gpio-controller; |
There was a problem hiding this comment.
Split into logical atomic commits. This is a mixture of everything.
There was a problem hiding this comment.
Fixed the whole changes into atomic commits
|
|
||
| ep-pwr-en-gpio = <&tc9563 2 GPIO_ACTIVE_HIGH>; | ||
| ep-reset-gpio = <&tc9563 5 GPIO_ACTIVE_HIGH>; | ||
| reset-gpios = <&tc9563 5 GPIO_ACTIVE_LOW>; |
There was a problem hiding this comment.
Why are there two GPIO specs using the same GPIO and opposite active flags?
There was a problem hiding this comment.
removed redundant ep-reset-gpio
|
qli-2.2 pull-request freeze |
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
82b1f3e to
2bce781
Compare
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
Add a driver for the GPIO controller embedded in the Toshiba TC9563 PCIe switch (and the Qualcomm QPS615). The device implements 37 GPIOs using two register banks: three registers control the first 32 GPIOs and three more control GPIOs 32-36. GPIOs 20 and 21 are reserved while GPIOs 22-24, 27-28, 31, and 34 are input-only. Register the driver as an auxiliary device driver. The TC9563 power controller creates the auxiliary device and provides a regmap that gives access to the GPIO registers, so use the gpio-regmap helpers to implement the GPIO chip. Signed-off-by: Alex Elder <elder@riscstar.com> Co-developed-by: Daniel Thompson <daniel@riscstar.com> Signed-off-by: Daniel Thompson <daniel@riscstar.com> Co-developed-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> [bhelgaas: commit log per https://lore.kernel.org/arQ2mDjqHv4gmoOK@lore-desk] [bhelgaas: squash Geert Uytterhoeven <geert+renesas@glider.be> Kconfig fix: https://lore.kernel.org/all/45484c37512a3102495d8b75b6e9f72a141ba42e.1792574560.git.geert+renesas@glider.be, Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Acked-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260909-pci-tc9563-aux-v5-2-c9b33f56c8d3@oss.qualcomm.com (cherry picked from commit 03ba564)
…ntroller The TC9563 PCIe switch embeds a GPIO controller providing 37 GPIO lines, accessed through the switch's I2C interface. The controller is integrated in the switch rather than being a separate device, so expose it by adding the gpio-controller and #gpio-cells properties to the switch node itself, and extend the example to show the downstream ports' reset-gpios being driven from those lines. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20260909-pci-tc9563-aux-v5-1-c9b33f56c8d3@oss.qualcomm.com (cherry picked from commit 32184f8)
The i2c subsystem currently blocks during adapter deregistration whenever there are consumers holding a reference. Switch to using of_get_i2c_adapter_by_node() which also takes a reference to the adapter module so that an attempt to unload the module while in use fails gracefully instead of blocking uninterruptibly. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Link: https://patch.msgid.link/20260716132532.1565340-1-johan@kernel.org (cherry picked from commit 62ef2a9)
…C Endpoint node DSP3 has an integrated Ethernet MAC Endpoint which has its own set of config registers for configuring settings such as ASPM. The Endpoint device has two physical functions and those two functions share the same settings. Parse the Endpoint node under DSP3 instead of parsing both functions. The existing parsing logic also has one OOB issue as parsing both functions will result in accessing past the tc9563_pwrctrl->cfg array. Fixes: 4c9c7be ("PCI: pwrctrl: Add power control driver for TC9563") Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Alex Elder <elder@riscstar.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260725-tc9563-fix-v1-2-ec4286e31331@oss.qualcomm.com (cherry picked from commit 6e5e6c2)
…c9563_pwrctrl_disable_port() TC9563 supports powering off only the external facing ports like DSP1 and DSP2. It is not recommended to power off USP and DSP3 as they have fixed ports/endpoint connected. Fix tc9563_pwrctrl_disable_port() to power off only DSP1 and DSP2. Fixes: 4c9c7be ("PCI: pwrctrl: Add power control driver for TC9563") Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Alex Elder <elder@riscstar.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260725-tc9563-fix-v1-3-ec4286e31331@oss.qualcomm.com (cherry picked from commit e41bbfc)
DSP3 doesn't support tuning Tx amplitude and DFE settings. Skip the setting if DT has passed the tuning properties. There is no need to error out the whole driver because of it. Fixes: 4c9c7be ("PCI: pwrctrl: Add power control driver for TC9563") Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> [bhelgaas: squash https://lore.kernel.org/all/oefxm7olagbd3dby2npgly7ausiz3g6cvls5igaxdzvlbr3wrv@rjlfebi2p36j] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Alex Elder <elder@riscstar.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260725-tc9563-fix-v1-4-ec4286e31331@oss.qualcomm.com (cherry picked from commit b859b93)
TC9563 Reference Manual calls DSP3 as VDSP (Virtual Downstream Port). Name it as such to avoid ambiguity. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Alex Elder <elder@riscstar.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260725-tc9563-fix-v1-5-ec4286e31331@oss.qualcomm.com (cherry picked from commit b7f273a)
2bce781 to
25c27fe
Compare
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
PR #1521 — validate-patchPR: #1521
Final Summary
|
PR #1521 — checker-log-analyzerPR: #1521
Detailed report: Full report
|
|
Merge Check Failed: CR Not Eligible for Merge CR 4732833 is not eligible for merge. The parent software image for kernel.qli.2.0 is not development complete. Entity: Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations. |
|
Merge Check Failed: CR Not Eligible for Merge CR 4732833 is not eligible for merge. The parent software image for kernel.qli.2.0 is not development complete. Entity: Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations. |
25c27fe to
941af77
Compare
|
Merge Check Failed: CR Not Eligible for Merge CR 4732833 is not eligible for merge. The parent software image for kernel.qli.2.0 is not development complete. Entity: Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations. |
PR #1521 — validate-patchPR: #1521
Final Summary
|
PR #1521 — checker-log-analyzerPR: #1521
Detailed report: Full report
|
The unfortunately named 'phandle-array' property type is really a matrix with phandle and fixed arg cells entries. A matrix property should have 2 levels of items constraints. Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20260507201749.2605365-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com> (cherry picked from commit 3753412)
…c9563_pwrctrl_ports' enum 'tc9563_pwrctrl_ports' is supposed to list only the internal ports of the switch. But it currently lists the integrated MAC Endpoint as well, which is wrong. Move it to a separate 'ep_cfg' struct and also configure/parse the ports and the MAC Endpoint separately. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Alex Elder <elder@riscstar.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260725-tc9563-fix-v1-6-ec4286e31331@oss.qualcomm.com (cherry picked from commit b985161)
Replace the custom tc9563_pwrctrl_i2c_{read,write,bulk_write} functions
with standard regmap APIs. The device uses 24-bit big-endian register
addresses and 32-bit little-endian register values over I2C, which is
directly supported by regmap.
This removes the open-coded I2C transfer handling and lets the regmap
core handle formatting, locking, and multi-register coalescing.
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260729-pci-pwrctrl-tc956x-regmap-v1-1-20ce61a3ce12@oss.qualcomm.com
(cherry picked from commit ebaa06f)
…cation Switch from i2c_new_dummy_device() to its devm variant devm_i2c_new_dummy_device() so the I2C client is automatically unregistered when the driver is removed or on probe failure. This allows removing the manual i2c_unregister_device() calls from both the probe error path and the remove function, and lets the i2c_client pointer be a local variable in probe instead of storing it in the driver data structure. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260729-pci-pwrctrl-tc956x-regmap-v1-2-20ce61a3ce12@oss.qualcomm.com (cherry picked from commit 854fc49)
The RESX GPIO may be provided by a sleeping GPIO controller, such as an I2C or SPI I/O expander. Calling gpiod_set_value() for such a GPIO triggers the following warning: WARNING: ... drivers/gpio/gpiolib.c:4030 at gpiod_set_value() The TC9563 power-on and power-off callbacks already sleep while enabling or disabling regulators and while waiting for oscillator stabilization. Use gpiod_set_value_cansleep() for RESX so it can be driven without triggering the warning. Fixes: 4c9c7be ("PCI: pwrctrl: Add power control driver for TC9563") Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260825-pci-pwrctl-tc9563-use-cansleep-for-resx-v1-1-0dbe7cfd8200@oss.qualcomm.com (cherry picked from commit 028f864)
The TC9563 embeds a GPIO controller used for per-port reset signals. Create an auxiliary device for it so the gpio-tc9563 driver can register the GPIO chip and enable DT-based GPIO lookups. Pass the tc9563 regmap to the auxiliary device as its platform data. The pwrctrl driver does not wait for the GPIO chip to be probed. The per-port reset GPIO lookup, returning -EPROBE_DEFER until the chip is registered, is added in the next patch. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> [bhelgaas: squash Geert Uytterhoeven <geert+renesas@glider.be> Kconfig fix: https://lore.kernel.org/all/45484c37512a3102495d8b75b6e9f72a141ba42e.1792574560.git.geert+renesas@glider.be, Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Acked-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Reviewed-by: Alex Elder <elder@riscstar.com> Link: https://patch.msgid.link/20260909-pci-tc9563-aux-v5-3-c9b33f56c8d3@oss.qualcomm.com (cherry picked from commit cf3c9cc)
…fter power-on The PCIe host controller driver may request the endpoint reset GPIOs before the switch is powered. gpiolib cannot read their direction then, and refuses to drive a line it does not know to be an output. Now that the switch is accessible and the lines are outputs, make gpiolib read the direction again. Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com> (cherry picked from commit a78a949)
…PIOs Create the pwrctrl devices before parsing the Root Port nodes, since a downstream PCIe device (e.g., the TC9563 switch acting as a GPIO controller) may provide the PERST# GPIO for its own downstream ports. Such a provider is not yet powered/probed at the point the RC node's own PERST# is normally requested, so request it with GPIOD_ASIS instead of GPIOD_OUT_HIGH and leave its state untouched until the pwrctrl driver powers the device on and the PCI client driver takes over control of it. Also plug a PHY leak on the parse_perst() failure path in qcom_pcie_parse_port(), and destroy the pwrctrl devices on the corresponding qcom_pcie_probe() error paths. Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com> (cherry picked from commit 93dff6f)
Enable CONFIG_GPIO_TC9563 so the TC9563 PCIe switch's embedded GPIO controller driver is built on qcom platforms using this defconfig. Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com> (cherry picked from commit 97da98f)
…ontroller for EP reset Mark the tc9563 switch's pcie@0,0 node as a gpio-controller so its downstream ports can describe their endpoint reset lines with the standard reset-gpios property, instead of the vendor-specific ep-reset-gpio property that pci-pwrctrl-tc9563.c no longer consumes for pcie@1,0's endpoint. Add reset-gpios to pcie@1,0 and pcie@2,0, and drop the now-redundant ep-reset-gpio from pcie@1,0. Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com> (cherry picked from commit d167e87)
…pio-controller usage Document the standard reset-gpios property for downstream ports, used by pci-pwrctrl-tc9563.c to drive the endpoint reset line through the TC9563 embedded GPIO controller. Update the example to mark pcie@0,0 as a gpio-controller, drop the stray duplicate gpio-controller/ #gpio-cells pair and the tc9563 label on the outer pcie@0 node, and remove the now-redundant ep-reset-gpio from the pcie@2,0 example. Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com> (cherry picked from commit 974b632)
… PCIe ports The TC9563 PCIe switch and its three downstream endpoint ports on the talos-lyra-evk board require ASPM L1 to be fully disabled to avoid link instability caused by board-level connectivity constraints. Add 'aspm-no-l1' to the TC9563 root port (pcie@0,0) and its three downstream child nodes (pcie@1,0, pcie@2,0, pcie@3,0) so the ASPM driver masks L1 and all L1 PM Substates for those links during link initialisation. This DT change depends on: PCI/ASPM: Mask ASPM states based on Devicetree properties (https://lore.kernel.org/all/20260727-aspm-v6-0-2ebb3ee7ef71@oss.qualcomm.com/) CRs-Fixed: 4723173 Signed-off-by: Ziyue Zhang <ziyue.zhang@oss.qualcomm.com> Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com> (cherry picked from commit 941af77)
941af77 to
e402fca
Compare
|
Merge Check Failed: CR Not Eligible for Merge CR 4732833 is not eligible for merge. The parent software image for kernel.qli.2.0 is not development complete. Entity: Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations. |
PR #1521 — validate-patchPR: #1521
Final Summary
Overall: Structural validation passes for commit message format, but integration presence fails and diff/upstream validation blocked by missing lore evidence.
|
PR #1521 — checker-log-analyzerPR: #1521
Detailed report: Full report
|
This changes moves endpoint reset handling for the TC9563 PCIe switch's downstream ports to the standard reset-gpios property backed by the switch's embedded GPIO controller, fixes two related issues this exposes in the PCIe core and gpiolib, and disables ASPM L1 on the talos-lyra-evk
TC9563 links to work around board-level link instability.
Changes
The host controller may request the endpoint reset GPIOs before the switch is powered, so gpiolib can't read their direction and refuses to drive a line it doesn't know is an output. Re-read the direction once the switch is powered and the lines are outputs.
Create pwrctrl devices before parsing Root Port nodes, since a downstream device (e.g. the TC9563 acting as GPIO controller) may supply the PERST# GPIO for its own downstream ports and isn't powered/probed yet when the RC's own PERST# is normally requested. Request with GPIOD_ASIS
instead of GPIOD_OUT_HIGH and leave state untouched until pwrctrl powers the device on. Also fixes a PHY leak on the parse_perst() failure path and destroys pwrctrl devices on the corresponding probe error paths.
Enable CONFIG_GPIO_TC9563 so the driver is built for qcom platforms using this defconfig.
Mark pcie@0,0 as a gpio-controller and switch pcie@1,0/pcie@2,0 to the standard reset-gpios property instead of the vendor-specific ep-reset-gpio, dropping the now-redundant ep-reset-gpio from pcie@1,0.
Document reset-gpios for downstream ports and update the example accordingly: mark pcie@0,0 as a gpio-controller, drop the stray duplicate gpio-controller/#gpio-cells pair and the tc9563 label on the outer pcie@0 node, and remove the now-redundant ep-reset-gpio from the pcie@2,0
example.
Add aspm-no-l1 to the TC9563 root port and its three downstream ports to avoid link instability caused by board-level connectivity constraints. Depends on the upstream series "PCI/ASPM: Mask ASPM states based on Devicetree properties".
CRs-fixed: 4732833
QLIJIRA exceptions: [QLIJIRA-250] Temporary downstream exception to fix Wi-Fi failures after resume. - Qualcomm JIRA DC