#include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/pm_runtime.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_address.h>
 
 #include <asm/io.h>
 
        .data_read      = omap_rng_data_read,
 };
 
+#if defined(CONFIG_OF)
+static const struct of_device_id omap_rng_of_match[] = {
+               { .compatible = "ti,omap2-rng" },
+               {},
+};
+MODULE_DEVICE_TABLE(of, omap_rng_of_match);
+#endif
+
 static int omap_rng_probe(struct platform_device *pdev)
 {
        struct omap_rng_private_data *priv;
                .name           = "omap_rng",
                .owner          = THIS_MODULE,
                .pm             = OMAP_RNG_PM,
+               .of_match_table = of_match_ptr(omap_rng_of_match),
        },
        .probe          = omap_rng_probe,
        .remove         = __exit_p(omap_rng_remove),