Thread (1 message) 1 message, 1 author, 2012-01-12

[PATCH 7/9] arm/tegra: emc: device tree bindings

From: sjg@chromium.org (Simon Glass)
Date: 2012-01-12 20:03:33
Also in: linux-devicetree, linux-tegra

Possibly related (same subject, not in this thread)

Hi Olof,

On Thu, Jan 5, 2012 at 5:20 PM, Olof Johansson [off-list ref] wrote:
On Thu, Jan 5, 2012 at 4:01 PM, Stephen Warren [off-list ref] wrote:
quoted
Olof Johansson wrote at Thursday, December 22, 2011 5:18 PM:
quoted
Device tree bindings for the EMC tables on tegra.
...
quoted
diff --git a/Documentation/devicetree/bindings/arm/tegra/emc.txt
...
quoted
+Embedded Memory Controller ram-code table
...
quoted
+- name : Should be emc-tables
+- nvidia,ram-code : the binary representation of the ram-code board strappings
+ ?for which this node (and children) are valid.
...
quoted
+Embedded Memory Controller configuration table
...
quoted
+- name : Should be emc-table
+- compatible : Should contain "nvidia,tegra20-emc-table".
+- reg : either an opaque enumerator to tell different tables apart, or
...

One more thought:

For consistency, should the "emc-tables" node also require a compatible
value? I suppose the existence of an "nvidia,ram-code" property is quite
likely to be indication enough that the node is compatible, but I wonder
if we shouldn't require and check an explicit compatible value at this
level too?
I can add it, it's trivial to add another check in
tegra_emc_ramcode_devnode, but I don't think there's much need to
bother. As long as nothing else is added that uses nvidia,ram-code as
a property we'll be OK, and we can control that.
I am looking at maybe bringing this into U-Boot.

Do you have an example of the ram-code table? Would it look something like this?

emc at 7000f400 {
	#address-cells = < 1 >;
	#size-cells = < 0 >;
	compatible = "nvidia,tegra20-emc";
	reg = <0x7000f4000 0x200>;
	nvidia,use-ram-code;

	emc-tables at 0 {
		nvidia,ram-code = <0>;
		compatible = "nvidia,tegra20-emc-tables";
		emc-table at 166000 {
			reg = <166000>;
			compatible = "nvidia,tegra20-emc-table";
			clock-frequency = < 166000 >;
			nvidia,emc-registers = < 0 0 0 0 0 0 0 0 0 0 0 0 0 0
						0 0 0 0 0 0 0 0 0 0 0 0 0 0
						0 0 0 0 0 0 0 0 0 0 0 0 0 0
						0 0 0 0 >;
		};
	};
	emc-tables at 1 {
		nvidia,ram-code = <1>;
		compatible = "nvidia,tegra20-emc-tables";
		emc-table at 333000 {
			reg = <333000>;
			compatible = "nvidia,tegra20-emc-table";
			clock-frequency = < 333000 >;
			nvidia,emc-registers = < 0 0 0 0 0 0 0 0 0 0 0 0 0 0
						0 0 0 0 0 0 0 0 0 0 0 0 0 0
						0 0 0 0 0 0 0 0 0 0 0 0 0 0
						0 0 0 0 >;
		};
	};
	... @2, @3 follow
};

Also, can/should we be able to specify a frequency to override the strapping?

Regards,
Simon

-Olof
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss at lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help