Skip to content

Commit

Permalink
gecko: pinctrl: Add missing configuration for Gecko Series usarts
Browse files Browse the repository at this point in the history
This commit adds missing pinctrl configuration for USARTs in
efm32gg_slwstk6121a, efm32gg_stk3701a and efr32_radio boards
and enables PINCTRL for efr32_radio_brd4180a
and efr32_radio_brd4187c boards.

Signed-off-by: Franciszek Pindel <[email protected]>
Signed-off-by: Mateusz Holenko <[email protected]>
  • Loading branch information
FranciszekPin authored and carlescufi committed Nov 20, 2023
1 parent d3f1003 commit ad788ad
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 8 deletions.
19 changes: 19 additions & 0 deletions boards/arm/efm32gg_slwstk6121a/efm32gg_slwstk6121a-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2023 Antmicro <www.antmicro.com>
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/pinctrl/gecko-pinctrl-s1.h>

&pinctrl {
/* configuration for usart0 device, default state - operating as UART */
usart0_default: usart0_default {
group1 {
psels = <GECKO_PSEL(UART_TX, A, 0)>,
<GECKO_PSEL(UART_RX, A, 1)>,
<GECKO_LOC(UART_TX, 0)>,
<GECKO_LOC(UART_RX, 0)>;
};
};
};
5 changes: 3 additions & 2 deletions boards/arm/efm32gg_slwstk6121a/efm32gg_slwstk6121a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/dts-v1/;
#include <silabs/efm32gg11b820f2048gl192.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include "efm32gg_slwstk6121a-pinctrl.dtsi"

/ {
model = "Silicon Labs EFM32GG SLWSTK6121A board";
Expand Down Expand Up @@ -62,8 +63,8 @@
/* Connected to the WSTK VCOM */
&usart0 {
current-speed = <115200>;
location-rx = <GECKO_LOCATION(1) GECKO_PORT_E GECKO_PIN(6)>;
location-tx = <GECKO_LOCATION(1) GECKO_PORT_E GECKO_PIN(7)>;
pinctrl-0 = <&usart0_default>;
pinctrl-names = "default";
status = "okay";
};

Expand Down
28 changes: 28 additions & 0 deletions boards/arm/efm32gg_stk3701a/efm32gg_stk3701a-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2023 Antmicro <www.antmicro.com>
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/pinctrl/gecko-pinctrl-s1.h>

&pinctrl {
/* configuration for usart0 device, default state - operating as UART */
usart0_default: usart0_default {
group1 {
psels = <GECKO_PSEL(UART_TX, A, 0)>,
<GECKO_PSEL(UART_RX, A, 1)>,
<GECKO_LOC(UART_TX, 0)>,
<GECKO_LOC(UART_RX, 0)>;
};
};

usart4_default: usart4_default {
group1 {
psels = <GECKO_PSEL(UART_TX, H, 4)>,
<GECKO_PSEL(UART_RX, H, 5)>,
<GECKO_LOC(UART_TX, 4)>,
<GECKO_LOC(UART_RX, 4)>;
};
};
};
9 changes: 5 additions & 4 deletions boards/arm/efm32gg_stk3701a/efm32gg_stk3701a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/dts-v1/;
#include <silabs/efm32gg11b820f2048gl192.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include "efm32gg_stk3701a-pinctrl.dtsi"

/ {
model = "Silicon Labs EFM32GG STK3701A board";
Expand Down Expand Up @@ -60,15 +61,15 @@

&usart0 {
current-speed = <115200>;
location-rx = <GECKO_LOCATION(0) GECKO_PORT_E GECKO_PIN(11)>;
location-tx = <GECKO_LOCATION(0) GECKO_PORT_E GECKO_PIN(10)>;
pinctrl-0 = <&usart0_default>;
pinctrl-names = "default";
status = "okay";
};

&usart4 {
current-speed = <115200>;
location-rx = <GECKO_LOCATION(4) GECKO_PORT_H GECKO_PIN(5)>;
location-tx = <GECKO_LOCATION(4) GECKO_PORT_H GECKO_PIN(4)>;
pinctrl-0 = <&usart4_default>;
pinctrl-names = "default";
status = "okay";
};

Expand Down
19 changes: 19 additions & 0 deletions boards/arm/efr32_radio/efr32_radio-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2023 Antmicro <www.antmicro.com>
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/pinctrl/gecko-pinctrl-s1.h>

&pinctrl {
/* configuration for usart0 device, default state - operating as UART */
usart0_default: usart0_default {
group1 {
psels = <GECKO_PSEL(UART_TX, A, 0)>,
<GECKO_PSEL(UART_RX, A, 1)>,
<GECKO_LOC(UART_TX, 0)>,
<GECKO_LOC(UART_RX, 0)>;
};
};
};
5 changes: 3 additions & 2 deletions boards/arm/efr32_radio/efr32_radio.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include <zephyr/dt-bindings/input/input-event-codes.h>
#include "efr32_radio-pinctrl.dtsi"

/ {
chosen {
Expand Down Expand Up @@ -57,8 +58,8 @@

&usart0 {
current-speed = <115200>;
location-rx = <GECKO_LOCATION(0) GECKO_PORT_A GECKO_PIN(1)>;
location-tx = <GECKO_LOCATION(0) GECKO_PORT_A GECKO_PIN(0)>;
pinctrl-0 = <&usart0_default>;
pinctrl-names = "default";
status = "okay";
};

Expand Down
1 change: 1 addition & 0 deletions boards/arm/efr32_radio/efr32_radio_brd4180a_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ CONFIG_SERIAL=y
CONFIG_GPIO=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=38400000
CONFIG_CMU_HFCLK_HFXO=y
CONFIG_PINCTRL=y
1 change: 1 addition & 0 deletions boards/arm/efr32_radio/efr32_radio_brd4187c_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CONFIG_GPIO=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=78000000
CONFIG_SOC_GECKO_EMU_DCDC=y
CONFIG_SOC_GECKO_EMU_DCDC_MODE_ON=y
CONFIG_PINCTRL=y

# Use BURTC as system clock source
CONFIG_GECKO_BURTC_TIMER=y
Expand Down

0 comments on commit ad788ad

Please sign in to comment.