* [PATCH v2 0/2] AM64: Add support for GPIO
@ 2021-03-04 11:29 Aswath Govindraju
2021-03-04 11:29 ` [PATCH v2 1/2] arm64: dts: ti: k3-am64: Add GPIO DT nodes Aswath Govindraju
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Aswath Govindraju @ 2021-03-04 11:29 UTC (permalink / raw)
Cc: Vignesh Raghavendra, Lokesh Vutla, Kishon Vijay Abraham I,
Grygorii Strashko, Dave Gerlach, Aswath Govindraju,
Nishanth Menon, Tero Kristo, Rob Herring, linux-arm-kernel,
devicetree, linux-kernel
The following series of patches adds support for gpio on AM642 evm/sk.
Changes since v1:
- Added DT for gpio subsystem present in MCU domain
- reserved the mcu gpio for firmware usage
This series of patches depend on,
https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=439039
https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=439153
Aswath Govindraju (2):
arm64: dts: ti: k3-am64: Add GPIO DT nodes
arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware
usage
arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 45 ++++++++++++++++++++++++
arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 27 ++++++++++++++
arch/arm64/boot/dts/ti/k3-am642-evm.dts | 5 +++
arch/arm64/boot/dts/ti/k3-am642-sk.dts | 5 +++
4 files changed, 82 insertions(+)
--
2.17.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] arm64: dts: ti: k3-am64: Add GPIO DT nodes
2021-03-04 11:29 [PATCH v2 0/2] AM64: Add support for GPIO Aswath Govindraju
@ 2021-03-04 11:29 ` Aswath Govindraju
2021-03-04 11:29 ` [PATCH v2 2/2] arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware usage Aswath Govindraju
2021-03-09 14:43 ` [PATCH v2 0/2] AM64: Add support for GPIO Nishanth Menon
2 siblings, 0 replies; 7+ messages in thread
From: Aswath Govindraju @ 2021-03-04 11:29 UTC (permalink / raw)
Cc: Vignesh Raghavendra, Lokesh Vutla, Kishon Vijay Abraham I,
Grygorii Strashko, Dave Gerlach, Aswath Govindraju,
Nishanth Menon, Tero Kristo, Rob Herring, linux-arm-kernel,
devicetree, linux-kernel
Add device tree nodes for GPIO modules and interrupt controller in main
and mcu domains.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
---
arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 45 ++++++++++++++++++++++++
arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 27 ++++++++++++++
2 files changed, 72 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
index 0cf727e3d1e2..f580d5357051 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
@@ -373,6 +373,51 @@
clocks = <&k3_clks 145 0>;
};
+ main_gpio_intr: interrupt-controller0 {
+ compatible = "ti,sci-intr";
+ ti,intr-trigger-type = <1>;
+ interrupt-controller;
+ interrupt-parent = <&gic500>;
+ #interrupt-cells = <1>;
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <3>;
+ ti,interrupt-ranges = <0 32 16>;
+ };
+
+ main_gpio0: gpio@600000 {
+ compatible = "ti,am64-gpio", "ti,keystone-gpio";
+ reg = <0x0 0x00600000 0x0 0x100>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-parent = <&main_gpio_intr>;
+ interrupts = <190>, <191>, <192>,
+ <193>, <194>, <195>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ ti,ngpio = <87>;
+ ti,davinci-gpio-unbanked = <0>;
+ power-domains = <&k3_pds 77 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 77 0>;
+ clock-names = "gpio";
+ };
+
+ main_gpio1: gpio@601000 {
+ compatible = "ti,am64-gpio", "ti,keystone-gpio";
+ reg = <0x0 0x00601000 0x0 0x100>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-parent = <&main_gpio_intr>;
+ interrupts = <180>, <181>, <182>,
+ <183>, <184>, <185>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ ti,ngpio = <88>;
+ ti,davinci-gpio-unbanked = <0>;
+ power-domains = <&k3_pds 78 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 78 0>;
+ clock-names = "gpio";
+ };
+
sdhci0: mmc@fa10000 {
compatible = "ti,am64-sdhci-8bit";
reg = <0x00 0xfa10000 0x00 0x260>, <0x00 0xfa18000 0x00 0x134>;
diff --git a/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi
index 1d2be485a669..99e94dee1bd4 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi
@@ -73,4 +73,31 @@
power-domains = <&k3_pds 148 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 148 0>;
};
+
+ mcu_gpio_intr: interrupt-controller1 {
+ compatible = "ti,sci-intr";
+ ti,intr-trigger-type = <1>;
+ interrupt-controller;
+ interrupt-parent = <&gic500>;
+ #interrupt-cells = <1>;
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <5>;
+ ti,interrupt-ranges = <0 104 4>;
+ };
+
+ mcu_gpio0: gpio@4201000 {
+ compatible = "ti,am64-gpio", "keystone-gpio";
+ reg = <0x0 0x4201000 0x0 0x100>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-parent = <&mcu_gpio_intr>;
+ interrupts = <30>, <31>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ ti,ngpio = <23>;
+ ti,davinci-gpio-unbanked = <0>;
+ power-domains = <&k3_pds 79 TI_SCI_PD_EXCLUSIVE>;
+ clocks = <&k3_clks 79 0>;
+ clock-names = "gpio";
+ };
};
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware usage
2021-03-04 11:29 [PATCH v2 0/2] AM64: Add support for GPIO Aswath Govindraju
2021-03-04 11:29 ` [PATCH v2 1/2] arm64: dts: ti: k3-am64: Add GPIO DT nodes Aswath Govindraju
@ 2021-03-04 11:29 ` Aswath Govindraju
2021-03-09 14:43 ` [PATCH v2 0/2] AM64: Add support for GPIO Nishanth Menon
2 siblings, 0 replies; 7+ messages in thread
From: Aswath Govindraju @ 2021-03-04 11:29 UTC (permalink / raw)
Cc: Vignesh Raghavendra, Lokesh Vutla, Kishon Vijay Abraham I,
Grygorii Strashko, Dave Gerlach, Aswath Govindraju,
Nishanth Menon, Tero Kristo, Rob Herring, linux-arm-kernel,
devicetree, linux-kernel
The gpio0 subsystem present in MCU domain might be used by firmware and is
not pinned out in evm/sk. Therefore, reserve it for MCU firmware.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
---
arch/arm64/boot/dts/ti/k3-am642-evm.dts | 5 +++++
arch/arm64/boot/dts/ti/k3-am642-sk.dts | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am642-evm.dts b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
index 962ef807e286..982b043c5100 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
@@ -279,6 +279,11 @@
};
};
+/* mcu_gpio0 is reserved for mcu firmware usage */
+&mcu_gpio0 {
+ status = "reserved";
+};
+
&mcu_i2c0 {
status = "disabled";
};
diff --git a/arch/arm64/boot/dts/ti/k3-am642-sk.dts b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
index 397ed3b2e121..7ba1d6da4d9d 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
@@ -204,6 +204,11 @@
status = "disabled";
};
+/* mcu_gpio0 is reserved for mcu firmware usage */
+&mcu_gpio0 {
+ status = "reserved";
+};
+
&sdhci1 {
/* SD/MMC */
vmmc-supply = <&vdd_mmc1>;
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] AM64: Add support for GPIO
2021-03-04 11:29 [PATCH v2 0/2] AM64: Add support for GPIO Aswath Govindraju
2021-03-04 11:29 ` [PATCH v2 1/2] arm64: dts: ti: k3-am64: Add GPIO DT nodes Aswath Govindraju
2021-03-04 11:29 ` [PATCH v2 2/2] arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware usage Aswath Govindraju
@ 2021-03-09 14:43 ` Nishanth Menon
2021-03-09 15:50 ` Aswath Govindraju
2 siblings, 1 reply; 7+ messages in thread
From: Nishanth Menon @ 2021-03-09 14:43 UTC (permalink / raw)
To: Aswath Govindraju
Cc: Vignesh Raghavendra, Lokesh Vutla, Kishon Vijay Abraham I,
Grygorii Strashko, Dave Gerlach, Tero Kristo, Rob Herring,
linux-arm-kernel, devicetree, linux-kernel
On 16:59-20210304, Aswath Govindraju wrote:
> The following series of patches adds support for gpio on AM642 evm/sk.
>
> Changes since v1:
> - Added DT for gpio subsystem present in MCU domain
> - reserved the mcu gpio for firmware usage
>
> This series of patches depend on,
> https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=439039
> https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=439153
>
>
> Aswath Govindraju (2):
> arm64: dts: ti: k3-am64: Add GPIO DT nodes
> arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware
> usage
>
> arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 45 ++++++++++++++++++++++++
> arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 27 ++++++++++++++
> arch/arm64/boot/dts/ti/k3-am642-evm.dts | 5 +++
> arch/arm64/boot/dts/ti/k3-am642-sk.dts | 5 +++
> 4 files changed, 82 insertions(+)
>
> --
> 2.17.1
>
Based on your offline comment:
-----
On going through the bootlogs before posting for I found the following
errors,
[ 1.091117] davinci_gpio 601000.gpio: IRQ index 2 not found
[ 1.101522] davinci_gpio 601000.gpio: error -ENXIO: IRQ not populated
Some issues in allocating interrupts in case of main_gpio1. I
accumulated the gpio with interrupt numbers. I'll try to debug the
reason behind it and update you with its status. (bootlogs of ti-sdk,
also have this error).
-----
I am going to drop this off my queue, please update if the fixup is some
system configuration error or repost with fix.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] AM64: Add support for GPIO
2021-03-09 14:43 ` [PATCH v2 0/2] AM64: Add support for GPIO Nishanth Menon
@ 2021-03-09 15:50 ` Aswath Govindraju
2021-03-09 15:58 ` Nishanth Menon
0 siblings, 1 reply; 7+ messages in thread
From: Aswath Govindraju @ 2021-03-09 15:50 UTC (permalink / raw)
To: Nishanth Menon
Cc: Vignesh Raghavendra, Lokesh Vutla, Kishon Vijay Abraham I,
Grygorii Strashko, Dave Gerlach, Tero Kristo, Rob Herring,
linux-arm-kernel, devicetree, linux-kernel
Hi Nishanth,
On 09/03/21 8:13 pm, Nishanth Menon wrote:
> On 16:59-20210304, Aswath Govindraju wrote:
>> The following series of patches adds support for gpio on AM642 evm/sk.
>>
>> Changes since v1:
>> - Added DT for gpio subsystem present in MCU domain
>> - reserved the mcu gpio for firmware usage
>>
>> This series of patches depend on,
>> https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=439039
>> https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=439153
>>
>>
>> Aswath Govindraju (2):
>> arm64: dts: ti: k3-am64: Add GPIO DT nodes
>> arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware
>> usage
>>
>> arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 45 ++++++++++++++++++++++++
>> arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 27 ++++++++++++++
>> arch/arm64/boot/dts/ti/k3-am642-evm.dts | 5 +++
>> arch/arm64/boot/dts/ti/k3-am642-sk.dts | 5 +++
>> 4 files changed, 82 insertions(+)
>>
>> --
>> 2.17.1
>>
>
>
> Based on your offline comment:
> -----
>
> On going through the bootlogs before posting for I found the following
> errors,
>
> [ 1.091117] davinci_gpio 601000.gpio: IRQ index 2 not found
> [ 1.101522] davinci_gpio 601000.gpio: error -ENXIO: IRQ not populated
>
> Some issues in allocating interrupts in case of main_gpio1. I
> accumulated the gpio with interrupt numbers. I'll try to debug the
> reason behind it and update you with its status. (bootlogs of ti-sdk,
> also have this error).
>
> -----
>
> I am going to drop this off my queue, please update if the fixup is some
> system configuration error or repost with fix.
>
This is expected to be a fixup in the system configuration and not a bug
in the patch series. So, can you please have these patches in your queue
? I'll soon post the test results indicating the functioning of GPIOs.
Thanks,
Aswath
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] AM64: Add support for GPIO
2021-03-09 15:50 ` Aswath Govindraju
@ 2021-03-09 15:58 ` Nishanth Menon
2021-03-19 5:22 ` Aswath Govindraju
0 siblings, 1 reply; 7+ messages in thread
From: Nishanth Menon @ 2021-03-09 15:58 UTC (permalink / raw)
To: Aswath Govindraju
Cc: Vignesh Raghavendra, Lokesh Vutla, Kishon Vijay Abraham I,
Grygorii Strashko, Dave Gerlach, Tero Kristo, Rob Herring,
linux-arm-kernel, devicetree, linux-kernel
On 21:20-20210309, Aswath Govindraju wrote:
> Hi Nishanth,
>
> On 09/03/21 8:13 pm, Nishanth Menon wrote:
> > On 16:59-20210304, Aswath Govindraju wrote:
> >> The following series of patches adds support for gpio on AM642 evm/sk.
> >>
> >> Changes since v1:
> >> - Added DT for gpio subsystem present in MCU domain
> >> - reserved the mcu gpio for firmware usage
> >>
> >> This series of patches depend on,
> >> https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=439039
> >> https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=439153
> >>
> >>
> >> Aswath Govindraju (2):
> >> arm64: dts: ti: k3-am64: Add GPIO DT nodes
> >> arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware
> >> usage
> >>
> >> arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 45 ++++++++++++++++++++++++
> >> arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 27 ++++++++++++++
> >> arch/arm64/boot/dts/ti/k3-am642-evm.dts | 5 +++
> >> arch/arm64/boot/dts/ti/k3-am642-sk.dts | 5 +++
> >> 4 files changed, 82 insertions(+)
> >>
> >> --
> >> 2.17.1
> >>
> >
> >
> > Based on your offline comment:
> > -----
> >
> > On going through the bootlogs before posting for I found the following
> > errors,
> >
> > [ 1.091117] davinci_gpio 601000.gpio: IRQ index 2 not found
> > [ 1.101522] davinci_gpio 601000.gpio: error -ENXIO: IRQ not populated
> >
> > Some issues in allocating interrupts in case of main_gpio1. I
> > accumulated the gpio with interrupt numbers. I'll try to debug the
> > reason behind it and update you with its status. (bootlogs of ti-sdk,
> > also have this error).
> >
> > -----
> >
> > I am going to drop this off my queue, please update if the fixup is some
> > system configuration error or repost with fix.
> >
>
> This is expected to be a fixup in the system configuration and not a bug
> in the patch series. So, can you please have these patches in your queue
> ? I'll soon post the test results indicating the functioning of GPIOs.
Thanks for clarifying. I will wait till the test results are posted.
Thanks in advance for digging into this and detailed testing.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] AM64: Add support for GPIO
2021-03-09 15:58 ` Nishanth Menon
@ 2021-03-19 5:22 ` Aswath Govindraju
0 siblings, 0 replies; 7+ messages in thread
From: Aswath Govindraju @ 2021-03-19 5:22 UTC (permalink / raw)
To: Nishanth Menon
Cc: Vignesh Raghavendra, Lokesh Vutla, Kishon Vijay Abraham I,
Grygorii Strashko, Dave Gerlach, Tero Kristo, Rob Herring,
linux-arm-kernel, devicetree, linux-kernel
Hi Nishanth,
On 09/03/21 9:28 pm, Nishanth Menon wrote:
> On 21:20-20210309, Aswath Govindraju wrote:
>> Hi Nishanth,
>>
>> On 09/03/21 8:13 pm, Nishanth Menon wrote:
>>> On 16:59-20210304, Aswath Govindraju wrote:
>>>> The following series of patches adds support for gpio on AM642 evm/sk.
>>>>
>>>> Changes since v1:
>>>> - Added DT for gpio subsystem present in MCU domain
>>>> - reserved the mcu gpio for firmware usage
>>>>
>>>> This series of patches depend on,
>>>> https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=439039
>>>> https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=439153
>>>>
>>>>
>>>> Aswath Govindraju (2):
>>>> arm64: dts: ti: k3-am64: Add GPIO DT nodes
>>>> arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware
>>>> usage
>>>>
>>>> arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 45 ++++++++++++++++++++++++
>>>> arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 27 ++++++++++++++
>>>> arch/arm64/boot/dts/ti/k3-am642-evm.dts | 5 +++
>>>> arch/arm64/boot/dts/ti/k3-am642-sk.dts | 5 +++
>>>> 4 files changed, 82 insertions(+)
>>>>
>>>> --
>>>> 2.17.1
>>>>
>>>
>>>
>>> Based on your offline comment:
>>> -----
>>>
>>> On going through the bootlogs before posting for I found the following
>>> errors,
>>>
>>> [ 1.091117] davinci_gpio 601000.gpio: IRQ index 2 not found
>>> [ 1.101522] davinci_gpio 601000.gpio: error -ENXIO: IRQ not populated
>>>
>>> Some issues in allocating interrupts in case of main_gpio1. I
>>> accumulated the gpio with interrupt numbers. I'll try to debug the
>>> reason behind it and update you with its status. (bootlogs of ti-sdk,
>>> also have this error).
>>>
>>> -----
>>>
>>> I am going to drop this off my queue, please update if the fixup is some
>>> system configuration error or repost with fix.
>>>
>>
>> This is expected to be a fixup in the system configuration and not a bug
>> in the patch series. So, can you please have these patches in your queue
>> ? I'll soon post the test results indicating the functioning of GPIOs.
>
>
> Thanks for clarifying. I will wait till the test results are posted.
> Thanks in advance for digging into this and detailed testing.
>
I've posted a respin(v3) of this series after rebasing on top of
ti-k3-dts-next branch and adding the GPIO test logs.
Thanks,
Aswath
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-03-19 5:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 11:29 [PATCH v2 0/2] AM64: Add support for GPIO Aswath Govindraju
2021-03-04 11:29 ` [PATCH v2 1/2] arm64: dts: ti: k3-am64: Add GPIO DT nodes Aswath Govindraju
2021-03-04 11:29 ` [PATCH v2 2/2] arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware usage Aswath Govindraju
2021-03-09 14:43 ` [PATCH v2 0/2] AM64: Add support for GPIO Nishanth Menon
2021-03-09 15:50 ` Aswath Govindraju
2021-03-09 15:58 ` Nishanth Menon
2021-03-19 5:22 ` Aswath Govindraju
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).