From: Yao Zi <ziyao@disroot.org>
To: Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Frank Wang <frank.wang@rock-chips.com>,
Andy Yan <andy.yan@rock-chips.com>,
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
Detlev Casanova <detlev.casanova@collabora.com>,
Shresth Prasad <shresthprasad7@gmail.com>,
Chukun Pan <amadeus@jmu.edu.cn>, Jonas Karlman <jonas@kwiboo.se>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] phy: rockchip: naneng-combphy: Add RK3528 support
Date: Thu, 8 May 2025 23:13:25 +0000 [thread overview]
Message-ID: <aB06lQs9d0q8pMU_@pie.lan> (raw)
In-Reply-To: <5349721.GXAFRqVoOG@phil>
On Thu, May 08, 2025 at 07:26:13PM +0200, Heiko Stuebner wrote:
> Am Donnerstag, 8. Mai 2025, 15:53:06 Mitteleuropäische Sommerzeit schrieb Yao Zi:
> > Rockchip RK3528 integrates one naneng-combphy that is able to operate in
> > PCIe and USB3 mode. The control logic is similar to previous variants of
> > naneng-combphy but the register layout is apperantly different from the
> > RK3568 one.
> >
> > Signed-off-by: Yao Zi <ziyao@disroot.org>
> > ---
> > .../rockchip/phy-rockchip-naneng-combphy.c | 180 +++++++++++++++++-
> > 1 file changed, 179 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> > index 1d1c7723584b..7c92f7ac3c7f 100644
> > --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> > +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> > @@ -20,7 +20,40 @@
> > #define REF_CLOCK_25MHz (25 * HZ_PER_MHZ)
> > #define REF_CLOCK_100MHz (100 * HZ_PER_MHZ)
> >
> > -/* COMBO PHY REG */
> > +/* RK3528 COMBO PHY REG */
> > +#define RK3528_PHYREG6 0x18
> > +#define RK3528_PHYREG6_PLL_KVCO GENMASK(12, 10)
> > +#define RK3528_PHYREG6_PLL_KVCO_VALUE 0x2
> > +#define RK3528_PHYREG6_SSC_DIR GENMASK(5, 4)
> > +#define RK3528_PHYREG6_SSC_UPWARD 0
> > +#define RK3528_PHYREG6_SSC_DOWNWARD 1
> > +#define RK3528_PHYREG40 0x100
> > +#define RK3528_PHYREG40_SSC_EN BIT(20)
> > +#define RK3528_PHYREG40_SSC_CNT GENMASK(10, 0)
> > +#define RK3528_PHYREG40_SSC_CNT_VALUE 0x17d
> > +#define RK3528_PHYREG42 0x108
> > +#define RK3528_PHYREG42_CKDRV_CLK_SEL BIT(29)
> > +#define RK3528_PHYREG42_CKDRV_CLK_PLL 0
> > +#define RK3528_PHYREG42_CKDRV_CLK_CKRCV 1
> > +#define RK3528_PHYREG42_PLL_LPF_R1_ADJ GENMASK(10, 7)
> > +#define RK3528_PHYREG42_PLL_LPF_R1_ADJ_VALUE 0x9
> > +#define RK3528_PHYREG42_PLL_CHGPUMP_CUR_ADJ GENMASK(6, 4)
> > +#define RK3528_PHYREG42_PLL_CHGPUMP_CUR_ADJ_VALUE 0x7
> > +#define RK3528_PHYREG42_PLL_KVCO_ADJ GENMASK(2, 0)
> > +#define RK3528_PHYREG42_PLL_KVCO_ADJ_VALUE 0x0
> > +#define RK3528_PHYREG80 0x200
> > +#define RK3528_PHYREG80_CTLE_EN BIT(17)
> > +#define RK3528_PHYREG81 0x204
> > +#define RK3528_PHYREG81_CDR_PHASE_PATH_GAIN_2X BIT(5)
> > +#define RK3528_PHYREG81_SLEW_RATE_CTRL GENMASK(2, 0)
> > +#define RK3528_PHYREG81_SLEW_RATE_CTRL_SLOW 0x7
> > +#define RK3528_PHYREG83 0x20c
> > +#define RK3528_PHYREG83_RX_SQUELCH GENMASK(2, 0)
> > +#define RK3528_PHYREG83_RX_SQUELCH_VALUE 0x6
> > +#define RK3528_PHYREG86 0x218
> > +#define RK3528_PHYREG86_RTERM_DET_CLK_EN BIT(14)
>
> I'd think staying with one layout would be best, so not doing this
> indentation here. Instead maybe follow the other ones like
Though seems more clear, it's reasonable to keep the style consistent.
Will change it in v2, thanks.
> #define RK3528_PHYREG6 0x18
> #define RK3528_PHYREG6_PLL_KVCO GENMASK(12, 10)
> #define RK3528_PHYREG6_PLL_KVCO_VALUE 0x2
> #define RK3528_PHYREG6_SSC_DIR GENMASK(5, 4)
> #define RK3528_PHYREG6_SSC_UPWARD 0
> #define RK3528_PHYREG6_SSC_DOWNWARD 1
>
> #define RK3528_PHYREG40 0x100
> #define RK3528_PHYREG40_SSC_EN BIT(20)
> #define RK3528_PHYREG40_SSC_CNT GENMASK(10, 0)
> #define RK3528_PHYREG40_SSC_CNT_VALUE 0x17d
>
> ...
>
> i.e. register + bits + blank line
>
> other than that
>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
>
>
Best regards,
Yao Zi
WARNING: multiple messages have this Message-ID (diff)
From: Yao Zi <ziyao@disroot.org>
To: Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Frank Wang <frank.wang@rock-chips.com>,
Andy Yan <andy.yan@rock-chips.com>,
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
Detlev Casanova <detlev.casanova@collabora.com>,
Shresth Prasad <shresthprasad7@gmail.com>,
Chukun Pan <amadeus@jmu.edu.cn>, Jonas Karlman <jonas@kwiboo.se>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] phy: rockchip: naneng-combphy: Add RK3528 support
Date: Thu, 8 May 2025 23:13:25 +0000 [thread overview]
Message-ID: <aB06lQs9d0q8pMU_@pie.lan> (raw)
In-Reply-To: <5349721.GXAFRqVoOG@phil>
On Thu, May 08, 2025 at 07:26:13PM +0200, Heiko Stuebner wrote:
> Am Donnerstag, 8. Mai 2025, 15:53:06 Mitteleuropäische Sommerzeit schrieb Yao Zi:
> > Rockchip RK3528 integrates one naneng-combphy that is able to operate in
> > PCIe and USB3 mode. The control logic is similar to previous variants of
> > naneng-combphy but the register layout is apperantly different from the
> > RK3568 one.
> >
> > Signed-off-by: Yao Zi <ziyao@disroot.org>
> > ---
> > .../rockchip/phy-rockchip-naneng-combphy.c | 180 +++++++++++++++++-
> > 1 file changed, 179 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> > index 1d1c7723584b..7c92f7ac3c7f 100644
> > --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> > +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> > @@ -20,7 +20,40 @@
> > #define REF_CLOCK_25MHz (25 * HZ_PER_MHZ)
> > #define REF_CLOCK_100MHz (100 * HZ_PER_MHZ)
> >
> > -/* COMBO PHY REG */
> > +/* RK3528 COMBO PHY REG */
> > +#define RK3528_PHYREG6 0x18
> > +#define RK3528_PHYREG6_PLL_KVCO GENMASK(12, 10)
> > +#define RK3528_PHYREG6_PLL_KVCO_VALUE 0x2
> > +#define RK3528_PHYREG6_SSC_DIR GENMASK(5, 4)
> > +#define RK3528_PHYREG6_SSC_UPWARD 0
> > +#define RK3528_PHYREG6_SSC_DOWNWARD 1
> > +#define RK3528_PHYREG40 0x100
> > +#define RK3528_PHYREG40_SSC_EN BIT(20)
> > +#define RK3528_PHYREG40_SSC_CNT GENMASK(10, 0)
> > +#define RK3528_PHYREG40_SSC_CNT_VALUE 0x17d
> > +#define RK3528_PHYREG42 0x108
> > +#define RK3528_PHYREG42_CKDRV_CLK_SEL BIT(29)
> > +#define RK3528_PHYREG42_CKDRV_CLK_PLL 0
> > +#define RK3528_PHYREG42_CKDRV_CLK_CKRCV 1
> > +#define RK3528_PHYREG42_PLL_LPF_R1_ADJ GENMASK(10, 7)
> > +#define RK3528_PHYREG42_PLL_LPF_R1_ADJ_VALUE 0x9
> > +#define RK3528_PHYREG42_PLL_CHGPUMP_CUR_ADJ GENMASK(6, 4)
> > +#define RK3528_PHYREG42_PLL_CHGPUMP_CUR_ADJ_VALUE 0x7
> > +#define RK3528_PHYREG42_PLL_KVCO_ADJ GENMASK(2, 0)
> > +#define RK3528_PHYREG42_PLL_KVCO_ADJ_VALUE 0x0
> > +#define RK3528_PHYREG80 0x200
> > +#define RK3528_PHYREG80_CTLE_EN BIT(17)
> > +#define RK3528_PHYREG81 0x204
> > +#define RK3528_PHYREG81_CDR_PHASE_PATH_GAIN_2X BIT(5)
> > +#define RK3528_PHYREG81_SLEW_RATE_CTRL GENMASK(2, 0)
> > +#define RK3528_PHYREG81_SLEW_RATE_CTRL_SLOW 0x7
> > +#define RK3528_PHYREG83 0x20c
> > +#define RK3528_PHYREG83_RX_SQUELCH GENMASK(2, 0)
> > +#define RK3528_PHYREG83_RX_SQUELCH_VALUE 0x6
> > +#define RK3528_PHYREG86 0x218
> > +#define RK3528_PHYREG86_RTERM_DET_CLK_EN BIT(14)
>
> I'd think staying with one layout would be best, so not doing this
> indentation here. Instead maybe follow the other ones like
Though seems more clear, it's reasonable to keep the style consistent.
Will change it in v2, thanks.
> #define RK3528_PHYREG6 0x18
> #define RK3528_PHYREG6_PLL_KVCO GENMASK(12, 10)
> #define RK3528_PHYREG6_PLL_KVCO_VALUE 0x2
> #define RK3528_PHYREG6_SSC_DIR GENMASK(5, 4)
> #define RK3528_PHYREG6_SSC_UPWARD 0
> #define RK3528_PHYREG6_SSC_DOWNWARD 1
>
> #define RK3528_PHYREG40 0x100
> #define RK3528_PHYREG40_SSC_EN BIT(20)
> #define RK3528_PHYREG40_SSC_CNT GENMASK(10, 0)
> #define RK3528_PHYREG40_SSC_CNT_VALUE 0x17d
>
> ...
>
> i.e. register + bits + blank line
>
> other than that
>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
>
>
Best regards,
Yao Zi
--
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: Yao Zi <ziyao@disroot.org>
To: Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Frank Wang <frank.wang@rock-chips.com>,
Andy Yan <andy.yan@rock-chips.com>,
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
Detlev Casanova <detlev.casanova@collabora.com>,
Shresth Prasad <shresthprasad7@gmail.com>,
Chukun Pan <amadeus@jmu.edu.cn>, Jonas Karlman <jonas@kwiboo.se>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] phy: rockchip: naneng-combphy: Add RK3528 support
Date: Thu, 8 May 2025 23:13:25 +0000 [thread overview]
Message-ID: <aB06lQs9d0q8pMU_@pie.lan> (raw)
In-Reply-To: <5349721.GXAFRqVoOG@phil>
On Thu, May 08, 2025 at 07:26:13PM +0200, Heiko Stuebner wrote:
> Am Donnerstag, 8. Mai 2025, 15:53:06 Mitteleuropäische Sommerzeit schrieb Yao Zi:
> > Rockchip RK3528 integrates one naneng-combphy that is able to operate in
> > PCIe and USB3 mode. The control logic is similar to previous variants of
> > naneng-combphy but the register layout is apperantly different from the
> > RK3568 one.
> >
> > Signed-off-by: Yao Zi <ziyao@disroot.org>
> > ---
> > .../rockchip/phy-rockchip-naneng-combphy.c | 180 +++++++++++++++++-
> > 1 file changed, 179 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> > index 1d1c7723584b..7c92f7ac3c7f 100644
> > --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> > +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> > @@ -20,7 +20,40 @@
> > #define REF_CLOCK_25MHz (25 * HZ_PER_MHZ)
> > #define REF_CLOCK_100MHz (100 * HZ_PER_MHZ)
> >
> > -/* COMBO PHY REG */
> > +/* RK3528 COMBO PHY REG */
> > +#define RK3528_PHYREG6 0x18
> > +#define RK3528_PHYREG6_PLL_KVCO GENMASK(12, 10)
> > +#define RK3528_PHYREG6_PLL_KVCO_VALUE 0x2
> > +#define RK3528_PHYREG6_SSC_DIR GENMASK(5, 4)
> > +#define RK3528_PHYREG6_SSC_UPWARD 0
> > +#define RK3528_PHYREG6_SSC_DOWNWARD 1
> > +#define RK3528_PHYREG40 0x100
> > +#define RK3528_PHYREG40_SSC_EN BIT(20)
> > +#define RK3528_PHYREG40_SSC_CNT GENMASK(10, 0)
> > +#define RK3528_PHYREG40_SSC_CNT_VALUE 0x17d
> > +#define RK3528_PHYREG42 0x108
> > +#define RK3528_PHYREG42_CKDRV_CLK_SEL BIT(29)
> > +#define RK3528_PHYREG42_CKDRV_CLK_PLL 0
> > +#define RK3528_PHYREG42_CKDRV_CLK_CKRCV 1
> > +#define RK3528_PHYREG42_PLL_LPF_R1_ADJ GENMASK(10, 7)
> > +#define RK3528_PHYREG42_PLL_LPF_R1_ADJ_VALUE 0x9
> > +#define RK3528_PHYREG42_PLL_CHGPUMP_CUR_ADJ GENMASK(6, 4)
> > +#define RK3528_PHYREG42_PLL_CHGPUMP_CUR_ADJ_VALUE 0x7
> > +#define RK3528_PHYREG42_PLL_KVCO_ADJ GENMASK(2, 0)
> > +#define RK3528_PHYREG42_PLL_KVCO_ADJ_VALUE 0x0
> > +#define RK3528_PHYREG80 0x200
> > +#define RK3528_PHYREG80_CTLE_EN BIT(17)
> > +#define RK3528_PHYREG81 0x204
> > +#define RK3528_PHYREG81_CDR_PHASE_PATH_GAIN_2X BIT(5)
> > +#define RK3528_PHYREG81_SLEW_RATE_CTRL GENMASK(2, 0)
> > +#define RK3528_PHYREG81_SLEW_RATE_CTRL_SLOW 0x7
> > +#define RK3528_PHYREG83 0x20c
> > +#define RK3528_PHYREG83_RX_SQUELCH GENMASK(2, 0)
> > +#define RK3528_PHYREG83_RX_SQUELCH_VALUE 0x6
> > +#define RK3528_PHYREG86 0x218
> > +#define RK3528_PHYREG86_RTERM_DET_CLK_EN BIT(14)
>
> I'd think staying with one layout would be best, so not doing this
> indentation here. Instead maybe follow the other ones like
Though seems more clear, it's reasonable to keep the style consistent.
Will change it in v2, thanks.
> #define RK3528_PHYREG6 0x18
> #define RK3528_PHYREG6_PLL_KVCO GENMASK(12, 10)
> #define RK3528_PHYREG6_PLL_KVCO_VALUE 0x2
> #define RK3528_PHYREG6_SSC_DIR GENMASK(5, 4)
> #define RK3528_PHYREG6_SSC_UPWARD 0
> #define RK3528_PHYREG6_SSC_DOWNWARD 1
>
> #define RK3528_PHYREG40 0x100
> #define RK3528_PHYREG40_SSC_EN BIT(20)
> #define RK3528_PHYREG40_SSC_CNT GENMASK(10, 0)
> #define RK3528_PHYREG40_SSC_CNT_VALUE 0x17d
>
> ...
>
> i.e. register + bits + blank line
>
> other than that
>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
>
>
Best regards,
Yao Zi
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2025-05-08 23:15 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 13:43 [PATCH 0/5] Support RK3528 variant of Rockchip naneng-combphy Yao Zi
2025-05-08 13:43 ` Yao Zi
2025-05-08 13:43 ` Yao Zi
2025-05-08 13:43 ` [PATCH 1/5] dt-bindings: soc: rockchip: Add RK3528 pipe-phy GRF syscon Yao Zi
2025-05-08 13:43 ` Yao Zi
2025-05-08 13:43 ` Yao Zi
2025-05-08 14:40 ` Conor Dooley
2025-05-08 14:40 ` Conor Dooley
2025-05-08 14:40 ` Conor Dooley
2025-05-08 13:43 ` [PATCH 2/5] dt-bindings: phy: rockchip: naneng-combphy: Add RK3528 variant Yao Zi
2025-05-08 13:43 ` Yao Zi
2025-05-08 13:43 ` Yao Zi
2025-05-08 14:40 ` Conor Dooley
2025-05-08 14:40 ` Conor Dooley
2025-05-08 14:40 ` Conor Dooley
2025-05-08 17:15 ` Heiko Stuebner
2025-05-08 17:15 ` Heiko Stuebner
2025-05-08 17:15 ` Heiko Stuebner
2025-05-08 13:52 ` [PATCH 3/5] phy: rockchip: naneng-combphy: Add SoC prefix to register definitions Yao Zi
2025-05-08 13:52 ` Yao Zi
2025-05-08 13:52 ` Yao Zi
2025-05-08 17:22 ` Heiko Stuebner
2025-05-08 17:22 ` Heiko Stuebner
2025-05-08 17:22 ` Heiko Stuebner
2025-05-08 13:53 ` [PATCH 4/5] phy: rockchip: naneng-combphy: Add RK3528 support Yao Zi
2025-05-08 13:53 ` Yao Zi
2025-05-08 13:53 ` Yao Zi
2025-05-08 17:26 ` Heiko Stuebner
2025-05-08 17:26 ` Heiko Stuebner
2025-05-08 17:26 ` Heiko Stuebner
2025-05-08 23:13 ` Yao Zi [this message]
2025-05-08 23:13 ` Yao Zi
2025-05-08 23:13 ` Yao Zi
2025-05-08 13:53 ` [PATCH 5/5] arm64: dts: rockchip: Add naneng-combphy for RK3528 Yao Zi
2025-05-08 13:53 ` Yao Zi
2025-05-08 13:53 ` Yao Zi
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=aB06lQs9d0q8pMU_@pie.lan \
--to=ziyao@disroot.org \
--cc=amadeus@jmu.edu.cn \
--cc=andy.yan@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=cristian.ciocaltea@collabora.com \
--cc=detlev.casanova@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=frank.wang@rock-chips.com \
--cc=heiko@sntech.de \
--cc=jonas@kwiboo.se \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh@kernel.org \
--cc=shresthprasad7@gmail.com \
--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.