* [PATCH v2 1/8] arm64: dts: qcom: sa8775p: add a node for the second serdes PHY
2023-08-08 19:01 [PATCH v2 0/8] arm64: dts: qcom: enable EMAC1 on sa8775p Bartosz Golaszewski
@ 2023-08-08 19:01 ` Bartosz Golaszewski
2023-08-08 19:25 ` Konrad Dybcio
2023-08-08 19:01 ` [PATCH v2 2/8] arm64: dts: qcom: sa8775p: add a node for EMAC1 Bartosz Golaszewski
` (6 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Bartosz Golaszewski @ 2023-08-08 19:01 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Add a node for the SerDes PHY used by EMAC1 on sa8775p-ride.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
---
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index 7b55cb701472..38d10af37ab0 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -1846,6 +1846,15 @@ serdes0: phy@8901000 {
status = "disabled";
};
+ serdes1: phy@8902000 {
+ compatible = "qcom,sa8775p-dwmac-sgmii-phy";
+ reg = <0x0 0x08902000 0x0 0xe10>;
+ clocks = <&gcc GCC_SGMI_CLKREF_EN>;
+ clock-names = "sgmi_ref";
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
pdc: interrupt-controller@b220000 {
compatible = "qcom,sa8775p-pdc", "qcom,pdc";
reg = <0x0 0x0b220000 0x0 0x30000>,
--
2.39.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/8] arm64: dts: qcom: sa8775p: add a node for the second serdes PHY
2023-08-08 19:01 ` [PATCH v2 1/8] arm64: dts: qcom: sa8775p: add a node for the second serdes PHY Bartosz Golaszewski
@ 2023-08-08 19:25 ` Konrad Dybcio
0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2023-08-08 19:25 UTC (permalink / raw)
To: Bartosz Golaszewski, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
On 8.08.2023 21:01, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Add a node for the SerDes PHY used by EMAC1 on sa8775p-ride.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 2/8] arm64: dts: qcom: sa8775p: add a node for EMAC1
2023-08-08 19:01 [PATCH v2 0/8] arm64: dts: qcom: enable EMAC1 on sa8775p Bartosz Golaszewski
2023-08-08 19:01 ` [PATCH v2 1/8] arm64: dts: qcom: sa8775p: add a node for the second serdes PHY Bartosz Golaszewski
@ 2023-08-08 19:01 ` Bartosz Golaszewski
2023-08-08 21:11 ` Konrad Dybcio
2023-08-08 19:01 ` [PATCH v2 3/8] arm64: dts: qcom: sa8775p-ride: enable the second SerDes PHY Bartosz Golaszewski
` (5 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Bartosz Golaszewski @ 2023-08-08 19:01 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Add a node for the second MAC on sa8775p platforms.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
---
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 34 +++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index 38d10af37ab0..82af2e6cbda4 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -2325,6 +2325,40 @@ cpufreq_hw: cpufreq@18591000 {
#freq-domain-cells = <1>;
};
+ ethernet1: ethernet@23000000 {
+ compatible = "qcom,sa8775p-ethqos";
+ reg = <0x0 0x23000000 0x0 0x10000>,
+ <0x0 0x23016000 0x0 0x100>;
+ reg-names = "stmmaceth", "rgmii";
+
+ interrupts = <GIC_SPI 929 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+
+ clocks = <&gcc GCC_EMAC1_AXI_CLK>,
+ <&gcc GCC_EMAC1_SLV_AHB_CLK>,
+ <&gcc GCC_EMAC1_PTP_CLK>,
+ <&gcc GCC_EMAC1_PHY_AUX_CLK>;
+
+ clock-names = "stmmaceth",
+ "pclk",
+ "ptp_ref",
+ "phyaux";
+
+ power-domains = <&gcc EMAC1_GDSC>;
+
+ phys = <&serdes1>;
+ phy-names = "serdes";
+
+ iommus = <&apps_smmu 0x140 0xf>;
+
+ snps,tso;
+ snps,pbl = <32>;
+ rx-fifo-depth = <16384>;
+ tx-fifo-depth = <16384>;
+
+ status = "disabled";
+ };
+
ethernet0: ethernet@23040000 {
compatible = "qcom,sa8775p-ethqos";
reg = <0x0 0x23040000 0x0 0x10000>,
--
2.39.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/8] arm64: dts: qcom: sa8775p: add a node for EMAC1
2023-08-08 19:01 ` [PATCH v2 2/8] arm64: dts: qcom: sa8775p: add a node for EMAC1 Bartosz Golaszewski
@ 2023-08-08 21:11 ` Konrad Dybcio
0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2023-08-08 21:11 UTC (permalink / raw)
To: Bartosz Golaszewski, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
On 8.08.2023 21:01, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Add a node for the second MAC on sa8775p platforms.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
> ---
> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 34 +++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> index 38d10af37ab0..82af2e6cbda4 100644
> --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> @@ -2325,6 +2325,40 @@ cpufreq_hw: cpufreq@18591000 {
> #freq-domain-cells = <1>;
> };
>
> + ethernet1: ethernet@23000000 {
> + compatible = "qcom,sa8775p-ethqos";
> + reg = <0x0 0x23000000 0x0 0x10000>,
> + <0x0 0x23016000 0x0 0x100>;
> + reg-names = "stmmaceth", "rgmii";
> +
> + interrupts = <GIC_SPI 929 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "macirq";
> +
> + clocks = <&gcc GCC_EMAC1_AXI_CLK>,
> + <&gcc GCC_EMAC1_SLV_AHB_CLK>,
> + <&gcc GCC_EMAC1_PTP_CLK>,
> + <&gcc GCC_EMAC1_PHY_AUX_CLK>;
> +
> + clock-names = "stmmaceth",
> + "pclk",
> + "ptp_ref",
> + "phyaux";
This is a very nitty nit, but if there's going to be a v3, please remove
the newline between clocks and clock-names
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 3/8] arm64: dts: qcom: sa8775p-ride: enable the second SerDes PHY
2023-08-08 19:01 [PATCH v2 0/8] arm64: dts: qcom: enable EMAC1 on sa8775p Bartosz Golaszewski
2023-08-08 19:01 ` [PATCH v2 1/8] arm64: dts: qcom: sa8775p: add a node for the second serdes PHY Bartosz Golaszewski
2023-08-08 19:01 ` [PATCH v2 2/8] arm64: dts: qcom: sa8775p: add a node for EMAC1 Bartosz Golaszewski
@ 2023-08-08 19:01 ` Bartosz Golaszewski
2023-08-08 21:11 ` Konrad Dybcio
2023-08-08 19:01 ` [PATCH v2 4/8] arm64: dts: qcom: sa8775p-ride: move the reset-gpios property of the PHY Bartosz Golaszewski
` (4 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Bartosz Golaszewski @ 2023-08-08 19:01 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Enable the second SerDes PHY on sa8775p-ride development board.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
---
arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
index ed76680410b4..09ae6e153282 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
+++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
@@ -448,6 +448,11 @@ &serdes0 {
status = "okay";
};
+&serdes1 {
+ phy-supply = <&vreg_l5a>;
+ status = "okay";
+};
+
&sleep_clk {
clock-frequency = <32764>;
};
--
2.39.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 3/8] arm64: dts: qcom: sa8775p-ride: enable the second SerDes PHY
2023-08-08 19:01 ` [PATCH v2 3/8] arm64: dts: qcom: sa8775p-ride: enable the second SerDes PHY Bartosz Golaszewski
@ 2023-08-08 21:11 ` Konrad Dybcio
0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2023-08-08 21:11 UTC (permalink / raw)
To: Bartosz Golaszewski, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
On 8.08.2023 21:01, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Enable the second SerDes PHY on sa8775p-ride development board.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 4/8] arm64: dts: qcom: sa8775p-ride: move the reset-gpios property of the PHY
2023-08-08 19:01 [PATCH v2 0/8] arm64: dts: qcom: enable EMAC1 on sa8775p Bartosz Golaszewski
` (2 preceding siblings ...)
2023-08-08 19:01 ` [PATCH v2 3/8] arm64: dts: qcom: sa8775p-ride: enable the second SerDes PHY Bartosz Golaszewski
@ 2023-08-08 19:01 ` Bartosz Golaszewski
2023-08-08 21:09 ` Konrad Dybcio
2023-08-08 19:01 ` [PATCH v2 5/8] arm64: dts: qcom: sa8775p-ride: index the first SGMII PHY Bartosz Golaszewski
` (3 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Bartosz Golaszewski @ 2023-08-08 19:01 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Device-tree bindings for MDIO define per-PHY reset-gpios as well as a
global reset-gpios property at the MDIO node level which controls all
devices on the bus. The latter is most likely a workaround for the
chicken-and-egg problem where we cannot read the ID of the PHY before
bringing it out of reset but we cannot bring it out of reset until we've
read its ID.
I have proposed a comprehensive solution for this problem in 2020 but it
never got upstream. We do however have workaround in place which allows
us to hard-code the PHY id in the compatible property, thus skipping the
ID scanning.
Let's make the device-tree for sa8775p-ride slightly more correct by
moving the reset-gpios property to the PHY node with its ID put into the
PHY node's compatible.
Link: https://lore.kernel.org/all/20200622093744.13685-1-brgl@bgdev.pl/
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
index 09ae6e153282..a03a4c17c8f0 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
+++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
@@ -279,13 +279,13 @@ mdio {
#address-cells = <1>;
#size-cells = <0>;
- reset-gpios = <&pmm8654au_2_gpios 8 GPIO_ACTIVE_LOW>;
- reset-delay-us = <11000>;
- reset-post-delay-us = <70000>;
-
sgmii_phy: 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>;
};
};
--
2.39.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 4/8] arm64: dts: qcom: sa8775p-ride: move the reset-gpios property of the PHY
2023-08-08 19:01 ` [PATCH v2 4/8] arm64: dts: qcom: sa8775p-ride: move the reset-gpios property of the PHY Bartosz Golaszewski
@ 2023-08-08 21:09 ` Konrad Dybcio
0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2023-08-08 21:09 UTC (permalink / raw)
To: Bartosz Golaszewski, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
On 8.08.2023 21:01, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Device-tree bindings for MDIO define per-PHY reset-gpios as well as a
> global reset-gpios property at the MDIO node level which controls all
> devices on the bus. The latter is most likely a workaround for the
> chicken-and-egg problem where we cannot read the ID of the PHY before
> bringing it out of reset but we cannot bring it out of reset until we've
> read its ID.
>
> I have proposed a comprehensive solution for this problem in 2020 but it
> never got upstream. We do however have workaround in place which allows
> us to hard-code the PHY id in the compatible property, thus skipping the
> ID scanning.
>
> Let's make the device-tree for sa8775p-ride slightly more correct by
> moving the reset-gpios property to the PHY node with its ID put into the
> PHY node's compatible.
>
> Link: https://lore.kernel.org/all/20200622093744.13685-1-brgl@bgdev.pl/
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 5/8] arm64: dts: qcom: sa8775p-ride: index the first SGMII PHY
2023-08-08 19:01 [PATCH v2 0/8] arm64: dts: qcom: enable EMAC1 on sa8775p Bartosz Golaszewski
` (3 preceding siblings ...)
2023-08-08 19:01 ` [PATCH v2 4/8] arm64: dts: qcom: sa8775p-ride: move the reset-gpios property of the PHY Bartosz Golaszewski
@ 2023-08-08 19:01 ` Bartosz Golaszewski
2023-08-08 21:09 ` Konrad Dybcio
2023-08-08 19:01 ` [PATCH v2 6/8] arm64: dts: qcom: sa8775p-ride: add the second " Bartosz Golaszewski
` (2 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Bartosz Golaszewski @ 2023-08-08 19:01 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
We'll be adding a second SGMII PHY on the same MDIO bus, so let's index
the first one for better readability.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
---
arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
index a03a4c17c8f0..f9e1a017798e 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
+++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
@@ -263,7 +263,7 @@ vreg_l8e: ldo8 {
ðernet0 {
phy-mode = "sgmii";
- phy-handle = <&sgmii_phy>;
+ phy-handle = <&sgmii_phy0>;
pinctrl-0 = <ðernet0_default>;
pinctrl-names = "default";
@@ -279,7 +279,7 @@ mdio {
#address-cells = <1>;
#size-cells = <0>;
- sgmii_phy: phy@8 {
+ sgmii_phy0: phy@8 {
compatible = "ethernet-phy-id0141.0dd4";
reg = <0x8>;
device_type = "ethernet-phy";
--
2.39.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 5/8] arm64: dts: qcom: sa8775p-ride: index the first SGMII PHY
2023-08-08 19:01 ` [PATCH v2 5/8] arm64: dts: qcom: sa8775p-ride: index the first SGMII PHY Bartosz Golaszewski
@ 2023-08-08 21:09 ` Konrad Dybcio
0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2023-08-08 21:09 UTC (permalink / raw)
To: Bartosz Golaszewski, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
On 8.08.2023 21:01, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> We'll be adding a second SGMII PHY on the same MDIO bus, so let's index
> the first one for better readability.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 6/8] arm64: dts: qcom: sa8775p-ride: add the second SGMII PHY
2023-08-08 19:01 [PATCH v2 0/8] arm64: dts: qcom: enable EMAC1 on sa8775p Bartosz Golaszewski
` (4 preceding siblings ...)
2023-08-08 19:01 ` [PATCH v2 5/8] arm64: dts: qcom: sa8775p-ride: index the first SGMII PHY Bartosz Golaszewski
@ 2023-08-08 19:01 ` Bartosz Golaszewski
2023-08-08 21:09 ` Konrad Dybcio
2023-08-08 19:01 ` [PATCH v2 7/8] arm64: dts: qcom: sa8775p-ride: add an alias for ethernet0 Bartosz Golaszewski
2023-08-08 19:01 ` [PATCH v2 8/8] arm64: dts: qcom: sa8775p-ride: enable EMAC1 Bartosz Golaszewski
7 siblings, 1 reply; 16+ messages in thread
From: Bartosz Golaszewski @ 2023-08-08 19:01 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Add a second SGMII PHY that will be used by EMAC1 on sa8775p-ride.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
index f9e1a017798e..486cb48ecb9d 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
+++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
@@ -287,6 +287,15 @@ sgmii_phy0: phy@8 {
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 {
--
2.39.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 6/8] arm64: dts: qcom: sa8775p-ride: add the second SGMII PHY
2023-08-08 19:01 ` [PATCH v2 6/8] arm64: dts: qcom: sa8775p-ride: add the second " Bartosz Golaszewski
@ 2023-08-08 21:09 ` Konrad Dybcio
0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2023-08-08 21:09 UTC (permalink / raw)
To: Bartosz Golaszewski, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
On 8.08.2023 21:01, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Add a second SGMII PHY that will be used by EMAC1 on sa8775p-ride.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 7/8] arm64: dts: qcom: sa8775p-ride: add an alias for ethernet0
2023-08-08 19:01 [PATCH v2 0/8] arm64: dts: qcom: enable EMAC1 on sa8775p Bartosz Golaszewski
` (5 preceding siblings ...)
2023-08-08 19:01 ` [PATCH v2 6/8] arm64: dts: qcom: sa8775p-ride: add the second " Bartosz Golaszewski
@ 2023-08-08 19:01 ` Bartosz Golaszewski
2023-08-08 21:10 ` Konrad Dybcio
2023-08-08 19:01 ` [PATCH v2 8/8] arm64: dts: qcom: sa8775p-ride: enable EMAC1 Bartosz Golaszewski
7 siblings, 1 reply; 16+ messages in thread
From: Bartosz Golaszewski @ 2023-08-08 19:01 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Once we add a second ethernet node, the MDIO bus names will conflict
unless we provide aliases. Add one for the existing ethernet node.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
index 486cb48ecb9d..330553742204 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
+++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
@@ -23,6 +23,7 @@ aliases {
i2c18 = &i2c18;
spi16 = &spi16;
ufshc1 = &ufs_mem_hc;
+ ethernet0 = ðernet0;
};
chosen {
--
2.39.2
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 7/8] arm64: dts: qcom: sa8775p-ride: add an alias for ethernet0
2023-08-08 19:01 ` [PATCH v2 7/8] arm64: dts: qcom: sa8775p-ride: add an alias for ethernet0 Bartosz Golaszewski
@ 2023-08-08 21:10 ` Konrad Dybcio
0 siblings, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2023-08-08 21:10 UTC (permalink / raw)
To: Bartosz Golaszewski, Andy Gross, Bjorn Andersson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
On 8.08.2023 21:01, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Once we add a second ethernet node, the MDIO bus names will conflict
> unless we provide aliases. Add one for the existing ethernet node.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
ideally this would be sorted
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 8/8] arm64: dts: qcom: sa8775p-ride: enable EMAC1
2023-08-08 19:01 [PATCH v2 0/8] arm64: dts: qcom: enable EMAC1 on sa8775p Bartosz Golaszewski
` (6 preceding siblings ...)
2023-08-08 19:01 ` [PATCH v2 7/8] arm64: dts: qcom: sa8775p-ride: add an alias for ethernet0 Bartosz Golaszewski
@ 2023-08-08 19:01 ` Bartosz Golaszewski
7 siblings, 0 replies; 16+ messages in thread
From: Bartosz Golaszewski @ 2023-08-08 19:01 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Alex Elder, Srini Kandagatla,
Andrew Halaney
Cc: linux-arm-msm, devicetree, linux-kernel, netdev,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Enable the second MAC on sa8775p-ride.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 71 +++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
index 330553742204..c843bb974689 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
+++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
@@ -24,6 +24,7 @@ aliases {
spi16 = &spi16;
ufshc1 = &ufs_mem_hc;
ethernet0 = ðernet0;
+ ethernet1 = ðernet1;
};
chosen {
@@ -359,6 +360,76 @@ queue3 {
};
};
+ðernet1 {
+ 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>;
--
2.39.2
^ permalink raw reply related [flat|nested] 16+ messages in thread