Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions Documentation/devicetree/bindings/net/qcom,ethqos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ properties:
- qcom,qcs404-ethqos
- qcom,sa8775p-ethqos
- qcom,sc8280xp-ethqos
- qcom,shikra-ethqos
- qcom,sm8150-ethqos

reg:
Expand All @@ -57,16 +58,30 @@ properties:
- const: sfty

clocks:
maxItems: 4
minItems: 4
maxItems: 7

clock-names:
items:
- const: stmmaceth
- const: pclk
- const: ptp_ref
- enum:
- rgmii
- phyaux
oneOf:
- items:
- const: stmmaceth
- const: pclk
- const: ptp_ref
- enum:
- rgmii
- phyaux
- description: |
Extended clock list for platforms with AXI NOC clocks that require
explicit driver management (e.g. Shikra). GCC_EMAC0_AXI_CLK appears
as both "stmmaceth" and "axi"; CCF refcounting makes this safe.
items:
- const: stmmaceth
- const: pclk
- const: ptp_ref
- const: rgmii
- const: axi
- const: axi-noc
- const: pcie-tile-axi-noc

iommus:
maxItems: 1
Expand Down
119 changes: 119 additions & 0 deletions arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "shikra-cqm-som.dtsi"
#include "shikra-evk.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/net/ti-dp83867.h>

/ {
model = "Qualcomm Technologies, Inc. Shikra CQM EVK";
Expand All @@ -30,6 +31,92 @@
status = "okay";
};

&ethernet0 {
status = "okay";
phy-handle = <&ethphy0>;
phy-mode = "rgmii-id";

pinctrl-names = "default";
pinctrl-0 = <&ethernet0_defaults>;

snps,mtl-rx-config = <&mtl_rx_setup>;
snps,mtl-tx-config = <&mtl_tx_setup>;

mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;

ethphy0: ethernet-phy@7 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <7>;
reset-gpios = <&tlmm 135 GPIO_ACTIVE_LOW>;
reset-assert-us = <10000>;
reset-deassert-us = <50000>;
ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
};
};

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>;
};
};
};

&remoteproc_cdsp {
firmware-name = "qcom/shikra/cdsp.mbn";

Expand Down Expand Up @@ -81,6 +168,38 @@
status = "okay";
};

&tlmm {
ethernet0_defaults: ethernet0-defaults-state {
rgmii-rx-pins {
pins = "gpio121", "gpio122", "gpio123",
"gpio124", "gpio125", "gpio126";
function = "rgmii";
bias-disable;
drive-strength = <16>;
};
rgmii-tx-pins {
pins = "gpio127", "gpio128", "gpio129",
"gpio130", "gpio131", "gpio132";
function = "rgmii";
bias-pull-up;
drive-strength = <16>;
};
rgmii-mdio-pins {
pins = "gpio133", "gpio134";
function = "rgmii";
bias-pull-up;
drive-strength = <16>;
};
};

emac0_phy_en_hog: emac0-phy-en-hog {
gpio-hog;
gpios = <149 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "emac0-phy-en";
};
};

&uart8 {
status = "okay";

Expand Down
119 changes: 119 additions & 0 deletions arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "shikra-cqm-som.dtsi"
#include "shikra-evk.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/net/ti-dp83867.h>

/ {
model = "Qualcomm Technologies, Inc. Shikra CQS EVK";
Expand All @@ -31,6 +32,92 @@
status = "okay";
};

&ethernet0 {
status = "okay";
phy-handle = <&ethphy0>;
phy-mode = "rgmii-id";

pinctrl-names = "default";
pinctrl-0 = <&ethernet0_defaults>;

snps,mtl-rx-config = <&mtl_rx_setup>;
snps,mtl-tx-config = <&mtl_tx_setup>;

mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;

ethphy0: ethernet-phy@7 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <7>;
reset-gpios = <&tlmm 135 GPIO_ACTIVE_LOW>;
reset-assert-us = <10000>;
reset-deassert-us = <50000>;
ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
};
};

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>;
};
};
};

&remoteproc_cdsp {
firmware-name = "qcom/shikra/cdsp.mbn";

Expand Down Expand Up @@ -82,6 +169,38 @@
status = "okay";
};

&tlmm {
ethernet0_defaults: ethernet0-defaults-state {
rgmii-rx-pins {
pins = "gpio121", "gpio122", "gpio123",
"gpio124", "gpio125", "gpio126";
function = "rgmii";
bias-disable;
drive-strength = <16>;
};
rgmii-tx-pins {
pins = "gpio127", "gpio128", "gpio129",
"gpio130", "gpio131", "gpio132";
function = "rgmii";
bias-pull-up;
drive-strength = <16>;
};
rgmii-mdio-pins {
pins = "gpio133", "gpio134";
function = "rgmii";
bias-pull-up;
drive-strength = <16>;
};
};

emac0_phy_en_hog: emac0-phy-en-hog {
gpio-hog;
gpios = <149 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "emac0-phy-en";
};
};

&uart8 {
status = "okay";

Expand Down
Loading