Skip to content

Commit 1a4eb37

Browse files
knaerzchemmind
authored andcommitted
ARM: dts: rockchip: add power controller for RK3036
Add the power controller node and the correspondending qos nodes for RK3036. Also add the power-domain property to the nodes that are already present. Note: Since the regiser offsets of the axi interconnect QoS are missing in the TRM (RK3036 TRM V1.0), they have been taken from vendor kernel. Signed-off-by: Alex Bee <knaerzche@gmail.com> Link: https://lore.kernel.org/r/20210527154455.358869-9-knaerzche@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de>
1 parent 3fedcc6 commit 1a4eb37

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

arch/arm/boot/dts/rk3036.dtsi

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <dt-bindings/pinctrl/rockchip.h>
77
#include <dt-bindings/clock/rk3036-cru.h>
88
#include <dt-bindings/soc/rockchip,boot-mode.h>
9+
#include <dt-bindings/power/rk3036-power.h>
910

1011
/ {
1112
#address-cells = <1>;
@@ -111,6 +112,7 @@
111112
assigned-clock-rates = <100000000>;
112113
clocks = <&cru SCLK_GPU>, <&cru SCLK_GPU>;
113114
clock-names = "bus", "core";
115+
power-domains = <&power RK3036_PD_GPU>;
114116
resets = <&cru SRST_GPU>;
115117
status = "disabled";
116118
};
@@ -124,6 +126,7 @@
124126
resets = <&cru SRST_LCDC1_A>, <&cru SRST_LCDC1_H>, <&cru SRST_LCDC1_D>;
125127
reset-names = "axi", "ahb", "dclk";
126128
iommus = <&vop_mmu>;
129+
power-domains = <&power RK3036_PD_VIO>;
127130
status = "disabled";
128131

129132
vop_out: port {
@@ -142,10 +145,26 @@
142145
interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
143146
clocks = <&cru ACLK_LCDC>, <&cru HCLK_LCDC>;
144147
clock-names = "aclk", "iface";
148+
power-domains = <&power RK3036_PD_VIO>;
145149
#iommu-cells = <0>;
146150
status = "disabled";
147151
};
148152

153+
qos_gpu: qos@1012d000 {
154+
compatible = "rockchip,rk3036-qos", "syscon";
155+
reg = <0x1012d000 0x20>;
156+
};
157+
158+
qos_vpu: qos@1012e000 {
159+
compatible = "rockchip,rk3036-qos", "syscon";
160+
reg = <0x1012e000 0x20>;
161+
};
162+
163+
qos_vio: qos@1012f000 {
164+
compatible = "rockchip,rk3036-qos", "syscon";
165+
reg = <0x1012f000 0x20>;
166+
};
167+
149168
gic: interrupt-controller@10139000 {
150169
compatible = "arm,gic-400";
151170
interrupt-controller;
@@ -301,6 +320,37 @@
301320
compatible = "rockchip,rk3036-grf", "syscon", "simple-mfd";
302321
reg = <0x20008000 0x1000>;
303322

323+
power: power-controller {
324+
compatible = "rockchip,rk3036-power-controller";
325+
#power-domain-cells = <1>;
326+
#address-cells = <1>;
327+
#size-cells = <0>;
328+
329+
power-domain@RK3036_PD_VIO {
330+
reg = <RK3036_PD_VIO>;
331+
clocks = <&cru ACLK_LCDC>,
332+
<&cru HCLK_LCDC>,
333+
<&cru SCLK_LCDC>;
334+
pm_qos = <&qos_vio>;
335+
#power-domain-cells = <0>;
336+
};
337+
338+
power-domain@RK3036_PD_VPU {
339+
reg = <RK3036_PD_VPU>;
340+
clocks = <&cru ACLK_VCODEC>,
341+
<&cru HCLK_VCODEC>;
342+
pm_qos = <&qos_vpu>;
343+
#power-domain-cells = <0>;
344+
};
345+
346+
power-domain@RK3036_PD_GPU {
347+
reg = <RK3036_PD_GPU>;
348+
clocks = <&cru SCLK_GPU>;
349+
pm_qos = <&qos_gpu>;
350+
#power-domain-cells = <0>;
351+
};
352+
};
353+
304354
reboot-mode {
305355
compatible = "syscon-reboot-mode";
306356
offset = <0x1d8>;

0 commit comments

Comments
 (0)