18c2ecf20Sopenharmony_ciWhat:		/sys/kernel/debug/wilco_ec/h1_gpio
28c2ecf20Sopenharmony_ciDate:		April 2019
38c2ecf20Sopenharmony_ciKernelVersion:	5.2
48c2ecf20Sopenharmony_ciDescription:
58c2ecf20Sopenharmony_ci		As part of Chrome OS's FAFT (Fully Automated Firmware Testing)
68c2ecf20Sopenharmony_ci		tests, we need to ensure that the H1 chip is properly setting
78c2ecf20Sopenharmony_ci		some GPIO lines. The h1_gpio attribute exposes the state
88c2ecf20Sopenharmony_ci		of the lines:
98c2ecf20Sopenharmony_ci		- ENTRY_TO_FACT_MODE in BIT(0)
108c2ecf20Sopenharmony_ci		- SPI_CHROME_SEL in BIT(1)
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci		Output will formatted with "0x%02x\n".
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciWhat:		/sys/kernel/debug/wilco_ec/raw
158c2ecf20Sopenharmony_ciDate:		January 2019
168c2ecf20Sopenharmony_ciKernelVersion:	5.1
178c2ecf20Sopenharmony_ciDescription:
188c2ecf20Sopenharmony_ci		Write and read raw mailbox commands to the EC.
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci		You can write a hexadecimal sentence to raw, and that series of
218c2ecf20Sopenharmony_ci		bytes will be sent to the EC. Then, you can read the bytes of
228c2ecf20Sopenharmony_ci		response by reading from raw.
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci		For writing, bytes 0-1 indicate the message type, one of enum
258c2ecf20Sopenharmony_ci		wilco_ec_msg_type. Byte 2+ consist of the data passed in the
268c2ecf20Sopenharmony_ci		request, starting at MBOX[0]. At least three bytes are required
278c2ecf20Sopenharmony_ci		for writing, two for the type and at least a single byte of
288c2ecf20Sopenharmony_ci		data.
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci		Example::
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci		    // Request EC info type 3 (EC firmware build date)
338c2ecf20Sopenharmony_ci		    // Corresponds with sending type 0x00f0 with
348c2ecf20Sopenharmony_ci		    // MBOX = [38, 00, 03, 00]
358c2ecf20Sopenharmony_ci		    $ echo 00 f0 38 00 03 00 > /sys/kernel/debug/wilco_ec/raw
368c2ecf20Sopenharmony_ci		    // View the result. The decoded ASCII result "12/21/18" is
378c2ecf20Sopenharmony_ci		    // included after the raw hex.
388c2ecf20Sopenharmony_ci		    // Corresponds with MBOX = [00, 00, 31, 32, 2f, 32, 31, 38, ...]
398c2ecf20Sopenharmony_ci		    $ cat /sys/kernel/debug/wilco_ec/raw
408c2ecf20Sopenharmony_ci		    00 00 31 32 2f 32 31 2f 31 38 00 38 00 01 00 2f 00  ..12/21/18.8...
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci		Note that the first 16 bytes of the received MBOX[] will be
438c2ecf20Sopenharmony_ci		printed, even if some of the data is junk, and skipping bytes
448c2ecf20Sopenharmony_ci		17 to 32. It is up to you to know how many of the first bytes of
458c2ecf20Sopenharmony_ci		data are the actual response.
46