[coreboot-gerrit] Change in coreboot[master]: google/kahlee: Add trackpad SMBIOS information

Marc Jones (Code Review) gerrit at coreboot.org
Fri Jun 23 07:51:36 CEST 2017


Marc Jones has uploaded this change for review. ( https://review.coreboot.org/20311


Change subject: google/kahlee: Add trackpad SMBIOS information
......................................................................

google/kahlee: Add trackpad SMBIOS information

Change-Id: I5920f91eac06fa74056dab8bee789c1513c425fa
Signed-off-by: Marc Jones <marcj303 at gmail.com>
---
M src/mainboard/google/kahlee/mainboard.c
A src/mainboard/google/kahlee/onboard.h
2 files changed, 44 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/20311/1

diff --git a/src/mainboard/google/kahlee/mainboard.c b/src/mainboard/google/kahlee/mainboard.c
index 1150a3c..b5800b4 100644
--- a/src/mainboard/google/kahlee/mainboard.c
+++ b/src/mainboard/google/kahlee/mainboard.c
@@ -19,6 +19,8 @@
 #include <agesawrapper.h>
 #include <amd_pci_util.h>
 #include <ec.h>
+#include "onboard.h"
+#include <smbios.h>
 
 /***********************************************************
  * These arrays set up the FCH PCI_INTR registers 0xC00/0xC01.
@@ -76,7 +78,22 @@
 	picr_data_ptr = mainboard_picr_data;
 }
 
+static int mainboard_smbios_data(device_t dev, int *handle,
+				 unsigned long *current)
+{
+	int len = 0;
 
+	len += smbios_write_type41(
+		current, handle,
+		BOARD_TRACKPAD_NAME,		/* name */
+		BOARD_TRACKPAD_IRQ,		/* instance */
+		BOARD_TRACKPAD_I2C_BUS,		/* segment */
+		BOARD_TRACKPAD_I2C_ADDR,	/* bus */
+		0,				/* device */
+		0);				/* function */
+
+	return len;
+}
 
 /*************************************************
  * Dedicated mainboard function
@@ -89,8 +106,10 @@
 	pirq_setup();
 
 	mainboard_ec_init();
+	dev->ops->get_smbios_data = mainboard_smbios_data;
 }
 
+
 struct chip_operations mainboard_ops = {
 	.enable_dev = kahlee_enable,
 };
diff --git a/src/mainboard/google/kahlee/onboard.h b/src/mainboard/google/kahlee/onboard.h
new file mode 100644
index 0000000..d51eac2
--- /dev/null
+++ b/src/mainboard/google/kahlee/onboard.h
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef ONBOARD_H
+#define ONBOARD_H
+
+#define BOARD_TRACKPAD_NAME		"trackpad"
+#define BOARD_TRACKPAD_IRQ		29
+#define BOARD_TRACKPAD_WAKE_GPIO	5	/* AGPIO5 */
+#define BOARD_TRACKPAD_I2C_BUS		3	/* I2C3 */
+#define BOARD_TRACKPAD_I2C_ADDR		0x15
+
+#endif

-- 
To view, visit https://review.coreboot.org/20311
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5920f91eac06fa74056dab8bee789c1513c425fa
Gerrit-Change-Number: 20311
Gerrit-PatchSet: 1
Gerrit-Owner: Marc Jones <marc at marcjonesconsulting.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170623/5b1c392c/attachment.html>


More information about the coreboot-gerrit mailing list