From: Vinod Koul <vkoul@kernel.org>
To: Shradha Todi <shradha.t@samsung.com>
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-phy@lists.infradead.org, mani@kernel.org,
lpieralisi@kernel.org, kwilczynski@kernel.org, robh@kernel.org,
bhelgaas@google.com, jingoohan1@gmail.com, krzk+dt@kernel.org,
conor+dt@kernel.org, alim.akhtar@samsung.com, kishon@kernel.org,
arnd@arndb.de, m.szyprowski@samsung.com, jh80.chung@samsung.com,
pankaj.dubey@samsung.com
Subject: Re: [PATCH v3 10/12] phy: exynos: Add PCIe PHY support for FSD SoC
Date: Mon, 1 Sep 2025 17:41:50 +0530 [thread overview]
Message-ID: <aLWNhv0eLj7LRrvM@vaman> (raw)
In-Reply-To: <20250811154638.95732-11-shradha.t@samsung.com>
On 11-08-25, 21:16, Shradha Todi wrote:
> Add PCIe PHY support for Tesla FSD SoC.
Can you pls add a bit more description of what you are adding, helps to
understand the change
> +/* FSD: PCIe PCS registers */
> +#define FSD_PCIE_PCS_BRF_0 0x0004
> +#define FSD_PCIE_PCS_BRF_1 0x0804
> +#define FSD_PCIE_PCS_CLK 0x0180
> +
> +/* FSD: PCIe SYSREG registers */
> +#define FSD_PCIE_SYSREG_PHY_0_CON 0x042c
> +#define FSD_PCIE_SYSREG_PHY_0_CON_MASK 0x03ff
> +#define FSD_PCIE_SYSREG_PHY_0_REF_SEL (0x2 << 0)
Use GENMASK() please here and elsewhere
> +static int fsd_pcie_phy0_reset(struct phy *phy)
> +{
> + struct exynos_pcie_phy *phy_ctrl = phy_get_drvdata(phy);
> +
> + writel(0x1, phy_ctrl->pcs_base + FSD_PCIE_PCS_CLK);
> +
> + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON,
> + FSD_PCIE_SYSREG_PHY_0_CON_MASK, 0x0);
> + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON,
> + FSD_PCIE_SYSREG_PHY_0_AUX_EN, FSD_PCIE_SYSREG_PHY_0_AUX_EN);
> + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON,
> + FSD_PCIE_SYSREG_PHY_0_REF_SEL_MASK, FSD_PCIE_SYSREG_PHY_0_REF_SEL);
> + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON,
> + FSD_PCIE_SYSREG_PHY_0_INIT_RSTN, FSD_PCIE_SYSREG_PHY_0_INIT_RSTN);
pls conform to coding style for these
> +
> + return 0;
why return a value when this wont ever return anything else than 0?
> +
> + writel(0x2, pbase + FSD_PCIE_PHY_CMN_RESET);
> +
> + writel(0x00, phy_ctrl->pcs_base + FSD_PCIE_PCS_BRF_0);
> + writel(0x00, phy_ctrl->pcs_base + FSD_PCIE_PCS_BRF_1);
> + writel(0x00, pbase + FSD_PCIE_PHY_AGG_BIF_RESET);
> + writel(0x00, pbase + FSD_PCIE_PHY_AGG_BIF_CLOCK);
> +
> + fsd_pcie_phy_writel(phy_ctrl, FSD_PCIE_PHY_TRSV_REG07B_LN_N, 0x20);
> + fsd_pcie_phy_writel(phy_ctrl, FSD_PCIE_PHY_TRSV_REG052_LN_N, 0x00);
> + writel(0xaa, pbase + FSD_PCIE_PHY_TRSV_CMN_REG01E);
> + writel(0x28, pbase + FSD_PCIE_PHY_TRSV_CMN_REG02D);
> + writel(0x28, pbase + FSD_PCIE_PHY_TRSV_CMN_REG031);
> + writel(0x21, pbase + FSD_PCIE_PHY_TRSV_CMN_REG036);
> + writel(0x12, pbase + FSD_PCIE_PHY_TRSV_CMN_REG05F);
> + writel(0x23, pbase + FSD_PCIE_PHY_TRSV_CMN_REG060);
> + writel(0x0, pbase + FSD_PCIE_PHY_TRSV_CMN_REG061);
> + writel(0x0, pbase + FSD_PCIE_PHY_TRSV_CMN_REG062);
> + writel(0x15, pbase + FSD_PCIE_PHY_TRSV_CMN_REG03);
Magic numbers?
--
~Vinod
WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vkoul@kernel.org>
To: Shradha Todi <shradha.t@samsung.com>
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-phy@lists.infradead.org, mani@kernel.org,
lpieralisi@kernel.org, kwilczynski@kernel.org, robh@kernel.org,
bhelgaas@google.com, jingoohan1@gmail.com, krzk+dt@kernel.org,
conor+dt@kernel.org, alim.akhtar@samsung.com, kishon@kernel.org,
arnd@arndb.de, m.szyprowski@samsung.com, jh80.chung@samsung.com,
pankaj.dubey@samsung.com
Subject: Re: [PATCH v3 10/12] phy: exynos: Add PCIe PHY support for FSD SoC
Date: Mon, 1 Sep 2025 17:41:50 +0530 [thread overview]
Message-ID: <aLWNhv0eLj7LRrvM@vaman> (raw)
In-Reply-To: <20250811154638.95732-11-shradha.t@samsung.com>
On 11-08-25, 21:16, Shradha Todi wrote:
> Add PCIe PHY support for Tesla FSD SoC.
Can you pls add a bit more description of what you are adding, helps to
understand the change
> +/* FSD: PCIe PCS registers */
> +#define FSD_PCIE_PCS_BRF_0 0x0004
> +#define FSD_PCIE_PCS_BRF_1 0x0804
> +#define FSD_PCIE_PCS_CLK 0x0180
> +
> +/* FSD: PCIe SYSREG registers */
> +#define FSD_PCIE_SYSREG_PHY_0_CON 0x042c
> +#define FSD_PCIE_SYSREG_PHY_0_CON_MASK 0x03ff
> +#define FSD_PCIE_SYSREG_PHY_0_REF_SEL (0x2 << 0)
Use GENMASK() please here and elsewhere
> +static int fsd_pcie_phy0_reset(struct phy *phy)
> +{
> + struct exynos_pcie_phy *phy_ctrl = phy_get_drvdata(phy);
> +
> + writel(0x1, phy_ctrl->pcs_base + FSD_PCIE_PCS_CLK);
> +
> + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON,
> + FSD_PCIE_SYSREG_PHY_0_CON_MASK, 0x0);
> + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON,
> + FSD_PCIE_SYSREG_PHY_0_AUX_EN, FSD_PCIE_SYSREG_PHY_0_AUX_EN);
> + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON,
> + FSD_PCIE_SYSREG_PHY_0_REF_SEL_MASK, FSD_PCIE_SYSREG_PHY_0_REF_SEL);
> + regmap_update_bits(phy_ctrl->fsysreg, FSD_PCIE_SYSREG_PHY_0_CON,
> + FSD_PCIE_SYSREG_PHY_0_INIT_RSTN, FSD_PCIE_SYSREG_PHY_0_INIT_RSTN);
pls conform to coding style for these
> +
> + return 0;
why return a value when this wont ever return anything else than 0?
> +
> + writel(0x2, pbase + FSD_PCIE_PHY_CMN_RESET);
> +
> + writel(0x00, phy_ctrl->pcs_base + FSD_PCIE_PCS_BRF_0);
> + writel(0x00, phy_ctrl->pcs_base + FSD_PCIE_PCS_BRF_1);
> + writel(0x00, pbase + FSD_PCIE_PHY_AGG_BIF_RESET);
> + writel(0x00, pbase + FSD_PCIE_PHY_AGG_BIF_CLOCK);
> +
> + fsd_pcie_phy_writel(phy_ctrl, FSD_PCIE_PHY_TRSV_REG07B_LN_N, 0x20);
> + fsd_pcie_phy_writel(phy_ctrl, FSD_PCIE_PHY_TRSV_REG052_LN_N, 0x00);
> + writel(0xaa, pbase + FSD_PCIE_PHY_TRSV_CMN_REG01E);
> + writel(0x28, pbase + FSD_PCIE_PHY_TRSV_CMN_REG02D);
> + writel(0x28, pbase + FSD_PCIE_PHY_TRSV_CMN_REG031);
> + writel(0x21, pbase + FSD_PCIE_PHY_TRSV_CMN_REG036);
> + writel(0x12, pbase + FSD_PCIE_PHY_TRSV_CMN_REG05F);
> + writel(0x23, pbase + FSD_PCIE_PHY_TRSV_CMN_REG060);
> + writel(0x0, pbase + FSD_PCIE_PHY_TRSV_CMN_REG061);
> + writel(0x0, pbase + FSD_PCIE_PHY_TRSV_CMN_REG062);
> + writel(0x15, pbase + FSD_PCIE_PHY_TRSV_CMN_REG03);
Magic numbers?
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2025-09-01 14:47 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250811154648epcas5p4e55cc82e0df7d44ea55e249fef63d5fa@epcas5p4.samsung.com>
2025-08-11 15:46 ` [PATCH v3 00/12] Add PCIe support for Tesla FSD SoC Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-11 15:46 ` [PATCH v3 01/12] PCI: exynos: Remove unused MACROs in exynos PCIe file Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-11 15:46 ` [PATCH v3 02/12] PCI: exynos: Change macro names to exynos specific Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-11 15:46 ` [PATCH v3 03/12] PCI: exynos: Reorder MACROs to maintain consistency Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-11 15:46 ` [PATCH v3 04/12] PCI: exynos: Add platform device private data Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-11 15:46 ` [PATCH v3 05/12] PCI: exynos: Add resource ops, soc variant and device mode Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-13 23:07 ` Bjorn Helgaas
2025-08-13 23:07 ` Bjorn Helgaas
2025-08-18 9:21 ` Shradha Todi
2025-08-18 9:21 ` Shradha Todi
2025-08-11 15:46 ` [PATCH v3 06/12] dt-bindings: PCI: Split exynos host into two files Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-12 6:32 ` Krzysztof Kozlowski
2025-08-12 6:32 ` Krzysztof Kozlowski
2025-08-18 8:41 ` Shradha Todi
2025-08-18 8:41 ` Shradha Todi
2025-08-11 15:46 ` [PATCH v3 07/12] dt-bindings: PCI: Add support for Tesla FSD SoC Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-12 6:37 ` Krzysztof Kozlowski
2025-08-12 6:37 ` Krzysztof Kozlowski
2025-08-18 8:46 ` Shradha Todi
2025-08-18 8:46 ` Shradha Todi
2025-08-30 3:21 ` Manivannan Sadhasivam
2025-08-30 3:21 ` Manivannan Sadhasivam
2025-08-30 3:27 ` Manivannan Sadhasivam
2025-08-30 3:27 ` Manivannan Sadhasivam
2025-08-11 15:46 ` [PATCH v3 08/12] dt-bindings: phy: Add PCIe PHY support for " Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-14 8:13 ` Krzysztof Kozlowski
2025-08-14 8:13 ` Krzysztof Kozlowski
2025-08-11 15:46 ` [PATCH v3 09/12] phy: exynos: Add platform device private data Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-11 15:46 ` [PATCH v3 10/12] phy: exynos: Add PCIe PHY support for FSD SoC Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-09-01 12:11 ` Vinod Koul [this message]
2025-09-01 12:11 ` Vinod Koul
2025-08-11 15:46 ` [PATCH v3 11/12] PCI: exynos: Add support for Tesla " Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-13 23:07 ` Bjorn Helgaas
2025-08-13 23:07 ` Bjorn Helgaas
2025-08-18 9:30 ` Shradha Todi
2025-08-18 9:30 ` Shradha Todi
2025-08-18 18:25 ` Bjorn Helgaas
2025-08-18 18:25 ` Bjorn Helgaas
2025-08-19 6:34 ` Krzysztof Kozlowski
2025-08-19 6:34 ` Krzysztof Kozlowski
2025-08-19 11:18 ` Shradha Todi
2025-08-19 11:18 ` Shradha Todi
2025-08-19 11:39 ` Shradha Todi
2025-08-19 11:39 ` Shradha Todi
2025-08-19 15:07 ` Bjorn Helgaas
2025-08-19 15:07 ` Bjorn Helgaas
2025-08-30 3:54 ` Manivannan Sadhasivam
2025-08-30 3:54 ` Manivannan Sadhasivam
2025-08-11 15:46 ` [PATCH v3 12/12] arm64: dts: fsd: Add PCIe " Shradha Todi
2025-08-11 15:46 ` Shradha Todi
2025-08-12 6:43 ` Krzysztof Kozlowski
2025-08-12 6:43 ` Krzysztof Kozlowski
2025-08-18 8:54 ` Shradha Todi
2025-08-18 8:54 ` Shradha Todi
2025-08-30 3:58 ` Manivannan Sadhasivam
2025-08-30 3:58 ` Manivannan Sadhasivam
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=aLWNhv0eLj7LRrvM@vaman \
--to=vkoul@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jh80.chung@samsung.com \
--cc=jingoohan1@gmail.com \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mani@kernel.org \
--cc=pankaj.dubey@samsung.com \
--cc=robh@kernel.org \
--cc=shradha.t@samsung.com \
/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.