1*c66ec88fSEmmanuel Vadot* Device tree bindings for Atmel EBI 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotThe External Bus Interface (EBI) controller is a bus where you can connect 4*c66ec88fSEmmanuel Vadotasynchronous (NAND, NOR, SRAM, ....) and synchronous memories (SDR/DDR SDRAMs). 5*c66ec88fSEmmanuel VadotThe EBI provides a glue-less interface to asynchronous memories through the SMC 6*c66ec88fSEmmanuel Vadot(Static Memory Controller). 7*c66ec88fSEmmanuel Vadot 8*c66ec88fSEmmanuel VadotRequired properties: 9*c66ec88fSEmmanuel Vadot 10*c66ec88fSEmmanuel Vadot- compatible: "atmel,at91sam9260-ebi" 11*c66ec88fSEmmanuel Vadot "atmel,at91sam9261-ebi" 12*c66ec88fSEmmanuel Vadot "atmel,at91sam9263-ebi0" 13*c66ec88fSEmmanuel Vadot "atmel,at91sam9263-ebi1" 14*c66ec88fSEmmanuel Vadot "atmel,at91sam9rl-ebi" 15*c66ec88fSEmmanuel Vadot "atmel,at91sam9g45-ebi" 16*c66ec88fSEmmanuel Vadot "atmel,at91sam9x5-ebi" 17*c66ec88fSEmmanuel Vadot "atmel,sama5d3-ebi" 18*c66ec88fSEmmanuel Vadot "microchip,sam9x60-ebi" 19*c66ec88fSEmmanuel Vadot 20*c66ec88fSEmmanuel Vadot- reg: Contains offset/length value for EBI memory mapping. 21*c66ec88fSEmmanuel Vadot This property might contain several entries if the EBI 22*c66ec88fSEmmanuel Vadot memory range is not contiguous 23*c66ec88fSEmmanuel Vadot 24*c66ec88fSEmmanuel Vadot- #address-cells: Must be 2. 25*c66ec88fSEmmanuel Vadot The first cell encodes the CS. 26*c66ec88fSEmmanuel Vadot The second cell encode the offset into the CS memory 27*c66ec88fSEmmanuel Vadot range. 28*c66ec88fSEmmanuel Vadot 29*c66ec88fSEmmanuel Vadot- #size-cells: Must be set to 1. 30*c66ec88fSEmmanuel Vadot 31*c66ec88fSEmmanuel Vadot- ranges: Encodes CS to memory region association. 32*c66ec88fSEmmanuel Vadot 33*c66ec88fSEmmanuel Vadot- clocks: Clock feeding the EBI controller. 34*c66ec88fSEmmanuel Vadot See clock-bindings.txt 35*c66ec88fSEmmanuel Vadot 36*c66ec88fSEmmanuel VadotChildren device nodes are representing device connected to the EBI bus. 37*c66ec88fSEmmanuel Vadot 38*c66ec88fSEmmanuel VadotRequired device node properties: 39*c66ec88fSEmmanuel Vadot 40*c66ec88fSEmmanuel Vadot- reg: Contains the chip-select id, the offset and the length 41*c66ec88fSEmmanuel Vadot of the memory region requested by the device. 42*c66ec88fSEmmanuel Vadot 43*c66ec88fSEmmanuel VadotEBI bus configuration will be defined directly in the device subnode. 44*c66ec88fSEmmanuel Vadot 45*c66ec88fSEmmanuel VadotOptional EBI/SMC properties: 46*c66ec88fSEmmanuel Vadot 47*c66ec88fSEmmanuel Vadot- atmel,smc-bus-width: width of the asynchronous device's data bus 48*c66ec88fSEmmanuel Vadot 8, 16 or 32. 49*c66ec88fSEmmanuel Vadot Default to 8 when undefined. 50*c66ec88fSEmmanuel Vadot 51*c66ec88fSEmmanuel Vadot- atmel,smc-byte-access-type "write" or "select" (see Atmel datasheet). 52*c66ec88fSEmmanuel Vadot Default to "select" when undefined. 53*c66ec88fSEmmanuel Vadot 54*c66ec88fSEmmanuel Vadot- atmel,smc-read-mode "nrd" or "ncs". 55*c66ec88fSEmmanuel Vadot Default to "ncs" when undefined. 56*c66ec88fSEmmanuel Vadot 57*c66ec88fSEmmanuel Vadot- atmel,smc-write-mode "nwe" or "ncs". 58*c66ec88fSEmmanuel Vadot Default to "ncs" when undefined. 59*c66ec88fSEmmanuel Vadot 60*c66ec88fSEmmanuel Vadot- atmel,smc-exnw-mode "disabled", "frozen" or "ready". 61*c66ec88fSEmmanuel Vadot Default to "disabled" when undefined. 62*c66ec88fSEmmanuel Vadot 63*c66ec88fSEmmanuel Vadot- atmel,smc-page-mode enable page mode if present. The provided value 64*c66ec88fSEmmanuel Vadot defines the page size (supported values: 4, 8, 65*c66ec88fSEmmanuel Vadot 16 and 32). 66*c66ec88fSEmmanuel Vadot 67*c66ec88fSEmmanuel Vadot- atmel,smc-tdf-mode: "normal" or "optimized". When set to 68*c66ec88fSEmmanuel Vadot "optimized" the data float time is optimized 69*c66ec88fSEmmanuel Vadot depending on the next device being accessed 70*c66ec88fSEmmanuel Vadot (next device setup time is subtracted to the 71*c66ec88fSEmmanuel Vadot current device data float time). 72*c66ec88fSEmmanuel Vadot Default to "normal" when undefined. 73*c66ec88fSEmmanuel Vadot 74*c66ec88fSEmmanuel VadotIf at least one atmel,smc- property is defined the following SMC timing 75*c66ec88fSEmmanuel Vadotproperties become mandatory. In the other hand, if none of the atmel,smc- 76*c66ec88fSEmmanuel Vadotproperties are specified, we assume that the EBI bus configuration will be 77*c66ec88fSEmmanuel Vadothandled by the sub-device driver, and none of those properties should be 78*c66ec88fSEmmanuel Vadotdefined. 79*c66ec88fSEmmanuel Vadot 80*c66ec88fSEmmanuel VadotAll the timings are expressed in nanoseconds (see Atmel datasheet for a full 81*c66ec88fSEmmanuel Vadotdescription). 82*c66ec88fSEmmanuel Vadot 83*c66ec88fSEmmanuel Vadot- atmel,smc-ncs-rd-setup-ns 84*c66ec88fSEmmanuel Vadot- atmel,smc-nrd-setup-ns 85*c66ec88fSEmmanuel Vadot- atmel,smc-ncs-wr-setup-ns 86*c66ec88fSEmmanuel Vadot- atmel,smc-nwe-setup-ns 87*c66ec88fSEmmanuel Vadot- atmel,smc-ncs-rd-pulse-ns 88*c66ec88fSEmmanuel Vadot- atmel,smc-nrd-pulse-ns 89*c66ec88fSEmmanuel Vadot- atmel,smc-ncs-wr-pulse-ns 90*c66ec88fSEmmanuel Vadot- atmel,smc-nwe-pulse-ns 91*c66ec88fSEmmanuel Vadot- atmel,smc-nwe-cycle-ns 92*c66ec88fSEmmanuel Vadot- atmel,smc-nrd-cycle-ns 93*c66ec88fSEmmanuel Vadot- atmel,smc-tdf-ns 94*c66ec88fSEmmanuel Vadot 95*c66ec88fSEmmanuel VadotExample: 96*c66ec88fSEmmanuel Vadot 97*c66ec88fSEmmanuel Vadot ebi: ebi@10000000 { 98*c66ec88fSEmmanuel Vadot compatible = "atmel,sama5d3-ebi"; 99*c66ec88fSEmmanuel Vadot #address-cells = <2>; 100*c66ec88fSEmmanuel Vadot #size-cells = <1>; 101*c66ec88fSEmmanuel Vadot atmel,smc = <&hsmc>; 102*c66ec88fSEmmanuel Vadot atmel,matrix = <&matrix>; 103*c66ec88fSEmmanuel Vadot reg = <0x10000000 0x10000000 104*c66ec88fSEmmanuel Vadot 0x40000000 0x30000000>; 105*c66ec88fSEmmanuel Vadot ranges = <0x0 0x0 0x10000000 0x10000000 106*c66ec88fSEmmanuel Vadot 0x1 0x0 0x40000000 0x10000000 107*c66ec88fSEmmanuel Vadot 0x2 0x0 0x50000000 0x10000000 108*c66ec88fSEmmanuel Vadot 0x3 0x0 0x60000000 0x10000000>; 109*c66ec88fSEmmanuel Vadot clocks = <&mck>; 110*c66ec88fSEmmanuel Vadot 111*c66ec88fSEmmanuel Vadot pinctrl-names = "default"; 112*c66ec88fSEmmanuel Vadot pinctrl-0 = <&pinctrl_ebi_addr>; 113*c66ec88fSEmmanuel Vadot 114*c66ec88fSEmmanuel Vadot nor: flash@0,0 { 115*c66ec88fSEmmanuel Vadot compatible = "cfi-flash"; 116*c66ec88fSEmmanuel Vadot #address-cells = <1>; 117*c66ec88fSEmmanuel Vadot #size-cells = <1>; 118*c66ec88fSEmmanuel Vadot reg = <0x0 0x0 0x1000000>; 119*c66ec88fSEmmanuel Vadot bank-width = <2>; 120*c66ec88fSEmmanuel Vadot 121*c66ec88fSEmmanuel Vadot atmel,smc-read-mode = "nrd"; 122*c66ec88fSEmmanuel Vadot atmel,smc-write-mode = "nwe"; 123*c66ec88fSEmmanuel Vadot atmel,smc-bus-width = <16>; 124*c66ec88fSEmmanuel Vadot atmel,smc-ncs-rd-setup-ns = <0>; 125*c66ec88fSEmmanuel Vadot atmel,smc-ncs-wr-setup-ns = <0>; 126*c66ec88fSEmmanuel Vadot atmel,smc-nwe-setup-ns = <8>; 127*c66ec88fSEmmanuel Vadot atmel,smc-nrd-setup-ns = <16>; 128*c66ec88fSEmmanuel Vadot atmel,smc-ncs-rd-pulse-ns = <84>; 129*c66ec88fSEmmanuel Vadot atmel,smc-ncs-wr-pulse-ns = <84>; 130*c66ec88fSEmmanuel Vadot atmel,smc-nrd-pulse-ns = <76>; 131*c66ec88fSEmmanuel Vadot atmel,smc-nwe-pulse-ns = <76>; 132*c66ec88fSEmmanuel Vadot atmel,smc-nrd-cycle-ns = <107>; 133*c66ec88fSEmmanuel Vadot atmel,smc-nwe-cycle-ns = <84>; 134*c66ec88fSEmmanuel Vadot atmel,smc-tdf-ns = <16>; 135*c66ec88fSEmmanuel Vadot }; 136*c66ec88fSEmmanuel Vadot }; 137*c66ec88fSEmmanuel Vadot 138