Skip to content

soc: sunxi: sram: Add H616 SRAM support

Chen-Yu Tsai linux-arm-kernel linux-devicetree linux-sunxi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7dt-bindings: sram: Document Allwinner H616 VE SRAMDocumentation/devicetree/bindings/sram/sram.yaml+1 -02 replies
2/7dt-bindings: sram: sunxi-sram: Add H616 SRAM regionsDocumentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml+4 -12 replies
3/7soc: sunxi: sram: Const-ify sunxi_sram_func data and referencesdrivers/soc/sunxi/sunxi_sram.c+8 -81 reply
4/7soc: sunxi: sram: Allow SRAM to be claimed multiple timesdrivers/soc/sunxi/sunxi_sram.c+9 -51 reply
5/7soc: sunxi: sram: Support claiming multiple regions per devicedrivers/soc/sunxi/sunxi_sram.c+96 -681 reply
6/7soc: sunxi: sram: Add H616 SRAM regionsdrivers/soc/sunxi/sunxi_sram.c+10 -01 reply
7/7arm64: dts: allwinner: sun50i-h616: Add SRAM nodesarch/arm64/boot/dts/allwinner/sun50i-h616.dtsi+27 -11 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchJernej SkrabecRob Herring (Arm)
1/7A-b A-b
2/7A-b A-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] soc: sunxi: sram: Add H616 SRAM support

Hi,

The Allwinner H616 has two switchable peripheral SRAM regions:

- The VE SRAM is a 2 MB dedicated SRAM for the Video Engine. CPU access to this region is enabled by default. CPU access can be disabled, after which reads will show the same stale value for all addresses, while writes are ignored.

The mux value for this region is different from previous generations.

- The SRAM C region is an alias of the first 128 KB of VE SRAM, plus 64 KB of DE SRAM. The latter is otherwise unaccessible from the CPU. When CPU access is disabled, the whole region reads as zero, while writes are ignored.

The mux value for this region is the same as on the A64 and H6.

The driver needs to allow both the Video Engine and Display Engine to claim the SRAM C region at the same time.

At the same time, since the Video Engine needs to claim both SRAM regions, the Allwinner SRAM consumer interface needs to support claiming multiple regions for one consumer.

Patch 1 adds a compatible for the new H616 VE SRAM to the common SRAM binding.

Patch 2 adds a compatible for the new H616 VE SRAM to the Allwinner SRAM binding.

Patch 3 is a minor cleanup that const-ifies the SRAM related hardware description data in the driver.

Patch 4 implements support for multiple hardware block drivers to claim the same SRAM region.

Patch 5 implements support for one consumer to claim multiple SRAM regions.

Patch 6 adds support for the H616 VE SRAM region to the SRAM driver.

Patch 7 adds the SRAM regions to the H616 dtsi file. This was picked from Jernej's tree and split into one patch for SRAM and one patch for the video engine.

I think all the changes can go through the sunxi tree, unless the device tree maintainers want to take the first patch separately?

The new users of this, support for the H616 video engine, will be sent separately.

Thanks
ChenYu

Chen-Yu Tsai (6):
dt-bindings: sram: Document Allwinner H616 VE SRAM
dt-bindings: sram: sunxi-sram: Add H616 SRAM regions
soc: sunxi: sram: Const-ify sunxi_sram_func data and references
soc: sunxi: sram: Allow SRAM to be claimed multiple times
soc: sunxi: sram: Support claiming multiple regions per device
soc: sunxi: sram: Add H616 SRAM regions

Jernej Skrabec (1):
arm64: dts: allwinner: sun50i-h616: Add SRAM nodes

 .../allwinner,sun4i-a10-system-control.yaml   |   5 +-
 .../devicetree/bindings/sram/sram.yaml        |   1 +
 .../arm64/boot/dts/allwinner/sun50i-h616.dtsi |  28 ++-
 drivers/soc/sunxi/sunxi_sram.c                | 196 +++++++++++-------
 4 files changed, 151 insertions(+), 79 deletions(-)
Signature · 1 line
2.47.3