Skip to content

Commit 1b42ce7

Browse files
Mihai Saincristibirsan
authored andcommitted
sam9x75_curiosity: Add initial overlay for LAN8840 Daughter Card
Add initial overlay for LAN8840 RGMII PHY Daughter Card. Enable the gmac node and add its pinctrl. Enable flx7_twi node and add its pinctrl. Signed-off-by: Mihai Sain <[email protected]> Acked-by : Cristian Birsan <[email protected]> Acked-by : Jerry Ray <[email protected]>
1 parent 9a77ab5 commit 1b42ce7

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed

sam9x75_curiosity.its

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,21 @@
7474
algo = "sha1";
7575
};
7676
};
77+
78+
fdt_gmac_lan8840 {
79+
description = "Device Tree blob for LAN8840 RGMII PHY overlay";
80+
data = /incbin/("./sam9x75_curiosity/sam9x75_curiosity_gmac_lan8840.dtbo");
81+
type = "flat_dt";
82+
arch = "arm";
83+
compression = "none";
84+
load = <0x23120000>;
85+
hash-1 {
86+
algo = "crc32";
87+
};
88+
hash-2 {
89+
algo = "sha1";
90+
};
91+
};
7792
};
7893

7994
configurations {
@@ -99,5 +114,10 @@
99114
description = "FDT overlay blob for AC69T88A LVDS Display Panel";
100115
fdt = "fdt_lvds_panel";
101116
};
117+
118+
lan8840 {
119+
description = "FDT overlay blob for LAN8840 RGMII PHY Daughter Card";
120+
fdt = "fdt_gmac_lan8840";
121+
};
102122
};
103123
};
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Device Tree file for SAM9X75 CURIOSITY board overlay blob for the LAN8840 RGMII PHY Daughter Card.
4+
*
5+
* Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries
6+
*
7+
* Author: Mihai Sain <[email protected]>
8+
*
9+
*/
10+
/dts-v1/;
11+
/plugin/;
12+
13+
#include <dt-bindings/gpio/gpio.h>
14+
#include <dt-bindings/interrupt-controller/irq.h>
15+
#include <dt-bindings/mfd/atmel-flexcom.h>
16+
#include <dt-bindings/pinctrl/at91.h>
17+
18+
&flx7 {
19+
atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
20+
status = "okay";
21+
};
22+
23+
&gmac {
24+
phy-mode = "rgmii-id";
25+
#address-cells = <1>;
26+
#size-cells = <0>;
27+
pinctrl-names = "default";
28+
pinctrl-0 = <&pinctrl_gmac_rgmii_default>;
29+
magic-packet;
30+
status = "okay";
31+
32+
ethernet-phy@1 {
33+
reg = <0x1>;
34+
interrupt-parent = <&pioD>;
35+
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
36+
};
37+
};
38+
39+
&i2c7 {
40+
#address-cells = <1>;
41+
#size-cells = <0>;
42+
pinctrl-names = "default";
43+
pinctrl-0 = <&pinctrl_flx7_twi_default>;
44+
i2c-analog-filter;
45+
i2c-digital-filter;
46+
i2c-digital-filter-width-ns = <35>;
47+
status = "okay";
48+
49+
eeprom@54 {
50+
compatible = "atmel,24c01";
51+
reg = <0x54>;
52+
pagesize = <8>;
53+
status = "okay";
54+
};
55+
};
56+
57+
&pinctrl {
58+
flexcom {
59+
pinctrl_flx7_twi_default: flx7-twi-default {
60+
atmel,pins =
61+
<AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_PULL_UP
62+
AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>;
63+
};
64+
};
65+
66+
gmac {
67+
pinctrl_gmac_rgmii_default: gmac-rgmii-default {
68+
atmel,pins =
69+
<AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_TX0 */
70+
AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_TX1 */
71+
AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_TX2 */
72+
AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_TX3 */
73+
AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_TXCTL */
74+
AT91_PIOB 6 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_SLEWRATE_DIS) /* ETH_TXCK */
75+
76+
AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_RX0 */
77+
AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_RX1 */
78+
AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_RX2 */
79+
AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_RX3 */
80+
AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_RXCK */
81+
AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_RXCTL */
82+
83+
AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* ETH_MDC */
84+
AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* ETH_MDIO */
85+
86+
AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS /* ETH_125CK */
87+
AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; /* ETH_INT */
88+
};
89+
};
90+
};
91+
92+
&{/} {
93+
model = "SAM9X75-Curiosity: LAN8840 RGMII PHY Daughter Card";
94+
};

0 commit comments

Comments
 (0)