summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2014-07-29 01:15:25 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2014-07-29 15:08:29 +0200
commit0e2111deb3963b44f5870fd80c808188d36a49d7 (patch)
tree8d0e9130fba77891e17504aacdbbab1d139f42cc /arch
parent1f789df993fda5c56170114eb014f64d61d320b1 (diff)
downloadbarebox-0e2111deb3963b44f5870fd80c808188d36a49d7.tar.gz
barebox-0e2111deb3963b44f5870fd80c808188d36a49d7.tar.xz
ARM: DIGIC: add Canon PowerShot A1100 IS support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/Makefile1
-rw-r--r--arch/arm/boards/canon-a1100/Makefile1
-rw-r--r--arch/arm/boards/canon-a1100/lowlevel.c23
-rw-r--r--arch/arm/dts/canon-a1100.dts35
-rw-r--r--arch/arm/mach-digic/Kconfig7
5 files changed, 67 insertions, 0 deletions
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index d200512758..e195870439 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_MACH_AT91SAM9N12EK) += at91sam9n12ek/
obj-$(CONFIG_MACH_AT91SAM9X5EK) += at91sam9x5ek/
obj-$(CONFIG_MACH_BEAGLE) += beagle/
obj-$(CONFIG_MACH_BEAGLEBONE) += beaglebone/
+obj-$(CONFIG_MACH_CANON_A1100) += canon-a1100/
obj-$(CONFIG_MACH_NITROGEN6X) += boundarydevices-nitrogen6x/
obj-$(CONFIG_MACH_CCMX51) += ccxmx51/
obj-$(CONFIG_MACH_CFA10036) += crystalfontz-cfa10036/
diff --git a/arch/arm/boards/canon-a1100/Makefile b/arch/arm/boards/canon-a1100/Makefile
new file mode 100644
index 0000000000..b08c4a93ca
--- /dev/null
+++ b/arch/arm/boards/canon-a1100/Makefile
@@ -0,0 +1 @@
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/canon-a1100/lowlevel.c b/arch/arm/boards/canon-a1100/lowlevel.c
new file mode 100644
index 0000000000..bbae825661
--- /dev/null
+++ b/arch/arm/boards/canon-a1100/lowlevel.c
@@ -0,0 +1,23 @@
+#include <common.h>
+#include <sizes.h>
+#include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
+
+void __naked barebox_arm_reset_vector(void)
+{
+ arm_cpu_lowlevel_init();
+
+ /* FIXME: can we determine RAM size using CP15 register?
+ *
+ * see http://chdk.setepontos.com/index.php?topic=5980.90
+ *
+ * http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0363e/Bgbcdeca.html
+ * 4.2.19. c6, MPU memory region programming registers
+ *
+ * But the 'cpuinfo' command says that the Protection
+ * unit is disabled.
+ * The Control Register value (mrc p15, 0, %0, c0, c1, 4)
+ * is 0x00051078.
+ */
+ barebox_arm_entry(0x0, SZ_64M, 0);
+}
diff --git a/arch/arm/dts/canon-a1100.dts b/arch/arm/dts/canon-a1100.dts
new file mode 100644
index 0000000000..a88eacf4d4
--- /dev/null
+++ b/arch/arm/dts/canon-a1100.dts
@@ -0,0 +1,35 @@
+/dts-v1/;
+
+/include/ "digic4.dtsi"
+
+/ {
+ model = "Canon PowerShot A1100 IS";
+ compatible = "canon,a1100";
+
+ memory {
+ reg = <0x00000000 0x04000000>;
+ };
+
+ flash@f8000000 {
+ compatible = "cfi-flash";
+ reg = <0xf8000000 0x08000000>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ direct_print {
+ label = "direct-print (blue)";
+ gpios = <&gpio 51 0>;
+ };
+
+ auto_focus {
+ label = "auto-focus (red)";
+ gpios = <&gpio 55 0>;
+ };
+ };
+};
+
+&timer2 {
+ status = "okay";
+};
diff --git a/arch/arm/mach-digic/Kconfig b/arch/arm/mach-digic/Kconfig
index 49ce44a07e..d25c3b3f51 100644
--- a/arch/arm/mach-digic/Kconfig
+++ b/arch/arm/mach-digic/Kconfig
@@ -3,6 +3,13 @@ if ARCH_DIGIC
choice
prompt "camera type"
+config MACH_CANON_A1100
+ bool "Canon PowerShot A1100 IS"
+
endchoice
+config ARCH_TEXT_BASE
+ hex
+ default 0x00001900 if MACH_CANON_A1100
+
endif