Skip to content

Commit d96c67a

Browse files
committed
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
2 parents 05cf00a + 003d15b commit d96c67a

File tree

5 files changed

+45
-0
lines changed

5 files changed

+45
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
===========================================
4+
PCI Native Host Bridge and Endpoint Drivers
5+
===========================================
6+
7+
.. toctree::
8+
:maxdepth: 2
9+
10+
rcar-pcie-firmware
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
=================================================
4+
Firmware of PCIe controller for Renesas R-Car V4H
5+
=================================================
6+
7+
Renesas R-Car V4H (r8a779g0) has a PCIe controller, requiring a specific
8+
firmware download during startup.
9+
10+
However, Renesas currently cannot distribute the firmware free of charge.
11+
12+
The firmware file "104_PCIe_fw_addr_data_ver1.05.txt" (note that the file name
13+
might be different between different datasheet revisions) can be found in the
14+
datasheet encoded as text, and as such, the file's content must be converted
15+
back to binary form. This can be achieved using the following example script:
16+
17+
.. code-block:: sh
18+
19+
$ awk '/^\s*0x[0-9A-Fa-f]{4}\s+0x[0-9A-Fa-f]{4}/ { print substr($2,5,2) substr($2,3,2) }' \
20+
104_PCIe_fw_addr_data_ver1.05.txt | \
21+
xxd -p -r > rcar_gen4_pcie.bin
22+
23+
Once the text content has been converted into a binary firmware file, verify
24+
its checksum as follows:
25+
26+
.. code-block:: sh
27+
28+
$ sha1sum rcar_gen4_pcie.bin
29+
1d0bd4b189b4eb009f5d564b1f93a79112994945 rcar_gen4_pcie.bin
30+
31+
The resulting binary file called "rcar_gen4_pcie.bin" should be placed in the
32+
"/lib/firmware" directory before the driver runs.

Documentation/PCI/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ PCI Bus Subsystem
1717
pci-error-recovery
1818
pcieaer-howto
1919
endpoint/index
20+
controller/index
2021
boot-interrupts
2122
tph

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18531,6 +18531,7 @@ M: Yoshihiro Shimoda <[email protected]>
1853118531
1853218532
1853318533
S: Maintained
18534+
F: Documentation/PCI/controller/rcar-pcie-firmware.rst
1853418535
F: Documentation/devicetree/bindings/pci/*rcar*
1853518536
F: drivers/pci/controller/*rcar*
1853618537
F: drivers/pci/controller/dwc/*rcar*

drivers/pci/controller/dwc/pcie-rcar-gen4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ static const struct pci_epc_features rcar_gen4_pcie_epc_features = {
403403
.msix_capable = false,
404404
.bar[BAR_1] = { .type = BAR_RESERVED, },
405405
.bar[BAR_3] = { .type = BAR_RESERVED, },
406+
.bar[BAR_4] = { .type = BAR_FIXED, .fixed_size = 256 },
406407
.bar[BAR_5] = { .type = BAR_RESERVED, },
407408
.align = SZ_1M,
408409
};

0 commit comments

Comments
 (0)