Device Tree not showing and updating as per my overlay present in the root directory

Hi All,

I am using 'NRF SDK v2.7 + NRF5340 DK + VSCode' and cloned a official nrf 'blinky' sample. The code and pins are working fine and I have verified using DK and logic analyzer. My confusion is since, I have defined a nrf5340dk_nrf5340_cpuapp.overlay  in my project root directory and properly selected for 'build configuration' as well but my device-tree is not reflecting/updating as per my new 'nrf5340dk_nrf5340_cpuapp.overlay' file. As you can see even though relays node and pinouts are defined the device-tree is not reflecting them. It is always showing that 'nrf5340dk_nrf5340_cpuapp.dts' are being used and that 'Editing SDK file!' is not a good idea[which is true of course].

My question and need help is that I don't want that to happen I want to show and be in sync with the pinouts as per my 'nrf5340dk_nrf5340_cpuapp.overlay'


Please also see attached my full overlay file. Thank you

/*
* Copyright (c) 2021-2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
};

leds: leds {
compatible = "gpio-leds";
status = "okay";

led_red: ledred {
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
label = "BHT Red Led";
};
led_blue: ledblue {
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
label = "BHT Blue Led";
};
};

relays: relays {
compatible = "gpio-leds";
status = "okay";

relay1: relay1 {
gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
label = "Relay 1";
};
relay2: relay2 {
gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
label = "Relay 2";
};
relay3: relay3 {
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
label = "Relay 3";
};
};


buttons: buttons {
compatible = "gpio-keys";
up_btn: up_input_s0 {
gpios = <&gpio0 23 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Up button";
};
down_pin: down_input_s1 {
gpios = <&gpio0 8 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Down button";
};
left_btn: left_input_s2 {
gpios = <&gpio0 24 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Left button";
};
right_pin: right_input_s3 {
gpios = <&gpio0 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Right button";
};
};

aliases {
led-red = &led_red;
led-blue = &led_blue;
led2 = &led_red;
led3 = &led_blue;

relay-1 = &relay1;
relay-2 = &relay2;
relay-3 = &relay3;

up-btn = &up_btn;
down-btn = &down_pin;
left-btn = &left_btn;
right-btn = &right_pin;

pwm0-ch0 = &pwm0_ch0_pin28;
pwm0-ch1 = &pwm0_ch1_pin29;
};
};

/* Set IPC thread priority to the highest value to not collide with other threads */
&ipc0 {
zephyr,priority = <0 PRIO_COOP>;
};

/* Disable unused peripherals to reduce power consumption */
&adc {
status = "disabled";
};
&i2c1 {
status = "disabled";
};
&spi2 {
status = "disabled";
};
&usbd {
status = "disabled";
};

&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default_alt>;
pinctrl-1 = <&pwm0_sleep_alt>;
pinctrl-names = "default", "sleep";
};

&pinctrl {
pwm0_default_alt: pwm0_default_alt {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 28)>;
nordic,invert;
};
group2 {
psels = <NRF_PSEL(PWM_OUT1, 0, 29)>;
nordic,invert;
};
};

pwm0_sleep_alt: pwm0_sleep_alt {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 28)>;
low-power-enable;
};
group2 {
psels = <NRF_PSEL(PWM_OUT1, 0, 29)>;
low-power-enable;
};
};
};

/ {
pwmleds {
compatible = "pwm-leds";

pwm0_ch0_pin28: pwm0_ch0_pin28 {
pwms = <&pwm0 0 20000 PWM_POLARITY_NORMAL>; // PWM on channel 0, pin 0.28
label = "PWM LED on pin 0.28";
};

pwm0_ch1_pin29: pwm0_ch1_pin29 {
pwms = <&pwm0 1 20000 PWM_POLARITY_NORMAL>; // Second PWM on channel 1, pin 0.29
label = "PWM LED on pin 0.29";
};
};
};

Related