Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: NSP: Move USB3 PHY to internal MDIO bus

This patch largely replicates Vivek Unune's patch "ARM: dts:
BCM5301X:Make usb3 phy use mdio phy driver"[1] for the NSP platform,
whereby we need to create an mdio-mux to facilitate switches
configured via external MDIO, in this case on the Meraki MX65.

However in doing so, we are creating an overlap with usb3_phy's
ccb-mii range. To resolve this, usb3_phy should be moved to a child
node of the internal MDIO bus. The result is heavily based upon Vivek's
patch. This has also been cross-referenced with Yendapally Reddy's
earlier work which utilised the subsequently dropped brcm,nsp-usb3-phy
driver: "[PATCH v2 4/4] arm: dts: nsp: Add USB nodes to device tree"
[2]. Finally, this change provides conformance to the bcm-ns-usb3-phy
documentation, utilising the required usb3-dmp-syscon property. Note
that support for the deprecated ccb-mii bindings has been dropped as of
"phy: phy-bcm-ns-usb3: drop support for deprecated DT binding"[3].

[1] https://lore.kernel.org/patchwork/patch/933971/
[2] https://www.spinics.net/lists/arm-kernel/msg555132.html
[3] https://lore.kernel.org/linux-devicetree/20201113113423.9466-1-zajec5@gmail.com/

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

authored by

Matthew Hagan and committed by
Florian Fainelli
4bb2642c 26441932

+31 -7
+31 -7
arch/arm/boot/dts/bcm-nsp.dtsi
··· 370 370 #address-cells = <1>; 371 371 }; 372 372 373 + mdio-mux@32000 { 374 + compatible = "mdio-mux-mmioreg"; 375 + reg = <0x32000 0x4>; 376 + mux-mask = <0x200>; 377 + #address-cells = <1>; 378 + #size-cells = <0>; 379 + mdio-parent-bus = <&mdio>; 380 + 381 + mdio_int: mdio@0 { 382 + reg = <0x0>; 383 + #address-cells = <1>; 384 + #size-cells = <0>; 385 + 386 + usb3_phy: usb3-phy@10 { 387 + compatible = "brcm,ns-bx-usb3-phy"; 388 + reg = <0x10>; 389 + usb3-dmp-syscon = <&usb3_dmp>; 390 + #phy-cells = <0>; 391 + status = "disabled"; 392 + }; 393 + }; 394 + 395 + mdio_ext: mdio@200 { 396 + reg = <0x200>; 397 + #address-cells = <1>; 398 + #size-cells = <0>; 399 + }; 400 + }; 401 + 373 402 rng: rng@33000 { 374 403 compatible = "brcm,bcm-nsp-rng"; 375 404 reg = <0x33000 0x14>; ··· 557 528 }; 558 529 }; 559 530 560 - usb3_phy: usb3-phy@104000 { 561 - compatible = "brcm,ns-bx-usb3-phy"; 562 - reg = <0x104000 0x1000>, 563 - <0x032000 0x1000>; 564 - reg-names = "dmp", "ccb-mii"; 565 - #phy-cells = <0>; 566 - status = "disabled"; 531 + usb3_dmp: syscon@104000 { 532 + reg = <0x104000 0x1000>; 567 533 }; 568 534 }; 569 535