From 9774d96beb2a6454760a0cf5ff8f8f1ce56fc425 Mon Sep 17 00:00:00 2001 From: Caesar Wang Date: Mon, 24 Nov 2014 12:59:00 +0800 Subject: ARM: dts: rockchip: add RK3288 Thermal data This patch changes a dtsi file to contain the thermal data on RK3288 and later SoCs. This data will enable a thermal shutdown over 90C. Signed-off-by: Caesar Wang Reviewed-by: Dmitry Torokhov Signed-off-by: Heiko Stuebner --- arch/arm/boot/dts/rk3288-thermal.dtsi | 74 +++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 arch/arm/boot/dts/rk3288-thermal.dtsi (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/rk3288-thermal.dtsi b/arch/arm/boot/dts/rk3288-thermal.dtsi new file mode 100644 index 000000000000..2695200c0af7 --- /dev/null +++ b/arch/arm/boot/dts/rk3288-thermal.dtsi @@ -0,0 +1,74 @@ +/* + * Device Tree Source for RK3288 SoC thermal + * + * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +#include + +reserve_thermal: reserve_thermal { + polling-delay-passive = <1000>; /* milliseconds */ + polling-delay = <5000>; /* milliseconds */ + + thermal-sensors = <&tsadc 0>; +}; + +cpu_thermal: cpu_thermal { + polling-delay-passive = <1000>; /* milliseconds */ + polling-delay = <5000>; /* milliseconds */ + + thermal-sensors = <&tsadc 1>; + + trips { + cpu_alert0: cpu_alert0 { + temperature = <70000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + cpu_crit: cpu_crit { + temperature = <90000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + +gpu_thermal: gpu_thermal { + polling-delay-passive = <1000>; /* milliseconds */ + polling-delay = <5000>; /* milliseconds */ + + thermal-sensors = <&tsadc 2>; + + trips { + gpu_alert0: gpu_alert0 { + temperature = <70000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + gpu_crit: gpu_crit { + temperature = <90000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&gpu_alert0>; + cooling-device = + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; -- cgit v1.2.3 From b67d6bc388236635377a07db432834b94a47cb5d Mon Sep 17 00:00:00 2001 From: Caesar Wang Date: Mon, 24 Nov 2014 12:59:01 +0800 Subject: ARM: dts: rockchip: add main thermal info to rk3288 If for some reason we are unable to shut it down in orderly fashion (kernel is stuck holding a lock or similar), then hardware TSHUT will reset it. If the temperature is over 95C over a period of time the thermal shutdown of the tsadc is invoked with can either reset the entire chip via the CRU, or notify the PMIC via a GPIO. This should be set in the specific board. Signed-off-by: Caesar Wang Reviewed-by: Dmitry Torokhov Signed-off-by: Heiko Stuebner --- arch/arm/boot/dts/rk3288.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index ebcd2d2eef74..acb6a2fba183 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -15,6 +15,7 @@ #include #include #include +#include #include "skeleton.dtsi" / { @@ -68,6 +69,7 @@ 216000 900000 126000 900000 >; + #cooling-cells = <2>; /* min followed by max */ clock-latency = <40000>; clocks = <&cru ARMCLK>; }; @@ -357,6 +359,25 @@ status = "disabled"; }; + thermal-zones { + #include "rk3288-thermal.dtsi" + }; + + tsadc: tsadc@ff280000 { + compatible = "rockchip,rk3288-tsadc"; + reg = <0xff280000 0x100>; + interrupts = ; + clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>; + clock-names = "tsadc", "apb_pclk"; + resets = <&cru SRST_TSADC>; + reset-names = "tsadc-apb"; + pinctrl-names = "default"; + pinctrl-0 = <&otp_out>; + #thermal-sensor-cells = <1>; + rockchip,hw-tshut-temp = <95000>; + status = "disabled"; + }; + usb_host0_ehci: usb@ff500000 { compatible = "generic-ehci"; reg = <0xff500000 0x100>; @@ -1016,6 +1037,12 @@ }; }; + tsadc { + otp_out: otp-out { + rockchip,pins = <0 10 RK_FUNC_1 &pcfg_pull_none>; + }; + }; + pwm0 { pwm0_pin: pwm0-pin { rockchip,pins = <7 0 RK_FUNC_1 &pcfg_pull_none>; -- cgit v1.2.3 From ff9d0ecbbe9181b6fb575223e79c6b98c687af8d Mon Sep 17 00:00:00 2001 From: Caesar Wang Date: Mon, 24 Nov 2014 12:59:02 +0800 Subject: ARM: dts: rockchip: enable thermal on rk3288-evb board When a thermal temperature is invoked use the CRU to reset the chip on rk3288-evb boards. TSHUT is low active on these boards. Signed-off-by: Caesar Wang Reviewed-by: Dmitry Torokhov Signed-off-by: Heiko Stuebner --- arch/arm/boot/dts/rk3288-evb.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi index cb83cea52fa1..3e067dd65d0c 100644 --- a/arch/arm/boot/dts/rk3288-evb.dtsi +++ b/arch/arm/boot/dts/rk3288-evb.dtsi @@ -148,6 +148,12 @@ status = "okay"; }; +&tsadc { + rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */ + rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */ + status = "okay"; +}; + &pinctrl { backlight { bl_en: bl-en { -- cgit v1.2.3 From 3db5894beb21df6ee11dfcafc070f1abd4cdf27d Mon Sep 17 00:00:00 2001 From: Romain Perier Date: Sun, 23 Nov 2014 16:19:35 +0000 Subject: ARM: dts: rockchip: add label property for leds on Radxa Rock The leds-gpio driver recently switched to the device property API. The device_node name is no longer retrieved if the "label" devicetree property is not found. In this case the driver tries to create entries with (null) name in /sys/class/leds, which is wrong and generates backtrace as several gpio_leds have the same name. Also renamed subnode "yellow" to "blue" to match the last schematics updates. Signed-off-by: Romain Perier Signed-off-by: Heiko Stuebner --- arch/arm/boot/dts/rk3188-radxarock.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts index 6eb62c053055..9a09579b8309 100644 --- a/arch/arm/boot/dts/rk3188-radxarock.dts +++ b/arch/arm/boot/dts/rk3188-radxarock.dts @@ -43,16 +43,19 @@ compatible = "gpio-leds"; green { + label = "rock:green:user1"; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; default-state = "off"; }; - yellow { + blue { + label = "rock:blue:user2"; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; default-state = "off"; }; sleep { + label = "rock:red:power"; gpios = <&gpio0 15 0>; default-state = "off"; }; -- cgit v1.2.3 From 4c1e3ff74d08daf27811112af9f6560c3a6415f1 Mon Sep 17 00:00:00 2001 From: Julien CHAUVEAU Date: Fri, 28 Nov 2014 11:24:14 +0100 Subject: ARM: dts: rockchip: set FIFO size for SDMMC, SDIO and EMMC on rk3066 and rk3188 The SDMMC, SDIO and EMMC controllers use an external FIFO whose size is 256x32bit. This patch set the corresponding fifo-depth properties for both RK3066 and RK3188. Signed-off-by: Julien CHAUVEAU Signed-off-by: Heiko Stuebner --- arch/arm/boot/dts/rk3xxx.dtsi | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/rk3xxx.dtsi b/arch/arm/boot/dts/rk3xxx.dtsi index 87df6a8955aa..c54a9715dcfa 100644 --- a/arch/arm/boot/dts/rk3xxx.dtsi +++ b/arch/arm/boot/dts/rk3xxx.dtsi @@ -177,10 +177,9 @@ compatible = "rockchip,rk2928-dw-mshc"; reg = <0x10214000 0x1000>; interrupts = ; - clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>; clock-names = "biu", "ciu"; - + fifo-depth = <256>; status = "disabled"; }; @@ -188,10 +187,9 @@ compatible = "rockchip,rk2928-dw-mshc"; reg = <0x10218000 0x1000>; interrupts = ; - clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>; clock-names = "biu", "ciu"; - + fifo-depth = <256>; status = "disabled"; }; @@ -199,10 +197,9 @@ compatible = "rockchip,rk2928-dw-mshc"; reg = <0x1021c000 0x1000>; interrupts = ; - clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>; clock-names = "biu", "ciu"; - + fifo-depth = <256>; status = "disabled"; }; -- cgit v1.2.3 From 288ce4a8b67795543c69ca6c52f429de24036296 Mon Sep 17 00:00:00 2001 From: Romain Perier Date: Mon, 1 Dec 2014 18:37:26 +0000 Subject: ARM: dts: rockchip: Add input voltage supply regulators in pmic for Marsboard vsys is the core always-on supply of the Marsboard. Signed-off-by: Romain Perier Signed-off-by: Heiko Stuebner --- arch/arm/boot/dts/rk3066a-marsboard.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/rk3066a-marsboard.dts b/arch/arm/boot/dts/rk3066a-marsboard.dts index 57489ee54022..0a7304beb417 100644 --- a/arch/arm/boot/dts/rk3066a-marsboard.dts +++ b/arch/arm/boot/dts/rk3066a-marsboard.dts @@ -60,6 +60,14 @@ startup-delay-us = <100000>; vin-supply = <&vcc_io>; }; + + vsys: vsys-regulator { + compatible = "regulator-fixed"; + regulator-name = "vsys"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + }; }; &i2c1 { @@ -72,8 +80,14 @@ interrupt-parent = <&gpio6>; interrupts = <4 IRQ_TYPE_LEVEL_LOW>; + vcc1-supply = <&vsys>; + vcc2-supply = <&vsys>; + vcc3-supply = <&vsys>; + vcc4-supply = <&vsys>; vcc5-supply = <&vcc_io>; vcc6-supply = <&vcc_io>; + vcc7-supply = <&vsys>; + vccio-supply = <&vsys>; regulators { vcc_rtc: regulator@0 { -- cgit v1.2.3