Communication with i2c sensor on custom board doesn't work

Hello!

I am completely new to embedded development and i am becoming quite desperate. 

I have ordered a custom board which has an nrf52840 chip on it and a vl53l1cxvofy1 ToF sensor. The big plan is simply to read the data from the sensor in a loop and send it to my phone over ble. I managed to set up an environment and to flash a simple printk() loop that i could read the output from on the rtt console. Now i wanted to try to access the sensor data so i created an overlay file which look like this: 

&pinctrl {
    i2c0_default: i2c0_default {
        group1 {
            psels = <
                NRF_PSEL(TWIM_SDA, 0, 21)
                NRF_PSEL(TWIM_SCL, 0, 19)
            >;
        };
    };

    i2c0_sleep: i2c0_sleep {
        group1 {
            psels = <
                NRF_PSEL(TWIM_SDA, 0, 21)
                NRF_PSEL(TWIM_SCL, 0, 19)
            >;
            low-power-enable;
        };
    };
};

&i2c0 {
    status = "okay";
    clock-frequency = <I2C_BITRATE_STANDARD>;
    pinctrl-0 = <&i2c0_default>;
    pinctrl-1 = <&i2c0_sleep>;
    pinctrl-names = "default", "sleep";

    vl53l1x: vl53l1x@29 {
        compatible = "st,vl53l1x";
        reg = <0x29>;
        label = "VL53L1X";
        xshut-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
    };
};
changed my prj.conf:
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_DEBUG=y
CONFIG_ASSERT=y
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_VL53L1X=y
CONFIG_LOG_PRINTK=y
And went ahead and tried to see if it would even be recognized like this:
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/sys/printk.h>

#define VL53L1X_NODE DT_NODELABEL(vl53l1x)

void main(void)
{
    const struct device *tof = DEVICE_DT_GET(VL53L1X_NODE);

    if (!device_is_ready(tof)) {
        printk("VL53L1X device not ready\n");
        return;
    }

    printk("VL53L1X ready\n");

    while (1) {
        struct sensor_value distance;

        if (sensor_sample_fetch(tof) < 0) {
            printk("Failed to fetch sample\n");
        } else if (sensor_channel_get(tof, SENSOR_CHAN_DISTANCE, &distance) < 0) {
            printk("Failed to get distance\n");
        } else {
            printk("Distance: %d mm\n", distance.val1);
        }

        k_msleep(500);
    }
}
Now it i get the following error when i debug it:

SEGGER J-Link V8.80 - Real time terminal output
SEGGER J-Link (unknown) V2.0, SN=802005688
Process: JLink.exe
[00:00:00.249,145] <dbg> os: setup_thread_stack: stack 0x20002e40 for thread 0x20000c40: obj_size=1088 buf_start=0x20002e80  buf_size 1024 stack_ptr=0x20003280
--- 13 messages dropped ---
[00:00:00.249,664] <dbg> VL53L1X: vl53l1x_initialize: [VL53L1X] Initializing 
[00:00:00.249,755] <dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2
[00:00:00.249,755] <dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2
[00:00:00.249,786] <dbg> mpu: region_init: [2] 0x20001c40 0x150b000a
[00:00:00.250,061] <dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2
[00:00:00.250,091] <dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2
[00:00:00.250,091] <dbg> mpu: region_init: [2] 0x20002e40 0x150b000a
[00:00:00.250,183] <dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2
[00:00:00.250,213] <dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2
[00:00:00.250,213] <dbg> mpu: region_init: [2] 0x20001c40 0x150b000a
[00:00:00.251,312] <dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2
[00:00:00.251,342] <dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2
[00:00:00.251,342] <dbg> mpu: region_init: [2] 0x20002e40 0x150b000a
[00:00:00.251,464] <dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2
[00:00:00.251,495] <dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2
[00:00:00.251,525] <dbg> mpu: region_init: [2] 0x20001c40 0x150b000a
[00:00:00.251,708] <dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2
[00:00:00.251,739] <dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2
[00:00:00.251,770] <dbg> mpu: region_init: [2] 0x20002e40 0x150b000a
[00:00:00.251,770] <err> VL53L1X: Failed to read
[00:00:00.251,831] <err> VL53L1X: [VL53L1X] VL53L1X_DataInit return error (-15)
*** Booting nRF Connect SDK v3.1.1-e2a97fe2578a ***
*** Using Zephyr OS v4.1.99-ff8f0c579eeb ***
[00:00:00.251,983] <dbg> os: k_sched_unlock: scheduler unlocked (0x20000c40:0)
VL53L1X device not ready
Related