* [PATCH 1/3] arm64: dts: mt8173: Add clock controller device nodes
2015-05-20 13:32 [PATCH v2] arm64: dts: Mediatek: MT8173 updates Sascha Hauer
@ 2015-05-20 13:32 ` Sascha Hauer
2015-05-27 11:45 ` Matthias Brugger
2015-06-23 19:36 ` Matthias Brugger
2015-05-20 13:32 ` [PATCH 2/3] arm64: dts: mt8173: Use real clock for UARTs Sascha Hauer
2015-05-20 13:32 ` [PATCH 3/3] arm64: dts: mt8173: Add PMIC wrapper device node Sascha Hauer
2 siblings, 2 replies; 11+ messages in thread
From: Sascha Hauer @ 2015-05-20 13:32 UTC (permalink / raw)
To: linux-arm-kernel
This adds the device nodes providing clocks on the Mediatek MT8173.
These are: topckgen, infracfg, pericfg and apmixedsys. These are
fed by two oscillators also added by this patch.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
---
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 41 ++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 4595196..ef1d92f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -11,6 +11,7 @@
* GNU General Public License for more details.
*/
+#include <dt-bindings/clock/mt8173-clk.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include "mt8173-pinfunc.h"
@@ -87,6 +88,20 @@
#clock-cells = <0>;
};
+ clk26m: oscillator at 0 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <26000000>;
+ clock-output-names = "clk26m";
+ };
+
+ clk32k: oscillator at 1 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32000>;
+ clock-output-names = "clk32k";
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&gic>;
@@ -106,6 +121,26 @@
compatible = "simple-bus";
ranges;
+ topckgen: clock-controller at 10000000 {
+ compatible = "mediatek,mt8173-topckgen";
+ reg = <0 0x10000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ infracfg: power-controller at 10001000 {
+ compatible = "mediatek,mt8173-infracfg", "syscon";
+ reg = <0 0x10001000 0 0x1000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
+ pericfg: power-controller at 10003000 {
+ compatible = "mediatek,mt8173-pericfg", "syscon";
+ reg = <0 0x10003000 0 0x1000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
/*
* Pinctrl access register at 0x10005000 through regmap.
* Register 0x1000b000 is used by EINT.
@@ -138,6 +173,12 @@
reg = <0 0x10200620 0 0x20>;
};
+ apmixedsys: clock-controller at 10209000 {
+ compatible = "mediatek,mt8173-apmixedsys";
+ reg = <0 0x10209000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
gic: interrupt-controller at 10220000 {
compatible = "arm,gic-400";
#interrupt-cells = <3>;
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 1/3] arm64: dts: mt8173: Add clock controller device nodes
2015-05-20 13:32 ` [PATCH 1/3] arm64: dts: mt8173: Add clock controller device nodes Sascha Hauer
@ 2015-05-27 11:45 ` Matthias Brugger
2015-06-23 19:36 ` Matthias Brugger
1 sibling, 0 replies; 11+ messages in thread
From: Matthias Brugger @ 2015-05-27 11:45 UTC (permalink / raw)
To: linux-arm-kernel
2015-05-20 15:32 GMT+02:00 Sascha Hauer <s.hauer@pengutronix.de>:
> This adds the device nodes providing clocks on the Mediatek MT8173.
> These are: topckgen, infracfg, pericfg and apmixedsys. These are
> fed by two oscillators also added by this patch.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
> ---
> arch/arm64/boot/dts/mediatek/mt8173.dtsi | 41 ++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
Applied, thanks.
Matthias
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/3] arm64: dts: mt8173: Add clock controller device nodes
2015-05-20 13:32 ` [PATCH 1/3] arm64: dts: mt8173: Add clock controller device nodes Sascha Hauer
2015-05-27 11:45 ` Matthias Brugger
@ 2015-06-23 19:36 ` Matthias Brugger
1 sibling, 0 replies; 11+ messages in thread
From: Matthias Brugger @ 2015-06-23 19:36 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday, May 20, 2015 03:32:44 PM Sascha Hauer wrote:
> This adds the device nodes providing clocks on the Mediatek MT8173.
> These are: topckgen, infracfg, pericfg and apmixedsys. These are
> fed by two oscillators also added by this patch.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
> ---
> arch/arm64/boot/dts/mediatek/mt8173.dtsi | 41
> ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+)
Applied now to v4.2-next/arm64
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/3] arm64: dts: mt8173: Use real clock for UARTs
2015-05-20 13:32 [PATCH v2] arm64: dts: Mediatek: MT8173 updates Sascha Hauer
2015-05-20 13:32 ` [PATCH 1/3] arm64: dts: mt8173: Add clock controller device nodes Sascha Hauer
@ 2015-05-20 13:32 ` Sascha Hauer
2015-05-27 11:45 ` Matthias Brugger
2015-06-23 19:36 ` Matthias Brugger
2015-05-20 13:32 ` [PATCH 3/3] arm64: dts: mt8173: Add PMIC wrapper device node Sascha Hauer
2 siblings, 2 replies; 11+ messages in thread
From: Sascha Hauer @ 2015-05-20 13:32 UTC (permalink / raw)
To: linux-arm-kernel
We used to use a fixed rate clock for the UARTs. Now that we have clock
support we can associate the correct clocks to the UARTs and drop the
26MHz fixed rate UART clock.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index ef1d92f..02088a6 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -82,12 +82,6 @@
cpu_on = <0x84000003>;
};
- uart_clk: dummy26m {
- compatible = "fixed-clock";
- clock-frequency = <26000000>;
- #clock-cells = <0>;
- };
-
clk26m: oscillator at 0 {
compatible = "fixed-clock";
#clock-cells = <0>;
@@ -197,7 +191,8 @@
"mediatek,mt6577-uart";
reg = <0 0x11002000 0 0x400>;
interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&uart_clk>;
+ clocks = <&pericfg CLK_PERI_UART0_SEL>, <&pericfg CLK_PERI_UART0>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -206,7 +201,8 @@
"mediatek,mt6577-uart";
reg = <0 0x11003000 0 0x400>;
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&uart_clk>;
+ clocks = <&pericfg CLK_PERI_UART1_SEL>, <&pericfg CLK_PERI_UART1>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -215,7 +211,8 @@
"mediatek,mt6577-uart";
reg = <0 0x11004000 0 0x400>;
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&uart_clk>;
+ clocks = <&pericfg CLK_PERI_UART2_SEL>, <&pericfg CLK_PERI_UART2>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -224,7 +221,8 @@
"mediatek,mt6577-uart";
reg = <0 0x11005000 0 0x400>;
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&uart_clk>;
+ clocks = <&pericfg CLK_PERI_UART3_SEL>, <&pericfg CLK_PERI_UART3>;
+ clock-names = "baud", "bus";
status = "disabled";
};
};
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/3] arm64: dts: mt8173: Add PMIC wrapper device node
2015-05-20 13:32 [PATCH v2] arm64: dts: Mediatek: MT8173 updates Sascha Hauer
2015-05-20 13:32 ` [PATCH 1/3] arm64: dts: mt8173: Add clock controller device nodes Sascha Hauer
2015-05-20 13:32 ` [PATCH 2/3] arm64: dts: mt8173: Use real clock for UARTs Sascha Hauer
@ 2015-05-20 13:32 ` Sascha Hauer
2015-05-27 11:46 ` Matthias Brugger
2015-06-23 19:37 ` Matthias Brugger
2 siblings, 2 replies; 11+ messages in thread
From: Sascha Hauer @ 2015-05-20 13:32 UTC (permalink / raw)
To: linux-arm-kernel
This adds the device node for the PMIC wrapper.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
---
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 02088a6..a97b2aa 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -14,6 +14,7 @@
#include <dt-bindings/clock/mt8173-clk.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset-controller/mt8173-resets.h>
#include "mt8173-pinfunc.h"
/ {
@@ -158,6 +159,17 @@
reg = <0 0x10005000 0 0x1000>;
};
+ pwrap: pwrap at 1000d000 {
+ compatible = "mediatek,mt8173-pwrap";
+ reg = <0 0x1000d000 0 0x1000>;
+ reg-names = "pwrap";
+ interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&infracfg MT8173_INFRA_PMIC_WRAP_RST>;
+ reset-names = "pwrap";
+ clocks = <&infracfg CLK_INFRA_PMICSPI>, <&infracfg CLK_INFRA_PMICWRAP>;
+ clock-names = "spi", "wrap";
+ };
+
sysirq: intpol-controller at 10200620 {
compatible = "mediatek,mt8173-sysirq",
"mediatek,mt6577-sysirq";
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/3] ARM64: dts: mt8173: Use real clock for UARTs
2015-05-19 10:53 ARM64: dts: Mediatek: MT8173 updates Sascha Hauer
@ 2015-05-19 10:53 ` Sascha Hauer
0 siblings, 0 replies; 11+ messages in thread
From: Sascha Hauer @ 2015-05-19 10:53 UTC (permalink / raw)
To: linux-arm-kernel
We used to use a fixed rate clock for the UARTs. Now that we have clock
support we can associate the correct clocks to the UARTs and drop the
26MHz fixed rate UART clock.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 30ac8dd..cfdca03 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -82,12 +82,6 @@
cpu_on = <0x84000003>;
};
- uart_clk: dummy26m {
- compatible = "fixed-clock";
- clock-frequency = <26000000>;
- #clock-cells = <0>;
- };
-
clk26m: oscillator at 0 {
compatible = "fixed-clock";
#clock-cells = <0>;
@@ -193,7 +187,8 @@
"mediatek,mt6577-uart";
reg = <0 0x11002000 0 0x400>;
interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&uart_clk>;
+ clocks = <&pericfg CLK_PERI_UART0_SEL>, <&pericfg CLK_PERI_UART0>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -202,7 +197,8 @@
"mediatek,mt6577-uart";
reg = <0 0x11003000 0 0x400>;
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&uart_clk>;
+ clocks = <&pericfg CLK_PERI_UART1_SEL>, <&pericfg CLK_PERI_UART1>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -211,7 +207,8 @@
"mediatek,mt6577-uart";
reg = <0 0x11004000 0 0x400>;
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&uart_clk>;
+ clocks = <&pericfg CLK_PERI_UART2_SEL>, <&pericfg CLK_PERI_UART2>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -220,7 +217,8 @@
"mediatek,mt6577-uart";
reg = <0 0x11005000 0 0x400>;
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&uart_clk>;
+ clocks = <&pericfg CLK_PERI_UART3_SEL>, <&pericfg CLK_PERI_UART3>;
+ clock-names = "baud", "bus";
status = "disabled";
};
};
--
2.1.4
^ permalink raw reply related [flat|nested] 11+ messages in thread