sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget1/translations/zh_CN/driver-api/media/drivers/ipu6modnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/zh_TW/driver-api/media/drivers/ipu6modnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/it_IT/driver-api/media/drivers/ipu6modnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/ja_JP/driver-api/media/drivers/ipu6modnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/ko_KR/driver-api/media/drivers/ipu6modnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/sp_SP/driver-api/media/drivers/ipu6modnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhK/var/lib/git/docbuild/linux/Documentation/driver-api/media/drivers/ipu6.rsthKubhsection)}(hhh](htitle)}(hIntel IPU6 Driverh]hIntel IPU6 Driver}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(h)Author: Bingbu Cao h](hAuthor: Bingbu Cao <}(hhhhhNhNubh reference)}(hbingbu.cao@intel.comh]hbingbu.cao@intel.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:bingbu.cao@intel.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hOverviewh]hOverview}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh)}(hXOIntel IPU6 is the sixth generation of Intel Image Processing Unit used in some Intel Chipsets such as Tiger Lake, Jasper Lake, Alder Lake, Raptor Lake and Meteor Lake. IPU6 consists of two major systems: Input System (ISYS) and Processing System (PSYS). IPU6 are visible on the PCI bus as a single device, it can be found by ``lspci``:h](hXEIntel IPU6 is the sixth generation of Intel Image Processing Unit used in some Intel Chipsets such as Tiger Lake, Jasper Lake, Alder Lake, Raptor Lake and Meteor Lake. IPU6 consists of two major systems: Input System (ISYS) and Processing System (PSYS). IPU6 are visible on the PCI bus as a single device, it can be found by }(hjhhhNhNubhliteral)}(h ``lspci``h]hlspci}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hN``0000:00:05.0 Multimedia controller: Intel Corporation Device xxxx (rev xx)``h]j )}(hj$h]hJ0000:00:05.0 Multimedia controller: Intel Corporation Device xxxx (rev xx)}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h_IPU6 has a 16 MB BAR in PCI configuration Space for MMIO registers which is visible for driver.h]h_IPU6 has a 16 MB BAR in PCI configuration Space for MMIO registers which is visible for driver.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]overviewah ]h"]overviewah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hButtressh]hButtress}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhhhhhKubh)}(hThe IPU6 is connecting to the system fabric with Buttress which is enabling host driver to control the IPU6, it also allows IPU6 access the system memory to store and load frame pixel streams and any other metadata.h]hThe IPU6 is connecting to the system fabric with Buttress which is enabling host driver to control the IPU6, it also allows IPU6 access the system memory to store and load frame pixel streams and any other metadata.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjOhhubh)}(hButtress mainly manages several system functionalities: power management, interrupt handling, firmware authentication and global timer sync.h]hButtress mainly manages several system functionalities: power management, interrupt handling, firmware authentication and global timer sync.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjOhhubh)}(hhh](h)}(hISYS and PSYS Power flowh]hISYS and PSYS Power flow}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hhhhhK"ubh)}(hIPU6 driver initialize the ISYS and PSYS power up or down request by setting the Buttress frequency control register for ISYS and PSYS (``IPU6_BUTTRESS_REG_IS_FREQ_CTL`` and ``IPU6_BUTTRESS_REG_PS_FREQ_CTL``) in function:h](hIPU6 driver initialize the ISYS and PSYS power up or down request by setting the Buttress frequency control register for ISYS and PSYS (}(hjhhhNhNubj )}(h!``IPU6_BUTTRESS_REG_IS_FREQ_CTL``h]hIPU6_BUTTRESS_REG_IS_FREQ_CTL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj )}(h!``IPU6_BUTTRESS_REG_PS_FREQ_CTL``h]hIPU6_BUTTRESS_REG_PS_FREQ_CTL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) in function:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK$hj|hhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single ipu6_buttress_power (C function)c.ipu6_buttress_powerhNtauh1jhj|hhhNhNubhdesc)}(hhh](hdesc_signature)}(hint ipu6_buttress_power(...)h]hdesc_signature_line)}(hint ipu6_buttress_power(...)h](hdesc_sig_keyword_type)}(hinth]hint}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjhhhhhK)ubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhhhK)ubh desc_name)}(hipu6_buttress_powerh]h desc_sig_name)}(hipu6_buttress_powerh]hipu6_buttress_power}(hj hhhNhNubah}(h]h ]nah"]h$]h&]uh1j hjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhhhK)ubhdesc_parameterlist)}(h(...)h]hdesc_parameter)}(h...h]hdesc_sig_punctuation)}(h...h]h...}(hj0hhhNhNubah}(h]h ]pah"]h$]h&]uh1j.hj*ubah}(h]h ]h"]h$]h&]noemphhhuh1j(hj$ubah}(h]h ]h"]h$]h&]hhuh1j"hjhhhhhK)ubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhhhK)ubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhhhK)hjhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1j`hjhhhhhK)ubeh}(h]h ](cfunctioneh"]h$]h&]domainjnobjtypejodesctypejonoindex noindexentrynocontentsentryuh1jhhhj|hNhNubh)}(hButtress forwards the request to Punit, after Punit execute the power up flow, Buttress indicates driver that ISYS or PSYS is powered up by updating the power status registers.h]hButtress forwards the request to Punit, after Punit execute the power up flow, Buttress indicates driver that ISYS or PSYS is powered up by updating the power status registers.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hj|hhubhnote)}(hISYS power up needs take place prior to PSYS power up, ISYS power down needs take place after PSYS power down due to hardware limitation.h]h)}(hISYS power up needs take place prior to PSYS power up, ISYS power down needs take place after PSYS power down due to hardware limitation.h]hISYS power up needs take place prior to PSYS power up, ISYS power down needs take place after PSYS power down due to hardware limitation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhj|hhhhhNubeh}(h]isys-and-psys-power-flowah ]h"]isys and psys power flowah$]h&]uh1hhjOhhhhhK"ubh)}(hhh](h)}(h Interrupth]h Interrupt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK3ubh)}(hX4IPU6 interrupt can be generated as MSI or INTA, interrupt will be triggered when ISYS, PSYS, Buttress event or error happen, driver can get the interrupt cause by reading the interrupt status register ``BUTTRESS_REG_ISR_STATUS``, driver clears the irq status and then calls specific ISYS or PSYS irq handler.h](hIPU6 interrupt can be generated as MSI or INTA, interrupt will be triggered when ISYS, PSYS, Buttress event or error happen, driver can get the interrupt cause by reading the interrupt status register }(hjhhhNhNubj )}(h``BUTTRESS_REG_ISR_STATUS``h]hBUTTRESS_REG_ISR_STATUS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhP, driver clears the irq status and then calls specific ISYS or PSYS irq handler.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK5hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jipu6_buttress_isr (C function)c.ipu6_buttress_isrhNtauh1jhjhhhNhNubj)}(hhh](j)}(h+irqreturn_t ipu6_buttress_isr(int irq, ...)h]j)}(h+irqreturn_t ipu6_buttress_isr(int irq, ...)h](h)}(hhh]j )}(h irqreturn_th]h irqreturn_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjnreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}j ipu6_buttress_isrsbc.ipu6_buttress_israsbuh1hhjhhhhhK:ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhK:ubj)}(hipu6_buttress_isrh]j )}(hjh]hipu6_buttress_isr}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1j hj-ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhhhK:ubj#)}(h(int irq, ...)h](j))}(hint irqh](j)}(hinth]hint}(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj )}(hirqh]hirq}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjHubeh}(h]h ]h"]h$]h&]noemphhhuh1j(hjDubj))}(h...h]j/)}(hj2h]h...}(hjhhhNhNubah}(h]h ]j;ah"]h$]h&]uh1j.hj}ubah}(h]h ]h"]h$]h&]noemphhhuh1j(hjDubeh}(h]h ]h"]h$]h&]hhuh1j"hjhhhhhK:ubeh}(h]h ]h"]h$]h&]hhjRuh1jjSjThjhhhhhK:ubah}(h]jah ](jXjYeh"]h$]h&]j]j^)j_huh1jhhhK:hjhhubja)}(hhh]h}(h]h ]h"]h$]h&]uh1j`hjhhhhhK:ubeh}(h]h ](jnfunctioneh"]h$]h&]jsjnjtjjujjvjwjxuh1jhhhjhNhNubeh}(h] interruptah ]h"] interruptah$]h&]uh1hhjOhhhhhK3ubh)}(hhh](h)}(h$Security and firmware authenticationh]h$Security and firmware authentication}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK=ubh)}(hXnTo address the IPU6 firmware security concerns, the IPU6 firmware needs to undergo an authentication process before it is allowed to executed on the IPU6 internal processors. The IPU6 driver will work with Converged Security Engine (CSE) to complete authentication process. The CSE is responsible of authenticating the IPU6 firmware. The authenticated firmware binary is copied into an isolated memory region. Firmware authentication process is implemented by CSE following an IPC handshake with the IPU6 driver. There are some Buttress registers used by the CSE and the IPU6 driver to communicate with each other via IPC.h]hXnTo address the IPU6 firmware security concerns, the IPU6 firmware needs to undergo an authentication process before it is allowed to executed on the IPU6 internal processors. The IPU6 driver will work with Converged Security Engine (CSE) to complete authentication process. The CSE is responsible of authenticating the IPU6 firmware. The authenticated firmware binary is copied into an isolated memory region. Firmware authentication process is implemented by CSE following an IPC handshake with the IPU6 driver. There are some Buttress registers used by the CSE and the IPU6 driver to communicate with each other via IPC.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'ipu6_buttress_authenticate (C function)c.ipu6_buttress_authenticatehNtauh1jhjhhhNhNubj)}(hhh](j)}(h#int ipu6_buttress_authenticate(...)h]j)}(h#int ipu6_buttress_authenticate(...)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhKIubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhKIubj)}(hipu6_buttress_authenticateh]j )}(hipu6_buttress_authenticateh]hipu6_buttress_authenticate}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhhhKIubj#)}(h(...)h]j))}(h...h]j/)}(hj2h]h...}(hj3hhhNhNubah}(h]h ]j;ah"]h$]h&]uh1j.hj/ubah}(h]h ]h"]h$]h&]noemphhhuh1j(hj+ubah}(h]h ]h"]h$]h&]hhuh1j"hjhhhhhKIubeh}(h]h ]h"]h$]h&]hhjRuh1jjSjThjhhhhhKIubah}(h]jah ](jXjYeh"]h$]h&]j]j^)j_huh1jhhhKIhjhhubja)}(hhh]h}(h]h ]h"]h$]h&]uh1j`hjhhhhhKIubeh}(h]h ](jnfunctioneh"]h$]h&]jsjnjtjejujejvjwjxuh1jhhhjhNhNubeh}(h]$security-and-firmware-authenticationah ]h"]$security and firmware authenticationah$]h&]uh1hhjOhhhhhK=ubh)}(hhh](h)}(hGlobal timer synch]hGlobal timer sync}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhhhhhKLubh)}(hXThe IPU6 driver initiates a Hammock Harbor synchronization flow each time it starts camera operation. The IPU6 will synchronizes an internal counter in the Buttress with a copy of the SoC time, this counter maintains the up-to-date time until camera operation is stopped. The IPU6 driver can use this time counter to calibrate the timestamp based on the timestamp in response event from firmware.h]hXThe IPU6 driver initiates a Hammock Harbor synchronization flow each time it starts camera operation. The IPU6 will synchronizes an internal counter in the Buttress with a copy of the SoC time, this counter maintains the up-to-date time until camera operation is stopped. The IPU6 driver can use this time counter to calibrate the timestamp based on the timestamp in response event from firmware.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjqhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)ipu6_buttress_start_tsc_sync (C function)c.ipu6_buttress_start_tsc_synchNtauh1jhjqhhhNhNubj)}(hhh](j)}(h%int ipu6_buttress_start_tsc_sync(...)h]j)}(h%int ipu6_buttress_start_tsc_sync(...)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhKTubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhhKTubj)}(hipu6_buttress_start_tsc_synch]j )}(hipu6_buttress_start_tsc_synch]hipu6_buttress_start_tsc_sync}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j hjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhhhKTubj#)}(h(...)h]j))}(h...h]j/)}(hj2h]h...}(hjhhhNhNubah}(h]h ]j;ah"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]noemphhhuh1j(hjubah}(h]h ]h"]h$]h&]hhuh1j"hjhhhhhKTubeh}(h]h ]h"]h$]h&]hhjRuh1jjSjThjhhhhhKTubah}(h]jah ](jXjYeh"]h$]h&]j]j^)j_huh1jhhhKThjhhubja)}(hhh]h}(h]h ]h"]h$]h&]uh1j`hjhhhhhKTubeh}(h]h ](jnfunctioneh"]h$]h&]jsjnjtjjujjvjwjxuh1jhhhjqhNhNubeh}(h]global-timer-syncah ]h"]global timer syncah$]h&]uh1hhjOhhhhhKLubeh}(h]buttressah ]h"]buttressah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h DMA and MMUh]h DMA and MMU}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hhhhhKWubh)}(hXThe IPU6 has its own scalar processor where the firmware run at and an internal 32-bit virtual address space. The IPU6 has MMU address translation hardware to allow that scalar processors to access the internal memory and external system memory through IPU6 virtual address. The address translation is based on two levels of page lookup tables stored in system memory which are maintained by the IPU6 driver. The IPU6 driver sets the level-1 page table base address to MMU register and allows MMU to perform page table lookups.h]hXThe IPU6 has its own scalar processor where the firmware run at and an internal 32-bit virtual address space. The IPU6 has MMU address translation hardware to allow that scalar processors to access the internal memory and external system memory through IPU6 virtual address. The address translation is based on two levels of page lookup tables stored in system memory which are maintained by the IPU6 driver. The IPU6 driver sets the level-1 page table base address to MMU register and allows MMU to perform page table lookups.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhj+hhubh)}(hThe IPU6 driver exports its own DMA operations. The IPU6 driver will update the page table entries for each DMA operation and invalidate the MMU TLB after each unmap and free.h]hThe IPU6 driver exports its own DMA operations. The IPU6 driver will update the page table entries for each DMA operation and invalidate the MMU TLB after each unmap and free.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahj+hhubeh}(h] dma-and-mmuah ]h"] dma and mmuah$]h&]uh1hhhhhhhhKWubh)}(hhh](h)}(hFirmware file formath]hFirmware file format}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hhhhhKfubh)}(hXThe IPU6 firmware is in Code Partition Directory (CPD) file format. The CPD firmware contains a CPD header, several CPD entries and components. The CPD component includes 3 entries - manifest, metadata and module data. Manifest and metadata are defined by CSE and used by CSE for authentication. Module data is specific to IPU6 which holds the binary data of firmware called package directory. The IPU6 driver (``ipu6-cpd.c`` in particular) parses and validates the CPD firmware file and gets the package directory binary data of the IPU6 firmware, copies it to specific DMA buffer and sets its base address to Buttress ``FW_SOURCE_BASE`` register. Finally the CSE will do authentication for this firmware binary.h](hXThe IPU6 firmware is in Code Partition Directory (CPD) file format. The CPD firmware contains a CPD header, several CPD entries and components. The CPD component includes 3 entries - manifest, metadata and module data. Manifest and metadata are defined by CSE and used by CSE for authentication. Module data is specific to IPU6 which holds the binary data of firmware called package directory. The IPU6 driver (}(hjqhhhNhNubj )}(h``ipu6-cpd.c``h]h ipu6-cpd.c}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubh in particular) parses and validates the CPD firmware file and gets the package directory binary data of the IPU6 firmware, copies it to specific DMA buffer and sets its base address to Buttress }(hjqhhhNhNubj )}(h``FW_SOURCE_BASE``h]hFW_SOURCE_BASE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubhK register. Finally the CSE will do authentication for this firmware binary.}(hjqhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhj`hhubeh}(h]firmware-file-formatah ]h"]firmware file formatah$]h&]uh1hhhhhhhhKfubh)}(hhh](h)}(hSyscom interfaceh]hSyscom interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKuubh)}(hXThe IPU6 driver communicates with firmware via the Syscom ABI. Syscom is an inter-processor communication mechanism between the IPU scalar processors and the CPU. There are a number of resources shared between firmware and software. A system memory region where the message queues reside, firmware can access the memory region via the IPU MMU. The Syscom queues are FIFO fixed depth queues with a configurable number of tokens (messages). There are also common IPU6 MMIO registers where the queue read and write indices reside. Software and firmware function as producer and consumer of tokens in the queues and update the write and read indices separately when sending or receiving each message.h]hXThe IPU6 driver communicates with firmware via the Syscom ABI. Syscom is an inter-processor communication mechanism between the IPU scalar processors and the CPU. There are a number of resources shared between firmware and software. A system memory region where the message queues reside, firmware can access the memory region via the IPU MMU. The Syscom queues are FIFO fixed depth queues with a configurable number of tokens (messages). There are also common IPU6 MMIO registers where the queue read and write indices reside. Software and firmware function as producer and consumer of tokens in the queues and update the write and read indices separately when sending or receiving each message.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjhhubh)}(hXThe IPU6 driver must prepare and configure the number of input and output queues, configure the count of tokens per queue and the size of per token before initiating and starting the communication with firmware. Firmware and software must use same configurations. The IPU6 Buttress has a number of firmware boot parameter registers which can be used to store the address of configuration and initialise the Syscom state, then driver can request firmware to start and run via setting the scalar processor control status register.h]hXThe IPU6 driver must prepare and configure the number of input and output queues, configure the count of tokens per queue and the size of per token before initiating and starting the communication with firmware. Firmware and software must use same configurations. The IPU6 Buttress has a number of firmware boot parameter registers which can be used to store the address of configuration and initialise the Syscom state, then driver can request firmware to start and run via setting the scalar processor control status register.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]syscom-interfaceah ]h"]syscom interfaceah$]h&]uh1hhhhhhhhKuubh)}(hhh](h)}(h Input Systemh]h Input System}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hIPU6 input system consists of MIPI D-PHY and several CSI-2 receivers. It can capture image pixel data from camera sensors or other MIPI CSI-2 output devices.h]hIPU6 input system consists of MIPI D-PHY and several CSI-2 receivers. It can capture image pixel data from camera sensors or other MIPI CSI-2 output devices.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](h)}(h#D-PHYs and CSI-2 ports lane mappingh]h#D-PHYs and CSI-2 ports lane mapping}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXThe IPU6 integrates different D-PHY IPs on different SoCs, on Tiger Lake and Alder Lake, IPU6 integrates MCD10 D-PHY, IPU6SE on Jasper Lake integrates JSL D-PHY and IPU6EP on Meteor Lake integrates a Synopsys DWC D-PHY. There is an adaptional layer between D-PHY and CSI-2 receiver controller which includes port configuration, PHY wrapper or private test interfaces for D-PHY. There are 3 D-PHY drivers ``ipu6-isys-mcd-phy.c``, ``ipu6-isys-jsl-phy.c`` and ``ipu6-isys-dwc-phy.c`` program the above 3 D-PHYs in IPU6.h](hXThe IPU6 integrates different D-PHY IPs on different SoCs, on Tiger Lake and Alder Lake, IPU6 integrates MCD10 D-PHY, IPU6SE on Jasper Lake integrates JSL D-PHY and IPU6EP on Meteor Lake integrates a Synopsys DWC D-PHY. There is an adaptional layer between D-PHY and CSI-2 receiver controller which includes port configuration, PHY wrapper or private test interfaces for D-PHY. There are 3 D-PHY drivers }(hjhhhNhNubj )}(h``ipu6-isys-mcd-phy.c``h]hipu6-isys-mcd-phy.c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj )}(h``ipu6-isys-jsl-phy.c``h]hipu6-isys-jsl-phy.c}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj )}(h``ipu6-isys-dwc-phy.c``h]hipu6-isys-dwc-phy.c}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh$ program the above 3 D-PHYs in IPU6.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXDifferent IPU6 versions have different D-PHY lanes mappings, On Tiger Lake, there are 12 data lanes and 8 clock lanes, IPU6 support maximum 8 CSI-2 ports, see the PPI mmapping in ``ipu6-isys-mcd-phy.c`` for more information. On Jasper Lake and Alder Lake, D-PHY has 8 data lanes and 4 clock lanes, the IPU6 supports maximum 4 CSI-2 ports. For Meteor Lake, D-PHY has 12 data lanes and 6 clock lanes so IPU6 support maximum 6 CSI-2 ports.h](hDifferent IPU6 versions have different D-PHY lanes mappings, On Tiger Lake, there are 12 data lanes and 8 clock lanes, IPU6 support maximum 8 CSI-2 ports, see the PPI mmapping in }(hjThhhNhNubj )}(h``ipu6-isys-mcd-phy.c``h]hipu6-isys-mcd-phy.c}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubh for more information. On Jasper Lake and Alder Lake, D-PHY has 8 data lanes and 4 clock lanes, the IPU6 supports maximum 4 CSI-2 ports. For Meteor Lake, D-PHY has 12 data lanes and 6 clock lanes so IPU6 support maximum 6 CSI-2 ports.}(hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hXEach pair of CSI-2 two ports is a single unit that can share the data lanes. For example, for CSI-2 port 0 and 1, CSI-2 port 0 support maximum 4 data lanes, CSI-2 port 1 support maximum 2 data lanes, CSI-2 port 0 with 2 data lanes can work together with CSI-2 port 1 with 2 data lanes. If trying to use CSI-2 port 0 with 4 lanes, CSI-2 port 1 will not be available as the 4 data lanes are shared by CSI-2 port 0 and 1. The same applies to CSI ports 2/3, 4/5 and 7/8.h]h)}(hXEach pair of CSI-2 two ports is a single unit that can share the data lanes. For example, for CSI-2 port 0 and 1, CSI-2 port 0 support maximum 4 data lanes, CSI-2 port 1 support maximum 2 data lanes, CSI-2 port 0 with 2 data lanes can work together with CSI-2 port 1 with 2 data lanes. If trying to use CSI-2 port 0 with 4 lanes, CSI-2 port 1 will not be available as the 4 data lanes are shared by CSI-2 port 0 and 1. The same applies to CSI ports 2/3, 4/5 and 7/8.h]hXEach pair of CSI-2 two ports is a single unit that can share the data lanes. For example, for CSI-2 port 0 and 1, CSI-2 port 0 support maximum 4 data lanes, CSI-2 port 1 support maximum 2 data lanes, CSI-2 port 0 with 2 data lanes can work together with CSI-2 port 1 with 2 data lanes. If trying to use CSI-2 port 0 with 4 lanes, CSI-2 port 1 will not be available as the 4 data lanes are shared by CSI-2 port 0 and 1. The same applies to CSI ports 2/3, 4/5 and 7/8.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjtubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]#d-phys-and-csi-2-ports-lane-mappingah ]h"]#d-phys and csi-2 ports lane mappingah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hISYS firmware ABIsh]hISYS firmware ABIs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXThe IPU6 firmware implements a series of ABIs for software access. In general, software firstly prepares the stream configuration ``struct ipu6_fw_isys_stream_cfg_data_abi`` and sends the configuration to firmware via sending ``STREAM_OPEN`` command. Stream configuration includes input pins and output pins, input pin ``struct ipu6_fw_isys_input_pin_info_abi`` defines the resolution and data type of input source, output pin ``struct ipu6_fw_isys_output_pin_info_abi`` defines the output resolution, stride and frame format, etc.h](hThe IPU6 firmware implements a series of ABIs for software access. In general, software firstly prepares the stream configuration }(hjhhhNhNubj )}(h+``struct ipu6_fw_isys_stream_cfg_data_abi``h]h'struct ipu6_fw_isys_stream_cfg_data_abi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh5 and sends the configuration to firmware via sending }(hjhhhNhNubj )}(h``STREAM_OPEN``h]h STREAM_OPEN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhN command. Stream configuration includes input pins and output pins, input pin }(hjhhhNhNubj )}(h*``struct ipu6_fw_isys_input_pin_info_abi``h]h&struct ipu6_fw_isys_input_pin_info_abi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhB defines the resolution and data type of input source, output pin }(hjhhhNhNubj )}(h+``struct ipu6_fw_isys_output_pin_info_abi``h]h'struct ipu6_fw_isys_output_pin_info_abi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh= defines the output resolution, stride and frame format, etc.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXOnce the driver gets the interrupt from firmware that indicates stream open successfully, the driver will send the ``STREAM_START`` and ``STREAM_CAPTURE`` command to request firmware to start capturing image frames. ``STREAM_CAPTURE`` command queues the buffers to firmware with ``struct ipu6_fw_isys_frame_buff_set``, software then waits for the interrupt and response from firmware, ``PIN_DATA_READY`` means a buffer is ready on a specific output pin and then software can return the buffer to user.h](hsOnce the driver gets the interrupt from firmware that indicates stream open successfully, the driver will send the }(hjhhhNhNubj )}(h``STREAM_START``h]h STREAM_START}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj )}(h``STREAM_CAPTURE``h]hSTREAM_CAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh> command to request firmware to start capturing image frames. }(hjhhhNhNubj )}(h``STREAM_CAPTURE``h]hSTREAM_CAPTURE}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh- command queues the buffers to firmware with }(hjhhhNhNubj )}(h&``struct ipu6_fw_isys_frame_buff_set``h]h"struct ipu6_fw_isys_frame_buff_set}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhD, software then waits for the interrupt and response from firmware, }(hjhhhNhNubj )}(h``PIN_DATA_READY``h]hPIN_DATA_READY}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhb means a buffer is ready on a specific output pin and then software can return the buffer to user.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h\See :ref:`Examples` about how to do capture by IPU6 ISYS driver.h]h)}(h\See :ref:`Examples` about how to do capture by IPU6 ISYS driver.h](hSee }(hjghhhNhNubh)}(h+:ref:`Examples`h]hinline)}(hjqh]hExamples}(hjuhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jshjoubah}(h]h ]h"]h$]h&]refdocdriver-api/media/drivers/ipu6 refdomainjreftyperef refexplicitrefwarn reftargetipu6_isys_capture_examplesuh1hhhhKhjgubh- about how to do capture by IPU6 ISYS driver.}(hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjcubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]isys-firmware-abisah ]h"]isys firmware abisah$]h&]uh1hhjhhhhhKubeh}(h] input-systemah ]h"] input systemah$]h&]uh1hhhhhhhhKubeh}(h]intel-ipu6-driverah ]h"]intel ipu6 driverah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjLjIj(j%jjjjjnjkj jj]jZjjjjjjjjjju nametypes}(jjLj(jjjnj j]jjjjjuh}(jhjIhj%jOjj|jjjjjjjkjjjjjqjjjZj+jj`jjjjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.