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:
parent
c7b808b810
commit
9a265b03b4
1 changed files with 20 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue