Skip to contentSkip to conversation

ARM: initial support for TI DaVinci SoCs and virt2real board

PATCH Superseded Antony Pavlov 2 participants 13 messages Mar 16, 2014 – Mar 18, 2014

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

v2 cover ARM: initial support for TI DaVinci SoCs and virt2real board

Change since v1:

- add hardware-base clocksource and move dummy software-only clocksource to separate patchseries;
- add gpio driver;
- use devicetree for probing devices.

Antony Pavlov (10):
import _AC and UL macros from linux kernel
ARM: initial support for TI DaVinci SoCs
ARM: davinci: add DEBUG_LL support
ARM: davinci: add clocksource
gpio: add driver for TI DaVinci SoCs
ARM: dts: Add TI TMS320DM365 devicetree file
ARM: davinci: add documentation
ARM: davinci: add virt2real board support
ARM: virt2real: add documentation
ARM: davinci: add virt2real_defconfig

 Documentation/boards.dox                      |   1 +
 arch/arm/Kconfig                              |   7 +
 arch/arm/Makefile                             |   1 +
 arch/arm/boards/Makefile                      |   1 +
 arch/arm/boards/virt2real/Makefile            |   1 +
 arch/arm/boards/virt2real/board.c             |  27 ++++
 arch/arm/boards/virt2real/lowlevel.c          |  34 +++++
 arch/arm/boards/virt2real/virt2real.dox       |  41 +++++
 arch/arm/configs/virt2real_defconfig          |  49 ++++++
 arch/arm/dts/dm365.dtsi                       |  28 ++++
 arch/arm/dts/virt2real.dts                    |  35 +++++
 arch/arm/include/asm/memory.h                 |   7 +
 arch/arm/mach-arm.dox                         |   2 +
 arch/arm/mach-davinci/Kconfig                 |  16 ++
 arch/arm/mach-davinci/Makefile                |   1 +
 arch/arm/mach-davinci/include/mach/debug_ll.h |  42 +++++
 arch/arm/mach-davinci/include/mach/hardware.h |  29 ++++
 arch/arm/mach-davinci/include/mach/serial.h   |  20 +++
 arch/arm/mach-davinci/include/mach/time.h     |  20 +++
 arch/arm/mach-davinci/mach-davinci.dox        |   7 +
 arch/arm/mach-davinci/time.c                  | 209 +++++++++++++++++++++++++
 drivers/gpio/Kconfig                          |   7 +
 drivers/gpio/Makefile                         |   1 +
 drivers/gpio/gpio-davinci.c                   | 211 ++++++++++++++++++++++++++
 include/linux/const.h                         |  27 ++++
 25 files changed, 824 insertions(+)
 create mode 100644 arch/arm/boards/virt2real/Makefile
 create mode 100644 arch/arm/boards/virt2real/board.c
 create mode 100644 arch/arm/boards/virt2real/lowlevel.c
 create mode 100644 arch/arm/boards/virt2real/virt2real.dox
 create mode 100644 arch/arm/configs/virt2real_defconfig
 create mode 100644 arch/arm/dts/dm365.dtsi
 create mode 100644 arch/arm/dts/virt2real.dts
 create mode 100644 arch/arm/mach-davinci/Kconfig
 create mode 100644 arch/arm/mach-davinci/Makefile
 create mode 100644 arch/arm/mach-davinci/include/mach/debug_ll.h
 create mode 100644 arch/arm/mach-davinci/include/mach/hardware.h
 create mode 100644 arch/arm/mach-davinci/include/mach/serial.h
 create mode 100644 arch/arm/mach-davinci/include/mach/time.h
 create mode 100644 arch/arm/mach-davinci/mach-davinci.dox
 create mode 100644 arch/arm/mach-davinci/time.c
 create mode 100644 drivers/gpio/gpio-davinci.c
 create mode 100644 include/linux/const.h
Signature · 7 lines
1.9.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH v2 1/10 import _AC and UL macros from linux kernel

This macros are used in exported from linux TI DaVinci code. Also this macros are used in MIPS cache support code.

---
 arch/arm/include/asm/memory.h |  7 +++++++
 include/linux/const.h         | 27 +++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
arch/arm/include/asm/memory.h +7 -0
index 28afaa3..52114d0 100644
@@ -3,6 +3,13 @@
 
 #include <memory.h>
 
