]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
PCI: rcar-gen4: Document how to obtain platform firmware
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 7 May 2025 10:09:47 +0000 (19:09 +0900)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Wed, 21 May 2025 12:02:59 +0000 (12:02 +0000)
Renesas R-Car V4H (r8a779g0) has PCIe controller, and it requires
specific firmware downloading. So, add a document about the firmware
how to get.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
[kwilczynski: commit log, refactor the document content and then add
this new file to a correct index under the top-level PCI documentation]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20250507100947.608875-1-yoshihiro.shimoda.uh@renesas.com
Documentation/PCI/controller/index.rst [new file with mode: 0644]
Documentation/PCI/controller/rcar-pcie-firmware.rst [new file with mode: 0644]
Documentation/PCI/index.rst
MAINTAINERS

diff --git a/Documentation/PCI/controller/index.rst b/Documentation/PCI/controller/index.rst
new file mode 100644 (file)
index 0000000..c2ce9cc
--- /dev/null
@@ -0,0 +1,10 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+===========================================
+PCI Native Host Bridge and Endpoint Drivers
+===========================================
+
+.. toctree::
+   :maxdepth: 2
+
+   rcar-pcie-firmware
diff --git a/Documentation/PCI/controller/rcar-pcie-firmware.rst b/Documentation/PCI/controller/rcar-pcie-firmware.rst
new file mode 100644 (file)
index 0000000..67d3bf6
--- /dev/null
@@ -0,0 +1,32 @@
+.. 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.
index 5e7c4e6e726bbfe34a6542bd66e61615dd6bef64..5d720d2a415e01ae494c806a2d26fd0eb858fc00 100644 (file)
@@ -17,5 +17,6 @@ PCI Bus Subsystem
    pci-error-recovery
    pcieaer-howto
    endpoint/index
+   controller/index
    boot-interrupts
    tph
index 96b82704950184bd71623ff41fc4df31e4c7fe87..ceceb4ecdb3f8d7c09582aac1dd608c9f6e46225 100644 (file)
@@ -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*