samples: sensor: ccs811: use pinctrl for nrf board overlay

nRF boards now require usage of pinctrl, migrate them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-03-17 15:27:04 +01:00 committed by Carles Cufí
commit 9a265b03b4

View file

@ -4,10 +4,28 @@
* SPDX-License-Identifier: Apache-2.0
*/
&pinctrl {
i2c0_default_alt: i2c0_default_alt {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 0)>,
<NRF_PSEL(TWIM_SCL, 0, 1)>;
};
};
i2c0_sleep_alt: i2c0_sleep_alt {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 0)>,
<NRF_PSEL(TWIM_SCL, 0, 1)>;
low-power-enable;
};
};
};
&i2c0 {
status = "okay";
sda-pin = <0>;
scl-pin = <1>;
pinctrl-0 = <&i2c0_default_alt>;
pinctrl-1 = <&i2c0_sleep_alt>;
pinctrl-names = "default", "sleep";
/* Sparkfun Environment Combo uses second I2C address */
ccs811: ccs811@5b {