aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/kernel-parameters.txt1
-rw-r--r--Documentation/powerpc/00-INDEX3
-rw-r--r--Documentation/powerpc/booting-without-of.txt367
-rw-r--r--Documentation/powerpc/qe_firmware.txt295
4 files changed, 613 insertions, 53 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 5d171b7b8393..92c40d174355 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -717,6 +717,7 @@ and is between 256 and 4096 characters. It is defined in the file
717 See Documentation/isdn/README.HiSax. 717 See Documentation/isdn/README.HiSax.
718 718
719 hugepages= [HW,X86-32,IA-64] Maximal number of HugeTLB pages. 719 hugepages= [HW,X86-32,IA-64] Maximal number of HugeTLB pages.
720 hugepagesz= [HW,IA-64,PPC] The size of the HugeTLB pages.
720 721
721 i8042.direct [HW] Put keyboard port into non-translated mode 722 i8042.direct [HW] Put keyboard port into non-translated mode
722 i8042.dumbkbd [HW] Pretend that controller can only read data from 723 i8042.dumbkbd [HW] Pretend that controller can only read data from
diff --git a/Documentation/powerpc/00-INDEX b/Documentation/powerpc/00-INDEX
index 94a3c577b083..3be84aa38dfe 100644
--- a/Documentation/powerpc/00-INDEX
+++ b/Documentation/powerpc/00-INDEX
@@ -28,3 +28,6 @@ sound.txt
28 - info on sound support under Linux/PPC 28 - info on sound support under Linux/PPC
29zImage_layout.txt 29zImage_layout.txt
30 - info on the kernel images for Linux/PPC 30 - info on the kernel images for Linux/PPC
31qe_firmware.txt
32 - describes the layout of firmware binaries for the Freescale QUICC
33 Engine and the code that parses and uploads the microcode therein.
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index e9a3cb1d6b06..b5e46efeba84 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -52,7 +52,11 @@ Table of Contents
52 i) Freescale QUICC Engine module (QE) 52 i) Freescale QUICC Engine module (QE)
53 j) CFI or JEDEC memory-mapped NOR flash 53 j) CFI or JEDEC memory-mapped NOR flash
54 k) Global Utilities Block 54 k) Global Utilities Block
55 l) Xilinx IP cores 55 l) Freescale Communications Processor Module
56 m) Chipselect/Local Bus
57 n) 4xx/Axon EMAC ethernet nodes
58 o) Xilinx IP cores
59 p) Freescale Synchronous Serial Interface
56 60
57 VII - Specifying interrupt information for devices 61 VII - Specifying interrupt information for devices
58 1) interrupts property 62 1) interrupts property
@@ -671,10 +675,10 @@ device or bus to be described by the device tree.
671 675
672In general, the format of an address for a device is defined by the 676In general, the format of an address for a device is defined by the
673parent bus type, based on the #address-cells and #size-cells 677parent bus type, based on the #address-cells and #size-cells
674property. In the absence of such a property, the parent's parent 678properties. Note that the parent's parent definitions of #address-cells
675values are used, etc... The kernel requires the root node to have 679and #size-cells are not inhereted so every node with children must specify
676those properties defining addresses format for devices directly mapped 680them. The kernel requires the root node to have those properties defining
677on the processor bus. 681addresses format for devices directly mapped on the processor bus.
678 682
679Those 2 properties define 'cells' for representing an address and a 683Those 2 properties define 'cells' for representing an address and a
680size. A "cell" is a 32-bit number. For example, if both contain 2 684size. A "cell" is a 32-bit number. For example, if both contain 2
@@ -711,13 +715,14 @@ define a bus type with a more complex address format, including things
711like address space bits, you'll have to add a bus translator to the 715like address space bits, you'll have to add a bus translator to the
712prom_parse.c file of the recent kernels for your bus type. 716prom_parse.c file of the recent kernels for your bus type.
713 717
714The "reg" property only defines addresses and sizes (if #size-cells 718The "reg" property only defines addresses and sizes (if #size-cells is
715is non-0) within a given bus. In order to translate addresses upward 719non-0) within a given bus. In order to translate addresses upward
716(that is into parent bus addresses, and possibly into CPU physical 720(that is into parent bus addresses, and possibly into CPU physical
717addresses), all busses must contain a "ranges" property. If the 721addresses), all busses must contain a "ranges" property. If the
718"ranges" property is missing at a given level, it's assumed that 722"ranges" property is missing at a given level, it's assumed that
719translation isn't possible. The format of the "ranges" property for a 723translation isn't possible, i.e., the registers are not visible on the
720bus is a list of: 724parent bus. The format of the "ranges" property for a bus is a list
725of:
721 726
722 bus address, parent bus address, size 727 bus address, parent bus address, size
723 728
@@ -735,6 +740,10 @@ fit in a single 32-bit word. New 32-bit powerpc boards should use a
7351/1 format, unless the processor supports physical addresses greater 7401/1 format, unless the processor supports physical addresses greater
736than 32-bits, in which case a 2/1 format is recommended. 741than 32-bits, in which case a 2/1 format is recommended.
737 742
743Alternatively, the "ranges" property may be empty, indicating that the
744registers are visible on the parent bus using an identity mapping
745translation. In other words, the parent bus address space is the same
746as the child bus address space.
738 747
7392) Note about "compatible" properties 7482) Note about "compatible" properties
740------------------------------------- 749-------------------------------------
@@ -1218,16 +1227,14 @@ platforms are moved over to use the flattened-device-tree model.
1218 1227
1219 Required properties: 1228 Required properties:
1220 - reg : Offset and length of the register set for the device 1229 - reg : Offset and length of the register set for the device
1221 - device_type : Should be "mdio"
1222 - compatible : Should define the compatible device type for the 1230 - compatible : Should define the compatible device type for the
1223 mdio. Currently, this is most likely to be "gianfar" 1231 mdio. Currently, this is most likely to be "fsl,gianfar-mdio"
1224 1232
1225 Example: 1233 Example:
1226 1234
1227 mdio@24520 { 1235 mdio@24520 {
1228 reg = <24520 20>; 1236 reg = <24520 20>;
1229 device_type = "mdio"; 1237 compatible = "fsl,gianfar-mdio";
1230 compatible = "gianfar";
1231 1238
1232 ethernet-phy@0 { 1239 ethernet-phy@0 {
1233 ...... 1240 ......
@@ -1254,6 +1261,10 @@ platforms are moved over to use the flattened-device-tree model.
1254 services interrupts for this device. 1261 services interrupts for this device.
1255 - phy-handle : The phandle for the PHY connected to this ethernet 1262 - phy-handle : The phandle for the PHY connected to this ethernet
1256 controller. 1263 controller.
1264 - fixed-link : <a b c d e> where a is emulated phy id - choose any,
1265 but unique to the all specified fixed-links, b is duplex - 0 half,
1266 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no
1267 pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause.
1257 1268
1258 Recommended properties: 1269 Recommended properties:
1259 1270
@@ -1408,7 +1419,6 @@ platforms are moved over to use the flattened-device-tree model.
1408 1419
1409 Example multi port host USB controller device node : 1420 Example multi port host USB controller device node :
1410 usb@22000 { 1421 usb@22000 {
1411 device_type = "usb";
1412 compatible = "fsl-usb2-mph"; 1422 compatible = "fsl-usb2-mph";
1413 reg = <22000 1000>; 1423 reg = <22000 1000>;
1414 #address-cells = <1>; 1424 #address-cells = <1>;
@@ -1422,7 +1432,6 @@ platforms are moved over to use the flattened-device-tree model.
1422 1432
1423 Example dual role USB controller device node : 1433 Example dual role USB controller device node :
1424 usb@23000 { 1434 usb@23000 {
1425 device_type = "usb";
1426 compatible = "fsl-usb2-dr"; 1435 compatible = "fsl-usb2-dr";
1427 reg = <23000 1000>; 1436 reg = <23000 1000>;
1428 #address-cells = <1>; 1437 #address-cells = <1>;
@@ -1534,7 +1543,7 @@ platforms are moved over to use the flattened-device-tree model.
1534 i) Root QE device 1543 i) Root QE device
1535 1544
1536 Required properties: 1545 Required properties:
1537 - device_type : should be "qe"; 1546 - compatible : should be "fsl,qe";
1538 - model : precise model of the QE, Can be "QE", "CPM", or "CPM2" 1547 - model : precise model of the QE, Can be "QE", "CPM", or "CPM2"
1539 - reg : offset and length of the device registers. 1548 - reg : offset and length of the device registers.
1540 - bus-frequency : the clock frequency for QUICC Engine. 1549 - bus-frequency : the clock frequency for QUICC Engine.
@@ -1548,8 +1557,7 @@ platforms are moved over to use the flattened-device-tree model.
1548 #address-cells = <1>; 1557 #address-cells = <1>;
1549 #size-cells = <1>; 1558 #size-cells = <1>;
1550 #interrupt-cells = <2>; 1559 #interrupt-cells = <2>;
1551 device_type = "qe"; 1560 compatible = "fsl,qe";
1552 model = "QE";
1553 ranges = <0 e0100000 00100000>; 1561 ranges = <0 e0100000 00100000>;
1554 reg = <e0100000 480>; 1562 reg = <e0100000 480>;
1555 brg-frequency = <0>; 1563 brg-frequency = <0>;
@@ -1560,8 +1568,8 @@ platforms are moved over to use the flattened-device-tree model.
1560 ii) SPI (Serial Peripheral Interface) 1568 ii) SPI (Serial Peripheral Interface)
1561 1569
1562 Required properties: 1570 Required properties:
1563 - device_type : should be "spi". 1571 - cell-index : SPI controller index.
1564 - compatible : should be "fsl_spi". 1572 - compatible : should be "fsl,spi".
1565 - mode : the SPI operation mode, it can be "cpu" or "cpu-qe". 1573 - mode : the SPI operation mode, it can be "cpu" or "cpu-qe".
1566 - reg : Offset and length of the register set for the device 1574 - reg : Offset and length of the register set for the device
1567 - interrupts : <a b> where a is the interrupt number and b is a 1575 - interrupts : <a b> where a is the interrupt number and b is a
@@ -1574,8 +1582,8 @@ platforms are moved over to use the flattened-device-tree model.
1574 1582
1575 Example: 1583 Example:
1576 spi@4c0 { 1584 spi@4c0 {
1577 device_type = "spi"; 1585 cell-index = <0>;
1578 compatible = "fsl_spi"; 1586 compatible = "fsl,spi";
1579 reg = <4c0 40>; 1587 reg = <4c0 40>;
1580 interrupts = <82 0>; 1588 interrupts = <82 0>;
1581 interrupt-parent = <700>; 1589 interrupt-parent = <700>;
@@ -1586,7 +1594,6 @@ platforms are moved over to use the flattened-device-tree model.
1586 iii) USB (Universal Serial Bus Controller) 1594 iii) USB (Universal Serial Bus Controller)
1587 1595
1588 Required properties: 1596 Required properties:
1589 - device_type : should be "usb".
1590 - compatible : could be "qe_udc" or "fhci-hcd". 1597 - compatible : could be "qe_udc" or "fhci-hcd".
1591 - mode : the could be "host" or "slave". 1598 - mode : the could be "host" or "slave".
1592 - reg : Offset and length of the register set for the device 1599 - reg : Offset and length of the register set for the device
@@ -1600,7 +1607,6 @@ platforms are moved over to use the flattened-device-tree model.
1600 1607
1601 Example(slave): 1608 Example(slave):
1602 usb@6c0 { 1609 usb@6c0 {
1603 device_type = "usb";
1604 compatible = "qe_udc"; 1610 compatible = "qe_udc";
1605 reg = <6c0 40>; 1611 reg = <6c0 40>;
1606 interrupts = <8b 0>; 1612 interrupts = <8b 0>;
@@ -1613,7 +1619,7 @@ platforms are moved over to use the flattened-device-tree model.
1613 1619
1614 Required properties: 1620 Required properties:
1615 - device_type : should be "network", "hldc", "uart", "transparent" 1621 - device_type : should be "network", "hldc", "uart", "transparent"
1616 "bisync" or "atm". 1622 "bisync", "atm", or "serial".
1617 - compatible : could be "ucc_geth" or "fsl_atm" and so on. 1623 - compatible : could be "ucc_geth" or "fsl_atm" and so on.
1618 - model : should be "UCC". 1624 - model : should be "UCC".
1619 - device-id : the ucc number(1-8), corresponding to UCCx in UM. 1625 - device-id : the ucc number(1-8), corresponding to UCCx in UM.
@@ -1626,6 +1632,26 @@ platforms are moved over to use the flattened-device-tree model.
1626 - interrupt-parent : the phandle for the interrupt controller that 1632 - interrupt-parent : the phandle for the interrupt controller that
1627 services interrupts for this device. 1633 services interrupts for this device.
1628 - pio-handle : The phandle for the Parallel I/O port configuration. 1634 - pio-handle : The phandle for the Parallel I/O port configuration.
1635 - port-number : for UART drivers, the port number to use, between 0 and 3.
1636 This usually corresponds to the /dev/ttyQE device, e.g. <0> = /dev/ttyQE0.
1637 The port number is added to the minor number of the device. Unlike the
1638 CPM UART driver, the port-number is required for the QE UART driver.
1639 - soft-uart : for UART drivers, if specified this means the QE UART device
1640 driver should use "Soft-UART" mode, which is needed on some SOCs that have
1641 broken UART hardware. Soft-UART is provided via a microcode upload.
1642 - rx-clock-name: the UCC receive clock source
1643 "none": clock source is disabled
1644 "brg1" through "brg16": clock source is BRG1-BRG16, respectively
1645 "clk1" through "clk24": clock source is CLK1-CLK24, respectively
1646 - tx-clock-name: the UCC transmit clock source
1647 "none": clock source is disabled
1648 "brg1" through "brg16": clock source is BRG1-BRG16, respectively
1649 "clk1" through "clk24": clock source is CLK1-CLK24, respectively
1650 The following two properties are deprecated. rx-clock has been replaced
1651 with rx-clock-name, and tx-clock has been replaced with tx-clock-name.
1652 Drivers that currently use the deprecated properties should continue to
1653 do so, in order to support older device trees, but they should be updated
1654 to check for the new properties first.
1629 - rx-clock : represents the UCC receive clock source. 1655 - rx-clock : represents the UCC receive clock source.
1630 0x00 : clock source is disabled; 1656 0x00 : clock source is disabled;
1631 0x1~0x10 : clock source is BRG1~BRG16 respectively; 1657 0x1~0x10 : clock source is BRG1~BRG16 respectively;
@@ -1754,7 +1780,7 @@ platforms are moved over to use the flattened-device-tree model.
1754 vii) Multi-User RAM (MURAM) 1780 vii) Multi-User RAM (MURAM)
1755 1781
1756 Required properties: 1782 Required properties:
1757 - device_type : should be "muram". 1783 - compatible : should be "fsl,qe-muram", "fsl,cpm-muram".
1758 - mode : the could be "host" or "slave". 1784 - mode : the could be "host" or "slave".
1759 - ranges : Should be defined as specified in 1) to describe the 1785 - ranges : Should be defined as specified in 1) to describe the
1760 translation of MURAM addresses. 1786 translation of MURAM addresses.
@@ -1764,14 +1790,42 @@ platforms are moved over to use the flattened-device-tree model.
1764 Example: 1790 Example:
1765 1791
1766 muram@10000 { 1792 muram@10000 {
1767 device_type = "muram"; 1793 compatible = "fsl,qe-muram", "fsl,cpm-muram";
1768 ranges = <0 00010000 0000c000>; 1794 ranges = <0 00010000 0000c000>;
1769 1795
1770 data-only@0{ 1796 data-only@0{
1797 compatible = "fsl,qe-muram-data",
1798 "fsl,cpm-muram-data";
1771 reg = <0 c000>; 1799 reg = <0 c000>;
1772 }; 1800 };
1773 }; 1801 };
1774 1802
1803 viii) Uploaded QE firmware
1804
1805 If a new firwmare has been uploaded to the QE (usually by the
1806 boot loader), then a 'firmware' child node should be added to the QE
1807 node. This node provides information on the uploaded firmware that
1808 device drivers may need.
1809
1810 Required properties:
1811 - id: The string name of the firmware. This is taken from the 'id'
1812 member of the qe_firmware structure of the uploaded firmware.
1813 Device drivers can search this string to determine if the
1814 firmware they want is already present.
1815 - extended-modes: The Extended Modes bitfield, taken from the
1816 firmware binary. It is a 64-bit number represented
1817 as an array of two 32-bit numbers.
1818 - virtual-traps: The virtual traps, taken from the firmware binary.
1819 It is an array of 8 32-bit numbers.
1820
1821 Example:
1822
1823 firmware {
1824 id = "Soft-UART";
1825 extended-modes = <0 0>;
1826 virtual-traps = <0 0 0 0 0 0 0 0>;
1827 }
1828
1775 j) CFI or JEDEC memory-mapped NOR flash 1829 j) CFI or JEDEC memory-mapped NOR flash
1776 1830
1777 Flash chips (Memory Technology Devices) are often used for solid state 1831 Flash chips (Memory Technology Devices) are often used for solid state
@@ -2075,8 +2129,7 @@ platforms are moved over to use the flattened-device-tree model.
2075 2129
2076 Example: 2130 Example:
2077 localbus@f0010100 { 2131 localbus@f0010100 {
2078 compatible = "fsl,mpc8272ads-localbus", 2132 compatible = "fsl,mpc8272-localbus",
2079 "fsl,mpc8272-localbus",
2080 "fsl,pq2-localbus"; 2133 "fsl,pq2-localbus";
2081 #address-cells = <2>; 2134 #address-cells = <2>;
2082 #size-cells = <1>; 2135 #size-cells = <1>;
@@ -2254,7 +2307,7 @@ platforms are moved over to use the flattened-device-tree model.
2254 available. 2307 available.
2255 For Axon: 0x0000012a 2308 For Axon: 0x0000012a
2256 2309
2257 l) Xilinx IP cores 2310 o) Xilinx IP cores
2258 2311
2259 The Xilinx EDK toolchain ships with a set of IP cores (devices) for use 2312 The Xilinx EDK toolchain ships with a set of IP cores (devices) for use
2260 in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range 2313 in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range
@@ -2276,7 +2329,7 @@ platforms are moved over to use the flattened-device-tree model.
2276 properties of the device node. In general, device nodes for IP-cores 2329 properties of the device node. In general, device nodes for IP-cores
2277 will take the following form: 2330 will take the following form:
2278 2331
2279 (name)@(base-address) { 2332 (name): (generic-name)@(base-address) {
2280 compatible = "xlnx,(ip-core-name)-(HW_VER)" 2333 compatible = "xlnx,(ip-core-name)-(HW_VER)"
2281 [, (list of compatible devices), ...]; 2334 [, (list of compatible devices), ...];
2282 reg = <(baseaddr) (size)>; 2335 reg = <(baseaddr) (size)>;
@@ -2286,6 +2339,9 @@ platforms are moved over to use the flattened-device-tree model.
2286 xlnx,(parameter2) = <(int-value)>; 2339 xlnx,(parameter2) = <(int-value)>;
2287 }; 2340 };
2288 2341
2342 (generic-name): an open firmware-style name that describes the
2343 generic class of device. Preferably, this is one word, such
2344 as 'serial' or 'ethernet'.
2289 (ip-core-name): the name of the ip block (given after the BEGIN 2345 (ip-core-name): the name of the ip block (given after the BEGIN
2290 directive in system.mhs). Should be in lowercase 2346 directive in system.mhs). Should be in lowercase
2291 and all underscores '_' converted to dashes '-'. 2347 and all underscores '_' converted to dashes '-'.
@@ -2294,9 +2350,9 @@ platforms are moved over to use the flattened-device-tree model.
2294 dropped from the parameter name, the name is converted 2350 dropped from the parameter name, the name is converted
2295 to lowercase and all underscore '_' characters are 2351 to lowercase and all underscore '_' characters are
2296 converted to dashes '-'. 2352 converted to dashes '-'.
2297 (baseaddr): the C_BASEADDR parameter. 2353 (baseaddr): the baseaddr parameter value (often named C_BASEADDR).
2298 (HW_VER): from the HW_VER parameter. 2354 (HW_VER): from the HW_VER parameter.
2299 (size): equals C_HIGHADDR - C_BASEADDR + 1 2355 (size): the address range size (often C_HIGHADDR - C_BASEADDR + 1).
2300 2356
2301 Typically, the compatible list will include the exact IP core version 2357 Typically, the compatible list will include the exact IP core version
2302 followed by an older IP core version which implements the same 2358 followed by an older IP core version which implements the same
@@ -2326,11 +2382,11 @@ platforms are moved over to use the flattened-device-tree model.
2326 2382
2327 becomes the following device tree node: 2383 becomes the following device tree node:
2328 2384
2329 opb-uartlite-0@ec100000 { 2385 opb_uartlite_0: serial@ec100000 {
2330 device_type = "serial"; 2386 device_type = "serial";
2331 compatible = "xlnx,opb-uartlite-1.00.b"; 2387 compatible = "xlnx,opb-uartlite-1.00.b";
2332 reg = <ec100000 10000>; 2388 reg = <ec100000 10000>;
2333 interrupt-parent = <&opb-intc>; 2389 interrupt-parent = <&opb_intc_0>;
2334 interrupts = <1 0>; // got this from the opb_intc parameters 2390 interrupts = <1 0>; // got this from the opb_intc parameters
2335 current-speed = <d#115200>; // standard serial device prop 2391 current-speed = <d#115200>; // standard serial device prop
2336 clock-frequency = <d#50000000>; // standard serial device prop 2392 clock-frequency = <d#50000000>; // standard serial device prop
@@ -2339,16 +2395,19 @@ platforms are moved over to use the flattened-device-tree model.
2339 xlnx,use-parity = <0>; 2395 xlnx,use-parity = <0>;
2340 }; 2396 };
2341 2397
2342 Some IP cores actually implement 2 or more logical devices. In this case, 2398 Some IP cores actually implement 2 or more logical devices. In
2343 the device should still describe the whole IP core with a single node 2399 this case, the device should still describe the whole IP core with
2344 and add a child node for each logical device. The ranges property can 2400 a single node and add a child node for each logical device. The
2345 be used to translate from parent IP-core to the registers of each device. 2401 ranges property can be used to translate from parent IP-core to the
2346 (Note: this makes the assumption that both logical devices have the same 2402 registers of each device. In addition, the parent node should be
2347 bus binding. If this is not true, then separate nodes should be used for 2403 compatible with the bus type 'xlnx,compound', and should contain
2348 each logical device). The 'cell-index' property can be used to enumerate 2404 #address-cells and #size-cells, as with any other bus. (Note: this
2349 logical devices within an IP core. For example, the following is the 2405 makes the assumption that both logical devices have the same bus
2350 system.mhs entry for the dual ps2 controller found on the ml403 reference 2406 binding. If this is not true, then separate nodes should be used
2351 design. 2407 for each logical device). The 'cell-index' property can be used to
2408 enumerate logical devices within an IP core. For example, the
2409 following is the system.mhs entry for the dual ps2 controller found
2410 on the ml403 reference design.
2352 2411
2353 BEGIN opb_ps2_dual_ref 2412 BEGIN opb_ps2_dual_ref
2354 PARAMETER INSTANCE = opb_ps2_dual_ref_0 2413 PARAMETER INSTANCE = opb_ps2_dual_ref_0
@@ -2370,21 +2429,24 @@ platforms are moved over to use the flattened-device-tree model.
2370 2429
2371 It would result in the following device tree nodes: 2430 It would result in the following device tree nodes:
2372 2431
2373 opb_ps2_dual_ref_0@a9000000 { 2432 opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {
2433 #address-cells = <1>;
2434 #size-cells = <1>;
2435 compatible = "xlnx,compound";
2374 ranges = <0 a9000000 2000>; 2436 ranges = <0 a9000000 2000>;
2375 // If this device had extra parameters, then they would 2437 // If this device had extra parameters, then they would
2376 // go here. 2438 // go here.
2377 ps2@0 { 2439 ps2@0 {
2378 compatible = "xlnx,opb-ps2-dual-ref-1.00.a"; 2440 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
2379 reg = <0 40>; 2441 reg = <0 40>;
2380 interrupt-parent = <&opb-intc>; 2442 interrupt-parent = <&opb_intc_0>;
2381 interrupts = <3 0>; 2443 interrupts = <3 0>;
2382 cell-index = <0>; 2444 cell-index = <0>;
2383 }; 2445 };
2384 ps2@1000 { 2446 ps2@1000 {
2385 compatible = "xlnx,opb-ps2-dual-ref-1.00.a"; 2447 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
2386 reg = <1000 40>; 2448 reg = <1000 40>;
2387 interrupt-parent = <&opb-intc>; 2449 interrupt-parent = <&opb_intc_0>;
2388 interrupts = <3 0>; 2450 interrupts = <3 0>;
2389 cell-index = <0>; 2451 cell-index = <0>;
2390 }; 2452 };
@@ -2447,17 +2509,18 @@ platforms are moved over to use the flattened-device-tree model.
2447 2509
2448 Gives this device tree (some properties removed for clarity): 2510 Gives this device tree (some properties removed for clarity):
2449 2511
2450 plb-v34-0 { 2512 plb@0 {
2451 #address-cells = <1>; 2513 #address-cells = <1>;
2452 #size-cells = <1>; 2514 #size-cells = <1>;
2515 compatible = "xlnx,plb-v34-1.02.a";
2453 device_type = "ibm,plb"; 2516 device_type = "ibm,plb";
2454 ranges; // 1:1 translation 2517 ranges; // 1:1 translation
2455 2518
2456 plb-bram-if-cntrl-0@ffff0000 { 2519 plb_bram_if_cntrl_0: bram@ffff0000 {
2457 reg = <ffff0000 10000>; 2520 reg = <ffff0000 10000>;
2458 } 2521 }
2459 2522
2460 opb-v20-0 { 2523 opb@20000000 {
2461 #address-cells = <1>; 2524 #address-cells = <1>;
2462 #size-cells = <1>; 2525 #size-cells = <1>;
2463 ranges = <20000000 20000000 20000000 2526 ranges = <20000000 20000000 20000000
@@ -2465,11 +2528,11 @@ platforms are moved over to use the flattened-device-tree model.
2465 80000000 80000000 40000000 2528 80000000 80000000 40000000
2466 c0000000 c0000000 20000000>; 2529 c0000000 c0000000 20000000>;
2467 2530
2468 opb-uart16550-0@a0000000 { 2531 opb_uart16550_0: serial@a0000000 {
2469 reg = <a00000000 2000>; 2532 reg = <a00000000 2000>;
2470 }; 2533 };
2471 2534
2472 opb-intc-0@d1000fc0 { 2535 opb_intc_0: interrupt-controller@d1000fc0 {
2473 reg = <d1000fc0 20>; 2536 reg = <d1000fc0 20>;
2474 }; 2537 };
2475 }; 2538 };
@@ -2514,6 +2577,204 @@ platforms are moved over to use the flattened-device-tree model.
2514 Requred properties: 2577 Requred properties:
2515 - current-speed : Baud rate of uartlite 2578 - current-speed : Baud rate of uartlite
2516 2579
2580 p) Freescale Synchronous Serial Interface
2581
2582 The SSI is a serial device that communicates with audio codecs. It can
2583 be programmed in AC97, I2S, left-justified, or right-justified modes.
2584
2585 Required properties:
2586 - compatible : compatible list, containing "fsl,ssi"
2587 - cell-index : the SSI, <0> = SSI1, <1> = SSI2, and so on
2588 - reg : offset and length of the register set for the device
2589 - interrupts : <a b> where a is the interrupt number and b is a
2590 field that represents an encoding of the sense and
2591 level information for the interrupt. This should be
2592 encoded based on the information in section 2)
2593 depending on the type of interrupt controller you
2594 have.
2595 - interrupt-parent : the phandle for the interrupt controller that
2596 services interrupts for this device.
2597 - fsl,mode : the operating mode for the SSI interface
2598 "i2s-slave" - I2S mode, SSI is clock slave
2599 "i2s-master" - I2S mode, SSI is clock master
2600 "lj-slave" - left-justified mode, SSI is clock slave
2601 "lj-master" - l.j. mode, SSI is clock master
2602 "rj-slave" - right-justified mode, SSI is clock slave
2603 "rj-master" - r.j., SSI is clock master
2604 "ac97-slave" - AC97 mode, SSI is clock slave
2605 "ac97-master" - AC97 mode, SSI is clock master
2606
2607 Optional properties:
2608 - codec-handle : phandle to a 'codec' node that defines an audio
2609 codec connected to this SSI. This node is typically
2610 a child of an I2C or other control node.
2611
2612 Child 'codec' node required properties:
2613 - compatible : compatible list, contains the name of the codec
2614
2615 Child 'codec' node optional properties:
2616 - clock-frequency : The frequency of the input clock, which typically
2617 comes from an on-board dedicated oscillator.
2618
2619 * Freescale 83xx DMA Controller
2620
2621 Freescale PowerPC 83xx have on chip general purpose DMA controllers.
2622
2623 Required properties:
2624
2625 - compatible : compatible list, contains 2 entries, first is
2626 "fsl,CHIP-dma", where CHIP is the processor
2627 (mpc8349, mpc8360, etc.) and the second is
2628 "fsl,elo-dma"
2629 - reg : <registers mapping for DMA general status reg>
2630 - ranges : Should be defined as specified in 1) to describe the
2631 DMA controller channels.
2632 - cell-index : controller index. 0 for controller @ 0x8100
2633 - interrupts : <interrupt mapping for DMA IRQ>
2634 - interrupt-parent : optional, if needed for interrupt mapping
2635
2636
2637 - DMA channel nodes:
2638 - compatible : compatible list, contains 2 entries, first is
2639 "fsl,CHIP-dma-channel", where CHIP is the processor
2640 (mpc8349, mpc8350, etc.) and the second is
2641 "fsl,elo-dma-channel"
2642 - reg : <registers mapping for channel>
2643 - cell-index : dma channel index starts at 0.
2644
2645 Optional properties:
2646 - interrupts : <interrupt mapping for DMA channel IRQ>
2647 (on 83xx this is expected to be identical to
2648 the interrupts property of the parent node)
2649 - interrupt-parent : optional, if needed for interrupt mapping
2650
2651 Example:
2652 dma@82a8 {
2653 #address-cells = <1>;
2654 #size-cells = <1>;
2655 compatible = "fsl,mpc8349-dma", "fsl,elo-dma";
2656 reg = <82a8 4>;
2657 ranges = <0 8100 1a4>;
2658 interrupt-parent = <&ipic>;
2659 interrupts = <47 8>;
2660 cell-index = <0>;
2661 dma-channel@0 {
2662 compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
2663 cell-index = <0>;
2664 reg = <0 80>;
2665 };
2666 dma-channel@80 {
2667 compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
2668 cell-index = <1>;
2669 reg = <80 80>;
2670 };
2671 dma-channel@100 {
2672 compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
2673 cell-index = <2>;
2674 reg = <100 80>;
2675 };
2676 dma-channel@180 {
2677 compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
2678 cell-index = <3>;
2679 reg = <180 80>;
2680 };
2681 };
2682
2683 * Freescale 85xx/86xx DMA Controller
2684
2685 Freescale PowerPC 85xx/86xx have on chip general purpose DMA controllers.
2686
2687 Required properties:
2688
2689 - compatible : compatible list, contains 2 entries, first is
2690 "fsl,CHIP-dma", where CHIP is the processor
2691 (mpc8540, mpc8540, etc.) and the second is
2692 "fsl,eloplus-dma"
2693 - reg : <registers mapping for DMA general status reg>
2694 - cell-index : controller index. 0 for controller @ 0x21000,
2695 1 for controller @ 0xc000
2696 - ranges : Should be defined as specified in 1) to describe the
2697 DMA controller channels.
2698
2699 - DMA channel nodes:
2700 - compatible : compatible list, contains 2 entries, first is
2701 "fsl,CHIP-dma-channel", where CHIP is the processor
2702 (mpc8540, mpc8560, etc.) and the second is
2703 "fsl,eloplus-dma-channel"
2704 - cell-index : dma channel index starts at 0.
2705 - reg : <registers mapping for channel>
2706 - interrupts : <interrupt mapping for DMA channel IRQ>
2707 - interrupt-parent : optional, if needed for interrupt mapping
2708
2709 Example:
2710 dma@21300 {
2711 #address-cells = <1>;
2712 #size-cells = <1>;
2713 compatible = "fsl,mpc8540-dma", "fsl,eloplus-dma";
2714 reg = <21300 4>;
2715 ranges = <0 21100 200>;
2716 cell-index = <0>;
2717 dma-channel@0 {
2718 compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
2719 reg = <0 80>;
2720 cell-index = <0>;
2721 interrupt-parent = <&mpic>;
2722 interrupts = <14 2>;
2723 };
2724 dma-channel@80 {
2725 compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
2726 reg = <80 80>;
2727 cell-index = <1>;
2728 interrupt-parent = <&mpic>;
2729 interrupts = <15 2>;
2730 };
2731 dma-channel@100 {
2732 compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
2733 reg = <100 80>;
2734 cell-index = <2>;
2735 interrupt-parent = <&mpic>;
2736 interrupts = <16 2>;
2737 };
2738 dma-channel@180 {
2739 compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
2740 reg = <180 80>;
2741 cell-index = <3>;
2742 interrupt-parent = <&mpic>;
2743 interrupts = <17 2>;
2744 };
2745 };
2746
2747 * Freescale 8xxx/3.0 Gb/s SATA nodes
2748
2749 SATA nodes are defined to describe on-chip Serial ATA controllers.
2750 Each SATA port should have its own node.
2751
2752 Required properties:
2753 - compatible : compatible list, contains 2 entries, first is
2754 "fsl,CHIP-sata", where CHIP is the processor
2755 (mpc8315, mpc8379, etc.) and the second is
2756 "fsl,pq-sata"
2757 - interrupts : <interrupt mapping for SATA IRQ>
2758 - cell-index : controller index.
2759 1 for controller @ 0x18000
2760 2 for controller @ 0x19000
2761 3 for controller @ 0x1a000
2762 4 for controller @ 0x1b000
2763
2764 Optional properties:
2765 - interrupt-parent : optional, if needed for interrupt mapping
2766 - reg : <registers mapping>
2767
2768 Example:
2769
2770 sata@18000 {
2771 compatible = "fsl,mpc8379-sata", "fsl,pq-sata";
2772 reg = <0x18000 0x1000>;
2773 cell-index = <1>;
2774 interrupts = <2c 8>;
2775 interrupt-parent = < &ipic >;
2776 };
2777
2517 More devices will be defined as this spec matures. 2778 More devices will be defined as this spec matures.
2518 2779
2519VII - Specifying interrupt information for devices 2780VII - Specifying interrupt information for devices
diff --git a/Documentation/powerpc/qe_firmware.txt b/Documentation/powerpc/qe_firmware.txt
new file mode 100644
index 000000000000..896266432d33
--- /dev/null
+++ b/Documentation/powerpc/qe_firmware.txt
@@ -0,0 +1,295 @@
1 Freescale QUICC Engine Firmware Uploading
2 -----------------------------------------
3
4(c) 2007 Timur Tabi <timur at freescale.com>,
5 Freescale Semiconductor
6
7Table of Contents
8=================
9
10 I - Software License for Firmware
11
12 II - Microcode Availability
13
14 III - Description and Terminology
15
16 IV - Microcode Programming Details
17
18 V - Firmware Structure Layout
19
20 VI - Sample Code for Creating Firmware Files
21
22Revision Information
23====================
24
25November 30, 2007: Rev 1.0 - Initial version
26
27I - Software License for Firmware
28=================================
29
30Each firmware file comes with its own software license. For information on
31the particular license, please see the license text that is distributed with
32the firmware.
33
34II - Microcode Availability
35===========================
36
37Firmware files are distributed through various channels. Some are available on
38http://opensource.freescale.com. For other firmware files, please contact
39your Freescale representative or your operating system vendor.
40
41III - Description and Terminology
42================================
43
44In this document, the term 'microcode' refers to the sequence of 32-bit
45integers that compose the actual QE microcode.
46
47The term 'firmware' refers to a binary blob that contains the microcode as
48well as other data that
49
50 1) describes the microcode's purpose
51 2) describes how and where to upload the microcode
52 3) specifies the values of various registers
53 4) includes additional data for use by specific device drivers
54
55Firmware files are binary files that contain only a firmware.
56
57IV - Microcode Programming Details
58===================================
59
60The QE architecture allows for only one microcode present in I-RAM for each
61RISC processor. To replace any current microcode, a full QE reset (which
62disables the microcode) must be performed first.
63
64QE microcode is uploaded using the following procedure:
65
661) The microcode is placed into I-RAM at a specific location, using the
67 IRAM.IADD and IRAM.IDATA registers.
68
692) The CERCR.CIR bit is set to 0 or 1, depending on whether the firmware
70 needs split I-RAM. Split I-RAM is only meaningful for SOCs that have
71 QEs with multiple RISC processors, such as the 8360. Splitting the I-RAM
72 allows each processor to run a different microcode, effectively creating an
73 asymmetric multiprocessing (AMP) system.
74
753) The TIBCR trap registers are loaded with the addresses of the trap handlers
76 in the microcode.
77
784) The RSP.ECCR register is programmed with the value provided.
79
805) If necessary, device drivers that need the virtual traps and extended mode
81 data will use them.
82
83Virtual Microcode Traps
84
85These virtual traps are conditional branches in the microcode. These are
86"soft" provisional introduced in the ROMcode in order to enable higher
87flexibility and save h/w traps If new features are activated or an issue is
88being fixed in the RAM package utilizing they should be activated. This data
89structure signals the microcode which of these virtual traps is active.
90
91This structure contains 6 words that the application should copy to some
92specific been defined. This table describes the structure.
93
94 ---------------------------------------------------------------
95 | Offset in | | Destination Offset | Size of |
96 | array | Protocol | within PRAM | Operand |
97 --------------------------------------------------------------|
98 | 0 | Ethernet | 0xF8 | 4 bytes |
99 | | interworking | | |
100 ---------------------------------------------------------------
101 | 4 | ATM | 0xF8 | 4 bytes |
102 | | interworking | | |
103 ---------------------------------------------------------------
104 | 8 | PPP | 0xF8 | 4 bytes |
105 | | interworking | | |
106 ---------------------------------------------------------------
107 | 12 | Ethernet RX | 0x22 | 1 byte |
108 | | Distributor Page | | |
109 ---------------------------------------------------------------
110 | 16 | ATM Globtal | 0x28 | 1 byte |
111 | | Params Table | | |
112 ---------------------------------------------------------------
113 | 20 | Insert Frame | 0xF8 | 4 bytes |
114 ---------------------------------------------------------------
115
116
117Extended Modes
118
119This is a double word bit array (64 bits) that defines special functionality
120which has an impact on the softwarew drivers. Each bit has its own impact
121and has special instructions for the s/w associated with it. This structure is
122described in this table:
123
124 -----------------------------------------------------------------------
125 | Bit # | Name | Description |
126 -----------------------------------------------------------------------
127 | 0 | General | Indicates that prior to each host command |
128 | | push command | given by the application, the software must |
129 | | | assert a special host command (push command)|
130 | | | CECDR = 0x00800000. |
131 | | | CECR = 0x01c1000f. |
132 -----------------------------------------------------------------------
133 | 1 | UCC ATM | Indicates that after issuing ATM RX INIT |
134 | | RX INIT | command, the host must issue another special|
135 | | push command | command (push command) and immediately |
136 | | | following that re-issue the ATM RX INIT |
137 | | | command. (This makes the sequence of |
138 | | | initializing the ATM receiver a sequence of |
139 | | | three host commands) |
140 | | | CECDR = 0x00800000. |
141 | | | CECR = 0x01c1000f. |
142 -----------------------------------------------------------------------
143 | 2 | Add/remove | Indicates that following the specific host |
144 | | command | command: "Add/Remove entry in Hash Lookup |
145 | | validation | Table" used in Interworking setup, the user |
146 | | | must issue another command. |
147 | | | CECDR = 0xce000003. |
148 | | | CECR = 0x01c10f58. |
149 -----------------------------------------------------------------------
150 | 3 | General push | Indicates that the s/w has to initialize |
151 | | command | some pointers in the Ethernet thread pages |
152 | | | which are used when Header Compression is |
153 | | | activated. The full details of these |
154 | | | pointers is located in the software drivers.|
155 -----------------------------------------------------------------------
156 | 4 | General push | Indicates that after issuing Ethernet TX |
157 | | command | INIT command, user must issue this command |
158 | | | for each SNUM of Ethernet TX thread. |
159 | | | CECDR = 0x00800003. |
160 | | | CECR = 0x7'b{0}, 8'b{Enet TX thread SNUM}, |
161 | | | 1'b{1}, 12'b{0}, 4'b{1} |
162 -----------------------------------------------------------------------
163 | 5 - 31 | N/A | Reserved, set to zero. |
164 -----------------------------------------------------------------------
165
166V - Firmware Structure Layout
167==============================
168
169QE microcode from Freescale is typically provided as a header file. This
170header file contains macros that define the microcode binary itself as well as
171some other data used in uploading that microcode. The format of these files
172do not lend themselves to simple inclusion into other code. Hence,
173the need for a more portable format. This section defines that format.
174
175Instead of distributing a header file, the microcode and related data are
176embedded into a binary blob. This blob is passed to the qe_upload_firmware()
177function, which parses the blob and performs everything necessary to upload
178the microcode.
179
180All integers are big-endian. See the comments for function
181qe_upload_firmware() for up-to-date implementation information.
182
183This structure supports versioning, where the version of the structure is
184embedded into the structure itself. To ensure forward and backwards
185compatibility, all versions of the structure must use the same 'qe_header'
186structure at the beginning.
187
188'header' (type: struct qe_header):
189 The 'length' field is the size, in bytes, of the entire structure,
190 including all the microcode embedded in it, as well as the CRC (if
191 present).
192
193 The 'magic' field is an array of three bytes that contains the letters
194 'Q', 'E', and 'F'. This is an identifier that indicates that this
195 structure is a QE Firmware structure.
196
197 The 'version' field is a single byte that indicates the version of this
198 structure. If the layout of the structure should ever need to be
199 changed to add support for additional types of microcode, then the
200 version number should also be changed.
201
202The 'id' field is a null-terminated string(suitable for printing) that
203identifies the firmware.
204
205The 'count' field indicates the number of 'microcode' structures. There
206must be one and only one 'microcode' structure for each RISC processor.
207Therefore, this field also represents the number of RISC processors for this
208SOC.
209
210The 'soc' structure contains the SOC numbers and revisions used to match
211the microcode to the SOC itself. Normally, the microcode loader should
212check the data in this structure with the SOC number and revisions, and
213only upload the microcode if there's a match. However, this check is not
214made on all platforms.
215
216Although it is not recommended, you can specify '0' in the soc.model
217field to skip matching SOCs altogether.
218
219The 'model' field is a 16-bit number that matches the actual SOC. The
220'major' and 'minor' fields are the major and minor revision numbrs,
221respectively, of the SOC.
222
223For example, to match the 8323, revision 1.0:
224 soc.model = 8323
225 soc.major = 1
226 soc.minor = 0
227
228'padding' is neccessary for structure alignment. This field ensures that the
229'extended_modes' field is aligned on a 64-bit boundary.
230
231'extended_modes' is a bitfield that defines special functionality which has an
232impact on the device drivers. Each bit has its own impact and has special
233instructions for the driver associated with it. This field is stored in
234the QE library and available to any driver that calles qe_get_firmware_info().
235
236'vtraps' is an array of 8 words that contain virtual trap values for each
237virtual traps. As with 'extended_modes', this field is stored in the QE
238library and available to any driver that calles qe_get_firmware_info().
239
240'microcode' (type: struct qe_microcode):
241 For each RISC processor there is one 'microcode' structure. The first
242 'microcode' structure is for the first RISC, and so on.
243
244 The 'id' field is a null-terminated string suitable for printing that
245 identifies this particular microcode.
246
247 'traps' is an array of 16 words that contain hardware trap values
248 for each of the 16 traps. If trap[i] is 0, then this particular
249 trap is to be ignored (i.e. not written to TIBCR[i]). The entire value
250 is written as-is to the TIBCR[i] register, so be sure to set the EN
251 and T_IBP bits if necessary.
252
253 'eccr' is the value to program into the ECCR register.
254
255 'iram_offset' is the offset into IRAM to start writing the
256 microcode.
257
258 'count' is the number of 32-bit words in the microcode.
259
260 'code_offset' is the offset, in bytes, from the beginning of this
261 structure where the microcode itself can be found. The first
262 microcode binary should be located immediately after the 'microcode'
263 array.
264
265 'major', 'minor', and 'revision' are the major, minor, and revision
266 version numbers, respectively, of the microcode. If all values are 0,
267 then these fields are ignored.
268
269 'reserved' is necessary for structure alignment. Since 'microcode'
270 is an array, the 64-bit 'extended_modes' field needs to be aligned
271 on a 64-bit boundary, and this can only happen if the size of
272 'microcode' is a multiple of 8 bytes. To ensure that, we add
273 'reserved'.
274
275After the last microcode is a 32-bit CRC. It can be calculated using
276this algorithm:
277
278u32 crc32(const u8 *p, unsigned int len)
279{
280 unsigned int i;
281 u32 crc = 0;
282
283 while (len--) {
284 crc ^= *p++;
285 for (i = 0; i < 8; i++)
286 crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0);
287 }
288 return crc;
289}
290
291VI - Sample Code for Creating Firmware Files
292============================================
293
294A Python program that creates firmware binaries from the header files normally
295distributed by Freescale can be found on http://opensource.freescale.com.