The following series of patches adds support for gpio on AM642 evm/sk.
GPIO test logs,
AM642-evm: https://pastebin.ubuntu.com/p/PCGmY34spb/
AM642-sk: https://pastebin.ubuntu.com/p/nrxzyQTKkX/
Changes since v2:
- Rebased the series on top of ti-k3-dts-next branch
- Added gpio test logs.
Changes since v1:
- Added DT for gpio subsystem present in MCU domain
- reserved the mcu gpio for firmware usage
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
Add device tree nodes for GPIO modules and interrupt controller in main
and mcu domains.
Signed-off-by: Aswath Govindraju <[email protected]>
---
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 a03b66456062..b997d13f9ec5 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
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 <[email protected]>
---
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 9522f104d979..385d99a3bc4f 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
@@ -310,6 +310,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 3a5bee4b0b0c..282fb4185db9 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
@@ -220,6 +220,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
On 19/03/21 10:49 am, Aswath Govindraju wrote:
> Add device tree nodes for GPIO modules and interrupt controller in main
> and mcu domains.
>
> Signed-off-by: Aswath Govindraju <[email protected]>
Reviewed-by: Lokesh Vutla <[email protected]>
Thanks and regards,
Lokesh
> ---
> 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 a03b66456062..b997d13f9ec5 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";
> + };
> };
>
On 19/03/21 10:49 am, Aswath Govindraju wrote:
> 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 <[email protected]>
Reviewed-by: Lokesh Vutla <[email protected]>
Thanks and regards,
Lokesh
On Fri, 19 Mar 2021 10:49:48 +0530, Aswath Govindraju wrote:
> The following series of patches adds support for gpio on AM642 evm/sk.
>
> GPIO test logs,
> AM642-evm: https://pastebin.ubuntu.com/p/PCGmY34spb/
> AM642-sk: https://pastebin.ubuntu.com/p/nrxzyQTKkX/
>
> Changes since v2:
> - Rebased the series on top of ti-k3-dts-next branch
> - Added gpio test logs.
>
> [...]
Hi Aswath Govindraju,
I have applied the following to branch ti-k3-dts-next on [1].
Thank you!
[1/2] arm64: dts: ti: k3-am64: Add GPIO DT nodes
commit: 01a91e01b8fddaeb37b953a5e39eafbdf2d4b061
[2/2] arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware usage
commit: d5a4d5413dd833b3ceba395ba77f00470a3ffbe8
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
[1] git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux.git
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D