0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * lan966x_pcb8309.dts - Device Tree file for PCB8309
0004 */
0005 /dts-v1/;
0006 #include "lan966x.dtsi"
0007 #include "dt-bindings/phy/phy-lan966x-serdes.h"
0008
0009 / {
0010 model = "Microchip EVB - LAN9662";
0011 compatible = "microchip,lan9662-pcb8309", "microchip,lan9662", "microchip,lan966";
0012
0013 aliases {
0014 serial0 = &usart3;
0015 i2c102 = &i2c102;
0016 i2c103 = &i2c103;
0017 };
0018
0019 chosen {
0020 stdout-path = "serial0:115200n8";
0021 };
0022
0023 gpio-restart {
0024 compatible = "gpio-restart";
0025 gpios = <&gpio 56 GPIO_ACTIVE_LOW>;
0026 priority = <200>;
0027 };
0028
0029 i2c-mux {
0030 compatible = "i2c-mux";
0031 #address-cells = <1>;
0032 #size-cells = <0>;
0033 mux-controls = <&mux>;
0034 i2c-parent = <&i2c4>;
0035
0036 i2c102: i2c-sfp@1 {
0037 reg = <1>;
0038 };
0039
0040 i2c103: i2c-sfp@2 {
0041 reg = <2>;
0042 };
0043 };
0044
0045 mux: mux-controller {
0046 compatible = "gpio-mux";
0047 #mux-control-cells = <0>;
0048
0049 mux-gpios = <&sgpio_out 11 0 GPIO_ACTIVE_HIGH>, /* p11b0 */
0050 <&sgpio_out 11 1 GPIO_ACTIVE_HIGH>; /* p11b1 */
0051 };
0052
0053 sfp2: sfp2 {
0054 compatible = "sff,sfp";
0055 i2c-bus = <&i2c102>;
0056 tx-disable-gpios = <&sgpio_out 10 0 GPIO_ACTIVE_LOW>;
0057 los-gpios = <&sgpio_in 2 0 GPIO_ACTIVE_HIGH>;
0058 mod-def0-gpios = <&sgpio_in 2 1 GPIO_ACTIVE_LOW>;
0059 tx-fault-gpios = <&sgpio_in 1 0 GPIO_ACTIVE_HIGH>;
0060 };
0061
0062 sfp3: sfp3 {
0063 compatible = "sff,sfp";
0064 i2c-bus = <&i2c103>;
0065 tx-disable-gpios = <&sgpio_out 10 1 GPIO_ACTIVE_LOW>;
0066 los-gpios = <&sgpio_in 3 0 GPIO_ACTIVE_HIGH>;
0067 mod-def0-gpios = <&sgpio_in 3 1 GPIO_ACTIVE_LOW>;
0068 tx-fault-gpios = <&sgpio_in 1 1 GPIO_ACTIVE_HIGH>;
0069 };
0070 };
0071
0072 &flx3 {
0073 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
0074 status = "okay";
0075
0076 usart3: serial@200 {
0077 pinctrl-0 = <&fc3_b_pins>;
0078 pinctrl-names = "default";
0079 status = "okay";
0080 };
0081 };
0082
0083 &flx4 {
0084 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
0085 status = "okay";
0086
0087 i2c4: i2c@600 {
0088 compatible = "microchip,sam9x60-i2c";
0089 reg = <0x600 0x200>;
0090 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
0091 clocks = <&nic_clk>;
0092 pinctrl-0 = <&fc4_b_pins>;
0093 pinctrl-names = "default";
0094 i2c-analog-filter;
0095 i2c-digital-filter;
0096 i2c-digital-filter-width-ns = <35>;
0097 i2c-sda-hold-time-ns = <1500>;
0098 status = "okay";
0099 };
0100 };
0101
0102 &gpio {
0103 fc3_b_pins: fc3-b-pins {
0104 /* RXD, TXD */
0105 pins = "GPIO_52", "GPIO_53";
0106 function = "fc3_b";
0107 };
0108
0109 fc4_b_pins: fc4-b-pins {
0110 /* SCL, SDA */
0111 pins = "GPIO_57", "GPIO_58";
0112 function = "fc4_b";
0113 };
0114
0115 sgpio_a_pins: sgpio-a-pins {
0116 /* SCK, D0, D1, LD */
0117 pins = "GPIO_32", "GPIO_33", "GPIO_34", "GPIO_35";
0118 function = "sgpio_a";
0119 };
0120 };
0121
0122 &mdio1 {
0123 status = "okay";
0124 };
0125
0126 &phy0 {
0127 status = "okay";
0128 };
0129
0130 &phy1 {
0131 status = "okay";
0132 };
0133
0134 &port0 {
0135 phy-handle = <&phy0>;
0136 phy-mode = "gmii";
0137 phys = <&serdes 0 CU(0)>;
0138 status = "okay";
0139 };
0140
0141 &port1 {
0142 phy-handle = <&phy1>;
0143 phy-mode = "gmii";
0144 phys = <&serdes 1 CU(1)>;
0145 status = "okay";
0146 };
0147
0148 &port2 {
0149 sfp = <&sfp2>;
0150 managed = "in-band-status";
0151 phy-mode = "sgmii";
0152 phys = <&serdes 2 SERDES6G(0)>;
0153 status = "okay";
0154 };
0155
0156 &port3 {
0157 sfp = <&sfp3>;
0158 managed = "in-band-status";
0159 phy-mode = "sgmii";
0160 phys = <&serdes 3 SERDES6G(1)>;
0161 status = "okay";
0162 };
0163
0164 &serdes {
0165 status = "okay";
0166 };
0167
0168 &sgpio {
0169 pinctrl-0 = <&sgpio_a_pins>;
0170 pinctrl-names = "default";
0171 microchip,sgpio-port-ranges = <0 3>, <8 11>;
0172 status = "okay";
0173
0174 gpio@0 {
0175 ngpios = <64>;
0176 };
0177 gpio@1 {
0178 ngpios = <64>;
0179 };
0180 };
0181
0182 &switch {
0183 status = "okay";
0184 };