Skip to content

Commit 9e01073

Browse files
committed
ARM: dts: rockchip: add rk3036 usb2phy nodes and enable them on kylin
The rk3036 does contain a usb2phy, just until now it was just used implicitly without additional configuration. As we now have the bits in place for it getting actually controlled, add the necessary phy-node to the GRF simple-mfd. Enable the phy-ports in the same patch to not create bisectability issues, as hooking up the phys to the usb controllers would create probe deferrals until a board enables them. Doing everything in one patch, solves that issue. Only rk3036-kylin actually enabled the usb controllers, so is the only board affected. Signed-off-by: Heiko Stuebner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c208997 commit 9e01073

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

arch/arm/boot/dts/rockchip/rk3036-kylin.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,18 @@
388388
status = "okay";
389389
};
390390

391+
&usb2phy {
392+
status = "okay";
393+
};
394+
395+
&usb2phy_host {
396+
status = "okay";
397+
};
398+
399+
&usb2phy_otg {
400+
status = "okay";
401+
};
402+
391403
&vop {
392404
status = "okay";
393405
};

arch/arm/boot/dts/rockchip/rk3036.dtsi

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@
213213
g-np-tx-fifo-size = <16>;
214214
g-rx-fifo-size = <275>;
215215
g-tx-fifo-size = <256 128 128 64 64 32>;
216+
phys = <&usb2phy_otg>;
217+
phy-names = "usb2-phy";
216218
status = "disabled";
217219
};
218220

@@ -224,6 +226,8 @@
224226
clocks = <&cru HCLK_OTG1>;
225227
clock-names = "otg";
226228
dr_mode = "host";
229+
phys = <&usb2phy_host>;
230+
phy-names = "usb2-phy";
227231
status = "disabled";
228232
};
229233

@@ -342,6 +346,37 @@
342346
grf: syscon@20008000 {
343347
compatible = "rockchip,rk3036-grf", "syscon", "simple-mfd";
344348
reg = <0x20008000 0x1000>;
349+
#address-cells = <1>;
350+
#size-cells = <1>;
351+
352+
usb2phy: usb2phy@17c {
353+
compatible = "rockchip,rk3036-usb2phy";
354+
reg = <0x017c 0x20>;
355+
clocks = <&cru SCLK_OTGPHY0>;
356+
clock-names = "phyclk";
357+
clock-output-names = "usb480m_phy";
358+
assigned-clocks = <&cru SCLK_USB480M>;
359+
assigned-clock-parents = <&usb2phy>;
360+
#clock-cells = <0>;
361+
status = "disabled";
362+
363+
usb2phy_host: host-port {
364+
interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
365+
interrupt-names = "linestate";
366+
#phy-cells = <0>;
367+
status = "disabled";
368+
};
369+
370+
usb2phy_otg: otg-port {
371+
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
372+
<GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
373+
<GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
374+
interrupt-names = "otg-bvalid", "otg-id",
375+
"linestate";
376+
#phy-cells = <0>;
377+
status = "disabled";
378+
};
379+
};
345380

346381
power: power-controller {
347382
compatible = "rockchip,rk3036-power-controller";

0 commit comments

Comments
 (0)