platform/x86: int3472: support the POWER1 GPIO type
Subsystems (2)
PATCH v2 1/1 platform/x86: int3472: support the POWER1 GPIO type
INT3472 can describe a second sensor power rail as a GPIO of type POWER1 (0x08), which the driver does not recognise, so the rail is left unmapped and never enabled:
int3472-discrete INT3472:01: GPIO type 0x08 unknown; the sensor may not work
On the Microsoft Surface Pro 7+ the rear camera's INT3472 (INT347A, ov8865) has such a pin; without it the ov8865 "dvdd" supply resolves to a dummy regulator and the sensor never probes.
Define the POWER0 (0x07) and POWER1 (0x08) GPIO types and map POWER1 to a regulator with con_id "dvdd" for all devices, the supply the in-tree ov8865 driver already requests. POWER0 is defined but left unmapped, as no device that uses it is known.
Out-of-tree work approached the same rail by exposing it to the sensor as a new "pwr1" supply (linux-surface PR #1867 for the Surface Pro 9, PR #2201 for the Pro 7+ ov8865); mapping POWER1 to the existing "dvdd" keeps the change contained to int3472.
With this change the Surface Pro 7+ rear camera probes and streams reliably.
---
Changes in v2:
- Reworked from a per-device INT347A quirk into a generic mapping of the POWER1 (0x08) GPIO type to "dvdd" for all devices, per review.
- Added INT3472_GPIO_TYPE_POWER0 (0x07) and POWER1 (0x08) definitions; POWER0 is defined but left unmapped for now.
- Retested on the Surface Pro 7+ (kernel 7.1.5): the rear ov8865 probes, instantiates its VCM, and streams.
- Link to v1: https://patch.msgid.link/[email protected]
--- drivers/platform/x86/intel/int3472/discrete.c | 8 ++++++++ include/linux/platform_data/x86/int3472.h | 2 ++ 2 files changed, 10 insertions(+)
drivers/platform/x86/intel/int3472/discrete.c +8 -0
@@ -227,6 +227,10 @@ static void int3472_get_con_id_and_polarity(struct int3472_discrete_device *int3 *con_id ="avdd" ; *gpio_flags =GPIO_ACTIVE_HIGH ;break ; +case INT3472_GPIO_TYPE_POWER1 : + *con_id ="dvdd" ; + *gpio_flags =GPIO_ACTIVE_HIGH ; +break ;case INT3472_GPIO_TYPE_DOVDD : *con_id ="dovdd" ; *gpio_flags =GPIO_ACTIVE_HIGH ;
@@ -257,6 +261,8 @@ static void int3472_get_con_id_and_polarity(struct int3472_discrete_device *int3* 0x00 Reset * 0x01 Power down * 0x02 Strobe +* 0x07 Power 0 +* 0x08 Power 1 * 0x0b Power enable * 0x0c Clock enable * 0x0d Privacy LED
@@ -343,6 +349,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,case INT3472_GPIO_TYPE_PRIVACY_LED :case INT3472_GPIO_TYPE_STROBE :case INT3472_GPIO_TYPE_POWER_ENABLE : +case INT3472_GPIO_TYPE_POWER1 :case INT3472_GPIO_TYPE_DOVDD :case INT3472_GPIO_TYPE_HANDSHAKE : gpio =skl_int3472_gpiod_get_from_temp_lookup (int3472, agpio, con_id, gpio_flags);
@@ -369,6 +376,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,case INT3472_GPIO_TYPE_POWER_ENABLE : second_sensor = int3472->quirks.avdd_second_sensor; fallthrough; +case INT3472_GPIO_TYPE_POWER1 :case INT3472_GPIO_TYPE_DOVDD :case INT3472_GPIO_TYPE_HANDSHAKE : ret = skl_int3472_register_regulator(int3472, gpio, enable_time_us,
include/linux/platform_data/x86/int3472.h +2 -0
@@ -25,6 +25,8 @@#define INT3472_GPIO_TYPE_RESET 0x00#define INT3472_GPIO_TYPE_POWERDOWN 0x01#define INT3472_GPIO_TYPE_STROBE 0x02 +#define INT3472_GPIO_TYPE_POWER0 0x07 +#define INT3472_GPIO_TYPE_POWER1 0x08#define INT3472_GPIO_TYPE_POWER_ENABLE 0x0b#define INT3472_GPIO_TYPE_CLK_ENABLE 0x0c#define INT3472_GPIO_TYPE_PRIVACY_LED 0x0d
---
base-commit: 2b3a5dabe89e330413af403246b648c1890f368f
change-id: 20260719-sp7plus-int3472-8f014b8de79c
Best regards,
Signature · 1 line
Jakob Berg Jespersen <[email protected]>
Sakari Ailus
maintainerHi Jakob,
Quoted 21 lines · Jakob Berg Jespersen
INT3472 can describe a second sensor power rail as a GPIO of type POWER1 (
0x08), which the driver does not recognise, so the rail is left unmapped and never enabled:int3472-discrete INT3472:01: GPIO type
0x08unknown; the sensor may not workOn the Microsoft Surface Pro 7+ the rear camera's INT3472 (INT347A, ov8865) has such a pin; without it the ov8865 "dvdd" supply resolves to a dummy regulator and the sensor never probes.
Define the POWER0 (
0x07) and POWER1 (0x08) GPIO types and map POWER1 to a regulator withcon_id"dvdd" for all devices, the supply the in-tree ov8865 driver already requests. POWER0 is defined but left unmapped, as no device that uses it is known.Out-of-tree work approached the same rail by exposing it to the sensor as a new "pwr1" supply (linux-surface PR #1867 for the Surface Pro 9, PR #2201 for the Pro 7+ ov8865); mapping POWER1 to the existing "dvdd" keeps the change contained to int3472.
Quoted 7 lines
With this change the Surface Pro 7+ rear camera probes and streams reliably.
Could you resend v2 (or v3, if there are changes) this and cc linux-media list as well? (The MAINTAINERS change adding that list isn't merged yet.)
Signature · 3 lines
Regards, Sakari Ailus