-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Michael Zimmermann <[email protected]>
- Loading branch information
Showing
11 changed files
with
254 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2023 GARDENA GmbH | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
zephyr_library() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) 2023 GARDENA GmbH | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_GARDENA_RM_SIM3U | ||
bool "GARDENA SIM3U radio module" | ||
depends on SOC_SERIES_SIM3U | ||
select SOC_PART_NUMBER_SIM3U167_B_GM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) 2023 GARDENA GmbH | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_GARDENA_RM_SIM3U | ||
|
||
config BOARD | ||
default "gardena_rm_sim3u" | ||
|
||
endif # BOARD_GARDENA_RM_SIM3U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2023 GARDENA GmbH | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
.. _boardname_linkname: | ||
|
||
GARDENA SIM3U radio module | ||
########################## | ||
|
||
Overview | ||
******** | ||
|
||
This is a SoM that is used as a radio module by the GARDENA smart Gateway. | ||
|
||
.. figure:: gardena_rm_sim3u.jpg | ||
:align: center | ||
:alt: GARDENA SIM3U radio module | ||
|
||
Hardware | ||
******** | ||
|
||
- SIM3U167B-GM SoC | ||
- SPI si4467 transceiver | ||
- Controls an RGB LED via high drive pins. It's expected to mirror the | ||
state of 3 low-drive pins coming from the Linux SoC. | ||
- UART is connected to the Linux SoC. Usually it's used for PPP, but it can | ||
also be used for debugging when PPP is not active. | ||
|
||
Supported Features | ||
================== | ||
|
||
- USART: polling and interrupt mode | ||
|
||
|
||
Programming and Debugging | ||
************************* | ||
|
||
Flashing | ||
======== | ||
|
||
The easiest way is to do this via SSH from the Linux SoM that's connected to | ||
the SIM3U SoM. | ||
|
||
On your building machine: | ||
|
||
.. code-block:: console | ||
scp -O build/zephyr/zephyr.hex root@IP:/tmp/ | ||
On the gateway: | ||
|
||
.. code-block:: console | ||
openocd -f board/gardena_radio.cfg -c 'program /tmp/zephyr.hex verify exit' | ||
reset-rm | ||
Debugging | ||
========= | ||
|
||
The easiest way is to do this via SSH from the Linux gateway as well: | ||
|
||
.. code-block:: console | ||
openocd -f board/gardena_radio.cfg -c init | ||
References | ||
********** | ||
|
||
.. _User manual: | ||
https://www.gardena.com/tdrdownload//pub000070911/doc000120830 | ||
|
||
.. _SoC product page: | ||
https://www.silabs.com/mcu/32-bit-microcontrollers/precision32-sim3u1xx/device.SiM3U167-B-GQ?tab=specs | ||
|
||
.. _Yocto source code and documentation: | ||
https://github.com/husqvarnagroup/smart-garden-gateway-public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (c) 2023 GARDENA GmbH | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/pinctrl/si32-pinctrl.h> | ||
|
||
&pinctrl { | ||
usart0_default: usart0_default { | ||
group1 { | ||
pinmux = <SI32_MUX(USART0_TX, 0, 0)>, | ||
<SI32_MUX(USART0_RTS, 0, 2)>; | ||
output-enable; | ||
}; | ||
group2 { | ||
pinmux = <SI32_MUX(USART0_RX, 0, 1)>, | ||
<SI32_MUX(USART0_CTS, 0, 3)>; | ||
input-enable; | ||
}; | ||
}; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
* Copyright (c) 2023 GARDENA GmbH | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <silabs/sim3u167bgm.dtsi> | ||
#include "gardena_rm_sim3u-pinctrl.dtsi" | ||
|
||
/ { | ||
model = "GARDENA sim3u radio module"; | ||
compatible = "gardena,rm_sim3u", "silabs,sim3u"; | ||
|
||
chosen { | ||
zephyr,console = &usart0; | ||
zephyr,shell-uart = &usart0; | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
}; | ||
}; | ||
|
||
&cpu0 { | ||
clock-frequency = <76953600>; | ||
}; | ||
|
||
&pll0 { | ||
status = "okay"; | ||
}; | ||
|
||
&clk_ahb { | ||
clocks = <&pll0>; | ||
status = "okay"; | ||
}; | ||
|
||
&clk_apb { | ||
divider = <2>; | ||
status = "okay"; | ||
}; | ||
|
||
&usart0 { | ||
current-speed = <115200>; | ||
pinctrl-0 = <&usart0_default>; | ||
pinctrl-names = "default"; | ||
hw-flow-control; | ||
status = "okay"; | ||
}; | ||
|
||
&gpio0 { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio1 { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio2 { | ||
disable-pullups; | ||
status = "okay"; | ||
}; | ||
|
||
&gpio3 { | ||
status = "okay"; | ||
}; | ||
|
||
&flash0 { | ||
status = "okay"; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
slot0_partition: partition@0 { | ||
label = "image-0"; | ||
reg = <0x00000000 DT_SIZE_K(1664)>; | ||
}; | ||
|
||
storage_partition: partition@250000 { | ||
label = "storage"; | ||
reg = <0x00030000 DT_SIZE_K(64)>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) 2023 GARDENA GmbH | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
identifier: gardena_rm_sim3u | ||
name: GARDENA sim3u radio module | ||
type: mcu | ||
arch: arm | ||
ram: 32 | ||
flash: 256 | ||
toolchain: | ||
- zephyr | ||
- gnuarmemb | ||
- xtools | ||
supported: | ||
- gpio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CONFIG_SOC_SERIES_SIM3U=y | ||
|
||
# enable uart driver | ||
CONFIG_SERIAL=y | ||
|
||
# enable console | ||
CONFIG_CONSOLE=y | ||
CONFIG_UART_CONSOLE=y | ||
|
||
# enable GPIO | ||
CONFIG_GPIO=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 2023 GARDENA GmbH | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
source [find interface/ftdi/olimex-arm-usb-tiny-h.cfg] | ||
source [find interface/ftdi/olimex-arm-jtag-swd.cfg] | ||
|
||
source [find target/sim3x.cfg] | ||
|
||
reset_config none separate | ||
|
||
$_TARGETNAME configure -event gdb-attach { | ||
echo "Debugger attaching: halting execution" | ||
reset halt | ||
gdb_breakpoint_override hard | ||
} | ||
|
||
$_TARGETNAME configure -event gdb-detach { | ||
echo "Debugger detaching: resuming execution" | ||
resume | ||
} |