mb/google/brya/var/redrix: Select camera module based on SSFC value

This patch has changes to support multiple camera modules, base on the value set in the SSFC_CONFIG.

BUG=b:198235323
TEST=tested the changes with redrix 5MP(ov5675/hi556) camera.

Change-Id: I71c8355617171ec7d08862759b87d4bf12ce2924
Signed-off-by: Arec Kao <arec.kao@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57272
Reviewed-by: Andy Yeh <andy.yeh@intel.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arec Kao 2021-09-16 12:03:45 +08:00 committed by Tim Wawrzynczak
parent 5c4783c205
commit 093ac93032
2 changed files with 51 additions and 3 deletions

View File

@ -32,6 +32,7 @@ config BOARD_GOOGLE_REDRIX
select CHROMEOS_DSM_CALIB if CHROMEOS select CHROMEOS_DSM_CALIB if CHROMEOS
select DRIVERS_I2C_MAX98390 select DRIVERS_I2C_MAX98390
select DRIVERS_INTEL_MIPI_CAMERA select DRIVERS_INTEL_MIPI_CAMERA
select EC_GOOGLE_CHROMEEC_INCLUDE_SSFC_IN_FW_CONFIG
select SOC_INTEL_COMMON_BLOCK_IPU select SOC_INTEL_COMMON_BLOCK_IPU
select DRIVERS_GENESYSLOGIC_GL9755 select DRIVERS_GENESYSLOGIC_GL9755
select DRIVERS_GFX_GENERIC select DRIVERS_GFX_GENERIC

View File

@ -20,6 +20,11 @@ fw_config
option PRIVACY_SCREEN_ABSENT 0 option PRIVACY_SCREEN_ABSENT 0
option PRIVACY_SCREEN 1 option PRIVACY_SCREEN 1
end end
field CAMERA_UFC 38 39
option CAMERA_NONE 0
option CAMERA_OV5675 1
option CAMERA_HI556 2
end
end end
chip soc/intel/alderlake chip soc/intel/alderlake
register "SaGv" = "SaGv_Enabled" register "SaGv" = "SaGv_Enabled"
@ -271,7 +276,7 @@ chip soc/intel/alderlake
register "clk_panel.clks[0].clknum" = "IMGCLKOUT_3" register "clk_panel.clks[0].clknum" = "IMGCLKOUT_3"
register "clk_panel.clks[0].freq" = "FREQ_19_2_MHZ" register "clk_panel.clks[0].freq" = "FREQ_19_2_MHZ"
register "gpio_panel.gpio[0].gpio_num" = "GPP_D15" #PP3300_FCAM_X register "gpio_panel.gpio[0].gpio_num" = "GPP_D15" #EN_UCAM_LED_PWR
register "gpio_panel.gpio[1].gpio_num" = "GPP_D16" #EN_UCAM_PWR register "gpio_panel.gpio[1].gpio_num" = "GPP_D16" #EN_UCAM_PWR
register "gpio_panel.gpio[2].gpio_num" = "GPP_D3" #reset register "gpio_panel.gpio[2].gpio_num" = "GPP_D3" #reset
@ -289,7 +294,50 @@ chip soc/intel/alderlake
register "off_seq.ops[1]" = "SEQ_OPS_GPIO_DISABLE(2, 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[2]" = "SEQ_OPS_GPIO_DISABLE(1, 0)"
register "off_seq.ops[3]" = "SEQ_OPS_GPIO_DISABLE(0, 0)" register "off_seq.ops[3]" = "SEQ_OPS_GPIO_DISABLE(0, 0)"
device i2c 36 on end device i2c 36 on
probe CAMERA_UFC CAMERA_NONE
probe CAMERA_UFC CAMERA_OV5675
end
end
chip drivers/intel/mipi_camera
register "acpi_hid" = ""INT3537""
register "acpi_uid" = "0"
register "acpi_name" = ""CAM0""
register "chip_name" = ""Hi-556 Camera""
register "device_type" = "INTEL_ACPI_CAMERA_SENSOR"
register "ssdb.lanes_used" = "2"
register "ssdb.link_used" = "1"
register "num_freq_entries" = "1"
register "link_freq[0]" = "437000000"
register "remote_name" = ""IPU0""
register "has_power_resource" = "1"
#Controls
register "clk_panel.clks[0].clknum" = "IMGCLKOUT_3"
register "clk_panel.clks[0].freq" = "FREQ_19_2_MHZ"
register "gpio_panel.gpio[0].gpio_num" = "GPP_D15" #EN_UCAM_LED_PWR
register "gpio_panel.gpio[1].gpio_num" = "GPP_D16" #EN_UCAM_PWR
register "gpio_panel.gpio[2].gpio_num" = "GPP_D3" #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 20 on
probe CAMERA_UFC CAMERA_HI556
end
end end
chip drivers/intel/mipi_camera chip drivers/intel/mipi_camera
register "acpi_hid" = "ACPI_DT_NAMESPACE_HID" register "acpi_hid" = "ACPI_DT_NAMESPACE_HID"
@ -305,7 +353,6 @@ chip soc/intel/alderlake
register "nvm_readonly" = "1" register "nvm_readonly" = "1"
register "nvm_width" = "0x10" register "nvm_width" = "0x10"
register "nvm_compat" = ""atmel,24c64"" register "nvm_compat" = ""atmel,24c64""
device i2c 50 on end device i2c 50 on end
end end