Skip to content

Commit 82def86

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 b6b8690 commit 82def86

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
#include <zephyr/dt-bindings/i2c/i2c.h>
1113

1214
/ {
@@ -34,6 +36,12 @@
3436
interrupt-parent = <&gic>;
3537
};
3638

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

@@ -90,6 +98,111 @@
9098
};
9199
};
92100

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

1416
/ {
@@ -42,6 +44,12 @@
4244
interrupt-parent = <&gic>;
4345
};
4446

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

@@ -98,6 +106,116 @@
98106
};
99107
};
100108

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

0 commit comments

Comments
 (0)