030-v5.15-0005-ARM-dts-NSP-Move-USB3-PHY-to-internal-MDIO-bus.patch 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. From 1c615401bddb1be21e1d375aaa071680f40f1ae2 Mon Sep 17 00:00:00 2001
  2. From: Matthew Hagan <[email protected]>
  3. Date: Sun, 13 Jun 2021 10:46:37 +0100
  4. Subject: [PATCH] ARM: dts: NSP: Move USB3 PHY to internal MDIO bus
  5. This patch largely replicates Vivek Unune's patch "ARM: dts:
  6. BCM5301X:Make usb3 phy use mdio phy driver"[1] for the NSP platform,
  7. whereby we need to create an mdio-mux to facilitate switches
  8. configured via external MDIO, in this case on the Meraki MX65.
  9. However in doing so, we are creating an overlap with usb3_phy's
  10. ccb-mii range. To resolve this, usb3_phy should be moved to a child
  11. node of the internal MDIO bus. The result is heavily based upon Vivek's
  12. patch. This has also been cross-referenced with Yendapally Reddy's
  13. earlier work which utilised the subsequently dropped brcm,nsp-usb3-phy
  14. driver: "[PATCH v2 4/4] arm: dts: nsp: Add USB nodes to device tree"
  15. [2]. Finally, this change provides conformance to the bcm-ns-usb3-phy
  16. documentation, utilising the required usb3-dmp-syscon property. Note
  17. that support for the deprecated ccb-mii bindings has been dropped as of
  18. "phy: phy-bcm-ns-usb3: drop support for deprecated DT binding"[3].
  19. [1] https://lore.kernel.org/patchwork/patch/933971/
  20. [2] https://www.spinics.net/lists/arm-kernel/msg555132.html
  21. [3] https://lore.kernel.org/linux-devicetree/[email protected]/
  22. Signed-off-by: Matthew Hagan <[email protected]>
  23. Signed-off-by: Florian Fainelli <[email protected]>
  24. ---
  25. arch/arm/boot/dts/bcm-nsp.dtsi | 38 +++++++++++++++++++++++++++-------
  26. 1 file changed, 31 insertions(+), 7 deletions(-)
  27. --- a/arch/arm/boot/dts/bcm-nsp.dtsi
  28. +++ b/arch/arm/boot/dts/bcm-nsp.dtsi
  29. @@ -370,6 +370,35 @@
  30. #address-cells = <1>;
  31. };
  32. + mdio-mux@32000 {
  33. + compatible = "mdio-mux-mmioreg";
  34. + reg = <0x32000 0x4>;
  35. + mux-mask = <0x200>;
  36. + #address-cells = <1>;
  37. + #size-cells = <0>;
  38. + mdio-parent-bus = <&mdio>;
  39. +
  40. + mdio_int: mdio@0 {
  41. + reg = <0x0>;
  42. + #address-cells = <1>;
  43. + #size-cells = <0>;
  44. +
  45. + usb3_phy: usb3-phy@10 {
  46. + compatible = "brcm,ns-bx-usb3-phy";
  47. + reg = <0x10>;
  48. + usb3-dmp-syscon = <&usb3_dmp>;
  49. + #phy-cells = <0>;
  50. + status = "disabled";
  51. + };
  52. + };
  53. +
  54. + mdio_ext: mdio@200 {
  55. + reg = <0x200>;
  56. + #address-cells = <1>;
  57. + #size-cells = <0>;
  58. + };
  59. + };
  60. +
  61. rng: rng@33000 {
  62. compatible = "brcm,bcm-nsp-rng";
  63. reg = <0x33000 0x14>;
  64. @@ -528,13 +557,8 @@
  65. };
  66. };
  67. - usb3_phy: usb3-phy@104000 {
  68. - compatible = "brcm,ns-bx-usb3-phy";
  69. - reg = <0x104000 0x1000>,
  70. - <0x032000 0x1000>;
  71. - reg-names = "dmp", "ccb-mii";
  72. - #phy-cells = <0>;
  73. - status = "disabled";
  74. + usb3_dmp: syscon@104000 {
  75. + reg = <0x104000 0x1000>;
  76. };
  77. };