media: atomisp_gmin_platform: Base CsiPort default on detected CLK
authorHans de Goede <hdegoede@redhat.com>
Sun, 16 Jan 2022 21:52:03 +0000 (22:52 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Tue, 8 Feb 2022 05:28:38 +0000 (06:28 +0100)
commitf88fba1a411cc461b2563fb08715831745012830
treeee53e46854f34f692b0472d86e1092fadcbabbed
parentee328dded2274a7e1a65988b289337d52e70951c
media: atomisp_gmin_platform: Base CsiPort default on detected CLK

On devices with 2 cameras and no _DSM / EFI-vars providing CsiPort
clock info, defaulting to CsiPort 0 obviously is wrong for 1 of the
2 cameras.

The Intel Cherry Trail (ISP2401) reference design combines:
 pmc_plt_clk_2 with CsiPort 0
 pmc_plt_clk_4 with CsiPort 1

The Intel Bay Trail (ISP2400) reference design combines:
 pmc_plt_clk_1 with CsiPort 0
 pmc_plt_clk_0 with CsiPort 1

Use this knowledge to set the default CsiPort value based on
the detected CLK for the sensor.

Link: https://lore.kernel.org/linux-media/20220116215204.307649-9-hdegoede@redhat.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c