From 30e1533ad9cc21cd21c748f5e6178e27ea883977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Thu, 8 Dec 2022 17:19:42 +0100 Subject: [PATCH] [core] Rename BK7231T family to BK7231U --- arduino/libretuya/core/ChipType.h | 4 +-- .../cores/arduino/LibreTuyaAPI.cpp | 2 +- boards/_base/beken-7231n-tuya.json | 21 +----------- boards/_base/beken-7231n.json | 18 +++++++++- boards/_base/beken-7231t-tuya.json | 21 +----------- boards/_base/beken-7231t.json | 17 ---------- boards/_base/beken-7231u.json | 33 +++++++++++++++++++ boards/_base/beken-72xx.json | 8 +++-- boards/generic-bk7231t-qfn32-tuya.json | 2 +- boards/wb2l.json | 2 +- boards/wb2s.json | 2 +- boards/wb3l.json | 2 +- boards/wb3s.json | 2 +- docs/status/supported_boards.md | 10 +++--- docs/status/supported_families.md | 22 ++++++------- families.json | 10 +++--- .../config/sys_config.h | 0 17 files changed, 86 insertions(+), 90 deletions(-) delete mode 100644 boards/_base/beken-7231t.json create mode 100644 boards/_base/beken-7231u.json rename platform/{beken-7231t => beken-7231u}/config/sys_config.h (100%) diff --git a/arduino/libretuya/core/ChipType.h b/arduino/libretuya/core/ChipType.h index 7d27df2..72b09cf 100644 --- a/arduino/libretuya/core/ChipType.h +++ b/arduino/libretuya/core/ChipType.h @@ -11,7 +11,7 @@ enum ChipFamily { F_RTL8710B = 0x22E0D6FC, // Realtek AmebaZ (realtek-ambz) F_RTL8720C = 0xE08F7564, // Realtek AmebaZ2 F_RTL8720D = 0x3379CFE2, // Realtek AmebaD - F_BK7231T = 0x675A40B0, // Beken 7231T + F_BK7231U = 0x675A40B0, // Beken 7231U/7231T F_BK7231N = 0x7B3EF230, // Beken 7231N F_BL602 = 0xDE1270B7, // Boufallo 602 F_XR809 = 0x51E903A8, // Xradiotech 809 @@ -29,6 +29,6 @@ enum ChipType { RTL8711BN = CHIP_TYPE(F_RTL8710B, 0xFD), // CHIPID_8711BN / QFN48 RTL8711BU = CHIP_TYPE(F_RTL8710B, 0xFC), // CHIPID_8711BG / QFN68 // Beken 72XX - BK7231T = CHIP_TYPE(F_BK7231T, 0x1A), // *SCTRL_CHIP_ID = 0x7231a + BK7231T = CHIP_TYPE(F_BK7231U, 0x1A), // *SCTRL_CHIP_ID = 0x7231a BK7231N = CHIP_TYPE(F_BK7231N, 0x1C), // *SCTRL_CHIP_ID = 0x7231c }; diff --git a/arduino/realtek-ambz/cores/arduino/LibreTuyaAPI.cpp b/arduino/realtek-ambz/cores/arduino/LibreTuyaAPI.cpp index fc5d054..77e2c12 100644 --- a/arduino/realtek-ambz/cores/arduino/LibreTuyaAPI.cpp +++ b/arduino/realtek-ambz/cores/arduino/LibreTuyaAPI.cpp @@ -39,7 +39,7 @@ void LibreTuya::gpioRecover() { ChipType LibreTuya::getChipType() { uint8_t chipId; EFUSE_OneByteReadROM(9902, 0xF8, &chipId, L25EOUTVOLTAGE); - return CHIP_TYPE_ENUM(F_RTL8710B, chipId); + return CHIP_TYPE_ENUM(FAMILY, chipId); } const char *LibreTuya::getChipModel() { diff --git a/boards/_base/beken-7231n-tuya.json b/boards/_base/beken-7231n-tuya.json index 254b479..733fe04 100644 --- a/boards/_base/beken-7231n-tuya.json +++ b/boards/_base/beken-7231n-tuya.json @@ -1,25 +1,6 @@ { "build": { "bkcrypt_coeffs": "510fb093a3cbeadc5993a17ec7adeb03", - "bkboot_version": "1.0.1-bk7231n", - "bkrbl_size_app": "0x107800" - }, - "flash": { - "bootloader": "0x000000+0x11000", - "app": "0x011000+0x119000", - "download": "0x12A000+0xA6000", - "calibration": "0x1D0000+0x1000", - "net": "0x1D1000+0x1000", - "tlv": "0x1D2000+0x1000", - "kvs": "0x1D3000+0x8000", - "userdata": "0x1DB000+0x25000" - }, - "upload": { - "maximum_size": 1083136 - }, - "doc": { - "extra": [ - "Bootloader and app partitions contain CRC16 sums every 32 bytes. That results in the actual flash offsets/sizes not aligned to sector boundaries. To simplify calculations, the values shown in the table (extracted from bootloader's partition table) were aligned to 4096 bytes." - ] + "bkboot_version": "1.0.1-bk7231n" } } diff --git a/boards/_base/beken-7231n.json b/boards/_base/beken-7231n.json index 1ecd45f..dd707a9 100644 --- a/boards/_base/beken-7231n.json +++ b/boards/_base/beken-7231n.json @@ -2,11 +2,27 @@ "build": { "family": "BK7231N", "ldscript_sdk": "bk7231n_bsp.ld", - "ldscript_arduino": "bk7231n_bsp.ld" + "ldscript_arduino": "bk7231n_bsp.ld", + "bkboot_version": "1.0.1-bk7231n", + "bkrbl_size_app": "0x107800" + }, + "flash": { + "bootloader": "0x000000+0x11000", + "app": "0x011000+0x119000", + "download": "0x12A000+0xA6000", + "calibration": "0x1D0000+0x1000", + "net": "0x1D1000+0x1000", + "tlv": "0x1D2000+0x1000", + "kvs": "0x1D3000+0x8000", + "userdata": "0x1DB000+0x25000" }, "upload": { + "maximum_size": 1083136, "speed": 460800 }, + "connectivity": [ + "ble" + ], "doc": { "params": { "extra": { diff --git a/boards/_base/beken-7231t-tuya.json b/boards/_base/beken-7231t-tuya.json index 74ae877..5a36572 100644 --- a/boards/_base/beken-7231t-tuya.json +++ b/boards/_base/beken-7231t-tuya.json @@ -1,25 +1,6 @@ { "build": { "bkcrypt_coeffs": "510fb093a3cbeadc5993a17ec7adeb03", - "bkboot_version": "1.0.5-bk7231s", - "bkrbl_size_app": "0x107800" - }, - "flash": { - "bootloader": "0x000000+0x11000", - "app": "0x011000+0x121000", - "download": "0x132000+0xA6000", - "kvs": "0x1D8000+0x8000", - "calibration": "0x1E0000+0x1000", - "tlv": "0x1E1000+0x1000", - "net": "0x1E2000+0x1000", - "userdata": "0x1E3000+0x1D000" - }, - "upload": { - "maximum_size": 1083136 - }, - "doc": { - "extra": [ - "Bootloader and app partitions contain CRC16 sums every 32 bytes. That results in the actual flash offsets/sizes not aligned to sector boundaries. To simplify calculations, the values shown in the table (extracted from bootloader's partition table) were aligned to 4096 bytes." - ] + "bkboot_version": "1.0.5-bk7231s" } } diff --git a/boards/_base/beken-7231t.json b/boards/_base/beken-7231t.json deleted file mode 100644 index a399230..0000000 --- a/boards/_base/beken-7231t.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "build": { - "family": "BK7231T", - "ldscript_sdk": "bk7231_bsp.ld", - "ldscript_arduino": "bk7231_bsp.ld" - }, - "upload": { - "speed": 921600 - }, - "doc": { - "params": { - "extra": { - "Bluetooth": "BLE v4.2" - } - } - } -} diff --git a/boards/_base/beken-7231u.json b/boards/_base/beken-7231u.json new file mode 100644 index 0000000..7199113 --- /dev/null +++ b/boards/_base/beken-7231u.json @@ -0,0 +1,33 @@ +{ + "build": { + "family": "BK7231U", + "ldscript_sdk": "bk7231_bsp.ld", + "ldscript_arduino": "bk7231_bsp.ld", + "bkboot_version": "1.0.8-bk7231u", + "bkrbl_size_app": "0x108700" + }, + "flash": { + "bootloader": "0x000000+0x11000", + "app": "0x011000+0x121000", + "download": "0x132000+0xA6000", + "kvs": "0x1D8000+0x8000", + "calibration": "0x1E0000+0x1000", + "tlv": "0x1E1000+0x1000", + "net": "0x1E2000+0x1000", + "userdata": "0x1E3000+0x1D000" + }, + "upload": { + "maximum_size": 1083136, + "speed": 921600 + }, + "connectivity": [ + "ble" + ], + "doc": { + "params": { + "extra": { + "Bluetooth": "BLE v4.2" + } + } + } +} diff --git a/boards/_base/beken-72xx.json b/boards/_base/beken-72xx.json index 23ad273..d132845 100644 --- a/boards/_base/beken-72xx.json +++ b/boards/_base/beken-72xx.json @@ -10,8 +10,7 @@ } }, "connectivity": [ - "wifi", - "ble" + "wifi" ], "debug": { "protocol": "openocd", @@ -49,6 +48,9 @@ "General info": "../../docs/platform/beken-72xx/README.md", "Flashing guide": "../../docs/platform/beken-72xx/flashing.md", "BkWriter v1.6.0": "https://images.tuyacn.com/smart/bk_writer1.60/bk_writer1.60.exe" - } + }, + "extra": [ + "Bootloader and app partitions contain CRC16 sums every 32 bytes. That results in the actual flash offsets/sizes not aligned to sector boundaries. To simplify calculations, the values shown in the table (extracted from bootloader's partition table) were aligned to 4096 bytes." + ] } } diff --git a/boards/generic-bk7231t-qfn32-tuya.json b/boards/generic-bk7231t-qfn32-tuya.json index 2c41dcf..d558a7e 100644 --- a/boards/generic-bk7231t-qfn32-tuya.json +++ b/boards/generic-bk7231t-qfn32-tuya.json @@ -2,7 +2,7 @@ "_base": [ "generic", "beken-72xx", - "beken-7231t", + "beken-7231u", "beken-7231t-tuya", "pcb/ic-bk7231-qfn32" ], diff --git a/boards/wb2l.json b/boards/wb2l.json index 99b5f51..896a1a3 100644 --- a/boards/wb2l.json +++ b/boards/wb2l.json @@ -1,7 +1,7 @@ { "_base": [ "beken-72xx", - "beken-7231t", + "beken-7231u", "beken-7231t-tuya", "pcb/ic-bk7231-qfn32", "pcb/wb2l", diff --git a/boards/wb2s.json b/boards/wb2s.json index 1acd3ad..7b553be 100644 --- a/boards/wb2s.json +++ b/boards/wb2s.json @@ -1,7 +1,7 @@ { "_base": [ "beken-72xx", - "beken-7231t", + "beken-7231u", "beken-7231t-tuya", "pcb/ic-bk7231-qfn32", "pcb/wb2s", diff --git a/boards/wb3l.json b/boards/wb3l.json index 1fe026d..463cad1 100644 --- a/boards/wb3l.json +++ b/boards/wb3l.json @@ -1,7 +1,7 @@ { "_base": [ "beken-72xx", - "beken-7231t", + "beken-7231u", "beken-7231t-tuya", "pcb/ic-bk7231-qfn32", "pcb/wb3l" diff --git a/boards/wb3s.json b/boards/wb3s.json index 70a1a13..54804d3 100644 --- a/boards/wb3s.json +++ b/boards/wb3s.json @@ -1,7 +1,7 @@ { "_base": [ "beken-72xx", - "beken-7231t", + "beken-7231u", "beken-7231t-tuya", "pcb/ic-bk7231-qfn32", "pcb/wb3s" diff --git a/docs/status/supported_boards.md b/docs/status/supported_boards.md index fbfcbab..653b185 100644 --- a/docs/status/supported_boards.md +++ b/docs/status/supported_boards.md @@ -4,7 +4,7 @@ Name | MCU --------------------------------------------------------------------------|-----------|-------|---------|-------------|-------|-----|--------|---------------- **Generic** | | | | | | | | [BK7231N (Tuya QFN32)](../../boards/generic-bk7231n-qfn32-tuya/README.md) | BK7231N | 2 MiB | 256 KiB | 19 (19 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n` -[BK7231T (Tuya QFN32)](../../boards/generic-bk7231t-qfn32-tuya/README.md) | BK7231T | 2 MiB | 256 KiB | 19 (19 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` +[BK7231T (Tuya QFN32)](../../boards/generic-bk7231t-qfn32-tuya/README.md) | BK7231T | 2 MiB | 256 KiB | 19 (19 I/O) | ✔️ | ✔️ | ❌ | `beken-7231u` [RTL8710BN (2M/468k)](../../boards/generic-rtl8710bn-2mb-468k/README.md) | RTL8710BN | 2 MiB | 256 KiB | 18 (18 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` [RTL8710BN (2M/788k)](../../boards/generic-rtl8710bn-2mb-788k/README.md) | RTL8710BN | 2 MiB | 256 KiB | 18 (18 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` [RTL8710BX (4M/980k)](../../boards/generic-rtl8710bx-4mb-980k/README.md) | RTL8710BX | 4 MiB | 256 KiB | 17 (17 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` @@ -18,10 +18,10 @@ Name | MCU [CB3L](../../boards/cb3l/README.md) | BK7231N | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n` [CB3S](../../boards/cb3s/README.md) | BK7231N | 2 MiB | 256 KiB | 22 (16 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n` [CB3SE](../../boards/cb3se/README.md) | BK7231N | 2 MiB | 256 KiB | 22 (17 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n` -[WB2L](../../boards/wb2l/README.md) | BK7231T | 2 MiB | 256 KiB | 7 (5 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` -[WB2S](../../boards/wb2s/README.md) | BK7231T | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` -[WB3L](../../boards/wb3l/README.md) | BK7231T | 2 MiB | 256 KiB | 21 (17 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` -[WB3S](../../boards/wb3s/README.md) | BK7231T | 2 MiB | 256 KiB | 22 (16 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` +[WB2L](../../boards/wb2l/README.md) | BK7231T | 2 MiB | 256 KiB | 7 (5 I/O) | ✔️ | ✔️ | ❌ | `beken-7231u` +[WB2S](../../boards/wb2s/README.md) | BK7231T | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ✔️ | ❌ | `beken-7231u` +[WB3L](../../boards/wb3l/README.md) | BK7231T | 2 MiB | 256 KiB | 21 (17 I/O) | ✔️ | ✔️ | ❌ | `beken-7231u` +[WB3S](../../boards/wb3s/README.md) | BK7231T | 2 MiB | 256 KiB | 22 (16 I/O) | ✔️ | ✔️ | ❌ | `beken-7231u` [WR2](../../boards/wr2/README.md) | RTL8710BN | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` [WR2E](../../boards/wr2e/README.md) | RTL8710BN | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` [WR3](../../boards/wr3/README.md) | RTL8710BN | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` diff --git a/docs/status/supported_families.md b/docs/status/supported_families.md index 132c737..5f1694f 100644 --- a/docs/status/supported_families.md +++ b/docs/status/supported_families.md @@ -1,13 +1,13 @@ -Title | Name (parent) | Code | Short name & ID | Arduino Core | Source SDK ---------------------------------------------------------------------|---------------------------------|----------------------|-------------------------|--------------|---------------------------------------------------------------------------------- -Realtek Ameba1 | `-` | `-` | `RTL8710A` (0x9FFFD543) | ❌ | - -[Realtek AmebaZ](https://www.amebaiot.com/en/amebaz/) | `realtek-ambz` (`realtek-amb`) | `ambz` (`amb`) | `RTL8710B` (0x22E0D6FC) | ✔️ | `framework-realtek-amb1` ([amb1_sdk](https://github.com/ambiot/amb1_sdk)) -[Realtek AmebaZ2](https://www.amebaiot.com/en/amebaz2/) | `realtek-ambz2` (`realtek-amb`) | `ambz2` (`amb`) | `RTL8720C` (0xE08F7564) | ❌ | `framework-realtek-ambz2` ([ambz2_sdk](https://github.com/ambiot/ambz2_sdk)) -Realtek AmebaD | `-` | `-` | `RTL8720D` (0x3379CFE2) | ❌ | - -[Beken 7231T](http://www.bekencorp.com/en/goods/detail/cid/7.html) | `beken-7231t` (`beken-72xx`) | `bk7231t` (`bk72xx`) | `BK7231T` (0x675A40B0) | ✔️ | `framework-beken-bdk` ([bdk_freertos](https://github.com/bekencorp/bdk_freertos)) -[Beken 7231N](http://www.bekencorp.com/en/goods/detail/cid/39.html) | `beken-7231n` (`beken-72xx`) | `bk7231n` (`bk72xx`) | `BK7231N` (0x7B3EF230) | ✔️ | `framework-beken-bdk` ([bdk_freertos](https://github.com/bekencorp/bdk_freertos)) -Boufallo 602 | `-` | `-` | `BL602` (0xDE1270B7) | ❌ | - -Xradiotech 809 | `-` | `-` | `XR809` (0x51E903A8) | ❌ | - -Native host architecture | `host-native` | `native` | `NATIVE` (0xDEADBEEF) | ❌ | - +Title | Name (parent) | Code | Short name & ID | Arduino Core | Source SDK +--------------------------------------------------------------------------|---------------------------------|----------------------|-------------------------|--------------|---------------------------------------------------------------------------------- +Realtek Ameba1 | `-` | `-` | `RTL8710A` (0x9FFFD543) | ❌ | - +[Realtek AmebaZ](https://www.amebaiot.com/en/amebaz/) | `realtek-ambz` (`realtek-amb`) | `ambz` (`amb`) | `RTL8710B` (0x22E0D6FC) | ✔️ | `framework-realtek-amb1` ([amb1_sdk](https://github.com/ambiot/amb1_sdk)) +[Realtek AmebaZ2](https://www.amebaiot.com/en/amebaz2/) | `realtek-ambz2` (`realtek-amb`) | `ambz2` (`amb`) | `RTL8720C` (0xE08F7564) | ❌ | `framework-realtek-ambz2` ([ambz2_sdk](https://github.com/ambiot/ambz2_sdk)) +Realtek AmebaD | `-` | `-` | `RTL8720D` (0x3379CFE2) | ❌ | - +[Beken 7231U/7231T](http://www.bekencorp.com/en/goods/detail/cid/13.html) | `beken-7231u` (`beken-72xx`) | `bk7231u` (`bk72xx`) | `BK7231U` (0x675A40B0) | ✔️ | `framework-beken-bdk` ([bdk_freertos](https://github.com/bekencorp/bdk_freertos)) +[Beken 7231N](http://www.bekencorp.com/en/goods/detail/cid/39.html) | `beken-7231n` (`beken-72xx`) | `bk7231n` (`bk72xx`) | `BK7231N` (0x7B3EF230) | ✔️ | `framework-beken-bdk` ([bdk_freertos](https://github.com/bekencorp/bdk_freertos)) +Boufallo 602 | `-` | `-` | `BL602` (0xDE1270B7) | ❌ | - +Xradiotech 809 | `-` | `-` | `XR809` (0x51E903A8) | ❌ | - +Native host architecture | `host-native` | `native` | `NATIVE` (0xDEADBEEF) | ❌ | - diff --git a/families.json b/families.json index 55abe5d..fe51427 100644 --- a/families.json +++ b/families.json @@ -42,13 +42,13 @@ }, { "id": "0x675A40B0", - "short_name": "BK7231T", - "description": "Beken 7231T", - "name": "beken-7231t", + "short_name": "BK7231U", + "description": "Beken 7231U/7231T", + "name": "beken-7231u", "parent": "beken-72xx", - "code": "bk7231t", + "code": "bk7231u", "parent_code": "bk72xx", - "url": "http://www.bekencorp.com/en/goods/detail/cid/7.html", + "url": "http://www.bekencorp.com/en/goods/detail/cid/13.html", "sdk": "https://github.com/bekencorp/bdk_freertos", "framework": "framework-beken-bdk", "mcus": [ diff --git a/platform/beken-7231t/config/sys_config.h b/platform/beken-7231u/config/sys_config.h similarity index 100% rename from platform/beken-7231t/config/sys_config.h rename to platform/beken-7231u/config/sys_config.h