All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: linux-rockchip@lists.infradead.org,
	Chris Morgan <macroalpha82@gmail.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	dri-devel@lists.freedesktop.org, cl@rock-chips.com,
	s.hauer@pengutronix.de, pgwipeout@gmail.com, vkoul@kernel.org,
	kishon@ti.com, krzysztof.kozlowski+dt@linaro.org,
	robh+dt@kernel.org, daniel@ffwll.ch, airlied@linux.ie,
	hjc@rock-chips.com, Chris Morgan <macromorgan@hotmail.com>
Subject: Re: [PATCH v2 4/5] phy/rockchip: inno-dsidphy: Add support for rk3568
Date: Fri, 09 Sep 2022 16:12:46 +0200	[thread overview]
Message-ID: <42364235.doPnVEEUbh@diego> (raw)
In-Reply-To: <20220906174823.28561-5-macroalpha82@gmail.com>

Am Dienstag, 6. September 2022, 19:48:22 CEST schrieb Chris Morgan:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add support for the Rockchip RK3568 DSI-DPHY. Registers were taken from
> the BSP kernel driver and wherever possible cross referenced with the
> TRM.

With the amount of refactoring done below, I'd expect a bit more
introductory text here ;-)

I.e. about older variants of the phy only supporting 1GHz rates and
newer ones supporting up to 2.5GHz and that you refactor some things
to make both variants work.

> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
>  .../phy/rockchip/phy-rockchip-inno-dsidphy.c  | 204 ++++++++++++++----
>  1 file changed, 158 insertions(+), 46 deletions(-)
> 
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> index 630e01b5c19b..2c5847faff63 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> @@ -84,9 +84,25 @@
>  #define DATA_LANE_0_SKEW_PHASE_MASK		GENMASK(2, 0)
>  #define DATA_LANE_0_SKEW_PHASE(x)		UPDATE(x, 2, 0)
>  /* Analog Register Part: reg08 */
> +#define PLL_POST_DIV_ENABLE_MASK		BIT(5)
> +#define PLL_POST_DIV_ENABLE			BIT(5)
>  #define SAMPLE_CLOCK_DIRECTION_MASK		BIT(4)
>  #define SAMPLE_CLOCK_DIRECTION_REVERSE		BIT(4)
>  #define SAMPLE_CLOCK_DIRECTION_FORWARD		0
> +#define LOWFRE_EN_MASK				BIT(5)

PLL_POST_DIR_ENABLE above also is BIT(5) ... is this correct?


otherwise the changes look great.

Heiko



-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: linux-rockchip@lists.infradead.org,
	Chris Morgan <macroalpha82@gmail.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	dri-devel@lists.freedesktop.org, cl@rock-chips.com,
	s.hauer@pengutronix.de, pgwipeout@gmail.com, vkoul@kernel.org,
	kishon@ti.com, krzysztof.kozlowski+dt@linaro.org,
	robh+dt@kernel.org, daniel@ffwll.ch, airlied@linux.ie,
	hjc@rock-chips.com, Chris Morgan <macromorgan@hotmail.com>
Subject: Re: [PATCH v2 4/5] phy/rockchip: inno-dsidphy: Add support for rk3568
Date: Fri, 09 Sep 2022 16:12:46 +0200	[thread overview]
Message-ID: <42364235.doPnVEEUbh@diego> (raw)
In-Reply-To: <20220906174823.28561-5-macroalpha82@gmail.com>

Am Dienstag, 6. September 2022, 19:48:22 CEST schrieb Chris Morgan:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add support for the Rockchip RK3568 DSI-DPHY. Registers were taken from
> the BSP kernel driver and wherever possible cross referenced with the
> TRM.

With the amount of refactoring done below, I'd expect a bit more
introductory text here ;-)

I.e. about older variants of the phy only supporting 1GHz rates and
newer ones supporting up to 2.5GHz and that you refactor some things
to make both variants work.

> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
>  .../phy/rockchip/phy-rockchip-inno-dsidphy.c  | 204 ++++++++++++++----
>  1 file changed, 158 insertions(+), 46 deletions(-)
> 
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> index 630e01b5c19b..2c5847faff63 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> @@ -84,9 +84,25 @@
>  #define DATA_LANE_0_SKEW_PHASE_MASK		GENMASK(2, 0)
>  #define DATA_LANE_0_SKEW_PHASE(x)		UPDATE(x, 2, 0)
>  /* Analog Register Part: reg08 */
> +#define PLL_POST_DIV_ENABLE_MASK		BIT(5)
> +#define PLL_POST_DIV_ENABLE			BIT(5)
>  #define SAMPLE_CLOCK_DIRECTION_MASK		BIT(4)
>  #define SAMPLE_CLOCK_DIRECTION_REVERSE		BIT(4)
>  #define SAMPLE_CLOCK_DIRECTION_FORWARD		0
> +#define LOWFRE_EN_MASK				BIT(5)

PLL_POST_DIR_ENABLE above also is BIT(5) ... is this correct?


otherwise the changes look great.

Heiko



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: linux-rockchip@lists.infradead.org,
	Chris Morgan <macroalpha82@gmail.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	dri-devel@lists.freedesktop.org, cl@rock-chips.com,
	s.hauer@pengutronix.de, pgwipeout@gmail.com, vkoul@kernel.org,
	kishon@ti.com, krzysztof.kozlowski+dt@linaro.org,
	robh+dt@kernel.org, daniel@ffwll.ch, airlied@linux.ie,
	hjc@rock-chips.com, Chris Morgan <macromorgan@hotmail.com>
Subject: Re: [PATCH v2 4/5] phy/rockchip: inno-dsidphy: Add support for rk3568
Date: Fri, 09 Sep 2022 16:12:46 +0200	[thread overview]
Message-ID: <42364235.doPnVEEUbh@diego> (raw)
In-Reply-To: <20220906174823.28561-5-macroalpha82@gmail.com>

Am Dienstag, 6. September 2022, 19:48:22 CEST schrieb Chris Morgan:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add support for the Rockchip RK3568 DSI-DPHY. Registers were taken from
> the BSP kernel driver and wherever possible cross referenced with the
> TRM.

With the amount of refactoring done below, I'd expect a bit more
introductory text here ;-)

I.e. about older variants of the phy only supporting 1GHz rates and
newer ones supporting up to 2.5GHz and that you refactor some things
to make both variants work.

> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
>  .../phy/rockchip/phy-rockchip-inno-dsidphy.c  | 204 ++++++++++++++----
>  1 file changed, 158 insertions(+), 46 deletions(-)
> 
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> index 630e01b5c19b..2c5847faff63 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> @@ -84,9 +84,25 @@
>  #define DATA_LANE_0_SKEW_PHASE_MASK		GENMASK(2, 0)
>  #define DATA_LANE_0_SKEW_PHASE(x)		UPDATE(x, 2, 0)
>  /* Analog Register Part: reg08 */
> +#define PLL_POST_DIV_ENABLE_MASK		BIT(5)
> +#define PLL_POST_DIV_ENABLE			BIT(5)
>  #define SAMPLE_CLOCK_DIRECTION_MASK		BIT(4)
>  #define SAMPLE_CLOCK_DIRECTION_REVERSE		BIT(4)
>  #define SAMPLE_CLOCK_DIRECTION_FORWARD		0
> +#define LOWFRE_EN_MASK				BIT(5)

PLL_POST_DIR_ENABLE above also is BIT(5) ... is this correct?


otherwise the changes look great.

Heiko



WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: linux-rockchip@lists.infradead.org,
	Chris Morgan <macroalpha82@gmail.com>
Cc: devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org,
	airlied@linux.ie, s.hauer@pengutronix.de,
	Chris Morgan <macromorgan@hotmail.com>,
	hjc@rock-chips.com, dri-devel@lists.freedesktop.org,
	kishon@ti.com, vkoul@kernel.org, robh+dt@kernel.org,
	pgwipeout@gmail.com, linux-phy@lists.infradead.org,
	cl@rock-chips.com
Subject: Re: [PATCH v2 4/5] phy/rockchip: inno-dsidphy: Add support for rk3568
Date: Fri, 09 Sep 2022 16:12:46 +0200	[thread overview]
Message-ID: <42364235.doPnVEEUbh@diego> (raw)
In-Reply-To: <20220906174823.28561-5-macroalpha82@gmail.com>

Am Dienstag, 6. September 2022, 19:48:22 CEST schrieb Chris Morgan:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add support for the Rockchip RK3568 DSI-DPHY. Registers were taken from
> the BSP kernel driver and wherever possible cross referenced with the
> TRM.

