Hi, i’m used custom board.
I’m now trying to porting and using the MAX96724, but it is not working well.
Here is my devicetree
i2c@c250000 {
max96724@4e {
compatible = "nvidia,max96724";
reg = <0x4e>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0{
reg = <0>;
max96724_out0: endpoint{
status = "okay";
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&max96724_csi_in0>;
};
};
};
};
};
/*
tegra-capture-vi {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
max96724_vi_in0: endpoint {
status = "okay";
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&max96724_csi_out0>;
};
};
};
};
*/
host1x@13e00000 {
status = "okay";
vi@15700000 {
status = "okay";
num-channels = <1>;
ports {
reg = <0>;
max96724_vi_in0: endpoint {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&max96724_csi_out0>;
};
};
};
nvcsi@15a00000 {
status = "okay";
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
max96724_csi_in0: endpoint@0 {
status = "okay";
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&max96724_out0>;
};
};
port@1 {
reg = <1>;
max96724_csi_out0: endpoint@1 {
remote-endpoint = <&max96724_vi_in0>;
};
};
};
};
};
};
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <1>;
max_lane_speed = <3000000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
modules {
module0 {
badge = "max96724_bottom";
position = "bottom";
orientation = "0";
drivernode0 {
pcl_id = "v4l2_sensor";
devname = "max96724";
proc-device-tree = "/proc/device-tree/i2c@c250000/max96724@27";
};
};
};
};
And, this is the part where max96724 is registered as v4l2.
sd = &priv->subdev;
v4l2_i2c_subdev_init(sd, client, &max96724_subdev_ops);
sd->internal_ops = &max96724_internal_ops;
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
priv->pad.flags = MEDIA_PAD_FL_SOURCE;
sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
ret = media_entity_pads_init(&sd->entity, 1, &priv->pad);
if (ret < 0)
dev_err(dev, "v4l2 media entity pads init failed\n");
v4l2_set_subdevdata(sd, priv);
snprintf(sd->name, sizeof(sd->name), "max96724");
ret = v4l2_async_register_subdev_sensor_common(sd);
if (!ret) {
dev_err(dev, "%scamera sensor driver registered\n",sd->name);
}
I tried “media-ctl -p -d /dev/media0”
Could you please give me some advice?
Thank you