This patchset, based on and for the metag tree, adds the necessary
device tree nodes and selects the necessary Kconfig symbols in order to
enable the irq-imgpdc, {pinctrl,gpio}-tz1090[-pdc] drivers once they are
accepted and merged.
The first two patches set things up for metag so that we can include
<dt-bindings/*> files from device tree files.
I plan on applying the first two patches soon, and the others after the
corresponding drivers have been accepted into the appropriate trees on
which they depend.
Cc: Thomas Gleixner <[email protected]>
Cc: Linus Walleij <[email protected]>
James Hogan (7):
metag: add <dt-bindings/> symlink
metag: *.dts: include using preprocessor
metag: tz1090: select and instantiate irq-imgpdc
metag: tz1090: select and instantiate pinctrl-tz1090
metag: tz1090: select and instantiate gpio-tz1090
metag: tz1090: select and instantiate pinctrl-tz1090-pdc
metag: tz1090: instantiate gpio-tz1090-pdc
arch/metag/Kconfig.soc | 5 ++
arch/metag/boot/dts/include/dt-bindings | 1 +
arch/metag/boot/dts/skeleton.dts | 2 +-
arch/metag/boot/dts/tz1090.dtsi | 81 ++++++++++++++++++++++++++++++++-
arch/metag/boot/dts/tz1090_generic.dts | 2 +-
5 files changed, 88 insertions(+), 3 deletions(-)
create mode 120000 arch/metag/boot/dts/include/dt-bindings
--
1.8.1.2
Select ARCH_WANT_OPTIONAL_GPIOLIB from SOC_TZ1090 to allow GPIOLIB and
GPIO_TZ1090 (the main gpio driver) to be enabled once it is merged, and
instantiate it from tz1090.dtsi.
Signed-off-by: James Hogan <[email protected]>
Cc: Linus Walleij <[email protected]>
---
arch/metag/Kconfig.soc | 1 +
arch/metag/boot/dts/tz1090.dtsi | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/arch/metag/Kconfig.soc b/arch/metag/Kconfig.soc
index 944dc30..d61d687 100644
--- a/arch/metag/Kconfig.soc
+++ b/arch/metag/Kconfig.soc
@@ -16,6 +16,7 @@ config META21_FPGA
config SOC_TZ1090
bool "Toumaz Xenif TZ1090 SoC (Comet)"
+ select ARCH_WANT_OPTIONAL_GPIOLIB
select IMGPDC_IRQ
select METAG_LNKGET_AROUND_CACHE
select METAG_META21
diff --git a/arch/metag/boot/dts/tz1090.dtsi b/arch/metag/boot/dts/tz1090.dtsi
index f9cb189..d9e537e 100644
--- a/arch/metag/boot/dts/tz1090.dtsi
+++ b/arch/metag/boot/dts/tz1090.dtsi
@@ -49,5 +49,40 @@
compatible = "img,tz1090-pinctrl";
reg = <0x02005800 0xe4>;
};
+
+ gpios: gpios@02005800 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "img,tz1090-gpio";
+ reg = <0x02005800 0x90>;
+
+ gpios0: bank@0 {
+ gpio-controller;
+ interrupt-controller;
+ #gpio-cells = <2>;
+ #interrupt-cells = <2>;
+ reg = <0>;
+ interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-ranges = <&pinctrl 0 0 30>;
+ };
+ gpios1: bank@1 {
+ gpio-controller;
+ interrupt-controller;
+ #gpio-cells = <2>;
+ #interrupt-cells = <2>;
+ reg = <1>;
+ interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-ranges = <&pinctrl 0 30 30>;
+ };
+ gpios2: bank@2 {
+ gpio-controller;
+ interrupt-controller;
+ #gpio-cells = <2>;
+ #interrupt-cells = <2>;
+ reg = <2>;
+ interrupts = <15 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-ranges = <&pinctrl 0 60 30>;
+ };
+ };
};
};
--
1.8.1.2
Add symlink to include/dt-bindings from arch/metag/boot/dts/include/ to
match the one in arch/arm/... (see the commit below) so that
preprocessed device tree files can include various useful constant
definitions.
Commit c58299aa87544a590c62bda0bf52b69fa56cb8d5 ("kbuild: create an
"include chroot" for DT bindings") merged in v3.10-rc1.
Signed-off-by: James Hogan <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
arch/metag/boot/dts/include/dt-bindings | 1 +
1 file changed, 1 insertion(+)
create mode 120000 arch/metag/boot/dts/include/dt-bindings
diff --git a/arch/metag/boot/dts/include/dt-bindings b/arch/metag/boot/dts/include/dt-bindings
new file mode 120000
index 0000000..08c00e4
--- /dev/null
+++ b/arch/metag/boot/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../../include/dt-bindings
\ No newline at end of file
--
1.8.1.2
Instantiate the PDC GPIO controller driver from tz1090.dtsi ready for
when it is merged.
Signed-off-by: James Hogan <[email protected]>
Cc: Linus Walleij <[email protected]>
---
arch/metag/boot/dts/tz1090.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/metag/boot/dts/tz1090.dtsi b/arch/metag/boot/dts/tz1090.dtsi
index 66cf55d..24ea7d2 100644
--- a/arch/metag/boot/dts/tz1090.dtsi
+++ b/arch/metag/boot/dts/tz1090.dtsi
@@ -90,5 +90,19 @@
gpio-ranges = <&pinctrl 0 60 30>;
};
};
+
+ pdc_gpios: gpios@02006500 {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ compatible = "img,tz1090-pdc-gpio";
+ reg = <0x02006500 0x100>;
+
+ interrupt-parent = <&pdc>;
+ interrupts = <8 IRQ_TYPE_NONE>,
+ <9 IRQ_TYPE_NONE>,
+ <10 IRQ_TYPE_NONE>;
+ gpio-ranges = <&pdc_pinctrl 0 0 7>;
+ };
};
};
--
1.8.1.2
Select PINCTRL_TZ1090_PDC from SOC_TZ1090 to enable the PDC pin
controller driver once it is merged, and instantiate it from
tz1090.dtsi.
Signed-off-by: James Hogan <[email protected]>
Cc: Linus Walleij <[email protected]>
---
arch/metag/Kconfig.soc | 1 +
arch/metag/boot/dts/tz1090.dtsi | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/arch/metag/Kconfig.soc b/arch/metag/Kconfig.soc
index d61d687..973640f 100644
--- a/arch/metag/Kconfig.soc
+++ b/arch/metag/Kconfig.soc
@@ -23,6 +23,7 @@ config SOC_TZ1090
select METAG_SMP_WRITE_REORDERING
select PINCTRL
select PINCTRL_TZ1090
+ select PINCTRL_TZ1090_PDC
help
This is a Toumaz Technology Xenif TZ1090 (A.K.A. Comet) SoC containing
a 2-threaded HTP.
diff --git a/arch/metag/boot/dts/tz1090.dtsi b/arch/metag/boot/dts/tz1090.dtsi
index d9e537e..66cf55d 100644
--- a/arch/metag/boot/dts/tz1090.dtsi
+++ b/arch/metag/boot/dts/tz1090.dtsi
@@ -50,6 +50,12 @@
reg = <0x02005800 0xe4>;
};
+ pdc_pinctrl: pinctrl@02006500 {
+ #gpio-range-cells = <3>;
+ compatible = "img,tz1090-pdc-pinctrl";
+ reg = <0x02006500 0x100>;
+ };
+
gpios: gpios@02005800 {
#address-cells = <1>;
#size-cells = <0>;
--
1.8.1.2
Select PINCTRL and PINCTRL_TZ1090 from SOC_TZ1090 to enable the main pin
controller driver once it is merged, and instantiate it from
tz1090.dtsi.
Signed-off-by: James Hogan <[email protected]>
Cc: Linus Walleij <[email protected]>
---
arch/metag/Kconfig.soc | 2 ++
arch/metag/boot/dts/tz1090.dtsi | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/arch/metag/Kconfig.soc b/arch/metag/Kconfig.soc
index 433befd..944dc30 100644
--- a/arch/metag/Kconfig.soc
+++ b/arch/metag/Kconfig.soc
@@ -20,6 +20,8 @@ config SOC_TZ1090
select METAG_LNKGET_AROUND_CACHE
select METAG_META21
select METAG_SMP_WRITE_REORDERING
+ select PINCTRL
+ select PINCTRL_TZ1090
help
This is a Toumaz Technology Xenif TZ1090 (A.K.A. Comet) SoC containing
a 2-threaded HTP.
diff --git a/arch/metag/boot/dts/tz1090.dtsi b/arch/metag/boot/dts/tz1090.dtsi
index 0ed8023..f9cb189 100644
--- a/arch/metag/boot/dts/tz1090.dtsi
+++ b/arch/metag/boot/dts/tz1090.dtsi
@@ -43,5 +43,11 @@
<29 IRQ_TYPE_LEVEL_HIGH>, /* Perip 1 (IR) */
<31 IRQ_TYPE_LEVEL_HIGH>; /* Perip 2 (WDT) */
};
+
+ pinctrl: pinctrl@02005800 {
+ #gpio-range-cells = <3>;
+ compatible = "img,tz1090-pinctrl";
+ reg = <0x02005800 0xe4>;
+ };
};
};
--
1.8.1.2
Select IMGPDC_IRQ from SOC_TZ1090 to enable the PDC interrupt controller
driver once it is merged, and instantiate it from tz1090.dtsi.
Signed-off-by: James Hogan <[email protected]>
Cc: Thomas Gleixner <[email protected]>
---
arch/metag/Kconfig.soc | 1 +
arch/metag/boot/dts/tz1090.dtsi | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/arch/metag/Kconfig.soc b/arch/metag/Kconfig.soc
index 653b479..433befd 100644
--- a/arch/metag/Kconfig.soc
+++ b/arch/metag/Kconfig.soc
@@ -16,6 +16,7 @@ config META21_FPGA
config SOC_TZ1090
bool "Toumaz Xenif TZ1090 SoC (Comet)"
+ select IMGPDC_IRQ
select METAG_LNKGET_AROUND_CACHE
select METAG_META21
select METAG_SMP_WRITE_REORDERING
diff --git a/arch/metag/boot/dts/tz1090.dtsi b/arch/metag/boot/dts/tz1090.dtsi
index ff7bb74..0ed8023 100644
--- a/arch/metag/boot/dts/tz1090.dtsi
+++ b/arch/metag/boot/dts/tz1090.dtsi
@@ -8,6 +8,8 @@
#include "skeleton.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
+
/ {
compatible = "toumaz,tz1090", "img,meta";
@@ -25,5 +27,21 @@
#address-cells = <1>;
#size-cells = <1>;
ranges;
+
+ pdc: pdc@0x02006000 {
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ reg = <0x02006000 0x1000>;
+ compatible = "img,pdc-intc";
+
+ num-perips = <3>;
+ num-syswakes = <3>;
+
+ interrupts = <18 IRQ_TYPE_LEVEL_HIGH>, /* Syswakes */
+ <30 IRQ_TYPE_LEVEL_HIGH>, /* Perip 0 (RTC) */
+ <29 IRQ_TYPE_LEVEL_HIGH>, /* Perip 1 (IR) */
+ <31 IRQ_TYPE_LEVEL_HIGH>; /* Perip 2 (WDT) */
+ };
};
};
--
1.8.1.2
Include *.dtsi files from *.dts using the preprocessor to set a good
example for future device tree files. Files included in the old way
don't get pre-processed.
Signed-off-by: James Hogan <[email protected]>
Cc: [email protected]
---
arch/metag/boot/dts/skeleton.dts | 2 +-
arch/metag/boot/dts/tz1090.dtsi | 2 +-
arch/metag/boot/dts/tz1090_generic.dts | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/metag/boot/dts/skeleton.dts b/arch/metag/boot/dts/skeleton.dts
index 7244d1f..7a49aeb 100644
--- a/arch/metag/boot/dts/skeleton.dts
+++ b/arch/metag/boot/dts/skeleton.dts
@@ -7,4 +7,4 @@
*/
/dts-v1/;
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
diff --git a/arch/metag/boot/dts/tz1090.dtsi b/arch/metag/boot/dts/tz1090.dtsi
index ca057f0..ff7bb74 100644
--- a/arch/metag/boot/dts/tz1090.dtsi
+++ b/arch/metag/boot/dts/tz1090.dtsi
@@ -6,7 +6,7 @@
* published by the Free Software Foundation.
*/
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
/ {
compatible = "toumaz,tz1090", "img,meta";
diff --git a/arch/metag/boot/dts/tz1090_generic.dts b/arch/metag/boot/dts/tz1090_generic.dts
index aa826cb..f960909 100644
--- a/arch/metag/boot/dts/tz1090_generic.dts
+++ b/arch/metag/boot/dts/tz1090_generic.dts
@@ -7,4 +7,4 @@
*/
/dts-v1/;
-/include/ "tz1090.dtsi"
+#include "tz1090.dtsi"
--
1.8.1.2
On 06/20/2013 06:02 AM, James Hogan wrote:
> Add symlink to include/dt-bindings from arch/metag/boot/dts/include/ to
> match the one in arch/arm/... (see the commit below) so that
> preprocessed device tree files can include various useful constant
> definitions.
>
> Commit c58299aa87544a590c62bda0bf52b69fa56cb8d5 ("kbuild: create an
> "include chroot" for DT bindings") merged in v3.10-rc1.
Reviewed-by: Stephen Warren <[email protected]>
On Thu, Jun 20, 2013 at 2:02 PM, James Hogan <[email protected]> wrote:
> This patchset, based on and for the metag tree, adds the necessary
> device tree nodes and selects the necessary Kconfig symbols in order to
> enable the irq-imgpdc, {pinctrl,gpio}-tz1090[-pdc] drivers once they are
> accepted and merged.
>
> The first two patches set things up for metag so that we can include
> <dt-bindings/*> files from device tree files.
>
> I plan on applying the first two patches soon, and the others after the
> corresponding drivers have been accepted into the appropriate trees on
> which they depend.
>
> Cc: Thomas Gleixner <[email protected]>
> Cc: Linus Walleij <[email protected]>
The series:
Acked-by: Linus Walleij <[email protected]>
Yours,
Linus Walleij
On Mon, 24 Jun 2013 17:16:06 +0200, Linus Walleij <[email protected]> wrote:
> On Thu, Jun 20, 2013 at 2:02 PM, James Hogan <[email protected]> wrote:
>
> > This patchset, based on and for the metag tree, adds the necessary
> > device tree nodes and selects the necessary Kconfig symbols in order to
> > enable the irq-imgpdc, {pinctrl,gpio}-tz1090[-pdc] drivers once they are
> > accepted and merged.
> >
> > The first two patches set things up for metag so that we can include
> > <dt-bindings/*> files from device tree files.
> >
> > I plan on applying the first two patches soon, and the others after the
> > corresponding drivers have been accepted into the appropriate trees on
> > which they depend.
> >
> > Cc: Thomas Gleixner <[email protected]>
> > Cc: Linus Walleij <[email protected]>
>
> The series:
> Acked-by: Linus Walleij <[email protected]>
Me too, for the series:
Acked-by: Grant Likely <[email protected]>