BCM2708: Add core Device Tree support
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / balena-fin-overlay.dts
1 /dts-v1/;
2 /plugin/;
3
4 #include <dt-bindings/gpio/gpio.h>
5
6 /{
7         compatible = "brcm,bcm2835";
8
9         fragment@0 {
10                 target = <&mmcnr>;
11                 __overlay__ {
12                         pinctrl-names = "default";
13                         pinctrl-0 = <&sdio_pins>;
14                         bus-width = <4>;
15                         brcm,overclock-50 = <35>;
16                         status = "okay";
17                 };
18         };
19
20         fragment@1 {
21                 target = <&gpio>;
22                 __overlay__ {
23                         sdio_pins: sdio_ovl_pins {
24                                 brcm,pins = <34 35 36 37 38 39>;
25                                 brcm,function = <7>; /* ALT3 = SD1 */
26                                 brcm,pull = <0 2 2 2 2 2>;
27                         };
28
29                         power_ctrl_pins: power_ctrl_pins {
30                                 brcm,pins = <40>;
31                                 brcm,function = <1>; // out
32                         };
33                 };
34         };
35
36         fragment@2 {
37                 target-path = "/";
38                 __overlay__ {
39                         // We should switch to mmc-pwrseq-sd8787 after making it
40                         // compatible with sd8887
41                         // Currently that module requires two GPIOs to function since it
42                         // targets a slightly different chip
43                         power_ctrl: power_ctrl {
44                                 compatible = "gpio-poweroff";
45                                 gpios = <&gpio 40 1>;
46                                 force;
47                                 pinctrl-names = "default";
48                                 pinctrl-0 = <&power_ctrl_pins>;
49                         };
50
51                         i2c_soft: i2c@0 {
52                                 compatible = "i2c-gpio";
53                                 gpios = <&gpio 43 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) /* sda */
54                                          &gpio 42 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) /* scl */>;
55                                 i2c-gpio,delay-us = <5>;
56                                 i2c-gpio,scl-open-drain;
57                                 i2c-gpio,sda-open-drain;
58                                 #address-cells = <1>;
59                                 #size-cells = <0>;
60                         };
61
62                         sd8xxx-wlan {
63                                 drvdbg = <0x6>;
64                                 drv_mode = <0x1>;
65                                 cfg80211_wext = <0xf>;
66                                 sta_name = "wlan";
67                                 wfd_name = "p2p";
68                                 cal_data_cfg = "none";
69                         };
70                 };
71         };
72
73         fragment@3 {
74                 target = <&i2c_soft>;
75                 __overlay__ {
76                         #address-cells = <1>;
77                         #size-cells = <0>;
78                         status = "okay";
79
80                         gpio_expander: gpio_expander@20 {
81                                 compatible = "nxp,pca9554";
82                                 gpio-controller;
83                                 #gpio-cells = <2>;
84                                 reg = <0x20>;
85                                 status = "okay";
86                         };
87
88                         // rtc clock
89                         ds1307: ds1307@68 {
90                                 compatible = "dallas,ds1307";
91                                 reg = <0x68>;
92                                 status = "okay";
93                         };
94
95                         // RGB LEDs (>= v1.1.0)
96                         pca9633: pca9633@62 {
97                                 compatible = "nxp,pca9633";
98                                 reg = <0x62>;
99                                 #address-cells = <1>;
100                                 #size-cells = <0>;
101
102                                 red@0 {
103                                         label = "red";
104                                         reg = <0>;
105                                         linux,default-trigger = "none";
106                                 };
107                                 green@1 {
108                                         label = "green";
109                                         reg = <1>;
110                                         linux,default-trigger = "none";
111                                 };
112                                 blue@2 {
113                                         label = "blue";
114                                         reg = <2>;
115                                         linux,default-trigger = "none";
116                                 };
117                                 unused@3 {
118                                         label = "unused";
119                                         reg = <3>;
120                                         linux,default-trigger = "none";
121                                 };
122                         };
123                 };
124         };
125 };