Path: blob/master/arch/arm64/boot/dts/qcom/lemans-ride-ethernet-88ea1512.dtsi
29274 views
// SPDX-License-Identifier: BSD-3-Clause /* * Copyright (c) 2023, Linaro Limited */ /* * Ethernet card for Lemans based Ride boards. * It supports 2x 1G - SGMII (Marvell 88EA1512-B2) phy for Main domain */ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> / { aliases { ethernet0 = ðernet0; ethernet1 = ðernet1; }; }; &tlmm { ethernet0_default: ethernet0-default-state { ethernet0_mdc: ethernet0-mdc-pins { pins = "gpio8"; function = "emac0_mdc"; drive-strength = <16>; bias-pull-up; }; ethernet0_mdio: ethernet0-mdio-pins { pins = "gpio9"; function = "emac0_mdio"; drive-strength = <16>; bias-pull-up; }; }; }; ðernet0 { phy-handle = <&sgmii_phy0>; phy-mode = "sgmii"; pinctrl-0 = <ðernet0_default>; pinctrl-names = "default"; snps,mtl-rx-config = <&mtl_rx_setup>; snps,mtl-tx-config = <&mtl_tx_setup>; snps,ps-speed = <1000>; status = "okay"; mdio { compatible = "snps,dwmac-mdio"; #address-cells = <1>; #size-cells = <0>; sgmii_phy0: phy@8 { compatible = "ethernet-phy-id0141.0dd4"; reg = <0x8>; device_type = "ethernet-phy"; interrupts-extended = <&tlmm 7 IRQ_TYPE_EDGE_FALLING>; reset-gpios = <&pmm8654au_2_gpios 8 GPIO_ACTIVE_LOW>; reset-assert-us = <11000>; reset-deassert-us = <70000>; }; sgmii_phy1: phy@a { compatible = "ethernet-phy-id0141.0dd4"; reg = <0xa>; device_type = "ethernet-phy"; interrupts-extended = <&tlmm 26 IRQ_TYPE_EDGE_FALLING>; reset-gpios = <&pmm8654au_2_gpios 9 GPIO_ACTIVE_LOW>; reset-assert-us = <11000>; reset-deassert-us = <70000>; }; }; mtl_rx_setup: rx-queues-config { snps,rx-queues-to-use = <4>; snps,rx-sched-sp; queue0 { snps,dcb-algorithm; snps,map-to-dma-channel = <0x0>; snps,route-up; snps,priority = <0x1>; }; queue1 { snps,dcb-algorithm; snps,map-to-dma-channel = <0x1>; snps,route-ptp; }; queue2 { snps,avb-algorithm; snps,map-to-dma-channel = <0x2>; snps,route-avcp; }; queue3 { snps,avb-algorithm; snps,map-to-dma-channel = <0x3>; snps,priority = <0xc>; }; }; mtl_tx_setup: tx-queues-config { snps,tx-queues-to-use = <4>; queue0 { snps,dcb-algorithm; }; queue1 { snps,dcb-algorithm; }; queue2 { snps,avb-algorithm; snps,send_slope = <0x1000>; snps,idle_slope = <0x1000>; snps,high_credit = <0x3e800>; snps,low_credit = <0xffc18000>; }; queue3 { snps,avb-algorithm; snps,send_slope = <0x1000>; snps,idle_slope = <0x1000>; snps,high_credit = <0x3e800>; snps,low_credit = <0xffc18000>; }; }; }; ðernet1 { phy-handle = <&sgmii_phy1>; phy-mode = "sgmii"; snps,mtl-rx-config = <&mtl_rx_setup1>; snps,mtl-tx-config = <&mtl_tx_setup1>; snps,ps-speed = <1000>; status = "okay"; mtl_rx_setup1: rx-queues-config { snps,rx-queues-to-use = <4>; snps,rx-sched-sp; queue0 { snps,dcb-algorithm; snps,map-to-dma-channel = <0x0>; snps,route-up; snps,priority = <0x1>; }; queue1 { snps,dcb-algorithm; snps,map-to-dma-channel = <0x1>; snps,route-ptp; }; queue2 { snps,avb-algorithm; snps,map-to-dma-channel = <0x2>; snps,route-avcp; }; queue3 { snps,avb-algorithm; snps,map-to-dma-channel = <0x3>; snps,priority = <0xc>; }; }; mtl_tx_setup1: tx-queues-config { snps,tx-queues-to-use = <4>; queue0 { snps,dcb-algorithm; }; queue1 { snps,dcb-algorithm; }; queue2 { snps,avb-algorithm; snps,send_slope = <0x1000>; snps,idle_slope = <0x1000>; snps,high_credit = <0x3e800>; snps,low_credit = <0xffc18000>; }; queue3 { snps,avb-algorithm; snps,send_slope = <0x1000>; snps,idle_slope = <0x1000>; snps,high_credit = <0x3e800>; snps,low_credit = <0xffc18000>; }; }; };