Path: blob/master/Documentation/devicetree/bindings/bus/nvidia,tegra20-gmi.txt
26308 views
Device tree bindings for NVIDIA Tegra Generic Memory Interface bus12The Generic Memory Interface bus enables memory transfers between internal and3external memory. Can be used to attach various high speed devices such as4synchronous/asynchronous NOR, FPGA, UARTS and more.56The actual devices are instantiated from the child nodes of a GMI node.78Required properties:9- compatible : Should contain one of the following:10For Tegra20 must contain "nvidia,tegra20-gmi".11For Tegra30 must contain "nvidia,tegra30-gmi".12- reg: Should contain GMI controller registers location and length.13- clocks: Must contain an entry for each entry in clock-names.14- clock-names: Must include the following entries: "gmi"15- resets : Must contain an entry for each entry in reset-names.16- reset-names : Must include the following entries: "gmi"17- #address-cells: The number of cells used to represent physical base18addresses in the GMI address space. Should be 2.19- #size-cells: The number of cells used to represent the size of an address20range in the GMI address space. Should be 1.21- ranges: Must be set up to reflect the memory layout with three integer values22for each chip-select line in use (only one entry is supported, see below23comments):24<cs-number> <offset> <physical address of mapping> <size>2526Note that the GMI controller does not have any internal chip-select address27decoding, because of that chip-selects either need to be managed via software28or by employing external chip-select decoding logic.2930If external chip-select logic is used to support multiple devices it is assumed31that the devices use the same timing and so are probably the same type. It also32assumes that they can fit in the 256MB address range. In this case only one33child device is supported which represents the active chip-select line, see34examples for more insight.3536The chip-select number is decoded from the child nodes second address cell of37'ranges' property, if 'ranges' property is not present or empty chip-select will38then be decoded from the first cell of the 'reg' property.3940Optional child cs node properties:4142- nvidia,snor-data-width-32bit: Use 32bit data-bus, default is 16bit.43- nvidia,snor-mux-mode: Enable address/data MUX mode.44- nvidia,snor-rdy-active-before-data: Assert RDY signal one cycle before data.45If omitted it will be asserted with data.46- nvidia,snor-rdy-active-high: RDY signal is active high47- nvidia,snor-adv-active-high: ADV signal is active high48- nvidia,snor-oe-active-high: WE/OE signal is active high49- nvidia,snor-cs-active-high: CS signal is active high5051Note that there is some special handling for the timing values.52From Tegra TRM:53Programming 0 means 1 clock cycle: actual cycle = programmed cycle + 15455- nvidia,snor-muxed-width: Number of cycles MUX address/data asserted on the56bus. Valid values are 0-15, default is 157- nvidia,snor-hold-width: Number of cycles CE stays asserted after the58de-assertion of WR_N (in case of SLAVE/MASTER Request) or OE_N59(in case of MASTER Request). Valid values are 0-15, default is 160- nvidia,snor-adv-width: Number of cycles during which ADV stays asserted.61Valid values are 0-15, default is 1.62- nvidia,snor-ce-width: Number of cycles before CE is asserted.63Valid values are 0-15, default is 464- nvidia,snor-we-width: Number of cycles during which WE stays asserted.65Valid values are 0-15, default is 166- nvidia,snor-oe-width: Number of cycles during which OE stays asserted.67Valid values are 0-255, default is 168- nvidia,snor-wait-width: Number of cycles before READY is asserted.69Valid values are 0-255, default is 37071Example with two SJA1000 CAN controllers connected to the GMI bus. We wrap the72controllers with a simple-bus node since they are all connected to the same73chip-select (CS4), in this example external address decoding is provided:7475gmi@70009000 {76compatible = "nvidia,tegra20-gmi";77reg = <0x70009000 0x1000>;78#address-cells = <2>;79#size-cells = <1>;80clocks = <&tegra_car TEGRA20_CLK_NOR>;81clock-names = "gmi";82resets = <&tegra_car 42>;83reset-names = "gmi";84ranges = <4 0 0xd0000000 0xfffffff>;8586bus@4,0 {87compatible = "simple-bus";88#address-cells = <1>;89#size-cells = <1>;90ranges = <0 4 0 0x40100>;9192nvidia,snor-mux-mode;93nvidia,snor-adv-active-high;9495can@0 {96reg = <0 0x100>;97...98};99100can@40000 {101reg = <0x40000 0x100>;102...103};104};105};106107Example with one SJA1000 CAN controller connected to the GMI bus108on CS4:109110gmi@70009000 {111compatible = "nvidia,tegra20-gmi";112reg = <0x70009000 0x1000>;113#address-cells = <2>;114#size-cells = <1>;115clocks = <&tegra_car TEGRA20_CLK_NOR>;116clock-names = "gmi";117resets = <&tegra_car 42>;118reset-names = "gmi";119ranges = <4 0 0xd0000000 0xfffffff>;120121can@4,0 {122reg = <4 0 0x100>;123nvidia,snor-mux-mode;124nvidia,snor-adv-active-high;125...126};127};128129130