summaryrefslogtreecommitdiff
path: root/zephyr/program/nissa/craask/cbi.dtsi
blob: fb87b16c395e99cefa96e94e6363b342b1d859e1 (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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
/* 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>;
			};
		};

		/*
		 * FW_CONFIG field to indicate which keyboard numeric
		 * pad should be used.
		 */
		kb-numeric-pad {
			enum-name = "FW_KB_NUMERIC_PAD";
			start = <16>;
			size = <1>;

			no-kb-numpad {
				compatible = "cros-ec,cbi-fw-config-value";
				enum-name = "FW_KB_NUMERIC_PAD_ABSENT";
				value = <0>;
				default;
			};
			kb-numpad-present {
				compatible = "cros-ec,cbi-fw-config-value";
				enum-name = "FW_KB_NUMERIC_PAD_PRESENT";
				value = <1>;
			};
		};

		/*
		 * FW_CONFIG field to enable fan or not.
		 */
		fan {
			enum-name = "FW_FAN";
			start = <17>;
			size = <1>;

			no-fan {
				compatible = "cros-ec,cbi-fw-config-value";
				enum-name = "FW_FAN_NOT_PRESENT";
				value = <0>;
			};
			fan-present {
				compatible = "cros-ec,cbi-fw-config-value";
				enum-name = "FW_FAN_PRESENT";
				value = <1>;
				/*
				 * Set as default so that unprovisioned
				 * configs will run the fan regardless.
				 */
				default;
			};
		};

		/*
		 * FW_CONFIG field to enable KB back light or not.
		 */
		kb-bl {
			enum-name = "FW_KB_BL";
			start = <18>;
			size = <1>;

			no-kb-bl {
				compatible = "cros-ec,cbi-fw-config-value";
				enum-name = "FW_KB_BL_NOT_PRESENT";
				value = <0>;
			};
			kb-bl-present {
				compatible = "cros-ec,cbi-fw-config-value";
				enum-name = "FW_KB_BL_PRESENT";
				value = <1>;
			};
		};
	};
	/* Craask-specific ssfc fields. */
	cbi-ssfc {
		compatible = "cros-ec,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 = "cros-ec,cbi-ssfc-value";
				status = "okay";
				value = <0>;
				default;
			};
			lid_sensor_1: bma422 {
				compatible = "cros-ec,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 = "cros-ec,cbi-ssfc-value";
				status = "okay";
				value = <0>;
				default;
			};
			base_sensor_1: bmi323 {
				compatible = "cros-ec,cbi-ssfc-value";
				status = "okay";
				value = <1>;
			};
		};
	};
};