mb/intel/jasperlake_rvp: Add world facing camera support
1. Configure GPIOs as per schematics 2. Add 1 Ports and 1 Endpoints 3. Add support for OTVI5675 WFC is on I2C5 with VCM support and using 2 data-lanes BUG=None BRANCH=None TEST=Build and Boot jslrvp board and able to capture image using world facing camera. Change-Id: I07ae9e3473c16bde8eb1597460e70cc478357b98 Signed-off-by: Pandya, Varshit B <varshit.b.pandya@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39669 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com> Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com> Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
This commit is contained in:
parent
641221c0a1
commit
39ea0eab41
|
@ -19,6 +19,7 @@ smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c
|
|||
|
||||
subdirs-y += ../common
|
||||
subdirs-y += variants/baseboard
|
||||
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
|
||||
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include
|
||||
|
||||
subdirs-y += variants/$(VARIANT_DIR)
|
||||
|
|
|
@ -45,6 +45,9 @@ DefinitionBlock(
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Camera */
|
||||
#include <variant/acpi/camera.asl>
|
||||
|
||||
#include <southbridge/intel/common/acpi/sleepstates.asl>
|
||||
|
||||
/* Mainboard specific */
|
||||
|
|
|
@ -0,0 +1,226 @@
|
|||
/* 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"
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include "ipu_mainboard.asl"
|
||||
#include "ipu_endpoints.asl"
|
||||
#include "cam1.asl"
|
|
@ -0,0 +1,44 @@
|
|||
/* 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
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
/* 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"
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
|
@ -146,12 +146,16 @@ chip soc/intel/jasperlake
|
|||
.sda_hold = 36,
|
||||
}
|
||||
},
|
||||
.i2c[5] = {
|
||||
.speed = I2C_SPEED_FAST,
|
||||
},
|
||||
}"
|
||||
|
||||
device domain 0 on
|
||||
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 12.0 off end # Thermal Subsystem
|
||||
device pci 12.5 off end # UFS SCS
|
||||
device pci 12.6 off end # GSPI #2
|
||||
|
@ -285,8 +289,8 @@ 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 on end # I2C #4
|
||||
device pci 19.1 off end # I2C #5
|
||||
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.2 on end # UART #2
|
||||
device pci 1a.0 on end # eMMC
|
||||
device pci 1c.0 on end # PCI Express Port 1
|
||||
|
|
|
@ -64,13 +64,19 @@ static const struct pad_config gpio_table[] = {
|
|||
/* I2C0_SCL */
|
||||
PAD_CFG_NF(GPP_C17, UP_2K, DEEP, NF1),
|
||||
|
||||
/* CAM2_RST_N */
|
||||
PAD_CFG_GPO(GPP_C19, 0, PLTRST),
|
||||
|
||||
/* WIFI_RF_KILL_N */
|
||||
PAD_CFG_GPO(GPP_D0, 1, PLTRST),
|
||||
|
||||
/* BT_RF_KILL_N */
|
||||
PAD_CFG_GPO(GPP_D1, 1, PLTRST),
|
||||
|
||||
/* LAN_RST_N */
|
||||
/* CAM2_PWREN */
|
||||
PAD_CFG_GPO(GPP_D4, 0, PLTRST),
|
||||
|
||||
/*LAN_RST_N*/
|
||||
PAD_CFG_GPO(GPP_D6, 1, PLTRST),
|
||||
|
||||
/* AVS_I2S_MCLK */
|
||||
|
@ -85,6 +91,15 @@ static const struct pad_config gpio_table[] = {
|
|||
/* CNV_PA_BLANKING */
|
||||
PAD_CFG_NF(GPP_D21, NONE, DEEP, NF1),
|
||||
|
||||
/* I2C5_SDA */
|
||||
PAD_CFG_NF(GPP_D22, NONE, PLTRST, NF1),
|
||||
|
||||
/* I2C5_SCL */
|
||||
PAD_CFG_NF(GPP_D23, NONE, PLTRST, NF1),
|
||||
|
||||
/* IMGCLKOUT_1 */
|
||||
PAD_CFG_NF(GPP_E2, NONE, PLTRST, NF1),
|
||||
|
||||
/* WWAN_FCP_OFF_N */
|
||||
PAD_CFG_GPO(GPP_E3, 1, PLTRST),
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <baseboard/acpi/camera.asl>
|
Loading…
Reference in New Issue