1/* 2 * Copyright (C) 2023 Nordic Semiconductor ASA 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6#include <dt-bindings/regulator/npm1300.h> 7#include <zephyr/dt-bindings/input/input-event-codes.h> 8 9&arduino_i2c { 10 npm1300_ek_pmic: pmic@6b { 11 compatible = "nordic,npm1300"; 12 reg = <0x6b>; 13 14 npm1300_ek_gpio: gpio-controller { 15 compatible = "nordic,npm1300-gpio"; 16 gpio-controller; 17 #gpio-cells = <2>; 18 ngpios = <5>; 19 }; 20 21 npm1300_ek_regulators: regulators { 22 compatible = "nordic,npm1300-regulator"; 23 24 /* limits are set to min/max allowed values */ 25 npm1300_ek_buck1: BUCK1 { 26 regulator-min-microvolt = <1800000>; 27 regulator-max-microvolt = <3300000>; 28 }; 29 30 npm1300_ek_buck2: BUCK2 { 31 regulator-min-microvolt = <1000000>; 32 regulator-max-microvolt = <3300000>; 33 regulator-init-microvolt = <3300000>; 34 retention-microvolt = <2500000>; 35 enable-gpios = <&npm1300_ek_gpio 1 GPIO_ACTIVE_LOW>; 36 retention-gpios = <&npm1300_ek_gpio 2 GPIO_ACTIVE_HIGH>; 37 pwm-gpios = <&npm1300_ek_gpio 2 GPIO_ACTIVE_LOW>; 38 }; 39 40 npm1300_ek_ldo1: LDO1 { 41 regulator-min-microvolt = <1000000>; 42 regulator-max-microvolt = <3300000>; 43 regulator-initial-mode = <NPM1300_LDSW_MODE_LDO>; 44 enable-gpios = <&npm1300_ek_gpio 2 GPIO_ACTIVE_LOW>; 45 }; 46 47 npm1300_ek_ldo2: LDO2 { 48 regulator-min-microvolt = <1000000>; 49 regulator-max-microvolt = <3300000>; 50 regulator-initial-mode = <NPM1300_LDSW_MODE_LDSW>; 51 enable-gpios = <&npm1300_ek_gpio 2 GPIO_ACTIVE_LOW>; 52 }; 53 }; 54 55 npm1300_ek_charger: charger { 56 compatible = "nordic,npm1300-charger"; 57 term-microvolt = <4150000>; 58 term-warm-microvolt = <4000000>; 59 current-microamp = <150000>; 60 dischg-limit-microamp = <1000000>; 61 vbus-limit-microamp = <500000>; 62 thermistor-ohms = <10000>; 63 thermistor-beta = <3380>; 64 charging-enable; 65 }; 66 67 npm1300_ek_buttons: buttons { 68 compatible = "gpio-keys"; 69 pmic_button0: pmic_button_0 { 70 gpios = < &npm1300_ek_gpio 0 GPIO_ACTIVE_HIGH>; 71 label = "Pmic button switch 0"; 72 zephyr,code = <INPUT_KEY_0>; 73 }; 74 }; 75 76 npm1300_ek_leds: leds { 77 compatible = "nordic,npm1300-led"; 78 nordic,led0-mode = "error"; 79 nordic,led1-mode = "charging"; 80 nordic,led2-mode = "host"; 81 }; 82 }; 83}; 84