ARM: dts: imx6qdl-gw: add Gateworks System Controller support
authorTim Harvey <tharvey@gateworks.com>
Thu, 16 Jul 2020 15:35:55 +0000 (08:35 -0700)
committerShawn Guo <shawnguo@kernel.org>
Mon, 20 Jul 2020 01:47:29 +0000 (09:47 +0800)
Add Gateworks System Controller support to Gateworks Ventana boards:
- add dt bindings for GSC mfd driver and hwmon driver for ADC's and
  fan controllers.
- add dt bindings for gpio-keys driver for push-button and interrupt events

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
14 files changed:
arch/arm/boot/dts/imx6qdl-gw51xx.dtsi
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
arch/arm/boot/dts/imx6qdl-gw551x.dtsi
arch/arm/boot/dts/imx6qdl-gw552x.dtsi
arch/arm/boot/dts/imx6qdl-gw553x.dtsi
arch/arm/boot/dts/imx6qdl-gw560x.dtsi
arch/arm/boot/dts/imx6qdl-gw5903.dtsi
arch/arm/boot/dts/imx6qdl-gw5904.dtsi
arch/arm/boot/dts/imx6qdl-gw5907.dtsi
arch/arm/boot/dts/imx6qdl-gw5910.dtsi
arch/arm/boot/dts/imx6qdl-gw5912.dtsi
arch/arm/boot/dts/imx6qdl-gw5913.dtsi

index 419a7cdc8ab51132e0d57026405d3421af4dc040..7705285d9e3c7de096fab0c696534fa78c384337 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        /* these are used by bootloader for disabling nodes */
                bootargs = "console=ttymxc1,115200";
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_an1";
+                       };
+
+                       channel@23 {
+                               gw,mode = <1>;
+                               reg = <0x23>;
+                               label = "vdd_2p5";
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
+               compatible = "nxp,pca9555";
+               reg = <0x23>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
+       };
+
        eeprom1: eeprom@50 {
                compatible = "atmel,24c02";
                reg = <0x50>;
                pagesize = <16>;
        };
 
-       gpio: pca9555@23 {
-               compatible = "nxp,pca9555";
-               reg = <0x23>;
-               gpio-controller;
-               #gpio-cells = <2>;
-       };
-
        rtc: ds1672@68 {
                compatible = "dallas,ds1672";
                reg = <0x68>;
                fsl,pins = <
                        MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
                        MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04           0x0001b0b0 /* GSC_IRQ# */
                >;
        };
 
index 65fe66f0c9ad161e0afad5078529dfab254e5c6d..a46ea98228c209f39a1d4744b697a97ce56f9145 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        /* these are used by bootloader for disabling nodes */
                default-brightness-level = <7>;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_1p0";
+                       };
+
+                       channel@23 {
+                               gw,mode = <1>;
+                               reg = <0x23>;
+                               label = "vdd_2p5";
+                       };
+
+                       channel@29 {
+                               gw,mode = <1>;
+                               reg = <0x29>;
+                               label = "vdd_an1";
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
+               compatible = "nxp,pca9555";
+               reg = <0x23>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
+       };
+
        eeprom1: eeprom@50 {
                compatible = "atmel,24c02";
                reg = <0x50>;
                pagesize = <16>;
        };
 
-       gpio: pca9555@23 {
-               compatible = "nxp,pca9555";
-               reg = <0x23>;
-               gpio-controller;
-               #gpio-cells = <2>;
-       };
-
        rtc: ds1672@68 {
                compatible = "dallas,ds1672";
                reg = <0x68>;
                fsl,pins = <
                        MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
                        MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04           0xb0b1
                >;
        };
 
index 545b7831692df58f348221d1d86d669218d858d9..a28e79463d0cad18fdba69c2f0740928f34af6bf 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        /* these are used by bootloader for disabling nodes */
                default-brightness-level = <7>;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_1p0";
+                       };
+
+                       channel@23 {
+                               gw,mode = <1>;
+                               reg = <0x23>;
+                               label = "vdd_2p5";
+                       };
+
+                       channel@26 {
+                               gw,mode = <1>;
+                               reg = <0x26>;
+                               label = "vdd_gps";
+                       };
+
+                       channel@29 {
+                               gw,mode = <1>;
+                               reg = <0x29>;
+                               label = "vdd_an1";
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
+               compatible = "nxp,pca9555";
+               reg = <0x23>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
+       };
+
        eeprom1: eeprom@50 {
                compatible = "atmel,24c02";
                reg = <0x50>;
                pagesize = <16>;
        };
 
-       gpio: pca9555@23 {
-               compatible = "nxp,pca9555";
-               reg = <0x23>;
-               gpio-controller;
-               #gpio-cells = <2>;
-       };
-
        rtc: ds1672@68 {
                compatible = "dallas,ds1672";
                reg = <0x68>;
                fsl,pins = <
                        MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
                        MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04           0xb0b1
                >;
        };
 
index 52fbc6719fab12354d962004a2b361892399e76f..b5f934b8a239e2620f1c62dad4a55840ce9f8e04 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/sound/fsl-imx-audmux.h>
 
 / {
                default-brightness-level = <7>;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_1p0";
+                       };
+
+                       channel@23 {
+                               gw,mode = <1>;
+                               reg = <0x23>;
+                               label = "vdd_2p5";
+                       };
+
+                       channel@26 {
+                               gw,mode = <1>;
+                               reg = <0x26>;
+                               label = "vdd_gps";
+                       };
+               };
+
+               fan-controller@2c {
+                       compatible = "gw,gsc-fan";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0x2c>;
+               };
+       };
+
+       gsc_gpio: gpio@23 {
+               compatible = "nxp,pca9555";
+               reg = <0x23>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
+       };
+
        eeprom1: eeprom@50 {
                compatible = "atmel,24c02";
                reg = <0x50>;
                pagesize = <16>;
        };
 
-       gpio: pca9555@23 {
-               compatible = "nxp,pca9555";
-               reg = <0x23>;
-               gpio-controller;
-               #gpio-cells = <2>;
-       };
-
        rtc: ds1672@68 {
                compatible = "dallas,ds1672";
                reg = <0x68>;
                fsl,pins = <
                        MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
                        MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04           0xb0b1
                >;
        };
 
index c38e86eedcc011a94ae4f4af3e56099dffe11296..ea41875da6893d8defa41caeee3cd23caecacb83 100644 (file)
@@ -47,6 +47,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/media/tda1997x.h>
+#include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/sound/fsl-imx-audmux.h>
 
 / {
                bootargs = "console=ttymxc1,115200";
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8a";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_1p0b";
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
+               compatible = "nxp,pca9555";
+               reg = <0x23>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
+       };
+
        eeprom1: eeprom@50 {
                compatible = "atmel,24c02";
                reg = <0x50>;
                pagesize = <16>;
        };
 
-       gpio: pca9555@23 {
-               compatible = "nxp,pca9555";
-               reg = <0x23>;
-               gpio-controller;
-               #gpio-cells = <2>;
-       };
-
        rtc: ds1672@68 {
                compatible = "dallas,ds1672";
                reg = <0x68>;
                fsl,pins = <
                        MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
                        MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04           0xb0b1
                >;
        };
 
index bb3597132c62a33a4c62ad3c625664508dd04854..0da6e6f7482b75797a0506a353cd29d9aa093a3d 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        /* these are used by bootloader for disabling nodes */
                bootargs = "console=ttymxc1,115200";
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_1p0";
+                       };
+
+                       channel@23 {
+                               gw,mode = <1>;
+                               reg = <0x23>;
+                               label = "vdd_2p5";
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
+               compatible = "nxp,pca9555";
+               reg = <0x23>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
+       };
+
        eeprom1: eeprom@50 {
                compatible = "atmel,24c02";
                reg = <0x50>;
                pagesize = <16>;
        };
 
-       gpio: pca9555@23 {
-               compatible = "nxp,pca9555";
-               reg = <0x23>;
-               gpio-controller;
-               #gpio-cells = <2>;
-       };
-
        rtc: ds1672@68 {
                compatible = "dallas,ds1672";
                reg = <0x68>;
                fsl,pins = <
                        MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
                        MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04           0xb0b1
                >;
        };
 
index ee85031c3916f8f3544f0ef58c04aa958f7091e8..db30de5d64903a65c0ddde6ef2784662f4298b2a 100644 (file)
@@ -46,6 +46,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        /* these are used by bootloader for disabling nodes */
                stdout-path = &uart2;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
-       gpio: pca9555@23 {
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8a";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_1p0b";
+                       };
+
+                       channel@26 {
+                               gw,mode = <1>;
+                               reg = <0x26>;
+                               label = "vdd_an1";
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
                compatible = "nxp,pca9555";
                reg = <0x23>;
                gpio-controller;
                #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
        };
 
        eeprom1: eeprom@50 {
                fsl,pins = <
                        MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
                        MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04           0xb0b1
                >;
        };
 
index d295898f1dec1e2930e0869932a5c3cb7873a9ab..d6b0745975181d1b489ad3fdb70940e52ebd9ead 100644 (file)
                default-on;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_an1";
+                       };
+
+                       channel@23 {
+                               gw,mode = <1>;
+                               reg = <0x23>;
+                               label = "vdd_2p5";
+                       };
+
+                       channel@26 {
+                               gw,mode = <1>;
+                               reg = <0x26>;
+                               label = "vdd_gps";
+                       };
+
+                       channel@29 {
+                               gw,mode = <1>;
+                               reg = <0x29>;
+                               label = "vdd_an2";
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
+               compatible = "nxp,pca9555";
+               reg = <0x23>;
+               gpio-controller;
+               #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
+       };
+
        eeprom1: eeprom@50 {
                compatible = "atmel,24c02";
                reg = <0x50>;
                pagesize = <16>;
        };
 
-       pca9555: gpio@23 {
-               compatible = "nxp,pca9555";
-               reg = <0x23>;
-               gpio-controller;
-               #gpio-cells = <2>;
-       };
-
        ds1672: rtc@68 {
                compatible = "dallas,ds1672";
                reg = <0x68>;
                fsl,pins = <
                        MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
                        MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04           0xb0b1
                >;
        };
 
index 201c17b15df2b675f6c408cd442187720aed3cb5..fbe6c32bd756591e5c80581a60610800785df26f 100644 (file)
@@ -46,6 +46,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        chosen {
                default-brightness-level = <100>;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
-       pca9555: gpio@23 {
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_an1";
+                       };
+
+                       channel@23 {
+                               gw,mode = <1>;
+                               reg = <0x23>;
+                               label = "vdd_2p5";
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
                compatible = "nxp,pca9555";
                reg = <0x23>;
                gpio-controller;
                #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
        };
 
        eeprom1: eeprom@50 {
index b30c1487252dec4cb3558c47a171a244eed4db8c..23c6e4047621088929b0c6efac3dcd5f41ad9537 100644 (file)
@@ -46,6 +46,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        /* these are used by bootloader for disabling nodes */
                default-brightness-level = <7>;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
-       pca9555: gpio@23 {
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_an1";
+                       };
+
+                       channel@23 {
+                               gw,mode = <1>;
+                               reg = <0x23>;
+                               label = "vdd_2p5";
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
                compatible = "nxp,pca9555";
                reg = <0x23>;
                gpio-controller;
                #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
        };
 
        eeprom1: eeprom@50 {
                fsl,pins = <
                        MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
                        MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04           0x0001b0b0 /* GSC_IRQ# */
                >;
        };
 
index 0bdebddffd510a0eb5ef3ca8d731e04a682c0083..b1ff7c859c4d51181ffeea00ed4cc91925676972 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        /* these are used by bootloader for disabling nodes */
                stdout-path = &uart2;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
-       gpio@23 {
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_an1";
+                       };
+
+                       channel@23 {
+                               gw,mode = <1>;
+                               reg = <0x23>;
+                               label = "vdd_2p5";
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
                compatible = "nxp,pca9555";
                reg = <0x23>;
                gpio-controller;
                #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
        };
 
        eeprom@50 {
                pagesize = <16>;
        };
 
-       rtc@68 {
+       ds1672@68 {
                compatible = "dallas,ds1672";
                reg = <0x68>;
        };
index 0857de5051921e3cc5a5a1024c507d23862d0d4d..11f84ee7b88f6a9c3e616a0745dafc3b824a806b 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        /* these are used by bootloader for disabling nodes */
                reg = <0x10000000 0x20000000>;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
-       gpio@23 {
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@6 {
+                               gw,mode = <0>;
+                               reg = <0x06>;
+                               label = "temp";
+                       };
+
+                       channel@8 {
+                               gw,mode = <3>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@82 {
+                               gw,mode = <2>;
+                               reg = <0x82>;
+                               label = "vdd_vin";
+                               gw,voltage-divider-ohms = <22100 1000>;
+                               gw,voltage-offset-microvolt = <800000>;
+                       };
+
+                       channel@84 {
+                               gw,mode = <2>;
+                               reg = <0x84>;
+                               label = "vdd_5p0";
+                               gw,voltage-divider-ohms = <22100 10000>;
+                       };
+
+                       channel@86 {
+                               gw,mode = <2>;
+                               reg = <0x86>;
+                               label = "vdd_3p3";
+                               gw,voltage-divider-ohms = <10000 10000>;
+                       };
+
+                       channel@88 {
+                               gw,mode = <2>;
+                               reg = <0x88>;
+                               label = "vdd_2p5";
+                               gw,voltage-divider-ohms = <10000 10000>;
+                       };
+
+                       channel@8c {
+                               gw,mode = <2>;
+                               reg = <0x8c>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@8e {
+                               gw,mode = <2>;
+                               reg = <0x8e>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@90 {
+                               gw,mode = <2>;
+                               reg = <0x90>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@92 {
+                               gw,mode = <2>;
+                               reg = <0x92>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@98 {
+                               gw,mode = <2>;
+                               reg = <0x98>;
+                               label = "vdd_1p8";
+                       };
+
+                       channel@9a {
+                               gw,mode = <2>;
+                               reg = <0x9a>;
+                               label = "vdd_1p0";
+                               gw,voltage-divider-ohms = <10000 10000>;
+                       };
+
+                       channel@9c {
+                               gw,mode = <2>;
+                               reg = <0x9c>;
+                               label = "vdd_an1";
+                               gw,voltage-divider-ohms = <10000 10000>;
+                       };
+
+                       channel@a2 {
+                               gw,mode = <2>;
+                               reg = <0xa2>;
+                               label = "vdd_gsc";
+                               gw,voltage-divider-ohms = <10000 10000>;
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
                compatible = "nxp,pca9555";
                reg = <0x23>;
                gpio-controller;
                #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
        };
 
        eeprom@50 {
index 8c57fd2f9a0b507d906d9236b863fab25b0ca560..0a1ffff9eb750d268d04d0bcecb15fc20425242d 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        /* these are used by bootloader for disabling nodes */
                stdout-path = &uart2;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
-       gpio@23 {
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@0 {
+                               gw,mode = <0>;
+                               reg = <0x00>;
+                               label = "temp";
+                       };
+
+                       channel@2 {
+                               gw,mode = <1>;
+                               reg = <0x02>;
+                               label = "vdd_vin";
+                       };
+
+                       channel@5 {
+                               gw,mode = <1>;
+                               reg = <0x05>;
+                               label = "vdd_3p3";
+                       };
+
+                       channel@8 {
+                               gw,mode = <1>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@b {
+                               gw,mode = <1>;
+                               reg = <0x0b>;
+                               label = "vdd_5p0";
+                       };
+
+                       channel@e {
+                               gw,mode = <1>;
+                               reg = <0xe>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@11 {
+                               gw,mode = <1>;
+                               reg = <0x11>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@14 {
+                               gw,mode = <1>;
+                               reg = <0x14>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@17 {
+                               gw,mode = <1>;
+                               reg = <0x17>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@1d {
+                               gw,mode = <1>;
+                               reg = <0x1d>;
+                               label = "vdd_1p8";
+                       };
+
+                       channel@20 {
+                               gw,mode = <1>;
+                               reg = <0x20>;
+                               label = "vdd_1p0";
+                       };
+
+                       channel@23 {
+                               gw,mode = <1>;
+                               reg = <0x23>;
+                               label = "vdd_2p5";
+                       };
+               };
+
+               fan-controller@a {
+                       compatible = "gw,gsc-fan";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0x0a>;
+               };
+       };
+
+       gsc_gpio: gpio@23 {
                compatible = "nxp,pca9555";
                reg = <0x23>;
                gpio-controller;
                #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
        };
 
        eeprom@50 {
index 635c203bd64d132ac6e64bc95d648f4d495941d8..d62a8da493670ed7070bb925b833329405b9a2ec 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        /* these are used by bootloader for disabling nodes */
                stdout-path = &uart2;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user-pb {
+                       label = "user_pb";
+                       gpios = <&gsc_gpio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+               };
+
+               user-pb1x {
+                       label = "user_pb1x";
+                       linux,code = <BTN_1>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <0>;
+               };
+
+               key-erased {
+                       label = "key-erased";
+                       linux,code = <BTN_2>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <1>;
+               };
+
+               eeprom-wp {
+                       label = "eeprom_wp";
+                       linux,code = <BTN_3>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <2>;
+               };
+
+               tamper {
+                       label = "tamper";
+                       linux,code = <BTN_4>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <5>;
+               };
+
+               switch-hold {
+                       label = "switch_hold";
+                       linux,code = <BTN_5>;
+                       interrupt-parent = <&gsc>;
+                       interrupts = <7>;
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
-       gpio@23 {
+       gsc: gsc@20 {
+               compatible = "gw,gsc";
+               reg = <0x20>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <4 GPIO_ACTIVE_LOW>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #size-cells = <0>;
+
+               adc {
+                       compatible = "gw,gsc-adc";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       channel@6 {
+                               gw,mode = <0>;
+                               reg = <0x06>;
+                               label = "temp";
+                       };
+
+                       channel@8 {
+                               gw,mode = <3>;
+                               reg = <0x08>;
+                               label = "vdd_bat";
+                       };
+
+                       channel@82 {
+                               gw,mode = <2>;
+                               reg = <0x82>;
+                               label = "vdd_vin";
+                               gw,voltage-divider-ohms = <22100 1000>;
+                               gw,voltage-offset-microvolt = <800000>;
+                       };
+
+                       channel@84 {
+                               gw,mode = <2>;
+                               reg = <0x84>;
+                               label = "vdd_5p0";
+                               gw,voltage-divider-ohms = <22100 10000>;
+                       };
+
+                       channel@86 {
+                               gw,mode = <2>;
+                               reg = <0x86>;
+                               label = "vdd_3p3";
+                               gw,voltage-divider-ohms = <10000 10000>;
+                       };
+
+                       channel@88 {
+                               gw,mode = <2>;
+                               reg = <0x88>;
+                               label = "vdd_2p5";
+                               gw,voltage-divider-ohms = <10000 10000>;
+                       };
+
+                       channel@8c {
+                               gw,mode = <2>;
+                               reg = <0x8c>;
+                               label = "vdd_arm";
+                       };
+
+                       channel@8e {
+                               gw,mode = <2>;
+                               reg = <0x8e>;
+                               label = "vdd_soc";
+                       };
+
+                       channel@90 {
+                               gw,mode = <2>;
+                               reg = <0x90>;
+                               label = "vdd_1p5";
+                       };
+
+                       channel@92 {
+                               gw,mode = <2>;
+                               reg = <0x92>;
+                               label = "vdd_1p0";
+                       };
+
+                       channel@98 {
+                               gw,mode = <2>;
+                               reg = <0x98>;
+                               label = "vdd_3p0";
+                       };
+
+                       channel@9a {
+                               gw,mode = <2>;
+                               reg = <0x9a>;
+                               label = "vdd_an1";
+                               gw,voltage-divider-ohms = <10000 10000>;
+                       };
+
+                       channel@a2 {
+                               gw,mode = <2>;
+                               reg = <0xa2>;
+                               label = "vdd_gsc";
+                               gw,voltage-divider-ohms = <10000 10000>;
+                       };
+               };
+       };
+
+       gsc_gpio: gpio@23 {
                compatible = "nxp,pca9555";
                reg = <0x23>;
                gpio-controller;
                #gpio-cells = <2>;
+               interrupt-parent = <&gsc>;
+               interrupts = <4>;
        };
 
        eeprom@50 {