1fac71e4eSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0 2fac71e4eSEmmanuel Vadot/** 3fac71e4eSEmmanuel Vadot * DT Overlay for CPSW5G in QSGMII mode using J7 Quad Port ETH EXP Add-On Ethernet Card with 4fac71e4eSEmmanuel Vadot * J7200 board. 5fac71e4eSEmmanuel Vadot * 6fac71e4eSEmmanuel Vadot * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ 7fac71e4eSEmmanuel Vadot */ 8fac71e4eSEmmanuel Vadot 9fac71e4eSEmmanuel Vadot/dts-v1/; 10fac71e4eSEmmanuel Vadot/plugin/; 11fac71e4eSEmmanuel Vadot 12fac71e4eSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 13fac71e4eSEmmanuel Vadot 14fac71e4eSEmmanuel Vadot#include "k3-pinctrl.h" 15*aa1a8ff2SEmmanuel Vadot#include "k3-serdes.h" 16fac71e4eSEmmanuel Vadot 17fac71e4eSEmmanuel Vadot&{/} { 18fac71e4eSEmmanuel Vadot aliases { 19fac71e4eSEmmanuel Vadot ethernet1 = "/bus@100000/ethernet@c000000/ethernet-ports/port@1"; 20fac71e4eSEmmanuel Vadot ethernet2 = "/bus@100000/ethernet@c000000/ethernet-ports/port@2"; 21fac71e4eSEmmanuel Vadot ethernet3 = "/bus@100000/ethernet@c000000/ethernet-ports/port@3"; 22fac71e4eSEmmanuel Vadot ethernet4 = "/bus@100000/ethernet@c000000/ethernet-ports/port@4"; 23fac71e4eSEmmanuel Vadot }; 24fac71e4eSEmmanuel Vadot}; 25fac71e4eSEmmanuel Vadot 26fac71e4eSEmmanuel Vadot&cpsw0 { 27fac71e4eSEmmanuel Vadot status = "okay"; 28fac71e4eSEmmanuel Vadot}; 29fac71e4eSEmmanuel Vadot 30fac71e4eSEmmanuel Vadot&cpsw0_port1 { 31fac71e4eSEmmanuel Vadot status = "okay"; 32fac71e4eSEmmanuel Vadot phy-handle = <&cpsw5g_phy0>; 33fac71e4eSEmmanuel Vadot phy-mode = "qsgmii"; 34fac71e4eSEmmanuel Vadot mac-address = [00 00 00 00 00 00]; 35fac71e4eSEmmanuel Vadot phys = <&cpsw0_phy_gmii_sel 1>; 36fac71e4eSEmmanuel Vadot}; 37fac71e4eSEmmanuel Vadot 38fac71e4eSEmmanuel Vadot&cpsw0_port2 { 39fac71e4eSEmmanuel Vadot status = "okay"; 40fac71e4eSEmmanuel Vadot phy-handle = <&cpsw5g_phy1>; 41fac71e4eSEmmanuel Vadot phy-mode = "qsgmii"; 42fac71e4eSEmmanuel Vadot mac-address = [00 00 00 00 00 00]; 43fac71e4eSEmmanuel Vadot phys = <&cpsw0_phy_gmii_sel 2>; 44fac71e4eSEmmanuel Vadot}; 45fac71e4eSEmmanuel Vadot 46fac71e4eSEmmanuel Vadot&cpsw0_port3 { 47fac71e4eSEmmanuel Vadot status = "okay"; 48fac71e4eSEmmanuel Vadot phy-handle = <&cpsw5g_phy2>; 49fac71e4eSEmmanuel Vadot phy-mode = "qsgmii"; 50fac71e4eSEmmanuel Vadot mac-address = [00 00 00 00 00 00]; 51fac71e4eSEmmanuel Vadot phys = <&cpsw0_phy_gmii_sel 3>; 52fac71e4eSEmmanuel Vadot}; 53fac71e4eSEmmanuel Vadot 54fac71e4eSEmmanuel Vadot&cpsw0_port4 { 55fac71e4eSEmmanuel Vadot status = "okay"; 56fac71e4eSEmmanuel Vadot phy-handle = <&cpsw5g_phy3>; 57fac71e4eSEmmanuel Vadot phy-mode = "qsgmii"; 58fac71e4eSEmmanuel Vadot mac-address = [00 00 00 00 00 00]; 59fac71e4eSEmmanuel Vadot phys = <&cpsw0_phy_gmii_sel 4>; 60fac71e4eSEmmanuel Vadot}; 61fac71e4eSEmmanuel Vadot 62fac71e4eSEmmanuel Vadot&cpsw5g_mdio { 63fac71e4eSEmmanuel Vadot status = "okay"; 64fac71e4eSEmmanuel Vadot pinctrl-names = "default"; 65fac71e4eSEmmanuel Vadot pinctrl-0 = <&mdio0_pins_default>; 66fac71e4eSEmmanuel Vadot reset-gpios = <&exp2 17 GPIO_ACTIVE_LOW>; 67fac71e4eSEmmanuel Vadot reset-post-delay-us = <120000>; 68fac71e4eSEmmanuel Vadot #address-cells = <1>; 69fac71e4eSEmmanuel Vadot #size-cells = <0>; 70fac71e4eSEmmanuel Vadot 71fac71e4eSEmmanuel Vadot cpsw5g_phy0: ethernet-phy@16 { 72fac71e4eSEmmanuel Vadot reg = <16>; 73fac71e4eSEmmanuel Vadot }; 74fac71e4eSEmmanuel Vadot cpsw5g_phy1: ethernet-phy@17 { 75fac71e4eSEmmanuel Vadot reg = <17>; 76fac71e4eSEmmanuel Vadot }; 77fac71e4eSEmmanuel Vadot cpsw5g_phy2: ethernet-phy@18 { 78fac71e4eSEmmanuel Vadot reg = <18>; 79fac71e4eSEmmanuel Vadot }; 80fac71e4eSEmmanuel Vadot cpsw5g_phy3: ethernet-phy@19 { 81fac71e4eSEmmanuel Vadot reg = <19>; 82fac71e4eSEmmanuel Vadot }; 83fac71e4eSEmmanuel Vadot}; 84fac71e4eSEmmanuel Vadot 85fac71e4eSEmmanuel Vadot&exp2 { 86fac71e4eSEmmanuel Vadot qsgmii-line-hog { 87fac71e4eSEmmanuel Vadot gpio-hog; 88fac71e4eSEmmanuel Vadot gpios = <16 GPIO_ACTIVE_HIGH>; 89fac71e4eSEmmanuel Vadot output-low; 90fac71e4eSEmmanuel Vadot line-name = "qsgmii-pwrdn-line"; 91fac71e4eSEmmanuel Vadot }; 92fac71e4eSEmmanuel Vadot}; 93fac71e4eSEmmanuel Vadot 94fac71e4eSEmmanuel Vadot&main_pmx0 { 95f126890aSEmmanuel Vadot mdio0_pins_default: mdio0-default-pins { 96fac71e4eSEmmanuel Vadot pinctrl-single,pins = < 97fac71e4eSEmmanuel Vadot J721E_IOPAD(0x00a8, PIN_OUTPUT, 5) /* (W19) UART8_TXD.MDIO0_MDC */ 98fac71e4eSEmmanuel Vadot J721E_IOPAD(0x00a4, PIN_INPUT, 5) /* (W14) UART8_RXD.MDIO0_MDIO */ 99fac71e4eSEmmanuel Vadot >; 100fac71e4eSEmmanuel Vadot }; 101fac71e4eSEmmanuel Vadot}; 102