// To get started, press Ctrl+Space to bring up the completion menu and view the available nodes.

// You can also use the buttons in the sidebar to perform actions on nodes.
// Actions currently available include:

// * Enabling / disabling the node
// * Adding the bus to a bus
// * Removing the node
// * Connecting ADC channels

// For more help, browse the DeviceTree documentation at https://docs.zephyrproject.org/latest/guides/dts/index.html
// You can also visit the nRF DeviceTree extension documentation at https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/guides/ncs_configure_app.html#devicetree-support-in-the-extension

/ {
	my_gpios {
		OLEDrst: oled_rst {
        compatible = "nordic,gpio-pins";
        gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
        status = "okay";
		};
		OLEDisdata: oled_isdata {
        compatible = "nordic,gpio-pins";
        gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
        status = "okay";
		};
	};
	aliases {
        oledrst = &OLEDrst;
        oledisdata = &OLEDisdata;
    };
};

&uart30 {
	status = "disabled";
};

&spi30 {
    compatible = "nordic,nrf-spim";
	status = "okay";
	pinctrl-0 = <&spi30_default>;
	pinctrl-1 = <&spi30_sleep>;
	pinctrl-names = "default", "sleep";
	cs-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
	oled: oled@0 {
		status = "okay";
		compatible = "vnd,spi-device"; //"bosch,bme280";
		label = "oled";
		reg = <0>;
		spi-max-frequency = <8000000>;
	};
};

/* STEP 2.2 - Change the pin configuration */

/*  */
&pinctrl {
	spi30_default: spi30_default {
		group1 {
				psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
						<NRF_PSEL(SPIM_MOSI, 0, 0)>,
						<NRF_PSEL(SPIM_MISO, 0, 2)>;
		};
	};

	spi30_sleep: spi30_sleep {
		group1 {
				psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
						<NRF_PSEL(SPIM_MOSI, 0, 0)>,
						<NRF_PSEL(SPIM_MISO, 0, 2)>;
				low-power-enable;
		};
	};
};