Skip to content

Commit 15a6c30

Browse files
lwang47-amriacpdaasrini4rhemanth9
authored
Alpha Release (#1)
* Initial commit Signed-off-by: Israel Cepeda <israel.a.cepeda.lopez@intel.com> * adds vision driver Adding Intel Computer Vision driver. Signed-off-by: Israel Cepeda <israel.a.cepeda.lopez@intel.com> * gpio resources Adding GPIOs allocation and handling of the resources. Signed-off-by: Israel Cepeda <israel.a.cepeda.lopez@intel.com> * wdt implementation Adds a timer to be used as watchdog timer. Signed-off-by: Israel Cepeda <israel.a.cepeda.lopez@intel.com> * Draft (#32) (#34) * public * debug/test * debug/test * update with review feedback and add auto-indent * remove unused items * Do acquire sensor internal at driver load time * review comments added --------- Signed-off-by: Wang, Lifu <lifu.wang@intel.com> * Enable firmware download flow (#33) (#38) * Added Fw Download Files * Added fw_file_bin_search()and evaluate_fw() * enhancements and fixe typo * Implement FW Download Flow * FW Update Code Refactoring. * FW Update Code Refactoring - PART2. * Addressing review comments * Addressing review comments -- PART2. * Addressing review comments -- PART3 --------- Signed-off-by: Hemanth Rachakonda <hemanth.rachakonda@intel.com> Signed-off-by: Srinvas Alla <alla.srinivas@intel.com> Co-authored-by: Hemanth Rachakonda <hemanth.rachakonda@intel.com> * readme for alpha (#36) (#39) Co-authored-by: lwang47-amr <lifu.wang@intel.com> --------- Signed-off-by: Israel Cepeda <israel.a.cepeda.lopez@intel.com> Signed-off-by: Wang, Lifu <lifu.wang@intel.com> Signed-off-by: Hemanth Rachakonda <hemanth.rachakonda@intel.com> Signed-off-by: Srinvas Alla <alla.srinivas@intel.com> Co-authored-by: Israel Cepeda <israel.a.cepeda.lopez@intel.com> Co-authored-by: asrini4 <alla.srinivas@intel.com> Co-authored-by: Hemanth Rachakonda <hemanth.rachakonda@intel.com>
1 parent 02a5abd commit 15a6c30

File tree

9 files changed

+1794
-0
lines changed

9 files changed

+1794
-0
lines changed

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
# Copyright (c) 2024 Intel Corporation.
3+
4+
obj-m += intel_cvs.o
5+
intel_cvs-y := drivers/misc/icvs/intel_cvs.o drivers/misc/icvs/intel_cvs_update.o
6+
7+
KERNELRELEASE ?= $(shell uname -r)
8+
KERNEL_SRC ?= /lib/modules/$(KERNELRELEASE)/build
9+
PWD := $(shell pwd)
10+
11+
ccflags-y += -I$(src)/include/
12+
13+
all:
14+
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules
15+
16+
modules_install:
17+
$(MAKE) INSTALL_MOD_DIR=/updates -C $(KERNEL_SRC) M=$(PWD) modules_install
18+
19+
clean:
20+
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Intel Vision Driver
2+
3+
This repository supports Intel Vision Driver on Intel Lunar Lake (LNL) CVS-enabled Platforms
4+
5+
## Dependencies
6+
* Intel LNL platform BIOS and CVS device
7+
* Linux kernel v6.7-rc8 or later
8+
* Intel LJCA USB driver, adding LNL GPIO PID (INTC10B5) support
9+
10+
11+
## Build instructions
12+
Ways to build the USBIO drivers
13+
1. build out of kernel source tree
14+
2. build with kernel source tree and build with dkms aren't supported yet
15+
16+
Build was tested on Ubuntu 22.04 LNL CVS platform running kernel v6.7-rc8
17+
18+
### Build out of kernel source tree
19+
* Prerequisite: 6.7-rc8 (or later) kernel with ```ljca``` and ```gpio_ljca``` module/driver loaded, header and build packages, to install required package
20+
```
21+
$ sudo apt-get install build-essential
22+
```
23+
24+
To compile the Intel Vision driver:
25+
```
26+
$ cd drivers.platform.aicv.vision-linux
27+
$ make clean
28+
$ make
29+
```
30+
31+
### Check LJCA drivers are loaded before vision driver can be installed
32+
```
33+
$ lsmod | grep -e ljca -e gpio_ljca
34+
```
35+
36+
### Installing the vision driver
37+
```
38+
$ sudo insmod intel_cvs.ko
39+
```
40+
41+
### Uninstall the vision driver
42+
```
43+
$ sudo rmmod intel_cvs
44+
```
45+
46+

drivers/misc/icvs/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
# Copyright (c) 2024 Intel Corporation.
3+
4+
config INTEL_CVS
5+
tristate "Intel CVS"
6+
depends on CONFIG_ACPI
7+
depends on CONFIG_GPIOLIB
8+
depends on CONFIG_I2C
9+
help
10+
Add support of Intel Computer Vision System (ICVS).

drivers/misc/icvs/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
# Copyright (c) 2024 Intel Corporation.
3+
4+
obj-$(CONFIG_INTEL_CVS) += intel_cvs.o
5+
obj-$(CONFIG_INTEL_CVS) += intel_cvs_update.o

drivers/misc/icvs/cvs_gpio.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* SPDX-License-Identifier: GPL-2.0
3+
*
4+
* Intel Computer Vision System driver
5+
*
6+
* Copyright (C) 2024 Intel Corporation.
7+
*
8+
*/
9+
10+
#ifndef __CVS_GPIO_H__
11+
#define __CVS_GPIO_H__
12+
13+
#include <linux/gpio.h>
14+
15+
/* GPIO Full Resources */
16+
const static struct acpi_gpio_params gpio_wake = {0, 0, false};
17+
const static struct acpi_gpio_params gpio_rst = {1, 0, false};
18+
const static struct acpi_gpio_params gpio_req = {2, 0, false};
19+
const static struct acpi_gpio_params gpio_resp = {3, 0, false};
20+
const static struct acpi_gpio_mapping icvs_acpi_gpios[] = {
21+
{"wake-gpio", &gpio_wake, 1},
22+
{"rst-gpio", &gpio_rst, 1},
23+
{"req-gpio", &gpio_req, 1},
24+
{"resp-gpio", &gpio_resp, 1},
25+
{ }
26+
};
27+
28+
/* GPIO Light Resources */
29+
const static struct acpi_gpio_params lgpio_req = {0, 0, false};
30+
const static struct acpi_gpio_params lgpio_resp = {1, 0, false};
31+
const static struct acpi_gpio_mapping icvs_acpi_lgpios[] = {
32+
{"req-gpio", &lgpio_req, 1},
33+
{"resp-gpio", &lgpio_resp, 1},
34+
{ }
35+
};
36+
37+
#endif // __CVS_GPIO_H__

0 commit comments

Comments
 (0)