Skip to content

Commit 9483617

Browse files
committed
boards: microchip: SAM_D5x_E5x: configure clock source and frequency
Configure CPU clock using FDPLL, sourced from XOSC to achieve 120Mhz. Also configure UART clock to support bootup initialization. Signed-off-by: Sunil Abraham <[email protected]>
1 parent 9356736 commit 9483617

File tree

1 file changed

+76
-1
lines changed

1 file changed

+76
-1
lines changed

boards/microchip/sam/sam_e54_xpro/sam_e54_xpro.dts

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,82 @@
4040
};
4141

4242
&cpu0 {
43-
clock-frequency = <48000000>;
43+
clock-frequency = <120000000>;
44+
};
45+
46+
&clock {
47+
compatible = "microchip,sam-d5x-e5x-clock";
48+
49+
xosc: xosc {
50+
compatible = "microchip,sam-d5x-e5x-xosc";
51+
xosc1 {
52+
subsystem = <CLOCK_MCHP_XOSC_ID_XOSC1>;
53+
xosc-frequency = <12000000>;
54+
xosc-en = <1>;
55+
xosc-xtal-en = <1>;
56+
xosc-run-in-standby-en = <1>;
57+
};
58+
};
59+
60+
dfll: dfll {
61+
compatible = "microchip,sam-d5x-e5x-dfll";
62+
dfll-en = <0>;
63+
};
64+
65+
fdpll: fdpll {
66+
compatible = "microchip,sam-d5x-e5x-fdpll";
67+
fdpll0 {
68+
subsystem = <CLOCK_MCHP_FDPLL_ID_FDPLL0>;
69+
fdpll-divider-ratio-int = <19>;
70+
fdpll-lock-bypass-en = <1>;
71+
fdpll-wakeup-fast-en = <1>;
72+
fdpll-src = "xosc1";
73+
fdpll-en = <1>;
74+
};
75+
};
76+
77+
xosc32k: xosc32k {
78+
compatible = "microchip,sam-d5x-e5x-xosc32k";
79+
xosc32k-xtal-en = <1>;
80+
xosc32k-startup-time = <62>;
81+
xosc32k-gain-mode = "standard";
82+
xosc32k-en = <1>;
83+
xosc32k-32khz-en = <1>;
84+
xosc32k-1khz-en = <1>;
85+
};
86+
87+
gclkgen: gclkgen {
88+
compatible = "microchip,sam-d5x-e5x-gclkgen";
89+
90+
gclkgen0 {
91+
subsystem = <CLOCK_MCHP_GCLKGEN_ID_GEN0>;
92+
gclkgen-div-factor = <1>;
93+
gclkgen-run-in-standby-en = <1>;
94+
gclkgen-src = "fdpll0";
95+
gclkgen-en = <1>;
96+
};
97+
};
98+
99+
gclkperiph: gclkperiph {
100+
compatible = "microchip,sam-d5x-e5x-gclkperiph";
101+
#clock-cells = <1>;
102+
103+
sercom2 {
104+
subsystem = <CLOCK_MCHP_GCLKPERIPH_ID_SERCOM2_CORE>;
105+
gclkperiph-src = "gclk0";
106+
gclkperiph-en = <1>;
107+
};
108+
};
109+
110+
mclkperiph: mclkperiph {
111+
compatible = "microchip,sam-d5x-e5x-mclkperiph";
112+
#clock-cells = <1>;
113+
114+
sercom2 {
115+
subsystem = <CLOCK_MCHP_MCLKPERIPH_ID_APBB_SERCOM2>;
116+
mclk-en = <1>;
117+
};
118+
};
44119
};
45120

46121
&sercom2 {

0 commit comments

Comments
 (0)