CPU: FSL P1020 (2x 800MHz E500 PPC) RAM: 1GB DDR3 FLASH: 256MiB NAND WiFi: 2x Atheros AR9382 2x2:2 abgn ETH: 2x BCM54616S - 1x BCM53128 8-port switch LED: 5x LEDs (Power, WiFi1, WiFi2, N/D, SYS) BTN: 1x RESET Installation ------------ 1. Download initrams kernel image, dtb binary and sysupgrade image. 2. Place initramfs kernel into tftp root directory. Rename to "panda-uimage-factory". 3. Place dtb binary into tftp root directory. Rename to "panda.fdt". 4. Start tftp server on 192.168.100.8/24. 5. Power up the device with the reset button pressed. It will download the initrams and dtb via tftp and boot into OpenWRT in RAM. 6. SSH into the device and remove the factory partitions. > ubirmvol /dev/ubi0 --name=kernel1 > ubirmvol /dev/ubi0 --name=rootfs1 > ubirmvol /dev/ubi0 --name=devicetree1 You will have around 60 MiB of free space with that. You can also delete "kernel2", "devicetree2", "rootfs2" and "storage" respectively in case you do not want to go back to the vendor firmware. 7. Modify the U-Boot bootcmd to allow for booting OpenWRT > fw_setenv bootcmd_owrt "ubi part ubi && ubi read 0x1000000 kernel && bootm 0x1000000" > fw_setenv bootargs_owrt "setenv bootargs console=ttyS0,115200 ubi.mtd=3,2048" > fw_setenv bootcmd "run bootargs_owrt; run bootcmd_owrt" 8. Transfer the sysupgrade image via scp into the /tmp directory. 9. Upgrade the device > sysupgrade -n /tmp/<imagename> Signed-off-by: David Bauer <mail@david-bauer.net>master
parent
90bfbed7c2
commit
b368373fab
@ -0,0 +1,22 @@ |
||||
#!/bin/sh |
||||
|
||||
[ -e /etc/config/ubootenv ] && exit 0 |
||||
|
||||
touch /etc/config/ubootenv |
||||
|
||||
. /lib/uboot-envtools.sh |
||||
. /lib/functions.sh |
||||
|
||||
board=$(board_name) |
||||
|
||||
case "$board" in |
||||
ocedo,panda) |
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" |
||||
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000" |
||||
;; |
||||
esac |
||||
|
||||
config_load ubootenv |
||||
config_foreach ubootenv_add_app_config ubootenv |
||||
|
||||
exit 0 |
@ -0,0 +1,264 @@ |
||||
// SPDX-License-Identifier: GPL-2.0-or-later or MIT |
||||
|
||||
/include/ "fsl/p1020si-pre.dtsi" |
||||
/ { |
||||
model = "OCEDO Panda"; |
||||
compatible = "ocedo,panda"; |
||||
|
||||
aliases { |
||||
led-boot = &system_blue; |
||||
led-failsafe = &system_blue; |
||||
led-running = &system_blue; |
||||
led-upgrade = &system_blue; |
||||
}; |
||||
|
||||
chosen { |
||||
/* Needed for initramfs */ |
||||
bootargs-override = "console=ttyS0,115200 ubi.mtd=3,2048"; |
||||
}; |
||||
|
||||
memory { |
||||
device_type = "memory"; |
||||
}; |
||||
|
||||
lbc: localbus@ffe05000 { |
||||
reg = <0 0xffe05000 0 0x1000>; |
||||
ranges = <0x0 0x0 0x0 0xec000000 0x04000000 |
||||
0x1 0x0 0x0 0xff800000 0x00040000 |
||||
0x2 0x0 0x0 0xffa00000 0x00020000 |
||||
0x3 0x0 0x0 0xffb00000 0x00020000>; |
||||
|
||||
nand@1,0 { |
||||
compatible = "fsl,p1020-fcm-nand", "fsl,elbc-fcm-nand"; |
||||
reg = <0x1 0x0 0x40000>; |
||||
|
||||
partitions { |
||||
compatible = "fixed-partitions"; |
||||
#address-cells = <1>; |
||||
#size-cells = <1>; |
||||
|
||||
partition@0 { |
||||
reg = <0x0 0xa0000>; |
||||
label = "uboot"; |
||||
read-only; |
||||
}; |
||||
|
||||
partition@a0000 { |
||||
reg = <0xa0000 0x20000>; |
||||
label = "uboot-env0"; |
||||
}; |
||||
|
||||
partition@c0000 { |
||||
reg = <0xc0000 0x40000>; |
||||
label = "uboot-env1"; |
||||
}; |
||||
|
||||
partition@100000 { |
||||
reg = <0x100000 0xff00000>; |
||||
label = "ubi"; |
||||
}; |
||||
}; |
||||
}; |
||||
}; |
||||
|
||||
soc: soc@ffe00000 { |
||||
ranges = <0x0 0x0 0xffe00000 0x100000>; |
||||
|
||||
i2c@3000 { |
||||
rtc@68 { |
||||
compatible = "dallas,ds1339"; |
||||
reg = <0x68>; |
||||
}; |
||||
}; |
||||
|
||||
gpio0: gpio-controller@fc00 { |
||||
}; |
||||
|
||||
mdio@24000 { |
||||
phy0: ethernet-phy@8 { |
||||
reg = <0x8>; |
||||
}; |
||||
|
||||
phy1: ethernet-phy@9 { |
||||
reg = <0x9>; |
||||
}; |
||||
|
||||
switch0: ethernet-phy@0 { |
||||
reg = <0x0>; |
||||
|
||||
ports { |
||||
#address-cells = <1>; |
||||
#size-cells = <0>; |
||||
|
||||
port@0 { |
||||
reg = <0>; |
||||
label = "lan1"; |
||||
}; |
||||
|
||||
port@1 { |
||||
reg = <1>; |
||||
label = "lan2"; |
||||
}; |
||||
|
||||
port@2 { |
||||
reg = <2>; |
||||
label = "lan3"; |
||||
}; |
||||
|
||||
port@3 { |
||||
reg = <3>; |
||||
label = "lan4"; |
||||
}; |
||||
|
||||
port@4 { |
||||
reg = <4>; |
||||
label = "lan5"; |
||||
}; |
||||
|
||||
port@5 { |
||||
reg = <5>; |
||||
label = "lan6"; |
||||
}; |
||||
|
||||
port@6 { |
||||
reg = <6>; |
||||
label = "lan7"; |
||||
}; |
||||
|
||||
port@7 { |
||||
reg = <7>; |
||||
label = "lan8"; |
||||
}; |
||||
|
||||
port@8 { |
||||
reg = <8>; |
||||
label = "cpu"; |
||||
|
||||
fixed-link { |
||||
speed = <1000>; |
||||
full-duplex; |
||||
}; |
||||
}; |
||||
}; |
||||
}; |
||||
}; |
||||
|
||||
mdio@25000 { |
||||
tbi_phy0: tbi-phy@11 { |
||||
reg = <0x11>; |
||||
}; |
||||
}; |
||||
|
||||
mdio@26000 { |
||||
tbi_phy1: tbi-phy@11 { |
||||
reg = <0x11>; |
||||
}; |
||||
}; |
||||
|
||||
enet0: ethernet@b0000 { |
||||
phy-connection-type = "rgmii-id"; |
||||
phy-handle = <&switch0>; |
||||
|
||||
fixed-link { |
||||
speed = <1000>; |
||||
full-duplex; |
||||
}; |
||||
}; |
||||
|
||||
enet1: ethernet@b1000 { |
||||
phy-connection-type = "sgmii"; |
||||
phy-handle = <&phy0>; |
||||
|
||||
tbi-handle = <&tbi_phy0>; |
||||
}; |
||||
|
||||
enet2: ethernet@b2000 { |
||||
phy-connection-type = "sgmii"; |
||||
phy-handle = <&phy1>; |
||||
|
||||
tbi-handle = <&tbi_phy1>; |
||||
}; |
||||
|
||||
usb@22000 { |
||||
phy_type = "ulpi"; |
||||
dr_mode = "host"; |
||||
}; |
||||
|
||||
usb@23000 { |
||||
status = "disabled"; |
||||
}; |
||||
}; |
||||
|
||||
pci0: pcie@ffe09000 { |
||||
ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 |
||||
0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; |
||||
reg = <0 0xffe09000 0 0x1000>; |
||||
pcie@0 { |
||||
ranges = <0x2000000 0x0 0xa0000000 |
||||
0x2000000 0x0 0xa0000000 |
||||
0x0 0x20000000 |
||||
|
||||
0x1000000 0x0 0x0 |
||||
0x1000000 0x0 0x0 |
||||
0x0 0x100000>; |
||||
}; |
||||
}; |
||||
|
||||
pci1: pcie@ffe0a000 { |
||||
reg = <0 0xffe0a000 0 0x1000>; |
||||
ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 |
||||
0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; |
||||
pcie@0 { |
||||
ranges = <0x2000000 0x0 0x80000000 |
||||
0x2000000 0x0 0x80000000 |
||||
0x0 0x20000000 |
||||
|
||||
0x1000000 0x0 0x0 |
||||
0x1000000 0x0 0x0 |
||||
0x0 0x100000>; |
||||
}; |
||||
}; |
||||
|
||||
leds { |
||||
compatible = "gpio-leds"; |
||||
|
||||
power { |
||||
gpios = <&gpio0 0 0>; |
||||
label = "panda:green:power"; |
||||
default-state = "on"; |
||||
}; |
||||
|
||||
wlan0 { |
||||
gpios = <&gpio0 1 0>; |
||||
label = "panda:yellow:wlan0"; |
||||
linux,default-trigger = "phy0tpt"; |
||||
}; |
||||
|
||||
wlan1 { |
||||
gpios = <&gpio0 2 0>; |
||||
label = "panda:red:wlan1"; |
||||
linux,default-trigger = "phy1tpt"; |
||||
}; |
||||
|
||||
tbd_orange { |
||||
gpios = <&gpio0 3 0>; |
||||
label = "panda:orange:tbd"; |
||||
}; |
||||
|
||||
system_blue: system { |
||||
gpios = <&gpio0 4 0>; |
||||
label = "panda:blue:system"; |
||||
}; |
||||
}; |
||||
|
||||
buttons { |
||||
compatible = "gpio-keys"; |
||||
|
||||
reset { |
||||
label = "Reset button"; |
||||
gpios = <&gpio0 6 1>; |
||||
linux,code = <0x198>; |
||||
}; |
||||
}; |
||||
}; |
||||
/include/ "fsl/p1020si-post.dtsi" |
@ -0,0 +1,91 @@ |
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/*
|
||||
* OCEDO Panda Board Setup |
||||
* |
||||
* Copyright (C) 2019 David Bauer <mail@david-bauer.net> |
||||
* |
||||
* Based on: |
||||
* mpc85xx_rdb.c: |
||||
* MPC85xx RDB Board Setup |
||||
* Copyright 2013 Freescale Semiconductor Inc. |
||||
* |
||||
* 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. |
||||
*/ |
||||
|
||||
#include <linux/stddef.h> |
||||
#include <linux/kernel.h> |
||||
#include <linux/delay.h> |
||||
#include <linux/interrupt.h> |
||||
#include <linux/of_platform.h> |
||||
|
||||
#include <asm/time.h> |
||||
#include <asm/machdep.h> |
||||
#include <asm/pci-bridge.h> |
||||
#include <mm/mmu_decl.h> |
||||
#include <asm/prom.h> |
||||
#include <asm/udbg.h> |
||||
#include <asm/mpic.h> |
||||
|
||||
#include <sysdev/fsl_soc.h> |
||||
#include <sysdev/fsl_pci.h> |
||||
#include "smp.h" |
||||
|
||||
#include "mpc85xx.h" |
||||
|
||||
void __init panda_pic_init(void) |
||||
{ |
||||
struct mpic *mpic; |
||||
|
||||
mpic = mpic_alloc(NULL, 0, |
||||
MPIC_BIG_ENDIAN | |
||||
MPIC_SINGLE_DEST_CPU, |
||||
0, 256, " OpenPIC "); |
||||
|
||||
BUG_ON(mpic == NULL); |
||||
mpic_init(mpic); |
||||
} |
||||
|
||||
/*
|
||||
* Setup the architecture |
||||
*/ |
||||
static void __init panda_setup_arch(void) |
||||
{ |
||||
if (ppc_md.progress) |
||||
ppc_md.progress("panda_setup_arch()", 0); |
||||
|
||||
mpc85xx_smp_init(); |
||||
|
||||
fsl_pci_assign_primary(); |
||||
|
||||
pr_info("Panda board from OCEDO\n"); |
||||
} |
||||
|
||||
machine_arch_initcall(panda, mpc85xx_common_publish_devices); |
||||
|
||||
/*
|
||||
* Called very early, device-tree isn't unflattened |
||||
*/ |
||||
static int __init panda_probe(void) |
||||
{ |
||||
if (of_machine_is_compatible("ocedo,panda")) |
||||
return 1; |
||||
return 0; |
||||
} |
||||
|
||||
define_machine(panda) { |
||||
.name = "P1020 RDB", |
||||
.probe = panda_probe, |
||||
.setup_arch = panda_setup_arch, |
||||
.init_IRQ = panda_pic_init, |
||||
#ifdef CONFIG_PCI |
||||
.pcibios_fixup_bus = fsl_pcibios_fixup_bus, |
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb, |
||||
#endif |
||||
.get_irq = mpic_get_irq, |
||||
.calibrate_decr = generic_calibrate_decr, |
||||
.progress = udbg_progress, |
||||
}; |
@ -0,0 +1,34 @@ |
||||
Index: linux-4.14.82/arch/powerpc/platforms/85xx/Kconfig
|
||||
===================================================================
|
||||
--- linux-4.14.82.orig/arch/powerpc/platforms/85xx/Kconfig
|
||||
+++ linux-4.14.82/arch/powerpc/platforms/85xx/Kconfig
|
||||
@@ -60,6 +60,17 @@ config HIVEAP_330
|
||||
This board is a Concurrent Dual-Band wireless access point with a
|
||||
Freescale P1020 SoC.
|
||||
|
||||
+config PANDA
|
||||
+ bool "OCEDO PANDA"
|
||||
+ select DEFAULT_UIMAGE
|
||||
+ select ARCH_REQUIRE_GPIOLIB
|
||||
+ select GPIO_MPC8XXX
|
||||
+ help
|
||||
+ This option enables support for the OCEDO PANDA board.
|
||||
+
|
||||
+ This board is a Concurrent Dual-Band wireless access point with a
|
||||
+ Freescale P1020 SoC.
|
||||
+
|
||||
config MPC8540_ADS
|
||||
bool "Freescale MPC8540 ADS"
|
||||
select DEFAULT_UIMAGE
|
||||
Index: linux-4.14.82/arch/powerpc/platforms/85xx/Makefile
|
||||
===================================================================
|
||||
--- linux-4.14.82.orig/arch/powerpc/platforms/85xx/Makefile
|
||||
+++ linux-4.14.82/arch/powerpc/platforms/85xx/Makefile
|
||||
@@ -22,6 +22,7 @@ obj-$(CONFIG_P1010_RDB) += p1010rdb.o
|
||||
obj-$(CONFIG_P1022_DS) += p1022_ds.o
|
||||
obj-$(CONFIG_P1022_RDK) += p1022_rdk.o
|
||||
obj-$(CONFIG_P1023_RDB) += p1023_rdb.o
|
||||
+obj-$(CONFIG_PANDA) += panda.o
|
||||
obj-$(CONFIG_TWR_P102x) += twr_p102x.o
|
||||
obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o
|
||||
obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o
|
@ -0,0 +1,34 @@ |
||||
Index: linux-4.14.82/arch/powerpc/platforms/85xx/Kconfig
|
||||
===================================================================
|
||||
--- linux-4.14.82.orig/arch/powerpc/platforms/85xx/Kconfig
|
||||
+++ linux-4.14.82/arch/powerpc/platforms/85xx/Kconfig
|
||||
@@ -60,6 +60,17 @@ config HIVEAP_330
|
||||
This board is a Concurrent Dual-Band wireless access point with a
|
||||
Freescale P1020 SoC.
|
||||
|
||||
+config PANDA
|
||||
+ bool "OCEDO PANDA"
|
||||
+ select DEFAULT_UIMAGE
|
||||
+ select ARCH_REQUIRE_GPIOLIB
|
||||
+ select GPIO_MPC8XXX
|
||||
+ help
|
||||
+ This option enables support for the OCEDO PANDA board.
|
||||
+
|
||||
+ This board is a Concurrent Dual-Band wireless access point with a
|
||||
+ Freescale P1020 SoC.
|
||||
+
|
||||
config MPC8540_ADS
|
||||
bool "Freescale MPC8540 ADS"
|
||||
select DEFAULT_UIMAGE
|
||||
Index: linux-4.14.82/arch/powerpc/platforms/85xx/Makefile
|
||||
===================================================================
|
||||
--- linux-4.14.82.orig/arch/powerpc/platforms/85xx/Makefile
|
||||
+++ linux-4.14.82/arch/powerpc/platforms/85xx/Makefile
|
||||
@@ -22,6 +22,7 @@ obj-$(CONFIG_P1010_RDB) += p1010rdb.o
|
||||
obj-$(CONFIG_P1022_DS) += p1022_ds.o
|
||||
obj-$(CONFIG_P1022_RDK) += p1022_rdk.o
|
||||
obj-$(CONFIG_P1023_RDB) += p1023_rdb.o
|
||||
+obj-$(CONFIG_PANDA) += panda.o
|
||||
obj-$(CONFIG_TWR_P102x) += twr_p102x.o
|
||||
obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o
|
||||
obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o
|
Loading…
Reference in new issue