summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/intel/jasperlake_rvp/Kconfig2
-rw-r--r--src/mainboard/intel/jasperlake_rvp/dsdt.asl3
-rw-r--r--src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/cam1.asl226
-rw-r--r--src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/camera.asl5
-rw-r--r--src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/ipu_endpoints.asl44
-rw-r--r--src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/ipu_mainboard.asl50
-rw-r--r--src/mainboard/intel/jasperlake_rvp/variants/jslrvp/devicetree.cb112
-rw-r--r--src/mainboard/intel/jasperlake_rvp/variants/jslrvp/include/variant/acpi/camera.asl3
8 files changed, 111 insertions, 334 deletions
diff --git a/src/mainboard/intel/jasperlake_rvp/Kconfig b/src/mainboard/intel/jasperlake_rvp/Kconfig
index 51e5e3cb3d..d6fbe8144d 100644
--- a/src/mainboard/intel/jasperlake_rvp/Kconfig
+++ b/src/mainboard/intel/jasperlake_rvp/Kconfig
@@ -7,6 +7,7 @@ config BOARD_SPECIFIC_OPTIONS
select DRIVERS_I2C_HID
select DRIVERS_I2C_GENERIC
select DRIVERS_I2C_MAX98373
+ select DRIVERS_INTEL_MIPI_CAMERA
select DRIVERS_SPI_ACPI
select DRIVERS_USB_ACPI
select EC_ACPI
@@ -14,6 +15,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select MAINBOARD_HAS_CHROMEOS
+ select SOC_INTEL_COMMON_BLOCK_IPU
select SOC_INTEL_JASPERLAKE
select SOC_INTEL_CSE_LITE_SKU
diff --git a/src/mainboard/intel/jasperlake_rvp/dsdt.asl b/src/mainboard/intel/jasperlake_rvp/dsdt.asl
index f47424f996..be883b4c25 100644
--- a/src/mainboard/intel/jasperlake_rvp/dsdt.asl
+++ b/src/mainboard/intel/jasperlake_rvp/dsdt.asl
@@ -45,9 +45,6 @@ DefinitionBlock(
}
#endif
- /* Camera */
- #include <variant/acpi/camera.asl>
-
#include <southbridge/intel/common/acpi/sleepstates.asl>
/* Mainboard specific */
diff --git a/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/cam1.asl b/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/cam1.asl
deleted file mode 100644
index 14139981a9..0000000000
--- a/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/cam1.asl
+++ /dev/null
@@ -1,226 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-Scope (\_SB.PCI0.I2C5)
-{
- PowerResource (FCPR, 0x00, 0x0000)
- {
- Name (STA, Zero)
- Method (_ON, 0, Serialized) /* _ON_: Power On */
- {
- If ((STA == Zero))
- {
- /* Enable CLK1 */
- MCON(1, 1) // Clock 1, 19.2MHz
- /* Pull PWREN(GPIO R6) high */
- STXS(GPP_D4)
- Sleep(5) /* 5 us */
- /* Pull RST(GPIO H12) low */
- CTXS(GPP_C19)
- Sleep(5) /* 5 us */
- /* Pull RST high */
- STXS(GPP_C19)
- Sleep(5) /* 5 us */
- STA = 1
- }
- }
-
- Method (_OFF, 0, Serialized) /* _OFF: Power Off */
- {
- If ((STA == One))
- {
- /* Pull RST low */
- CTXS(GPP_C19)
- /* Pull PWREN low */
- CTXS(GPP_D4)
- /* Disable CLK0 */
- MCOF(1) /* Clock 1 */
- STA = 0
- }
- }
-
- Method (_STA, 0, NotSerialized) /* _STA: Status */
- {
- Return (STA)
- }
- }
-
- Device (CAM1)
- {
- Name (_HID, "OVTI5675") /* _HID: Hardware ID */
-
- Name (_UID, Zero) /* _UID: Unique ID */
-
- Name (_DDN, "Ov 5675 Camera") /* _DDN: DOS Device Name */
-
- Method (_STA, 0, NotSerialized) /* _STA: Status */
- {
- Return (0x0F)
- }
-
- Name (_CRS, ResourceTemplate () /* _CRS: Current Resource Settings */
- {
- I2cSerialBus (0x0036, ControllerInitiated, 0x00061A80,
- AddressingMode7Bit, "\\_SB.PCI0.I2C5",
- 0x00, ResourceConsumer, ,
- )
- })
-
- Name (_PR0, Package (0x01) /* _PR0: Power Resources for D0 */
- {
- FCPR
- })
-
- Name (_PR3, Package (0x01) /* _PR3: Power Resources for D3hot */
- {
- FCPR
- })
-
- Name (_DSD, Package (0x04) /* _DSD: Device-Specific Data */
- {
- ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
- Package (0x01)
- {
- Package (0x02)
- {
- "port0",
- "PRT0"
- }
- },
-
- ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
- Package (0x02)
- {
- Package (0x02)
- {
- "clock-frequency",
- 0x0124F800
- },
-
- Package (0x02)
- {
- "lens-focus",
- Package (0x01)
- {
- VCM0
- }
- }
- }
- })
-
- Name (PRT0, Package (0x04)
- {
- ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
- Package (0x01)
- {
- Package (0x02)
- {
- "port",
- Zero
- }
- },
-
- ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
- Package (0x01)
- {
- Package (0x02)
- {
- "endpoint0",
- "EP00"
- }
- }
- })
-
- Name (EP00, Package (0x02)
- {
- ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
- Package (0x04)
- {
- Package (0x02)
- {
- "endpoint",
- Zero
- },
-
- Package (0x02)
- {
- "data-lanes",
- Package (0x02)
- {
- One,
- 0x02
- }
- },
-
- Package (0x02)
- {
- "link-frequencies",
- Package (0x01)
- {
- 0x1AD27480
- }
- },
-
- Package (0x02)
- {
- "remote-endpoint",
- Package (0x03)
- {
- IPU0,
- One,
- Zero
- }
- }
- }
- })
- }
-
- Device (VCM0)
- {
- Name (_HID, "PRP0001") /* _HID: Hadware ID */
-
- Name (_UID, 0x03) /* _UID: Unique ID */
-
- Name (_DDN, "DW9714 VCM") /* _DDN: DOS Device Name */
-
- Method (_STA, 0, NotSerialized) /* _STA: Status */
- {
- Return (0x0F)
- }
-
- Name (_CRS, ResourceTemplate () /* _CRS: Current Resource Setting */
- {
- I2cSerialBusV2 (0x000C, ControllerInitiated, 0x00061A80,
- AddressingMode7Bit, "\\_SB.PCI0.I2C5",
- 0x00, ResourceConsumer, , Exclusive,
- )
- })
-
- Name (_DEP, Package (0x01) /* _DEP: Dependencies */
- {
- CAM1
- })
-
- Name (_PR0, Package (0x01) /* _PR0: Power Resources for D0 */
- {
- FCPR
- })
-
- Name (_PR3, Package (0x01) /* _PR3: Power Resources for D3Hot */
- {
- FCPR
- })
-
- Name (_DSD, Package (0x02) /* _DSD: Device-Specific Data */
- {
- ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */
- Package(0x01)
- {
- Package (0x02)
- {
- "compatible",
- "dongwoon,dw9714"
- }
- }
- })
- }
-}
diff --git a/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/camera.asl b/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/camera.asl
deleted file mode 100644
index 48650c9360..0000000000
--- a/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/camera.asl
+++ /dev/null
@@ -1,5 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include "ipu_mainboard.asl"
-#include "ipu_endpoints.asl"
-#include "cam1.asl"
diff --git a/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/ipu_endpoints.asl b/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/ipu_endpoints.asl
deleted file mode 100644
index cebf15e753..0000000000
--- a/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/ipu_endpoints.asl
+++ /dev/null
@@ -1,44 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-Scope (_SB.PCI0.IPU0)
-{
- Name (EP10, Package (0x02)
- {
- ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
- Package (0x04)
- {
- Package (0x02)
- {
- "endpoint",
- Zero
- },
-
- Package (0x02)
- {
- "clock-lanes",
- Zero
- },
-
- Package (0x02)
- {
- "data-lanes",
- Package (0x02)
- {
- One,
- 0x02,
- }
- },
-
- Package (0x02)
- {
- "remote-endpoint",
- Package (0x03)
- {
- ^I2C5.CAM1,
- Zero,
- Zero
- }
- }
- }
- })
-}
diff --git a/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/ipu_mainboard.asl b/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/ipu_mainboard.asl
deleted file mode 100644
index 013b26f3c6..0000000000
--- a/src/mainboard/intel/jasperlake_rvp/variants/baseboard/include/baseboard/acpi/ipu_mainboard.asl
+++ /dev/null
@@ -1,50 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-Scope (\_SB.PCI0)
-{
- Device (IPU0)
- {
- Name (_ADR, 0x00050000) // _ADR: Address
-
- Name (_DDN, "Camera and Imaging Subsystem") // _DDN: DOS Device Name
- }
-}
-
-Scope (\_SB.PCI0.IPU0)
-{
- Name (_DSD, Package (0x02) // _DSD: Device-Specific Data
- {
- ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
- Package (0x01)
- {
- Package (0x02)
- {
- "port1",
- "PRT1"
- }
- }
- })
-
- Name (PRT1, Package (0x04)
- {
- ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
- Package (0x01)
- {
- Package (0x02)
- {
- "port",
- 2
- }
- },
-
- ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
- Package (0x01)
- {
- Package (0x02)
- {
- "endpoint0",
- "EP10"
- }
- }
- })
-}
diff --git a/src/mainboard/intel/jasperlake_rvp/variants/jslrvp/devicetree.cb b/src/mainboard/intel/jasperlake_rvp/variants/jslrvp/devicetree.cb
index ae2aaf36ae..1681b714d2 100644
--- a/src/mainboard/intel/jasperlake_rvp/variants/jslrvp/devicetree.cb
+++ b/src/mainboard/intel/jasperlake_rvp/variants/jslrvp/devicetree.cb
@@ -158,7 +158,21 @@ chip soc/intel/jasperlake
device pci 00.0 on end # Host Bridge
device pci 02.0 on end # Integrated Graphics Device
device pci 04.0 off end # SA Thermal device
- device pci 05.0 on end #IPU
+ device pci 05.0 on
+ chip drivers/intel/mipi_camera
+ register "acpi_uid" = "0x50000"
+ register "acpi_name" = ""IPU0""
+ register "device_type" = "INTEL_ACPI_CAMERA_CIO2"
+
+ register "cio2_num_ports" = "2"
+ register "cio2_lanes_used" = "{2,2}"
+ register "cio2_lane_endpoint[0]" = ""^I2C4.CAM0""
+ register "cio2_lane_endpoint[1]" = ""^I2C5.CAM1""
+ register "cio2_prt[0]" = "0"
+ register "cio2_prt[1]" = "2"
+ device generic 0 on end
+ end
+ end
device pci 12.0 off end # Thermal Subsystem
device pci 12.5 off end # UFS SCS
device pci 12.6 off end # GSPI #2
@@ -292,8 +306,100 @@ chip soc/intel/jasperlake
device pci 16.4 off end # Management Engine Interface 3
device pci 16.5 off end # Management Engine Interface 4
device pci 17.0 off end # SATA
- device pci 19.0 off end # I2C #4 Cam 0
- device pci 19.1 on end # I2C #5 Cam 1 and VCM
+ device pci 19.0 on # I2C #4 Cam 0
+ chip drivers/intel/mipi_camera
+ register "acpi_hid" = ""OVTI2740""
+ register "acpi_uid" = "0"
+ register "acpi_name" = ""CAM0""
+ register "chip_name" = ""Ov 2740 Camera""
+ register "device_type" = "INTEL_ACPI_CAMERA_SENSOR"
+ register "has_power_resource" = "1"
+
+ register "ssdb.lanes_used" = "2"
+ register "num_freq_entries" = "1"
+ register "link_freq[0]" = "360000000"
+ register "remote_name" = ""IPU0""
+
+ #Controls
+ register "clk_panel.clks[0].clknum" = "0" #IMGCLKOUT_3
+ register "clk_panel.clks[0].freq" = "1" #19.2 Mhz
+
+ register "gpio_panel.gpio[0].gpio_num" = "GPP_D5" #reset
+ register "gpio_panel.gpio[1].gpio_num" = "GPP_B14" #power
+
+ #_ON
+ register "on_seq.ops_cnt" = "4"
+ register "on_seq.ops[0]" = "SEQ_OPS_CLK_ENABLE(0, 0)"
+ register "on_seq.ops[1]" = "SEQ_OPS_GPIO_ENABLE(0, 5)"
+ register "on_seq.ops[2]" = "SEQ_OPS_GPIO_DISABLE(1, 5)"
+ register "on_seq.ops[3]" = "SEQ_OPS_GPIO_ENABLE(1, 5)"
+
+ #_OFF
+ register "off_seq.ops_cnt" = "3"
+ register "off_seq.ops[0]" = "SEQ_OPS_GPIO_DISABLE(1, 0)"
+ register "off_seq.ops[1]" = "SEQ_OPS_GPIO_DISABLE(0, 0)"
+ register "off_seq.ops[2]" = "SEQ_OPS_CLK_DISABLE(0, 0)"
+
+ device i2c 10 on end
+ end
+ end
+ device pci 19.1 on # I2C #5 Cam 1 and VCM
+ chip drivers/intel/mipi_camera
+ register "acpi_hid" = ""OVTI5675""
+ register "acpi_uid" = "0"
+ register "acpi_name" = ""CAM1""
+ register "chip_name" = ""Ov 5675 Camera""
+ register "device_type" = "INTEL_ACPI_CAMERA_SENSOR"
+
+ register "ssdb.lanes_used" = "2"
+ register "ssdb.link_used" = "1"
+ register "ssdb.vcm_type" = "0x0C"
+ register "vcm_name" = ""VCM0""
+ register "num_freq_entries" = "1"
+ register "link_freq[0]" = "DEFAULT_LINK_FREQ"
+ register "remote_name" = ""IPU0""
+
+ register "has_power_resource" = "1"
+ #Controls
+ register "clk_panel.clks[0].clknum" = "1" #IMGCLKOUT_3
+ register "clk_panel.clks[0].freq" = "1" #19.2 Mhz
+
+ register "gpio_panel.gpio[0].gpio_num" = "GPP_D4" #power_enable
+ register "gpio_panel.gpio[1].gpio_num" = "GPP_C19" #reset
+
+ #_ON
+ register "on_seq.ops_cnt" = "4"
+ register "on_seq.ops[0]" = "SEQ_OPS_CLK_ENABLE(0, 0)"
+ register "on_seq.ops[1]" = "SEQ_OPS_GPIO_ENABLE(0, 5)"
+ register "on_seq.ops[2]" = "SEQ_OPS_GPIO_DISABLE(1, 5)"
+ register "on_seq.ops[3]" = "SEQ_OPS_GPIO_ENABLE(1, 5)"
+
+ #_OFF
+ register "off_seq.ops_cnt" = "3"
+ register "off_seq.ops[0]" = "SEQ_OPS_GPIO_DISABLE(1, 0)"
+ register "off_seq.ops[1]" = "SEQ_OPS_GPIO_DISABLE(0, 0)"
+ register "off_seq.ops[2]" = "SEQ_OPS_CLK_DISABLE(0, 0)"
+
+ device i2c 36 on end
+ end
+ chip drivers/intel/mipi_camera
+ register "acpi_hid" = "ACPI_DT_NAMESPACE_HID"
+ register "acpi_uid" = "3"
+ register "acpi_name" = ""VCM0""
+ register "chip_name" = ""DW AF DAC""
+ register "device_type" = "INTEL_ACPI_CAMERA_VCM"
+
+ register "pr0" = ""\\_SB.PCI0.I2C5.CAM1.PRIC""
+ register "vcm_compat" = ""dongwoon,dw9714""
+
+ register "ssdb.lanes_used" = "2"
+ register "num_freq_entries" = "1"
+ register "link_freq[0]" = "DEFAULT_LINK_FREQ"
+ register "remote_name" = ""IPU0""
+ device i2c 0C on end
+ end
+ end
+
device pci 19.2 on end # UART #2
device pci 1a.0 on end # eMMC
device pci 1c.0 on end # PCI Express Port 1
diff --git a/src/mainboard/intel/jasperlake_rvp/variants/jslrvp/include/variant/acpi/camera.asl b/src/mainboard/intel/jasperlake_rvp/variants/jslrvp/include/variant/acpi/camera.asl
deleted file mode 100644
index 318b0dea04..0000000000
--- a/src/mainboard/intel/jasperlake_rvp/variants/jslrvp/include/variant/acpi/camera.asl
+++ /dev/null
@@ -1,3 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <baseboard/acpi/camera.asl>