Skip to content

Commit fd23bb0

Browse files
committed
boards: ai_wb2_12f: update to new bl60x support
Update to new bl60x support and fixup openocd config Signed-off-by: Camille BAUD <mail@massdriver.space>
1 parent 6c165c4 commit fd23bb0

File tree

3 files changed

+32
-20
lines changed

3 files changed

+32
-20
lines changed

boards/aithinker/ai_wb2_12f/ai_wb2_12f.dts

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/dts-v1/;
88

9-
#include <bflb/bl60x.dtsi>
9+
#include <bflb/bl602.dtsi>
1010
#include "ai_wb2_12f-pinctrl.dtsi"
1111

1212
/ {
@@ -15,6 +15,7 @@
1515

1616
chosen {
1717
zephyr,flash = &flash0;
18+
zephyr,code-partition = &main_partition;
1819
zephyr,itcm = &itcm;
1920
zephyr,dtcm = &dtcm;
2021
zephyr,sram = &sram0;
@@ -27,18 +28,30 @@
2728
clock-frequency = <DT_FREQ_M(192)>;
2829
};
2930

30-
&spi1 {
31-
#address-cells = <1>;
32-
#size-cells = <0>;
33-
reg = <0x4000b000 0x1000 0x23000000 0x400000>;
34-
35-
flash0: flash@0 {
36-
compatible = "zb,25vq32", "jedec,spi-nor";
37-
status = "disabled";
38-
size = <DT_SIZE_M(128)>;
39-
jedec-id = [5e 40 16];
40-
reg = <0>;
41-
spi-max-frequency = <DT_FREQ_M(133)>;
31+
&flashctrl {
32+
flash0: flash@23000000 {
33+
compatible = "soc-nv-flash", "zb,25vq32";
34+
reg = <0x23000000 (0x400000 - 0x2000)>;
35+
write-block-size = <256>;
36+
erase-block-size = <DT_SIZE_K(4)>;
37+
/* jedec-id = [5e 40 16]; */
38+
39+
partitions {
40+
compatible = "fixed-partitions";
41+
#address-cells = <1>;
42+
#size-cells = <1>;
43+
44+
main_partition: partition@0 {
45+
label = "code";
46+
reg = <0x00000000 0x00100000>;
47+
read-only;
48+
};
49+
50+
storage_partition: partition@100000 {
51+
label = "storage";
52+
reg = <0x00100000 (0x300000 - 0x2000)>;
53+
};
54+
};
4255
};
4356
};
4457

boards/aithinker/ai_wb2_12f/support/bl60x.cfg

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,22 @@ echo "Ready for Remote Connections"
3838

3939
$_TARGETNAME.0 configure -event reset-assert-pre {
4040
echo "reset-assert-pre"
41-
adapter speed 100
41+
adapter speed 400
4242
}
4343

4444
$_TARGETNAME.0 configure -event reset-deassert-post {
4545
echo "reset-deassert-post"
4646

47-
adapter speed 100
47+
adapter speed 400
4848

49-
reg mstatus 0x7800
50-
reg mie 0x0
51-
# reg pc 0x23000000
49+
reg mstatus 0x80000000
50+
reg pc 0x21000000
5251
}
5352

5453
$_TARGETNAME.0 configure -event reset-init {
5554
echo "reset-init"
5655

57-
adapter speed 3000
56+
adapter speed 400
5857
}
5958

6059
$_TARGETNAME.0 configure -event gdb-attach {

boards/aithinker/ai_wb2_12f/support/openocd.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
interface cmsis-dap
44

5-
adapter speed 1000
5+
adapter speed 400

0 commit comments

Comments
 (0)