Part Number: AM5728
Hai sir,
I am using AM5728 custom board through spi we are connected GS2971 serializer.
From SPI Internal register able to read the gs2971 register data(Mode:HD,Pixels count:1920,etc.., ) all gs2971 data we are able to read.
To the Oscilloscope we are capturing HSYNC,VSYNC,DIN0 data properly getting 74.25 MHz.
we are loading the driver gs2971.c from git website:https://github.com/HIO-Project/linux-imx6-nano-imx_3.10.17_1.0.1_ga/blob/master/drivers/media/platform/mxc/capture/gs2971.c
In that driver we added registers reading the default values properly getting.
In the GS2971 driver calling v4l2_int_device_register(&gs2971_int_device); function after that i am not receiving any data.
Then i added two functions based on the thread e2e.ti.com/.../2110750
ret = v4l2_async_register_subdev(sd);
v4l2_subdev_init(sd, ops);
But getting KERNEL PANIC while booting the device.
below error getting
[ 4.346706] gs2971_gpio_state: active=1, standby-gpios(0)=0x1
[ 4.352490] Unable to handle kernel NULL pointer dereference at virtual address 00000050
[ 4.360632] pgd = 8c2fcd49
[ 4.363349] [00000050] *pgd=80000080004003, *pmd=00000000
[ 4.368800] Internal error: Oops: a06 [#1] PREEMPT SMP ARM
[ 4.374308] Modules linked in:
[ 4.377383] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.59-g5f8c1c6121 #31
[ 4.384549] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 4.390676] PC is at v4l2_subdev_init+0x14/0x60
[ 4.395230] LR is at gs2971_probe+0x3f8/0x420
[ 4.399605] pc : [<c07d2dd0>] lr : [<c07e569c>] psr: 60000013
[ 4.405898] sp : ef08fd40 ip : ef08fd50 fp : ef08fd4c
[ 4.411144] r10: c0e4491c r9 : c0e44950 r8 : 00000000
[ 4.416391] r7 : c1204c48 r6 : c1290d1c r5 : ee4cd000 r4 : ee456400
[ 4.422945] r3 : 00000050 r2 : 00000000 r1 : 00000000 r0 : 00000000
[ 4.429501] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 4.436667] Control: 30c5387d Table: 80003000 DAC: fffffffd
[ 4.442437] Process swapper/0 (pid: 1, stack limit = 0x5e636b59)
[ 4.448469] Stack: (0xef08fd40 to 0xef090000)
[ 4.452847] fd40: ef08fd8c ef08fd50 c07e569c c07d2dc8 000000c0 c03c6850 00010040 fc08bb2e
[ 4.461061] fd60: 00000000 ee456400 00000000 c124296c 00000000 00000000 c124297c 00000000
[ 4.469276] fd80: ef08fdac ef08fd90 c074b6ec c07e52b0 c128f2b0 ee456400 c128f2b4 00000000
[ 4.477489] fda0: ef08fddc ef08fdb0 c06b2f90 c074b674 00000000 ee456400 c124297c ee456434
[ 4.485704] fdc0: c06b3308 00000000 c104c834 c10626e0 ef08fe14 ef08fde0 c06b31f0 c06b2d98
[ 4.493918] fde0: c084d890 c084b6b0 ef08fe14 ef08fdf8 ee456400 c124297c ee456434 c06b3308
[ 4.502132] fe00: 00000000 c104c834 ef08fe34 ef08fe18 c06b33ec c06b3194 eeb3fbb4 c1204c48
[ 4.510346] fe20: c124297c c06b3308 ef08fe64 ef08fe38 c06b1080 c06b3314 ef08fe70 ef209958
[ 4.518558] fe40: eeb3fbb4 fc08bb2e c124297c c123c358 ee4cb100 00000000 ef08fe74 ef08fe68
[ 4.526772] fe60: c06b28c8 c06b1010 ef08fe9c ef08fe78 c06b2364 c06b28b0 c0e449a4 ef08fe88
[ 4.534985] fe80: c124297c c1204c48 ffffe000 c102e05c ef08feb4 ef08fea0 c06b3dd0 c06b21ac
[ 4.543198] fea0: c1254100 c1204c48 ef08fec4 ef08feb8 c074b628 c06b3d60 ef08fed4 ef08fec8
[ 4.551412] fec0: c102e074 c074b5d4 ef08ff4c ef08fed8 c02025b8 c102e068 00000000 c0dd2c7c
[ 4.559625] fee0: c0dd2c5c c0dd2c00 c0ddeafc c1204c48 00000000 c0dd2c34 00000006 00000006
[ 4.567839] ff00: 00000000 c0e37e9c c10004f0 c0eb8b44 ef08ff34 ef658044 00000000 fc08bb2e
[ 4.576052] ff20: 00000000 fc08bb2e c1254100 00000007 c1254100 c1254100 c10004f0 c104c854
[ 4.584265] ff40: ef08ff94 ef08ff50 c1000ff4 c0202540 00000006 00000006 00000000 c10004f0
[ 4.592479] ff60: c0eb8b44 000000e7 ffffe000 00000000 c0a1c518 00000000 00000000 00000000
[ 4.600693] ff80: 00000000 00000000 ef08ffac ef08ff98 c0a1c528 c1000e3c 00000000 c0a1c518
[ 4.608907] ffa0: 00000000 ef08ffb0 c02010d8 c0a1c524 00000000 00000000 00000000 00000000
[ 4.617121] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 4.625335] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 4.633545] Backtrace:
[ 4.636012] [<c07d2dbc>] (v4l2_subdev_init) from [<c07e569c>] (gs2971_probe+0x3f8/0x420)
[ 4.644145] [<c07e52a4>] (gs2971_probe) from [<c074b6ec>] (spi_drv_probe+0x84/0xa8)
[ 4.651838] r10:00000000 r9:c124297c r8:00000000 r7:00000000 r6:c124296c r5:00000000
[ 4.659700] r4:ee456400
[ 4.662251] [<c074b668>] (spi_drv_probe) from [<c06b2f90>] (really_probe+0x204/0x2c0)
[ 4.670116] r7:00000000 r6:c128f2b4 r5:ee456400 r4:c128f2b0
[ 4.675805] [<c06b2d8c>] (really_probe) from [<c06b31f0>] (driver_probe_device+0x68/0x180)
[ 4.684107] r10:c10626e0 r9:c104c834 r8:00000000 r7:c06b3308 r6:ee456434 r5:c124297c
[ 4.691970] r4:ee456400 r3:00000000
[ 4.695565] [<c06b3188>] (driver_probe_device) from [<c06b33ec>] (__driver_attach+0xe4/0xe8)
[ 4.704042] r9:c104c834 r8:00000000 r7:c06b3308 r6:ee456434 r5:c124297c r4:ee456400
[ 4.711824] [<c06b3308>] (__driver_attach) from [<c06b1080>] (bus_for_each_dev+0x7c/0xbc)
[ 4.720037] r7:c06b3308 r6:c124297c r5:c1204c48 r4:eeb3fbb4
[ 4.725726] [<c06b1004>] (bus_for_each_dev) from [<c06b28c8>] (driver_attach+0x24/0x28)
[ 4.733765] r7:00000000 r6:ee4cb100 r5:c123c358 r4:c124297c
[ 4.739452] [<c06b28a4>] (driver_attach) from [<c06b2364>] (bus_add_driver+0x1c4/0x208)
[ 4.747495] [<c06b21a0>] (bus_add_driver) from [<c06b3dd0>] (driver_register+0x7c/0x110)
[ 4.755621] r7:c102e05c r6:ffffe000 r5:c1204c48 r4:c124297c
[ 4.761309] [<c06b3d54>] (driver_register) from [<c074b628>] (__spi_register_driver+0x60/0x64)
[ 4.769957] r5:c1204c48 r4:c1254100
[ 4.773554] [<c074b5c8>] (__spi_register_driver) from [<c102e074>] (gs2971_init+0x18/0x20)
[ 4.781858] [<c102e05c>] (gs2971_init) from [<c02025b8>] (do_one_initcall+0x84/0x1b0)
[ 4.789729] [<c0202534>] (do_one_initcall) from [<c1000ff4>] (kernel_init_freeable+0x1c4/0x258)
[ 4.798465] r8:c104c854 r7:c10004f0 r6:c1254100 r5:c1254100 r4:00000007
[ 4.805202] [<c1000e30>] (kernel_init_freeable) from [<c0a1c528>] (kernel_init+0x10/0x11c)
[ 4.813504] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0a1c518
[ 4.821365] r4:00000000
[ 4.823912] [<c0a1c518>] (kernel_init) from [<c02010d8>] (ret_from_fork+0x14/0x3c)
[ 4.831513] Exception stack(0xef08ffb0 to 0xef08fff8)
[ 4.836586] ffa0: 00000000 00000000 00000000 00000000
[ 4.844800] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 4.853013] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 4.859655] r5:c0a1c518 r4:00000000
[ 4.863247] Code: e92dd800 e24cb004 e3510000 e2803050 (e5803050)
[ 4.869407] ---[ end trace 6f6d891c556030af ]---
[ 4.874060] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 4.874060]
[ 4.883244] CPU1: stopping
[ 4.885968] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 4.19.59-g5f8c1c6121 #31
[ 4.894530] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 4.900647] Backtrace:
[ 4.903114] [<c020ca34>] (dump_backtrace) from [<c020cd6c>] (show_stack+0x18/0x1c)
[ 4.910719] r7:ef0c5f08 r6:60000193 r5:00000000 r4:c12509dc
[ 4.916407] [<c020cd54>] (show_stack) from [<c0a082a0>] (dump_stack+0x90/0xa4)
[ 4.923665] [<c0a08210>] (dump_stack) from [<c020f6b8>] (handle_IPI+0x1b0/0x1dc)
[ 4.931095] r7:ef0c5f08 r6:00000001 r5:00000000 r4:c106acfc
[ 4.936784] [<c020f508>] (handle_IPI) from [<c05513e4>] (gic_handle_irq+0x7c/0x80)
[ 4.944386] r6:fa212000 r5:fa21200c r4:c1205100
[ 4.949027] [<c0551368>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x8c)
[ 4.956540] Exception stack(0xef0c5f08 to 0xef0c5f50)
[ 4.961614] 5f00: 00000000 000006b4 ef64950c c021a960 ffffe000 c1204c7c
[ 4.969828] 5f20: c1204cc4 00000002 00000000 00000000 c106a4f0 ef0c5f64 ef0c5f68 ef0c5f58
[ 4.978040] 5f40: c0208ea8 c0208eac 60000013 ffffffff
[ 4.983115] r9:ef0c4000 r8:00000000 r7:ef0c5f3c r6:ffffffff r5:60000013 r4:c0208eac
[ 4.990899] [<c0208e6c>] (arch_cpu_idle) from [<c0a2222c>] (default_idle_call+0x30/0x34)
[ 4.999029] [<c0a221fc>] (default_idle_call) from [<c025a5e0>] (do_idle+0x20c/0x2b4)
[ 5.006810] [<c025a3d4>] (do_idle) from [<c025a974>] (cpu_startup_entry+0x20/0x24)
[ 5.014414] r10:00000000 r9:412fc0f2 r8:80007000 r7:c1254390 r6:00000001 r5:ef0c4000
[ 5.022276] r4:00000087
[ 5.024824] [<c025a954>] (cpu_startup_entry) from [<c020f25c>] (secondary_start_kernel+0x174/0x180)
[ 5.033913] [<c020f0e8>] (secondary_start_kernel) from [<8020236c>] (0x8020236c)
[ 5.041341] r7:c1254390 r6:30c0387d r5:00000000 r4:af077180
[ 5.047032] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 5.047032] ]---
My DTS entries are:
&vip2{
status="okay";
};
&vin3a {
status = "okay";
vin3a_ep: endpoint {
remote-endpoint = <&gs2971_cam0>;
slave-mode;
};
};
&mcspi3{
status="okay";
pinctrl-names = "default";
// pinctrl-0 = <&spi3_pins_default>;
ti,pindir-d0-out-d1-in;
bus-num=<3>;
gs2971: gs2971@2 {
compatible = "gn,gs2971";
reg = <2>;
bits_per_word=<16>;
mclk = <27000000>;
csi = <1>;
cea861 = <0>;
ipu_id = <1234>;
spi-max-frequency = <6000000>;
//port {
//#address-cells = <1>;
//#size-cells = <0>;
port {
gs2971_cam0: endpoint {
remote-endpoint = <&vin3a>;
hsync-active = <1>;
vsync-active = <1>;
pixel-clock-freq = <74250000>; //750khZ
//input-clock-freq = <74250000>;
pclk-sample = <1>;
data-shift = <0>;
bus-width = <16>;
};
};
};
};
MY CONFIG Entries are:
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_CEC_SUPPORT=y
CONFIG_MEDIA_CONTROLLER=y
CONFIG_VIDEO_DEV=y
CONFIG_VIDEO_V4L2_SUBDEV_API=y
CONFIG_VIDEO_V4L2=y
CONFIG_V4L2_MEM2MEM_DEV=y
CONFIG_V4L2_FWNODE=y
CONFIG_VIDEO_V4L2_INT_DEVICE=y #cispl
CONFIG_VIDEOBUF2_CORE=y
CONFIG_VIDEOBUF2_V4L2=y
CONFIG_VIDEOBUF2_MEMOPS=y
CONFIG_VIDEOBUF2_DMA_CONTIG=y
CONFIG_VIDEOBUF2_VMALLOC=m
CONFIG_VIDEO_V4L2_TPG=m
And am attaching my driver and boot log also
How to add v4l2_subdev_init() directly instead of v4l2_i2c_subdev_init() (after adding) this we are getting kernel panic error.
/* SEMTECH SD SDI reciever
*
* Copyright (C) 2014 RidgeRun
* Author: Edison Fernández <edison.fernández@ridgerun.com>
*
* Currently working with 1080p30 and 720p60 with no audio support.
* In order to support more standars the VD_STD value should be
* used in order to identify the incomming resolution and framerate.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*!
* @file gs2971.c
*
* @brief SEMTECH SD SDI reciever
*
* @ingroup Camera
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/of_gpio.h>
#include <linux/videodev2.h>
#include <linux/regulator/consumer.h>
#include <linux/fsl_devices.h>
#include <media/v4l2-chip-ident.h>
#include <media/v4l2-int-device.h>
#include "mxc_v4l2_capture.h"
#include <linux/proc_fs.h>
#include <media/v4l2-async.h>
#include <media/v4l2-device.h>
#include <media/v4l2-common.h>
#include <media/v4l2-mediabus.h>
//#include <media/v4l2-of.h>
#include <media/v4l2-ctrls.h>
#include <media/media-entity.h>
#include <linux/videodev2.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-event.h>
#include <media/v4l2-image-sizes.h>
#include <media/v4l2-subdev.h>
#include <media/v4l2-mediabus.h>
#include <media/v4l2-common.h>
//#include <media/v4l2-of.h>
#include <media/v4l2-dv-timings.h>
#include <media/v4l2-ioctl.h>
#include "gs2971.h"
#define DEBUG 1
#define DRIVER_NAME "gs2971"
/* Debug functions */
static int debug = 1;
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Debug level (0-2)");
static struct gs2971_spidata *spidata;
#define YUV_FORMAT(gs) ((gs->cea861) ? V4L2_PIX_FMT_UYVY : V4L2_PIX_FMT_YUYV)
/*! @brief This mutex is used to provide mutual exclusion.
*
* Create a mutex that can be used to provide mutually exclusive
* read/write access to the globally accessible data structures
* and variables that were defined above.
*/
static DEFINE_MUTEX(mutex);
int gs2971_read_buffer(struct spi_device *spi, u16 offset, u16 * values,
int length)
{
struct spi_message msg;
struct spi_transfer spi_xfer;
int status;
struct gs2971_spidata *sp = spidata;
if (!spi)
return -ENODEV;
if (length > GS2971_SPI_TRANSFER_MAX)
return -EINVAL;
sp->txbuf[0] = 0x8000 | (offset & 0xfff); /* read */
if (length > 1)
sp->txbuf[0] |= 0x1000; /* autoinc */
memset(&spi_xfer, '\0', sizeof(spi_xfer));
spi_xfer.tx_buf = sp->txbuf;
spi_xfer.rx_buf = sp->rxbuf;
spi_xfer.bits_per_word = 16;
spi_xfer.delay_usecs = 0;
spi_xfer.speed_hz = 1000000;
spi_xfer.len = sizeof(*values) * (length + 1); // length in bytes
spi_message_init(&msg);
spi_message_add_tail(&spi_xfer, &msg);
status = spi_sync(spi, &msg);
memcpy(values, &sp->rxbuf[1], sizeof(*values) * length);
if (status)
pr_err(">> Read buffer(%d) (%x): %x %x, %x %x\n", status,
offset, sp->txbuf[0], sp->txbuf[1], sp->rxbuf[0],
sp->rxbuf[1]);
return status;
}
int gs2971_read_register(struct spi_device *spi, u16 offset, u16 * value)
{
struct spi_message msg;
struct spi_transfer spi_xfer;
int status;
u32 txbuf[1];
u32 rxbuf[1];
if (!spi)
return -ENODEV;
txbuf[0] = 0x80000000 | ((offset & 0xfff) << 16); /* read */
memset(&spi_xfer, '\0', sizeof(spi_xfer));
spi_xfer.tx_buf = txbuf;
spi_xfer.rx_buf = rxbuf;
spi_xfer.bits_per_word = 32;
spi_xfer.delay_usecs = 0;
spi_xfer.speed_hz = 1000000;
spi_xfer.len = 4; // length in bytes
spi_message_init(&msg);
spi_message_add_tail(&spi_xfer, &msg);
status = spi_sync(spi, &msg);
//dev_err(&spi->dev, "read_register status=%x\n", status); //cispl
if (status) {
dev_dbg(&spi->dev, "read_reg failed\n");
*value = 0xffff;
} else {
*value = (u16) rxbuf[0];
}
if (status)
pr_err(">> Read register(%d) (%x): %x, %x\n", status, offset,
txbuf[0], rxbuf[0]);
pr_debug("--> Read register (%x) with value: %x", offset, *value);
return status;
}
int gs2971_write_buffer(struct spi_device *spi, u16 offset, u16 * values,
int length)
{
struct spi_message msg;
struct spi_transfer spi_xfer;
int status;
struct gs2971_spidata *sp = spidata;
if (!spi)
return -ENODEV;
if (length > GS2971_SPI_TRANSFER_MAX - 1)
return -EINVAL;
sp->txbuf[0] = (offset & 0xfff); /* write */
if (length > 1)
sp->txbuf[0] |= 0x1000; /* autoinc */
memcpy(&sp->txbuf[1], values, sizeof(*values) * length);
memset(&spi_xfer, '\0', sizeof(spi_xfer));
spi_xfer.tx_buf = sp->txbuf;
spi_xfer.rx_buf = sp->rxbuf;
spi_xfer.bits_per_word = 16;
spi_xfer.delay_usecs = 0;
spi_xfer.speed_hz = 1000000;
spi_xfer.len = sizeof(*values) * (length + 1); // length in bytes
spi_message_init(&msg);
spi_message_add_tail(&spi_xfer, &msg);
status = spi_sync(spi, &msg);
if (status)
pr_err(">> Write register(%d) (%x): %x %x, %x %x\n", status,
offset, sp->txbuf[0], sp->txbuf[1], sp->rxbuf[0],
sp->rxbuf[1]);
return status;
}
int gs2971_write_register(struct spi_device *spi, u16 offset, u16 value)
{
pr_debug("--> Writing to address (%x) : %x\n", offset, value);
return gs2971_write_buffer(spi, offset, &value, 1);
}
const char *gpio_names[] = {
[GPIO_STANDBY] = "standby-gpios",
[GPIO_RESET] = "rst-gpios",
[GPIO_TIM_861] = "tim_861-gpios",
[GPIO_IOPROC_EN] = "ioproc_en-gpios",
[GPIO_SW_EN] = "sw_en-gpios",
[GPIO_RC_BYPASS] = "rc_bypass-gpios",
[GPIO_AUDIO_EN] = "audio_en-gpios",
[GPIO_DVB_ASI] = "dvb_asi-gpios",
[GPIO_SMPTE_BYPASS] = "smpte_bypass-gpios",
[GPIO_DVI_LOCK] = "dvi_lock-gpios",
[GPIO_DATA_ERR] = "data_err-gpios",
[GPIO_LB_CONT] = "lb_cont-gpios",
[GPIO_Y_1ANC] = "y_1anc-gpios",
};
void gs2971_gpio_state(struct gs2971_priv *gs, int index, int active)
{
if (gpio_is_valid(gs->gpios[index])) {
int state = (gs->gpio_flags[index] & OF_GPIO_ACTIVE_LOW) ? 1 : 0;
state ^= active;
gpio_set_value(gs->gpios[index], state);
pr_info("%s: active=%d, %s(%d)=0x%x\n", __func__, active, gpio_names[index], gs->gpios[index], state);
}
}
static void gs2971_change_gpio_state(struct gs2971_priv *gs, int on)
{
gs2971_gpio_state(gs, GPIO_STANDBY, on ? 0 : 1);
if (on) {
pr_debug("%s: power up delay\n", __func__);
msleep(1000);
}
}
static int gs2971_get_gpios(struct gs2971_priv *gs, struct device *dev)
{
int i;
int ret;
enum of_gpio_flags flags;
for (i = 0; i < GPIO_CNT; i++) {
gs->gpios[i] = of_get_named_gpio_flags(dev->of_node, gpio_names[i], 0, &flags);
if (!gpio_is_valid(gs->gpios[i])) {
pr_info("%s: gpio %s not available\n", __func__, gpio_names[i]);
} else {
int gflags = (flags & OF_GPIO_ACTIVE_LOW) ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW;
if ((i == GPIO_STANDBY) || (i == GPIO_RESET))
gflags ^= GPIOF_INIT_HIGH;
if (flags == 2)
gflags = GPIOF_IN;
gs->gpio_flags[i] = flags;
pr_info("%s: %s flags(%d -> %d)\n", __func__, gpio_names[i], flags, gflags);
ret = devm_gpio_request_one(dev, gs->gpios[i], gflags, gpio_names[i]);
if (ret < 0) {
pr_info("%s: request of %s failed(%d)\n", __func__, gpio_names[i], ret);
return ret;
}
}
}
gs2971_gpio_state(gs, GPIO_IOPROC_EN, 1); //active ioproc_en
msleep(2);
gs2971_gpio_state(gs, GPIO_RESET, 0); //remove reset
msleep(400);
return 0;
}
static s32 power_control(struct gs2971_priv *gs, int on)
{
struct sensor_data *sensor = &gs->sensor;
int i;
int ret = 0;
pr_debug("%s: %d\n", __func__, on);
if (sensor->on != on) {
if (on) {
for (i = 0; i < REGULATOR_CNT; i++) {
if (gs->regulator[i]) {
ret = regulator_enable(gs->regulator[i]);
if (ret) {
pr_err("%s:regulator_enable failed(%d)\n",
__func__, ret);
on = 0; /* power all off */
break;
}
}
}
}
gs2971_change_gpio_state(gs, on);
sensor->on = on;
if (!on) {
for (i = REGULATOR_CNT - 1; i >= 0; i--) {
if (gs->regulator[i])
regulator_disable(gs->regulator[i]);
}
}
}
return ret;
}
static struct spi_device *gs2971_get_spi(struct gs2971_spidata *spidata)
{
if (!spidata)
return NULL;
return spidata->spi;
}
static int get_std(struct v4l2_int_device *s, v4l2_std_id * id)
{
struct gs2971_priv *gs = s->priv;
struct sensor_data *sensor = &gs->sensor;
struct spi_device *spi = NULL;
u16 std_lock_value;
u16 sync_lock_value;
u16 words_per_actline_value;
u16 words_per_line_value;
u16 lines_per_frame_value;
u16 actlines_per_frame_value;
u16 interlaced_flag;
int status;
u16 sd_audio_status_value;
u16 hd_audio_status_value;
u16 sd_audio_config_value;
u16 hd_audio_config_value;
u16 readback_value;
u16 ds1, ds2;
pr_debug("-> In function %s\n", __func__);
gs->mode = gs2971_mode_not_supported;
gs->framerate = gs2971_default_fps;
spi = gs2971_get_spi(spidata);
if (!spi)
return -ENODEV;
*id = V4L2_STD_UNKNOWN;
status =
gs2971_read_register(spi, GS2971_RASTER_STRUCT4, &std_lock_value);
actlines_per_frame_value = std_lock_value & GS_RS4_ACTLINES_PER_FIELD;
interlaced_flag = std_lock_value & GS_RS4_INT_nPROG;
status =
gs2971_read_register(spi, GS2971_FLYWHEEL_STATUS, &sync_lock_value);
if (status)
return status;
pr_debug("--> lock_value %x\n", sync_lock_value);
if (!sync_lock_value) {
pr_err("%s: no lock, gs2971\n", __func__);
return -EBUSY;
}
status = gs2971_read_register(spi, GS2971_DATA_FORMAT_DS1, &ds1);
if (status)
return status;
status = gs2971_read_register(spi, GS2971_DATA_FORMAT_DS2, &ds2);
if (status)
return status;
pr_debug("--> ds1=%x\n--> ds2=%x\n", ds1, ds2);
status =
gs2971_read_register(spi, GS2971_RASTER_STRUCT1,
&words_per_actline_value);
if (status)
return status;
words_per_actline_value &= GS_RS1_WORDS_PER_ACTLINE;
status =
gs2971_read_register(spi, GS2971_RASTER_STRUCT2,
&words_per_line_value);
if (status)
return status;
words_per_line_value &= GS_RS2_WORDS_PER_LINE;
status =
gs2971_read_register(spi, GS2971_RASTER_STRUCT3,
&lines_per_frame_value);
if (status)
return status;
lines_per_frame_value &= GS_RS3_LINES_PER_FRAME;
pr_debug("--> Words per line %u/%u Lines per frame %u/%u\n",
(unsigned int)words_per_actline_value,
(unsigned int)words_per_line_value,
(unsigned int)actlines_per_frame_value,
(unsigned int)lines_per_frame_value);
pr_debug("--> SyncLock: %s %s StdLock: 0x%04x\n",
(sync_lock_value & GS_FLY_V_LOCK_DS1) ? "Vsync" : "NoVsync",
(sync_lock_value & GS_FLY_H_LOCK_DS1) ? "Hsync" : "NoHsync",
(unsigned int)(std_lock_value));
status =
gs2971_read_register(spi, GS2971_CH_VALID, &sd_audio_status_value);
if (status)
return status;
status =
gs2971_read_register(spi, GS2971_HD_CH_VALID,
&hd_audio_status_value);
if (status)
return status;
if (!lines_per_frame_value) {
pr_err("%s: 0 frame size\n", __func__);
return -EBUSY;
}
if (gs->cea861) {
sensor->spix.swidth = words_per_line_value - 1;
sensor->spix.sheight = lines_per_frame_value;
}
if (interlaced_flag && lines_per_frame_value == 525) {
pr_debug("--> V4L2_STD_525_60\n");
*id = V4L2_STD_525_60;
} else if (interlaced_flag && lines_per_frame_value == 625) {
pr_debug("--> V4L2_STD_625_50\n");
*id = V4L2_STD_625_50;
} else if (interlaced_flag && lines_per_frame_value == 525) {
pr_debug("--> V4L2_STD_525P_60\n");
*id = YUV_FORMAT(gs);
} else if (interlaced_flag && lines_per_frame_value == 625) {
pr_debug("--> V4L2_STD_625P_50\n");
*id = YUV_FORMAT(gs);
} else if (!interlaced_flag && 749 <= lines_per_frame_value
&& lines_per_frame_value <= 750) {
if (gs->cea861) {
sensor->spix.left = 220;
sensor->spix.top = 25;
}
sensor->pix.width = 1280;
sensor->pix.height = 720;
if (words_per_line_value > 1650) {
pr_debug("--> V4L2_STD_720P_50\n");
*id = YUV_FORMAT(gs);
} else {
pr_debug("--> V4L2_STD_720P_60\n");
gs->mode = gs2971_mode_720p;
gs->framerate = gs2971_60_fps;
*id = YUV_FORMAT(gs);
}
} else if (!interlaced_flag && 1124 <= lines_per_frame_value
&& lines_per_frame_value <= 1125) {
sensor->pix.width = 1920;
sensor->pix.height = 1080;
gs->mode = gs2971_mode_1080p;
gs->framerate = gs2971_30_fps; // Currently only 1080p30 is supported
if (words_per_line_value >= 2200 + 550) {
pr_debug("--> V4L2_STD_1080P_24\n");
*id = YUV_FORMAT(gs);
} else if (words_per_line_value >= 2200 + 440) {
pr_debug("--> V4L2_STD_1080P_25\n");
*id = YUV_FORMAT(gs);
} else {
pr_debug("--> V4L2_STD_1080P_60\n");
*id = YUV_FORMAT(gs);
}
} else if (interlaced_flag && 1124 <= lines_per_frame_value
&& lines_per_frame_value <= 1125) {
sensor->pix.width = 1920;
sensor->pix.height = 1080;
if (words_per_line_value >= 2200 + 440) {
pr_debug("--> V4L2_STD_1080I_50\n");
*id = YUV_FORMAT(gs);
} else {
pr_debug("--> V4L2_STD_1080I_60\n");
*id = YUV_FORMAT(gs);
}
} else {
dev_err(&spi->dev,
"Std detection failed: interlaced_flag: %u words per line %u/%u Lines per frame %u/%u SyncLock: %s %s StdLock: 0x%04x\n",
(unsigned int)interlaced_flag,
(unsigned int)words_per_actline_value,
(unsigned int)words_per_line_value,
(unsigned int)actlines_per_frame_value,
(unsigned int)lines_per_frame_value,
(sync_lock_value & GS_FLY_V_LOCK_DS1) ? "Vsync" :
"NoVsync",
(sync_lock_value & GS_FLY_H_LOCK_DS1) ? "Hsync" :
"NoHsync", (unsigned int)(std_lock_value));
return -1;
}
sd_audio_config_value = 0xaaaa; // 16-bit, right-justified
status =
gs2971_write_register(spi, GS2971_CFG_AUD, sd_audio_config_value);
if (!status) {
status =
gs2971_read_register(spi, GS2971_CFG_AUD, &readback_value);
if (!status) {
if (sd_audio_config_value != readback_value) {
dev_dbg(&spi->dev,
"SD audio readback failed, wanted x%04x, got x%04x\n",
(unsigned int)sd_audio_config_value,
(unsigned int)readback_value);
}
}
}
hd_audio_config_value = 0x0aa4; // 16-bit, right-justified
status =
gs2971_write_register(spi, GS2971_HD_CFG_AUD,
hd_audio_config_value);
if (!status) {
status =
gs2971_read_register(spi, GS2971_HD_CFG_AUD,
&readback_value);
if (!status) {
if (hd_audio_config_value != readback_value) {
dev_dbg(&spi->dev,
"HD audio readback failed, wanted x%04x, got x%04x\n",
(unsigned int)hd_audio_config_value,
(unsigned int)readback_value);
}
}
}
status =
gs2971_write_register(spi, GS2971_ANC_CONTROL, ANCCTL_ANC_DATA_DEL);
if (status)
return status;
pr_debug("--> remove anc data\n");
#if 0
status = gs2971_write_register(spi, GS2971_ACGEN_CTRL,
(GS2971_ACGEN_CTRL_SCLK_INV_MASK |
GS2971_ACGEN_CTRL_MCLK_SEL_128FS));
#endif
return 0;
}
static void gs2971_workqueue_handler(struct work_struct *data);
DECLARE_WORK(gs2971_worker, gs2971_workqueue_handler);
static void gs2971_workqueue_handler(struct work_struct *ignored)
{
struct spi_device *spi;
u16 bank_reg_base, anc_reg;
static u16 anc_buf[257];
int anc_length;
int adf_found = 1;
int ch_id;
int status;
u16 did, sdid;
pr_debug("-> In function %s\n", __func__);
for (ch_id = 0; ch_id < GS2971_NUM_CHANNELS; ch_id++) {
spi = gs2971_get_spi(spidata);
if (!spi)
continue;
/* Step 2: start writing to other bank */
gs2971_write_register(spi, GS2971_ANC_CONTROL,
ANCCTL_ANC_DATA_DEL |
ANCCTL_ANC_DATA_SWITCH);
#if 1
/* Step 1: read ancillary data */
bank_reg_base = GS2971_ANC_BANK_REG;
status = 0;
for (anc_reg = bank_reg_base, adf_found = 1; (0 == status) &&
((anc_reg + 6) < bank_reg_base + GS2971_ANC_BANK_SIZE);) {
status = gs2971_read_buffer(spi, anc_reg, anc_buf, 6);
anc_reg += 6;
if (anc_reg >= bank_reg_base + GS2971_ANC_BANK_SIZE)
break;
if (!status) {
if (anc_buf[0] == 0 ||
anc_buf[1] == 0xff || anc_buf[2] == 0xff) {
did = anc_buf[3];
sdid = anc_buf[4];
anc_length = (anc_buf[5] & 0xff) + 1;
anc_reg += anc_length;
if (!(did == 0 && sdid == 0)
&& (did < 0xf8)) {
dev_dbg(&spi->dev,
"anc[%x] %02x %02x %02x\n",
anc_reg, did, sdid,
anc_length);
}
} else {
break;
}
}
}
dev_dbg(&spi->dev, "anc_end[%x] %02x %02x %02x\n",
anc_reg, anc_buf[0], anc_buf[1], anc_buf[2]);
#endif
/* Step 3: switch reads to other bank */
gs2971_write_register(spi, GS2971_ANC_CONTROL,
ANCCTL_ANC_DATA_DEL);
}
}
#if defined(GS2971_ENABLE_ANCILLARY_DATA)
static int gs2971_init_ancillary(struct spi_device *spi)
{
pr_debug("-> In function %s\n", __func__);
u16 value;
int offset;
int status = 0;
/* Set up ancillary data filtering */
if (!status)
status =
gs2971_write_register(spi, GS2971_REG_ANC_TYPE1, 0x4100);
/* SMPTE-352M Payload ID (0x4101) */
if (!status)
status = gs2971_write_register(spi, GS2971_REG_ANC_TYPE2, 0x5f00); /* Placeholder */
if (!status)
status = gs2971_write_register(spi, GS2971_REG_ANC_TYPE3, 0x6000); /* Placeholder */
if (!status)
status =
gs2971_write_register(spi, GS2971_REG_ANC_TYPE4, 0x6100);
/* SMPTE 334 - SDID 01=EIA-708, 02=EIA-608 */
if (!status)
status =
gs2971_write_register(spi, GS2971_REG_ANC_TYPE5, 0x6200);
/* SMPTE 334 - SDID 01=Program description, 02=Data broadcast, 03=VBI data */
if (0 == gs2971_read_register(spi, GS2971_REG_ANC_TYPE1, &value)) {
dev_dbg(&spi->dev, "REG_ANC_TYPE1 value x%04x\n",
(unsigned int)value);
}
if (0 == gs2971_read_register(spi, GS2971_REG_ANC_TYPE2, &value)) {
dev_dbg(&spi->dev, "REG_ANC_TYPE2 value x%04x\n",
(unsigned int)value);
}
/* Clear old ancillary data */
if (!status)
status = gs2971_write_register(spi, GS2971_ANC_CONTROL,
ANCCTL_ANC_DATA_DEL |
ANCCTL_ANC_DATA_SWITCH);
/* Step 2: start writing to other bank */
if (!status)
status =
gs2971_write_register(spi, GS2971_ANC_CONTROL,
ANCCTL_ANC_DATA_DEL);
return status;
}
#endif
/* gs2971_initialize :
* This function will set the video format standard
*/
static int gs2971_initialize(struct gs2971_priv *gs, struct spi_device *spi)
{
int status = 0;
int retry = 0;
u16 value,i;
static u16 anc_buf[257];
static void __iomem *base;
//base = ioremap(0x4A009800, SZ_4K); cispl
//__raw_writel(0x02,base); cispl
// u16 cfg = GS_VCFG1_861_PIN_DISABLE_MASK;
u16 cfg = 0xC0;
if (gs->cea861)
cfg |= GS_VCFG1_TIMING_861_MASK;
pr_debug("-> In function %s\n", __func__);
for (;;) {
status = gs2971_write_register(spi, GS2971_VCFG1, cfg);
if (status)
return status;
status = gs2971_read_register(spi, GS2971_VCFG1, &value);
if (status)
return status;
dev_err(&spi->dev, "status=%x, read value of 0x%08x, expected 0x%08x\n", status,
(unsigned int)value, cfg);
if (value == cfg)
break;
if (retry++ >= 20)
return -ENODEV;
msleep(50);
}
// status = gs2971_write_register(spi, GS2971_VCFG2, GS_VCFG2_DS_SWAP_3G);
status = gs2971_write_register(spi, GS2971_VCFG2, 0);
if (status)
return status;
status = gs2971_write_register(spi, GS2971_IO_CONFIG,
(GS_IOCFG_HSYNC << 0) | (GS_IOCFG_VSYNC
<< 5) |
(GS_IOCFG_DE << 10));
if (status)
return status;
status = gs2971_write_register(spi, GS2971_IO_CONFIG2,
(GS_IOCFG_LOCKED << 0) | (GS_IOCFG_Y_ANC
<< 5) |
(GS_IOCFG_DATA_ERROR << 10));
if (status)
return status;
status =
gs2971_write_register(spi, GS2971_TIM_861_CFG, GS_TIMCFG_TRS_861);
if (status)
return status;
// status =gs2971_write_register(spi, GS2971_RATE_SEL, 0x00); //cispl
for(i=0;i<38;i++)
{
gs2971_read_register(spi, i, &value);
dev_err(&spi->dev, "register %02x = %08x\n",i,(unsigned int)value);
}
#if defined(GS2971_ENABLE_ANCILLARY_DATA)
gs2971_init_ancillary(spi);
#endif
#if 0
if (gs2971_timer.function == NULL) {
init_timer(&gs2971_timer);
gs2971_timer.function = gs2971_timer_function;
}
mod_timer(&gs2971_timer, jiffies + msecs_to_jiffies(gs2971_timeout_ms));
#endif
return status;
}
#if 0
/*!
* Return attributes of current video standard.
* Since this device autodetects the current standard, this function also
* sets the values that need to be changed if the standard changes.
* There is no set std equivalent function.
*
* @return None.
*/
static void gs2971_get_std(struct v4l2_int_device *s, v4l2_std_id * std)
{
pr_debug("-> In function %s\n", __func__);
}
#endif
/***********************************************************************
* IOCTL Functions from v4l2_int_ioctl_desc.
***********************************************************************/
/*!
* ioctl_g_ifparm - V4L2 sensor interface handler for vidioc_int_g_ifparm_num
* s: pointer to standard V4L2 device structure
* p: pointer to standard V4L2 vidioc_int_g_ifparm_num ioctl structure
*
* Gets slave interface parameters.
* Calculates the required xclk value to support the requested
* clock parameters in p. This value is returned in the p
* parameter.
*
* vidioc_int_g_ifparm returns platform-specific information about the
* interface settings used by the sensor.
*
* Called on open.
*/
static int ioctl_g_ifparm(struct v4l2_int_device *s, struct v4l2_ifparm *p)
{
struct gs2971_priv *gs = s->priv;
struct sensor_data *sensor = &gs->sensor;
pr_debug("-> In function %s\n", __func__);
/* Initialize structure to 0s then set any non-0 values. */
memset(p, 0, sizeof(*p));
p->u.bt656.clock_curr = sensor->mclk;
if (gs->cea861) {
p->if_type = V4L2_IF_TYPE_BT656; /* This is the only possibility. */
p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_NOBT_10BIT;
p->u.bt656.bt_sync_correct = 1;
// p->u.bt656.nobt_vs_inv = 1;
p->u.bt656.nobt_hs_inv = 1;
} else {
/*
* p->if_type = V4L2_IF_TYPE_BT656_PROGRESSIVE;
* BT.656 - 20/10bit pin low doesn't work because then EAV of
* DS1/2 are also interleaved and imx only recognizes 4 word
* EAV/SAV codes, not 8
*/
p->if_type = V4L2_IF_TYPE_BT1120_PROGRESSIVE_SDR;
p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_BT_10BIT;
p->u.bt656.bt_sync_correct = 0; // Use embedded sync
p->u.bt656.nobt_vs_inv = 1;
// p->u.bt656.nobt_hs_inv = 1;
}
p->u.bt656.latch_clk_inv = 0; /* pixel clk polarity */
p->u.bt656.clock_min = 6000000;
p->u.bt656.clock_max = 180000000;
return 0;
}
static int ioctl_s_power(struct v4l2_int_device *s, int on)
{
struct gs2971_priv *gs = s->priv;
struct sensor_data *sensor = &gs->sensor;
pr_debug("-> In function %s\n", __func__);
if (on && !sensor->on) {
power_control(gs, 1);
} else if (!on && sensor->on) {
power_control(gs, 0);
}
return 0;
}
/*!
* ioctl_g_parm - V4L2 sensor interface handler for VIDIOC_G_PARM ioctl
* @s: pointer to standard V4L2 device structure
* @a: pointer to standard V4L2 VIDIOC_G_PARM ioctl structure
*
* Returns the sensor's video CAPTURE parameters.
*/
static int ioctl_g_parm(struct v4l2_int_device *s, struct v4l2_streamparm *a)
{
struct gs2971_priv *gs = s->priv;
struct sensor_data *sensor = &gs->sensor;
struct v4l2_captureparm *cparm = &a->parm.capture;
pr_debug("-> In function %s\n", __func__);
switch (a->type) {
/* These are all the possible cases. */
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
pr_debug(" type is V4L2_BUF_TYPE_VIDEO_CAPTURE\n");
memset(a, 0, sizeof(*a));
a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
cparm->capability = sensor->streamcap.capability;
cparm->timeperframe = sensor->streamcap.timeperframe;
cparm->capturemode = sensor->streamcap.capturemode;
break;
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
case V4L2_BUF_TYPE_VIDEO_OVERLAY:
case V4L2_BUF_TYPE_VBI_CAPTURE:
case V4L2_BUF_TYPE_VBI_OUTPUT:
case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
break;
default:
pr_debug("ioctl_g_parm:type is unknown %d\n", a->type);
break;
}
return 0;
}
/*!
* ioctl_s_parm - V4L2 sensor interface handler for VIDIOC_S_PARM ioctl
* @s: pointer to standard V4L2 device structure
* @a: pointer to standard V4L2 VIDIOC_S_PARM ioctl structure
*
* Configures the sensor to use the input parameters, if possible. If
* not possible, reverts to the old parameters and returns the
* appropriate error code.
*
* This driver cannot change these settings.
*/
static int ioctl_s_parm(struct v4l2_int_device *s, struct v4l2_streamparm *a)
{
struct gs2971_priv *gs = s->priv;
struct sensor_data *sensor = &gs->sensor;
struct v4l2_fract *timeperframe = &a->parm.capture.timeperframe;
int ret = 0;
pr_debug("-> In function %s\n", __func__);
/* Make sure power on */
power_control(gs, 1);
switch (a->type) {
/* This is the only case currently handled. */
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
/* Check that the new frame rate is allowed. */
if ((timeperframe->numerator == 0) ||
(timeperframe->denominator == 0)) {
timeperframe->denominator =
gs2971_framerates[gs2971_default_fps];
timeperframe->numerator = 1;
pr_warning(" Setting framerate to default (%dfps)!\n",
gs2971_framerates[gs2971_default_fps]);
} else if (timeperframe->denominator !=
gs2971_framerates[gs->framerate]) {
pr_warning
(" Input framerate is %dfps and you are trying to set %dfps!\n",
gs2971_framerates[gs->framerate],
timeperframe->denominator);
}
sensor->streamcap.timeperframe = *timeperframe;
sensor->streamcap.capturemode =
(u32) a->parm.capture.capturemode;
break;
/* These are all the possible cases. */
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
case V4L2_BUF_TYPE_VIDEO_OVERLAY:
case V4L2_BUF_TYPE_VBI_CAPTURE:
case V4L2_BUF_TYPE_VBI_OUTPUT:
case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
pr_debug(" type is not V4L2_BUF_TYPE_VIDEO_CAPTURE but %d\n",
a->type);
ret = -EINVAL;
break;
default:
pr_debug(" type is unknown - %d\n", a->type);
ret = -EINVAL;
break;
}
return ret;
}
/*!
* ioctl_g_fmt_cap - V4L2 sensor interface handler for ioctl_g_fmt_cap
* @s: pointer to standard V4L2 device structure
* @f: pointer to standard V4L2 v4l2_format structure
*
* Returns the sensor's current pixel format in the v4l2_format
* parameter.
*/
static int ioctl_g_fmt_cap(struct v4l2_int_device *s, struct v4l2_format *f)
{
struct gs2971_priv *gs = s->priv;
struct sensor_data *sensor = &gs->sensor;
v4l2_std_id std = V4L2_STD_UNKNOWN;
pr_debug("-> In function %s\n", __func__);
power_control(gs, 1);
switch (f->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
get_std(s, &std);
f->fmt.pix = sensor->pix;
break;
case V4L2_BUF_TYPE_SENSOR:
pr_debug("%s: left=%d, top=%d, %dx%d\n", __func__,
sensor->spix.left, sensor->spix.top,
sensor->spix.swidth, sensor->spix.sheight);
f->fmt.spix = sensor->spix;
break;
case V4L2_BUF_TYPE_PRIVATE:
get_std(s, &std);
// f->fmt.pix.pixelformat = (u32)std;
break;
default:
f->fmt.pix = sensor->pix;
break;
}
return 0;
}
/*!
* ioctl_queryctrl - V4L2 sensor interface handler for VIDIOC_QUERYCTRL ioctl
* @s: pointer to standard V4L2 device structure
* @qc: standard V4L2 VIDIOC_QUERYCTRL ioctl structure
*
* If the requested control is supported, returns the control information
* from the video_control[] array. Otherwise, returns -EINVAL if the
* control is not supported.
*/
static int ioctl_queryctrl(struct v4l2_int_device *s, struct v4l2_queryctrl *qc)
{
pr_debug("-> In function %s\n", __func__);
return -EINVAL;
}
/*!
* ioctl_g_ctrl - V4L2 sensor interface handler for VIDIOC_G_CTRL ioctl
* @s: pointer to standard V4L2 device structure
* @vc: standard V4L2 VIDIOC_G_CTRL ioctl structure
*
* If the requested control is supported, returns the control's current
* value from the video_control[] array. Otherwise, returns -EINVAL
* if the control is not supported.
*/
static int ioctl_g_ctrl(struct v4l2_int_device *s, struct v4l2_control *vc)
{
struct gs2971_priv *gs = s->priv;
struct sensor_data *sensor = &gs->sensor;
int ret = 0;
pr_debug("-> In function %s\n", __func__);
switch (vc->id) {
case V4L2_CID_BRIGHTNESS:
vc->value = sensor->brightness;
break;
case V4L2_CID_HUE:
vc->value = sensor->hue;
break;
case V4L2_CID_CONTRAST:
vc->value = sensor->contrast;
break;
case V4L2_CID_SATURATION:
vc->value = sensor->saturation;
break;
case V4L2_CID_RED_BALANCE:
vc->value = sensor->red;
break;
case V4L2_CID_BLUE_BALANCE:
vc->value = sensor->blue;
break;
case V4L2_CID_EXPOSURE:
vc->value = sensor->ae_mode;
break;
default:
ret = -EINVAL;
}
return ret;
}
/*!
* ioctl_s_ctrl - V4L2 sensor interface handler for VIDIOC_S_CTRL ioctl
* @s: pointer to standard V4L2 device structure
* @vc: standard V4L2 VIDIOC_S_CTRL ioctl structure
*
* If the requested control is supported, sets the control's current
* value in HW (and updates the video_control[] array). Otherwise,
* returns -EINVAL if the control is not supported.
*/
static int ioctl_s_ctrl(struct v4l2_int_device *s, struct v4l2_control *vc)
{
struct gs2971_priv *gs = s->priv;
// struct sensor_data *sensor = &gs->sensor;
int retval = 0;
pr_debug("-> In function %s\n", __func__);
///* Make sure power on */
power_control(gs, 1);
switch (vc->id) {
case V4L2_CID_BRIGHTNESS:
dev_dbg(&spidata->spi->dev, " V4L2_CID_BRIGHTNESS\n");
break;
case V4L2_CID_CONTRAST:
dev_dbg(&spidata->spi->dev, " V4L2_CID_CONTRAST\n");
break;
case V4L2_CID_SATURATION:
dev_dbg(&spidata->spi->dev, " V4L2_CID_SATURATION\n");
break;
case V4L2_CID_HUE:
dev_dbg(&spidata->spi->dev, " V4L2_CID_HUE\n");
break;
case V4L2_CID_AUTO_WHITE_BALANCE:
dev_dbg(&spidata->spi->dev, " V4L2_CID_AUTO_WHITE_BALANCE\n");
break;
case V4L2_CID_DO_WHITE_BALANCE:
dev_dbg(&spidata->spi->dev, " V4L2_CID_DO_WHITE_BALANCE\n");
break;
case V4L2_CID_RED_BALANCE:
dev_dbg(&spidata->spi->dev, " V4L2_CID_RED_BALANCE\n");
break;
case V4L2_CID_BLUE_BALANCE:
dev_dbg(&spidata->spi->dev, " V4L2_CID_BLUE_BALANCE\n");
break;
case V4L2_CID_GAMMA:
dev_dbg(&spidata->spi->dev, " V4L2_CID_GAMMA\n");
break;
case V4L2_CID_EXPOSURE:
dev_dbg(&spidata->spi->dev, " V4L2_CID_EXPOSURE\n");
break;
case V4L2_CID_AUTOGAIN:
dev_dbg(&spidata->spi->dev, " V4L2_CID_AUTOGAIN\n");
break;
case V4L2_CID_GAIN:
dev_dbg(&spidata->spi->dev, " V4L2_CID_GAIN\n");
break;
case V4L2_CID_HFLIP:
dev_dbg(&spidata->spi->dev, " V4L2_CID_HFLIP\n");
break;
case V4L2_CID_VFLIP:
dev_dbg(&spidata->spi->dev, " V4L2_CID_VFLIP\n");
break;
default:
dev_dbg(&spidata->spi->dev, " Default case\n");
retval = -EPERM;
break;
}
return retval;
}
/*!
* ioctl_enum_framesizes - V4L2 sensor interface handler for
* VIDIOC_ENUM_FRAMESIZES ioctl
* @s: pointer to standard V4L2 device structure
* @fsize: standard V4L2 VIDIOC_ENUM_FRAMESIZES ioctl structure
*
* Return 0 if successful, otherwise -EINVAL.
*/
static int ioctl_enum_framesizes(struct v4l2_int_device *s,
struct v4l2_frmsizeenum *fsize)
{
struct gs2971_priv *gs = s->priv;
struct sensor_data *sensor = &gs->sensor;
pr_debug("-> In function %s\n", __func__);
if (fsize->index > gs2971_mode_MAX || gs->mode > gs2971_mode_MAX)
return -EINVAL;
fsize->pixel_format = sensor->pix.pixelformat;
fsize->discrete.width = gs2971_res[gs->mode].width;
fsize->discrete.height = gs2971_res[gs->mode].height;
return 0;
}
/*!
* ioctl_g_chip_ident - V4L2 sensor interface handler for
* VIDIOC_DBG_G_CHIP_IDENT ioctl
* @s: pointer to standard V4L2 device structure
* @id: pointer to int
*
* Return 0.
*/
static int ioctl_g_chip_ident(struct v4l2_int_device *s, int *id)
{
pr_debug("-> In function %s\n", __func__);
((struct v4l2_dbg_chip_ident *)id)->match.type =
V4L2_CHIP_MATCH_I2C_DRIVER;
strcpy(((struct v4l2_dbg_chip_ident *)id)->match.name, "gs2971_video");
return 0;
}
/*!
* ioctl_enum_fmt_cap - V4L2 sensor interface handler for VIDIOC_ENUM_FMT
* @s: pointer to standard V4L2 device structure
* @fmt: pointer to standard V4L2 fmt description structure
*
* Return 0.
*/
static int ioctl_enum_fmt_cap(struct v4l2_int_device *s,
struct v4l2_fmtdesc *fmt)
{
struct gs2971_priv *gs = s->priv;
struct sensor_data *sensor = &gs->sensor;
pr_debug("-> In function %s\n", __func__);
if (fmt->index > 0)
return -EINVAL;
fmt->pixelformat = sensor->pix.pixelformat; //gs->pix.pixelformat;
return 0;
}
/*!
* ioctl_init - V4L2 sensor interface handler for VIDIOC_INT_INIT
* @s: pointer to standard V4L2 device structure
*/
static int ioctl_init(struct v4l2_int_device *s)
{
pr_debug("-> In function %s\n", __func__);
return 0;
}
/*!
* ioctl_dev_init - V4L2 sensor interface handler for vidioc_int_dev_init_num
* @s: pointer to standard V4L2 device structure
*
* Initialise the device when slave attaches to the master.
*/
static int ioctl_dev_init(struct v4l2_int_device *s)
{
pr_debug("-> In function %s\n", __func__);
return 0;
}
/*!
* This structure defines all the ioctls for this module.
*/
static struct v4l2_int_ioctl_desc gs2971_ioctl_desc[] = {
{vidioc_int_dev_init_num, (v4l2_int_ioctl_func *) ioctl_dev_init},
{vidioc_int_s_power_num, (v4l2_int_ioctl_func *) ioctl_s_power},
{vidioc_int_g_ifparm_num, (v4l2_int_ioctl_func *) ioctl_g_ifparm},
{vidioc_int_init_num, (v4l2_int_ioctl_func *) ioctl_init},
/*!
* VIDIOC_ENUM_FMT ioctl for the CAPTURE buffer type.
*/
{vidioc_int_enum_fmt_cap_num,
(v4l2_int_ioctl_func *) ioctl_enum_fmt_cap},
{vidioc_int_g_fmt_cap_num, (v4l2_int_ioctl_func *) ioctl_g_fmt_cap},
{vidioc_int_g_parm_num, (v4l2_int_ioctl_func *) ioctl_g_parm},
{vidioc_int_s_parm_num, (v4l2_int_ioctl_func *) ioctl_s_parm},
{vidioc_int_queryctrl_num, (v4l2_int_ioctl_func *) ioctl_queryctrl},
{vidioc_int_g_ctrl_num, (v4l2_int_ioctl_func *) ioctl_g_ctrl},
{vidioc_int_s_ctrl_num, (v4l2_int_ioctl_func *) ioctl_s_ctrl},
{vidioc_int_enum_framesizes_num,
(v4l2_int_ioctl_func *) ioctl_enum_framesizes},
{vidioc_int_g_chip_ident_num,
(v4l2_int_ioctl_func *) ioctl_g_chip_ident},
};
static struct v4l2_int_slave gs2971_slave = {
.ioctls = gs2971_ioctl_desc,
.num_ioctls = ARRAY_SIZE(gs2971_ioctl_desc),
};
static struct v4l2_int_device gs2971_int_device = {
.module = THIS_MODULE,
.name = "gs2971",
.type = v4l2_int_type_slave,
.u = {
.slave = &gs2971_slave,
},
};
/*!
* GS2971 SPI probe function.
* Function set in spi_driver struct.
* Called by insmod.
*
* @param *spi SPI device descriptor.
*
* @return Error code indicating success or failure.
*/
static int gs2971_probe(struct spi_device *spi)
{
struct v4l2_subdev *sd;
struct v4l2_subdev_ops *ops;
struct device *dev = &spi->dev;
struct gs2971_priv *gs;
struct sensor_data *sensor;
struct pinctrl_state *pins;
int ret = 0;
pr_debug("-> In function %s\n", __func__);
gs = kzalloc(sizeof(*gs), GFP_KERNEL);
if (!gs)
return -ENOMEM;
/* Allocate driver data */
spidata = kzalloc(sizeof(*spidata), GFP_KERNEL);
if (!spidata) {
ret = -ENOMEM;
goto exit;
}
/* Initialize the driver data */
spidata->spi = spi;
mutex_init(&spidata->buf_lock);
sensor = &gs->sensor;
/* Set initial values for the sensor struct. */
memset(gs, 0, sizeof(*gs));
ret = of_property_read_u32(dev->of_node, "mclk", &sensor->mclk);
dev_err(dev, "mclk=%x\n",sensor->mclk);
if (ret) {
dev_err(dev, "mclk missing or invalid\n");
goto exit;
}
ret = of_property_read_u32(dev->of_node, "ipu", &sensor->ipu_id);
dev_err(dev, "ipu=%x\n",sensor->ipu_id);
if (ret) {
dev_err(dev, "ipu missing or invalid\n");
//goto exit;
}
ret = of_property_read_u32(dev->of_node, "csi", &sensor->csi);
if (ret) {
dev_err(dev, "csi missing or invalid\n");
goto exit;
}
ret = of_property_read_u32(dev->of_node, "cea861", &gs->cea861);
if (ret) {
dev_err(dev, "cea861 missing or invalid\n");
goto exit;
}
pr_info("%s:cea861=%d\n", __func__, gs->cea861);
/*gs->pinctrl = devm_pinctrl_get(dev);
if (IS_ERR(gs->pinctrl)) {
ret = PTR_ERR(gs->pinctrl);
dev_err(dev, "pinctrl missing or invalid\n");
goto exit;
}
pins = pinctrl_lookup_state(gs->pinctrl, gs->cea861 ? "cea861" : "no_cea861");
if (IS_ERR(pins)) {
ret = PTR_ERR(pins);
dev_err(dev, "pinctrl lookup state missing or invalid\n");
goto exit;
}
ret = pinctrl_select_state(gs->pinctrl, pins);
if (ret)
{
dev_err(dev, "pinctrl select state missing or invalid\n");
goto exit;
}*/
sensor->pix.pixelformat = YUV_FORMAT(gs);
sensor->pix.width = gs2971_res[gs2971_mode_default].width;
sensor->pix.height = gs2971_res[gs2971_mode_default].height;
sensor->streamcap.capability = V4L2_MODE_HIGHQUALITY |
V4L2_CAP_TIMEPERFRAME;
sensor->streamcap.capturemode = 0;
sensor->streamcap.timeperframe.denominator = DEFAULT_FPS;
sensor->streamcap.timeperframe.numerator = 1;
//sensor->pix.priv = 1; /* 1 is used to indicate TV in */
/*ret = gs2971_get_gpios(gs, dev);
if (ret)
{
dev_err(dev, "get gpio missing or invalid\n");
goto exit;
}*/
power_control(gs, 1);
gs2971_int_device.priv = gs;
ret = gs2971_initialize(gs, spi);
if (ret)
{
dev_err(dev, "gs2971 init missing or invalid\n");
goto exit;
}
power_control(gs, 0);
ret = v4l2_int_device_register(&gs2971_int_device);
v4l2_subdev_init(sd, ops);
ret = v4l2_async_register_subdev(sd);
exit:
if (ret) {
kfree(spidata);
kfree(gs);
pr_err("gs2971_probe returns %d\n", ret);
}
return ret;
}
static int gs2971_remove(struct spi_device *spi)
{
struct v4l2_subdev *sd;
pr_debug("-> In function %s\n", __func__);
kfree(gs2971_int_device.priv);
kfree(spidata);
v4l2_int_device_unregister(&gs2971_int_device);
v4l2_async_unregister_subdev(sd);
return 0;
}
static const struct of_device_id gs2971_dt_ids[] = {
{
.compatible = "gn,gs2971",
}, {
/* sentinel */
}
};
MODULE_DEVICE_TABLE(of, gs2971_dt_ids);
static struct spi_driver gs2971_spi = {
.driver = {
.name = DRIVER_NAME,
.bus = &spi_bus_type,
.owner = THIS_MODULE,
.of_match_table = gs2971_dt_ids,
},
.probe = gs2971_probe,
.remove = gs2971_remove,
};
/*!
* gs2971 init function.
* Called on insmod.
*
* @return Error code indicating success or failure.
*/
static int __init gs2971_init(void)
{
int ret;
pr_debug("-> In function %s\n", __func__);
ret = spi_register_driver(&gs2971_spi);
return ret;
}
/*!
* gs2971 cleanup function.
* Called on rmmod.
*
* @return Error code indicating success or failure.
*/
static void __exit gs2971_exit(void)
{
pr_debug("-> In function %s\n", __func__);
spi_unregister_driver(&gs2971_spi);
}
module_init(gs2971_init);
module_exit(gs2971_exit);
MODULE_DESCRIPTION("gs2971 video input Driver");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0");
MODULE_ALIAS("CSI");
U-Boot 2019.01 (Nov 16 2021 - 15:24:57 +0530) CPU : DRA752-GP ES2.0 Model: TI AM5728 BeagleBoard-X15 Board: CARAVEL-DECODER AM572x EVM REV DRAM: 1 GiB MMC: OMAP SD/MMC: 0 Loading Environment from FAT... *** Warning - bad CRC, using default environment Loading Environment from MMC... MMC Device 1 not found *** Warning - No MMC card found, using default environment Warning: fastboot.board_rev: unknown board revision invalid mmc device Net: Warning: ethernet@48484000 using MAC address from ROM eth0: ethernet@48484000 Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device SD/MMC found on device 0 ** Unable to read file boot.scr ** 1490 bytes read in 1 ms (1.4 MiB/s) Loaded env from uEnv.txt Importing environment from mmc0 ... Running uenvcmd ... 1 bytes read in 3 ms (0 Bytes/s) Already setup. switch to partitions #0, OK mmc0 is current device SD/MMC found on device 0 4440576 bytes read in 197 ms (21.5 MiB/s) 135414 bytes read in 8 ms (16.1 MiB/s) ## Flattened Device Tree blob at 88000000 Booting using the fdt blob at 0x88000000 Loading Device Tree to 8ffdb000, end 8ffff0f5 ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.19.59-g5f8c1c6121 (root@ubuntu-OptiPlex-3040) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #32 SMP PREEMPT Tue Nov 16 17:22:10 IST 2021 [ 0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache [ 0.000000] OF: fdt: Machine model: TI AM5728 EVM [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] efi: Getting EFI parameters from FDT: [ 0.000000] efi: UEFI not found. [ 0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB [ 0.000000] OF: reserved mem: initialized node ipu2-memory@95800000, compatible id shared-dma-pool [ 0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 64 MiB [ 0.000000] OF: reserved mem: initialized node dsp1-memory@99000000, compatible id shared-dma-pool [ 0.000000] Reserved memory: created CMA memory pool at 0x000000009d000000, size 32 MiB [ 0.000000] OF: reserved mem: initialized node ipu1-memory@9d000000, compatible id shared-dma-pool [ 0.000000] Reserved memory: created CMA memory pool at 0x000000009f000000, size 8 MiB [ 0.000000] OF: reserved mem: initialized node dsp2-memory@9f000000, compatible id shared-dma-pool [ 0.000000] cma: Reserved 24 MiB at 0x00000000be400000 [ 0.000000] OMAP4: Map 0x00000000bfd00000 to (ptrval) for dram barrier [ 0.000000] DRA752 ES2.0 [ 0.000000] random: get_random_bytes called from start_kernel+0xc0/0x47c with crng_init=0 [ 0.000000] percpu: Embedded 16 pages/cpu s36492 r8192 d20852 u65536 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 259648 [ 0.000000] Kernel command line: console=ttyS2,115200n8 root=PARTUUID=3d843c32-02 rw rootfstype=ext4 rootwait [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Memory: 829144K/1045504K available (10240K kernel code, 336K rwdata, 2792K rodata, 2048K init, 276K bss, 27944K reserved, 188416K cma-reserved, 234496K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB) [ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (12256 kB) [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (2048 kB) [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 337 kB) [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 277 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] Tasks RCU enabled. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] GIC: Using split EOI/Deactivate mode [ 0.000000] OMAP clockevent source: timer1 at 32786 Hz [ 0.000000] arch_timer: cp15 timer(s) running at 6.14MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_idle_ns: 440795202250 ns [ 0.000005] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps every 4398046511023ns [ 0.000018] Switching to timer-based delay loop, resolution 162ns [ 0.000922] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns [ 0.000932] OMAP clocksource: 32k_counter at 32768 Hz [ 0.002457] Console: colour dummy device 80x30 [ 0.002502] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475) [ 0.002521] pid_max: default: 32768 minimum: 301 [ 0.002644] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.002661] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.003247] CPU: Testing write buffer coherency: ok [ 0.003288] CPU0: Spectre v2: using ICIALLU workaround [ 0.003515] /cpus/cpu@0 missing clock-frequency property [ 0.003536] /cpus/cpu@1 missing clock-frequency property [ 0.003550] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.059895] Setting up static identity map for 0x80200000 - 0x80200060 [ 0.079902] rcu: Hierarchical SRCU implementation. [ 0.100092] EFI services will not be available. [ 0.119963] smp: Bringing up secondary CPUs ... [ 0.200298] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.200304] CPU1: Spectre v2: using ICIALLU workaround [ 0.200427] smp: Brought up 1 node, 2 CPUs [ 0.200439] SMP: Total of 2 processors activated (24.59 BogoMIPS). [ 0.200448] CPU: All CPU(s) started in HYP mode. [ 0.200456] CPU: Virtualization extensions available. [ 0.200961] devtmpfs: initialized [ 0.221881] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0 [ 0.222149] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.222169] futex hash table entries: 512 (order: 3, 32768 bytes) [ 0.225410] pinctrl core: initialized pinctrl subsystem [ 0.225942] DMI not present or invalid. [ 0.226234] NET: Registered protocol family 16 [ 0.227398] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.228353] omap_hwmod: l3_main_2 using broken dt data from ocp [ 0.420538] cpuidle: using governor ladder [ 0.420574] cpuidle: using governor menu [ 0.431235] OMAP GPIO hardware version 0.1 [ 0.455907] No ATAGs? [ 0.455982] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.455998] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.456564] omap4_sram_init:Unable to allocate sram needed to handle errata I688 [ 0.456577] omap4_sram_init:Unable to get sram pool needed to handle errata I688 [ 0.457221] OMAP DMA hardware revision 0.0 [ 0.468952] edma 43300000.edma: memcpy is disabled [ 0.472490] edma 43300000.edma: TI EDMA DMA engine driver [ 0.479696] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported) [ 0.481070] evm_5v0: supplied by main_12v0 [ 0.481458] com_3v6: supplied by evm_5v0 [ 0.484514] omap-iommu 40d01000.mmu: 40d01000.mmu registered [ 0.484697] omap-iommu 40d02000.mmu: 40d02000.mmu registered [ 0.484948] omap-iommu 58882000.mmu: 58882000.mmu registered [ 0.485184] omap-iommu 55082000.mmu: 55082000.mmu registered [ 0.485555] omap-iommu 41501000.mmu: 41501000.mmu registered [ 0.485726] omap-iommu 41502000.mmu: 41502000.mmu registered [ 0.486002] iommu: Adding device 58820000.ipu to group 1 [ 0.486089] iommu: Adding device 55020000.ipu to group 2 [ 0.486226] iommu: Adding device 40800000.dsp to group 0 [ 0.486472] iommu: Adding device 41000000.dsp to group 3 [ 0.487694] SCSI subsystem initialized [ 0.488765] palmas 0-0058: Irq flag is 0x00000008 [ 0.512795] palmas 0-0058: Muxing GPIO 2f, PWM 0, LED 0 [ 0.514399] SMPS12: supplied by regulator-dummy [ 0.516072] SMPS3: supplied by regulator-dummy [ 0.517743] SMPS45: supplied by regulator-dummy [ 0.519556] SMPS6: supplied by regulator-dummy [ 0.520971] SMPS7: supplied by regulator-dummy [ 0.522362] SMPS8: supplied by regulator-dummy [ 0.523617] SMPS9: supplied by regulator-dummy [ 0.524309] LDO1: supplied by regulator-dummy [ 0.531045] random: fast init done [ 0.531314] LDO2: supplied by regulator-dummy [ 0.541173] LDO3: supplied by regulator-dummy [ 0.551174] LDO4: supplied by regulator-dummy [ 0.561199] LDO5: supplied by regulator-dummy [ 0.561895] LDO6: supplied by regulator-dummy [ 0.562589] LDO7: supplied by regulator-dummy [ 0.563279] LDO8: supplied by regulator-dummy [ 0.563969] LDO9: supplied by regulator-dummy [ 0.571234] LDOLN: supplied by regulator-dummy [ 0.581252] LDOUSB: supplied by regulator-dummy [ 0.593297] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz [ 0.593872] omap_i2c 4807c000.i2c: bus 4 rev0.12 at 400 kHz [ 0.594090] media: Linux media interface: v0.10 [ 0.594130] videodev: Linux video capture interface: v2.00 [ 0.594206] pps_core: LinuxPPS API ver. 1 registered [ 0.594215] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.594236] PTP clock support registered [ 0.594271] EDAC MC: Ver: 3.0.0 [ 0.595285] Advanced Linux Sound Architecture Driver Initialized. [ 0.596056] clocksource: Switched to clocksource arch_sys_counter [ 0.604247] NET: Registered protocol family 2 [ 0.604827] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes) [ 0.604856] TCP established hash table entries: 8192 (order: 3, 32768 bytes) [ 0.604920] TCP bind hash table entries: 8192 (order: 4, 65536 bytes) [ 0.605047] TCP: Hash tables configured (established 8192 bind 8192) [ 0.605123] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 0.605159] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 0.605290] NET: Registered protocol family 1 [ 0.625732] RPC: Registered named UNIX socket transport module. [ 0.625744] RPC: Registered udp transport module. [ 0.625753] RPC: Registered tcp transport module. [ 0.625762] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.626844] hw perfevents: no interrupt-affinity property for /pmu, guessing. [ 0.627065] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available [ 0.628037] Initialise system trusted keyrings [ 0.628169] workingset: timestamp_bits=14 max_order=18 bucket_order=4 [ 0.632998] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.643491] NFS: Registering the id_resolver key type [ 0.643513] Key type id_resolver registered [ 0.643522] Key type id_legacy registered [ 0.643564] ntfs: driver 2.1.32 [Flags: R/O]. [ 0.645172] Key type asymmetric registered [ 0.645184] Asymmetric key parser 'x509' registered [ 0.645233] bounce: pool size: 64 pages [ 0.645267] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245) [ 0.645278] io scheduler noop registered [ 0.645288] io scheduler deadline registered [ 0.645390] io scheduler cfq registered (default) [ 0.645401] io scheduler mq-deadline registered [ 0.645411] io scheduler kyber registered [ 0.651317] pinctrl-single 4a003400.pinmux: 282 pins, size 1128 [ 0.655479] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.1 [ 0.655741] dra7-pcie 51000000.pcie: WA for Errata i870 not applied [ 0.655836] dra7-pcie 51000000.pcie: host bridge /ocp/axi@0/pcie@51000000 ranges: [ 0.655878] dra7-pcie 51000000.pcie: IO 0x20003000..0x20012fff -> 0x00000000 [ 0.655905] dra7-pcie 51000000.pcie: MEM 0x20013000..0x2fffffff -> 0x20013000 [ 1.656195] dra7-pcie 51000000.pcie: Phy link never came up [ 1.656327] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00 [ 1.656342] pci_bus 0000:00: root bus resource [bus 00-ff] [ 1.656355] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] [ 1.656366] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff] [ 1.663077] PCI: bus0: Fast back to back transfers disabled [ 1.669428] PCI: bus1: Fast back to back transfers enabled [ 1.669473] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff 64bit] [ 1.669493] pci 0000:00:00.0: PCI bridge to [bus 01-ff] [ 1.669823] pcieport 0000:00:00.0: Signaling PME with IRQ 166 [ 1.669960] pcieport 0000:00:00.0: AER enabled with IRQ 166 [ 1.671069] pwm-backlight backlight: backlight supply power not found, using dummy regulator [ 1.671144] pwm-backlight backlight: Linked as a consumer to regulator.0 [ 1.674275] vdd_3v3: supplied by regen1 [ 1.674509] aic_dvdd_fixed: supplied by vdd_3v3 [ 1.674575] vtt_fixed: supplied by smps3 [ 1.719057] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled [ 1.722625] console [ttyS2] disabled [ 1.722682] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 45, base_baud = 3000000) is a 8250 [ 2.828322] console [ttyS2] enabled [ 2.832726] 48422000.serial: ttyS7 at MMIO 0x48422000 (irq = 46, base_baud = 3000000) is a 8250 [ 2.843917] omap_rng 48090000.rng: Random Number Generator ver. 20 [ 2.844242] random: crng init done [ 2.851070] omapdss_dss 58000000.dss: 58000000.dss supply vdda_video not found, using dummy regulator [ 2.862941] omapdss_dss 58000000.dss: Linked as a consumer to regulator.0 [ 2.869987] omapdss_dss 58000000.dss: Dropping the link to regulator.0 [ 2.882031] panel-simple display: display supply power not found, using dummy regulator [ 2.890142] panel-simple display: Linked as a consumer to regulator.0 [ 2.904875] brd: module loaded [ 2.914404] loop: module loaded [ 2.922212] libphy: Fixed MDIO Bus: probed [ 2.986081] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000 [ 2.993775] libphy: 48485000.mdio: probed [ 3.001518] mdio_bus 48485000.mdio: MDIO device at address 2 is missing. [ 3.008275] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver Micrel KSZ9031 Gigabit PHY [ 3.018527] cpsw 48484000.ethernet: Detected MACID = 88:3f:4a:bc:56:06 [ 3.025123] cpsw 48484000.ethernet: initialized cpsw ale version 1.4 [ 3.031524] cpsw 48484000.ethernet: ALE Table size 1024 [ 3.036835] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies) [ 3.044823] cpsw 48484000.ethernet: cpsw: Detected MACID = 88:3f:4a:bc:56:07 [ 3.053111] i2c /dev entries driver [ 3.057532] gs2971 spi3.2: mclk=19bfcc0 [ 3.061389] gs2971 spi3.2: ipu=0 [ 3.064631] gs2971 spi3.2: ipu missing or invalid [ 3.069375] gs2971_probe:cea861=0 [ 3.072709] gs2971_gpio_state: active=0, standby-gpios(0)=0x0 [ 4.156267] gs2971 spi3.2: status=0, read value of 0x000000c0, expected 0x000000c0 [ 4.164263] gs2971 spi3.2: register 00 = 000000c0 [ 4.169075] gs2971 spi3.2: register 01 = 00000000 [ 4.173867] gs2971 spi3.2: register 02 = 00000000 [ 4.178680] gs2971 spi3.2: register 03 = 00000000 [ 4.183473] gs2971 spi3.2: register 04 = 00000000 [ 4.188284] gs2971 spi3.2: register 05 = 00004210 [ 4.193077] gs2971 spi3.2: register 06 = 00001dff [ 4.197888] gs2971 spi3.2: register 07 = 00001dff [ 4.202681] gs2971 spi3.2: register 08 = 00000820 [ 4.207505] gs2971 spi3.2: register 09 = 00001883 [ 4.212298] gs2971 spi3.2: register 0a = 00000000 [ 4.217109] gs2971 spi3.2: register 0b = 00000000 [ 4.221903] gs2971 spi3.2: register 0c = 00000000 [ 4.226713] gs2971 spi3.2: register 0d = 00000000 [ 4.231504] gs2971 spi3.2: register 0e = 00000000 [ 4.236316] gs2971 spi3.2: register 0f = 00000000 [ 4.241121] gs2971 spi3.2: register 10 = 00000000 [ 4.245911] gs2971 spi3.2: register 11 = 00000000 [ 4.250722] gs2971 spi3.2: register 12 = 00000000 [ 4.255515] gs2971 spi3.2: register 13 = 00000000 [ 4.260325] gs2971 spi3.2: register 14 = 00000000 [ 4.265118] gs2971 spi3.2: register 15 = 00000000 [ 4.269927] gs2971 spi3.2: register 16 = 00000000 [ 4.274732] gs2971 spi3.2: register 17 = 00000000 [ 4.279555] gs2971 spi3.2: register 18 = 00000000 [ 4.284346] gs2971 spi3.2: register 19 = 00000000 [ 4.289159] gs2971 spi3.2: register 1a = 00000000 [ 4.293952] gs2971 spi3.2: register 1b = 00000000 [ 4.298763] gs2971 spi3.2: register 1c = 00000000 [ 4.303554] gs2971 spi3.2: register 1d = 00000000 [ 4.308364] gs2971 spi3.2: register 1e = 00000000 [ 4.313155] gs2971 spi3.2: register 1f = 00000000 [ 4.317965] gs2971 spi3.2: register 20 = 00000000 [ 4.322758] gs2971 spi3.2: register 21 = 00000000 [ 4.327581] gs2971 spi3.2: register 22 = 00000000 [ 4.332373] gs2971 spi3.2: register 23 = 00000000 [ 4.337181] gs2971 spi3.2: register 24 = 00000004 [ 4.341973] gs2971 spi3.2: register 25 = 00000040 [ 4.346717] gs2971_gpio_state: active=1, standby-gpios(0)=0x1 [ 4.352501] Unable to handle kernel NULL pointer dereference at virtual address 000000a8 [ 4.360643] pgd = ed0fa042 [ 4.363361] [000000a8] *pgd=80000080004003, *pmd=00000000 [ 4.368810] Internal error: Oops: 206 [#1] PREEMPT SMP ARM [ 4.374317] Modules linked in: [ 4.377391] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.59-g5f8c1c6121 #32 [ 4.384556] Hardware name: Generic DRA74X (Flattened Device Tree) [ 4.390685] PC is at v4l2_async_register_subdev+0xc/0x1c8 [ 4.396111] LR is at gs2971_probe+0x3f0/0x418 [ 4.400485] pc : [<c07d3f34>] lr : [<c07e569c>] psr: 60000013 [ 4.406779] sp : ef08fd28 ip : ef08fd50 fp : ef08fd4c [ 4.412025] r10: c0e4491c r9 : c0e44950 r8 : 00000026 [ 4.417271] r7 : c1204c48 r6 : c1290d1c r5 : ee4cd000 r4 : ee456400 [ 4.423826] r3 : ef098000 r2 : 00000000 r1 : 00000000 r0 : 00000000 [ 4.430382] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 4.437547] Control: 30c5387d Table: 80003000 DAC: fffffffd [ 4.443318] Process swapper/0 (pid: 1, stack limit = 0xcb1acf53) [ 4.449351] Stack: (0xef08fd28 to 0xef090000) [ 4.453728] fd20: ee456400 ee4cd000 c1290d1c c1204c48 00000026 c0e44950 [ 4.461943] fd40: ef08fd8c ef08fd50 c07e569c c07d3f34 000000c0 c03c6850 00010040 fc08bb2e [ 4.470158] fd60: 00000000 ee456400 00000000 c124296c 00000000 00000000 c124297c 00000000 [ 4.478372] fd80: ef08fdac ef08fd90 c074b6ec c07e52b8 c128f2b0 ee456400 c128f2b4 00000000 [ 4.486585] fda0: ef08fddc ef08fdb0 c06b2f90 c074b674 00000000 ee456400 c124297c ee456434 [ 4.494799] fdc0: c06b3308 00000000 c104c834 c10626e0 ef08fe14 ef08fde0 c06b31f0 c06b2d98 [ 4.503013] fde0: c084d890 c084b6b0 ef08fe14 ef08fdf8 ee456400 c124297c ee456434 c06b3308 [ 4.511227] fe00: 00000000 c104c834 ef08fe34 ef08fe18 c06b33ec c06b3194 eeb3fbb4 c1204c48 [ 4.519441] fe20: c124297c c06b3308 ef08fe64 ef08fe38 c06b1080 c06b3314 ef08fe70 ef209958 [ 4.527654] fe40: eeb3fbb4 fc08bb2e c124297c c123c358 ee4cb100 00000000 ef08fe74 ef08fe68 [ 4.535868] fe60: c06b28c8 c06b1010 ef08fe9c ef08fe78 c06b2364 c06b28b0 c0e449a4 ef08fe88 [ 4.544080] fe80: c124297c c1204c48 ffffe000 c102e05c ef08feb4 ef08fea0 c06b3dd0 c06b21ac [ 4.552294] fea0: c1254100 c1204c48 ef08fec4 ef08feb8 c074b628 c06b3d60 ef08fed4 ef08fec8 [ 4.560508] fec0: c102e074 c074b5d4 ef08ff4c ef08fed8 c02025b8 c102e068 00000000 c0dd2c7c [ 4.568722] fee0: c0dd2c5c c0dd2c00 c0ddeafc c1204c48 00000000 c0dd2c34 00000006 00000006 [ 4.576935] ff00: 00000000 c0e37e9c c10004f0 c0eb8b44 ef08ff34 ef658044 00000000 fc08bb2e [ 4.585150] ff20: 00000000 fc08bb2e c1254100 00000007 c1254100 c1254100 c10004f0 c104c854 [ 4.593362] ff40: ef08ff94 ef08ff50 c1000ff4 c0202540 00000006 00000006 00000000 c10004f0 [ 4.601576] ff60: c0eb8b44 000000e7 ffffe000 00000000 c0a1c518 00000000 00000000 00000000 [ 4.609789] ff80: 00000000 00000000 ef08ffac ef08ff98 c0a1c528 c1000e3c 00000000 c0a1c518 [ 4.618002] ffa0: 00000000 ef08ffb0 c02010d8 c0a1c524 00000000 00000000 00000000 00000000 [ 4.626216] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 4.634429] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 4.642637] Backtrace: [ 4.645104] [<c07d3f28>] (v4l2_async_register_subdev) from [<c07e569c>] (gs2971_probe+0x3f0/0x418) [ 4.654105] r9:c0e44950 r8:00000026 r7:c1204c48 r6:c1290d1c r5:ee4cd000 r4:ee456400 [ 4.661891] [<c07e52ac>] (gs2971_probe) from [<c074b6ec>] (spi_drv_probe+0x84/0xa8) [ 4.669584] r10:00000000 r9:c124297c r8:00000000 r7:00000000 r6:c124296c r5:00000000 [ 4.677447] r4:ee456400 [ 4.679998] [<c074b668>] (spi_drv_probe) from [<c06b2f90>] (really_probe+0x204/0x2c0) [ 4.687863] r7:00000000 r6:c128f2b4 r5:ee456400 r4:c128f2b0 [ 4.693552] [<c06b2d8c>] (really_probe) from [<c06b31f0>] (driver_probe_device+0x68/0x180) [ 4.701855] r10:c10626e0 r9:c104c834 r8:00000000 r7:c06b3308 r6:ee456434 r5:c124297c [ 4.709718] r4:ee456400 r3:00000000 [ 4.713313] [<c06b3188>] (driver_probe_device) from [<c06b33ec>] (__driver_attach+0xe4/0xe8) [ 4.721788] r9:c104c834 r8:00000000 r7:c06b3308 r6:ee456434 r5:c124297c r4:ee456400 [ 4.729570] [<c06b3308>] (__driver_attach) from [<c06b1080>] (bus_for_each_dev+0x7c/0xbc) [ 4.737784] r7:c06b3308 r6:c124297c r5:c1204c48 r4:eeb3fbb4 [ 4.743471] [<c06b1004>] (bus_for_each_dev) from [<c06b28c8>] (driver_attach+0x24/0x28) [ 4.751510] r7:00000000 r6:ee4cb100 r5:c123c358 r4:c124297c [ 4.757198] [<c06b28a4>] (driver_attach) from [<c06b2364>] (bus_add_driver+0x1c4/0x208) [ 4.765241] [<c06b21a0>] (bus_add_driver) from [<c06b3dd0>] (driver_register+0x7c/0x110) [ 4.773367] r7:c102e05c r6:ffffe000 r5:c1204c48 r4:c124297c [ 4.779055] [<c06b3d54>] (driver_register) from [<c074b628>] (__spi_register_driver+0x60/0x64) [ 4.787703] r5:c1204c48 r4:c1254100 [ 4.791298] [<c074b5c8>] (__spi_register_driver) from [<c102e074>] (gs2971_init+0x18/0x20) [ 4.799604] [<c102e05c>] (gs2971_init) from [<c02025b8>] (do_one_initcall+0x84/0x1b0) [ 4.807474] [<c0202534>] (do_one_initcall) from [<c1000ff4>] (kernel_init_freeable+0x1c4/0x258) [ 4.816212] r8:c104c854 r7:c10004f0 r6:c1254100 r5:c1254100 r4:00000007 [ 4.822948] [<c1000e30>] (kernel_init_freeable) from [<c0a1c528>] (kernel_init+0x10/0x11c) [ 4.831251] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0a1c518 [ 4.839112] r4:00000000 [ 4.841659] [<c0a1c518>] (kernel_init) from [<c02010d8>] (ret_from_fork+0x14/0x3c) [ 4.849260] Exception stack(0xef08ffb0 to 0xef08fff8) [ 4.854333] ffa0: 00000000 00000000 00000000 00000000 [ 4.862546] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 4.870758] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 4.877400] r5:c0a1c518 r4:00000000 [ 4.880993] Code: e89da830 e1a0c00d e92ddbf0 e24cb004 (e59030a8) [ 4.887155] ---[ end trace 9b4c4574316da2dc ]--- [ 4.891807] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 4.891807] [ 4.900990] CPU1: stopping [ 4.903715] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 4.19.59-g5f8c1c6121 #32 [ 4.912276] Hardware name: Generic DRA74X (Flattened Device Tree) [ 4.918394] Backtrace: [ 4.920862] [<c020ca34>] (dump_backtrace) from [<c020cd6c>] (show_stack+0x18/0x1c) [ 4.928467] r7:ef0c5f08 r6:60000193 r5:00000000 r4:c12509dc [ 4.934156] [<c020cd54>] (show_stack) from [<c0a082a0>] (dump_stack+0x90/0xa4) [ 4.941414] [<c0a08210>] (dump_stack) from [<c020f6b8>] (handle_IPI+0x1b0/0x1dc) [ 4.948843] r7:ef0c5f08 r6:00000001 r5:00000000 r4:c106acfc [ 4.954532] [<c020f508>] (handle_IPI) from [<c05513e4>] (gic_handle_irq+0x7c/0x80) [ 4.962135] r6:fa212000 r5:fa21200c r4:c1205100 [ 4.966775] [<c0551368>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x8c) [ 4.974289] Exception stack(0xef0c5f08 to 0xef0c5f50) [ 4.979364] 5f00: 00000000 00000614 ef64950c c021a960 ffffe000 c1204c7c [ 4.987578] 5f20: c1204cc4 00000002 00000000 00000000 c106a4f0 ef0c5f64 ef0c5f68 ef0c5f58 [ 4.995791] 5f40: c0208ea8 c0208eac 60000013 ffffffff [ 5.000866] r9:ef0c4000 r8:00000000 r7:ef0c5f3c r6:ffffffff r5:60000013 r4:c0208eac [ 5.008649] [<c0208e6c>] (arch_cpu_idle) from [<c0a2222c>] (default_idle_call+0x30/0x34) [ 5.016779] [<c0a221fc>] (default_idle_call) from [<c025a5e0>] (do_idle+0x20c/0x2b4) [ 5.024560] [<c025a3d4>] (do_idle) from [<c025a974>] (cpu_startup_entry+0x20/0x24) [ 5.032165] r10:00000000 r9:412fc0f2 r8:80007000 r7:c1254390 r6:00000001 r5:ef0c4000 [ 5.040026] r4:00000087 [ 5.042574] [<c025a954>] (cpu_startup_entry) from [<c020f25c>] (secondary_start_kernel+0x174/0x180) [ 5.051661] [<c020f0e8>] (secondary_start_kernel) from [<8020236c>] (0x8020236c) [ 5.059090] r7:c1254390 r6:30c0387d r5:00000000 r4:af077180 [ 5.064781] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 5.064781] ]---
without adding v4l2_subdev_init,v4l2_async_register_subdev but not showing the video1
U-Boot SPL 2019.01 (Nov 16 2021 - 15:24:57 +0530)
DRA752-GP ES2.0
Trying to boot from MMC1
no pinctrl state for default mode
no pinctrl state for default mode
Loading Environment from FAT... *** Warning - bad CRC, using default environment
Loading Environment from MMC... Card did not respond to voltage select!
*** Warning - No block device, using default environment
U-Boot 2019.01 (Nov 16 2021 - 15:24:57 +0530)
CPU : DRA752-GP ES2.0
Model: TI AM5728 BeagleBoard-X15
Board: CARAVEL-DECODER AM572x EVM REV
DRAM: 1 GiB
MMC: OMAP SD/MMC: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment
Loading Environment from MMC... MMC Device 1 not found
*** Warning - No MMC card found, using default environment
Warning: fastboot.board_rev: unknown board revision
invalid mmc device
Net:
Warning: ethernet@48484000 using MAC address from ROM
eth0: ethernet@48484000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Unable to read file boot.scr **
1490 bytes read in 1 ms (1.4 MiB/s)
Loaded env from uEnv.txt
Importing environment from mmc0 ...
Running uenvcmd ...
1 bytes read in 3 ms (0 Bytes/s)
Already setup.
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
4436480 bytes read in 197 ms (21.5 MiB/s)
135414 bytes read in 8 ms (16.1 MiB/s)
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ffdb000, end 8ffff0f5 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.19.59-g5f8c1c6121 (root@ubuntu-OptiPlex-3040) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #33 SMP PREEMPT Tue Nov 16 20:23:06 IST 2021
[ 0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt: Machine model: TI AM5728 EVM
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB
[ 0.000000] OF: reserved mem: initialized node ipu2-memory@95800000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 64 MiB
[ 0.000000] OF: reserved mem: initialized node dsp1-memory@99000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000009d000000, size 32 MiB
[ 0.000000] OF: reserved mem: initialized node ipu1-memory@9d000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000009f000000, size 8 MiB
[ 0.000000] OF: reserved mem: initialized node dsp2-memory@9f000000, compatible id shared-dma-pool
[ 0.000000] cma: Reserved 24 MiB at 0x00000000be400000
[ 0.000000] OMAP4: Map 0x00000000bfd00000 to (ptrval) for dram barrier
[ 0.000000] DRA752 ES2.0
[ 0.000000] random: get_random_bytes called from start_kernel+0xc0/0x47c with crng_init=0
[ 0.000000] percpu: Embedded 16 pages/cpu s36492 r8192 d20852 u65536
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 259648
[ 0.000000] Kernel command line: console=ttyS2,115200n8 root=PARTUUID=3d843c32-02 rw rootfstype=ext4 rootwait
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 829144K/1045504K available (10240K kernel code, 336K rwdata, 2792K rodata, 2048K init, 276K bss, 27944K reserved, 188416K cma-reserved, 234496K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (12256 kB)
[ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (2048 kB)
[ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 337 kB)
[ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 277 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] OMAP clockevent source: timer1 at 32786 Hz
[ 0.000000] arch_timer: cp15 timer(s) running at 6.14MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_idle_ns: 440795202250 ns
[ 0.000005] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps every 4398046511023ns
[ 0.000018] Switching to timer-based delay loop, resolution 162ns
[ 0.000906] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
[ 0.000915] OMAP clocksource: 32k_counter at 32768 Hz
[ 0.002419] Console: colour dummy device 80x30
[ 0.002467] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
[ 0.002484] pid_max: default: 32768 minimum: 301
[ 0.002608] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.002624] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.003208] CPU: Testing write buffer coherency: ok
[ 0.003249] CPU0: Spectre v2: using ICIALLU workaround
[ 0.003476] /cpus/cpu@0 missing clock-frequency property
[ 0.003497] /cpus/cpu@1 missing clock-frequency property
[ 0.003510] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.059890] Setting up static identity map for 0x80200000 - 0x80200060
[ 0.079899] rcu: Hierarchical SRCU implementation.
[ 0.100092] EFI services will not be available.
[ 0.119958] smp: Bringing up secondary CPUs ...
[ 0.200293] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.200299] CPU1: Spectre v2: using ICIALLU workaround
[ 0.200422] smp: Brought up 1 node, 2 CPUs
[ 0.200434] SMP: Total of 2 processors activated (24.59 BogoMIPS).
[ 0.200444] CPU: All CPU(s) started in HYP mode.
[ 0.200452] CPU: Virtualization extensions available.
[ 0.200958] devtmpfs: initialized
[ 0.221959] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
[ 0.222242] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.222260] futex hash table entries: 512 (order: 3, 32768 bytes)
[ 0.225545] pinctrl core: initialized pinctrl subsystem
[ 0.226075] DMI not present or invalid.
[ 0.226362] NET: Registered protocol family 16
[ 0.227533] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.228500] omap_hwmod: l3_main_2 using broken dt data from ocp
[ 0.421268] cpuidle: using governor ladder
[ 0.421304] cpuidle: using governor menu
[ 0.431868] OMAP GPIO hardware version 0.1
[ 0.456364] No ATAGs?
[ 0.456441] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.456456] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.457023] omap4_sram_init:Unable to allocate sram needed to handle errata I688
[ 0.457036] omap4_sram_init:Unable to get sram pool needed to handle errata I688
[ 0.457676] OMAP DMA hardware revision 0.0
[ 0.469374] edma 43300000.edma: memcpy is disabled
[ 0.472881] edma 43300000.edma: TI EDMA DMA engine driver
[ 0.480190] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
[ 0.481563] evm_5v0: supplied by main_12v0
[ 0.481952] com_3v6: supplied by evm_5v0
[ 0.485006] omap-iommu 40d01000.mmu: 40d01000.mmu registered
[ 0.485189] omap-iommu 40d02000.mmu: 40d02000.mmu registered
[ 0.485434] omap-iommu 58882000.mmu: 58882000.mmu registered
[ 0.485671] omap-iommu 55082000.mmu: 55082000.mmu registered
[ 0.486042] omap-iommu 41501000.mmu: 41501000.mmu registered
[ 0.486212] omap-iommu 41502000.mmu: 41502000.mmu registered
[ 0.486492] iommu: Adding device 58820000.ipu to group 1
[ 0.486577] iommu: Adding device 55020000.ipu to group 2
[ 0.486705] iommu: Adding device 40800000.dsp to group 0
[ 0.486938] iommu: Adding device 41000000.dsp to group 3
[ 0.488151] SCSI subsystem initialized
[ 0.489221] palmas 0-0058: Irq flag is 0x00000008
[ 0.512784] palmas 0-0058: Muxing GPIO 2f, PWM 0, LED 0
[ 0.514381] SMPS12: supplied by regulator-dummy
[ 0.516046] SMPS3: supplied by regulator-dummy
[ 0.517709] SMPS45: supplied by regulator-dummy
[ 0.519526] SMPS6: supplied by regulator-dummy
[ 0.520962] SMPS7: supplied by regulator-dummy
[ 0.522347] SMPS8: supplied by regulator-dummy
[ 0.523613] SMPS9: supplied by regulator-dummy
[ 0.524298] LDO1: supplied by regulator-dummy
[ 0.531163] random: fast init done
[ 0.531317] LDO2: supplied by regulator-dummy
[ 0.541164] LDO3: supplied by regulator-dummy
[ 0.551166] LDO4: supplied by regulator-dummy
[ 0.561187] LDO5: supplied by regulator-dummy
[ 0.561878] LDO6: supplied by regulator-dummy
[ 0.562582] LDO7: supplied by regulator-dummy
[ 0.563277] LDO8: supplied by regulator-dummy
[ 0.563965] LDO9: supplied by regulator-dummy
[ 0.571224] LDOLN: supplied by regulator-dummy
[ 0.581233] LDOUSB: supplied by regulator-dummy
[ 0.593280] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
[ 0.593880] omap_i2c 4807c000.i2c: bus 4 rev0.12 at 400 kHz
[ 0.594097] media: Linux media interface: v0.10
[ 0.594136] videodev: Linux video capture interface: v2.00
[ 0.594212] pps_core: LinuxPPS API ver. 1 registered
[ 0.594221] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.594243] PTP clock support registered
[ 0.594277] EDAC MC: Ver: 3.0.0
[ 0.595311] Advanced Linux Sound Architecture Driver Initialized.
[ 0.596077] clocksource: Switched to clocksource arch_sys_counter
[ 0.604237] NET: Registered protocol family 2
[ 0.604817] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[ 0.604847] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.604911] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.605037] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.605116] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.605152] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.605283] NET: Registered protocol family 1
[ 0.625726] RPC: Registered named UNIX socket transport module.
[ 0.625737] RPC: Registered udp transport module.
[ 0.625746] RPC: Registered tcp transport module.
[ 0.625754] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.626830] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[ 0.627052] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
[ 0.628016] Initialise system trusted keyrings
[ 0.628147] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[ 0.632953] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.643448] NFS: Registering the id_resolver key type
[ 0.643473] Key type id_resolver registered
[ 0.643482] Key type id_legacy registered
[ 0.643523] ntfs: driver 2.1.32 [Flags: R/O].
[ 0.645121] Key type asymmetric registered
[ 0.645133] Asymmetric key parser 'x509' registered
[ 0.645181] bounce: pool size: 64 pages
[ 0.645215] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 0.645226] io scheduler noop registered
[ 0.645235] io scheduler deadline registered
[ 0.645334] io scheduler cfq registered (default)
[ 0.645345] io scheduler mq-deadline registered
[ 0.645355] io scheduler kyber registered
[ 0.651225] pinctrl-single 4a003400.pinmux: 282 pins, size 1128
[ 0.655371] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.1
[ 0.655632] dra7-pcie 51000000.pcie: WA for Errata i870 not applied
[ 0.655724] dra7-pcie 51000000.pcie: host bridge /ocp/axi@0/pcie@51000000 ranges:
[ 0.655764] dra7-pcie 51000000.pcie: IO 0x20003000..0x20012fff -> 0x00000000
[ 0.655791] dra7-pcie 51000000.pcie: MEM 0x20013000..0x2fffffff -> 0x20013000
[ 1.656081] dra7-pcie 51000000.pcie: Phy link never came up
[ 1.656212] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00
[ 1.656227] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.656239] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 1.656251] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
[ 1.662864] PCI: bus0: Fast back to back transfers disabled
[ 1.669046] PCI: bus1: Fast back to back transfers enabled
[ 1.669090] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff 64bit]
[ 1.669109] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 1.669436] pcieport 0000:00:00.0: Signaling PME with IRQ 166
[ 1.669572] pcieport 0000:00:00.0: AER enabled with IRQ 166
[ 1.670689] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[ 1.670766] pwm-backlight backlight: Linked as a consumer to regulator.0
[ 1.673891] vdd_3v3: supplied by regen1
[ 1.674126] aic_dvdd_fixed: supplied by vdd_3v3
[ 1.674190] vtt_fixed: supplied by smps3
[ 1.718887] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
[ 1.722443] console [ttyS2] disabled
[ 1.722502] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 45, base_baud = 3000000) is a 8250
[ 2.828160] console [ttyS2] enabled
[ 2.832562] 48422000.serial: ttyS7 at MMIO 0x48422000 (irq = 46, base_baud = 3000000) is a 8250
[ 2.843743] omap_rng 48090000.rng: Random Number Generator ver. 20
[ 2.844058] random: crng init done
[ 2.850882] omapdss_dss 58000000.dss: 58000000.dss supply vdda_video not found, using dummy regulator
[ 2.862765] omapdss_dss 58000000.dss: Linked as a consumer to regulator.0
[ 2.869813] omapdss_dss 58000000.dss: Dropping the link to regulator.0
[ 2.881916] panel-simple display: display supply power not found, using dummy regulator
[ 2.890027] panel-simple display: Linked as a consumer to regulator.0
[ 2.904724] brd: module loaded
[ 2.914218] loop: module loaded
[ 2.922013] libphy: Fixed MDIO Bus: probed
[ 2.986102] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 2.993796] libphy: 48485000.mdio: probed
[ 3.001109] mdio_bus 48485000.mdio: MDIO device at address 2 is missing.
[ 3.007864] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver Micrel KSZ9031 Gigabit PHY
[ 3.018116] cpsw 48484000.ethernet: Detected MACID = 88:3f:4a:bc:56:06
[ 3.024714] cpsw 48484000.ethernet: initialized cpsw ale version 1.4
[ 3.031117] cpsw 48484000.ethernet: ALE Table size 1024
[ 3.036424] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies)
[ 3.044420] cpsw 48484000.ethernet: cpsw: Detected MACID = 88:3f:4a:bc:56:07
[ 3.052728] i2c /dev entries driver
[ 3.057133] gs2971 spi3.2: mclk=19bfcc0
[ 3.060991] gs2971 spi3.2: ipu=0
[ 3.064234] gs2971 spi3.2: ipu missing or invalid
[ 3.068977] gs2971_probe:cea861=0
[ 3.072311] gs2971_gpio_state: active=0, standby-gpios(0)=0x0
[ 4.156296] gs2971 spi3.2: status=0, read value of 0x000000c0, expected 0x000000c0
[ 4.164295] gs2971 spi3.2: register 00 = 000000c0
[ 4.169111] gs2971 spi3.2: register 01 = 00000000
[ 4.173904] gs2971 spi3.2: register 02 = 00000000
[ 4.178716] gs2971 spi3.2: register 03 = 00000000
[ 4.183510] gs2971 spi3.2: register 04 = 00000000
[ 4.188320] gs2971 spi3.2: register 05 = 00004210
[ 4.193126] gs2971 spi3.2: register 06 = 00001dff
[ 4.197939] gs2971 spi3.2: register 07 = 00001dff
[ 4.202731] gs2971 spi3.2: register 08 = 00000820
[ 4.207543] gs2971 spi3.2: register 09 = 00001883
[ 4.212335] gs2971 spi3.2: register 0a = 00000000
[ 4.217146] gs2971 spi3.2: register 0b = 00000000
[ 4.221937] gs2971 spi3.2: register 0c = 00000000
[ 4.226747] gs2971 spi3.2: register 0d = 00000000
[ 4.231539] gs2971 spi3.2: register 0e = 00000000
[ 4.236349] gs2971 spi3.2: register 0f = 00000000
[ 4.241141] gs2971 spi3.2: register 10 = 00000000
[ 4.245932] gs2971 spi3.2: register 11 = 00000000
[ 4.250743] gs2971 spi3.2: register 12 = 00000000
[ 4.255535] gs2971 spi3.2: register 13 = 00000000
[ 4.260359] gs2971 spi3.2: register 14 = 00000000
[ 4.265150] gs2971 spi3.2: register 15 = 00000000
[ 4.269961] gs2971 spi3.2: register 16 = 00000000
[ 4.274753] gs2971 spi3.2: register 17 = 00000000
[ 4.279576] gs2971 spi3.2: register 18 = 00000000
[ 4.284367] gs2971 spi3.2: register 19 = 00000000
[ 4.289179] gs2971 spi3.2: register 1a = 00000000
[ 4.293985] gs2971 spi3.2: register 1b = 00000000
[ 4.298795] gs2971 spi3.2: register 1c = 00000000
[ 4.303587] gs2971 spi3.2: register 1d = 00000000
[ 4.308396] gs2971 spi3.2: register 1e = 00000000
[ 4.313200] gs2971 spi3.2: register 1f = 00000000
[ 4.318011] gs2971 spi3.2: register 20 = 00000000
[ 4.322801] gs2971 spi3.2: register 21 = 00000000
[ 4.327610] gs2971 spi3.2: register 22 = 00008000
[ 4.332403] gs2971 spi3.2: register 23 = 00000000
[ 4.337227] gs2971 spi3.2: register 24 = 00000004
[ 4.342017] gs2971 spi3.2: register 25 = 00000040
[ 4.346762] gs2971_gpio_state: active=1, standby-gpios(0)=0x1
[ 4.354980] gpio-fan gpio_fan: GPIO fan initialized
[ 4.360587] tmp102 0-0048: error reading config register
[ 4.366023] tmp102: probe of 0-0048 failed with error -121
[ 4.374662] cpu cpu0: Linked as a consumer to regulator.8
[ 4.380202] cpu cpu0: Linked as a consumer to regulator.31
[ 4.387361] sdhci: Secure Digital Host Controller Interface driver
[ 4.393570] sdhci: Copyright(c) Pierre Ossman
[ 4.399404] sdhci-pltfm: SDHCI platform and OF driver helper
[ 4.405733] omap_gpio 4805d000.gpio: Could not set line 27 debounce to 200000 microseconds (-22)
[ 4.414566] sdhci-omap 4809c000.mmc: Got CD GPIO
[ 4.419387] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.30
[ 4.426252] sdhci-omap 4809c000.mmc: 4809c000.mmc supply vqmmc not found, using dummy regulator
[ 4.435019] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.0
[ 4.441814] sdhci-omap 4809c000.mmc: Dropping the link to regulator.0
[ 4.448494] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.15
[ 4.455443] sdhci-omap 4809c000.mmc: no pinctrl state for ddr_3_3v mode
[ 4.488965] mmc0: SDHCI controller on 4809c000.mmc [4809c000.mmc] using ADMA
[ 4.497154] sdhci-omap 480b4000.mmc: Linked as a consumer to regulator.5
[ 4.503984] sdhci-omap 480b4000.mmc: Dropping the link to regulator.5
[ 4.510754] sdhci-omap 480b4000.mmc: Linked as a consumer to regulator.5
[ 4.543579] mmc1: SDHCI controller on 480b4000.mmc [480b4000.mmc] using ADMA
[ 4.551232] sdhci-omap 480ad000.mmc: Linked as a consumer to regulator.1
[ 4.558046] sdhci-omap 480ad000.mmc: Dropping the link to regulator.1
[ 4.564591] sdhci-omap 480ad000.mmc: Linked as a consumer to regulator.2
[ 4.571531] sdhci-omap 480ad000.mmc: Linked as a consumer to regulator.1
[ 4.578066] mmc0: host does not support reading read-only switch, assuming write-enable
[ 4.578386] sdhci-omap 480ad000.mmc: no pinctrl state for sdr104 mode
[ 4.592846] sdhci-omap 480ad000.mmc: no pinctrl state for ddr50 mode
[ 4.599275] sdhci-omap 480ad000.mmc: no pinctrl state for hs200_1_8v mode
[ 4.608817] mmc0: new high speed SDHC card at address aaaa
[ 4.625007] mmcblk0: mmc0:aaaa SC32G 29.7 GiB
[ 4.629522] mmc2: SDHCI controller on 480ad000.mmc [480ad000.mmc] using PIO
[ 4.638689] ledtrig-cpu: registered to indicate activity on CPUs
[ 4.644912] mmcblk0: p1 p2
[ 4.653023] NET: Registered protocol family 10
[ 4.658198] Segment Routing with IPv6
[ 4.661928] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 4.668239] NET: Registered protocol family 17
[ 4.672882] Key type dns_resolver registered
[ 4.677294] Registering SWP/SWPB emulation handler
[ 4.682122] omap_voltage_late_init: Voltage driver support not added
[ 4.688537] Power Management for TI OMAP4+ devices.
[ 4.693961] Loading compiled-in X.509 certificates
[ 4.716572] dmm 4e000000.dmm: workaround for errata i878 in use
[ 4.723907] dmm 4e000000.dmm: initialized all PAT entries
[ 4.729971] omapdss_dss 58000000.dss: 58000000.dss supply vdda_video not found, using dummy regulator
[ 4.739326] omapdss_dss 58000000.dss: Linked as a consumer to regulator.0
[ 4.746327] DSS: OMAP DSS rev 6.1
[ 4.750563] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops)
[ 4.786494] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 4.793137] [drm] No driver support for vblank timestamp query.
[ 4.801896] [drm] Enabling DMM ywrap scrolling
[ 4.876885] Console: switching to colour frame buffer device 100x30
[ 4.885991] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
[ 4.892640] [drm] Initialized omapdrm 1.0.0 20110917 for omapdrm.0 on minor 0
[ 4.901163] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[ 4.908360] hctosys: unable to open rtc device (rtc0)
[ 4.914043] aic_dvdd_fixed: disabling
[ 4.917898] ldousb: disabling
[ 4.921147] ALSA device list:
[ 4.924123] No soundcards found.
[ 4.951376] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 4.959562] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 4.976572] devtmpfs: mounted
[ 4.980501] Freeing unused kernel memory: 2048K
[ 4.985146] Run /sbin/init as init process
[ 5.362688] systemd[1]: System time before build time, advancing clock.
[ 5.399238] systemd[1]: systemd 239 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)
[ 5.421891] systemd[1]: Detected architecture arm.
Welcome to Arago 2019.07!
[ 5.459036] systemd[1]: Set hostname to <am57xx-evm>.
[ 5.643360] systemd[1]: File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[ 5.660655] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[ 5.894383] systemd[1]: Listening on Journal Socket.
[ OK ] Listening on Journal Socket.
[ 5.927307] systemd[1]: Listening on initctl Compatibility Named Pipe.
[ OK ] Listening on initctl Compatibility Named Pipe.
[ 5.969550] systemd[1]: Created slice system-getty.slice.
[ OK ] Created slice system-getty.slice.
[ 6.002756] systemd[1]: Starting Create list of required static device nodes for the current kernel...
Starting Create list of required st…ce nodes for the current kernel...
[ 6.050206] systemd[1]: Mounting POSIX Message Queue File System...
Mounting POSIX Message Queue File System...
Mounting Kernel Debug File System...
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ OK ] Listening on Journal Socket (/dev/log).
[ OK ] Reached target Remote File Systems.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Started Hardware RNG Entropy Gatherer Daemon.
[ OK ] Listening on Network Service Netlink Socket.
[ OK ] Created slice system-serial\x2dgetty.slice.
Starting Load Kernel Modules...
[ 6.391021] cmemk: loading out-of-tree module taints kernel.
[ OK ] Listening on udev Control Socket.
[ 6.397689] CMEMK module: reference Linux version 4.19.59
[ 6.408204] CMEMK Error: Error sub device node not available
[ 6.413889] CMEMK Error: bad DT config
Starting udev Coldplug all Devices...
[ OK ] Reached target Swap.
[ OK ] Listening on Process Core Dump Socket.
[ 6.525250] cryptodev: driver 1.9 loaded.
Mounting Temporary Directory (/tmp)...
Starting Journal Service...
[ OK ] Created slice User and Session Slice.
[ 6.603926] usbcore: registered new interface driver usbfs
[ 6.609941] usbcore: registered new interface driver hub
[ 6.615354] usbcore: registered new device driver usb
[ OK ] Reached target Slices.
[ 6.636784] usbcore: registered new interface driver ftdi_sio
[ 6.642605] usbserial: USB Serial support registered for FTDI USB Serial Device
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Reached target Paths.
Starting Remount Root and Kernel File Systems...
[ 6.738060] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ OK ] Started Journal Service.
[ OK ] Started Create list of required sta…vice nodes for the current kernel.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Mounted Kernel Debug File System.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[ OK ] Mounted Temporary Directory (/tmp).
[ OK ] Started Remount Root and Kernel File Systems.
Starting Apply Kernel Variables...
Mounting Kernel Configuration File System...
Starting Create Static Device Nodes in /dev...
Starting Flush Journal to Persistent Storage...
[ OK ] Started Apply Kernel Variables.
[ OK ] Mounted Kernel Configuration File System.
[ OK ] Started Create Static Device Nodes in /dev.
[ 7.244133] systemd-journald[97]: Received request to flush runtime journal from PID 1
Starting udev Kernel Device Manager...
[ OK ] Reached target Local File Systems (Pre).
Mounting /media/ram...
Mounting /var/volatile...
[ OK ] Reached target Containers.
[ OK ] Started udev Kernel Device Manager.
[ OK ] Started Flush Journal to Persistent Storage.
[ OK ] Mounted /media/ram.
[ OK ] Started udev Coldplug all Devices.
[ OK ] Mounted /var/volatile.
[ 7.565898] omap-rproc 58820000.ipu: ignoring dependency for device, assuming no driver
[ 7.605892] omap-rproc 58820000.ipu: ignoring dependency for device, assuming no driver
[ 7.618248] omap-rproc 58820000.ipu: assigned reserved memory node ipu1-memory@9d000000
Starting Load/Save Random Seed...
[ 7.630249] remoteproc remoteproc0: 58820000.ipu is available
[ 7.640526] omap-rproc 55020000.ipu: ignoring dependency for device, assuming no driver
[ 7.650627] omap-rproc 55020000.ipu: ignoring dependency for device, assuming no driver
[ 7.667772] omap-rproc 55020000.ipu: assigned reserved memory node ipu2-memory@95800000
[ OK ] Reached target Local File Systems.
Starting Create Volatile Files and Directories...
[ 7.715431] remoteproc remoteproc1: 55020000.ipu is available
[ OK ] Started Load/Save Random Seed.
[ 7.752389] omap-rproc 40800000.dsp: ignoring dependency for device, assuming no driver
[ 7.800329] omap-rproc 40800000.dsp: ignoring dependency for device, assuming no driver
[ 7.839795] omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
[ 7.886309] remoteproc remoteproc2: 40800000.dsp is available
[ OK ] Found device /dev/ttyS2.
[ 7.910878] omap-rproc 41000000.dsp: ignoring dependency for device, assuming no driver
[ 7.926608] omap-rproc 41000000.dsp: ignoring dependency for device, assuming no driver
[ 7.954452] omap-rproc 41000000.dsp: assigned reserved memory node dsp2-memory@9f000000
[ 7.964949] remoteproc remoteproc3: 41000000.dsp is available
[ OK ] Started Create Volatile Files and Directories.
Starting Network Service...
Starting Update UTMP about System Boot/Shutdown...
Starting Network Time Synchronization...
[ 8.165084] remoteproc remoteproc1: powering up 55020000.ipu
[ 8.179873] remoteproc remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3747220
[ 8.204119] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ 8.284920] omap-rproc 55020000.ipu: mbox_request_channel failed: -517
[ 8.291665] remoteproc remoteproc1: can't start rproc 55020000.ipu: -16
[ 8.330621] Driver for 1-wire Dallas network protocol.
[ 8.395947] remoteproc remoteproc0: powering up 58820000.ipu
[ 8.401750] remoteproc remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 6726740
[ 8.410652] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
[ 8.426914] omap-rproc 58820000.ipu: mbox_request_channel failed: -517
[ 8.433474] remoteproc remoteproc0: can't start rproc 58820000.ipu: -16
[ 8.444904] remoteproc remoteproc0: failed to unmap 16777216/0
[ 8.451474] remoteproc remoteproc0: failed to unmap 16777216/0
[ 8.461331] remoteproc remoteproc0: failed to unmap 16777216/0
[ 8.483850] omap_rtc 48838000.rtc: registered as rtc0
[ 8.603608] tlv320aic3x-codec 0-0018: Linked as a consumer to regulator.5
[ 8.606151] omap_hdq 480b2000.1w: OMAP HDQ Hardware Rev 0.:. Driver in Interrupt mode
[ 8.616165] tlv320aic3x-codec 0-0018: Linked as a consumer to regulator.6
[ 8.774844] omap-des 480a5000.des: OMAP DES hw accel rev: 2.2
[ 8.785171] omap-des 480a5000.des: will run requests pump with realtime priority
[ 8.858321] w1_master_driver w1_bus_master1: Attaching one wire slave 01.000000000000 crc 3d
[ 8.880136] w1_master_driver w1_bus_master1: Family 1 for 01.000000000000.3d is not registered.
[ OK ] Started Network Time Synchronization.
[ 9.464107] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 9.475788] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
[ OK ] Started Network Service.
[ 9.495236] net eth1: initializing cpsw version 1.15 (0)
[ 9.516145] omap_i2c 4807c000.i2c: controller timed out
Starting Wait for Network to be Configured...
[ 9.531902] net eth1: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@2" not found on slave 1
[ 9.546139] pixcir_ts 4-005c: pixcir_set_power_mode: can't read reg 0x33 : -110
[ 9.553483] pixcir_ts 4-005c: Failed to set IDLE mode
Starting Network Name Resolution...
[ 9.571488] pixcir_ts: probe of 4-005c failed with error -110
[ 9.595541] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ OK ] Reached target System Initialization.
[ 9.606730] vpe 489d0000.vpe: Device registered as /dev/video0
[ 9.619464] net eth0: initializing cpsw version 1.15 (0)
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Listening on RPCbind Server Activation Socket.
[ 9.693849] omap-sham 4b101000.sham: hw accel on OMAP rev 4.3
[ 9.749255] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:01, irq=POLL)
[ 9.767753] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 9.794598] omap-aes 4b500000.aes: OMAP AES hw accel rev: 3.3
[ 9.820478] omap-aes 4b500000.aes: will run requests pump with realtime priority
[ 9.853933] omap-aes 4b700000.aes: OMAP AES hw accel rev: 3.3
[ 9.866704] omap-aes 4b700000.aes: will run requests pump with realtime priority
[ OK ] Listening on D-Bus System Message Bus Socket.
[ 10.171360] [drm] Initialized pvr 1.17.4948957 20110701 for 56000000.gpu on minor 1
[ OK ] Listening on dropbear.socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
[ 10.312691] remoteproc remoteproc3: powering up 41000000.dsp
[ 10.320208] remoteproc remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 20481364
[ OK ] Started D-Bus System Message Bus.
[ 10.339658] remoteproc remoteproc2: powering up 40800000.dsp
[ 10.376229] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 20481364
[ 10.395321] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
Starting TI MultiCore Tools Daemon...
[ 10.401873] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
[ 10.419605] vip 48990000.vip: loading firmware vpdma-1b8.bin
[ 10.428509] ahci 4a140000.sata: controller can't do 64bit DMA, forcing 32bit
[ 10.440036] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
Starting uim-sysfs.service...
[ 10.446610] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
[ 10.448807] ahci 4a140000.sata: forcing port_map 0x0 -> 0x1
[ 10.472926] ahci 4a140000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode
Starting RPC Bind Service...
[ 10.490349] asoc-simple-card sound0: tlv320aic3x-hifi <-> 48468000.mcasp mapping ok
[ 10.506115] vip 48990000.vip: VPDMA firmware loaded
[ 10.513024] ahci 4a140000.sata: flags: ncq sntf pm led clo only pmp pio slum part ccc apst
Starting Print notice about GPLv3 packages...
[ 10.547882] asoc-simple-card sound0: ASoC: no DMI vendor name!
[ OK ] Started Periodic Command Scheduler.
Starting TI IPC Daemon...
Starting Reboot and dump vmcore via kexec...
[ 10.639364] omap-rproc 41000000.dsp: mbox_request_channel failed: -517
Starting Login Service...
[ OK ] Started Job spooling tools.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Reached target System Time Synchronized.
[ OK ] Started Daily rotation of log files.
[ OK ] Reached target Timers.
[ OK ] Started Network Name Resolution.
[ 10.749381] remoteproc remoteproc3: can't start rproc 41000000.dsp: -16
[FAILED] Failed to start TI MultiCore Tools Daemon.
See 'systemctl status ti-mct-daemon.service' for details.
[ OK ] Started RPC Bind Service.
[ OK ] Started TI IPC Daemon.
[ OK ] Started Reboot and dump vmcore via kexec.
[ 10.941471] omap-rproc 40800000.dsp: mbox_request_channel failed: -517
[ 10.956222] scsi host0: ahci
[ 10.959443] ata1: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a1410ff] port 0x100 irq 75
[ 10.992419] remoteproc remoteproc2: can't start rproc 40800000.dsp: -16
[ 11.327945] ata1: SATA link down (SStatus 0 SControl 300)
[ OK ] Started uim-sysfs.service.
[ 12.262622] dwc3 48890000.usb: Failed to get clk 'ref': -2
[ 12.277829] OF: graph: no port node found in /ocp/ocp2scp@4a080000/phy@4a084000
[ 12.286413] dwc3 48890000.usb: changing max_speed on rev 5533202a
[ 12.293013] dwc3 488d0000.usb: Failed to get clk 'ref': -2
[ 12.303339] OF: graph: no port node found in /ocp/ocp2scp@4a080000/phy@4a085000
[ 12.419020] remoteproc remoteproc4: 4b234000.pru is available
[ 12.428504] pru-rproc 4b234000.pru: PRU rproc node pru@4b234000 probed successfully
[ 12.441422] remoteproc remoteproc5: 4b238000.pru is available
[ 12.448289] pru-rproc 4b238000.pru: PRU rproc node pru@4b238000 probed successfully
[ 12.468503] remoteproc remoteproc6: 4b2b4000.pru is available
[ 12.474388] pru-rproc 4b2b4000.pru: PRU rproc node pru@4b2b4000 probed successfully
[ 12.488731] remoteproc remoteproc7: 4b2b8000.pru is available
[ 12.494604] pru-rproc 4b2b8000.pru: PRU rproc node pru@4b2b8000 probed successfully
***************************************************************
***************************************************************
NOTICE: This file system contains the following GPLv3 packages:
autoconf
bash-dev
bash
bc
binutils-dev
binutils
bison-dev
bison
cifs-utils
cpio
cpp-symlinks
cpp
dosfstools
elfutils-dev
elfutils
findutils
g++-symlinks
g++
gawk
gcc-symlinks
gcc
gdb
gdbc6x
gdbserver
gettext
glmark2
gstreamer1.0-libav
gzip
hidapi
libasm1
libbfd
libcairo-perf-utils
libdw1
libelf1
libgdbm-compat4
libgdbm-dev
libgdbm6
libgettextlib
libgettextsrc
libgmp10
libidn2-0
libmavconn
libmpc3
libmpfr6
libreadline-dev
libreadline7
libunistring2
m4-dev
m4
make
mavlink
mavros-extras
mavros-msgs
mavros
nettle
parted
pdm-anomaly-detection
socketcan-interface
swig-dev
swig
which
If you do not wish to distribute GPLv3 components please remove
the above packages prior to distribution. This can be done using
the opkg remove command. i.e.:
opkg remove <package>
Where <package> is the name printed in the list above
NOTE: If the package is a dependency of another package you
will be notified of the dependent packages. You should
use the --force-removal-of-dependent-packages option to
also remove the dependent packages as well
***************************************************************
***************************************************************
[ OK ] Started Print notice about GPLv3 packages.
Starting Save/Restore Sound Card State...
[ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[ OK ] Created slice system-systemd\x2dfsck.slice.
Starting File System Check on /dev/mmcblk0p1...
Starting rc.pvr.service...
[ OK ] Created slice system-systemd\x2dbacklight.slice.
Starting Load/Save Screen Backlight…ightness of backlight:backlight...
Starting Avahi mDNS/DNS-SD Stack...
[ OK ] Reached target Network.
Starting Lightning Fast Webserver With Light System Requirements...
[ OK ] Started Redis In-Memory Data Store.
Starting Simple Network Management Protocol (SNMP) Daemon....
Starting Permit User Sessions...
Starting Enable and configure wl18xx bluetooth stack...
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Started NFS status monitor for NFSv2/3 locking..
[ OK ] Started Save/Restore Sound Card State.
[ OK ] Started Load/Save Screen Backlight Brightness of backlight:backlight.
[ OK ] Started Permit User Sessions.
[ OK ] Started Getty on tty1.
[ OK ] Started Serial Getty on ttyS2.
[ OK ] Reached target Login Prompts.
Starting Synchronize System and HW clocks...
[ OK ] Reached target Sound Card.
[ OK ] Started Login Service.
[ OK ] Started Synchronize System and HW clocks.
[ 15.609449] PVR_K: UM DDK-(4948957) and KM DDK-(4948957) match. [ OK ]
[ OK ] Started rc.pvr.service.
Starting weston.service...
[ OK ] Started Avahi mDNS/DNS-SD Stack.
[ OK ] Started Lightning Fast Webserver With Light System Requirements.
[ OK ] Started weston.service.
Starting Matrix GUI...
Starting telnetd.service...
[ OK ] Started telnetd.service.
Starting thttpd.service...
[ OK ] Started Matrix GUI.
[ OK ] Started thttpd.service.
[ OK ] Started File System Check on /dev/mmcblk0p1.
Mounting /run/media/mmcblk0p1...
[ OK ] Mounted /run/media/mmcblk0p1.
[ OK ] Started Enable and configure wl18xx bluetooth stack.
[ OK ] Started Simple Network Management Protocol (SNMP) Daemon..
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project http://arago-project.org am57xx-evm ttyS2
Arago 2019.07 am57xx-evm ttyS2
am57xx-evm login: root
^[[A^[[A^[[A^[[67;253Rroot@am57xx-evm:~# dmesg | grep vip
[ 10.419232] vip 48990000.vip: sc_create
[ 10.419243] vip 48990000.vip: csc_create
[ 10.419574] vip 48990000.vip: sc_create
[ 10.419583] vip 48990000.vip: csc_create
[ 10.419592] vip 48990000.vip: vpdma_create
[ 10.419605] vip 48990000.vip: loading firmware vpdma-1b8.bin
[ 10.485177] vip 48990000.vip: firmware callback
[ 10.506115] vip 48990000.vip: VPDMA firmware loaded
root@am57xx-evm:~# dmesg | grep vpe
[ 9.463928] vpe 489d0000.vpe: vpe_runtime_get
[ 9.474635] vpe 489d0000.vpe: VPE PID function f01
[ 9.475753] vpe 489d0000.vpe: sc_create
[ 9.475770] vpe 489d0000.vpe: csc_create
[ 9.475779] vpe 489d0000.vpe: vpdma_create
[ 9.475788] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
[ 9.579010] vpe 489d0000.vpe: firmware callback
[ 9.606730] vpe 489d0000.vpe: Device registered as /dev/video0
[ 12.302156] vpe 489d0000.vpe: vpe_open
[ 12.302190] vpe 489d0000.vpe: first instance created
[ 12.302198] vpe 489d0000.vpe: created instance 6e03abcb, m2m_ctx: cb8e8df6
[ 12.302460] vpe 489d0000.vpe: releasing instance 6e03abcb
[ 12.302474] vpe 489d0000.vpe: last instance released
root@am57xx-evm:~# lsmod
Module Size Used by
pru_rproc 20480 0
irq_pruss_intc 16384 1 pru_rproc
pruss 16384 1 pru_rproc
dwc3 73728 0
udc_core 28672 1 dwc3
ahci_platform 16384 0
ti_vip 49152 0
libahci_platform 20480 1 ahci_platform
snd_soc_simple_card 16384 0
snd_soc_simple_card_utils 16384 1 snd_soc_simple_card
libahci 36864 2 ahci_platform,libahci_platform
pvrsrvkm 401408 4
omap_aes_driver 24576 0
libata 208896 3 ahci_platform,libahci_platform,libahci
pruss_soc_bus 16384 0
omap_sham 28672 0
phy_omap_usb2 16384 2
omap_wdt 16384 0
ti_vpe 32768 0
ti_sc 36864 2 ti_vpe,ti_vip
ti_csc 16384 2 ti_vpe,ti_vip
ti_vpdma 24576 2 ti_vpe,ti_vip
omap_des 20480 0
snd_soc_tlv320aic3x 57344 1
des_generic 28672 1 omap_des
omap_hdq 16384 0
dwc3_omap 16384 0
rtc_omap 20480 1
wire 32768 1 omap_hdq
at24 20480 0
pixcir_i2c_ts 16384 0
crypto_engine 16384 2 omap_des,omap_aes_driver
omap_crypto 16384 2 omap_des,omap_aes_driver
omap_remoteproc 20480 0
virtio_rpmsg_bus 20480 0
remoteproc 49152 2 pru_rproc,omap_remoteproc
sch_fq_codel 20480 3
uio_module_drv 16384 0
uio 20480 1 uio_module_drv
ftdi_sio 40960 0
usbserial 36864 1 ftdi_sio
usbcore 217088 2 ftdi_sio,usbserial
usb_common 16384 3 udc_core,usbcore,dwc3
jailhouse 32768 0
gdbserverproxy 16384 0
cryptodev 49152 0
root@am57xx-evm:~#
Not showing video1,
could you give me some suggestions
Thanking you,
Regards,
Ramachandra