boards: efr32mg_sltb004a: Add minimal pwm support
Add minimal pwm support to the efr32mg12p soc and the Thunderboard Sense 2 board. Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
This commit is contained in:
parent
e15bdaa1bd
commit
5c8f7bf874
3 changed files with 38 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
aliases {
|
||||
led0 = &led0;
|
||||
led1 = &led1;
|
||||
pwm-led0 = &pwm_led0;
|
||||
sw0 = &button0;
|
||||
sw1 = &button1;
|
||||
watchdog0 = &wdog0;
|
||||
|
@ -53,6 +54,14 @@
|
|||
label = "User Push Button 1";
|
||||
};
|
||||
};
|
||||
|
||||
pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
status = "okay";
|
||||
pwm_led0: pwm_led0 {
|
||||
pwms = <&pwm0 0 PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
|
@ -141,6 +150,16 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&timer0 {
|
||||
status = "okay";
|
||||
|
||||
pwm0: pwm {
|
||||
status = "okay";
|
||||
pin-location = <GECKO_LOCATION(17) GECKO_PORT_D GECKO_PIN(9)>;
|
||||
prescaler = <1024>;
|
||||
};
|
||||
};
|
||||
|
||||
&gpio {
|
||||
location-swo = <0>;
|
||||
status = "okay";
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/i2c/i2c.h>
|
||||
#include "gpio_gecko.h"
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
|
@ -234,6 +235,20 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
timer0: timer@40018000 {
|
||||
compatible = "silabs,gecko-timers";
|
||||
reg = <0x40018000 0x400>;
|
||||
status = "disabled";
|
||||
label = "TIMER_0";
|
||||
|
||||
pwm {
|
||||
compatible = "silabs,gecko-pwm";
|
||||
status = "disabled";
|
||||
label = "PWM_0";
|
||||
#pwm-cells = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
trng0: trng@4001d000 {
|
||||
compatible = "silabs,gecko-trng";
|
||||
reg = <0x4001d000 0x400>;
|
||||
|
|
|
@ -28,3 +28,7 @@ config SOC_FLASH_GECKO
|
|||
config SPI_GECKO
|
||||
default y
|
||||
depends on SPI
|
||||
|
||||
config PWM_GECKO
|
||||
default y
|
||||
depends on PWM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue