Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'v4.9-next-dts' of https://github.com/mbgg/linux-mediatek into next/dt

- Add bindings for mtk-scpsys for mt2701
- Add clocks for auxadc on mt8173-evb
- Add nodes needed by clock controller for mt2701
- Use clocks from the clock controller for the uart of mt2701

* tag 'v4.9-next-dts' of https://github.com/mbgg/linux-mediatek:
arm: dts: mt2701: Use real clock for UARTs
arm: dts: mt2701: Add clock controller device nodes
arm64: dts: mt8173: Fix auxadc node
soc: mediatek: Add MT2701 power dt-bindings

Signed-off-by: Olof Johansson <olof@lixom.net>

+84 -11
+8 -5
Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
··· 9 9 10 10 The driver implements the Generic PM domain bindings described in 11 11 power/power_domain.txt. It provides the power domains defined in 12 - include/dt-bindings/power/mt8173-power.h. 12 + include/dt-bindings/power/mt8173-power.h and mt2701-power.h. 13 13 14 14 Required properties: 15 - - compatible: Must be "mediatek,mt8173-scpsys" 15 + - compatible: Should be one of: 16 + - "mediatek,mt2701-scpsys" 17 + - "mediatek,mt8173-scpsys" 16 18 - #power-domain-cells: Must be 1 17 19 - reg: Address range of the SCPSYS unit 18 20 - infracfg: must contain a phandle to the infracfg controller 19 21 - clock, clock-names: clocks according to the common clock binding. 20 - The clocks needed "mm", "mfg", "venc" and "venc_lt". 21 - These are the clocks which hardware needs to be enabled 22 - before enabling certain power domains. 22 + These are clocks which hardware needs to be 23 + enabled before enabling certain power domains. 24 + Required clocks for MT2701: "mm", "mfg", "ethif" 25 + Required clocks for MT8173: "mm", "mfg", "venc", "venc_lt" 23 26 24 27 Optional properties: 25 28 - vdec-supply: Power supply for the vdec power domain
+46 -6
arch/arm/boot/dts/mt2701.dtsi
··· 12 12 * GNU General Public License for more details. 13 13 */ 14 14 15 + #include <dt-bindings/clock/mt2701-clk.h> 15 16 #include <dt-bindings/interrupt-controller/irq.h> 16 17 #include <dt-bindings/interrupt-controller/arm-gic.h> 18 + #include <dt-bindings/reset/mt2701-resets.h> 17 19 #include "skeleton64.dtsi" 18 20 #include "mt2701-pinfunc.h" 19 21 ··· 73 71 #clock-cells = <0>; 74 72 }; 75 73 76 - uart_clk: dummy26m { 74 + clk26m: oscillator@0 { 77 75 compatible = "fixed-clock"; 78 - clock-frequency = <26000000>; 79 76 #clock-cells = <0>; 77 + clock-frequency = <26000000>; 78 + clock-output-names = "clk26m"; 79 + }; 80 + 81 + rtc32k: oscillator@1 { 82 + compatible = "fixed-clock"; 83 + #clock-cells = <0>; 84 + clock-frequency = <32000>; 85 + clock-output-names = "rtc32k"; 80 86 }; 81 87 82 88 timer { ··· 114 104 reg = <0 0x10005000 0 0x1000>; 115 105 }; 116 106 107 + topckgen: syscon@10000000 { 108 + compatible = "mediatek,mt2701-topckgen", "syscon"; 109 + reg = <0 0x10000000 0 0x1000>; 110 + #clock-cells = <1>; 111 + }; 112 + 113 + infracfg: syscon@10001000 { 114 + compatible = "mediatek,mt2701-infracfg", "syscon"; 115 + reg = <0 0x10001000 0 0x1000>; 116 + #clock-cells = <1>; 117 + #reset-cells = <1>; 118 + }; 119 + 120 + pericfg: syscon@10003000 { 121 + compatible = "mediatek,mt2701-pericfg", "syscon"; 122 + reg = <0 0x10003000 0 0x1000>; 123 + #clock-cells = <1>; 124 + #reset-cells = <1>; 125 + }; 126 + 117 127 watchdog: watchdog@10007000 { 118 128 compatible = "mediatek,mt2701-wdt", 119 129 "mediatek,mt6589-wdt"; ··· 158 128 reg = <0 0x10200100 0 0x1c>; 159 129 }; 160 130 131 + apmixedsys: syscon@10209000 { 132 + compatible = "mediatek,mt2701-apmixedsys", "syscon"; 133 + reg = <0 0x10209000 0 0x1000>; 134 + #clock-cells = <1>; 135 + }; 136 + 161 137 gic: interrupt-controller@10211000 { 162 138 compatible = "arm,cortex-a7-gic"; 163 139 interrupt-controller; ··· 180 144 "mediatek,mt6577-uart"; 181 145 reg = <0 0x11002000 0 0x400>; 182 146 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>; 183 - clocks = <&uart_clk>; 147 + clocks = <&pericfg CLK_PERI_UART0_SEL>, <&pericfg CLK_PERI_UART0>; 148 + clock-names = "baud", "bus"; 184 149 status = "disabled"; 185 150 }; 186 151 ··· 190 153 "mediatek,mt6577-uart"; 191 154 reg = <0 0x11003000 0 0x400>; 192 155 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>; 193 - clocks = <&uart_clk>; 156 + clocks = <&pericfg CLK_PERI_UART1_SEL>, <&pericfg CLK_PERI_UART1>; 157 + clock-names = "baud", "bus"; 194 158 status = "disabled"; 195 159 }; 196 160 ··· 200 162 "mediatek,mt6577-uart"; 201 163 reg = <0 0x11004000 0 0x400>; 202 164 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_LOW>; 203 - clocks = <&uart_clk>; 165 + clocks = <&pericfg CLK_PERI_UART2_SEL>, <&pericfg CLK_PERI_UART2>; 166 + clock-names = "baud", "bus"; 204 167 status = "disabled"; 205 168 }; 206 169 ··· 210 171 "mediatek,mt6577-uart"; 211 172 reg = <0 0x11005000 0 0x400>; 212 173 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_LOW>; 213 - clocks = <&uart_clk>; 174 + clocks = <&pericfg CLK_PERI_UART3_SEL>, <&pericfg CLK_PERI_UART3>; 175 + clock-names = "baud", "bus"; 214 176 status = "disabled"; 215 177 }; 216 178 };
+3
arch/arm64/boot/dts/mediatek/mt8173.dtsi
··· 450 450 auxadc: auxadc@11001000 { 451 451 compatible = "mediatek,mt8173-auxadc"; 452 452 reg = <0 0x11001000 0 0x1000>; 453 + clocks = <&pericfg CLK_PERI_AUXADC>; 454 + clock-names = "main"; 455 + #io-channel-cells = <1>; 453 456 }; 454 457 455 458 uart0: serial@11002000 {
+27
include/dt-bindings/power/mt2701-power.h
··· 1 + /* 2 + * Copyright (C) 2015 MediaTek Inc. 3 + * 4 + * This program is free software: you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License version 2 as 6 + * published by the Free Software Foundation. 7 + * 8 + * This program is distributed in the hope that it will be useful, 9 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 + * GNU General Public License for more details. 12 + */ 13 + 14 + #ifndef _DT_BINDINGS_POWER_MT2701_POWER_H 15 + #define _DT_BINDINGS_POWER_MT2701_POWER_H 16 + 17 + #define MT2701_POWER_DOMAIN_CONN 0 18 + #define MT2701_POWER_DOMAIN_DISP 1 19 + #define MT2701_POWER_DOMAIN_MFG 2 20 + #define MT2701_POWER_DOMAIN_VDEC 3 21 + #define MT2701_POWER_DOMAIN_ISP 4 22 + #define MT2701_POWER_DOMAIN_BDP 5 23 + #define MT2701_POWER_DOMAIN_ETH 6 24 + #define MT2701_POWER_DOMAIN_HIF 7 25 + #define MT2701_POWER_DOMAIN_IFR_MSC 8 26 + 27 + #endif /* _DT_BINDINGS_POWER_MT2701_POWER_H */