summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Pedash <vyacheslav.pedash@globallogic.com>2022-08-02 19:04:15 +0300
committerVyacheslav Pedash <vyacheslav.pedash@globallogic.com>2022-08-02 19:04:15 +0300
commit7f53c62e68d5dd135a0bf41a06e83ab0669b5a93 (patch)
tree6b9761a5ca1b434e43a4ded8e623c1c4e9070f12
parent4c4ebeb0f5c87380cb85a4ef1a0003a547cebbc7 (diff)
downloadmt-dt-overlay-7f53c62e68d5dd135a0bf41a06e83ab0669b5a93.tar.gz
mt-dt-overlay-7f53c62e68d5dd135a0bf41a06e83ab0669b5a93.tar.bz2
mt-dt-overlay-7f53c62e68d5dd135a0bf41a06e83ab0669b5a93.zip
MTX-4571 Move HW v 0.1 GPIO expanders to the device tree overlay
-rw-r--r--mtcpmhs/gpio-expander-0.1.dtso60
1 files changed, 60 insertions, 0 deletions
diff --git a/mtcpmhs/gpio-expander-0.1.dtso b/mtcpmhs/gpio-expander-0.1.dtso
new file mode 100644
index 0000000..96b5fef
--- /dev/null
+++ b/mtcpmhs/gpio-expander-0.1.dtso
@@ -0,0 +1,60 @@
+/*
+ * DTS overlay for MTCPM 0.1 hardware version.
+ */
+
+/dts-v1/;
+/plugin/;
+
+/*
+ * Location(s):
+ * Put: MTCPM/0.0/gpio-expander.dtbo
+ */
+
+#include "am4372.dtsi"
+#include <dt-bindings/pinctrl/am43xx.h>
+#include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/gpio/gpio.h>
+
+
+/ {
+ compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43";
+ fragment@0 {
+ target-path = "/ocp@44000000/interconnect@48000000/segment@0/target-module@2a000/i2c@0";
+ __overlay__ {
+ gpiom1: gpio@20 {
+ compatible = "microchip,mcp23008";
+ gpio-controller;
+ #gpio-cells = <2>;
+ reg = <0x20>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-controller;
+ #interrupt-cells=<2>;
+ }; /*gpio@20*/
+ gpiom2: gpio@21 {
+ compatible = "microchip,mcp23008";
+ gpio-controller;
+ #gpio-cells = <2>;
+ reg = <0x21>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-controller;
+ #interrupt-cells=<2>;
+ gpio-line-names = "", "", "modesel_0", "modesel_1", "termination_en", "RTS_override", "gpio_exp_led", "";
+ }; /*gpio@20*/
+ }; /*overlay*/
+ }; /*fragment@0*/
+
+ fragement@1 {
+ target-path = "/";
+ __overlay__ {
+ leds-exp {
+ compatible = "gpio-leds";
+ led-gpio {
+ gpios = <&gpiom2 6 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ }; /*led-gpio*/
+ }; /*leds-exp*/
+ }; /*overlay*/
+ }; /*fragement@1*/
+};