Flesh out 7.1 overlay with builtin max17048 dts node

This commit is contained in:
zhiayang 2023-10-01 03:07:21 -04:00
parent ef19be9d27
commit 87374722f6
No known key found for this signature in database
GPG key ID: 5E2F30AD6F08571F
6 changed files with 48 additions and 5 deletions

View file

@ -17,7 +17,7 @@
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_RX, 0, 4)>,
<NRF_PSEL(UART_TX, 0, 8)>;
<NRF_PSEL(UART_TX, 0, 8)>;
low-power-enable;
};
};
@ -25,14 +25,14 @@
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>;
<NRF_PSEL(TWIM_SCL, 0, 20)>;
};
};
i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>;
<NRF_PSEL(TWIM_SCL, 0, 20)>;
low-power-enable;
};
};

View file

@ -6,8 +6,8 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins_5_20_0.dtsi"
#include "mikoto_5_20_0-pinctrl.dtsi"
// #include "arduino_pro_micro_pins_5_20_0.dtsi"
// #include "mikoto_5_20_0-pinctrl.dtsi"
/ {
model = "mikoto";

View file

@ -4,4 +4,5 @@
* SPDX-License-Identifier: MIT
*/
#include "mikoto-pinctrl.dtsi"
#include "arduino_pro_micro_pins_5_20_0.dtsi"

View file

@ -4,4 +4,5 @@
* SPDX-License-Identifier: MIT
*/
#include "mikoto-pinctrl.dtsi"
#include "arduino_pro_micro_pins_6_1_0.dtsi"

View file

@ -0,0 +1,2 @@
CONFIG_I2C=y
CONFIG_MAX17048=y

View file

@ -4,4 +4,43 @@
* SPDX-License-Identifier: MIT
*/
#include "mikoto-pinctrl.dtsi"
#include "arduino_pro_micro_pins_6_1_0.dtsi"
&pinctrl {
i2c1_default: i2c1_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 23)>,
<NRF_PSEL(TWIM_SCL, 0, 19)>;
};
};
i2c1_sleep: i2c1_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 23)>,
<NRF_PSEL(TWIM_SCL, 0, 19)>;
low-power-enable;
};
};
};
&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 = "maxim,max17048";
status = "okay";
label = "max17048";
reg = <0x36>;
};
};
/ {
chosen {
zmk,battery = &builtin_fuel_gauge;
};
};