arm64: dts: qcom: qcs8300-ride: enable ethernet0
authorYijie Yang <quic_yijiyang@quicinc.com>
Fri, 6 Dec 2024 01:35:05 +0000 (09:35 +0800)
committerBjorn Andersson <andersson@kernel.org>
Tue, 7 Jan 2025 16:18:40 +0000 (10:18 -0600)
Enable the SerDes PHY on qcs8300-ride. Add the MDC and MDIO pin functions
for ethernet0 on qcs8300-ride. Enable the ethernet port on qcs8300-ride.

Signed-off-by: Yijie Yang <quic_yijiyang@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20241206-dts_qcs8300-v5-2-422e4fda292d@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/qcs8300-ride.dts

index 85b84778e85ae712473eee78a8e090c49dfc3721..5e295ba6a0408a4700505e9e1256f09b5af1d6ed 100644 (file)
        };
 };
 
+&ethernet0 {
+       phy-mode = "2500base-x";
+       phy-handle = <&phy0>;
+
+       pinctrl-0 = <&ethernet0_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>;
+
+               phy0: phy@8 {
+                       compatible = "ethernet-phy-id31c3.1c33";
+                       reg = <0x8>;
+                       device_type = "ethernet-phy";
+                       interrupts-extended = <&tlmm 4 IRQ_TYPE_EDGE_FALLING>;
+                       reset-gpios = <&tlmm 31 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>;
+               snps,tx-sched-sp;
+
+               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>;
+               };
+       };
+};
+
 &qupv3_id_0 {
        status = "okay";
 };
        status = "okay";
 };
 
+&serdes0 {
+       phy-supply = <&vreg_l5a>;
+       status = "okay";
+};
+
+&tlmm {
+       ethernet0_default: ethernet0-default-state {
+               ethernet0_mdc: ethernet0-mdc-pins {
+                       pins = "gpio5";
+                       function = "emac0_mdc";
+                       drive-strength = <16>;
+                       bias-pull-up;
+               };
+
+               ethernet0_mdio: ethernet0-mdio-pins {
+                       pins = "gpio6";
+                       function = "emac0_mdio";
+                       drive-strength = <16>;
+                       bias-pull-up;
+               };
+       };
+};
+
 &uart7 {
        status = "okay";
 };