Initial commit
Initial commit.
This commit is contained in:
243
boards/MAPS/cyber_nrf52840/cyber_nrf52840.dts
Normal file
243
boards/MAPS/cyber_nrf52840/cyber_nrf52840.dts
Normal file
@@ -0,0 +1,243 @@
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
#include "cyber_nrf52840-pinctrl.dtsi"
|
||||
/* For use with WS2812 LEDs. */
|
||||
#include <zephyr/dt-bindings/led/led.h>
|
||||
|
||||
/ {
|
||||
model = "MAPS - Cyber NRF52840 Board";
|
||||
compatible = "MAPS,cyber-nrf52840";
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
zephyr,console = &uart0;
|
||||
};
|
||||
|
||||
zephyr,user {
|
||||
io-channels = <&adc 0>;
|
||||
};
|
||||
|
||||
aliases {
|
||||
mcuboot-led = &mcuboot_led;
|
||||
left-button = &left_button;
|
||||
center-button = ¢er_button;
|
||||
right-button = &right_button;
|
||||
pwr-5v-enable = &pwr_5v_enable;
|
||||
led-ring-pwr = &led_ring_pwr;
|
||||
led-ring-level-shift-enable = &led_ring_level_shift_enable;
|
||||
led-ring-din = &led_ring_din;
|
||||
battery-check-enable = &battery_check_enable;
|
||||
imu-int = &imu_int;
|
||||
|
||||
|
||||
bubble-led = &bubble_led;
|
||||
pin-led = &pin_led;
|
||||
fiber-led = &fiber_led;
|
||||
|
||||
led-ring = &led_ring;
|
||||
|
||||
watchdog0 = &wdt0;
|
||||
|
||||
// spi-flash0 = &mx25r64;
|
||||
// bootloader-led0 = &bubble_led;
|
||||
// mcuboot-button0 = ¢er_button;
|
||||
// mcuboot-led0 = &bubble_led;
|
||||
};
|
||||
|
||||
// GPIO enable assumes true is whatever the logic level is set to. Set everything to active high here so we can control in code.
|
||||
gpios {
|
||||
compatible = "gpio-keys";
|
||||
mcuboot_led: mcuboot_led {
|
||||
gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
left_button: left_button {
|
||||
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
center_button: center_button {
|
||||
gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
right_button: right_button {
|
||||
gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
pwr_5v_enable: pwr_5v_enable {
|
||||
gpios = <&gpio0 12 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
|
||||
};
|
||||
led_ring_pwr: led_ring_pwr {
|
||||
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
led_ring_level_shift_enable: led_ring_level_shift_enable {
|
||||
gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
led_ring_din: led_ring_din {
|
||||
gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
battery_check_enable: battery_check_enable {
|
||||
gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
imu_int: imu_int {
|
||||
gpios = <&gpio0 11 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
|
||||
};
|
||||
charger_status: charger_status {
|
||||
gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
pwmleds: pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
|
||||
bubble_led: bubble_led {
|
||||
pwms = <&pwm0 0 PWM_USEC(4000) PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
|
||||
pin_led: pin_led {
|
||||
pwms = <&pwm0 1 PWM_USEC(4000) PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
|
||||
fiber_led: fiber_led {
|
||||
pwms = <&pwm0 2 PWM_USEC(4000) PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
boot_partition: partition@0 {
|
||||
label = "mcuboot";
|
||||
reg = <0x00000000 DT_SIZE_K(48)>;
|
||||
};
|
||||
|
||||
slot0_partition: partition@c000 {
|
||||
label = "image-0";
|
||||
reg = <0x0000c000 DT_SIZE_K(472)>;
|
||||
};
|
||||
|
||||
slot1_partition: partition@82000 {
|
||||
label = "image-1";
|
||||
reg = <0x00082000 DT_SIZE_K(472)>;
|
||||
};
|
||||
|
||||
storage_partition: partition@f8000 {
|
||||
label = "storage";
|
||||
reg = <0x000f8000 DT_SIZE_K(32)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uicr {
|
||||
/* Pins P0.09 and P0.10 are defaulted to be used with NFC, need to configure for standard GPIO
|
||||
* https://devzone.nordicsemi.com/f/nordic-q-a/35505/nrf52-enabling-gpio-on-nfc-pins
|
||||
*/
|
||||
nfct-pins-as-gpios;
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
zephyr,gain = "ADC_GAIN_1_6";
|
||||
zephyr,reference = "ADC_REF_INTERNAL";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,input-positive = <NRF_SAADC_AIN0>; /* P0.02 */
|
||||
zephyr,resolution = <12>;
|
||||
};
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
compatible = "nordic,nrf-twi";
|
||||
status = "okay";
|
||||
clock-frequency = <I2C_BITRATE_FAST>;
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-1 = <&i2c0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
compatible = "nordic,nrf-twim";
|
||||
status = "okay";
|
||||
clock-frequency = <I2C_BITRATE_FAST>;
|
||||
pinctrl-0 = <&i2c1_default>;
|
||||
pinctrl-1 = <&i2c1_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
i2s_led: &i2s0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2s0_default>;
|
||||
pinctrl-1 = <&i2s0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
||||
led_ring: ws2812 {
|
||||
compatible = "worldsemi,ws2812-i2s";
|
||||
|
||||
i2s-dev = < &i2s_led >;
|
||||
chain-length = <24>;
|
||||
color-mapping = <LED_COLOR_ID_GREEN
|
||||
LED_COLOR_ID_RED
|
||||
LED_COLOR_ID_BLUE>;
|
||||
// out-active-low;
|
||||
reset-delay = <120>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
status = "okay";
|
||||
pinctrl-0 = <&spi2_default>;
|
||||
pinctrl-1 = <&spi2_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
cs-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-1 = <&uart0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
current-speed = <115200>;
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm0_default>;
|
||||
pinctrl-1 = <&pwm0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&qspi {
|
||||
status = "disabled";
|
||||
pinctrl-0 = <&qspi_default>;
|
||||
pinctrl-1 = <&qspi_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&rtc2 {
|
||||
status = "okay";
|
||||
clock-frequency = <32768>;
|
||||
prescaler = <4095>; /* +1 for prescaler */
|
||||
};
|
||||
|
||||
&wdt0 {
|
||||
status = "okay";
|
||||
};
|
||||
Reference in New Issue
Block a user