platform/x86: Add AMD ISP platform config for OV05C10
PATCH v14 1/1 platform/x86: Add AMD ISP platform config for OV05C10
ISP device specific configuration is not available in ACPI. Add swnode graph to configure the missing device properties for the OV05C10 camera device supported on amdisp platform.
Add support to create i2c-client dynamically when amdisp i2c adapter is available.
---
Changes v13 -> v14:
* Add header files, remove redundant casts and other cosmetic changes.
drivers/platform/x86/amd/Kconfig | 11 + drivers/platform/x86/amd/Makefile | 1 + drivers/platform/x86/amd/amd_isp4.c | 311 ++++++++++++++++++++++++++++ 3 files changed, 323 insertions(+) create mode 100644 drivers/platform/x86/amd/amd_isp4.c
drivers/platform/x86/amd/Kconfig +11 -0
@@ -32,3 +32,14 @@ config AMD_WBRF This mechanism will only be activated on platforms that advertise a need for it. + +config AMD_ISP_PLATFORM + tristate "AMD ISP4 platform driver" + depends on I2C && X86_64 && ACPI + help + Platform driver for AMD platforms containing image signal processor + gen 4. Provides camera sensor module board information to allow + sensor and V4L drivers to work properly. + + This driver can also be built as a module. If so, the module + will be called amd_isp4.
drivers/platform/x86/amd/Makefile +1 -0
@@ -10,3 +10,4 @@ obj-$(CONFIG_AMD_PMC) += pmc/ obj-$(CONFIG_AMD_HSMP) += hsmp/ obj-$(CONFIG_AMD_PMF) += pmf/ obj-$(CONFIG_AMD_WBRF) += wbrf.o +obj-$(CONFIG_AMD_ISP_PLATFORM) += amd_isp4.o
drivers/platform/x86/amd/amd_isp4.c new file +311 -0
311 lines not on this page · raw message
Signature · 1 line
2.43.0
drivers/platform/x86/amd/Kconfig config AMD_WBRF · line 44
Quoted 9 lines
drivers/platform/x86/amd/Kconfig +9
-0+config AMD_ISP_PLATFORM + tristate "AMD ISP4 platform driver" + depends on I2C && X86_64 && ACPI + help + Platform driver for AMD platforms containing image signal processor + gen 4. Provides camera sensor module board information to allow + sensor and V4L drivers to work properly. + + This driver can also be built as a module. If so, the module
remove extra '' before If
[clip]
Quoted 16 lines
drivers/platform/x86/amd/amd_isp4.c new file +16
-0+/* +* Remote endpoint AMD ISP node definition. No properties defined for +* remote endpoint node for OV05C10. +*/ +static const struct software_node remote_ep_isp_node = { + .name =AMDISP_OV05C10_REMOTE_EP_NAME , +}; + +/* +* Remote endpoint reference for isp node included in the +* OV05C10 endpoint. +*/ +static const struct software_node_ref_args ov05c10_refs[] = { +SOFTWARE_NODE_REFERENCE (&remote_ep_isp_node), +}; +
drivers/platform/x86/amd/amd_isp4.c line 100
Quoted 10 lines
drivers/platform/x86/amd/amd_isp4.c new file +10
-0+/* OV05C supports one single link frequency */ +static const u64 ov05c10_link_freqs[] = { +925 *HZ_PER_MHZ , +}; + +/* OV05C supports only 2-lane configuration */ +static const u32 ov05c10_data_lanes[] = { +1 , +2 , +};
OV05C -> OV05C10
drivers/platform/x86/amd/amd_isp4.c line 112
Quoted 12 lines
drivers/platform/x86/amd/amd_isp4.c new file +12
-0+ +/* OV05C10 endpoint node properties table */ +static const struct property_entry ov05c10_endpoint_props[] = { +PROPERTY_ENTRY_U32 ("bus-type" ,4 ), +PROPERTY_ENTRY_U32_ARRAY_LEN ("data-lanes" , ov05c10_data_lanes, +ARRAY_SIZE (ov05c10_data_lanes)), +PROPERTY_ENTRY_U64_ARRAY_LEN ("link-frequencies" , ov05c10_link_freqs, +ARRAY_SIZE (ov05c10_link_freqs)), +PROPERTY_ENTRY_REF_ARRAY ("remote-endpoint" , ov05c10_refs), + { } +}; +
[clip]
Thanks,
Alok
Hi Alok,
Quoted 16 lines · ALOK TIWARI
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Quoted 10 lines
+config
AMD_ISP_PLATFORM
+ tristate "AMD ISP4 platform driver"
+ depends on I2C &&X86_64&& ACPI
+ help
+ Platform driver for AMD platforms containing image signal processor
+ gen 4. Provides camera sensor module board information to allow + sensor and V4L drivers to work properly.
+
+ This driver can also be built as a module. If so, the moduleremove extra '' before If
sure, will remove the extra space.
Quoted 21 lines
[clip]
Quoted 20 lines
drivers/platform/x86/amd/amd_isp4.c new file +20
-0+/* +* Remote endpoint AMD ISP node definition. No properties defined for +* remote endpoint node for OV05C10. +*/ +static const struct software_node remote_ep_isp_node = { + .name = AMDISP_OV05C10_REMOTE_EP_NAME, +}; + +/* +* Remote endpoint reference for isp node included in the +* OV05C10 endpoint. +*/ +static const struct software_node_ref_args ov05c10_refs[] = { + SOFTWARE_NODE_REFERENCE(&remote_ep_isp_node), +}; + +/* OV05C supports one single link frequency */ +static const u64 ov05c10_link_freqs[] = { + 925 * HZ_PER_MHZ, +};
Quoted 9 lines
drivers/platform/x86/amd/amd_isp4.c line 100
Quoted 6 lines
drivers/platform/x86/amd/amd_isp4.c new file +6
-0+ +/* OV05C supports only 2-lane configuration */ +static const u32 ov05c10_data_lanes[] = { + 1, + 2, +};OV05C -> OV05C10
ok, will fix it in next patch v15.
Thanks,
Pratap
Quoted 21 lines
Review
Quoted 13 lines
drivers/platform/x86/amd/amd_isp4.c new file +7
-0+ +/* OV05C10 endpoint node properties table */ +static const struct property_entry ov05c10_endpoint_props[] = { + PROPERTY_ENTRY_U32("bus-type", 4), + PROPERTY_ENTRY_U32_ARRAY_LEN("data-lanes", ov05c10_data_lanes, + ARRAY_SIZE(ov05c10_data_lanes)), + PROPERTY_ENTRY_U64_ARRAY_LEN("link-frequencies",
ov05c10_link_freqs,
+ARRAY_SIZE(ov05c10_link_freqs)), +PROPERTY_ENTRY_REF_ARRAY("remote-endpoint", ov05c10_refs), + { }(quoted diff) +2
-0+}; +[clip]
Thanks,
Alok