mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] Add initial support of at91sam9m10g45ek device tree
@ 2014-08-01 13:42 Raphael Poggi
  2014-08-01 13:42 ` [PATCH 1/2] dt-bindings: pinctrl: add at91 file Raphael Poggi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Raphael Poggi @ 2014-08-01 13:42 UTC (permalink / raw)
  To: barebox

This patchset add the initial support of the at91sam9m10g45ek device tree, and
add the pinctrl device tree binding file.

Raphaël Poggi (2) :
        (1) dt-bindings: pinctrl: add at91 file
        (2) dts: at91: initial support of at91sam9m10g45ek dts


arch/arm/dts/Makefile              |    1 +
arch/arm/dts/at91sam9g45.dtsi      |  105 ++++++++++++++++++++++++++++++++++++
arch/arm/dts/at91sam9m10g45ek.dts  |   22 ++++++++
include/dt-bindings/pinctrl/at91.h |   35 ++++++++++++
4 files changed, 163 insertions(+)


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] dt-bindings: pinctrl: add at91 file
  2014-08-01 13:42 [PATCH 0/2] Add initial support of at91sam9m10g45ek device tree Raphael Poggi
@ 2014-08-01 13:42 ` Raphael Poggi
  2014-08-01 13:42 ` [PATCH 2/2] dts: at91: initial support of at91sam9m10g45ek dts Raphael Poggi
  2014-08-01 16:59 ` [PATCH 0/2] Add initial support of at91sam9m10g45ek device tree Sascha Hauer
  2 siblings, 0 replies; 5+ messages in thread
From: Raphael Poggi @ 2014-08-01 13:42 UTC (permalink / raw)
  To: barebox; +Cc: Raphaël Poggi

From: Raphaël Poggi <poggi.raph@gmail.com>

Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
---
 include/dt-bindings/pinctrl/at91.h |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 include/dt-bindings/pinctrl/at91.h

diff --git a/include/dt-bindings/pinctrl/at91.h b/include/dt-bindings/pinctrl/at91.h
new file mode 100644
index 0000000..0fee6ff
--- /dev/null
+++ b/include/dt-bindings/pinctrl/at91.h
@@ -0,0 +1,35 @@
+/*
+ * This header provides constants for most at91 pinctrl bindings.
+ *
+ * Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * GPLv2 only
+ */
+
+#ifndef __DT_BINDINGS_AT91_PINCTRL_H__
+#define __DT_BINDINGS_AT91_PINCTRL_H__
+
+#define AT91_PINCTRL_NONE		(0 << 0)
+#define AT91_PINCTRL_PULL_UP		(1 << 0)
+#define AT91_PINCTRL_MULTI_DRIVE	(1 << 1)
+#define AT91_PINCTRL_DEGLITCH		(1 << 2)
+#define AT91_PINCTRL_PULL_DOWN		(1 << 3)
+#define AT91_PINCTRL_DIS_SCHMIT		(1 << 4)
+#define AT91_PINCTRL_DEBOUNCE		(1 << 16)
+#define AT91_PINCTRL_DEBOUNCE_VAL(x)	(x << 17)
+
+#define AT91_PINCTRL_PULL_UP_DEGLITCH	(AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DEGLITCH)
+
+#define AT91_PIOA	0
+#define AT91_PIOB	1
+#define AT91_PIOC	2
+#define AT91_PIOD	3
+#define AT91_PIOE	4
+
+#define AT91_PERIPH_GPIO	0
+#define AT91_PERIPH_A		1
+#define AT91_PERIPH_B		2
+#define AT91_PERIPH_C		3
+#define AT91_PERIPH_D		4
+
+#endif /* __DT_BINDINGS_AT91_PINCTRL_H__ */
-- 
1.7.9.5


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] dts: at91: initial support of at91sam9m10g45ek dts
  2014-08-01 13:42 [PATCH 0/2] Add initial support of at91sam9m10g45ek device tree Raphael Poggi
  2014-08-01 13:42 ` [PATCH 1/2] dt-bindings: pinctrl: add at91 file Raphael Poggi
@ 2014-08-01 13:42 ` Raphael Poggi
  2014-08-01 16:59 ` [PATCH 0/2] Add initial support of at91sam9m10g45ek device tree Sascha Hauer
  2 siblings, 0 replies; 5+ messages in thread
From: Raphael Poggi @ 2014-08-01 13:42 UTC (permalink / raw)
  To: barebox; +Cc: Raphaël Poggi

From: Raphaël Poggi <poggi.raph@gmail.com>

Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
---
 arch/arm/dts/Makefile             |    1 +
 arch/arm/dts/at91sam9g45.dtsi     |  105 +++++++++++++++++++++++++++++++++++++
 arch/arm/dts/at91sam9m10g45ek.dts |   22 ++++++++
 3 files changed, 128 insertions(+)
 create mode 100644 arch/arm/dts/at91sam9g45.dtsi
 create mode 100644 arch/arm/dts/at91sam9m10g45ek.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 9bff8a0..5a3405e 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1,6 +1,7 @@
 BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_NAME))
 obj-dtb-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o
 
+pbl-dtb-$(CONFIG_ARCH_AT91) += at91sam9m10g45ek.dtb.o
 pbl-dtb-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o am335x-bone-common.dtb.o
 pbl-dtb-$(CONFIG_MACH_DFI_FS700_M60) += imx6q-dfi-fs700-m60-6q.dtb.o imx6dl-dfi-fs700-m60-6s.dtb.o
 pbl-dtb-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o
diff --git a/arch/arm/dts/at91sam9g45.dtsi b/arch/arm/dts/at91sam9g45.dtsi
new file mode 100644
index 0000000..5b287f2
--- /dev/null
+++ b/arch/arm/dts/at91sam9g45.dtsi
@@ -0,0 +1,105 @@
+/*
+ * at91sam9g45.dtsi - Device Tree Include file for AT91SAM9G45 family SoC
+ *                    applies to AT91SAM9G45, AT91SAM9M10,
+ *                    AT91SAM9G46, AT91SAM9M11 SoC
+ *
+ *  Copyright (C) 2011 Atmel,
+ *                2011 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/pinctrl/at91.h>
+
+/ {
+	model = "Atmel AT91SAM9G45 family SoC";
+	compatible = "atmel,at91sam9g45";
+
+	aliases {
+		gpio0 = &pioA;
+		gpio1 = &pioB;
+		gpio2 = &pioC;
+		gpio3 = &pioD;
+		gpio4 = &pioE;
+	};
+
+	pinctrl@fffff200 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
+		ranges = <0xfffff200 0xfffff200 0xa00>;
+
+		atmel,mux-mask = <
+			  /*    A         B     */
+			   0xffffffff 0xffc003ff  /* pioA */
+			   0xffffffff 0x800f8f00  /* pioB */
+			   0xffffffff 0x00000e00  /* pioC */
+			   0xffffffff 0xff0c1381  /* pioD */
+			   0xffffffff 0x81ffff81  /* pioE */
+			  >;
+
+		i2c0 {
+			pinctrl_i2c0: i2c0-0 {
+				atmel,pins =
+					<AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PA21 periph A TWCK0 */
+					 AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PA20 periph A TWD0 */
+			};
+		};
+
+		i2c1 {
+			pinctrl_i2c1: i2c1-0 {
+				atmel,pins =
+					<AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB11 periph A TWCK1 */
+					 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PB10 periph A TWD1 */
+			};
+		};
+
+	};
+
+
+	pioA: gpio@fffff200 {
+		compatible = "atmel,at91rm9200-gpio";
+		reg = <0xfffff200 0x200>;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+
+	pioB: gpio@fffff400 {
+		compatible = "atmel,at91rm9200-gpio";
+		reg = <0xfffff400 0x200>;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+
+	pioC: gpio@fffff600 {
+		compatible = "atmel,at91rm9200-gpio";
+		reg = <0xfffff600 0x200>;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+
+	pioD: gpio@fffff800 {
+		compatible = "atmel,at91rm9200-gpio";
+		reg = <0xfffff800 0x200>;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+
+	pioE: gpio@fffffa00 {
+		compatible = "atmel,at91rm9200-gpio";
+		reg = <0xfffffa00 0x200>;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+
+	i2c0: i2c@fff84000 {
+		compatible = "atmel,at91sam9g10-i2c";
+		reg = <0xfff84000 0x100>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_i2c0>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+};
diff --git a/arch/arm/dts/at91sam9m10g45ek.dts b/arch/arm/dts/at91sam9m10g45ek.dts
new file mode 100644
index 0000000..df0da9d
--- /dev/null
+++ b/arch/arm/dts/at91sam9m10g45ek.dts
@@ -0,0 +1,22 @@
+/*
+* at91sam9m10g45ek.dts - Device Tree file for AT91SAM9M10G45-EK board
+*
+*  Copyright (C) 2011 Atmel,
+*                2011 Nicolas Ferre <nicolas.ferre@atmel.com>
+*
+* Licensed under GPLv2 or later.
+*/
+
+/dts-v1/;
+
+#include "at91sam9g45.dtsi"
+
+/ {
+	model = "Atmel AT91SAM9M10G45-EK";
+	compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9";
+
+	i2c0: i2c@fff84000 {
+		status = "okay";
+	};
+
+};
-- 
1.7.9.5


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Add initial support of at91sam9m10g45ek device tree
  2014-08-01 13:42 [PATCH 0/2] Add initial support of at91sam9m10g45ek device tree Raphael Poggi
  2014-08-01 13:42 ` [PATCH 1/2] dt-bindings: pinctrl: add at91 file Raphael Poggi
  2014-08-01 13:42 ` [PATCH 2/2] dts: at91: initial support of at91sam9m10g45ek dts Raphael Poggi
@ 2014-08-01 16:59 ` Sascha Hauer
  2014-08-01 17:34   ` Raphaël Poggi
  2 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2014-08-01 16:59 UTC (permalink / raw)
  To: Raphael Poggi; +Cc: barebox

On Fri, Aug 01, 2014 at 03:42:16PM +0200, Raphael Poggi wrote:
> This patchset add the initial support of the at91sam9m10g45ek device tree, and
> add the pinctrl device tree binding file.
> 
> Raphaël Poggi (2) :
>         (1) dt-bindings: pinctrl: add at91 file
>         (2) dts: at91: initial support of at91sam9m10g45ek dts
> 
> 
> arch/arm/dts/Makefile              |    1 +
> arch/arm/dts/at91sam9g45.dtsi      |  105 ++++++++++++++++++++++++++++++++++++
> arch/arm/dts/at91sam9m10g45ek.dts  |   22 ++++++++
> include/dt-bindings/pinctrl/at91.h |   35 ++++++++++++

We already have all these files in the tree. You shouldn't have to
duplicate them. Just create a stub under arch/arm/dts/ including the
real files.

Sascha

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Add initial support of at91sam9m10g45ek device tree
  2014-08-01 16:59 ` [PATCH 0/2] Add initial support of at91sam9m10g45ek device tree Sascha Hauer
