Skip to content

Commit b55a618

Browse files
laneb-infineonfabiobaltieri
authored andcommitted
soc: infineon: psoc4100smax: Setup IMO for 48MHz
Correct a clock initialization ordering issue where IMO, an internal high speed oscillator, was being setup before ILO. This does not match the MTB initialization order and would cause the part to fault. Sets up the default clock configuration on the part to be 48MHz. Adjusts the default WCO (low speed external crystal source) to be 32768 as the eval board has this crystal on it. Enables common clock elements (hf_clk, clock_pump) as needed in the part dts rather than the board. Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
1 parent d24450b commit b55a618

2 files changed

Lines changed: 11 additions & 32 deletions

File tree

boards/infineon/cy8ckit_041s_max/cy8ckit_041s_max_common.dtsi

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,6 @@ uart2: &scb2 {
4242
clock-div = <11500>;
4343
};
4444

45-
/*
46-
* Note : use IFX_PATH_PSOC4_IMO for internal main oscillator as src
47-
* use IFX_PATH_PSOC4_EXT for External clock as src
48-
*/
49-
&clk_hf {
50-
status = "okay";
51-
source-path = <IFX_PATH_PSOC4_IMO>;
52-
};
53-
54-
/*
55-
* Note : use IFX_PATH_PSOC4_PUMP_GND for No clock, connect to gnd
56-
* use IFX_PATH_PSOC4_PUMP_IMO for main IMO pump output
57-
* use IFX_PATH_PSOC4_PUMP_HFCLK for clk_hf pump
58-
*
59-
* usage : The pump clock can be used for the analog pump
60-
*/
61-
&clk_pump {
62-
status = "okay";
63-
source-path = <IFX_PATH_PSOC4_PUMP_GND>;
64-
};
65-
6645
&gpio_prt7 {
6746
status = "okay";
6847
};

dts/arm/infineon/psoc4/psoc4100smax/system_clocks.dtsi

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515

1616
/ {
1717
clocks {
18-
/* Internal main oscillator (IMO) */
19-
clk_imo: clk-imo {
18+
/* Internal low-speed oscillator (ILO) */
19+
clk_ilo: clk-ilo {
2020
#clock-cells = <0>;
2121
compatible = "infineon,fixed-clock";
22-
clock-frequency = <DT_FREQ_M(24)>;
23-
system-clock = <IFX_IMO>;
22+
clock-frequency = <DT_FREQ_K(40)>;
23+
system-clock = <IFX_ILO>;
2424
status = "okay";
2525
};
2626

27-
/* Internal low-speed oscillator (ILO) */
28-
clk_ilo: clk-ilo {
27+
/* Internal main oscillator (IMO) */
28+
clk_imo: clk-imo {
2929
#clock-cells = <0>;
3030
compatible = "infineon,fixed-clock";
31-
clock-frequency = <DT_FREQ_K(40)>;
32-
system-clock = <IFX_ILO>;
31+
clock-frequency = <DT_FREQ_M(48)>;
32+
system-clock = <IFX_IMO>;
3333
status = "okay";
3434
};
3535

@@ -46,8 +46,8 @@
4646
clk_wco: clk-wco {
4747
#clock-cells = <0>;
4848
compatible = "infineon,fixed-clock";
49-
clock-frequency = <0>;
5049
system-clock = <IFX_WCO>;
50+
clock-frequency = <32768>;
5151
status = "okay";
5252
};
5353

@@ -58,7 +58,7 @@
5858
source-path = <IFX_PATH_PSOC4_IMO>;
5959
system-clock = <IFX_HF>;
6060
instance = <0>;
61-
status = "disabled";
61+
status = "okay";
6262
};
6363

6464
clk_pump: clk-pump {
@@ -67,7 +67,7 @@
6767
system-clock = <IFX_PUMP>;
6868
source-path = <IFX_PATH_PSOC4_PUMP_GND>;
6969
instance = <0>;
70-
status = "disabled";
70+
status = "okay";
7171
};
7272
};
7373

0 commit comments

Comments
 (0)