[PATCH v21 9/9] arm64: dts: imx95: Add msi-map for pci-ep device

2025-07-10 Thread Frank Li via B4 Relay
From: Frank Li Add msi-map for pci-ep device. Acked-by: Manivannan Sadhasivam Signed-off-by: Frank Li --- change in v20 - add Manivannan's ACK change from v14 to v16 - none change from v13 to v14 - new patch --- arch/arm64/boot/dts/freescale/imx95.dtsi | 1 + 1 file changed, 1 inse

[PATCH v21 2/9] PCI: imx6: Add LUT configuration for MSI/IOMMU in Endpoint mode

2025-07-10 Thread Frank Li via B4 Relay
From: Frank Li Add LUT entry for Endpoint mode by calling imx_pcie_add_lut_by_rid(0), since only one physical function is supported. This sets up a single LUT entry required for MSI or IOMMU. The Endpoint function can operate without LUT if neither IOMMU nor MSI is used. This LUT setup enables

[PATCH v21 6/9] PCI: endpoint: pci-epf-test: Add doorbell test support

2025-07-10 Thread Frank Li via B4 Relay
From: Frank Li Add three registers: doorbell_bar, doorbell_addr, and doorbell_data. Use pci_epf_alloc_doorbell() to allocate a doorbell address space. Enable the Root Complex (RC) side driver to trigger pci-epc-test's doorbell callback handler by writing doorbell_data to the m

[PATCH v21 7/9] misc: pci_endpoint_test: Add doorbell test case

2025-07-10 Thread Frank Li via B4 Relay
From: Frank Li Add three registers: PCIE_ENDPOINT_TEST_DB_BAR, PCIE_ENDPOINT_TEST_DB_ADDR, and PCIE_ENDPOINT_TEST_DB_DATA. Trigger the doorbell by writing data from PCI_ENDPOINT_TEST_DB_DATA to the address provided by PCI_ENDPOINT_TEST_DB_OFFSET and wait for endpoint feedback. Add two command

[PATCH v21 8/9] selftests: pci_endpoint: Add doorbell test case

2025-07-10 Thread Frank Li via B4 Relay
From: Frank Li Add doorbell test case. Signed-off-by: Frank Li --- change in v20 - update document change from v14 to v16 - Add set IRQ type change from v13 to v14 - merge to selftests framework --- Documentation/PCI/endpoint/pci-test-howto.rst | 14 +++ .../selftests

[PATCH v21 5/9] PCI: endpoint: Add pci_epf_align_inbound_addr() helper for address alignment

2025-07-10 Thread Frank Li via B4 Relay
From: Frank Li Introduce the helper function pci_epf_align_inbound_addr() to adjust addresses according to PCI BAR alignment requirements, converting addresses into base and offset values. Signed-off-by: Frank Li --- Changes in v21 - align to bar size Changes in V20 - update function kdoc

[PATCH v21 1/9] PCI: imx6: Add helper function imx_pcie_add_lut_by_rid()

2025-07-10 Thread Frank Li via B4 Relay
From: Frank Li Add helper function imx_pcie_add_lut_by_rid(), which will be used for MSI doorbell support in endpoint mode in the future. No functional change. Signed-off-by: Frank Li --- - change in v20 - update commit message. change from v14 to v16 - none change from v13 to v14 - new

[PATCH v21 4/9] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-07-10 Thread Frank Li via B4 Relay
From: Frank Li Some MSI controller change address/data pair when irq_set_affinity(). Current PCI endpoint can't support this type MSI controller. Call irq_domain_is_msi_immutable() check if address/data pair immutable. Also ensure it is parent MSI domains, not device-specific MSI domains,

[PATCH v21 3/9] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller

2025-07-10 Thread Frank Li via B4 Relay
From: Frank Li Doorbell feature is implemented by mapping the EP's MSI interrupt controller message address to a dedicated BAR in the EPC core. It is the responsibility of the EPF driver to pass the actual message data to be written by the host to the doorbell BAR region through its own

[PATCH v21 0/9] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-07-10 Thread Frank Li via B4 Relay
│ ││ ││ │ │ ││ ││ │ │ ││ └┘ └───┘ └┘ This patches based on old https://lore.kernel.org/imx/20221124055036.1630573-1-frank...@nxp.com/ Original patch only target to vntb driver. But actually it is common method. This patches add new API to pci-epf-core, so any EP driver can use it. Previous v2 discussion here. https

Re: [PATCH v20 0/9] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-07-10 Thread Frank Li
On Thu, Jul 10, 2025 at 01:40:25PM +0200, Niklas Cassel wrote: > Hello Frank, > > I tested v20 of your series, but unfortunately, it still doesn't work. > > When enabling the doorbell, the programming of the inbound iATU fails: > > ## pci_epf_test_enable_doorbell() > #

[PATCH v20 8/9] selftests: pci_endpoint: Add doorbell test case

2025-07-09 Thread Frank Li via B4 Relay
From: Frank Li Add doorbell test case. Signed-off-by: Frank Li --- change in v20 - update document change from v14 to v16 - Add set IRQ type change from v13 to v14 - merge to selftests framework --- Documentation/PCI/endpoint/pci-test-howto.rst | 14 +++ .../selftests

