Commit d96c67a5 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branch 'pci/controller/rcar-gen4'

- Describe endpoint BAR 4 as being fixed size (Jerome Brunet)

- Document how to obtain R-Car V4H (r8a779g0) controller firmware
  (Yoshihiro Shimoda)

* pci/controller/rcar-gen4:
  PCI: rcar-gen4: Document how to obtain platform firmware
  PCI: rcar-gen4: set ep BAR4 fixed size
parents 05cf00aa 003d15b3
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0

===========================================
PCI Native Host Bridge and Endpoint Drivers
===========================================

.. toctree::
   :maxdepth: 2

   rcar-pcie-firmware
+32 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0

=================================================
Firmware of PCIe controller for Renesas R-Car V4H
=================================================

Renesas R-Car V4H (r8a779g0) has a PCIe controller, requiring a specific
firmware download during startup.

However, Renesas currently cannot distribute the firmware free of charge.

The firmware file "104_PCIe_fw_addr_data_ver1.05.txt" (note that the file name
might be different between different datasheet revisions) can be found in the
datasheet encoded as text, and as such, the file's content must be converted
back to binary form. This can be achieved using the following example script:

.. code-block:: sh

	$ awk '/^\s*0x[0-9A-Fa-f]{4}\s+0x[0-9A-Fa-f]{4}/ { print substr($2,5,2) substr($2,3,2) }' \
		104_PCIe_fw_addr_data_ver1.05.txt | \
			xxd -p -r > rcar_gen4_pcie.bin

Once the text content has been converted into a binary firmware file, verify
its checksum as follows:

.. code-block:: sh

	$ sha1sum rcar_gen4_pcie.bin
	1d0bd4b189b4eb009f5d564b1f93a79112994945  rcar_gen4_pcie.bin

The resulting binary file called "rcar_gen4_pcie.bin" should be placed in the
"/lib/firmware" directory before the driver runs.
+1 −0
Original line number Diff line number Diff line
@@ -17,5 +17,6 @@ PCI Bus Subsystem
   pci-error-recovery
   pcieaer-howto
   endpoint/index
   controller/index
   boot-interrupts
   tph
+1 −0
Original line number Diff line number Diff line
@@ -18531,6 +18531,7 @@ M: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
L:	linux-pci@vger.kernel.org
L:	linux-renesas-soc@vger.kernel.org
S:	Maintained
F:	Documentation/PCI/controller/rcar-pcie-firmware.rst
F:	Documentation/devicetree/bindings/pci/*rcar*
F:	drivers/pci/controller/*rcar*
F:	drivers/pci/controller/dwc/*rcar*
+1 −0
Original line number Diff line number Diff line
@@ -403,6 +403,7 @@ static const struct pci_epc_features rcar_gen4_pcie_epc_features = {
	.msix_capable = false,
	.bar[BAR_1] = { .type = BAR_RESERVED, },
	.bar[BAR_3] = { .type = BAR_RESERVED, },
	.bar[BAR_4] = { .type = BAR_FIXED, .fixed_size = 256 },
	.bar[BAR_5] = { .type = BAR_RESERVED, },
	.align = SZ_1M,
};