summaryrefslogtreecommitdiff
path: root/arch/sandbox/dts
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/dts')
-rw-r--r--arch/sandbox/dts/sandbox-boot.sh2
-rw-r--r--arch/sandbox/dts/sandbox-inner.sh4
-rw-r--r--arch/sandbox/dts/sandbox-outer.sh4
-rw-r--r--arch/sandbox/dts/sandbox_pmic.dtsi6
-rw-r--r--arch/sandbox/dts/sandbox_scripts.dtsi24
-rw-r--r--arch/sandbox/dts/test.dts82
6 files changed, 119 insertions, 3 deletions
diff --git a/arch/sandbox/dts/sandbox-boot.sh b/arch/sandbox/dts/sandbox-boot.sh
new file mode 100644
index 00000000000..4f7fa661151
--- /dev/null
+++ b/arch/sandbox/dts/sandbox-boot.sh
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+echo "* default script"
diff --git a/arch/sandbox/dts/sandbox-inner.sh b/arch/sandbox/dts/sandbox-inner.sh
new file mode 100644
index 00000000000..b8fc8f7484b
--- /dev/null
+++ b/arch/sandbox/dts/sandbox-inner.sh
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+# Some comment.
+echo "* inner"
diff --git a/arch/sandbox/dts/sandbox-outer.sh b/arch/sandbox/dts/sandbox-outer.sh
new file mode 100644
index 00000000000..40294085433
--- /dev/null
+++ b/arch/sandbox/dts/sandbox-outer.sh
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+echo "* outer 1"
+source ${fdtcontroladdr}:inner
+echo "* outer 2"
diff --git a/arch/sandbox/dts/sandbox_pmic.dtsi b/arch/sandbox/dts/sandbox_pmic.dtsi
index ff2cb42844c..d90ab040827 100644
--- a/arch/sandbox/dts/sandbox_pmic.dtsi
+++ b/arch/sandbox/dts/sandbox_pmic.dtsi
@@ -47,6 +47,12 @@
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
};
+
+ ldo3 {
+ regulator-name = "SUPPLY_1.8_3.3V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ };
};
&mc34708 {
diff --git a/arch/sandbox/dts/sandbox_scripts.dtsi b/arch/sandbox/dts/sandbox_scripts.dtsi
new file mode 100644
index 00000000000..c800ec39e87
--- /dev/null
+++ b/arch/sandbox/dts/sandbox_scripts.dtsi
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/ {
+ images {
+ default = "boot";
+ boot {
+ description = "Test boot script";
+ data = /incbin/("sandbox-boot.sh");
+ type = "script";
+ compression = "none";
+ };
+ outer {
+ description = "Script testing recursion";
+ data = /incbin/("sandbox-outer.sh");
+ type = "script";
+ compression = "none";
+ };
+ inner {
+ description = "Another test script";
+ data = /incbin/("sandbox-inner.sh");
+ type = "script";
+ compression = "none";
+ };
+ };
+};
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index ac92ebf1afd..d24feec5422 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -16,6 +16,7 @@
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/sandbox-pinmux.h>
#include <dt-bindings/mux/mux.h>
+#include <dt-bindings/phy/phy.h>
/ {
model = "sandbox";
@@ -175,7 +176,7 @@
storage = "mmc3";
skip-offset = <0x800000>;
area-start = <0>;
- area-size = <0xe00000>;
+ area-size = <0x2000000>;
state-offset = <0xdffc00>;
state-size = <0x40>;
version-offset = <0xdffe00>;
@@ -502,6 +503,65 @@
phy-names = "phy1";
};
+ /* PHY common props test nodes */
+ phy_common_props_missing: phy-common-props-missing {
+ /* empty: no rx-polarity or tx-polarity properties */
+ };
+
+ phy_common_props_more_values: phy-common-props-more-values {
+ /* 3 values but only 2 names => count mismatch */
+ rx-polarity = <PHY_POL_NORMAL PHY_POL_INVERT PHY_POL_NORMAL>;
+ rx-polarity-names = "sgmii", "2500base-x";
+ tx-polarity = <PHY_POL_NORMAL PHY_POL_INVERT PHY_POL_NORMAL>;
+ tx-polarity-names = "sgmii", "2500base-x";
+ };
+
+ phy_common_props_single: phy-common-props-single {
+ /* 1 value, no names array => value applies to all modes */
+ rx-polarity = <PHY_POL_INVERT>;
+ tx-polarity = <PHY_POL_INVERT>;
+ };
+
+ phy_common_props_more_names: phy-common-props-more-names {
+ /* 2 values but 3 names => count mismatch */
+ rx-polarity = <PHY_POL_NORMAL PHY_POL_INVERT>;
+ rx-polarity-names = "sgmii", "2500base-x", "1000base-x";
+ tx-polarity = <PHY_POL_NORMAL PHY_POL_INVERT>;
+ tx-polarity-names = "sgmii", "2500base-x", "1000base-x";
+ };
+
+ phy_common_props_find_by_name: phy-common-props-find-by-name {
+ /* valid 3-element arrays, lookup by mode name */
+ rx-polarity = <PHY_POL_NORMAL PHY_POL_INVERT PHY_POL_AUTO>;
+ rx-polarity-names = "sgmii", "2500base-x", "usb-ss";
+ tx-polarity = <PHY_POL_NORMAL PHY_POL_INVERT PHY_POL_NORMAL>;
+ tx-polarity-names = "sgmii", "2500base-x", "1000base-x";
+ };
+
+ phy_common_props_no_default: phy-common-props-no-default {
+ /* name not in array, no "default" entry => -EINVAL */
+ rx-polarity = <PHY_POL_NORMAL PHY_POL_INVERT>;
+ rx-polarity-names = "2500base-x", "1000base-x";
+ tx-polarity = <PHY_POL_NORMAL PHY_POL_INVERT>;
+ tx-polarity-names = "2500base-x", "1000base-x";
+ };
+
+ phy_common_props_with_default: phy-common-props-with-default {
+ /* name not in array, but "default" entry exists */
+ rx-polarity = <PHY_POL_NORMAL PHY_POL_INVERT>;
+ rx-polarity-names = "2500base-x", "default";
+ tx-polarity = <PHY_POL_NORMAL PHY_POL_INVERT>;
+ tx-polarity-names = "2500base-x", "default";
+ };
+
+ phy_common_props_unsupported: phy-common-props-unsupported {
+ /* PHY_POL_AUTO is not supported for manual-only modes */
+ rx-polarity = <PHY_POL_AUTO>;
+ rx-polarity-names = "sgmii";
+ tx-polarity = <PHY_POL_AUTO>;
+ tx-polarity-names = "sgmii";
+ };
+
some-bus {
#address-cells = <1>;
#size-cells = <0>;
@@ -967,6 +1027,9 @@
emul1: emull {
compatible = "sandbox,i2c-rtc-emul";
};
+ emul_pmbus: emul-pmbus {
+ compatible = "sandbox,i2c-pmbus";
+ };
};
sandbox_pmic: sandbox_pmic@40 {
@@ -978,6 +1041,13 @@
reg = <0x41>;
sandbox,emul = <&emul_pmic1>;
};
+
+ pmbus@70 {
+ reg = <0x70>;
+ compatible = "pmbus";
+ regulator-name = "sandbox-pmbus-vout";
+ sandbox,emul = <&emul_pmbus>;
+ };
};
i3c0 {
@@ -1470,10 +1540,16 @@
#reset-cells = <1>;
};
+ resetc_fb: reset-ctl-fallback {
+ compatible = "sandbox,reset-ctl-fallback-only";
+ #reset-cells = <1>;
+ };
+
reset-ctl-test {
compatible = "sandbox,reset-ctl-test";
- resets = <&resetc 100>, <&resetc 2>, <&resetc 20>, <&resetc 40>;
- reset-names = "other", "test", "test2", "test3";
+ resets = <&resetc 100>, <&resetc 2>, <&resetc 20>, <&resetc 40>,
+ <&resetc_fb 5>;
+ reset-names = "other", "test", "test2", "test3", "fallback";
};
rng {