From: 赵仪峰 <yifeng.zhao@rock-chips.com>
To: "Johan Jonker" <jbx6244@gmail.com>,
HeikoStübner <heiko@sntech.de>, robh+dt <robh+dt@kernel.org>
Cc: devicetree <devicetree@vger.kernel.org>,
"Vinod Koul" <vkoul@kernel.org>,
"michael.riesch" <michael.riesch@wolfvision.net>,
linux-rockchip <linux-rockchip@lists.infradead.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-phy <linux-phy@lists.infradead.org>, kishon <kishon@ti.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>, 陈亮 <cl@rock-chips.com>
Subject: Re: Re: [PATCH v3 2/3] phy/rockchip: add naneng combo phy for RK3568
Date: Fri, 10 Dec 2021 17:52:10 +0800 [thread overview]
Message-ID: <2021121017510984173129@rock-chips.com> (raw)
In-Reply-To: 95ba0a5b-8f5a-3351-fc53-33021b2a0111@gmail.com
Hi Johan,
We refer to the IP documents only and don't notice that the TRM names the registers is different.
About the SSC, ssc_en = 1, In PCIE mode will set SSC ON, it the same with SATA and USB.
The document description is not clear enough.
>Hi,
>
>See question below.
>
>On 11/14/21 12:40 PM, Johan Jonker wrote:
>> Hi Yifeng,
>>
>> Some comments. Have a look if it's useful.
>>
>> On 10/25/21 10:06 AM, Yifeng Zhao wrote:
>>> This patch implements a combo phy driver for Rockchip SoCs
>>> with NaNeng IP block. This phy can be used as pcie-phy, usb3-phy,
>>> sata-phy or sgmii-phy.
>>>
>>> Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
>>> ---
>
>>> diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
>
>>> +
>>> +#define BIT_WRITEABLE_SHIFT 16
>>> +#define REF_CLOCK_24MHz 24000000
>>> +#define REF_CLOCK_25MHz 25000000
>>> +#define REF_CLOCK_100MHz 100000000
>>> +/* RK3568 T22 COMBO PHY REG */
>>> +#define RK3568_T22_PHYREG5 0x14
>>> +#define T22_PHYREG5_PLL_DIV_MASK GENMASK(7, 6)
>>> +#define T22_PHYREG5_PLL_DIV_SHIFT 6
>>> +#define T22_PHYREG5_PLL_DIV_2 1
>>> +
>
>>> +#define RK3568_T22_PHYREG6 0x18
>
>Multi-PHY_Register007
>Address: Operational Base + offset (0x0018)
>
>>> +#define T22_PHYREG6_TX_RTERM_MASK GENMASK(7, 4)
>>> +#define T22_PHYREG6_TX_RTERM_SHIFT 4
>>> +#define T22_PHYREG6_TX_RTERM_50OHM 0x8
>>> +#define T22_PHYREG6_RX_RTERM_MASK GENMASK(3, 0)
>>> +#define T22_PHYREG6_RX_RTERM_SHIFT 0
>>> +#define T22_PHYREG6_RX_RTERM_44OHM 0xF
>>> +
>>> +#define RK3568_T22_PHYREG7 0x1C
>
>Multi-PHY_Register008
>Address: Operational Base + offset (0x001C)
>
>>> +#define T22_PHYREG7_SSC_EN BIT(4)
>
>See Rockchip RK3568 TRM Part2 V1.0-20210111 page 1957-1958
>
>It looks as if all PHYREG defines add -1 in value? I'm I correct here?
>
>===
>
>SSC_EN
>In U3 and SATA mode, this bit= 1, set SSC on
>In PCIE mode, this bit=0 set SSC off
>
> If Spread Spectrum Clocking (SSC) is used it is
> required that a common reference clock is used by the link partners.
> Most commercially available platforms with PCIe backplanes use
> SSC to reduce EMI.
>
>Maybe a dumb question for in a possible YAML description:
>Is this above text from the TRM correct?
>Is SSC only used in combination with PCIE instead of U3 and SATA?
>
>===
>
>Johan
>
>>> +
>>> +#define RK3568_T22_PHYREG10 0x28
>>> +#define T22_PHYREG10_SU_TRIM_0_7 0xF0
>>> +
>>> +#define RK3568_T22_PHYREG11 0x2C
>>> +#define T22_PHYREG11_PLL_LPF_ADJ 0x4
>>> +
>
>>> +#define RK3568_T22_PHYREG12 0x30
>
>Multi-PHY_Register013
>Address: Operational Base + offset (0x0030)
>
>>> +#define T22_PHYREG12_RESISTER_MASK GENMASK(5, 4)
>>> +#define T22_PHYREG12_RESISTER_SHIFT 0x4
>>> +#define T22_PHYREG12_RESISTER_HIGH_Z 0x3
>>> +#define T22_PHYREG12_CKRCV_AMP0 BIT(7)
>>> +
>>> +#define RK3568_T22_PHYREG13 0x34
>>> +#define T22_PHYREG13_CKRCV_AMP1 BIT(0)
>>> +
>>> +#define RK3568_T22_PHYREG14 0x38
>>> +#define T22_PHYREG14_CTLE_EN BIT(0)
>>> +#define T22_PHYREG14_SSC_CNT_MASK GENMASK(7, 6)
>>> +#define T22_PHYREG14_SSC_CNT_SHIFT 6
>>> +#define T22_PHYREG14_SSC_CNT_VALUE 0x1
>>> +
>>> +#define RK3568_T22_PHYREG15 0x3C
>>> +#define T22_PHYREG15_SSC_CNT_VALUE 0x5f
>>> +
>>> +#define RK3568_T22_PHYREG17 0x44
>>> +#define T22_PHYREG17_PLL_LOOP 0x32
>>> +
>>> +#define RK3568_T22_PHYREG31 0x7C
>>> +#define T22_PHYREG31_SSC_MASK GENMASK(7, 4)
>>> +#define T22_PHYREG31_SSC_DIR_SHIFT 4
>>> +#define T22_PHYREG31_SSC_UPWARD 0
>>> +#define T22_PHYREG31_SSC_DOWNWARD 1
>>> +#define T22_PHYREG31_SSC_OFFSET_SHIFT 6
>>> +#define T22_PHYREG31_SSC_OFFSET_500PPM 1
>>> +
>>> +#define RK3568_T22_PHYREG32 0x80
>>> +#define T22_PHYREG32_PLL_KVCO_MASK GENMASK(4, 2)
>>> +#define T22_PHYREG32_PLL_KVCO_SHIFT 2
>>> +#define T22_PHYREG32_PLL_KVCO_VALUE 2
>>> +
>
>
>
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2021-12-10 9:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 8:06 [PATCH v3 0/3] Add Naneng combo PHY support for RK3568 Yifeng Zhao
2021-10-25 8:06 ` [PATCH v3 1/3] dt-bindings: phy: rockchip: Add Naneng combo PHY bindings Yifeng Zhao
2021-10-27 22:03 ` Rob Herring
2021-11-14 11:32 ` Johan Jonker
2021-10-25 8:06 ` [PATCH v3 2/3] phy/rockchip: add naneng combo phy for RK3568 Yifeng Zhao
2021-11-08 2:50 ` Kever Yang
2021-11-08 9:35 ` Philipp Zabel
2021-11-14 11:40 ` Johan Jonker
2021-12-07 13:51 ` Johan Jonker
2021-12-10 9:52 ` 赵仪峰 [this message]
2021-10-25 8:06 ` [PATCH v3 3/3] arm64: dts: rockchip: add naneng combo phy nodes for rk3568 Yifeng Zhao
2021-11-14 11:33 ` Johan Jonker
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=2021121017510984173129@rock-chips.com \
--to=yifeng.zhao@rock-chips.com \
--cc=cl@rock-chips.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=jbx6244@gmail.com \
--cc=kishon@ti.com \
--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=michael.riesch@wolfvision.net \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--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 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).