[kernel] merge commit '2e1cc5bd1f..3b18076683'
Signed-off-by: hmz007 <hmz007@gmail.com> Change-Id: I2d211314d42fbacc6c05744da5db6fabb3affa78
This commit is contained in:
@@ -798,6 +798,30 @@ dsi0_pwm: &pwm2 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
/* MIPI-DSI */
|
||||
#define ENABLE_MIPI_DSI0 1
|
||||
|
||||
#include "rk3588-nanopi6-mipi-lcd-yx70.dtsi"
|
||||
#include "rk3588-nanopi6-mipi-dsi-sel.dtsi"
|
||||
|
||||
#if defined(ENABLE_MIPI_DSI0)
|
||||
&dsi0_gt1x {
|
||||
compatible = "goodix,gt1x", "goodix,gt9xx";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dsi0_gt9xx {
|
||||
status = "disabled";
|
||||
};
|
||||
#endif
|
||||
|
||||
/* MIPI-CSI */
|
||||
#define ENABLE_MIPI_CSI1 1
|
||||
|
||||
#if (ENABLE_MIPI_CSI1)
|
||||
#include "rk3588-nanopi6-csi1-imx415.dtsi"
|
||||
#endif
|
||||
|
||||
/* GPIO Connector */
|
||||
&gpio0 {
|
||||
gpio-line-names =
|
||||
|
||||
@@ -837,8 +837,8 @@
|
||||
compatible = "rockchip,rk3588-pcie3-phy";
|
||||
reg = <0x0 0xfee80000 0x0 0x20000>;
|
||||
#phy-cells = <0>;
|
||||
clocks = <&cru PCLK_PCIE_COMBO_PIPE_PHY>;
|
||||
clock-names = "pclk";
|
||||
clocks = <&cru PCLK_PCIE_COMBO_PIPE_PHY>, <&cru PCLK_PHP_ROOT>;
|
||||
clock-names = "pclk", "phpclk";
|
||||
resets = <&cru SRST_PCIE30_PHY>;
|
||||
reset-names = "phy";
|
||||
rockchip,pipe-grf = <&php_grf>;
|
||||
|
||||
@@ -7464,13 +7464,12 @@ int rkcif_update_sensor_info(struct rkcif_stream *stream)
|
||||
terminal_sensor->hdmi_input_en = 0;
|
||||
}
|
||||
} else {
|
||||
v4l2_err(&stream->cifdev->v4l2_dev,
|
||||
v4l2_warn_once(&stream->cifdev->v4l2_dev,
|
||||
"%s: stream[%d] get remote terminal sensor failed!\n",
|
||||
__func__, stream->id);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
if (terminal_sensor->mbus.type == V4L2_MBUS_CSI2_DPHY ||
|
||||
terminal_sensor->mbus.type == V4L2_MBUS_CSI2_CPHY)
|
||||
terminal_sensor->lanes = terminal_sensor->mbus.bus.mipi_csi2.num_data_lanes;
|
||||
@@ -8415,7 +8414,7 @@ int rkcif_do_start_stream(struct rkcif_stream *stream, enum rkcif_stream_mode mo
|
||||
if (!dev->active_sensor) {
|
||||
ret = rkcif_update_sensor_info(stream);
|
||||
if (ret < 0) {
|
||||
v4l2_err(v4l2_dev,
|
||||
v4l2_warn_once(v4l2_dev,
|
||||
"update sensor info failed %d\n",
|
||||
ret);
|
||||
goto out;
|
||||
@@ -9054,7 +9053,7 @@ static int rkcif_fh_open(struct file *filp)
|
||||
/* Make sure active sensor is valid before .set_fmt() */
|
||||
ret = rkcif_update_sensor_info(stream);
|
||||
if (ret < 0) {
|
||||
v4l2_err(vdev,
|
||||
v4l2_warn_once(vdev,
|
||||
"update sensor info failed %d\n",
|
||||
ret);
|
||||
|
||||
@@ -9194,7 +9193,7 @@ static int rkcif_enum_frameintervals(struct file *file, void *fh,
|
||||
|
||||
if (!sensor || !sensor->sd) {
|
||||
/* TODO: active_sensor is NULL if using DMARX path */
|
||||
v4l2_err(&dev->v4l2_dev, "%s Not active sensor\n", __func__);
|
||||
v4l2_warn_once(&dev->v4l2_dev, "%s Not active sensor\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
@@ -584,7 +584,7 @@ static int rkcif_scale_fh_open(struct file *file)
|
||||
|
||||
ret = rkcif_update_sensor_info(scale_vdev->stream);
|
||||
if (ret < 0) {
|
||||
v4l2_err(vdev,
|
||||
v4l2_warn_once(vdev,
|
||||
"update sensor info failed %d\n",
|
||||
ret);
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ static int rkcif_tools_fh_open(struct file *file)
|
||||
|
||||
ret = rkcif_update_sensor_info(tools_vdev->stream);
|
||||
if (ret < 0) {
|
||||
v4l2_err(vdev,
|
||||
v4l2_warn_once(vdev,
|
||||
"update sensor info failed %d\n",
|
||||
ret);
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ static void csi2_update_sensor_info(struct csi2_dev *csi2)
|
||||
|
||||
ret = v4l2_subdev_call(sensor->sd, pad, get_mbus_config, 0, &mbus);
|
||||
if (ret) {
|
||||
v4l2_err(&csi2->sd, "update sensor info failed!\n");
|
||||
v4l2_warn_once(&csi2->sd, "update sensor info failed!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -208,4 +208,9 @@ int rkcif_csi2_register_notifier(struct notifier_block *nb);
|
||||
int rkcif_csi2_unregister_notifier(struct notifier_block *nb);
|
||||
void rkcif_csi2_event_reset_pipe(struct csi2_dev *csi2_dev, int reset_src);
|
||||
|
||||
#ifndef v4l2_warn_once
|
||||
#define v4l2_warn_once(dev, fmt, arg...) \
|
||||
printk_once(KERN_WARNING "%s: " fmt, (dev)->name , ## arg)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1499,7 +1499,7 @@ static int rkisp_enum_frameintervals(struct file *file, void *fh,
|
||||
|
||||
if (!sensor) {
|
||||
/* TODO: active_sensor is NULL if using DMARX path */
|
||||
v4l2_err(&dev->v4l2_dev, "%s Not active sensor\n", __func__);
|
||||
v4l2_warn_once(&dev->v4l2_dev, "%s Not active sensor\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
@@ -1414,7 +1414,7 @@ rkisp_start_streaming(struct vb2_queue *queue, unsigned int count)
|
||||
memset(&stream->dbg, 0, sizeof(stream->dbg));
|
||||
atomic_inc(&dev->cap_dev.refcnt);
|
||||
if (!dev->isp_inp || !stream->linked) {
|
||||
v4l2_err(v4l2_dev, "check %s link or isp input\n", node->vdev.name);
|
||||
v4l2_warn_once(v4l2_dev, "check %s link or isp input\n", node->vdev.name);
|
||||
goto buffer_done;
|
||||
}
|
||||
|
||||
|
||||
@@ -1495,7 +1495,7 @@ rkisp_start_streaming(struct vb2_queue *queue, unsigned int count)
|
||||
|
||||
atomic_inc(&dev->cap_dev.refcnt);
|
||||
if (!dev->isp_inp || !stream->linked) {
|
||||
v4l2_err(v4l2_dev, "check %s link or isp input\n", node->vdev.name);
|
||||
v4l2_warn_once(v4l2_dev, "check %s link or isp input\n", node->vdev.name);
|
||||
goto buffer_done;
|
||||
}
|
||||
|
||||
|
||||
@@ -218,4 +218,9 @@ struct v4l2_rect *rkisp_get_isp_sd_win(struct rkisp_isp_subdev *isp_sdev)
|
||||
return &isp_sdev->out_crop;
|
||||
}
|
||||
|
||||
#ifndef v4l2_warn_once
|
||||
#define v4l2_warn_once(dev, fmt, arg...) \
|
||||
printk_once(KERN_WARNING "%s: " fmt, (dev)->name , ## arg)
|
||||
#endif
|
||||
|
||||
#endif /* _RKISP_H */
|
||||
|
||||
@@ -264,6 +264,10 @@ static int rockchip_p3phy_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
priv->num_clks = devm_clk_bulk_get_all(dev, &priv->clks);
|
||||
if (priv->num_clks < 1)
|
||||
return -ENODEV;
|
||||
|
||||
priv->phy_grf = syscon_regmap_lookup_by_phandle(np, "rockchip,phy-grf");
|
||||
if (IS_ERR(priv->phy_grf)) {
|
||||
dev_err(dev, "failed to find rockchip,phy_grf regmap\n");
|
||||
@@ -275,6 +279,13 @@ static int rockchip_p3phy_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(priv->pipe_grf))
|
||||
dev_info(dev, "failed to find rockchip,pipe_grf regmap\n");
|
||||
|
||||
/* Configuring grf with clk enabled. */
|
||||
ret = clk_bulk_prepare_enable(priv->num_clks, priv->clks);
|
||||
if (ret) {
|
||||
pr_err("failed to enable PCIe bulk clks %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = device_property_read_u32(dev, "rockchip,pcie30-phymode", &val);
|
||||
if (!ret) {
|
||||
priv->pcie30_phymode = val;
|
||||
@@ -294,6 +305,8 @@ static int rockchip_p3phy_probe(struct platform_device *pdev)
|
||||
(reg << 16) | reg);
|
||||
};
|
||||
|
||||
clk_bulk_disable_unprepare(priv->num_clks, priv->clks);
|
||||
|
||||
priv->phy = devm_phy_create(dev, NULL, &rockchip_p3phy_ops);
|
||||
if (IS_ERR(priv->phy)) {
|
||||
dev_err(dev, "failed to create combphy\n");
|
||||
@@ -306,10 +319,6 @@ static int rockchip_p3phy_probe(struct platform_device *pdev)
|
||||
priv->p30phy = NULL;
|
||||
}
|
||||
|
||||
priv->num_clks = devm_clk_bulk_get_all(dev, &priv->clks);
|
||||
if (priv->num_clks < 1)
|
||||
return -ENODEV;
|
||||
|
||||
dev_set_drvdata(dev, priv);
|
||||
phy_set_drvdata(priv->phy, priv);
|
||||
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
|
||||
|
||||
Reference in New Issue
Block a user