ranges
property is defined for the EBI. ranges
is a list of address
translations. Each entry contains the child bus address, the parent bus address,
and the length. These fields depend on the child's #address-cells
, the parent's
#address-cells
and the child's #size
, respectively.
ebi: ebi@10000000 { compatible = "atmel,sama5d3-ebi"; #address-cells = <2>; #size-cells = <1>; reg = <0x10000000 0x10000000 0x60000000 0x28000000>; ranges = <0x0 0x0 0x10000000 0x10000000 0x1 0x0 0x60000000 0x10000000 0x2 0x0 0x70000000 0x10000000 0x3 0x0 0x80000000 0x8000000>; [...] };It means that the two first cells of each entry of
ranges
are the child bus
address, the third one is the parent bus address and the last one the length.
The reg
property of the child nodes contains the chip select id, the offset and
the length of the memory region requested by the device.
To be crystal clear, the last entry in the ranges property can be interpreted
this way, offset 0 from chip select 3 is mapped to address range
0x80000000...0x88000000
.
Required properties: - compatible = "micrel,ks8851-mll" of parallel interface - reg : 2 physical address and size of registers for data and command - interrupts : interrupt connectionIts CSN signal is connected to NCS2 and its CMD signal connected to A1. So it has to be instantiated in this way:
&ebi { mac0@2,0 { compatible = "micrel,ks8851-mll"; reg = <0x2 0x0 0x2 0x2 0x2 0x2>; [...] /* pinctrl, interrupt, clock stuff */ atmel,smc-read-mode = "nrd"; atmel,smc-write-mode = "nwe"; atmel,smc-bus-width = <16>; atmel,smc-ncs-rd-setup-ns = <20>; atmel,smc-ncs-rd-pulse-ns = <80>; atmel,smc-ncs-wr-setup-ns = <20>; atmel,smc-ncs-wr-pulse-ns = <80>; atmel,smc-tdf-ns = <12>; atmel,smc-nrd-pulse-ns = <80>; atmel,smc-nrd-cycle-ns = <120>; atmel,smc-nrd-setup-ns = <20>; atmel,smc-nwe-pulse-ns = <80>; atmel,smc-nwe-cycle-ns = <120>; atmel,smc-nwe-setup-ns = <20>; }; };When the driver requests the resources, the translation is done automatically.
0x2 0x0
becomes =0x70000000= and 0x2 0x2
becomes =0x70000002= according to the
'ranges' property of the EBI node.
Note that timings are not optimized.
[1] https://elixir.bootlin.com/linux/v4.14/source/drivers/mtd/nand/atmel/nand-controller.c
[2] https://elixir.bootlin.com/linux/v4.14/source/drivers/memory/atmel-ebi.c
[3] https://elixir.bootlin.com/linux/v4.14/source/drivers/mfd/atmel-smc.c
[4] https://elixir.bootlin.com/linux/v4.14/source/Documentation/devicetree/bindings/memory-controllers/atmel,ebi.txt
[5] https://elixir.bootlin.com/linux/v4.14/source/Documentation/devicetree/bindings/mfd/atmel-smc.txt
[6] https://elixir.bootlin.com/linux/v4.14/source/Documentation/devicetree/bindings/mtd/atmel-nand.txt
[7] https://microchip.com/wwwproducts/en/KSZ8851
[8] http://ww1.microchip.com/downloads/en/DeviceDoc/KSZ8851-16MLL-Single-Port-Ethernet-MAC-Controller-with-8-Bit-or-16-Bit-Non-PCI-Interface-DS00002357B.pdf WebFaqBaseForm | |
---|---|
Boards | Sam9x75Curiosity, Sam9x60Curiosity, Sam9x60EK, Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek, AT91sam9x5-ek |
Components | Kernel, linux-4.14-at91, linux-4.19-at91, linux-5.4-at91, linux-5.10-at91, linux-5.15-mchp, linux-6.1-mchp, linux-6.6-mchp |
Summary | Connecting an external component on the External Bus Interface |
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Microchip and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries.
Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.
Ideas, requests, contributions ? Connect to LinksToCommunities page.