* [PATCH v5 0/2] Enable ethernet for qcs8300
@ 2024-12-06 1:35 Yijie Yang
2024-12-06 1:35 ` [PATCH v5 1/2] arm64: dts: qcom: qcs8300: add the first 2.5G ethernet Yijie Yang
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Yijie Yang @ 2024-12-06 1:35 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Richard Cochran
Cc: linux-arm-msm, devicetree, linux-kernel, netdev, Yijie Yang,
Konrad Dybcio
Add dts nodes to enable ethernet interface on qcs8300-ride.
The EMAC, SerDes and EPHY version are the same as those in sa8775p.
Signed-off-by: Yijie Yang <quic_yijiyang@quicinc.com>
---
This patch series depends on below patch series:
https://lore.kernel.org/all/20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42@quicinc.com/ - Reviewed
https://lore.kernel.org/all/20241010-schema-v1-0-98b2d0a2f7a2@quicinc.com/ - Applied
Changes in v5:
- Pad the register with zero for both 'ethernet0' and 'serdes0'.
- Change PHY name from 'sgmii_phy0' to 'phy0'.
- Link to v4: https://lore.kernel.org/r/20241123-dts_qcs8300-v4-0-b10b8ac634a9@quicinc.com
---
Yijie Yang (2):
arm64: dts: qcom: qcs8300: add the first 2.5G ethernet
arm64: dts: qcom: qcs8300-ride: enable ethernet0
arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 112 ++++++++++++++++++++++++++++++
arch/arm64/boot/dts/qcom/qcs8300.dtsi | 43 ++++++++++++
2 files changed, 155 insertions(+)
---
base-commit: c83f0b825741bcb9d8a7be67c63f6b9045d30f5a
change-id: 20241111-dts_qcs8300-f8383ef0f5ef
Best regards,
--
Yijie Yang <quic_yijiyang@quicinc.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 1/2] arm64: dts: qcom: qcs8300: add the first 2.5G ethernet
2024-12-06 1:35 [PATCH v5 0/2] Enable ethernet for qcs8300 Yijie Yang
@ 2024-12-06 1:35 ` Yijie Yang
2024-12-06 1:35 ` [PATCH v5 2/2] arm64: dts: qcom: qcs8300-ride: enable ethernet0 Yijie Yang
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Yijie Yang @ 2024-12-06 1:35 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Richard Cochran
Cc: linux-arm-msm, devicetree, linux-kernel, netdev, Yijie Yang,
Konrad Dybcio
Add the node for the first ethernet interface on qcs8300 platform.
Add the internal SGMII/SerDes PHY node as well.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Yijie Yang <quic_yijiyang@quicinc.com>
---
arch/arm64/boot/dts/qcom/qcs8300.dtsi | 43 +++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qcs8300.dtsi b/arch/arm64/boot/dts/qcom/qcs8300.dtsi
index 2c35f96c3f289d5e2e57e0e30ef5e17cd1286188..4e37a3ed29f302192dfb37e1489ec325c84d6ea8 100644
--- a/arch/arm64/boot/dts/qcom/qcs8300.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcs8300.dtsi
@@ -772,6 +772,15 @@ lpass_ag_noc: interconnect@3c40000 {
qcom,bcm-voters = <&apps_bcm_voter>;
};
+ serdes0: phy@8909000 {
+ compatible = "qcom,qcs8300-dwmac-sgmii-phy", "qcom,sa8775p-dwmac-sgmii-phy";
+ reg = <0x0 0x08909000 0x0 0x00000e10>;
+ clocks = <&gcc GCC_SGMI_CLKREF_EN>;
+ clock-names = "sgmi_ref";
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
pmu@9091000 {
compatible = "qcom,qcs8300-llcc-bwmon", "qcom,sc7280-llcc-bwmon";
reg = <0x0 0x9091000 0x0 0x1000>;
@@ -1308,6 +1317,40 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
};
};
+ ethernet0: ethernet@23040000 {
+ compatible = "qcom,qcs8300-ethqos", "qcom,sa8775p-ethqos";
+ reg = <0x0 0x23040000 0x0 0x00010000>,
+ <0x0 0x23056000 0x0 0x00000100>;
+ reg-names = "stmmaceth", "rgmii";
+
+ interrupts = <GIC_SPI 946 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 783 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq", "sfty";
+
+ clocks = <&gcc GCC_EMAC0_AXI_CLK>,
+ <&gcc GCC_EMAC0_SLV_AHB_CLK>,
+ <&gcc GCC_EMAC0_PTP_CLK>,
+ <&gcc GCC_EMAC0_PHY_AUX_CLK>;
+ clock-names = "stmmaceth",
+ "pclk",
+ "ptp_ref",
+ "phyaux";
+ power-domains = <&gcc GCC_EMAC0_GDSC>;
+
+ phys = <&serdes0>;
+ phy-names = "serdes";
+
+ iommus = <&apps_smmu 0x120 0xf>;
+ dma-coherent;
+
+ snps,tso;
+ snps,pbl = <32>;
+ rx-fifo-depth = <16384>;
+ tx-fifo-depth = <20480>;
+
+ status = "disabled";
+ };
+
nspa_noc: interconnect@260c0000 {
compatible = "qcom,qcs8300-nspa-noc";
reg = <0x0 0x260c0000 0x0 0x16080>;
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v5 2/2] arm64: dts: qcom: qcs8300-ride: enable ethernet0
2024-12-06 1:35 [PATCH v5 0/2] Enable ethernet for qcs8300 Yijie Yang
2024-12-06 1:35 ` [PATCH v5 1/2] arm64: dts: qcom: qcs8300: add the first 2.5G ethernet Yijie Yang
@ 2024-12-06 1:35 ` Yijie Yang
2024-12-06 12:17 ` Konrad Dybcio
2024-12-06 2:37 ` [PATCH v5 0/2] Enable ethernet for qcs8300 Tingwei Zhang
2025-01-07 16:38 ` Bjorn Andersson
3 siblings, 1 reply; 7+ messages in thread
From: Yijie Yang @ 2024-12-06 1:35 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Richard Cochran
Cc: linux-arm-msm, devicetree, linux-kernel, netdev, Yijie Yang
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>
---
arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 112 ++++++++++++++++++++++++++++++
1 file changed, 112 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qcs8300-ride.dts b/arch/arm64/boot/dts/qcom/qcs8300-ride.dts
index 7eed19a694c39dbe791afb6a991db65acb37e597..302542305726da669f0c515da12cbdec51036c51 100644
--- a/arch/arm64/boot/dts/qcom/qcs8300-ride.dts
+++ b/arch/arm64/boot/dts/qcom/qcs8300-ride.dts
@@ -210,6 +210,95 @@ vreg_l9c: ldo9 {
};
};
+ðernet0 {
+ phy-mode = "2500base-x";
+ phy-handle = <&phy0>;
+
+ 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>;
+
+ 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>;
+ };
+ };
+};
+
&gcc {
clocks = <&rpmhcc RPMH_CXO_CLK>,
<&sleep_clk>,
@@ -247,6 +336,29 @@ &rpmhcc {
clock-names = "xo";
};
+&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";
};
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v5 0/2] Enable ethernet for qcs8300
2024-12-06 1:35 [PATCH v5 0/2] Enable ethernet for qcs8300 Yijie Yang
2024-12-06 1:35 ` [PATCH v5 1/2] arm64: dts: qcom: qcs8300: add the first 2.5G ethernet Yijie Yang
2024-12-06 1:35 ` [PATCH v5 2/2] arm64: dts: qcom: qcs8300-ride: enable ethernet0 Yijie Yang
@ 2024-12-06 2:37 ` Tingwei Zhang
2024-12-06 2:50 ` Yijie Yang
2025-01-07 16:38 ` Bjorn Andersson
3 siblings, 1 reply; 7+ messages in thread
From: Tingwei Zhang @ 2024-12-06 2:37 UTC (permalink / raw)
To: Yijie Yang, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Richard Cochran
Cc: linux-arm-msm, devicetree, linux-kernel, netdev, Konrad Dybcio
On 12/6/2024 9:35 AM, Yijie Yang wrote:
> Add dts nodes to enable ethernet interface on qcs8300-ride.
> The EMAC, SerDes and EPHY version are the same as those in sa8775p.
>
> Signed-off-by: Yijie Yang <quic_yijiyang@quicinc.com>
> ---
> This patch series depends on below patch series:
> https://lore.kernel.org/all/20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42@quicinc.com/ - Reviewed
Above series was already applied. I would say there's no dependency to
block this series to be applied now. No need to respin for this but
update the dependency status if a new version is required.
> https://lore.kernel.org/all/20241010-schema-v1-0-98b2d0a2f7a2@quicinc.com/ - Applied
>
> Changes in v5:
> - Pad the register with zero for both 'ethernet0' and 'serdes0'.
> - Change PHY name from 'sgmii_phy0' to 'phy0'.
> - Link to v4: https://lore.kernel.org/r/20241123-dts_qcs8300-v4-0-b10b8ac634a9@quicinc.com
>
> ---
> Yijie Yang (2):
> arm64: dts: qcom: qcs8300: add the first 2.5G ethernet
> arm64: dts: qcom: qcs8300-ride: enable ethernet0
>
> arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 112 ++++++++++++++++++++++++++++++
> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 43 ++++++++++++
> 2 files changed, 155 insertions(+)
> ---
> base-commit: c83f0b825741bcb9d8a7be67c63f6b9045d30f5a
> change-id: 20241111-dts_qcs8300-f8383ef0f5ef
>
> Best regards,
--
Thanks,
Tingwei
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 0/2] Enable ethernet for qcs8300
2024-12-06 2:37 ` [PATCH v5 0/2] Enable ethernet for qcs8300 Tingwei Zhang
@ 2024-12-06 2:50 ` Yijie Yang
0 siblings, 0 replies; 7+ messages in thread
From: Yijie Yang @ 2024-12-06 2:50 UTC (permalink / raw)
To: Tingwei Zhang, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Richard Cochran
Cc: linux-arm-msm, devicetree, linux-kernel, netdev, Konrad Dybcio
On 2024-12-06 10:37, Tingwei Zhang wrote:
> On 12/6/2024 9:35 AM, Yijie Yang wrote:
>> Add dts nodes to enable ethernet interface on qcs8300-ride.
>> The EMAC, SerDes and EPHY version are the same as those in sa8775p.
>>
>> Signed-off-by: Yijie Yang <quic_yijiyang@quicinc.com>
>> ---
>> This patch series depends on below patch series:
>> https://lore.kernel.org/all/20240925-qcs8300_initial_dtsi-
>> v2-0-494c40fa2a42@quicinc.com/ - Reviewed
>
> Above series was already applied. I would say there's no dependency to
> block this series to be applied now. No need to respin for this but
> update the dependency status if a new version is required.
>
I will take care of it next time.
>> https://lore.kernel.org/all/20241010-schema-
>> v1-0-98b2d0a2f7a2@quicinc.com/ - Applied
>>
>> Changes in v5:
>> - Pad the register with zero for both 'ethernet0' and 'serdes0'.
>> - Change PHY name from 'sgmii_phy0' to 'phy0'.
>> - Link to v4: https://lore.kernel.org/r/20241123-dts_qcs8300-v4-0-
>> b10b8ac634a9@quicinc.com
>>
>> ---
>> Yijie Yang (2):
>> arm64: dts: qcom: qcs8300: add the first 2.5G ethernet
>> arm64: dts: qcom: qcs8300-ride: enable ethernet0
>>
>> arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 112 ++++++++++++++++++++
>> ++++++++++
>> arch/arm64/boot/dts/qcom/qcs8300.dtsi | 43 ++++++++++++
>> 2 files changed, 155 insertions(+)
>> ---
>> base-commit: c83f0b825741bcb9d8a7be67c63f6b9045d30f5a
>> change-id: 20241111-dts_qcs8300-f8383ef0f5ef
>>
>> Best regards,
>
>
--
Best Regards,
Yijie
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 2/2] arm64: dts: qcom: qcs8300-ride: enable ethernet0
2024-12-06 1:35 ` [PATCH v5 2/2] arm64: dts: qcom: qcs8300-ride: enable ethernet0 Yijie Yang
@ 2024-12-06 12:17 ` Konrad Dybcio
0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2024-12-06 12:17 UTC (permalink / raw)
To: Yijie Yang, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Richard Cochran
Cc: linux-arm-msm, devicetree, linux-kernel, netdev
On 6.12.2024 2:35 AM, Yijie Yang wrote:
> 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>
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 0/2] Enable ethernet for qcs8300
2024-12-06 1:35 [PATCH v5 0/2] Enable ethernet for qcs8300 Yijie Yang
` (2 preceding siblings ...)
2024-12-06 2:37 ` [PATCH v5 0/2] Enable ethernet for qcs8300 Tingwei Zhang
@ 2025-01-07 16:38 ` Bjorn Andersson
3 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2025-01-07 16:38 UTC (permalink / raw)
To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Richard Cochran, Yijie Yang
Cc: linux-arm-msm, devicetree, linux-kernel, netdev, Konrad Dybcio
On Fri, 06 Dec 2024 09:35:03 +0800, Yijie Yang wrote:
> Add dts nodes to enable ethernet interface on qcs8300-ride.
> The EMAC, SerDes and EPHY version are the same as those in sa8775p.
>
>
Applied, thanks!
[1/2] arm64: dts: qcom: qcs8300: add the first 2.5G ethernet
commit: 86d32baddc7bac85f42eb917baff9914131dd393
[2/2] arm64: dts: qcom: qcs8300-ride: enable ethernet0
commit: 787cb3b4c434adf117236e0ba23280264e73f90e
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-01-07 16:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06 1:35 [PATCH v5 0/2] Enable ethernet for qcs8300 Yijie Yang
2024-12-06 1:35 ` [PATCH v5 1/2] arm64: dts: qcom: qcs8300: add the first 2.5G ethernet Yijie Yang
2024-12-06 1:35 ` [PATCH v5 2/2] arm64: dts: qcom: qcs8300-ride: enable ethernet0 Yijie Yang
2024-12-06 12:17 ` Konrad Dybcio
2024-12-06 2:37 ` [PATCH v5 0/2] Enable ethernet for qcs8300 Tingwei Zhang
2024-12-06 2:50 ` Yijie Yang
2025-01-07 16:38 ` Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox