mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 06:31:52 +00:00
Samsung SoC driver changes for v6.5
1. Re-introduce Exynos4212: Exynos PMU driver. 2. Convert S5P/Exynos Multi Format Codec bindings to DT schema. -----BEGIN PGP SIGNATURE----- iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmR5rv4QHGtyemtAa2Vy bmVsLm9yZwAKCRDBN2bmhouD17lDD/0dggtqvNs2KP39cjZjQqmMSHQMysarqNh3 ALvEjhSaBmpnf+/JLj6g3rHHyrBakE551YxdP1m/4nTaR8LahXF5zugBC1GMzLu+ IwEKi8BGKBJvuKGfEWWICCkHywdOPWA41+L/mxDn4Yf4YQXZFMLm0+uYf6nHR29F BDxHJpsZipGUGFSFE2lMHJ5aTzziYUjMhQa/PrRCSznPKCd3ckJ4FaexSUq2IsF/ W6Zf8TkytEvI3ZP7s/1ibk6xTBJG6Puegt2NDTA5HKlJgYf9RfJNXuQ+rTCZ4vO5 20uD947AjyQxXVgI7v0saCZo07m+MJQI3SekljpiGDuZ5mskLvAjEN9yq5uA8Gie bQ4D/i0eza7ARQ/S7HlBV+7I/hlT1goyZ9Qbt1AQhnqDCAeNqGvBhAs37xDgPFbV n8GE+qpB5FdRSUcTcigRGU1TPBiAifoONBfwhAgBMYKwMFaaQlmlRfnDnO3SmmpH yEeI6m+1Q7BtKs/8c2WCroxaLN7z5zMUC1UOeJxHuViHr05W59qEAd23xZvM463W tl20wm2JaUEGHLBr1ZqBLNonecIDlQFa940RJ2RQtl7vf70QEF2/dYbKm647I9PS znOTyg42ZWhsnCFAyZjVvN2SGrJ4oLf3CEPJ69TXQ4bp5Fxe6mZbKN1sTqst4Hjd uSMQEC1WeQ== =upWz -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmSDHzgACgkQYKtH/8kJ Uifjow/+LcVxk1/FGFv5GS6LEvVKjUoRrHjJK/q+5RQnjzEpOgVlln6YzGxUNLgU zRudzHhE+TRHi/jVDfBDXGY771PNA95qk6S0Ux18GYrROFj+hfgLNzU2fXBrPIda z4q/p4lGMxeEBnn4qsAygFAkRoyvTI16h9tW7BAkE9acSBO5Ba/PfcEKwWIqrXZ1 M5TneYRMitqIMZ2j45vLv53vu7hzt8H8AIBKfINtV7EjZeU0QSOBhY5bczTOgGqr XPo5PFpoVWEZPoDyIiAtTNLtSKtbNZbzifxiRrYJG5dSRFG4N6cCukI1JQnjJ1e3 HPbgk0Af5clSIr9ZigwHfONGuPKuTv5gtPUQ08Q3C7hJtKIzhLPAq/kL0IRza1vR kykXP7KEW45vskTvKRWKNHsVVvEvXBd2X0G/a4lfknQkIVEo7eDpcp17iKs5cmLT x5oRVr1i3CLjvbPybE12SG8okvNvo8IQU1iam91fp2CmR41KBqybNtbEbZ81KNWH tfn/g/Z3b935zWD8O6u2kFdtJj4rnHONMGK/TJGMtlSzPYeIJcrjEwXxOl6zOVOs WGwTtcLRzPLShMFA1OVn55hj+obBrkYiiIKVN2UYLUBTDxnc9YJU75hPXIH6Mx5T 4Mp9ru/A88YtZqlw0yz71qRrx/3IzBPGGaiEX+ZO97qD0C3b6Co= =joPI -----END PGP SIGNATURE----- Merge tag 'samsung-drivers-6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers Samsung SoC driver changes for v6.5 1. Re-introduce Exynos4212: Exynos PMU driver. 2. Convert S5P/Exynos Multi Format Codec bindings to DT schema. * tag 'samsung-drivers-6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: media: s5p-mfc: convert bindings to json-schema soc: samsung: exynos-pmu: Re-introduce Exynos4212 support dt-bindings: soc: samsung: exynos-pmu: add Exynos4212 compatible Link: https://lore.kernel.org/r/20230602091501.15178-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
acaa52bc09
@ -1,78 +0,0 @@
|
||||
* Samsung Multi Format Codec (MFC)
|
||||
|
||||
Multi Format Codec (MFC) is the IP present in Samsung SoCs which
|
||||
supports high resolution decoding and encoding functionalities.
|
||||
The MFC device driver is a v4l2 driver which can encode/decode
|
||||
video raw/elementary streams and has support for all popular
|
||||
video codecs.
|
||||
|
||||
Required properties:
|
||||
- compatible : value should be either one among the following
|
||||
(a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs
|
||||
(b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs
|
||||
(c) "samsung,exynos3250-mfc", "samsung,mfc-v7" for MFC v7
|
||||
present in Exynos3250 SoC
|
||||
(d) "samsung,mfc-v7" for MFC v7 present in Exynos5420 SoC
|
||||
(e) "samsung,mfc-v8" for MFC v8 present in Exynos5800 SoC
|
||||
(f) "samsung,exynos5433-mfc" for MFC v8 present in Exynos5433 SoC
|
||||
(g) "samsung,mfc-v10" for MFC v10 present in Exynos7880 SoC
|
||||
|
||||
- reg : Physical base address of the IP registers and length of memory
|
||||
mapped region.
|
||||
|
||||
- interrupts : MFC interrupt number to the CPU.
|
||||
- clocks : from common clock binding: handle to mfc clock.
|
||||
- clock-names : from common clock binding: must contain "mfc",
|
||||
corresponding to entry in the clocks property.
|
||||
|
||||
Optional properties:
|
||||
- power-domains : power-domain property defined with a phandle
|
||||
to respective power domain.
|
||||
- memory-region : from reserved memory binding: phandles to two reserved
|
||||
memory regions, first is for "left" mfc memory bus interfaces,
|
||||
second if for the "right" mfc memory bus, used when no SYSMMU
|
||||
support is available; used only by MFC v5 present in Exynos4 SoCs
|
||||
|
||||
Obsolete properties:
|
||||
- samsung,mfc-r, samsung,mfc-l : support removed, please use memory-region
|
||||
property instead
|
||||
|
||||
|
||||
Example:
|
||||
SoC specific DT entry:
|
||||
|
||||
mfc: codec@13400000 {
|
||||
compatible = "samsung,mfc-v5";
|
||||
reg = <0x13400000 0x10000>;
|
||||
interrupts = <0 94 0>;
|
||||
power-domains = <&pd_mfc>;
|
||||
clocks = <&clock 273>;
|
||||
clock-names = "mfc";
|
||||
};
|
||||
|
||||
Reserved memory specific DT entry for given board (see reserved memory binding
|
||||
for more information):
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
mfc_left: region@51000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x51000000 0x800000>;
|
||||
};
|
||||
|
||||
mfc_right: region@43000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x43000000 0x800000>;
|
||||
};
|
||||
};
|
||||
|
||||
Board specific DT entry:
|
||||
|
||||
codec@13400000 {
|
||||
memory-region = <&mfc_left>, <&mfc_right>;
|
||||
};
|
184
Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml
Normal file
184
Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml
Normal file
@ -0,0 +1,184 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/media/samsung,s5p-mfc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Samsung Exynos Multi Format Codec (MFC)
|
||||
|
||||
maintainers:
|
||||
- Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
- Aakarsh Jain <aakarsh.jain@samsung.com>
|
||||
|
||||
description:
|
||||
Multi Format Codec (MFC) is the IP present in Samsung SoCs which
|
||||
supports high resolution decoding and encoding functionalities.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- enum:
|
||||
- samsung,exynos5433-mfc # Exynos5433
|
||||
- samsung,mfc-v5 # Exynos4
|
||||
- samsung,mfc-v6 # Exynos5
|
||||
- samsung,mfc-v7 # Exynos5420
|
||||
- samsung,mfc-v8 # Exynos5800
|
||||
- samsung,mfc-v10 # Exynos7880
|
||||
- items:
|
||||
- enum:
|
||||
- samsung,exynos3250-mfc # Exynos3250
|
||||
- const: samsung,mfc-v7 # Fall back for Exynos3250
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
|
||||
clock-names:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
iommus:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
iommu-names:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
memory-region:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- interrupts
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- samsung,exynos3250-mfc
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 2
|
||||
clock-names:
|
||||
items:
|
||||
- const: mfc
|
||||
- const: sclk_mfc
|
||||
iommus:
|
||||
maxItems: 1
|
||||
iommus-names: false
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- samsung,exynos5433-mfc
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 3
|
||||
clock-names:
|
||||
items:
|
||||
- const: pclk
|
||||
- const: aclk
|
||||
- const: aclk_xiu
|
||||
iommus:
|
||||
maxItems: 2
|
||||
iommus-names:
|
||||
items:
|
||||
- const: left
|
||||
- const: right
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- samsung,mfc-v5
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 2
|
||||
clock-names:
|
||||
items:
|
||||
- const: mfc
|
||||
- const: sclk_mfc
|
||||
iommus:
|
||||
maxItems: 2
|
||||
iommus-names:
|
||||
items:
|
||||
- const: left
|
||||
- const: right
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- samsung,mfc-v6
|
||||
- samsung,mfc-v8
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 1
|
||||
clock-names:
|
||||
items:
|
||||
- const: mfc
|
||||
iommus:
|
||||
maxItems: 2
|
||||
iommus-names:
|
||||
items:
|
||||
- const: left
|
||||
- const: right
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- samsung,mfc-v7
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
iommus:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/exynos4.h>
|
||||
#include <dt-bindings/clock/exynos-audss-clk.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
codec@13400000 {
|
||||
compatible = "samsung,mfc-v5";
|
||||
reg = <0x13400000 0x10000>;
|
||||
interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
|
||||
power-domains = <&pd_mfc>;
|
||||
clocks = <&clock CLK_MFC>, <&clock CLK_SCLK_MFC>;
|
||||
clock-names = "mfc", "sclk_mfc";
|
||||
iommus = <&sysmmu_mfc_l>, <&sysmmu_mfc_r>;
|
||||
iommu-names = "left", "right";
|
||||
};
|
@ -17,6 +17,7 @@ select:
|
||||
enum:
|
||||
- samsung,exynos3250-pmu
|
||||
- samsung,exynos4210-pmu
|
||||
- samsung,exynos4212-pmu
|
||||
- samsung,exynos4412-pmu
|
||||
- samsung,exynos5250-pmu
|
||||
- samsung,exynos5260-pmu
|
||||
@ -36,6 +37,7 @@ properties:
|
||||
- enum:
|
||||
- samsung,exynos3250-pmu
|
||||
- samsung,exynos4210-pmu
|
||||
- samsung,exynos4212-pmu
|
||||
- samsung,exynos4412-pmu
|
||||
- samsung,exynos5250-pmu
|
||||
- samsung,exynos5260-pmu
|
||||
@ -50,6 +52,7 @@ properties:
|
||||
- enum:
|
||||
- samsung,exynos3250-pmu
|
||||
- samsung,exynos4210-pmu
|
||||
- samsung,exynos4212-pmu
|
||||
- samsung,exynos4412-pmu
|
||||
- samsung,exynos5250-pmu
|
||||
- samsung,exynos5420-pmu
|
||||
@ -125,6 +128,7 @@ allOf:
|
||||
enum:
|
||||
- samsung,exynos3250-pmu
|
||||
- samsung,exynos4210-pmu
|
||||
- samsung,exynos4212-pmu
|
||||
- samsung,exynos4412-pmu
|
||||
- samsung,exynos5250-pmu
|
||||
- samsung,exynos5410-pmu
|
||||
@ -143,6 +147,7 @@ allOf:
|
||||
enum:
|
||||
- samsung,exynos3250-pmu
|
||||
- samsung,exynos4210-pmu
|
||||
- samsung,exynos4212-pmu
|
||||
- samsung,exynos4412-pmu
|
||||
- samsung,exynos5250-pmu
|
||||
- samsung,exynos5420-pmu
|
||||
|
@ -57,6 +57,12 @@ void exynos_sys_powerdown_conf(enum sys_powerdown mode)
|
||||
|
||||
if (pmu_data->powerdown_conf_extra)
|
||||
pmu_data->powerdown_conf_extra(mode);
|
||||
|
||||
if (pmu_data->pmu_config_extra) {
|
||||
for (i = 0; pmu_data->pmu_config_extra[i].offset != PMU_TABLE_END; i++)
|
||||
pmu_raw_writel(pmu_data->pmu_config_extra[i].val[mode],
|
||||
pmu_data->pmu_config_extra[i].offset);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -79,6 +85,9 @@ static const struct of_device_id exynos_pmu_of_device_ids[] = {
|
||||
}, {
|
||||
.compatible = "samsung,exynos4210-pmu",
|
||||
.data = exynos_pmu_data_arm_ptr(exynos4210_pmu_data),
|
||||
}, {
|
||||
.compatible = "samsung,exynos4212-pmu",
|
||||
.data = exynos_pmu_data_arm_ptr(exynos4212_pmu_data),
|
||||
}, {
|
||||
.compatible = "samsung,exynos4412-pmu",
|
||||
.data = exynos_pmu_data_arm_ptr(exynos4412_pmu_data),
|
||||
|
@ -20,6 +20,7 @@ struct exynos_pmu_conf {
|
||||
|
||||
struct exynos_pmu_data {
|
||||
const struct exynos_pmu_conf *pmu_config;
|
||||
const struct exynos_pmu_conf *pmu_config_extra;
|
||||
|
||||
void (*pmu_init)(void);
|
||||
void (*powerdown_conf)(enum sys_powerdown);
|
||||
@ -32,6 +33,7 @@ extern void __iomem *pmu_base_addr;
|
||||
/* list of all exported SoC specific data */
|
||||
extern const struct exynos_pmu_data exynos3250_pmu_data;
|
||||
extern const struct exynos_pmu_data exynos4210_pmu_data;
|
||||
extern const struct exynos_pmu_data exynos4212_pmu_data;
|
||||
extern const struct exynos_pmu_data exynos4412_pmu_data;
|
||||
extern const struct exynos_pmu_data exynos5250_pmu_data;
|
||||
extern const struct exynos_pmu_data exynos5420_pmu_data;
|
||||
|
@ -86,7 +86,7 @@ static const struct exynos_pmu_conf exynos4210_pmu_config[] = {
|
||||
{ PMU_TABLE_END,},
|
||||
};
|
||||
|
||||
static const struct exynos_pmu_conf exynos4412_pmu_config[] = {
|
||||
static const struct exynos_pmu_conf exynos4x12_pmu_config[] = {
|
||||
{ S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } },
|
||||
{ S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } },
|
||||
{ S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } },
|
||||
@ -191,6 +191,10 @@ static const struct exynos_pmu_conf exynos4412_pmu_config[] = {
|
||||
{ S5P_GPS_ALIVE_LOWPWR, { 0x7, 0x0, 0x0 } },
|
||||
{ S5P_CMU_SYSCLK_ISP_LOWPWR, { 0x1, 0x0, 0x0 } },
|
||||
{ S5P_CMU_SYSCLK_GPS_LOWPWR, { 0x1, 0x0, 0x0 } },
|
||||
{ PMU_TABLE_END,},
|
||||
};
|
||||
|
||||
static const struct exynos_pmu_conf exynos4412_pmu_config[] = {
|
||||
{ S5P_ARM_CORE2_LOWPWR, { 0x0, 0x0, 0x2 } },
|
||||
{ S5P_DIS_IRQ_CORE2, { 0x0, 0x0, 0x0 } },
|
||||
{ S5P_DIS_IRQ_CENTRAL2, { 0x0, 0x0, 0x0 } },
|
||||
@ -204,6 +208,11 @@ const struct exynos_pmu_data exynos4210_pmu_data = {
|
||||
.pmu_config = exynos4210_pmu_config,
|
||||
};
|
||||
|
||||
const struct exynos_pmu_data exynos4412_pmu_data = {
|
||||
.pmu_config = exynos4412_pmu_config,
|
||||
const struct exynos_pmu_data exynos4212_pmu_data = {
|
||||
.pmu_config = exynos4x12_pmu_config,
|
||||
};
|
||||
|
||||
const struct exynos_pmu_data exynos4412_pmu_data = {
|
||||
.pmu_config = exynos4x12_pmu_config,
|
||||
.pmu_config_extra = exynos4412_pmu_config,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user