V Sowmya has uploaded this change for review. ( https://review.coreboot.org/21508
Change subject: mb/google/poppy: Modify the HID and add DSD for VCM device
......................................................................
mb/google/poppy: Modify the HID and add DSD for VCM device
Modify the HID to align with ACPI spec and add the DSD
object for the device tree support in kernel which will
probe the DW9714 device based on the PRP0001 HID.
BUG=none
BRANCH=none
TEST=Build and boot soraka. Verified that the VCM device
probe is successful.
Change-Id: Ic4a59dd2027267fbd3837fcd7dbc00551a69f7d6
Signed-off-by: V Sowmya <v.sowmya(a)intel.com>
---
M src/mainboard/google/poppy/acpi/mipi_camera.asl
1 file changed, 8 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/21508/1
diff --git a/src/mainboard/google/poppy/acpi/mipi_camera.asl b/src/mainboard/google/poppy/acpi/mipi_camera.asl
index 3cf4ec0..0732abb 100644
--- a/src/mainboard/google/poppy/acpi/mipi_camera.asl
+++ b/src/mainboard/google/poppy/acpi/mipi_camera.asl
@@ -703,7 +703,7 @@
Device (VCM0)
{
- Name (_HID, "DWDWD000") /* _HID: Hardware ID */
+ Name (_HID, "PRP0001") /* _HID: Hardware ID */
Name (_UID, Zero) /* _UID: Unique ID */
Name (_DDN, "Dongwoon AF DAC") /* _DDN: DOS Device Name */
Name (CAMD, 0x03)
@@ -722,6 +722,13 @@
)
})
+ Name (_DSD, Package () {
+ ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "compatible", "dongwoon,dw9714" },
+ }
+ })
+
Name (_PR0, Package () { ^PMIC.VCMP })
Name (_PR3, Package () { ^PMIC.VCMP })
}
--
To view, visit https://review.coreboot.org/21508
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4a59dd2027267fbd3837fcd7dbc00551a69f7d6
Gerrit-Change-Number: 21508
Gerrit-PatchSet: 1
Gerrit-Owner: V Sowmya <v.sowmya(a)intel.com>
Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/21506
Change subject: drivers: Add qcom wifi driver
......................................................................
drivers: Add qcom wifi driver
Change-Id: I84c5f5a8a8c480dcfc75d25aa275e26ab0728df3
Signed-off-by: Furquan Shaikh <furquan(a)chromium.org>
---
A src/drivers/qcom/wifi/Kconfig
A src/drivers/qcom/wifi/Makefile.inc
A src/drivers/qcom/wifi/chip.h
A src/drivers/qcom/wifi/wifi.c
4 files changed, 136 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/21506/1
diff --git a/src/drivers/qcom/wifi/Kconfig b/src/drivers/qcom/wifi/Kconfig
new file mode 100644
index 0000000..ac24a90
--- /dev/null
+++ b/src/drivers/qcom/wifi/Kconfig
@@ -0,0 +1,3 @@
+config DRIVERS_QCOM_WIFI
+ bool
+ depends on HAVE_ACPI_TABLES
diff --git a/src/drivers/qcom/wifi/Makefile.inc b/src/drivers/qcom/wifi/Makefile.inc
new file mode 100644
index 0000000..fbf5a0e
--- /dev/null
+++ b/src/drivers/qcom/wifi/Makefile.inc
@@ -0,0 +1,14 @@
+#
+# This file is part of the coreboot project.
+#
+# 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.
+#
+
+ramstage-$(CONFIG_DRIVERS_QCOM_WIFI) += wifi.c
diff --git a/src/drivers/qcom/wifi/chip.h b/src/drivers/qcom/wifi/chip.h
new file mode 100644
index 0000000..4cefa15
--- /dev/null
+++ b/src/drivers/qcom/wifi/chip.h
@@ -0,0 +1,23 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2017 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 __DRIVERS_QCOM_WIFI_CHIP_H__
+#define __DRIVERS_QCOM_WIFI_CHIP_H__
+
+struct drivers_qcom_wifi_config {
+ unsigned wake; /* Wake pin for ACPI _PRW */
+};
+
+#endif /* __DRIVERS_QCOM_WIFI_CHIP_H__ */
diff --git a/src/drivers/qcom/wifi/wifi.c b/src/drivers/qcom/wifi/wifi.c
new file mode 100644
index 0000000..626e31f
--- /dev/null
+++ b/src/drivers/qcom/wifi/wifi.c
@@ -0,0 +1,96 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2017 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 or (at your option)
+ * any later version 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.
+ */
+
+#include <arch/acpi_device.h>
+#include <arch/acpigen.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <device/path.h>
+#include <device/pci.h>
+#include "chip.h"
+
+static void qcom_wifi_fill_ssdt(struct device *dev)
+{
+ struct drivers_qcom_wifi_config *config = dev->chip_info;
+ const char *path = acpi_device_path(dev->bus->dev);
+ u32 address;
+
+ if (!dev->enabled || !path)
+ return;
+
+ /* Device */
+ acpigen_write_scope(path);
+ acpigen_write_device(acpi_device_name(dev));
+ acpigen_write_name_integer("_UID", 0);
+ if (dev->chip_ops)
+ acpigen_write_name_string("_DDN", dev->chip_ops->name);
+
+ /* Address */
+ address = PCI_SLOT(dev->path.pci.devfn) & 0xffff;
+ address <<= 16;
+ address |= PCI_FUNC(dev->path.pci.devfn) & 0xffff;
+ acpigen_write_name_dword("_ADR", address);
+
+ /* Wake capabilities */
+ if (config && config->wake)
+ acpigen_write_PRW(config->wake, 3);
+
+ acpigen_pop_len(); /* Device */
+ acpigen_pop_len(); /* Scope */
+
+ printk(BIOS_INFO, "%s.%s: %s %s\n", path, acpi_device_name(dev),
+ dev->chip_ops ? dev->chip_ops->name : "", dev_path(dev));
+}
+
+static const char *qcom_wifi_acpi_name(struct device *dev)
+{
+ return "QWFI";
+}
+
+static struct pci_operations pci_ops = {
+ .set_subsystem = pci_dev_set_subsystem,
+};
+
+struct device_operations qcom_wifi_ops = {
+ .read_resources = pci_dev_read_resources,
+ .set_resources = pci_dev_set_resources,
+ .enable_resources = pci_dev_enable_resources,
+ .init = pci_dev_init,
+ .ops_pci = &pci_ops,
+ .acpi_name = &qcom_wifi_acpi_name,
+ .acpi_fill_ssdt_generator = &qcom_wifi_fill_ssdt,
+};
+
+static const unsigned short pci_device_ids[] = {
+ 0x003E,
+ 0
+};
+
+static const struct pci_driver qcom_wifi __pci_driver = {
+ .ops = &qcom_wifi_ops,
+ .vendor = 0x168C,
+ .devices = pci_device_ids,
+};
+
+static void qcom_wifi_enable(struct device *dev)
+{
+ dev->ops = &qcom_wifi_ops;
+}
+
+struct chip_operations drivers_qcom_wifi_ops = {
+ CHIP_NAME("QCOM WiFi")
+ .enable_dev = &qcom_wifi_enable
+};
--
To view, visit https://review.coreboot.org/21506
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I84c5f5a8a8c480dcfc75d25aa275e26ab0728df3
Gerrit-Change-Number: 21506
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>