amdgpu creates the ISP 4.1.1 devices only when it finds a sensor from isp_sensor_ids, which lists only OMNI5C10. The ASUS ROG Flow Z13 (GZ302EA) has an OmniVision OV13B10 with _HID "OMNI13B1" on the same ISP, so its camera is never set up.
Add OMNI13B1 and register its GPIO lookups: - enable_isp on AMDI0030:00 pin 85, as for OMNI5C10. The ISP4 capture driver requests this GPIO and fails to probe without it. On the GZ302 no ACPI device claims the pin, and the ISP also boots with it left undriven, so its function on this board is not confirmed. - the sensor reset line on amdisp-pinctrl GPIO 0, active low, under the "reset" name the ov13b10 driver requests. This is the same ISP GPIO as the OV05C10 enable line. Like the OMNI5C10 tables, they are registered once and stay registered. The ISP setup uses the software node that amd_isp4 attaches to the ACPI device, so this needs the amd_isp4 board configuration for OMNI13B1 to be in place. Signed-off-by: Seifelden Abdelmonem <[email protected]> --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 1 + drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index 63088c072..412d3992c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c @@ -1726,6 +1726,7 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) #if IS_ENABLED(CONFIG_DRM_AMD_ISP) static const struct acpi_device_id isp_sensor_ids[] = { { "OMNI5C10" }, + { "OMNI13B1" }, { } }; diff --git a/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c b/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c index 363266f3e..7d6072e27 100644 --- a/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c +++ b/drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c @@ -65,6 +65,14 @@ static struct gpiod_lookup_table isp_sensor_gpio_table = { }, }; +static struct gpiod_lookup_table isp_ov13b10_gpio_table = { + .dev_id = "i2c-ov13b10", + .table = { + GPIO_LOOKUP("amdisp-pinctrl", 0, "reset", GPIO_ACTIVE_LOW), + { } + }, +}; + static int isp_poweroff(struct generic_pm_domain *genpd) { struct amdgpu_isp *isp = container_of(genpd, struct amdgpu_isp, ispgpd); @@ -240,10 +248,13 @@ static int isp_v4_1_1_hw_init(struct amdgpu_isp *isp) return 0; } - /* add GPIO resources required for OMNI5C10 sensor */ + /* add GPIO resources required for the sensor */ if (!strcmp("OMNI5C10", acpi_device_hid(acpi_dev))) { gpiod_add_lookup_table(&isp_gpio_table); gpiod_add_lookup_table(&isp_sensor_gpio_table); + } else if (!strcmp("OMNI13B1", acpi_device_hid(acpi_dev))) { + gpiod_add_lookup_table(&isp_gpio_table); + gpiod_add_lookup_table(&isp_ov13b10_gpio_table); } isp_base = adev->rmmio_base; -- 2.56.0
