@@ -6,6 +6,7 @@
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_net.h>
+#include <linux/clk.h>
#include <defs.h>
#include "debug.h"
@@ -70,12 +71,16 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
{
struct brcmfmac_sdio_pd *sdio = &settings->bus.sdio;
struct device_node *root, *np = dev->of_node;
+ struct clk *clk;
const char *prop;
int irq;
int err;
u32 irqf;
u32 val;
+ if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
+ return;
+
/* Apple ARM64 platforms have their own idea of board type, passed in
* via the device tree. They also have an antenna SKU parameter
*/
@@ -113,8 +118,13 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
of_node_put(root);
}
- if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
+ clk = devm_clk_get_optional_enabled(dev, "lpo");
+ if (!IS_ERR_OR_NULL(clk)) {
+ brcmf_dbg(INFO, "enabling 32kHz clock\n");
+ clk_set_rate(clk, 32768);
+ } else {
return;
+ }
err = brcmf_of_get_country_codes(dev, settings);
if (err)