1 From 9b6cc71b7159bebe78cd1ee823a479c0ca485c82 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Fri, 6 May 2016 12:53:16 +0100
4 Subject: [PATCH] BCM270X_DT: i2c0-bcm2708 - pin group params
6 Add parameters to set pin groups as a unit, setting the pin function
7 appropriately. The parameters are:
13 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
15 arch/arm/boot/dts/overlays/README | 11 ++++--
16 .../arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts | 43 +++++++++++++++++-----
17 2 files changed, 42 insertions(+), 12 deletions(-)
19 --- a/arch/arm/boot/dts/overlays/README
20 +++ b/arch/arm/boot/dts/overlays/README
21 @@ -449,10 +449,15 @@ Params: ds1307 Select t
25 -Info: Enable the i2c_bcm2708 driver for the i2c0 bus
26 +Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations
27 + are usable on all platforms.
28 Load: dtoverlay=i2c0-bcm2708,<param>=<val>
29 -Params: sda0_pin GPIO pin for SDA0 (0, 28 [or 44] - default 0)
30 - scl0_pin GPIO pin for SCL0 (1, 29 [or 45] - default 1)
31 +Params: sda0_pin GPIO pin for SDA0 (deprecated - use pins_*)
32 + scl0_pin GPIO pin for SCL0 (deprecated - use pins_*)
33 + pins_0_1 Use pins 0 and 1 (default)
34 + pins_28_29 Use pins 28 and 29
35 + pins_44_45 Use pins 44 and 45
36 + pins_46_47 Use pins 46 and 47
40 --- a/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts
41 +++ b/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts
46 - pinctrl-0 = <&i2c0_pins>;
56 - brcm,function = <4>; /* alt0 */
58 + target = <&i2c0_pins>;
59 + frag1: __overlay__ {
61 + brcm,function = <4>; /* alt0 */
66 + target = <&i2c0_pins>;
68 + brcm,pins = <28 29>;
69 + brcm,function = <4>; /* alt0 */
74 + target = <&i2c0_pins>;
76 + brcm,pins = <44 45>;
77 + brcm,function = <5>; /* alt1 */
82 + target = <&i2c0_pins>;
84 + brcm,pins = <46 47>;
85 + brcm,function = <4>; /* alt0 */
90 - sda0_pin = <&i2c0_pins>,"brcm,pins:0";
91 - scl0_pin = <&i2c0_pins>,"brcm,pins:4";
92 + sda0_pin = <&frag1>,"brcm,pins:0";
93 + scl0_pin = <&frag1>,"brcm,pins:4";
94 + pins_0_1 = <0>,"+1-2-3-4";
95 + pins_28_29 = <0>,"-1+2-3-4";
96 + pins_44_45 = <0>,"-1-2+3-4";
97 + pins_46_47 = <0>,"-1-2-3+4";