@ 2014-08-01 17:34   ` Raphaël Poggi
  0 siblings, 0 replies; 5+ messages in thread
From: Raphaël Poggi @ 2014-08-01 17:34 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Ah yes, sorry. I'll send a v2 to correct this.

Thanks,
Raphaël

2014-08-01 18:59 GMT+02:00 Sascha Hauer <s.hauer@pengutronix.de>:
> On Fri, Aug 01, 2014 at 03:42:16PM +0200, Raphael Poggi wrote:
>> This patchset add the initial support of the at91sam9m10g45ek device tree, and
>> add the pinctrl device tree binding file.
>>
>> Raphaël Poggi (2) :
>>         (1) dt-bindings: pinctrl: add at91 file
>>         (2) dts: at91: initial support of at91sam9m10g45ek dts
>>
>>
>> arch/arm/dts/Makefile              |    1 +
>> arch/arm/dts/at91sam9g45.dtsi      |  105 ++++++++++++++++++++++++++++++++++++
>> arch/arm/dts/at91sam9m10g45ek.dts  |   22 ++++++++
>> include/dt-bindings/pinctrl/at91.h |   35 ++++++++++++
>
> We already have all these files in the tree. You shouldn't have to
> duplicate them. Just create a stub under arch/arm/dts/ including the
> real files.
>
> Sascha
>
> --
> 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
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-01 17:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-01 13:42 [PATCH 0/2] Add initial support of at91sam9m10g45ek device tree Raphael Poggi
2014-08-01 13:42 ` [PATCH 1/2] dt-bindings: pinctrl: add at91 file Raphael Poggi
2014-08-01 13:42 ` [PATCH 2/2] dts: at91: initial support of at91sam9m10g45ek dts Raphael Poggi
2014-08-01 16:59 ` [PATCH 0/2] Add initial support of at91sam9m10g45ek device tree Sascha Hauer
2014-08-01 17:34   ` Raphaël Poggi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox