<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/phy/cadence, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/phy/cadence?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/phy/cadence?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-13T09:56:54Z</updated>
<entry>
<title>phy: cadence: Sierra: Add TI J721E specific PCIe multilink lane configuration</title>
<updated>2022-04-13T09:56:54Z</updated>
<author>
<name>Swapnil Jakhade</name>
<email>sjakhade@cadence.com</email>
</author>
<published>2022-03-03T05:50:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e72659b69f0650f8f0e7e1587e5f261d2a431697'/>
<id>urn:sha1:e72659b69f0650f8f0e7e1587e5f261d2a431697</id>
<content type='text'>
This patch adds workaround for TI J721E errata i2183
(https://www.ti.com/lit/er/sprz455a/sprz455a.pdf).
PCIe fails to link up if SERDES lanes not used by PCIe are assigned to
another protocol. For example, link training fails if lanes 2 and 3 are
assigned to another protocol while lanes 0 and 1 are used for PCIe to
form a two lane link. This failure is due to an incorrect tie-off on an
internal status signal indicating electrical idle.

Status signals going from SERDES to PCIe Controller are tied-off when a
lane is not assigned to PCIe. Signal indicating electrical idle is
incorrectly tied-off to a state that indicates non-idle. As a result,
PCIe sees unused lanes to be out of electrical idle and this causes
LTSSM to exit Detect.Quiet state without waiting for 12ms timeout to
occur. If a receiver is not detected on the first receiver detection
attempt in Detect.Active state, LTSSM goes back to Detect.Quiet and
again moves forward to Detect.Active state without waiting for 12ms as
required by PCIe base specification. Since wait time in Detect.Quiet is
skipped, multiple receiver detect operations are performed back-to-back
without allowing time for capacitance on the transmit lines to
discharge. This causes subsequent receiver detection to always fail even
if a receiver gets connected eventually.

The workaround only works for 1-lane PCIe configuration. This workaround
involves enabling receiver detect override by setting TX_RCVDET_OVRD_PREG_j
register of the lane running PCIe to 0x2. This causes SERDES to indicate
successful receiver detect when LTSSM is in Detect.Active state, whether a
receiver is actually present or not. If the receiver is present, LTSSM
proceeds to link up as expected. However if receiver is not present, LTSSM
will time out in Polling.Configuration substate since the expected training
sequence packets will not be received.

Signed-off-by: Swapnil Jakhade &lt;sjakhade@cadence.com&gt;
Link: https://lore.kernel.org/r/20220303055026.24899-1-sjakhade@cadence.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>phy: cadence: Add Cadence D-PHY Rx driver</title>
<updated>2022-03-02T14:24:42Z</updated>
<author>
<name>Pratyush Yadav</name>
<email>p.yadav@ti.com</email>
</author>
<published>2022-03-01T11:16:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=41d393aaead4e51d709b860176102b18bedb3c68'/>
<id>urn:sha1:41d393aaead4e51d709b860176102b18bedb3c68</id>
<content type='text'>
The Cadence D-PHY can be configured in Tx (DSI) mode or Rx (CSI) mode.
Both modes have a different programming sequence and share little among
them. In addition, a PHY configured in Tx mode cannot be used in Rx mode
and vice versa. For this reason, create a separate driver for the Rx
mode to make it easier to read and maintain.

Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;

Link: https://lore.kernel.org/r/20220301111621.2992275-2-p.yadav@ti.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>phy/cadence: Use of_device_get_match_data()</title>
<updated>2022-02-25T08:28:12Z</updated>
<author>
<name>Minghao Chi (CGEL ZTE)</name>
<email>chi.minghao@zte.com.cn</email>
</author>
<published>2022-02-14T02:06:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=10c573c61338d80c271f3579da22772c483d8a7a'/>
<id>urn:sha1:10c573c61338d80c271f3579da22772c483d8a7a</id>
<content type='text'>
Use of_device_get_match_data() instead of open-coding it.

Reported-by: Zeal Robot &lt;zealci@zte.com.cn&gt;
Signed-off-by: Minghao Chi (CGEL ZTE) &lt;chi.minghao@zte.com.cn&gt;
Link: https://lore.kernel.org/r/20220214020626.1714696-1-chi.minghao@zte.com.cn
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>phy: cadence: Sierra: Add support for skipping configuration</title>
<updated>2022-02-07T04:57:43Z</updated>
<author>
<name>Aswath Govindraju</name>
<email>a-govindraju@ti.com</email>
</author>
<published>2022-01-28T07:26:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d88ca22d6f0c9245086fe4cfca4cbe84382bdaa1'/>
<id>urn:sha1:d88ca22d6f0c9245086fe4cfca4cbe84382bdaa1</id>
<content type='text'>
In some cases, a single SerDes instance can be shared between two different
processors, each using a separate link. In these cases, the SerDes
configuration is done in an earlier boot stage. Therefore, add support to
skip reconfiguring, if it is was already configured beforehand.

Signed-off-by: Aswath Govindraju &lt;a-govindraju@ti.com&gt;
Reviewed-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/20220128072642.29188-1-a-govindraju@ti.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>phy: cadence: Sierra: fix error handling bugs in probe()</title>
<updated>2022-01-24T04:05:31Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-01-15T11:51:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=29afbd769ca338fa14cbfbbc824f7dc457ed7f2e'/>
<id>urn:sha1:29afbd769ca338fa14cbfbbc824f7dc457ed7f2e</id>
<content type='text'>
There are two bugs in the error handling:
1: If devm_of_phy_provider_register() fails then there was no cleanup.
2: The error handling called of_node_put(child) improperly leading to
   a use after free.  We are only holding the reference inside the loop
   so the last two gotos after the loop lead to a use after free bug.
   Fix this by cleaning up the partial allocations (or partial iterations)
   in the loop before doing the goto.

Fixes: a43f72ae136a ("phy: cadence: Sierra: Change MAX_LANES of Sierra to 16")
Fixes: 44d30d622821 ("phy: cadence: Add driver for Sierra PHY")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/20220115115146.GC7552@kili
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>phy: cadence: Sierra: Add support for derived reference clock output</title>
<updated>2021-12-27T11:05:09Z</updated>
<author>
<name>Swapnil Jakhade</name>
<email>sjakhade@cadence.com</email>
</author>
<published>2021-12-23T06:01:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=09d976b3e8e257ff44405b6506bbaae6be1a6b3c'/>
<id>urn:sha1:09d976b3e8e257ff44405b6506bbaae6be1a6b3c</id>
<content type='text'>
Sierra has derived differential reference clock output which is sourced
after the spread spectrum generation has been added. Add support to drive
derived reference clock out of serdes. Model this derived clock as a
"clock" so that platforms using this can enable it.

Sierra Main LC VCO PLL divider 1 clock is programmed to output 100MHz
clock output.

Signed-off-by: Swapnil Jakhade &lt;sjakhade@cadence.com&gt;
Reviewed-by: Aswath Govindraju &lt;a-govindraju@ti.com&gt;
Link: https://lore.kernel.org/r/20211223060137.9252-16-sjakhade@cadence.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>phy: cadence: Sierra: Add PCIe + QSGMII PHY multilink configuration</title>
<updated>2021-12-27T11:05:09Z</updated>
<author>
<name>Swapnil Jakhade</name>
<email>sjakhade@cadence.com</email>
</author>
<published>2021-12-23T06:01:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8a1b82d744a97949f13acee6644b19eb3b5a4102'/>
<id>urn:sha1:8a1b82d744a97949f13acee6644b19eb3b5a4102</id>
<content type='text'>
Add register sequences for PCIe + QSGMII PHY multilink configuration.
PHY configuration for multi-link operation is done in two steps.
e.g. Consider a case for a 4 lane PHY with PCIe using 2 lanes and QSGMII
other 2 lanes. Sierra PHY has 2 PLLs, viz. PLLLC and PLLLC1. So in this
case, PLLLC is used for PCIe and PLLLC1 is used for QSGMII.

PHY is configured in two steps as described below.

[1] For first step, the register values are selected as
    [TYPE_PCIE][TYPE_QSGMII][ssc].
    This will configure PHY registers associated for PCIe involving PLLLC
    registers and registers for first 2 lanes of PHY.
[2] In second step, the register values are selected as
    [TYPE_QSGMII][TYPE_PCIE][ssc].
    This will configure PHY registers associated for QSGMII involving
    PLLLC1 registers and registers for other 2 lanes of PHY.

This completes the PHY configuration for multilink operation.

Signed-off-by: Swapnil Jakhade &lt;sjakhade@cadence.com&gt;
Reviewed-by: Aswath Govindraju &lt;a-govindraju@ti.com&gt;
Link: https://lore.kernel.org/r/20211223060137.9252-14-sjakhade@cadence.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>phy: cadence: Sierra: Add support for PHY multilink configurations</title>
<updated>2021-12-27T11:05:09Z</updated>
<author>
<name>Swapnil Jakhade</name>
<email>sjakhade@cadence.com</email>
</author>
<published>2021-12-23T06:01:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6b81f05a8755a63d1acbcc1604f1e0f4534d36d8'/>
<id>urn:sha1:6b81f05a8755a63d1acbcc1604f1e0f4534d36d8</id>
<content type='text'>
Add support for multilink configuration of Sierra PHY. Currently,
maximum two links are supported.

Signed-off-by: Swapnil Jakhade &lt;sjakhade@cadence.com&gt;
Reviewed-by: Aswath Govindraju &lt;a-govindraju@ti.com&gt;
Link: https://lore.kernel.org/r/20211223060137.9252-13-sjakhade@cadence.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>phy: cadence: Sierra: Fix to get correct parent for mux clocks</title>
<updated>2021-12-27T11:05:09Z</updated>
<author>
<name>Swapnil Jakhade</name>
<email>sjakhade@cadence.com</email>
</author>
<published>2021-12-23T06:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=da08aab940092a050a4fb2857ed9479d2b0e03c4'/>
<id>urn:sha1:da08aab940092a050a4fb2857ed9479d2b0e03c4</id>
<content type='text'>
Fix get_parent() callback to return the correct index of the parent for
PLL_CMNLC1 clock. Add a separate table of register values corresponding
to the parent index for PLL_CMNLC1. Update set_parent() callback
accordingly.

Fixes: 28081b72859f ("phy: cadence: Sierra: Model PLL_CMNLC and PLL_CMNLC1 as clocks (mux clocks)")
Signed-off-by: Swapnil Jakhade &lt;sjakhade@cadence.com&gt;
Reviewed-by: Aswath Govindraju &lt;a-govindraju@ti.com&gt;
Link: https://lore.kernel.org/r/20211223060137.9252-12-sjakhade@cadence.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>phy: cadence: Sierra: Update single link PCIe register configuration</title>
<updated>2021-12-27T11:05:09Z</updated>
<author>
<name>Swapnil Jakhade</name>
<email>sjakhade@cadence.com</email>
</author>
<published>2021-12-23T06:01:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7a5ad9b4b98cd95f02ec12c895e80bc521fbf9ec'/>
<id>urn:sha1:7a5ad9b4b98cd95f02ec12c895e80bc521fbf9ec</id>
<content type='text'>
Add single link PCIe register configurations for no SSC and internal
SSC. Also, add missing PMA lane registers for external SSC.

Signed-off-by: Swapnil Jakhade &lt;sjakhade@cadence.com&gt;
Reviewed-by: Aswath Govindraju &lt;a-govindraju@ti.com&gt;
Link: https://lore.kernel.org/r/20211223060137.9252-11-sjakhade@cadence.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
</feed>
