Merge tag 'stm32-dt-for-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorArnd Bergmann <arnd@arndb.de>
Wed, 30 Jan 2019 16:26:33 +0000 (17:26 +0100)
committerArnd Bergmann <arnd@arndb.de>
Wed, 30 Jan 2019 16:27:59 +0000 (17:27 +0100)
STM32 DT updates for v4.21, round 1

Highlights:
----------

-MPU STM32MP157 platform update:
 -Declare DMAs for timers
 -Add sleep support for CAN
 -Split CAN RAM mapping between the 2 FDCAN instances
 -Add support of thermal sensor (DTS)

* tag 'stm32-dt-for-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32:
  ARM: dts: stm32: add thermal sensor support on STM32MP157c
  ARM: dts: stm32: add can1 sleep pins muxing on stm32mp157c-ev1 board
  ARM: dts: stm32: add can1 sleep pins muxing
  ARM: dts: stm32: change CAN RAM mapping on stm32mp157c
  ARM: dts: stm32: don't use timers dmas on stm32mp157c-ev1
  ARM: dts: stm32: don't use timers dmas on stm32mp157c-ed1
  ARM: dts: stm32: Add dmas to timer on stm32mp157c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/boot/dts/stm32mp157-pinctrl.dtsi
arch/arm/boot/dts/stm32mp157c-ed1.dts
arch/arm/boot/dts/stm32mp157c-ev1.dts
arch/arm/boot/dts/stm32mp157c.dtsi

index c4851271e8105ebe4f92196cd808d64ccea626d9..9ec4694e93a7f4a8decc4ce8af01d6b0e4b00594 100644 (file)
                                };
                        };
 
+                       m_can1_sleep_pins_a: m_can1-sleep@0 {
+                               pins {
+                                       pinmux = <STM32_PINMUX('H', 13, ANALOG)>, /* CAN1_TX */
+                                                <STM32_PINMUX('I', 9, ANALOG)>; /* CAN1_RX */
+                               };
+                       };
+
                        pwm2_pins_a: pwm2-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('A', 3, AF1)>; /* TIM2_CH4 */
