diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 75a7d95..f667191 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -21,6 +21,7 @@ jobs: matrix: boards: [ {boardname: "nrf52840dongle/nrf52840", fileformat: "hex", filename: "SlimeNRF_Nordic_eByte_Dongle_Receiver.hex"}, + {boardname: "holyiot_21017/nrf52840", fileformat: "hex", filename: "SlimeNRF_Holyiot_Dongle_Receiver.hex"}, {boardname: "supermini_uf2/nrf52840", fileformat: "uf2", filename: "SlimeNRF_SuperMini_Receiver.uf2"}, {boardname: "xiao_ble/nrf52840", fileformat: "uf2", filename: "SlimeNRF_XIAO_Receiver.uf2"}, {boardname: "etee_dongle_uf2/nrf52840", fileformat: "uf2", filename: "SlimeNRF_etee_Receiver.uf2"}, diff --git a/boards/holyiot/holyiot_21017/Kconfig.holyiot_21017 b/boards/holyiot/holyiot_21017/Kconfig.holyiot_21017 new file mode 100644 index 0000000..7e2a708 --- /dev/null +++ b/boards/holyiot/holyiot_21017/Kconfig.holyiot_21017 @@ -0,0 +1,48 @@ +# Copyright (c) 2018 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_HOLYIOT_21017 + select SOC_NRF52840_QIAA + +if BOARD_HOLYIOT_21017 + +config BOARD_HAS_NRF5_BOOTLOADER + bool "Board has nRF5 bootloader" + default y + help + If selected, applications are linked so that they can be loaded by Nordic + nRF5 bootloader. + +config BOARD_SERIAL_BACKEND_CDC_ACM + bool "USB CDC" + default y + +config MPSL_FEM_GENERIC_TWO_CTRL_PINS_SUPPORT + bool "Use FEM" + default y + help + Use RF front-end module (FEM) is a device that amplifies the RF signal, to increase the range distance, the strength, and the robustness of a link connection. + +config BOARD_ENABLE_FEM + bool "FEM enabled" + default y + select MPSL_FEM_GENERIC_TWO_CTRL_PINS_SUPPORT + help + Enabke front-end module (FEM). + +config CONFIG_MPSL + bool "Enable MPSL" + default true + help + Enable Nordic Multi Protocol Service Layer + +config BOARD_ENABLE_DCDC + bool "DCDC mode" + select SOC_DCDC_NRF52X + default n + +config MPSL_FEM_GENERIC_TWO_CTRL_PINS_SUPPORT + bool + default y + +endif # BOARD_HOLYIOT_21017 \ No newline at end of file diff --git a/boards/holyiot/holyiot_21017/board.cmake b/boards/holyiot/holyiot_21017/board.cmake new file mode 100644 index 0000000..0015cf3 --- /dev/null +++ b/boards/holyiot/holyiot_21017/board.cmake @@ -0,0 +1,9 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +board_runner_args(jlink "--device=nrf52840_xxaa" "--speed=4000") +board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000") + +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) +include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) +include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) diff --git a/boards/holyiot/holyiot_21017/board.yml b/boards/holyiot/holyiot_21017/board.yml new file mode 100644 index 0000000..dd26e52 --- /dev/null +++ b/boards/holyiot/holyiot_21017/board.yml @@ -0,0 +1,9 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +board: + name: holyiot_21017 + full_name: holyiot_21017 + vendor: holyiot + socs: + - name: nrf52840 diff --git a/boards/holyiot/holyiot_21017/holyiot_21017.dts b/boards/holyiot/holyiot_21017/holyiot_21017.dts new file mode 100644 index 0000000..2c889c1 --- /dev/null +++ b/boards/holyiot/holyiot_21017/holyiot_21017.dts @@ -0,0 +1,168 @@ +// Copyright (c) 2024 Nordic Semiconductor ASA +// SPDX-License-Identifier: Apache-2.0 + +/dts-v1/; +#include +#include + +&pinctrl { + pwm0_default: pwm0_default { + group1 { + psels = , + , + ; + nordic,invert; + }; + }; + + pwm0_sleep: pwm0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; +}; + +/ { + model = "Holyiot nRF52840 Dongle Holyiot-21017"; + compatible = "nordic,nrf52840-dongle-nrf52840"; + + chosen { + zephyr,console = &cdc_acm_uart; + zephyr,shell-uart = &cdc_acm_uart; + zephyr,uart-mcumgr = &cdc_acm_uart; + zephyr,bt-mon-uart = &cdc_acm_uart; + zephyr,bt-c2h-uart = &cdc_acm_uart; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,ieee802154 = &ieee802154; + }; + + nrf_radio_fem: skyFem { + compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins"; + ctx-gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; + ctx-settle-time-us = <1>; + crx-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; + crx-settle-time-us = <1>; + tx-gain-db = <22>; + rx-gain-db = <12>; + }; + + leds { + compatible = "gpio-leds"; + led0_green: led_0 { + gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; + label = "Green LED 0"; + }; + led1_red: led_1 { + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + label = "Red LED 1"; + }; + led1_green: led_2 { + gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + label = "Green LED 1"; + }; + led1_blue: led_3 { + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + label = "Blue LED 1"; + }; + }; + + pwmleds { + compatible = "pwm-leds"; + red_pwm_led: pwm_led_0 { + pwms = <&pwm0 0 PWM_MSEC(1) PWM_POLARITY_INVERTED>; + }; + green_pwm_led: pwm_led_1 { + pwms = <&pwm0 1 PWM_MSEC(1) PWM_POLARITY_INVERTED>; + }; + blue_pwm_led: pwm_led_2 { + pwms = <&pwm0 2 PWM_MSEC(1) PWM_POLARITY_INVERTED>; + }; + }; + + buttons { + compatible = "gpio-keys"; + button0: button_0 { + gpios = <&gpio1 6 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + label = "Push button switch 0"; + zephyr,code = ; + }; + }; + + aliases { + sw0 = &button0; + led0 = &led0_green; + led1 = &led1_red; + led2 = &led1_green; + led3 = &led1_blue; + led0-green = &led0_green; + led1-red = &led1_red; + led1-green = &led1_green; + led1-blue = &led1_blue; + pwm-led0 = &red_pwm_led; + pwm-led1 = &green_pwm_led; + pwm-led2 = &blue_pwm_led; + red-pwm-led = &red_pwm_led; + green-pwm-led = &green_pwm_led; + blue-pwm-led = &blue_pwm_led; + mcuboot-button0 = &button0; + mcuboot-led0 = &led0_green; + watchdog0 = &wdt0; + }; +}; + +®0 { + status = "disabled"; +}; + +®1 { + regulator-initial-mode = ; +}; + +&radio { + fem = <&nrf_radio_fem>; +}; + +&adc { + status = "okay"; +}; + +&gpiote { + status = "okay"; +}; + +&uicr { + nfct-pins-as-gpios; + gpio-as-nreset; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_default>; + pinctrl-1 = <&pwm0_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&ieee802154 { + status = "okay"; +}; + +zephyr_udc0: &usbd { + compatible = "nordic,nrf-usbd"; + status = "okay"; + + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + }; +}; diff --git a/boards/holyiot/holyiot_21017/holyiot_21017.yaml b/boards/holyiot/holyiot_21017/holyiot_21017.yaml new file mode 100644 index 0000000..07b4c2e --- /dev/null +++ b/boards/holyiot/holyiot_21017/holyiot_21017.yaml @@ -0,0 +1,24 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +identifier: holyiot_21017/nrf52840 +name: holyiot_21017 +type: mcu +arch: arm +ram: 256 +flash: 1024 +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - adc + - usb_device + - ble + - pwm + - spi + - watchdog + - counter + - netif:openthread + - gpio +vendor: holyiot diff --git a/boards/holyiot/holyiot_21017/holyiot_21017_defconfig b/boards/holyiot/holyiot_21017/holyiot_21017_defconfig new file mode 100644 index 0000000..38a65d5 --- /dev/null +++ b/boards/holyiot/holyiot_21017/holyiot_21017_defconfig @@ -0,0 +1,20 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_ARM_MPU=y +CONFIG_HW_STACK_PROTECTION=y +CONFIG_GPIO=y +CONFIG_USB_DEVICE_REMOTE_WAKEUP=n + +CONFIG_USB_DEVICE_MANUFACTURER="Holyiot" +CONFIG_USB_DEVICE_PRODUCT="SlimeNRF Receiver Holyiot" + +CONFIG_LED_RGB_COLOR=y + +CONFIG_USE_SEGGER_RTT=y +CONFIG_RTT_CONSOLE=y +CONFIG_LOG_BACKEND_RTT=y + +CONFIG_MPSL=y +CONFIG_MPSL_FEM=y +CONFIG_MPSL_FEM_SIMPLE_GPIO=y \ No newline at end of file diff --git a/pm_static_holyiot_21017_nrf52840.yml b/pm_static_holyiot_21017_nrf52840.yml new file mode 100644 index 0000000..764f36b --- /dev/null +++ b/pm_static_holyiot_21017_nrf52840.yml @@ -0,0 +1,5 @@ +bootloader: + address: 0xe0000 + end_address: 0x100000 + region: flash_primary + size: 0x20000 \ No newline at end of file