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

dmaengine: sun6i: Add support for Allwinner H3 (sun8i) variant

The H3 SoC has the same dma engine as the A31 (sun6i), with a
reduced amount of endpoints and physical channels. Add the proper
config data and compatible string to support it.

Signed-off-by: Jens Kuske <jenskuske@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

authored by

Jens Kuske and committed by
Vinod Koul
f008db8c 385f83f8

+16 -1
+4 -1
Documentation/devicetree/bindings/dma/sun6i-dma.txt
··· 4 4 5 5 Required properties: 6 6 7 - - compatible: Must be "allwinner,sun6i-a31-dma" or "allwinner,sun8i-a23-dma" 7 + - compatible: Must be one of 8 + "allwinner,sun6i-a31-dma" 9 + "allwinner,sun8i-a23-dma" 10 + "allwinner,sun8i-h3-dma" 8 11 - reg: Should contain the registers base address and length 9 12 - interrupts: Should contain a reference to the interrupt used by this device 10 13 - clocks: Should contain a reference to the parent AHB clock
+12
drivers/dma/sun6i-dma.c
··· 891 891 .nr_max_vchans = 37, 892 892 }; 893 893 894 + /* 895 + * The H3 has 12 physical channels, a maximum DRQ port id of 27, 896 + * and a total of 34 usable source and destination endpoints. 897 + */ 898 + 899 + static struct sun6i_dma_config sun8i_h3_dma_cfg = { 900 + .nr_max_channels = 12, 901 + .nr_max_requests = 27, 902 + .nr_max_vchans = 34, 903 + }; 904 + 894 905 static const struct of_device_id sun6i_dma_match[] = { 895 906 { .compatible = "allwinner,sun6i-a31-dma", .data = &sun6i_a31_dma_cfg }, 896 907 { .compatible = "allwinner,sun8i-a23-dma", .data = &sun8i_a23_dma_cfg }, 908 + { .compatible = "allwinner,sun8i-h3-dma", .data = &sun8i_h3_dma_cfg }, 897 909 { /* sentinel */ } 898 910 }; 899 911