AM64: Add support for GPIO
Subsystems (2)
v3 cover AM64: Add support for GPIO
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(+)
Signature · 1 line
2.17.1
PATCH v3 1/2 arm64: dts: ti: k3-am64: Add GPIO DT nodes
Add device tree nodes for GPIO modules and interrupt controller in main and mcu domains.
--- 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(+)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +45 -0
@@ -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>;
arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi +27 -0
@@ -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"; + }; };
Signature · 1 line
2.17.1
Re: [PATCH v3 1/2] arm64: dts: ti: k3-am64: Add GPIO DT nodes
Quoted 4 lines · Aswath Govindraju
Add device tree nodes for GPIO modules and interrupt controller in main and mcu domains.
Signed-off-by Aswath Govindraju <[email protected]>
Thanks and regards,
Lokesh
Quoted 98 lines
--- 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(+)arch/arm64/boot/dts/ti/k3-am64-main.dtsi +45
-0@@ -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>;arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi +27
-0@@ -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"; + }; };
PATCH v3 2/2 arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware usage
In reply to Aswath GovindrajuThe 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.
--- 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(+)
arch/arm64/boot/dts/ti/k3-am642-evm.dts +5 -0
@@ -310,6 +310,11 @@ }; }; +/* mcu_gpio0 is reserved for mcu firmware usage */ +&mcu_gpio0 { + status = "reserved"; +}; + &mcu_i2c0 { status = "disabled"; };
arch/arm64/boot/dts/ti/k3-am642-sk.dts +5 -0
@@ -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>;
Signature · 1 line
2.17.1
Re: [PATCH v3 2/2] arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware usage
Quoted 4 lines · Aswath Govindraju
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]>
Thanks and regards,
Lokesh
Quoted 11 lines · Aswath Govindraju
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: d5a4d5413dd833b3ceba395ba77f00470a3ffbe8All 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
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D