Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This repository contains reference drivers and configurations for Intel MIPI CSI
| Sensor | Sensor Type | Vendor | IPU Version |
|-----------------|-------------|-----------------|----------------------------------|
| AR0233+GW5300 | GMSL | Sensing | IPU6EPMTL, IPU75XA |
| AR0234 | GMSL | D3 Embedded | IPU6EPMTL |
| AR0234 | GMSL | D3 Embedded | IPU6EPMTL, IPU75XA |
| AR0234 | MIPI CSI-2 | D3 Embedded | IPU6EPMTL, IPU75XA, IPU8 |
| AR0820+GW5300 | GMSL | Sensing | IPU6EPMTL, IPU75XA |
| AR0830+AP1302 | MIPI CSI-2 | Leopard Imaging | IPU6EPMTL, IPU75XA |
Expand Down
99 changes: 99 additions & 0 deletions acpi/ipu7/_cam_common_ar0234.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
* SPDX-License-Identifier: GPL-2.0
* Copyright (c) 2026 Intel Corporation.
*
* CAM-level defines expected by caller:
* DESCH_SER_REF - Path to parent SER (e.g. \_SB.PC00.DESx.CHxx.SERx), used in _DEP
* DESCH_SER_PATH - Path to parent SER (e.g. "\\_SB.PC00.DESx.CHxx.SERx"), used in CSI2Bus and GpioIo
* DESCH_SER_GPIOREF - GPIO controller path for SER (e.g. ^^SERx), used in gpio resources (e.g. reset-gpios)
* CAM_LANES - Number of MIPI data lanes for the camera
*/
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (0x0F) // bit 0: device is present, bit 1: device is enabled, bit 2: device is shown in UI, bit 3: device is functional
}

Method (_HID, 0, NotSerialized) // _HID: Hardware ID
{
Return ("INTC10C0") // AR0234
}

Name (_DEP, Package (0x01) // _DEP: Dependencies
{
DESCH_SER_REF // Path to parent SER (e.g. "\\_SB.PC00.DESx.CHxx.SERx")
})

Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
/*
* mipi-disco-img.c will use the information in CSI2Bus to create fwnode.
* CAMx Local Port -> SERx Remote Port
* CAMx PRT0 -> SERx PRT0
*/
CSI2Bus(
DeviceInitiated, // SlaveMode
1, // PhyType (1 for DPHY)
0, // LocalPort (AR0234 only 1 PHY)
DESCH_SER_PATH, // ResourceSource (Path to parent SERx, e.g. "\\_SB.PC00.DESx.CHxx.SERx")
0, // ResourceSourceIndex (e.g. 0 for SERx PRT0)
, // ResourceUsage
, // DescriptorName
) // VendorData

I2cSerialBusV2 (
0x0010, // SlaveAddress (0x10 based on AR0234 hardware)
ControllerInitiated, // SlaveMode
0x00061A80, // ConnectionSpeed
AddressingMode7Bit, // AddressingMode
DESCH_SER_PATH, // ResourceSource (Path to parent SER, e.g. "\\_SB.PC00.DESx.CHxx.SERx")
0x00, // ResourceSourceIndex
ResourceConsumer, // ResourceUsage
, // DescriptorName
Exclusive, // Shared
) // VendorData
})

Name (_DSD, Package () // _DSD: Device-Specific Data
{
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), // Device Properties
Package ()
{
Package () { "mipi-img-clock-frequency", 96000000 }, // 96 MHz

/*
* Sensor specific GPIOs, reset-gpios will be used by ar0234.c
* when devm_gpiod_get_optional is being called with "reset" consumer.
* For details, please refer to ACPI GPIO binding documentation
* https://www.kernel.org/doc/html/latest/firmware-guide/acpi/gpio-properties.html
*
* DESCH_SER_GPIOREF is the GPIO controller from parent SERx
* 0 is the GPIO pin group in parent SERx
* 0 is the index of pin in the GPIO pin group in parent SERx
* 1 is active low for reset
*
*/
Package () { "reset-gpios", Package () { DESCH_SER_GPIOREF, 0, 0, 1 } },
},
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), // Hierarchical Data Extension
Package ()
{
/* mipi-img-port here are NOT actual MIPI ports, but is used by mipi-disco-img.c to create fwnode. */
Package () { "mipi-img-port-0", "PRT0" }, // Connected to SERx PRTx (used by CAMx CSI2Bus LocalPort)
},
})

Name (PRT0, Package()
{
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), // Device Properties
Package ()
{
Package () { "mipi-img-clock-lane", 0 },
#if CAM_LANES == 4
Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } },
#elif CAM_LANES == 2
Package () { "mipi-img-data-lanes", Package() { 1, 2 } },
#else
Package () { "mipi-img-data-lanes", Package() { 1, 2 } },
#endif
},
})
55 changes: 55 additions & 0 deletions acpi/ipu7/_des_ch_common_ar0234.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* SPDX-License-Identifier: GPL-2.0
* Copyright (c) 2026 Intel Corporation.
*
* Description: Common template for each AR0234 GMSL camera under each deserializer link,
* where each link is represented as an ATR channel device.
*
* DES-level defines expected by caller:
* DES_PATH - DESx ACPI path string (e.g., "\\_SB.PC00.DES0")
* DES_REF - DESx ACPI namespace reference (e.g., \_SB.PC00.DES0)
*
* Channel-level defines expected by caller:
* DESCH_CH - Channel device name (e.g., CH00)
* DESCH_SER - Serializer device name (e.g., SER0)
* DESCH_CAM - Camera device name (e.g., CAM0)
* DESCH_CH_PATH - CHxx ACPI path string (e.g., "\\_SB.PC00.DES0.CH00")
* DESCH_SER_PATH - SERx ACPI path string (e.g., "\\_SB.PC00.DES0.CH00.SER0")
* DESCH_SER_REF - SERx ACPI namespace reference (e.g., \_SB.PC00.DES0.CH00.SER0)
* DESCH_SER_I2C - SERx I2C address (e.g., 0x40)
* DESCH_LINK_NUM - Channel/link number (0, 1, 2, 3) - used for _ADR, reg, and SER remote port
* DESCH_SER_GPIOREF - SERx GPIO controller reference (e.g., ^^SER0, ^^SER1, etc.)
* CAM_LANES - CAMx Number of MIPI data lanes for the camera (e.g., 2, 4)
* Optional defines:
* DESCH_SER_EXTRA_GPIO_PIN - SERx Additional GPIO pin number (e.g., 7 for MFP7 in MAX9295A)
* DESCH_SER_X/Y/Z/U_VC - SERx VC filter for Pipe X/Y/Z/U, specifically for MAX96717 driver
*/

Device (DESCH_CH) // New CHxx Device under parent DESx device for each DES channel/link
{
/*
* Channel is the naming convention used by i2c-mux or i2c-atr in ACPI namespace
* In GMSL context, it can directly be translated as Link 0/1/2/3 of the Deserializer
*/

Name (_ADR, DESCH_LINK_NUM) // _ADR: Address for the channel (e.g. 0 for Link 0, 1 for Link 1)

Name (_DSD, Package () // _DSD: Device Specific Data
{
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), // Device Properties
Package ()
{
Package () { "reg", DESCH_LINK_NUM }, // used by i2c-atr driver. Represents the channel / link number
}
})

Device (DESCH_SER) // SERx device under parent DESx.CHxx
{
#include "_ser_common_max9295.asl"

Device (DESCH_CAM) // CAMx device under parent DESx.CHxx.SERx
{
#include "_cam_common_ar0234.asl"
}
}
}
120 changes: 120 additions & 0 deletions acpi/ipu7/max96724_d3_ar0234.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
/*
* SPDX-License-Identifier: GPL-2.0
* Copyright (c) 2026 Intel Corporation.
*
* SSDT overlay: D3 AR0234 GMSL camera configuration on PTL platform
* One MAX96724 deserializers (DES0) with CPHY connection to PTL platform,
* each carrying two D3 AR0234 cameras over GMSL Links 0..1, fronted by MAX9295A serializers.
*
* DES-level defines (set per DESx, undef'd at the end of each Device):
* DES_PHY_TYPE - DES PHY type (0 for CPHY, 1 for DPHY)
* DES_I2C_ADDR - DES I2C slave address (e.g. 0x0027 for MAX96724)
* DES_LANES - Number of MIPI data lanes (e.g. 2, 4)
* DES_INTERNAL_PHY - DES internal PHY (PHY0 = 4, PHY1 = 5, PHY2 = 6, PHY3 = 7)
* DES_TO_MIPI_PORT - DES connected to IPU0 MIPI port (e.g. 0/1/2/3)
* DES_I2C_BUS - DES I2C bus path (e.g. "\\_SB.PC00.I2C1")
* DES_PATH - DES ACPI path string (e.g. "\\_SB.PC00.DES0")
* DES_REF - DES ACPI namespace reference (e.g. \_SB.PC00.DES0)
*
* Channel-level defines (set per CHxx, undef'd by _des_ch_common_ar0234.asl):
* DESCH_LINK_NUM - Channel/link number (0..3) - used for _ADR, reg, SER remote port
* DESCH_CH - Channel device name (e.g. CH00)
* DESCH_SER - Serializer device name (e.g. SER0)
* DESCH_CAM - Camera device name (e.g. CAM0)
* DESCH_SER_I2C - SER I2C slave address (e.g. 0x40 for MAX9295A)
* DESCH_CH_PATH - CHxx ACPI path string (e.g. "\\_SB.PC00.DES0.CH00")
* DESCH_SER_PATH - SERx ACPI path string (e.g. "\\_SB.PC00.DES0.CH00.SER0")
* DESCH_SER_REF - SERx ACPI namespace reference (e.g. \_SB.PC00.DES0.CH00.SER0)
* DESCH_SER_GPIOREF - SERx GPIO controller reference (e.g. ^^SER0)
* CAM_ALIAS - Camera alias I2C address used in i2c-alias-pool of the SER
* CAM_LANES - Number of MIPI data lanes for the camera (e.g. 2, 4)
*/

