brcm2708: update linux 4.4 patches to latest version
[openwrt/staging/wigyori.git] / target / linux / brcm2708 / patches-4.4 / 0343-BCM270X_DT-Fix-the-tinylcd35-overlay-RTC-support.patch
1 From 883257ef0684a00823501a440e05f3eb24c1de73 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Thu, 12 May 2016 09:04:20 +0100
4 Subject: [PATCH] BCM270X_DT: Fix the tinylcd35 overlay RTC support
5
6 Now that overlay parameters are applied before the merge (a requirement
7 for kernel runtime overlays) it is illegal for parameters/overrides to
8 target nodes in the base DTB. Solve the problem of only enabling I2C
9 when an RTC option is used by making the RTC fragments conditional,
10 and including the required status="okay" within the fragments.
11
12 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
13 ---
14 arch/arm/boot/dts/overlays/tinylcd35-overlay.dts | 18 ++++++++++--------
15 1 file changed, 10 insertions(+), 8 deletions(-)
16
17 --- a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts
18 +++ b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts
19 @@ -132,28 +132,32 @@
20
21 fragment@5 {
22 target = <&i2c1>;
23 - __overlay__ {
24 + __dormant__ {
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 + status = "okay";
29 +
30 pcf8563: pcf8563@51 {
31 compatible = "nxp,pcf8563";
32 reg = <0x51>;
33 - status = "disabled";
34 + status = "okay";
35 };
36 };
37 };
38
39 fragment@6 {
40 target = <&i2c1>;
41 - __overlay__ {
42 + __dormant__ {
43 #address-cells = <1>;
44 #size-cells = <0>;
45
46 + status = "okay";
47 +
48 ds1307: ds1307@68 {
49 compatible = "maxim,ds1307";
50 reg = <0x68>;
51 - status = "disabled";
52 + status = "okay";
53 };
54 };
55 };
56 @@ -213,10 +217,8 @@
57 <&tinylcd35_ts>,"interrupts:0",
58 <&tinylcd35_ts>,"pendown-gpio:4";
59 xohms = <&tinylcd35_ts>,"ti,x-plate-ohms;0";
60 - rtc-pcf = <&i2c1>,"status",
61 - <&pcf8563>,"status";
62 - rtc-ds = <&i2c1>,"status",
63 - <&ds1307>,"status";
64 + rtc-pcf = <0>,"=5";
65 + rtc-ds = <0>,"=6";
66 keypad = <&keypad>,"status";
67 };
68 };