metag: tz1090: add irq-pdc, pinctrl and gpio to DT
Subsystems (2)
cover metag: tz1090: add irq-pdc, pinctrl and gpio to DT
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.
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
Signature · 1 line
1.8.1.2
PATCH 1/7 metag: add <dt-bindings/> symlink
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.
--- arch/metag/boot/dts/include/dt-bindings | 1 + 1 file changed, 1 insertion(+) create mode 120000 arch/metag/boot/dts/include/dt-bindings
arch/metag/boot/dts/include/dt-bindings new file +1 -0
@@ -0,0 +1 @@ +../../../../../include/dt-bindings
Signature · 1 line
1.8.1.2
Re: [PATCH 1/7] metag: add <dt-bindings/> symlink
Quoted 7 lines · James Hogan
Add symlink to
include/dt-bindingsfromarch/metag/boot/dts/include/to match the one inarch/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.
PATCH 2/7 metag: *.dts: include using preprocessor
In reply to James HoganInclude *.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.
--- 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(-)
arch/metag/boot/dts/skeleton.dts +1 -1
@@ -7,4 +7,4 @@ */ /dts-v1/; -/include/ "skeleton.dtsi" +#include "skeleton.dtsi"
arch/metag/boot/dts/tz1090.dtsi +1 -1
@@ -6,7 +6,7 @@ * published by the Free Software Foundation. */ -/include/ "skeleton.dtsi" +#include "skeleton.dtsi" / { compatible = "toumaz,tz1090", "img,meta";
arch/metag/boot/dts/tz1090_generic.dts +1 -1
@@ -7,4 +7,4 @@ */ /dts-v1/; -/include/ "tz1090.dtsi" +#include "tz1090.dtsi"
Signature · 1 line
1.8.1.2
PATCH 3/7 metag: tz1090: select and instantiate irq-imgpdc
In reply to James HoganSelect IMGPDC_IRQ from SOC_TZ1090 to enable the PDC interrupt controller driver once it is merged, and instantiate it from tz1090.dtsi.
--- arch/metag/Kconfig.soc | 1 + arch/metag/boot/dts/tz1090.dtsi | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+)
arch/metag/Kconfig.soc +1 -0
@@ -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
arch/metag/boot/dts/tz1090.dtsi +18 -0
@@ -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) */ + }; }; };
Signature · 1 line
1.8.1.2
PATCH 4/7 metag: tz1090: select and instantiate pinctrl-tz1090
In reply to James HoganSelect PINCTRL and PINCTRL_TZ1090 from SOC_TZ1090 to enable the main pin controller driver once it is merged, and instantiate it from tz1090.dtsi.
--- arch/metag/Kconfig.soc | 2 ++ arch/metag/boot/dts/tz1090.dtsi | 6 ++++++ 2 files changed, 8 insertions(+)
arch/metag/Kconfig.soc +2 -0
@@ -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.
arch/metag/boot/dts/tz1090.dtsi +6 -0
@@ -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>; + }; }; };
Signature · 1 line
1.8.1.2
PATCH 5/7 metag: tz1090: select and instantiate gpio-tz1090
In reply to James HoganSelect 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.
--- arch/metag/Kconfig.soc | 1 + arch/metag/boot/dts/tz1090.dtsi | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+)
arch/metag/Kconfig.soc +1 -0
@@ -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
arch/metag/boot/dts/tz1090.dtsi +35 -0
@@ -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>; + }; + }; }; };
Signature · 1 line
1.8.1.2
PATCH 6/7 metag: tz1090: select and instantiate pinctrl-tz1090-pdc
In reply to James HoganSelect PINCTRL_TZ1090_PDC from SOC_TZ1090 to enable the PDC pin controller driver once it is merged, and instantiate it from tz1090.dtsi.
--- arch/metag/Kconfig.soc | 1 + arch/metag/boot/dts/tz1090.dtsi | 6 ++++++ 2 files changed, 7 insertions(+)
arch/metag/Kconfig.soc +1 -0
@@ -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.
arch/metag/boot/dts/tz1090.dtsi +6 -0
@@ -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>;
Signature · 1 line
1.8.1.2
PATCH 7/7 metag: tz1090: instantiate gpio-tz1090-pdc
In reply to James HoganInstantiate the PDC GPIO controller driver from tz1090.dtsi ready for when it is merged.
--- arch/metag/boot/dts/tz1090.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/metag/boot/dts/tz1090.dtsi +14 -0
@@ -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>; + }; }; };
Signature · 1 line
1.8.1.2
Quoted 8 lines · James Hogan
This patchset, based on and for the metag tree, adds the necessary device tree nodes and selects the necessary
Kconfigsymbols 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.
Quoted 6 lines
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:
Yours,
Linus Walleij
Grant Likely
Acked-byQuoted 14 lines · Linus Walleij
Quoted 12 lines · James Hogan
This patchset, based on and for the metag tree, adds the necessary device tree nodes and selects the necessary
Kconfigsymbols 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.
Quoted 5 lines
Quoted 2 lines
Cc Thomas Gleixner <[email protected]>Cc Linus Walleij <[email protected]>The series:
Acked-by Linus Walleij <[email protected]>
Me too, for the series: