Ravi kumar has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
sc7280: support bitbang UART w/gpio
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- M src/soc/qualcomm/sc7280/Kconfig M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/uart_bitbang.c 3 files changed, 56 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/1
diff --git a/src/soc/qualcomm/sc7280/Kconfig b/src/soc/qualcomm/sc7280/Kconfig index fc2f34b..ed611e8 100644 --- a/src/soc/qualcomm/sc7280/Kconfig +++ b/src/soc/qualcomm/sc7280/Kconfig @@ -11,6 +11,9 @@ select HAVE_MONOTONIC_TIMER select ARM64_USE_ARCH_TIMER select SOC_QUALCOMM_COMMON + select CACHE_MRC_SETTINGS + select HAVE_UART_SPECIAL + select BOOTBLOCK_CONSOLE
if SOC_QUALCOMM_SC7280
diff --git a/src/soc/qualcomm/sc7280/Makefile.inc b/src/soc/qualcomm/sc7280/Makefile.inc index 6d07629..3112141 100644 --- a/src/soc/qualcomm/sc7280/Makefile.inc +++ b/src/soc/qualcomm/sc7280/Makefile.inc @@ -6,10 +6,18 @@ bootblock-y += mmu.c bootblock-y += timer.c bootblock-y += spi.c +bootblock-$(CONFIG_SC7280_QSPI) += qspi.c +bootblock-y += clock.c +bootblock-y += gpio.c +bootblock-$(CONFIG_DRIVERS_UART) += uart_bitbang.c
################################################################################ verstage-y += timer.c verstage-y += spi.c +verstage-$(CONFIG_SC7280_QSPI) += qspi.c +verstage-y += clock.c +verstage-y += gpio.c +verstage-$(CONFIG_DRIVERS_UART) += uart_bitbang.c
################################################################################ romstage-y += cbmem.c @@ -19,12 +27,20 @@ romstage-y += ../common/mmu.c romstage-y += mmu.c romstage-y += spi.c +romstage-$(CONFIG_SC7280_QSPI) += qspi.c +romstage-y += clock.c +romstage-y += gpio.c +romstage-$(CONFIG_DRIVERS_UART) += uart_bitbang.c
################################################################################ ramstage-y += soc.c ramstage-y += cbmem.c ramstage-y += timer.c ramstage-y += spi.c +ramstage-$(CONFIG_SC7280_QSPI) += qspi.c +ramstage-y += clock.c +ramstage-y += gpio.c +ramstage-$(CONFIG_DRIVERS_UART) += uart_bitbang.c
################################################################################
diff --git a/src/soc/qualcomm/sc7280/uart_bitbang.c b/src/soc/qualcomm/sc7280/uart_bitbang.c new file mode 100644 index 0000000..7d88a20 --- /dev/null +++ b/src/soc/qualcomm/sc7280/uart_bitbang.c @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/uart.h> +#include <gpio.h> +#include <boot/coreboot_tables.h> + +#define UART_TX_PIN GPIO(44) + +void uart_fill_lb(void *data) +{ + +} + +static void set_tx(int line_state) +{ + gpio_set(UART_TX_PIN, line_state); +} + +void uart_init(unsigned int idx) +{ + gpio_output(UART_TX_PIN, 1); +} + +void uart_tx_byte(unsigned int idx, unsigned char data) +{ + uart_bitbang_tx_byte(data, set_tx); +} + +void uart_tx_flush(unsigned int idx) +{ + /* unnecessary, PIO Tx means transaction is over when tx_byte returns */ +} + +unsigned char uart_rx_byte(unsigned int idx) +{ + return 0; /* not implemented */ +}
Attention is currently required from: Ravi kumar. Shelley Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
Patch Set 5:
(2 comments)
File src/soc/qualcomm/sc7280/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/47284/comment/fc093593_34eee538 PS5, Line 9: bootblock-$(CONFIG_SC7280_QSPI) += qspi.c : bootblock-y += clock.c : bootblock-y += gpio.c : bootblock-$(CONFIG_DRIVERS_UART) += uart_bitbang.c Since these are being added to all stages, please use the "all-y +=" syntax.
File src/soc/qualcomm/sc7280/uart_bitbang.c:
https://review.coreboot.org/c/coreboot/+/47284/comment/4b7e7f33_73047afe PS5, Line 7: #define UART_TX_PIN GPIO(44) I'm assuming with no schematics this is unknown as well?
Attention is currently required from: Ravi kumar. Shelley Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
Patch Set 5:
(1 comment)
File src/soc/qualcomm/sc7280/Kconfig:
https://review.coreboot.org/c/coreboot/+/47284/comment/4e75bbaf_38dc4708 PS5, Line 14: select CACHE_MRC_SETTINGS Is this needed for UART config? Maybe we can move this to another more relevant CL to make this one cleaner.
Attention is currently required from: Ravi kumar. Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47284
to look at the new patch set (#6).
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
sc7280: support bitbang UART w/gpio
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- M src/soc/qualcomm/sc7280/Kconfig M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/uart_bitbang.c 3 files changed, 56 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/6
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47284
to look at the new patch set (#14).
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
sc7280: support bitbang UART w/gpio
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- M src/soc/qualcomm/sc7280/Kconfig M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/uart_bitbang.c 3 files changed, 56 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/14
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47284
to look at the new patch set (#15).
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
sc7280: support bitbang UART w/gpio
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- M src/soc/qualcomm/sc7280/Kconfig M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/uart_bitbang.c 3 files changed, 56 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/15
Attention is currently required from: mturney mturney. mturney mturney has uploaded a new patch set (#18) to the change originally created by Ravi kumar. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
sc7280: support bitbang UART w/gpio
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- M src/soc/qualcomm/sc7280/Kconfig M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/uart_bitbang.c 3 files changed, 58 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/18
Attention is currently required from: mturney mturney. mturney mturney has uploaded a new patch set (#25) to the change originally created by Ravi kumar. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
sc7280: support bitbang UART w/gpio
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- M src/soc/qualcomm/sc7280/Kconfig M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/uart_bitbang.c 3 files changed, 57 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/25
Attention is currently required from: mturney mturney, Julius Werner. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, mturney mturney, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47284
to look at the new patch set (#30).
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
sc7280: support bitbang UART w/gpio
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- M src/soc/qualcomm/sc7280/Kconfig M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/uart_bitbang.c 3 files changed, 57 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/30
Attention is currently required from: Ravi kumar, mturney mturney, Julius Werner. Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
Patch Set 30:
(1 comment)
Patchset:
PS30: Please factor this out into common code.
``` $ diff -ru src/soc/qualcomm/sc7180/uart_bitbang.c src/soc/qualcomm/sc7280/uart_bitbang.c --- src/soc/qualcomm/sc7180/uart_bitbang.c 2021-03-31 08:31:19.624634555 +0200 +++ src/soc/qualcomm/sc7280/uart_bitbang.c 2021-03-31 09:06:29.151067791 +0200 @@ -4,7 +4,7 @@ #include <gpio.h> #include <boot/coreboot_tables.h>
-#define UART_TX_PIN GPIO(44) +#define UART_TX_PIN GPIO(22)
void uart_fill_lb(void *data) { ```
Attention is currently required from: Shelley Chen, Ravi kumar, mturney mturney, Julius Werner. Ravi Kumar Bokka has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
Patch Set 31:
(1 comment)
File src/soc/qualcomm/sc7280/uart_bitbang.c:
https://review.coreboot.org/c/coreboot/+/47284/comment/eaa63cd3_2d69c04a PS5, Line 7: #define UART_TX_PIN GPIO(44)
I'm assuming with no schematics this is unknown as well?
as per internal hardware schematic reference manual for console tx gpio is 44.
Attention is currently required from: Ravi kumar, Shelley Chen, mturney mturney, Julius Werner. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, mturney mturney, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47284
to look at the new patch set (#34).
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
sc7280: support bitbang UART w/gpio
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/uart_bitbang.c 2 files changed, 40 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/34
Attention is currently required from: Ravi kumar, Shelley Chen, mturney mturney, Julius Werner. Ravi Kumar Bokka has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
Patch Set 34:
(3 comments)
File src/soc/qualcomm/sc7280/Kconfig:
https://review.coreboot.org/c/coreboot/+/47284/comment/2073c630_8084b6ea PS5, Line 14: select CACHE_MRC_SETTINGS
Is this needed for UART config? Maybe we can move this to another more relevant CL to make this one […]
if we deleted this macro getting build errors. i keep this change as it is.
File src/soc/qualcomm/sc7280/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/47284/comment/c68bf2ec_d9908241 PS5, Line 9: bootblock-$(CONFIG_SC7280_QSPI) += qspi.c : bootblock-y += clock.c : bootblock-y += gpio.c : bootblock-$(CONFIG_DRIVERS_UART) += uart_bitbang.c
Since these are being added to all stages, please use the "all-y +=" syntax.
Ack
File src/soc/qualcomm/sc7280/uart_bitbang.c:
https://review.coreboot.org/c/coreboot/+/47284/comment/810df6ec_e162a385 PS5, Line 7: #define UART_TX_PIN GPIO(44)
as per internal hardware schematic reference manual for console tx gpio is 44.
Done
Attention is currently required from: Ravi kumar, Shelley Chen, mturney mturney, Julius Werner. Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: sc7280: support bitbang UART w/gpio ......................................................................
Patch Set 34:
(2 comments)
Patchset:
PS30:
Please factor this out into common code. […]
No idea, why this was marked as resolved (by me?). Anyway, it should be common code.
File src/soc/qualcomm/sc7280/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/47284/comment/1986c4da_69b21ddb PS34, Line 14: ################################################################################ Why are you adding these two lines? Unrelated and looks inconsistent with the rest.
Attention is currently required from: Ravi kumar, Shelley Chen, mturney mturney, Julius Werner. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, mturney mturney, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47284
to look at the new patch set (#35).
Change subject: soc/qualcomm: move uart_bigbang UART w/gpio code to common ......................................................................
soc/qualcomm: move uart_bigbang UART w/gpio code to common
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- R src/soc/qualcomm/common/uart_bitbang.c M src/soc/qualcomm/sc7180/Makefile.inc A src/soc/qualcomm/sc7180/include/soc/uart.h M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/include/soc/uart.h 5 files changed, 22 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/35
Attention is currently required from: Ravi kumar, Shelley Chen, Paul Menzel, mturney mturney, Julius Werner. Ravi Kumar Bokka has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: soc/qualcomm: move uart_bigbang UART w/gpio code to common ......................................................................
Patch Set 35:
(2 comments)
Patchset:
PS30:
No idea, why this was marked as resolved (by me?). Anyway, it should be common code.
Ack
File src/soc/qualcomm/sc7280/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/47284/comment/9dba7c36_daff35a3 PS34, Line 14: ################################################################################
Why are you adding these two lines? Unrelated and looks inconsistent with the rest.
Ack
Attention is currently required from: Ravi kumar, Paul Menzel, Ravi Kumar Bokka, mturney mturney, Julius Werner. Shelley Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: soc/qualcomm: move uart_bigbang UART w/gpio code to common ......................................................................
Patch Set 43:
(1 comment)
File src/soc/qualcomm/sc7280/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/47284/comment/6fabd5b5_4acc3ad3 PS34, Line 14: ################################################################################
Ack
Seems this was not actually fixed, so reopening.
Attention is currently required from: Ravi kumar, Paul Menzel, Ravi Kumar Bokka, mturney mturney, Julius Werner. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, mturney mturney, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47284
to look at the new patch set (#44).
Change subject: soc/qualcomm: move uart_bigbang UART w/gpio code to common ......................................................................
soc/qualcomm: move uart_bigbang UART w/gpio code to common
BUG=b:182963902 TEST=Validated on qualcomm sc7280 developement board
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- R src/soc/qualcomm/common/uart_bitbang.c M src/soc/qualcomm/sc7180/Makefile.inc A src/soc/qualcomm/sc7180/include/soc/uart.h M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/include/soc/uart.h 5 files changed, 22 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/44
Attention is currently required from: Ravi kumar, Paul Menzel, Ravi Kumar Bokka, mturney mturney, Julius Werner. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, mturney mturney, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47284
to look at the new patch set (#46).
Change subject: soc/qualcomm: move uart_bigbang UART w/gpio code to common ......................................................................
soc/qualcomm: move uart_bigbang UART w/gpio code to common
BUG=b:182963902 TEST=Validated on qualcomm sc7280 developement board
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- R src/soc/qualcomm/common/uart_bitbang.c M src/soc/qualcomm/sc7180/Makefile.inc A src/soc/qualcomm/sc7180/include/soc/uart.h M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/include/soc/uart.h 5 files changed, 19 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/46
Attention is currently required from: Shelley Chen, Ravi kumar, Paul Menzel, mturney mturney, Julius Werner. Ravi Kumar Bokka has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: soc/qualcomm: move uart_bigbang UART w/gpio code to common ......................................................................
Patch Set 49:
(1 comment)
File src/soc/qualcomm/sc7280/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/47284/comment/c9e1b1f5_3a301556 PS34, Line 14: ################################################################################
Seems this was not actually fixed, so reopening.
Ack
Attention is currently required from: Shelley Chen, Ravi kumar, Paul Menzel, mturney mturney, Julius Werner. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, mturney mturney, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47284
to look at the new patch set (#50).
Change subject: soc/qualcomm: move uart_bitbang UART w/gpio code to common ......................................................................
soc/qualcomm: move uart_bitbang UART w/gpio code to common
BUG=b:182963902 TEST=Validated on qualcomm sc7280 development board
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- R src/soc/qualcomm/common/uart_bitbang.c M src/soc/qualcomm/sc7180/Makefile.inc A src/soc/qualcomm/sc7180/include/soc/uart.h M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/include/soc/uart.h 5 files changed, 19 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/50
Attention is currently required from: Ravi kumar, Paul Menzel, mturney mturney, Julius Werner. Shelley Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: soc/qualcomm: move uart_bitbang UART w/gpio code to common ......................................................................
Patch Set 52: Code-Review+2
Attention is currently required from: Ravi kumar, Paul Menzel, mturney mturney, Julius Werner. Hello Shelley Chen, build bot (Jenkins), Patrick Georgi, Martin Roth, mturney mturney, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47284
to look at the new patch set (#58).
Change subject: soc/qualcomm: move uart_bitbang UART w/gpio code to common ......................................................................
soc/qualcomm: move uart_bitbang UART w/gpio code to common
BUG=b:182963902 TEST=Validated on qualcomm sc7280 development board
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org --- R src/soc/qualcomm/common/uart_bitbang.c M src/soc/qualcomm/sc7180/Makefile.inc A src/soc/qualcomm/sc7180/include/soc/uart.h M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/include/soc/uart.h 5 files changed, 19 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/47284/58
Shelley Chen has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47284 )
Change subject: soc/qualcomm: move uart_bitbang UART w/gpio code to common ......................................................................
soc/qualcomm: move uart_bitbang UART w/gpio code to common
BUG=b:182963902 TEST=Validated on qualcomm sc7280 development board
Change-Id: Ic6c70f917a59e233f6ea518d9c39f73fe84991c3 Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/47284 Reviewed-by: Shelley Chen shchen@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- R src/soc/qualcomm/common/uart_bitbang.c M src/soc/qualcomm/sc7180/Makefile.inc A src/soc/qualcomm/sc7180/include/soc/uart.h M src/soc/qualcomm/sc7280/Makefile.inc A src/soc/qualcomm/sc7280/include/soc/uart.h 5 files changed, 19 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Shelley Chen: Looks good to me, approved
diff --git a/src/soc/qualcomm/sc7180/uart_bitbang.c b/src/soc/qualcomm/common/uart_bitbang.c similarity index 94% rename from src/soc/qualcomm/sc7180/uart_bitbang.c rename to src/soc/qualcomm/common/uart_bitbang.c index 7d88a20..943dcf8 100644 --- a/src/soc/qualcomm/sc7180/uart_bitbang.c +++ b/src/soc/qualcomm/common/uart_bitbang.c @@ -3,8 +3,7 @@ #include <console/uart.h> #include <gpio.h> #include <boot/coreboot_tables.h> - -#define UART_TX_PIN GPIO(44) +#include <soc/uart.h>
void uart_fill_lb(void *data) { diff --git a/src/soc/qualcomm/sc7180/Makefile.inc b/src/soc/qualcomm/sc7180/Makefile.inc index e84dcc8..5ac1f3f 100644 --- a/src/soc/qualcomm/sc7180/Makefile.inc +++ b/src/soc/qualcomm/sc7180/Makefile.inc @@ -17,7 +17,7 @@ ################################################################################ bootblock-y += bootblock.c bootblock-y += mmu.c -bootblock-$(CONFIG_DRIVERS_UART) += uart_bitbang.c +bootblock-$(CONFIG_DRIVERS_UART) += ../common/uart_bitbang.c
################################################################################ verstage-$(CONFIG_DRIVERS_UART) += qupv3_uart.c diff --git a/src/soc/qualcomm/sc7180/include/soc/uart.h b/src/soc/qualcomm/sc7180/include/soc/uart.h new file mode 100644 index 0000000..e6b2e62 --- /dev/null +++ b/src/soc/qualcomm/sc7180/include/soc/uart.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _SOC_QUALCOMM_SC7180_UART_TX_H_ +#define _SOC_QUALCOMM_SC7180_UART_TX_H_ + +#define UART_TX_PIN GPIO(44) + +#endif /* _SOC_QUALCOMM_SC7180_UART_TX_H_ */ diff --git a/src/soc/qualcomm/sc7280/Makefile.inc b/src/soc/qualcomm/sc7280/Makefile.inc index abcc3fb..3c34be0 100644 --- a/src/soc/qualcomm/sc7280/Makefile.inc +++ b/src/soc/qualcomm/sc7280/Makefile.inc @@ -7,6 +7,7 @@ ################################################################################ bootblock-y += bootblock.c bootblock-y += mmu.c +bootblock-$(CONFIG_DRIVERS_UART) += ../common/uart_bitbang.c
################################################################################ romstage-y += cbmem.c diff --git a/src/soc/qualcomm/sc7280/include/soc/uart.h b/src/soc/qualcomm/sc7280/include/soc/uart.h new file mode 100644 index 0000000..2b2f280 --- /dev/null +++ b/src/soc/qualcomm/sc7280/include/soc/uart.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _SOC_QUALCOMM_SC7280_UART_TX_H_ +#define _SOC_QUALCOMM_SC7280_UART_TX_H_ + +#define UART_TX_PIN GPIO(22) + +#endif /* _SOC_QUALCOMM_SC7280_UART_TX_H_ */