linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] [POWERPC] 4xx: Add support for AMCC 440EP Yosemite board
@ 2008-02-23 22:08 Josh Boyer
  2008-02-23 22:09 ` [PATCH 1/3][POWERPC] 4xx: Add AMCC 440EP Yosemite DTS Josh Boyer
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Josh Boyer @ 2008-02-23 22:08 UTC (permalink / raw)
  To: linuxppc-dev

This small series of patches adds support for the AMCC 440EP Yosemite
evaluation board.  This is the newer evaluation board for PowerPC 440EP
chips, replacing the older Bamboo board.

This is just the initial round of patches, but they are functional.
Also of note is that while all for on-board UARTs are enumerated in the
DTS file, only two of them are usable on the board.  The other two have
their "status" property set to disabled.  If used in conjunction with
the of_device_is_disabled patches I just sent out, then devices for
those won't be created.  This is not required.

josh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3][POWERPC] 4xx: Add AMCC 440EP Yosemite DTS
  2008-02-23 22:08 [PATCH 0/3] [POWERPC] 4xx: Add support for AMCC 440EP Yosemite board Josh Boyer
@ 2008-02-23 22:09 ` Josh Boyer
  2008-02-23 22:09 ` [PATCH 2/3][POWERPC] 4xx: Add platform support for the AMCC Yosemite board Josh Boyer
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Josh Boyer @ 2008-02-23 22:09 UTC (permalink / raw)
  To: linuxppc-dev

This adds a DTS file for the AMCC 440EP Yosemite board.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
---
 arch/powerpc/boot/dts/yosemite.dts |  306 +++++++++++++++++++++++++++++++++++++
 1 file changed, 306 insertions(+)

--- /dev/null
+++ linux-2.6/arch/powerpc/boot/dts/yosemite.dts
@@ -0,0 +1,306 @@
+/*
+ * Device Tree Source for AMCC Yosemite
+ *
+ * Copyright 2008 IBM Corp.
+ * Josh Boyer <jwboyer@linux.vnet.ibm.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without
+ * any warranty of any kind, whether express or implied.
+ */
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <1>;
+	model = "amcc,yosemite";
+	compatible = "amcc,yosemite","amcc,bamboo";
+	dcr-parent = <&/cpus/cpu@0>;
+
+	aliases {
+		ethernet0 = &EMAC0;
+		ethernet1 = &EMAC1;
+		serial0 = &UART0;
+		serial1 = &UART1;
+		serial2 = &UART2;
+		serial3 = &UART3;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			model = "PowerPC,440EP";
+			reg = <0>;
+			clock-frequency = <0>; /* Filled in by zImage */
+			timebase-frequency = <0>; /* Filled in by zImage */
+			i-cache-line-size = <20>;
+			d-cache-line-size = <20>;
+			i-cache-size = <8000>;
+			d-cache-size = <8000>;
+			dcr-controller;
+			dcr-access-method = "native";
+		};
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0 0 0>; /* Filled in by zImage */
+	};
+
+	UIC0: interrupt-controller0 {
+		compatible = "ibm,uic-440ep","ibm,uic";
+		interrupt-controller;
+		cell-index = <0>;
+		dcr-reg = <0c0 009>;
+		#address-cells = <0>;
+		#size-cells = <0>;
+		#interrupt-cells = <2>;
+	};
+
+	UIC1: interrupt-controller1 {
+		compatible = "ibm,uic-440ep","ibm,uic";
+		interrupt-controller;
+		cell-index = <1>;
+		dcr-reg = <0d0 009>;
+		#address-cells = <0>;
+		#size-cells = <0>;
+		#interrupt-cells = <2>;
+		interrupts = <1e 4 1f 4>; /* cascade */
+		interrupt-parent = <&UIC0>;
+	};
+
+	SDR0: sdr {
+		compatible = "ibm,sdr-440ep";
+		dcr-reg = <00e 002>;
+	};
+
+	CPR0: cpr {
+		compatible = "ibm,cpr-440ep";
+		dcr-reg = <00c 002>;
+	};
+
+	plb {
+		compatible = "ibm,plb-440ep", "ibm,plb-440gp", "ibm,plb4";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges;
+		clock-frequency = <0>; /* Filled in by zImage */
+
+		SDRAM0: sdram {
+			compatible = "ibm,sdram-440ep", "ibm,sdram-405gp";
+			dcr-reg = <010 2>;
+		};
+
+		DMA0: dma {
+			compatible = "ibm,dma-440ep", "ibm,dma-440gp";
+			dcr-reg = <100 027>;
+		};
+
+		MAL0: mcmal {
+			compatible = "ibm,mcmal-440ep", "ibm,mcmal-440gp", "ibm,mcmal";
+			dcr-reg = <180 62>;
+			num-tx-chans = <4>;
+			num-rx-chans = <2>;
+			interrupt-parent = <&MAL0>;
+			interrupts = <0 1 2 3 4>;
+			#interrupt-cells = <1>;
+			#address-cells = <0>;
+			#size-cells = <0>;
+			interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
+					/*RXEOB*/ 1 &UIC0 b 4
+					/*SERR*/  2 &UIC1 0 4
+					/*TXDE*/  3 &UIC1 1 4
+					/*RXDE*/  4 &UIC1 2 4>;
+		};
+
+		POB0: opb {
+		  	compatible = "ibm,opb-440ep", "ibm,opb-440gp", "ibm,opb";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			/* Bamboo is oddball in the 44x world and doesn't use the ERPN
+			 * bits.
+			 */
+		  	ranges = <00000000 0 00000000 80000000
+			          80000000 0 80000000 80000000>;
+		  	interrupt-parent = <&UIC1>;
+		  	interrupts = <7 4>;
+		  	clock-frequency = <0>; /* Filled in by zImage */
+
+			EBC0: ebc {
+				compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc";
+				dcr-reg = <012 2>;
+				#address-cells = <2>;
+				#size-cells = <1>;
+				clock-frequency = <0>; /* Filled in by zImage */
+				interrupts = <5 1>;
+				interrupt-parent = <&UIC1>;
+			};
+
+			UART0: serial@ef600300 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600300 8>;
+		   		virtual-reg = <ef600300>;
+		   		clock-frequency = <0>; /* Filled in by zImage */
+		   		current-speed = <1c200>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <0 4>;
+	   		};
+
+			UART1: serial@ef600400 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600400 8>;
+		   		virtual-reg = <ef600400>;
+		   		clock-frequency = <0>;
+		   		current-speed = <0>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <1 4>;
+	   		};
+
+			UART2: serial@ef600500 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600500 8>;
+		   		virtual-reg = <ef600500>;
+		   		clock-frequency = <0>;
+		   		current-speed = <0>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <3 4>;
+				status = "disabled";
+	   		};
+
+			UART3: serial@ef600600 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600600 8>;
+		   		virtual-reg = <ef600600>;
+		   		clock-frequency = <0>;
+		   		current-speed = <0>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <4 4>;
+				status = "disabled";
+	   		};
+
+			IIC0: i2c@ef600700 {
+				compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
+				reg = <ef600700 14>;
+				interrupt-parent = <&UIC0>;
+				interrupts = <2 4>;
+			};
+
+			IIC1: i2c@ef600800 {
+				compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
+				reg = <ef600800 14>;
+				interrupt-parent = <&UIC0>;
+				interrupts = <7 4>;
+			};
+
+			spi@ef600900 {
+				compatible = "amcc,spi-440ep";
+				reg = <ef600900 6>;
+				interrupts = <8 4>;
+				interrupt-parent = <&UIC0>;
+			};
+
+			ZMII0: emac-zmii@ef600d00 {
+				compatible = "ibm,zmii-440ep", "ibm,zmii-440gp", "ibm,zmii";
+				reg = <ef600d00 c>;
+			};
+
+			EMAC0: ethernet@ef600e00 {
+				linux,network-index = <0>;
+				device_type = "network";
+				compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac";
+				interrupt-parent = <&UIC1>;
+				interrupts = <1c 4 1d 4>;
+				reg = <ef600e00 70>;
+				local-mac-address = [000000000000];
+				mal-device = <&MAL0>;
+				mal-tx-channel = <0 1>;
+				mal-rx-channel = <0>;
+				cell-index = <0>;
+				max-frame-size = <5dc>;
+				rx-fifo-size = <1000>;
+				tx-fifo-size = <800>;
+				phy-mode = "rmii";
+				phy-map = <00000000>;
+				zmii-device = <&ZMII0>;
+				zmii-channel = <0>;
+			};
+
+			EMAC1: ethernet@ef600f00 {
+				linux,network-index = <1>;
+				device_type = "network";
+				compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac";
+				interrupt-parent = <&UIC1>;
+				interrupts = <1e 4 1f 4>;
+				reg = <ef600f00 70>;
+				local-mac-address = [000000000000];
+				mal-device = <&MAL0>;
+				mal-tx-channel = <2 3>;
+				mal-rx-channel = <1>;
+				cell-index = <1>;
+				max-frame-size = <5dc>;
+				rx-fifo-size = <1000>;
+				tx-fifo-size = <800>;
+				phy-mode = "rmii";
+				phy-map = <00000000>;
+				zmii-device = <&ZMII0>;
+				zmii-channel = <1>;
+			};
+
+			usb@ef601000 {
+				compatible = "ohci-be";
+				reg = <ef601000 80>;
+				interrupts = <8 4 9 4>;
+				interrupt-parent = < &UIC1 >;
+			};
+		};
+
+		PCI0: pci@ec000000 {
+			device_type = "pci";
+			#interrupt-cells = <1>;
+			#size-cells = <2>;
+			#address-cells = <3>;
+			compatible = "ibm,plb440ep-pci", "ibm,plb-pci";
+			primary;
+			reg = <0 eec00000 8	/* Config space access */
+			       0 eed00000 4	/* IACK */
+			       0 eed00000 4	/* Special cycle */
+			       0 ef400000 40>;	/* Internal registers */
+
+			/* Outbound ranges, one memory and one IO,
+			 * later cannot be changed. Chip supports a second
+			 * IO range but we don't use it for now
+			 */
+			ranges = <02000000 0 a0000000 0 a0000000 0 20000000
+				  01000000 0 00000000 0 e8000000 0 00010000>;
+
+			/* Inbound 2GB range starting at 0 */
+			dma-ranges = <42000000 0 0 0 0 0 80000000>;
+
+			/* Bamboo has all 4 IRQ pins tied together per slot */
+			interrupt-map-mask = <f800 0 0 0>;
+			interrupt-map = <
+				/* IDSEL 1 */
+				0800 0 0 0 &UIC0 1c 8
+
+				/* IDSEL 2 */
+				1000 0 0 0 &UIC0 1b 8
+
+				/* IDSEL 3 */
+				1800 0 0 0 &UIC0 1a 8
+
+				/* IDSEL 4 */
+				2000 0 0 0 &UIC0 19 8
+			>;
+		};
+	};
+
+	chosen {
+		linux,stdout-path = "/plb/opb/serial@ef600300";
+	};
+};

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/3][POWERPC] 4xx: Add platform support for the AMCC Yosemite board
  2008-02-23 22:08 [PATCH 0/3] [POWERPC] 4xx: Add support for AMCC 440EP Yosemite board Josh Boyer
  2008-02-23 22:09 ` [PATCH 1/3][POWERPC] 4xx: Add AMCC 440EP Yosemite DTS Josh Boyer
