@@ -9,12 +9,25 @@ using a specific compatible value), interrogate the node (or associated
OS driver) to determine the location of the registers, and access the
registers directly.
+Optionally, devices that are controlled exclusively through syscon registers,
+or even bitfields in shared syscon registers, can also be added as child nodes
+to the syscon device node. These devices can implicitly assume their parent
+node is a syscon provider without referencing it explicitly via phandle.
+In this case, the syscon node should have #address-cells = <1> and
+#size-cells = <0> or <1> and no ranges property.
+
Required properties:
- compatible: Should contain "syscon".
- reg: the register region can be accessed from syscon
+Optional properties:
+- #address-cells: Should be 1.
+- #size-cells: Should be 0 or 1.
+
Examples:
gpr: iomuxc-gpr@020e0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "fsl,imx6q-iomuxc-gpr", "syscon";
reg = <0x020e0000 0x38>;
};
@@ -208,6 +208,9 @@ static int syscon_probe(struct platform_device *pdev)
dev_dbg(dev, "regmap %pR registered\n", res);
+ if (!of_device_is_compatible(pdev->dev.of_node, "simple-bus"))
+ of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
+
return 0;
}