powerpc/85xx: Add power management support for MPC85xxMDS boards
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Tue, 15 Sep 2009 21:43:59 +0000 (01:43 +0400)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 12 Nov 2009 03:43:29 +0000 (21:43 -0600)
- Add power management controller nodes;
- Add interrupts for RTC nodes, the RTC interrupt may be used as a
  wakeup source;
- Add sleep properties (DEVDISR bit mask) and sleep-nexus nodes.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/boot/dts/mpc8568mds.dts
arch/powerpc/boot/dts/mpc8569mds.dts
arch/powerpc/platforms/85xx/mpc85xx_mds.c

index 00c2bbda70134db027f1d169d9d1814c4317d545..6d892ba74e55f4125b55b2591dee798fd32ab552 100644 (file)
@@ -40,6 +40,8 @@
                        i-cache-line-size = <32>;       // 32 bytes
                        d-cache-size = <0x8000>;                // L1, 32K
                        i-cache-size = <0x8000>;                // L1, 32K
+                       sleep = <&pmc 0x00008000        // core
+                                &pmc 0x00004000>;      // timebase
                        timebase-frequency = <0>;
                        bus-frequency = <0>;
                        clock-frequency = <0>;
                        interrupts = <16 2>;
                };
 
-               i2c@3000 {
+               i2c-sleep-nexus {
                        #address-cells = <1>;
-                       #size-cells = <0>;
-                       cell-index = <0>;
-                       compatible = "fsl-i2c";
-                       reg = <0x3000 0x100>;
-                       interrupts = <43 2>;
-                       interrupt-parent = <&mpic>;
-                       dfsrr;
+                       #size-cells = <1>;
+                       compatible = "simple-bus";
+                       sleep = <&pmc 0x00000004>;
+                       ranges;
 
-                       rtc@68 {
-                               compatible = "dallas,ds1374";
-                               reg = <0x68>;
+                       i2c@3000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               cell-index = <0>;
+                               compatible = "fsl-i2c";
+                               reg = <0x3000 0x100>;
+                               interrupts = <43 2>;
+                               interrupt-parent = <&mpic>;
+                               dfsrr;
+
+                               rtc@68 {
+                                       compatible = "dallas,ds1374";
+                                       reg = <0x68>;
+                                       interrupts = <3 1>;
+                                       interrupt-parent = <&mpic>;
+                               };
                        };
-               };
 
-               i2c@3100 {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       cell-index = <1>;
-                       compatible = "fsl-i2c";
-                       reg = <0x3100 0x100>;
-                       interrupts = <43 2>;
-                       interrupt-parent = <&mpic>;
-                       dfsrr;
+                       i2c@3100 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               cell-index = <1>;
+                               compatible = "fsl-i2c";
+                               reg = <0x3100 0x100>;
+                               interrupts = <43 2>;
+                               interrupt-parent = <&mpic>;
+                               dfsrr;
+                       };
                };
 
                dma@21300 {
                        reg = <0x21300 0x4>;
                        ranges = <0x0 0x21100 0x200>;
                        cell-index = <0>;
+                       sleep = <&pmc 0x00000400>;
+
                        dma-channel@0 {
                                compatible = "fsl,mpc8568-dma-channel",
                                                "fsl,eloplus-dma-channel";
                        interrupt-parent = <&mpic>;
                        tbi-handle = <&tbi0>;
                        phy-handle = <&phy2>;
+                       sleep = <&pmc 0x00000080>;
 
                        mdio@520 {
                                #address-cells = <1>;
                        interrupt-parent = <&mpic>;
                        tbi-handle = <&tbi1>;
                        phy-handle = <&phy3>;
+                       sleep = <&pmc 0x00000040>;
 
                        mdio@520 {
                                #address-cells = <1>;
                        };
                };
 
-               serial0: serial@4500 {
-                       cell-index = <0>;
-                       device_type = "serial";
-                       compatible = "ns16550";
-                       reg = <0x4500 0x100>;
-                       clock-frequency = <0>;
-                       interrupts = <42 2>;
-                       interrupt-parent = <&mpic>;
+               duart-sleep-nexus {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "simple-bus";
+                       sleep = <&pmc 0x00000002>;
+                       ranges;
+
+                       serial0: serial@4500 {
+                               cell-index = <0>;
+                               device_type = "serial";
+                               compatible = "ns16550";
+                               reg = <0x4500 0x100>;
+                               clock-frequency = <0>;
+                               interrupts = <42 2>;
+                               interrupt-parent = <&mpic>;
+                       };
+
+                       serial1: serial@4600 {
+                               cell-index = <1>;
+                               device_type = "serial";
+                               compatible = "ns16550";
+                               reg = <0x4600 0x100>;
+                               clock-frequency = <0>;
+                               interrupts = <42 2>;
+                               interrupt-parent = <&mpic>;
+                       };
                };
 
-               global-utilities@e0000 {        //global utilities block
-                       compatible = "fsl,mpc8548-guts";
+               global-utilities@e0000 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "fsl,mpc8568-guts", "fsl,mpc8548-guts";
                        reg = <0xe0000 0x1000>;
+                       ranges = <0 0xe0000 0x1000>;
                        fsl,has-rstcr;
-               };
 
-               serial1: serial@4600 {
-                       cell-index = <1>;
-                       device_type = "serial";
-                       compatible = "ns16550";
-                       reg = <0x4600 0x100>;
-                       clock-frequency = <0>;
-                       interrupts = <42 2>;
-                       interrupt-parent = <&mpic>;
+                       pmc: power@70 {
+                               compatible = "fsl,mpc8568-pmc",
+                                            "fsl,mpc8548-pmc";
+                               reg = <0x70 0x20>;
+                       };
                };
 
                crypto@30000 {
                        fsl,channel-fifo-len = <24>;
                        fsl,exec-units-mask = <0xfe>;
                        fsl,descriptor-types-mask = <0x12b0ebf>;
+                       sleep = <&pmc 0x01000000>;
                };
 
                mpic: pic@40000 {
                compatible = "fsl,qe";
                ranges = <0x0 0xe0080000 0x40000>;
                reg = <0xe0080000 0x480>;
+               sleep = <&pmc 0x00000800>;
                brg-frequency = <0>;
                bus-frequency = <396000000>;
                fsl,qe-num-riscs = <2>;
                bus-range = <0 255>;
                ranges = <0x2000000 0x0 0x80000000 0x80000000 0x0 0x20000000
                          0x1000000 0x0 0x0 0xe2000000 0x0 0x800000>;
+               sleep = <&pmc 0x80000000>;
                clock-frequency = <66666666>;
                #interrupt-cells = <1>;
                #size-cells = <2>;
                bus-range = <0 255>;
                ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
                          0x1000000 0x0 0x0 0xe2800000 0x0 0x800000>;
+               sleep = <&pmc 0x20000000>;
                clock-frequency = <33333333>;
                #interrupt-cells = <1>;
                #size-cells = <2>;
                              55 2 /* msg2_tx   */
                              56 2 /* msg2_rx   */>;
                interrupt-parent = <&mpic>;
+               sleep = <&pmc 0x00080000   /* controller */
+                        &pmc 0x00040000>; /* message unit */
        };
 };
index 1e3ec8f059bf9e6622ff2c71b4d163984ff586b4..795eb362fcf920c2d1fa1528f53ce71faa566298 100644 (file)
@@ -41,6 +41,8 @@
                        i-cache-line-size = <32>;       // 32 bytes
                        d-cache-size = <0x8000>;                // L1, 32K
                        i-cache-size = <0x8000>;                // L1, 32K
+                       sleep = <&pmc 0x00008000        // core
+                                &pmc 0x00004000>;      // timebase
                        timebase-frequency = <0>;
                        bus-frequency = <0>;
                        clock-frequency = <0>;
@@ -59,6 +61,7 @@
                reg = <0xe0005000 0x1000>;
                interrupts = <19 2>;
                interrupt-parent = <&mpic>;
+               sleep = <&pmc 0x08000000>;
 
                ranges = <0x0 0x0 0xfe000000 0x02000000
                          0x1 0x0 0xf8000000 0x00008000
                        interrupts = <18 2>;
                };
 
-               i2c@3000 {
+               i2c-sleep-nexus {
                        #address-cells = <1>;
-                       #size-cells = <0>;
-                       cell-index = <0>;
-                       compatible = "fsl-i2c";
-                       reg = <0x3000 0x100>;
-                       interrupts = <43 2>;
-                       interrupt-parent = <&mpic>;
-                       dfsrr;
+                       #size-cells = <1>;
+                       compatible = "simple-bus";
+                       sleep = <&pmc 0x00000004>;
+                       ranges;
+
+                       i2c@3000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               cell-index = <0>;
+                               compatible = "fsl-i2c";
+                               reg = <0x3000 0x100>;
+                               interrupts = <43 2>;
+                               interrupt-parent = <&mpic>;
+                               dfsrr;
+
+                               rtc@68 {
+                                       compatible = "dallas,ds1374";
+                                       reg = <0x68>;
+                                       interrupts = <3 1>;
+                                       interrupt-parent = <&mpic>;
+                               };
+                       };
 
-                       rtc@68 {
-                               compatible = "dallas,ds1374";
-                               reg = <0x68>;
+                       i2c@3100 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               cell-index = <1>;
+                               compatible = "fsl-i2c";
+                               reg = <0x3100 0x100>;
+                               interrupts = <43 2>;
+                               interrupt-parent = <&mpic>;
+                               dfsrr;
                        };
                };
 
-               i2c@3100 {
+               duart-sleep-nexus {
                        #address-cells = <1>;
-                       #size-cells = <0>;
-                       cell-index = <1>;
-                       compatible = "fsl-i2c";
-                       reg = <0x3100 0x100>;
-                       interrupts = <43 2>;
-                       interrupt-parent = <&mpic>;
-                       dfsrr;
-               };
+                       #size-cells = <1>;
+                       compatible = "simple-bus";
+                       sleep = <&pmc 0x00000002>;
+                       ranges;
 
-               serial0: serial@4500 {
-                       cell-index = <0>;
-                       device_type = "serial";
-                       compatible = "ns16550";
-                       reg = <0x4500 0x100>;
-                       clock-frequency = <0>;
-                       interrupts = <42 2>;
-                       interrupt-parent = <&mpic>;
-               };
+                       serial0: serial@4500 {
+                               cell-index = <0>;
+                               device_type = "serial";
+                               compatible = "ns16550";
+                               reg = <0x4500 0x100>;
+                               clock-frequency = <0>;
+                               interrupts = <42 2>;
+                               interrupt-parent = <&mpic>;
+                       };
 
-               serial1: serial@4600 {
-                       cell-index = <1>;
-                       device_type = "serial";
-                       compatible = "ns16550";
-                       reg = <0x4600 0x100>;
-                       clock-frequency = <0>;
-                       interrupts = <42 2>;
-                       interrupt-parent = <&mpic>;
+                       serial1: serial@4600 {
+                               cell-index = <1>;
+                               device_type = "serial";
+                               compatible = "ns16550";
+                               reg = <0x4600 0x100>;
+                               clock-frequency = <0>;
+                               interrupts = <42 2>;
+                               interrupt-parent = <&mpic>;
+                       };
                };
 
                L2: l2-cache-controller@20000 {
                        reg = <0x2e000 0x1000>;
                        interrupts = <72 0x8>;
                        interrupt-parent = <&mpic>;
+                       sleep = <&pmc 0x00200000>;
                        /* Filled in by U-Boot */
                        clock-frequency = <0>;
                        status = "disabled";
                        fsl,channel-fifo-len = <24>;
                        fsl,exec-units-mask = <0xbfe>;
                        fsl,descriptor-types-mask = <0x3ab0ebf>;
+                       sleep = <&pmc 0x01000000>;
                };
 
                mpic: pic@40000 {
                };
 
                global-utilities@e0000 {
-                       compatible = "fsl,mpc8569-guts";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "fsl,mpc8569-guts", "fsl,mpc8548-guts";
                        reg = <0xe0000 0x1000>;
+                       ranges = <0 0xe0000 0x1000>;
                        fsl,has-rstcr;
+
+                       pmc: power@70 {
+                               compatible = "fsl,mpc8569-pmc",
+                                            "fsl,mpc8548-pmc";
+                               reg = <0x70 0x20>;
+                       };
                };
 
                par_io@e0100 {
                compatible = "fsl,qe";
                ranges = <0x0 0xe0080000 0x40000>;
                reg = <0xe0080000 0x480>;
+               sleep = <&pmc 0x00000800>;
                brg-frequency = <0>;
                bus-frequency = <0>;
                fsl,qe-num-riscs = <4>;
                bus-range = <0 255>;
                ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
                          0x1000000 0x0 0x00000000 0xe2800000 0x0 0x00800000>;
+               sleep = <&pmc 0x20000000>;
                clock-frequency = <33333333>;
                pcie@0 {
                        reg = <0x0 0x0 0x0 0x0 0x0>;
                              55 2 /* msg2_tx   */
                              56 2 /* msg2_rx   */>;
                interrupt-parent = <&mpic>;
+               sleep = <&pmc 0x00080000>;
        };
 };
index 3909d57b86e3aed43d2101db2b3fb25ad5d7d004..c5028a2e5a58510b9aa634c2cf09a114c096e373 100644 (file)
@@ -301,6 +301,7 @@ static struct of_device_id mpc85xx_ids[] = {
        { .compatible = "fsl,qe", },
        { .compatible = "gianfar", },
        { .compatible = "fsl,rapidio-delta", },
+       { .compatible = "fsl,mpc8548-guts", },
        {},
 };