[coreboot-gerrit] Change in ...coreboot[master]: ec/google/wilco: Enable WiFi radio

Patrick Georgi (Code Review) gerrit at coreboot.org
Tue Dec 4 11:17:53 CET 2018


Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/29673 )

Change subject: ec/google/wilco: Enable WiFi radio
......................................................................

ec/google/wilco: Enable WiFi radio

Add EC command to enable WiFi radio and send that command at
startup.  Tested to ensure WiFi is functional on a sarien board.

Change-Id: Iac46895c7118567e1eb55ea33051a1662103b563
Signed-off-by: Duncan Laurie <dlaurie at google.com>
Reviewed-on: https://review.coreboot.org/c/29673
Reviewed-by: Furquan Shaikh <furquan at google.com>
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
---
M src/ec/google/wilco/chip.c
M src/ec/google/wilco/commands.c
M src/ec/google/wilco/commands.h
3 files changed, 26 insertions(+), 0 deletions(-)

Approvals:
  build bot (Jenkins): Verified
  Furquan Shaikh: Looks good to me, approved



diff --git a/src/ec/google/wilco/chip.c b/src/ec/google/wilco/chip.c
index 0cd0048..e1f468d 100644
--- a/src/ec/google/wilco/chip.c
+++ b/src/ec/google/wilco/chip.c
@@ -66,6 +66,9 @@
 
 	/* Unmute speakers */
 	wilco_ec_send(KB_HW_MUTE_CONTROL, AUDIO_UNMUTE_125MS);
+
+	/* Enable WiFi radio */
+	wilco_ec_radio_control(RADIO_WIFI, 1);
 }
 
 static void wilco_ec_resource(struct device *dev, int index,
diff --git a/src/ec/google/wilco/commands.c b/src/ec/google/wilco/commands.c
index 1767a01..c42699d 100644
--- a/src/ec/google/wilco/commands.c
+++ b/src/ec/google/wilco/commands.c
@@ -149,3 +149,12 @@
 			     KB_POWER_OFF, &reason, 1, NULL, 0) < 0)
 		printk(BIOS_ERR, "%s: command failed\n", __func__);
 }
+
+int wilco_ec_radio_control(enum ec_radio radio, uint8_t state)
+{
+	uint8_t radio_control[3] = { 0, radio, state };
+
+	return wilco_ec_mailbox(WILCO_EC_MSG_DEFAULT, KB_RADIO_CONTROL,
+				radio_control, ARRAY_SIZE(radio_control),
+				NULL, 0);
+}
diff --git a/src/ec/google/wilco/commands.h b/src/ec/google/wilco/commands.h
index 4a19030..0989b20 100644
--- a/src/ec/google/wilco/commands.h
+++ b/src/ec/google/wilco/commands.h
@@ -26,6 +26,8 @@
 	KB_POWER_STATUS = 0x05,
 	/* Inform the EC aboout the reason host is turning off */
 	KB_POWER_OFF = 0x08,
+	/* Control wireless radios */
+	KB_RADIO_CONTROL = 0x2b,
 	/* Save PS/2 data before S3 suspend */
 	KB_SAVE = 0x2f,
 	/* Restore PS/2 data after S3 resume */
@@ -61,6 +63,18 @@
 	AUDIO_UNMUTE_125MS,	/* Unmute in 125ms */
 };
 
+enum ec_radio {
+	RADIO_WIFI = 0x02,
+};
+
+/**
+ * wilco_ec_radio_control() - Control wireless radios.
+ * @ec_radio: Wireless radio type.
+ * @state: Turn radio on or off.
+ * Return: 0 if successful or negative error code on failure.
+ */
+int wilco_ec_radio_control(enum ec_radio radio, uint8_t state);
+
 /*
  * EC Information
  */

-- 
To view, visit https://review.coreboot.org/c/coreboot/+/29673
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iac46895c7118567e1eb55ea33051a1662103b563
Gerrit-Change-Number: 29673
Gerrit-PatchSet: 4
Gerrit-Owner: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181204/302d3dcd/attachment.html>


More information about the coreboot-gerrit mailing list