Linux preempt-rt

Check our new training course

Real-Time Linux with PREEMPT_RT

Check our new training course
with Creative Commons CC-BY-SA
lecture and lab materials

Bootlin logo

Elixir Cross Referencer

/*
 * Copyright (c) 2021 Laird Connectivity
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>

/ {
	model = "Laird BT6x0 Sensor";
	compatible = "lairdconnect,bt6x0";

	chosen {
		zephyr,console = &uart0;
		zephyr,shell-uart = &uart0;
		zephyr,uart-mcumgr = &uart0;
		zephyr,bt-mon-uart = &uart0;
		zephyr,bt-c2h-uart = &uart0;
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
		zephyr,code-partition = &slot0_partition;
	};

	leds {
		compatible = "gpio-leds";
		led1: led_1 {
			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
			label = "Red LED 1";
		};
		led2: led_2 {
			gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
			label = "Green LED 2";
		};
	};

	pwmleds {
		compatible = "pwm-leds";

		led1pwm: led_1_pwm {
			pwms = <&pwm0 39>;
			label = "Red PWM LED 1";
		};

		led2pwm: led_2_pwm {
			pwms = <&pwm1 35>;
			label = "Green PWM LED 2";
		};
	};

	buttons {
		compatible = "gpio-keys";
		button1: button_1 {
			gpios = <&gpio0 24 GPIO_PULL_UP>;
			label = "Boot button switch 1 (SW1)";
		};
		button2: button_2 {
			gpios = <&gpio1 1 GPIO_PULL_UP>;
			label = "Tamper switch 2 (SW2)";
		};
		mag1: mag_1 {
			compatible = "honeywell,sm351lt";
			gpios = <&gpio1 15 0>;
			label = "SM3531LT_0";
		};
	};

	gpio_keys {
		compatible = "gpio-keys";
		dinenable1: din_enable_1 {
			label = "Digital Input 1 Enable";
			gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
		};

		dinenable2: din_enable_2 {
			label = "Digital Input 2 Enable";
			gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
		};

		din1: din_1 {
			label = "Digital Input 1";
			gpios = <&gpio0 9 GPIO_PULL_UP>;
		};

		din2: din_2 {
			label = "Digital Input 2";
			gpios = <&gpio1 11 GPIO_PULL_UP>;
		};

		thermenable: therm_enable {
			label = "Thermistor Inputs Enable";
			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
		};

		analogenable: analog_enable {
			label = "Analog Inputs Enable";
			gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
		};

		highsupplyenable: high_supply_enable {
			label = "High Voltage Power Supply Enable";
			gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
		};

		expanderirq: expander_irq {
			label = "Port Expander Interrupt Request";
			gpios = <&gpio1 14 GPIO_PULL_UP>;
		};

		ain1: ain_1 {
			label = "Analog Input 1";
			gpios = <&gpio0 2 GPIO_PULL_UP>;
		};

		ain2: ain_2 {
			label = "Analog Input 2";
			gpios = <&gpio0 3 GPIO_PULL_UP>;
		};

		vref: v_ref {
			label = "Voltage Reference";
			gpios = <&gpio0 29 GPIO_PULL_UP>;
		};

		expanderreset: expander_reset {
			label = "Port Expander Reset";
			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
		};

		batteryoutputenable: battery_output_enable {
			label = "Battery Output Enable";
			gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
		};

		do1mcu: do_1_mcu {
			label = "Digital Output 1";
			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
		};

		do2mcu: do_2_mcu {
			label = "Digital Output 2";
			gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
		};
	};

	/* These aliases are provided for compatibility with samples */
	aliases {
		led0 = &led1;
		led1 = &led2;
		led0pwm = &led1pwm;
		led1pwm = &led2pwm;
		sw0 = &button1;
		sw1 = &button2;
		sw2 = &mag1;
	};
};

&pwm0 {
	status = "okay";
	ch0-pin = <39>;
};

&pwm1 {
	status = "okay";
	ch0-pin = <35>;
};

&adc {
	status = "okay";
};

&gpiote {
	status = "okay";
};

&gpio0 {
	status = "okay";
};

&gpio1 {
	status = "okay";
};

&uart0 {
	compatible = "nordic,nrf-uarte";
	current-speed = <115200>;
	status = "okay";
	tx-pin = <6>;
	rx-pin = <8>;
	rts-pin = <5>;
	cts-pin = <7>;
};

&uart1 {
	compatible = "nordic,nrf-uarte";
	current-speed = <115200>;
	status = "okay";
	tx-pin = <16>;
	rx-pin = <14>;
	rts-pin = <13>;
	cts-pin = <15>;
};

&i2c0 {
	compatible = "nordic,nrf-twi";
	status = "okay";
	sda-pin = <26>;
	scl-pin = <27>;
};

&spi1 {
	compatible = "nordic,nrf-spi";
	status = "okay";
	sck-pin = <41>;
	mosi-pin = <40>;
	miso-pin = <4>;
	cs-gpios = <&gpio0 25 0>,
		<&gpio0 31 0>;
};

&qspi {
	status = "okay";
	sck-pin = <19>;
	io-pins = <20>, <21>, <22>, <23>;
	csn-pins = <17>;
	mx25r64: mx25r6435f@0 {
		compatible = "nordic,qspi-nor";
		reg = <0>;
		writeoc = "pp4io";
		readoc = "read4io";
		sck-frequency = <8000000>;
		label = "MX25R64";
		jedec-id = [c2 28 17];
		sfdp-bfp = [
			e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
			ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
			10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
			30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
		];
		size = <67108864>;
		has-dpd;
		t-enter-dpd = <10000>;
		t-exit-dpd = <35000>;
	};
};

&flash0 {
	/*
	 * For more information, see:
	 * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
	 */
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		/* 96K */
		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x000000000 0x00018000>;
		};
		/* 896K */
		slot0_partition: partition@18000 {
			label = "image-0";
			reg = <0x00018000 0x000E0000>;
		};

		/*
		 * The flash starting at 0x000f8000 and ending at
		 * 0x000fffff is reserved for use by the application.
		 */

		/*
		 * Storage partition will be used by FCB/NVS
		 * if enabled. 32K
		 */
		storage_partition: partition@f8000 {
			label = "storage";
			reg = <0x000f8000 0x00008000>;
		};
	};
};

&mx25r64 {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		/* 896K */
		slot1_partition: partition@0 {
			label = "image-1";
			reg = <0x0000000 0x000E0000>;
		};
		/* 16K */
		scratch_partition: partition@E0000 {
			label = "image-scratch";
			reg = <0x000E0000 0x00004000>;
		};
		/* 112K */
		customer_partition: partition@E4000 {
			label = "customer-storage";
			reg = <0x000E4000 0x0001C000>;
		};
		/* 7MB */
		lfs_partition: partition@100000 {
			label = "lfs_storage";
			reg = <0x00100000 0x000700000>;
		};
	};
};