With the amount of refactoring done below, I'd expect a bit more
introductory text here ;-)

I.e. about older variants of the phy only supporting 1GHz rates and
newer ones supporting up to 2.5GHz and that you refactor some things
to make both variants work.

> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
>  .../phy/rockchip/phy-rockchip-inno-dsidphy.c  | 204 ++++++++++++++----
>  1 file changed, 158 insertions(+), 46 deletions(-)
> 
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> index 630e01b5c19b..2c5847faff63 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> @@ -84,9 +84,25 @@
>  #define DATA_LANE_0_SKEW_PHASE_MASK		GENMASK(2, 0)
>  #define DATA_LANE_0_SKEW_PHASE(x)		UPDATE(x, 2, 0)
>  /* Analog Register Part: reg08 */
> +#define PLL_POST_DIV_ENABLE_MASK		BIT(5)
> +#define PLL_POST_DIV_ENABLE			BIT(5)
>  #define SAMPLE_CLOCK_DIRECTION_MASK		BIT(4)
>  #define SAMPLE_CLOCK_DIRECTION_REVERSE		BIT(4)
>  #define SAMPLE_CLOCK_DIRECTION_FORWARD		0
> +#define LOWFRE_EN_MASK				BIT(5)

PLL_POST_DIR_ENABLE above also is BIT(5) ... is this correct?


otherwise the changes look great.

Heiko



  reply	other threads:[~2022-09-09 14:12 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 17:48 [PATCH v2 0/5] rockchip-dsi for rk3568 Chris Morgan
2022-09-06 17:48 ` Chris Morgan
2022-09-06 17:48 ` Chris Morgan
2022-09-06 17:48 ` Chris Morgan
2022-09-06 17:48 ` [PATCH v2 1/5] dt-bindings: display: rockchip-dsi: add rk3568 compatible Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-09  1:37   ` Rob Herring
2022-09-09  1:37     ` Rob Herring
2022-09-09  1:37     ` Rob Herring
2022-09-09  1:37     ` Rob Herring
2022-09-06 17:48 ` [PATCH v2 2/5] dt-bindings: phy-rockchip-inno-dsidphy: add compatible for rk3568 Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-09  1:38   ` Rob Herring
2022-09-09  1:38     ` Rob Herring
2022-09-09  1:38     ` Rob Herring
2022-09-09  1:38     ` Rob Herring
2022-09-09 13:56   ` Heiko Stübner
2022-09-09 13:56     ` Heiko Stübner
2022-09-09 13:56     ` Heiko Stübner
2022-09-09 13:56     ` Heiko Stübner
2022-09-06 17:48 ` [PATCH v2 3/5] drm/rockchip: dsi: add rk3568 support Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:48 ` [PATCH v2 4/5] phy/rockchip: inno-dsidphy: Add support for rk3568 Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-09 14:12   ` Heiko Stübner [this message]
2022-09-09 14:12     ` Heiko Stübner
2022-09-09 14:12     ` Heiko Stübner
2022-09-09 14:12     ` Heiko Stübner
2022-09-06 17:48 ` [PATCH v2 5/5] arm64: dts: rockchip: Add DSI and DSI-DPHY nodes to rk356x Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:48   ` Chris Morgan
2022-09-06 17:57 ` [PATCH v2 0/5] rockchip-dsi for rk3568 Maya Matuszczyk
2022-09-06 17:57   ` Maya Matuszczyk
2022-09-06 17:57   ` Maya Matuszczyk
2022-09-06 17:57   ` Maya Matuszczyk
2022-09-06 21:38   ` Chris Morgan
2022-09-06 21:38     ` Chris Morgan
2022-09-06 21:38     ` Chris Morgan
2022-09-06 21:38     ` Chris Morgan
2022-09-09 15:30 ` (subset) " Heiko Stuebner
2022-09-09 15:30   ` Heiko Stuebner
2022-09-09 15:30   ` Heiko Stuebner
2022-09-09 15:30   ` Heiko Stuebner

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=42364235.doPnVEEUbh@diego \
    --to=heiko@sntech.de \
    --cc=airlied@linux.ie \
    --cc=cl@rock-chips.com \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hjc@rock-chips.com \
    --cc=kishon@ti.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=macroalpha82@gmail.com \
    --cc=macromorgan@hotmail.com \
    --cc=pgwipeout@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.