Skip to content

Commit 17989d3

Browse files
le-quang168tiennguyenzg
authored andcommitted
dts: renesas: Add Clock Control support for RZ/N2L, T2M
Add Clock Control nodes to Renesas RZ/N2L, T2M devicetree Signed-off-by: Quang Le <[email protected]> Signed-off-by: Tien Nguyen <[email protected]>
1 parent c2f80bb commit 17989d3

File tree

2 files changed

+231
-0
lines changed

2 files changed

+231
-0
lines changed

dts/arm/renesas/rz/rzn/r9a07g084.dtsi

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55

66
#include <mem.h>
77
#include <arm/armv8-r.dtsi>
8+
#include <freq.h>
89
#include <zephyr/dt-bindings/interrupt-controller/arm-gic.h>
910
#include <zephyr/dt-bindings/adc/adc.h>
11+
#include <zephyr/dt-bindings/clock/renesas_rztn_clock.h>
1012

1113
/ {
1214
#address-cells = <1>;
@@ -33,6 +35,12 @@
3335
interrupt-parent = <&gic>;
3436
};
3537

38+
osc: osc {
39+
compatible = "fixed-clock";
40+
clock-frequency = <DT_FREQ_M(25)>;
41+
#clock-cells = <0>;
42+
};
43+
3644
soc {
3745
interrupt-parent = <&gic>;
3846

@@ -89,6 +97,111 @@
8997
};
9098
};
9199

100+
cgc: clock-controller@80280000 {
101+
compatible = "renesas,rz-cgc";
102+
reg = <0x80280000 0x314>, <0x81280000 0x324>;
103+
clocks = <&osc>;
104+
#clock-cells = <1>;
105+
status = "okay";
106+
107+
loco: loco {
108+
compatible = "fixed-clock";
109+
clock-frequency = <DT_FREQ_K(240)>;
110+
#clock-cells = <0>;
111+
status = "okay";
112+
};
113+
114+
pll1: pll1 {
115+
compatible = "renesas,rz-cgc-pll";
116+
state = "initial";
117+
};
118+
119+
iclk: iclk {
120+
compatible = "renesas,rz-cgc-sys-clock";
121+
clock-frequency = <DT_FREQ_M(200)>;
122+
123+
cpu0clk: cpu0clk {
124+
compatible = "renesas,rz-cgc-sys-clock";
125+
mul = <1>;
126+
};
127+
128+
ckio: ckio {
129+
compatible = "renesas,rz-cgc-sys-clock";
130+
div = <4>;
131+
};
132+
};
133+
134+
eth_refclk: eth_refclk {
135+
compatible = "renesas,rz-cgc-subclk";
136+
eth-phy-source = "main";
137+
};
138+
139+
canfdclk: canfdclk {
140+
compatible = "renesas,rz-cgc-subclk";
141+
canfd-source = <1>;
142+
};
143+
144+
xspi_clk0: xspi_clk0 {
145+
compatible = "renesas,rz-cgc-subclk";
146+
xspi-clk-frequency = <12500000>;
147+
};
148+
149+
xspi_clk1: xspi_clk1 {
150+
compatible = "renesas,rz-cgc-subclk";
151+
xspi-clk-frequency = <12500000>;
152+
};
153+
154+
sci0asyncclk: sci0asyncclk {
155+
compatible = "renesas,rz-cgc-subclk";
156+
clock-frequency = <DT_FREQ_M(96)>;
157+
};
158+
159+
sci1asyncclk: sci1asyncclk {
160+
compatible = "renesas,rz-cgc-subclk";
161+
clock-frequency = <DT_FREQ_M(96)>;
162+
};
163+
164+
sci2asyncclk: sci2asyncclk {
165+
compatible = "renesas,rz-cgc-subclk";
166+
clock-frequency = <DT_FREQ_M(96)>;
167+
};
168+
169+
sci3asyncclk: sci3asyncclk {
170+
compatible = "renesas,rz-cgc-subclk";
171+
clock-frequency = <DT_FREQ_M(96)>;
172+
};
173+
174+
sci4asyncclk: sci4asyncclk {
175+
compatible = "renesas,rz-cgc-subclk";
176+
clock-frequency = <DT_FREQ_M(96)>;
177+
};
178+
179+
sci5asyncclk: sci5asyncclk {
180+
compatible = "renesas,rz-cgc-subclk";
181+
clock-frequency = <DT_FREQ_M(96)>;
182+
};
183+
184+
spi0asyncclk: spi0asyncclk {
185+
compatible = "renesas,rz-cgc-subclk";
186+
clock-frequency = <DT_FREQ_M(96)>;
187+
};
188+
189+
spi1asyncclk: spi1asyncclk {
190+
compatible = "renesas,rz-cgc-subclk";
191+
clock-frequency = <DT_FREQ_M(96)>;
192+
};
193+
194+
spi2asyncclk: spi2asyncclk {
195+
compatible = "renesas,rz-cgc-subclk";
196+
clock-frequency = <DT_FREQ_M(96)>;
197+
};
198+
199+
spi3asyncclk: spi3asyncclk {
200+
compatible = "renesas,rz-cgc-subclk";
201+
clock-frequency = <DT_FREQ_M(96)>;
202+
};
203+
};
204+
92205
adc0: adc0@90004000 {
93206
compatible = "renesas,rz-adc";
94207
reg = <0x90004000 0x1000>;

dts/arm/renesas/rz/rzt/r9a07g075.dtsi

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77

88
#include <mem.h>
99
#include <arm/armv8-r.dtsi>
10+
#include <freq.h>
1011
#include <zephyr/dt-bindings/interrupt-controller/arm-gic.h>
1112
#include <zephyr/dt-bindings/adc/adc.h>
13+
#include <zephyr/dt-bindings/clock/renesas_rztn_clock.h>
1214

1315
/ {
1416
compatible = "renesas,r9a07g075";
@@ -41,6 +43,12 @@
4143
interrupt-parent = <&gic>;
4244
};
4345

46+
osc: osc {
47+
compatible = "fixed-clock";
48+
clock-frequency = <DT_FREQ_M(25)>;
49+
#clock-cells = <0>;
50+
};
51+
4452
soc {
4553
interrupt-parent = <&gic>;
4654

@@ -96,6 +104,116 @@
96104
};
97105
};
98106

107+
cgc: clock-controller@80280000 {
108+
compatible = "renesas,rz-cgc";
109+
reg = <0x80280000 0x314>, <0x81280000 0x320>;
110+
clocks = <&osc>;
111+
#clock-cells = <1>;
112+
status = "okay";
113+
114+
loco: loco {
115+
compatible = "fixed-clock";
116+
clock-frequency = <DT_FREQ_K(240)>;
117+
#clock-cells = <0>;
118+
status = "okay";
119+
};
120+
121+
pll1: pll1 {
122+
compatible = "renesas,rz-cgc-pll";
123+
state = "initial";
124+
};
125+
126+
iclk: iclk {
127+
compatible = "renesas,rz-cgc-sys-clock";
128+
clock-frequency = <DT_FREQ_M(200)>;
129+
130+
cpu0clk: cpu0clk {
131+
compatible = "renesas,rz-cgc-sys-clock";
132+
mul = <1>;
133+
};
134+
135+
cpu1clk: cpu1clk {
136+
compatible = "renesas,rz-cgc-sys-clock";
137+
mul = <1>;
138+
};
139+
140+
ckio: ckio {
141+
compatible = "renesas,rz-cgc-sys-clock";
142+
div = <4>;
143+
};
144+
};
145+
146+
eth_refclk: eth_refclk {
147+
compatible = "renesas,rz-cgc-subclk";
148+
eth-phy-source = "pll1";
149+
};
150+
151+
canfdclk: canfdclk {
152+
compatible = "renesas,rz-cgc-subclk";
153+
canfd-source = <1>;
154+
};
155+
156+
xspi_clk0: xspi_clk0 {
157+
compatible = "renesas,rz-cgc-subclk";
158+
xspi-clk-frequency = <12500000>;
159+
};
160+
161+
xspi_clk1: xspi_clk1 {
162+
compatible = "renesas,rz-cgc-subclk";
163+
xspi-clk-frequency = <12500000>;
164+
};
165+
166+
sci0asyncclk: sci0asyncclk {
167+
compatible = "renesas,rz-cgc-subclk";
168+
clock-frequency = <DT_FREQ_M(96)>;
169+
};
170+
171+
sci1asyncclk: sci1asyncclk {
172+
compatible = "renesas,rz-cgc-subclk";
173+
clock-frequency = <DT_FREQ_M(96)>;
174+
};
175+
176+
sci2asyncclk: sci2asyncclk {
177+
compatible = "renesas,rz-cgc-subclk";
178+
clock-frequency = <DT_FREQ_M(96)>;
179+
};
180+
181+
sci3asyncclk: sci3asyncclk {
182+
compatible = "renesas,rz-cgc-subclk";
183+
clock-frequency = <DT_FREQ_M(96)>;
184+
};
185+
186+
sci4asyncclk: sci4asyncclk {
187+
compatible = "renesas,rz-cgc-subclk";
188+
clock-frequency = <DT_FREQ_M(96)>;
189+
};
190+
191+
sci5asyncclk: sci5asyncclk {
192+
compatible = "renesas,rz-cgc-subclk";
193+
clock-frequency = <DT_FREQ_M(96)>;
194+
};
195+
196+
spi0asyncclk: spi0asyncclk {
197+
compatible = "renesas,rz-cgc-subclk";
198+
clock-frequency = <DT_FREQ_M(96)>;
199+
};
200+
201+
spi1asyncclk: spi1asyncclk {
202+
compatible = "renesas,rz-cgc-subclk";
203+
clock-frequency = <DT_FREQ_M(96)>;
204+
};
205+
206+
spi2asyncclk: spi2asyncclk {
207+
compatible = "renesas,rz-cgc-subclk";
208+
clock-frequency = <DT_FREQ_M(96)>;
209+
};
210+
211+
spi3asyncclk: spi3asyncclk {
212+
compatible = "renesas,rz-cgc-subclk";
213+
clock-frequency = <DT_FREQ_M(96)>;
214+
};
215+
};
216+
99217
adc0: adc0@90004000 {
100218
compatible = "renesas,rz-adc";
101219
reg = <0x90004000 0x1000>;

0 commit comments

Comments
 (0)