Qizhong Cheng has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48724 )
Change subject: HACK: Enable PCIe refclk 100M alone ......................................................................
HACK: Enable PCIe refclk 100M alone
Don't pull into TOT. Thanks. b/170703028 This patch is just to open the refclk of pcie during the coreboot stage for PCIe hardware compliance testing. If Alvis wants to continue to test pcie hardware, please cherry-pick the patch. Set GPIO65 pinmux for PCIe function which is clkreq#.
Signed-off-by: mtk20626 qizhong.cheng@mediatek.com Change-Id: Ie0f73eda4259028efe1eacc7d6e3ed4c15bfb75f --- M src/soc/mediatek/mt8192/Makefile.inc A src/soc/mediatek/mt8192/include/soc/pcie.h A src/soc/mediatek/mt8192/pcie.c 3 files changed, 26 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/48724/1
diff --git a/src/soc/mediatek/mt8192/Makefile.inc b/src/soc/mediatek/mt8192/Makefile.inc index 833dc2b..5e71df1 100644 --- a/src/soc/mediatek/mt8192/Makefile.inc +++ b/src/soc/mediatek/mt8192/Makefile.inc @@ -59,6 +59,7 @@ ramstage-y += soc.c ramstage-y += spm.c ramstage-y += sspm.c +ramstage-y += pcie.c ramstage-y += ../common/timer.c ramstage-y += ../common/uart.c ramstage-y += ufs.c diff --git a/src/soc/mediatek/mt8192/include/soc/pcie.h b/src/soc/mediatek/mt8192/include/soc/pcie.h new file mode 100644 index 0000000..dd8f7ab --- /dev/null +++ b/src/soc/mediatek/mt8192/include/soc/pcie.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_MT8192_PCIE_H +#define SOC_MEDIATEK_MT8192_PCIE_H + +void mtk_pcie_prepare(void); + +#endif diff --git a/src/soc/mediatek/mt8192/pcie.c b/src/soc/mediatek/mt8192/pcie.c new file mode 100644 index 0000000..c41687b --- /dev/null +++ b/src/soc/mediatek/mt8192/pcie.c @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <device/mmio.h> +#include <soc/addressmap.h> +#include <soc/pcie.h> + +#define REG_PCIE_CLKREQ_EN (void *)(GPIO_BASE + 0x380) + +void mtk_pcie_prepare(void) +{ + u32 ret; + + /* set PCIe clkreq# for refclk 100M */ + ret = read32(REG_PCIE_CLKREQ_EN); + write32(REG_PCIE_CLKREQ_EN, ret | 0x33); + setbits32(REG_PCIE_CLKREQ_EN, 0x33); +}
Qizhong Cheng has removed Patrick Georgi from this change. ( https://review.coreboot.org/c/coreboot/+/48724 )
Change subject: HACK: Enable PCIe refclk 100M alone ......................................................................
Removed reviewer Patrick Georgi.
Qizhong Cheng has removed Martin Roth from this change. ( https://review.coreboot.org/c/coreboot/+/48724 )
Change subject: HACK: Enable PCIe refclk 100M alone ......................................................................
Removed reviewer Martin Roth.
Qizhong Cheng has removed Hung-Te Lin from this change. ( https://review.coreboot.org/c/coreboot/+/48724 )
Change subject: HACK: Enable PCIe refclk 100M alone ......................................................................
Removed reviewer Hung-Te Lin.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48724
to look at the new patch set (#2).
Change subject: HACK: Enable PCIe refclk 100M alone ......................................................................
HACK: Enable PCIe refclk 100M alone
Don't pull into TOT. Thanks. b/170703028 This patch is just to open the refclk of pcie during the coreboot stage for PCIe hardware compliance testing. If Alvis wants to continue to test pcie hardware, please cherry-pick the patch. Set GPIO65 pinmux for PCIe function which is clkreq#.
Signed-off-by: mtk20626 qizhong.cheng@mediatek.com Change-Id: Ie0f73eda4259028efe1eacc7d6e3ed4c15bfb75f --- M src/soc/mediatek/mt8192/Makefile.inc A src/soc/mediatek/mt8192/include/soc/pcie.h A src/soc/mediatek/mt8192/pcie.c 3 files changed, 26 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/48724/2
Qizhong Cheng has removed Patrick Georgi from this change. ( https://review.coreboot.org/c/coreboot/+/48724 )
Change subject: HACK: Enable PCIe refclk 100M alone ......................................................................
Removed reviewer Patrick Georgi.
Qizhong Cheng has removed Hung-Te Lin from this change. ( https://review.coreboot.org/c/coreboot/+/48724 )
Change subject: HACK: Enable PCIe refclk 100M alone ......................................................................
Removed reviewer Hung-Te Lin.
Qizhong Cheng has removed Martin Roth from this change. ( https://review.coreboot.org/c/coreboot/+/48724 )
Change subject: HACK: Enable PCIe refclk 100M alone ......................................................................
Removed reviewer Martin Roth.
Martin L Roth has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/48724?usp=email )
Change subject: HACK: Enable PCIe refclk 100M alone ......................................................................
Abandoned
This patch has not been touched in over 12 months. Anyone who wants to take over work on this patch, please feel free to restore it and do any work needed to get it merged. If you create a new patch based on this work, please credit the original author.