Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / i2c-gpio-overlay.dts
1 // Overlay for i2c_gpio bitbanging host bus.
2 /dts-v1/;
3 /plugin/;
4
5 #include <dt-bindings/gpio/gpio.h>
6
7 / {
8         compatible = "brcm,bcm2835";
9
10         fragment@0 {
11                 target-path = "/";
12
13                 __overlay__ {
14                         i2c_gpio: i2c@0 {
15                                 reg = <0xffffffff>;
16                                 compatible = "i2c-gpio";
17                                 gpios = <&gpio 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) /* sda */
18                                          &gpio 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) /* scl */
19                                         >;
20                                 i2c-gpio,delay-us = <2>;        /* ~100 kHz */
21                                 #address-cells = <1>;
22                                 #size-cells = <0>;
23                         };
24                 };
25         };
26
27         fragment@1 {
28                 target-path = "/aliases";
29                 __overlay__ {
30                         i2c_gpio = "/i2c@0";
31                 };
32         };
33
34         fragment@2 {
35                 target-path = "/__symbols__";
36                 __overlay__ {
37                         i2c_gpio = "/i2c@0";
38                 };
39         };
40
41         __overrides__ {
42                 i2c_gpio_sda = <&i2c_gpio>,"gpios:4";
43                 i2c_gpio_scl = <&i2c_gpio>,"gpios:16";
44                 i2c_gpio_delay_us = <&i2c_gpio>,"i2c-gpio,delay-us:0";
45                 bus = <&i2c_gpio>, "reg:0";
46         };
47 };