| From 4ce8d34563d3be663ab72612980d6f2dbe89f125 Mon Sep 17 00:00:00 2001 |
| From: Victor Dodon <printesoi@chromium.org> |
| Date: Tue, 16 Feb 2016 12:02:37 -0800 |
| Subject: [PATCH 3/9] enable and configure i2c-1 |
| |
| --- |
| arch/arm/boot/dts/am335x-bone-pinmux-i2c-1.dtsi | 38 +++++++++++++++++++++++++ |
| arch/arm/boot/dts/am335x-bone.dts | 2 ++ |
| 2 files changed, 40 insertions(+) |
| create mode 100644 arch/arm/boot/dts/am335x-bone-pinmux-i2c-1.dtsi |
| |
| diff --git a/arch/arm/boot/dts/am335x-bone-pinmux-i2c-1.dtsi b/arch/arm/boot/dts/am335x-bone-pinmux-i2c-1.dtsi |
| new file mode 100644 |
| index 0000000..b7b9818 |
| --- /dev/null |
| +++ b/arch/arm/boot/dts/am335x-bone-pinmux-i2c-1.dtsi |
| @@ -0,0 +1,38 @@ |
| +/* |
| + * Copyright (C) 2016 Google, Inc. |
| + * |
| + * This software is licensed under the terms of the GNU General Public |
| + * License version 2, as published by the Free Software Foundation, and |
| + * may be copied, distributed, and modified under those terms. |
| + * |
| + * This program is distributed in the hope that it will be useful, |
| + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| + * GNU General Public License for more details. |
| + */ |
| + |
| +#include <dt-bindings/board/am335x-bbw-bbb-base.h> |
| + |
| +/* For cape universal, a supported mode needs to be added for each pin in |
| + * am335x-bone-common-universal.dtsi */ |
| + |
| +/* Standard */ |
| + |
| +&am33xx_pinmux { |
| + i2c1_pins: pinmux_i2c1_pins { |
| + pinctrl-single,pins = < |
| + /* spi0_d1.i2c1_sda 0x158 */ |
| + BONE_P9_18 (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE2) |
| + /* spi0_cs0.i2c1_scl 0x15c */ |
| + BONE_P9_17 (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE2) |
| + >; |
| + }; |
| +}; |
| + |
| +&i2c1 { |
| + status = "okay"; |
| + pinctrl-names = "default"; |
| + pinctrl-0 = <&i2c1_pins>; |
| + |
| + clock-frequency = <100000>; |
| +}; |
| diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts |
| index 841c5c4..7403b68 100644 |
| --- a/arch/arm/boot/dts/am335x-bone.dts |
| +++ b/arch/arm/boot/dts/am335x-bone.dts |
| @@ -23,6 +23,8 @@ |
| #include "am335x-peripheral-ttyS5.dtsi" |
| #include "am335x-bone-pinmux-ttyS5.dtsi" |
| |
| +#include "am335x-bone-pinmux-i2c-1.dtsi" |
| + |
| / { |
| model = "TI AM335x BeagleBone"; |
| compatible = "ti,am335x-bone", "ti,am33xx"; |
| -- |
| 2.8.0.rc3.226.g39d4020 |
| |