public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/3] mips: bmips: add NeufBox 4 (Sercomm) board
Date: Sun,  7 May 2017 20:11:32 +0200	[thread overview]
Message-ID: <1494180692-15032-4-git-send-email-noltari@gmail.com> (raw)
In-Reply-To: <1494180692-15032-1-git-send-email-noltari@gmail.com>

This serves as an example for bcm6358-leds.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
 v2: no changes.

 arch/mips/dts/sfr,nb4-ser.dts     | 93 +++++++++++++++++++++++++++++++++++++++
 board/sfr/nb4_ser/Kconfig         | 12 +++++
 board/sfr/nb4_ser/MAINTAINERS     |  6 +++
 board/sfr/nb4_ser/Makefile        |  5 +++
 board/sfr/nb4_ser/nb4-ser.c       |  7 +++
 configs/sfr_nb4-ser_ram_defconfig | 52 ++++++++++++++++++++++
 include/configs/sfr_nb4_ser.h     | 20 +++++++++
 7 files changed, 195 insertions(+)
 create mode 100644 arch/mips/dts/sfr,nb4-ser.dts
 create mode 100644 board/sfr/nb4_ser/Kconfig
 create mode 100644 board/sfr/nb4_ser/MAINTAINERS
 create mode 100644 board/sfr/nb4_ser/Makefile
 create mode 100644 board/sfr/nb4_ser/nb4-ser.c
 create mode 100644 configs/sfr_nb4-ser_ram_defconfig
 create mode 100644 include/configs/sfr_nb4_ser.h

