summaryrefslogtreecommitdiff
path: root/zephyr/projects/nissa/craask/cbi.dts
blob: 4c2e052f4dfd25500410ca3bceb34adabe6b398c (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/* 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.
 */

/ {
	/* Craask-specific fw_config fields. */
	nissa-fw-config {
		/*
		 * FW_CONFIG field to describe Lid sensor orientation.
		 */
		lid-inversion {
			enum-name = "FW_LID_INVERSION";
			start = <8>;
			size = <1>;

			/*
			 * 0: regular placement of the lid sensor
			 * 1: rotate 180' of xy plane.
			 */
			regular {
				compatible = "cros-ec,cbi-fw-config-value";
				enum-name = "FW_LID_REGULAR";
				value = <0>;
				default;
			};
			xy_rotate_180 {
				compatible = "cros-ec,cbi-fw-config-value";
				enum-name = "FW_LID_XY_ROT_180";
				value = <1>;
			};
		};
		/*
		 * FW_CONFIG field to describe Clamshell/Convertible.
		 */
		form_factor {
			enum-name = "FORM_FACTOR";
			start = <9>;
			size = <1>;

			/*
			 * 0: convertible, 1: clamshell
			 */
			convertible {
				compatible = "cros-ec,cbi-fw-config-value";
				enum-name = "CONVERTIBLE";
				value = <0>;
			};
			clamshell {
				compatible = "cros-ec,cbi-fw-config-value";
				enum-name = "CLAMSHELL";
				value = <1>;
			};
		};
	};
	/* Craask-specific ssfc fields. */
	cbi-ssfc {
		compatible = "named-cbi-ssfc";
		/*
		 * SSFC bit0-1 was defined for AUDIO CODEC.
		 * 0: ALC5682I_VS
		 * 1: NAU8825
		 */
		audio_codec {
			enum-name = "AUDIO_CODEC";
			size = <2>;
		};
		/*
		 * SSFC field to identify LID motion sensor.
		 */
		lid-sensor {
			enum-name = "LID_SENSOR";
			size = <2>;

			lid_sensor_0: lis2dw12 {
				compatible = "named-cbi-ssfc-value";
				status = "okay";
				value = <0>;
				default;
			};
			lid_sensor_1: bma422 {
				compatible = "named-cbi-ssfc-value";
				status = "okay";
				value = <1>;
			};
		};
		/*
		 * SSFC field to identify BASE motion sensor.
		 */
		base-sensor {
			enum-name = "BASE_SENSOR";
			size = <2>;

			base_sensor_0: lsm6dso {
				compatible = "named-cbi-ssfc-value";
				status = "okay";
				value = <0>;
				default;
			};
			base_sensor_1: bmi323 {
				compatible = "named-cbi-ssfc-value";
				status = "okay";
				value = <1>;
			};
		};
	};
};