5f7c6f16a36b221e19f55289de42aa04e1ec681d
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.10 / 950-0725-overlays-Add-Ablic-S35390A-to-i2c-rtc-and-gpio.patch
1 From 886c341229589e7d46cbdb8194c23faee0e2a6f9 Mon Sep 17 00:00:00 2001
2 From: WoodenNautilus <86767647+WoodenNautilus@users.noreply.github.com>
3 Date: Tue, 3 Aug 2021 11:13:06 +0200
4 Subject: [PATCH] overlays: Add Ablic S35390A to i2c-rtc and -gpio
5
6 See: https://github.com/raspberrypi/linux/pull/4492
7
8 Signed-off-by: Maxime Torrelli <maxime.torrelli@gmail.com>
9 ---
10 arch/arm/boot/dts/overlays/README | 4 ++++
11 arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi | 17 ++++++++++++++++-
12 2 files changed, 20 insertions(+), 1 deletion(-)
13
14 --- a/arch/arm/boot/dts/overlays/README
15 +++ b/arch/arm/boot/dts/overlays/README
16 @@ -1424,6 +1424,8 @@ Params: abx80x Select o
17
18 sd3078 Select the ZXW Shenzhen whwave SD3078 device
19
20 + s35390a Select the ABLIC S35390A device
21 +
22 i2c0 Choose the I2C0 bus on GPIOs 0&1
23
24 i2c_csi_dsi Choose the I2C0 bus on GPIOs 44&45
25 @@ -1487,6 +1489,8 @@ Params: abx80x Select o
26
27 sd3078 Select the ZXW Shenzhen whwave SD3078 device
28
29 + s35390a Select the ABLIC S35390A device
30 +
31 addr Sets the address for the RTC. Note that the
32 device must be configured to use the specified
33 address.
34 --- a/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
35 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
36 @@ -243,6 +243,19 @@
37 };
38 };
39
40 + fragment@18 {
41 + target = <&i2cbus>;
42 + __dormant__ {
43 + #address-cells = <1>;
44 + #size-cells = <0>;
45 +
46 + s35390a: s35390a@30 {
47 + compatible = "ablic,s35390a";
48 + reg = <0x30>;
49 + };
50 + };
51 + };
52 +
53 __overrides__ {
54 abx80x = <0>,"+0";
55 ds1307 = <0>,"+1";
56 @@ -262,6 +275,7 @@
57 sd3078 = <0>,"+14";
58 pcf85063 = <0>,"+15";
59 pcf85063a = <0>,"+16";
60 + s35390a = <0>,"+18";
61
62 addr = <&abx80x>, "reg:0",
63 <&ds1307>, "reg:0",
64 @@ -272,7 +286,8 @@
65 <&pcf8523>, "reg:0",
66 <&pcf8563>, "reg:0",
67 <&m41t62>, "reg:0",
68 - <&rv1805>, "reg:0";
69 + <&rv1805>, "reg:0",
70 + <&s35390a>, "reg:0";
71 trickle-diode-type = <&abx80x>,"abracon,tc-diode",
72 <&rv1805>,"abracon,tc-diode";
73 trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",