summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorSugnan Prabhu S <sugnan.prabhu.s@intel.com>2021-03-30 10:28:32 +0800
committerKarthik Ramasubramanian <kramasub@google.com>2021-04-22 15:29:22 +0000
commit2db184dd719ab2dd629267deb09372e65c32581f (patch)
treecb777428b44997b6a7951a3f4aa6b8acaf61c9cb /src/mainboard
parent20d689f31f9e82b23a999cf48cc9058ee0f77b4e (diff)
mb/google/dedede/var/magolor: Select camera module based on SSFC value
This patch has changes to support multiple cameras modules, based on the value set in the SSFC_CONFIG. BUG=b:176065425 TEST=Tested the changes with magolor 5MP and 8MP camera. Change-Id: I764abf70bacbe61452e7b0fd59c1b375227b5748 Signed-off-by: Shawn Tu <shawnx.tu@intel.com> Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50261 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/dedede/Kconfig1
-rw-r--r--src/mainboard/google/dedede/variants/magolor/overridetree.cb57
2 files changed, 57 insertions, 1 deletions
diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig
index 1dca1b6771..3ec377e6a3 100644
--- a/src/mainboard/google/dedede/Kconfig
+++ b/src/mainboard/google/dedede/Kconfig
@@ -12,6 +12,7 @@ config BOARD_GOOGLE_BASEBOARD_DEDEDE
select EC_GOOGLE_CHROMEEC
select EC_GOOGLE_CHROMEEC_BOARDID
select EC_GOOGLE_CHROMEEC_ESPI
+ select EC_GOOGLE_CHROMEEC_INCLUDE_SSFC_IN_FW_CONFIG
select EC_GOOGLE_CHROMEEC_SKUID
select FW_CONFIG
select FW_CONFIG_SOURCE_CHROMEEC_CBI
diff --git a/src/mainboard/google/dedede/variants/magolor/overridetree.cb b/src/mainboard/google/dedede/variants/magolor/overridetree.cb
index 0deff6072a..841f7d6062 100644
--- a/src/mainboard/google/dedede/variants/magolor/overridetree.cb
+++ b/src/mainboard/google/dedede/variants/magolor/overridetree.cb
@@ -1,3 +1,11 @@
+fw_config
+ field CAMERA_WFC 38 40
+ option CAMERA_NONE 0
+ option CAMERA_OVTI5675 1
+ option CAMERA_OVTI8856 2
+ end
+end
+
chip soc/intel/jasperlake
# USB Port Configuration
@@ -241,7 +249,54 @@ chip soc/intel/jasperlake
register "off_seq.ops[2]" = "SEQ_OPS_GPIO_DISABLE(1, 0)"
register "off_seq.ops[3]" = "SEQ_OPS_GPIO_DISABLE(0, 0)"
- device i2c 36 on end
+ device i2c 36 on
+ probe CAMERA_WFC CAMERA_NONE
+ probe CAMERA_WFC CAMERA_OVTI5675
+ end
+ end
+ chip drivers/intel/mipi_camera
+ register "acpi_hid" = ""OVTI8856""
+ register "acpi_uid" = "0"
+ register "acpi_name" = ""CAM0""
+ register "chip_name" = ""Ov 8856 Camera""
+ register "device_type" = "INTEL_ACPI_CAMERA_SENSOR"
+
+ register "ssdb.lanes_used" = "2"
+ register "ssdb.link_used" = "1"
+ register "ssdb.vcm_type" = "0x0C"
+ register "vcm_name" = ""VCM0""
+ register "num_freq_entries" = "2"
+ register "link_freq[0]" = "720000000"
+ register "link_freq[1]" = "360000000"
+ register "remote_name" = ""IPU0""
+
+ register "has_power_resource" = "1"
+ #Controls
+ register "clk_panel.clks[0].clknum" = "1" #IMGCLKOUT_1
+ register "clk_panel.clks[0].freq" = "1" #19.2 Mhz
+
+ register "gpio_panel.gpio[0].gpio_num" = "GPP_D13" #power_enable_2p8
+ register "gpio_panel.gpio[1].gpio_num" = "GPP_D14" #power_enable_1p2
+ register "gpio_panel.gpio[2].gpio_num" = "GPP_D12" #reset
+
+ #_ON
+ register "on_seq.ops_cnt" = "5"
+ register "on_seq.ops[0]" = "SEQ_OPS_CLK_ENABLE(0, 0)"
+ register "on_seq.ops[1]" = "SEQ_OPS_GPIO_ENABLE(0, 5)"
+ register "on_seq.ops[2]" = "SEQ_OPS_GPIO_ENABLE(1, 5)"
+ register "on_seq.ops[3]" = "SEQ_OPS_GPIO_DISABLE(2, 5)"
+ register "on_seq.ops[4]" = "SEQ_OPS_GPIO_ENABLE(2, 5)"
+
+ #_OFF
+ register "off_seq.ops_cnt" = "4"
+ register "off_seq.ops[0]" = "SEQ_OPS_CLK_DISABLE(0, 0)"
+ register "off_seq.ops[1]" = "SEQ_OPS_GPIO_DISABLE(2, 0)"
+ register "off_seq.ops[2]" = "SEQ_OPS_GPIO_DISABLE(1, 0)"
+ register "off_seq.ops[3]" = "SEQ_OPS_GPIO_DISABLE(0, 0)"
+
+ device i2c 10 on
+ probe CAMERA_WFC CAMERA_OVTI8856
+ end
end
chip drivers/intel/mipi_camera
register "acpi_uid" = "3"