Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30034 )
Change subject: mb/google/sarien: Enable ISH
......................................................................
Patch Set 1:
I think you'll have to rebase this as I just submitted some changes that affected devicetree.cb
--
To view, visit https://review.coreboot.org/c/coreboot/+/30034
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0ba08c245d050aebc6eb06055690c422ab9b51c6
Gerrit-Change-Number: 30034
Gerrit-PatchSet: 1
Gerrit-Owner: Jett Rink <jettrink(a)chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Jett Rink <jettrink(a)chromium.org>
Gerrit-Reviewer: Li1 Feng <li1.feng(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Martin Roth <martinroth(a)google.com>
Gerrit-Comment-Date: Tue, 04 Dec 2018 22:53:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Duncan Laurie has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/29998 )
Change subject: acpi_pld: Make it easier to define the ACPI USB device groups
......................................................................
acpi_pld: Make it easier to define the ACPI USB device groups
The Linux kernel can use the ACPI _PLD group information to
determine peer ports. Currently to define the group information
the devicetree must provide a complete _PLD structure. This
change pulls the group information into a separate structure that
can be defined in devicetree. This makes it easier to set for
USB devices in devicetree that do not need a full custom PLD.
This was tested on a sarien board with the USB devices defined
by verifying that the USB 2/3 ports are correctly identified
with their peer in sysfs.
Change-Id: Ifd4cadf0f6c901eb3832ad4e1395904f99c2f5a0
Signed-off-by: Duncan Laurie <dlaurie(a)google.com>
Reviewed-on: https://review.coreboot.org/c/29998
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
---
M src/arch/x86/acpi_pld.c
M src/arch/x86/include/arch/acpi_pld.h
M src/drivers/usb/acpi/chip.h
M src/drivers/usb/acpi/usb_acpi.c
4 files changed, 33 insertions(+), 13 deletions(-)
Approvals:
build bot (Jenkins): Verified
Furquan Shaikh: Looks good to me, approved
diff --git a/src/arch/x86/acpi_pld.c b/src/arch/x86/acpi_pld.c
index d399ea6..904e9f7 100644
--- a/src/arch/x86/acpi_pld.c
+++ b/src/arch/x86/acpi_pld.c
@@ -18,7 +18,8 @@
#include <arch/acpi.h>
#include <arch/acpi_pld.h>
-int acpi_pld_fill_usb(struct acpi_pld *pld, enum acpi_upc_type type)
+int acpi_pld_fill_usb(struct acpi_pld *pld, enum acpi_upc_type type,
+ struct acpi_pld_group *group)
{
if (!pld)
return -1;
@@ -32,6 +33,8 @@
pld->horizontal_position = PLD_HORIZONTAL_POSITION_CENTER;
pld->rotation = PLD_ROTATE_0;
pld->visible = 1;
+ pld->group.token = group->token;
+ pld->group.position = group->position;
/* Set the shape based on port type */
switch (type) {
@@ -114,16 +117,16 @@
/* [77:74] Shape */
buf[9] |= (pld->shape & 0xf) << 2;
- /* [78] Group Orientation */
- buf[9] |= (pld->group_orientation & 0x1) << 6;
+ /* [78] Orientation */
+ buf[9] |= (pld->orientation & 0x1) << 6;
/* [86:79] Group Token (incorrectly defined as 1 bit in ACPI 6.2A) */
- buf[9] |= (pld->group_token & 0x1) << 7;
- buf[10] |= (pld->group_token >> 0x1) & 0x7f;
+ buf[9] |= (pld->group.token & 0x1) << 7;
+ buf[10] |= (pld->group.token >> 0x1) & 0x7f;
/* [94:87] Group Position */
- buf[10] |= (pld->group_position & 0x1) << 7;
- buf[11] |= (pld->group_position >> 0x1) & 0x7f;
+ buf[10] |= (pld->group.position & 0x1) << 7;
+ buf[11] |= (pld->group.position >> 0x1) & 0x7f;
/* [95] Bay */
buf[11] |= (pld->bay & 0x1) << 7;
diff --git a/src/arch/x86/include/arch/acpi_pld.h b/src/arch/x86/include/arch/acpi_pld.h
index ce279a0..1b4417d 100644
--- a/src/arch/x86/include/arch/acpi_pld.h
+++ b/src/arch/x86/include/arch/acpi_pld.h
@@ -75,6 +75,17 @@
PLD_ROTATE_315
};
+#define ACPI_PLD_GROUP(__token, __position) \
+ { \
+ .token = __token, \
+ .position = __position, \
+ }
+
+struct acpi_pld_group {
+ uint8_t token;
+ uint8_t position;
+};
+
struct acpi_pld {
/* Color field can be explicitly ignored */
bool ignore_color;
@@ -100,9 +111,8 @@
enum acpi_pld_rotate rotation;
/* Port grouping */
- enum acpi_pld_orientation group_orientation;
- uint8_t group_token;
- uint8_t group_position;
+ enum acpi_pld_orientation orientation;
+ struct acpi_pld_group group;
uint8_t draw_order;
uint8_t cabinet_number;
uint8_t card_cage_number;
@@ -112,7 +122,8 @@
};
/* Fill out PLD structure with defaults based on USB port type */
-int acpi_pld_fill_usb(struct acpi_pld *pld, enum acpi_upc_type type);
+int acpi_pld_fill_usb(struct acpi_pld *pld, enum acpi_upc_type type,
+ struct acpi_pld_group *group);
/* Turn PLD structure into a 20 byte ACPI buffer */
int acpi_pld_to_buffer(const struct acpi_pld *pld, uint8_t *buf, int buf_len);
diff --git a/src/drivers/usb/acpi/chip.h b/src/drivers/usb/acpi/chip.h
index 6429f13..512893d 100644
--- a/src/drivers/usb/acpi/chip.h
+++ b/src/drivers/usb/acpi/chip.h
@@ -46,7 +46,13 @@
*/
enum acpi_upc_type type;
- /* Define a custom physical location for the port */
+ /* Group peer ports */
+ struct acpi_pld_group group;
+
+ /*
+ * Define a custom physical location for the port.
+ * If enabled, this takes precedence over the 'group' field.
+ */
bool use_custom_pld;
struct acpi_pld custom_pld;
diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c
index f049e68..abc1718 100644
--- a/src/drivers/usb/acpi/usb_acpi.c
+++ b/src/drivers/usb/acpi/usb_acpi.c
@@ -57,7 +57,7 @@
} else {
/* Fill PLD strucutre based on port type */
struct acpi_pld pld;
- acpi_pld_fill_usb(&pld, config->type);
+ acpi_pld_fill_usb(&pld, config->type, &config->group);
acpigen_write_pld(&pld);
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/29998
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifd4cadf0f6c901eb3832ad4e1395904f99c2f5a0
Gerrit-Change-Number: 29998
Gerrit-PatchSet: 6
Gerrit-Owner: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Duncan Laurie has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/29996 )
Change subject: soc/intel/cannonlake: Increase bootblock size
......................................................................
soc/intel/cannonlake: Increase bootblock size
Increase the bootblock size to 48K to match skylake. With UART
enabled we are very near the 32K limit, and with upcoming changes
to add USB devices in devicetree for a cannonlake board it is over
the current 32K limit.
Change-Id: I155cb0a6af1746af6833fa9f35c2ea6fe0bc709f
Signed-off-by: Duncan Laurie <dlaurie(a)google.com>
Reviewed-on: https://review.coreboot.org/c/29996
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
---
M src/soc/intel/cannonlake/Kconfig
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Furquan Shaikh: Looks good to me, approved
diff --git a/src/soc/intel/cannonlake/Kconfig b/src/soc/intel/cannonlake/Kconfig
index 9452b6d..78c6dfe 100644
--- a/src/soc/intel/cannonlake/Kconfig
+++ b/src/soc/intel/cannonlake/Kconfig
@@ -230,7 +230,7 @@
config C_ENV_BOOTBLOCK_SIZE
hex
- default 0x8000
+ default 0xC000
config CBFS_SIZE
hex
--
To view, visit https://review.coreboot.org/c/coreboot/+/29996
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I155cb0a6af1746af6833fa9f35c2ea6fe0bc709f
Gerrit-Change-Number: 29996
Gerrit-PatchSet: 5
Gerrit-Owner: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Duncan Laurie has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/29987 )
Change subject: ec/google/wilco: Turn camera power on
......................................................................
ec/google/wilco: Turn camera power on
Send the EC command required to turn the camera power on
and verify that it shows up on the USB bus.
Change-Id: I9e9ba712a11cef85cde91ac21a4b6b5090ef58dc
Signed-off-by: Duncan Laurie <dlaurie(a)google.com>
Reviewed-on: https://review.coreboot.org/c/29987
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
---
M src/ec/google/wilco/chip.c
M src/ec/google/wilco/commands.h
2 files changed, 10 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 e1f468d..a9caaec 100644
--- a/src/ec/google/wilco/chip.c
+++ b/src/ec/google/wilco/chip.c
@@ -69,6 +69,9 @@
/* Enable WiFi radio */
wilco_ec_radio_control(RADIO_WIFI, 1);
+
+ /* Turn on camera power */
+ wilco_ec_send(KB_CAMERA, CAMERA_ON);
}
static void wilco_ec_resource(struct device *dev, int index,
diff --git a/src/ec/google/wilco/commands.h b/src/ec/google/wilco/commands.h
index 0989b20..752e19b 100644
--- a/src/ec/google/wilco/commands.h
+++ b/src/ec/google/wilco/commands.h
@@ -32,6 +32,8 @@
KB_SAVE = 0x2f,
/* Restore PS/2 data after S3 resume */
KB_RESTORE = 0x30,
+ /* Manage the EC control of camera power */
+ KB_CAMERA = 0x33,
/* Retrieve information about the EC */
KB_EC_INFO = 0x38,
/* Set ACPI mode on or off */
@@ -67,6 +69,11 @@
RADIO_WIFI = 0x02,
};
+enum ec_camera {
+ CAMERA_ON = 0,
+ CAMERA_OFF
+};
+
/**
* wilco_ec_radio_control() - Control wireless radios.
* @ec_radio: Wireless radio type.
--
To view, visit https://review.coreboot.org/c/coreboot/+/29987
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9e9ba712a11cef85cde91ac21a4b6b5090ef58dc
Gerrit-Change-Number: 29987
Gerrit-PatchSet: 5
Gerrit-Owner: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged