Commit 71189987 authored by Michael Welling's avatar Michael Welling
Browse files

Enable programmable clocks



One of the programmable clocks is used to clock the keypad scan register
in the CPLD.

These can be configured in the device tree in newer versions of the
kernel.
Signed-off-by: default avatarMichael Welling <mwelling@emacinc.com>
parent d35f102c
...@@ -208,8 +208,7 @@ ...@@ -208,8 +208,7 @@
}; };
pinctrl_keypad: keypad-board { pinctrl_keypad: keypad-board {
atmel,pins = atmel,pins =
<AT91_PIOE 31 0x0 (AT91_PINCTRL_DEBOUNCE|AT91_PINCTRL_DEBOUNCE_VA(0xff)) <AT91_PIOE 31 AT91_PERIPH_GPIO (AT91_PINCTRL_DEBOUNCE|AT91_PINCTRL_DEBOUNCE_VA(0xff))>;
AT91_PIOD 31 AT91_PERIPH_C AT91_PINCTRL_NONE>;
}; };
}; };
}; };
......
...@@ -562,6 +562,35 @@ static void __init sama5_dt_device_init(void) ...@@ -562,6 +562,35 @@ static void __init sama5_dt_device_init(void)
} }
} }
if (of_machine_is_compatible("emac,soma5d35")) {
struct clk *pck;
struct clk *parent;
pck = clk_get(NULL, "pck0");
parent = clk_get(NULL, "mck");
BUG_ON(IS_ERR(pck) || IS_ERR(parent));
if (clk_set_parent(pck, parent)) {
pr_err("Failed to set PCK's parent\n");
} else {
clk_set_rate(pck, 8250000);
clk_enable(pck);
}
pck = clk_get(NULL, "pck1");
parent = clk_get(NULL, "main");
BUG_ON(IS_ERR(pck) || IS_ERR(parent));
if (clk_set_parent(pck, parent)) {
pr_err("Failed to set PCK's parent\n");
} else {
clk_set_rate(pck, 200000);
clk_enable(pck);
}
}
of_platform_populate(NULL, of_default_bus_match_table, at91_auxdata_lookup, NULL); of_platform_populate(NULL, of_default_bus_match_table, at91_auxdata_lookup, NULL);
platform_add_devices(sensors, ARRAY_SIZE(sensors)); platform_add_devices(sensors, ARRAY_SIZE(sensors));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment