pwm: tegra: Add support for Tegra194
authorSandipan Patra <spatra@nvidia.com>
Thu, 5 Mar 2020 11:27:33 +0000 (16:57 +0530)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 30 Mar 2020 16:03:04 +0000 (18:03 +0200)
Tegra194 has multiple PWM controllers with each having only one output.

Also the maxmimum frequency is higher than earlier SoCs.

Add support for Tegra194 and specify the number of PWM outputs and
maximum supported frequency using device tree match data.

Signed-off-by: Sandipan Patra <spatra@nvidia.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
drivers/pwm/pwm-tegra.c

index 0a69eadf44ce28e4a58284d1be3e509805aba292..74c41e34c3b60468535256f7267cc9682121fdad 100644 (file)
@@ -9,6 +9,7 @@ Required properties:
   - "nvidia,tegra132-pwm", "nvidia,tegra20-pwm": for Tegra132
   - "nvidia,tegra210-pwm", "nvidia,tegra20-pwm": for Tegra210
   - "nvidia,tegra186-pwm": for Tegra186
+  - "nvidia,tegra194-pwm": for Tegra194
 - reg: physical base address and length of the controller's registers
 - #pwm-cells: should be 2. See pwm.yaml in this directory for a description of
   the cells format.
index aa12fb3ed92e32da1b180f6b4cb35e72bb534cac..d26ed8f579ff0b5cdd2fc8bb646955f00bed7f3e 100644 (file)
@@ -282,9 +282,15 @@ static const struct tegra_pwm_soc tegra186_pwm_soc = {
        .max_frequency = 102000000UL,
 };
 
+static const struct tegra_pwm_soc tegra194_pwm_soc = {
+       .num_channels = 1,
+       .max_frequency = 408000000UL,
+};
+
 static const struct of_device_id tegra_pwm_of_match[] = {
        { .compatible = "nvidia,tegra20-pwm", .data = &tegra20_pwm_soc },
        { .compatible = "nvidia,tegra186-pwm", .data = &tegra186_pwm_soc },
+       { .compatible = "nvidia,tegra194-pwm", .data = &tegra194_pwm_soc },
        { }
 };
 MODULE_DEVICE_TABLE(of, tegra_pwm_of_match);