diff --git a/arch/mips/dts/sfr,nb4-ser.dts b/arch/mips/dts/sfr,nb4-ser.dts
new file mode 100644
index 0000000..f2092e9
--- /dev/null
+++ b/arch/mips/dts/sfr,nb4-ser.dts
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "brcm,bcm6358.dtsi"
+
+/ {
+	model = "SFR NeufBox 4 (Sercomm) Board";
+	compatible = "sfr,nb4-ser", "brcm,bcm6358";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		traffic_white {
+			label = "NB4-SER:white:traffic";
+			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+		};
+
+		service_blue {
+			label = "NB4-SER:blue:service";
+			gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+		};
+
+		wifi_white {
+			label = "NB4-SER:white:wifi";
+			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
+		};
+
+		service_red {
+			label = "NB4-SER:red:service";
+			gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
+		};
+
+		service_green {
+			label = "NB4-SER:green:service";
+			gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&gpio0 {
+	status = "okay";
+};
+
+&leds {
+	status = "okay";
+	brcm,clk-div = <1>;
+
+	led at 0 {
+		reg = <0>;
+		active-low;
+		label = "NB4-SER:white:alarm";
+	};
+
+	led at 2 {
+		reg = <2>;
+		active-low;
+		label = "NB4-SER:white:tv";
+	};
+
+	led at 3 {
+		reg = <3>;
+		active-low;
+		label = "NB4-SER:white:tel";
+	};
+
+	led at 4 {
+		reg = <4>;
+		active-low;
+		label = "NB4-SER:white:adsl";
+	};
+};
+
+&pflash {
+	status = "okay";
+};
+
+&uart0 {
+	u-boot,dm-pre-reloc;
+	status = "okay";
+};
diff --git a/board/sfr/nb4_ser/Kconfig b/board/sfr/nb4_ser/Kconfig
new file mode 100644
index 0000000..78aefb5
--- /dev/null
+++ b/board/sfr/nb4_ser/Kconfig
@@ -0,0 +1,12 @@
+if BOARD_SFR_NB4_SER
+
+config SYS_BOARD
+	default "nb4_ser"
+
+config SYS_VENDOR
+	default "sfr"
+
+config SYS_CONFIG_NAME
+	default "sfr_nb4_ser"
+
+endif
diff --git a/board/sfr/nb4_ser/MAINTAINERS b/board/sfr/nb4_ser/MAINTAINERS
new file mode 100644
index 0000000..bf80267
--- /dev/null
+++ b/board/sfr/nb4_ser/MAINTAINERS
@@ -0,0 +1,6 @@
+SFR NEUFBOX 4 SERCOMM BOARD
+M:	Álvaro Fernández Rojas <noltari@gmail.com>
+S:	Maintained
+F:	board/sfr/nb4_ser/
+F:	include/configs/sfr_nb4_ser.h
+F:	configs/sfr_nb4-ser_ram_defconfig
diff --git a/board/sfr/nb4_ser/Makefile b/board/sfr/nb4_ser/Makefile
new file mode 100644
index 0000000..f3b1404
--- /dev/null
+++ b/board/sfr/nb4_ser/Makefile
@@ -0,0 +1,5 @@
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y += nb4-ser.o
diff --git a/board/sfr/nb4_ser/nb4-ser.c b/board/sfr/nb4_ser/nb4-ser.c
new file mode 100644
index 0000000..d181ca6
--- /dev/null
+++ b/board/sfr/nb4_ser/nb4-ser.c
@@ -0,0 +1,7 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
diff --git a/configs/sfr_nb4-ser_ram_defconfig b/configs/sfr_nb4-ser_ram_defconfig
new file mode 100644
index 0000000..8b885e3
--- /dev/null
+++ b/configs/sfr_nb4-ser_ram_defconfig
@@ -0,0 +1,52 @@
+CONFIG_ARCH_BMIPS=y
+CONFIG_BAUDRATE=115200
+CONFIG_BCM6345_GPIO=y
+CONFIG_BCM6345_SERIAL=y
+CONFIG_BMIPS_BOOT_RAM=y
+CONFIG_BOARD_SFR_NB4_SER=y
+CONFIG_CFI_FLASH=y
+# CONFIG_CMD_BOOTD is not set
+CONFIG_CMD_BOOTM=y
+CONFIG_CMD_CPU=y
+# CONFIG_CMD_CRC32 is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_EXPORTENV is not set
+CONFIG_CMD_FLASH=y
+# CONFIG_CMD_FPGA is not set
+# CONFIG_CMD_GPIO is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_IMPORTENV is not set
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LOADB=y
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MEMINFO=y
+# CONFIG_CMD_MISC is not set
+# CONFIG_CMD_NET is not set
+# CONFIG_CMD_NFS is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_XIMG is not set
+CONFIG_DEFAULT_DEVICE_TREE="sfr,nb4-ser"
+CONFIG_DISPLAY_CPUINFO=y
+# CONFIG_DM_DEVICE_REMOVE is not set
+CONFIG_DM_GPIO=y
+CONFIG_DM_SERIAL=y
+CONFIG_HUSH_PARSER=y
+CONFIG_LED=y
+CONFIG_LED_BCM6358=y
+CONFIG_LED_GPIO=y
+CONFIG_MIPS=y
+# CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set
+# CONFIG_MIPS_BOOT_ENV_LEGACY is not set
+CONFIG_MIPS_BOOT_FDT=y
+CONFIG_MTD=y
+CONFIG_MTD_DEVICE=y
+CONFIG_MTD_NOR_FLASH=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_SOC_BMIPS_BCM6358=y
+# CONFIG_SPL_SERIAL_PRESENT is not set
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SYS_PROMPT="NB4-SER # "
+CONFIG_SYS_TEXT_BASE=0x80010000
diff --git a/include/configs/sfr_nb4_ser.h b/include/configs/sfr_nb4_ser.h
new file mode 100644
index 0000000..ab64518
--- /dev/null
+++ b/include/configs/sfr_nb4_ser.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <configs/bmips_common.h>
+#include <configs/bmips_bcm6358.h>
+
+#define CONFIG_REMAKE_ELF
+
+#define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_SIZE			(8 * 1024)
+
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_LONGHELP
+
+#define CONFIG_SYS_FLASH_CFI		1
+#define CONFIG_FLASH_CFI_DRIVER		1
-- 
2.1.4

  parent reply	other threads:[~2017-05-07 18:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 13:09 [U-Boot] [PATCH 0/3] dm: led: add BCM6358 serial leds support Álvaro Fernández Rojas
2017-05-03 13:09 ` [U-Boot] [PATCH 1/3] dm: led: add BCM6358 led driver Álvaro Fernández Rojas
2017-05-04 16:51   ` Simon Glass
2017-05-03 13:09 ` [U-Boot] [PATCH 2/3] mips: bmips: add bcm6358-led driver support for BCM6358 Álvaro Fernández Rojas
2017-05-04 16:51   ` Simon Glass
2017-05-03 13:09 ` [U-Boot] [PATCH 3/3] mips: bmips: add NeufBox 4 (Sercomm) board Álvaro Fernández Rojas
2017-05-04 16:51   ` Simon Glass
2017-05-07 18:11 ` [U-Boot] [PATCH v2 0/3] dm: led: add BCM6358 serial leds support Álvaro Fernández Rojas
2017-05-07 18:11   ` [U-Boot] [PATCH v2 1/3] dm: led: add BCM6358 led driver Álvaro Fernández Rojas
2017-05-07 18:11   ` [U-Boot] [PATCH v2 2/3] mips: bmips: add bcm6358-led driver support for BCM6358 Álvaro Fernández Rojas
2017-05-07 18:11   ` Álvaro Fernández Rojas [this message]
2017-05-10 14:19 ` [U-Boot] [PATCH 0/3] dm: led: add BCM6358 serial leds support Daniel Schwierzeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1494180692-15032-4-git-send-email-noltari@gmail.com \
    --to=noltari@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox