summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTinghan Shen <tinghan.shen@mediatek.com>2022-07-28 15:55:55 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-18 10:17:49 +0000
commite703f17abef41dda0f0ea80c441bbd056581e1e5 (patch)
tree0aee18cd72e6cce5fc68c74c3d2b40c081596a7e
parent74127cdd9f54760d67a822d3000a8fbbf515681c (diff)
downloadchrome-ec-factory-cherry-14455.B-main.tar.gz
chip/mt_scp: remove gpio configurationfactory-cherry-14455.B-main
The UART console is mainly for debug purpose. Remove it to prevent malicious usage of this interface. If required, a user can configure the pin mux by kernel dts. Take mt8195 as an example to enable the SCP UART in dts, scp_pins: scp { pins_scp_vreq { pinmux = <PINMUX_GPIO76__FUNC_SCP_VREQ_VAO>; bias-disable; input-enable; }; + + pins_uart { + pinmux = <PINMUX_GPIO102__FUNC_TP_UTXD1_AO>, + <PINMUX_GPIO103__FUNC_TP_URXD1_AO>; + bias-pull-up; + }; }; -- Conflicts on branch factory-cherry-14455.B-main: There's no mt818x folder on this branch. Remove changes for chip/mt_scp/mt818x/uart.c from original CL:3791283 -- BUG=none TEST=boot cherry scp ok. scp boot log still records in /var/log/cros_scp.log Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Change-Id: I37bc65b47e7423e9def5a399ba7ceb2761dc9615 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3791283 Tested-by: TingHan Shen <tinghan.shen@mediatek.corp-partner.google.com> Reviewed-by: Wei-Shun Chang <weishunc@chromium.org> Commit-Queue: Wei-Shun Chang <weishunc@chromium.org> (cherry picked from commit 2e68f3ee03f51fb0a3f8c0cad6868b2f1fb34a5a) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3835234
-rw-r--r--chip/mt_scp/mt8192/uart.c4
-rw-r--r--chip/mt_scp/mt8195/uart.c4
2 files changed, 0 insertions, 8 deletions
diff --git a/chip/mt_scp/mt8192/uart.c b/chip/mt_scp/mt8192/uart.c
index 0ebb93cbb4..9e2c097414 100644
--- a/chip/mt_scp/mt8192/uart.c
+++ b/chip/mt_scp/mt8192/uart.c
@@ -19,10 +19,6 @@ void uart_init_pinmux(void)
#if UARTN == 0
SCP_UART_CK_SEL |= UART0_CK_SEL_VAL(UART_CK_SEL_ULPOSC);
SCP_SET_CLK_CG |= CG_UART0_MCLK | CG_UART0_BCLK | CG_UART0_RST;
-
- /* set AP GPIO164 and GPIO165 to alt func 3 */
- AP_GPIO_MODE20_CLR = 0x00770000;
- AP_GPIO_MODE20_SET = 0x00330000;
#elif UARTN == 1
SCP_UART_CK_SEL |= UART1_CK_SEL_VAL(UART_CK_SEL_ULPOSC);
SCP_SET_CLK_CG |= CG_UART1_MCLK | CG_UART1_BCLK | CG_UART1_RST;
diff --git a/chip/mt_scp/mt8195/uart.c b/chip/mt_scp/mt8195/uart.c
index 76674fa7d3..dab25e7d19 100644
--- a/chip/mt_scp/mt8195/uart.c
+++ b/chip/mt_scp/mt8195/uart.c
@@ -19,9 +19,5 @@ void uart_init_pinmux(void)
#if UARTN == 0
SCP_UART_CK_SEL |= UART0_CK_SEL_VAL(UART_CK_SEL_ULPOSC);
SCP_SET_CLK_CG |= CG_UART0_MCLK | CG_UART0_BCLK | CG_UART0_RST;
-
- /* set AP GPIO102 and GPIO103 to alt func 5 */
- AP_GPIO_MODE12_CLR = 0x77000000;
- AP_GPIO_MODE12_SET = 0x55000000;
#endif
}