From cb27c89b7817935c0a532b39e6a77dd2e2fc3e56 Mon Sep 17 00:00:00 2001 From: Jisheng Zhang Date: Fri, 16 Oct 2015 15:37:11 +0800 Subject: [PATCH 1/5] arm64: dts: berlin4ct: add the pinctrl node Add the avio, soc, sm pinctrl nodes for Marvell berlin4ct SoC. Signed-off-by: Jisheng Zhang Acked-by: Sebastian Hesselbarth Acked-by: Antoine Tenart Acked-by: Linus Walleij Signed-off-by: Sebastian Hesselbarth --- arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi index a3b5f1d4a240..8e66355c8306 100644 --- a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi +++ b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi @@ -225,6 +225,16 @@ aic: interrupt-controller@3800 { }; }; + soc_pinctrl: pin-controller@ea8000 { + compatible = "marvell,berlin4ct-soc-pinctrl"; + reg = <0xea8000 0x14>; + }; + + avio_pinctrl: pin-controller@ea8400 { + compatible = "marvell,berlin4ct-avio-pinctrl"; + reg = <0xea8400 0x8>; + }; + apb@fc0000 { compatible = "simple-bus"; #address-cells = <1>; @@ -280,5 +290,10 @@ uart0: uart@d000 { status = "disabled"; }; }; + + system_pinctrl: pin-controller@fe2200 { + compatible = "marvell,berlin4ct-system-pinctrl"; + reg = <0xfe2200 0xc>; + }; }; }; From d9c1567f8427519b5b61cbca5477f96a1590d51b Mon Sep 17 00:00:00 2001 From: Jisheng Zhang Date: Fri, 16 Oct 2015 15:37:12 +0800 Subject: [PATCH 2/5] arm64: dts: berlin4ct: add default pinmux for uart0 Add urt0 txd and rxd muxing setup in the dtsi because uart0 always uses them to work, no other possibilities. Signed-off-by: Jisheng Zhang Acked-by: Sebastian Hesselbarth Acked-by: Antoine Tenart Acked-by: Linus Walleij Signed-off-by: Sebastian Hesselbarth --- arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi index 8e66355c8306..a4a18764ae98 100644 --- a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi +++ b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi @@ -288,12 +288,19 @@ uart0: uart@d000 { clocks = <&osc>; reg-shift = <2>; status = "disabled"; + pinctrl-0 = <&uart0_pmux>; + pinctrl-names = "default"; }; }; system_pinctrl: pin-controller@fe2200 { compatible = "marvell,berlin4ct-system-pinctrl"; reg = <0xfe2200 0xc>; + + uart0_pmux: uart0-pmux { + groups = "SM_URT0_TXD", "SM_URT0_RXD"; + function = "uart0"; + }; }; }; }; From d2318f3402539c15d89166b0863d9367a8f8d3bf Mon Sep 17 00:00:00 2001 From: Jisheng Zhang Date: Mon, 16 Nov 2015 19:09:50 +0800 Subject: [PATCH 3/5] arm64: dts: berlin4ct: add watchdog nodes The Marvell Berlin BG4CT has 3 watchdogs which are compatible with the snps,dw-wdt driver sit in the sysmgr domain. This patch adds the corresponding device tree nodes. Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth --- arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi index a4a18764ae98..a2d4e2dd3209 100644 --- a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi +++ b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi @@ -251,6 +251,29 @@ sic: interrupt-controller@1000 { interrupts = ; }; + wdt0: watchdog@3000 { + compatible = "snps,dw-wdt"; + reg = <0x3000 0x100>; + clocks = <&osc>; + interrupts = <0>; + }; + + wdt1: watchdog@4000 { + compatible = "snps,dw-wdt"; + reg = <0x4000 0x100>; + clocks = <&osc>; + interrupts = <1>; + status = "disabled"; + }; + + wdt2: watchdog@5000 { + compatible = "snps,dw-wdt"; + reg = <0x5000 0x100>; + clocks = <&osc>; + interrupts = <2>; + status = "disabled"; + }; + sm_gpio0: gpio@8000 { compatible = "snps,dw-apb-gpio"; reg = <0x8000 0x400>; From 5fbb15316fdd8f00143179ffb3a03f501c4b50dc Mon Sep 17 00:00:00 2001 From: Jisheng Zhang Date: Mon, 16 Nov 2015 19:37:49 +0800 Subject: [PATCH 4/5] arm64: dts: berlin: PSCI-1.0 support The firmware can support PSCI-1.0 in fact. This change also enables suspend to ram on Marvell berlin arm64 SoC. Signed-off-by: Jisheng Zhang Signed-off-by: Sebastian Hesselbarth --- arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi index a2d4e2dd3209..6cd77272ab88 100644 --- a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi +++ b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi @@ -55,7 +55,7 @@ aliases { }; psci { - compatible = "arm,psci-0.2"; + compatible = "arm,psci-1.0", "arm,psci-0.2"; method = "smc"; }; From 1544f99c0ac08376c0a3888aef7722d9f678020c Mon Sep 17 00:00:00 2001 From: Jisheng Zhang Date: Mon, 30 Nov 2015 21:41:58 +0800 Subject: [PATCH 5/5] arm64: dts: berlin4ct: support cpuidle-dt This patch adds an idle-states node to describe the berlin4ct idle states and also adds references to the idle-states node in all CPU nodes. After this patch cpuidle is enabled. Signed-off-by: Jisheng Zhang Acked-by: Lorenzo Pieralisi Signed-off-by: Sebastian Hesselbarth --- arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi index 6cd77272ab88..099ad93bb49b 100644 --- a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi +++ b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi @@ -68,6 +68,7 @@ cpu0: cpu@0 { device_type = "cpu"; reg = <0x0>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0>; }; cpu1: cpu@1 { @@ -75,6 +76,7 @@ cpu1: cpu@1 { device_type = "cpu"; reg = <0x1>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0>; }; cpu2: cpu@2 { @@ -82,6 +84,7 @@ cpu2: cpu@2 { device_type = "cpu"; reg = <0x2>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0>; }; cpu3: cpu@3 { @@ -89,6 +92,19 @@ cpu3: cpu@3 { device_type = "cpu"; reg = <0x3>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0>; + }; + + idle-states { + entry-method = "psci"; + CPU_SLEEP_0: cpu-sleep-0 { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x0010000>; + entry-latency-us = <75>; + exit-latency-us = <155>; + min-residency-us = <1000>; + }; }; };