powerpc/5200: Use the gpt* labels to simplify mpc5200 dts files
authorGrant Likely <grant.likely@secretlab.ca>
Fri, 8 Feb 2013 08:02:51 +0000 (08:02 +0000)
committerAnatolij Gustschin <agust@denx.de>
Mon, 11 Feb 2013 21:48:09 +0000 (21:48 +0000)
The DTC labels feature allows a dts file to reference a node without
having to reproduce the entire node hierarchy above it. We can use this
to simplify the MPC5200 board dts files by referencing the gpt nodes by
label.

Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
[agust: fixed gpt7 phandle in the csi node of o2d.dtsi]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
arch/powerpc/boot/dts/a3m071.dts
arch/powerpc/boot/dts/a4m072.dts
arch/powerpc/boot/dts/cm5200.dts
arch/powerpc/boot/dts/digsy_mtc.dts
arch/powerpc/boot/dts/media5200.dts
arch/powerpc/boot/dts/motionpro.dts
arch/powerpc/boot/dts/mucmc52.dts
arch/powerpc/boot/dts/o2d.dtsi
arch/powerpc/boot/dts/pcm030.dts
arch/powerpc/boot/dts/pcm032.dts
arch/powerpc/boot/dts/uc101.dts

index 877a28cb77e458718235fb4b28740c500526a411..bf81b8f9704c9c8a094e78ab8c296758a0eab366 100644 (file)
@@ -17,6 +17,8 @@
 
 /include/ "mpc5200b.dtsi"
 
