All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3]  Add reset deassertion for Aspeed MDIO
@ 2022-03-21  9:56 ` Dylan Hung
  0 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-21  9:56 UTC (permalink / raw)
  To: robh+dt, joel, andrew, andrew, hkallweit1, linux, davem, kuba,
	pabeni, p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev
  Cc: BMC-SW

Add missing reset deassertion for Aspeed MDIO. There are 4 MDIOs embedded
in Aspeed AST2600 and share one reset control bit SCU50[3].

Dylan Hung (3):
  dt-bindings: net: add reset property for aspeed, ast2600-mdio binding
  net: mdio: add reset control for Aspeed MDIO
  ARM: dts: aspeed: add reset properties into MDIO nodes

 .../bindings/net/aspeed,ast2600-mdio.yaml         |  4 ++++
 arch/arm/boot/dts/aspeed-g6.dtsi                  |  4 ++++
 drivers/net/mdio/mdio-aspeed.c                    | 15 ++++++++++++++-
 3 files changed, 22 insertions(+), 1 deletion(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 0/3]  Add reset deassertion for Aspeed MDIO
@ 2022-03-21  9:56 ` Dylan Hung
  0 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-21  9:56 UTC (permalink / raw)
  To: robh+dt, joel, andrew, andrew, hkallweit1, linux, davem, kuba,
	pabeni, p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev
  Cc: BMC-SW

Add missing reset deassertion for Aspeed MDIO. There are 4 MDIOs embedded
in Aspeed AST2600 and share one reset control bit SCU50[3].

Dylan Hung (3):
  dt-bindings: net: add reset property for aspeed, ast2600-mdio binding
  net: mdio: add reset control for Aspeed MDIO
  ARM: dts: aspeed: add reset properties into MDIO nodes

 .../bindings/net/aspeed,ast2600-mdio.yaml         |  4 ++++
 arch/arm/boot/dts/aspeed-g6.dtsi                  |  4 ++++
 drivers/net/mdio/mdio-aspeed.c                    | 15 ++++++++++++++-
 3 files changed, 22 insertions(+), 1 deletion(-)

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 1/3] dt-bindings: net: add reset property for aspeed, ast2600-mdio binding
  2022-03-21  9:56 ` Dylan Hung
@ 2022-03-21  9:56   ` Dylan Hung
  -1 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-21  9:56 UTC (permalink / raw)
  To: robh+dt, joel, andrew, andrew, hkallweit1, linux, davem, kuba,
	pabeni, p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev
  Cc: BMC-SW, stable

The AST2600 MDIO bus controller has a reset control bit and must be
deasserted before the manipulating the MDIO controller.

Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
Cc: stable@vger.kernel.org
---
 .../devicetree/bindings/net/aspeed,ast2600-mdio.yaml          | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml b/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
index 1c88820cbcdf..8ba108e25d94 100644
--- a/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
+++ b/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
@@ -23,12 +23,15 @@ properties:
   reg:
     maxItems: 1
     description: The register range of the MDIO controller instance
+  resets:
+    maxItems: 1
 
 required:
   - compatible
   - reg
   - "#address-cells"
   - "#size-cells"
+  - resets
 
 unevaluatedProperties: false
 
@@ -39,6 +42,7 @@ examples:
             reg = <0x1e650000 0x8>;
             #address-cells = <1>;
             #size-cells = <0>;
+            resets = <&syscon 35>;
 
             ethphy0: ethernet-phy@0 {
                     compatible = "ethernet-phy-ieee802.3-c22";
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 1/3] dt-bindings: net: add reset property for aspeed, ast2600-mdio binding
@ 2022-03-21  9:56   ` Dylan Hung
  0 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-21  9:56 UTC (permalink / raw)
  To: robh+dt, joel, andrew, andrew, hkallweit1, linux, davem, kuba,
	pabeni, p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev
  Cc: BMC-SW, stable

The AST2600 MDIO bus controller has a reset control bit and must be
deasserted before the manipulating the MDIO controller.

Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
Cc: stable@vger.kernel.org
---
 .../devicetree/bindings/net/aspeed,ast2600-mdio.yaml          | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml b/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
index 1c88820cbcdf..8ba108e25d94 100644
--- a/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
+++ b/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
@@ -23,12 +23,15 @@ properties:
   reg:
     maxItems: 1
     description: The register range of the MDIO controller instance
+  resets:
+    maxItems: 1
 
 required:
   - compatible
   - reg
   - "#address-cells"
   - "#size-cells"
+  - resets
 
 unevaluatedProperties: false
 
@@ -39,6 +42,7 @@ examples:
             reg = <0x1e650000 0x8>;
             #address-cells = <1>;
             #size-cells = <0>;
+            resets = <&syscon 35>;
 
             ethphy0: ethernet-phy@0 {
                     compatible = "ethernet-phy-ieee802.3-c22";
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 2/3] net: mdio: add reset control for Aspeed MDIO
  2022-03-21  9:56 ` Dylan Hung
@ 2022-03-21  9:56   ` Dylan Hung
  -1 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-21  9:56 UTC (permalink / raw)
  To: robh+dt, joel, andrew, andrew, hkallweit1, linux, davem, kuba,
	pabeni, p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev
  Cc: BMC-SW, stable

Add reset assertion/deassertion for Aspeed MDIO.  There are 4 MDIO
controllers embedded in Aspeed AST2600 SOC and share one reset control
register SCU50[3]. So devm_reset_control_get_shared is used in this
change.

Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
Cc: stable@vger.kernel.org
---
 drivers/net/mdio/mdio-aspeed.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mdio/mdio-aspeed.c b/drivers/net/mdio/mdio-aspeed.c
index e2273588c75b..5bda48d7071d 100644
--- a/drivers/net/mdio/mdio-aspeed.c
+++ b/drivers/net/mdio/mdio-aspeed.c
@@ -3,6 +3,7 @@
 
 #include <linux/bitfield.h>
 #include <linux/delay.h>
+#include <linux/reset.h>
 #include <linux/iopoll.h>
 #include <linux/mdio.h>
 #include <linux/module.h>
@@ -37,6 +38,7 @@
 
 struct aspeed_mdio {
 	void __iomem *base;
+	struct reset_control *reset;
 };
 
 static int aspeed_mdio_read(struct mii_bus *bus, int addr, int regnum)
@@ -120,6 +122,12 @@ static int aspeed_mdio_probe(struct platform_device *pdev)
 	if (IS_ERR(ctx->base))
 		return PTR_ERR(ctx->base);
 
+	ctx->reset = devm_reset_control_get_shared(&pdev->dev, NULL);
+	if (IS_ERR(ctx->reset))
+		return PTR_ERR(ctx->reset);
+
+	reset_control_deassert(ctx->reset);
+
 	bus->name = DRV_NAME;
 	snprintf(bus->id, MII_BUS_ID_SIZE, "%s%d", pdev->name, pdev->id);
 	bus->parent = &pdev->dev;
@@ -129,6 +137,7 @@ static int aspeed_mdio_probe(struct platform_device *pdev)
 	rc = of_mdiobus_register(bus, pdev->dev.of_node);
 	if (rc) {
 		dev_err(&pdev->dev, "Cannot register MDIO bus!\n");
+		reset_control_assert(ctx->reset);
 		return rc;
 	}
 
@@ -139,7 +148,11 @@ static int aspeed_mdio_probe(struct platform_device *pdev)
 
 static int aspeed_mdio_remove(struct platform_device *pdev)
 {
-	mdiobus_unregister(platform_get_drvdata(pdev));
+	struct mii_bus *bus = (struct mii_bus *)platform_get_drvdata(pdev);
+	struct aspeed_mdio *ctx = bus->priv;
+
+	reset_control_assert(ctx->reset);
+	mdiobus_unregister(bus);
 
 	return 0;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 2/3] net: mdio: add reset control for Aspeed MDIO
@ 2022-03-21  9:56   ` Dylan Hung
  0 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-21  9:56 UTC (permalink / raw)
  To: robh+dt, joel, andrew, andrew, hkallweit1, linux, davem, kuba,
	pabeni, p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev
  Cc: BMC-SW, stable

Add reset assertion/deassertion for Aspeed MDIO.  There are 4 MDIO
controllers embedded in Aspeed AST2600 SOC and share one reset control
register SCU50[3]. So devm_reset_control_get_shared is used in this
change.

Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
Cc: stable@vger.kernel.org
---
 drivers/net/mdio/mdio-aspeed.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mdio/mdio-aspeed.c b/drivers/net/mdio/mdio-aspeed.c
index e2273588c75b..5bda48d7071d 100644
--- a/drivers/net/mdio/mdio-aspeed.c
+++ b/drivers/net/mdio/mdio-aspeed.c
@@ -3,6 +3,7 @@
 
 #include <linux/bitfield.h>
 #include <linux/delay.h>
+#include <linux/reset.h>
 #include <linux/iopoll.h>
 #include <linux/mdio.h>
 #include <linux/module.h>
@@ -37,6 +38,7 @@
 
 struct aspeed_mdio {
 	void __iomem *base;
+	struct reset_control *reset;
 };
 
 static int aspeed_mdio_read(struct mii_bus *bus, int addr, int regnum)
@@ -120,6 +122,12 @@ static int aspeed_mdio_probe(struct platform_device *pdev)
 	if (IS_ERR(ctx->base))
 		return PTR_ERR(ctx->base);
 
+	ctx->reset = devm_reset_control_get_shared(&pdev->dev, NULL);
+	if (IS_ERR(ctx->reset))
+		return PTR_ERR(ctx->reset);
+
+	reset_control_deassert(ctx->reset);
+
 	bus->name = DRV_NAME;
 	snprintf(bus->id, MII_BUS_ID_SIZE, "%s%d", pdev->name, pdev->id);
 	bus->parent = &pdev->dev;
@@ -129,6 +137,7 @@ static int aspeed_mdio_probe(struct platform_device *pdev)
 	rc = of_mdiobus_register(bus, pdev->dev.of_node);
 	if (rc) {
 		dev_err(&pdev->dev, "Cannot register MDIO bus!\n");
+		reset_control_assert(ctx->reset);
 		return rc;
 	}
 
@@ -139,7 +148,11 @@ static int aspeed_mdio_probe(struct platform_device *pdev)
 
 static int aspeed_mdio_remove(struct platform_device *pdev)
 {
-	mdiobus_unregister(platform_get_drvdata(pdev));
+	struct mii_bus *bus = (struct mii_bus *)platform_get_drvdata(pdev);
+	struct aspeed_mdio *ctx = bus->priv;
+
+	reset_control_assert(ctx->reset);
+	mdiobus_unregister(bus);
 
 	return 0;
 }
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
  2022-03-21  9:56 ` Dylan Hung
@ 2022-03-21  9:56   ` Dylan Hung
  -1 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-21  9:56 UTC (permalink / raw)
  To: robh+dt, joel, andrew, andrew, hkallweit1, linux, davem, kuba,
	pabeni, p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev
  Cc: BMC-SW, stable

Add reset control properties into MDIO nodes.  The 4 MDIO controllers in
AST2600 SOC share one reset control bit SCU50[3].

Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
Cc: stable@vger.kernel.org
---
 arch/arm/boot/dts/aspeed-g6.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