DefinitionBlock ("", "SSDT", 2, "", "IMG_IPU", 0x20260819)
{
External (_SB.PC00, DeviceObj) // Root device

Include ("_ipu.asl")

Scope (\_SB.PC00)
{
Device (DES0)
{
/*
* For detailed explanation of each define,
* please refer to the comment block at the top of this file.
*/

// DES-level defines for DES0.
#define DES_PHY_TYPE 0
#define DES_I2C_ADDR 0x0027
#define DES_LANES 2
#define DES_INTERNAL_PHY 6
#define DES_TO_MIPI_PORT 0
#define DES_I2C_BUS "\\_SB.PC00.I2C1"
#define DES_PATH "\\_SB.PC00.DES0"
#define DES_REF \_SB.PC00.DES0
#include "_des_common_max96724.asl"

// Channel-level defines for Channel 0 (CH00)
#define DESCH_CH CH00
#define DESCH_SER SER0
#define DESCH_CAM CAM0
#define DESCH_CH_PATH "\\_SB.PC00.DES0.CH00"
#define DESCH_SER_PATH "\\_SB.PC00.DES0.CH00.SER0"
#define DESCH_SER_REF \_SB.PC00.DES0.CH00.SER0
#define DESCH_LINK_NUM 0
#define DESCH_SER_I2C 0x40
#define DESCH_SER_GPIOREF ^^SER0
#define CAM_ALIAS 0x54
#define CAM_LANES 2
#include "_des_ch_common_ar0234.asl"
#undef DESCH_CH
#undef DESCH_SER
#undef DESCH_CAM
#undef DESCH_CH_PATH
#undef DESCH_SER_PATH
#undef DESCH_SER_REF
#undef DESCH_LINK_NUM
#undef DESCH_SER_I2C
#undef DESCH_SER_GPIOREF
#undef CAM_ALIAS
#undef CAM_LANES

// Channel 1
#define DESCH_CH CH01
#define DESCH_SER SER1
#define DESCH_CAM CAM1
#define DESCH_CH_PATH "\\_SB.PC00.DES0.CH01"
#define DESCH_SER_PATH "\\_SB.PC00.DES0.CH01.SER1"
#define DESCH_SER_REF \_SB.PC00.DES0.CH01.SER1
#define DESCH_LINK_NUM 1
#define DESCH_SER_I2C 0x40
#define DESCH_SER_GPIOREF ^^SER1
#define CAM_ALIAS 0x55
#define CAM_LANES 2
#include "_des_ch_common_ar0234.asl"
#undef DESCH_CH
#undef DESCH_SER
#undef DESCH_CAM
#undef DESCH_CH_PATH
#undef DESCH_SER_PATH
#undef DESCH_SER_REF
#undef DESCH_LINK_NUM
#undef DESCH_SER_I2C
#undef DESCH_SER_GPIOREF
#undef CAM_ALIAS
#undef CAM_LANES

// Clean up DES0-level defines
#undef DES_PHY_TYPE
#undef DES_I2C_ADDR
#undef DES_LANES
#undef DES_INTERNAL_PHY
#undef DES_TO_MIPI_PORT
#undef DES_I2C_BUS
#undef DES_PATH
#undef DES_REF
}
}
}
8 changes: 5 additions & 3 deletions config/ar0234/ipu75xa/libcamhal_configs.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
"Common" : {
"version": 1.0,
"platform": "IPU7",
// The value format of availableSensors is "sensor name"-wf/uf-"CSI port ID".
// wf is world facing, and uf is user facing.
"availableSensors": ["ar0234-a-0","ar0234-b-2"],
// Supported sensors list:
// ar0234-a-0 - for mipi setup, where sensor connected on crd1 (port 0)
// ar0234-b-2 - for mipi setup, where sensor connected on crd2 (port 2)
// ar0234 - for gmsl setup with x2 sensors, where sensors detected as sensor 1 - sensor 2
"availableSensors": ["ar0234-a-0","ar0234-b-2","ar0234"],
"videoStreamNum" : 2
}
}
Loading
Loading