blob: edf2ca6a38ae6f18798a5d2c681c401699614a63 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 3c321ba794ca6383a4aa68ea803e18cc6ad44412 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3Date: Fri, 19 Feb 2021 06:50:26 +0100
4Subject: [PATCH] arm64: dts: broadcom: bcm4908: describe USB PHY
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9BCM4908 uses slightly modified STB family USB PHY. It handles OHCI/EHCI
10and XHCI. It requires powering up using the PMB.
11
12Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
13Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
14---
15 .../bcm4908/bcm4906-netgear-r8000p.dts | 17 +++++++++++++
16 .../bcm4908/bcm4908-asus-gt-ac5300.dts | 17 +++++++++++++
17 .../boot/dts/broadcom/bcm4908/bcm4908.dtsi | 25 ++++++++++++++++---
18 3 files changed, 55 insertions(+), 4 deletions(-)
19
20--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
21+++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
22@@ -26,6 +26,23 @@
23 };
24 };
25
26+&usb_phy {
27+ brcm,ioc = <1>;
28+ status = "okay";
29+};
30+
31+&ehci {
32+ status = "okay";
33+};
34+
35+&ohci {
36+ status = "okay";
37+};
38+
39+&xhci {
40+ status = "okay";
41+};
42+
43 &nandcs {
44 nand-ecc-strength = <4>;
45 nand-ecc-step-size = <512>;
46--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
47+++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
48@@ -44,6 +44,23 @@
49 };
50 };
51
52+&usb_phy {
53+ brcm,ioc = <1>;
54+ status = "okay";
55+};
56+
57+&ehci {
58+ status = "okay";
59+};
60+
61+&ohci {
62+ status = "okay";
63+};
64+
65+&xhci {
66+ status = "okay";
67+};
68+
69 &ports {
70 port@0 {
71 label = "lan2";
72--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
73+++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
74@@ -2,6 +2,8 @@
75
76 #include <dt-bindings/interrupt-controller/irq.h>
77 #include <dt-bindings/interrupt-controller/arm-gic.h>
78+#include <dt-bindings/phy/phy.h>
79+#include <dt-bindings/soc/bcm-pmb.h>
80
81 /dts-v1/;
82
83@@ -110,24 +112,39 @@
84 #size-cells = <1>;
85 ranges = <0x00 0x00 0x80000000 0x281000>;
86
87- usb@c300 {
88+ usb_phy: usb-phy@c200 {
89+ compatible = "brcm,bcm4908-usb-phy";
90+ reg = <0xc200 0x100>;
91+ reg-names = "ctrl";
92+ power-domains = <&pmb BCM_PMB_HOST_USB>;
93+ dr_mode = "host";
94+ brcm,has-xhci;
95+ brcm,has-eohci;
96+ #phy-cells = <1>;
97+ status = "disabled";
98+ };
99+
100+ ehci: usb@c300 {
101 compatible = "generic-ehci";
102 reg = <0xc300 0x100>;
103 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
104+ phys = <&usb_phy PHY_TYPE_USB2>;
105 status = "disabled";
106 };
107
108- usb@c400 {
109+ ohci: usb@c400 {
110 compatible = "generic-ohci";
111 reg = <0xc400 0x100>;
112 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
113+ phys = <&usb_phy PHY_TYPE_USB2>;
114 status = "disabled";
115 };
116
117- usb@d000 {
118+ xhci: usb@d000 {
119 compatible = "generic-xhci";
120 reg = <0xd000 0x8c8>;
121 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
122+ phys = <&usb_phy PHY_TYPE_USB3>;
123 status = "disabled";
124 };
125
126@@ -222,7 +239,7 @@
127 #address-cells = <1>;
128 #size-cells = <1>;
129
130- power-controller@2800c0 {
131+ pmb: power-controller@2800c0 {
132 compatible = "brcm,bcm4908-pmb";
133 reg = <0x2800c0 0x40>;
134 #power-domain-cells = <1>;