Samsung SoC driver changes for v6.3

Deprecate syscon phandle to the PMU node in MIPI and DP video phy
 drivers in favor of putting the device nodes directly under the PMU
 nodes.  This better reflects device hierarchy and allows later to solve
 dtc W=1 and dtbs_check warnings.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmPfwOcQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1yfLD/9DixN3LccEFID5s8iOdaLey35D+ue+H98y
 xcT35Sta4+OKqryaxnwLbIKj9Td+X42lZHxr52zzS4qHas/Nwu8hWilrxHfMnjyi
 0+8eIhHMkc9C3i9UAss7vvZDwwtHJg5+B5g15sAZq5MCN0WnkbGGYxvgskQqydn6
 5uWFbb9OExOzO3TStC/hIK/Uz9v9r75V20YDbw4FPzBBpR9cGvtYc1FEDPycITUH
 zjh1Q+f2NNWoVSIYU5nj8ZRQpjiyvS54WZwNjrLIH/HpfrLCq8RccFj9ucZwImp7
 ze5bJ4p4IzdGxPqUvYwDPqVYlI11hppjk1KdcM+eMZWyQq5tjTRHFjAuWyrk1OEy
 DmltxOsRPIQ3hW4IjGOkq5oZdQ0FtGVpV/9firk4zOMdCwedx33DDFBUUHsimDDh
 t7uHe1CNF22HIU7+q5/ze6A3rksfHwVb1Yw5XXPPWXEzHjz8g/A0Otw3b4zpb7p0
 GKApDW17raNVym8I6cCPXTuND9XOQJqoRpNu2tQTfEo4p2a/3otW4ZtycFdoXGNs
 suzr6n+4R6lohU9ROdE6rRo1YMmGGvg4v9WZYjwtktXDtSb9JwvBvkWpGC2cHPYz
 /XKwMMyxqvP0edRBw4JozTRA98ThV5Jgf0sW5sPRCk7D7yWlWVJJTda0V7V9Mq9s
 sJYpI25j9w==
 =qnj/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPg3ikACgkQmmx57+YA
 GNlf3xAAmZCteNPsiLAs2a3I22quVbr9NBPTbFv0SmfP7/Yw/wUOYc0kcUR4RpKE
 deKnTWmFKjpBm0j4Tvfq3Fp9pkdUL98/KMC3nZWz7nRHnLaGgPw7hz2KSCPH9g80
 BGpSq1ip3dZay6BJDSgd3R3Wnn9ycFO4CXIBLd9uMJWWS9MDfVM4FpJF31MFJ7jt
 fkJGW8kqguefJU598ErIZv57gcGiWt0VhqoE6PvhOP3rQ01UqJNJlIjaedshNzdo
 Oy3N98dRR29g3c36+emknJB7YcqOHJTBWlTYCmoBAVQ0MCFXZ/KHPmW2Z1x7gOom
 g5yPQvv3xWFhcfLYckPDUGybyiga53aq1/vTtLIovJf92289VxgHdrRa0KZr3M1w
 yQ7ZydNgQ+uA/tFlX0s9NcGXZPBPWyC2wnzrSKxgehIXJoKccTS0vR6A0+UjeU6V
 5izlbnkh530Ek3WZkwT9QDcxY8KjIrdQbhsyecjMrxGVocAtRzLhHH2xfarMHYCd
 0Eandm/mjljLkW5HAFU6/BD2LiIwS6O5TqwazfM3+55se4t027r+1g8sMApsbQtg
 r5NTL3mhxWSCKdgVyty5PVa3jnMrdT/3MBuomUhy04FTPaimOSa4ha0uU3vAJZqK
 9rWSoBKyQv0NmJ3ylzAjXdmOojiz0kXXqLEdpkhKxeDih9Rwz68=
 =nJD3
 -----END PGP SIGNATURE-----

Merge tag 'samsung-drivers-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers

Samsung SoC driver changes for v6.3

Deprecate syscon phandle to the PMU node in MIPI and DP video phy
drivers in favor of putting the device nodes directly under the PMU
nodes.  This better reflects device hierarchy and allows later to solve
dtc W=1 and dtbs_check warnings.

* tag 'samsung-drivers-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  phy: samsung,mipi-video-phy: deprecate syscon phandle
  phy: samsung,dp-video-phy: deprecate syscon phandle
  dt-bindings: phy: samsung,mipi-video-phy: deprecate syscon phandle
  dt-bindings: phy: samsung,dp-video-phy: deprecate syscon phandle
  MAINTAINERS: arm64: tesla: correct pattern for directory
  dt-bindings: soc: samsung: exynos-sysreg: correct indentation for deprecated
  dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynosautov9
  dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynos850
  dt-bindings: soc: samsung: exynos-sysreg: Add tesla FSD sysreg compatibles
  dt-bindings: soc: samsung: exynos-sysreg: add clocks for Exynos850
  dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynos5433
  dt-bindings: soc: samsung: exynos-sysreg: split from syscon

Link: https://lore.kernel.org/r/20230205144657.951749-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2023-02-06 12:01:59 +01:00
commit e26f8413cc
7 changed files with 105 additions and 20 deletions

View File

@ -64,12 +64,6 @@ properties:
- rockchip,rk3568-qos
- rockchip,rk3588-qos
- rockchip,rv1126-qos
- samsung,exynos3-sysreg
- samsung,exynos4-sysreg
- samsung,exynos5-sysreg
- samsung,exynos5433-sysreg
- samsung,exynos850-sysreg
- samsung,exynosautov9-sysreg
- const: syscon

View File

@ -22,13 +22,13 @@ properties:
samsung,pmu-syscon:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
description:
Phandle to PMU system controller interface.
Phandle to PMU system controller interface (if not a child of PMU).
required:
- compatible
- "#phy-cells"
- samsung,pmu-syscon
additionalProperties: false
@ -36,6 +36,5 @@ examples:
- |
phy {
compatible = "samsung,exynos5420-dp-video-phy";
samsung,pmu-syscon = <&pmu_system_controller>;
#phy-cells = <0>;
};

View File

@ -35,15 +35,18 @@ properties:
syscon:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
description:
Phandle to PMU system controller interface, valid only for
samsung,s5pv210-mipi-video-phy and samsung,exynos5420-mipi-video-phy.
samsung,s5pv210-mipi-video-phy and samsung,exynos5420-mipi-video-phy (if
not a child of PMU).
samsung,pmu-syscon:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
description:
Phandle to PMU system controller interface, valid for
samsung,exynos5433-mipi-video-phy.
samsung,exynos5433-mipi-video-phy (if not a child of PMU).
samsung,disp-sysreg:
$ref: /schemas/types.yaml#/definitions/phandle
@ -81,13 +84,10 @@ allOf:
samsung,disp-sysreg: false
samsung,cam0-sysreg: false
samsung,cam1-sysreg: false
required:
- syscon
else:
properties:
syscon: false
required:
- samsung,pmu-syscon
- samsung,disp-sysreg
- samsung,cam0-sysreg
- samsung,cam1-sysreg
@ -99,7 +99,6 @@ examples:
phy {
compatible = "samsung,exynos5433-mipi-video-phy";
#phy-cells = <1>;
samsung,pmu-syscon = <&pmu_system_controller>;
samsung,cam0-sysreg = <&syscon_cam0>;
samsung,cam1-sysreg = <&syscon_cam1>;
samsung,disp-sysreg = <&syscon_disp>;

View File

@ -0,0 +1,87 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/soc/samsung/samsung,exynos-sysreg.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung Exynos SoC series System Registers (SYSREG)
maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
properties:
compatible:
oneOf:
- items:
- enum:
- samsung,exynos3-sysreg
- samsung,exynos4-sysreg
- samsung,exynos5-sysreg
- tesla,fsd-cam-sysreg
- tesla,fsd-fsys0-sysreg
- tesla,fsd-fsys1-sysreg
- tesla,fsd-peric-sysreg
- const: syscon
- items:
- enum:
- samsung,exynos5433-cam0-sysreg
- samsung,exynos5433-cam1-sysreg
- samsung,exynos5433-disp-sysreg
- samsung,exynos5433-fsys-sysreg
- const: samsung,exynos5433-sysreg
- const: syscon
- items:
- enum:
- samsung,exynos5433-sysreg
- samsung,exynos850-sysreg
- samsung,exynosautov9-sysreg
- const: syscon
deprecated: true
- items:
- enum:
- samsung,exynos850-cmgp-sysreg
- samsung,exynos850-peri-sysreg
- const: samsung,exynos850-sysreg
- const: syscon
- items:
- enum:
- samsung,exynosautov9-fsys2-sysreg
- samsung,exynosautov9-peric0-sysreg
- samsung,exynosautov9-peric1-sysreg
- const: samsung,exynosautov9-sysreg
- const: syscon
reg:
maxItems: 1
clocks:
maxItems: 1
required:
- compatible
- reg
allOf:
- if:
properties:
compatible:
contains:
enum:
- samsung,exynos850-cmgp-sysreg
- samsung,exynos850-peri-sysreg
- samsung,exynos850-sysreg
then:
required:
- clocks
else:
properties:
clocks: false
additionalProperties: false
examples:
- |
system-controller@10010000 {
compatible = "samsung,exynos4-sysreg", "syscon";
reg = <0x10010000 0x400>;
};

View File

@ -3010,7 +3010,7 @@ M: linux-fsd@tesla.com
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: linux-samsung-soc@vger.kernel.org
S: Maintained
F: arch/arm64/boot/dts/tesla*
F: arch/arm64/boot/dts/tesla/
ARM/TETON BGA MACHINE SUPPORT
M: "Mark F. Brown" <mark.brown314@gmail.com>

View File

@ -83,8 +83,11 @@ static int exynos_dp_video_phy_probe(struct platform_device *pdev)
if (!state)
return -ENOMEM;
state->regs = syscon_regmap_lookup_by_phandle(dev->of_node,
"samsung,pmu-syscon");
state->regs = syscon_node_to_regmap(dev->parent->of_node);
if (IS_ERR(state->regs))
/* Backwards compatible way */
state->regs = syscon_regmap_lookup_by_phandle(dev->of_node,
"samsung,pmu-syscon");
if (IS_ERR(state->regs)) {
dev_err(dev, "Failed to lookup PMU regmap\n");
return PTR_ERR(state->regs);

View File

@ -298,7 +298,7 @@ static int exynos_mipi_video_phy_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct phy_provider *phy_provider;
unsigned int i;
unsigned int i = 0;
phy_dev = of_device_get_match_data(dev);
if (!phy_dev)
@ -308,7 +308,10 @@ static int exynos_mipi_video_phy_probe(struct platform_device *pdev)
if (!state)
return -ENOMEM;
for (i = 0; i < phy_dev->num_regmaps; i++) {
state->regmaps[i] = syscon_node_to_regmap(dev->parent->of_node);
if (!IS_ERR(state->regmaps[i]))
i++;
for (; i < phy_dev->num_regmaps; i++) {
state->regmaps[i] = syscon_regmap_lookup_by_phandle(np,
phy_dev->regmap_names[i]);
if (IS_ERR(state->regmaps[i]))