Skip to contentSkip to conversation

clk: rockchip: add clock id for watchdog pclk on rk3328

PATCH Applied Heiko Stuebner 1 participant 4 messages Jun 15, 2019 – Jun 27, 2019

Subsystems (3)
lore
Share & tools
lore

Heiko Stuebner

author maintainer
#0 lore raw

PATCH 1/3 clk: rockchip: add clock id for watchdog pclk on rk3328

Needed to export that added clock.

---
 include/dt-bindings/clock/rk3328-cru.h | 1 +
 1 file changed, 1 insertion(+)
include/dt-bindings/clock/rk3328-cru.h +1 -0
index afb811340382..555b4ff660ae 100644
@@ -164,6 +164,7 @@
 #define PCLK_DCF		233
 #define PCLK_SARADC		234
 #define PCLK_ACODECPHY		235
+#define PCLK_WDT		236
 
 /* hclk gates */
 #define HCLK_PERI		308
Signature · 1 line
2.20.1
author maintainer
#1 lore raw

PATCH 2/3 clk: rockchip: add watchdog pclk on rk3328

The watchdog pclk is controlled from the secure GRF but we still want to mention it explicitly to not use arbitary parent clocks in the devicetree wdt node, so add a SGRF_GATE for it.

---
 drivers/clk/rockchip/clk-rk3328.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/clk/rockchip/clk-rk3328.c +3 -0
index 076b9777a955..c186a1985bf4 100644
@@ -791,6 +791,9 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {
 	GATE(PCLK_SARADC, "pclk_saradc", "pclk_bus", 0, RK3328_CLKGATE_CON(17), 15, GFLAGS),
 	GATE(0, "pclk_pmu", "pclk_bus", CLK_IGNORE_UNUSED, RK3328_CLKGATE_CON(28), 3, GFLAGS),
 
+	/* Watchdog pclk is controlled from the secure GRF */
+	SGRF_GATE(PCLK_WDT, "pclk_wdt", "pclk_bus"),
+
 	GATE(PCLK_USB3PHY_OTG, "pclk_usb3phy_otg", "pclk_phy_pre", 0, RK3328_CLKGATE_CON(28), 1, GFLAGS),
 	GATE(PCLK_USB3PHY_PIPE, "pclk_usb3phy_pipe", "pclk_phy_pre", 0, RK3328_CLKGATE_CON(28), 2, GFLAGS),
 	GATE(PCLK_USB3_GRF, "pclk_usb3_grf", "pclk_phy_pre", CLK_IGNORE_UNUSED, RK3328_CLKGATE_CON(17), 2, GFLAGS),
Signature · 1 line
2.20.1
author maintainer
#2 lore raw

PATCH 3/3 arm64: dts: rockchip: enable rk3328 watchdog clock

In reply to Heiko Stuebner

From: Leonidas P. Papadakos <[email protected]>

Add the missing clock property for the watchdog on rk3328.

[set wdt node to always enabled, as it is not board-specific]
---
 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +1 -0
index 994468671b19..e9fefd8a7e02 100644
@@ -407,6 +407,7 @@
 		compatible = "snps,dw-wdt";
 		reg = <0x0 0xff1a0000 0x0 0x100>;
 		interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru PCLK_WDT>;
 	};
 
 	pwm0: pwm@ff1b0000 {
Signature · 1 line
2.20.1