localbus@0xfe000000
{
#address-cells = <2>;
#size-cells = <1>;
compatible = "fsl,localbus","fsl,pq2-localbus","simple-bus";
reg = <0x0xfe0001f0 0x100>;
ranges = <0x0 0x0 0xfe000000 0x100000
0x3 0x0 0xe8000000 0x10000 >; /* the CF-PATA controller is mapped here */
pata@3,0 /* wrong code, here only as example */
{
compatible = "ata-generic";
reg = <0x3 0x0 0x10 0x4 0xC 0x2>; /* what is the meaning of this??? */
reg-shift = <1>; /* what is the meaining of this??? */
pio-mode = <0>;
// interrupts = <0x19 0x8>;
// interrupt-parent = <&PIC>;
};
};
I have a PCI-PATA controller set into "legacy" mode, hence it works attached to a local bus and responds to a fixed addresses mapped in CPU RAM (beyond the first 2Gbyte, hence it doesn't conflict with the RAM).
The Linux Kernel has a SATA driver called OF_ATA, which uses the DeviceTree to initialize its internal strucutre. Unfortunately I cannot find any good doc about this, neither an example.
The above is it should look like. Anyone has ever implemented it?
It was/is usually used to map and handle a Compact Flash in embedded machines, typically routers

0xfe0001f0, size=8
0xfe0003f4, size=1
0xfe000170, size=8
0xfe000374, size=1
0xfe000800, size=64
Registers are physically mapped here
reg = <0x3 0x0 0x10 0x4 0xC 0x2>; /* what is the meaning of this??? */
This line looks wrong (and for sure it is), it was found in a chunk of semi example found on the internet and it still needs to be analyzed, understood, and fixed.