linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Robert Foss <robert.foss@linaro.org>
Cc: agross@kernel.org, bjorn.andersson@linaro.org,
	todor.too@gmail.com, mchehab@kernel.org, robh+dt@kernel.org,
	catalin.marinas@arm.com, will@kernel.org, shawnguo@kernel.org,
	leoyang.li@nxp.com, geert+renesas@glider.be, arnd@arndb.de,
	Anson.Huang@nxp.com, michael@walle.cc, agx@sigxcpu.org,
	max.oss.09@gmail.com, angelogioacchino.delregno@somainline.org,
	linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	AngeloGioacchino Del Regno <kholk11@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Andrey Konovalov <andrey.konovalov@linaro.org>,
	Tomasz Figa <tfiga@chromium.org>,
	Azam Sadiq Pasha Kapatrala Syed <akapatra@quicinc.com>,
	Sarvesh Sridutt <Sarvesh.Sridutt@smartwirelesscompute.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Jonathan Marek <jonathan@marek.ca>
Subject: Re: [PATCH v3 10/22] media: camss: Add support for CSIPHY hardware version Titan 170
Date: Mon, 1 Feb 2021 15:40:07 +0200	[thread overview]
Message-ID: <20210201134007.GE3@valkosipuli.retiisi.org.uk> (raw)
In-Reply-To: <20210127144930.2158242-11-robert.foss@linaro.org>

Hi Robert,

On Wed, Jan 27, 2021 at 03:49:18PM +0100, Robert Foss wrote:
> Add register definitions for version 170 of the Titan architecture
> and implement support for the CSIPHY subdevice.
> 
> Signed-off-by: Robert Foss <robert.foss@linaro.org>
> ---
>  .../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(-)
> 
> diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> index 97cb9de85031..8cf1440b7d70 100644
> --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> @@ -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

This should be const.

> +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},
> +	},
> +};

-- 
Sakari Ailus

  reply	other threads:[~2021-02-01 13:48 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 14:49 [PATCH v3 00/22] Add support for the SDM845 Camera Subsystem Robert Foss
2021-01-27 14:49 ` [PATCH v3 01/22] media: camss: Fix vfe_isr_comp_done() documentation Robert Foss
2021-01-27 14:49 ` [PATCH v3 02/22] media: camss: Fix vfe_isr comment typo Robert Foss
2021-01-27 14:49 ` [PATCH v3 03/22] media: camss: Add CAMSS_845 camss version Robert Foss
2021-01-27 14:49 ` [PATCH v3 04/22] media: camss: Make ISPIF subdevice optional Robert Foss
2021-01-27 14:49 ` [PATCH v3 06/22] media: camss: Add support for VFE hardware version Titan 170 Robert Foss
2021-01-27 14:49 ` [PATCH v3 07/22] media: camss: Add missing format identifiers Robert Foss
2021-01-27 14:49 ` [PATCH v3 08/22] media: camss: Refactor CSID HW version support Robert Foss
2021-01-27 14:49 ` [PATCH v3 09/22] media: camss: Add support for CSID hardware version Titan 170 Robert Foss
2021-01-27 14:49 ` [PATCH v3 10/22] media: camss: Add support for CSIPHY " Robert Foss
2021-02-01 13:40   ` Sakari Ailus [this message]
2021-02-03 10:42     ` Robert Foss
2021-01-27 14:49 ` [PATCH v3 11/22] media: camss: Remove per VFE power domain toggling Robert Foss
2021-01-27 14:49 ` [PATCH v3 12/22] media: camss: Enable SDM845 Robert Foss
2021-01-27 14:49 ` [PATCH v3 13/22] dt-bindings: media: camss: Add qcom,msm8916-camss binding Robert Foss
2021-01-27 14:49 ` [PATCH v3 14/22] dt-bindings: media: camss: Add qcom,msm8996-camss binding Robert Foss
2021-01-27 14:49 ` [PATCH v3 15/22] dt-bindings: media: camss: Add qcom,sdm660-camss binding Robert Foss
2021-01-30 17:23   ` [PATCH v3 15/22] dt-bindings: media: camss: Add qcom, sdm660-camss binding Rob Herring
2021-02-03 11:23     ` Robert Foss
2021-02-04 16:01   ` Rob Herring
2021-01-27 14:49 ` [PATCH v3 16/22] dt-bindings: media: camss: Add qcom,sdm845-camss binding Robert Foss
2021-01-27 14:49 ` [PATCH v3 17/22] MAINTAINERS: Change CAMSS documentation to use dtschema bindings Robert Foss
2021-01-27 14:49 ` [PATCH v3 18/22] media: dt-bindings: media: Remove qcom,camss documentation Robert Foss
2021-01-27 14:49 ` [PATCH v3 19/22] arm64: defconfig: Build Qcom CAMSS as module Robert Foss
2021-02-02 22:44   ` Bjorn Andersson
2021-02-03 10:28     ` Robert Foss
2021-01-27 14:49 ` [PATCH v3 20/22] arm64: dts: sdm845: Add CAMSS ISP node Robert Foss
2021-01-27 14:49 ` [PATCH v3 21/22] arm64: dts: sdm845-db845c: Configure regulators for camss node Robert Foss
2021-01-27 14:49 ` [PATCH v3 22/22] arm64: dts: sdm845-db845c: Enable ov8856 sensor and connect to ISP Robert Foss
     [not found] ` <20210127144930.2158242-6-robert.foss@linaro.org>
2021-01-28  0:18   ` [PATCH v3 05/22] media: camss: Refactor VFE HW version support Nicolas Boichat
2021-01-28 10:06     ` Robert Foss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210201134007.GE3@valkosipuli.retiisi.org.uk \
    --to=sakari.ailus@iki.fi \
    --cc=Anson.Huang@nxp.com \
    --cc=Sarvesh.Sridutt@smartwirelesscompute.com \
    --cc=agross@kernel.org \
    --cc=agx@sigxcpu.org \
    --cc=akapatra@quicinc.com \
    --cc=andrey.konovalov@linaro.org \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=jonathan@marek.ca \
    --cc=kholk11@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=max.oss.09@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=michael@walle.cc \
    --cc=robert.foss@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=tfiga@chromium.org \
    --cc=todor.too@gmail.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).