@ 2008-02-23 22:09 ` Josh Boyer
  2008-02-23 22:10 ` [PATCH 3/3][POWERPC] 4xx: Add bootwrapper for " Josh Boyer
  2008-02-23 22:19 ` [PATCH 0/3] [POWERPC] 4xx: Add support for AMCC 440EP " Josh Boyer
  3 siblings, 0 replies; 5+ messages in thread
From: Josh Boyer @ 2008-02-23 22:09 UTC (permalink / raw)
  Cc: linuxppc-dev

The AMCC 440EP Yosemite board is very similar to the original AMCC Bamboo
board.  This adds a YOSEMITE option to Kconfig, and reuses the existing
bamboo board support in the kernel.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

---
 arch/powerpc/platforms/44x/Kconfig  |    9 +++++++++
 arch/powerpc/platforms/44x/Makefile |    1 +
 2 files changed, 10 insertions(+)

--- linux-2.6.orig/arch/powerpc/platforms/44x/Kconfig
+++ linux-2.6/arch/powerpc/platforms/44x/Kconfig
@@ -67,6 +67,15 @@ config WARP
 	  See http://www.pikatechnologies.com/ and follow the "PIKA for Computer
 	  Telephony Developers" link for more information.
 
+config YOSEMITE
+	bool "Yosemite"
+	depends on 44x
+	default n
+	select 440EP
+	select PCI
+	help
+	  This option enables support for the AMCC PPC440EP evaluation board.
+
 #config LUAN
 #	bool "Luan"
 #	depends on 44x
--- linux-2.6.orig/arch/powerpc/platforms/44x/Makefile
+++ linux-2.6/arch/powerpc/platforms/44x/Makefile
@@ -2,6 +2,7 @@ obj-$(CONFIG_44x)	:= misc_44x.o
 obj-$(CONFIG_EBONY)	+= ebony.o
 obj-$(CONFIG_TAISHAN)	+= taishan.o
 obj-$(CONFIG_BAMBOO)	+= bamboo.o
+obj-$(CONFIG_YOSEMITE)	+= bamboo.o
 obj-$(CONFIG_SEQUOIA)	+= sequoia.o
 obj-$(CONFIG_KATMAI)	+= katmai.o
 obj-$(CONFIG_RAINIER)	+= rainier.o

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/3][POWERPC] 4xx: Add bootwrapper for AMCC Yosemite board
  2008-02-23 22:08 [PATCH 0/3] [POWERPC] 4xx: Add support for AMCC 440EP Yosemite board Josh Boyer
  2008-02-23 22:09 ` [PATCH 1/3][POWERPC] 4xx: Add AMCC 440EP Yosemite DTS Josh Boyer
  2008-02-23 22:09 ` [PATCH 2/3][POWERPC] 4xx: Add platform support for the AMCC Yosemite board Josh Boyer
@ 2008-02-23 22:10 ` Josh Boyer
  2008-02-23 22:19 ` [PATCH 0/3] [POWERPC] 4xx: Add support for AMCC 440EP " Josh Boyer
  3 siblings, 0 replies; 5+ messages in thread
From: Josh Boyer @ 2008-02-23 22:10 UTC (permalink / raw)
  To: linuxppc-dev

Add the cuboot wrapper for the AMCC 440EP Yosemite board

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

---
 arch/powerpc/boot/Makefile          |    3 +-
 arch/powerpc/boot/cuboot-yosemite.c |   42 ++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 1 deletion(-)

--- linux-2.6.orig/arch/powerpc/boot/Makefile
+++ linux-2.6/arch/powerpc/boot/Makefile
@@ -64,7 +64,7 @@ src-plat := of.c cuboot-52xx.c cuboot-82
 		cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \
 		fixed-head.S ep88xc.c ep405.c \
 		cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \
-		cuboot-warp.c cuboot-85xx-cpm2.c
+		cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c
 src-boot := $(src-wlib) $(src-plat) empty.c
 
 src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -216,6 +216,7 @@ image-$(CONFIG_RAINIER)			+= cuImage.rai
 image-$(CONFIG_TAISHAN)			+= cuImage.taishan
 image-$(CONFIG_KATMAI)			+= cuImage.katmai
 image-$(CONFIG_WARP)			+= cuImage.warp
+image-$(CONFIG_YOSEMITE)		+= cuImage.yosemite
 
 # Board ports in arch/powerpc/platform/8xx/Kconfig
 image-$(CONFIG_PPC_MPC86XADS)		+= cuImage.mpc866ads
--- /dev/null
+++ linux-2.6/arch/powerpc/boot/cuboot-yosemite.c
@@ -0,0 +1,42 @@
+/*
+ * Old U-boot compatibility for Yosemite
+ *
+ * Author: Josh Boyer <jwboyer@linux.vnet.ibm.com>
+ *
+ * Copyright 2008 IBM Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include "ops.h"
+#include "stdio.h"
+#include "4xx.h"
+#include "44x.h"
+#include "cuboot.h"
+
+#define TARGET_44x
+#include "ppcboot.h"
+
+static bd_t bd;
+
+static void yosemite_fixups(void)
+{
+	unsigned long sysclk = 66666666;
+
+	ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
+	ibm4xx_sdram_fixup_memsize();
+	ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
+	dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr);
+}
+
+void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+		unsigned long r6, unsigned long r7)
+{
+	CUBOOT_INIT();
+	platform_ops.fixups = yosemite_fixups;
+	platform_ops.exit = ibm44x_dbcr_reset;
+	fdt_init(_dtb_start);
+	serial_console_init();
+}

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] [POWERPC] 4xx: Add support for AMCC 440EP Yosemite board
  2008-02-23 22:08 [PATCH 0/3] [POWERPC] 4xx: Add support for AMCC 440EP Yosemite board Josh Boyer
                   ` (2 preceding siblings ...)
  2008-02-23 22:10 ` [PATCH 3/3][POWERPC] 4xx: Add bootwrapper for " Josh Boyer
@ 2008-02-23 22:19 ` Josh Boyer
  3 siblings, 0 replies; 5+ messages in thread
From: Josh Boyer @ 2008-02-23 22:19 UTC (permalink / raw)
  To: linuxppc-dev

On Sat, 23 Feb 2008 16:08:13 -0600
Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:

> This small series of patches adds support for the AMCC 440EP Yosemite
> evaluation board.  This is the newer evaluation board for PowerPC 440EP
> chips, replacing the older Bamboo board.
> 
> This is just the initial round of patches, but they are functional.
> Also of note is that while all for on-board UARTs are enumerated in the
> DTS file, only two of them are usable on the board.  The other two have
> their "status" property set to disabled.  If used in conjunction with
> the of_device_is_disabled patches I just sent out, then devices for
> those won't be created.  This is not required.

Olof asked on IRC why even bother enumerating the extra UARTs.  I have
two reasons for this.

1) I want a user of the of_device_is_disabled patches, if only to show
it works and provide an example (it does work btw).

2) When I get to doing the EBC stuff for bamboo and yosemite, there are
devices that can come and go depending on dip switch settings (due to
pin sharing).  My nefarious plan is to enumerate all of the devices in
the device tree, and poke a status = "disabled" property into the ones
that are no longer usable because of the dip switch settings.  E.g.
EMAC1 becomes disabled if the NAND flash is enabled on Bamboo, etc.

josh

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-23 22:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-23 22:08 [PATCH 0/3] [POWERPC] 4xx: Add support for AMCC 440EP Yosemite board Josh Boyer
2008-02-23 22:09 ` [PATCH 1/3][POWERPC] 4xx: Add AMCC 440EP Yosemite DTS Josh Boyer
2008-02-23 22:09 ` [PATCH 2/3][POWERPC] 4xx: Add platform support for the AMCC Yosemite board Josh Boyer
2008-02-23 22:10 ` [PATCH 3/3][POWERPC] 4xx: Add bootwrapper for " Josh Boyer
2008-02-23 22:19 ` [PATCH 0/3] [POWERPC] 4xx: Add support for AMCC 440EP " Josh Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).