index f77bea49c0793f4f07cb2cd912945f4c199c9e10..c3ecb1e10d947be3937fa445bb5d02e6fd8a2142 100644 (file)
@@ -72,6 +72,9 @@
 
 &timers6 {
        status = "okay";
+       /* spare dmas for other usage */
+       /delete-property/dmas;
+       /delete-property/dma-names;
        timer@5 {
                status = "okay";
        };
index 063ee8ac5dcbd12d763a9d32a62f3185d819ae50..b6aca40b9b90bcd675c0b111c555ffb8941b88af 100644 (file)
 };
 
 &m_can1 {
-       pinctrl-names = "default";
+       pinctrl-names = "default", "sleep";
        pinctrl-0 = <&m_can1_pins_a>;
+       pinctrl-1 = <&m_can1_sleep_pins_a>;
        status = "okay";
 };
 
 };
 
 &timers2 {
+       /* spare dmas for other usage (un-delete to enable pwm capture) */
+       /delete-property/dmas;
+       /delete-property/dma-names;
        status = "disabled";
        pwm {
                pinctrl-0 = <&pwm2_pins_a>;
 };
 
 &timers8 {
+       /delete-property/dmas;
+       /delete-property/dma-names;
        status = "disabled";
        pwm {
                pinctrl-0 = <&pwm8_pins_a>;
 };
 
 &timers12 {
+       /delete-property/dmas;
+       /delete-property/dma-names;
        status = "disabled";
        pwm {
                pinctrl-0 = <&pwm12_pins_a>;
index 8bf1c17f8cefb6b368c40c4376a7ad918c8fde10..f8bbfff5950b1941769d11dab3c1d884295e9103 100644 (file)
                };
        };
 
+       thermal-zones {
+               cpu_thermal: cpu-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <0>;
+                       thermal-sensors = <&dts>;
+
+                       trips {
+                               cpu_alert1: cpu-alert1 {
+                                       temperature = <85000>;
+                                       hysteresis = <0>;
+                                       type = "passive";
+                               };
+
+                               cpu-crit {
+                                       temperature = <120000>;
+                                       hysteresis = <0>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                       };
+               };
+       };
+
        soc {
                compatible = "simple-bus";
                #address-cells = <1>;
                        reg = <0x40000000 0x400>;
                        clocks = <&rcc TIM2_K>;
                        clock-names = "int";
+                       dmas = <&dmamux1 18 0x400 0x1>,
+                              <&dmamux1 19 0x400 0x1>,
+                              <&dmamux1 20 0x400 0x1>,
+                              <&dmamux1 21 0x400 0x1>,
+                              <&dmamux1 22 0x400 0x1>;
+                       dma-names = "ch1", "ch2", "ch3", "ch4", "up";
                        status = "disabled";
 
                        pwm {
                        reg = <0x40001000 0x400>;
                        clocks = <&rcc TIM3_K>;
                        clock-names = "int";
+                       dmas = <&dmamux1 23 0x400 0x1>,
+                              <&dmamux1 24 0x400 0x1>,
+                              <&dmamux1 25 0x400 0x1>,
+                              <&dmamux1 26 0x400 0x1>,
+                              <&dmamux1 27 0x400 0x1>,
+                              <&dmamux1 28 0x400 0x1>;
+                       dma-names = "ch1", "ch2", "ch3", "ch4", "up", "trig";
                        status = "disabled";
 
                        pwm {
                        reg = <0x40002000 0x400>;
                        clocks = <&rcc TIM4_K>;
                        clock-names = "int";
+                       dmas = <&dmamux1 29 0x400 0x1>,
+                              <&dmamux1 30 0x400 0x1>,
+                              <&dmamux1 31 0x400 0x1>,
+                              <&dmamux1 32 0x400 0x1>;
+                       dma-names = "ch1", "ch2", "ch3", "ch4";
                        status = "disabled";
 
                        pwm {
                        reg = <0x40003000 0x400>;
                        clocks = <&rcc TIM5_K>;
                        clock-names = "int";
+                       dmas = <&dmamux1 55 0x400 0x1>,
+                              <&dmamux1 56 0x400 0x1>,
+                              <&dmamux1 57 0x400 0x1>,
+                              <&dmamux1 58 0x400 0x1>,
+                              <&dmamux1 59 0x400 0x1>,
+                              <&dmamux1 60 0x400 0x1>;
+                       dma-names = "ch1", "ch2", "ch3", "ch4", "up", "trig";
                        status = "disabled";
 
                        pwm {
                        reg = <0x40004000 0x400>;
                        clocks = <&rcc TIM6_K>;
                        clock-names = "int";
+                       dmas = <&dmamux1 69 0x400 0x1>;
+                       dma-names = "up";
                        status = "disabled";
 
                        timer@5 {
                        reg = <0x40005000 0x400>;
                        clocks = <&rcc TIM7_K>;
                        clock-names = "int";
+                       dmas = <&dmamux1 70 0x400 0x1>;
+                       dma-names = "up";
                        status = "disabled";
 
                        timer@6 {
                        reg = <0x44000000 0x400>;
                        clocks = <&rcc TIM1_K>;
                        clock-names = "int";
+                       dmas = <&dmamux1 11 0x400 0x1>,
+                              <&dmamux1 12 0x400 0x1>,
+                              <&dmamux1 13 0x400 0x1>,
+                              <&dmamux1 14 0x400 0x1>,
+                              <&dmamux1 15 0x400 0x1>,
+                              <&dmamux1 16 0x400 0x1>,
+                              <&dmamux1 17 0x400 0x1>;
+                       dma-names = "ch1", "ch2", "ch3", "ch4",
+                                   "up", "trig", "com";
                        status = "disabled";
 
                        pwm {
                        reg = <0x44001000 0x400>;
                        clocks = <&rcc TIM8_K>;
                        clock-names = "int";
+                       dmas = <&dmamux1 47 0x400 0x1>,
+                              <&dmamux1 48 0x400 0x1>,
+                              <&dmamux1 49 0x400 0x1>,
+                              <&dmamux1 50 0x400 0x1>,
+                              <&dmamux1 51 0x400 0x1>,
+                              <&dmamux1 52 0x400 0x1>,
+                              <&dmamux1 53 0x400 0x1>;
+                       dma-names = "ch1", "ch2", "ch3", "ch4",
+                                   "up", "trig", "com";
                        status = "disabled";
 
                        pwm {
                        reg = <0x44006000 0x400>;
                        clocks = <&rcc TIM15_K>;
                        clock-names = "int";
+                       dmas = <&dmamux1 105 0x400 0x1>,
+                              <&dmamux1 106 0x400 0x1>,
+                              <&dmamux1 107 0x400 0x1>,
+                              <&dmamux1 108 0x400 0x1>;
+                       dma-names = "ch1", "up", "trig", "com";
                        status = "disabled";
 
                        pwm {
                        reg = <0x44007000 0x400>;
                        clocks = <&rcc TIM16_K>;
                        clock-names = "int";
+                       dmas = <&dmamux1 109 0x400 0x1>,
+                              <&dmamux1 110 0x400 0x1>;
+                       dma-names = "ch1", "up";
                        status = "disabled";
 
                        pwm {
                        reg = <0x44008000 0x400>;
                        clocks = <&rcc TIM17_K>;
                        clock-names = "int";
+                       dmas = <&dmamux1 111 0x400 0x1>,
+                              <&dmamux1 112 0x400 0x1>;
+                       dma-names = "ch1", "up";
                        status = "disabled";
 
                        pwm {
 
                m_can1: can@4400e000 {
                        compatible = "bosch,m_can";
-                       reg = <0x4400e000 0x400>, <0x44011000 0x2800>;
+                       reg = <0x4400e000 0x400>, <0x44011000 0x1400>;
                        reg-names = "m_can", "message_ram";
                        interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "int0", "int1";
                        clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
                        clock-names = "hclk", "cclk";
-                       bosch,mram-cfg = <0x0 0 0 32 0 0 2 2>;
+                       bosch,mram-cfg = <0x1400 0 0 32 0 0 2 2>;
                        status = "disabled";
                };
 
                        status = "disabled";
                };
 
+               dts: thermal@50028000 {
+                       compatible = "st,stm32-thermal";
+                       reg = <0x50028000 0x100>;
+                       interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&rcc TMPSENS>;
+                       clock-names = "pclk";
+                       #thermal-sensor-cells = <0>;
+                       status = "disabled";
+               };
+
                cryp1: cryp@54001000 {
                        compatible = "st,stm32mp1-cryp";
                        reg = <0x54001000 0x400>;