mturney mturney has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference QUPv3 FW driver ......................................................................
trogdor: mainboard reference QUPv3 FW driver
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/mainboard.c 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/1
diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c index 1cf2b96..8849911 100644 --- a/src/mainboard/google/trogdor/mainboard.c +++ b/src/mainboard/google/trogdor/mainboard.c @@ -19,6 +19,7 @@ #include <gpio.h> #include <timestamp.h> #include <soc/usb.h> +#include <soc/qupv3_fw_config.h>
static struct usb_board_data usb0_board_data = { .pll_bias_control_2 = 0x22, @@ -34,6 +35,7 @@ static void mainboard_init(struct device *dev) { setup_usb(); + qupv3_fw_init(); }
static void mainboard_enable(struct device *dev)
Hello Ravi kumar, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37306
to look at the new patch set (#6).
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/6
Hello Ravi kumar, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37306
to look at the new patch set (#8).
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 20 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/8
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 12:
(2 comments)
https://review.coreboot.org/c/coreboot/+/37306/12/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/12/src/mainboard/google/trogd... PS12, Line 43: qup_spi_init(QUPV3_1_SE0, 1010 * KHz); /* H1 SPI */ These are incorrect, each bus should only be initialized once (and these are already in the bootblock).
https://review.coreboot.org/c/coreboot/+/37306/12/src/mainboard/google/trogd... PS12, Line 50: uart_init(QUPV3_0_SE3); /* BT UART */ For those which we're not going to use in firmware, we don't have to do the whole controller init. Just do a qup_load_se_firmware() directly. (Also, factor all these out into a separate function for readability, e.g. load_qup_firmwares() or something.)
mturney mturney has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 16:
(2 comments)
https://review.coreboot.org/c/coreboot/+/37306/12/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/12/src/mainboard/google/trogd... PS12, Line 43: qup_spi_init(QUPV3_1_SE0, 1010 * KHz); /* H1 SPI */
These are incorrect, each bus should only be initialized once (and these are already in the bootbloc […]
Done
https://review.coreboot.org/c/coreboot/+/37306/12/src/mainboard/google/trogd... PS12, Line 50: uart_init(QUPV3_0_SE3); /* BT UART */
For those which we're not going to use in firmware, we don't have to do the whole controller init. […]
Done
Hello Ravi kumar, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37306
to look at the new patch set (#17).
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/17
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 18:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37306/18/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/18/src/mainboard/google/trogd... PS18, Line 47: i2c_init(QUPV3_1_SE3, I2C_SPEED_FAST); /* Speaker Amps I2C */ I think this is missing 0_SE5 (SAR) and 1_SE5 (codec) from the old config, where did they go? (I think the codec was actually wrong, if I look at the schematic, but the SAR seems to be there?)
Roja Rani Yarubandi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 18:
(1 comment)
Patch Set 18:
(1 comment)
Done, shared patch with Mike
https://review.coreboot.org/c/coreboot/+/37306/18/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/18/src/mainboard/google/trogd... PS18, Line 47: i2c_init(QUPV3_1_SE3, I2C_SPEED_FAST); /* Speaker Amps I2C */
I think this is missing 0_SE5 (SAR) and 1_SE5 (codec) from the old config, where did they go? (I thi […]
Done
Ravi kumar has uploaded a new patch set (#19) to the change originally created by mturney mturney. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/19
Roja Rani Yarubandi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 20:
Hi Julius, Can you please review the changes.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 20: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/37306/20/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/20/src/mainboard/google/trogd... PS20, Line 42: qup_load_se_firmware(QUPV3_1_SE4, SE_PROTOCOL_SPI); /* Fingerprint SPI */ nit: Would be nice to order these by QUP number.
Hello Julius Werner, Ravi kumar, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37306
to look at the new patch set (#21).
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 26 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/21
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 21: Code-Review+2
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 21: -Code-Review
(1 comment)
https://review.coreboot.org/c/coreboot/+/37306/21/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/21/src/mainboard/google/trogd... PS21, Line 69: i2c_init(QUPV3_1_SE3, I2C_SPEED_FAST); /* Speaker Amps I2C */ Why isn't this just a qupv3_se_fw_load_and_init() like the rest? Looks like we can play the beep without accessing this I2C in depthcharge, so I don't think we need it?
Ravi kumar has uploaded a new patch set (#22) to the change originally created by mturney mturney. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 26 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/22
Hello Ravi kumar, build bot (Jenkins), Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37306
to look at the new patch set (#23).
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 26 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/23
Ravi kumar has uploaded a new patch set (#25) to the change originally created by mturney mturney. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 26 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/25
Roja Rani Yarubandi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 25:
(2 comments)
https://review.coreboot.org/c/coreboot/+/37306/20/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/20/src/mainboard/google/trogd... PS20, Line 42: qup_load_se_firmware(QUPV3_1_SE4, SE_PROTOCOL_SPI); /* Fingerprint SPI */
nit: Would be nice to order these by QUP number.
Done
https://review.coreboot.org/c/coreboot/+/37306/21/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/21/src/mainboard/google/trogd... PS21, Line 69: i2c_init(QUPV3_1_SE3, I2C_SPEED_FAST); /* Speaker Amps I2C */
Why isn't this just a qupv3_se_fw_load_and_init() like the rest? Looks like we can play the beep wit […]
Done
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 25:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37306/25/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/25/src/mainboard/google/trogd... PS25, Line 59: qupv3_se_fw_load_and_init(QUPV3_1_SE1, SE_PROTOCOL_I2C, MIXED); /* Trackpad I2C */ Just noticed another problem here: coreboot will only link and run its UART driver when it is configured to do serial output (which we disable for production images). However, when we disable serial output in firmware, we may still want it in the kernel. So we need to manually load the QUP firmware for the UART here in that case. We need to insert something like this:
if (!CONFIG(CONSOLE_SERIAL)) /* When no coreboot serial, still need UART for OS. */ qupv3_se_fw_load_and_init(QUPV3_1_SE2, SE_PROTOCOL_UART, FIFO);
Roja Rani Yarubandi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 26:
(1 comment)
Changes are done and shared patch with Mike to post
https://review.coreboot.org/c/coreboot/+/37306/25/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/25/src/mainboard/google/trogd... PS25, Line 59: qupv3_se_fw_load_and_init(QUPV3_1_SE1, SE_PROTOCOL_I2C, MIXED); /* Trackpad I2C */
Just noticed another problem here: coreboot will only link and run its UART driver when it is config […]
Done
Ravi kumar has uploaded a new patch set (#27) to the change originally created by mturney mturney. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 33 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/27
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 27: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/37306/27/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/27/src/mainboard/google/trogd... PS27, Line 24: #include <soc/qupv3_spi.h> nit: most of these (and timestamp.h) aren't really needed here.
Hello Ravi kumar, build bot (Jenkins), Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37306
to look at the new patch set (#28).
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 33 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/28
Ravi kumar has uploaded a new patch set (#29) to the change originally created by mturney mturney. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 27 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/29
Roja Rani Yarubandi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 29:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37306/27/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/27/src/mainboard/google/trogd... PS27, Line 24: #include <soc/qupv3_spi.h>
nit: most of these (and timestamp.h) aren't really needed here.
Done
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 29: Code-Review+2
Hello Ravi kumar, build bot (Jenkins), Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37306
to look at the new patch set (#31).
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 41 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/31
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 31:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37306/31/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/31/src/mainboard/google/trogd... PS31, Line 3: * : * Copyright (C) 2018-2020, The Linux Foundation. All rights reserved. : * : * This program is free software; you can redistribute it and/or modify : * it under the terms of the GNU General Public License version 2 and : * only version 2 as published by the Free Software Foundation. : * : * 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. : */ /* SPDX-License-Identifier: GPL-2.0-only */
Hello Ravi kumar, build bot (Jenkins), Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37306
to look at the new patch set (#32).
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 40 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/37306/32
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
Patch Set 32: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/37306/31/src/mainboard/google/trogd... File src/mainboard/google/trogdor/mainboard.c:
https://review.coreboot.org/c/coreboot/+/37306/31/src/mainboard/google/trogd... PS31, Line 3: * : * Copyright (C) 2018-2020, The Linux Foundation. All rights reserved. : * : * This program is free software; you can redistribute it and/or modify : * it under the terms of the GNU General Public License version 2 and : * only version 2 as published by the Free Software Foundation. : * : * 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. : */
/* SPDX-License-Identifier: GPL-2. […]
Done
Julius Werner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/37306 )
Change subject: trogdor: mainboard reference all QUPv3 FW drivers ......................................................................
trogdor: mainboard reference all QUPv3 FW drivers
Change-Id: I8ff5dd63fac28ffa558aec71e79a6de87d7885e0 Signed-off-by: T Michael Turney mturney@codeaurora.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/37306 Reviewed-by: Julius Werner jwerner@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/trogdor/bootblock.c M src/mainboard/google/trogdor/mainboard.c 2 files changed, 40 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
diff --git a/src/mainboard/google/trogdor/bootblock.c b/src/mainboard/google/trogdor/bootblock.c index 05e53a6..b17c2e7 100644 --- a/src/mainboard/google/trogdor/bootblock.c +++ b/src/mainboard/google/trogdor/bootblock.c @@ -2,8 +2,12 @@
#include <bootblock_common.h> #include "board.h" +#include <soc/qcom_qup_se.h> +#include <soc/qupv3_spi.h>
void bootblock_mainboard_init(void) { setup_chromeos_gpios(); + qup_spi_init(QUPV3_1_SE0, 1010 * KHz); /* H1 SPI */ + qup_spi_init(QUPV3_0_SE0, 1010 * KHz); /* EC SPI */ } diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c index 2ac5659..c82eaa0 100644 --- a/src/mainboard/google/trogdor/mainboard.c +++ b/src/mainboard/google/trogdor/mainboard.c @@ -1,9 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <device/device.h> -#include <device/mmio.h> -#include <gpio.h> -#include <timestamp.h> +#include <soc/qupv3_config.h> #include <soc/usb.h>
static struct usb_board_data usb0_board_data = { @@ -17,9 +15,44 @@ setup_usb_host0(&usb0_board_data); }
+static void qi2s_configure_gpios(void) +{ + + gpio_configure(GPIO(49), GPIO49_FUNC_MI2S_1_SCK, + GPIO_PULL_UP, GPIO_8MA, GPIO_OUTPUT); + + gpio_configure(GPIO(50), GPIO50_FUNC_MI2S_1_WS, + GPIO_PULL_UP, GPIO_8MA, GPIO_OUTPUT); + + gpio_configure(GPIO(51), GPIO51_FUNC_MI2S_1_DATA0, + GPIO_PULL_UP, GPIO_8MA, GPIO_OUTPUT); +} + +static void load_qup_fw(void) +{ + qupv3_se_fw_load_and_init(QUPV3_0_SE1, SE_PROTOCOL_SPI, MIXED); /* ESIM SPI */ + qupv3_se_fw_load_and_init(QUPV3_0_SE2, SE_PROTOCOL_I2C, MIXED); /* EDP Bridge I2C */ + qupv3_se_fw_load_and_init(QUPV3_0_SE3, SE_PROTOCOL_UART, FIFO); /* BT UART */ + qupv3_se_fw_load_and_init(QUPV3_0_SE4, SE_PROTOCOL_I2C, MIXED); /* Pen Detect I2C */ + qupv3_se_fw_load_and_init(QUPV3_0_SE5, SE_PROTOCOL_I2C, MIXED); /* SAR I2C */ + qupv3_se_fw_load_and_init(QUPV3_1_SE1, SE_PROTOCOL_I2C, MIXED); /* Trackpad I2C */ + /* + * When coreboot firmware disables serial output, + * we still need to load console UART QUP FW for OS. + */ + if (!CONFIG(CONSOLE_SERIAL)) + qupv3_se_fw_load_and_init(QUPV3_1_SE2, SE_PROTOCOL_UART, FIFO); + + qupv3_se_fw_load_and_init(QUPV3_1_SE3, SE_PROTOCOL_I2C, MIXED); /* Speaker Amps I2C */ + qupv3_se_fw_load_and_init(QUPV3_1_SE4, SE_PROTOCOL_SPI, MIXED); /* Fingerprint SPI */ + qupv3_se_fw_load_and_init(QUPV3_1_SE5, SE_PROTOCOL_I2C, MIXED); /* Codec I2C */ +} + static void mainboard_init(struct device *dev) { setup_usb(); + qi2s_configure_gpios(); + load_qup_fw(); }
static void mainboard_enable(struct device *dev)