dt-bindings: memory: tegra: Squash tegra20-gart into tegra20-mc

Splitting GART and Memory Controller wasn't a good decision that was made
back in the day. Given that the GART driver wasn't ever been used by
anything in the kernel, we decided that it will be better to correct the
mistakes of the past and merge two bindings into a single one. As a result
there is a DT ABI change for the Memory Controller that allows not to
break newer kernels using older DT and not to break older kernels using
newer DT, that is done by changing the 'compatible' of the node to
'tegra20-mc-gart' and adding a new-required clock property. The new clock
property also puts the tegra20-mc binding in line with the bindings of the
later Tegra generations.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
Dmitry Osipenko 2018-12-12 23:38:49 +03:00 committed by Joerg Roedel
parent 2fc0ac180d
commit 53f986accf
2 changed files with 19 additions and 22 deletions

View File

@ -1,14 +0,0 @@
NVIDIA Tegra 20 GART
Required properties:
- compatible: "nvidia,tegra20-gart"
- reg: Two pairs of cells specifying the physical address and size of
the memory controller registers and the GART aperture respectively.
Example:
gart {
compatible = "nvidia,tegra20-gart";
reg = <0x7000f024 0x00000018 /* controller registers */
0x58000000 0x02000000>; /* GART aperture */
};

View File

@ -1,26 +1,37 @@
NVIDIA Tegra20 MC(Memory Controller) NVIDIA Tegra20 MC(Memory Controller)
Required properties: Required properties:
- compatible : "nvidia,tegra20-mc" - compatible : "nvidia,tegra20-mc-gart"
- reg : Should contain 2 register ranges(address and length); see the - reg : Should contain 2 register ranges: physical base address and length of
example below. Note that the MC registers are interleaved with the the controller's registers and the GART aperture respectively.
GART registers, and hence must be represented as multiple ranges. - clocks: Must contain an entry for each entry in clock-names.
See ../clocks/clock-bindings.txt for details.
- clock-names: Must include the following entries:
- mc: the module's clock input
- interrupts : Should contain MC General interrupt. - interrupts : Should contain MC General interrupt.
- #reset-cells : Should be 1. This cell represents memory client module ID. - #reset-cells : Should be 1. This cell represents memory client module ID.
The assignments may be found in header file <dt-bindings/memory/tegra20-mc.h> The assignments may be found in header file <dt-bindings/memory/tegra20-mc.h>
or in the TRM documentation. or in the TRM documentation.
- #iommu-cells: Should be 0. This cell represents the number of cells in an
IOMMU specifier needed to encode an address. GART supports only a single
address space that is shared by all devices, therefore no additional
information needed for the address encoding.
Example: Example:
mc: memory-controller@7000f000 { mc: memory-controller@7000f000 {
compatible = "nvidia,tegra20-mc"; compatible = "nvidia,tegra20-mc-gart";
reg = <0x7000f000 0x024 reg = <0x7000f000 0x400 /* controller registers */
0x7000f03c 0x3c4>; 0x58000000 0x02000000>; /* GART aperture */
interrupts = <0 77 0x04>; clocks = <&tegra_car TEGRA20_CLK_MC>;
clock-names = "mc";
interrupts = <GIC_SPI 77 0x04>;
#reset-cells = <1>; #reset-cells = <1>;
#iommu-cells = <0>;
}; };
video-codec@6001a000 { video-codec@6001a000 {
compatible = "nvidia,tegra20-vde"; compatible = "nvidia,tegra20-vde";
... ...
resets = <&mc TEGRA20_MC_RESET_VDE>; resets = <&mc TEGRA20_MC_RESET_VDE>;
iommus = <&mc>;
}; };