Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | /*
* Copyright (c) 2020 Lingao Meng
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <nordic/nrf52833_qiaa.dtsi>
/ {
model = "BBC Micro:bit V2";
compatible = "bbc,microbit-v2";
/* These aliases are provided for compatibility with samples */
aliases {
sw0 = &buttonA;
sw1 = &buttonB;
};
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};
gpio_keys {
compatible = "gpio-keys";
buttonA: button_0 {
label = "BTN_A";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
buttonB: button_1 {
label = "BTN_B";
gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
};
};
edge_connector: connector {
compatible = "microbit,edge-connector";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpio0 2 0>, /* P0 */
<1 0 &gpio0 3 0>, /* P1 */
<2 0 &gpio0 4 0>, /* P2 */
<3 0 &gpio0 31 0>, /* P3 */
<4 0 &gpio0 28 0>, /* P4 */
<5 0 &gpio0 14 0>, /* P5 */
<6 0 &gpio1 5 0>, /* P6 */
<7 0 &gpio0 11 0>, /* P7 */
<8 0 &gpio0 10 0>, /* P8 */
<9 0 &gpio0 9 0>, /* P9 */
<10 0 &gpio0 30 0>, /* P10 */
<11 0 &gpio0 23 0>, /* P11 */
<12 0 &gpio0 12 0>, /* P12 */
<13 0 &gpio0 17 0>, /* P13 */
<14 0 &gpio0 1 0>, /* P14 */
<15 0 &gpio0 13 0>, /* P15 */
<16 0 &gpio1 2 0>, /* P16 */
<19 0 &gpio0 26 0>, /* P19 */
<20 0 &gpio1 0 0>; /* P20 */
};
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&uart0 {
compatible = "nordic,nrf-uart";
status = "okay";
current-speed = <115200>;
tx-pin = <6>;
rx-pin = <40>;
};
&i2c0 {
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
sda-pin = <16>;
scl-pin = <8>;
/* See https://tech.microbit.org/hardware/i2c/ for board variants */
lsm303agr-magn@1e {
compatible = "st,lis2mdl", "st,lsm303agr-magn";
status = "okay";
reg = <0x1e>;
label = "LSM303AGR-MAGN";
irq-gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; /* A3 */
};
lsm303agr-accel@19 {
compatible = "st,lis2dh", "st,lsm303agr-accel";
status = "okay";
reg = <0x19>;
label = "LSM303AGR-ACCEL";
irq-gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x000000000 0xC000>;
};
slot0_partition: partition@c000 {
label = "image-0";
reg = <0x0000C000 0x32000>;
};
slot1_partition: partition@3e000 {
label = "image-1";
reg = <0x0003E000 0x32000>;
};
scratch_partition: partition@70000 {
label = "image-scratch";
reg = <0x00070000 0xA000>;
};
storage_partition: partition@7a000 {
label = "storage";
reg = <0x0007A000 0x00006000>;
};
};
};
&usbd {
compatible = "nordic,nrf-usbd";
status = "okay";
};
|