#include <linux/clk.h>
 #include <linux/slab.h>
 #include <linux/err.h>
+#include <linux/of.h>
 
 #include <asm/mach-jz4740/timer.h>
 
        .set_timeout = jz4740_wdt_set_timeout,
 };
 
+#ifdef CONFIG_OF
+static const struct of_device_id jz4740_wdt_of_matches[] = {
+       { .compatible = "ingenic,jz4740-watchdog", },
+       { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, jz4740_wdt_of_matches)
+#endif
+
 static int jz4740_wdt_probe(struct platform_device *pdev)
 {
        struct jz4740_wdt_drvdata *drvdata;
        .remove = jz4740_wdt_remove,
        .driver = {
                .name = "jz4740-wdt",
+               .of_match_table = of_match_ptr(jz4740_wdt_of_matches),
        },
 };