forked from nrfconnect/sdk-zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nrf fromlist] boards: nrf9160dk: Add DT node for I/O expander ...
... available in v0.14.0+ Upstream PR: zephyrproject-rtos/zephyr#31624 Add devicetree node representing the PCAL6408A I2C-based I/O expander that is available in nRF9160 DK v0.14.0 or later. Provide also .dtsi files that can be used in applications to simplify switching to interfacing onboard LEDs and buttons through this expander instead of SoC pins. Signed-off-by: Andrzej Głąbek <[email protected]>
- Loading branch information
Showing
6 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
boards/arm/nrf9160dk_nrf52840/dts/nrf9160dk_buttons_on_io_expander.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2021 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* NOTE: this feature is only available in nRF9160 DK v0.14.0 or later. */ | ||
|
||
&switch1_pin_routing { | ||
status = "disabled"; | ||
}; | ||
|
||
&switch2_pin_routing { | ||
status = "disabled"; | ||
}; | ||
|
||
&button1_pin_routing { | ||
status = "disabled"; | ||
}; | ||
|
||
&button2_pin_routing { | ||
status = "disabled"; | ||
}; | ||
|
||
&io_expander_pins_routing { | ||
status = "okay"; | ||
}; |
27 changes: 27 additions & 0 deletions
27
boards/arm/nrf9160dk_nrf52840/dts/nrf9160dk_leds_on_io_expander.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2021 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* NOTE: this feature is only available in nRF9160 DK v0.14.0 or later. */ | ||
|
||
&led1_pin_routing { | ||
status = "disabled"; | ||
}; | ||
|
||
&led2_pin_routing { | ||
status = "disabled"; | ||
}; | ||
|
||
&led3_pin_routing { | ||
status = "disabled"; | ||
}; | ||
|
||
&led4_pin_routing { | ||
status = "disabled"; | ||
}; | ||
|
||
&io_expander_pins_routing { | ||
status = "okay"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
boards/arm/nrf9160dk_nrf9160/dts/nrf9160dk_buttons_on_io_expander.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2021 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* NOTE: this feature is only available in nRF9160 DK v0.14.0 or later. */ | ||
|
||
&pcal6408a { | ||
status = "okay"; | ||
}; | ||
|
||
&button0 { | ||
gpios = <&pcal6408a 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button1 { | ||
gpios = <&pcal6408a 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button2 { | ||
gpios = <&pcal6408a 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button3 { | ||
gpios = <&pcal6408a 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; |
27 changes: 27 additions & 0 deletions
27
boards/arm/nrf9160dk_nrf9160/dts/nrf9160dk_leds_on_io_expander.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2021 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* NOTE: this feature is only available in nRF9160 DK v0.14.0 or later. */ | ||
|
||
&pcal6408a { | ||
status = "okay"; | ||
}; | ||
|
||
&led0 { | ||
gpios = <&pcal6408a 4 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
&led1 { | ||
gpios = <&pcal6408a 5 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
&led2 { | ||
gpios = <&pcal6408a 6 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
&led3 { | ||
gpios = <&pcal6408a 7 GPIO_ACTIVE_HIGH>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters