File tree 7 files changed +83
-45
lines changed
config/telink/chip-module
7 files changed +83
-45
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ config CHIP_IPV4
180
180
181
181
config CHIP_BUTTON_MANAGER_IRQ_MODE
182
182
bool "Use GPIO in an IRQ mode instead of polling the GPIO"
183
- default PM
183
+ default y if BOARD_TLSR9118BDK40D_V2
184
184
help
185
185
Use GPIO in an IRQ mode to avoid button polling loop and extend the battery lifetime by waking up by GPIO event.
186
186
GPIO events are working only with GPIO IRQ. This option changes button matrix configuration.
Original file line number Diff line number Diff line change @@ -180,7 +180,8 @@ config PWM
180
180
endif
181
181
182
182
# Board non-retention config
183
- if BOARD_TLSR9118BDK40D || BOARD_TLSR9528A || BOARD_TLSR9258A || BOARD_TLSR9518ADK80D
183
+ if BOARD_TLSR9118BDK40D_V1 || BOARD_TLSR9118BDK40D_V2 || \
184
+ BOARD_TLSR9528A || BOARD_TLSR9258A || BOARD_TLSR9518ADK80D
184
185
config PWM
185
186
default y
186
187
endif
@@ -292,7 +293,7 @@ config NET_CONFIG_INIT_TIMEOUT
292
293
293
294
config CHIP_WIFI
294
295
bool "Enable Telink Wi-Fi support"
295
- default y if BOARD_TLSR9118BDK40D
296
+ default y if BOARD_TLSR9118BDK40D_V1 || BOARD_TLSR9118BDK40D_V2
296
297
select WIFI_W91
297
298
select WIFI
298
299
select NET_STATISTICS
Original file line number Diff line number Diff line change 16
16
string (REPLACE "_retention" "" BASE_BOARD ${BOARD} )
17
17
18
18
if (NOT FLASH_SIZE)
19
- if (${BASE_BOARD} MATCHES "tlsr9118bdk40d" )
19
+ if (${BASE_BOARD} MATCHES "tlsr9118bdk40d" OR ${BASE_BOARD} MATCHES "tlsr9118bdk40d_v1"
20
+ OR ${BASE_BOARD} MATCHES "tlsr9118bdk40d_v2" )
20
21
set (FLASH_SIZE "3m" )
21
22
else ()
22
23
set (FLASH_SIZE "2m" )
@@ -96,7 +97,11 @@ endif()
96
97
97
98
set (FLASH_DTC_OVERLAY_FILE "${CHIP_ROOT} /src/platform/telink/${BASE_BOARD} _${FLASH_SIZE} _flash.overlay" )
98
99
if (NOT EXISTS "${FLASH_DTC_OVERLAY_FILE} " )
99
- message (FATAL_ERROR "${FLASH_DTC_OVERLAY_FILE} doesn't exist" )
100
+ if (${BASE_BOARD} MATCHES "tlsr9118bdk40d_v1" OR ${BASE_BOARD} MATCHES "tlsr9118bdk40d_v2" )
101
+ set (FLASH_DTC_OVERLAY_FILE "${CHIP_ROOT} /src/platform/telink/tlsr9118bdk40d_${FLASH_SIZE} _flash.overlay" )
102
+ else ()
103
+ message (FATAL_ERROR "${FLASH_DTC_OVERLAY_FILE} doesn't exist" )
104
+ endif ()
100
105
endif ()
101
106
102
107
if (DTC_OVERLAY_FILE)
Original file line number Diff line number Diff line change @@ -414,7 +414,8 @@ void AppTaskCommon::InitPwms()
414
414
415
415
void AppTaskCommon::LinkPwms (PwmManager & pwmManager)
416
416
{
417
- #if CONFIG_BOARD_TLSR9118BDK40D // TLSR9118BDK40D EVK supports only 1 PWM channel connected to LED
417
+ #if CONFIG_BOARD_TLSR9118BDK40D_V1 || CONFIG_BOARD_TLSR9118BDK40D_v2
418
+ // TLSR9118BDK40D EVK supports only 1 PWM channel connected to LED
418
419
pwmManager.linkPwm (PwmManager::EAppPwm_Red, 0 );
419
420
#elif CONFIG_WS2812_STRIP
420
421
pwmManager.linkPwm (PwmManager::EAppPwm_Red, 0 );
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ tlsr9118bdk40d_v2.overlay
Original file line number Diff line number Diff line change
1
+ / {
2
+ /* Short TL_Key1 (J20 pin 11) to ground (J20 pin 25-35) */
3
+ key_pool {
4
+ compatible = "gpio-keys";
5
+
6
+ inp {
7
+ gpios = <&gpio0 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
8
+ <&gpio0 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
9
+ };
10
+ };
11
+
12
+ key_matrix {
13
+ compatible = "gpio-keys";
14
+
15
+ col {
16
+ gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>,
17
+ <&gpio0 17 GPIO_ACTIVE_HIGH>;
18
+ };
19
+
20
+ row {
21
+ gpios = <&gpio0 16 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
22
+ <&gpio0 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
23
+ };
24
+ };
25
+
26
+ led_pool{
27
+ compatible = "gpio-leds";
28
+
29
+ out {
30
+ gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
31
+ };
32
+ };
33
+ pwm_pool {
34
+ compatible = "pwm-leds";
35
+ out {
36
+ pwms = <&pwm0 4 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
37
+ };
38
+ };
39
+ };
Original file line number Diff line number Diff line change
1
+
2
+ /* TLSR9118BDK40D V2.1 */
3
+
4
+ / {
5
+ key_pool {
6
+ compatible = "gpio-keys";
7
+
8
+ inp {
9
+ gpios = <&gpio0 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
10
+ <&gpio0 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
11
+ <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
12
+ <&gpio0 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
13
+ };
14
+ };
15
+
16
+ led_pool{
17
+ compatible = "gpio-leds";
18
+
19
+ out {
20
+ gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
21
+ };
22
+ };
23
+
24
+ pwm_pool {
25
+ compatible = "pwm-leds";
26
+ out {
27
+ pwms = <&pwm0 3 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
28
+ };
29
+ };
30
+ };
You can’t perform that action at this time.
0 commit comments