forked from RobertCNelson/bb.org-overlays
-
Notifications
You must be signed in to change notification settings - Fork 176
/
PB-SPI1-ETH-CLICK.dts
101 lines (90 loc) · 2.56 KB
/
PB-SPI1-ETH-CLICK.dts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
* Copyright (C) 2017 Robert Nelson <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* https://www.mikroe.com/eth-click
* https://download.mikroe.com/documents/add-on-boards/click/eth/eth-click-manual-v100.pdf
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
fragment@0 {
target-path="/";
__overlay__ {
chosen {
overlays {
PB-SPI1-ETH-CLICK = __TIMESTAMP__;
};
};
};
};
/*
* Free up the pins used by the cape from the pinmux helpers.
*/
fragment@1 {
target = <&ocp>;
__overlay__ {
P1_34_pinmux { status = "disabled"; };
P2_25_pinmux { status = "disabled"; }; /* MOSI - gpio1_9 */
P2_27_pinmux { status = "disabled"; }; /* MISO - gpio1_8 */
P2_29_pinmux { status = "disabled"; }; /* CLK - gpio0_7 */
P2_31_pinmux { status = "disabled"; }; /* CS - gpio0_19 */
P2_33_pinmux { status = "disabled"; };
};
};
fragment@2 {
target = <&am33xx_pinmux>;
__overlay__ {
enc28j60_pins: pinmux_enc28j60_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x0828, PIN_INPUT | MUX_MODE7 ) /* (T11) gpmc_ad10.gpio0[26] INT */
AM33XX_IOPAD(0x0834, PIN_INPUT | MUX_MODE7 ) /* (R12) gpmc_ad13.gpio1[13] RESET */
>;
};
pb_spi1_pins: pinmux_pb_spi1_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x0964, PIN_INPUT | MUX_MODE4 ) /* (C18) eCAP0_in_PWM0_out.spi1_sclk */
AM33XX_IOPAD(0x0968, PIN_INPUT | MUX_MODE4 ) /* (E18) uart0_ctsn.spi1_d0 */
AM33XX_IOPAD(0x096c, PIN_INPUT | MUX_MODE4 ) /* (E17) uart0_rtsn.spi1_d1 */
AM33XX_IOPAD(0x09b0, PIN_INPUT | MUX_MODE4 ) /* (A15) xdma_event_intr0.spi1_cs1 */
>;
};
};
};
fragment@3 {
target = <&spi1>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pb_spi1_pins>;
channel@0{ status = "disabled"; };
channel@1{ status = "disabled"; };
};
};
fragment@4 {
target = <&spi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
enc28j60: ethernet@1 {
compatible = "microchip,enc28j60";
pinctrl-names = "default";
pinctrl-0 = <&enc28j60_pins>;
reg = <0x1>;
interrupt-parent = <&gpio0>;
interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <16000000>;
local-mac-address = [ 00 00 00 00 00 00 ];
};
};
};
};