index c32e87fad4dc..ab20ea8d829d 100644
--- a/arch/arm/boot/dts/aspeed-g6.dtsi
+++ b/arch/arm/boot/dts/aspeed-g6.dtsi
@@ -181,6 +181,7 @@ mdio0: mdio@1e650000 {
 			status = "disabled";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_mdio1_default>;
+			resets = <&syscon ASPEED_RESET_MII>;
 		};
 
 		mdio1: mdio@1e650008 {
@@ -191,6 +192,7 @@ mdio1: mdio@1e650008 {
 			status = "disabled";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_mdio2_default>;
+			resets = <&syscon ASPEED_RESET_MII>;
 		};
 
 		mdio2: mdio@1e650010 {
@@ -201,6 +203,7 @@ mdio2: mdio@1e650010 {
 			status = "disabled";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_mdio3_default>;
+			resets = <&syscon ASPEED_RESET_MII>;
 		};
 
 		mdio3: mdio@1e650018 {
@@ -211,6 +214,7 @@ mdio3: mdio@1e650018 {
 			status = "disabled";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_mdio4_default>;
+			resets = <&syscon ASPEED_RESET_MII>;
 		};
 
 		mac0: ftgmac@1e660000 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
@ 2022-03-21  9:56   ` Dylan Hung
  0 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-21  9:56 UTC (permalink / raw)
  To: robh+dt, joel, andrew, andrew, hkallweit1, linux, davem, kuba,
	pabeni, p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev
  Cc: BMC-SW, stable

Add reset control properties into MDIO nodes.  The 4 MDIO controllers in
AST2600 SOC share one reset control bit SCU50[3].

Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
Cc: stable@vger.kernel.org
---
 arch/arm/boot/dts/aspeed-g6.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
index c32e87fad4dc..ab20ea8d829d 100644
--- a/arch/arm/boot/dts/aspeed-g6.dtsi
+++ b/arch/arm/boot/dts/aspeed-g6.dtsi
@@ -181,6 +181,7 @@ mdio0: mdio@1e650000 {
 			status = "disabled";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_mdio1_default>;
+			resets = <&syscon ASPEED_RESET_MII>;
 		};
 
 		mdio1: mdio@1e650008 {
@@ -191,6 +192,7 @@ mdio1: mdio@1e650008 {
 			status = "disabled";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_mdio2_default>;
+			resets = <&syscon ASPEED_RESET_MII>;
 		};
 
 		mdio2: mdio@1e650010 {
@@ -201,6 +203,7 @@ mdio2: mdio@1e650010 {
 			status = "disabled";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_mdio3_default>;
+			resets = <&syscon ASPEED_RESET_MII>;
 		};
 
 		mdio3: mdio@1e650018 {
@@ -211,6 +214,7 @@ mdio3: mdio@1e650018 {
 			status = "disabled";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_mdio4_default>;
+			resets = <&syscon ASPEED_RESET_MII>;
 		};
 
 		mac0: ftgmac@1e660000 {
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 2/3] net: mdio: add reset control for Aspeed MDIO
  2022-03-21  9:56   ` Dylan Hung
@ 2022-03-21 10:15     ` Philipp Zabel
  -1 siblings, 0 replies; 32+ messages in thread
From: Philipp Zabel @ 2022-03-21 10:15 UTC (permalink / raw)
  To: Dylan Hung, robh+dt, joel, andrew, andrew, hkallweit1, linux,
	davem, kuba, pabeni, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev
  Cc: BMC-SW, stable

On Mo, 2022-03-21 at 17:56 +0800, Dylan Hung wrote:
> Add reset assertion/deassertion for Aspeed MDIO.  There are 4 MDIO
> controllers embedded in Aspeed AST2600 SOC and share one reset
> control
> register SCU50[3]. So devm_reset_control_get_shared is used in this
> change.
> 
> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>


regards
Philipp

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 2/3] net: mdio: add reset control for Aspeed MDIO
@ 2022-03-21 10:15     ` Philipp Zabel
  0 siblings, 0 replies; 32+ messages in thread
From: Philipp Zabel @ 2022-03-21 10:15 UTC (permalink / raw)
  To: Dylan Hung, robh+dt, joel, andrew, andrew, hkallweit1, linux,
	davem, kuba, pabeni, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev
  Cc: BMC-SW, stable

On Mo, 2022-03-21 at 17:56 +0800, Dylan Hung wrote:
> Add reset assertion/deassertion for Aspeed MDIO.  There are 4 MDIO
> controllers embedded in Aspeed AST2600 SOC and share one reset
> control
> register SCU50[3]. So devm_reset_control_get_shared is used in this
> change.
> 
> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>


regards
Philipp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 0/3]  Add reset deassertion for Aspeed MDIO
  2022-03-21  9:56 ` Dylan Hung
@ 2022-03-21 12:45   ` Andrew Lunn
  -1 siblings, 0 replies; 32+ messages in thread
From: Andrew Lunn @ 2022-03-21 12:45 UTC (permalink / raw)
  To: Dylan Hung
  Cc: robh+dt, joel, andrew, hkallweit1, linux, davem, kuba, pabeni,
	p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev, BMC-SW

On Mon, Mar 21, 2022 at 05:56:45PM +0800, Dylan Hung wrote:
> Add missing reset deassertion for Aspeed MDIO. There are 4 MDIOs embedded
> in Aspeed AST2600 and share one reset control bit SCU50[3].

Hi Dylan

Please wait at least 24 hours between posting versions, to give other
people times to comment.

The danger here is that my comments on the previous version are going
to get ignored, and this version merged containing the issues i
pointed out.

	Andrew

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 0/3]  Add reset deassertion for Aspeed MDIO
@ 2022-03-21 12:45   ` Andrew Lunn
  0 siblings, 0 replies; 32+ messages in thread
From: Andrew Lunn @ 2022-03-21 12:45 UTC (permalink / raw)
  To: Dylan Hung
  Cc: robh+dt, joel, andrew, hkallweit1, linux, davem, kuba, pabeni,
	p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev, BMC-SW

On Mon, Mar 21, 2022 at 05:56:45PM +0800, Dylan Hung wrote:
> Add missing reset deassertion for Aspeed MDIO. There are 4 MDIOs embedded
> in Aspeed AST2600 and share one reset control bit SCU50[3].

Hi Dylan

Please wait at least 24 hours between posting versions, to give other
people times to comment.

The danger here is that my comments on the previous version are going
to get ignored, and this version merged containing the issues i
pointed out.

	Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: net: add reset property for aspeed, ast2600-mdio binding
  2022-03-21  9:56   ` Dylan Hung
@ 2022-03-21 12:48     ` Andrew Lunn
  -1 siblings, 0 replies; 32+ messages in thread
From: Andrew Lunn @ 2022-03-21 12:48 UTC (permalink / raw)
  To: Dylan Hung
  Cc: robh+dt, joel, andrew, hkallweit1, linux, davem, kuba, pabeni,
	p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev, BMC-SW, stable

On Mon, Mar 21, 2022 at 05:56:46PM +0800, Dylan Hung wrote:
> The AST2600 MDIO bus controller has a reset control bit and must be
> deasserted before the manipulating the MDIO controller.
> 
> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> Cc: stable@vger.kernel.org

Please read the netdev FAQ. You need to indicates which networking
tree this is for in the Subject line, and you need to make use of the
correct git tree. You should also have a Fixes: tag, indicating where
the issue was introduced.

    Andrew

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: net: add reset property for aspeed, ast2600-mdio binding
@ 2022-03-21 12:48     ` Andrew Lunn
  0 siblings, 0 replies; 32+ messages in thread
From: Andrew Lunn @ 2022-03-21 12:48 UTC (permalink / raw)
  To: Dylan Hung
  Cc: robh+dt, joel, andrew, hkallweit1, linux, davem, kuba, pabeni,
	p.zabel, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev, BMC-SW, stable

On Mon, Mar 21, 2022 at 05:56:46PM +0800, Dylan Hung wrote:
> The AST2600 MDIO bus controller has a reset control bit and must be
> deasserted before the manipulating the MDIO controller.
> 
> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> Cc: stable@vger.kernel.org

Please read the netdev FAQ. You need to indicates which networking
tree this is for in the Subject line, and you need to make use of the
correct git tree. You should also have a Fixes: tag, indicating where
the issue was introduced.

    Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: net: add reset property for aspeed, ast2600-mdio binding
  2022-03-21  9:56   ` Dylan Hung
@ 2022-03-21 13:35     ` Rob Herring
  -1 siblings, 0 replies; 32+ messages in thread
From: Rob Herring @ 2022-03-21 13:35 UTC (permalink / raw)
  To: Dylan Hung
  Cc: robh+dt, devicetree, netdev, linux-kernel, stable, andrew,
	linux-arm-kernel, andrew, davem, linux-aspeed, BMC-SW, kuba,
	p.zabel, hkallweit1, joel, pabeni, linux

On Mon, 21 Mar 2022 17:56:46 +0800, Dylan Hung wrote:
> The AST2600 MDIO bus controller has a reset control bit and must be
> deasserted before the manipulating the MDIO controller.
> 
> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> Cc: stable@vger.kernel.org
> ---
>  .../devicetree/bindings/net/aspeed,ast2600-mdio.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1607671


mdio@1e650000: 'resets' is a required property
	arch/arm/boot/dts/aspeed-ast2600-evb-a1.dt.yaml
	arch/arm/boot/dts/aspeed-ast2600-evb.dt.yaml
	arch/arm/boot/dts/aspeed-bmc-inventec-transformers.dt.yaml

mdio@1e650008: 'resets' is a required property
	arch/arm/boot/dts/aspeed-ast2600-evb-a1.dt.yaml
	arch/arm/boot/dts/aspeed-ast2600-evb.dt.yaml
	arch/arm/boot/dts/aspeed-bmc-facebook-cloudripper.dt.yaml
	arch/arm/boot/dts/aspeed-bmc-facebook-fuji.dt.yaml

mdio@1e650010: 'resets' is a required property
	arch/arm/boot/dts/aspeed-ast2600-evb-a1.dt.yaml
	arch/arm/boot/dts/aspeed-ast2600-evb.dt.yaml

mdio@1e650018: 'resets' is a required property
	arch/arm/boot/dts/aspeed-ast2600-evb-a1.dt.yaml
	arch/arm/boot/dts/aspeed-ast2600-evb.dt.yaml
	arch/arm/boot/dts/aspeed-bmc-facebook-cloudripper.dt.yaml


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: net: add reset property for aspeed, ast2600-mdio binding
@ 2022-03-21 13:35     ` Rob Herring
  0 siblings, 0 replies; 32+ messages in thread
From: Rob Herring @ 2022-03-21 13:35 UTC (permalink / raw)
  To: Dylan Hung
  Cc: robh+dt, devicetree, netdev, linux-kernel, stable, andrew,
	linux-arm-kernel, andrew, davem, linux-aspeed, BMC-SW, kuba,
	p.zabel, hkallweit1, joel, pabeni, linux

On Mon, 21 Mar 2022 17:56:46 +0800, Dylan Hung wrote:
> The AST2600 MDIO bus controller has a reset control bit and must be
> deasserted before the manipulating the MDIO controller.
> 
> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> Cc: stable@vger.kernel.org
> ---
>  .../devicetree/bindings/net/aspeed,ast2600-mdio.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1607671


mdio@1e650000: 'resets' is a required property
	arch/arm/boot/dts/aspeed-ast2600-evb-a1.dt.yaml
	arch/arm/boot/dts/aspeed-ast2600-evb.dt.yaml
	arch/arm/boot/dts/aspeed-bmc-inventec-transformers.dt.yaml

mdio@1e650008: 'resets' is a required property
	arch/arm/boot/dts/aspeed-ast2600-evb-a1.dt.yaml
	arch/arm/boot/dts/aspeed-ast2600-evb.dt.yaml
	arch/arm/boot/dts/aspeed-bmc-facebook-cloudripper.dt.yaml
	arch/arm/boot/dts/aspeed-bmc-facebook-fuji.dt.yaml

mdio@1e650010: 'resets' is a required property
	arch/arm/boot/dts/aspeed-ast2600-evb-a1.dt.yaml
	arch/arm/boot/dts/aspeed-ast2600-evb.dt.yaml

mdio@1e650018: 'resets' is a required property
	arch/arm/boot/dts/aspeed-ast2600-evb-a1.dt.yaml
	arch/arm/boot/dts/aspeed-ast2600-evb.dt.yaml
	arch/arm/boot/dts/aspeed-bmc-facebook-cloudripper.dt.yaml


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: net: add reset property for aspeed, ast2600-mdio binding
  2022-03-21  9:56   ` Dylan Hung
@ 2022-03-21 15:51     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 32+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-21 15:51 UTC (permalink / raw)
  To: Dylan Hung, robh+dt, joel, andrew, andrew, hkallweit1, linux,
	davem, kuba, pabeni, p.zabel, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel, netdev
  Cc: BMC-SW, stable

On 21/03/2022 10:56, Dylan Hung wrote:
> The AST2600 MDIO bus controller has a reset control bit and must be
> deasserted before the manipulating the MDIO controller.
> 
> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> Cc: stable@vger.kernel.org

No bugs fixes, no cc-stable. Especially that you break existing devices...

> ---
>  .../devicetree/bindings/net/aspeed,ast2600-mdio.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml b/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
> index 1c88820cbcdf..8ba108e25d94 100644
> --- a/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
> +++ b/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
> @@ -23,12 +23,15 @@ properties:
>    reg:
>      maxItems: 1
>      description: The register range of the MDIO controller instance

Missing empty line.

> +  resets:
> +    maxItems: 1
>  
>  required:
>    - compatible
>    - reg
>    - "#address-cells"
>    - "#size-cells"
> +  - resets

You break the ABI. This isusually not accepted in a regular kernel and
even totally not accepted accepted for stable kernel.

>  
>  unevaluatedProperties: false
>  
> @@ -39,6 +42,7 @@ examples:
>              reg = <0x1e650000 0x8>;
>              #address-cells = <1>;
>              #size-cells = <0>;
> +            resets = <&syscon 35>;
>  
>              ethphy0: ethernet-phy@0 {
>                      compatible = "ethernet-phy-ieee802.3-c22";


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: net: add reset property for aspeed, ast2600-mdio binding
@ 2022-03-21 15:51     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 32+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-21 15:51 UTC (permalink / raw)
  To: Dylan Hung, robh+dt, joel, andrew, andrew, hkallweit1, linux,
	davem, kuba, pabeni, p.zabel, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel, netdev
  Cc: BMC-SW, stable

On 21/03/2022 10:56, Dylan Hung wrote:
> The AST2600 MDIO bus controller has a reset control bit and must be
> deasserted before the manipulating the MDIO controller.
> 
> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> Cc: stable@vger.kernel.org

No bugs fixes, no cc-stable. Especially that you break existing devices...

> ---
>  .../devicetree/bindings/net/aspeed,ast2600-mdio.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml b/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
> index 1c88820cbcdf..8ba108e25d94 100644
> --- a/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
> +++ b/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
> @@ -23,12 +23,15 @@ properties:
>    reg:
>      maxItems: 1
>      description: The register range of the MDIO controller instance

Missing empty line.

> +  resets:
> +    maxItems: 1
>  
>  required:
>    - compatible
>    - reg
>    - "#address-cells"
>    - "#size-cells"
> +  - resets

You break the ABI. This isusually not accepted in a regular kernel and
even totally not accepted accepted for stable kernel.

>  
>  unevaluatedProperties: false
>  
> @@ -39,6 +42,7 @@ examples:
>              reg = <0x1e650000 0x8>;
>              #address-cells = <1>;
>              #size-cells = <0>;
> +            resets = <&syscon 35>;
>  
>              ethphy0: ethernet-phy@0 {
>                      compatible = "ethernet-phy-ieee802.3-c22";


Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
  2022-03-21  9:56   ` Dylan Hung
@ 2022-03-21 15:53     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 32+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-21 15:53 UTC (permalink / raw)
  To: Dylan Hung, robh+dt, joel, andrew, andrew, hkallweit1, linux,
	davem, kuba, pabeni, p.zabel, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel, netdev
  Cc: BMC-SW, stable

On 21/03/2022 10:56, Dylan Hung wrote:
> Add reset control properties into MDIO nodes.  The 4 MDIO controllers in
> AST2600 SOC share one reset control bit SCU50[3].
> 
> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> Cc: stable@vger.kernel.org

Please describe the bug being fixed. See stable-kernel-rules.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
@ 2022-03-21 15:53     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 32+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-21 15:53 UTC (permalink / raw)
  To: Dylan Hung, robh+dt, joel, andrew, andrew, hkallweit1, linux,
	davem, kuba, pabeni, p.zabel, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel, netdev
  Cc: BMC-SW, stable

On 21/03/2022 10:56, Dylan Hung wrote:
> Add reset control properties into MDIO nodes.  The 4 MDIO controllers in
> AST2600 SOC share one reset control bit SCU50[3].
> 
> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> Cc: stable@vger.kernel.org

Please describe the bug being fixed. See stable-kernel-rules.

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
  2022-03-21 15:53     ` Krzysztof Kozlowski
@ 2022-03-22  2:32       ` Dylan Hung
  -1 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-22  2:32 UTC (permalink / raw)
  To: Krzysztof Kozlowski, robh+dt, joel, andrew, andrew, hkallweit1,
	linux, davem, kuba, pabeni, p.zabel, devicetree,
	linux-arm-kernel, linux-aspeed, linux-kernel, netdev
  Cc: BMC-SW, stable

> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> Sent: 2022年3月21日 11:53 PM
> To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch; hkallweit1@gmail.com;
> linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
> pabeni@redhat.com; p.zabel@pengutronix.de; devicetree@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
> linux-kernel@vger.kernel.org; netdev@vger.kernel.org
> Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO
> nodes
> 
> On 21/03/2022 10:56, Dylan Hung wrote:
> > Add reset control properties into MDIO nodes.  The 4 MDIO controllers in
> > AST2600 SOC share one reset control bit SCU50[3].
> >
> > Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> > Cc: stable@vger.kernel.org
> 
> Please describe the bug being fixed. See stable-kernel-rules.

Thank you for your comment.
The reset deassertion of the MDIO device was usually done by the bootloader (u-boot).
However, one of our clients uses proprietary bootloader and doesn't deassert the MDIO
reset so failed to access the HW in kernel driver.  The reset deassertion is missing in the
kernel driver since it was created, should I add a BugFix for the first commit of this driver?
Or would it be better if I remove " Cc: stable@vger.kernel.org"?

> 
> Best regards,
> Krzysztof

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
@ 2022-03-22  2:32       ` Dylan Hung
  0 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-22  2:32 UTC (permalink / raw)
  To: Krzysztof Kozlowski, robh+dt, joel, andrew, andrew, hkallweit1,
	linux, davem, kuba, pabeni, p.zabel, devicetree,
	linux-arm-kernel, linux-aspeed, linux-kernel, netdev
  Cc: BMC-SW, stable

> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> Sent: 2022年3月21日 11:53 PM
> To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch; hkallweit1@gmail.com;
> linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
> pabeni@redhat.com; p.zabel@pengutronix.de; devicetree@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
> linux-kernel@vger.kernel.org; netdev@vger.kernel.org
> Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO
> nodes
> 
> On 21/03/2022 10:56, Dylan Hung wrote:
> > Add reset control properties into MDIO nodes.  The 4 MDIO controllers in
> > AST2600 SOC share one reset control bit SCU50[3].
> >
> > Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> > Cc: stable@vger.kernel.org
> 
> Please describe the bug being fixed. See stable-kernel-rules.

Thank you for your comment.
The reset deassertion of the MDIO device was usually done by the bootloader (u-boot).
However, one of our clients uses proprietary bootloader and doesn't deassert the MDIO
reset so failed to access the HW in kernel driver.  The reset deassertion is missing in the
kernel driver since it was created, should I add a BugFix for the first commit of this driver?
Or would it be better if I remove " Cc: stable@vger.kernel.org"?

> 
> Best regards,
> Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
  2022-03-22  2:32       ` Dylan Hung
@ 2022-03-22  3:00         ` Andrew Lunn
  -1 siblings, 0 replies; 32+ messages in thread
From: Andrew Lunn @ 2022-03-22  3:00 UTC (permalink / raw)
  To: Dylan Hung
  Cc: Krzysztof Kozlowski, robh+dt, joel, andrew, hkallweit1, linux,
	davem, kuba, pabeni, p.zabel, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel, netdev, BMC-SW, stable

On Tue, Mar 22, 2022 at 02:32:13AM +0000, Dylan Hung wrote:
> > -----Original Message-----
> > From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> > Sent: 2022年3月21日 11:53 PM
> > To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> > joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch; hkallweit1@gmail.com;
> > linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
> > pabeni@redhat.com; p.zabel@pengutronix.de; devicetree@vger.kernel.org;
> > linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
> > linux-kernel@vger.kernel.org; netdev@vger.kernel.org
> > Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> > Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO
> > nodes
> > 
> > On 21/03/2022 10:56, Dylan Hung wrote:
> > > Add reset control properties into MDIO nodes.  The 4 MDIO controllers in
> > > AST2600 SOC share one reset control bit SCU50[3].
> > >
> > > Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> > > Cc: stable@vger.kernel.org
> > 
> > Please describe the bug being fixed. See stable-kernel-rules.
> 
> Thank you for your comment.
> The reset deassertion of the MDIO device was usually done by the bootloader (u-boot).
> However, one of our clients uses proprietary bootloader and doesn't deassert the MDIO
> reset so failed to access the HW in kernel driver.

So are you saying mainline u-boot releases the reset?

> The reset deassertion is missing in the
> kernel driver since it was created, should I add a BugFix for the first commit of this driver?

Yes, that is normal. Ideally the kernel should not depend on u-boot,
because often people want to use other bootloaders, e.g. barebox. You
should also consider kexec, where one kernel hands over to another
kernel, without the bootloader being involved. In such a situation,
you ideally want to assert and deassert the reset just to clean away
any state the old kernel left around.

But please do note, that the reset is optional, since you need to be
able to work with old DT blobs which don't have the reset property in
them.

	Andrew




^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
@ 2022-03-22  3:00         ` Andrew Lunn
  0 siblings, 0 replies; 32+ messages in thread
From: Andrew Lunn @ 2022-03-22  3:00 UTC (permalink / raw)
  To: Dylan Hung
  Cc: Krzysztof Kozlowski, robh+dt, joel, andrew, hkallweit1, linux,
	davem, kuba, pabeni, p.zabel, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel, netdev, BMC-SW, stable

On Tue, Mar 22, 2022 at 02:32:13AM +0000, Dylan Hung wrote:
> > -----Original Message-----
> > From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> > Sent: 2022年3月21日 11:53 PM
> > To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> > joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch; hkallweit1@gmail.com;
> > linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
> > pabeni@redhat.com; p.zabel@pengutronix.de; devicetree@vger.kernel.org;
> > linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
> > linux-kernel@vger.kernel.org; netdev@vger.kernel.org
> > Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> > Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO
> > nodes
> > 
> > On 21/03/2022 10:56, Dylan Hung wrote:
> > > Add reset control properties into MDIO nodes.  The 4 MDIO controllers in
> > > AST2600 SOC share one reset control bit SCU50[3].
> > >
> > > Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> > > Cc: stable@vger.kernel.org
> > 
> > Please describe the bug being fixed. See stable-kernel-rules.
> 
> Thank you for your comment.
> The reset deassertion of the MDIO device was usually done by the bootloader (u-boot).
> However, one of our clients uses proprietary bootloader and doesn't deassert the MDIO
> reset so failed to access the HW in kernel driver.

So are you saying mainline u-boot releases the reset?

> The reset deassertion is missing in the
> kernel driver since it was created, should I add a BugFix for the first commit of this driver?

Yes, that is normal. Ideally the kernel should not depend on u-boot,
because often people want to use other bootloaders, e.g. barebox. You
should also consider kexec, where one kernel hands over to another
kernel, without the bootloader being involved. In such a situation,
you ideally want to assert and deassert the reset just to clean away
any state the old kernel left around.

But please do note, that the reset is optional, since you need to be
able to work with old DT blobs which don't have the reset property in
them.

	Andrew




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
  2022-03-22  3:00         ` Andrew Lunn
@ 2022-03-22  3:22           ` Dylan Hung
  -1 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-22  3:22 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Krzysztof Kozlowski, robh+dt, joel, andrew, hkallweit1, linux,
	davem, kuba, pabeni, p.zabel, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel, netdev, BMC-SW, stable

> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: 2022年3月22日 11:01 AM
> To: Dylan Hung <dylan_hung@aspeedtech.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>; robh+dt@kernel.org;
> joel@jms.id.au; andrew@aj.id.au; hkallweit1@gmail.com;
> linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
> pabeni@redhat.com; p.zabel@pengutronix.de; devicetree@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
> linux-kernel@vger.kernel.org; netdev@vger.kernel.org; BMC-SW
> <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO
> nodes
> 
> On Tue, Mar 22, 2022 at 02:32:13AM +0000, Dylan Hung wrote:
> > > -----Original Message-----
> > > From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> > > Sent: 2022年3月21日 11:53 PM
> > > To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> > > joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch;
> > > hkallweit1@gmail.com; linux@armlinux.org.uk; davem@davemloft.net;
> > > kuba@kernel.org; pabeni@redhat.com; p.zabel@pengutronix.de;
> > > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > > linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org;
> > > netdev@vger.kernel.org
> > > Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> > > Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties
> > > into MDIO nodes
> > >
> > > On 21/03/2022 10:56, Dylan Hung wrote:
> > > > Add reset control properties into MDIO nodes.  The 4 MDIO
> > > > controllers in
> > > > AST2600 SOC share one reset control bit SCU50[3].
> > > >
> > > > Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> > > > Cc: stable@vger.kernel.org
> > >
> > > Please describe the bug being fixed. See stable-kernel-rules.
> >
> > Thank you for your comment.
> > The reset deassertion of the MDIO device was usually done by the
> bootloader (u-boot).
> > However, one of our clients uses proprietary bootloader and doesn't
> > deassert the MDIO reset so failed to access the HW in kernel driver.
> 
> So are you saying mainline u-boot releases the reset?
> 
Yes, if the mdio devices are used in u-boot.

> > The reset deassertion is missing in the kernel driver since it was
> > created, should I add a BugFix for the first commit of this driver?
> 
> Yes, that is normal. Ideally the kernel should not depend on u-boot, because
> often people want to use other bootloaders, e.g. barebox. You should also
> consider kexec, where one kernel hands over to another kernel, without the
> bootloader being involved. In such a situation, you ideally want to assert and
> deassert the reset just to clean away any state the old kernel left around.
> 
> But please do note, that the reset is optional, since you need to be able to
> work with old DT blobs which don't have the reset property in them.
> 

Thank you. I will let the reset property be optional and modify the error-checking
in the driver accordingly in V3.


> 	Andrew
> 
> 


^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
@ 2022-03-22  3:22           ` Dylan Hung
  0 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-22  3:22 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Krzysztof Kozlowski, robh+dt, joel, andrew, hkallweit1, linux,
	davem, kuba, pabeni, p.zabel, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel, netdev, BMC-SW, stable

> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: 2022年3月22日 11:01 AM
> To: Dylan Hung <dylan_hung@aspeedtech.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>; robh+dt@kernel.org;
> joel@jms.id.au; andrew@aj.id.au; hkallweit1@gmail.com;
> linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
> pabeni@redhat.com; p.zabel@pengutronix.de; devicetree@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
> linux-kernel@vger.kernel.org; netdev@vger.kernel.org; BMC-SW
> <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO
> nodes
> 
> On Tue, Mar 22, 2022 at 02:32:13AM +0000, Dylan Hung wrote:
> > > -----Original Message-----
> > > From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> > > Sent: 2022年3月21日 11:53 PM
> > > To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> > > joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch;
> > > hkallweit1@gmail.com; linux@armlinux.org.uk; davem@davemloft.net;
> > > kuba@kernel.org; pabeni@redhat.com; p.zabel@pengutronix.de;
> > > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > > linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org;
> > > netdev@vger.kernel.org
> > > Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> > > Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties
> > > into MDIO nodes
> > >
> > > On 21/03/2022 10:56, Dylan Hung wrote:
> > > > Add reset control properties into MDIO nodes.  The 4 MDIO
> > > > controllers in
> > > > AST2600 SOC share one reset control bit SCU50[3].
> > > >
> > > > Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> > > > Cc: stable@vger.kernel.org
> > >
> > > Please describe the bug being fixed. See stable-kernel-rules.
> >
> > Thank you for your comment.
> > The reset deassertion of the MDIO device was usually done by the
> bootloader (u-boot).
> > However, one of our clients uses proprietary bootloader and doesn't
> > deassert the MDIO reset so failed to access the HW in kernel driver.
> 
> So are you saying mainline u-boot releases the reset?
> 
Yes, if the mdio devices are used in u-boot.

> > The reset deassertion is missing in the kernel driver since it was
> > created, should I add a BugFix for the first commit of this driver?
> 
> Yes, that is normal. Ideally the kernel should not depend on u-boot, because
> often people want to use other bootloaders, e.g. barebox. You should also
> consider kexec, where one kernel hands over to another kernel, without the
> bootloader being involved. In such a situation, you ideally want to assert and
> deassert the reset just to clean away any state the old kernel left around.
> 
> But please do note, that the reset is optional, since you need to be able to
> work with old DT blobs which don't have the reset property in them.
> 

Thank you. I will let the reset property be optional and modify the error-checking
in the driver accordingly in V3.


> 	Andrew
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
  2022-03-22  2:32       ` Dylan Hung
@ 2022-03-22  8:40         ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 32+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-22  8:40 UTC (permalink / raw)
  To: Dylan Hung, robh+dt, joel, andrew, andrew, hkallweit1, linux,
	davem, kuba, pabeni, p.zabel, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel, netdev
  Cc: BMC-SW, stable

On 22/03/2022 03:32, Dylan Hung wrote:
>> -----Original Message-----
>> From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
>> Sent: 2022年3月21日 11:53 PM
>> To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
>> joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch; hkallweit1@gmail.com;
>> linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
>> pabeni@redhat.com; p.zabel@pengutronix.de; devicetree@vger.kernel.org;
>> linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
>> linux-kernel@vger.kernel.org; netdev@vger.kernel.org
>> Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
>> Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO
>> nodes
>>
>> On 21/03/2022 10:56, Dylan Hung wrote:
>>> Add reset control properties into MDIO nodes.  The 4 MDIO controllers in
>>> AST2600 SOC share one reset control bit SCU50[3].
>>>
>>> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
>>> Cc: stable@vger.kernel.org
>>
>> Please describe the bug being fixed. See stable-kernel-rules.
> 
> Thank you for your comment.
> The reset deassertion of the MDIO device was usually done by the bootloader (u-boot).
> However, one of our clients uses proprietary bootloader and doesn't deassert the MDIO
> reset so failed to access the HW in kernel driver.  The reset deassertion is missing in the
> kernel driver since it was created, should I add a BugFix for the first commit of this driver?
> Or would it be better if I remove " Cc: stable@vger.kernel.org"?

This rather looks like a missing feature, not a bug. Anyway any
description must be in commit message.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
@ 2022-03-22  8:40         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 32+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-22  8:40 UTC (permalink / raw)
  To: Dylan Hung, robh+dt, joel, andrew, andrew, hkallweit1, linux,
	davem, kuba, pabeni, p.zabel, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel, netdev
  Cc: BMC-SW, stable

On 22/03/2022 03:32, Dylan Hung wrote:
>> -----Original Message-----
>> From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
>> Sent: 2022年3月21日 11:53 PM
>> To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
>> joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch; hkallweit1@gmail.com;
>> linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
>> pabeni@redhat.com; p.zabel@pengutronix.de; devicetree@vger.kernel.org;
>> linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
>> linux-kernel@vger.kernel.org; netdev@vger.kernel.org
>> Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
>> Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO
>> nodes
>>
>> On 21/03/2022 10:56, Dylan Hung wrote:
>>> Add reset control properties into MDIO nodes.  The 4 MDIO controllers in
>>> AST2600 SOC share one reset control bit SCU50[3].
>>>
>>> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
>>> Cc: stable@vger.kernel.org
>>
>> Please describe the bug being fixed. See stable-kernel-rules.
> 
> Thank you for your comment.
> The reset deassertion of the MDIO device was usually done by the bootloader (u-boot).
> However, one of our clients uses proprietary bootloader and doesn't deassert the MDIO
> reset so failed to access the HW in kernel driver.  The reset deassertion is missing in the
> kernel driver since it was created, should I add a BugFix for the first commit of this driver?
> Or would it be better if I remove " Cc: stable@vger.kernel.org"?

This rather looks like a missing feature, not a bug. Anyway any
description must be in commit message.


Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
  2022-03-22  8:40         ` Krzysztof Kozlowski
@ 2022-03-22  8:44           ` Dylan Hung
  -1 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-22  8:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski, robh+dt, joel, andrew, andrew, hkallweit1,
	linux, davem, kuba, pabeni, p.zabel, devicetree,
	linux-arm-kernel, linux-aspeed, linux-kernel, netdev
  Cc: BMC-SW, stable

> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> Sent: 2022年3月22日 4:40 PM
> To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch; hkallweit1@gmail.com;
> linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
> pabeni@redhat.com; p.zabel@pengutronix.de; devicetree@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
> linux-kernel@vger.kernel.org; netdev@vger.kernel.org
> Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO
> nodes
> 
> On 22/03/2022 03:32, Dylan Hung wrote:
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> >> Sent: 2022年3月21日 11:53 PM
> >> To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> >> joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch;
> >> hkallweit1@gmail.com; linux@armlinux.org.uk; davem@davemloft.net;
> >> kuba@kernel.org; pabeni@redhat.com; p.zabel@pengutronix.de;
> >> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> >> linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org;
> >> netdev@vger.kernel.org
> >> Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> >> Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties
> >> into MDIO nodes
> >>
> >> On 21/03/2022 10:56, Dylan Hung wrote:
> >>> Add reset control properties into MDIO nodes.  The 4 MDIO
> >>> controllers in
> >>> AST2600 SOC share one reset control bit SCU50[3].
> >>>
> >>> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> >>> Cc: stable@vger.kernel.org
> >>
> >> Please describe the bug being fixed. See stable-kernel-rules.
> >
> > Thank you for your comment.
> > The reset deassertion of the MDIO device was usually done by the
> bootloader (u-boot).
> > However, one of our clients uses proprietary bootloader and doesn't
> > deassert the MDIO reset so failed to access the HW in kernel driver.
> > The reset deassertion is missing in the kernel driver since it was created,
> should I add a BugFix for the first commit of this driver?
> > Or would it be better if I remove " Cc: stable@vger.kernel.org"?
> 
> This rather looks like a missing feature, not a bug. Anyway any description
> must be in commit message.

Thank you. I will remove " Cc: stable@vger.kernel.org" and add more description
in commit message in V3.

> 
> 
> Best regards,
> Krzysztof

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
@ 2022-03-22  8:44           ` Dylan Hung
  0 siblings, 0 replies; 32+ messages in thread
From: Dylan Hung @ 2022-03-22  8:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski, robh+dt, joel, andrew, andrew, hkallweit1,
	linux, davem, kuba, pabeni, p.zabel, devicetree,
	linux-arm-kernel, linux-aspeed, linux-kernel, netdev
  Cc: BMC-SW, stable

> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> Sent: 2022年3月22日 4:40 PM
> To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch; hkallweit1@gmail.com;
> linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
> pabeni@redhat.com; p.zabel@pengutronix.de; devicetree@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
> linux-kernel@vger.kernel.org; netdev@vger.kernel.org
> Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO
> nodes
> 
> On 22/03/2022 03:32, Dylan Hung wrote:
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> >> Sent: 2022年3月21日 11:53 PM
> >> To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> >> joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch;
> >> hkallweit1@gmail.com; linux@armlinux.org.uk; davem@davemloft.net;
> >> kuba@kernel.org; pabeni@redhat.com; p.zabel@pengutronix.de;
> >> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> >> linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org;
> >> netdev@vger.kernel.org
> >> Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> >> Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties
> >> into MDIO nodes
> >>
> >> On 21/03/2022 10:56, Dylan Hung wrote:
> >>> Add reset control properties into MDIO nodes.  The 4 MDIO
> >>> controllers in
> >>> AST2600 SOC share one reset control bit SCU50[3].
> >>>
> >>> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> >>> Cc: stable@vger.kernel.org
> >>
> >> Please describe the bug being fixed. See stable-kernel-rules.
> >
> > Thank you for your comment.
> > The reset deassertion of the MDIO device was usually done by the
> bootloader (u-boot).
> > However, one of our clients uses proprietary bootloader and doesn't
> > deassert the MDIO reset so failed to access the HW in kernel driver.
> > The reset deassertion is missing in the kernel driver since it was created,
> should I add a BugFix for the first commit of this driver?
> > Or would it be better if I remove " Cc: stable@vger.kernel.org"?
> 
> This rather looks like a missing feature, not a bug. Anyway any description
> must be in commit message.

Thank you. I will remove " Cc: stable@vger.kernel.org" and add more description
in commit message in V3.

> 
> 
> Best regards,
> Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
  2022-03-22  3:22           ` Dylan Hung
@ 2022-03-22  9:08             ` Philipp Zabel
  -1 siblings, 0 replies; 32+ messages in thread
From: Philipp Zabel @ 2022-03-22  9:08 UTC (permalink / raw)
  To: Dylan Hung, Andrew Lunn
  Cc: Krzysztof Kozlowski, robh+dt, joel, andrew, hkallweit1, linux,
	davem, kuba, pabeni, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev, BMC-SW, stable

On Di, 2022-03-22 at 03:22 +0000, Dylan Hung wrote:
> > -----Original Message-----
> > From: Andrew Lunn [mailto:andrew@lunn.ch]
> > Sent: 2022年3月22日 11:01 AM
> > To: Dylan Hung <dylan_hung@aspeedtech.com>
> > Cc: Krzysztof Kozlowski <krzk@kernel.org>; robh+dt@kernel.org;
> > joel@jms.id.au; andrew@aj.id.au; hkallweit1@gmail.com;
> > linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
> > pabeni@redhat.com; p.zabel@pengutronix.de; 
> > devicetree@vger.kernel.org;
> > linux-arm-kernel@lists.infradead.org;
> > linux-aspeed@lists.ozlabs.org;
> > linux-kernel@vger.kernel.org; netdev@vger.kernel.org; BMC-SW
> > <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> > Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties
> > into MDIO
> > nodes
> > 
> > On Tue, Mar 22, 2022 at 02:32:13AM +0000, Dylan Hung wrote:
> > > > -----Original Message-----
> > > > From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> > > > Sent: 2022年3月21日 11:53 PM
> > > > To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> > > > joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch;
> > > > hkallweit1@gmail.com; linux@armlinux.org.uk; 
> > > > davem@davemloft.net;
> > > > kuba@kernel.org; pabeni@redhat.com; p.zabel@pengutronix.de;
> > > > devicetree@vger.kernel.org; 
> > > > linux-arm-kernel@lists.infradead.org;
> > > > linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org;
> > > > netdev@vger.kernel.org
> > > > Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> > > > Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset
> > > > properties
> > > > into MDIO nodes
> > > > 
> > > > On 21/03/2022 10:56, Dylan Hung wrote:
> > > > > Add reset control properties into MDIO nodes.  The 4 MDIO
> > > > > controllers in
> > > > > AST2600 SOC share one reset control bit SCU50[3].
> > > > > 
> > > > > Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> > > > > Cc: stable@vger.kernel.org
> > > > 
> > > > Please describe the bug being fixed. See stable-kernel-rules.
> > > 
> > > Thank you for your comment.
> > > The reset deassertion of the MDIO device was usually done by the
> > bootloader (u-boot).
> > > However, one of our clients uses proprietary bootloader and
> > > doesn't
> > > deassert the MDIO reset so failed to access the HW in kernel
> > > driver.
> > 
> > So are you saying mainline u-boot releases the reset?
> > 
> Yes, if the mdio devices are used in u-boot.
> 
> > > The reset deassertion is missing in the kernel driver since it
> > > was
> > > created, should I add a BugFix for the first commit of this
> > > driver?
> > 
> > Yes, that is normal. Ideally the kernel should not depend on u-
> > boot, because
> > often people want to use other bootloaders, e.g. barebox. You
> > should also
> > consider kexec, where one kernel hands over to another kernel,
> > without the
> > bootloader being involved. In such a situation, you ideally want to
> > assert and
> > deassert the reset just to clean away any state the old kernel left
> > around.
> > 
> > But please do note, that the reset is optional, since you need to
> > be able to
> > work with old DT blobs which don't have the reset property in them.
> > 
> 
> Thank you. I will let the reset property be optional and modify the
> error-checking in the driver accordingly in V3.

No need to change the error checking, just use 
devm_reset_control_get_optional_shared().


regards
Philipp

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes
@ 2022-03-22  9:08             ` Philipp Zabel
  0 siblings, 0 replies; 32+ messages in thread
From: Philipp Zabel @ 2022-03-22  9:08 UTC (permalink / raw)
  To: Dylan Hung, Andrew Lunn
  Cc: Krzysztof Kozlowski, robh+dt, joel, andrew, hkallweit1, linux,
	davem, kuba, pabeni, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, netdev, BMC-SW, stable

On Di, 2022-03-22 at 03:22 +0000, Dylan Hung wrote:
> > -----Original Message-----
> > From: Andrew Lunn [mailto:andrew@lunn.ch]
> > Sent: 2022年3月22日 11:01 AM
> > To: Dylan Hung <dylan_hung@aspeedtech.com>
> > Cc: Krzysztof Kozlowski <krzk@kernel.org>; robh+dt@kernel.org;
> > joel@jms.id.au; andrew@aj.id.au; hkallweit1@gmail.com;
> > linux@armlinux.org.uk; davem@davemloft.net; kuba@kernel.org;
> > pabeni@redhat.com; p.zabel@pengutronix.de; 
> > devicetree@vger.kernel.org;
> > linux-arm-kernel@lists.infradead.org;
> > linux-aspeed@lists.ozlabs.org;
> > linux-kernel@vger.kernel.org; netdev@vger.kernel.org; BMC-SW
> > <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> > Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset properties
> > into MDIO
> > nodes
> > 
> > On Tue, Mar 22, 2022 at 02:32:13AM +0000, Dylan Hung wrote:
> > > > -----Original Message-----
> > > > From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> > > > Sent: 2022年3月21日 11:53 PM
> > > > To: Dylan Hung <dylan_hung@aspeedtech.com>; robh+dt@kernel.org;
> > > > joel@jms.id.au; andrew@aj.id.au; andrew@lunn.ch;
> > > > hkallweit1@gmail.com; linux@armlinux.org.uk; 
> > > > davem@davemloft.net;
> > > > kuba@kernel.org; pabeni@redhat.com; p.zabel@pengutronix.de;
> > > > devicetree@vger.kernel.org; 
> > > > linux-arm-kernel@lists.infradead.org;
> > > > linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org;
> > > > netdev@vger.kernel.org
> > > > Cc: BMC-SW <BMC-SW@aspeedtech.com>; stable@vger.kernel.org
> > > > Subject: Re: [PATCH v2 3/3] ARM: dts: aspeed: add reset
> > > > properties
> > > > into MDIO nodes
> > > > 
> > > > On 21/03/2022 10:56, Dylan Hung wrote:
> > > > > Add reset control properties into MDIO nodes.  The 4 MDIO
> > > > > controllers in
> > > > > AST2600 SOC share one reset control bit SCU50[3].
> > > > > 
> > > > > Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
> > > > > Cc: stable@vger.kernel.org
> > > > 
> > > > Please describe the bug being fixed. See stable-kernel-rules.
> > > 
> > > Thank you for your comment.
> > > The reset deassertion of the MDIO device was usually done by the
> > bootloader (u-boot).
> > > However, one of our clients uses proprietary bootloader and
> > > doesn't
> > > deassert the MDIO reset so failed to access the HW in kernel
> > > driver.
> > 
> > So are you saying mainline u-boot releases the reset?
> > 
> Yes, if the mdio devices are used in u-boot.
> 
> > > The reset deassertion is missing in the kernel driver since it
> > > was
> > > created, should I add a BugFix for the first commit of this
> > > driver?
> > 
> > Yes, that is normal. Ideally the kernel should not depend on u-
> > boot, because
> > often people want to use other bootloaders, e.g. barebox. You
> > should also
> > consider kexec, where one kernel hands over to another kernel,
> > without the
> > bootloader being involved. In such a situation, you ideally want to
> > assert and
> > deassert the reset just to clean away any state the old kernel left
> > around.
> > 
> > But please do note, that the reset is optional, since you need to
> > be able to
> > work with old DT blobs which don't have the reset property in them.
> > 
> 
> Thank you. I will let the reset property be optional and modify the
> error-checking in the driver accordingly in V3.

No need to change the error checking, just use 
devm_reset_control_get_optional_shared().


regards
Philipp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2022-03-22  9:09 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21  9:56 [PATCH v2 0/3] Add reset deassertion for Aspeed MDIO Dylan Hung
2022-03-21  9:56 ` Dylan Hung
2022-03-21  9:56 ` [PATCH v2 1/3] dt-bindings: net: add reset property for aspeed, ast2600-mdio binding Dylan Hung
2022-03-21  9:56   ` Dylan Hung
2022-03-21 12:48   ` Andrew Lunn
2022-03-21 12:48     ` Andrew Lunn
2022-03-21 13:35   ` Rob Herring
2022-03-21 13:35     ` Rob Herring
2022-03-21 15:51   ` Krzysztof Kozlowski
2022-03-21 15:51     ` Krzysztof Kozlowski
2022-03-21  9:56 ` [PATCH v2 2/3] net: mdio: add reset control for Aspeed MDIO Dylan Hung
2022-03-21  9:56   ` Dylan Hung
2022-03-21 10:15   ` Philipp Zabel
2022-03-21 10:15     ` Philipp Zabel
2022-03-21  9:56 ` [PATCH v2 3/3] ARM: dts: aspeed: add reset properties into MDIO nodes Dylan Hung
2022-03-21  9:56   ` Dylan Hung
2022-03-21 15:53   ` Krzysztof Kozlowski
2022-03-21 15:53     ` Krzysztof Kozlowski
2022-03-22  2:32     ` Dylan Hung
2022-03-22  2:32       ` Dylan Hung
2022-03-22  3:00       ` Andrew Lunn
2022-03-22  3:00         ` Andrew Lunn
2022-03-22  3:22         ` Dylan Hung
2022-03-22  3:22           ` Dylan Hung
2022-03-22  9:08           ` Philipp Zabel
2022-03-22  9:08             ` Philipp Zabel
2022-03-22  8:40       ` Krzysztof Kozlowski
2022-03-22  8:40         ` Krzysztof Kozlowski
2022-03-22  8:44         ` Dylan Hung
2022-03-22  8:44           ` Dylan Hung
2022-03-21 12:45 ` [PATCH v2 0/3] Add reset deassertion for Aspeed MDIO Andrew Lunn
2022-03-21 12:45   ` Andrew Lunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.