powerpc: DBox2 Board Support
PATCH 1/1 powerpc: DBox2 Board Support
This patch adds device tree source, default config and setup code for DBox2 devices.
---
arch/powerpc/boot/dts/dbox2.dts | 263 ++++++++ arch/powerpc/configs/dbox2_defconfig | 1042 ++++++++++++++++++++++++++++++ arch/powerpc/platforms/8xx/Kconfig | 7 + arch/powerpc/platforms/8xx/Makefile | 1 + arch/powerpc/platforms/8xx/dbox2.h | 30 + arch/powerpc/platforms/8xx/dbox2_setup.c | 226 +++++++ include/asm-powerpc/mpc8xx.h | 4 + 7 files changed, 1573 insertions(+), 0 deletions(-)
create mode 100644 arch/powerpc/boot/dts/dbox2.dts create mode 100644 arch/powerpc/configs/dbox2_defconfig create mode 100644 arch/powerpc/platforms/8xx/dbox2.h create mode 100644 arch/powerpc/platforms/8xx/dbox2_setup.c
arch/powerpc/boot/dts/dbox2.dts new file +263 -0
@@ -0,0 +1,263 @@ +/* + * DBOX2 Device Tree Source + * + * Copyright 2007 Jochen Friedrich <[email protected]> + * + * 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. + */ + +/ { + model = "Dbox2"; + compatible = "betaresearch,dbox2"; + #address-cells = <1>; + #size-cells = <1>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,823@0 { + device_type = "cpu"; + reg = <0>; + d-cache-line-size = <d#16>; + i-cache-line-size = <d#16>; + d-cache-size = <d#1024>; + i-cache-size = <d#2048>; + timebase-frequency = <0>; + bus-frequency = <0>; + clock-frequency = <0>; + interrupts = <f 2>; // decrementer interrupt + interrupt-parent = <&PIC>; + }; + }; + + memory { + device_type = "memory"; + reg = <0 2000000>; + }; + + localbus@8000000 { + compatible = "betaresearch,dbox2-localbus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <8000000 18000000>; + + ranges = <0 8000000 18000000>; + + enx@0 { + compatible = "c-cube,enx"; + reg = <0 3400 1000000 200000>; + interrupts = <2 2>; + interrupt-parent = <&PIC>; + }; + + gtx@0 { + compatible = "c-cube,gtx"; + reg = <400000 3000 0 200000>; + interrupts = <2 2>; + interrupt-parent = <&PIC>; + }; + + fp@0 { + compatible = "betaresearch,dbox2-fp"; + interrupts = <4 2>; + interrupt-parent = <&PIC>; + gpios = <0 e>; + gpio-parent = <&CPM1_PIO>; + }; + + fe@0 { + compatible = "betaresearch,dbox2-fe"; + interrupts = <e 2>; + interrupt-parent = <&PIC>; + }; + + avia@2000000 { + compatible = "c-cube,avia"; + reg = <2000000 200>; + interrupts = <8 2>; + interrupt-parent = <&PIC>; + }; + cam@4000000 { + compatible = "betaresearch,dbox2-cam"; + reg = <4000000 20000>; + interrupts = <6 2>; + interrupt-parent = <&PIC>; + gpios = <1 1c 1 1d 1 1e 1 1f>; + gpio-parent = <&CPM1_PIO>; + }; + + cam@4040000 { + compatible = "betaresearch,dbox2-cam"; + reg = <4040000 20000>; + interrupts = <6 2>; + interrupt-parent = <&PIC>; + gpios = <1 1c 1 1d 1 1e 1 1f>; + gpio-parent = <&CPM1_PIO>; + }; + + flash@8000000 { + // Flash also has info about model needed by setup + compatible = "cfi-flash", + "betaresearch,dbox2-config"; + reg = <8000000 800000>; + bank-width = <4>; + device-width = <1>; + #address-cells = <1>; + #size-cells = <1>; + partition@0 { + label = "BR bootloader"; + reg = <0 20000>; + read-only; + }; + partition@20000 { + label = "FLFS (U-Boot)"; + reg = <20000 20000>; + }; + partition@40000 { + label = "rootfs"; + reg = <40000 7c0000>; + }; + ovpartition@20000 { + label = "Flash without bootloader"; + reg = <20000 7e0000>; + }; + ovpartition@0 { + label = "Complete Flash"; + reg = <0 800000>; + read-only; + }; + }; + }; + + soc@ff000000 { + compatible = "fsl,mpc823", + "fsl,pq1-soc"; + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc"; + ranges = <0 ff000000 00004000>; + reg = <ff000000 00004000>; + bus-frequency = <0>; + + PIC: pic@0 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <2>; + reg = <0 24>; + compatible = "fsl,mpc823-pic", + "fsl,pq1-pic"; + }; + + wdt@0 { + device_type = "watchdog"; + compatible = "fsl,mpc823-wdt", + "fsl,pq1-wdt"; + reg = <0 10>; + }; + + cpm@9c0 { + #address-cells = <1>; + #size-cells = <1>; + ranges; + reg = <9c0 40>; + command-proc = <9c0>; + interrupts = <0 2>; // cpm error interrupt + interrupt-parent = <&CPM_PIC>; + compatible = "fsl,mpc823-cpm", + "fsl,cpm1"; + + muram@2000 { + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 2000 2000>; + + data@0 { + compatible = "fsl,cpm-muram-data"; + reg = <0 1c00>; + }; + }; + + // Port D is LCD exclusive. Don't export as GPIO + CPM1_PIO: pio@970 { + compatible = "fsl,cpm1-pario"; + reg = <970 180>; + num-ports = <3>; + #gpio-cells = <2>; + }; + + lcd@970 { + reg = <970 10>; + compatible = "samsung,ks0713"; + }; + + brg@9f0 { + compatible = "fsl,mpc823-brg", + "fsl,cpm1-brg", + "fsl,cpm-brg"; + reg = <9f0 10>; + }; + + CPM_PIC: pic@930 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <2>; + interrupts = <5 2 0 2>; + interrupt-parent = <&PIC>; + reg = <930 20>; + compatible = "fsl,mpc823-cpm-pic", + "fsl,cpm1-pic"; + }; + + serial@a80 { + device_type = "serial"; + compatible = "fsl,mpc823-smc-uart", + "fsl,cpm1-smc-uart"; + reg = <a80 10 3e80 40>; + interrupts = <4 3>; + interrupt-parent = <&CPM_PIC>; + fsl,cpm-brg = <1>; + fsl,cpm-command = <0090>; + }; + + serial@a90 { + device_type = "serial"; + compatible = "fsl,mpc823-smc-uart", + "fsl,cpm1-smc-uart"; + reg = <a90 10 3f80 40>; + interrupts = <3 3>; + interrupt-parent = <&CPM_PIC>; + fsl,cpm-brg = <2>; + fsl,cpm-command = <00d0>; + }; + + ethernet@a00 { + device_type = "network"; + compatible = "fsl,mpc823-scc-enet", + "fsl,cpm1-scc-enet"; + reg = <a20 20 3d00 80>; + interrupts = <1d 3>; + interrupt-parent = <&CPM_PIC>; + fixed-link = <1 0 d#10>; + fsl,cpm-command = <0040>; + linux,network-index = <0>; + }; + + i2c@860 { + compatible = "fsl,mpc823-i2c", + "fsl,cpm1-i2c", + "fsl,cpm-i2c"; + reg = <860 20 3c80 30>; + interrupts = <10 3>; + interrupt-parent = <&CPM_PIC>; + fsl,cpm-command = <0010>; + }; + }; + }; + chosen { + linux,stdout-path = "/soc/cpm/serial@a80"; + }; +};
arch/powerpc/configs/dbox2_defconfig new file +1042 -0
1,042 lines not on this page · raw message
arch/powerpc/platforms/8xx/Kconfig +0 -0
@@ -43,6 +43,13 @@ config PPC_EP88XC
This board is also resold by Freescale as the QUICCStart MPC885 Evaluation System and/or the CWH-PPC-885XN-VE.
+config DBOX2
+ bool "DBOX2"
+ select CPM1
+ select PPC_CPM_NEW_BINDING
+ help
+ This enables support for the Betaresearch DBOX2.
+
endchoice
menu "Freescale Ethernet driver platform-specific options"
arch/powerpc/platforms/8xx/Makefile +0 -0
@@ -5,3 +5,4 @@ obj-$(CONFIG_PPC_8xx) += m8xx_setup.o
obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o obj-$(CONFIG_MPC86XADS) += mpc86xads_setup.o obj-$(CONFIG_PPC_EP88XC) += ep88xc.o
+obj-$(CONFIG_DBOX2) += dbox2_setup.o
arch/powerpc/platforms/8xx/dbox2.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* A collection of structures, addresses, and values associated with +* the DBox2. +* +* Author: (c) 2007 Jochen Friedrich +* +* 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. +*/ + +#ifdef __KERNEL__ +#ifndef __ASM_DBOX2_H__ +#define __ASM_DBOX2_H__ + +/* Vendor information in BR Bootloader +*/ + +#define DBOX2_VENDOR_OFFSET (0x1ffe0) + +enum dbox2_mid { +DBOX2_MID_NOKIA =1 , +DBOX2_MID_PHILIPS =2 , +DBOX2_MID_SAGEM =3 , +}; + +enum dbox2_mid dbox2_get_mid (void ); + +#endif /* __ASM_DBOX2_H__ */ +#endif /* __KERNEL__ */
arch/powerpc/platforms/8xx/dbox2_setup.c new file +226 -0
226 lines not on this page · raw message
include/asm-powerpc/mpc8xx.h +0 -0
@@ -23,6 +23,10 @@
#include <platforms/8xx/mpc885ads.h>
#endif
+#if defined(CONFIG_DBOX2)
+#include <platforms/8xx/dbox2.h>
+#endif
+
#ifdef CONFIG_PCMCIA_M8XX
extern struct mpc8xx_pcmcia_ops m8xx_pcmcia_ops;
#endif
Signature · 1 line
1.5.3.7
Quoted 2 lines · Jochen Friedrich
This patch adds device tree source, default config and setup code for DBox2 devices.
please ignore this posting. This patch doesn't compile cleanly, i'll repost a fixed patch.
Thanks,
Jochen