Migration from nrfconnect 1.9.1 to 2.4.2

Hi,

We could solve many of the issues in migration expect the following:
-- Found devicetree overlay: D:/nrf_2/v2.4.2/zephyr/samples/bluetooth/SLIMIot/boards/nrf5340dk_nrf5340_cpuapp.overlay
devicetree error: 'pinctrl-0' is marked as required in 'properties:' in D:/nrf_2/v2.4.2/zephyr/dts/bindings\i2c\nordic,nrf-twim.yaml, but does not appear in <Node /soc/peripheral@50000000/i2c@8000 in 'D:/nrf_2/v2.4.2/zephyr/misc/empty_file.c'>

Please help us understand this.

  • Hi,

    It seems that you are missing pin control in your devicetree overlay. This was introduced in v2.0.0 of nRF Connect SDK. Please see the Pin control guide for how to migrate to the new pin control mechanism.

    Here is an example:

    In v1.9.2 the I2C1 node on nRF5340 looked like this in devicetree (from nrf5340_cpuapp_common.dts):

    &i2c1 {
    	compatible = "nordic,nrf-twim";
    	status = "okay";
    	sda-pin = <34>;
    	scl-pin = <35>;
    };

    In v2.4.2 the pins are replaced with the pin control node (nrf5340_cpuapp_common.dts):

    &i2c1 {
    	compatible = "nordic,nrf-twim";
    	status = "okay";
    	pinctrl-0 = <&i2c1_default>;
    	pinctrl-1 = <&i2c1_sleep>;
    	pinctrl-names = "default", "sleep";
    };

    And the pin control node is configured in nrf5340_cpuapp_common-pinctrl.dtsi:

    &pinctrl {
    	i2c1_default: i2c1_default {
    		group1 {
    			psels = <NRF_PSEL(TWIM_SDA, 1, 2)>,
    				<NRF_PSEL(TWIM_SCL, 1, 3)>;
    		};
    	};
    
    	i2c1_sleep: i2c1_sleep {
    		group1 {
    			psels = <NRF_PSEL(TWIM_SDA, 1, 2)>,
    				<NRF_PSEL(TWIM_SCL, 1, 3)>;
    			low-power-enable;
    		};
    	};
    };

    I also recommend checking out our migration guide Migration notes for nRF Connect SDK v2.0.0.

    Best regards,
    Marte

Related