Skip to content

Commit 5591c2d

Browse files
committed
[nrf fromtree] dts: bindings: add npm1304 extracting common from npm1300
Add nPM1304 device tree bindings. Extract the properties common to nPM1300 and nPM1304 into npm13xx-common files. Signed-off-by: Sergei Ovchinnikov <[email protected]> (cherry picked from commit 34188c4)
1 parent 98e6787 commit 5591c2d

14 files changed

+374
-221
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: nPM1304 GPIO Controller
5+
6+
compatible: "nordic,npm1304-gpio"
7+
8+
include: gpio-controller.yaml
9+
10+
gpio-cells:
11+
- pin
12+
- flags

dts/bindings/led/nordic,npm1300-led.yaml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,4 @@ description: |
1010
1111
compatible: "nordic,npm1300-led"
1212

13-
properties:
14-
nordic,led0-mode:
15-
type: string
16-
required: true
17-
enum:
18-
- error
19-
- charging
20-
- host
21-
description: LED 0 mode
22-
23-
nordic,led1-mode:
24-
type: string
25-
required: true
26-
enum:
27-
- error
28-
- charging
29-
- host
30-
description: LED 1 mode
31-
32-
nordic,led2-mode:
33-
type: string
34-
required: true
35-
enum:
36-
- error
37-
- charging
38-
- host
39-
description: LED 2 mode
13+
include: "nordic,npm13xx-led-common.yaml"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: |
5+
Nordic nPM1304 LED controller
6+
7+
The nPM1304 has three LED outputs.
8+
Each LED can automatically display error or charging status,
9+
or be controlled by software.
10+
11+
compatible: "nordic,npm1304-led"
12+
13+
include: "nordic,npm13xx-led-common.yaml"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Nordic nPM13xx LED controller common properties
5+
6+
properties:
7+
nordic,led0-mode:
8+
type: string
9+
required: true
10+
enum:
11+
- error
12+
- charging
13+
- host
14+
description: LED 0 mode
15+
16+
nordic,led1-mode:
17+
type: string
18+
required: true
19+
enum:
20+
- error
21+
- charging
22+
- host
23+
description: LED 1 mode
24+
25+
nordic,led2-mode:
26+
type: string
27+
required: true
28+
enum:
29+
- error
30+
- charging
31+
- host
32+
description: LED 2 mode

dts/bindings/mfd/nordic,npm1300.yaml

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,4 @@ description: Nordic nPM1300
55

66
compatible: "nordic,npm1300"
77

8-
include: i2c-device.yaml
9-
10-
properties:
11-
reg:
12-
required: true
13-
14-
host-int-gpios:
15-
type: phandle-array
16-
description: Host pin for interrupt input
17-
18-
pmic-int-pin:
19-
type: int
20-
description: Pmic pin number for interrupt output
21-
22-
ship-to-active-time-ms:
23-
type: int
24-
description: |
25-
Press duration required to wake from ship / hibernate in ms.
26-
The default is the device powerup value.
27-
enum:
28-
- 16
29-
- 32
30-
- 64
31-
- 96
32-
- 304
33-
- 608
34-
- 1008
35-
- 3008
36-
default: 96
37-
38-
long-press-reset:
39-
type: string
40-
description: Long press reset configuration
41-
enum:
42-
- "one-button"
43-
- "disabled"
44-
- "two-button"
8+
include: "nordic,npm13xx-common.yaml"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Nordic nPM1304
5+
6+
compatible: "nordic,npm1304"
7+
8+
include: nordic,npm13xx-common.yaml
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Nordic nPM13xx common properties
5+
6+
include: i2c-device.yaml
7+
8+
properties:
9+
reg:
10+
required: true
11+
12+
host-int-gpios:
13+
type: phandle-array
14+
description: Host pin for interrupt input
15+
16+
pmic-int-pin:
17+
type: int
18+
description: Pmic pin number for interrupt output
19+
20+
ship-to-active-time-ms:
21+
type: int
22+
description: |
23+
Press duration required to wake from ship / hibernate in ms.
24+
The default is the device powerup value.
25+
enum:
26+
- 16
27+
- 32
28+
- 64
29+
- 96
30+
- 304
31+
- 608
32+
- 1008
33+
- 3008
34+
default: 96
35+
36+
long-press-reset:
37+
type: string
38+
description: Long press reset configuration
39+
enum:
40+
- "one-button"
41+
- "disabled"
42+
- "two-button"

dts/bindings/regulator/nordic,npm1300-regulator.yaml

Lines changed: 1 addition & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -32,82 +32,4 @@ description: |
3232
3333
compatible: "nordic,npm1300-regulator"
3434

35-
include: base.yaml
36-
37-
properties:
38-
dvs-gpios:
39-
type: phandle-array
40-
description: |
41-
List of SOC GPIOs connected to PMIC GPIOs.
42-
Set_dvs_mode will drive these pins as follows:
43-
DVS mode 1 will enable the first pin
44-
DVS mode 2 will enable the second pin
45-
DVS mode 3 will drive the first and second pins
46-
etc.
47-
The effect of the mode change is defined by the enable-gpios
48-
and pwm_gpios fields for each of the regulator blocks.
49-
50-
child-binding:
51-
include:
52-
- name: regulator.yaml
53-
property-allowlist:
54-
- regulator-always-on
55-
- regulator-boot-on
56-
- regulator-boot-off
57-
- regulator-min-microvolt
58-
- regulator-max-microvolt
59-
- regulator-init-microvolt
60-
- regulator-allowed-modes
61-
- regulator-initial-mode
62-
- regulator-min-microamp
63-
- regulator-max-microamp
64-
- startup-delay-us
65-
- off-on-delay-us
66-
67-
properties:
68-
retention-microvolt:
69-
type: int
70-
description: |
71-
Retention mode voltage in microvolts.
72-
73-
enable-gpio-config:
74-
type: array
75-
description: |
76-
Regulator enable controlled by specified GPIO pin <idx flags>.
77-
When set regulator must be enabled/disabled using set_dvs_mode.
78-
79-
pwm-gpio-config:
80-
type: array
81-
description: |
82-
Regulator enable controlled by specified GPIO pin <idx flags>.
83-
When set regulator must be enabled/disabled using set_dvs_mode.
84-
85-
retention-gpio-config:
86-
type: array
87-
description: |
88-
Retention mode controlled by specified GPIO pin <idx flags>.
89-
90-
soft-start-microamp:
91-
type: int
92-
enum:
93-
- 10000
94-
- 20000
95-
- 35000
96-
- 50000
97-
description: |
98-
Soft start current limit in microamps.
99-
100-
active-discharge:
101-
type: boolean
102-
description: |
103-
Enable active-discharge on the BUCK/LDO/LDSW output when disabled.
104-
105-
nordic,anomaly38-disable-workaround:
106-
type: boolean
107-
description: |
108-
Disable the SW workaround for nPM1300 anomaly #38.
109-
When nPM1300 is in ULP mode, LDO is supplied from VSYS and
110-
then LDO is enabled, it can take long time until the LDO
111-
output has reached its target voltage. To avoid this, an i2c
112-
read is performed shortly after an LDO is enabled.
113-
See nPM1300 Errata manual for more details.
35+
include: "nordic,npm13xx-regulator-common.yaml"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: |
5+
Nordic nPM1304 PMIC
6+
7+
The PMIC has two buck converters and two LDOs.
8+
The regulators need to be defined as child nodes, strictly following the
9+
BUCK1,2 LDO1..2, node names. For
10+
example:
11+
12+
pmic@6b {
13+
reg = <0x6b>;
14+
...
15+
regulators {
16+
compatible = "nordic,npm1304-regulator";
17+
18+
BUCK1 {
19+
/* all properties for BUCK1 */
20+
};
21+
BUCK2 {
22+
/* all properties for BUCK2 */
23+
};
24+
LDO1 {
25+
/* all properties for LDO1 */
26+
};
27+
LDO2 {
28+
/* all properties for LDO2 */
29+
};
30+
};
31+
};
32+
33+
compatible: "nordic,npm1304-regulator"
34+
35+
include: "nordic,npm13xx-regulator-common.yaml"
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Nordic nPM13xx PMIC regulators common properties
5+
6+
include: base.yaml
7+
8+
properties:
9+
dvs-gpios:
10+
type: phandle-array
11+
description: |
12+
List of SOC GPIOs connected to PMIC GPIOs.
13+
Set_dvs_mode will drive these pins as follows:
14+
DVS mode 1 will enable the first pin
15+
DVS mode 2 will enable the second pin
16+
DVS mode 3 will drive the first and second pins
17+
etc.
18+
The effect of the mode change is defined by the enable-gpios
19+
and pwm_gpios fields for each of the regulator blocks.
20+
21+
child-binding:
22+
include:
23+
- name: regulator.yaml
24+
property-allowlist:
25+
- regulator-always-on
26+
- regulator-boot-on
27+
- regulator-boot-off
28+
- regulator-min-microvolt
29+
- regulator-max-microvolt
30+
- regulator-init-microvolt
31+
- regulator-allowed-modes
32+
- regulator-initial-mode
33+
- regulator-min-microamp
34+
- regulator-max-microamp
35+
- startup-delay-us
36+
- off-on-delay-us
37+
38+
properties:
39+
retention-microvolt:
40+
type: int
41+
description: |
42+
Retention mode voltage in microvolts.
43+
44+
enable-gpio-config:
45+
type: array
46+
description: |
47+
Regulator enable controlled by specified GPIO pin <idx flags>.
48+
When set regulator must be enabled/disabled using set_dvs_mode.
49+
50+
pwm-gpio-config:
51+
type: array
52+
description: |
53+
Regulator enable controlled by specified GPIO pin <idx flags>.
54+
When set regulator must be enabled/disabled using set_dvs_mode.
55+
56+
retention-gpio-config:
57+
type: array
58+
description: |
59+
Retention mode controlled by specified GPIO pin <idx flags>.
60+
61+
soft-start-microamp:
62+
type: int
63+
enum:
64+
- 10000
65+
- 20000
66+
- 35000
67+
- 50000
68+
description: |
69+
Soft start current limit in microamps.
70+
71+
active-discharge:
72+
type: boolean
73+
description: |
74+
Enable active-discharge on the BUCK/LDO/LDSW output when disabled.
75+
76+
nordic,anomaly38-disable-workaround:
77+
type: boolean
78+
description: |
79+
Disable the SW workaround for nPM13xx anomaly #38.
80+
When nPM13xx is in ULP mode, LDO is supplied from VSYS and
81+
then LDO is enabled, it can take long time until the LDO
82+
output has reached its target voltage. To avoid this, an i2c
83+
read is performed shortly after an LDO is enabled.
84+
See nPM13xx Errata manual for more details.

0 commit comments

Comments
 (0)