mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-01-31 23:32:17 +00:00
48 lines
894 B
Plaintext
48 lines
894 B
Plaintext
|
// Overlay for i2c_gpio bitbanging host bus.
|
||
|
/dts-v1/;
|
||
|
/plugin/;
|
||
|
|
||
|
#include <dt-bindings/gpio/gpio.h>
|
||
|
|
||
|
/ {
|
||
|
compatible = "brcm,bcm2835";
|
||
|
|
||
|
fragment@0 {
|
||
|
target-path = "/";
|
||
|
|
||
|
__overlay__ {
|
||
|
i2c_gpio: i2c@0 {
|
||
|
reg = <0xffffffff>;
|
||
|
compatible = "i2c-gpio";
|
||
|
gpios = <&gpio 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) /* sda */
|
||
|
&gpio 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) /* scl */
|
||
|
>;
|
||
|
i2c-gpio,delay-us = <2>; /* ~100 kHz */
|
||
|
#address-cells = <1>;
|
||
|
#size-cells = <0>;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
fragment@1 {
|
||
|
target-path = "/aliases";
|
||
|
__overlay__ {
|
||
|
i2c_gpio = "/i2c@0";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
fragment@2 {
|
||
|
target-path = "/__symbols__";
|
||
|
__overlay__ {
|
||
|
i2c_gpio = "/i2c@0";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
__overrides__ {
|
||
|
i2c_gpio_sda = <&i2c_gpio>,"gpios:4";
|
||
|
i2c_gpio_scl = <&i2c_gpio>,"gpios:16";
|
||
|
i2c_gpio_delay_us = <&i2c_gpio>,"i2c-gpio,delay-us:0";
|
||
|
bus = <&i2c_gpio>, "reg:0";
|
||
|
};
|
||
|
};
|