+#include <linux/const.h>
+/*
+ * Allow for constants defined here to be used from assembly code
+ * by prepending the UL suffix only with actual C code compilation.
+ */
+#define UL(x) _AC(x, UL)
+
 static inline void arm_add_mem_device(const char* name, resource_size_t start,
 				    resource_size_t size)
 {
include/linux/const.h new file +27 -0
new file mode 100644
index 0000000..c872bfd
@@ -0,0 +1,27 @@
+/* const.h: Macros for dealing with constants.  */
+
+#ifndef _LINUX_CONST_H
+#define _LINUX_CONST_H
+
+/* Some constant macros are used in both assembler and
+ * C code.  Therefore we cannot annotate them always with
+ * 'UL' and other type specifiers unilaterally.  We
+ * use the following macros to deal with this.
+ *
+ * Similarly, _AT() will cast an expression with a type in C, but
+ * leave it unchanged in asm.
+ */
+
+#ifdef __ASSEMBLY__
+#define _AC(X,Y)	X
+#define _AT(T,X)	X
+#else
+#define __AC(X,Y)	(X##Y)
+#define _AC(X,Y)	__AC(X,Y)
+#define _AT(T,X)	((T)(X))
+#endif
+
+#define _BITUL(x)	(_AC(1,UL) << (x))
+#define _BITULL(x)	(_AC(1,ULL) << (x))
+
+#endif /* !(_LINUX_CONST_H) */
Signature · 7 lines
1.9.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH v2 2/10 ARM: initial support for TI DaVinci SoCs

In reply to Antony Pavlov

This commit adds minimal support for the DaVinci DM365 SoCs from Texas Instruments.

---
 arch/arm/Kconfig                              |  5 ++
 arch/arm/Makefile                             |  1 +
 arch/arm/mach-davinci/Kconfig                 |  7 ++
 arch/arm/mach-davinci/Makefile                |  1 +
 arch/arm/mach-davinci/include/mach/hardware.h | 29 ++++++++
 arch/arm/mach-davinci/include/mach/serial.h   | 20 ++++++
 arch/arm/mach-davinci/include/mach/time.h     | 18 +++++
 arch/arm/mach-davinci/time.c                  | 95 +++++++++++++++++++++++++++
 8 files changed, 176 insertions(+)
arch/arm/Kconfig +5 -0
index 21f9012..42ff01b 100644
@@ -54,6 +54,10 @@ config ARCH_CLPS711X
 	select GPIOLIB
 	select MFD_SYSCON
 
+config ARCH_DAVINCI
+	bool "TI Davinci"
+	select CPU_ARM926T
+
 config ARCH_EP93XX
 	bool "Cirrus Logic EP93xx"
 	select CPU_ARM920T
@@ -188,6 +192,7 @@ source arch/arm/cpu/Kconfig
 source arch/arm/mach-at91/Kconfig
 source arch/arm/mach-bcm2835/Kconfig
 source arch/arm/mach-clps711x/Kconfig
+source arch/arm/mach-davinci/Kconfig
 source arch/arm/mach-ep93xx/Kconfig
 source arch/arm/mach-highbank/Kconfig
 source arch/arm/mach-imx/Kconfig
arch/arm/Makefile +1 -0
index 2bbba35..c1bd836 100644
@@ -54,6 +54,7 @@ AFLAGS   += -include asm/unified.h -msoft-float $(AFLAGS_THUMB2)
 machine-$(CONFIG_ARCH_AT91)		:= at91
 machine-$(CONFIG_ARCH_BCM2835)		:= bcm2835
 machine-$(CONFIG_ARCH_CLPS711X)		:= clps711x
+machine-$(CONFIG_ARCH_DAVINCI)		:= davinci
 machine-$(CONFIG_ARCH_EP93XX)		:= ep93xx
 machine-$(CONFIG_ARCH_HIGHBANK)		:= highbank
 machine-$(CONFIG_ARCH_IMX)		:= imx
arch/arm/mach-davinci/Kconfig new file +7 -0
new file mode 100644
index 0000000..5677f8d
@@ -0,0 +1,7 @@
+if ARCH_DAVINCI
+
+config ARCH_TEXT_BASE
+	hex
+	default 0x82000000
+
+endif
arch/arm/mach-davinci/Makefile new file +1 -0
new file mode 100644
index 0000000..b96d414
@@ -0,0 +1 @@
+obj-y += time.o
arch/arm/mach-davinci/include/mach/hardware.h new file +29 -0
new file mode 100644
index 0000000..ea9f481
@@ -0,0 +1,29 @@
+/*
+ * Hardware definitions common to all DaVinci family processors
+ *
+ * Author: Kevin Hilman, Deep Root Systems, LLC
+ *
+ * 2007 (c) Deep Root Systems, LLC. 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.
+ */
+#ifndef __ASM_ARCH_HARDWARE_H
+#define __ASM_ARCH_HARDWARE_H
+
+#include <asm/memory.h>
+
+/*
+ * Before you add anything to this file:
+ *
+ * This header is for defines common to ALL DaVinci family chips.
+ * Anything that is chip specific should go in <chipname>.h,
+ * and the chip/board init code should then explicitly include
+ * <chipname>.h
+ */
+/*
+ * I/O mapping
+ */
+#define IO_PHYS				UL(0x01c00000)
+
+#endif /* __ASM_ARCH_HARDWARE_H */
arch/arm/mach-davinci/include/mach/serial.h new file +20 -0
new file mode 100644
index 0000000..bc7449f
@@ -0,0 +1,20 @@
+/*
+ * DaVinci serial device definitions
+ *
+ * Author: Kevin Hilman, MontaVista Software, Inc. <[email protected]>
+ *
+ * 2007 (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.
+ */
+#ifndef __ASM_ARCH_SERIAL_H
+#define __ASM_ARCH_SERIAL_H
+
+#include <mach/hardware.h>
+
+#define DAVINCI_UART0_BASE	(IO_PHYS + 0x20000)
+#define DAVINCI_UART1_BASE	(IO_PHYS + 0x20400)
+#define DAVINCI_UART2_BASE	(IO_PHYS + 0x20800)
+
+#endif /* __ASM_ARCH_SERIAL_H */
arch/arm/mach-davinci/include/mach/time.h new file +18 -0
new file mode 100644
index 0000000..741e90c
@@ -0,0 +1,18 @@
+/*
+ * Local header file for DaVinci time code.
+ *
+ * Author: Kevin Hilman, MontaVista Software, Inc. <[email protected]>
+ *
+ * 2007 (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.
+ */
+#ifndef __ARCH_ARM_MACH_DAVINCI_TIME_H
+#define __ARCH_ARM_MACH_DAVINCI_TIME_H
+
+#include <mach/hardware.h>
+
+#define DAVINCI_WDOG_BASE		(IO_PHYS + 0x21C00)
+
+#endif /* __ARCH_ARM_MACH_DAVINCI_TIME_H */
arch/arm/mach-davinci/time.c new file +95 -0

95 lines not on this page · raw message

Signature · 7 lines
1.9.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

PATCH v2 3/10 ARM: davinci: add DEBUG_LL support

In reply to Antony Pavlov
---
 arch/arm/Kconfig                              |  1 +
 arch/arm/mach-davinci/include/mach/debug_ll.h | 42 +++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)
