From patchwork Thu Nov 1 15:32:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 1680751 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0CF1540060 for ; Wed, 31 Oct 2012 17:41:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932875Ab2JaRlB (ORCPT ); Wed, 31 Oct 2012 13:41:01 -0400 Received: from li42-95.members.linode.com ([209.123.162.95]:34585 "EHLO li42-95.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932988Ab2JaRjl (ORCPT ); Wed, 31 Oct 2012 13:39:41 -0400 Received: from sles11esa.localdomain (unknown [195.97.110.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: panto) by li42-95.members.linode.com (Postfix) with ESMTPSA id 6767D9C1D4; Wed, 31 Oct 2012 17:39:38 +0000 (UTC) From: Pantelis Antoniou To: Tony Lindgren Cc: Pantelis Antoniou , Paul Walmsley , "Hiremath, Vaibhav" , devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, Koen Kooi , Matt Porter , Russ Dill , linux-omap@vger.kernel.org Subject: [RFC-v2 5/7] capebus: Beaglebone capebus DT update Date: Thu, 1 Nov 2012 17:32:30 +0200 Message-Id: <1351783952-11804-6-git-send-email-panto@antoniou-consulting.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1351783952-11804-1-git-send-email-panto@antoniou-consulting.com> References: <1351783952-11804-1-git-send-email-panto@antoniou-consulting.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Update the common beaglebone's DTS with the required DT entries for all known working capes as of now. Signed-off-by: Pantelis Antoniou --- arch/arm/boot/dts/am335x-bone-common.dtsi | 689 ++++++++++++++++++++++++++++-- 1 file changed, 659 insertions(+), 30 deletions(-) diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi index 99240a5..46d5f27 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -51,6 +51,143 @@ 0x60 0x17 /* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */ >; }; + i2c2_pins: pinmux_i2c2_pins { + pinctrl-single,pins = < + 0x178 0x73 /* uart1_ctsn.i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */ + 0x17c 0x73 /* uart1_rtsn.i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */ + >; + }; + + bone_dvi_cape_led_pins: pinmux_bone_dvi_cape_led_pins { + pinctrl-single,pins = < + 0x48 0x07 /* gpmc_a2.gpio1_18, OUTPUT | MODE7 */ + 0x4c 0x07 /* gpmc_a3.gpio1_19, OUTPUT | MODE7 */ + >; + }; + + bone_dvi_cape_dvi_00A0_pins: pinmux_bone_dvi_cape_dvi_00A0_pins { + pinctrl-single,pins = < + 0x1c 0x07 /* gpmc_ad7.gpio1_7, OUTPUT | MODE7 - DVIPDn */ + + 0xa0 0x08 /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xa4 0x08 /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xa8 0x08 /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xac 0x08 /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb0 0x08 /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb4 0x08 /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb8 0x08 /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xbc 0x08 /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc0 0x08 /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc4 0x08 /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc8 0x08 /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xcc 0x08 /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd0 0x08 /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd4 0x08 /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd8 0x08 /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xdc 0x08 /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xe0 0x00 /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xe4 0x00 /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xe8 0x00 /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + >; + }; + + bone_dvi_cape_dvi_00A1_pins: pinmux_bone_dvi_cape_dvi_00A1_pins { + pinctrl-single,pins = < + 0x84 0x07 /* gpmc_csn2.gpio1_31, OUTPUT | MODE7 - DVIPDn */ + + 0xa0 0x08 /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xa4 0x08 /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xa8 0x08 /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xac 0x08 /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb0 0x08 /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb4 0x08 /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb8 0x08 /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xbc 0x08 /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc0 0x08 /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc4 0x08 /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc8 0x08 /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xcc 0x08 /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd0 0x08 /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd4 0x08 /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd8 0x08 /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xdc 0x08 /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xe0 0x00 /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xe4 0x00 /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xe8 0x00 /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + >; + }; + + bone_geiger_cape_led_pins: pinmux_bone_geiger_cape_led_pins { + pinctrl-single,pins = < + 0xe4 0x07 /* lcd_hsync.gpio2_23, OUTPUT | MODE7 */ + 0xec 0x07 /* lcd_ac_bias_en.gpio2_25, OUTPUT | MODE7 */ + >; + }; + + bone_geiger_cape_pins: pinmux_bone_geiger_cape_pins { + pinctrl-single,pins = < + 0x48 0x06 /* gpmc_a2.ehrpwm1a, OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT */ + /* 0x19c 0x34 */ /* mcasp0_ahclkr.eCAP2_in_PWM2_out, OMAP_MUX_MODE4 | INPUT_PULLUP */ + 0x19c 0x37 /* mcasp0_ahclkr.gpio3_17, OMAP_MUX_MODE4 | INPUT_PULLUP */ + >; + }; + + bone_lcd3_cape_led_00A0_pins: pinmux_bone_lcd3_cape_led_00A0_pins { + pinctrl-single,pins = < + 0x48 0x07 /* gpmc_a2.gpio1_18, OUTPUT | MODE7 */ + 0x4c 0x07 /* gpmc_a3.gpio1_19, OUTPUT | MODE7 */ + >; + }; + + bone_lcd3_cape_lcd_pins: pinmux_bone_lcd3_cape_lcd_pins { + pinctrl-single,pins = < + 0xa0 0x08 /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xa4 0x08 /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xa8 0x08 /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xac 0x08 /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb0 0x08 /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb4 0x08 /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb8 0x08 /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xbc 0x08 /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc0 0x08 /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc4 0x08 /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc8 0x08 /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xcc 0x08 /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd0 0x08 /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd4 0x08 /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd8 0x08 /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xdc 0x08 /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xe0 0x00 /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xe4 0x00 /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xe8 0x00 /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + >; + }; + + bone_lcd3_cape_keys_00A0_pins: pinmux_bone_lcd3_cape_keys_00A0_pins { + pinctrl-single,pins = < + 0x040 0x2f /* gpmc_a0.gpio1_16, INPUT | PULLDIS | MODE7 */ + 0x044 0x2f /* gpmc_a1.gpio1_17, INPUT | PULLDIS | MODE7 */ + 0x1a4 0x2f /* mcasp0_fsr.gpio3_19, INPUT | PULLDIS | MODE7 */ + 0x078 0x2f /* gpmc_ben1.gpio1_28, INPUT | PULLDIS | MODE7 */ + 0x164 0x2f /* ecap0_in_pwm0_out.gpio0_7, INPUT | PULLDIS | MODE7 */ + >; + }; + + pwm_bl_pins: pinmux_pwm_bl_pins { + pinctrl-single,pins = < + 0x4c 0x06 /* gpmc_a3.ehrpwm1b, OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT */ + // 0x48 0x06 /* gpmc_a2.ehrpwm1a, OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT */ + >; + }; + + weather_cape_w1_pins: pinmux_weather_cape_w1_pins { + pinctrl-single,pins = < + 0x0c 0x37 /* gpmc_ad3.gpio1_3, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE7 - w1-gpio */ + >; + }; }; ocp { @@ -92,16 +229,6 @@ }; }; - i2c1: i2c@44e0b000 { - status = "okay"; - clock-frequency = <400000>; - - tps: tps@24 { - reg = <0x24>; - }; - - }; - gpevt { compatible = "gpevt"; pinctrl-names = "default"; @@ -110,15 +237,117 @@ dma-names = "gpioevt"; gpio-evt = <&gpio3 2 0>; }; + + }; + + capebus: capebus@0 { + compatible = "bone-capebus"; + + bone_dvi_cape: cape@0 { + compatible = "bone-generic-cape"; + }; + + bone_geiger_cape: cape@1 { + compatible = "bone-geiger-cape"; + }; + + bone_lcd3_cape: cape@2 { + compatible = "bone-generic-cape"; + }; + + bone_lcd7_cape: cape@3 { + compatible = "bone-lcd7-cape"; + }; + + bone_weather_cape: cape@4 { + compatible = "bone-generic-cape"; + }; + + bone_adafruit_cape: cape@5 { + compatible = "bone-generic-cape"; + }; + + /* overrides; no EEPROM (prototyping) */ +// override@3 { +// compatible = "bone-capebus-slot-override"; +// slot = <3>; +// board-name = "Geiger Cape"; +// version = "00A0"; +// manufacturer = "Geiger Inc"; +// /* TODO: Add the rest */ +// }; + +// override@2 { +// compatible = "bone-capebus-slot-override"; +// slot = <2>; +// board-name = "Weather Cape"; +// version = "00A0"; +// manufacturer = "CCO Inc"; +// /* TODO: Add the rest */ +// }; + +// override@1 { +// compatible = "bone-capebus-slot-override"; +// slot = <1>; +// board-name = "Adafruit 1.8 Cape"; +// version = "00A0"; +// manufacturer = "Adafruit"; +// /* TODO: Add the rest */ +// }; + +// override@0 { +// compatible = "bone-capebus-slot-override"; +// slot = <0>; +// board-name = "BeagleBone Weather CAPE"; +// version = "00A0"; +// manufacturer = "Beagleboardtoys"; +// /* TODO: Add the rest */ +// }; }; - backlight { - compatible = "pwm-backlight"; - pwms = <&ehrpwm1 0 500000 0>; - pwm-names = "st7735fb"; - brightness-levels = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100>; - default-brightness-level = <50>; /* index to the array above */ - }; +}; + +&i2c0 { + status = "okay"; + clock-frequency = <400000>; + + tps: tps@24 { + reg = <0x24>; + }; + + baseboard_eeprom: baseboard_eeprom@50 { + compatible = "at,24c256"; + reg = <0x50>; + }; +}; + +&i2c2 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; + + clock-frequency = <100000>; + + /* OK, I know these are cape but for now it will do */ + cape_eeprom_0: cape_eeprom_0@54 { + compatible = "at,24c256"; + reg = <0x54>; + }; + + cape_eeprom_1: cape_eeprom_1@55 { + compatible = "at,24c256"; + reg = <0x55>; + }; + + cape_eeprom_2: cape_eeprom_2@56 { + compatible = "at,24c256"; + reg = <0x56>; + }; + + cape_eeprom_3: cape_eeprom_3@57 { + compatible = "at,24c256"; + reg = <0x57>; + }; }; /include/ "tps65217.dtsi" @@ -165,6 +394,7 @@ regulator-always-on; }; }; + }; &mmc1 { @@ -172,21 +402,8 @@ }; &spi1 { - status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&spi1_pins>; - - lcd@0 { - compatible = "adafruit,tft-lcd-1.8-green", "sitronix,st7735"; - spi-max-frequency = <8000000>; - reg = <0>; - spi-cpol; - spi-cpha; - pinctrl-names = "default"; - pinctrl-0 = <&lcd_pins>; - st7735-rst = <&gpio4 19 0>; - st7735-dc = <&gpio4 21 0>; - }; }; &edma { @@ -200,3 +417,415 @@ &cpsw_emac1 { phy_id = "4a101000.mdio:01"; }; + +&ehrpwm1 { + status = "okay"; +}; + +&capebus { + slots = <&cape_eeprom_0 &cape_eeprom_1 &cape_eeprom_2 &cape_eeprom_3>; +}; + +&bone_dvi_cape { + board-name = "BeagleBone DVI-D CAPE"; + + /* hacky, since this is not a proper DT platform device */ + /* but until we have DT bindings... */ + version@00A0 { + version = "00A0"; + dvi { + compatible = "da8xx-dt"; + pinctrl-names = "default"; + pinctrl-0 = <&bone_dvi_cape_dvi_00A0_pins>; + ti,hwmods = "lcdc"; + + disp-pll = <560000000>; + panel-type = "1024x768@60"; + powerdn-gpio = <&gpio2 7 0>; + }; + }; + + version@00A1 { + version = "00A1", "01"; + dvi { + compatible = "da8xx-dt"; + pinctrl-names = "default"; + pinctrl-0 = <&bone_dvi_cape_dvi_00A1_pins>; + ti,hwmods = "lcdc"; + + disp-pll = <560000000>; + panel-type = "1024x768@60"; + powerdn-gpio = <&gpio2 31 0>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&bone_dvi_cape_led_pins>; + + dvi-led0 { + label = "dvi:green:usr0"; + gpios = <&gpio2 18 0>; + linux,default-trigger = "heartbeat"; + default-state = "off"; + }; + + dvi-led1 { + label = "dvi:green:usr1"; + gpios = <&gpio2 19 0>; + linux,default-trigger = "mmc0"; + default-state = "off"; + }; + }; +}; + +&bone_geiger_cape { + board-name = "Geiger Cape"; + + /* note that these can't be versioned... */ + pinctrl-names = "default"; + pinctrl-0 = <&bone_geiger_cape_pins>; + + pwms = <&ehrpwm1 0 500000 0>; + pwm-names = "bone-geiger-cape"; + + pwm-frequency = <20000>; /* 20KHz */ + pwm-duty-cycle = <60>; /* 60% */ + + event-blink-delay = <30>; /* 30ms */ + + gpios = <&gpio4 17 0>; /* pulse */ + + vsense-name = "AIN5"; /* analog vsense */ + vsense-scale = <37325>; /* scaling */ + + tscadc { + compatible = "ti-tscadc-dt"; + + ti,hwmods = "adc_tsc"; + + adc-channels = <8>; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&bone_geiger_cape_led_pins>; + + geiger-led0 { + label = "geiger:green:usr0"; + gpios = <&gpio3 23 0>; + linux,default-trigger = "geiger-run"; + default-state = "off"; + }; + + geiger-led1 { + label = "geiger:red:usr1"; + gpios = <&gpio3 25 0>; + linux,default-trigger = "geiger-event"; + default-state = "off"; + }; + }; +}; + +&bone_lcd3_cape { + board-name = "BeagleBone LCD3 CAPE"; + + /* hacky, since this is not a proper DT platform device */ + /* but until we have DT bindings... */ + lcd3 { + compatible = "da8xx-dt"; + pinctrl-names = "default"; + pinctrl-0 = <&bone_lcd3_cape_lcd_pins>; + + ti,hwmods = "lcdc"; + + disp-pll = <16000000>; + panel-type = "CDTech_S035Q01"; + }; + + /* same thing as above */ + tscadc { + compatible = "ti-tscadc-dt"; + + ti,hwmods = "adc_tsc"; + + tsc-wires = <4>; + tsc-x-plate-resistance = <200>; + tsc-steps = <6>; + + adc-channels = <4>; + }; + + version@00A0 { + version = "00A0"; + + backlight { + compatible = "tps65217-backlight"; + isel = <1>; + fdim = <200>; + + tps = <&tps>; /* link to the tps */ + brightness = <100>; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&bone_lcd3_cape_led_00A0_pins>; + + lcd3-led0 { + label = "lcd3:green:usr0"; + gpios = <&gpio2 18 0>; + linux,default-trigger = "heartbeat"; + default-state = "off"; + }; + + lcd3-led1 { + label = "lcd3:green:usr1"; + gpios = <&gpio2 19 0>; + linux,default-trigger = "cpu0"; + default-state = "off"; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&bone_lcd3_cape_keys_00A0_pins>; + + #address-cells = <1>; + #size-cells = <0>; + + button@1 { + debounce_interval = <50>; + linux,code = <105>; + label = "left"; + gpios = <&gpio2 16 0x0>; + gpio-key,wakeup; + autorepeat; + }; + button@2 { + debounce_interval = <50>; + linux,code = <106>; + label = "right"; + gpios = <&gpio2 17 0x0>; + gpio-key,wakeup; + autorepeat; + }; + button@3 { + debounce_interval = <50>; + linux,code = <103>; + label = "up"; + gpios = <&gpio4 19 0x0>; + gpio-key,wakeup; + autorepeat; + }; + button@4 { + debounce_interval = <50>; + linux,code = <108>; + label = "down"; + gpios = <&gpio2 28 0x0>; + gpio-key,wakeup; + autorepeat; + }; + button@5 { + debounce_interval = <50>; + linux,code = <28>; + label = "enter"; + gpios = <&gpio1 7 0x0>; + gpio-key,wakeup; + }; + }; + }; +}; + +&bone_lcd7_cape { + board-name = "BeagleBone LCD7 CAPE"; + + /* hacky, since this is not a proper DT platform device */ + /* but until we have DT bindings... */ + lcd7 { + compatible = "da8xx-dt"; + pinctrl-names = "default"; + pinctrl-0 = <&bone_lcd3_cape_lcd_pins>; + + ti,hwmods = "lcdc"; + + disp-pll = <60000000>; + panel-type = "TFC_S9700RTWV35TR_01B"; + }; + + /* same thing as above */ + tscadc { + compatible = "ti-tscadc-dt"; + + ti,hwmods = "adc_tsc"; + + tsc-wires = <4>; + tsc-x-plate-resistance = <200>; + tsc-steps = <6>; + + adc-channels = <4>; + }; + + version@00A0 { + version = "00A0"; + + backlight { + compatible = "tps65217-backlight"; + isel = <1>; + fdim = <200>; + + tps = <&tps>; /* link to the tps */ + brightness = <100>; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&bone_lcd3_cape_led_00A0_pins>; + + lcd3-led0 { + label = "lcd3:green:usr0"; + gpios = <&gpio2 18 0>; + linux,default-trigger = "heartbeat"; + default-state = "off"; + }; + + lcd3-led1 { + label = "lcd3:green:usr1"; + gpios = <&gpio2 19 0>; + linux,default-trigger = "cpu0"; + default-state = "off"; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&bone_lcd3_cape_keys_00A0_pins>; + + #address-cells = <1>; + #size-cells = <0>; + + button@1 { + debounce_interval = <50>; + linux,code = <105>; + label = "left"; + gpios = <&gpio2 16 0x0>; + gpio-key,wakeup; + autorepeat; + }; + button@2 { + debounce_interval = <50>; + linux,code = <106>; + label = "right"; + gpios = <&gpio2 17 0x0>; + gpio-key,wakeup; + autorepeat; + }; + button@3 { + debounce_interval = <50>; + linux,code = <103>; + label = "up"; + gpios = <&gpio4 19 0x0>; + gpio-key,wakeup; + autorepeat; + }; + button@4 { + debounce_interval = <50>; + linux,code = <108>; + label = "down"; + gpios = <&gpio2 28 0x0>; + gpio-key,wakeup; + autorepeat; + }; + button@5 { + debounce_interval = <50>; + linux,code = <28>; + label = "enter"; + gpios = <&gpio1 7 0x0>; + gpio-key,wakeup; + }; + }; + }; +}; + +&bone_weather_cape { + board-name = "BeagleBone Weather CAPE"; + + i2c2-devices { + compatible = "i2c-dt"; + #address-cells = <1>; + #size-cells = <0>; + + parent = <&i2c2>; + + /* Ambient light sensor */ + tsl2550@39 { + compatible = "tsl,tsl2550"; + reg = <0x39>; + }; + + /* Humidity Sensor */ + sht21@40 { + compatible = "sensiron,sht21"; + reg = <0x40>; + }; + + /* Barometric pressure sensor */ + bmp085@77 { + compatible = "bosch,bmp085"; + reg = <0x77>; + }; + }; + + onewire@0 { + compatible = "w1-gpio"; + pinctrl-names = "default"; + pinctrl-0 = <&weather_cape_w1_pins>; + status = "okay"; + + gpios = <&gpio2 3 0>; + }; + +}; + +&bone_adafruit_cape { + board-name = "Adafruit 1.8 Cape"; + + backlight { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&pwm_bl_pins>; + + pwms = <&ehrpwm1 1 500000 0>; + pwm-names = "st7735fb"; + brightness-levels = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100>; + default-brightness-level = <50>; /* index to the array above */ + }; + + spi1-devices { + compatible = "spi-dt"; + + #address-cells = <1>; + #size-cells = <0>; + + parent = <&spi1>; + + lcd@0 { + compatible = "adafruit,tft-lcd-1.8-red", "sitronix,st7735"; + spi-max-frequency = <8000000>; + reg = <0>; + spi-cpol; + spi-cpha; + pinctrl-names = "default"; + pinctrl-0 = <&lcd_pins>; + st7735-rst = <&gpio4 19 0>; + st7735-dc = <&gpio4 21 0>; + }; + + }; +};