Skip to content

Commit

Permalink
add i2c0(PI5&PI6) overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan committed Aug 8, 2023
1 parent 928a049 commit 3b6c8e0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions kernel/arch/arm64/boot/dts/allwinner/overlay/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dtbo-$(CONFIG_ARCH_SUNXI) += \
sun50i-h616-spidev1_0.dtbo \
sun50i-h616-spidev1_1.dtbo \
sun50i-h616-spidev1_2.dtbo \
sun50i-h616-i2c0.dtbo\
sun50i-h616-ir.dtbo \
sun50i-h616-tft35_spi.dtbo \
sun50i-h616-tft35_spi25.dtbo \
Expand Down
20 changes: 20 additions & 0 deletions kernel/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-i2c0.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/dts-v1/;
/plugin/;

/ {
compatible = "allwinner,sun50i-h616";

fragment@0 {
target-path = "/aliases";
__overlay__ {
i2c0 = "/soc/i2c@5002000";
};
};

fragment@1 {
target = <&i2c0>;
__overlay__ {
status = "okay";
};
};
};
1 change: 1 addition & 0 deletions kernel/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@
i2c0_pins: i2c0-pins {
pins = "PI5", "PI6";
function = "i2c0";
bias-pull-up;
};

i2c1_pins: i2c1-pins {
Expand Down
5 changes: 4 additions & 1 deletion userpatches/sunxi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ console=display
## uncomment MCP2515 spi to canbus module
#overlays=mcp2515

## uncomment to release 'spidev0.0' to user space
#overlays=i2c0

## uncomment to release 'spidev0.0' to user space
#overlays=spidev0_0

Expand All @@ -38,6 +41,6 @@ console=display
#overlays=ir

## write the config after the 'overlays' and separate it with a space when multiple functions are enabled
#overlays=disable_uart0 pwm ws2812 light tft35_spi mcp2515 spidev0_0 spidev1_0 spidev1_1 spidev1_2 ir
#overlays=disable_uart0 pwm ws2812 light tft35_spi mcp2515 i2c0 spidev0_0 spidev1_0 spidev1_1 spidev1_2 ir

#------------------------------------------------#

0 comments on commit 3b6c8e0

Please sign in to comment.