Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9fa126da authored by Niklaus Giger's avatar Niklaus Giger Committed by Josh Boyer
Browse files

powerpc/40x: Add support for Netstal HCU4 board



Adds support for a HCU4 PPC405GPr based board from Netstal Maschinen AG.

Signed-off-by: default avatarNiklaus Giger <niklaus.giger@member.fsf.org>
Signed-off-by: default avatarJosh Boyer <jwboyer@linux.vnet.ibm.com>
parent 4cbfc467
Loading
Loading
Loading
Loading
+168 −0
Original line number Diff line number Diff line
/*
* Device Tree Source for Netstal Maschinen HCU4
* based on the IBM Walnut
*
* Copyright 2008
* Niklaus Giger <niklaus.giger@member.fsf.org>
*
* Copyright 2007 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.
*/

/dts-v1/;

/ {
	#address-cells = <0x1>;
	#size-cells = <0x1>;
	model = "netstal,hcu4";
	compatible = "netstal,hcu4";
	dcr-parent = <0x1>;

	aliases {
		ethernet0 = "/plb/opb/ethernet@ef600800";
		serial0 = "/plb/opb/serial@ef600300";
	};

	cpus {
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		cpu@0 {
			device_type = "cpu";
			model = "PowerPC,405GPr";
			reg = <0x0>;
			clock-frequency = <0>;		/* Filled in by U-Boot */
			timebase-frequency = <0x0>;	/* Filled in by U-Boot */
			i-cache-line-size = <0x20>;
			d-cache-line-size = <0x20>;
			i-cache-size = <0x4000>;
			d-cache-size = <0x4000>;
			dcr-controller;
			dcr-access-method = "native";
			linux,phandle = <0x1>;
		};
	};

	memory {
		device_type = "memory";
		reg = <0x0 0x0>;	/* Filled in by U-Boot */
	};

	UIC0: interrupt-controller {
		compatible = "ibm,uic";
		interrupt-controller;
		cell-index = <0x0>;
		dcr-reg = <0xc0 0x9>;
		#address-cells = <0x0>;
		#size-cells = <0x0>;
		#interrupt-cells = <0x2>;
		linux,phandle = <0x2>;
	};

	plb {
		compatible = "ibm,plb3";
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		ranges;
		clock-frequency = <0x0>;	/* Filled in by U-Boot */

		SDRAM0: memory-controller {
			compatible = "ibm,sdram-405gp";
			dcr-reg = <0x10 0x2>;
		};

		MAL: mcmal {
			compatible = "ibm,mcmal-405gp", "ibm,mcmal";
			dcr-reg = <0x180 0x62>;
			num-tx-chans = <0x1>;
			num-rx-chans = <0x1>;
			interrupt-parent = <0x2>;
			interrupts = <0xb 0x4 0xc 0x4 0xa 0x4 0xd 0x4 0xe 0x4>;
			linux,phandle = <0x3>;
		};

		POB0: opb {
			compatible = "ibm,opb-405gp", "ibm,opb";
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			ranges = <0xef600000 0xef600000 0xa00000>;
			dcr-reg = <0xa0 0x5>;
			clock-frequency = <0x0>;	/* Filled in by U-Boot */

			UART0: serial@ef600300 {
				device_type = "serial";
				compatible = "ns16550";
				reg = <0xef600300 0x8>;
				virtual-reg = <0xef600300>;
				clock-frequency = <0x0>;/* Filled in by U-Boot */
				current-speed = <0>;	/* Filled in by U-Boot */
				interrupt-parent = <0x2>;
				interrupts = <0x0 0x4>;
			};

			IIC: i2c@ef600500 {
				compatible = "ibm,iic-405gp", "ibm,iic";
				reg = <0xef600500 0x11>;
				interrupt-parent = <0x2>;
				interrupts = <0x2 0x4>;
			};

			GPIO: gpio@ef600700 {
				compatible = "ibm,gpio-405gp";
				reg = <0xef600700 0x20>;
			};

			EMAC: ethernet@ef600800 {
				device_type = "network";
				compatible = "ibm,emac-405gp", "ibm,emac";
				interrupt-parent = <0x2>;
				interrupts = <0xf 0x4 0x9 0x4>;
				local-mac-address = [00 00 00 00 00 00];
				reg = <0xef600800 0x70>;
				mal-device = <0x3>;
				mal-tx-channel = <0x0>;
				mal-rx-channel = <0x0>;
				cell-index = <0x0>;
				max-frame-size = <0x5dc>;
				rx-fifo-size = <0x1000>;
				tx-fifo-size = <0x800>;
				phy-mode = "rmii";
				phy-map = <0x1>;
			};
		};

		EBC0: ebc {
			compatible = "ibm,ebc-405gp", "ibm,ebc";
			dcr-reg = <0x12 0x2>;
			#address-cells = <0x2>;
			#size-cells = <0x1>;
			clock-frequency = <0x0>;	/* Filled in by U-Boot */

			sram@0,0 {
				reg = <0x0 0x0 0x80000>;
			};

			flash@0,80000 {
				compatible = "jedec-flash";
				bank-width = <0x1>;
				reg = <0x0 0x80000 0x80000>;
				#address-cells = <0x1>;
				#size-cells = <0x1>;

				partition@0 {
					label = "OpenBIOS";
					reg = <0x0 0x80000>;
					read-only;
				};
			};
		};
	};

	chosen {
		linux,stdout-path = "/plb/opb/serial@ef600300";
	};
};
+929 −0

