From e58cd453d58b20c6a6f34d3591640aa19aa14d25 Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Fri, 4 Feb 2022 15:57:50 +0200 Subject: at91: add kernel support for sama7g5 soc Add kernel support for SAMA7G5 by back-porting mainline kernel patches. Among SAMA7G5 features could be remembered: - ARM Cortex-A7 - double data rate multi-port dynamic RAM controller supporting DDR2, DDR3, DDR3L, LPDDR2, LPDDR3 up to 533MHz - peripherals for audio, video processing - 1 gigabit + 1 megabit Ethernet controllers - 6 CAN controllers - trust zone support - DVFS for CPU - criptography IPs Signed-off-by: Claudiu Beznea --- ...-media-atmel-atmel-isc-specialize-dma-cfg.patch | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 target/linux/at91/patches-5.10/161-media-atmel-atmel-isc-specialize-dma-cfg.patch (limited to 'target/linux/at91/patches-5.10/161-media-atmel-atmel-isc-specialize-dma-cfg.patch') diff --git a/target/linux/at91/patches-5.10/161-media-atmel-atmel-isc-specialize-dma-cfg.patch b/target/linux/at91/patches-5.10/161-media-atmel-atmel-isc-specialize-dma-cfg.patch new file mode 100644 index 0000000000..4b7a974e4f --- /dev/null +++ b/target/linux/at91/patches-5.10/161-media-atmel-atmel-isc-specialize-dma-cfg.patch @@ -0,0 +1,69 @@ +From c42305f52560a1be6fc25a2f23579c7b323de654 Mon Sep 17 00:00:00 2001 +From: Eugen Hristev +Date: Tue, 13 Apr 2021 12:57:03 +0200 +Subject: [PATCH 161/247] media: atmel: atmel-isc: specialize dma cfg + +The dma configuration (DCFG) is specific to the product. +Move this configuration in the product specific driver, and add the +field inside the driver struct. + +Signed-off-by: Eugen Hristev +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +--- + drivers/media/platform/atmel/atmel-isc-base.c | 3 +-- + drivers/media/platform/atmel/atmel-isc.h | 2 ++ + drivers/media/platform/atmel/atmel-sama5d2-isc.c | 3 +++ + 3 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c +index ed0048e79f3b..07ba439eb7e9 100644 +--- a/drivers/media/platform/atmel/atmel-isc-base.c ++++ b/drivers/media/platform/atmel/atmel-isc-base.c +@@ -724,8 +724,7 @@ static int isc_configure(struct isc_device *isc) + rlp_mode = isc->config.rlp_cfg_mode; + pipeline = isc->config.bits_pipeline; + +- dcfg = isc->config.dcfg_imode | +- ISC_DCFG_YMBSIZE_BEATS8 | ISC_DCFG_CMBSIZE_BEATS8; ++ dcfg = isc->config.dcfg_imode | isc->dcfg; + + pfe_cfg0 |= subdev->pfe_cfg0 | ISC_PFE_CFG0_MODE_PROGRESSIVE; + mask = ISC_PFE_CFG0_BPS_MASK | ISC_PFE_CFG0_HPOL_LOW | +diff --git a/drivers/media/platform/atmel/atmel-isc.h b/drivers/media/platform/atmel/atmel-isc.h +index f208fb691ac9..88ec4268de11 100644 +--- a/drivers/media/platform/atmel/atmel-isc.h ++++ b/drivers/media/platform/atmel/atmel-isc.h +@@ -149,6 +149,7 @@ struct isc_ctrls { + * @hclock: Hclock clock input (refer datasheet) + * @ispck: iscpck clock (refer datasheet) + * @isc_clks: ISC clocks ++ * @dcfg: DMA master configuration, architecture dependent + * + * @dev: Registered device driver + * @v4l2_dev: v4l2 registered device +@@ -196,6 +197,7 @@ struct isc_device { + struct clk *hclock; + struct clk *ispck; + struct isc_clk isc_clks[2]; ++ u32 dcfg; + + struct device *dev; + struct v4l2_device v4l2_dev; +diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c +index 39fc8d4f9bdc..12edeb07b618 100644 +--- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c ++++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c +@@ -219,6 +219,9 @@ static int atmel_isc_probe(struct platform_device *pdev) + isc->max_width = ISC_SAMA5D2_MAX_SUPPORT_WIDTH; + isc->max_height = ISC_SAMA5D2_MAX_SUPPORT_HEIGHT; + ++ /* sama5d2-isc - 8 bits per beat */ ++ isc->dcfg = ISC_DCFG_YMBSIZE_BEATS8 | ISC_DCFG_CMBSIZE_BEATS8; ++ + ret = isc_pipeline_init(isc); + if (ret) + return ret; +-- +2.32.0 + -- cgit v1.2.3