Unverified Commit 9f1fe339 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'sunxi-dt-for-6.1-1' of...

Merge tag 'sunxi-dt-for-6.1-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt

- Allwinner A100 DMA node
- Allwinner H6 GPU devfreq scaling
- sunxi sram bindings cleanup and D1 addition

* tag 'sunxi-dt-for-6.1-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  dt-bindings: sram: sunxi-sram: Add D1 compatible string
  dt-bindings: sram: sunxi-sram: Clean up the compatible lists
  arm64: dts: allwinner: beelink-gs1: Enable GPU OPP
  arm64: dts: allwinner: h6: Add GPU OPP table
  arm64: dts: allwinner: h6: Add cooling map for GPU
  arm64: dts: allwinner: a100: Add I2C DMA requests
  arm64: dts: allwinner: a100: Add device node for DMA controller

Link: https://lore.kernel.org/r/YyePKDnOeP8Tdt5n@kista.localdomain


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents b805cc89 35bd7993
Loading
Loading
Loading
Loading
+32 −50
Original line number Diff line number Diff line
@@ -24,32 +24,31 @@ properties:

  compatible:
    oneOf:
      - const: allwinner,sun4i-a10-sram-controller
      - enum:
          - allwinner,sun4i-a10-sram-controller
          - allwinner,sun50i-a64-sram-controller
        deprecated: true
      - enum:
          - allwinner,sun4i-a10-system-control
          - allwinner,sun5i-a13-system-control
          - allwinner,sun8i-a23-system-control
          - allwinner,sun8i-h3-system-control
          - allwinner,sun20i-d1-system-control
          - allwinner,sun50i-a64-system-control
          - allwinner,sun50i-h5-system-control
          - allwinner,sun50i-h616-system-control
      - items:
          - enum:
              - allwinner,suniv-f1c100s-system-control
              - allwinner,sun7i-a20-system-control
              - allwinner,sun8i-r40-system-control
          - const: allwinner,sun4i-a10-system-control
      - const: allwinner,sun5i-a13-system-control
      - items:
          - const: allwinner,sun7i-a20-system-control
          - const: allwinner,sun4i-a10-system-control
      - const: allwinner,sun8i-a23-system-control
      - const: allwinner,sun8i-h3-system-control
      - items:
          - const: allwinner,sun8i-v3s-system-control
          - const: allwinner,sun8i-h3-system-control
      - items:
          - const: allwinner,sun8i-r40-system-control
          - const: allwinner,sun4i-a10-system-control
      - const: allwinner,sun50i-a64-sram-controller
        deprecated: true
      - const: allwinner,sun50i-a64-system-control
      - const: allwinner,sun50i-h5-system-control
      - items:
          - const: allwinner,sun50i-h6-system-control
          - const: allwinner,sun50i-a64-system-control
      - items:
          - const: allwinner,suniv-f1c100s-system-control
          - const: allwinner,sun4i-a10-system-control
      - const: allwinner,sun50i-h616-system-control

  reg:
    maxItems: 1
