brcm2708: rename target to bcm27xx
[openwrt/staging/wigyori.git] / target / linux / bcm27xx / patches-4.19 / 950-0140-overlays-Add-addr-parameter-to-i2c-rtc-gpio.patch
1 From 20dbf906033167e7c4296eee07437d52627d8ccf Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 9 Jul 2018 21:11:32 +0100
4 Subject: [PATCH] overlays: Add addr parameter to i2c-rtc (& -gpio)
5
6 See: https://github.com/raspberrypi/linux/issues/2611
7
8 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
9 ---
10 arch/arm/boot/dts/overlays/README | 10 +++++++
11 .../dts/overlays/i2c-rtc-gpio-overlay.dts | 28 +++++++++++++++++++
12 .../arm/boot/dts/overlays/i2c-rtc-overlay.dts | 11 ++++++++
13 3 files changed, 49 insertions(+)
14
15 --- a/arch/arm/boot/dts/overlays/README
16 +++ b/arch/arm/boot/dts/overlays/README
17 @@ -817,6 +817,10 @@ Params: abx80x Select o
18
19 pcf8563 Select the PCF8563 device
20
21 + addr Sets the address for the RTC. Note that the
22 + device must be configured to use the specified
23 + address.
24 +
25 trickle-diode-type Diode type for trickle charge - "standard" or
26 "schottky" (ABx80x only)
27
28 @@ -841,6 +845,8 @@ Params: abx80x Select o
29
30 ds3231 Select the DS3231 device
31
32 + m41t62 Select the M41T62 device
33 +
34 mcp7940x Select the MCP7940x device
35
36 mcp7941x Select the MCP7941x device
37 @@ -851,6 +857,10 @@ Params: abx80x Select o
38
39 pcf8563 Select the PCF8563 device
40
41 + addr Sets the address for the RTC. Note that the
42 + device must be configured to use the specified
43 + address.
44 +
45 trickle-diode-type Diode type for trickle charge - "standard" or
46 "schottky" (ABx80x only)
47
48 --- a/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts
49 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts
50 @@ -159,6 +159,21 @@
51 };
52 };
53
54 + fragment@10 {
55 + target = <&i2c_arm>;
56 + __dormant__ {
57 + #address-cells = <1>;
58 + #size-cells = <0>;
59 + status = "okay";
60 +
61 + m41t62: m41t62@68 {
62 + compatible = "st,m41t62";
63 + reg = <0x68>;
64 + status = "okay";
65 + };
66 + };
67 + };
68 +
69 __overrides__ {
70 abx80x = <0>,"+1";
71 ds1307 = <0>,"+2";
72 @@ -169,6 +184,19 @@
73 pcf2127 = <0>,"+7";
74 pcf8523 = <0>,"+8";
75 pcf8563 = <0>,"+9";
76 + m41t62 = <0>,"+10";
77 +
78 + addr = <&abx80x>, "reg:0",
79 + <&ds1307>, "reg:0",
80 + <&ds1339>, "reg:0",
81 + <&ds3231>, "reg:0",
82 + <&mcp7940x>, "reg:0",
83 + <&mcp7941x>, "reg:0",
84 + <&pcf2127>, "reg:0",
85 + <&pcf8523>, "reg:0",
86 + <&pcf8563>, "reg:0",
87 + <&m41t62>, "reg:0";
88 +
89 trickle-diode-type = <&abx80x>,"abracon,tc-diode";
90 trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
91 <&abx80x>,"abracon,tc-resistor";
92 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
93 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
94 @@ -169,6 +169,17 @@
95 pcf8523 = <0>,"+7";
96 pcf8563 = <0>,"+8";
97 m41t62 = <0>,"+9";
98 +
99 + addr = <&abx80x>, "reg:0",
100 + <&ds1307>, "reg:0",
101 + <&ds1339>, "reg:0",
102 + <&ds3231>, "reg:0",
103 + <&mcp7940x>, "reg:0",
104 + <&mcp7941x>, "reg:0",
105 + <&pcf2127>, "reg:0",
106 + <&pcf8523>, "reg:0",
107 + <&pcf8563>, "reg:0",
108 + <&m41t62>, "reg:0";
109 trickle-diode-type = <&abx80x>,"abracon,tc-diode";
110 trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
111 <&abx80x>,"abracon,tc-resistor";