arch/arm/Kconfig +1 -0
index 42ff01b..407f27d 100644
@@ -57,6 +57,7 @@ config ARCH_CLPS711X
 config ARCH_DAVINCI
 	bool "TI Davinci"
 	select CPU_ARM926T
+	select HAS_DEBUG_LL
 
 config ARCH_EP93XX
 	bool "Cirrus Logic EP93xx"
arch/arm/mach-davinci/include/mach/debug_ll.h new file +42 -0

42 lines not on this page · raw message

Signature · 7 lines
1.9.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

PATCH v2 4/10 ARM: davinci: add clocksource

In reply to Antony Pavlov
---
 arch/arm/mach-davinci/include/mach/time.h |   2 +
 arch/arm/mach-davinci/time.c              | 114 ++++++++++++++++++++++++++++++
 2 files changed, 116 insertions(+)
arch/arm/mach-davinci/include/mach/time.h +2 -0
index 741e90c..34781b6 100644
@@ -13,6 +13,8 @@
 
 #include <mach/hardware.h>
 
+#define DAVINCI_TIMER0_BASE		(IO_PHYS + 0x21400)
+#define DAVINCI_TIMER1_BASE		(IO_PHYS + 0x21800)
 #define DAVINCI_WDOG_BASE		(IO_PHYS + 0x21C00)
 
 #endif /* __ARCH_ARM_MACH_DAVINCI_TIME_H */
arch/arm/mach-davinci/time.c +114 -0

126 lines not on this page · raw message

Signature · 7 lines
1.9.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

PATCH v2 5/10 gpio: add driver for TI DaVinci SoCs