@@ -76,43 +75,26 @@ patternProperties:
              - const: allwinner,sun4i-a10-sram-d
              - const: allwinner,sun50i-a64-sram-c
              - items:
                  - const: allwinner,sun5i-a13-sram-a3-a4
                  - const: allwinner,sun4i-a10-sram-a3-a4
              - items:
                  - const: allwinner,sun7i-a20-sram-a3-a4
                  - enum:
                      - allwinner,sun5i-a13-sram-a3-a4
                      - allwinner,sun7i-a20-sram-a3-a4
                  - const: allwinner,sun4i-a10-sram-a3-a4
              - items:
                  - const: allwinner,sun5i-a13-sram-c1
                  - const: allwinner,sun4i-a10-sram-c1
              - items:
                  - const: allwinner,sun7i-a20-sram-c1
                  - const: allwinner,sun4i-a10-sram-c1
              - items:
                  - const: allwinner,sun8i-a23-sram-c1
                  - enum:
                      - allwinner,sun5i-a13-sram-c1
                      - allwinner,sun7i-a20-sram-c1
                      - allwinner,sun8i-a23-sram-c1
                      - allwinner,sun8i-h3-sram-c1
                      - allwinner,sun8i-r40-sram-c1
                      - allwinner,sun50i-a64-sram-c1
                      - allwinner,sun50i-h5-sram-c1
                      - allwinner,sun50i-h6-sram-c1
                  - const: allwinner,sun4i-a10-sram-c1
              - items:
                  - const: allwinner,sun8i-h3-sram-c1
                  - const: allwinner,sun4i-a10-sram-c1
              - items:
                  - const: allwinner,sun8i-r40-sram-c1
                  - const: allwinner,sun4i-a10-sram-c1
              - items:
                  - const: allwinner,sun50i-a64-sram-c1
                  - const: allwinner,sun4i-a10-sram-c1
              - items:
                  - const: allwinner,sun50i-h5-sram-c1
                  - const: allwinner,sun4i-a10-sram-c1
              - items:
                  - const: allwinner,sun50i-h6-sram-c1
                  - const: allwinner,sun4i-a10-sram-c1
              - items:
                  - const: allwinner,sun5i-a13-sram-d
                  - const: allwinner,sun4i-a10-sram-d
              - items:
                  - const: allwinner,sun7i-a20-sram-d
                  - const: allwinner,sun4i-a10-sram-d
              - items:
                  - const: allwinner,suniv-f1c100s-sram-d
                  - enum:
                      - allwinner,suniv-f1c100s-sram-d
                      - allwinner,sun5i-a13-sram-d
                      - allwinner,sun7i-a20-sram-d
                  - const: allwinner,sun4i-a10-sram-d
              - items:
                  - const: allwinner,sun50i-h6-sram-c
