1/*
2 * Copyright (c) 2024 TOKITA Hiroshi
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6 #include <zephyr/dt-bindings/i2c/i2c.h>
7
8/ {
9	test {
10		#address-cells = <1>;
11		#size-cells = <1>;
12
13		test_gpio: gpio@deadbeef {
14			compatible = "vnd,gpio";
15			gpio-controller;
16			reg = <0xdeadbeef 0x1000>;
17			#gpio-cells = <0x2>;
18			status = "okay";
19		};
20
21		test_i2c: i2c@11112222 {
22			#address-cells = <1>;
23			#size-cells = <0>;
24			compatible = "vnd,i2c";
25			reg = <0x11112222 0x1000>;
26			status = "okay";
27			clock-frequency = <I2C_BITRATE_STANDARD>;
28
29			#include "i2c.dtsi"
30		};
31
32		test_adc: adc@adc0adc0 {
33			compatible = "vnd,adc";
34			reg = <0xadc0adc0 0x1000>;
35			#io-channel-cells = <1>;
36			#address-cells = <1>;
37			#size-cells = <0>;
38			status = "okay";
39
40			channel@0 {
41				reg = <0>;
42				zephyr,gain = "ADC_GAIN_1";
43				zephyr,reference = "ADC_REF_VDD_1";
44				zephyr,acquisition-time = <0>;
45			};
46		};
47
48		test_vbatt: vbatt {
49			compatible = "voltage-divider";
50			io-channels = <&test_adc 0>;
51			output-ohms = <180000>;
52			full-ohms = <(1500000 + 180000)>;
53			power-gpios = <&gpio0 16 0>;
54		};
55
56		test_fuel_gauge: fuel_gauge {
57			compatible = "zephyr,fuel-gauge-composite";
58			status = "okay";
59			battery-voltage = <&test_vbatt>;
60			device-chemistry = "lithium-ion-polymer";
61			ocv-capacity-table-0 = <0>;
62			charge-full-design-microamp-hours = <1350000>;
63		};
64	};
65};
66