Skip to content

Commit

Permalink
[Telink] w91 add pwm pool (#336)
Browse files Browse the repository at this point in the history
* add pwm pool to w91 platform

* add pwm pool for w91 platform

Signed-off-by: Dmytro Kashkarov <[email protected]>

---------

Signed-off-by: Dmytro Kashkarov <[email protected]>
  • Loading branch information
UR6LAL authored May 3, 2024
1 parent dee3e11 commit e399b54
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
platform: telink
- name: Update Zephyr to specific revision (for developers purpose)
shell: bash
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 36ba616c818ee4603f6195e977052180bb56b7ae"
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 68deadeb5c20b82d68700e720d4580e8003bf1d8"
- name: CI Examples Telink
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
gh-context: ${{ toJson(github) }}

- name: Update Zephyr to specific revision (for developers purpose)
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 36ba616c818ee4603f6195e977052180bb56b7ae"
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 68deadeb5c20b82d68700e720d4580e8003bf1d8"

- name: Build example Telink (B92 retention) Air Quality Sensor App
run: |
Expand Down
2 changes: 1 addition & 1 deletion config/telink/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ config CHIP_LOG_SIZE_OPTIMIZATION

config CHIP_BUTTON_MANAGER_IRQ_MODE
bool "Use GPIO in an IRQ mode instead of polling the GPIO"
default PM
default PM || BOARD_TLSR9118BDK40D
help
Use GPIO in an IRQ mode to avoid button polling loop and extend the battery lifetime by waking up by GPIO event.
GPIO events are working only with GPIO IRQ. This option changes button matrix configuration.
Expand Down
2 changes: 1 addition & 1 deletion config/telink/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ endif # CHIP_WIFI

config CHIP_ENABLE_PAIRING_AUTOSTART
bool "Open commissioning window on boot"
default y
default y
help
Opens the commissioning window automatically at application boot time if
the node is not yet commissioned.
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/telink/common/src/AppTaskCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ void AppTaskCommon::InitPwms()

void AppTaskCommon::LinkPwms(PwmManager & pwmManager)
{
#if CONFIG_WS2812_STRIP
#if CONFIG_WS2812_STRIP || CONFIG_BOARD_TLSR9118BDK40D // TLSR9118BDK40D EVK buttons located on 4th PWM channel (see tlsr9118bdk40d.overlay)
pwmManager.linkPwm(PwmManager::EAppPwm_Red, 0);
pwmManager.linkPwm(PwmManager::EAppPwm_Green, 1);
pwmManager.linkPwm(PwmManager::EAppPwm_Blue, 2);
Expand Down
17 changes: 16 additions & 1 deletion src/platform/telink/tlsr9118bdk40d.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,22 @@
compatible = "gpio-leds";

out {
gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
};
};
pwm_pool {
compatible = "pwm-leds";
out {
pwms = <&pwm0 4 PWM_MSEC(1) PWM_POLARITY_NORMAL>,
<&pwm0 2 PWM_MSEC(1) PWM_POLARITY_NORMAL>,
<&pwm0 3 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
};
};
};

&pwm0 {
/* On board RGB LEDs */
pinctrl-ch4 = <&pwm_ch4_p20_default>;
pinctrl-ch2 = <&pwm_ch2_p17_default>;
pinctrl-ch3 = <&pwm_ch3_p18_default>;
};

0 comments on commit e399b54

Please sign in to comment.