Re: [PATCH] Added support for PRTLVT based boards (MPC5121)
On Friday 20 June 2008 16:36:20 you wrote: I have a set of patches that I will be submitting later today that adds the generic board support without removing ADS. So I would prefer for you to just submit a device tree file for your board. Ok, thanks. I'll check your patches, fix our DT and resubmit that one. Greetings, -- David Jander Protonic Holland. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Added support for PRTLVT based boards (MPC5121)
Hi John, On Wednesday 18 June 2008 17:33:48 John Rigby wrote: Hi David, Looks like your device tree is based on the beta ltib bsp. There were some changes in release 1 that you may want to incorporate: First as a convention I changed all the interrupt numbers in the tuples to be decimal. I like this better because the interrupts are decimal in the reference manual. Second, the new clock driver that is in the release 1 bsp and will be posting here shortly no longer uses the device tree, so you can remove all the clk-name, clk-parent, clk-ctrl properties. Thanks, I'll incorporate these changes and submit again. Btw, do you agree with the following part of the patch? diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig index 4c0da0c..57b3912 100644 --- a/arch/powerpc/platforms/512x/Kconfig +++ b/arch/powerpc/platforms/512x/Kconfig @@ -2,18 +2,20 @@ config PPC_MPC512x bool select FSL_SOC select IPIC - default n config PPC_MPC5121 bool select PPC_MPC512x - default n -config MPC5121_ADS - bool Freescale MPC5121E ADS +config MPC5121_GENERIC + bool Generic support for simple MPC5121 based boards depends on PPC_MULTIPLATFORM PPC32 select DEFAULT_UIMAGE select PPC_MPC5121 help - This option enables support for the MPC5121E ADS board. - default n + This option enables support for a simple MPC5121 based boards which + do not need a custom platform specific setup. + + Boards that are compatible with this generic platform support + are: Freescale MPC5121 ADS and Protonic LVT based boards (ZANMCU + and VICVT2). diff --git a/arch/powerpc/platforms/512x/Makefile b/arch/powerpc/platforms/512x/Makefile index 232c89f..9d40a2e 100644 --- a/arch/powerpc/platforms/512x/Makefile +++ b/arch/powerpc/platforms/512x/Makefile @@ -1,4 +1,4 @@ # # Makefile for the Freescale PowerPC 512x linux kernel. # -obj-$(CONFIG_MPC5121_ADS) += mpc5121_ads.o +obj-$(CONFIG_MPC5121_GENERIC) += mpc5121_generic.o diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_generic.c similarity index 73% rename from arch/powerpc/platforms/512x/mpc5121_ads.c rename to arch/powerpc/platforms/512x/mpc5121_generic.c index 50bd3a3..824ddbb 100644 --- a/arch/powerpc/platforms/512x/mpc5121_ads.c +++ b/arch/powerpc/platforms/512x/mpc5121_generic.c [...] The idea is to make it as simple as possible to add new platforms that are basically just derivatives of the same. Greetings, -- David Jander Protonic Holland. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Added support for PRTLVT based boards (MPC5121)
I have a set of patches that I will be submitting later today that adds the generic board support without removing ADS. So I would prefer for you to just submit a device tree file for your board. On Fri, Jun 20, 2008 at 3:01 AM, David Jander [EMAIL PROTECTED] wrote: Hi John, On Wednesday 18 June 2008 17:33:48 John Rigby wrote: Hi David, Looks like your device tree is based on the beta ltib bsp. There were some changes in release 1 that you may want to incorporate: First as a convention I changed all the interrupt numbers in the tuples to be decimal. I like this better because the interrupts are decimal in the reference manual. Second, the new clock driver that is in the release 1 bsp and will be posting here shortly no longer uses the device tree, so you can remove all the clk-name, clk-parent, clk-ctrl properties. Thanks, I'll incorporate these changes and submit again. Btw, do you agree with the following part of the patch? diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig index 4c0da0c..57b3912 100644 --- a/arch/powerpc/platforms/512x/Kconfig +++ b/arch/powerpc/platforms/512x/Kconfig @@ -2,18 +2,20 @@ config PPC_MPC512x bool select FSL_SOC select IPIC - default n config PPC_MPC5121 bool select PPC_MPC512x - default n -config MPC5121_ADS - bool Freescale MPC5121E ADS +config MPC5121_GENERIC + bool Generic support for simple MPC5121 based boards depends on PPC_MULTIPLATFORM PPC32 select DEFAULT_UIMAGE select PPC_MPC5121 help - This option enables support for the MPC5121E ADS board. - default n + This option enables support for a simple MPC5121 based boards which + do not need a custom platform specific setup. + + Boards that are compatible with this generic platform support + are: Freescale MPC5121 ADS and Protonic LVT based boards (ZANMCU + and VICVT2). diff --git a/arch/powerpc/platforms/512x/Makefile b/arch/powerpc/platforms/512x/Makefile index 232c89f..9d40a2e 100644 --- a/arch/powerpc/platforms/512x/Makefile +++ b/arch/powerpc/platforms/512x/Makefile @@ -1,4 +1,4 @@ # # Makefile for the Freescale PowerPC 512x linux kernel. # -obj-$(CONFIG_MPC5121_ADS) += mpc5121_ads.o +obj-$(CONFIG_MPC5121_GENERIC) += mpc5121_generic.o diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_generic.c similarity index 73% rename from arch/powerpc/platforms/512x/mpc5121_ads.c rename to arch/powerpc/platforms/512x/mpc5121_generic.c index 50bd3a3..824ddbb 100644 --- a/arch/powerpc/platforms/512x/mpc5121_ads.c +++ b/arch/powerpc/platforms/512x/mpc5121_generic.c [...] The idea is to make it as simple as possible to add new platforms that are basically just derivatives of the same. Greetings, -- David Jander Protonic Holland. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Added support for PRTLVT based boards (MPC5121)
Hi David, Looks like your device tree is based on the beta ltib bsp. There were some changes in release 1 that you may want to incorporate: First as a convention I changed all the interrupt numbers in the tuples to be decimal. I like this better because the interrupts are decimal in the reference manual. Second, the new clock driver that is in the release 1 bsp and will be posting here shortly no longer uses the device tree, so you can remove all the clk-name, clk-parent, clk-ctrl properties. John On Fri, Jun 13, 2008 at 2:49 AM, David Jander [EMAIL PROTECTED] wrote: Made MPC5121_ADS board support generic: Renamed arch/powerpc/platforms/512x/mpc5121_ads.c and added list of supported boards. For both MPC5121 ADS or PRTLVT support, just select MPC5121_GENERIC and use the corresponding device-tree. Signed-off-by: David Jander [EMAIL PROTECTED] --- arch/powerpc/boot/dts/prtlvt.dts | 255 arch/powerpc/platforms/512x/Kconfig| 14 +- arch/powerpc/platforms/512x/Makefile |2 +- .../512x/{mpc5121_ads.c = mpc5121_generic.c} | 38 ++- 4 files changed, 290 insertions(+), 19 deletions(-) create mode 100644 arch/powerpc/boot/dts/prtlvt.dts rename arch/powerpc/platforms/512x/{mpc5121_ads.c = mpc5121_generic.c} (73%) diff --git a/arch/powerpc/boot/dts/prtlvt.dts b/arch/powerpc/boot/dts/prtlvt.dts new file mode 100644 index 000..aeb663b --- /dev/null +++ b/arch/powerpc/boot/dts/prtlvt.dts @@ -0,0 +1,255 @@ +/* + * Device tree source for PRTLVT based boards, based on: + * MPC5121E MDS Device Tree Source + * + * Copyright 2007 Freescale Semiconductor Inc. + * Copyright 2008 Protonic Holland + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + + /* compile with: ./dtc -p 10240 -R 20 -I dts -o prtlvt.dtb -O dtb -b 0 dts/prtlvt.dts */ + +/dts-v1/; + +/ { + model = prtlvt; + compatible = prt,prtlvt; + #address-cells = 1; + #size-cells = 1; + + cpus { + #address-cells = 1; + #size-cells = 0; + + PowerPC,[EMAIL PROTECTED] { + device_type = cpu; + reg = 0; + d-cache-line-size = 0x20; // 32 bytes + i-cache-line-size = 0x20; // 32 bytes + d-cache-size = 0x8000;// L1, 32K + i-cache-size = 0x8000;// L1, 32K + timebase-frequency = 5000;// 50 MHz (csb/4) + bus-frequency = 2;// 200 MHz csb bus + clock-frequency = 4; // 400 MHz ppc core + }; + }; + + memory { + device_type = memory; + reg = 0x 0x1000; // 256MB at 0 + }; + + [EMAIL PROTECTED] { + compatible = prt,prtlvt-localbus, simple-bus; + #address-cells = 2; + #size-cells = 1; + reg = 0x8020 0x40; + ranges = 0x0 0x0 0xfe00 0x0200; + [EMAIL PROTECTED],0 { + compatible = amd,s29gl256n, cfi-flash; + #address-cells = 1; + #size-cells = 1; + reg = 0 0x0 0x0200; + bank-width = 2; + }; + }; + + [EMAIL PROTECTED] { + compatible = fsl,mpc5121-immr, simple-bus; + #address-cells = 1; + #size-cells = 1; + #interrupt-cells = 2; + ranges = 0x0 0x8000 0x40; + reg = 0x8000 0x40; + bus-frequency = 6600; // 66 MHz ips bus + + + // IPIC + // interrupts cell = intr #, sense + // sense values match linux IORESOURCE_IRQ_* defines: + // sense == 8: Level, low assertion + // sense == 2: Edge, high-to-low change + // + ipic: [EMAIL PROTECTED] { + compatible = fsl,mpc5121-ipic, fsl,ipic; + interrupt-controller; + #address-cells = 0; + #interrupt-cells = 2; + reg = 0xc00 0x100; + }; + + // 512x PSCs are not 52xx PSCs compatible + // PSC0 serial port aka ttyPSC0 + [EMAIL PROTECTED] { + device_type = serial; + compatible = fsl,mpc5121-psc-uart; + port-number = 0; + cell-index = 0; +
[PATCH] Added support for PRTLVT based boards (MPC5121)
Made MPC5121_ADS board support generic: Renamed arch/powerpc/platforms/512x/mpc5121_ads.c and added list of supported boards. For both MPC5121 ADS or PRTLVT support, just select MPC5121_GENERIC and use the corresponding device-tree. Signed-off-by: David Jander [EMAIL PROTECTED] --- arch/powerpc/boot/dts/prtlvt.dts | 255 arch/powerpc/platforms/512x/Kconfig| 14 +- arch/powerpc/platforms/512x/Makefile |2 +- .../512x/{mpc5121_ads.c = mpc5121_generic.c} | 38 ++- 4 files changed, 290 insertions(+), 19 deletions(-) create mode 100644 arch/powerpc/boot/dts/prtlvt.dts rename arch/powerpc/platforms/512x/{mpc5121_ads.c = mpc5121_generic.c} (73%) diff --git a/arch/powerpc/boot/dts/prtlvt.dts b/arch/powerpc/boot/dts/prtlvt.dts new file mode 100644 index 000..aeb663b --- /dev/null +++ b/arch/powerpc/boot/dts/prtlvt.dts @@ -0,0 +1,255 @@ +/* + * Device tree source for PRTLVT based boards, based on: + * MPC5121E MDS Device Tree Source + * + * Copyright 2007 Freescale Semiconductor Inc. + * Copyright 2008 Protonic Holland + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + + /* compile with: ./dtc -p 10240 -R 20 -I dts -o prtlvt.dtb -O dtb -b 0 dts/prtlvt.dts */ + +/dts-v1/; + +/ { + model = prtlvt; + compatible = prt,prtlvt; + #address-cells = 1; + #size-cells = 1; + + cpus { + #address-cells = 1; + #size-cells = 0; + + PowerPC,[EMAIL PROTECTED] { + device_type = cpu; + reg = 0; + d-cache-line-size = 0x20; // 32 bytes + i-cache-line-size = 0x20; // 32 bytes + d-cache-size = 0x8000;// L1, 32K + i-cache-size = 0x8000;// L1, 32K + timebase-frequency = 5000;// 50 MHz (csb/4) + bus-frequency = 2;// 200 MHz csb bus + clock-frequency = 4; // 400 MHz ppc core + }; + }; + + memory { + device_type = memory; + reg = 0x 0x1000; // 256MB at 0 + }; + + [EMAIL PROTECTED] { + compatible = prt,prtlvt-localbus, simple-bus; + #address-cells = 2; + #size-cells = 1; + reg = 0x8020 0x40; + ranges = 0x0 0x0 0xfe00 0x0200; + [EMAIL PROTECTED],0 { + compatible = amd,s29gl256n, cfi-flash; + #address-cells = 1; + #size-cells = 1; + reg = 0 0x0 0x0200; + bank-width = 2; + }; + }; + + [EMAIL PROTECTED] { + compatible = fsl,mpc5121-immr, simple-bus; + #address-cells = 1; + #size-cells = 1; + #interrupt-cells = 2; + ranges = 0x0 0x8000 0x40; + reg = 0x8000 0x40; + bus-frequency = 6600; // 66 MHz ips bus + + + // IPIC + // interrupts cell = intr #, sense + // sense values match linux IORESOURCE_IRQ_* defines: + // sense == 8: Level, low assertion + // sense == 2: Edge, high-to-low change + // + ipic: [EMAIL PROTECTED] { + compatible = fsl,mpc5121-ipic, fsl,ipic; + interrupt-controller; + #address-cells = 0; + #interrupt-cells = 2; + reg = 0xc00 0x100; + }; + + // 512x PSCs are not 52xx PSCs compatible + // PSC0 serial port aka ttyPSC0 + [EMAIL PROTECTED] { + device_type = serial; + compatible = fsl,mpc5121-psc-uart; + port-number = 0; + cell-index = 0; + reg = 0x11000 0x100; + interrupts = 0x28 0x8; // actually the fifo irq + interrupt-parent = ipic ; + }; + + // PSC1 serial port aka ttyPSC1 + [EMAIL PROTECTED] { + device_type = serial; + compatible = fsl,mpc5121-psc-uart; + port-number = 1; + cell-index = 1; + reg = 0x11100 0x100; + interrupts = 0x28 0x8; // actually the fifo irq + interrupt-parent = ipic ; + }; + + // PSC2 serial port aka ttyPSC2 +