EricR Lai has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32519
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
mb/google/sarien: Turn off camera power when s0ix
Turn off camera power when s0ix for power saving. ACPI _ON/_OFF is not taken by UVC driver, so invoke s0ix method from LPIT.
BUG=b:129177593 TEST= measure camera power comsumption is 0mV under s0ix
Change-Id: I5a9b7ec1e95cc9931d8d5f2dc1254805c9d0ffed Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com --- M src/mainboard/google/sarien/dsdt.asl A src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl A src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl M src/soc/intel/cannonlake/acpi/lpit.asl 4 files changed, 62 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/32519/1
diff --git a/src/mainboard/google/sarien/dsdt.asl b/src/mainboard/google/sarien/dsdt.asl index e5b0cca..58e0704 100644 --- a/src/mainboard/google/sarien/dsdt.asl +++ b/src/mainboard/google/sarien/dsdt.asl @@ -40,6 +40,8 @@ #include <soc/intel/cannonlake/acpi/northbridge.asl> #include <soc/intel/cannonlake/acpi/southbridge.asl> } + /* Per board variant mainboard hooks. */ + #include <variant/acpi/mainboard.asl> }
#if CONFIG(CHROMEOS) diff --git a/src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl b/src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl new file mode 100644 index 0000000..7c22710 --- /dev/null +++ b/src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl @@ -0,0 +1,29 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Intel Corp. + * + * 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. + */ + +#define CAM_EN GPP_B11 + +/* Method called from LPIT prior to enter s0ix state */ +Method (MS0X, 1) { + If (Arg0) { + Printf ("OS Enter S0ix") + /* Turn on camera power */ + _SB.PCI0.STXS (GPP_B11) + } Else { + Printf ("OS Exit S0ix") + /* Turn off camera power */ + _SB.PCI0.CTXS (GPP_B11) + } +} diff --git a/src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl b/src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl new file mode 100644 index 0000000..7c22710 --- /dev/null +++ b/src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl @@ -0,0 +1,29 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Intel Corp. + * + * 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. + */ + +#define CAM_EN GPP_B11 + +/* Method called from LPIT prior to enter s0ix state */ +Method (MS0X, 1) { + If (Arg0) { + Printf ("OS Enter S0ix") + /* Turn on camera power */ + _SB.PCI0.STXS (GPP_B11) + } Else { + Printf ("OS Exit S0ix") + /* Turn off camera power */ + _SB.PCI0.CTXS (GPP_B11) + } +} diff --git a/src/soc/intel/cannonlake/acpi/lpit.asl b/src/soc/intel/cannonlake/acpi/lpit.asl index 8515806..00115a5 100644 --- a/src/soc/intel/cannonlake/acpi/lpit.asl +++ b/src/soc/intel/cannonlake/acpi/lpit.asl @@ -62,12 +62,14 @@ */ If(Arg2 == 5) { _SB.PCI0.LPCB.EC0.S0IX(1) + _SB.MS0X(1) } /* * Function 6. */ If(Arg2 == 6) { _SB.PCI0.LPCB.EC0.S0IX(0) + _SB.MS0X(0) } } Return(Buffer(One) {0x00})
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 1:
Please help review and give some advise.
Hello Patrick Rudolph, Duncan Laurie, build bot (Jenkins), Lijian Zhao, Patrick Georgi, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32519
to look at the new patch set (#3).
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
mb/google/sarien: Turn off camera power when s0ix
Turn off camera power when s0ix for power saving. ACPI _ON/_OFF is not taken by UVC driver, so invoke s0ix method from LPIT.
BUG=b:129177593 TEST= measure camera power comsumption is 0mV under s0ix
Change-Id: I5a9b7ec1e95cc9931d8d5f2dc1254805c9d0ffed Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com --- M src/mainboard/google/sarien/dsdt.asl A src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl A src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl M src/soc/intel/cannonlake/acpi/lpit.asl 4 files changed, 66 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/32519/3
Hello Patrick Rudolph, Duncan Laurie, build bot (Jenkins), Lijian Zhao, Patrick Georgi, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32519
to look at the new patch set (#4).
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
mb/google/sarien: Turn off camera power when s0ix
Turn off camera power when s0ix for power saving. ACPI _ON/_OFF is not taken by UVC driver, so invoke s0ix method from LPIT.
BUG=b:129177593 TEST= measure camera power comsumption is 0mV under s0ix
Change-Id: I5a9b7ec1e95cc9931d8d5f2dc1254805c9d0ffed Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com --- M src/mainboard/google/sarien/dsdt.asl A src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl A src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl M src/soc/intel/cannonlake/acpi/lpit.asl 4 files changed, 68 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/32519/4
Lijian Zhao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/#/c/32519/4/src/soc/intel/cannonlake/acpi/lpit.a... File src/soc/intel/cannonlake/acpi/lpit.asl:
https://review.coreboot.org/#/c/32519/4/src/soc/intel/cannonlake/acpi/lpit.a... PS4, Line 67: If (CondRefOf (_SB.MS0X)) { : _SB.MS0X(1) : } Add a comment to describe that's the s0ix hooks at motherboard level, or make the MS0X looks more clear. On the other thought similar thing can be applied to EC0.S0IX as well.
Lijian Zhao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/#/c/32519/4/src/mainboard/google/sarien/variants... File src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl:
https://review.coreboot.org/#/c/32519/4/src/mainboard/google/sarien/variants... PS4, Line 21: Printf ("OS Enter S0ix") : /* Turn on camera power */ : _SB.PCI0.STXS (GPP_B11) Enter S0ix will turn off camera power and exit from s0ix will turn on camera power right?
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 6:
(2 comments)
https://review.coreboot.org/#/c/32519/4/src/mainboard/google/sarien/variants... File src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl:
https://review.coreboot.org/#/c/32519/4/src/mainboard/google/sarien/variants... PS4, Line 21: Printf ("OS Enter S0ix") : /* Turn on camera power */ : _SB.PCI0.STXS (GPP_B11)
Enter S0ix will turn off camera power and exit from s0ix will turn on camera power right?
oh yes, that's typo
https://review.coreboot.org/#/c/32519/4/src/soc/intel/cannonlake/acpi/lpit.a... File src/soc/intel/cannonlake/acpi/lpit.asl:
https://review.coreboot.org/#/c/32519/4/src/soc/intel/cannonlake/acpi/lpit.a... PS4, Line 67: If (CondRefOf (_SB.MS0X)) { : _SB.MS0X(1) : }
Add a comment to describe that's the s0ix hooks at motherboard level, or make the MS0X looks more cl […]
I don't know it proper to use EC interface, I think it's PCH behavior. And this project may need do other things like this... for the power consumption issue
Hello Patrick Rudolph, Duncan Laurie, build bot (Jenkins), Lijian Zhao, Patrick Georgi, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32519
to look at the new patch set (#7).
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
mb/google/sarien: Turn off camera power when s0ix
Turn off camera power when s0ix for power saving. ACPI _ON/_OFF is not taken by UVC driver, so invoke s0ix method from LPIT.
BUG=b:129177593 TEST= measure camera power comsumption is 0mV under s0ix
Change-Id: I5a9b7ec1e95cc9931d8d5f2dc1254805c9d0ffed Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com --- M src/mainboard/google/sarien/dsdt.asl A src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl A src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl M src/soc/intel/cannonlake/acpi/lpit.asl 4 files changed, 68 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/32519/7
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... File src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl:
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... PS7, Line 21: /* Turn off camera power */ Can this be done as part of MPTS: https://review.coreboot.org/c/coreboot/+/32366
since I believe that would be triggered for any kind of sleep and not just S0ix?
https://review.coreboot.org/#/c/32519/7/src/soc/intel/cannonlake/acpi/lpit.a... File src/soc/intel/cannonlake/acpi/lpit.asl:
https://review.coreboot.org/#/c/32519/7/src/soc/intel/cannonlake/acpi/lpit.a... PS7, Line 68: MS0X What does MS0X mean? Mainboard S0ix?
Lijian Zhao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... File src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl:
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... PS7, Line 21: /* Turn off camera power */
Can this be done as part of MPTS: https://review.coreboot.org/c/coreboot/+/32366 […]
_PTS can only support Sx but not S0ix I believe according to acpi sepc.
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... File src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl:
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... PS7, Line 21: /* Turn off camera power */
Can this be done as part of MPTS: https://review.coreboot.org/c/coreboot/+/32366 […]
I can't find what Arg0 would be for s0ix in _PTS. I can't find it description in ACPI spec. If it has define, of course we can do that.
https://review.coreboot.org/#/c/32519/7/src/soc/intel/cannonlake/acpi/lpit.a... File src/soc/intel/cannonlake/acpi/lpit.asl:
https://review.coreboot.org/#/c/32519/7/src/soc/intel/cannonlake/acpi/lpit.a... PS7, Line 68: MS0X
What does MS0X mean? Mainboard S0ix?
Yes, do you have a better idea? I am fine with this.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 7:
(5 comments)
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... File src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl:
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... PS7, Line 15: CAM_EN Did you mean to use this below in MS0X?
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... File src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl:
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... PS7, Line 15: CAM_EN Same here.
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... PS7, Line 21: /* Turn off camera power */
_PTS can only support Sx but not S0ix I believe according to acpi sepc.
Aah okay. Makes sense.
I can't find what Arg0 would be for s0ix in _PTS.
Like Lijian pointed out, this is not called for S0ix as per ACPI spec.
https://review.coreboot.org/#/c/32519/7/src/soc/intel/cannonlake/acpi/lpit.a... File src/soc/intel/cannonlake/acpi/lpit.asl:
PS7: Can you please split out this change from the mainboard changes?
https://review.coreboot.org/#/c/32519/7/src/soc/intel/cannonlake/acpi/lpit.a... PS7, Line 68: MS0X
Yes, do you have a better idea? I am fine with this.
No, this is fine. I was just curious.
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... File src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl:
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... PS7, Line 15: CAM_EN
Did you mean to use this below in MS0X?
Oh... I should use this is more clear.
https://review.coreboot.org/#/c/32519/7/src/soc/intel/cannonlake/acpi/lpit.a... File src/soc/intel/cannonlake/acpi/lpit.asl:
PS7:
Can you please split out this change from the mainboard changes?
sure..
Hello Patrick Rudolph, Duncan Laurie, Lijian Zhao, build bot (Jenkins), Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32519
to look at the new patch set (#8).
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
mb/google/sarien: Turn off camera power when s0ix
Turn off camera power when s0ix for power saving.
BUG=b:129177593 TEST= measure camera power comsumption is 0mV under s0ix
Change-Id: I5a9b7ec1e95cc9931d8d5f2dc1254805c9d0ffed Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com --- M src/mainboard/google/sarien/dsdt.asl A src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl A src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl 3 files changed, 58 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/32519/8
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 8:
(2 comments)
Please have a look.
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... File src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl:
https://review.coreboot.org/#/c/32519/7/src/mainboard/google/sarien/variants... PS7, Line 15: CAM_EN
Oh... I should use this is more clear.
Done
https://review.coreboot.org/#/c/32519/7/src/soc/intel/cannonlake/acpi/lpit.a... File src/soc/intel/cannonlake/acpi/lpit.asl:
PS7:
sure..
Done
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 8: Code-Review+2
Ideally it would be good to put the soc CL before the mainboard CL in the series.
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 8:
Patch Set 8: Code-Review+2
Ideally it would be good to put the soc CL before the mainboard CL in the series.
oh I don't know if the CQ-DPEN work here. But it won't have issue, I make this as option in soc CL. I'll try next time, thx for remind.
Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 8:
(3 comments)
https://review.coreboot.org/#/c/32519/8/src/mainboard/google/sarien/variants... File src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl:
https://review.coreboot.org/#/c/32519/8/src/mainboard/google/sarien/variants... PS8, Line 15: #define CAM_EN GPP_B11 /* Active low */ add a newline
https://review.coreboot.org/#/c/32519/8/src/mainboard/google/sarien/variants... PS8, Line 18: Add a newline before the { for a method
https://review.coreboot.org/#/c/32519/8/src/mainboard/google/sarien/variants... PS8, Line 20: Printf ("OS Enter S0ix") There is already a debug output in the EC S0ix handler so we probably don't need a duplicate.
Hello Patrick Rudolph, Duncan Laurie, build bot (Jenkins), Lijian Zhao, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32519
to look at the new patch set (#9).
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
mb/google/sarien: Turn off camera power when s0ix
Turn off camera power when s0ix for power saving.
BUG=b:129177593 TEST= measure camera power comsumption is 0mV under s0ix
Change-Id: I5a9b7ec1e95cc9931d8d5f2dc1254805c9d0ffed Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com --- M src/mainboard/google/sarien/dsdt.asl A src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl A src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl 3 files changed, 58 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/32519/9
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 9:
(3 comments)
https://review.coreboot.org/#/c/32519/8/src/mainboard/google/sarien/variants... File src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl:
https://review.coreboot.org/#/c/32519/8/src/mainboard/google/sarien/variants... PS8, Line 15: #define CAM_EN GPP_B11 /* Active low */
add a newline
Done
https://review.coreboot.org/#/c/32519/8/src/mainboard/google/sarien/variants... PS8, Line 18:
Add a newline before the { for a method
Done
https://review.coreboot.org/#/c/32519/8/src/mainboard/google/sarien/variants... PS8, Line 20: Printf ("OS Enter S0ix")
There is already a debug output in the EC S0ix handler so we probably don't need a duplicate.
Done
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 9:
Patch Set 8:
(3 comments)
Please help review again thx.
Lijian Zhao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 9: Code-Review+2
Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
Patch Set 9: Code-Review+2
Duncan Laurie has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/32519 )
Change subject: mb/google/sarien: Turn off camera power when s0ix ......................................................................
mb/google/sarien: Turn off camera power when s0ix
Turn off camera power when s0ix for power saving.
BUG=b:129177593 TEST= measure camera power comsumption is 0mV under s0ix
Change-Id: I5a9b7ec1e95cc9931d8d5f2dc1254805c9d0ffed Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/32519 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Lijian Zhao lijian.zhao@intel.com Reviewed-by: Duncan Laurie dlaurie@chromium.org --- M src/mainboard/google/sarien/dsdt.asl A src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl A src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl 3 files changed, 58 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Duncan Laurie: Looks good to me, approved Lijian Zhao: Looks good to me, approved
diff --git a/src/mainboard/google/sarien/dsdt.asl b/src/mainboard/google/sarien/dsdt.asl index e5b0cca..58e0704 100644 --- a/src/mainboard/google/sarien/dsdt.asl +++ b/src/mainboard/google/sarien/dsdt.asl @@ -40,6 +40,8 @@ #include <soc/intel/cannonlake/acpi/northbridge.asl> #include <soc/intel/cannonlake/acpi/southbridge.asl> } + /* Per board variant mainboard hooks. */ + #include <variant/acpi/mainboard.asl> }
#if CONFIG(CHROMEOS) diff --git a/src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl b/src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl new file mode 100644 index 0000000..7b252c7 --- /dev/null +++ b/src/mainboard/google/sarien/variants/arcada/include/variant/acpi/mainboard.asl @@ -0,0 +1,28 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Intel Corp. + * + * 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. + */ + +#define CAM_EN GPP_B11 /* Active low */ + +/* Method called from LPIT prior to enter s0ix state */ +Method (MS0X, 1) +{ + If (Arg0) { + /* Turn off camera power */ + _SB.PCI0.STXS (CAM_EN) + } Else { + /* Turn on camera power */ + _SB.PCI0.CTXS (CAM_EN) + } +} diff --git a/src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl b/src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl new file mode 100644 index 0000000..7b252c7 --- /dev/null +++ b/src/mainboard/google/sarien/variants/sarien/include/variant/acpi/mainboard.asl @@ -0,0 +1,28 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Intel Corp. + * + * 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. + */ + +#define CAM_EN GPP_B11 /* Active low */ + +/* Method called from LPIT prior to enter s0ix state */ +Method (MS0X, 1) +{ + If (Arg0) { + /* Turn off camera power */ + _SB.PCI0.STXS (CAM_EN) + } Else { + /* Turn on camera power */ + _SB.PCI0.CTXS (CAM_EN) + } +}