Add support for the SDM845 Camera Subsystem
Subsystems (6)
v3 cover Add support for the SDM845 Camera Subsystem
This series implements support for the camera subsystem found in the SDM845 SOCs and the Titan 170 ISP. The support is partial in that it implements CSIPHY, CSID, and partial VFE support.
The Titan generation of the ISP diverges a fair amount from the design of the previous architecture generation, CAMSS. As a result some pretty invasive refactoring is done in this series. It also means that at this time we're unable to implement support for all of the IP blocks contained. This is due to a combination of legal considerations with respect to the IP and its owner Qualcomm and time & man hour constrains on the Linaro side.
The CSIPHY (CSI Physical Layer) & CSID (CSI Decoder) support is complete, but the VFE (Video Front End, which is referred to as IFE (Image Front End) in the Titan generation of ISPs) only has support for the RDI (Raw Dump Interface) which allows the raw output of the CSID to be written to memory.
The 2nd interface implemented in the VFE silicon is the PIX interface, and camss does not support it for this generation of ISPs. The reason for this is that the PIX interface is used for sending image data to the BPS (Bayer Processing Section) & IPE (Image Processing Engine), but both of these units are beyond the scope of enabling basic ISP functionality for the SDM845.
Since the Titan architecture generation diverges quite a bit from the CAMSS generation, a lot of pretty major refactoring is carried out in this series. Both the CSID & VFE core paths are made more general and hardware version specific parts are broken out. The CSIPHY didn't require quite as radical changes and therefore keeps its current form.
Tested on:
- Qcom RB3 / db845c + camera mezzanine, which is SDM845 based
- db410c + D3 Camera mezzanine, which is APQ8016 based
Branch:
- https://git.linaro.org/people/robert.foss/linux.git/log/?h=camss_sdm845_v1
- https://git.linaro.org/people/robert.foss/linux.git/log/?h=camss_sdm845_v2
- https://git.linaro.org/people/robert.foss/linux.git/log/?h=camss_sdm845_v3
Due to the dt-bindings supporting sdm660-camss, this series depends the sdm660 clock driver being upstreamed. I've linked this series below.
SDM630/660 Multimedia and GPU clock controllers
https://lkml.org/lkml/2020/9/26/166
Robert Foss (22):
media: camss: Fix vfe_isr_comp_done() documentation
media: camss: Fix vfe_isr comment typo
media: camss: Add CAMSS_845 camss version
media: camss: Make ISPIF subdevice optional
media: camss: Refactor VFE HW version support
media: camss: Add support for VFE hardware version Titan 170
media: camss: Add missing format identifiers
media: camss: Refactor CSID HW version support
media: camss: Add support for CSID hardware version Titan 170
media: camss: Add support for CSIPHY hardware version Titan 170
media: camss: Remove per VFE power domain toggling
media: camss: Enable SDM845
dt-bindings: media: camss: Add qcom,msm8916-camss binding
dt-bindings: media: camss: Add qcom,msm8996-camss binding
dt-bindings: media: camss: Add qcom,sdm660-camss binding
dt-bindings: media: camss: Add qcom,sdm845-camss binding
MAINTAINERS: Change CAMSS documentation to use dtschema bindings
media: dt-bindings: media: Remove qcom,camss documentation
arm64: defconfig: Build Qcom CAMSS as module
arm64: dts: sdm845: Add CAMSS ISP node
arm64: dts: sdm845-db845c: Configure regulators for camss node
arm64: dts: sdm845-db845c: Enable ov8856 sensor and connect to ISP
.../devicetree/bindings/media/qcom,camss.txt | 236 ---- .../bindings/media/qcom,msm8916-camss.yaml | 256 ++++ .../bindings/media/qcom,msm8996-camss.yaml | 387 ++++++ .../bindings/media/qcom,sdm660-camss.yaml | 398 ++++++ .../bindings/media/qcom,sdm845-camss.yaml | 370 ++++++ MAINTAINERS | 2 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 23 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 130 ++ arch/arm64/configs/defconfig | 1 + drivers/media/platform/qcom/camss/Makefile | 6 + .../platform/qcom/camss/camss-csid-170.c | 602 +++++++++ .../platform/qcom/camss/camss-csid-4-1.c | 338 +++++ .../platform/qcom/camss/camss-csid-4-7.c | 406 ++++++ .../media/platform/qcom/camss/camss-csid.c | 620 +-------- .../media/platform/qcom/camss/camss-csid.h | 178 ++- .../qcom/camss/camss-csiphy-3ph-1-0.c | 182 ++- .../media/platform/qcom/camss/camss-csiphy.c | 66 +- .../media/platform/qcom/camss/camss-ispif.c | 117 +- .../media/platform/qcom/camss/camss-ispif.h | 3 +- .../media/platform/qcom/camss/camss-vfe-170.c | 804 ++++++++++++ .../media/platform/qcom/camss/camss-vfe-4-1.c | 119 +- .../media/platform/qcom/camss/camss-vfe-4-7.c | 240 ++-- .../media/platform/qcom/camss/camss-vfe-4-8.c | 1166 +++++++++++++++++ .../platform/qcom/camss/camss-vfe-gen1.c | 763 +++++++++++ .../platform/qcom/camss/camss-vfe-gen1.h | 110 ++ drivers/media/platform/qcom/camss/camss-vfe.c | 840 +----------- drivers/media/platform/qcom/camss/camss-vfe.h | 118 +- .../media/platform/qcom/camss/camss-video.c | 100 ++ drivers/media/platform/qcom/camss/camss.c | 419 ++++-- drivers/media/platform/qcom/camss/camss.h | 17 +- 30 files changed, 6959 insertions(+), 2058 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/qcom,camss.txt create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8916-camss.yaml create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8996-camss.yaml create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm660-camss.yaml create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml create mode 100644 drivers/media/platform/qcom/camss/camss-csid-170.c create mode 100644 drivers/media/platform/qcom/camss/camss-csid-4-1.c create mode 100644 drivers/media/platform/qcom/camss/camss-csid-4-7.c create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-170.c create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-4-8.c create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-gen1.c create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-gen1.h
Signature · 1 line
2.27.0
PATCH v3 1/22 media: camss: Fix vfe_isr_comp_done() documentation
Function name is comment is wrong, and was changed to be the same as the actual function name.
The comment was changed to kerneldoc format.
---
Changes since v1
- Bjorn: Fix function doc name & use kerneldoc format
drivers/media/platform/qcom/camss/camss-vfe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/qcom/camss/camss-vfe.c +2 -2
@@ -1076,8 +1076,8 @@ static void vfe_isr_wm_done(struct vfe_device *vfe, u8 wm)spin_unlock_irqrestore (&vfe->output_lock, flags); } -/* -* vfe_isr_wm_done - Process composite image done interrupt +/** +* vfe_isr_comp_done() - Process composite image done interrupt * @vfe: VFE Device * @comp: Composite image id */
Signature · 1 line
2.27.0
PATCH v3 2/22 media: camss: Fix vfe_isr comment typo
In reply to Robert FossComment refers to ISPIF, but this is incorrect. Only the VFE interrupts are handled by this function.
---
Changes since v1
- Bjorn: Add r-b
drivers/media/platform/qcom/camss/camss-vfe-4-1.c | 2 +- drivers/media/platform/qcom/camss/camss-vfe-4-7.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/qcom/camss/camss-vfe-4-1.c +1 -1
@@ -922,7 +922,7 @@ static void vfe_violation_read(struct vfe_device *vfe) }/* -* vfe_isr - ISPIF module interrupt handler +* vfe_isr - VFE module interrupt handler * @irq: Interrupt line * @dev: VFE device *
drivers/media/platform/qcom/camss/camss-vfe-4-7.c +1 -1
@@ -1055,7 +1055,7 @@ static void vfe_violation_read(struct vfe_device *vfe) }/* -* vfe_isr - ISPIF module interrupt handler +* vfe_isr - VFE module interrupt handler * @irq: Interrupt line * @dev: VFE device *
Signature · 1 line
2.27.0
PATCH v3 3/22 media: camss: Add CAMSS_845 camss version
In reply to Robert FossAdd enum representing the SDM845 SOC, which incorporates version 170 of the Titan architecture ISP.
--- drivers/media/platform/qcom/camss/camss.h | 1 + 1 file changed, 1 insertion(+)
drivers/media/platform/qcom/camss/camss.h +1 -0
@@ -66,6 +66,7 @@ enum camss_version { CAMSS_8x16, CAMSS_8x96,CAMSS_660 , + CAMSS_845, }; struct camss {
Signature · 1 line
2.27.0
PATCH v3 4/22 media: camss: Make ISPIF subdevice optional
In reply to Robert FossThis driver supports multiple architecture versions of the Qualcomm ISP. The CAMSS architecure which this driver is name after, and with the introduction of this series, the Titan architecture.
The ISPIF is an IP-block that is only present in the CAMSS generation of the architecture. In order to support the Titan generation, make the ISPIF an optional subdevice.
---
Changes since v1:
- Björn: Improved commit message
- Björn: Use local 'dev' ptr instead of 'camss->dev'
- Björn: Remove res/ispif NULL checks
- Björn: Remove ispif NULL checks before calling msm_ispif_unregister_entities()
- Andrey: Fixed incorrect allocation size
.../media/platform/qcom/camss/camss-ispif.c | 114 ++++++++++-------- .../media/platform/qcom/camss/camss-ispif.h | 3 +- drivers/media/platform/qcom/camss/camss.c | 111 +++++++++++------ drivers/media/platform/qcom/camss/camss.h | 2 +- 4 files changed, 142 insertions(+), 88 deletions(-)
drivers/media/platform/qcom/camss/camss-ispif.c +66 -48
@@ -161,6 +161,7 @@ static const u32 ispif_formats_8x96[] = {static irqreturn_t ispif_isr_8x96 (int irq,void *dev) {struct ispif_device *ispif = dev; +struct camss *camss = ispif->camss;u32 value0, value1, value2, value3, value4, value5; value0 =readl_relaxed (ispif->base +ISPIF_VFE_m_IRQ_STATUS_0 (0 ));
@@ -186,34 +187,34 @@ static irqreturn_t ispif_isr_8x96(int irq, void *dev)complete (&ispif->reset_complete[1 ]);if (unlikely (value0 & ISPIF_VFE_m_IRQ_STATUS_0_PIX0_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE0 pix0 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE0 pix0 overflow\n" );if (unlikely (value0 & ISPIF_VFE_m_IRQ_STATUS_0_RDI0_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE0 rdi0 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE0 rdi0 overflow\n" );if (unlikely (value1 & ISPIF_VFE_m_IRQ_STATUS_1_PIX1_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE0 pix1 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE0 pix1 overflow\n" );if (unlikely (value1 & ISPIF_VFE_m_IRQ_STATUS_1_RDI1_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE0 rdi1 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE0 rdi1 overflow\n" );if (unlikely (value2 & ISPIF_VFE_m_IRQ_STATUS_2_RDI2_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE0 rdi2 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE0 rdi2 overflow\n" );if (unlikely (value3 & ISPIF_VFE_m_IRQ_STATUS_0_PIX0_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE1 pix0 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE1 pix0 overflow\n" );if (unlikely (value3 & ISPIF_VFE_m_IRQ_STATUS_0_RDI0_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE1 rdi0 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE1 rdi0 overflow\n" );if (unlikely (value4 & ISPIF_VFE_m_IRQ_STATUS_1_PIX1_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE1 pix1 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE1 pix1 overflow\n" );if (unlikely (value4 & ISPIF_VFE_m_IRQ_STATUS_1_RDI1_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE1 rdi1 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE1 rdi1 overflow\n" );if (unlikely (value5 & ISPIF_VFE_m_IRQ_STATUS_2_RDI2_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE1 rdi2 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE1 rdi2 overflow\n" );return IRQ_HANDLED ; }
@@ -228,6 +229,7 @@ static irqreturn_t ispif_isr_8x96(int irq, void *dev)static irqreturn_t ispif_isr_8x16 (int irq,void *dev) {struct ispif_device *ispif = dev; +struct camss *camss = ispif->camss;u32 value0, value1, value2; value0 =readl_relaxed (ispif->base +ISPIF_VFE_m_IRQ_STATUS_0 (0 ));
@@ -244,30 +246,32 @@ static irqreturn_t ispif_isr_8x16(int irq, void *dev)complete (&ispif->reset_complete[0 ]);if (unlikely (value0 & ISPIF_VFE_m_IRQ_STATUS_0_PIX0_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE0 pix0 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE0 pix0 overflow\n" );if (unlikely (value0 & ISPIF_VFE_m_IRQ_STATUS_0_RDI0_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE0 rdi0 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE0 rdi0 overflow\n" );if (unlikely (value1 & ISPIF_VFE_m_IRQ_STATUS_1_PIX1_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE0 pix1 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE0 pix1 overflow\n" );if (unlikely (value1 & ISPIF_VFE_m_IRQ_STATUS_1_RDI1_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE0 rdi1 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE0 rdi1 overflow\n" );if (unlikely (value2 & ISPIF_VFE_m_IRQ_STATUS_2_RDI2_OVERFLOW)) -dev_err_ratelimited (to_device (ispif),"VFE0 rdi2 overflow\n" ); +dev_err_ratelimited (camss->dev,"VFE0 rdi2 overflow\n" );return IRQ_HANDLED ; }static int ispif_vfe_reset (struct ispif_device *ispif,u8 vfe_id) { +struct camss *camss = ispif->camss; +unsigned long time;u32 val; -if (vfe_id > (to_camss (ispif)->vfe_num -1 )) { -dev_err (to_device (ispif), +if (vfe_id > (camss->vfe_num -1 )) { +dev_err (camss->dev,"Error: asked reset for invalid VFE%d\n" , vfe_id);return -ENOENT ; }
@@ -300,7 +304,7 @@ static int ispif_vfe_reset(struct ispif_device *ispif, u8 vfe_id) time =wait_for_completion_timeout (&ispif->reset_complete[vfe_id],msecs_to_jiffies (ISPIF_RESET_TIMEOUT_MS ));if (!time) { -dev_err (to_device (ispif), +dev_err (camss->dev,"ISPIF for VFE%d reset timeout\n" , vfe_id);return -EIO ; }
@@ -316,30 +320,31 @@ static int ispif_vfe_reset(struct ispif_device *ispif, u8 vfe_id)*/ static int ispif_reset (struct ispif_device *ispif,u8 vfe_id) { +struct camss *camss = ispif->camss;int ret; - ret =camss_pm_domain_on (to_camss (ispif),PM_DOMAIN_VFE0 ); + ret =camss_pm_domain_on (camss,PM_DOMAIN_VFE0 );if (ret <0 )return ret; - ret =camss_pm_domain_on (to_camss (ispif),PM_DOMAIN_VFE1 ); + ret =camss_pm_domain_on (camss,PM_DOMAIN_VFE1 );if (ret <0 )return ret; ret =camss_enable_clocks (ispif->nclocks_for_reset, ispif->clock_for_reset, -to_device (ispif)); + camss->dev);if (ret <0 )return ret; ret =ispif_vfe_reset (ispif, vfe_id);if (ret) -dev_dbg (to_device (ispif),"ISPIF Reset failed\n" ); +dev_dbg (camss->dev,"ISPIF Reset failed\n" );camss_disable_clocks (ispif->nclocks_for_reset, ispif->clock_for_reset); -camss_pm_domain_off (to_camss (ispif),PM_DOMAIN_VFE0 ); -camss_pm_domain_off (to_camss (ispif),PM_DOMAIN_VFE1 ); +camss_pm_domain_off (camss,PM_DOMAIN_VFE0 ); +camss_pm_domain_off (camss,PM_DOMAIN_VFE1 );return ret; }
@@ -355,7 +360,7 @@ static int ispif_set_power(struct v4l2_subdev *sd, int on) {struct ispif_line *line =v4l2_get_subdevdata (sd);struct ispif_device *ispif = line->ispif; -struct device *dev =to_device (ispif); +struct device *dev = ispif->camss->dev;int ret =0 ;mutex_lock (&ispif->power_lock);
@@ -505,7 +510,7 @@ static int ispif_validate_intf_status(struct ispif_device *ispif, }if ((val &0xf ) !=0xf ) { -dev_err (to_device (ispif),"%s: ispif is busy: 0x%x\n" , +dev_err (ispif->camss->dev,"%s: ispif is busy: 0x%x\n" , __func__, val); ret = -EBUSY ; }
@@ -552,7 +557,7 @@ static int ispif_wait_for_stop(struct ispif_device *ispif,ISPIF_TIMEOUT_SLEEP_US , ISPIF_TIMEOUT_ALL_US);if (ret <0 ) -dev_err (to_device (ispif),"%s: ispif stop timeout\n" , +dev_err (ispif->camss->dev,"%s: ispif stop timeout\n" , __func__);return ret;
@@ -800,6 +805,7 @@ static int ispif_set_stream(struct v4l2_subdev *sd, int enable) {struct ispif_line *line =v4l2_get_subdevdata (sd);struct ispif_device *ispif = line->ispif; +struct camss *camss = ispif->camss;enum ispif_intf intf = line->interface;u8 csid = line->csid_id;u8 vfe = line->vfe_id;
@@ -825,8 +831,8 @@ static int ispif_set_stream(struct v4l2_subdev *sd, int enable)ispif_select_csid (ispif, intf, csid, vfe,1 );ispif_select_cid (ispif, intf, cid, vfe,1 );ispif_config_irq (ispif, intf, vfe,1 ); -if (to_camss (ispif)->version == CAMSS_8x96 || -to_camss (ispif)->version ==CAMSS_660 ) +if (camss->version == CAMSS_8x96 || + camss->version ==CAMSS_660 )ispif_config_pack (ispif, line->fmt[MSM_ISPIF_PAD_SINK ].code, intf, cid, vfe,1 );
@@ -843,8 +849,8 @@ static int ispif_set_stream(struct v4l2_subdev *sd, int enable)return ret;mutex_lock (&ispif->config_lock); -if (to_camss (ispif)->version == CAMSS_8x96 || -to_camss (ispif)->version ==CAMSS_660 ) +if (camss->version == CAMSS_8x96 || + camss->version ==CAMSS_660 )ispif_config_pack (ispif, line->fmt[MSM_ISPIF_PAD_SINK ].code, intf, cid, vfe,0 );
@@ -1088,26 +1094,29 @@ static int ispif_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)* * Return 0 on success or a negative error code otherwise */ -int msm_ispif_subdev_init (struct ispif_device *ispif, +int msm_ispif_subdev_init (struct camss *camss,const struct resources_ispif *res) { -struct device *dev =to_device (ispif); +struct device *dev = camss->dev; +struct ispif_device *ispif = camss->ispif;struct platform_device *pdev =to_platform_device (dev);struct resource *r;int i;int ret; + ispif->camss = camss; +/* Number of ISPIF lines - same as number of CSID hardware modules */ -if (to_camss (ispif)->version == CAMSS_8x16) +if (camss->version == CAMSS_8x16) ispif->line_num =2 ; -else if (to_camss (ispif)->version == CAMSS_8x96 || -to_camss (ispif)->version ==CAMSS_660 ) +else if (camss->version == CAMSS_8x96 || + camss->version ==CAMSS_660 ) ispif->line_num =4 ;else return -EINVAL ; - ispif->line =devm_kcalloc (dev, ispif->line_num,sizeof (*ispif->line), -GFP_KERNEL ); + ispif->line =devm_kcalloc (dev, ispif->line_num, +sizeof (*ispif->line),GFP_KERNEL );if (!ispif->line)return -ENOMEM ;
@@ -1115,12 +1124,12 @@ int msm_ispif_subdev_init(struct ispif_device *ispif, ispif->line[i].ispif = ispif; ispif->line[i].id = i; -if (to_camss (ispif)->version == CAMSS_8x16) { +if (camss->version == CAMSS_8x16) { ispif->line[i].formats = ispif_formats_8x16; ispif->line[i].nformats =ARRAY_SIZE (ispif_formats_8x16); - }else if (to_camss (ispif)->version == CAMSS_8x96 || -to_camss (ispif)->version ==CAMSS_660 ) { + }else if (camss->version == CAMSS_8x96 || + camss->version ==CAMSS_660 ) { ispif->line[i].formats = ispif_formats_8x96; ispif->line[i].nformats =ARRAY_SIZE (ispif_formats_8x96);
@@ -1157,15 +1166,16 @@ int msm_ispif_subdev_init(struct ispif_device *ispif, ispif->irq = r->start;snprintf (ispif->irq_name,sizeof (ispif->irq_name),"%s_%s" ,dev_name (dev),MSM_ISPIF_NAME ); -if (to_camss (ispif)->version == CAMSS_8x16) +if (camss->version == CAMSS_8x16) ret =devm_request_irq (dev, ispif->irq, ispif_isr_8x16,IRQF_TRIGGER_RISING , ispif->irq_name, ispif); -else if (to_camss (ispif)->version == CAMSS_8x96 || -to_camss (ispif)->version ==CAMSS_660 ) +else if (camss->version == CAMSS_8x96 || + camss->version ==CAMSS_660 ) ret =devm_request_irq (dev, ispif->irq, ispif_isr_8x96,IRQF_TRIGGER_RISING , ispif->irq_name, ispif);else ret = -EINVAL ; +if (ret <0 ) {dev_err (dev,"request_irq failed: %d\n" , ret);return ret;
@@ -1331,10 +1341,13 @@ static const struct media_entity_operations ispif_media_ops = {int msm_ispif_register_entities (struct ispif_device *ispif,struct v4l2_device *v4l2_dev) { -struct device *dev =to_device (ispif); +struct camss *camss = ispif->camss;int ret;int i; +if (!ispif) +return 0 ; +for (i =0 ; i < ispif->line_num; i++) {struct v4l2_subdev *sd = &ispif->line[i].subdev;struct media_pad *pads = ispif->line[i].pads;
@@ -1348,7 +1361,7 @@ int msm_ispif_register_entities(struct ispif_device *ispif, ret =ispif_init_formats (sd,NULL );if (ret <0 ) { -dev_err (dev,"Failed to init format: %d\n" , ret); +dev_err (camss->dev,"Failed to init format: %d\n" , ret); goto error; }
@@ -1360,13 +1373,15 @@ int msm_ispif_register_entities(struct ispif_device *ispif, ret =media_entity_pads_init (&sd->entity,MSM_ISPIF_PADS_NUM , pads);if (ret <0 ) { -dev_err (dev,"Failed to init media entity: %d\n" , ret); +dev_err (camss->dev,"Failed to init media entity: %d\n" , + ret); goto error; } ret =v4l2_device_register_subdev (v4l2_dev, sd);if (ret <0 ) { -dev_err (dev,"Failed to register subdev: %d\n" , ret); +dev_err (camss->dev,"Failed to register subdev: %d\n" , + ret);media_entity_cleanup (&sd->entity); goto error; }
@@ -1393,6 +1408,9 @@ void msm_ispif_unregister_entities(struct ispif_device *ispif) {int i; +if (!ispif) +return ; +mutex_destroy (&ispif->power_lock);mutex_destroy (&ispif->config_lock);
drivers/media/platform/qcom/camss/camss-ispif.h +2 -1
@@ -63,11 +63,12 @@ struct ispif_device {struct mutex config_lock;unsigned int line_num;struct ispif_line *line; +struct camss *camss; };struct resources_ispif ; -int msm_ispif_subdev_init (struct ispif_device *ispif, +int msm_ispif_subdev_init (struct camss *camss,const struct resources_ispif *res); int msm_ispif_register_entities(struct ispif_device *ispif,
drivers/media/platform/qcom/camss/camss.c +73 -38
159 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss.h +1 -1
@@ -79,7 +79,7 @@ struct camss {struct csiphy_device *csiphy;int csid_num;struct csid_device *csid; -struct ispif_device ispif; +struct ispif_device *ispif;int vfe_num;struct vfe_device *vfe;atomic_t ref_count;
Signature · 1 line
2.27.0
PATCH v3 5/22 media: camss: Refactor VFE HW version support
In reply to Robert FossIn order to support Qualcomm ISP hardware architectures that diverge from older architectures, the VFE subdevice driver needs to be refactored to better abstract the different ISP architectures.
Gen1 represents the CAMSS ISP architecture. The ISP architecture developed after CAMSS, Titan, will be referred to as Gen2.
---
Changes since v1
- kernel test robot: Re-add chunk missing from vfe_output_update_pong_addr
- Andrey: Fix file name error
- Andrey: Change hardware version number in comment
- Changed copyright year to 2021 for camss-vfe-4-8.c
drivers/media/platform/qcom/camss/Makefile | 2 + .../media/platform/qcom/camss/camss-vfe-4-1.c | 117 +- .../media/platform/qcom/camss/camss-vfe-4-7.c | 238 ++-- .../media/platform/qcom/camss/camss-vfe-4-8.c | 1166 +++++++++++++++++ .../platform/qcom/camss/camss-vfe-gen1.c | 763 +++++++++++ .../platform/qcom/camss/camss-vfe-gen1.h | 110 ++ drivers/media/platform/qcom/camss/camss-vfe.c | 770 +---------- drivers/media/platform/qcom/camss/camss-vfe.h | 113 +- 8 files changed, 2244 insertions(+), 1035 deletions(-) create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-4-8.c create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-gen1.c create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-gen1.h
drivers/media/platform/qcom/camss/Makefile +2 -0
@@ -10,6 +10,8 @@ qcom-camss-objs += \ camss-ispif.o \ camss-vfe-4-1.o \ camss-vfe-4-7.o \ + camss-vfe-4-8.o \ + camss-vfe-gen1.o \ camss-vfe.o \ camss-video.o \
drivers/media/platform/qcom/camss/camss-vfe-4-1.c +48 -69
151 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-vfe-4-7.c +76 -162
333 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-vfe-4-8.c new file +1166 -0
1,166 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-vfe-gen1.c new file +763 -0
763 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-vfe-gen1.h new file +110 -0
110 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-vfe.c +16 -754
469 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-vfe.h +63 -50
113 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.27.0
Part of the diff is not shown here. View the raw message.
Re: [PATCH v3 05/22] media: camss: Refactor VFE HW version support
Quoted 24 lines · Robert Foss
In order to support Qualcomm ISP hardware architectures that diverge from older architectures, the VFE subdevice driver needs to be refactored to better abstract the different ISP architectures.
Gen1 represents the CAMSS ISP architecture. The ISP architecture developed after CAMSS, Titan, will be referred to as Gen2.
Signed-off-by Robert Foss <[email protected]>---
[snip]drivers/media/platform/qcom/camss/camss-vfe-4-8.c new file +7
-0+/* +* vfe_isr - VFE module interrupt handler +* @irq: Interrupt line +* @dev: VFE device +* +* Return IRQ_HANDLED on success +*/
drivers/media/platform/qcom/camss/camss-vfe-4-8.c line 993
Quoted 10 lines
drivers/media/platform/qcom/camss/camss-vfe-4-8.c new file +10
-0+static irqreturn_t vfe_isr (int irq,void *dev) +{ +struct vfe_device *vfe = dev; +u32 value0, value1; +int i, j; + + vfe->ops->isr_read (vfe, &value0, &value1); + +trace_printk ("VFE: status0 = 0x%08x, status1 = 0x%08x\n" , + value0, value1);
Please do not use trace_printk in production code [1,2], it is only meant for debug use. Consider using trace events, or dev_dbg.
[1] https://elixir.bootlin.com/linux/v5.8/source/kernel/trace/trace.c#L3158
[2] https://elixir.bootlin.com/linux/v5.8/source/include/linux/kernel.h#L766
Quoted 1 line
[snip]
Re: [PATCH v3 05/22] media: camss: Refactor VFE HW version support
Hey Nicolas,
Thanks for the review!
Quoted 31 lines · Nicolas Boichat
Quoted 29 lines · Robert Foss
In order to support Qualcomm ISP hardware architectures that diverge from older architectures, the VFE subdevice driver needs to be refactored to better abstract the different ISP architectures.
Gen1 represents the CAMSS ISP architecture. The ISP architecture developed after CAMSS, Titan, will be referred to as Gen2.
Signed-off-by Robert Foss <[email protected]>---
[snip]drivers/media/platform/qcom/camss/camss-vfe-4-8.c new file +12
-0+/* +* vfe_isr - VFE module interrupt handler +* @irq: Interrupt line +* @dev: VFE device +* +* Return IRQ_HANDLED on success +*/ +static irqreturn_t vfe_isr (int irq,void *dev) +{ +struct vfe_device *vfe = dev; +u32 value0, value1; +int i, j;
Quoted 8 lines
drivers/media/platform/qcom/camss/camss-vfe-4-8.c line 993
Quoted 5 lines
drivers/media/platform/qcom/camss/camss-vfe-4-8.c new file +5
-0+ + vfe->ops->isr_read (vfe, &value0, &value1); + +trace_printk ("VFE: status0 = 0x%08x, status1 = 0x%08x\n" , + value0, value1);Please do not use
trace_printkin production code [1,2], it is only meant for debug use. Consider using trace events, ordev_dbg.
Ack, this is a copy paste error, I'll add a commit fixing all occurrences of this in the driver
Quoted 5 lines
[1] https://elixir.bootlin.com/linux/v5.8/source/kernel/trace/trace.c#L3158
[2] https://elixir.bootlin.com/linux/v5.8/source/include/linux/kernel.h#L766Quoted 1 line
[snip]
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v3 6/22 media: camss: Add support for VFE hardware version Titan 170
In reply to Robert FossAdd register definitions for version 170 of the Titan architecture and implement support for the RDI output mode.
The RDI mode as opposed to the PIX output mode for the VFE unit does not support any ISP functionality. This means essentially only supporting dumping the output of the whatever the CSI decoder receives from the sensor.
For example will a sensor outputting YUV pixel format frames, only allow the VFE to dump those frames as they are received by the ISP to memory through the RDI interface.
---
Changes since v1:
- Andrey: Removed commented out chunk
- Remove left over WIP comments
drivers/media/platform/qcom/camss/Makefile | 1 + .../media/platform/qcom/camss/camss-vfe-170.c | 805 ++++++++++++++++++ drivers/media/platform/qcom/camss/camss-vfe.c | 59 +- drivers/media/platform/qcom/camss/camss-vfe.h | 25 +- .../media/platform/qcom/camss/camss-video.c | 100 +++ drivers/media/platform/qcom/camss/camss.c | 61 ++ 6 files changed, 1031 insertions(+), 20 deletions(-) create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-170.c
drivers/media/platform/qcom/camss/Makefile +1 -0
@@ -11,6 +11,7 @@ qcom-camss-objs += \ camss-vfe-4-1.o \ camss-vfe-4-7.o \ camss-vfe-4-8.o \ + camss-vfe-170.o \ camss-vfe-gen1.o \ camss-vfe.o \ camss-video.o \
drivers/media/platform/qcom/camss/camss-vfe-170.c new file +805 -0
805 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-vfe.c +50 -9
95 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-vfe.h +14 -11
@@ -19,7 +19,6 @@#include "camss-video.h" #include "camss-vfe-gen1.h" -#define MSM_VFE_PAD_SINK 0#define MSM_VFE_PAD_SRC 1#define MSM_VFE_PADS_NUM 2
@@ -39,14 +38,14 @@#define to_vfe (ptr_line) \ container_of(vfe_line_array(ptr_line), struct vfe_device, line) -enum vfe_output_state {VFE_OUTPUT_OFF ,VFE_OUTPUT_RESERVED ,VFE_OUTPUT_SINGLE ,VFE_OUTPUT_CONTINUOUS ,VFE_OUTPUT_IDLE , -VFE_OUTPUT_STOPPING +VFE_OUTPUT_STOPPING , +VFE_OUTPUT_ON , };enum vfe_line_id {
@@ -72,6 +71,9 @@ struct vfe_output {int active_buf;int wait_sof; } gen1; +struct { +int active_num; + } gen2; };enum vfe_output_state state;unsigned int sequence;
@@ -169,14 +171,6 @@ void vfe_buf_add_pending(struct vfe_output *output, struct camss_buffer *buffer)struct camss_buffer *vfe_buf_get_pending (struct vfe_output *output); -/* -* vfe_disable - Disable streaming on VFE line -* @line: VFE line -* -* Return 0 on success or a negative error code otherwise -*/ -int vfe_disable (struct vfe_line *line); -int vfe_flush_buffers (struct camss_video *vid,enum vb2_buffer_state state);/*
@@ -191,8 +185,17 @@ int vfe_put_output(struct vfe_line *line);int vfe_release_wm (struct vfe_device *vfe,u8 wm);int vfe_reserve_wm (struct vfe_device *vfe,enum vfe_line_id line_id); +/* +* vfe_reset - Trigger reset on VFE module and wait to complete +* @vfe: VFE device +* +* Return 0 on success or a negative error code otherwise +*/ +int vfe_reset (struct vfe_device *vfe); +extern const struct vfe_hw_ops vfe_ops_4_1;extern const struct vfe_hw_ops vfe_ops_4_7;extern const struct vfe_hw_ops vfe_ops_4_8; +extern const struct vfe_hw_ops vfe_ops_170;#endif /* QC_MSM_CAMSS_VFE_H */
drivers/media/platform/qcom/camss/camss-video.c +100 -0
118 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss.c +61 -0
67 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH v3 7/22 media: camss: Add missing format identifiers
In reply to Robert FossThe CSI-2 spec defines the following types:
- Data Type - Often abbreviated DT
- Decode Format - Often abbreviated as DF
- Encode Format
These definitions are as far as I can tell complete for CSI-2.
Additionally the Qualcomm internal type describing Plain Formats has been added. Plain formats describe the size of the pixels written by the RDI units to memory. PLAIN8 for example has the size 8 bits, and PLAIN32 32 bits. The appropriate Plain Format is determined by the Decode Format used. The smallest Plain Format that is able to contain a pixel of the used Decode Format is the appropriate one to use.
--- .../media/platform/qcom/camss/camss-csid.h | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+)
drivers/media/platform/qcom/camss/camss-csid.h +50 -0
@@ -21,6 +21,56 @@#define MSM_CSID_PAD_SRC 1#define MSM_CSID_PADS_NUM 2 +#define DATA_TYPE_EMBEDDED_DATA_8BIT 0x12 +#define DATA_TYPE_YUV420_8BIT 0x18 +#define DATA_TYPE_YUV420_10BIT 0x19 +#define DATA_TYPE_YUV420_8BIT_LEGACY 0x1a +#define DATA_TYPE_YUV420_8BIT_SHIFTED 0x1c/* Chroma Shifted Pixel Sampling */ +#define DATA_TYPE_YUV420_10BIT_SHIFTED 0x1d/* Chroma Shifted Pixel Sampling */ +#define DATA_TYPE_YUV422_8BIT 0x1e +#define DATA_TYPE_YUV422_10BIT 0x1f +#define DATA_TYPE_RGB444 0x20 +#define DATA_TYPE_RGB555 0x21 +#define DATA_TYPE_RGB565 0x22 +#define DATA_TYPE_RGB666 0x23 +#define DATA_TYPE_RGB888 0x24 +#define DATA_TYPE_RAW_24BIT 0x27 +#define DATA_TYPE_RAW_6BIT 0x28 +#define DATA_TYPE_RAW_7BIT 0x29 +#define DATA_TYPE_RAW_8BIT 0x2a +#define DATA_TYPE_RAW_10BIT 0x2b +#define DATA_TYPE_RAW_12BIT 0x2c +#define DATA_TYPE_RAW_14BIT 0x2d +#define DATA_TYPE_RAW_16BIT 0x2e +#define DATA_TYPE_RAW_20BIT 0x2f + +#define DECODE_FORMAT_UNCOMPRESSED_6_BIT 0x0 +#define DECODE_FORMAT_UNCOMPRESSED_8_BIT 0x1 +#define DECODE_FORMAT_UNCOMPRESSED_10_BIT 0x2 +#define DECODE_FORMAT_UNCOMPRESSED_12_BIT 0x3 +#define DECODE_FORMAT_UNCOMPRESSED_14_BIT 0x4 +#define DECODE_FORMAT_UNCOMPRESSED_16_BIT 0x5 +#define DECODE_FORMAT_UNCOMPRESSED_20_BIT 0x6 +#define DECODE_FORMAT_DPCM_10_6_10 0x7 +#define DECODE_FORMAT_DPCM_10_8_10 0x8 +#define DECODE_FORMAT_DPCM_12_6_12 0x9 +#define DECODE_FORMAT_DPCM_12_8_12 0xA +#define DECODE_FORMAT_DPCM_14_8_14 0xB +#define DECODE_FORMAT_DPCM_14_10_14 0xC +#define DECODE_FORMAT_USER_DEFINED 0xE +#define DECODE_FORMAT_PAYLOAD_ONLY 0xF + +#define ENCODE_FORMAT_RAW_8_BIT 0x1 +#define ENCODE_FORMAT_RAW_10_BIT 0x2 +#define ENCODE_FORMAT_RAW_12_BIT 0x3 +#define ENCODE_FORMAT_RAW_14_BIT 0x4 +#define ENCODE_FORMAT_RAW_16_BIT 0x5 + +#define PLAIN_FORMAT_PLAIN8 0x0/* supports DPCM, UNCOMPRESSED_6/8_BIT */ +#define PLAIN_FORMAT_PLAIN16 0x1/* supports DPCM, UNCOMPRESSED_10/16_BIT */ +#define PLAIN_FORMAT_PLAIN32 0x2/* supports UNCOMPRESSED_20_BIT */ + +enum csid_payload_mode {CSID_PAYLOAD_MODE_INCREMENTING =0 ,CSID_PAYLOAD_MODE_ALTERNATING_55_AA =1 ,
Signature · 1 line
2.27.0
PATCH v3 8/22 media: camss: Refactor CSID HW version support
In reply to Robert FossIn order to support Qualcomm ISP hardware architectures that diverge from older architectures, the CSID subdevice drivers needs to be refactored to better abstract the different ISP hardware architectures.
---
Changes since v1
- kernel test robot: Add missing include, interrupt.h
drivers/media/platform/qcom/camss/Makefile | 2 + .../platform/qcom/camss/camss-csid-4-1.c | 338 ++++++++++ .../platform/qcom/camss/camss-csid-4-7.c | 406 ++++++++++++ .../media/platform/qcom/camss/camss-csid.c | 616 +----------------- .../media/platform/qcom/camss/camss-csid.h | 126 +++- 5 files changed, 898 insertions(+), 590 deletions(-) create mode 100644 drivers/media/platform/qcom/camss/camss-csid-4-1.c create mode 100644 drivers/media/platform/qcom/camss/camss-csid-4-7.c
drivers/media/platform/qcom/camss/Makefile +2 -0
@@ -4,6 +4,8 @@ qcom-camss-objs += \ camss.o \ camss-csid.o \ + camss-csid-4-1.o \ + camss-csid-4-7.o \ camss-csiphy-2ph-1-0.o \ camss-csiphy-3ph-1-0.o \ camss-csiphy.o \
drivers/media/platform/qcom/camss/camss-csid-4-1.c new file +338 -0
338 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-csid-4-7.c new file +406 -0
406 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-csid.c +28 -588
733 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-csid.h +124 -2
169 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH v3 9/22 media: camss: Add support for CSID hardware version Titan 170
In reply to Robert FossAdd register definitions for version 170 of the Titan architecture and implement support for the CSID subdevice.
--- drivers/media/platform/qcom/camss/Makefile | 1 + .../platform/qcom/camss/camss-csid-170.c | 602 ++++++++++++++++++ .../media/platform/qcom/camss/camss-csid.c | 4 + .../media/platform/qcom/camss/camss-csid.h | 2 + .../media/platform/qcom/camss/camss-vfe-170.c | 1 - drivers/media/platform/qcom/camss/camss.c | 62 ++ 6 files changed, 671 insertions(+), 1 deletion(-) create mode 100644 drivers/media/platform/qcom/camss/camss-csid-170.c
drivers/media/platform/qcom/camss/Makefile +1 -0
@@ -6,6 +6,7 @@ qcom-camss-objs += \ camss-csid.o \ camss-csid-4-1.o \ camss-csid-4-7.o \ + camss-csid-170.o \ camss-csiphy-2ph-1-0.o \ camss-csiphy-3ph-1-0.o \ camss-csiphy.o \
drivers/media/platform/qcom/camss/camss-csid-170.c new file +602 -0
602 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-csid.c +4 -0
@@ -123,6 +123,8 @@ static int csid_set_clock_rates(struct csid_device *csid)dev_err (dev,"clk set rate failed: %d\n" , ret);return ret; } + }else if (clock->nfreqs) { +clk_set_rate (clock->clk, clock->freq[0 ]); } }
@@ -544,6 +546,8 @@ int msm_csid_subdev_init(struct camss *camss, struct csid_device *csid, }else if (camss->version == CAMSS_8x96 || camss->version ==CAMSS_660 ) { csid->ops = &csid_ops_4_7; + }else if (camss->version ==CAMSS_845 ) { + csid->ops = &csid_ops_170; }else {return -EINVAL ; }
drivers/media/platform/qcom/camss/camss-csid.h +2 -0
@@ -245,5 +245,7 @@ void msm_csid_get_csid_id(struct media_entity *entity, u8 *id);extern const struct csid_hw_ops csid_ops_4_1;extern const struct csid_hw_ops csid_ops_4_7; +extern const struct csid_hw_ops csid_ops_170; +#endif /* QC_MSM_CAMSS_CSID_H */
drivers/media/platform/qcom/camss/camss-vfe-170.c +0 -1
@@ -277,7 +277,6 @@ static void vfe_wm_start(struct vfe_device *vfe, u8 wm, struct vfe_line *line)writel_relaxed (val, vfe->base +VFE_BUS_WM_PACKER_CFG (wm));// XXX 1 for PLAIN8? /* Configure stride for RDIs */ -//val = pix->plane_fmt[0].bytesperline; val =WM_STRIDE_DEFAULT_STRIDE ;writel_relaxed (val, vfe->base +VFE_BUS_WM_STRIDE (wm));
drivers/media/platform/qcom/camss/camss.c +62 -0
68 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH v3 10/22 media: camss: Add support for CSIPHY hardware version Titan 170
In reply to Robert FossAdd register definitions for version 170 of the Titan architecture and implement support for the CSIPHY subdevice.
--- .../qcom/camss/camss-csiphy-3ph-1-0.c | 182 ++++++++++++++++-- .../media/platform/qcom/camss/camss-csiphy.c | 66 +++++-- drivers/media/platform/qcom/camss/camss.c | 74 +++++++ 3 files changed, 290 insertions(+), 32 deletions(-)
drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +164 -18
@@ -47,6 +47,105 @@#define CSIPHY_3PH_CMN_CSI_COMMON_CTRL6_SHOW_REV_ID BIT(1)#define CSIPHY_3PH_CMN_CSI_COMMON_STATUSn (n) (0x8b0 + 0x4 * (n)) +#define CSIPHY_DEFAULT_PARAMS 0 +#define CSIPHY_LANE_ENABLE 1 +#define CSIPHY_SETTLE_CNT_LOWER_BYTE 2 +#define CSIPHY_SETTLE_CNT_HIGHER_BYTE 3 +#define CSIPHY_DNP_PARAMS 4 +#define CSIPHY_2PH_REGS 5 +#define CSIPHY_3PH_REGS 6 + +struct csiphy_reg_t { +int32_t reg_addr; +int32_t reg_data; +int32_t delay; +uint32_t csiphy_param_type; +}; + +static struct +csiphy_reg_t lane_regs_sdm845[5 ][14 ] = { + { + {0x0004 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x002C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0034 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x001C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0014 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0028 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x003C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0000 ,0x91 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0008 ,0x00 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x000c ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x0010 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0038 ,0xFE ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0060 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0064 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0704 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x072C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0734 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x071C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0714 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0728 ,0x04 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x073C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0700 ,0x80 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0708 ,0x14 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x070C ,0xA5 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0710 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0738 ,0x1F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0760 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0764 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0204 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x022C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0234 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x021C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0214 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0228 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x023C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0200 ,0x91 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0208 ,0x00 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x020C ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x0210 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0238 ,0xFE ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0260 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0264 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0404 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x042C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0434 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x041C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0414 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0428 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x043C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0400 ,0x91 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0408 ,0x00 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x040C ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x0410 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0438 ,0xFE ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0460 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0464 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0604 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x062C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0634 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x061C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0614 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0628 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x063C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0600 ,0x91 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0608 ,0x00 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x060C ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x0610 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0638 ,0xFE ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0660 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0664 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, +}; +static void csiphy_hw_version_read (struct csiphy_device *csiphy,struct device *dev) {
@@ -135,26 +234,13 @@ static u8 csiphy_settle_cnt_calc(u32 pixel_clock, u8 bpp, u8 num_lanes,return settle_cnt; } -static void csiphy_lanes_enable (struct csiphy_device *csiphy, -struct csiphy_config *cfg, -u32 pixel_clock,u8 bpp,u8 lane_mask) +static void csiphy_gen1_config_lanes (struct csiphy_device *csiphy, +struct csiphy_config *cfg, +u8 settle_cnt) {struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; -u8 settle_cnt; -u8 val, l =0 ; -int i; - - settle_cnt =csiphy_settle_cnt_calc (pixel_clock, bpp, c->num_data, - csiphy->timer_clk_rate); - - val =BIT (c->clk.pos); -for (i =0 ; i < c->num_data; i++) - val |=BIT (c->data[i].pos *2 ); - -writel_relaxed (val, csiphy->base +CSIPHY_3PH_CMN_CSI_COMMON_CTRLn (5 )); - - val =CSIPHY_3PH_CMN_CSI_COMMON_CTRL6_COMMON_PWRDN_B ; -writel_relaxed (val, csiphy->base +CSIPHY_3PH_CMN_CSI_COMMON_CTRLn (6 )); +int i, l =0 ; +u8 val;for (i =0 ; i <= c->num_data; i++) {if (i == c->num_data)
@@ -208,6 +294,66 @@ static void csiphy_lanes_enable(struct csiphy_device *csiphy, val = CSIPHY_3PH_LNn_MISC1_IS_CLKLANE;writel_relaxed (val, csiphy->base +CSIPHY_3PH_LNn_MISC1 (l)); +} + +static void csiphy_gen2_config_lanes (struct csiphy_device *csiphy, +u8 settle_cnt) +{ +int i, l; +u32 val; + +for (l =0 ; l <5 ; l++) { +for (i =0 ; i <14 ; i++) { +struct csiphy_reg_t *r = &lane_regs_sdm845[l][i]; + +switch (r->csiphy_param_type) { +case CSIPHY_SETTLE_CNT_LOWER_BYTE : + val = settle_cnt &0xff ; +break ; +case CSIPHY_DNP_PARAMS : +continue ; +default : + val = r->reg_data; +break ; + } +writel_relaxed (val, csiphy->base + r->reg_addr); + } + } +} + +static void csiphy_lanes_enable (struct csiphy_device *csiphy, +struct csiphy_config *cfg, +u32 pixel_clock,u8 bpp,u8 lane_mask) +{ +struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; +u8 settle_cnt; +u8 val; +int i; + + settle_cnt =csiphy_settle_cnt_calc (pixel_clock, bpp, c->num_data, + csiphy->timer_clk_rate); + + val =BIT (c->clk.pos); +for (i =0 ; i < c->num_data; i++) + val |=BIT (c->data[i].pos *2 ); + + val =0xd5 ; +writel_relaxed (val, csiphy->base +CSIPHY_3PH_CMN_CSI_COMMON_CTRLn (5 )); + + val =1 ; +writel_relaxed (val, csiphy->base +CSIPHY_3PH_CMN_CSI_COMMON_CTRLn (6 )); + + val =0x02 ; +writel_relaxed (val, csiphy->base +CSIPHY_3PH_CMN_CSI_COMMON_CTRLn (7 )); + + val =0x00 ; +writel_relaxed (val, csiphy->base +CSIPHY_3PH_CMN_CSI_COMMON_CTRLn (0 )); + +if (csiphy->camss->version == CAMSS_8x16 || + csiphy->camss->version == CAMSS_8x96) +csiphy_gen1_config_lanes (csiphy, cfg, settle_cnt); +else if (csiphy->camss->version ==CAMSS_845 ) +csiphy_gen2_config_lanes (csiphy, settle_cnt); val =0xff ;writel_relaxed (val, csiphy->base +CSIPHY_3PH_CMN_CSI_COMMON_CTRLn (11 ));
drivers/media/platform/qcom/camss/camss-csiphy.c +52 -14
91 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss.c +74 -0
80 lines not on this page · raw message
Signature · 1 line
2.27.0
Re: [PATCH v3 10/22] media: camss: Add support for CSIPHY hardware version Titan 170
Hi Robert,
Quoted 24 lines · Robert Foss
Add register definitions for version 170 of the Titan architecture and implement support for the CSIPHY subdevice.
Signed-off-by Robert Foss <[email protected]>--- .../qcom/camss/camss-csiphy-3ph-1-0.c | 182 ++++++++++++++++-- .../media/platform/qcom/camss/camss-csiphy.c | 66 +++++-- drivers/media/platform/qcom/camss/camss.c | 74 +++++++ 3 files changed, 290 insertions(+), 32 deletions(-)drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +6
-0@@ -47,6 +47,105 @@#define CSIPHY_3PH_CMN_CSI_COMMON_CTRL6_SHOW_REV_ID BIT(1)#define CSIPHY_3PH_CMN_CSI_COMMON_STATUSn (n) (0x8b0 + 0x4 * (n)) +#define CSIPHY_DEFAULT_PARAMS 0 +#define CSIPHY_LANE_ENABLE 1 +#define CSIPHY_SETTLE_CNT_LOWER_BYTE 2 +#define CSIPHY_SETTLE_CNT_HIGHER_BYTE 3 +#define CSIPHY_DNP_PARAMS 4 +#define CSIPHY_2PH_REGS 5
drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c line 65
Quoted 10 lines
drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +10
-0+#define CSIPHY_3PH_REGS 6 + +struct csiphy_reg_t { +int32_t reg_addr; +int32_t reg_data; +int32_t delay; +uint32_t csiphy_param_type; +}; + +static struct
This should be const.
Quoted 82 lines
drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +82
-0+csiphy_reg_t lane_regs_sdm845[5 ][14 ] = { + { + {0x0004 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x002C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0034 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x001C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0014 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0028 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x003C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0000 ,0x91 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0008 ,0x00 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x000c ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x0010 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0038 ,0xFE ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0060 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0064 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0704 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x072C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0734 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x071C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0714 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0728 ,0x04 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x073C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0700 ,0x80 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0708 ,0x14 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x070C ,0xA5 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0710 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0738 ,0x1F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0760 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0764 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0204 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x022C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0234 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x021C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0214 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0228 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x023C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0200 ,0x91 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0208 ,0x00 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x020C ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x0210 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0238 ,0xFE ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0260 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0264 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0404 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x042C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0434 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x041C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0414 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0428 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x043C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0400 ,0x91 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0408 ,0x00 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x040C ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x0410 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0438 ,0xFE ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0460 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0464 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0604 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x062C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0634 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x061C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0614 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0628 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x063C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0600 ,0x91 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0608 ,0x00 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x060C ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x0610 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0638 ,0xFE ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0660 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0664 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, +};
Signature · 1 line
Sakari Ailus
Re: [PATCH v3 10/22] media: camss: Add support for CSIPHY hardware version Titan 170
Hey Sakari,
Quoted 32 lines · Sakari Ailus
Hi Robert,
Quoted 28 lines · Robert Foss
Add register definitions for version 170 of the Titan architecture and implement support for the CSIPHY subdevice.
Signed-off-by Robert Foss <[email protected]>--- .../qcom/camss/camss-csiphy-3ph-1-0.c | 182 ++++++++++++++++-- .../media/platform/qcom/camss/camss-csiphy.c | 66 +++++-- drivers/media/platform/qcom/camss/camss.c | 74 +++++++ 3 files changed, 290 insertions(+), 32 deletions(-)drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +10
-0@@ -47,6 +47,105 @@#define CSIPHY_3PH_CMN_CSI_COMMON_CTRL6_SHOW_REV_ID BIT(1)#define CSIPHY_3PH_CMN_CSI_COMMON_STATUSn (n) (0x8b0 + 0x4 * (n)) +#define CSIPHY_DEFAULT_PARAMS 0 +#define CSIPHY_LANE_ENABLE 1 +#define CSIPHY_SETTLE_CNT_LOWER_BYTE 2 +#define CSIPHY_SETTLE_CNT_HIGHER_BYTE 3 +#define CSIPHY_DNP_PARAMS 4 +#define CSIPHY_2PH_REGS 5 +#define CSIPHY_3PH_REGS 6 + +struct csiphy_reg_t { +int32_t reg_addr;
Quoted 8 lines
drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c line 65
Quoted 6 lines
drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +6
-0+int32_t reg_data; +int32_t delay; +uint32_t csiphy_param_type; +}; + +static structThis should be const.
Agreed. Thanks for catching this!
Quoted 86 lines
Quoted 73 lines
drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +72
-0+csiphy_reg_t lane_regs_sdm845[5 ][14 ] = { + { + {0x0004 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x002C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0034 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x001C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0014 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0028 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x003C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0000 ,0x91 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0008 ,0x00 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x000c ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x0010 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0038 ,0xFE ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0060 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0064 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0704 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x072C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0734 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x071C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0714 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0728 ,0x04 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x073C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0700 ,0x80 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0708 ,0x14 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x070C ,0xA5 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0710 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0738 ,0x1F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0760 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0764 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0204 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x022C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0234 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x021C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0214 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0228 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x023C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0200 ,0x91 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0208 ,0x00 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x020C ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x0210 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0238 ,0xFE ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0260 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0264 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0404 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x042C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0434 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x041C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0414 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0428 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x043C ,0xB8 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0400 ,0x91 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0408 ,0x00 ,0x00 ,CSIPHY_SETTLE_CNT_LOWER_BYTE }, + {0x040C ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS }, + {0x0410 ,0x52 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0438 ,0xFE ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0460 ,0x00 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0464 ,0x7F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + }, + { + {0x0604 ,0x0C ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x062C ,0x01 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0634 ,0x0F ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x061C ,0x0A ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0614 ,0x60 ,0x00 ,CSIPHY_DEFAULT_PARAMS }, + {0x0628 ,0x00 ,0x00 ,CSIPHY_DNP_PARAMS },drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c line 147
Quoted 10 lines
drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +10
-0+ {0x063C, 0xB8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0600, 0x91, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0608, 0x00, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x060C, 0x00, 0x00, CSIPHY_DNP_PARAMS}, + {0x0610, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0638, 0xFE, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0660, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0664, 0x7F, 0x00, CSIPHY_DEFAULT_PARAMS}, + }, +};--
Sakari Ailus
PATCH v3 11/22 media: camss: Remove per VFE power domain toggling
In reply to Robert FossFor Titan ISPs clocks fail to re-enable during vfe_get() after any vfe has been halted and its corresponding power domain power has been detached.
Since all of the clocks depend on all of the PDs, per VFE PD detaching is no option for this generation of HW.
--- .../media/platform/qcom/camss/camss-ispif.c | 11 --- drivers/media/platform/qcom/camss/camss-vfe.c | 7 -- drivers/media/platform/qcom/camss/camss.c | 94 +++++++++++-------- drivers/media/platform/qcom/camss/camss.h | 12 +-- 4 files changed, 60 insertions(+), 64 deletions(-)
drivers/media/platform/qcom/camss/camss-ispif.c +0 -11
@@ -323,14 +323,6 @@ static int ispif_reset(struct ispif_device *ispif, u8 vfe_id)struct camss *camss = ispif->camss;int ret; - ret =camss_pm_domain_on (camss,PM_DOMAIN_VFE0 ); -if (ret <0 ) -return ret; - - ret =camss_pm_domain_on (camss,PM_DOMAIN_VFE1 ); -if (ret <0 ) -return ret; - ret =camss_enable_clocks (ispif->nclocks_for_reset, ispif->clock_for_reset, camss->dev);
@@ -343,9 +335,6 @@ static int ispif_reset(struct ispif_device *ispif, u8 vfe_id)camss_disable_clocks (ispif->nclocks_for_reset, ispif->clock_for_reset); -camss_pm_domain_off (camss,PM_DOMAIN_VFE0 ); -camss_pm_domain_off (camss,PM_DOMAIN_VFE1 ); -return ret; }
drivers/media/platform/qcom/camss/camss-vfe.c +0 -7
@@ -587,10 +587,6 @@ static int vfe_get(struct vfe_device *vfe)mutex_lock (&vfe->power_lock);if (vfe->power_count ==0 ) { - ret =camss_pm_domain_on (vfe->camss, vfe->id); -if (ret <0 ) - goto error_pm_domain; - ret =pm_runtime_get_sync (vfe->camss->dev);if (ret <0 ) goto error_pm_runtime_get;
@@ -627,9 +623,7 @@ static int vfe_get(struct vfe_device *vfe) error_pm_runtime_get:pm_runtime_put_sync (vfe->camss->dev); -camss_pm_domain_off (vfe->camss, vfe->id); -error_pm_domain:mutex_unlock (&vfe->power_lock);return ret;
@@ -653,7 +647,6 @@ static void vfe_put(struct vfe_device *vfe) }camss_disable_clocks (vfe->nclocks, vfe->clock);pm_runtime_put_sync (vfe->camss->dev); -camss_pm_domain_off (vfe->camss, vfe->id); } vfe->power_count--;
drivers/media/platform/qcom/camss/camss.c +55 -39
124 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss.h +5 -7
@@ -57,9 +57,9 @@ struct resources_ispif { };enum pm_domain { -PM_DOMAIN_VFE0 , -PM_DOMAIN_VFE1 , -PM_DOMAIN_COUNT +PM_DOMAIN_VFE0 =0 , +PM_DOMAIN_VFE1 =1 , +PM_DOMAIN_CAMSS_COUNT =2 ,/* CAMSS series of ISPs */ };enum camss_version {
@@ -83,8 +83,8 @@ struct camss {int vfe_num;struct vfe_device *vfe;atomic_t ref_count; -struct device *genpd[PM_DOMAIN_COUNT ]; -struct device_link *genpd_link[PM_DOMAIN_COUNT ]; +struct device *genpd[PM_DOMAIN_CAMSS_COUNT ]; +struct device_link *genpd_link[PM_DOMAIN_CAMSS_COUNT ]; };struct camss_camera_interface {
@@ -110,8 +110,6 @@ int camss_enable_clocks(int nclocks, struct camss_clock *clock,void camss_disable_clocks (int nclocks,struct camss_clock *clock);struct media_entity *camss_find_sensor (struct media_entity *entity);int camss_get_pixel_clock (struct media_entity *entity,u32 *pixel_clock); -int camss_pm_domain_on (struct camss *camss,int id); -void camss_pm_domain_off (struct camss *camss,int id);void camss_delete (struct camss *camss);#endif /* QC_MSM_CAMSS_H */
Signature · 1 line
2.27.0
PATCH v3 12/22 media: camss: Enable SDM845
In reply to Robert FossEnable support for SDM845 based Titan 170 ISPs.
--- drivers/media/platform/qcom/camss/camss.c | 17 +++++++++++++++++ drivers/media/platform/qcom/camss/camss.h | 6 ++++-- 2 files changed, 21 insertions(+), 2 deletions(-)
drivers/media/platform/qcom/camss/camss.c +17 -0
@@ -897,6 +897,12 @@ static int camss_init_subdevices(struct camss *camss) csid_res = csid_res_660; ispif_res = &ispif_res_660; vfe_res = vfe_res_660; + }else if (camss->version ==CAMSS_845 ) { + csiphy_res = csiphy_res_845; + csid_res = csid_res_845; +/* Titan VFEs don't have an ISPIF */ + ispif_res =NULL ; + vfe_res = vfe_res_845; }else {return -EINVAL ; }
@@ -1203,6 +1209,8 @@ static int camss_configure_pd(struct camss *camss)if (camss->version == CAMSS_8x96 || camss->version ==CAMSS_660 ) nbr_pm_domains =PM_DOMAIN_CAMSS_COUNT ; +else if (camss->version ==CAMSS_845 ) + nbr_pm_domains =PM_DOMAIN_TITAN_COUNT ;for (i =0 ; i < nbr_pm_domains; i++) { camss->genpd[i] =dev_pm_domain_attach_by_id (camss->dev, i);
@@ -1271,6 +1279,12 @@ static int camss_probe(struct platform_device *pdev) camss->csiphy_num =3 ; camss->csid_num =4 ; camss->vfe_num =2 ; + }else if (of_device_is_compatible (dev->of_node, +"qcom,sdm845-camss" )) { + camss->version =CAMSS_845 ; + camss->csiphy_num =4 ; + camss->csid_num =3 ; + camss->vfe_num =3 ; }else { ret = -EINVAL ; goto err_free;
@@ -1402,6 +1416,8 @@ void camss_delete(struct camss *camss)if (camss->version == CAMSS_8x96 || camss->version ==CAMSS_660 ) nbr_pm_domains =PM_DOMAIN_CAMSS_COUNT ; +else if (camss->version ==CAMSS_845 ) + nbr_pm_domains =PM_DOMAIN_TITAN_COUNT ;for (i =0 ; i < nbr_pm_domains; i++) {device_link_del (camss->genpd_link[i]);
@@ -1435,6 +1451,7 @@ static const struct of_device_id camss_dt_match[] = { { .compatible = "qcom,msm8916-camss" }, { .compatible = "qcom,msm8996-camss" }, { .compatible = "qcom,sdm660-camss" }, + { .compatible = "qcom,sdm845-camss" }, { } };
drivers/media/platform/qcom/camss/camss.h +4 -2
@@ -60,6 +60,8 @@ enum pm_domain {PM_DOMAIN_VFE0 =0 ,PM_DOMAIN_VFE1 =1 ,PM_DOMAIN_CAMSS_COUNT =2 ,/* CAMSS series of ISPs */ +PM_DOMAIN_VFELITE =2 ,/* VFELITE / TOP GDSC */ + PM_DOMAIN_TITAN_COUNT = 3, /* Titan series of ISPs */ }; enum camss_version {
@@ -83,8 +85,8 @@ struct camss {int vfe_num;struct vfe_device *vfe;atomic_t ref_count; -struct device *genpd[PM_DOMAIN_CAMSS_COUNT ]; -struct device_link *genpd_link[PM_DOMAIN_CAMSS_COUNT ]; +struct device *genpd[PM_DOMAIN_TITAN_COUNT ]; +struct device_link *genpd_link[PM_DOMAIN_TITAN_COUNT ]; };struct camss_camera_interface {
Signature · 1 line
2.27.0
PATCH v3 13/22 dt-bindings: media: camss: Add qcom,msm8916-camss binding
In reply to Robert FossAdd bindings for qcom,msm8916-camss in order to support the camera subsystem on MSM8916.
---
Changes since v2:
- Remove redundant descriptions
- Add power domain description
- Make clock-lanes a constant
- Add max & minItems to data-lanes
- Remove ports requirement - endpoint & reg
- Rework to conform to new port schema
.../bindings/media/qcom,msm8916-camss.yaml | 256 ++++++++++++++++++ 1 file changed, 256 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8916-camss.yaml
Documentation/devicetree/bindings/media/qcom,msm8916-camss.yaml new file +256 -0
@@ -0,0 +1,256 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/media/qcom,msm8916-camss.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm CAMSS ISP + +maintainers: + - Robert Foss <[email protected]> + - Todor Tomov <[email protected]> + +description: | + The CAMSS IP is a CSI decoder and ISP present on Qualcomm platforms + +properties: + compatible: + const: qcom,msm8916-camss + + clocks: + minItems: 19 + maxItems: 19 + + clock-names: + items: + - const: top_ahb + - const: ispif_ahb + - const: csiphy0_timer + - const: csiphy1_timer + - const: csi0_ahb + - const: csi0 + - const: csi0_phy + - const: csi0_pix + - const: csi0_rdi + - const: csi1_ahb + - const: csi1 + - const: csi1_phy + - const: csi1_pix + - const: csi1_rdi + - const: ahb + - const: vfe0 + - const: csi_vfe0 + - const: vfe_ahb + - const: vfe_axi + + interrupts: + minItems: 6 + maxItems: 6 + + interrupt-names: + items: + - const: csiphy0 + - const: csiphy1 + - const: csid0 + - const: csid1 + - const: ispif + - const: vfe0 + + iommus: + maxItems: 1 + + power-domains: + items: + - description: VFE GDSC - Video Front End, Global Distributed Switch Controller. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + description: + CSI input ports. + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + items: + - const: 1 + + data-lanes: + description: + An array of physical data lanes indexes. + Position of an entry determines the logical + lane number, while the value of an entry + indicates physical lane index. Lane swapping + is supported. Physical lane indexes; + 0, 2, 3, 4. + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + items: + - const: 1 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + reg: + minItems: 9 + maxItems: 9 + + reg-names: + items: + - const: csiphy0 + - const: csiphy0_clk_mux + - const: csiphy1 + - const: csiphy1_clk_mux + - const: csid0 + - const: csid1 + - const: ispif + - const: csi_clk_mux + - const: vfe0 + + vdda-supply: + description: + Definition of the regulator used as analog power supply. + +required: + - clock-names + - clocks + - compatible + - interrupt-names + - interrupts + - iommus + - power-domains + - reg + - reg-names + - vdda-supply + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/qcom,gcc-msm8916.h> + + camss: camss@1b00000 { + compatible = "qcom,msm8916-camss"; + + clocks = <&gcc GCC_CAMSS_TOP_AHB_CLK>, + <&gcc GCC_CAMSS_ISPIF_AHB_CLK>, + <&gcc GCC_CAMSS_CSI0PHYTIMER_CLK>, + <&gcc GCC_CAMSS_CSI1PHYTIMER_CLK>, + <&gcc GCC_CAMSS_CSI0_AHB_CLK>, + <&gcc GCC_CAMSS_CSI0_CLK>, + <&gcc GCC_CAMSS_CSI0PHY_CLK>, + <&gcc GCC_CAMSS_CSI0PIX_CLK>, + <&gcc GCC_CAMSS_CSI0RDI_CLK>, + <&gcc GCC_CAMSS_CSI1_AHB_CLK>, + <&gcc GCC_CAMSS_CSI1_CLK>, + <&gcc GCC_CAMSS_CSI1PHY_CLK>, + <&gcc GCC_CAMSS_CSI1PIX_CLK>, + <&gcc GCC_CAMSS_CSI1RDI_CLK>, + <&gcc GCC_CAMSS_AHB_CLK>, + <&gcc GCC_CAMSS_VFE0_CLK>, + <&gcc GCC_CAMSS_CSI_VFE0_CLK>, + <&gcc GCC_CAMSS_VFE_AHB_CLK>, + <&gcc GCC_CAMSS_VFE_AXI_CLK>; + + clock-names = "top_ahb", + "ispif_ahb", + "csiphy0_timer", + "csiphy1_timer", + "csi0_ahb", + "csi0", + "csi0_phy", + "csi0_pix", + "csi0_rdi", + "csi1_ahb", + "csi1", + "csi1_phy", + "csi1_pix", + "csi1_rdi", + "ahb", + "vfe0", + "csi_vfe0", + "vfe_ahb", + "vfe_axi"; + + interrupts = <GIC_SPI 78 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 79 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 51 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 52 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 55 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 57 IRQ_TYPE_EDGE_RISING>; + + interrupt-names = "csiphy0", + "csiphy1", + "csid0", + "csid1", + "ispif", + "vfe0"; + + iommus = <&apps_iommu 3>; + + power-domains = <&gcc VFE_GDSC>; + + reg = <0x01b0ac00 0x200>, + <0x01b00030 0x4>, + <0x01b0b000 0x200>, + <0x01b00038 0x4>, + <0x01b08000 0x100>, + <0x01b08400 0x100>, + <0x01b0a000 0x500>, + <0x01b00020 0x10>, + <0x01b10000 0x1000>; + + reg-names = "csiphy0", + "csiphy0_clk_mux", + "csiphy1", + "csiphy1_clk_mux", + "csid0", + "csid1", + "ispif", + "csi_clk_mux", + "vfe0"; + + vdda-supply = <®_2v8>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + }; + + };
Signature · 1 line
2.27.0
PATCH v3 14/22 dt-bindings: media: camss: Add qcom,msm8996-camss binding
In reply to Robert FossAdd bindings for qcom,msm8996-camss in order to support the camera subsystem on MSM8996.
---
Changes since v2
- Rob: Add new line at end of file
- Rob: Remove redundant descriptions
- Rob: Add power domain description
- Rob: Make clock-lanes a constant
- Rob: Rework to conform to new port schema
- Add max & minItems to data-lanes
- Remove ports requirement - endpoint & reg
.../bindings/media/qcom,msm8996-camss.yaml | 387 ++++++++++++++++++ 1 file changed, 387 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8996-camss.yaml
Documentation/devicetree/bindings/media/qcom,msm8996-camss.yaml new file +387 -0
@@ -0,0 +1,387 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/media/qcom,msm8996-camss.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm CAMSS ISP + +maintainers: + - Robert Foss <[email protected]> + - Todor Tomov <[email protected]> + +description: | + The CAMSS IP is a CSI decoder and ISP present on Qualcomm platforms + +properties: + compatible: + const: qcom,msm8996-camss + + clocks: + minItems: 36 + maxItems: 36 + + clock-names: + items: + - const: top_ahb + - const: ispif_ahb + - const: csiphy0_timer + - const: csiphy1_timer + - const: csiphy2_timer + - const: csi0_ahb + - const: csi0 + - const: csi0_phy + - const: csi0_pix + - const: csi0_rdi + - const: csi1_ahb + - const: csi1 + - const: csi1_phy + - const: csi1_pix + - const: csi1_rdi + - const: csi2_ahb + - const: csi2 + - const: csi2_phy + - const: csi2_pix + - const: csi2_rdi + - const: csi3_ahb + - const: csi3 + - const: csi3_phy + - const: csi3_pix + - const: csi3_rdi + - const: ahb + - const: vfe0 + - const: csi_vfe0 + - const: vfe0_ahb + - const: vfe0_stream + - const: vfe1 + - const: csi_vfe1 + - const: vfe1_ahb + - const: vfe1_stream + - const: vfe_ahb + - const: vfe_axi + + interrupts: + minItems: 10 + maxItems: 10 + + interrupt-names: + items: + - const: csiphy0 + - const: csiphy1 + - const: csiphy2 + - const: csid0 + - const: csid1 + - const: csid2 + - const: csid3 + - const: ispif + - const: vfe0 + - const: vfe1 + + iommus: + maxItems: 4 + + power-domains: + items: + - description: VFE0 GDSC - Video Front End, Global Distributed Switch Controller. + - description: VFE1 GDSC - Video Front End, Global Distributed Switch Controller. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + description: + CSI input ports. + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + items: + - const: 7 + + data-lanes: + description: + An array of physical data lanes indexes. + Position of an entry determines the logical + lane number, while the value of an entry + indicates physical lane index. Lane swapping + is supported. Physical lane indexes are; + 0, 1, 2, 3 + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + items: + - const: 7 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@2: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + items: + - const: 7 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@3: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + items: + - const: 7 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + reg: + minItems: 14 + maxItems: 14 + + reg-names: + items: + - const: csiphy0 + - const: csiphy0_clk_mux + - const: csiphy1 + - const: csiphy1_clk_mux + - const: csiphy2 + - const: csiphy2_clk_mux + - const: csid0 + - const: csid1 + - const: csid2 + - const: csid3 + - const: ispif + - const: csi_clk_mux + - const: vfe0 + - const: vfe1 + + vdda-supply: + description: + Definition of the regulator used as analog power supply. + +required: + - clock-names + - clocks + - compatible + - interrupt-names + - interrupts + - iommus + - power-domains + - reg + - reg-names + - vdda-supply + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/qcom,gcc-msm8996.h> + #include <dt-bindings/clock/qcom,mmcc-msm8996.h> + + camss: camss@a00000 { + compatible = "qcom,msm8996-camss"; + + clocks = <&mmcc CAMSS_TOP_AHB_CLK>, + <&mmcc CAMSS_ISPIF_AHB_CLK>, + <&mmcc CAMSS_CSI0PHYTIMER_CLK>, + <&mmcc CAMSS_CSI1PHYTIMER_CLK>, + <&mmcc CAMSS_CSI2PHYTIMER_CLK>, + <&mmcc CAMSS_CSI0_AHB_CLK>, + <&mmcc CAMSS_CSI0_CLK>, + <&mmcc CAMSS_CSI0PHY_CLK>, + <&mmcc CAMSS_CSI0PIX_CLK>, + <&mmcc CAMSS_CSI0RDI_CLK>, + <&mmcc CAMSS_CSI1_AHB_CLK>, + <&mmcc CAMSS_CSI1_CLK>, + <&mmcc CAMSS_CSI1PHY_CLK>, + <&mmcc CAMSS_CSI1PIX_CLK>, + <&mmcc CAMSS_CSI1RDI_CLK>, + <&mmcc CAMSS_CSI2_AHB_CLK>, + <&mmcc CAMSS_CSI2_CLK>, + <&mmcc CAMSS_CSI2PHY_CLK>, + <&mmcc CAMSS_CSI2PIX_CLK>, + <&mmcc CAMSS_CSI2RDI_CLK>, + <&mmcc CAMSS_CSI3_AHB_CLK>, + <&mmcc CAMSS_CSI3_CLK>, + <&mmcc CAMSS_CSI3PHY_CLK>, + <&mmcc CAMSS_CSI3PIX_CLK>, + <&mmcc CAMSS_CSI3RDI_CLK>, + <&mmcc CAMSS_AHB_CLK>, + <&mmcc CAMSS_VFE0_CLK>, + <&mmcc CAMSS_CSI_VFE0_CLK>, + <&mmcc CAMSS_VFE0_AHB_CLK>, + <&mmcc CAMSS_VFE0_STREAM_CLK>, + <&mmcc CAMSS_VFE1_CLK>, + <&mmcc CAMSS_CSI_VFE1_CLK>, + <&mmcc CAMSS_VFE1_AHB_CLK>, + <&mmcc CAMSS_VFE1_STREAM_CLK>, + <&mmcc CAMSS_VFE_AHB_CLK>, + <&mmcc CAMSS_VFE_AXI_CLK>; + + clock-names = "top_ahb", + "ispif_ahb", + "csiphy0_timer", + "csiphy1_timer", + "csiphy2_timer", + "csi0_ahb", + "csi0", + "csi0_phy", + "csi0_pix", + "csi0_rdi", + "csi1_ahb", + "csi1", + "csi1_phy", + "csi1_pix", + "csi1_rdi", + "csi2_ahb", + "csi2", + "csi2_phy", + "csi2_pix", + "csi2_rdi", + "csi3_ahb", + "csi3", + "csi3_phy", + "csi3_pix", + "csi3_rdi", + "ahb", + "vfe0", + "csi_vfe0", + "vfe0_ahb", + "vfe0_stream", + "vfe1", + "csi_vfe1", + "vfe1_ahb", + "vfe1_stream", + "vfe_ahb", + "vfe_axi"; + + interrupts = <GIC_SPI 78 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 79 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 80 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 296 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 297 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 298 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 299 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 309 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 314 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 315 IRQ_TYPE_EDGE_RISING>; + + interrupt-names = "csiphy0", + "csiphy1", + "csiphy2", + "csid0", + "csid1", + "csid2", + "csid3", + "ispif", + "vfe0", + "vfe1"; + + iommus = <&vfe_smmu 0>, + <&vfe_smmu 1>, + <&vfe_smmu 2>, + <&vfe_smmu 3>; + + power-domains = <&mmcc VFE0_GDSC>, + <&mmcc VFE1_GDSC>; + + reg = <0x00a34000 0x1000>, + <0x00a00030 0x4>, + <0x00a35000 0x1000>, + <0x00a00038 0x4>, + <0x00a36000 0x1000>, + <0x00a00040 0x4>, + <0x00a30000 0x100>, + <0x00a30400 0x100>, + <0x00a30800 0x100>, + <0x00a30c00 0x100>, + <0x00a31000 0x500>, + <0x00a00020 0x10>, + <0x00a10000 0x1000>, + <0x00a14000 0x1000>; + + reg-names = "csiphy0", + "csiphy0_clk_mux", + "csiphy1", + "csiphy1_clk_mux", + "csiphy2", + "csiphy2_clk_mux", + "csid0", + "csid1", + "csid2", + "csid3", + "ispif", + "csi_clk_mux", + "vfe0", + "vfe1"; + + vdda-supply = <®_2v8>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + }; + };
Signature · 7 lines
2.27.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v3 15/22 dt-bindings: media: camss: Add qcom,sdm660-camss binding
In reply to Robert FossAdd bindings for qcom,sdm660-camss in order to support the camera subsystem on SDM630/660 and SDA variants.
---
Changes since v2
- Rob: Add new line at end of file
- Rob: Remove redundant descriptions
- Rob: Add power domain description
- Rob: Make clock-lanes a constant
- Rob: Rework to conform to new port schema
- Add max & minItems to data-lanes
- Remove ports requirement - endpoint & reg
- Added Angelo as binding maintainer
- Removed Todor as binding maintainer
.../bindings/media/qcom,sdm660-camss.yaml | 398 ++++++++++++++++++ 1 file changed, 398 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm660-camss.yaml
Documentation/devicetree/bindings/media/qcom,sdm660-camss.yaml new file +398 -0
@@ -0,0 +1,398 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/media/qcom,sdm660-camss.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm CAMSS ISP + +maintainers: + - Robert Foss <[email protected]> + - AngeloGioacchino Del Regno <[email protected]> + +description: | + The CAMSS IP is a CSI decoder and ISP present on Qualcomm platforms + +properties: + compatible: + const: qcom,sdm660-camss + + clocks: + minItems: 42 + maxItems: 42 + + clock-names: + items: + - const: ahb + - const: cphy_csid0 + - const: cphy_csid1 + - const: cphy_csid2 + - const: cphy_csid3 + - const: csi0_ahb + - const: csi0 + - const: csi0_phy + - const: csi0_pix + - const: csi0_rdi + - const: csi1_ahb + - const: csi1 + - const: csi1_phy + - const: csi1_pix + - const: csi1_rdi + - const: csi2_ahb + - const: csi2 + - const: csi2_phy + - const: csi2_pix + - const: csi2_rdi + - const: csi3_ahb + - const: csi3 + - const: csi3_phy + - const: csi3_pix + - const: csi3_rdi + - const: csiphy0_timer + - const: csiphy1_timer + - const: csiphy2_timer + - const: csiphy_ahb2crif + - const: csi_vfe0 + - const: csi_vfe1 + - const: ispif_ahb + - const: throttle_axi + - const: top_ahb + - const: vfe0_ahb + - const: vfe0 + - const: vfe0_stream + - const: vfe1_ahb + - const: vfe1 + - const: vfe1_stream + - const: vfe_ahb + - const: vfe_axi + + interrupts: + minItems: 10 + maxItems: 10 + + interrupt-names: + items: + - const: csid0 + - const: csid1 + - const: csid2 + - const: csid3 + - const: csiphy0 + - const: csiphy1 + - const: csiphy2 + - const: ispif + - const: vfe0 + - const: vfe1 + + iommus: + maxItems: 4 + + power-domains: + items: + - description: VFE0 GDSC - Video Front End, Global Distributed Switch Controller. + - description: VFE1 GDSC - Video Front End, Global Distributed Switch Controller. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + description: + CSI input ports. + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + items: + - const: 7 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + items: + - const: 7 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@2: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + items: + - const: 7 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@3: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + items: + - const: 7 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + reg: + minItems: 14 + maxItems: 14 + + reg-names: + items: + - const: csi_clk_mux + - const: csid0 + - const: csid1 + - const: csid2 + - const: csid3 + - const: csiphy0 + - const: csiphy0_clk_mux + - const: csiphy1 + - const: csiphy1_clk_mux + - const: csiphy2 + - const: csiphy2_clk_mux + - const: ispif + - const: vfe0 + - const: vfe1 + + vdda-supply: + description: + Definition of the regulator used as analog power supply. + +required: + - clock-names + - clocks + - compatible + - interrupt-names + - interrupts + - iommus + - power-domains + - reg + - reg-names + - vdda-supply + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/qcom,gcc-sdm660.h> + #include <dt-bindings/clock/qcom,mmcc-sdm660.h> + + camss: camss@ca00000 { + compatible = "qcom,sdm660-camss"; + + clocks = <&mmcc CAMSS_AHB_CLK>, + <&mmcc CAMSS_CPHY_CSID0_CLK>, + <&mmcc CAMSS_CPHY_CSID1_CLK>, + <&mmcc CAMSS_CPHY_CSID2_CLK>, + <&mmcc CAMSS_CPHY_CSID3_CLK>, + <&mmcc CAMSS_CSI0_AHB_CLK>, + <&mmcc CAMSS_CSI0_CLK>, + <&mmcc CAMSS_CPHY_CSID0_CLK>, + <&mmcc CAMSS_CSI0PIX_CLK>, + <&mmcc CAMSS_CSI0RDI_CLK>, + <&mmcc CAMSS_CSI1_AHB_CLK>, + <&mmcc CAMSS_CSI1_CLK>, + <&mmcc CAMSS_CPHY_CSID1_CLK>, + <&mmcc CAMSS_CSI1PIX_CLK>, + <&mmcc CAMSS_CSI1RDI_CLK>, + <&mmcc CAMSS_CSI2_AHB_CLK>, + <&mmcc CAMSS_CSI2_CLK>, + <&mmcc CAMSS_CPHY_CSID2_CLK>, + <&mmcc CAMSS_CSI2PIX_CLK>, + <&mmcc CAMSS_CSI2RDI_CLK>, + <&mmcc CAMSS_CSI3_AHB_CLK>, + <&mmcc CAMSS_CSI3_CLK>, + <&mmcc CAMSS_CPHY_CSID3_CLK>, + <&mmcc CAMSS_CSI3PIX_CLK>, + <&mmcc CAMSS_CSI3RDI_CLK>, + <&mmcc CAMSS_CSI0PHYTIMER_CLK>, + <&mmcc CAMSS_CSI1PHYTIMER_CLK>, + <&mmcc CAMSS_CSI2PHYTIMER_CLK>, + <&mmcc CSIPHY_AHB2CRIF_CLK>, + <&mmcc CAMSS_CSI_VFE0_CLK>, + <&mmcc CAMSS_CSI_VFE1_CLK>, + <&mmcc CAMSS_ISPIF_AHB_CLK>, + <&mmcc THROTTLE_CAMSS_AXI_CLK>, + <&mmcc CAMSS_TOP_AHB_CLK>, + <&mmcc CAMSS_VFE0_AHB_CLK>, + <&mmcc CAMSS_VFE0_CLK>, + <&mmcc CAMSS_VFE0_STREAM_CLK>, + <&mmcc CAMSS_VFE1_AHB_CLK>, + <&mmcc CAMSS_VFE1_CLK>, + <&mmcc CAMSS_VFE1_STREAM_CLK>, + <&mmcc CAMSS_VFE_VBIF_AHB_CLK>, + <&mmcc CAMSS_VFE_VBIF_AXI_CLK>; + + clock-names = "ahb", + "cphy_csid0", + "cphy_csid1", + "cphy_csid2", + "cphy_csid3", + "csi0_ahb", + "csi0", + "csi0_phy", + "csi0_pix", + "csi0_rdi", + "csi1_ahb", + "csi1", + "csi1_phy", + "csi1_pix", + "csi1_rdi", + "csi2_ahb", + "csi2", + "csi2_phy", + "csi2_pix", + "csi2_rdi", + "csi3_ahb", + "csi3", + "csi3_phy", + "csi3_pix", + "csi3_rdi", + "csiphy0_timer", + "csiphy1_timer", + "csiphy2_timer", + "csiphy_ahb2crif", + "csi_vfe0", + "csi_vfe1", + "ispif_ahb", + "throttle_axi", + "top_ahb", + "vfe0_ahb", + "vfe0", + "vfe0_stream", + "vfe1_ahb", + "vfe1", + "vfe1_stream", + "vfe_ahb", + "vfe_axi"; + + interrupts = <GIC_SPI 296 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 297 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 298 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 299 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 78 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 79 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 80 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 309 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 314 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 315 IRQ_TYPE_EDGE_RISING>; + + interrupt-names = "csid0", + "csid1", + "csid2", + "csid3", + "csiphy0", + "csiphy1", + "csiphy2", + "ispif", + "vfe0", + "vfe1"; + + iommus = <&mmss_smmu 0xc00>, + <&mmss_smmu 0xc01>, + <&mmss_smmu 0xc02>, + <&mmss_smmu 0xc03>; + + power-domains = <&mmcc CAMSS_VFE0_GDSC>, + <&mmcc CAMSS_VFE1_GDSC>; + + reg = <0x0ca00020 0x10>, + <0x0ca30000 0x100>, + <0x0ca30400 0x100>, + <0x0ca30800 0x100>, + <0x0ca30c00 0x100>, + <0x0c824000 0x1000>, + <0x0ca00120 0x4>, + <0x0c825000 0x1000>, + <0x0ca00124 0x4>, + <0x0c826000 0x1000>, + <0x0ca00128 0x4>, + <0x0ca31000 0x500>, + <0x0ca10000 0x1000>, + <0x0ca14000 0x1000>; + + reg-names = "csi_clk_mux", + "csid0", + "csid1", + "csid2", + "csid3", + "csiphy0", + "csiphy0_clk_mux", + "csiphy1", + "csiphy1_clk_mux", + "csiphy2", + "csiphy2_clk_mux", + "ispif", + "vfe0", + "vfe1"; + + vdda-supply = <®_2v8>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + }; + };
Signature · 7 lines
2.27.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Rob Herring
maintainerRe: [PATCH v3 15/22] dt-bindings: media: camss: Add qcom, sdm660-camss binding
Quoted 18 lines · Robert Foss
Add bindings for qcom,sdm660-camss in order to support the camera subsystem on SDM630/660 and SDA variants.
Signed-off-by Robert Foss <[email protected]>---
Changes since v2
- Rob: Add new line at end of file
- Rob: Remove redundant descriptions
- Rob: Add power domain description
- Rob: Make clock-lanes a constant
- Rob: Rework to conform to new port schema
- Add max & minItems to data-lanes
- Remove ports requirement - endpoint & reg
- Added Angelo as binding maintainer
- Removed Todor as binding maintainer
Quoted 4 lines
.../bindings/media/qcom,sdm660-camss.yaml | 398 ++++++++++++++++++ 1 file changed, 398 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm660-camss.yaml
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:Documentation/devicetree/bindings/media/qcom,sdm660-camss.example.dts:21:18: fatal error: dt-bindings/clock/qcom,mmcc-sdm660.h: No such file or directory
21 | #include <dt-bindings/clock/qcom,mmcc-sdm660.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.lib:344: Documentation/devicetree/bindings/media/qcom,sdm660-camss.example.dt.yaml] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1370: dt_binding_check] Error 2
See https://patchwork.ozlabs.org/patch/1432255
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit.
Re: [PATCH v3 15/22] dt-bindings: media: camss: Add qcom, sdm660-camss binding
Quoted 29 lines · Rob Herring
Quoted 18 lines · Robert Foss
Add bindings for qcom,sdm660-camss in order to support the camera subsystem on SDM630/660 and SDA variants.
Signed-off-by Robert Foss <[email protected]>---
Changes since v2
- Rob: Add new line at end of file
- Rob: Remove redundant descriptions
- Rob: Add power domain description
- Rob: Make clock-lanes a constant
- Rob: Rework to conform to new port schema
- Add max & minItems to data-lanes
- Remove ports requirement - endpoint & reg
- Added Angelo as binding maintainer
- Removed Todor as binding maintainerQuoted 4 lines
.../bindings/media/qcom,sdm660-camss.yaml | 398 ++++++++++++++++++ 1 file changed, 398 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm660-camss.yamlMy bot found errors running 'make
dt_binding_check' on your patch:yamllint warnings/errors:
Quoted 8 lines
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/media/qcom,sdm660-camss.example.dts:21:18: fatal error:dt-bindings/clock/qcom,mmcc-sdm660.h: No such file or directory
21 | #include <dt-bindings/clock/qcom,mmcc-sdm660.h>| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~compilation terminated.
make[1]: *** [scripts/Makefile.lib:344:Documentation/devicetree/bindings/media/qcom,sdm660-camss.example.dt.yaml] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1370:dt_binding_check] Error 2
This is expected and mentioned in the cover letter due to a dependency on an as of yet unmerged mmcc-sdm660 series.
Quoted 6 lines
See https://patchwork.ozlabs.org/patch/1432255
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
Quoted 8 lines
If you already ran 'make
dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:pip3 install dtschema --upgrade
Please check and re-submit.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v3 15/22] dt-bindings: media: camss: Add qcom, sdm660-camss binding
In reply to Robert FossQuoted 18 lines · Robert Foss
Add bindings for qcom,sdm660-camss in order to support the camera subsystem on SDM630/660 and SDA variants.
Signed-off-by Robert Foss <[email protected]>---
Changes since v2
- Rob: Add new line at end of file
- Rob: Remove redundant descriptions
- Rob: Add power domain description
- Rob: Make clock-lanes a constant
- Rob: Rework to conform to new port schema
- Add max & minItems to data-lanes
- Remove ports requirement - endpoint & reg
- Added Angelo as binding maintainer
- Removed Todor as binding maintainer
Quoted 4 lines
.../bindings/media/qcom,sdm660-camss.yaml | 398 ++++++++++++++++++ 1 file changed, 398 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm660-camss.yaml
PATCH v3 16/22 dt-bindings: media: camss: Add qcom,sdm845-camss binding
In reply to Robert FossAdd bindings for qcom,sdm845-camss in order to support the camera subsystem for SDM845.
---
Changes since v2
- Rob: Removed extra empty lines at end of file
- Rob: Add new line at end of file
- Rob: Remove redundant descriptions
- Rob: Add power domain description
- Rob: Make clock-lanes a constant
- Rob: Rework to conform to new port schema
- Add max & minItems to data-lanes
- Remove ports requirement - endpoint & reg
- Add proper commit message
- Remove Todor as binding maintainer
.../bindings/media/qcom,sdm845-camss.yaml | 370 ++++++++++++++++++ 1 file changed, 370 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml
Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml new file +370 -0
@@ -0,0 +1,370 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/media/qcom,sdm845-camss.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm CAMSS ISP + +maintainers: + - Robert Foss <[email protected]> + +description: | + The CAMSS IP is a CSI decoder and ISP present on Qualcomm platforms + +properties: + compatible: + const: qcom,sdm845-camss + + clocks: + minItems: 36 + maxItems: 36 + + clock-names: + items: + - const: camnoc_axi + - const: cpas_ahb + - const: cphy_rx_src + - const: csi0 + - const: csi0_src + - const: csi1 + - const: csi1_src + - const: csi2 + - const: csi2_src + - const: csiphy0 + - const: csiphy0_timer + - const: csiphy0_timer_src + - const: csiphy1 + - const: csiphy1_timer + - const: csiphy1_timer_src + - const: csiphy2 + - const: csiphy2_timer + - const: csiphy2_timer_src + - const: csiphy3 + - const: csiphy3_timer + - const: csiphy3_timer_src + - const: gcc_camera_ahb + - const: gcc_camera_axi + - const: slow_ahb_src + - const: soc_ahb + - const: vfe0_axi + - const: vfe0 + - const: vfe0_cphy_rx + - const: vfe0_src + - const: vfe1_axi + - const: vfe1 + - const: vfe1_cphy_rx + - const: vfe1_src + - const: vfe_lite + - const: vfe_lite_cphy_rx + - const: vfe_lite_src + + interrupts: + minItems: 10 + maxItems: 10 + + interrupt-names: + items: + - const: csid0 + - const: csid1 + - const: csid2 + - const: csiphy0 + - const: csiphy1 + - const: csiphy2 + - const: csiphy3 + - const: vfe0 + - const: vfe1 + - const: vfe_lite + + iommus: + maxItems: 4 + + power-domains: + items: + - description: IFE0 GDSC - Image Front End, Global Distributed Switch Controller. + - description: IFE1 GDSC - Image Front End, Global Distributed Switch Controller. + - description: Titan GDSC - Titan ISP Block, Global Distributed Switch Controller. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + description: + CSI input ports. + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@2: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@3: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + reg: + minItems: 10 + maxItems: 10 + + reg-names: + items: + - const: csid0 + - const: csid1 + - const: csid2 + - const: csiphy0 + - const: csiphy1 + - const: csiphy2 + - const: csiphy3 + - const: vfe0 + - const: vfe1 + - const: vfe_lite + + vdda-supply: + description: + Definition of the regulator used as analog power supply. + +required: + - clock-names + - clocks + - compatible + - interrupt-names + - interrupts + - iommus + - power-domains + - reg + - reg-names + - vdda-supply + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/qcom,camcc-sdm845.h> + #include <dt-bindings/clock/qcom,gcc-sdm845.h> + + soc { + #address-cells = <2>; + #size-cells = <2>; + + camss: camss@a00000 { + compatible = "qcom,sdm845-camss"; + + clocks = <&clock_camcc CAM_CC_CAMNOC_AXI_CLK>, + <&clock_camcc CAM_CC_CPAS_AHB_CLK>, + <&clock_camcc CAM_CC_CPHY_RX_CLK_SRC>, + <&clock_camcc CAM_CC_IFE_0_CSID_CLK>, + <&clock_camcc CAM_CC_IFE_0_CSID_CLK_SRC>, + <&clock_camcc CAM_CC_IFE_1_CSID_CLK>, + <&clock_camcc CAM_CC_IFE_1_CSID_CLK_SRC>, + <&clock_camcc CAM_CC_IFE_LITE_CSID_CLK>, + <&clock_camcc CAM_CC_IFE_LITE_CSID_CLK_SRC>, + <&clock_camcc CAM_CC_CSIPHY0_CLK>, + <&clock_camcc CAM_CC_CSI0PHYTIMER_CLK>, + <&clock_camcc CAM_CC_CSI0PHYTIMER_CLK_SRC>, + <&clock_camcc CAM_CC_CSIPHY1_CLK>, + <&clock_camcc CAM_CC_CSI1PHYTIMER_CLK>, + <&clock_camcc CAM_CC_CSI1PHYTIMER_CLK_SRC>, + <&clock_camcc CAM_CC_CSIPHY2_CLK>, + <&clock_camcc CAM_CC_CSI2PHYTIMER_CLK>, + <&clock_camcc CAM_CC_CSI2PHYTIMER_CLK_SRC>, + <&clock_camcc CAM_CC_CSIPHY3_CLK>, + <&clock_camcc CAM_CC_CSI3PHYTIMER_CLK>, + <&clock_camcc CAM_CC_CSI3PHYTIMER_CLK_SRC>, + <&gcc GCC_CAMERA_AHB_CLK>, + <&gcc GCC_CAMERA_AXI_CLK>, + <&clock_camcc CAM_CC_SLOW_AHB_CLK_SRC>, + <&clock_camcc CAM_CC_SOC_AHB_CLK>, + <&clock_camcc CAM_CC_IFE_0_AXI_CLK>, + <&clock_camcc CAM_CC_IFE_0_CLK>, + <&clock_camcc CAM_CC_IFE_0_CPHY_RX_CLK>, + <&clock_camcc CAM_CC_IFE_0_CLK_SRC>, + <&clock_camcc CAM_CC_IFE_1_AXI_CLK>, + <&clock_camcc CAM_CC_IFE_1_CLK>, + <&clock_camcc CAM_CC_IFE_1_CPHY_RX_CLK>, + <&clock_camcc CAM_CC_IFE_1_CLK_SRC>, + <&clock_camcc CAM_CC_IFE_LITE_CLK>, + <&clock_camcc CAM_CC_IFE_LITE_CPHY_RX_CLK>, + <&clock_camcc CAM_CC_IFE_LITE_CLK_SRC>; + + clock-names = "camnoc_axi", + "cpas_ahb", + "cphy_rx_src", + "csi0", + "csi0_src", + "csi1", + "csi1_src", + "csi2", + "csi2_src", + "csiphy0", + "csiphy0_timer", + "csiphy0_timer_src", + "csiphy1", + "csiphy1_timer", + "csiphy1_timer_src", + "csiphy2", + "csiphy2_timer", + "csiphy2_timer_src", + "csiphy3", + "csiphy3_timer", + "csiphy3_timer_src", + "gcc_camera_ahb", + "gcc_camera_axi", + "slow_ahb_src", + "soc_ahb", + "vfe0_axi", + "vfe0", + "vfe0_cphy_rx", + "vfe0_src", + "vfe1_axi", + "vfe1", + "vfe1_cphy_rx", + "vfe1_src", + "vfe_lite", + "vfe_lite_cphy_rx", + "vfe_lite_src"; + + interrupts = <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 478 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 479 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>; + + interrupt-names = "csid0", + "csid1", + "csid2", + "csiphy0", + "csiphy1", + "csiphy2", + "csiphy3", + "vfe0", + "vfe1", + "vfe_lite"; + + iommus = <&apps_smmu 0x0808 0x0>, + <&apps_smmu 0x0810 0x8>, + <&apps_smmu 0x0c08 0x0>, + <&apps_smmu 0x0c10 0x8>; + + power-domains = <&clock_camcc IFE_0_GDSC>, + <&clock_camcc IFE_1_GDSC>, + <&clock_camcc TITAN_TOP_GDSC>; + + reg = <0 0xacb3000 0 0x1000>, + <0 0xacba000 0 0x1000>, + <0 0xacc8000 0 0x1000>, + <0 0xac65000 0 0x1000>, + <0 0xac66000 0 0x1000>, + <0 0xac67000 0 0x1000>, + <0 0xac68000 0 0x1000>, + <0 0xacaf000 0 0x4000>, + <0 0xacb6000 0 0x4000>, + <0 0xacc4000 0 0x4000>; + + reg-names = "csid0", + "csid1", + "csid2", + "csiphy0", + "csiphy1", + "csiphy2", + "csiphy3", + "vfe0", + "vfe1", + "vfe_lite"; + + vdda-supply = <®_2v8>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + }; + }; + };
Signature · 1 line
2.27.0
PATCH v3 17/22 MAINTAINERS: Change CAMSS documentation to use dtschema bindings
In reply to Robert FossDue to the complexity of describing multiple hardware generations in one document, switch to using separate dt-bindings.
--- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
@@ -14686,7 +14686,7 @@ M: Todor Tomov <[email protected]> L: [email protected] S: Maintained F: Documentation/admin-guide/media/qcom_camss.rst -F: Documentation/devicetree/bindings/media/qcom,camss.txt +F: Documentation/devicetree/bindings/media/*camss* F: drivers/media/platform/qcom/camss/ QUALCOMM CORE POWER REDUCTION (CPR) AVS DRIVER
Signature · 1 line
2.27.0
PATCH v3 18/22 media: dt-bindings: media: Remove qcom,camss documentation
In reply to Robert FossThis documentation has been incorporated in dtschema dt-bindings for the devices supported by CAMSS and is no longer helpful.
--- .../devicetree/bindings/media/qcom,camss.txt | 236 ------------------ 1 file changed, 236 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/qcom,camss.txt
Documentation/devicetree/bindings/media/qcom,camss.txt deleted +0 -236
@@ -1,236 +0,0 @@ -Qualcomm Camera Subsystem - -* Properties - -- compatible: - Usage: required - Value type: <stringlist> - Definition: Should contain one of: - - "qcom,msm8916-camss" - - "qcom,msm8996-camss" - - "qcom,sdm660-camss" -- reg: - Usage: required - Value type: <prop-encoded-array> - Definition: Register ranges as listed in the reg-names property. -- reg-names: - Usage: required - Value type: <stringlist> - Definition: Should contain the following entries: - - "csiphy0" - - "csiphy0_clk_mux" - - "csiphy1" - - "csiphy1_clk_mux" - - "csiphy2" (8996 only) - - "csiphy2_clk_mux" (8996 only) - - "csid0" - - "csid1" - - "csid2" (8996 only) - - "csid3" (8996 only) - - "ispif" - - "csi_clk_mux" - - "vfe0" - - "vfe1" (8996 only) -- interrupts: - Usage: required - Value type: <prop-encoded-array> - Definition: Interrupts as listed in the interrupt-names property. -- interrupt-names: - Usage: required - Value type: <stringlist> - Definition: Should contain the following entries: - - "csiphy0" - - "csiphy1" - - "csiphy2" (8996 only) - - "csid0" - - "csid1" - - "csid2" (8996 only) - - "csid3" (8996 only) - - "ispif" - - "vfe0" - - "vfe1" (8996 only) -- power-domains: - Usage: required - Value type: <prop-encoded-array> - Definition: A phandle and power domain specifier pairs to the - power domain which is responsible for collapsing - and restoring power to the peripheral. -- clocks: - Usage: required - Value type: <prop-encoded-array> - Definition: A list of phandle and clock specifier pairs as listed - in clock-names property. -- clock-names: - Usage: required - Value type: <stringlist> - Definition: Should contain the following entries: - - "top_ahb" - - "throttle_axi" (660 only) - - "ispif_ahb" - - "csiphy0_timer" - - "csiphy1_timer" - - "csiphy2_timer" (8996 only) - - "csiphy_ahb2crif" (660 only) - - "csi0_ahb" - - "csi0" - - "csi0_phy" - - "csi0_pix" - - "csi0_rdi" - - "cphy_csid0" (660 only) - - "csi1_ahb" - - "csi1" - - "csi1_phy" - - "csi1_pix" - - "csi1_rdi" - - "cphy_csid1" (660 only) - - "csi2_ahb" (8996 only) - - "csi2" (8996 only) - - "csi2_phy" (8996 only) - - "csi2_pix" (8996 only) - - "csi2_rdi" (8996 only) - - "cphy_csid2" (660 only) - - "csi3_ahb" (8996 only) - - "csi3" (8996 only) - - "csi3_phy" (8996 only) - - "csi3_pix" (8996 only) - - "csi3_rdi" (8996 only) - - "cphy_csid3" (660 only) - - "ahb" - - "vfe0" - - "csi_vfe0" - - "vfe0_ahb", (8996 only) - - "vfe0_stream", (8996 only) - - "vfe1", (8996 only) - - "csi_vfe1", (8996 only) - - "vfe1_ahb", (8996 only) - - "vfe1_stream", (8996 only) - - "vfe_ahb" - - "vfe_axi" -- vdda-supply: - Usage: required - Value type: <phandle> - Definition: A phandle to voltage supply for CSI2. -- iommus: - Usage: required - Value type: <prop-encoded-array> - Definition: A list of phandle and IOMMU specifier pairs. - -* Nodes - -- ports: - Usage: required - Definition: As described in video-interfaces.txt in same directory. - Properties: - - reg: - Usage: required - Value type: <u32> - Definition: Selects CSI2 PHY interface - PHY0, PHY1 - or PHY2 (8996 only) - Endpoint node properties: - - clock-lanes: - Usage: required - Value type: <u32> - Definition: The physical clock lane index. On 8916 - the value must always be <1> as the physical - clock lane is lane 1. On 8996 the value must - always be <7> as the hardware supports D-PHY - and C-PHY, indexes are in a common set and - D-PHY physical clock lane is labeled as 7. - - data-lanes: - Usage: required - Value type: <prop-encoded-array> - Definition: An array of physical data lanes indexes. - Position of an entry determines the logical - lane number, while the value of an entry - indicates physical lane index. Lane swapping - is supported. Physical lane indexes for - 8916: 0, 2, 3, 4; for 8996: 0, 1, 2, 3. - -* An Example - - camss: camss@1b00000 { - compatible = "qcom,msm8916-camss"; - reg = <0x1b0ac00 0x200>, - <0x1b00030 0x4>, - <0x1b0b000 0x200>, - <0x1b00038 0x4>, - <0x1b08000 0x100>, - <0x1b08400 0x100>, - <0x1b0a000 0x500>, - <0x1b00020 0x10>, - <0x1b10000 0x1000>; - reg-names = "csiphy0", - "csiphy0_clk_mux", - "csiphy1", - "csiphy1_clk_mux", - "csid0", - "csid1", - "ispif", - "csi_clk_mux", - "vfe0"; - interrupts = <GIC_SPI 78 0>, - <GIC_SPI 79 0>, - <GIC_SPI 51 0>, - <GIC_SPI 52 0>, - <GIC_SPI 55 0>, - <GIC_SPI 57 0>; - interrupt-names = "csiphy0", - "csiphy1", - "csid0", - "csid1", - "ispif", - "vfe0"; - power-domains = <&gcc VFE_GDSC>; - clocks = <&gcc GCC_CAMSS_TOP_AHB_CLK>, - <&gcc GCC_CAMSS_ISPIF_AHB_CLK>, - <&gcc GCC_CAMSS_CSI0PHYTIMER_CLK>, - <&gcc GCC_CAMSS_CSI1PHYTIMER_CLK>, - <&gcc GCC_CAMSS_CSI0_AHB_CLK>, - <&gcc GCC_CAMSS_CSI0_CLK>, - <&gcc GCC_CAMSS_CSI0PHY_CLK>, - <&gcc GCC_CAMSS_CSI0PIX_CLK>, - <&gcc GCC_CAMSS_CSI0RDI_CLK>, - <&gcc GCC_CAMSS_CSI1_AHB_CLK>, - <&gcc GCC_CAMSS_CSI1_CLK>, - <&gcc GCC_CAMSS_CSI1PHY_CLK>, - <&gcc GCC_CAMSS_CSI1PIX_CLK>, - <&gcc GCC_CAMSS_CSI1RDI_CLK>, - <&gcc GCC_CAMSS_AHB_CLK>, - <&gcc GCC_CAMSS_VFE0_CLK>, - <&gcc GCC_CAMSS_CSI_VFE0_CLK>, - <&gcc GCC_CAMSS_VFE_AHB_CLK>, - <&gcc GCC_CAMSS_VFE_AXI_CLK>; - clock-names = "top_ahb", - "ispif_ahb", - "csiphy0_timer", - "csiphy1_timer", - "csi0_ahb", - "csi0", - "csi0_phy", - "csi0_pix", - "csi0_rdi", - "csi1_ahb", - "csi1", - "csi1_phy", - "csi1_pix", - "csi1_rdi", - "ahb", - "vfe0", - "csi_vfe0", - "vfe_ahb", - "vfe_axi"; - vdda-supply = <&pm8916_l2>; - iommus = <&apps_iommu 3>; - ports { - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - csiphy0_ep: endpoint { - clock-lanes = <1>; - data-lanes = <0 2>; - remote-endpoint = <&ov5645_ep>; - }; - }; - }; - };
Signature · 1 line
2.27.0
PATCH v3 19/22 arm64: defconfig: Build Qcom CAMSS as module
In reply to Robert FossBuild camera ISP driver as a module.
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -640,6 +640,7 @@ CONFIG_VIDEO_RENESAS_FDP1=m CONFIG_VIDEO_RENESAS_FCP=m CONFIG_VIDEO_RENESAS_VSP1=m CONFIG_SDR_PLATFORM_DRIVERS=y +CONFIG_VIDEO_QCOM_CAMSS=m CONFIG_VIDEO_RCAR_DRIF=m CONFIG_VIDEO_IMX219=m CONFIG_VIDEO_OV5645=m
Signature · 1 line
2.27.0
Re: [PATCH v3 19/22] arm64: defconfig: Build Qcom CAMSS as module
Quoted 2 lines · Robert Foss
Build camera ISP driver as a module.
Isn't this enabled since b47c5fc15d88 ("arm64: defconfig: Enable Qualcomm CAMCC, CAMSS and CCI drivers")?
Regards,
Bjorn
Quoted 20 lines
Signed-off-by Robert Foss <[email protected]>--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)arch/arm64/configs/defconfig +1
-0@@ -640,6 +640,7 @@ CONFIG_VIDEO_RENESAS_FDP1=m CONFIG_VIDEO_RENESAS_FCP=m CONFIG_VIDEO_RENESAS_VSP1=m CONFIG_SDR_PLATFORM_DRIVERS=y +CONFIG_VIDEO_QCOM_CAMSS=m CONFIG_VIDEO_RCAR_DRIF=m CONFIG_VIDEO_IMX219=m CONFIG_VIDEO_OV5645=mSignature · 1 line
2.27.0
Re: [PATCH v3 19/22] arm64: defconfig: Build Qcom CAMSS as module
Hey Bjorn,
Quoted 8 lines · Bjorn Andersson
Quoted 2 lines · Robert Foss
Build camera ISP driver as a module.
Isn't this enabled since
b47c5fc15d88("arm64: defconfig: Enable Qualcomm CAMCC, CAMSS and CCI drivers")?
You are right, thanks for catching this!
I'll drop this patch for v4.
Quoted 24 lines
Regards,
BjornQuoted 20 lines
Signed-off-by Robert Foss <[email protected]>--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)arch/arm64/configs/defconfig +1
-1@@ -640,6 +640,7 @@ CONFIG_VIDEO_RENESAS_FDP1=m CONFIG_VIDEO_RENESAS_FCP=m CONFIG_VIDEO_RENESAS_VSP1=m CONFIG_SDR_PLATFORM_DRIVERS=y +CONFIG_VIDEO_QCOM_CAMSS=m CONFIG_VIDEO_RCAR_DRIF=m CONFIG_VIDEO_IMX219=m CONFIG_VIDEO_OV5645=m --2.27.0
PATCH v3 20/22 arm64: dts: sdm845: Add CAMSS ISP node
In reply to Robert FossAdd the camss dt node for sdm845.
---
Changes since v1
- Laurent: Fix subject
- Laurent: Remove redundant regulator labels
- Laurent: Remove empty line
arch/arm64/boot/dts/qcom/sdm845.dtsi | 130 +++++++++++++++++++++++++++ 1 file changed, 130 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +130 -0
@@ -3911,6 +3911,136 @@ videocc: clock-controller@ab00000 { #reset-cells = <1>; }; + camss: camss@a00000 { + compatible = "qcom,sdm845-camss"; + reg = <0 0xacb3000 0 0x1000>, + <0 0xacba000 0 0x1000>, + <0 0xacc8000 0 0x1000>, + <0 0xac65000 0 0x1000>, + <0 0xac66000 0 0x1000>, + <0 0xac67000 0 0x1000>, + <0 0xac68000 0 0x1000>, + <0 0xacaf000 0 0x4000>, + <0 0xacb6000 0 0x4000>, + <0 0xacc4000 0 0x4000>; + reg-names = "csid0", + "csid1", + "csid2", + "csiphy0", + "csiphy1", + "csiphy2", + "csiphy3", + "vfe0", + "vfe1", + "vfe_lite"; + interrupts = <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 478 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 479 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "csid0", + "csid1", + "csid2", + "csiphy0", + "csiphy1", + "csiphy2", + "csiphy3", + "vfe0", + "vfe1", + "vfe_lite"; + power-domains = <&clock_camcc IFE_0_GDSC>, + <&clock_camcc IFE_1_GDSC>, + <&clock_camcc TITAN_TOP_GDSC>; + clocks = <&clock_camcc CAM_CC_CAMNOC_AXI_CLK>, + <&clock_camcc CAM_CC_CPAS_AHB_CLK>, + <&clock_camcc CAM_CC_CPHY_RX_CLK_SRC>, + <&clock_camcc CAM_CC_IFE_0_CSID_CLK>, + <&clock_camcc CAM_CC_IFE_0_CSID_CLK_SRC>, + <&clock_camcc CAM_CC_IFE_1_CSID_CLK>, + <&clock_camcc CAM_CC_IFE_1_CSID_CLK_SRC>, + <&clock_camcc CAM_CC_IFE_LITE_CSID_CLK>, + <&clock_camcc CAM_CC_IFE_LITE_CSID_CLK_SRC>, + <&clock_camcc CAM_CC_CSIPHY0_CLK>, + <&clock_camcc CAM_CC_CSI0PHYTIMER_CLK>, + <&clock_camcc CAM_CC_CSI0PHYTIMER_CLK_SRC>, + <&clock_camcc CAM_CC_CSIPHY1_CLK>, + <&clock_camcc CAM_CC_CSI1PHYTIMER_CLK>, + <&clock_camcc CAM_CC_CSI1PHYTIMER_CLK_SRC>, + <&clock_camcc CAM_CC_CSIPHY2_CLK>, + <&clock_camcc CAM_CC_CSI2PHYTIMER_CLK>, + <&clock_camcc CAM_CC_CSI2PHYTIMER_CLK_SRC>, + <&clock_camcc CAM_CC_CSIPHY3_CLK>, + <&clock_camcc CAM_CC_CSI3PHYTIMER_CLK>, + <&clock_camcc CAM_CC_CSI3PHYTIMER_CLK_SRC>, + <&gcc GCC_CAMERA_AHB_CLK>, + <&gcc GCC_CAMERA_AXI_CLK>, + <&clock_camcc CAM_CC_SLOW_AHB_CLK_SRC>, + <&clock_camcc CAM_CC_SOC_AHB_CLK>, + <&clock_camcc CAM_CC_IFE_0_AXI_CLK>, + <&clock_camcc CAM_CC_IFE_0_CLK>, + <&clock_camcc CAM_CC_IFE_0_CPHY_RX_CLK>, + <&clock_camcc CAM_CC_IFE_0_CLK_SRC>, + <&clock_camcc CAM_CC_IFE_1_AXI_CLK>, + <&clock_camcc CAM_CC_IFE_1_CLK>, + <&clock_camcc CAM_CC_IFE_1_CPHY_RX_CLK>, + <&clock_camcc CAM_CC_IFE_1_CLK_SRC>, + <&clock_camcc CAM_CC_IFE_LITE_CLK>, + <&clock_camcc CAM_CC_IFE_LITE_CPHY_RX_CLK>, + <&clock_camcc CAM_CC_IFE_LITE_CLK_SRC>; + clock-names = "camnoc_axi", + "cpas_ahb", + "cphy_rx_src", + "csi0", + "csi0_src", + "csi1", + "csi1_src", + "csi2", + "csi2_src", + "csiphy0", + "csiphy0_timer", + "csiphy0_timer_src", + "csiphy1", + "csiphy1_timer", + "csiphy1_timer_src", + "csiphy2", + "csiphy2_timer", + "csiphy2_timer_src", + "csiphy3", + "csiphy3_timer", + "csiphy3_timer_src", + "gcc_camera_ahb", + "gcc_camera_axi", + "slow_ahb_src", + "soc_ahb", + "vfe0_axi", + "vfe0", + "vfe0_cphy_rx", + "vfe0_src", + "vfe1_axi", + "vfe1", + "vfe1_cphy_rx", + "vfe1_src", + "vfe_lite", + "vfe_lite_cphy_rx", + "vfe_lite_src"; + + iommus = <&apps_smmu 0x0808 0x0>, + <&apps_smmu 0x0810 0x8>, + <&apps_smmu 0x0c08 0x0>, + <&apps_smmu 0x0c10 0x8>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + }; + }; + cci: cci@ac4a000 { compatible = "qcom,sdm845-cci"; #address-cells = <1>;
Signature · 1 line
2.27.0
PATCH v3 21/22 arm64: dts: sdm845-db845c: Configure regulators for camss node
In reply to Robert FossAdd regulator to camss device tree node.
--- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +4 -0
@@ -1106,6 +1106,10 @@ &cci { status = "okay"; }; +&camss { + vdda-supply = <&vreg_l1a_0p875>; +}; + &cci_i2c0 { camera@10 { compatible = "ovti,ov8856";
Signature · 1 line
2.27.0
PATCH v3 22/22 arm64: dts: sdm845-db845c: Enable ov8856 sensor and connect to ISP
In reply to Robert FossEnable camss & ov8856 DT nodes.
--- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +17 -2
@@ -1108,6 +1108,21 @@ &cci { &camss { vdda-supply = <&vreg_l1a_0p875>; + + status = "ok"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + csiphy0_ep: endpoint { + clock-lanes = <1>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&ov8856_ep>; + }; + }; + }; }; &cci_i2c0 {
@@ -1139,7 +1154,7 @@ camera@10 { avdd-supply = <&cam0_avdd_2v8>; dvdd-supply = <&cam0_dvdd_1v2>; - status = "disable"; + status = "ok"; port { ov8856_ep: endpoint {
@@ -1147,7 +1162,7 @@ ov8856_ep: endpoint { link-frequencies = /bits/ 64 <360000000 180000000>; data-lanes = <1 2 3 4>; -// remote-endpoint = <&csiphy0_ep>; + remote-endpoint = <&csiphy0_ep>; }; }; };
Signature · 7 lines
2.27.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel