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

Simon Glass sjg at chromium.org
Fri Jan 13 07:03:33 EST 2012


Hi Olof,

On Thu, Jan 5, 2012 at 5:20 PM, Olof Johansson <olof at lixom.net> wrote:
> On Thu, Jan 5, 2012 at 4:01 PM, Stephen Warren <swarren at nvidia.com> wrote:
>> Olof Johansson wrote at Thursday, December 22, 2011 5:18 PM:
>>> Device tree bindings for the EMC tables on tegra.
>> ...
>>> diff --git a/Documentation/devicetree/bindings/arm/tegra/emc.txt
>> ...
>>> +Embedded Memory Controller ram-code table
>> ...
>>> +- 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.
>> ...
>>> +Embedded Memory Controller configuration table
>> ...
>>> +- 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


More information about the devicetree-discuss mailing list