In reply to Antony Pavlov

This driver is dts-only version of driver from Linux v3.14-rc5.

---
 arch/arm/Kconfig            |   1 +
 drivers/gpio/Kconfig        |   7 ++
 drivers/gpio/Makefile       |   1 +
 drivers/gpio/gpio-davinci.c | 211 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 220 insertions(+)
arch/arm/Kconfig +1 -0
index 407f27d..3754646 100644
@@ -58,6 +58,7 @@ config ARCH_DAVINCI
 	bool "TI Davinci"
 	select CPU_ARM926T
 	select HAS_DEBUG_LL
+	select GPIOLIB
 
 config ARCH_EP93XX
 	bool "Cirrus Logic EP93xx"
drivers/gpio/Kconfig +7 -0
index 7c42656..7302955 100644
@@ -20,6 +20,13 @@ config GPIO_CLPS711X
 	help
 	  Say yes here to enable the GPIO driver for the CLPS711X CPUs
 
+config GPIO_DAVINCI
+	bool "TI Davinci/Keystone GPIO support"
+	default y if ARCH_DAVINCI
+	depends on ARM && ARCH_DAVINCI
+	help
+	  Say yes here to enable GPIO support for TI Davinci/Keystone SoCs.
+
 config GPIO_GENERIC_PLATFORM
 	bool "Generic memory-mapped GPIO controller support"
 	select GPIO_GENERIC
drivers/gpio/Makefile +1 -0
index b7c536d..68a76a3 100644
@@ -1,6 +1,7 @@
 obj-$(CONFIG_GPIOLIB)		+= gpiolib.o
 
 obj-$(CONFIG_GPIO_BCM2835)	+= gpio-bcm2835.o
+obj-$(CONFIG_GPIO_DAVINCI)	+= gpio-davinci.o
 obj-$(CONFIG_GPIO_CLPS711X)	+= gpio-clps711x.o
 obj-$(CONFIG_GPIO_GENERIC)	+= gpio-generic.o
 obj-$(CONFIG_GPIO_IMX)		+= gpio-imx.o
drivers/gpio/gpio-davinci.c new file +211 -0

211 lines not on this page · raw message

Signature · 7 lines
1.9.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw

PATCH v2 6/10 ARM: dts: Add TI TMS320DM365 devicetree file

In reply to Antony Pavlov
---
 arch/arm/dts/dm365.dtsi | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
arch/arm/dts/dm365.dtsi new file +28 -0
new file mode 100644
index 0000000..ea69007
@@ -0,0 +1,28 @@
+#include "skeleton.dtsi"
+
+/ {
+	soc {
+		compatible = "simple-bus";
+		model = "TI TMS320DM365";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x0 0x01c00000 0x400000>;
+
+		serial0: serial@1c20000 {
+			compatible = "ns16550a";
+			reg = <0x20000 0x400>;
+			reg-shift = <2>;
+			clock-frequency = <24000000>;
+			status = "disabled";
+		};
+
+		gpio: gpio@1c67000 {
+			compatible = "ti,dm6441-gpio";
+			gpio-controller;
+			reg = <0x67000 0x800>;
+			#gpio-cells = <2>;
+			ti,ngpio = <107>;
+			status = "disabled";
+		};
+	};
+};
Signature · 7 lines
1.9.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#7 lore raw

Re: [PATCH v2 06/10] ARM: dts: Add TI TMS320DM365 devicetree file

Quoted 26 lines · Antony Pavlov
---
 arch/arm/dts/dm365.dtsi | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
