aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/powerpc/booting-without-of.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/powerpc/booting-without-of.txt')
-rw-r--r--Documentation/powerpc/booting-without-of.txt258
1 files changed, 176 insertions, 82 deletions
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index aee243a846a2..de4063cb4fdc 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -59,6 +59,7 @@ Table of Contents
59 p) Freescale Synchronous Serial Interface 59 p) Freescale Synchronous Serial Interface
60 q) USB EHCI controllers 60 q) USB EHCI controllers
61 r) MDIO on GPIOs 61 r) MDIO on GPIOs
62 s) SPI busses
62 63
63 VII - Marvell Discovery mv64[345]6x System Controller chips 64 VII - Marvell Discovery mv64[345]6x System Controller chips
64 1) The /system-controller node 65 1) The /system-controller node
@@ -89,10 +90,12 @@ Table of Contents
89 3) OpenPIC Interrupt Controllers 90 3) OpenPIC Interrupt Controllers
90 4) ISA Interrupt Controllers 91 4) ISA Interrupt Controllers
91 92
92 VIII - Specifying GPIO information for devices 93 IX - Specifying GPIO information for devices
93 1) gpios property 94 1) gpios property
94 2) gpio-controller nodes 95 2) gpio-controller nodes
95 96
97 X - Specifying device power management information (sleep property)
98
96 Appendix A - Sample SOC node for MPC8540 99 Appendix A - Sample SOC node for MPC8540
97 100
98 101
@@ -275,7 +278,7 @@ it with special cases.
275 a 64-bit platform. 278 a 64-bit platform.
276 279
277 d) request and get assigned a platform number (see PLATFORM_* 280 d) request and get assigned a platform number (see PLATFORM_*
278 constants in include/asm-powerpc/processor.h 281 constants in arch/powerpc/include/asm/processor.h
279 282
28032-bit embedded kernels: 28332-bit embedded kernels:
281 284
@@ -337,7 +340,7 @@ the block to RAM before passing it to the kernel.
337--------- 340---------
338 341
339 The kernel is entered with r3 pointing to an area of memory that is 342 The kernel is entered with r3 pointing to an area of memory that is
340 roughly described in include/asm-powerpc/prom.h by the structure 343 roughly described in arch/powerpc/include/asm/prom.h by the structure
341 boot_param_header: 344 boot_param_header:
342 345
343struct boot_param_header { 346struct boot_param_header {
@@ -705,7 +708,7 @@ device or bus to be described by the device tree.
705In general, the format of an address for a device is defined by the 708In general, the format of an address for a device is defined by the
706parent bus type, based on the #address-cells and #size-cells 709parent bus type, based on the #address-cells and #size-cells
707properties. Note that the parent's parent definitions of #address-cells 710properties. Note that the parent's parent definitions of #address-cells
708and #size-cells are not inhereted so every node with children must specify 711and #size-cells are not inherited so every node with children must specify
709them. The kernel requires the root node to have those properties defining 712them. The kernel requires the root node to have those properties defining
710addresses format for devices directly mapped on the processor bus. 713addresses format for devices directly mapped on the processor bus.
711 714
@@ -1774,7 +1777,7 @@ platforms are moved over to use the flattened-device-tree model.
1774 1777
1775 Xilinx uartlite devices are simple fixed speed serial ports. 1778 Xilinx uartlite devices are simple fixed speed serial ports.
1776 1779
1777 Requred properties: 1780 Required properties:
1778 - current-speed : Baud rate of uartlite 1781 - current-speed : Baud rate of uartlite
1779 1782
1780 v) Xilinx hwicap 1783 v) Xilinx hwicap
@@ -1796,7 +1799,7 @@ platforms are moved over to use the flattened-device-tree model.
1796 Xilinx UART 16550 devices are very similar to the NS16550 but with 1799 Xilinx UART 16550 devices are very similar to the NS16550 but with
1797 different register spacing and an offset from the base address. 1800 different register spacing and an offset from the base address.
1798 1801
1799 Requred properties: 1802 Required properties:
1800 - clock-frequency : Frequency of the clock input 1803 - clock-frequency : Frequency of the clock input
1801 - reg-offset : A value of 3 is required 1804 - reg-offset : A value of 3 is required
1802 - reg-shift : A value of 2 is required 1805 - reg-shift : A value of 2 is required
@@ -1881,6 +1884,62 @@ platforms are moved over to use the flattened-device-tree model.
1881 &qe_pio_c 6>; 1884 &qe_pio_c 6>;
1882 }; 1885 };
1883 1886
1887 s) SPI (Serial Peripheral Interface) busses
1888
1889 SPI busses can be described with a node for the SPI master device
1890 and a set of child nodes for each SPI slave on the bus. For this
1891 discussion, it is assumed that the system's SPI controller is in
1892 SPI master mode. This binding does not describe SPI controllers
1893 in slave mode.
1894
1895 The SPI master node requires the following properties:
1896 - #address-cells - number of cells required to define a chip select
1897 address on the SPI bus.
1898 - #size-cells - should be zero.
1899 - compatible - name of SPI bus controller following generic names
1900 recommended practice.
1901 No other properties are required in the SPI bus node. It is assumed
1902 that a driver for an SPI bus device will understand that it is an SPI bus.
1903 However, the binding does not attempt to define the specific method for
1904 assigning chip select numbers. Since SPI chip select configuration is
1905 flexible and non-standardized, it is left out of this binding with the
1906 assumption that board specific platform code will be used to manage
1907 chip selects. Individual drivers can define additional properties to
1908 support describing the chip select layout.
1909
1910 SPI slave nodes must be children of the SPI master node and can
1911 contain the following properties.
1912 - reg - (required) chip select address of device.
1913 - compatible - (required) name of SPI device following generic names
1914 recommended practice
1915 - spi-max-frequency - (required) Maximum SPI clocking speed of device in Hz
1916 - spi-cpol - (optional) Empty property indicating device requires
1917 inverse clock polarity (CPOL) mode
1918 - spi-cpha - (optional) Empty property indicating device requires
1919 shifted clock phase (CPHA) mode
1920
1921 SPI example for an MPC5200 SPI bus:
1922 spi@f00 {
1923 #address-cells = <1>;
1924 #size-cells = <0>;
1925 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
1926 reg = <0xf00 0x20>;
1927 interrupts = <2 13 0 2 14 0>;
1928 interrupt-parent = <&mpc5200_pic>;
1929
1930 ethernet-switch@0 {
1931 compatible = "micrel,ks8995m";
1932 spi-max-frequency = <1000000>;
1933 reg = <0>;
1934 };
1935
1936 codec@1 {
1937 compatible = "ti,tlv320aic26";
1938 spi-max-frequency = <100000>;
1939 reg = <1>;
1940 };
1941 };
1942
1884VII - Marvell Discovery mv64[345]6x System Controller chips 1943VII - Marvell Discovery mv64[345]6x System Controller chips
1885=========================================================== 1944===========================================================
1886 1945
@@ -1894,7 +1953,7 @@ prefixed with the string "marvell,", for Marvell Technology Group Ltd.
18941) The /system-controller node 19531) The /system-controller node
1895 1954
1896 This node is used to represent the system-controller and must be 1955 This node is used to represent the system-controller and must be
1897 present when the system uses a system contller chip. The top-level 1956 present when the system uses a system controller chip. The top-level
1898 system-controller node contains information that is global to all 1957 system-controller node contains information that is global to all
1899 devices within the system controller chip. The node name begins 1958 devices within the system controller chip. The node name begins
1900 with "system-controller" followed by the unit address, which is 1959 with "system-controller" followed by the unit address, which is
@@ -2488,8 +2547,8 @@ encodings listed below:
2488 2 = high to low edge sensitive type enabled 2547 2 = high to low edge sensitive type enabled
2489 3 = low to high edge sensitive type enabled 2548 3 = low to high edge sensitive type enabled
2490 2549
2491VIII - Specifying GPIO information for devices 2550IX - Specifying GPIO information for devices
2492============================================== 2551============================================
2493 2552
24941) gpios property 25531) gpios property
2495----------------- 2554-----------------
@@ -2537,116 +2596,151 @@ Example of two SOC GPIO banks defined as gpio-controller nodes:
2537 gpio-controller; 2596 gpio-controller;
2538 }; 2597 };
2539 2598
2599X - Specifying Device Power Management Information (sleep property)
2600===================================================================
2601
2602Devices on SOCs often have mechanisms for placing devices into low-power
2603states that are decoupled from the devices' own register blocks. Sometimes,
2604this information is more complicated than a cell-index property can
2605reasonably describe. Thus, each device controlled in such a manner
2606may contain a "sleep" property which describes these connections.
2607
2608The sleep property consists of one or more sleep resources, each of
2609which consists of a phandle to a sleep controller, followed by a
2610controller-specific sleep specifier of zero or more cells.
2611
2612The semantics of what type of low power modes are possible are defined
2613by the sleep controller. Some examples of the types of low power modes
2614that may be supported are:
2615
2616 - Dynamic: The device may be disabled or enabled at any time.
2617 - System Suspend: The device may request to be disabled or remain
2618 awake during system suspend, but will not be disabled until then.
2619 - Permanent: The device is disabled permanently (until the next hard
2620 reset).
2621
2622Some devices may share a clock domain with each other, such that they should
2623only be suspended when none of the devices are in use. Where reasonable,
2624such nodes should be placed on a virtual bus, where the bus has the sleep
2625property. If the clock domain is shared among devices that cannot be
2626reasonably grouped in this manner, then create a virtual sleep controller
2627(similar to an interrupt nexus, except that defining a standardized
2628sleep-map should wait until its necessity is demonstrated).
2629
2540Appendix A - Sample SOC node for MPC8540 2630Appendix A - Sample SOC node for MPC8540
2541======================================== 2631========================================
2542 2632
2543Note that the #address-cells and #size-cells for the SoC node 2633 soc@e0000000 {
2544in this example have been explicitly listed; these are likely
2545not necessary as they are usually the same as the root node.
2546
2547 soc8540@e0000000 {
2548 #address-cells = <1>; 2634 #address-cells = <1>;
2549 #size-cells = <1>; 2635 #size-cells = <1>;
2550 #interrupt-cells = <2>; 2636 compatible = "fsl,mpc8540-ccsr", "simple-bus";
2551 device_type = "soc"; 2637 device_type = "soc";
2552 ranges = <00000000 e0000000 00100000> 2638 ranges = <0x00000000 0xe0000000 0x00100000>
2553 reg = <e0000000 00003000>;
2554 bus-frequency = <0>; 2639 bus-frequency = <0>;
2555 2640 interrupt-parent = <&pic>;
2556 mdio@24520 {
2557 reg = <24520 20>;
2558 device_type = "mdio";
2559 compatible = "gianfar";
2560
2561 ethernet-phy@0 {
2562 linux,phandle = <2452000>
2563 interrupt-parent = <40000>;
2564 interrupts = <35 1>;
2565 reg = <0>;
2566 device_type = "ethernet-phy";
2567 };
2568
2569 ethernet-phy@1 {
2570 linux,phandle = <2452001>
2571 interrupt-parent = <40000>;
2572 interrupts = <35 1>;
2573 reg = <1>;
2574 device_type = "ethernet-phy";
2575 };
2576
2577 ethernet-phy@3 {
2578 linux,phandle = <2452002>
2579 interrupt-parent = <40000>;
2580 interrupts = <35 1>;
2581 reg = <3>;
2582 device_type = "ethernet-phy";
2583 };
2584
2585 };
2586 2641
2587 ethernet@24000 { 2642 ethernet@24000 {
2588 #size-cells = <0>; 2643 #address-cells = <1>;
2644 #size-cells = <1>;
2589 device_type = "network"; 2645 device_type = "network";
2590 model = "TSEC"; 2646 model = "TSEC";
2591 compatible = "gianfar"; 2647 compatible = "gianfar", "simple-bus";
2592 reg = <24000 1000>; 2648 reg = <0x24000 0x1000>;
2593 mac-address = [ 00 E0 0C 00 73 00 ]; 2649 local-mac-address = [ 00 E0 0C 00 73 00 ];
2594 interrupts = <d 3 e 3 12 3>; 2650 interrupts = <29 2 30 2 34 2>;
2595 interrupt-parent = <40000>; 2651 phy-handle = <&phy0>;
2596 phy-handle = <2452000>; 2652 sleep = <&pmc 00000080>;
2653 ranges;
2654
2655 mdio@24520 {
2656 reg = <0x24520 0x20>;
2657 compatible = "fsl,gianfar-mdio";
2658
2659 phy0: ethernet-phy@0 {
2660 interrupts = <5 1>;
2661 reg = <0>;
2662 device_type = "ethernet-phy";
2663 };
2664
2665 phy1: ethernet-phy@1 {
2666 interrupts = <5 1>;
2667 reg = <1>;
2668 device_type = "ethernet-phy";
2669 };
2670
2671 phy3: ethernet-phy@3 {
2672 interrupts = <7 1>;
2673 reg = <3>;
2674 device_type = "ethernet-phy";
2675 };
2676 };
2597 }; 2677 };
2598 2678
2599 ethernet@25000 { 2679 ethernet@25000 {
2600 #address-cells = <1>;
2601 #size-cells = <0>;
2602 device_type = "network"; 2680 device_type = "network";
2603 model = "TSEC"; 2681 model = "TSEC";
2604 compatible = "gianfar"; 2682 compatible = "gianfar";
2605 reg = <25000 1000>; 2683 reg = <0x25000 0x1000>;
2606 mac-address = [ 00 E0 0C 00 73 01 ]; 2684 local-mac-address = [ 00 E0 0C 00 73 01 ];
2607 interrupts = <13 3 14 3 18 3>; 2685 interrupts = <13 2 14 2 18 2>;
2608 interrupt-parent = <40000>; 2686 phy-handle = <&phy1>;
2609 phy-handle = <2452001>; 2687 sleep = <&pmc 00000040>;
2610 }; 2688 };
2611 2689
2612 ethernet@26000 { 2690 ethernet@26000 {
2613 #address-cells = <1>;
2614 #size-cells = <0>;
2615 device_type = "network"; 2691 device_type = "network";
2616 model = "FEC"; 2692 model = "FEC";
2617 compatible = "gianfar"; 2693 compatible = "gianfar";
2618 reg = <26000 1000>; 2694 reg = <0x26000 0x1000>;
2619 mac-address = [ 00 E0 0C 00 73 02 ]; 2695 local-mac-address = [ 00 E0 0C 00 73 02 ];
2620 interrupts = <19 3>; 2696 interrupts = <41 2>;
2621 interrupt-parent = <40000>; 2697 phy-handle = <&phy3>;
2622 phy-handle = <2452002>; 2698 sleep = <&pmc 00000020>;
2623 }; 2699 };
2624 2700
2625 serial@4500 { 2701 serial@4500 {
2626 device_type = "serial"; 2702 #address-cells = <1>;
2627 compatible = "ns16550"; 2703 #size-cells = <1>;
2628 reg = <4500 100>; 2704 compatible = "fsl,mpc8540-duart", "simple-bus";
2629 clock-frequency = <0>; 2705 sleep = <&pmc 00000002>;
2630 interrupts = <1a 3>; 2706 ranges;
2631 interrupt-parent = <40000>; 2707
2708 serial@4500 {
2709 device_type = "serial";
2710 compatible = "ns16550";
2711 reg = <0x4500 0x100>;
2712 clock-frequency = <0>;
2713 interrupts = <42 2>;
2714 };
2715
2716 serial@4600 {
2717 device_type = "serial";
2718 compatible = "ns16550";
2719 reg = <0x4600 0x100>;
2720 clock-frequency = <0>;
2721 interrupts = <42 2>;
2722 };
2632 }; 2723 };
2633 2724
2634 pic@40000 { 2725 pic: pic@40000 {
2635 linux,phandle = <40000>;
2636 interrupt-controller; 2726 interrupt-controller;
2637 #address-cells = <0>; 2727 #address-cells = <0>;
2638 reg = <40000 40000>; 2728 #interrupt-cells = <2>;
2729 reg = <0x40000 0x40000>;
2639 compatible = "chrp,open-pic"; 2730 compatible = "chrp,open-pic";
2640 device_type = "open-pic"; 2731 device_type = "open-pic";
2641 }; 2732 };
2642 2733
2643 i2c@3000 { 2734 i2c@3000 {
2644 interrupt-parent = <40000>; 2735 interrupts = <43 2>;
2645 interrupts = <1b 3>; 2736 reg = <0x3000 0x100>;
2646 reg = <3000 18>;
2647 device_type = "i2c";
2648 compatible = "fsl-i2c"; 2737 compatible = "fsl-i2c";
2649 dfsrr; 2738 dfsrr;
2739 sleep = <&pmc 00000004>;
2650 }; 2740 };
2651 2741
2742 pmc: power@e0070 {
2743 compatible = "fsl,mpc8540-pmc", "fsl,mpc8548-pmc";
2744 reg = <0xe0070 0x20>;
2745 };
2652 }; 2746 };