xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/net/gpmc-eth.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunDevice tree bindings for Ethernet chip connected to TI GPMC
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunBesides being used to interface with external memory devices, the
4*4882a593SmuzhiyunGeneral-Purpose Memory Controller can be used to connect Pseudo-SRAM devices
5*4882a593Smuzhiyunsuch as ethernet controllers to processors using the TI GPMC as a data bus.
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunEthernet controllers connected to TI GPMC are represented as child nodes of
8*4882a593Smuzhiyunthe GPMC controller with an "ethernet" name.
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunAll timing relevant properties as well as generic GPMC child properties are
11*4882a593Smuzhiyunexplained in a separate documents. Please refer to
12*4882a593SmuzhiyunDocumentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunFor the properties relevant to the ethernet controller connected to the GPMC
15*4882a593Smuzhiyunrefer to the binding documentation of the device. For example, the documentation
16*4882a593Smuzhiyunfor the SMSC 911x is Documentation/devicetree/bindings/net/smsc911x.txt
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunChild nodes need to specify the GPMC bus address width using the "bank-width"
19*4882a593Smuzhiyunproperty but is possible that an ethernet controller also has a property to
20*4882a593Smuzhiyunspecify the I/O registers address width. Even when the GPMC has a maximum 16-bit
21*4882a593Smuzhiyunaddress width, it supports devices with 32-bit word registers.
22*4882a593SmuzhiyunFor example with an SMSC LAN911x/912x controller connected to the TI GPMC on an
23*4882a593SmuzhiyunOMAP2+ board, "bank-width = <2>;" and "reg-io-width = <4>;".
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunRequired properties:
26*4882a593Smuzhiyun- bank-width: 		Address width of the device in bytes. GPMC supports 8-bit
27*4882a593Smuzhiyun			and 16-bit devices and so must be either 1 or 2 bytes.
28*4882a593Smuzhiyun- compatible:		Compatible string property for the ethernet child device.
29*4882a593Smuzhiyun- gpmc,cs-on-ns:	Chip-select assertion time
30*4882a593Smuzhiyun- gpmc,cs-rd-off-ns:	Chip-select de-assertion time for reads
31*4882a593Smuzhiyun- gpmc,cs-wr-off-ns:	Chip-select de-assertion time for writes
32*4882a593Smuzhiyun- gpmc,oe-on-ns:	Output-enable assertion time
33*4882a593Smuzhiyun- gpmc,oe-off-ns:	Output-enable de-assertion time
34*4882a593Smuzhiyun- gpmc,we-on-ns:	Write-enable assertion time
35*4882a593Smuzhiyun- gpmc,we-off-ns:	Write-enable de-assertion time
36*4882a593Smuzhiyun- gpmc,access-ns:	Start cycle to first data capture (read access)
37*4882a593Smuzhiyun- gpmc,rd-cycle-ns:	Total read cycle time
38*4882a593Smuzhiyun- gpmc,wr-cycle-ns:	Total write cycle time
39*4882a593Smuzhiyun- reg:			Chip-select, base address (relative to chip-select)
40*4882a593Smuzhiyun			and size of the memory mapped for the device.
41*4882a593Smuzhiyun			Note that base address will be typically 0 as this
42*4882a593Smuzhiyun			is the start of the chip-select.
43*4882a593Smuzhiyun
44*4882a593SmuzhiyunOptional properties:
45*4882a593Smuzhiyun- gpmc,XXX		Additional GPMC timings and settings parameters. See
46*4882a593Smuzhiyun			Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunExample:
49*4882a593Smuzhiyun
50*4882a593Smuzhiyungpmc: gpmc@6e000000 {
51*4882a593Smuzhiyun	compatible = "ti,omap3430-gpmc";
52*4882a593Smuzhiyun	ti,hwmods = "gpmc";
53*4882a593Smuzhiyun	reg = <0x6e000000 0x1000>;
54*4882a593Smuzhiyun	interrupts = <20>;
55*4882a593Smuzhiyun	gpmc,num-cs = <8>;
56*4882a593Smuzhiyun	gpmc,num-waitpins = <4>;
57*4882a593Smuzhiyun	#address-cells = <2>;
58*4882a593Smuzhiyun	#size-cells = <1>;
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun	ranges = <5 0 0x2c000000 0x1000000>;
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun	ethernet@5,0 {
63*4882a593Smuzhiyun		compatible = "smsc,lan9221", "smsc,lan9115";
64*4882a593Smuzhiyun		reg = <5 0 0xff>;
65*4882a593Smuzhiyun		bank-width = <2>;
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun		gpmc,mux-add-data;
68*4882a593Smuzhiyun		gpmc,cs-on-ns = <0>;
69*4882a593Smuzhiyun		gpmc,cs-rd-off-ns = <186>;
70*4882a593Smuzhiyun		gpmc,cs-wr-off-ns = <186>;
71*4882a593Smuzhiyun		gpmc,adv-on-ns = <12>;
72*4882a593Smuzhiyun		gpmc,adv-rd-off-ns = <48>;
73*4882a593Smuzhiyun		gpmc,adv-wr-off-ns = <48>;
74*4882a593Smuzhiyun		gpmc,oe-on-ns = <54>;
75*4882a593Smuzhiyun		gpmc,oe-off-ns = <168>;
76*4882a593Smuzhiyun		gpmc,we-on-ns = <54>;
77*4882a593Smuzhiyun		gpmc,we-off-ns = <168>;
78*4882a593Smuzhiyun		gpmc,rd-cycle-ns = <186>;
79*4882a593Smuzhiyun		gpmc,wr-cycle-ns = <186>;
80*4882a593Smuzhiyun		gpmc,access-ns = <114>;
81*4882a593Smuzhiyun		gpmc,page-burst-access-ns = <6>;
82*4882a593Smuzhiyun		gpmc,bus-turnaround-ns = <12>;
83*4882a593Smuzhiyun		gpmc,cycle2cycle-delay-ns = <18>;
84*4882a593Smuzhiyun		gpmc,wr-data-mux-bus-ns = <90>;
85*4882a593Smuzhiyun		gpmc,wr-access-ns = <186>;
86*4882a593Smuzhiyun		gpmc,cycle2cycle-samecsen;
87*4882a593Smuzhiyun		gpmc,cycle2cycle-diffcsen;
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun		interrupt-parent = <&gpio6>;
90*4882a593Smuzhiyun		interrupts = <16>;
91*4882a593Smuzhiyun		vmmc-supply = <&vddvario>;
92*4882a593Smuzhiyun		vmmc_aux-supply = <&vdd33a>;
93*4882a593Smuzhiyun		reg-io-width = <4>;
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun		smsc,save-mac-address;
96*4882a593Smuzhiyun	};
97*4882a593Smuzhiyun};
98