struct raspberrypi_clk *rpi;
        int ret;
 
-       firmware_node = of_find_compatible_node(NULL, NULL,
-                                       "raspberrypi,bcm2835-firmware");
+       /*
+        * We can be probed either through the an old-fashioned
+        * platform device registration or through a DT node that is a
+        * child of the firmware node. Handle both cases.
+        */
+       if (dev->of_node)
+               firmware_node = of_get_parent(dev->of_node);
+       else
+               firmware_node = of_find_compatible_node(NULL, NULL,
+                                                       "raspberrypi,bcm2835-firmware");
        if (!firmware_node) {
                dev_err(dev, "Missing firmware node\n");
                return -ENOENT;
        return 0;
 }
 
+static const struct of_device_id raspberrypi_clk_match[] = {
+       { .compatible = "raspberrypi,firmware-clocks" },
+       { },
+};
+MODULE_DEVICE_TABLE(of, raspberrypi_clk_match);
+
 static struct platform_driver raspberrypi_clk_driver = {
        .driver = {
                .name = "raspberrypi-clk",
+               .of_match_table = raspberrypi_clk_match,
        },
        .probe          = raspberrypi_clk_probe,
        .remove         = raspberrypi_clk_remove,