summaryrefslogtreecommitdiff
path: root/zephyr/test/krabby/common.dts
blob: b8f1eb0733a575ad0e1676fc558e4f7ba57749a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/* Copyright 2022 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include <it8xxx2_emul.dts>

/ {
	pinctrl: pinctrl {
		compatible = "ite,it8xxx2-pinctrl";
		status = "disabled";
	};

	named-i2c-ports {
		compatible = "named-i2c-ports";

		i2c_charger: charger {
			i2c-port = <&i2c_ctrl0>;
			enum-names = "I2C_PORT_CHARGER",
				"I2C_PORT_BATTERY";
		};
	};

	usbc {
		#address-cells = <1>;
		#size-cells = <0>;

		port0@0 {
			compatible = "named-usbc-port";
			status = "okay";
			reg = <0>;
			chg = <&charger>;
			tcpc = <&tcpci_emul>;
		};

		port1@1 {
			compatible = "named-usbc-port";
			status = "okay";
			reg = <1>;
			usb-mux-chain-1 {
				compatible = "cros-ec,usb-mux-chain";
				usb-muxes = <&tusb1064_mux_1>;
			};
		};
	};

	batteries {
		default_battery: lgc_ac17a8m {
			compatible = "lgc,ac17a8m", "battery-smart";
		};
	};
};

&i2c_ctrl0 {
	status="okay";

	charger: rt9490@53 {
		compatible = "zephyr,rt9490-emul";
		status = "okay";
		reg = <0x53>;
	};

	battery: sb@b {
		compatible = "zephyr,smart-battery";
		reg = <0xb>;
		cycle-count = <99>;
		version = "BATTERY_SPEC_VER_1_1_WITH_PEC";
		/* Real battery voltages are multiples of 4.4V. */
		desired-charg-volt = <5000>;
		desired-charg-cur = <1000>;
		mf-name = "LGC";
		dev-name = "AC17A8M";
	};

	tcpci_emul: tcpci_emul@82 {
		compatible = "cros,tcpci-generic-emul";
		status = "okay";
		reg = <0x82>;
	};
};

&i2c_ctrl4 {
	status="okay";

	tusb1064_mux_1: tusb1064-mux-1@44 {
		compatible = "zephyr,tusb1064-emul";
		reg = <0x44>;
		board-init = "tusb1064_mux_1_board_init";
	};
};