Lines Matching defs:dphy
25 #include "phy-rockchip-csi2-dphy-common.h"
453 v4l2_warn(sd, "No link between dphy and sensor\n");
461 static struct csi2_sensor *sd_to_sensor(struct csi2_dphy *dphy, struct v4l2_subdev *sd)
465 for (i = 0; i < dphy->num_sensors; ++i) {
466 if (dphy->sensors[i].sd == sd) {
467 return &dphy->sensors[i];
487 static void csi2_dphy_config_dual_mode(struct csi2_dphy *dphy, struct csi2_sensor *sensor)
489 struct csi2_dphy_hw *hw = dphy->dphy_hw;
490 struct v4l2_subdev *sd = &dphy->sd;
504 if (dphy->phy_index < 0X03) {
524 switch (dphy->phy_index) {
573 static int csi2_dphy_hw_stream_on(struct csi2_dphy *dphy, struct v4l2_subdev *sd)
576 struct csi2_sensor *sensor = sd_to_sensor(dphy, sensor_sd);
577 struct csi2_dphy_hw *hw = dphy->dphy_hw;
601 if (dphy->phy_index % 0X03 == DPHY1) {
605 if (dphy->phy_index % 0x03 == DPHY2) {
614 /* Reset dphy digital part */
625 csi2_dphy_config_dual_mode(dphy, sensor);
632 if (dphy->data_rate_mbps > 0x5dc) {
648 if (dphy->phy_index % 0x03 == DPHY1) {
658 if (dphy->phy_index % 0x03 == DPHY2) {
672 if (hsfreq_ranges[i].range_h >= dphy->data_rate_mbps) {
680 dev_warn(dphy->dev, "data rate: %lld mbps, max support %d mbps", dphy->data_rate_mbps,
700 if (dphy->phy_index % 0x03 == DPHY1) {
706 if (dphy->phy_index % 0x03 == DPHY2) {
720 static int csi2_dphy_hw_stream_off(struct csi2_dphy *dphy, struct v4l2_subdev *sd)
722 struct csi2_dphy_hw *hw = dphy->dphy_hw;
756 static int csi2_dcphy_hw_stream_on(struct csi2_dphy *dphy, struct v4l2_subdev *sd)
759 struct csi2_sensor *sensor = sd_to_sensor(dphy, sensor_sd);
760 struct csi2_dphy_hw *hw = dphy->dphy_hw;
797 if (hsfreq_ranges[i].range_h >= dphy->data_rate_mbps) {
805 dev_warn(dphy->dev, "data rate: %lld mbps, max support %d mbps", dphy->data_rate_mbps,
885 dev_err(dphy->dev, "stream on error\n");
889 static int csi2_dcphy_hw_stream_off(struct csi2_dphy *dphy, struct v4l2_subdev *sd)
891 struct csi2_dphy_hw *hw = dphy->dphy_hw;
893 struct csi2_sensor *sensor = sd_to_sensor(dphy, sensor_sd);
974 .compatible = "rockchip,rk3568-csi2-dphy-hw",
977 .compatible = "rockchip,rk3588-csi2-dphy-hw",
1031 dev_err_probe(dev, PTR_ERR(dphy_hw->rsts_bulk), "failed to get dphy reset\n");
1049 dev_err(dev, "Can't find csi2 dphy hw addr!\n");
1064 dev_info(dev, "csi2 dphy hw probe successfully!\n");
1084 .name = "rockchip-csi2-dphy-hw",