My overlay looks now like this:
Code:
//Test overlay on bit-bashed I2C//devices connected are an EEPROM ans a GPIO expander////swi2c-dummy-rev1-overlay.dts//for devicetree bindings of MCP23017 refer to///home/pi/linux/Documentation/devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt//MCP23017 data sheet: https://www.microchip.com/en-us/product/mcp23017//AT24AA32A data sheet: https://www.microchip.com/en-us/product/24AA32A//aBUGSworstnightmare, 20241218#include <dt-bindings/gpio/gpio.h>#include <dt-bindings/pinctrl/bcm2835.h>/dts-v1/;/plugin/;/ {compatible = "brcm,bcm2711";fragment@0 {target-path = "/";__overlay__ {i2c_gpio: i2c@0 {reg = <0xffffffff>;compatible = "i2c-gpio";gpios = <&gpio 10 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN|GPIO_PULL_UP) /* sda */ &gpio 11 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN|GPIO_PULL_UP) /* 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";};};fragment@10 {target = <&gpio>;__overlay__ {goodix_pins: goodix_pins {brcm,pins = <19 26>; // interrupt and resetbrcm,function = <0 0>; // inbrcm,pull = <2 2>; // pull-up};};};fragment@30 {target = <&i2c_gpio>;__overlay__ {#address-cells = <1>;#size-cells = <0>;status = "okay"; gt9271: gt9271@14 {compatible = "goodix,gt9271";reg = <0x14>;pinctrl-names = "default";pinctrl-0 = <&goodix_pins>;interrupt-parent = <&gpio>;interrupts = <19 2>; // high-to-low edge triggeredirq-gpios = <&gpio 19 0>;reset-gpios = <&gpio 26 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";};};
Statistics: Posted by koerli — Thu Dec 26, 2024 4:26 pm