Skip to content

Commit

Permalink
boards: sparkfun: Add SPI support over EUSART in devicetree
Browse files Browse the repository at this point in the history
Modified devicetree to integrate support for EUSART in pincontrol settings.

Signed-off-by: Teresa Zepeda Ventura <[email protected]>
  • Loading branch information
Terezvent authored and henrikbrixandersen committed Oct 21, 2024
1 parent b05eb43 commit 3359459
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
3 changes: 3 additions & 0 deletions boards/sparkfun/thing_plus_matter_mgm240p/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ static int sparkfun_thing_plus_mgm240p_init_clocks(void)
#endif
#if defined(_CMU_EM01GRPBCLKCTRL_MASK)
CMU_ClockSelectSet(cmuClock_EM01GRPBCLK, cmuSelect_HFRCODPLL);
#endif
#if defined(_CMU_EM01GRPCCLKCTRL_MASK)
CMU_ClockSelectSet(cmuClock_EM01GRPCCLK, cmuSelect_HFRCODPLL);
#endif
CMU_ClockSelectSet(cmuClock_EM23GRPACLK, cmuSelect_LFRCO);
CMU_ClockSelectSet(cmuClock_EM4GRPACLK, cmuSelect_LFRCO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
};
};

eusart1_default: eusart1_default {
group1 {
psels = <GECKO_PSEL(SPI_SCK, C, 2)>,
<GECKO_PSEL(SPI_MISO, C, 3)>,
<GECKO_PSEL(SPI_MOSI, C, 6)>,
<GECKO_PSEL(SPI_CSN, A, 7)>;
};
};

i2c0_default: i2c0_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, B, 3)>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

aliases {
led0 = &blue_led;
spi0 = &eusart1;
watchdog0 = &wdog0;
};

Expand Down Expand Up @@ -53,6 +54,18 @@
pinctrl-names = "default";
status = "okay";
};

&eusart1 {
compatible = "silabs,gecko-spi-eusart";

#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&eusart1_default>;
pinctrl-names = "default";

status = "okay";
};

&i2c0 {
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ supported:
- uart
- spi
- watchdog
- clock_control
testing:
ignore_tags:
- net
Expand Down
17 changes: 17 additions & 0 deletions dts/arm/silabs/efr32mg24.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,23 @@
status = "disabled";
};

eusart0: eusart@5b010000 {
compatible = "silabs,gecko-spi-eusart";
reg = <0x5B010000 0x4000>;
interrupts = <11 0>, <12 0>;
interrupt-names = "rx", "tx";
clocks = <&cmu CLOCK_EUSART0 CLOCK_BRANCH_EUSART0CLK>;
status = "disabled";
};
eusart1: eusart@500a0000 {
compatible = "silabs,gecko-spi-eusart";
reg = <0x500A0000 0x4000>;
interrupts = <13 0>, <14 0>;
interrupt-names = "rx", "tx";
clocks = <&cmu CLOCK_EUSART1 CLOCK_BRANCH_EM01GRPCCLK>;
status = "disabled";
};

burtc0: burtc@50064000 {
compatible = "silabs,gecko-burtc";
reg = <0x50064000 0x3034>;
Expand Down

0 comments on commit 3359459

Please sign in to comment.