sandbox: clk: add clk enable/disable test code

Since we added clk enable_count and prograte clk child enabling
operation to clk parent, so add a new function sandbox_clk_enable_count
to get enable_count for test usage.

And add test code to get the enable_count after we enable/disable
the device clk.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
diff --git a/test/dm/clk_ccf.c b/test/dm/clk_ccf.c
index bbc4b50..ae3a4d8 100644
--- a/test/dm/clk_ccf.c
+++ b/test/dm/clk_ccf.c
@@ -64,6 +64,34 @@
 	rate = clk_get_rate(clk);
 	ut_asserteq(rate, 60000000);
 
+#if CONFIG_IS_ENABLED(CLK_CCF)
+	/* Test clk tree enable/disable */
+	ret = clk_get_by_id(SANDBOX_CLK_I2C_ROOT, &clk);
+	ut_assertok(ret);
+	ut_asserteq_str("i2c_root", clk->dev->name);
+
+	ret = clk_enable(clk);
+	ut_assertok(ret);
+
+	ret = sandbox_clk_enable_count(clk);
+	ut_asserteq(ret, 1);
+
+	ret = clk_get_by_id(SANDBOX_CLK_I2C, &pclk);
+	ut_assertok(ret);
+
+	ret = sandbox_clk_enable_count(pclk);
+	ut_asserteq(ret, 1);
+
+	ret = clk_disable(clk);
+	ut_assertok(ret);
+
+	ret = sandbox_clk_enable_count(clk);
+	ut_asserteq(ret, 0);
+
+	ret = sandbox_clk_enable_count(pclk);
+	ut_asserteq(ret, 0);
+#endif
+
 	return 1;
 }