summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-03-18 08:48:17 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-03-18 08:48:17 +0100
commit52ef5245746cb13d1eaf9d520d9e7a36d2a70d4b (patch)
tree8914a656ab21a502ba720eba698db0a2687a56ad /arch
parentfcad6e3394943e32bc9e08d971f2c6511a99a151 (diff)
parent525cd9f8f8f10a357b8a9f22ff74931fe0993902 (diff)
downloadbarebox-52ef5245746cb13d1eaf9d520d9e7a36d2a70d4b.tar.gz
Merge branch 'for-next/mips'
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/boards/Makefile1
-rw-r--r--arch/mips/boards/openembed-som9331/Makefile1
-rw-r--r--arch/mips/boards/openembed-som9331/lowlevel.S23
-rw-r--r--arch/mips/configs/ath79_defconfig1
-rw-r--r--arch/mips/dts/Makefile1
-rw-r--r--arch/mips/dts/ar9331-openembed-som9331-board.dts113
-rw-r--r--arch/mips/mach-ath79/Kconfig7
7 files changed, 147 insertions, 0 deletions
diff --git a/arch/mips/boards/Makefile b/arch/mips/boards/Makefile
index 50652f9..e85647a 100644
--- a/arch/mips/boards/Makefile
+++ b/arch/mips/boards/Makefile
@@ -3,6 +3,7 @@ obj-$(CONFIG_BOARD_BLACK_SWIFT) += black-swift/
obj-$(CONFIG_BOARD_CI20) += img-ci20/
obj-$(CONFIG_BOARD_DLINK_DIR320) += dlink-dir-320/
obj-$(CONFIG_BOARD_DPTECHNICS_DPT_MODULE) += dptechnics-dpt-module/
+obj-$(CONFIG_BOARD_OPENEMBEDED_SOM9331) += openembed-som9331/
obj-$(CONFIG_BOARD_LOONGSON_TECH_LS1B) += loongson-ls1b/
obj-$(CONFIG_BOARD_NETGEAR_WG102) += netgear-wg102/
obj-$(CONFIG_BOARD_QEMU_MALTA) += qemu-malta/
diff --git a/arch/mips/boards/openembed-som9331/Makefile b/arch/mips/boards/openembed-som9331/Makefile
new file mode 100644
index 0000000..b08c4a9
--- /dev/null
+++ b/arch/mips/boards/openembed-som9331/Makefile
@@ -0,0 +1 @@
+lwl-y += lowlevel.o
diff --git a/arch/mips/boards/openembed-som9331/lowlevel.S b/arch/mips/boards/openembed-som9331/lowlevel.S
new file mode 100644
index 0000000..dea735d
--- /dev/null
+++ b/arch/mips/boards/openembed-som9331/lowlevel.S
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2019 Oleksij Rempel <linux@rempel-privat.de>
+ */
+
+#define BOARD_PBL_START start_openembed_som9331_board
+
+#include <mach/debug_ll.h>
+#include <asm/regdef.h>
+#include <asm/mipsregs.h>
+#include <asm/asm.h>
+#include <asm/pbl_macros.h>
+#include <mach/pbl_macros.h>
+#include <asm/pbl_nmon.h>
+#include <linux/sizes.h>
+
+ENTRY_FUNCTION(BOARD_PBL_START)
+
+ ar9331_pbl_generic_start
+ /* swap PHY4 and PHY0 */
+ pbl_reg_writel 0x190, 0xb8070000
+
+ENTRY_FUNCTION_END(BOARD_PBL_START, ar9331_openembed_som9331_board, SZ_64M)
diff --git a/arch/mips/configs/ath79_defconfig b/arch/mips/configs/ath79_defconfig
index ab7af79..ab68f12 100644
--- a/arch/mips/configs/ath79_defconfig
+++ b/arch/mips/configs/ath79_defconfig
@@ -1,6 +1,7 @@
CONFIG_MACH_MIPS_ATH79=y
CONFIG_BOARD_8DEVICES_LIMA=y
CONFIG_BOARD_DPTECHNICS_DPT_MODULE=y
+CONFIG_BOARD_OPENEMBEDED_SOM9331=y
CONFIG_BOARD_TPLINK_MR3020=y
CONFIG_BOARD_TPLINK_WDR4300=y
CONFIG_BOARD_BLACK_SWIFT=y
diff --git a/arch/mips/dts/Makefile b/arch/mips/dts/Makefile
index b3660cd..9e8a6a6 100644
--- a/arch/mips/dts/Makefile
+++ b/arch/mips/dts/Makefile
@@ -8,6 +8,7 @@ pbl-dtb-$(CONFIG_BOARD_BLACK_SWIFT) += black-swift.dtb.o
pbl-dtb-$(CONFIG_BOARD_CI20) += img-ci20.dtb.o
pbl-dtb-$(CONFIG_BOARD_DLINK_DIR320) += dlink-dir-320.dtb.o
pbl-dtb-$(CONFIG_BOARD_DPTECHNICS_DPT_MODULE) += ar9331-dptechnics-dpt-module.dtb.o
+pbl-dtb-$(CONFIG_BOARD_OPENEMBEDED_SOM9331) += ar9331-openembed-som9331-board.dtb.o
pbl-dtb-$(CONFIG_BOARD_LOONGSON_TECH_LS1B) += loongson-ls1b.dtb.o
pbl-dtb-$(CONFIG_BOARD_QEMU_MALTA) += qemu-malta.dtb.o
pbl-dtb-$(CONFIG_BOARD_RZX50) += rzx50.dtb.o
diff --git a/arch/mips/dts/ar9331-openembed-som9331-board.dts b/arch/mips/dts/ar9331-openembed-som9331-board.dts
new file mode 100644
index 0000000..ff9d25e
--- /dev/null
+++ b/arch/mips/dts/ar9331-openembed-som9331-board.dts
@@ -0,0 +1,113 @@
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include <mips/qca/ar9331.dtsi>
+#include "ar9331.dtsi"
+
+/ {
+ model = "OpenEmbed SOM9331 Board";
+ compatible = "openembed,som9331-board", "openembed,som9331-module";
+
+ aliases {
+ serial0 = &uart;
+ spiflash = &spiflash;
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x4000000>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ system {
+ label = "dpt-module:green:system";
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ barebox,default-trigger = "heartbeat";
+ };
+ };
+
+
+ chosen {
+ environment {
+ compatible = "barebox,environment";
+ device-path = &spiflash, "partname:barebox-environment";
+ };
+
+ art@0 {
+ compatible = "qca,art-ar9331", "qca,art";
+ device-path = &spiflash_art;
+ barebox,provide-mac-address = <&eth0>;
+ };
+ };
+
+ gpio-keys {
+ button@0 {
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&ref {
+ clock-frequency = <25000000>;
+};
+
+&uart {
+ status = "okay";
+};
+
+&gpio {
+ status = "okay";
+};
+
+&usb {
+ dr_mode = "host";
+ status = "okay";
+};
+
+&usb_phy {
+ status = "okay";
+};
+
+&spi {
+ num-chipselects = <1>;
+ status = "okay";
+
+ /* Winbond 25Q128FVSG SPI flash */
+ spiflash: w25q128@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "winbond,w25q128", "jedec,spi-nor";
+ spi-max-frequency = <104000000>;
+ reg = <0>;
+ };
+};
+
+&spiflash {
+ partition@0 {
+ label = "barebox";
+ reg = <0 0x80000>;
+ };
+
+ partition@80000 {
+ label = "barebox-environment";
+ reg = <0x80000 0x10000>;
+ };
+
+ spiflash_art: partition@7f0000 {
+ label = "art";
+ reg = <0x7f0000 0x10000>;
+ };
+};
+
+&eth0 {
+ status = "okay";
+};
+
+&eth1 {
+ status = "okay";
+};
diff --git a/arch/mips/mach-ath79/Kconfig b/arch/mips/mach-ath79/Kconfig
index b1b49b0..97eea6a 100644
--- a/arch/mips/mach-ath79/Kconfig
+++ b/arch/mips/mach-ath79/Kconfig
@@ -33,6 +33,13 @@ config BOARD_DPTECHNICS_DPT_MODULE
select HAVE_IMAGE_COMPRESSION
select HAS_NMON
+config BOARD_OPENEMBEDED_SOM9331
+ bool "OpenEmbed SOM9331"
+ select SOC_QCA_AR9331
+ select HAVE_PBL_IMAGE
+ select HAVE_IMAGE_COMPRESSION
+ select HAS_NMON
+
config BOARD_TPLINK_MR3020
bool "TP-LINK MR3020"
select SOC_QCA_AR9331