clk: i.MX8MQ: Add missing IMX8MQ_CLK_TMU_ROOT clock
Subsystems (4)
PATCH v2 1/3 clk: i.MX8MQ: Add missing IMX8MQ_CLK_TMU_ROOT clock
Add missing IMX8MQ_CLK_TMU_ROOT clock needed for CPU thermal sensor.
---
Changes since [v1]:
- None
[v1] http://lists.infradead.org/pipermail/barebox/2018-September/034788.html
drivers/clk/imx/clk-imx8mq.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx8mq.c +1 -0
@@ -572,6 +572,7 @@ static void __init imx8mq_clocks_init(struct device_node *ccm_node) clks[IMX8MQ_CLK_WDOG1_ROOT ] =imx_clk_gate4 ("wdog1_root_clk" ,"wdog_div" , base +0x4530 ,0 ); clks[IMX8MQ_CLK_WDOG2_ROOT ] =imx_clk_gate4 ("wdog2_root_clk" ,"wdog_div" , base +0x4540 ,0 ); clks[IMX8MQ_CLK_WDOG3_ROOT ] =imx_clk_gate4 ("wdog3_root_clk" ,"wdog_div" , base +0x4550 ,0 ); + clks[IMX8MQ_CLK_TMU_ROOT ] =imx_clk_gate4 ("tmu_root_clk" ,"ipg_root" , base +0x4620 ,0 ); clks[IMX8MQ_GPT_3M_CLK ] =imx_clk_fixed_factor ("gpt_3m" ,"osc_25m" ,1 ,8 ); clks[IMX8MQ_CLK_DRAM_ALT_ROOT ] =imx_clk_fixed_factor ("dram_alt_root" ,"dram_alt_div" ,1 ,4 );
Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 2/3 aiodev: Port Linux driver for i.MX8MQ CPU thermal sensor
This patch is a minimal port of the corresponding driver that can be found in Linux kernel (drivers/thermal/qoriq_thermal.c).
---
Changes since [v1]:
- None
[v1] http://lists.infradead.org/pipermail/barebox/2018-September/034789.html
drivers/aiodev/Kconfig | 7 + drivers/aiodev/Makefile | 1 + drivers/aiodev/qoriq_thermal.c | 264 +++++++++++++++++++++++++++++++++ 3 files changed, 272 insertions(+) create mode 100644 drivers/aiodev/qoriq_thermal.c
drivers/aiodev/Kconfig +7 -0
@@ -16,6 +16,13 @@ config IMX_THERMAL Support for Temperature Monitor (TEMPMON) found on Freescale i.MX SoCs. +config QORIQ_THERMAL + tristate "QorIQ Thermal Monitoring Unit" + depends on ARCH_IMX8MQ + help + Support for Thermal Monitoring Unit (TMU) found on QorIQ and + i.MX8MQ platforms. + config LM75 tristate "LM75 driver" depends on I2C
drivers/aiodev/Makefile +1 -0
@@ -3,3 +3,4 @@ obj-$(CONFIG_AIODEV) += core.o obj-$(CONFIG_IMX_THERMAL) += imx_thermal.o obj-$(CONFIG_LM75) += lm75.o obj-$(CONFIG_MC13XXX_ADC) += mc13xxx_adc.o +obj-$(CONFIG_QORIQ_THERMAL) += qoriq_thermal.o
drivers/aiodev/qoriq_thermal.c new file +264 -0
264 lines not on this page · raw message
Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 3/3 ARM: i.MX8MQ: Add node for CPU thermal sensor
In reply to Andrey Smirnov---
Changes since [v1]:
- Added #cooling-cells property &A53_0 to avoid getting a warning from DTC
[v1] http://lists.infradead.org/pipermail/barebox/2018-September/034790.html
arch/arm/dts/imx8mq.dtsi | 85 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+)
arch/arm/dts/imx8mq.dtsi +85 -0
@@ -7,6 +7,7 @@ #include <dt-bindings/clock/imx8mq-clock.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> #include "imx8mq-pinfunc.h" /* first 128 KiB of memory are owned by ATF */
@@ -96,6 +97,7 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 {
@@ -214,6 +216,89 @@ #interrupt-cells = <2>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000 0x00000023 + 0x00000001 0x00000029 + 0x00000002 0x0000002f + 0x00000003 0x00000035 + 0x00000004 0x0000003d + 0x00000005 0x00000043 + 0x00000006 0x0000004b + 0x00000007 0x00000051 + 0x00000008 0x00000057 + 0x00000009 0x0000005f + 0x0000000a 0x00000067 + 0x0000000b 0x0000006f + + 0x00010000 0x0000001b + 0x00010001 0x00000023 + 0x00010002 0x0000002b + 0x00010003 0x00000033 + 0x00010004 0x0000003b + 0x00010005 0x00000043 + 0x00010006 0x0000004b + 0x00010007 0x00000055 + 0x00010008 0x0000005d + 0x00010009 0x00000067 + 0x0001000a 0x00000070 + + 0x00020000 0x00000017 + 0x00020001 0x00000023 + 0x00020002 0x0000002d + 0x00020003 0x00000037 + 0x00020004 0x00000041 + 0x00020005 0x0000004b + 0x00020006 0x00000057 + 0x00020007 0x00000063 + 0x00020008 0x0000006f + + 0x00030000 0x00000015 + 0x00030001 0x00000021 + 0x00030002 0x0000002d + 0x00030003 0x00000039 + 0x00030004 0x00000045 + 0x00030005 0x00000053 + 0x00030006 0x0000005f + 0x00030007 0x00000071>; + #thermal-sensor-cells = <0>; + }; + + thermal-zones { + /* cpu thermal */ + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu>; + + trips { + cpu_alert0: trip0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit0: trip1 { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = + <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + iomuxc: iomuxc@30330000 { compatible = "fsl,imx8mq-iomuxc"; reg = <0x30330000 0x10000>;
Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 5 lines · Andrey Smirnov
Add missing
IMX8MQ_CLK_TMU_ROOTclock needed for CPU thermal sensor.Signed-off-by Andrey Smirnov <[email protected]>---
Quoted 8 lines
Changes since [v1]:
- None
[v1] http://lists.infradead.org/pipermail/barebox/2018-September/034788.html
drivers/clk/imx/clk-imx8mq.c | 1 + 1 file changed, 1 insertion(+)
Applied, thanks
Sascha
Quoted 22 lines
drivers/clk/imx/clk-imx8mq.c +1
-0@@ -572,6 +572,7 @@ static void __init imx8mq_clocks_init(struct device_node *ccm_node) clks[IMX8MQ_CLK_WDOG1_ROOT ] =imx_clk_gate4 ("wdog1_root_clk" ,"wdog_div" , base +0x4530 ,0 ); clks[IMX8MQ_CLK_WDOG2_ROOT ] =imx_clk_gate4 ("wdog2_root_clk" ,"wdog_div" , base +0x4540 ,0 ); clks[IMX8MQ_CLK_WDOG3_ROOT ] =imx_clk_gate4 ("wdog3_root_clk" ,"wdog_div" , base +0x4550 ,0 ); + clks[IMX8MQ_CLK_TMU_ROOT ] =imx_clk_gate4 ("tmu_root_clk" ,"ipg_root" , base +0x4620 ,0 ); clks[IMX8MQ_GPT_3M_CLK ] =imx_clk_fixed_factor ("gpt_3m" ,"osc_25m" ,1 ,8 ); clks[IMX8MQ_CLK_DRAM_ALT_ROOT ] =imx_clk_fixed_factor ("dram_alt_root" ,"dram_alt_div" ,1 ,4 );Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox