Yu-Ping Wu has submitted this change. ( https://review.coreboot.org/c/coreboot/+/68484 )
Change subject: soc/mediatek: Move DP drivers to common ......................................................................
soc/mediatek: Move DP drivers to common
DP drivers can be shared for both MT8195 and MT8188, so move them to common folder.
BUG=b:244208960 TEST=emerge-cherry coreboot.
Signed-off-by: Bo-Chen Chen rex-bc.chen@mediatek.com Change-Id: Ic80c03aa6b13e6c9c39fd63b5c1c1cbdbe93a7c4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68484 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Yidi Lin yidilin@google.com Reviewed-by: Yu-Ping Wu yupingso@google.com --- R src/soc/mediatek/common/dp/dp_intf.c R src/soc/mediatek/common/dp/dptx.c R src/soc/mediatek/common/dp/dptx_hal.c R src/soc/mediatek/common/dp/include/soc/dp_intf.h R src/soc/mediatek/common/dp/include/soc/dptx.h R src/soc/mediatek/common/dp/include/soc/dptx_hal.h R src/soc/mediatek/common/dp/include/soc/dptx_reg.h M src/soc/mediatek/mt8195/Makefile.inc 8 files changed, 34 insertions(+), 13 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved Yidi Lin: Looks good to me, but someone else must approve
diff --git a/src/soc/mediatek/mt8195/dp_intf.c b/src/soc/mediatek/common/dp/dp_intf.c similarity index 100% rename from src/soc/mediatek/mt8195/dp_intf.c rename to src/soc/mediatek/common/dp/dp_intf.c diff --git a/src/soc/mediatek/mt8195/dptx.c b/src/soc/mediatek/common/dp/dptx.c similarity index 100% rename from src/soc/mediatek/mt8195/dptx.c rename to src/soc/mediatek/common/dp/dptx.c diff --git a/src/soc/mediatek/mt8195/dptx_hal.c b/src/soc/mediatek/common/dp/dptx_hal.c similarity index 100% rename from src/soc/mediatek/mt8195/dptx_hal.c rename to src/soc/mediatek/common/dp/dptx_hal.c diff --git a/src/soc/mediatek/mt8195/include/soc/dp_intf.h b/src/soc/mediatek/common/dp/include/soc/dp_intf.h similarity index 97% rename from src/soc/mediatek/mt8195/include/soc/dp_intf.h rename to src/soc/mediatek/common/dp/include/soc/dp_intf.h index ee142bf..bb04716 100644 --- a/src/soc/mediatek/mt8195/include/soc/dp_intf.h +++ b/src/soc/mediatek/common/dp/include/soc/dp_intf.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef SOC_MEDIATEK_MT8195_DP_INTF_H -#define SOC_MEDIATEK_MT8195_DP_INTF_H +#ifndef SOC_MEDIATEK_COMMON_DP_DP_INTF_H +#define SOC_MEDIATEK_COMMON_DP_DP_INTF_H
#include <edid.h>
@@ -255,4 +255,4 @@
void dp_intf_config(const struct edid *edid);
-#endif /* SOC_MEDIATEK_MT8195_DP_INTF_H */ +#endif /* SOC_MEDIATEK_COMMON_DP_DP_INTF_H */ diff --git a/src/soc/mediatek/mt8195/include/soc/dptx.h b/src/soc/mediatek/common/dp/include/soc/dptx.h similarity index 91% rename from src/soc/mediatek/mt8195/include/soc/dptx.h rename to src/soc/mediatek/common/dp/include/soc/dptx.h index 54b28ec..b473301 100644 --- a/src/soc/mediatek/mt8195/include/soc/dptx.h +++ b/src/soc/mediatek/common/dp/include/soc/dptx.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef SOC_MEDIATEK_MT8195_DPTX_H -#define SOC_MEDIATEK_MT8195_DPTX_H +#ifndef SOC_MEDIATEK_COMMON_DP_DPTX_H +#define SOC_MEDIATEK_COMMON_DP_DPTX_H
#define DPTX_TBC_BUF_READSTARTADRTHRD 0x08 #define ENABLE_DPTX_EF_MODE 0x1 @@ -74,4 +74,4 @@
int mtk_edp_init(struct edid *edid);
-#endif /* SOC_MEDIATEK_MT8195_DPTX_H */ +#endif /* SOC_MEDIATEK_COMMON_DP_DPTX_H */ diff --git a/src/soc/mediatek/mt8195/include/soc/dptx_hal.h b/src/soc/mediatek/common/dp/include/soc/dptx_hal.h similarity index 96% rename from src/soc/mediatek/mt8195/include/soc/dptx_hal.h rename to src/soc/mediatek/common/dp/include/soc/dptx_hal.h index dcb1717..d430b6a 100644 --- a/src/soc/mediatek/mt8195/include/soc/dptx_hal.h +++ b/src/soc/mediatek/common/dp/include/soc/dptx_hal.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef SOC_MEDIATEK_MT8195_DPTX_HAL_H -#define SOC_MEDIATEK_MT8195_DPTX_HAL_H +#ifndef SOC_MEDIATEK_COMMON_DP_DPTX_HAL_H +#define SOC_MEDIATEK_COMMON_DP_DPTX_HAL_H
#define AUX_CMD_I2C_R_MOT0 0x1 #define AUX_CMD_I2C_R 0x5 @@ -100,4 +100,4 @@ void dptx_hal_set_txrate(struct mtk_dp *mtk_dp, int value); void dptx_hal_analog_power_en(struct mtk_dp *mtk_dp, bool enable);
-#endif /* SOC_MEDIATEK_MT8195_DPTX_HAL_H */ +#endif /* SOC_MEDIATEK_COMMON_DP_DPTX_HAL_H */ diff --git a/src/soc/mediatek/mt8195/include/soc/dptx_reg.h b/src/soc/mediatek/common/dp/include/soc/dptx_reg.h similarity index 99% rename from src/soc/mediatek/mt8195/include/soc/dptx_reg.h rename to src/soc/mediatek/common/dp/include/soc/dptx_reg.h index a010517..a385eb8 100644 --- a/src/soc/mediatek/mt8195/include/soc/dptx_reg.h +++ b/src/soc/mediatek/common/dp/include/soc/dptx_reg.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef SOC_MEDIATEK_MT8195_DRTX_REG_H -#define SOC_MEDIATEK_MT8195_DRTX_REG_H +#ifndef SOC_MEDIATEK_COMMON_DP_DPTX_REG_H +#define SOC_MEDIATEK_COMMON_DP_DPTX_REG_H
#define TOP_OFFSET 0x2000 #define ENC0_OFFSET 0x3000 @@ -4737,4 +4737,4 @@ #define DPCD_69494 0x69494 #define DPCD_69518 0x69518
-#endif /* SOC_MEDIATEK_MT8195_DRTX_REG_H */ +#endif /* SOC_MEDIATEK_COMMON_DP_DPTX_REG_H */ diff --git a/src/soc/mediatek/mt8195/Makefile.inc b/src/soc/mediatek/mt8195/Makefile.inc index 2d50506..f8b3510 100644 --- a/src/soc/mediatek/mt8195/Makefile.inc +++ b/src/soc/mediatek/mt8195/Makefile.inc @@ -46,7 +46,7 @@ ramstage-y += ../common/dfd.c ramstage-y += ../common/dpm.c ramstage-$(CONFIG_DPM_FOUR_CHANNEL) += ../common/dpm_4ch.c -ramstage-y += dp_intf.c dptx.c dptx_hal.c +ramstage-y += ../common/dp/dp_intf.c ../common/dp/dptx.c ../common/dp/dptx_hal.c ramstage-y += emi.c ramstage-y += hdmi.c ramstage-y += ../common/mcu.c @@ -66,6 +66,7 @@ ramstage-y += ../common/usb.c usb.c
CPPFLAGS_common += -Isrc/soc/mediatek/mt8195/include +CPPFLAGS_common += -Isrc/soc/mediatek/common/dp/include CPPFLAGS_common += -Isrc/soc/mediatek/common/include CPPFLAGS_common += -Isrc/vendorcode/mediatek/mt8195/include