Linux Audio

Check our new training course

Embedded Linux Audio

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

Bootlin logo

Elixir Cross Referencer

Loading...
/*
 * Copyright (c) 2019 STMicroelectronics
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/dts-v1/;
#include <st/l4/stm32l4r9Xi.dtsi>
#include <st/l4/stm32l4r9z(g-i)tx-pinctrl.dtsi>

/ {
	model = "STMicroelectronics SensorTile.box board";
	compatible = "st,sensortile-box";

	chosen {
		zephyr,console = &usart1;
		zephyr,shell-uart = &usart1;
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
	};

	leds {
		compatible = "gpio-leds";
		blue_led: led {
			gpios = <&gpiob 15 GPIO_ACTIVE_HIGH>;
			label = "User LD1";
		};

		green_led: led_2 {
			gpios = <&gpiof 2 GPIO_ACTIVE_HIGH>;
			label = "User LD4";
		};
	};

	gpio_keys {
		compatible = "gpio-keys";
		user_button: button {
			label = "User PB1";
			gpios = <&gpiog 1 GPIO_ACTIVE_LOW>;
		};
	};

	aliases {
		led0 = &blue_led;
		led1 = &green_led;
		sw0 = &user_button;
	};
};

&clk_hse {
	clock-frequency = <DT_FREQ_M(16)>;
	status = "okay";
};

&pll {
	div-m = <4>;
	mul-n = <40>;
	div-p = <7>;
	div-q = <2>;
	div-r = <2>;
	clocks = <&clk_hse>;
	status = "okay";
};

&rcc {
	clocks = <&pll>;
	clock-frequency = <DT_FREQ_M(80)>;
	ahb-prescaler = <1>;
	apb1-prescaler = <1>;
	apb2-prescaler = <1>;
};

&usart1 {
	pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
	current-speed = <115200>;
	status = "okay";
};

&usart2 {
	pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
	current-speed = <115200>;
	status = "okay";
};

&i2c1 {
	pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
	status = "okay";
	clock-frequency = <I2C_BITRATE_FAST>;

	hts221@5f {
		compatible = "st,hts221";
		reg = <0x5f>;
		label = "HTS221";
		drdy-gpios = <&gpiod 13 GPIO_ACTIVE_HIGH>;
	};

	lps22hh@5d {
		compatible = "st,lps22hh";
		reg = <0x5d>;
		label = "LPS22HH";
		drdy-gpios = <&gpiod 15 GPIO_ACTIVE_HIGH>;
	};
};

&i2c3 {
	pinctrl-0 = <&i2c3_scl_pg7 &i2c3_sda_pg8>;
	status = "okay";
	clock-frequency = <I2C_BITRATE_FAST>;

	stts751@38 {
		compatible = "st,stts751";
		reg = <0x38>;
		drdy-gpios = <&gpiog 5 GPIO_ACTIVE_LOW>;
		label = "STTS751";
	};
};

&spi1 {
	pinctrl-0 = <&spi1_nss_pe12 &spi1_sck_pe13
		     &spi1_miso_pe14 &spi1_mosi_pe15>;
	status = "okay";

	cs-gpios = <&gpioe 11 GPIO_ACTIVE_LOW>, <&gpioe 12 GPIO_ACTIVE_LOW>, <&gpioe 10 GPIO_ACTIVE_LOW>;

	lis2dw12@0 {
		compatible = "st,lis2dw12";
		spi-max-frequency = <1000000>;
		reg = <0>;
		irq-gpios = <&gpioc 5 GPIO_ACTIVE_HIGH>;
		label = "LIS2DW12";
	};

	lsm6dso@1 {
		compatible = "st,lsm6dso";
		spi-max-frequency = <1000000>;
		reg = <1>;
		irq-gpios = <&gpioa 2 GPIO_ACTIVE_HIGH>;
		label = "LSM6DSO";
		int-pin = <1>;
	};

	iis3dhhc@2 {
		compatible = "st,iis3dhhc";
		spi-max-frequency = <1000000>;
		reg = <2>;
		irq-gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>, <&gpioe 6 GPIO_ACTIVE_HIGH>;
		label = "IIS3DHHC";
	};
};

&spi3 {
	pinctrl-0 = <&spi3_nss_pa15 &spi3_sck_pb3
		     &spi3_miso_pb4 &spi3_mosi_pb5>;
	status = "okay";

	cs-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;

	lis2mdl@0 {
		compatible = "st,lis2mdl";
		spi-max-frequency = <1000000>;
		spi-full-duplex;
		reg = <0>;
		label = "LIS2MDL";
	};
};

zephyr_udc0: &usbotg_fs {
	pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
	status = "okay";
};

&timers2 {
	status = "okay";

	pwm {
		status = "okay";
	};
};

&rtc {
	status = "okay";
};

&flash0 {

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

		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x00000000 0x00010000>;
			read-only;
		};

		/*
		 * The flash starting at offset 0x10000 and ending at
		 * offset 0x1ffff is reserved for use by the application.
		 */

		slot0_partition: partition@20000 {
			label = "image-0";
			reg = <0x00020000 0x0006C000>;
		};
		slot1_partition: partition@8c000 {
			label = "image-1";
			reg = <0x0008C000 0x0006C000>;
		};
		scratch_partition: partition@f8000 {
			label = "image-scratch";
			reg = <0x000F8000 0x00006000>;
		};

		storage_partition: partition@fc000 {
			label = "storage";
			reg = <0x000fc000 0x00004000>;
		};
	};
};