All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shradha Todi" <shradha.t@samsung.com>
To: "'Krzysztof Kozlowski'" <krzk@kernel.org>
Cc: <linux-pci@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-phy@lists.infradead.org>,
	<manivannan.sadhasivam@linaro.org>, <lpieralisi@kernel.org>,
	<kw@linux.com>, <robh@kernel.org>, <bhelgaas@google.com>,
	<jingoohan1@gmail.com>, <krzk+dt@kernel.org>,
	<conor+dt@kernel.org>, <alim.akhtar@samsung.com>,
	<vkoul@kernel.org>, <kishon@kernel.org>, <arnd@arndb.de>,
	<m.szyprowski@samsung.com>, <jh80.chung@samsung.com>,
	"'Pankaj Dubey'" <pankaj.dubey@samsung.com>,
	<linux-samsung-soc@vger.kernel.org>
Subject: RE: [PATCH 09/10] PCI: exynos: Add support for Tesla FSD SoC
Date: Thu, 29 May 2025 15:54:43 +0530	[thread overview]
Message-ID: <0eec01dbd083$e78c8200$b6a58600$@samsung.com> (raw)
In-Reply-To: <441dd5c3-fd51-4471-86ad-337c646b1571@kernel.org>



> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 28 May 2025 12:56
> 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.or; linux-kernel@vger.kernel.org; linux-phy@lists.infradead.org;
> manivannan.sadhasivam@linaro.org; lpieralisi@kernel.org; kw@linux.com; robh@kernel.org;
> bhelgaas@google.com; jingoohan1@gmail.com; krzk+dt@kernel.org; conor+dt@kernel.org;
> alim.akhtar@samsung.com; vkoul@kernel.org; kishon@kernel.org; arnd@arndb.de;
> m.szyprowski@samsung.com; jh80.chung@samsung.com
> Subject: Re: [PATCH 09/10] PCI: exynos: Add support for Tesla FSD SoC
> 
> On 27/05/2025 12:45, Shradha Todi wrote:
> >
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <krzk@kernel.org>
> >> Sent: 21 May 2025 15:18
> >> 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.or;
> >> linux-kernel@vger.kernel.org; linux-phy@lists.infradead.org; manivannan.sadhasivam@linaro.org;
> lpieralisi@kernel.org;
> >> kw@linux.com; robh@kernel.org; bhelgaas@google.com; jingoohan1@gmail.com;
> krzk+dt@kernel.org; conor+dt@kernel.org;
> >> alim.akhtar@samsung.com; vkoul@kernel.org; kishon@kernel.org; arnd@arndb.de;
> m.szyprowski@samsung.com;
> >> jh80.chung@samsung.com
> >> Subject: Re: [PATCH 09/10] PCI: exynos: Add support for Tesla FSD SoC
> >>
> >> On Mon, May 19, 2025 at 01:01:51AM GMT, Shradha Todi wrote:
> >>>  static int exynos_pcie_probe(struct platform_device *pdev)  {
> >>>  	struct device *dev = &pdev->dev;
> >>> @@ -355,6 +578,26 @@ static int exynos_pcie_probe(struct platform_device *pdev)
> >>>  	if (IS_ERR(ep->phy))
> >>>  		return PTR_ERR(ep->phy);
> >>>
> >>> +	if (ep->pdata->soc_variant == FSD) {
> >>> +		ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(36));
> >>> +		if (ret)
> >>> +			return ret;
> >>> +
> >>> +		ep->sysreg = syscon_regmap_lookup_by_phandle(dev->of_node,
> >>> +				"samsung,syscon-pcie");
> >>> +		if (IS_ERR(ep->sysreg)) {
> >>> +			dev_err(dev, "sysreg regmap lookup failed.\n");
> >>> +			return PTR_ERR(ep->sysreg);
> >>> +		}
> >>> +
> >>> +		ret = of_property_read_u32_index(dev->of_node, "samsung,syscon-pcie", 1,
> >>> +						 &ep->sysreg_offset);
> >>> +		if (ret) {
> >>> +			dev_err(dev, "couldn't get the register offset for syscon!\n");
> >>
> >> So all MMIO will go via syscon? I am pretty close to NAKing all this, but let's be sure that I got it right
> - please post your complete DTS
> >> for upstream. That's a requirement from me for any samsung drivers - I don't want to support fake,
> broken downstream solutions
> >> (based on multiple past submissions).
> >>
> >
> > By all MMIO do you mean DBI read/write? The FSD hardware architecture is such that the
> > DBI/ATU/DMA address is at the same offset.
> > The syscon register holds the upper bits of the actual address differentiating between these 3
> > spaces. This kind of implementation was done
> > to reduce address space for PCI DWC controller. So yes, each DBI/ATU register read/write will have
> > syscon write before it to switch address space.
> 
> Wrap your replies correctly to fit mailing list.
> 
> No, I meant your binding does not define any MMIO at all. I see you use
> for example elbi_base which is mapped from "elbi" reg entry, but you do
> not have it in your binding.
> 
> Maybe just binding is heavily incomplete and that confused me.
> 

Got it. I think the confusion is due to the incomplete dt-bindings.
I will fix these issues in the next version. Will post again once I get
clarity about how to avoid redirection in patch 4/10

> Best regards,
> Krzysztof



WARNING: multiple messages have this Message-ID (diff)
From: "Shradha Todi" <shradha.t@samsung.com>
To: "'Krzysztof Kozlowski'" <krzk@kernel.org>
Cc: <linux-pci@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-phy@lists.infradead.org>,
	<manivannan.sadhasivam@linaro.org>, <lpieralisi@kernel.org>,
	<kw@linux.com>, <robh@kernel.org>, <bhelgaas@google.com>,
	<jingoohan1@gmail.com>, <krzk+dt@kernel.org>,
	<conor+dt@kernel.org>, <alim.akhtar@samsung.com>,
	<vkoul@kernel.org>, <kishon@kernel.org>, <arnd@arndb.de>,
	<m.szyprowski@samsung.com>, <jh80.chung@samsung.com>,
	"'Pankaj Dubey'" <pankaj.dubey@samsung.com>,
	<linux-samsung-soc@vger.kernel.org>
Subject: RE: [PATCH 09/10] PCI: exynos: Add support for Tesla FSD SoC
Date: Thu, 29 May 2025 15:54:43 +0530	[thread overview]
Message-ID: <0eec01dbd083$e78c8200$b6a58600$@samsung.com> (raw)
In-Reply-To: <441dd5c3-fd51-4471-86ad-337c646b1571@kernel.org>



> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 28 May 2025 12:56
> 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.or; linux-kernel@vger.kernel.org; linux-phy@lists.infradead.org;
> manivannan.sadhasivam@linaro.org; lpieralisi@kernel.org; kw@linux.com; robh@kernel.org;
> bhelgaas@google.com; jingoohan1@gmail.com; krzk+dt@kernel.org; conor+dt@kernel.org;
> alim.akhtar@samsung.com; vkoul@kernel.org; kishon@kernel.org; arnd@arndb.de;
> m.szyprowski@samsung.com; jh80.chung@samsung.com
> Subject: Re: [PATCH 09/10] PCI: exynos: Add support for Tesla FSD SoC
> 
> On 27/05/2025 12:45, Shradha Todi wrote:
> >
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <krzk@kernel.org>
> >> Sent: 21 May 2025 15:18
> >> 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.or;
> >> linux-kernel@vger.kernel.org; linux-phy@lists.infradead.org; manivannan.sadhasivam@linaro.org;
> lpieralisi@kernel.org;
> >> kw@linux.com; robh@kernel.org; bhelgaas@google.com; jingoohan1@gmail.com;
> krzk+dt@kernel.org; conor+dt@kernel.org;
> >> alim.akhtar@samsung.com; vkoul@kernel.org; kishon@kernel.org; arnd@arndb.de;
> m.szyprowski@samsung.com;
> >> jh80.chung@samsung.com
> >> Subject: Re: [PATCH 09/10] PCI: exynos: Add support for Tesla FSD SoC
> >>
> >> On Mon, May 19, 2025 at 01:01:51AM GMT, Shradha Todi wrote:
> >>>  static int exynos_pcie_probe(struct platform_device *pdev)  {
> >>>  	struct device *dev = &pdev->dev;
> >>> @@ -355,6 +578,26 @@ static int exynos_pcie_probe(struct platform_device *pdev)
> >>>  	if (IS_ERR(ep->phy))
> >>>  		return PTR_ERR(ep->phy);
> >>>
> >>> +	if (ep->pdata->soc_variant == FSD) {
> >>> +		ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(36));
> >>> +		if (ret)
> >>> +			return ret;
> >>> +
> >>> +		ep->sysreg = syscon_regmap_lookup_by_phandle(dev->of_node,
> >>> +				"samsung,syscon-pcie");
> >>> +		if (IS_ERR(ep->sysreg)) {
> >>> +			dev_err(dev, "sysreg regmap lookup failed.\n");
> >>> +			return PTR_ERR(ep->sysreg);
> >>> +		}
> >>> +
> >>> +		ret = of_property_read_u32_index(dev->of_node, "samsung,syscon-pcie", 1,
> >>> +						 &ep->sysreg_offset);
> >>> +		if (ret) {
> >>> +			dev_err(dev, "couldn't get the register offset for syscon!\n");
> >>
> >> So all MMIO will go via syscon? I am pretty close to NAKing all this, but let's be sure that I got it right
> - please post your complete DTS
> >> for upstream. That's a requirement from me for any samsung drivers - I don't want to support fake,
> broken downstream solutions
> >> (based on multiple past submissions).
> >>
> >
> > By all MMIO do you mean DBI read/write? The FSD hardware architecture is such that the
> > DBI/ATU/DMA address is at the same offset.
> > The syscon register holds the upper bits of the actual address differentiating between these 3
> > spaces. This kind of implementation was done
> > to reduce address space for PCI DWC controller. So yes, each DBI/ATU register read/write will have
> > syscon write before it to switch address space.
> 
> Wrap your replies correctly to fit mailing list.
> 
> No, I meant your binding does not define any MMIO at all. I see you use
> for example elbi_base which is mapped from "elbi" reg entry, but you do
> not have it in your binding.
> 
> Maybe just binding is heavily incomplete and that confused me.
> 

Got it. I think the confusion is due to the incomplete dt-bindings.
I will fix these issues in the next version. Will post again once I get
clarity about how to avoid redirection in patch 4/10

> Best regards,
> Krzysztof


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

  reply	other threads:[~2025-05-29 15:40 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250518193219epcas5p24b442233b3e2bc2a92f43b71a126062f@epcas5p2.samsung.com>
2025-05-18 19:31 ` [PATCH 00/10] Add PCIe support for Tesla FSD SoC Shradha Todi
2025-05-18 19:31   ` Shradha Todi
2025-05-18 19:31   ` [PATCH 01/10] PCI: exynos: Change macro names to exynos specific Shradha Todi
2025-05-18 19:31     ` Shradha Todi
2025-05-18 19:31   ` [PATCH 02/10] PCI: exynos: Remove unused MACROs in exynos PCI file Shradha Todi
2025-05-18 19:31     ` Shradha Todi
2025-05-21  9:41     ` Krzysztof Kozlowski
2025-05-21  9:41       ` Krzysztof Kozlowski
2025-05-27 10:42       ` Shradha Todi
2025-05-27 10:42         ` Shradha Todi
2025-05-18 19:31   ` [PATCH 03/10] PCI: exynos: Reorder MACROs to maintain consistency Shradha Todi
2025-05-18 19:31     ` Shradha Todi
2025-05-21  9:45     ` Krzysztof Kozlowski
2025-05-21  9:45       ` Krzysztof Kozlowski
2025-05-27 10:42       ` Shradha Todi
2025-05-27 10:42         ` Shradha Todi
2025-05-18 19:31   ` [PATCH 04/10] PCI: exynos: Add platform device private data Shradha Todi
2025-05-18 19:31     ` Shradha Todi
2025-05-21  9:44     ` Krzysztof Kozlowski
2025-05-21  9:44       ` Krzysztof Kozlowski
2025-05-27 10:43       ` Shradha Todi
2025-05-27 10:43         ` Shradha Todi
2025-06-13  9:04         ` Manivannan Sadhasivam
2025-06-13  9:04           ` Manivannan Sadhasivam
2025-05-18 19:31   ` [PATCH 05/10] PCI: exynos: Add structure to hold resource operations Shradha Todi
2025-05-18 19:31     ` Shradha Todi
2025-05-21  9:42     ` Krzysztof Kozlowski
2025-05-21  9:42       ` Krzysztof Kozlowski
2025-05-27 10:44       ` Shradha Todi
2025-05-27 10:44         ` Shradha Todi
2025-05-18 19:31   ` [PATCH 06/10] dt-bindings: PCI: Add bindings support for Tesla FSD SoC Shradha Todi
2025-05-18 19:31     ` Shradha Todi
2025-05-21  9:37     ` Krzysztof Kozlowski
2025-05-21  9:37       ` Krzysztof Kozlowski
2025-05-27 10:44       ` Shradha Todi
2025-05-27 10:44         ` Shradha Todi
2025-05-18 19:31   ` [PATCH 07/10] dt-bindings: phy: Add PHY bindings support for " Shradha Todi
2025-05-18 19:31     ` Shradha Todi
2025-05-21  9:33     ` Krzysztof Kozlowski
2025-05-21  9:33       ` Krzysztof Kozlowski
2025-05-27 10:44       ` Shradha Todi
2025-05-27 10:44         ` Shradha Todi
2025-05-18 19:31   ` [PATCH 08/10] phy: exynos: Add PCIe PHY " Shradha Todi
2025-05-18 19:31     ` Shradha Todi
2025-05-21  9:40     ` Krzysztof Kozlowski
2025-05-21  9:40       ` Krzysztof Kozlowski
2025-05-27 10:45       ` Shradha Todi
2025-05-27 10:45         ` Shradha Todi
2025-05-28  7:21         ` Krzysztof Kozlowski
2025-05-28  7:21           ` Krzysztof Kozlowski
2025-05-18 19:31   ` [PATCH 09/10] PCI: exynos: Add support for Tesla " Shradha Todi
2025-05-18 19:31     ` Shradha Todi
2025-05-19 10:26     ` Niklas Cassel
2025-05-19 10:26       ` Niklas Cassel
2025-05-21  9:48     ` Krzysztof Kozlowski
2025-05-21  9:48       ` Krzysztof Kozlowski
2025-05-27 10:45       ` Shradha Todi
2025-05-27 10:45         ` Shradha Todi
2025-05-28  7:25         ` Krzysztof Kozlowski
2025-05-28  7:25           ` Krzysztof Kozlowski
2025-05-29 10:24           ` Shradha Todi [this message]
2025-05-29 10:24             ` Shradha Todi
2025-05-18 19:31   ` [PATCH 10/10] misc: pci_endpoint_test: Add driver data for FSD PCIe controllers Shradha Todi
2025-05-18 19:31     ` Shradha Todi
2025-05-19  9:59     ` Niklas Cassel
2025-05-19  9:59       ` Niklas Cassel

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='0eec01dbd083$e78c8200$b6a58600$@samsung.com' \
    --to=shradha.t@samsung.com \
    --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=krzk@kernel.org \
    --cc=kw@linux.com \
    --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=manivannan.sadhasivam@linaro.org \
    --cc=pankaj.dubey@samsung.com \
    --cc=robh@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 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.