You've already forked sunxi-DT-overlays
mirror of
https://github.com/armbian/sunxi-DT-overlays.git
synced 2026-01-06 10:14:43 -08:00
Add ENC28J60 example overlay
This commit is contained in:
@@ -58,6 +58,14 @@ Compared to the other ones in this repository these are "standalone" - no fixup
|
||||
- may require changing the interrupt GPIO specifier
|
||||
|
||||
|
||||
### spi-enc28j60
|
||||
- overlays for a ENC28J60 Ethernet controller connected to the SPI bus
|
||||
- bindings documentation: [microchip,enc28j60.txt](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/Documentation/devicetree/bindings/net/microchip,enc28j60.txt)
|
||||
- requires activating the SPI bus device is connected to by a kernel provided overlays (i.e. `overlays=spi0`)
|
||||
- may require changing the interrupt GPIO specifier
|
||||
- using external pull-up resistor on the interrupt line is highly recommended if the module doesn't have one
|
||||
|
||||
|
||||
### spi-mcp251x
|
||||
- overlays for a MCP251x CAN controller connected to the SPI bus
|
||||
- bindings documentation: [microchip,mcp251x.txt](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt)
|
||||
|
||||
38
examples/spi-enc28j60.dts
Normal file
38
examples/spi-enc28j60.dts
Normal file
@@ -0,0 +1,38 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun50i-a64", "allwinner,sun50i-h5";
|
||||
|
||||
/* This fragment is required only if the IRQ pin requires internal pull-up */
|
||||
fragment@0 {
|
||||
target = <&pio>;
|
||||
__overlay__ {
|
||||
enc28j60_pins: enc28j60_pins {
|
||||
pins = "PA7";
|
||||
function = "irq";
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&spi0>;
|
||||
__overlay__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
enc28j60 {
|
||||
compatible = "microchip,enc28j60";
|
||||
reg = <0>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <0 7 2>; /* PA7 IRQ_TYPE_EDGE_FALLING */
|
||||
spi-max-frequency = <12000000>;
|
||||
status = "okay";
|
||||
/* These are required only if internal pull-up is used for the IRQ pin */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&enc28j60_pins>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user