From 5df15c06ccd105a19431bc32bd1d158b3ff3325e Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Thu, 9 Feb 2017 21:20:41 +0100 Subject: b53: allow configuration through device tree Add support for the same binding as upstream b53 to allow an easy switch. Signed-off-by: Jonas Gorski --- target/linux/generic/files/drivers/net/phy/b53/b53_spi.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'target/linux/generic/files/drivers/net/phy/b53/b53_spi.c') diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c b/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c index 469a8ddde3..efc8f7ee89 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_spi.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "b53_priv.h" @@ -313,11 +314,24 @@ static int b53_spi_remove(struct spi_device *spi) return 0; } +static const struct of_device_id b53_of_match[] = { + { .compatible = "brcm,bcm5325" }, + { .compatible = "brcm,bcm53115" }, + { .compatible = "brcm,bcm53125" }, + { .compatible = "brcm,bcm53128" }, + { .compatible = "brcm,bcm5365" }, + { .compatible = "brcm,bcm5395" }, + { .compatible = "brcm,bcm5397" }, + { .compatible = "brcm,bcm5398" }, + { /* sentinel */ }, +}; + static struct spi_driver b53_spi_driver = { .driver = { .name = "b53-switch", .bus = &spi_bus_type, .owner = THIS_MODULE, + .of_match_table = b53_of_match, }, .probe = b53_spi_probe, .remove = b53_spi_remove, -- cgit v1.2.3