Skip to content

Commit afab08e

Browse files
committed
boards: pt2: define nPM1300
Define nPM1300 PMIC, together with all its devices that can be controlled. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent b6df2cf commit afab08e

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

boards/coredevices/pt2/pt2.dts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <zephyr/dt-bindings/gpio/gpio.h>
1212
#include <zephyr/dt-bindings/i2c/i2c.h>
1313
#include <zephyr/dt-bindings/input/input-event-codes.h>
14+
#include <zephyr/dt-bindings/regulator/npm13xx.h>
1415

1516
#include "pt2-pinctrl.dtsi"
1617

@@ -72,6 +73,10 @@
7273
status = "okay";
7374
};
7475

76+
&gpioa_00_31 {
77+
status = "okay";
78+
};
79+
7580
&gpioa_32_44 {
7681
status = "okay";
7782
};
@@ -85,6 +90,52 @@
8590
pinctrl-0 = <&i2c1_default>;
8691
pinctrl-names = "default";
8792
clock-frequency = <I2C_BITRATE_FAST>;
93+
94+
npm1300: pmic@6b {
95+
compatible = "nordic,npm1300";
96+
reg = <0x6b>;
97+
pmic-int-pin = <1>;
98+
host-int-gpios = <&gpioa_00_31 26 GPIO_ACTIVE_HIGH>;
99+
100+
npm1300_charger: charger {
101+
compatible = "nordic,npm1300-charger";
102+
term-microvolt = <4350000>;
103+
term-warm-microvolt = <4000000>;
104+
current-microamp = <185000>;
105+
dischg-limit-microamp = <200000>;
106+
vbus-limit-microamp = <500000>;
107+
thermistor-ohms = <10000>;
108+
thermistor-beta = <3380>;
109+
charging-enable;
110+
vbatlow-charge-enable;
111+
};
112+
113+
npm1300_gpio: gpio-controller {
114+
compatible = "nordic,npm1300-gpio";
115+
gpio-controller;
116+
#gpio-cells = <2>;
117+
ngpios = <4>;
118+
};
119+
120+
regulators {
121+
compatible = "nordic,npm1300-regulator";
122+
123+
npm1300_ldo1: LDO1 {
124+
regulator-allowed-modes = <NPM13XX_LDSW_MODE_LDO>;
125+
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDO>;
126+
regulator-min-microvolt = <1800000>;
127+
regulator-max-microvolt = <1800000>;
128+
};
129+
130+
npm1300_ldo2: LDO2 {
131+
regulator-allowed-modes = <NPM13XX_LDSW_MODE_LDO>;
132+
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDO>;
133+
regulator-min-microvolt = <3300000>;
134+
regulator-max-microvolt = <3300000>;
135+
};
136+
};
137+
138+
};
88139
};
89140

90141
&i2c2 {

0 commit comments

Comments
 (0)