File added.

Preview size limit exceeded, changes collapsed.

+8 −0
Original line number Diff line number Diff line
@@ -32,6 +32,14 @@ config EP405
	help
	  This option enables support for the EP405/EP405PC boards.

config HCU4
	bool "Hcu4"
	depends on 40x
	default y
	select 405GPR
	help
	  This option enables support for the Nestal Maschinen HCU4 board.

config KILAUEA
	bool "Kilauea"
	depends on 40x
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_KILAUEA)				+= kilauea.o
obj-$(CONFIG_HCU4)				+= hcu4.o
obj-$(CONFIG_MAKALU)				+= makalu.o
obj-$(CONFIG_WALNUT)				+= walnut.o
obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD)	+= virtex.o
+61 −0
Original line number Diff line number Diff line
/*
 * Architecture- / platform-specific boot-time initialization code for
 * IBM PowerPC 4xx based boards. Adapted from original
 * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
 * <dan@net4x.com>.
 *
 * Copyright(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
 *
 * Rewritten and ported to the merged powerpc tree:
 * Copyright 2007 IBM Corporation
 * Josh Boyer <jwboyer@linux.vnet.ibm.com>
 *
 * 2002 (c) MontaVista, Software, Inc.  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.
 */

#include <linux/init.h>
#include <linux/of_platform.h>

#include <asm/machdep.h>
#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/time.h>
#include <asm/uic.h>
#include <asm/ppc4xx.h>

static __initdata struct of_device_id hcu4_of_bus[] = {
	{ .compatible = "ibm,plb3", },
	{ .compatible = "ibm,opb", },
	{ .compatible = "ibm,ebc", },
	{},
};

static int __init hcu4_device_probe(void)
{
	of_platform_bus_probe(NULL, hcu4_of_bus, NULL);
	return 0;
}
machine_device_initcall(hcu4, hcu4_device_probe);

static int __init hcu4_probe(void)
{
	unsigned long root = of_get_flat_dt_root();

	if (!of_flat_dt_is_compatible(root, "netstal,hcu4"))
		return 0;

	return 1;
}

define_machine(hcu4) {
	.name			= "HCU4",
	.probe			= hcu4_probe,
	.progress		= udbg_progress,
	.init_IRQ		= uic_init_tree,
	.get_irq		= uic_get_irq,
	.restart		= ppc4xx_reset_system,
	.calibrate_decr		= generic_calibrate_decr,
};