Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
fac459d0
Commit
fac459d0
authored
Feb 14, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial pgm_detect and pgm_init for mt9f002
parent
6b7beb2a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
179 additions
and
1595 deletions
+179
-1595
Makefile
src/drivers/elphel/Makefile
+1
-0
detect_sensors.c
src/drivers/elphel/detect_sensors.c
+3
-0
mt9f002.c
src/drivers/elphel/mt9f002.c
+147
-1593
mt9f002.h
src/drivers/elphel/mt9f002.h
+0
-1
pgm_functions.c
src/drivers/elphel/pgm_functions.c
+27
-1
x393_devices.h
src/include/uapi/elphel/x393_devices.h
+1
-0
No files found.
src/drivers/elphel/Makefile
View file @
fac459d0
...
...
@@ -26,6 +26,7 @@ obj-$(CONFIG_ELPHEL393) += gamma_tables.o
obj-$(CONFIG_ELPHEL393)
+=
histograms.o
obj-$(CONFIG_ELPHEL393)
+=
pgm_functions.o
obj-$(CONFIG_ELPHEL393)
+=
mt9x001.o
obj-$(CONFIG_ELPHEL393)
+=
mt9f002.o
obj-$(CONFIG_ELPHEL393)
+=
multi10359.o
obj-$(CONFIG_ELPHEL393)
+=
imu_log393.o
...
...
src/drivers/elphel/detect_sensors.c
View file @
fac459d0
...
...
@@ -34,6 +34,7 @@
#include <uapi/elphel/x393_devices.h>
#include <uapi/elphel/c313a.h>
#include "mt9x001.h"
#include "mt9f002.h"
#include "multi10359.h"
#include "detect_sensors.h"
...
...
@@ -471,6 +472,8 @@ static int par2addr_init(void){
break
;
case
SENSOR_MT9F002
:
// get sensor table
par2addr
=
mt9f002_par2addr
;
pages
=
mt9f002_pages
;
break
;
}
if
(
par2addr
){
...
...
src/drivers/elphel/mt9f002.c
View file @
fac459d0
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/drivers/elphel/mt9f002.h
View file @
fac459d0
...
...
@@ -527,7 +527,6 @@
#define P_MT9F002_MODEL_ID 0
#define P_MT9F002_RESET 1
//#define P_REG(x) x
//#define P_MT9F002_MODEL_ID 4
...
...
src/drivers/elphel/pgm_functions.c
View file @
fac459d0
...
...
@@ -207,6 +207,7 @@
#include "sensor_common.h"
#include "multi10359.h"
#include "mt9x001.h"
#include "mt9f002.h"
#include "gamma_tables.h"
#include "quantization_tables.h"
#include "latency.h"
...
...
@@ -487,8 +488,33 @@ int pgm_detectsensor (int sensor_port, ///< sensor port number (
}
if
((
thispars
->
pars
[
P_SENSOR
]
==
0
)
&&
((
sens
&
SENSOR_MASK
)
==
SENSOR_MT9F002
)){
dev_dbg
(
g_dev_ptr
,
"trying MT9F002, port=%d
\n
"
,
sensor_port
);
MDP
(
DBGB_PADD
,
sensor_port
,
"trying MT9F002, port=%d
\n
"
,
sensor_port
)
// TODO: move to sensor driver
// ************************************************************************************************
// ********************************* MT9x00x SENSOR (5MP) *****************************************
// ************************************************************************************************
mt9f002_pgm_detectsensor
(
sensor_port
,
sensor
,
thispars
,
prevpars
,
frame16
);
// ************************************************************************************************
// ************************************************************************************************
// ************************************************************************************************
}
setFramePar
(
sensor_port
,
thispars
,
P_CLK_FPGA
,
200000000
);
// FIXME: NC393
setFramePar
(
sensor_port
,
thispars
,
P_CLK_SENSOR
,
48000000
);
// Freqs for sensors
if
((
thispars
->
pars
[
P_SENSOR
]
==
0
)
&&
((
sens
&
SENSOR_MASK
)
==
SENSOR_MT9F002
)){
setFramePar
(
sensor_port
,
thispars
,
P_CLK_SENSOR
,
24444000
);
}
else
{
// this handles MT9x001 & MUX
setFramePar
(
sensor_port
,
thispars
,
P_CLK_SENSOR
,
48000000
);
}
if
(
thispars
->
pars
[
P_SENSOR
]
==
SENSOR_DETECT
)
{
sensor
->
sensorType
=
SENSOR_NONE
;
// to prevent from initializing again
...
...
src/include/uapi/elphel/x393_devices.h
View file @
fac459d0
...
...
@@ -115,6 +115,7 @@
#define DEV393_DETECT_SENSORS ("detect_sensors", "detect_sensors",143, 1, "0666", "c") ///< Probably not needed, only sysfs is used
#define DEV393_I2C_SENSORS ("", "elphel393-sensor-i2c",-1, -1, "0666", "c") ///< Used only in sysfs, no character device (yet?)
#define DEV393_MT9X001 ("", "elphel393-mt9x001", -1, -1, "0666", "c") ///< Used only in sysfs, no character device (yet?)
#define DEV393_MT9F002 ("", "elphel393-mt9f002", -1, -1, "0666", "c") ///< Used only in sysfs, no character device (yet?)
#define DEV393_KLOGGER ("klogger_393", "klogger_393", 144, 1, "0666", "c") ///< kernel event logger to memory (no i/o)
#define _DEV393_DEVNAME(n, ...) n
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment