528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. From 33f8fdcedb01680427328d710594facef7a0092c Mon Sep 17 00:00:00 2001
  2. From: Tomasz Maciej Nowak <tmn505@gmail.com>
  3. Date: Thu, 14 Jun 2018 14:40:26 +0200
  4. Subject: [PATCH 2/2] arm64: dts: armada-3720-espressobin: set max link to gen1
  5. Since the beginning there's been an issue with initializing the Atheros
  6. based MiniPCIe wireless cards. Here's an example of kerenel log:
  7. OF: PCI: host bridge /soc/pcie@d0070000 ranges:
  8. OF: PCI: MEM 0xe8000000..0xe8ffffff -> 0xe8000000
  9. OF: PCI: IO 0xe9000000..0xe900ffff -> 0xe9000000
  10. advk-pcie d0070000.pcie: link up
  11. advk-pcie d0070000.pcie: PCI host bridge to bus 0000:00
  12. pci_bus 0000:00: root bus resource [bus 00-ff]
  13. pci_bus 0000:00: root bus resource [mem0xe8000000-0xe8ffffff]
  14. pci_bus 0000:00: root bus resource [io 0x0000-0xffff](bus address [0xe9000000-0xe900ffff])
  15. pci 0000:00:00.0: BAR 0: assigned [mem0xe8000000-0xe801ffff 64bit]
  16. pci 0000:00:00.0: BAR 6: assigned [mem0xe8020000-0xe802ffff pref]
  17. [...]
  18. advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x3c
  19. advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x44
  20. advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
  21. ath9k 0000:00:00.0: enabling device (0000 -> 0002)
  22. advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x3c
  23. advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0xc
  24. advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
  25. advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x40
  26. ath9k 0000:00:00.0: request_irq failed
  27. advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
  28. ath9k: probe of 0000:00:00.0 failed with error -22
  29. The same happens for ath5k cards, while ath10k card didn't appear at
  30. all (not detected):
  31. OF: PCI: host bridge /soc/pcie@d0070000 ranges:
  32. OF: PCI: MEM 0xe8000000..0xe8ffffff -> 0xe8000000
  33. OF: PCI: IO 0xe9000000..0xe900ffff -> 0xe9000000
  34. advk-pcie d0070000.pcie: link never came up
  35. advk-pcie d0070000.pcie: PCI host bridge to bus 0000:00
  36. pci_bus 0000:00: root bus resource [bus 00-ff]
  37. pci_bus 0000:00: root bus resource [mem0xe8000000-0xe8ffffff]
  38. pci_bus 0000:00: root bus resource [io 0x0000-0xffff](bus address [0xe9000000-0xe900ffff])
  39. advk-pcie d0070000.pcie: config read/write timed out
  40. Following the issue on esppressobin.net forum [1] the workaround seems
  41. to be limiting the speed of PCIe bridge to 1st generation. This fixed
  42. the initialisation of all tested Atheros wireless cards.
  43. The patch in the forum thread swaped registers which would limit speed
  44. for all Armada 3700 based boards. The approach in this patch, in
  45. conjunction with "PCI: aardvark: allow to specify link capability" patch
  46. is less invasive, it only touches the affected board.
  47. For the record, the iwlwifi and mt76 cards were not affected by this
  48. issue.
  49. 1. http://espressobin.net/forums/topic/which-pcie-wlan-cards-are-supported
  50. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
  51. ---
  52. arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 2 ++
  53. 1 file changed, 2 insertions(+)
  54. --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
  55. +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
  56. @@ -86,6 +86,8 @@
  57. pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>;
  58. reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
  59. status = "okay";
  60. +
  61. + max-link-speed = <1>;
  62. };
  63. /* J6 */