blob: e8edde191f8e0c79725ea8b31b616c750e9e68a1 [file] [log] [blame] [edit]
/*
* Copyright (C) 2015 Nest Labs, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/ {
air-gpios {
reg = <0x0 0>;
compatible = "nestlabs,gpio-exporter";
input-names = "airdatagpio";
input-gpios = <&gpio6 21 GPIO_ACTIVE_HIGH>;
output-names = "airresetgpio", "airbootgpio";
output-gpios = <&gpio6 16 GPIO_ACTIVE_HIGH &gpio6 20 GPIO_ACTIVE_HIGH>;
};
led-trigger-gpios {
reg = <0x0 0>;
compatible = "nestlabs,gpio-exporter";
output-names = "ring", "keypad", "info";
output-gpios = <&gpio4 18 GPIO_ACTIVE_LOW
&gpio7 1 GPIO_ACTIVE_LOW
&gpio7 4 GPIO_ACTIVE_LOW>;
};
};
/* AIR Micro SPI */
&ecspi2 {
fsl,spi-num-chipselects = <1>;
cs-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2_1>;
dmas;
status = "okay";
spidev_air@0 {
compatible = "spidev";
spi-max-frequency = <20000000>;
reg = <0>;
};
};
&i2c2 {
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2_2>;
status = "okay";
/* NFC */
pn548@28 {
compatible = "nxp,pn547";
reg = <0x28>;
interrupt-parent = <&gpio5>;
interrupts = <5 GPIO_ACTIVE_HIGH>;
nxp,pn54x-irq = <&gpio5 5 GPIO_ACTIVE_HIGH>;
nxp,pn54x-ven = <&gpio1 11 GPIO_ACTIVE_HIGH>;
nxp,pn54x-firm = <&gpio1 10 GPIO_ACTIVE_HIGH>;
};
/* Ring LEDS 1,2,3 */
lp55231@32 {
compatible = "national,lp55231", "national,lp5523";
label = "ctrl0";
reg = <0x32>;
clock-mode = /bits/ 8 <1>;
enable-gpio = <&gpio7 2 GPIO_ACTIVE_HIGH>;
chan0 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan1 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan2 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan3 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan4 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan5 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan6 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
chan7 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
chan8 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
};
/* Ring LEDS 7,8,9 */
lp55231@33 {
compatible = "national,lp55231", "national,lp5523";
label = "ctrl1";
reg = <0x33>;
clock-mode = /bits/ 8 <1>;
chan0 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan1 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan2 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan3 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan4 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan5 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan6 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
chan7 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
chan8 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
};
/* Keypad LEDS info */
lp55231@35 {
compatible = "national,lp55231", "national,lp5523";
label = "ctrl8";
reg = <0x35>;
clock-mode = /bits/ 8 <1>;
chan0 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan1 {
led-cur = /bits/ 8 <0>;
max-cur = /bits/ 8 <0>;
};
chan2 {
led-cur = /bits/ 8 <0>;
max-cur = /bits/ 8 <0>;
};
chan3 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan4 {
led-cur = /bits/ 8 <0>;
max-cur = /bits/ 8 <0>;
};
chan5 {
led-cur = /bits/ 8 <0>;
max-cur = /bits/ 8 <0>;
};
chan6 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
chan7 {
led-cur = /bits/ 8 <0>;
max-cur = /bits/ 8 <0>;
};
chan8 {
led-cur = /bits/ 8 <0>;
max-cur = /bits/ 8 <0>;
};
};
/* OPT3001 (ALS) @ 0x44 */
light@44 {
compatible = "ti,opt3001";
reg = <0x44>;
interrupt-parent = <&gpio1>;
interrupts = <9 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};
&i2c3 {
/* Ring LEDS 4,5,6 */
lp55231@32 {
compatible = "national,lp55231", "national,lp5523";
label = "ctrl4";
reg = <0x32>;
clock-mode = /bits/ 8 <1>;
chan0 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan1 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan2 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan3 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan4 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan5 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan6 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
chan7 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
chan8 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
};
/* Keypad LEDS 1,2,3,4,5,6,7,8,9 */
lp55231@33 {
compatible = "national,lp55231", "national,lp5523";
label = "ctrl5";
reg = <0x33>;
clock-mode = /bits/ 8 <1>;
chan0 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <255>;
};
chan1 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <255>;
};
chan2 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <255>;
};
chan3 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <255>;
};
chan4 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <255>;
};
chan5 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <255>;
};
chan6 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <255>;
};
chan7 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <255>;
};
chan8 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <255>;
};
};
/* Keypad LEDS 0,back,enter */
lp55231@34 {
compatible = "national,lp55231", "national,lp5523";
label = "ctrl6";
reg = <0x34>;
clock-mode = /bits/ 8 <1>;
chan0 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan1 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <255>;
};
chan2 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan3 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan4 {
led-cur = /bits/ 8 <0>;
max-cur = /bits/ 8 <0>;
};
chan5 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan6 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
chan7 {
led-cur = /bits/ 8 <0>;
max-cur = /bits/ 8 <0>;
};
chan8 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
};
/* Keypad LEDS stay, home, away */
lp55231@35 {
compatible = "national,lp55231", "national,lp5523";
label = "ctrl7";
reg = <0x35>;
clock-mode = /bits/ 8 <1>;
chan0 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan1 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan2 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan3 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan4 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan5 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <200>;
};
chan6 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
chan7 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
chan8 {
led-cur = /bits/ 8 <1>;
max-cur = /bits/ 8 <250>;
};
};
};
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog &extra_pinctrl_hog>;
hog {
air_hogs: air-hogs {
fsl,pins = <
MX6SX_PAD_GPIO1_IO09__GPIO1_IO_9 0x400000b0 /* opt3001 interrupt */
MX6SX_PAD_SD3_DATA0__GPIO7_IO_2 0x004010b0 /* led enable - ring, keypad, info */
MX6SX_PAD_QSPI1A_DATA2__GPIO4_IO_18 0x000000b0 /* led trigger - ring */
MX6SX_PAD_SD3_CMD__GPIO7_IO_1 0x004000b0 /* led trigger - keypad */
MX6SX_PAD_SD3_DATA2__GPIO7_IO_4 0x004000b0 /* led trigger - info */
MX6SX_PAD_SD4_DATA2__GPIO6_IO_16 0x400010b0 /* AIR mcu reset */
MX6SX_PAD_SD4_DATA6__GPIO6_IO_20 0x400010b0 /* AIR mcu boot0 */
MX6SX_PAD_SD4_DATA0__GPIO6_IO_14 0x400010b0 /* for ecspi2 */
MX6SX_PAD_RGMII1_RXC__GPIO5_IO_5 0x400010b0 /* NFC OOB: interrupt from NFC */
MX6SX_PAD_GPIO1_IO10__GPIO1_IO_10 0x400010b0 /* NFC OOB: firmware download */
MX6SX_PAD_GPIO1_IO11__GPIO1_IO_11 0x400010b0 /* NFC OOB: enable */
>;
};
};
ecspi2 {
pinctrl_ecspi2_1: ecspi2grp-1 {
fsl,pins = <
MX6SX_PAD_SD4_CMD__ECSPI2_MOSI 0x100b1
MX6SX_PAD_SD4_CLK__ECSPI2_MISO 0x100b1
MX6SX_PAD_SD4_DATA1__ECSPI2_SCLK 0x100b1
>;
};
};
i2c2 {
pinctrl_i2c2_2: i2c2grp-2 {
fsl,pins = <
MX6SX_PAD_QSPI1B_DATA2__I2C2_SDA 0x4001f899
MX6SX_PAD_QSPI1B_DATA3__I2C2_SCL 0x4001f899
>;
};
};
uart5 {
pinctrl_uart5_2: uart5grp-2 {
fsl,pins = <
MX6SX_PAD_SD4_DATA4__UART5_RX 0x1b0b1
MX6SX_PAD_SD4_DATA5__UART5_TX 0x1b0b1
>;
};
};
kpp {
pinctrl_kpp_0: kppgrp-0 {
fsl,pins = <
MX6SX_PAD_KEY_COL0__KPP_COL_0 0x110b0
MX6SX_PAD_KEY_COL1__KPP_COL_1 0x110b0
MX6SX_PAD_KEY_COL2__KPP_COL_2 0x110b0
MX6SX_PAD_KEY_COL3__KPP_COL_3 0x110b0
MX6SX_PAD_KEY_ROW0__KPP_ROW_0 0x1f010
MX6SX_PAD_KEY_ROW1__KPP_ROW_1 0x1f010
MX6SX_PAD_KEY_ROW2__KPP_ROW_2 0x1f010
MX6SX_PAD_KEY_ROW3__KPP_ROW_3 0x1f010
>;
};
pinctrl_kpp_0_sleep: kppgrp-0-sleep {
fsl,pins = <
MX6SX_PAD_KEY_COL0__GPIO2_IO_10 0x3080
MX6SX_PAD_KEY_COL1__GPIO2_IO_11 0x3080
MX6SX_PAD_KEY_COL2__GPIO2_IO_12 0x3080
MX6SX_PAD_KEY_COL3__GPIO2_IO_13 0x3080
MX6SX_PAD_KEY_ROW0__GPIO2_IO_15 0x3080
MX6SX_PAD_KEY_ROW1__GPIO2_IO_16 0x3080
MX6SX_PAD_KEY_ROW2__GPIO2_IO_17 0x3080
MX6SX_PAD_KEY_ROW3__GPIO2_IO_18 0x3080
>;
};
};
};
/* AIR Micro UART */
&uart5 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart5_2>;
status = "okay";
};
/* Keypad */
&kpp {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&pinctrl_kpp_0>;
pinctrl-1 = <&pinctrl_kpp_0_sleep>;
linux,keymap = <0x00000002 /* KEY_1 */
0x00010003 /* KEY_2 */
0x00020004 /* KEY_3 */
0x0003003c /* KEY_F2 (STAY) */
0x01000005 /* KEY_4 */
0x0101003e /* KEY_F4 (INFO) */
0x01020007 /* KEY_6 */
0x0103003b /* KEY_F1 (HOME) */
0x02000008 /* KEY_7 */
0x02010009 /* KEY_8 */
0x0202000a /* KEY_9 */
0x0203003d /* KEY_F3 (AWAY) */
0x0300009e /* KEY_BACK */
0x0301000b /* KEY_0 */
0x03020160>; /* KEY_OK */
linux,input-no-autorepeat;
status = "okay";
};