[openwrt/openwrt] lantiq: fritz736x: Move GPIO resets to the inidvidual board.dts files
LEDE Commits
lede-commits at lists.infradead.org
Sat Apr 16 05:25:06 PDT 2022
hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/56cd49bdc8ff762c52327ee7faa14cb99895e0fd
commit 56cd49bdc8ff762c52327ee7faa14cb99895e0fd
Author: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
AuthorDate: Fri Mar 18 23:36:41 2022 +0100
lantiq: fritz736x: Move GPIO resets to the inidvidual board.dts files
FRITZ!Box 7360 V2 and FRITZ!Box 7360 SL both use GPIOs 37 (for &phy0)
and GPIO 44 (for &phy1) to control the PHY's reset lines. FRITZ!Box 7362
SL however uses GPIO 45 (for &phy0) and GPIO 44 (for &phy1). Move the
GPIO reset definitions to each individual board .dts and while at it,
fix the GPIOs for the FRITZ!Box 7362 SL.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
---
.../mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts | 30 +++++++++++++++++----
.../mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts | 31 ++++++++++++++++++----
.../mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts | 31 ++++++++++++++++++----
.../mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi | 17 ------------
4 files changed, 77 insertions(+), 32 deletions(-)
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts
index 8881745819..063d6dca5e 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts
@@ -7,11 +7,23 @@
model = "AVM FRITZ!Box 7360 V2";
};
-&state_default {
- pcie-rst {
- lantiq,pins = "io21";
- lantiq,pull = <0>;
- lantiq,output = <1>;
+&gpio {
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinmux {
+ pcie-rst {
+ lantiq,pins = "io21";
+ lantiq,pull = <0>;
+ lantiq,output = <1>;
+ };
+
+ phy-rst {
+ lantiq,pins = "io37", "io44";
+ lantiq,pull = <0>;
+ lantiq,open-drain;
+ lantiq,output = <1>;
+ };
};
};
@@ -58,6 +70,14 @@
mac-address-increment = <(-2)>;
};
+&phy0 {
+ reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+};
+
+&phy1 {
+ reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+};
+
&urlader {
compatible = "nvmem-cells";
#address-cells = <1>;
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts
index 945c553688..31523eaae0 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts
@@ -7,12 +7,25 @@
model = "AVM FRITZ!Box 7360 SL";
};
-&state_default {
- pcie-rst {
- lantiq,pins = "io38";
- lantiq,pull = <0>;
- lantiq,output = <1>;
+&gpio {
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinmux {
+ pcie-rst {
+ lantiq,pins = "io21";
+ lantiq,pull = <0>;
+ lantiq,output = <1>;
+ };
+
+ phy-rst {
+ lantiq,pins = "io37", "io44";
+ lantiq,pull = <0>;
+ lantiq,open-drain;
+ lantiq,output = <1>;
+ };
};
+
};
&localbus {
@@ -58,6 +71,14 @@
mac-address-increment = <(-2)>;
};
+&phy0 {
+ reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+};
+
+&phy1 {
+ reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+};
+
&urlader {
compatible = "nvmem-cells";
#address-cells = <1>;
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts
index c75edd933c..7995b34971 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts
@@ -7,12 +7,25 @@
model = "AVM FRITZ!Box 7362 SL";
};
-&state_default {
- pcie-rst {
- lantiq,pins = "io21";
- lantiq,open-drain = <1>;
- lantiq,output = <1>;
+&gpio {
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinmux {
+ pcie-rst {
+ lantiq,pins = "io21";
+ lantiq,pull = <0>;
+ lantiq,output = <1>;
+ };
+
+ phy-rst {
+ lantiq,pins = "io44", "io45";
+ lantiq,pull = <0>;
+ lantiq,open-drain;
+ lantiq,output = <1>;
+ };
};
+
};
&spi {
@@ -96,6 +109,14 @@
mac-address-increment = <(-2)>;
};
+&phy0 {
+ reset-gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
+};
+
+&phy1 {
+ reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+};
+
&urlader {
compatible = "nvmem-cells";
#address-cells = <1>;
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
index 8406539f69..73f6e152bf 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
@@ -88,21 +88,6 @@
lantiq,gphy-mode = <GPHY_MODE_GE>;
};
-&gpio {
- pinctrl-names = "default";
- pinctrl-0 = <&state_default>;
-
- state_default: pinmux {
- phy-rst {
- lantiq,pins = "io37", "io44";
- lantiq,pull = <0>;
- lantiq,open-drain;
- lantiq,output = <1>;
- };
- };
-
-};
-
&gswip {
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
@@ -111,12 +96,10 @@
&gswip_mdio {
phy0: ethernet-phy at 0 {
reg = <0x00>;
- reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
};
phy1: ethernet-phy at 1 {
reg = <0x01>;
- reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
};
phy11: ethernet-phy at 11 {
More information about the lede-commits
mailing list