aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorAlex Marginean <alexandru.marginean@nxp.com>2019-07-12 10:13:53 +0300
committerJoe Hershberger <joe.hershberger@ni.com>2019-07-18 16:37:13 -0500
commitc3d9f3f899038e21a66e1e4a685abc0a5a1d5d9c (patch)
tree241f0f7fda642a91bbf1676b0a6a5085e3159715 /arch/sandbox
parentb47edf8069cc9fbac8bcb96a1e519c2fbcda7911 (diff)
downloadu-boot-c3d9f3f899038e21a66e1e4a685abc0a5a1d5d9c.zip
u-boot-c3d9f3f899038e21a66e1e4a685abc0a5a1d5d9c.tar.gz
u-boot-c3d9f3f899038e21a66e1e4a685abc0a5a1d5d9c.tar.bz2
test: dm: add a test for MDIO MUX DM uclass
Adds a test using a makeshift MDIO MUX. The test is based on the existing MDIO test. It uses the last emulated PHY register to verify MUX selection. Signed-off-by: Alex Marginean <alexm.osslist@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/dts/test.dts23
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 531c1af..a085676 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -824,7 +824,28 @@
dma-names = "m2m", "tx0", "rx0";
};
- mdio-test {
+ /*
+ * keep mdio-mux ahead of mdio so that the mux is removed first at the
+ * end of the test. If parent mdio is removed first, clean-up of the
+ * mux will trigger a 2nd probe of parent-mdio, leaving parent-mdio
+ * active at the end of the test. That it turn doesn't allow the mdio
+ * class to be destroyed, triggering an error.
+ */
+ mdio-mux-test {
+ compatible = "sandbox,mdio-mux";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ mdio-parent-bus = <&mdio>;
+
+ mdio-ch-test@0 {
+ reg = <0>;
+ };
+ mdio-ch-test@1 {
+ reg = <1>;
+ };
+ };
+
+ mdio: mdio-test {
compatible = "sandbox,mdio";
};
};