From d857d2fac22a9f4667f9445e04a8ab8e6d85fc10 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Thu, 1 Nov 2018 11:59:56 -0500 Subject: [PATCH] arm: soc: kinetis: Update PWM dts support Add #pwm-cells properties to kinetis dts files and update the yaml binding to spec the two cells as pin and period (in nanosecond to match Linux Kernel binding spec). Signed-off-by: Kumar Gala --- dts/arm/nxp/nxp_k6x.dtsi | 8 ++++---- dts/arm/nxp/nxp_kw2xd.dtsi | 6 +++--- dts/bindings/pwm/nxp,kinetis-ftm.yaml | 5 +++++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/dts/arm/nxp/nxp_k6x.dtsi b/dts/arm/nxp/nxp_k6x.dtsi index f9df2fc78b9..078a9dcb5e4 100644 --- a/dts/arm/nxp/nxp_k6x.dtsi +++ b/dts/arm/nxp/nxp_k6x.dtsi @@ -337,8 +337,8 @@ reg = <0x40038000 0x98>; interrupts = <42 0>; label = "PWM_0"; - /* channel information needed - fixme */ status = "disabled"; + #pwm-cells = <2>; }; pwm1: pwm@40039000{ @@ -346,8 +346,8 @@ reg = <0x40039000 0x98>; interrupts = <43 0>; label = "PWM_1"; - /* channel information needed - fixme */ status = "disabled"; + #pwm-cells = <2>; }; pwm2: pwm@4003a000{ @@ -355,8 +355,8 @@ reg = <0x4003a000 0x98>; interrupts = <44 0>; label = "PWM_2"; - /* channel information needed - fixme */ status = "disabled"; + #pwm-cells = <2>; }; pwm3: pwm@400b9000{ @@ -364,8 +364,8 @@ reg = <0x400b9000 0x98>; interrupts = <71 0>; label = "PWM_3"; - /* channel information needed - fixme */ status = "disabled"; + #pwm-cells = <2>; }; adc0: adc@4003b000{ diff --git a/dts/arm/nxp/nxp_kw2xd.dtsi b/dts/arm/nxp/nxp_kw2xd.dtsi index be7a0b6fc8f..ee4e6140fc1 100644 --- a/dts/arm/nxp/nxp_kw2xd.dtsi +++ b/dts/arm/nxp/nxp_kw2xd.dtsi @@ -287,8 +287,8 @@ reg = <0x40038000 0x98>; interrupts = <42 0>; label = "PWM_0"; - /* channel information needed - fixme */ status = "disabled"; + #pwm-cells = <2>; }; pwm1: pwm@40039000{ @@ -296,8 +296,8 @@ reg = <0x40039000 0x98>; interrupts = <43 0>; label = "PWM_1"; - /* channel information needed - fixme */ status = "disabled"; + #pwm-cells = <2>; }; pwm2: pwm@4003a000{ @@ -305,8 +305,8 @@ reg = <0x4003a000 0x98>; interrupts = <44 0>; label = "PWM_2"; - /* channel information needed - fixme */ status = "disabled"; + #pwm-cells = <2>; }; adc0: adc@4003b000{ diff --git a/dts/bindings/pwm/nxp,kinetis-ftm.yaml b/dts/bindings/pwm/nxp,kinetis-ftm.yaml index 1c525375202..40453d1639f 100644 --- a/dts/bindings/pwm/nxp,kinetis-ftm.yaml +++ b/dts/bindings/pwm/nxp,kinetis-ftm.yaml @@ -28,4 +28,9 @@ properties: category: required description: required interrupts generation: define + +"#cells": + - channel +# period in terms of nanoseconds + - period ...