[PATCH v20 4/9] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-07-09 Thread Frank Li via B4 Relay
From: Frank Li Some MSI controller change address/data pair when irq_set_affinity(). Current PCI endpoint can't support this type MSI controller. Call irq_domain_is_msi_immutable() check if address/data pair immutable. Also ensure it is parent MSI domains, not device-specific MSI domains,

[PATCH v20 9/9] arm64: dts: imx95: Add msi-map for pci-ep device

2025-07-09 Thread Frank Li via B4 Relay
From: Frank Li Add msi-map for pci-ep device. Acked-by: Manivannan Sadhasivam Signed-off-by: Frank Li --- change in v20 - add Manivannan's ACK change from v14 to v16 - none change from v13 to v14 - new patch --- arch/arm64/boot/dts/freescale/imx95.dtsi | 1 + 1 file changed, 1 inse

[PATCH v20 7/9] misc: pci_endpoint_test: Add doorbell test case

2025-07-09 Thread Frank Li via B4 Relay
From: Frank Li Add three registers: PCIE_ENDPOINT_TEST_DB_BAR, PCIE_ENDPOINT_TEST_DB_ADDR, and PCIE_ENDPOINT_TEST_DB_DATA. Trigger the doorbell by writing data from PCI_ENDPOINT_TEST_DB_DATA to the address provided by PCI_ENDPOINT_TEST_DB_OFFSET and wait for endpoint feedback. Add two command

[PATCH v20 6/9] PCI: endpoint: pci-epf-test: Add doorbell test support

2025-07-09 Thread Frank Li via B4 Relay
From: Frank Li Add three registers: doorbell_bar, doorbell_addr, and doorbell_data. Use pci_epf_alloc_doorbell() to allocate a doorbell address space. Enable the Root Complex (RC) side driver to trigger pci-epc-test's doorbell callback handler by writing doorbell_data to the m

[PATCH v20 2/9] PCI: imx6: Add LUT configuration for MSI/IOMMU in Endpoint mode

2025-07-09 Thread Frank Li via B4 Relay
From: Frank Li Add LUT entry for Endpoint mode by calling imx_pcie_add_lut_by_rid(0), since only one physical function is supported. This sets up a single LUT entry required for MSI or IOMMU. The Endpoint function can operate without LUT if neither IOMMU nor MSI is used. This LUT setup enables

[PATCH v20 5/9] PCI: endpoint: Add pci_epf_align_inbound_addr() helper for address alignment

2025-07-09 Thread Frank Li via B4 Relay
From: Frank Li Introduce the helper function pci_epf_align_inbound_addr() to adjust addresses according to PCI BAR alignment requirements, converting addresses into base and offset values. Signed-off-by: Frank Li --- Changes in V20 - update function kdoc comments. - 128 come from

[PATCH v20 1/9] PCI: imx6: Add helper function imx_pcie_add_lut_by_rid()

2025-07-09 Thread Frank Li via B4 Relay
From: Frank Li Add helper function imx_pcie_add_lut_by_rid(), which will be used for MSI doorbell support in endpoint mode in the future. No functional change. Signed-off-by: Frank Li --- - change in v20 - update commit message. change from v14 to v16 - none change from v13 to v14 - new

[PATCH v20 3/9] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller

2025-07-09 Thread Frank Li via B4 Relay
From: Frank Li Doorbell feature is implemented by mapping the EP's MSI interrupt controller message address to a dedicated BAR in the EPC core. It is the responsibility of the EPF driver to pass the actual message data to be written by the host to the doorbell BAR region through its own

[PATCH v20 0/9] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-07-09 Thread Frank Li via B4 Relay
│ ││ ││ │ │ ││ ││ │ │ ││ └┘ └───┘ └┘ This patches based on old https://lore.kernel.org/imx/20221124055036.1630573-1-frank...@nxp.com/ Original patch only target to vntb driver. But actually it is common method. This patches add new API to pci-epf-core, so any EP driver can use it. Previous v2 discussion here. https

Re: [PATCH v19 01/10] PCI: endpoint: Set ID and of_node for function driver

2025-07-08 Thread Frank Li
On Tue, Jul 08, 2025 at 04:51:55PM +0530, Manivannan Sadhasivam wrote: > On Mon, Jul 07, 2025 at 12:41:22PM GMT, Frank Li wrote: > > On Wed, Jul 02, 2025 at 11:19:36AM -0400, Frank Li wrote: > > > On Wed, Jul 02, 2025 at 08:25:17PM +0530, Manivannan Sadhasivam wrote: > >

Re: [PATCH v19 01/10] PCI: endpoint: Set ID and of_node for function driver

2025-07-07 Thread Frank Li
On Wed, Jul 02, 2025 at 11:19:36AM -0400, Frank Li wrote: > On Wed, Jul 02, 2025 at 08:25:17PM +0530, Manivannan Sadhasivam wrote: > > On Wed, Jul 02, 2025 at 10:40:53AM GMT, Frank Li wrote: > > > On Wed, Jul 02, 2025 at 04:30:48PM +0530, Manivannan Sadhasivam wrote: > >

Re: [PATCH v19 01/10] PCI: endpoint: Set ID and of_node for function driver

2025-07-07 Thread Frank Li
On Wed, Jul 02, 2025 at 11:19:36AM -0400, Frank Li wrote: > On Wed, Jul 02, 2025 at 08:25:17PM +0530, Manivannan Sadhasivam wrote: > > On Wed, Jul 02, 2025 at 10:40:53AM GMT, Frank Li wrote: > > > On Wed, Jul 02, 2025 at 04:30:48PM +0530, Manivannan Sadhasivam wrote: > >

Re: [PATCH v19 01/10] PCI: endpoint: Set ID and of_node for function driver

2025-07-02 Thread Frank Li
On Wed, Jul 02, 2025 at 08:25:17PM +0530, Manivannan Sadhasivam wrote: > On Wed, Jul 02, 2025 at 10:40:53AM GMT, Frank Li wrote: > > On Wed, Jul 02, 2025 at 04:30:48PM +0530, Manivannan Sadhasivam wrote: > > > On Mon, Jun 09, 2025 at 12:34:13PM GMT, Frank Li wrote: > &

Re: [PATCH v19 09/10] pci: imx6: Add LUT setting for MSI/IOMMU in Endpoint mode

2025-07-02 Thread Frank Li
On Wed, Jul 02, 2025 at 06:52:01PM +0530, Manivannan Sadhasivam wrote: > On Mon, Jun 09, 2025 at 12:34:21PM GMT, Frank Li wrote: > > Support only one physical function, so call imx_pcie_add_lut_by_rid(0) > > to add a single LUT entry when operating in EP mode. > > > > S

Re: [PATCH v19 03/10] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-07-02 Thread Frank Li
On Wed, Jul 02, 2025 at 05:00:23PM +0530, Manivannan Sadhasivam wrote: > On Mon, Jun 09, 2025 at 12:34:15PM GMT, Frank Li wrote: > > Some MSI controller change address/data pair when irq_set_affinity(). > > Current PCI endpoint can't support this type

Re: [PATCH v19 01/10] PCI: endpoint: Set ID and of_node for function driver

2025-07-02 Thread Frank Li
On Wed, Jul 02, 2025 at 04:30:48PM +0530, Manivannan Sadhasivam wrote: > On Mon, Jun 09, 2025 at 12:34:13PM GMT, Frank Li wrote: > > Set device ID as 'vfunc_no << 3 | func_no' and use > > 'device_set_of_node_from_dev()' to set 'of_node' the same a

Re: [PATCH v3 5/5] arm64: dts: imx95-19x19-evk: Add CM7 nodes and vdev related memory regions

2025-06-26 Thread Frank Li
= "tx", "rx", "rxdb"; > + mboxes = <&mu7 0 1>, > + <&mu7 1 1>, > + <&mu7 3 1>; > + memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>, > + <&vdev1vring0>, <&vdev1vring1>, <&rsc_table>; > + }; > +}; > + > +&mu7 { > + status = "okay"; > }; can you keep &mu7 as order, at least it should be after &enetc_port0 Frank > > &enetc_port0 { > > -- > 2.37.1 >

Re: [PATCH v3 4/5] arm64: dts: imx95: Add SCMI LMM/CPU nodes

2025-06-26 Thread Frank Li
On Wed, Jun 25, 2025 at 10:23:30AM +0800, Peng Fan (OSS) wrote: > From: Peng Fan > > Add SCMI LMM/CPU nodes which is for remoteproc to handle remote cores. > > Signed-off-by: Peng Fan Reviewed-by: Frank Li > --- > arch/arm64/boot/dts/freescale/imx95.dtsi | 8

Re: [PATCH v3 3/5] remoteproc: imx_rproc: Add support for i.MX95

2025-06-26 Thread Frank Li
gned-off-by: Peng Fan > --- Reviewed-by: Frank Li > drivers/remoteproc/imx_rproc.c | 25 + > 1 file changed, 25 insertions(+) > > diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c > index >

Re: [PATCH v3 2/5] remoteproc: imx_rproc: Add support for System Manager API

2025-06-26 Thread Frank Li
Use SCMI_IMX_LMM_POWER_ON to detect whether >the M7 LM is under control of A55 LM. > > Current setup relies on pre-Linux software(U-Boot) to do > M7 TCM ECC initialization. In future, we could add the support in Linux > to decouple U-Boot and Linux. > > Reviewed-by: Dan

Re: [PATCH v3 1/5] dt-bindings: remoteproc: fsl,imx-rproc: Add support for i.MX95

2025-06-26 Thread Frank Li
On Wed, Jun 25, 2025 at 10:23:27AM +0800, Peng Fan (OSS) wrote: > From: Peng Fan > > Add compatible string for the Cortex-M7 core in i.MX95 > > Signed-off-by: Peng Fan Reviewed-by: Frank Li > --- > Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 1 +

[PATCH v19 10/10] arm64: dts: imx95: Add msi-map for pci-ep device

2025-06-09 Thread Frank Li
Add msi-map for pci-ep device. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- arch/arm64/boot/dts/freescale/imx95.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale

[PATCH v19 09/10] pci: imx6: Add LUT setting for MSI/IOMMU in Endpoint mode

2025-06-09 Thread Frank Li
Support only one physical function, so call imx_pcie_add_lut_by_rid(0) to add a single LUT entry when operating in EP mode. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 8 +++- 1 file changed, 7

[PATCH v19 08/10] pci: imx6: Add helper function imx_pcie_add_lut_by_rid()

2025-06-09 Thread Frank Li
Add helper function imx_pcie_add_lut_by_rid(), which will be used for Endpoint mode in the future. No functional change. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 17 ++--- 1 file changed

[PATCH v19 07/10] selftests: pci_endpoint: Add doorbell test case

2025-06-09 Thread Frank Li
Add doorbell test case. Signed-off-by: Frank Li --- change from v14 to v16 - Add set IRQ type change from v13 to v14 - merge to selftests framework --- .../selftests/pci_endpoint/pci_endpoint_test.c | 28 ++ 1 file changed, 28 insertions(+) diff --git a/tools/testing

[PATCH v19 05/10] PCI: endpoint: pci-epf-test: Add doorbell test support

2025-06-09 Thread Frank Li
pci_endpoint_test -f pcie_ep_doorbell' return success. If EP side doesn't support MSI, the same to 'F'. F: 'pci_endpoint_test -f pcie_ep_doorbell' return failure, other case as usual. Tested-by: Niklas Cassel Signed-off-by: Frank Li --- change from v15 to v16 - use le32

[PATCH v19 06/10] misc: pci_endpoint_test: Add doorbell test case

2025-06-09 Thread Frank Li
case as usual. Tested-by: Niklas Cassel Signed-off-by: Frank Li --- change from v14 to v16 - none Change from v13 to v14 - update to use pci_endpoint_test -f pcie_ep_doorbell - change ioctrl id to fix conflict Change from v9 to v13 - none Change from v8 to v9 - change PCITEST_DOORBELL to 0xa Cha

[PATCH v19 04/10] PCI: endpoint: Add pci_epf_align_inbound_addr() helper for address alignment

2025-06-09 Thread Frank Li
Introduce the helper function pci_epf_align_inbound_addr() to adjust addresses according to PCI BAR alignment requirements, converting addresses into base and offset values. Signed-off-by: Frank Li --- Change from v15 to v16 - none Change from v14 to v15 - change out address type to dma_addr_t

[PATCH v19 03/10] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-06-09 Thread Frank Li
Some MSI controller change address/data pair when irq_set_affinity(). Current PCI endpoint can't support this type MSI controller. Call irq_domain_is_msi_immutable() check if address/data pair immutable. Signed-off-by: Frank Li --- change in v18 - update commit message. remove 'inc

[PATCH v19 02/10] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller

2025-06-09 Thread Frank Li
iklas Cassel Signed-off-by: Frank Li --- Change from v15 to v16 - fix rebase conflict Change from v14 to v15 - check CONFIG_GENERIC_MSI Fix below build error | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202502082204.6prr3cfg-...@intel.com/ All errors (new

[PATCH v19 01/10] PCI: endpoint: Set ID and of_node for function driver

2025-06-09 Thread Frank Li
hem. Setting the ID and 'of_node' prepares for proper support. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 new patch --- drivers/pci/endpoint/pci-epf-core.c | 4 include/linux/pci-epf.h | 2 ++ 2 files changed, 6 insertions(+) diff --gi

[PATCH v19 00/10] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-06-09 Thread Frank Li
│ ││ ││ │ │ ││ ││ │ │ ││ └┘ └───┘ └┘ This patches based on old https://lore.kernel.org/imx/20221124055036.1630573-1-frank...@nxp.com/ Original patch only target to vntb driver. But actually it is common method. This patches add new API to pci-epf-core, so any EP driver can use it. Previous v2 discussion here. https

Re: [PATCH v18 00/15] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-05-01 Thread Frank Li
On Mon, Apr 14, 2025 at 02:30:54PM -0400, Frank Li wrote: Marc Zyngier: Do you have additional comments for this version? Frank Li

[PATCH v18 00/15] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-04-14 Thread Frank Li
│ ││ ││ │ │ ││ ││ │ │ ││ └┘ └───┘ └┘ This patches based on old https://lore.kernel.org/imx/20221124055036.1630573-1-frank...@nxp.com/ Original patch only target to vntb driver. But actually it is common method. This patches add new API to pci-epf-core, so any EP driver can use it. Previous v2 discussion here. https

[PATCH v18 15/15] arm64: dts: imx95: Add msi-map for pci-ep device

2025-04-14 Thread Frank Li
Add msi-map for pci-ep device. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- arch/arm64/boot/dts/freescale/imx95.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale

[PATCH v18 07/15] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller

2025-04-14 Thread Frank Li
iklas Cassel Signed-off-by: Frank Li --- Change from v15 to v16 - fix rebase conflict Change from v14 to v15 - check CONFIG_GENERIC_MSI Fix below build error | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202502082204.6prr3cfg-...@intel.com/ All errors (new

[PATCH v18 12/15] selftests: pci_endpoint: Add doorbell test case

2025-04-14 Thread Frank Li
Add doorbell test case. Signed-off-by: Frank Li --- change from v14 to v16 - Add set IRQ type change from v13 to v14 - merge to selftests framework --- .../selftests/pci_endpoint/pci_endpoint_test.c | 28 ++ 1 file changed, 28 insertions(+) diff --git a/tools/testing

[PATCH v18 14/15] pci: imx6: Add LUT setting for MSI/IOMMU in Endpoint mode

2025-04-14 Thread Frank Li
Support only one physical function, so call imx_pcie_add_lut_by_rid(0) to add a single LUT entry when operating in EP mode. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 8 +++- 1 file changed, 7

[PATCH v18 04/15] dt-bindings: PCI: pci-ep: Add support for iommu-map and msi-map

2025-04-14 Thread Frank Li
systems and is therefore not a reliable identifier. Signed-off-by: Frank Li --- Change from v17 to v18 - mask max value should 0x7 - order according to property name Change from v16 to v17 - new patch --- Documentation/devicetree/bindings/pci/pci-ep.yaml | 68 +++ 1 file

[PATCH v18 13/15] pci: imx6: Add helper function imx_pcie_add_lut_by_rid()

2025-04-14 Thread Frank Li
Add helper function imx_pcie_add_lut_by_rid(), which will be used for Endpoint mode in the future. No functional change. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 17 ++--- 1 file changed

[PATCH v18 09/15] PCI: endpoint: Add pci_epf_align_inbound_addr() helper for address alignment

2025-04-14 Thread Frank Li
Introduce the helper function pci_epf_align_inbound_addr() to adjust addresses according to PCI BAR alignment requirements, converting addresses into base and offset values. Signed-off-by: Frank Li --- Change from v15 to v16 - none Change from v14 to v15 - change out address type to dma_addr_t

[PATCH v18 11/15] misc: pci_endpoint_test: Add doorbell test case

2025-04-14 Thread Frank Li
case as usual. Tested-by: Niklas Cassel Signed-off-by: Frank Li --- change from v14 to v16 - none Change from v13 to v14 - update to use pci_endpoint_test -f pcie_ep_doorbell - change ioctrl id to fix conflict Change from v9 to v13 - none Change from v8 to v9 - change PCITEST_DOORBELL to 0xa Cha

[PATCH v18 10/15] PCI: endpoint: pci-epf-test: Add doorbell test support

2025-04-14 Thread Frank Li
pci_endpoint_test -f pcie_ep_doorbell' return success. If EP side doesn't support MSI, the same to 'F'. F: 'pci_endpoint_test -f pcie_ep_doorbell' return failure, other case as usual. Tested-by: Niklas Cassel Signed-off-by: Frank Li --- change from v15 to v16 - use le32

[PATCH v18 08/15] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-04-14 Thread Frank Li
Some MSI controller change address/data pair when irq_set_affinity(). Current PCI endpoint can't support this type MSI controller. So add flag MSI_FLAG_MUTABLE in include/linux/msi.h and check it when allocate doorbell. Signed-off-by: Frank Li --- change from v14 to v16 - none change from

[PATCH v18 06/15] PCI: endpoint: Set ID and of_node for function driver

2025-04-14 Thread Frank Li
hem. Setting the ID and 'of_node' prepares for proper support. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 new patch --- drivers/pci/endpoint/pci-epf-core.c | 4 include/linux/pci-epf.h | 2 ++ 2 files changed, 6 insertions(+) diff --gi

[PATCH v18 05/15] irqchip/gic-v3-its: Add support for device tree msi-map and msi-mask

2025-04-14 Thread Frank Li
^^^ 0xc is implement defined sideband information, which append to AXI write transaction. ^ 0 is function index. msi-mask = <0x7> } Check msi-map if msi-parent missed to keep compatility with existed system. Signed-off-by

[PATCH v18 03/15] irqchip/gic-v3-its: Set IRQ_DOMAIN_FLAG_MSI_IMMUTABLE for ITS

2025-04-14 Thread Frank Li
the PCIe Root Complex (RC) side. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v12 - roll back to v12 version because Marc Zyngier have concern about add DOMAIN_BUS_DEVICE_PCI_EP_MSI. https://lore.kernel.org/imx/861pxfq315.wl-...@kernel.org/ change from v11 to v12

[PATCH v18 02/15] irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable()

2025-04-14 Thread Frank Li
remain unchanged after setup. Use this function to verify if the MSI controller is immutable. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - Roll back to v12 version because Marc Zyngier have concern about add DOMAIN_BUS_DEVICE_PCI_EP_MSI. https://lore.kernel.org

[PATCH v18 01/15] platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all()

2025-04-14 Thread Frank Li
: Marc Zyngier Signed-off-by: Frank Li --- Change from v14 to v16 - use Marc Zyngier's suggested commit message - Add Marc Zyngier's ack tag change from v14 to v15 - none change from v13 to v14 - bring back from v9 and remove fixup and cc stable before it is new use case. --- dr

[PATCH v17 05/15] irqchip/gic-v3-its: Add support for device tree msi-map and msi-mask

2025-04-10 Thread Frank Li
^^^ 0xc is implement defined sideband information, which append to AXI write transaction. ^ 0 is function index. msi-mask = <0x7> } Check msi-map if msi-parent missed to keep compatility with existed system. Signed-off-by

[PATCH v17 00/15] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-04-10 Thread Frank Li
│ ││ ││ │ │ ││ ││ │ │ ││ └┘ └───┘ └┘ This patches based on old https://lore.kernel.org/imx/20221124055036.1630573-1-frank...@nxp.com/ Original patch only target to vntb driver. But actually it is common method. This patches add new API to pci-epf-core, so any EP driver can use it. Previous v2 discussion here. https

[PATCH v17 13/15] pci: imx6: Add helper function imx_pcie_add_lut_by_rid()

2025-04-10 Thread Frank Li
Add helper function imx_pcie_add_lut_by_rid(), which will be used for Endpoint mode in the future. No functional change. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 17 ++--- 1 file changed

[PATCH v17 15/15] arm64: dts: imx95: Add msi-map for pci-ep device

2025-04-10 Thread Frank Li
Add msi-map for pci-ep device. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- arch/arm64/boot/dts/freescale/imx95.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale

[PATCH v17 01/15] platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all()

2025-04-10 Thread Frank Li
: Marc Zyngier Signed-off-by: Frank Li --- Change from v14 to v16 - use Marc Zyngier's suggested commit message - Add Marc Zyngier's ack tag change from v14 to v15 - none change from v13 to v14 - bring back from v9 and remove fixup and cc stable before it is new use case. --- dr

[PATCH v17 07/15] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller

2025-04-10 Thread Frank Li
iklas Cassel Signed-off-by: Frank Li --- Change from v15 to v16 - fix rebase conflict Change from v14 to v15 - check CONFIG_GENERIC_MSI Fix below build error | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202502082204.6prr3cfg-...@intel.com/ All errors (new

[PATCH v17 09/15] PCI: endpoint: Add pci_epf_align_inbound_addr() helper for address alignment

2025-04-10 Thread Frank Li
Introduce the helper function pci_epf_align_inbound_addr() to adjust addresses according to PCI BAR alignment requirements, converting addresses into base and offset values. Signed-off-by: Frank Li --- Change from v15 to v16 - none Change from v14 to v15 - change out address type to dma_addr_t

[PATCH v17 12/15] selftests: pci_endpoint: Add doorbell test case

2025-04-08 Thread Frank Li
Add doorbell test case. Signed-off-by: Frank Li --- change from v14 to v16 - Add set IRQ type change from v13 to v14 - merge to selftests framework --- .../selftests/pci_endpoint/pci_endpoint_test.c | 28 ++ 1 file changed, 28 insertions(+) diff --git a/tools/testing

[PATCH v17 08/15] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-04-07 Thread Frank Li
Some MSI controller change address/data pair when irq_set_affinity(). Current PCI endpoint can't support this type MSI controller. So add flag MSI_FLAG_MUTABLE in include/linux/msi.h and check it when allocate doorbell. Signed-off-by: Frank Li --- change from v14 to v16 - none change from

[PATCH v17 11/15] misc: pci_endpoint_test: Add doorbell test case

2025-04-07 Thread Frank Li
case as usual. Tested-by: Niklas Cassel Signed-off-by: Frank Li --- change from v14 to v16 - none Change from v13 to v14 - update to use pci_endpoint_test -f pcie_ep_doorbell - change ioctrl id to fix conflict Change from v9 to v13 - none Change from v8 to v9 - change PCITEST_DOORBELL to 0xa Cha

[PATCH v17 06/15] PCI: endpoint: Set ID and of_node for function driver

2025-04-07 Thread Frank Li
hem. Setting the ID and 'of_node' prepares for proper support. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 new patch --- drivers/pci/endpoint/pci-epf-core.c | 4 include/linux/pci-epf.h | 2 ++ 2 files changed, 6 insertions(+) diff --gi

[PATCH v17 10/15] PCI: endpoint: pci-epf-test: Add doorbell test support

2025-04-07 Thread Frank Li
pci_endpoint_test -f pcie_ep_doorbell' return success. If EP side doesn't support MSI, the same to 'F'. F: 'pci_endpoint_test -f pcie_ep_doorbell' return failure, other case as usual. Tested-by: Niklas Cassel Signed-off-by: Frank Li --- change from v15 to v16 - use le32

[PATCH v17 14/15] pci: imx6: Add LUT setting for MSI/IOMMU in Endpoint mode

2025-04-07 Thread Frank Li
Support only one physical function, so call imx_pcie_add_lut_by_rid(0) to add a single LUT entry when operating in EP mode. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 8 +++- 1 file changed, 7

[PATCH v17 04/15] dt-bindings: PCI: pci-ep: Add support for iommu-map and msi-map

2025-04-07 Thread Frank Li
systems and is therefore not a reliable identifier. Signed-off-by: Frank Li --- Change from v16 to v17 - new patch --- Documentation/devicetree/bindings/pci/pci-ep.yaml | 67 +++ 1 file changed, 67 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/pci-ep.yaml b

[PATCH v17 03/15] irqchip/gic-v3-its: Set IRQ_DOMAIN_FLAG_MSI_IMMUTABLE for ITS

2025-04-07 Thread Frank Li
the PCIe Root Complex (RC) side. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v12 - roll back to v12 version because Marc Zyngier have concern about add DOMAIN_BUS_DEVICE_PCI_EP_MSI. https://lore.kernel.org/imx/861pxfq315.wl-...@kernel.org/ change from v11 to v12

[PATCH v17 02/15] irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable()

2025-04-07 Thread Frank Li
remain unchanged after setup. Use this function to verify if the MSI controller is immutable. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - Roll back to v12 version because Marc Zyngier have concern about add DOMAIN_BUS_DEVICE_PCI_EP_MSI. https://lore.kernel.org

Re: [PATCH] remoteproc: imx_rproc: Add mutex protection for workqueue

2025-04-05 Thread Frank Li
queue_add_split > virtqueue_add_inbuf > rpmsg_recv_done > vring_interrupt > rproc_vq_interrupt > imx_rproc_vq_work > process_one_work > worker_thread > kthread > ret_from_fork > > Signed-off-by: Peng Fan Reviewed-by: Frank Li > --- > drivers/remoteproc/

Re: [PATCH v16 04/15] dt-bindings: pci: pci-msi: Add support for PCI Endpoint msi-map

2025-04-04 Thread Frank Li
On Fri, Apr 04, 2025 at 03:11:40PM -0500, Rob Herring wrote: > On Fri, Apr 04, 2025 at 03:01:05PM -0400, Frank Li wrote: > > Document the use of msi-map for PCI Endpoint (EP) controllers, which can > > use MSI as a doorbell mechanism. Each EP controller can support up to 8 > &g

[PATCH v16 15/15] arm64: dts: imx95: Add msi-map for pci-ep device

2025-04-04 Thread Frank Li
Add msi-map for pci-ep device. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- arch/arm64/boot/dts/freescale/imx95.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale

[PATCH v16 13/15] pci: imx6: Add helper function imx_pcie_add_lut_by_rid()

2025-04-04 Thread Frank Li
Add helper function imx_pcie_add_lut_by_rid(), which will be used for Endpoint mode in the future. No functional change. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 17 ++--- 1 file changed

[PATCH v16 14/15] pci: imx6: Add LUT setting for MSI/IOMMU in Endpoint mode

2025-04-04 Thread Frank Li
Support only one physical function, so call imx_pcie_add_lut_by_rid(0) to add a single LUT entry when operating in EP mode. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 8 +++- 1 file changed, 7

[PATCH v16 08/15] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-04-04 Thread Frank Li
Some MSI controller change address/data pair when irq_set_affinity(). Current PCI endpoint can't support this type MSI controller. So add flag MSI_FLAG_MUTABLE in include/linux/msi.h and check it when allocate doorbell. Signed-off-by: Frank Li --- change from v14 to v16 - none change from

[PATCH v16 12/15] selftests: pci_endpoint: Add doorbell test case

2025-04-04 Thread Frank Li
Add doorbell test case. Signed-off-by: Frank Li --- change from v14 to v16 - Add set IRQ type change from v13 to v14 - merge to selftests framework --- .../selftests/pci_endpoint/pci_endpoint_test.c | 28 ++ 1 file changed, 28 insertions(+) diff --git a/tools/testing

[PATCH v16 11/15] misc: pci_endpoint_test: Add doorbell test case

2025-04-04 Thread Frank Li
case as usual. Tested-by: Niklas Cassel Signed-off-by: Frank Li --- change from v14 to v16 - none Change from v13 to v14 - update to use pci_endpoint_test -f pcie_ep_doorbell - change ioctrl id to fix conflict Change from v9 to v13 - none Change from v8 to v9 - change PCITEST_DOORBELL to 0xa Cha

[PATCH v16 10/15] PCI: endpoint: pci-epf-test: Add doorbell test support

2025-04-04 Thread Frank Li
pci_endpoint_test -f pcie_ep_doorbell' return success. If EP side doesn't support MSI, the same to 'F'. F: 'pci_endpoint_test -f pcie_ep_doorbell' return failure, other case as usual. Tested-by: Niklas Cassel Signed-off-by: Frank Li --- change from v15 to v16 - use le32

[PATCH v16 09/15] PCI: endpoint: Add pci_epf_align_inbound_addr() helper for address alignment

2025-04-04 Thread Frank Li
Introduce the helper function pci_epf_align_inbound_addr() to adjust addresses according to PCI BAR alignment requirements, converting addresses into base and offset values. Signed-off-by: Frank Li --- Change from v15 to v16 - none Change from v14 to v15 - change out address type to dma_addr_t

[PATCH v16 07/15] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller

2025-04-04 Thread Frank Li
iklas Cassel Signed-off-by: Frank Li --- Change from v15 to v16 - fix rebase conflict Change from v14 to v15 - check CONFIG_GENERIC_MSI Fix below build error | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202502082204.6prr3cfg-...@intel.com/ All errors (new

[PATCH v16 06/15] PCI: endpoint: Set ID and of_node for function driver

2025-04-04 Thread Frank Li
hem. Setting the ID and 'of_node' prepares for proper support. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 new patch --- drivers/pci/endpoint/pci-epf-core.c | 4 include/linux/pci-epf.h | 2 ++ 2 files changed, 6 insertions(+) diff --gi

[PATCH v16 05/15] irqchip/gic-v3-its: Add support for device tree msi-map and msi-mask

2025-04-04 Thread Frank Li
^^^ 0xc is implement defined sideband information, which append to AXI write transaction. ^ 0 is function index. msi-mask = <0x7> } Check msi-map if msi-parent missed to keep compatility with existed system. Signed-off-by

[PATCH v16 04/15] dt-bindings: pci: pci-msi: Add support for PCI Endpoint msi-map

2025-04-04 Thread Frank Li
], enabling msi-map to associate each child device with a specific msi-specifier. Include a device tree example illustrating this configuration. Signed-off-by: Frank Li --- change from v15 to v16 - new patch --- Documentation/devicetree/bindings/pci/pci-msi.txt | 51 +++ 1 file

[PATCH v16 03/15] irqchip/gic-v3-its: Set IRQ_DOMAIN_FLAG_MSI_IMMUTABLE for ITS

2025-04-04 Thread Frank Li
the PCIe Root Complex (RC) side. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v12 - roll back to v12 version because Marc Zyngier have concern about add DOMAIN_BUS_DEVICE_PCI_EP_MSI. https://lore.kernel.org/imx/861pxfq315.wl-...@kernel.org/ change from v11 to v12

[PATCH v16 02/15] irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable()

2025-04-04 Thread Frank Li
remain unchanged after setup. Use this function to verify if the MSI controller is immutable. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - Roll back to v12 version because Marc Zyngier have concern about add DOMAIN_BUS_DEVICE_PCI_EP_MSI. https://lore.kernel.org

[PATCH v16 00/15] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-04-04 Thread Frank Li
│ ││ ││ │ │ ││ ││ │ │ ││ └┘ └───┘ └┘ This patches based on old https://lore.kernel.org/imx/20221124055036.1630573-1-frank...@nxp.com/ Original patch only target to vntb driver. But actually it is common method. This patches add new API to pci-epf-core, so any EP driver can use it. Previous v2 discussion here. https

[PATCH v16 01/15] platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all()

2025-04-04 Thread Frank Li
: Marc Zyngier Signed-off-by: Frank Li --- Change from v14 to v16 - use Marc Zyngier's suggested commit message - Add Marc Zyngier's ack tag change from v14 to v15 - none change from v13 to v14 - bring back from v9 and remove fixup and cc stable before it is new use case. --- dr

Re: [PATCH v3] remoteproc: imx_dsp_rproc: Add support for DSP-specific features

2025-04-04 Thread Frank Li
gic number.\n"); > + goto ignored; > + } > + > + /* > + * For now, in struct fw_rsc_imx_dsp, version 0, > + * only FEATURE_DONT_WAIT_FW_READY is valid. > + * > + * When adding new features, please upgrade version. > + */ > + if (

Re: [PATCH v15 00/15] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-03-10 Thread Frank Li
m to ensure that the underlying irqdomain provides a > immutable address/data pair. > > So it does not matter for GIC-ITS, but in the larger picture it matters. Marc: Do you satisfy Thomans's anwser? So I can respin this series. Frank > > Thanks, > > tglx

Re: [PATCH v15 02/15] irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable()

2025-03-03 Thread Frank Li
On Sat, Mar 01, 2025 at 11:10:35AM +, Marc Zyngier wrote: > On Tue, 11 Feb 2025 19:21:55 +, > Frank Li wrote: > > > > Add the flag IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and the API function > > irq_domain_is_msi_immutable() to check if the MSI controller retains an > &g

Re: [PATCH v15 04/15] irqchip/gic-v3-its: Add support for device tree msi-map and msi-mask

2025-03-03 Thread Frank Li
On Sat, Mar 01, 2025 at 11:37:14AM +, Marc Zyngier wrote: > On Tue, 11 Feb 2025 19:21:57 +, > Frank Li wrote: > > > > Some platform devices create child devices dynamically and require the > > parent device's msi-map to map device IDs to actual sideband infor

Re: [PATCH v15 07/15] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-03-03 Thread Frank Li
On Sat, Mar 01, 2025 at 11:44:50AM +, Marc Zyngier wrote: > On Tue, 11 Feb 2025 19:22:00 +, > Frank Li wrote: > > > > Some MSI controller change address/data pair when irq_set_affinity(). > > Current PCI endpoint can't support this type MSI controller. So add

  1   2   3   4   5   6   7   8   9   10   >