Hi.
I am currently working on a project using the nPM1300 as a pmic.
For this i have a battery and an nrf5340 connected to it.
Using zephyr i have even the following options enabled:
CONFIG_I2C=y CONFIG_REGULATOR=y CONFIG_MFD_NPM13XX_INIT_PRIORITY=51 CONFIG_REGULATOR_NPM13XX_COMMON_INIT_PRIORITY=52
as well as a kind of working device tree:
&i2c0 {
compatible = "nordic,nrf-twim";
status = "okay";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
npm1300_pmic: pmic@6b {
compatible = "nordic,npm1300";
reg = <0x6b>;
npm1300_gpio: gpio-controller {
compatible = "nordic,npm1300-gpio";
gpio-controller;
#gpio-cells = <2>;
ngpios = <5>;
};
regulators {
compatible = "nordic,npm1300-regulator";
npm1300_buck1: BUCK1 {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <3300000>;
regulator-init-microvolt = <2700000>;
retention-microvolt = <1000000>;
};
npm1300_buck2: BUCK2 {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <3300000>;
regulator-init-microvolt = <3300000>;
retention-microvolt = <1800000>;
};
npm1300_ldo1: LDO1 {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <3300000>;
regulator-init-microvolt = <3300000>;
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDO>;
regulator-boot-on;
};
npm1300_ldo2: LDO2 {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <3300000>;
regulator-init-microvolt = <2500000>;
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDO>;
regulator-boot-on;
};
};
npm1300_charger: charger {
compatible = "nordic,npm1300-charger";
term-microvolt = <3600000>;
term-warm-microvolt = <3600000>;
// term-current-percent = <10>;
current-microamp = <32000>;
// trickle-microvolt = <2900000>;
dischg-limit-microamp = <1000000>;
vbus-limit-microamp = <500000>;
thermistor-ohms = <10000>;
thermistor-beta = <3380>;
charging-enable;
};
npm1300_buttons: buttons {
compatible = "gpio-keys";
pushbutton: pushbutton {
gpios = <&npm1300_gpio 0 GPIO_ACTIVE_HIGH>;
label = "Pmic button switch 0";
zephyr,code = <INPUT_KEY_0>;
};
};
};My issue is now the following. I want to be able to start my Board without having a Battery/Powersupply connected. Just using USB Power.
Right now i have the nrf5340 connected to VSYS, but that is running into issues. Because i am unable to program the OTP section, so that its per default allowing 500mA of power via the USB interface.
My nrf never starts and it just stays offline. If I have it connected via a powersupply/Battery during startup, and connect usb then, I can still remove the power and keep it running via usb.
How can i make it so that my nrf sets the correct settings for the npm1300? And also as earyl as possible
Or do i need a need hardware revision for my pcb?