arch/arm/dts/dm365.dtsi new file +15 -0
new file mode 100644
index 0000000..ea69007
@@ -0,0 +1,28 @@
+#include "skeleton.dtsi"
+
+/ {
+	soc {
+		compatible = "simple-bus";
+		model = "TI TMS320DM365";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x0 0x01c00000 0x400000>;
+
+		serial0: serial@1c20000 {
+			compatible = "ns16550a";
+			reg = <0x20000 0x400>;
+			reg-shift = <2>;
+			clock-frequency = <24000000>;

arch/arm/dts/dm365.dtsi line 25

Quoted 10 lines
arch/arm/dts/dm365.dtsi new file +10 -0
+			status = "disabled";
+		};
+
+		gpio: gpio@1c67000 {
+			compatible = "ti,dm6441-gpio";
+			gpio-controller;
+			reg = <0x67000 0x800>;
+			#gpio-cells = <2>;
+			ti,ngpio = <107>;
+			status = "disabled";

The device should be enabled in the dtsi. Virtually every board wants to use it.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#8 lore raw

PATCH v2 7/10 ARM: davinci: add documentation

In reply to Antony Pavlov
---
 arch/arm/mach-arm.dox                  | 2 ++
 arch/arm/mach-davinci/mach-davinci.dox | 5 +++++
 2 files changed, 7 insertions(+)
arch/arm/mach-arm.dox +2 -0
index 758df3f..1d2de48 100644
@@ -54,6 +54,8 @@ For details on specific architectures:
 
 @subsection mach_arm_omap_info OMAP CPUs
 
+@li @subpage dev_davinci_arch
+
 @li @subpage dev_omap_arch
 
 @subsection mach_arm_s3c24xx_info S3C24XX CPUs
arch/arm/mach-davinci/mach-davinci.dox new file +5 -0
new file mode 100644
index 0000000..f0f3a92
@@ -0,0 +1,5 @@
+/** @page dev_davinci_arch TI DaVinci in barebox
+
+@section davinci_boards DaVinci-based boards
+
+*/
Signature · 7 lines
1.9.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#9 lore raw

PATCH v2 8/10 ARM: davinci: add virt2real board support

In reply to Antony Pavlov

The virt2real microcontroller, or virturilka,
is a miniature board for creation of WiFi
or internet controllable smart devices.

See http://virt2real.com for details.

---
 arch/arm/boards/Makefile             |  1 +
 arch/arm/boards/virt2real/Makefile   |  1 +
 arch/arm/boards/virt2real/board.c    | 27 +++++++++++++++++++++++++++
 arch/arm/boards/virt2real/lowlevel.c | 34 ++++++++++++++++++++++++++++++++++
 arch/arm/dts/virt2real.dts           | 35 +++++++++++++++++++++++++++++++++++
 arch/arm/mach-davinci/Kconfig        |  9 +++++++++
 6 files changed, 107 insertions(+)
arch/arm/boards/Makefile +1 -0
index 0d8c9cf..e7af889 100644
@@ -99,4 +99,5 @@ obj-$(CONFIG_MACH_USB_A9263)			+= usb-a926x/
 obj-$(CONFIG_MACH_USB_A9G20)			+= usb-a926x/
 obj-$(CONFIG_MACH_VERSATILEPB)			+= versatile/
 obj-$(CONFIG_MACH_VEXPRESS)			+= vexpress/
+obj-$(CONFIG_MACH_VIRT2REAL)			+= virt2real/
 obj-$(CONFIG_MACH_ZEDBOARD)			+= avnet-zedboard/
arch/arm/boards/virt2real/Makefile new file +1 -0
new file mode 100644
index 0000000..b2f44bb
@@ -0,0 +1 @@
+obj-y += lowlevel.o board.o
arch/arm/boards/virt2real/board.c new file +27 -0
new file mode 100644
index 0000000..b7f7217
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2014 Antony Pavlov <[email protected]>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <common.h>
+#include <init.h>
+
+static int hostname_init(void)
+{
+	barebox_set_hostname("virt2real");
+
+	return 0;
+}
+core_initcall(hostname_init);
arch/arm/boards/virt2real/lowlevel.c new file +34 -0
new file mode 100644
index 0000000..3c90d78
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2014 Antony Pavlov <[email protected]>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#define __LOWLEVEL_INIT__
+
+#include <common.h>
+#include <asm/barebox-arm.h>
+#include <asm/barebox-arm-head.h>
+#include <init.h>
+#include <sizes.h>
+
+#define VIRT2REAL_SRAM_BASE 0x82000000
+#define VIRT2REAL_SRAM_SIZE SZ_16M
+
+void __naked __bare_init barebox_arm_reset_vector(void)
+{
+	arm_cpu_lowlevel_init();
+
+	barebox_arm_entry(VIRT2REAL_SRAM_BASE, VIRT2REAL_SRAM_SIZE, 0);
+}
arch/arm/dts/virt2real.dts new file +35 -0
new file mode 100644
index 0000000..0e2210a
@@ -0,0 +1,35 @@
+/dts-v1/;
+
+#include "dm365.dtsi"
+
+/ {
+	model = "virt2real";
+
+	memory {
+		reg = <0x82000000 0x01000000>;
+	};
+
+	soc {
+		serial0: serial@1c20000 {
+			status = "okay";
+		};
+
+		gpio: gpio@1c67000 {
+			status = "okay";
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		green_led {
+			label = "green led";
+			gpios = <&gpio 73 0>;
+		};
+
+		red_led {
+			label = "red led";
+			gpios = <&gpio 74 0>;
+		};
+	};
+};
arch/arm/mach-davinci/Kconfig +9 -0
index 5677f8d..3165d50 100644
@@ -4,4 +4,13 @@ config ARCH_TEXT_BASE
 	hex
 	default 0x82000000
 
+choice
+	prompt "Davinci Board type"
+
+config MACH_VIRT2REAL
+	bool "Virt2Real"
+	select HAVE_DEFAULT_ENVIRONMENT_NEW
+
+endchoice
+
 endif
Signature · 7 lines
1.9.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#10 lore raw

Re: [PATCH v2 08/10] ARM: davinci: add virt2real board support

Quoted 19 lines · Antony Pavlov

The virt2real microcontroller, or virturilka,
is a miniature board for creation of WiFi
or internet controllable smart devices.

See http://virt2real.com for details.

arch/arm/dts/virt2real.dts new file +14 -0
+/ {
+	model = "virt2real";
+
+	memory {
+		reg = <0x82000000 0x01000000>;
+	};
+
+	soc {
+		serial0: serial@1c20000 {
+			status = "okay";
+		};
+
+		gpio: gpio@1c67000 {
+			status = "okay";

arch/arm/dts/virt2real.dts line 28

Quoted 10 lines
arch/arm/dts/virt2real.dts new file +10 -0
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		green_led {
+			label = "green led";
+			gpios = <&gpio 73 0>;
+		};

You should use labels without whitespaces. I'm not sure if all layers in barebox and the kernel handle whitespaces correctly.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#11 lore raw

PATCH v2 9/10 ARM: virt2real: add documentation

In reply to Antony Pavlov
---
 Documentation/boards.dox                |  1 +
 arch/arm/boards/virt2real/virt2real.dox | 41 +++++++++++++++++++++++++++++++++
 arch/arm/mach-davinci/mach-davinci.dox  |  2 ++
 3 files changed, 44 insertions(+)
Documentation/boards.dox +1 -0
index 6bcc14f..9a14aee 100644
@@ -43,6 +43,7 @@ ARM type:
 @li @subpage tny-a9263
 @li @subpage usb-a9g20-lpw
 @li @subpage usb-a9263
+@li @subpage virt2real
 
 Blackfin type:
 
arch/arm/boards/virt2real/virt2real.dox new file +41 -0

41 lines not on this page · raw message

arch/arm/mach-davinci/mach-davinci.dox +2 -0
index f0f3a92..789eacc 100644
@@ -2,4 +2,6 @@
 
 @section davinci_boards DaVinci-based boards
 
+@li @subpage virt2real
+
 */
Signature · 7 lines
1.9.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#12 lore raw

PATCH v2 10/10 ARM: davinci: add virt2real_defconfig

In reply to Antony Pavlov
---
 arch/arm/configs/virt2real_defconfig | 49 ++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
arch/arm/configs/virt2real_defconfig new file +49 -0
new file mode 100644
index 0000000..a81d18b
@@ -0,0 +1,49 @@
+CONFIG_BUILTIN_DTB=y
+CONFIG_BUILTIN_DTB_NAME="virt2real"
+CONFIG_ARCH_DAVINCI=y
+CONFIG_AEABI=y
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_TEXT_BASE=0x82300000
+CONFIG_MALLOC_SIZE=0x200000
+CONFIG_MALLOC_TLSF=y
+CONFIG_PROMPT="virt2real: "
+CONFIG_LONGHELP=y
+CONFIG_GLOB=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_MENU=y
+CONFIG_PASSWORD=y
+CONFIG_PARTITION=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_LOADY=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_IOMEM=y
+CONFIG_CMD_MM=y
+# CONFIG_CMD_BOOTM is not set
+# CONFIG_CMD_BOOTU is not set
+CONFIG_CMD_RESET=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_PARTITION=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_LED=y
+CONFIG_OFDEVICE=y
+CONFIG_OF_BAREBOX_DRIVERS=y
+CONFIG_DRIVER_SERIAL_NS16550=y
+# CONFIG_SPI is not set
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_GPIO_OF=y
+CONFIG_SHA1=y
+CONFIG_SHA256=y
Signature · 7 lines
1.9.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox