Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Copyright (C) 2013 CircuitCo
- *
- * Virtual cape for I2C2 on connector pins P9.19 P9.20
- *
- * 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.
- */
- /dts-v1/;
- /plugin/;
- / {
- compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green";
- /* identification */
- part-number = "BB-I2C2-ADXL";
- version = "00A0";
- /* state the resources this cape uses */
- exclusive-use =
- /* the pin header uses */
- "P9.19", /* i2c2_sda */
- "P9.20", /* i2c2_scl */
- /* the hardware ip uses */
- "i2c2";
- fragment@0 {
- target = <&am33xx_pinmux>;
- __overlay__ {
- bb_i2c2_pins: pinmux_bb_i2c2_pins {
- pinctrl-single,pins = <
- 0x178 0x73 /* i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
- 0x17c 0x73 /* i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
- >;
- };
- };
- };
- fragment@1 {
- target = <&i2c2>;
- __overlay__ {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&bb_i2c2_pins>;
- /* this is the configuration part */
- clock-frequency = <100000>;
- #address-cells = <1>;
- #size-cells = <0>;
- /* add any i2c devices on the bus here */
- // commented out example of a touchscreen (taken from BB-BONE-LCD7-01-00A4) */
- adxl345@53 {
- compatible = "adi,adxl345";
- reg = <0x53>;//device ID of adxl345
- //interrupt-parent = <&gpio4>;
- //interrupts = <19 0x0>;
- //atmel,irq-gpio = <&gpio4 19 0>;
- };
- };
- };
- };
Add Comment
Please, Sign In to add comment