Skip to content

Commit 3ba2d41

Browse files
committed
Merge branch 'clk-ralink' into clk-next
- Proper clk driver for Mediatek MT7621 SoCs * clk-ralink: MAINTAINERS: add MT7621 CLOCK maintainer staging: mt7621-dts: use valid vendor 'mediatek' instead of invalid 'mtk' staging: mt7621-dts: make use of new 'mt7621-clk' clk: ralink: add clock driver for mt7621 SoC dt: bindings: add mt7621-sysc device tree binding documentation dt-bindings: clock: add dt binding header for mt7621 clocks
2 parents bbc3b40 + 0ec3815 commit 3ba2d41

File tree

11 files changed

+665
-59
lines changed

11 files changed

+665
-59
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/mediatek,mt7621-sysc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MT7621 Clock Device Tree Bindings
8+
9+
maintainers:
10+
- Sergio Paracuellos <[email protected]>
11+
12+
description: |
13+
The MT7621 has a PLL controller from where the cpu clock is provided
14+
as well as derived clocks for the bus and the peripherals. It also
15+
can gate SoC device clocks.
16+
17+
Each clock is assigned an identifier and client nodes use this identifier
18+
to specify the clock which they consume.
19+
20+
All these identifiers could be found in:
21+
[1]: <include/dt-bindings/clock/mt7621-clk.h>.
22+
23+
The clocks are provided inside a system controller node.
24+
25+
properties:
26+
compatible:
27+
items:
28+
- const: mediatek,mt7621-sysc
29+
- const: syscon
30+
31+
reg:
32+
maxItems: 1
33+
34+
"#clock-cells":
35+
description:
36+
The first cell indicates the clock number, see [1] for available
37+
clocks.
38+
const: 1
39+
40+
ralink,memctl:
41+
$ref: /schemas/types.yaml#/definitions/phandle
42+
description:
43+
phandle of syscon used to control memory registers
44+
45+
clock-output-names:
46+
maxItems: 8
47+
48+
required:
49+
- compatible
50+
- reg
51+
- '#clock-cells'
52+
- ralink,memctl
53+
54+
additionalProperties: false
55+
56+
examples:
57+
- |
58+
#include <dt-bindings/clock/mt7621-clk.h>
59+
60+
sysc: sysc@0 {
61+
compatible = "mediatek,mt7621-sysc", "syscon";
62+
reg = <0x0 0x100>;
63+
#clock-cells = <1>;
64+
ralink,memctl = <&memc>;
65+
clock-output-names = "xtal", "cpu", "bus",
66+
"50m", "125m", "150m",
67+
"250m", "270m";
68+
};

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11295,6 +11295,12 @@ L: [email protected]
1129511295
S: Maintained
1129611296
F: drivers/net/wireless/mediatek/mt7601u/
1129711297

11298+
MEDIATEK MT7621 CLOCK DRIVER
11299+
M: Sergio Paracuellos <[email protected]>
11300+
S: Maintained
11301+
F: Documentation/devicetree/bindings/clock/mediatek,mt7621-sysc.yaml
11302+
F: drivers/clk/ralink/clk-mt7621.c
11303+
1129811304
MEDIATEK MT7621/28/88 I2C DRIVER
1129911305
M: Stefan Roese <[email protected]>
1130011306

arch/mips/ralink/mt7621.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ phys_addr_t mips_cpc_default_phys_base(void)
112112

113113
void __init ralink_of_remap(void)
114114
{
115-
rt_sysc_membase = plat_of_remap_node("mtk,mt7621-sysc");
116-
rt_memc_membase = plat_of_remap_node("mtk,mt7621-memc");
115+
rt_sysc_membase = plat_of_remap_node("mediatek,mt7621-sysc");
116+
rt_memc_membase = plat_of_remap_node("mediatek,mt7621-memc");
117117

118118
if (!rt_sysc_membase || !rt_memc_membase)
119119
panic("Failed to remap core resources");
@@ -181,7 +181,7 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
181181

182182
if (n0 == MT7621_CHIP_NAME0 && n1 == MT7621_CHIP_NAME1) {
183183
name = "MT7621";
184-
soc_info->compatible = "mtk,mt7621-soc";
184+
soc_info->compatible = "mediatek,mt7621-soc";
185185
} else {
186186
panic("mt7621: unknown SoC, n0:%08x n1:%08x\n", n0, n1);
187187
}

drivers/clk/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ source "drivers/clk/meson/Kconfig"
390390
source "drivers/clk/mstar/Kconfig"
391391
source "drivers/clk/mvebu/Kconfig"
392392
source "drivers/clk/qcom/Kconfig"
393+
source "drivers/clk/ralink/Kconfig"
393394
source "drivers/clk/renesas/Kconfig"
394395
source "drivers/clk/rockchip/Kconfig"
395396
source "drivers/clk/samsung/Kconfig"

drivers/clk/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ obj-$(CONFIG_COMMON_CLK_NXP) += nxp/
100100
obj-$(CONFIG_MACH_PISTACHIO) += pistachio/
101101
obj-$(CONFIG_COMMON_CLK_PXA) += pxa/
102102
obj-$(CONFIG_COMMON_CLK_QCOM) += qcom/
103+
obj-y += ralink/
103104
obj-y += renesas/
104105
obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
105106
obj-$(CONFIG_COMMON_CLK_SAMSUNG) += samsung/

drivers/clk/ralink/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
#
3+
# MediaTek Mt7621 Clock Driver
4+
#
5+
config CLK_MT7621
6+
bool "Clock driver for MediaTek MT7621"
7+
depends on SOC_MT7621 || COMPILE_TEST
8+
default SOC_MT7621
9+
select MFD_SYSCON
10+
help
11+
This driver supports MediaTek MT7621 basic clocks.

drivers/clk/ralink/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
obj-$(CONFIG_CLK_MT7621) += clk-mt7621.o

0 commit comments

Comments
 (0)