|
5 | 5 |
|
6 | 6 | #include <linux/clk.h>
|
7 | 7 | #include <linux/clk-provider.h>
|
| 8 | +#include <linux/io.h> |
8 | 9 | #include <linux/module.h>
|
9 | 10 | #include <linux/of.h>
|
10 | 11 | #include <linux/platform_device.h>
|
@@ -239,6 +240,16 @@ static const struct sunxi_ccu_desc sun50i_h5_de2_clk_desc = {
|
239 | 240 | .num_resets = ARRAY_SIZE(sun50i_h5_de2_resets),
|
240 | 241 | };
|
241 | 242 |
|
| 243 | +static const struct sunxi_ccu_desc sun50i_h616_de33_clk_desc = { |
| 244 | + .ccu_clks = sun8i_de2_ccu_clks, |
| 245 | + .num_ccu_clks = ARRAY_SIZE(sun8i_de2_ccu_clks), |
| 246 | + |
| 247 | + .hw_clks = &sun8i_h3_de2_hw_clks, |
| 248 | + |
| 249 | + .resets = sun50i_h5_de2_resets, |
| 250 | + .num_resets = ARRAY_SIZE(sun50i_h5_de2_resets), |
| 251 | +}; |
| 252 | + |
242 | 253 | static int sunxi_de2_clk_probe(struct platform_device *pdev)
|
243 | 254 | {
|
244 | 255 | struct clk *bus_clk, *mod_clk;
|
@@ -291,6 +302,16 @@ static int sunxi_de2_clk_probe(struct platform_device *pdev)
|
291 | 302 | goto err_disable_mod_clk;
|
292 | 303 | }
|
293 | 304 |
|
| 305 | + /* |
| 306 | + * The DE33 requires these additional (unknown) registers set |
| 307 | + * during initialisation. |
| 308 | + */ |
| 309 | + if (of_device_is_compatible(pdev->dev.of_node, |
| 310 | + "allwinner,sun50i-h616-de33-clk")) { |
| 311 | + writel(0, reg + 0x24); |
| 312 | + writel(0x0000a980, reg + 0x28); |
| 313 | + } |
| 314 | + |
294 | 315 | ret = devm_sunxi_ccu_probe(&pdev->dev, reg, ccu_desc);
|
295 | 316 | if (ret)
|
296 | 317 | goto err_assert_reset;
|
@@ -335,6 +356,10 @@ static const struct of_device_id sunxi_de2_clk_ids[] = {
|
335 | 356 | .compatible = "allwinner,sun50i-h6-de3-clk",
|
336 | 357 | .data = &sun50i_h5_de2_clk_desc,
|
337 | 358 | },
|
| 359 | + { |
| 360 | + .compatible = "allwinner,sun50i-h616-de33-clk", |
| 361 | + .data = &sun50i_h616_de33_clk_desc, |
| 362 | + }, |
338 | 363 | { }
|
339 | 364 | };
|
340 | 365 | MODULE_DEVICE_TABLE(of, sunxi_de2_clk_ids);
|
|
0 commit comments