mb/intel/mtlrvp: Add initial code for mtlrvp_p_ext_ec variant board
This patch adds the initial code for mtlrvp_p_ext_ec variant board
which includes
1. support for 2 mainboards (Chrome EC and Windows EC) by
adding overridetree.cb to corresponding directory
2. Move devicetree to baseboard/mtlrvp_p
3. Update mainboard name in Kconfig and Kconfig.name
4. Add config option to select corresponding overridetree.cb
Subsequent patches include patch train starting from (CB - 66102)
BUG=b:260654043
TEST=Able to build with the patch and boot the mtlrvp platform with the
subsequent patches
Signed-off-by: Harsha B R <harsha.b.r@intel.com>
Change-Id: I83948aa5e9fcaadee4745e313360773c48142f89
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70346
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Usha P <usha.p@intel.com>
diff --git a/src/mainboard/intel/mtlrvp/Kconfig b/src/mainboard/intel/mtlrvp/Kconfig
index db7c161..2905407 100644
--- a/src/mainboard/intel/mtlrvp/Kconfig
+++ b/src/mainboard/intel/mtlrvp/Kconfig
@@ -8,6 +8,9 @@
config BOARD_INTEL_MTLRVP_P
select BOARD_INTEL_MTLRVP_COMMON
+config BOARD_INTEL_MTLRVP_P_EXT_EC
+ select BOARD_INTEL_MTLRVP_COMMON
+
if BOARD_INTEL_MTLRVP_COMMON
config MAINBOARD_DIR
@@ -15,7 +18,7 @@
config BASEBOARD_DIR
string
- default "mtlrvp"
+ default "mtlrvp_p" if BOARD_INTEL_MTLRVP_P || BOARD_INTEL_MTLRVP_P_EXT_EC
config MAINBOARD_PART_NUMBER
string
@@ -31,9 +34,14 @@
config VARIANT_DIR
string
default "mtlrvp_p" if BOARD_INTEL_MTLRVP_P
+ default "mtlrvp_p_ext_ec" if BOARD_INTEL_MTLRVP_P_EXT_EC
config DEVICETREE
string
- default "devicetree.cb"
+ default "variants/baseboard/\$(CONFIG_BASEBOARD_DIR)/devicetree.cb"
+
+config OVERRIDE_DEVICETREE
+ string
+ default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb"
endif # BOARD_INTEL_MTLRVP_COMMON
diff --git a/src/mainboard/intel/mtlrvp/Kconfig.name b/src/mainboard/intel/mtlrvp/Kconfig.name
index b643b94..e14c628 100644
--- a/src/mainboard/intel/mtlrvp/Kconfig.name
+++ b/src/mainboard/intel/mtlrvp/Kconfig.name
@@ -1,2 +1,5 @@
config BOARD_INTEL_MTLRVP_P
bool "Meteorlake-P RVP"
+
+config BOARD_INTEL_MTLRVP_P_EXT_EC
+ bool "Meteorlake-P RVP with Chrome EC"
diff --git a/src/mainboard/intel/mtlrvp/devicetree.cb b/src/mainboard/intel/mtlrvp/variants/baseboard/mtlrvp_p/devicetree.cb
similarity index 100%
rename from src/mainboard/intel/mtlrvp/devicetree.cb
rename to src/mainboard/intel/mtlrvp/variants/baseboard/mtlrvp_p/devicetree.cb
diff --git a/src/mainboard/intel/mtlrvp/variants/baseboard/mtlrvp/include/baseboard/gpio.h b/src/mainboard/intel/mtlrvp/variants/baseboard/mtlrvp_p/include/baseboard/gpio.h
similarity index 100%
rename from src/mainboard/intel/mtlrvp/variants/baseboard/mtlrvp/include/baseboard/gpio.h
rename to src/mainboard/intel/mtlrvp/variants/baseboard/mtlrvp_p/include/baseboard/gpio.h
diff --git a/src/mainboard/intel/mtlrvp/variants/mtlrvp_p/overridetree.cb b/src/mainboard/intel/mtlrvp/variants/mtlrvp_p/overridetree.cb
new file mode 100644
index 0000000..7ca0024
--- /dev/null
+++ b/src/mainboard/intel/mtlrvp/variants/mtlrvp_p/overridetree.cb
@@ -0,0 +1,4 @@
+chip soc/intel/meteorlake
+
+ device domain 0 on end
+end
diff --git a/src/mainboard/intel/mtlrvp/variants/mtlrvp_p_ext_ec/overridetree.cb b/src/mainboard/intel/mtlrvp/variants/mtlrvp_p_ext_ec/overridetree.cb
new file mode 100644
index 0000000..7ca0024
--- /dev/null
+++ b/src/mainboard/intel/mtlrvp/variants/mtlrvp_p_ext_ec/overridetree.cb
@@ -0,0 +1,4 @@
+chip soc/intel/meteorlake
+
+ device domain 0 on end
+end