Skip to content

Commit 79484b3

Browse files
committed
samples: Add support for npm1304.
nrf52840 dk overlays are used to demonstrate npm1304. signed-off-by: Audun Korneliussen <[email protected]>
1 parent b2890be commit 79484b3

32 files changed

+63
-77
lines changed

drivers/npmx/Kconfig

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,21 @@ config NPMX_INIT_PRIORITY
2020
help
2121
NPMX initialization priority.
2222

23-
choice
24-
prompt "IC version"
25-
default NPMX_DEVICE_NPM1300
26-
27-
config NPMX_DEVICE_NPM1300
28-
depends on I2C && GPIO
29-
bool "nPM1300"
30-
31-
config NPMX_DEVICE_NPM1304
32-
depends on I2C && GPIO
33-
bool "nPM1304"
34-
endchoice
23+
config NPMX_DEVICE_NPM1300
24+
bool "nPM1300"
25+
default y
26+
select I2C
27+
depends on DT_HAS_NORDIC_NPMX_NPM1300_ENABLED
28+
help
29+
nPM1300 PMIC.
30+
31+
config NPMX_DEVICE_NPM1304
32+
bool "nPM1304"
33+
default y
34+
select I2C
35+
depends on DT_HAS_NORDIC_NPMX_NPM1304_ENABLED
36+
help
37+
nPM1304 PMIC.
3538

3639
config NPMX_SHELL
3740
depends on SHELL

samples/buck_output_advanced/boards/nrf52840dk_nrf52840.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
compatible = "nordic,nrf-twim";
99
status = "okay";
1010

11-
npm_0: npm1300@6b {
11+
npm_0: npm1304@6b {
1212
status = "okay";
13-
compatible = "nordic,npmx-npm1300";
13+
compatible = "nordic,npmx-npm1304";
1414
reg = <0x6b>;
1515
host-int-gpios = <&gpio1 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
1616
pmic-int-pin = <0>;

samples/buck_output_advanced/sample.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ common:
2020

2121
tests:
2222
sample.buck_output_advanced:
23-
extra_args: CONFIG_NPMX_DEVICE_NPM1300=y
2423
harness: console
2524
harness_config:
26-
fixture: nPM1300_setup
25+
fixture: nPM130x_setup
2726
type: multi_line
2827
ordered: true
2928
regex:

samples/buck_output_simple/boards/nrf52840dk_nrf52840.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
compatible = "nordic,nrf-twim";
99
status = "okay";
1010

11-
npm_0: npm1300@6b {
11+
npm_0: npm1304@6b {
1212
status = "okay";
13-
compatible = "nordic,npmx-npm1300";
13+
compatible = "nordic,npmx-npm1304";
1414
reg = <0x6b>;
1515
host-int-gpios = <&gpio1 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
1616
pmic-int-pin = <0>;

samples/buck_output_simple/sample.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ common:
2020

2121
tests:
2222
sample.buck_output_simple:
23-
extra_args: CONFIG_NPMX_DEVICE_NPM1300=y
2423
harness: console
2524
harness_config:
26-
fixture: nPM1300_setup
25+
fixture: nPM130x_setup
2726
type: multi_line
2827
ordered: true
2928
regex:

samples/buck_pins/boards/nrf52840dk_nrf52840.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
compatible = "nordic,nrf-twim";
99
status = "okay";
1010

11-
npm_0: npm1300@6b {
11+
npm_0: npm1304@6b {
1212
status = "okay";
13-
compatible = "nordic,npmx-npm1300";
13+
compatible = "nordic,npmx-npm1304";
1414
reg = <0x6b>;
1515
host-int-gpios = <&gpio1 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
1616
pmic-int-pin = <0>;

samples/buck_pins/sample.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ common:
2020

2121
tests:
2222
sample.buck_pins:
23-
extra_args: CONFIG_NPMX_DEVICE_NPM1300=y
2423
harness: console
2524
harness_config:
26-
fixture: nPM1300_setup
25+
fixture: nPM130x_setup
2726
type: multi_line
2827
ordered: true
2928
regex:

samples/buck_retention/boards/nrf52840dk_nrf52840.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
compatible = "nordic,nrf-twim";
99
status = "okay";
1010

11-
npm_0: npm1300@6b {
11+
npm_0: npm1304@6b {
1212
status = "okay";
13-
compatible = "nordic,npmx-npm1300";
13+
compatible = "nordic,npmx-npm1304";
1414
reg = <0x6b>;
1515
host-int-gpios = <&gpio1 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
1616
pmic-int-pin = <0>;

samples/buck_retention/sample.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ common:
2020

2121
tests:
2222
sample.buck_retention:
23-
extra_args: CONFIG_NPMX_DEVICE_NPM1300=y
2423
harness: console
2524
harness_config:
26-
fixture: nPM1300_setup
25+
fixture: nPM130x_setup
2726
type: multi_line
2827
ordered: true
2928
regex:

samples/charger_and_events/boards/nrf52840dk_nrf52840.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
compatible = "nordic,nrf-twim";
99
status = "okay";
1010

11-
npm_0: npm1300@6b {
11+
npm_0: npm1304@6b {
1212
status = "okay";
13-
compatible = "nordic,npmx-npm1300";
13+
compatible = "nordic,npmx-npm1304";
1414
reg = <0x6b>;
1515
host-int-gpios = <&gpio1 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
1616
pmic-int-pin = <0>;

0 commit comments

Comments
 (0)