1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2*f126890aSEmmanuel Vadot/* 3*f126890aSEmmanuel Vadot * Common part of the device tree for the Kontron KSwitch D10 MMT 4*f126890aSEmmanuel Vadot */ 5*f126890aSEmmanuel Vadot 6*f126890aSEmmanuel Vadot/dts-v1/; 7*f126890aSEmmanuel Vadot#include "lan966x.dtsi" 8*f126890aSEmmanuel Vadot#include "dt-bindings/phy/phy-lan966x-serdes.h" 9*f126890aSEmmanuel Vadot 10*f126890aSEmmanuel Vadot/ { 11*f126890aSEmmanuel Vadot aliases { 12*f126890aSEmmanuel Vadot serial0 = &usart0; 13*f126890aSEmmanuel Vadot }; 14*f126890aSEmmanuel Vadot 15*f126890aSEmmanuel Vadot chosen { 16*f126890aSEmmanuel Vadot stdout-path = "serial0:115200n8"; 17*f126890aSEmmanuel Vadot }; 18*f126890aSEmmanuel Vadot 19*f126890aSEmmanuel Vadot gpio-restart { 20*f126890aSEmmanuel Vadot compatible = "gpio-restart"; 21*f126890aSEmmanuel Vadot pinctrl-0 = <&reset_pins>; 22*f126890aSEmmanuel Vadot pinctrl-names = "default"; 23*f126890aSEmmanuel Vadot gpios = <&gpio 56 GPIO_ACTIVE_LOW>; 24*f126890aSEmmanuel Vadot priority = <200>; 25*f126890aSEmmanuel Vadot }; 26*f126890aSEmmanuel Vadot}; 27*f126890aSEmmanuel Vadot 28*f126890aSEmmanuel Vadot&flx0 { 29*f126890aSEmmanuel Vadot atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>; 30*f126890aSEmmanuel Vadot status = "okay"; 31*f126890aSEmmanuel Vadot 32*f126890aSEmmanuel Vadot usart0: serial@200 { 33*f126890aSEmmanuel Vadot pinctrl-0 = <&usart0_pins>; 34*f126890aSEmmanuel Vadot pinctrl-names = "default"; 35*f126890aSEmmanuel Vadot status = "okay"; 36*f126890aSEmmanuel Vadot }; 37*f126890aSEmmanuel Vadot}; 38*f126890aSEmmanuel Vadot 39*f126890aSEmmanuel Vadot&flx3 { 40*f126890aSEmmanuel Vadot atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>; 41*f126890aSEmmanuel Vadot status = "okay"; 42*f126890aSEmmanuel Vadot 43*f126890aSEmmanuel Vadot spi3: spi@400 { 44*f126890aSEmmanuel Vadot pinctrl-0 = <&fc3_b_pins>, <&spi3_cs_pins>; 45*f126890aSEmmanuel Vadot pinctrl-names = "default"; 46*f126890aSEmmanuel Vadot status = "okay"; 47*f126890aSEmmanuel Vadot cs-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; 48*f126890aSEmmanuel Vadot }; 49*f126890aSEmmanuel Vadot}; 50*f126890aSEmmanuel Vadot 51*f126890aSEmmanuel Vadot&gpio { 52*f126890aSEmmanuel Vadot pinctrl-0 = <&phy_int_pins>; 53*f126890aSEmmanuel Vadot pinctrl-names = "default"; 54*f126890aSEmmanuel Vadot 55*f126890aSEmmanuel Vadot fc3_b_pins: fc3-b-pins { 56*f126890aSEmmanuel Vadot /* SCK, MISO, MOSI */ 57*f126890aSEmmanuel Vadot pins = "GPIO_51", "GPIO_52", "GPIO_53"; 58*f126890aSEmmanuel Vadot function = "fc3_b"; 59*f126890aSEmmanuel Vadot }; 60*f126890aSEmmanuel Vadot 61*f126890aSEmmanuel Vadot miim_c_pins: miim-c-pins { 62*f126890aSEmmanuel Vadot /* MDC, MDIO */ 63*f126890aSEmmanuel Vadot pins = "GPIO_59", "GPIO_60"; 64*f126890aSEmmanuel Vadot function = "miim_c"; 65*f126890aSEmmanuel Vadot }; 66*f126890aSEmmanuel Vadot 67*f126890aSEmmanuel Vadot phy_int_pins: phy-int-pins { 68*f126890aSEmmanuel Vadot /* PHY_INT# */ 69*f126890aSEmmanuel Vadot pins = "GPIO_24"; 70*f126890aSEmmanuel Vadot function = "gpio"; 71*f126890aSEmmanuel Vadot }; 72*f126890aSEmmanuel Vadot 73*f126890aSEmmanuel Vadot reset_pins: reset-pins { 74*f126890aSEmmanuel Vadot /* SYS_RST# */ 75*f126890aSEmmanuel Vadot pins = "GPIO_56"; 76*f126890aSEmmanuel Vadot function = "gpio"; 77*f126890aSEmmanuel Vadot }; 78*f126890aSEmmanuel Vadot 79*f126890aSEmmanuel Vadot sgpio_a_pins: sgpio-a-pins { 80*f126890aSEmmanuel Vadot /* SCK, D0, D1 */ 81*f126890aSEmmanuel Vadot pins = "GPIO_32", "GPIO_33", "GPIO_34"; 82*f126890aSEmmanuel Vadot function = "sgpio_a"; 83*f126890aSEmmanuel Vadot }; 84*f126890aSEmmanuel Vadot 85*f126890aSEmmanuel Vadot sgpio_b_pins: sgpio-b-pins { 86*f126890aSEmmanuel Vadot /* LD */ 87*f126890aSEmmanuel Vadot pins = "GPIO_64"; 88*f126890aSEmmanuel Vadot function = "sgpio_b"; 89*f126890aSEmmanuel Vadot }; 90*f126890aSEmmanuel Vadot 91*f126890aSEmmanuel Vadot spi3_cs_pins: spi3-cs-pins { 92*f126890aSEmmanuel Vadot /* CS# */ 93*f126890aSEmmanuel Vadot pins = "GPIO_46"; 94*f126890aSEmmanuel Vadot function = "gpio"; 95*f126890aSEmmanuel Vadot }; 96*f126890aSEmmanuel Vadot 97*f126890aSEmmanuel Vadot usart0_pins: usart0-pins { 98*f126890aSEmmanuel Vadot /* RXD, TXD */ 99*f126890aSEmmanuel Vadot pins = "GPIO_25", "GPIO_26"; 100*f126890aSEmmanuel Vadot function = "fc0_b"; 101*f126890aSEmmanuel Vadot }; 102*f126890aSEmmanuel Vadot 103*f126890aSEmmanuel Vadot usbs_a_pins: usbs-a-pins { 104*f126890aSEmmanuel Vadot /* VBUS_DET */ 105*f126890aSEmmanuel Vadot pins = "GPIO_66"; 106*f126890aSEmmanuel Vadot function = "gpio"; 107*f126890aSEmmanuel Vadot }; 108*f126890aSEmmanuel Vadot}; 109*f126890aSEmmanuel Vadot 110*f126890aSEmmanuel Vadot&mdio0 { 111*f126890aSEmmanuel Vadot pinctrl-0 = <&miim_c_pins>; 112*f126890aSEmmanuel Vadot pinctrl-names = "default"; 113*f126890aSEmmanuel Vadot reset-gpios = <&gpio 29 GPIO_ACTIVE_LOW>; 114*f126890aSEmmanuel Vadot clock-frequency = <2500000>; 115*f126890aSEmmanuel Vadot status = "okay"; 116*f126890aSEmmanuel Vadot 117*f126890aSEmmanuel Vadot phy4: ethernet-phy@5 { 118*f126890aSEmmanuel Vadot reg = <5>; 119*f126890aSEmmanuel Vadot interrupts-extended = <&gpio 24 IRQ_TYPE_LEVEL_LOW>; 120*f126890aSEmmanuel Vadot coma-mode-gpios = <&gpio 37 GPIO_OPEN_DRAIN>; 121*f126890aSEmmanuel Vadot }; 122*f126890aSEmmanuel Vadot 123*f126890aSEmmanuel Vadot phy5: ethernet-phy@6 { 124*f126890aSEmmanuel Vadot reg = <6>; 125*f126890aSEmmanuel Vadot interrupts-extended = <&gpio 24 IRQ_TYPE_LEVEL_LOW>; 126*f126890aSEmmanuel Vadot coma-mode-gpios = <&gpio 37 GPIO_OPEN_DRAIN>; 127*f126890aSEmmanuel Vadot }; 128*f126890aSEmmanuel Vadot 129*f126890aSEmmanuel Vadot phy6: ethernet-phy@7 { 130*f126890aSEmmanuel Vadot reg = <7>; 131*f126890aSEmmanuel Vadot interrupts-extended = <&gpio 24 IRQ_TYPE_LEVEL_LOW>; 132*f126890aSEmmanuel Vadot coma-mode-gpios = <&gpio 37 GPIO_OPEN_DRAIN>; 133*f126890aSEmmanuel Vadot }; 134*f126890aSEmmanuel Vadot 135*f126890aSEmmanuel Vadot phy7: ethernet-phy@8 { 136*f126890aSEmmanuel Vadot reg = <8>; 137*f126890aSEmmanuel Vadot interrupts-extended = <&gpio 24 IRQ_TYPE_LEVEL_LOW>; 138*f126890aSEmmanuel Vadot coma-mode-gpios = <&gpio 37 GPIO_OPEN_DRAIN>; 139*f126890aSEmmanuel Vadot }; 140*f126890aSEmmanuel Vadot}; 141*f126890aSEmmanuel Vadot 142*f126890aSEmmanuel Vadot&mdio1 { 143*f126890aSEmmanuel Vadot status = "okay"; 144*f126890aSEmmanuel Vadot}; 145*f126890aSEmmanuel Vadot 146*f126890aSEmmanuel Vadot&phy0 { 147*f126890aSEmmanuel Vadot status = "okay"; 148*f126890aSEmmanuel Vadot}; 149*f126890aSEmmanuel Vadot 150*f126890aSEmmanuel Vadot&phy1 { 151*f126890aSEmmanuel Vadot status = "okay"; 152*f126890aSEmmanuel Vadot}; 153*f126890aSEmmanuel Vadot 154*f126890aSEmmanuel Vadot&port0 { 155*f126890aSEmmanuel Vadot phys = <&serdes 0 CU(0)>; 156*f126890aSEmmanuel Vadot phy-handle = <&phy0>; 157*f126890aSEmmanuel Vadot phy-mode = "gmii"; 158*f126890aSEmmanuel Vadot status = "okay"; 159*f126890aSEmmanuel Vadot}; 160*f126890aSEmmanuel Vadot 161*f126890aSEmmanuel Vadot&port1 { 162*f126890aSEmmanuel Vadot phys = <&serdes 1 CU(1)>; 163*f126890aSEmmanuel Vadot phy-handle = <&phy1>; 164*f126890aSEmmanuel Vadot phy-mode = "gmii"; 165*f126890aSEmmanuel Vadot status = "okay"; 166*f126890aSEmmanuel Vadot}; 167*f126890aSEmmanuel Vadot 168*f126890aSEmmanuel Vadot&port4 { 169*f126890aSEmmanuel Vadot phys = <&serdes 4 SERDES6G(2)>; 170*f126890aSEmmanuel Vadot phy-handle = <&phy4>; 171*f126890aSEmmanuel Vadot phy-mode = "qsgmii"; 172*f126890aSEmmanuel Vadot status = "okay"; 173*f126890aSEmmanuel Vadot}; 174*f126890aSEmmanuel Vadot 175*f126890aSEmmanuel Vadot&port5 { 176*f126890aSEmmanuel Vadot phys = <&serdes 5 SERDES6G(2)>; 177*f126890aSEmmanuel Vadot phy-handle = <&phy5>; 178*f126890aSEmmanuel Vadot phy-mode = "qsgmii"; 179*f126890aSEmmanuel Vadot status = "okay"; 180*f126890aSEmmanuel Vadot}; 181*f126890aSEmmanuel Vadot 182*f126890aSEmmanuel Vadot&port6 { 183*f126890aSEmmanuel Vadot phys = <&serdes 6 SERDES6G(2)>; 184*f126890aSEmmanuel Vadot phy-handle = <&phy6>; 185*f126890aSEmmanuel Vadot phy-mode = "qsgmii"; 186*f126890aSEmmanuel Vadot status = "okay"; 187*f126890aSEmmanuel Vadot}; 188*f126890aSEmmanuel Vadot 189*f126890aSEmmanuel Vadot&port7 { 190*f126890aSEmmanuel Vadot phys = <&serdes 7 SERDES6G(2)>; 191*f126890aSEmmanuel Vadot phy-handle = <&phy7>; 192*f126890aSEmmanuel Vadot phy-mode = "qsgmii"; 193*f126890aSEmmanuel Vadot status = "okay"; 194*f126890aSEmmanuel Vadot}; 195*f126890aSEmmanuel Vadot 196*f126890aSEmmanuel Vadot&serdes { 197*f126890aSEmmanuel Vadot status = "okay"; 198*f126890aSEmmanuel Vadot}; 199*f126890aSEmmanuel Vadot 200*f126890aSEmmanuel Vadot&sgpio { 201*f126890aSEmmanuel Vadot pinctrl-0 = <&sgpio_a_pins>, <&sgpio_b_pins>; 202*f126890aSEmmanuel Vadot pinctrl-names = "default"; 203*f126890aSEmmanuel Vadot bus-frequency = <8000000>; 204*f126890aSEmmanuel Vadot /* arbitrary range because all GPIOs are in software mode */ 205*f126890aSEmmanuel Vadot microchip,sgpio-port-ranges = <0 11>; 206*f126890aSEmmanuel Vadot status = "okay"; 207*f126890aSEmmanuel Vadot 208*f126890aSEmmanuel Vadot sgpio_in: gpio@0 { 209*f126890aSEmmanuel Vadot ngpios = <128>; 210*f126890aSEmmanuel Vadot }; 211*f126890aSEmmanuel Vadot 212*f126890aSEmmanuel Vadot sgpio_out: gpio@1 { 213*f126890aSEmmanuel Vadot ngpios = <128>; 214*f126890aSEmmanuel Vadot }; 215*f126890aSEmmanuel Vadot}; 216*f126890aSEmmanuel Vadot 217*f126890aSEmmanuel Vadot&switch { 218*f126890aSEmmanuel Vadot status = "okay"; 219*f126890aSEmmanuel Vadot}; 220*f126890aSEmmanuel Vadot 221*f126890aSEmmanuel Vadot&udc { 222*f126890aSEmmanuel Vadot pinctrl-0 = <&usbs_a_pins>; 223*f126890aSEmmanuel Vadot pinctrl-names = "default"; 224*f126890aSEmmanuel Vadot atmel,vbus-gpio = <&gpio 66 GPIO_ACTIVE_HIGH>; 225*f126890aSEmmanuel Vadot status = "okay"; 226*f126890aSEmmanuel Vadot}; 227*f126890aSEmmanuel Vadot 228*f126890aSEmmanuel Vadot&watchdog { 229*f126890aSEmmanuel Vadot status = "okay"; 230*f126890aSEmmanuel Vadot}; 231