+24 −0
Original line number Diff line number Diff line
@@ -101,6 +101,18 @@ ccu: clock@3001000 {
			#reset-cells = <1>;
		};

		dma: dma-controller@3002000 {
			compatible = "allwinner,sun50i-a100-dma";
			reg = <0x03002000 0x1000>;
			interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&ccu CLK_BUS_DMA>, <&ccu CLK_MBUS_DMA>;
			clock-names = "bus", "mbus";
			resets = <&ccu RST_BUS_DMA>;
			dma-channels = <8>;
			dma-requests = <52>;
			#dma-cells = <1>;
		};

		gic: interrupt-controller@3021000 {
			compatible = "arm,gic-400";
			reg = <0x03021000 0x1000>, <0x03022000 0x2000>,
@@ -209,6 +221,8 @@ i2c0: i2c@5002000 {
			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&ccu CLK_BUS_I2C0>;
			resets = <&ccu RST_BUS_I2C0>;
			dmas = <&dma 43>, <&dma 43>;
			dma-names = "rx", "tx";
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
@@ -222,6 +236,8 @@ i2c1: i2c@5002400 {
			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&ccu CLK_BUS_I2C1>;
			resets = <&ccu RST_BUS_I2C1>;
			dmas = <&dma 44>, <&dma 44>;
			dma-names = "rx", "tx";
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
@@ -235,6 +251,8 @@ i2c2: i2c@5002800 {
			interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&ccu CLK_BUS_I2C2>;
			resets = <&ccu RST_BUS_I2C2>;
			dmas = <&dma 45>, <&dma 45>;
			dma-names = "rx", "tx";
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
@@ -248,6 +266,8 @@ i2c3: i2c@5002c00 {
			interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&ccu CLK_BUS_I2C3>;
			resets = <&ccu RST_BUS_I2C3>;
			dmas = <&dma 46>, <&dma 46>;
			dma-names = "rx", "tx";
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
@@ -325,6 +345,8 @@ r_i2c0: i2c@7081400 {
			interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&r_ccu CLK_R_APB2_I2C0>;
			resets = <&r_ccu RST_R_APB2_I2C0>;
			dmas = <&dma 50>, <&dma 50>;
			dma-names = "rx", "tx";
			pinctrl-names = "default";
			pinctrl-0 = <&r_i2c0_pins>;
			status = "disabled";
@@ -340,6 +362,8 @@ r_i2c1: i2c@7081800 {
			interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&r_ccu CLK_R_APB2_I2C1>;
			resets = <&r_ccu RST_R_APB2_I2C1>;
			dmas = <&dma 51>, <&dma 51>;
			dma-names = "rx", "tx";
			pinctrl-names = "default";
			pinctrl-0 = <&r_i2c1_pins>;
			status = "disabled";
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@

#include "sun50i-h6.dtsi"
#include "sun50i-h6-cpu-opp.dtsi"
#include "sun50i-h6-gpu-opp.dtsi"

#include <dt-bindings/gpio/gpio.h>

+87 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2022 Clément Péron <peron.clem@gmail.com>

/ {
	gpu_opp_table: opp-table-gpu {
		compatible = "operating-points-v2";

		opp-216000000 {
			opp-hz = /bits/ 64 <216000000>;
			opp-microvolt = <810000 810000 1200000>;
		};

		opp-264000000 {
			opp-hz = /bits/ 64 <264000000>;
			opp-microvolt = <810000 810000 1200000>;
		};

		opp-312000000 {
			opp-hz = /bits/ 64 <312000000>;
			opp-microvolt = <810000 810000 1200000>;
		};

		opp-336000000 {
			opp-hz = /bits/ 64 <336000000>;
			opp-microvolt = <810000 810000 1200000>;
		};

		opp-360000000 {
			opp-hz = /bits/ 64 <360000000>;
			opp-microvolt = <820000 820000 1200000>;
		};

		opp-384000000 {
			opp-hz = /bits/ 64 <384000000>;
			opp-microvolt = <830000 830000 1200000>;
		};

		opp-408000000 {
			opp-hz = /bits/ 64 <408000000>;
			opp-microvolt = <840000 840000 1200000>;
		};

		opp-420000000 {
			opp-hz = /bits/ 64 <420000000>;
			opp-microvolt = <850000 850000 1200000>;
		};

		opp-432000000 {
			opp-hz = /bits/ 64 <432000000>;
			opp-microvolt = <860000 860000 1200000>;
		};

		opp-456000000 {
			opp-hz = /bits/ 64 <456000000>;
			opp-microvolt = <870000 870000 1200000>;
		};

		opp-504000000 {
			opp-hz = /bits/ 64 <504000000>;
			opp-microvolt = <890000 890000 1200000>;
		};

		opp-540000000 {
			opp-hz = /bits/ 64 <540000000>;
			opp-microvolt = <910000 910000 1200000>;
		};

		opp-576000000 {
			opp-hz = /bits/ 64 <576000000>;
			opp-microvolt = <930000 930000 1200000>;
		};

		opp-624000000 {
			opp-hz = /bits/ 64 <624000000>;
			opp-microvolt = <950000 950000 1200000>;
		};

		opp-756000000 {
			opp-hz = /bits/ 64 <756000000>;
			opp-microvolt = <1040000 1040000 1200000>;
		};
	};
};

&gpu {
	operating-points-v2 = <&gpu_opp_table>;
};
+49 −2
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@ gpu: gpu@1800000 {
			clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
			clock-names = "core", "bus";
			resets = <&ccu RST_BUS_GPU>;
			#cooling-cells = <2>;
			status = "disabled";
		};

@@ -1072,9 +1073,55 @@ map0 {
		};

		gpu-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			polling-delay-passive = <1000>;
			polling-delay = <2000>;
			thermal-sensors = <&ths 1>;

			trips {
				gpu_alert0: gpu-alert-0 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				gpu_alert1: gpu-alert-1 {
					temperature = <100000>;
					hysteresis = <2000>;
					type = "passive";
				};

				gpu_alert2: gpu-alert-2 {
					temperature = <105000>;
					hysteresis = <2000>;
					type = "passive";
				};

				gpu-crit {
					temperature = <115000>;
					hysteresis = <0>;
					type = "critical";
				};
			};

			cooling-maps {
				// Forbid the GPU to go over 756MHz
				map0 {
					trip = <&gpu_alert0>;
					cooling-device = <&gpu 1 THERMAL_NO_LIMIT>;
				};

				// Forbid the GPU to go over 624MHz
				map1 {
					trip = <&gpu_alert1>;
					cooling-device = <&gpu 2 THERMAL_NO_LIMIT>;
				};

				// Forbid the GPU to go over 576MHz
				map2 {
					trip = <&gpu_alert2>;
					cooling-device = <&gpu 3 THERMAL_NO_LIMIT>;
				};
			};
		};
	};
};