boards: arm: sam4s_xplained: Enable PWM

Update SAM4S Xplained to support PWM. Add PWM entry to device tree and
pin control.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2022-10-27 08:18:27 +02:00 committed by Carles Cufí
commit a24ac54e7c
4 changed files with 18 additions and 0 deletions

View file

@ -56,6 +56,8 @@ features:
+-----------+------------+-------------------------------------+ +-----------+------------+-------------------------------------+
| SMC | on-chip | memc (PSRAM) | | SMC | on-chip | memc (PSRAM) |
+-----------+------------+-------------------------------------+ +-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+
Other hardware features are not currently supported by Zephyr. Other hardware features are not currently supported by Zephyr.

View file

@ -41,6 +41,13 @@
<PA22A_USART1_TXD>; <PA22A_USART1_TXD>;
}; };
}; };
pwm0_default: pwm0_default {
group1 {
pinmux = <PA12B_PWM_PWMH1>,
<PA13B_PWM_PWMH2>,
<PA14B_PWM_PWMH3>;
};
};
smc_default: smc_default { smc_default: smc_default {
group1 { group1 {
pinmux = <PC18A_EBI_A0>, pinmux = <PC18A_EBI_A0>,

View file

@ -15,6 +15,7 @@
aliases { aliases {
i2c-0 = &twi0; i2c-0 = &twi0;
i2c-1 = &twi1; i2c-1 = &twi1;
pwm-0 = &pwm0;
led0 = &yellow_led_1; led0 = &yellow_led_1;
led1 = &yellow_led_2; led1 = &yellow_led_2;
sw0 = &user_button; sw0 = &user_button;
@ -168,6 +169,13 @@
pinctrl-names = "default"; pinctrl-names = "default";
}; };
&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default>;
pinctrl-names = "default";
};
&wdt { &wdt {
status = "okay"; status = "okay";
}; };

View file

@ -9,6 +9,7 @@ toolchain:
supported: supported:
- gpio - gpio
- memc - memc
- pwm
- spi - spi
- watchdog - watchdog
- xplained_gpio - xplained_gpio