Skip to content

Commit fe3c0ec

Browse files
aaronyegxnashif
authored andcommitted
boards: ambiq: enable the ITM in Ambiq boards
This commit defines the default pinctrl of ITM for Apollo3 and Apollo4 EVB. Also configures the default SWO frequency. Signed-off-by: Aaron Ye <[email protected]>
1 parent 390f832 commit fe3c0ec

File tree

12 files changed

+81
-0
lines changed

12 files changed

+81
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (c) 2024 Ambiq Micro Inc. <www.ambiq.com>
4+
5+
if BOARD_APOLLO3_EVB
6+
7+
config LOG_BACKEND_SWO_FREQ_HZ
8+
default 1000000
9+
depends on LOG_BACKEND_SWO
10+
11+
endif # BOARD_APOLLO3_EVB

boards/ambiq/apollo3_evb/apollo3_evb-pinctrl.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
input-enable;
1818
};
1919
};
20+
itm_default: itm_default {
21+
group1 {
22+
pinmux = <SWO_P41>;
23+
};
24+
};
2025
i2c0_default: i2c0_default {
2126
group1 {
2227
pinmux = <M0SCL_P5>, <M0SDAWIR3_P6>;

boards/ambiq/apollo3_evb/apollo3_evb.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@
9898
status = "okay";
9999
};
100100

101+
&itm {
102+
pinctrl-0 = <&itm_default>;
103+
pinctrl-names = "default";
104+
status = "okay";
105+
};
106+
101107
&wdt0 {
102108
status = "okay";
103109
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (c) 2024 Ambiq Micro Inc. <www.ambiq.com>
4+
5+
if BOARD_APOLLO3P_EVB
6+
7+
config LOG_BACKEND_SWO_FREQ_HZ
8+
default 1000000
9+
depends on LOG_BACKEND_SWO
10+
11+
endif # BOARD_APOLLO3P_EVB

boards/ambiq/apollo3p_evb/apollo3p_evb-pinctrl.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
input-enable;
1818
};
1919
};
20+
itm_default: itm_default {
21+
group1 {
22+
pinmux = <SWO_P41>;
23+
};
24+
};
2025
i2c0_default: i2c0_default {
2126
group1 {
2227
pinmux = <M0SCL_P5>, <M0SDAWIR3_P6>;

boards/ambiq/apollo3p_evb/apollo3p_evb.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@
9898
status = "okay";
9999
};
100100

101+
&itm {
102+
pinctrl-0 = <&itm_default>;
103+
pinctrl-names = "default";
104+
status = "okay";
105+
};
106+
101107
&wdt0 {
102108
status = "okay";
103109
};

boards/ambiq/apollo4p_blue_kxr_evb/Kconfig.defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
if BOARD_APOLLO4P_BLUE_KXR_EVB
66

7+
config LOG_BACKEND_SWO_FREQ_HZ
8+
default 1000000
9+
depends on LOG_BACKEND_SWO
10+
711
if BT
812

913
config MAIN_STACK_SIZE

boards/ambiq/apollo4p_blue_kxr_evb/apollo4p_blue_kxr_evb-pinctrl.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
input-enable;
1717
};
1818
};
19+
itm_default: itm_default {
20+
group1 {
21+
pinmux = <SWO_P28>;
22+
};
23+
};
1924
i2c0_default: i2c0_default {
2025
group1 {
2126
pinmux = <M0SCL_P5>, <M0SDAWIR3_P6>;

boards/ambiq/apollo4p_blue_kxr_evb/apollo4p_blue_kxr_evb.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@
6969
status = "okay";
7070
};
7171

72+
&itm {
73+
pinctrl-0 = <&itm_default>;
74+
pinctrl-names = "default";
75+
status = "okay";
76+
};
77+
7278
&counter0 {
7379
status = "okay";
7480
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (c) 2024 Ambiq Micro Inc. <www.ambiq.com>
4+
5+
if BOARD_APOLLO4P_EVB
6+
7+
config LOG_BACKEND_SWO_FREQ_HZ
8+
default 1000000
9+
depends on LOG_BACKEND_SWO
10+
11+
endif # BOARD_APOLLO4P_EVB

0 commit comments

Comments
 (0)