/*
 * Copyright (c) 2023 The ZMK Contributors
 *
 * SPDX-License-Identifier: MIT
 */

#include "mikoto-pinctrl.dtsi"
#include "arduino_pro_micro_pins_v6.dtsi"

&pinctrl {
    i2c1_default: i2c1_default {
        group1 {
            psels = <NRF_PSEL(TWIM_SDA, 0, 23)>,
                    <NRF_PSEL(TWIM_SCL, 0, 19)>;
            bias-pull-up;
        };
    };

    i2c1_sleep: i2c1_sleep {
        group1 {
            psels = <NRF_PSEL(TWIM_SDA, 0, 23)>,
                    <NRF_PSEL(TWIM_SCL, 0, 19)>;
            low-power-enable;
            bias-pull-up;
        };
    };
};

&i2c1 {
    status = "okay";
    compatible = "nordic,nrf-twi";
    pinctrl-0 = <&i2c1_default>;
    pinctrl-1 = <&i2c1_sleep>;
    pinctrl-names = "default", "sleep";

    builtin_fuel_gauge: max17048@36 {
        compatible = "zmk,maxim-max17048";
        status = "okay";
        reg = <0x36>;
    };
};

/ {
    chosen {
        zmk,battery = &builtin_fuel_gauge;
    };
};