+&gpt0 { fsl,has-wdt; };
+
 / {
        model = "anonymous,a3m071";
        compatible = "anonymous,a3m071";
                bus-frequency = <0>; /* From boot loader */
                system-frequency = <0>; /* From boot loader */
 
-               timer@600 {
-                       fsl,has-wdt;
-               };
-
                spi@f00 {
                        status = "disabled";
                };
index fabe7b7d5f139f99306ba726338dae55a2d90f53..1f02034c7e99a848713a23ea612be0d7736411d3 100644 (file)
 
 /include/ "mpc5200b.dtsi"
 
+&gpt0 { fsl,has-wdt; };
+&gpt3 { gpio-controller; };
+&gpt4 { gpio-controller; };
+&gpt5 { gpio-controller; };
+
 / {
        model = "anonymous,a4m072";
        compatible = "anonymous,a4m072";
                        fsl,init-fd-counters = <0x3333>;
                };
 
-               timer@600 {
-                       fsl,has-wdt;
-               };
-
-               gpt3: timer@630 { /* General Purpose Timer in GPIO mode */
-                       compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt4: timer@640 { /* General Purpose Timer in GPIO mode */
-                       compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt5: timer@650 { /* General Purpose Timer in GPIO mode */
-                       compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
                spi@f00 {
                        status = "disabled";
                };
index ad3a4f4a2b048bbe7efdfa91f2783d9468df005c..fb580dd84ddf6a7ecc82dd10a2f453e441a06867 100644 (file)
 
 /include/ "mpc5200b.dtsi"
 
+&gpt0 { fsl,has-wdt; };
+
 / {
        model = "schindler,cm5200";
        compatible = "schindler,cm5200";
 
        soc5200@f0000000 {
-               timer@600 {     // General Purpose Timer
-                       fsl,has-wdt;
-               };
-
                can@900 {
                        status = "disabled";
                };
index a7511f2d844d9155a1c193effc52f34cd081f46f..955bff629df3c3c2057dd42eedb8f1cc0ff605f5 100644 (file)
@@ -13,6 +13,9 @@
 
 /include/ "mpc5200b.dtsi"
 
+&gpt0 { gpio-controller; fsl,has-wdt; };
+&gpt1 { gpio-controller; };
+
 / {
        model = "intercontrol,digsy-mtc";
        compatible = "intercontrol,digsy-mtc";
        };
 
        soc5200@f0000000 {
-               timer@600 {     // General Purpose Timer
-                       #gpio-cells = <2>;
-                       fsl,has-wdt;
-                       gpio-controller;
-               };
-
-               timer@610 {
-                       #gpio-cells = <2>;
-                       gpio-controller;
-               };
-
                rtc@800 {
                        status = "disabled";
                };
index 48d72f38e5edd79daf2650cf21b67e3275b408f0..b5413cb85f13458f31a46019a5b868c12082f192 100644 (file)
@@ -13,6 +13,8 @@
 
 /include/ "mpc5200b.dtsi"
 
+&gpt0 { fsl,has-wdt; };
+
 / {
        model = "fsl,media5200";
        compatible = "fsl,media5200";
        soc5200@f0000000 {
                bus-frequency = <132000000>;// 132 MHz
 
-               timer@600 {     // General Purpose Timer
-                       fsl,has-wdt;
-               };
-
                psc@2000 {      // PSC1
                        status = "disabled";
                };
index 0b78e89ac69bedf2a9d7462ba22e47ba21a0e01d..bbabd97492ad3096013760507484c3744b1789c8 100644 (file)
 
 /include/ "mpc5200b.dtsi"
 
+&gpt0 { fsl,has-wdt; };
+&gpt6 { // Motion-PRO status LED
+       compatible = "promess,motionpro-led";
+       label = "motionpro-statusled";
+       blink-delay = <100>; // 100 msec
+};
+&gpt7 { // Motion-PRO ready LED
+       compatible = "promess,motionpro-led";
+       label = "motionpro-readyled";
+};
+
 / {
        model = "promess,motionpro";
        compatible = "promess,motionpro";
 
        soc5200@f0000000 {
-               timer@600 {     // General Purpose Timer
-                       fsl,has-wdt;
-               };
-
-               timer@660 {     // Motion-PRO status LED
-                       compatible = "promess,motionpro-led";
-                       label = "motionpro-statusled";
-                       blink-delay = <100>; // 100 msec
-               };
-
-               timer@670 {     // Motion-PRO ready LED
-                       compatible = "promess,motionpro-led";
-                       label = "motionpro-readyled";
-               };
-
                can@900 {
                        status = "disabled";
                };
index 21d34720fcc91f4f7f3dab73c44180b0795f167c..d3a792bb5c1a8f2dc3119e4cf14a5997f7b0f9e1 100644 (file)
 
 /include/ "mpc5200b.dtsi"
 
+/* Timer pins that need to be in GPIO mode */
+&gpt0 { gpio-controller; };
+&gpt1 { gpio-controller; };
+&gpt2 { gpio-controller; };
+&gpt3 { gpio-controller; };
+
+/* Disabled timers */
+&gpt4 { status = "disabled"; };
+&gpt5 { status = "disabled"; };
+&gpt6 { status = "disabled"; };
+&gpt7 { status = "disabled"; };
+
 / {
        model = "manroland,mucmc52";
        compatible = "manroland,mucmc52";
 
        soc5200@f0000000 {
-               gpt0: timer@600 {       // GPT 0 in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt1: timer@610 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt2: timer@620 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt3: timer@630 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               timer@640 {
-                       status = "disabled";
-               };
-
-               timer@650 {
-                       status = "disabled";
-               };
-
-               timer@660 {
-                       status = "disabled";
-               };
-
-               timer@670 {
-                       status = "disabled";
-               };
-
                rtc@800 {
                        status = "disabled";
                };
index 24f668039295b1b95ff279ff91974a7ad65582ff..cf073e693f24dde3274579d0a8799ac769da73d9 100644 (file)
 
 /include/ "mpc5200b.dtsi"
 
+&gpt0 {
+       gpio-controller;
+       fsl,has-wdt;
+       fsl,wdt-on-boot = <0>;
+};
+&gpt1 { gpio-controller; };
+
 / {
        model = "ifm,o2d";
        compatible = "ifm,o2d";
 
        soc5200@f0000000 {
 
-               gpio_simple: gpio@b00 {
-               };
-
-               timer@600 {     // General Purpose Timer
-                       #gpio-cells = <2>;
-                       gpio-controller;
-                       fsl,has-wdt;
-                       fsl,wdt-on-boot = <0>;
-               };
-
-               timer@610 {
-                       #gpio-cells = <2>;
-                       gpio-controller;
-               };
-
-               timer7: timer@670 {
-               };
-
                rtc@800 {
                        status = "disabled";
                };
                csi@3,0 {
                        compatible = "ifm,o2d-csi";
                        reg = <3 0 0x00100000>;
-                       ifm,csi-clk-handle = <&timer7>;
+                       ifm,csi-clk-handle = <&gpt7>;
                        gpios = <&gpio_simple 23 0      /* imag_capture */
                                 &gpio_simple 26 0      /* imag_reset */
                                 &gpio_simple 29 0>;    /* imag_master_en */
index 96512c05803336d937cabcf5b06aa86e43bc538b..192e66af00019bd84746edce06b1ec5e22c870dd 100644 (file)
 
 /include/ "mpc5200b.dtsi"
 
+&gpt0 { fsl,has-wdt; };
+&gpt2 { gpio-controller; };
+&gpt3 { gpio-controller; };
+&gpt4 { gpio-controller; };
+&gpt5 { gpio-controller; };
+&gpt6 { gpio-controller; };
+&gpt7 { gpio-controller; };
+
 / {
        model = "phytec,pcm030";
        compatible = "phytec,pcm030";
 
        soc5200@f0000000 {
-               timer@600 {             // General Purpose Timer
-                       fsl,has-wdt;
-               };
-
-               gpt2: timer@620 {       // General Purpose Timer in GPIO mode
-                       compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt3: timer@630 {       // General Purpose Timer in GPIO mode
-                       compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt4: timer@640 {       // General Purpose Timer in GPIO mode
-                       compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt5: timer@650 {       // General Purpose Timer in GPIO mode
-                       compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt6: timer@660 {       // General Purpose Timer in GPIO mode
-                       compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt7: timer@670 {       // General Purpose Timer in GPIO mode
-                       compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
                audioplatform: psc@2000 { /* PSC1 in ac97 mode */
                        compatible = "mpc5200b-psc-ac97","fsl,mpc5200b-psc-ac97";
                        cell-index = <0>;
index 1dd478bfff9636cabade5cecc00b8178442f3f61..96b139bf50e9cf68ea2596a5627defb560ad707a 100644 (file)
 
 /include/ "mpc5200b.dtsi"
 
+&gpt0 { fsl,has-wdt; };
+&gpt2 { gpio-controller; };
+&gpt3 { gpio-controller; };
+&gpt4 { gpio-controller; };
+&gpt5 { gpio-controller; };
+&gpt6 { gpio-controller; };
+&gpt7 { gpio-controller; };
+
 / {
        model = "phytec,pcm032";
        compatible = "phytec,pcm032";
        };
 
        soc5200@f0000000 {
-               timer@600 {             // General Purpose Timer
-                       fsl,has-wdt;
-               };
-
-               gpt2: timer@620 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt3: timer@630 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt4: timer@640 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt5: timer@650 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt6: timer@660 {       // General Purpose Timer in GPIO mode
-                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
-                       reg = <0x660 0x10>;
-                       interrupts = <1 15 0>;
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt7: timer@670 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
                psc@2000 {      /* PSC1 is ac97 */
                        compatible = "fsl,mpc5200b-psc-ac97","fsl,mpc5200-psc-ac97";
                        cell-index = <0>;
index ba83d5488ec6b83167df39640a80055ea29ea421..5c462194ef06000a40a745586dbe5c249ad3afab 100644 (file)
 
 /include/ "mpc5200b.dtsi"
 
+&gpt0 { gpio-controller; };
+&gpt1 { gpio-controller; };
+&gpt2 { gpio-controller; };
+&gpt3 { gpio-controller; };
+&gpt4 { gpio-controller; };
+&gpt5 { gpio-controller; };
+&gpt6 { gpio-controller; };
+&gpt7 { gpio-controller; };
+
 / {
        model = "manroland,uc101";
        compatible = "manroland,uc101";
 
        soc5200@f0000000 {
-               gpt0: timer@600 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt1: timer@610 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt2: timer@620 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt3: timer@630 {       // General Purpose Timer in GPIO mode
-                       compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
-                       reg = <0x630 0x10>;
-                       interrupts = <1 12 0>;
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt4: timer@640 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt5: timer@650 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt6: timer@660 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
-               gpt7: timer@670 {       // General Purpose Timer in GPIO mode
-                       gpio-controller;
-                       #gpio-cells = <2>;
-               };
-
                rtc@800 {
                        status = "disabled";
                };