Merge tag 'soc-dt-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[platform/kernel/linux-rpi.git] / arch / arm64 / boot / dts / qcom / sa8775p-ride.dts
index 26f5a4e..81a7eeb 100644 (file)
        compatible = "qcom,sa8775p-ride", "qcom,sa8775p";
 
        aliases {
+               ethernet0 = &ethernet0;
+               ethernet1 = &ethernet1;
+               i2c11 = &i2c11;
+               i2c18 = &i2c18;
                serial0 = &uart10;
                serial1 = &uart12;
                serial2 = &uart17;
-               i2c11 = &i2c11;
-               i2c18 = &i2c18;
                spi16 = &spi16;
                ufshc1 = &ufs_mem_hc;
        };
        };
 };
 
+&ethernet0 {
+       phy-mode = "sgmii";
+       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 {
+               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";
+                       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";
+                       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>;
+               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>;
+               };
+       };
+};
+
+&ethernet1 {
+       phy-mode = "sgmii";
+       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>;
+               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>;
+               };
+       };
+};
+
 &i2c11 {
        clock-frequency = <400000>;
        pinctrl-0 = <&qup_i2c11_default>;
        status = "okay";
 };
 
+&serdes0 {
+       phy-supply = <&vreg_l5a>;
+       status = "okay";
+};
+
+&serdes1 {
+       phy-supply = <&vreg_l5a>;
+       status = "okay";
+};
+
 &sleep_clk {
        clock-frequency = <32764>;
 };
 };
 
 &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;
+               };
+       };
+
        qup_uart10_default: qup-uart10-state {
                pins = "gpio46", "gpio47";
                function = "qup1_se3";
                        bias-pull-down;
                };
        };
+
+       pcie0_default_state: pcie0-default-state {
+               perst-pins {
+                       pins = "gpio2";
+                       function = "gpio";
+                       drive-strength = <2>;
+                       bias-pull-down;
+               };
+
+               clkreq-pins {
+                       pins = "gpio1";
+                       function = "pcie0_clkreq";
+                       drive-strength = <2>;
+                       bias-pull-up;
+               };
+
+               wake-pins {
+                       pins = "gpio0";
+                       function = "gpio";
+                       drive-strength = <2>;
+                       bias-pull-up;
+               };
+       };
+
+       pcie1_default_state: pcie1-default-state {
+               perst-pins {
+                       pins = "gpio4";
+                       function = "gpio";
+                       drive-strength = <2>;
+                       bias-pull-down;
+               };
+
+               clkreq-pins {
+                       pins = "gpio3";
+                       function = "pcie1_clkreq";
+                       drive-strength = <2>;
+                       bias-pull-up;
+               };
+
+               wake-pins {
+                       pins = "gpio5";
+                       function = "gpio";
+                       drive-strength = <2>;
+                       bias-pull-up;
+               };
+       };
+};
+
+&pcie0 {
+       perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
+       wake-gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&pcie0_default_state>;
+
+       status = "okay";
+};
+
+&pcie1 {
+       perst-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
+       wake-gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&pcie1_default_state>;
+
+       status = "okay";
+};
+
+&pcie0_phy {
+       vdda-phy-supply = <&vreg_l5a>;
+       vdda-pll-supply = <&vreg_l1c>;
+
+       status = "okay";
+};
+
+&pcie1_phy {
+       vdda-phy-supply = <&vreg_l5a>;
+       vdda-pll-supply = <&vreg_l1c>;
+
+       status = "okay";
 };
 
 &uart10 {