]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: qcom: lemans: Separate out ethernet card for ride & ride-r3
authorWasim Nazir <wasim.nazir@oss.qualcomm.com>
Sun, 3 Aug 2025 11:01:07 +0000 (16:31 +0530)
committerBjorn Andersson <andersson@kernel.org>
Mon, 11 Aug 2025 02:01:15 +0000 (21:01 -0500)
Ride & Ride-r3 in lemans/lemans-auto uses different ethernet cards
with different phy capabilities. Separate out the ethernet card
information from main board so that it can be reused for all the
variants of ride & ride-r3 platforms in lemans/lemans-auto.

Lemans/lemans-auto Ride uses 1G phy while Lemans/lemans-auto Ride-r3
uses 2.5G phy.

Introduce ethernet cards with 1G & 2.5G phy capabilities respectively:
  *-88ea1512.dtsi is for 2x 1G - SGMII (Marvell 88EA1512-B2) phy
  *-aqr115c.dtsi is for 2x 2.5G - HSGMII (Marvell AQR115c) phy

Nacked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Wasim Nazir <wasim.nazir@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250803110113.401927-4-wasim.nazir@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/lemans-ride-ethernet-88ea1512.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/qcom/lemans-ride-ethernet-aqr115c.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/qcom/sa8775p-ride-r3.dts
arch/arm64/boot/dts/qcom/sa8775p-ride.dts
arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi

diff --git a/arch/arm64/boot/dts/qcom/lemans-ride-ethernet-88ea1512.dtsi b/arch/arm64/boot/dts/qcom/lemans-ride-ethernet-88ea1512.dtsi
new file mode 100644 (file)
index 0000000..9d6bbe1
--- /dev/null
@@ -0,0 +1,205 @@
+// 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 = &ethernet0;
+               ethernet1 = &ethernet1;
+       };
+};
+
+&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;
+               };
+       };
+};
+
+&ethernet0 {
+       phy-handle = <&sgmii_phy0>;
+       phy-mode = "sgmii";
+
+       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>;
+
+               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>;
+               };
+       };
+};
+
+&ethernet1 {
+       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>;
+               };
+       };
+};
+
diff --git a/arch/arm64/boot/dts/qcom/lemans-ride-ethernet-aqr115c.dtsi b/arch/arm64/boot/dts/qcom/lemans-ride-ethernet-aqr115c.dtsi
new file mode 100644 (file)
index 0000000..2d2d9ee
--- /dev/null
@@ -0,0 +1,205 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Linaro Limited
+ */
+
+/*
+ * Ethernet card for Lemans based Ride r3 boards.
+ * It supports 2x 2.5G - HSGMII (Marvell hsgmii) phy for Main domain
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+       aliases {
+               ethernet0 = &ethernet0;
+               ethernet1 = &ethernet1;
+       };
+};
+
+&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;
+               };
+       };
+};
+
+&ethernet0 {
+       phy-handle = <&hsgmii_phy0>;
+       phy-mode = "2500base-x";
+
+       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>;
+
+               hsgmii_phy0: phy@8 {
+                       compatible = "ethernet-phy-id31c3.1c33";
+                       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>;
+               };
+
+               hsgmii_phy1: phy@0 {
+                       compatible = "ethernet-phy-id31c3.1c33";
+                       reg = <0x0>;
+                       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>;
+               };
+       };
+};
+
+&ethernet1 {
+       phy-handle = <&hsgmii_phy1>;
+       phy-mode = "2500base-x";
+
+       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>;
+               };
+       };
+};
+
index ae065ae92478a6d3482b43e9129c783008676c91..a7f377dc473346e7725c25b25ff27d39f9241a03 100644 (file)
@@ -6,42 +6,9 @@
 /dts-v1/;
 
 #include "sa8775p-ride.dtsi"
+#include "lemans-ride-ethernet-aqr115c.dtsi"
 
 / {
        model = "Qualcomm SA8775P Ride Rev3";
        compatible = "qcom,sa8775p-ride-r3", "qcom,sa8775p";
 };
-
-&ethernet0 {
-       phy-mode = "2500base-x";
-};
-
-&ethernet1 {
-       phy-mode = "2500base-x";
-};
-
-&mdio {
-       compatible = "snps,dwmac-mdio";
-       #address-cells = <1>;
-       #size-cells = <0>;
-
-       sgmii_phy0: phy@8 {
-               compatible = "ethernet-phy-id31c3.1c33";
-               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@0 {
-               compatible = "ethernet-phy-id31c3.1c33";
-               reg = <0x0>;
-               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>;
-       };
-};
index 2e87fd760dbdde9f93aef8c3b3b013e1cfb73d5f..b765794f7e54847b46a5c9602d4a80edd416a9c3 100644 (file)
@@ -6,42 +6,9 @@
 /dts-v1/;
 
 #include "sa8775p-ride.dtsi"
+#include "lemans-ride-ethernet-88ea1512.dtsi"
 
 / {
        model = "Qualcomm SA8775P Ride";
        compatible = "qcom,sa8775p-ride", "qcom,sa8775p";
 };
-
-&ethernet0 {
-       phy-mode = "sgmii";
-};
-
-&ethernet1 {
-       phy-mode = "sgmii";
-};
-
-&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>;
-       };
-};
index a9ec6ded412e480cb0280b9ca6bf435885aee687..f512363f6222625bc6ee19fea0ecd36fac016bef 100644 (file)
@@ -13,8 +13,6 @@
 
 / {
        aliases {
-               ethernet0 = &ethernet0;
-               ethernet1 = &ethernet1;
                i2c11 = &i2c11;
                i2c18 = &i2c18;
                serial0 = &uart10;
        };
 };
 
-&ethernet0 {
-       phy-handle = <&sgmii_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: mdio {
-               compatible = "snps,dwmac-mdio";
-               #address-cells = <1>;
-               #size-cells = <0>;
-       };
-
-       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>;
-               };
-       };
-};
-
-&ethernet1 {
-       phy-handle = <&sgmii_phy1>;
-
-       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>;
-               };
-       };
-};
-
 &i2c11 {
        clock-frequency = <400000>;
        status = "okay";
                bias-disable;
        };
 
-       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;
-               };
-       };
-
        io_expander_intr_active: io-expander-intr-active-state {
                pins = "gpio98";
                function = "gpio";