Message ID | 20220218002956.6590-17-ansuelsmth@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Multiple addition to ipq8064 dtsi | expand |
On Fri, Feb 18, 2022 at 01:29:54AM +0100, Ansuel Smith wrote: > Mdio0_pins are now declared in ipq8064 dtsi. Usb phy are enabled by > default. > > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> > --- > arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 17 ----------------- > 1 file changed, 17 deletions(-) > > diff --git a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts > index 0982b6214fb7..ddc9cc49ab60 100644 > --- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts > +++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts > @@ -259,10 +259,6 @@ &gsbi7_serial { > status = "okay"; > }; > > -&hs_phy_1 { > - status = "okay"; > -}; > - > &nand { > status = "okay"; > > @@ -309,15 +305,6 @@ mux { > }; > }; > > - mdio0_pins: mdio0_pins { > - mux { > - pins = "gpio0", "gpio1"; > - function = "gpio"; > - drive-strength = <8>; > - bias-disable; > - }; > - }; > - This sets the pins to "gpio". Your earlier patch sets them to "mdio", so removing this will break MDIO0 on the RB3011. It's likely that your fixes for MDIO/QCA8K mean that the RB3011 can be switch to use the MDIO driver rather than mdio-gpio, but that will need tested and this change alone will definitely break things. > mdio1_pins: mdio1_pins { > mux { > pins = "gpio10", "gpio11"; > @@ -358,10 +345,6 @@ mux { > }; > }; > > -&ss_phy_1 { > - status = "okay"; > -}; > - > &usb3_1 { > pinctrl-0 = <&usb1_pwr_en_pins>; > pinctrl-names = "default"; > -- > 2.34.1 > J.
On Fri, Feb 18, 2022 at 02:11:59PM +0000, Jonathan McDowell wrote: > On Fri, Feb 18, 2022 at 01:29:54AM +0100, Ansuel Smith wrote: > > Mdio0_pins are now declared in ipq8064 dtsi. Usb phy are enabled by > > default. ... > > - mdio0_pins: mdio0_pins { > > - mux { > > - pins = "gpio0", "gpio1"; > > - function = "gpio"; > > - drive-strength = <8>; > > - bias-disable; > > - }; > > - }; > > - > > This sets the pins to "gpio". Your earlier patch sets them to "mdio", so > removing this will break MDIO0 on the RB3011. It's likely that your > fixes for MDIO/QCA8K mean that the RB3011 can be switch to use the MDIO > driver rather than mdio-gpio, but that will need tested and this change > alone will definitely break things. I tried the below patch to switch the RB3011 to the IPQ8064 MDIO driver (based on qcom,ipq8064-mdio.yaml) and get: [ 1.270310] qca8k 37000000.mdio-mii:10: Switch id detected 0 but expected 13 and none of the ports on that associated switch come up. Kernel is 5.15.23 rather than latest, but there are no updates to mdio-ipq8064.c in later kernels than I can see and none of the qca8k changes seem relevant. Is there something else I'm missing? diff --git a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts index c3e3070702f9..0cafee65ca22 100644 --- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts +++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts @@ -24,13 +24,13 @@ memory@42000000 { device_type = "memory"; }; - mdio0: mdio-0 { + mdio0: mdio@37000000 { status = "okay"; - compatible = "virtual,mdio-gpio"; - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + compatible = "qcom,ipq8064-mdio"; #address-cells = <1>; #size-cells = <0>; + reg = <0x37000000 0x200000>; + clocks = <&gcc GMAC_CORE1_CLK>; pinctrl-0 = <&mdio0_pins>; pinctrl-names = "default"; @@ -318,7 +318,7 @@ mux { mdio0_pins: mdio0_pins { mux { pins = "gpio0", "gpio1"; - function = "gpio"; + function = "mdio"; drive-strength = <8>; bias-disable; }; J.
On Fri, Feb 18, 2022 at 02:11:59PM +0000, Jonathan McDowell wrote: > On Fri, Feb 18, 2022 at 01:29:54AM +0100, Ansuel Smith wrote: > > Mdio0_pins are now declared in ipq8064 dtsi. Usb phy are enabled by > > default. > > > > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> > > --- > > arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 17 ----------------- > > 1 file changed, 17 deletions(-) > > > > diff --git a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts > > index 0982b6214fb7..ddc9cc49ab60 100644 > > --- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts > > +++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts > > @@ -259,10 +259,6 @@ &gsbi7_serial { > > status = "okay"; > > }; > > > > -&hs_phy_1 { > > - status = "okay"; > > -}; > > - > > &nand { > > status = "okay"; > > > > @@ -309,15 +305,6 @@ mux { > > }; > > }; > > > > - mdio0_pins: mdio0_pins { > > - mux { > > - pins = "gpio0", "gpio1"; > > - function = "gpio"; > > - drive-strength = <8>; > > - bias-disable; > > - }; > > - }; > > - > > This sets the pins to "gpio". Your earlier patch sets them to "mdio", so > removing this will break MDIO0 on the RB3011. It's likely that your > fixes for MDIO/QCA8K mean that the RB3011 can be switch to use the MDIO > driver rather than mdio-gpio, but that will need tested and this change > alone will definitely break things. > I could be wrong but I remember that before the mdio driver we used the mdio-gpio driver with the pins set to mdio function without problems. > > mdio1_pins: mdio1_pins { > > mux { > > pins = "gpio10", "gpio11"; > > @@ -358,10 +345,6 @@ mux { > > }; > > }; > > > > -&ss_phy_1 { > > - status = "okay"; > > -}; > > - > > &usb3_1 { > > pinctrl-0 = <&usb1_pwr_en_pins>; > > pinctrl-names = "default"; > > -- > > 2.34.1 > > > > J. > > -- > /-\ | Even the Evening Herald slags me > |@/ Debian GNU/Linux Developer | off. > \- |
On Sat, Feb 19, 2022 at 07:08:34PM +0000, Jonathan McDowell wrote: > On Fri, Feb 18, 2022 at 02:11:59PM +0000, Jonathan McDowell wrote: > > On Fri, Feb 18, 2022 at 01:29:54AM +0100, Ansuel Smith wrote: > > > Mdio0_pins are now declared in ipq8064 dtsi. Usb phy are enabled by > > > default. > ... > > > - mdio0_pins: mdio0_pins { > > > - mux { > > > - pins = "gpio0", "gpio1"; > > > - function = "gpio"; > > > - drive-strength = <8>; > > > - bias-disable; > > > - }; > > > - }; > > > - > > > > This sets the pins to "gpio". Your earlier patch sets them to "mdio", so > > removing this will break MDIO0 on the RB3011. It's likely that your > > fixes for MDIO/QCA8K mean that the RB3011 can be switch to use the MDIO > > driver rather than mdio-gpio, but that will need tested and this change > > alone will definitely break things. > > I tried the below patch to switch the RB3011 to the IPQ8064 MDIO driver > (based on qcom,ipq8064-mdio.yaml) and get: > > [ 1.270310] qca8k 37000000.mdio-mii:10: Switch id detected 0 but expected 13 > > and none of the ports on that associated switch come up. Kernel is > 5.15.23 rather than latest, but there are no updates to mdio-ipq8064.c > in later kernels than I can see and none of the qca8k changes seem > relevant. Is there something else I'm missing? > I encounter an error like that when the MDIO_MASTER_EN was set to 1. Wonder if we should trigger a switch reset or a reset of the MDIO_MASTER_EN before probing the switch? (this is currently done after any phy read/write) But it's strange... Wonder if the dedicated mdio can't work on this device with 2 switch attached? > > diff --git a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts > index c3e3070702f9..0cafee65ca22 100644 > --- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts > +++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts > @@ -24,13 +24,13 @@ memory@42000000 { > device_type = "memory"; > }; > > - mdio0: mdio-0 { > + mdio0: mdio@37000000 { > status = "okay"; > - compatible = "virtual,mdio-gpio"; > - gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, > - <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; > + compatible = "qcom,ipq8064-mdio"; > #address-cells = <1>; > #size-cells = <0>; > + reg = <0x37000000 0x200000>; > + clocks = <&gcc GMAC_CORE1_CLK>; > > pinctrl-0 = <&mdio0_pins>; > pinctrl-names = "default"; > @@ -318,7 +318,7 @@ mux { > mdio0_pins: mdio0_pins { > mux { > pins = "gpio0", "gpio1"; > - function = "gpio"; > + function = "mdio"; > drive-strength = <8>; > bias-disable; > }; > > J. > > -- > /-\ | Shall I call the United Nations? > |@/ Debian GNU/Linux Developer | > \- |
On Sun, Feb 20, 2022 at 03:44:54PM +0100, Ansuel Smith wrote: > On Fri, Feb 18, 2022 at 02:11:59PM +0000, Jonathan McDowell wrote: > > On Fri, Feb 18, 2022 at 01:29:54AM +0100, Ansuel Smith wrote: > > > Mdio0_pins are now declared in ipq8064 dtsi. Usb phy are enabled by > > > default. > > > > > > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> > > > --- > > > arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 17 ----------------- > > > 1 file changed, 17 deletions(-) ... > > > - mdio0_pins: mdio0_pins { > > > - mux { > > > - pins = "gpio0", "gpio1"; > > > - function = "gpio"; > > > - drive-strength = <8>; > > > - bias-disable; > > > - }; > > > - }; > > > - > > > > This sets the pins to "gpio". Your earlier patch sets them to "mdio", so > > removing this will break MDIO0 on the RB3011. It's likely that your > > fixes for MDIO/QCA8K mean that the RB3011 can be switch to use the MDIO > > driver rather than mdio-gpio, but that will need tested and this change > > alone will definitely break things. > > > I could be wrong but I remember that before the mdio driver we used the > mdio-gpio driver with the pins set to mdio function without problems. It seems like that's the case; I've just tried it out and switch0 seems to be working fine. J.
diff --git a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts index 0982b6214fb7..ddc9cc49ab60 100644 --- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts +++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts @@ -259,10 +259,6 @@ &gsbi7_serial { status = "okay"; }; -&hs_phy_1 { - status = "okay"; -}; - &nand { status = "okay"; @@ -309,15 +305,6 @@ mux { }; }; - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "gpio"; - drive-strength = <8>; - bias-disable; - }; - }; - mdio1_pins: mdio1_pins { mux { pins = "gpio10", "gpio11"; @@ -358,10 +345,6 @@ mux { }; }; -&ss_phy_1 { - status = "okay"; -}; - &usb3_1 { pinctrl-0 = <&usb1_pwr_en_pins>; pinctrl-names = "default";
Mdio0_pins are now declared in ipq8064 dtsi. Usb phy are enabled by default. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> --- arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 17 ----------------- 1 file changed, 17 deletions(-)