[PATCH v4] ARM: dts: add bcm2835-pwm bindings

2015-01-15 Thread Bart Tanghe
To probe the bcm2835-pwm driver properly, this dts bindings has to be added to the bcm2835 dtsi file. In expectation of a bcm2835 clock driver, I've added fixed-clock clock binding. --- Changes in v4: - node added by reg value Signed-off-by: Bart Tanghe Acked-by: Stephen Warren diff --git

Re: [PATCH v3] ARM: dts: add bcm2835-pwm bindings

2015-01-15 Thread Bart Tanghe
I'm really sorry. I've used the wrong source. I make v4. Regards, Bart On 01/14/2015 06:06 PM, Stephen Warren wrote: > On 01/14/2015 02:18 AM, Bart Tanghe wrote: >> To probe the bcm2835-pwm driver properly, this dts bindings has to be added >> to the bcm2835 dtsi file. &g

Re: [PATCH v3] ARM: dts: add bcm2835-pwm bindings

2015-01-15 Thread Bart Tanghe
I'm really sorry. I've used the wrong source. I make v4. Regards, Bart On 01/14/2015 06:06 PM, Stephen Warren wrote: On 01/14/2015 02:18 AM, Bart Tanghe wrote: To probe the bcm2835-pwm driver properly, this dts bindings has to be added to the bcm2835 dtsi file. In expectation of a bcm2835

[PATCH v4] ARM: dts: add bcm2835-pwm bindings

2015-01-15 Thread Bart Tanghe
To probe the bcm2835-pwm driver properly, this dts bindings has to be added to the bcm2835 dtsi file. In expectation of a bcm2835 clock driver, I've added fixed-clock clock binding. --- Changes in v4: - node added by reg value Signed-off-by: Bart Tanghe bart.tan...@thomasmore.be Acked

[PATCH v3] ARM: dts: add bcm2835-pwm bindings

2015-01-14 Thread Bart Tanghe
To probe the bcm2835-pwm driver properly, this dts bindings has to be added to the bcm2835 dtsi file. In expectation of a bcm2835 clock driver, I've added fixed-clock clock binding. --- Changes in v3: - node added by reg value Signed-off-by: Bart Tanghe Acked-by: Stephen Warren diff --git

Re: [PATCH]dts: add bcm2835-pwm bindings

2015-01-14 Thread Bart Tanghe
On 01/13/2015 05:19 PM, Stephen Warren wrote: > On 01/13/2015 08:40 AM, Bart Tanghe wrote: >> On 01/10/2015 05:38 PM, Stephen Warren wrote: >>> On 01/05/2015 08:33 AM, Bart Tanghe wrote: >>>> To probe the bcm2835-pwm driver properly, this dts bindings has to be added

Re: [PATCH]dts: add bcm2835-pwm bindings

2015-01-14 Thread Bart Tanghe
On 01/13/2015 05:19 PM, Stephen Warren wrote: On 01/13/2015 08:40 AM, Bart Tanghe wrote: On 01/10/2015 05:38 PM, Stephen Warren wrote: On 01/05/2015 08:33 AM, Bart Tanghe wrote: To probe the bcm2835-pwm driver properly, this dts bindings has to be added to the bcm2835 dtsi file

[PATCH v3] ARM: dts: add bcm2835-pwm bindings

2015-01-14 Thread Bart Tanghe
To probe the bcm2835-pwm driver properly, this dts bindings has to be added to the bcm2835 dtsi file. In expectation of a bcm2835 clock driver, I've added fixed-clock clock binding. --- Changes in v3: - node added by reg value Signed-off-by: Bart Tanghe bart.tan...@thomasmore.be Acked

Re: [PATCH]dts: add bcm2835-pwm bindings

2015-01-13 Thread Bart Tanghe
On 01/10/2015 05:38 PM, Stephen Warren wrote: > On 01/05/2015 08:33 AM, Bart Tanghe wrote: >> To probe the bcm2835-pwm driver properly, this dts bindings has to be added >> to the bcm2835 dtsi file. >> In expectation of a bcm2835 clock driver, I've added fixed-cl

Re: [PATCH]dts: add bcm2835-pwm bindings

2015-01-13 Thread Bart Tanghe
On 01/10/2015 05:38 PM, Stephen Warren wrote: On 01/05/2015 08:33 AM, Bart Tanghe wrote: To probe the bcm2835-pwm driver properly, this dts bindings has to be added to the bcm2835 dtsi file. In expectation of a bcm2835 clock driver, I've added fixed-clock clock binding. To change

[PATCH v2] ARM: dts: add bcm2835-pwm bindings

2015-01-07 Thread Bart Tanghe
To probe the bcm2835-pwm driver properly, this dts bindings has to be added to the bcm2835 dtsi file. In expectation of a bcm2835 clock driver, I've added fixed-clock clock binding. --- Changes in v2: - status set to disabled - follow the clock naming convention Signed-off-by: Bart Tanghe

[PATCH v2] ARM: dts: add bcm2835-pwm bindings

2015-01-07 Thread Bart Tanghe
To probe the bcm2835-pwm driver properly, this dts bindings has to be added to the bcm2835 dtsi file. In expectation of a bcm2835 clock driver, I've added fixed-clock clock binding. --- Changes in v2: - status set to disabled - follow the clock naming convention Signed-off-by: Bart Tanghe

[PATCH]dts: add bcm2835-pwm bindings

2015-01-05 Thread Bart Tanghe
not to be done automatically. Is it possible to document this bindings somewhere? Signed-off-by: Bart Tanghe diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi index 3342cb1..ba76bb4 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi

[PATCH]dts: add bcm2835-pwm bindings

2015-01-05 Thread Bart Tanghe
not to be done automatically. Is it possible to document this bindings somewhere? Signed-off-by: Bart Tanghe bart.tan...@thomasmore.be diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi index 3342cb1..ba76bb4 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot

Re: [PATCH v7]pwm: add BCM2835 PWM driver

2014-10-15 Thread Bart Tanghe
On 2014-10-14 15:54, Thierry Reding wrote: > The above indicates that it would be 0x00, in which case it might be > better to just do... > > value &= ~(PWM_CONTROL_MASK << (PWM_CONTROL_STRIDE * pwm->hwpwm)); > > ... and get rid of DEFAULT_PWM_MODE. Indeed, this has to be 0x00.

Re: [PATCH v7]pwm: add BCM2835 PWM driver

2014-10-15 Thread Bart Tanghe
On 2014-10-14 15:54, Thierry Reding wrote: The above indicates that it would be 0x00, in which case it might be better to just do... value = ~(PWM_CONTROL_MASK (PWM_CONTROL_STRIDE * pwm-hwpwm)); ... and get rid of DEFAULT_PWM_MODE. Indeed, this has to be 0x00. PWM_CONTROL_MASK and

Re: [PATCH v7]pwm: add BCM2835 PWM driver

2014-10-08 Thread Bart Tanghe
On 2014-10-08 14:19, Thierry Reding wrote: > On Wed, Oct 08, 2014 at 12:14:32PM +0200, Bart Tanghe wrote: >> Add pwm driver for Broadcom BCM2835 processor (Raspberry Pi) >> >> Signed-off-by: Bart Tanghe >> --- >> Changed in v7: >> - clean up the shamef

[PATCH v7]pwm: add BCM2835 PWM driver

2014-10-08 Thread Bart Tanghe
Add pwm driver for Broadcom BCM2835 processor (Raspberry Pi) Signed-off-by: Bart Tanghe --- Changed in v7: - clean up the shameful clk_enable error handling introduced in v6 - clean up the code nits diff --git a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt b/Documentation/devicetree

[PATCH v7]pwm: add BCM2835 PWM driver

2014-10-08 Thread Bart Tanghe
Add pwm driver for Broadcom BCM2835 processor (Raspberry Pi) Signed-off-by: Bart Tanghe bart.tan...@thomasmore.be --- Changed in v7: - clean up the shameful clk_enable error handling introduced in v6 - clean up the code nits diff --git a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt b

Re: [PATCH v7]pwm: add BCM2835 PWM driver

2014-10-08 Thread Bart Tanghe
On 2014-10-08 14:19, Thierry Reding wrote: On Wed, Oct 08, 2014 at 12:14:32PM +0200, Bart Tanghe wrote: Add pwm driver for Broadcom BCM2835 processor (Raspberry Pi) Signed-off-by: Bart Tanghe bart.tan...@thomasmore.be --- Changed in v7: - clean up the shameful clk_enable error handling

[PATCH v6]pwm: add BCM2835 PWM driver

2014-10-07 Thread Bart Tanghe
Add pwm driver for Broadcom BCM2835 processor (Raspberry Pi) Signed-off-by: Bart Tanghe --- Changes in v6: - changed the global index of the pwm to local pwm index - change to the mainline kernel Kconfig architecture dependency - clean up the code (Stephen Warren comments) diff --git

[PATCH v6]pwm: add BCM2835 PWM driver

2014-10-07 Thread Bart Tanghe
Add pwm driver for Broadcom BCM2835 processor (Raspberry Pi) Signed-off-by: Bart Tanghe bart.tan...@thomasmore.be --- Changes in v6: - changed the global index of the pwm to local pwm index - change to the mainline kernel Kconfig architecture dependency - clean up the code (Stephen Warren

[resend rfc v5]pwm: add BCM2835 PWM driver

2014-10-02 Thread Bart Tanghe
Add pwm driver for Broadcom BCM2835 processor (Raspberry Pi) Signed-off-by: Bart Tanghe --- Changes in v5: - add the correct copyright comments according the university college philosophy - better error handling - use devm clk lookup - define some variables - add the clock description

[resend rfc v5]pwm: add BCM2835 PWM driver

2014-10-02 Thread Bart Tanghe
Add pwm driver for Broadcom BCM2835 processor (Raspberry Pi) Signed-off-by: Bart Tanghe bart.tan...@thomasmore.be --- Changes in v5: - add the correct copyright comments according the university college philosophy - better error handling - use devm clk lookup - define some variables - add

[resend rfc v4]pwm: add BCM2835 PWM driver

2014-09-29 Thread Bart Tanghe
Add pwm driver for Broadcom BCM2835 processor (Raspberry Pi) Signed-off-by: Bart Tanghe --- Changes in v4: - add the second pwm channel (tested on raspberry pi B+) - add the code and code style recommendations diff --git a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt b/Documentation

Re: [resend rfc v3] pwm: add BCM2835 PWM driver

2014-09-29 Thread Bart Tanghe
On 2014-09-29 07:33, Thierry Reding wrote: > On Fri, Sep 26, 2014 at 08:45:57AM -0600, Stephen Warren wrote: >> On 09/26/2014 01:11 AM, Thierry Reding wrote: >>> On Thu, Sep 04, 2014 at 09:06:48AM -0600, Stephen Warren wrote: > [...] Oh dear. It sounds like we need at least some form of clock

Re: [resend rfc v3] pwm: add BCM2835 PWM driver

2014-09-29 Thread Bart Tanghe
On 2014-09-29 07:33, Thierry Reding wrote: On Fri, Sep 26, 2014 at 08:45:57AM -0600, Stephen Warren wrote: On 09/26/2014 01:11 AM, Thierry Reding wrote: On Thu, Sep 04, 2014 at 09:06:48AM -0600, Stephen Warren wrote: [...] Oh dear. It sounds like we need at least some form of clock driver for

[resend rfc v4]pwm: add BCM2835 PWM driver

2014-09-29 Thread Bart Tanghe
Add pwm driver for Broadcom BCM2835 processor (Raspberry Pi) Signed-off-by: Bart Tanghe bart.tan...@thomasmore.be --- Changes in v4: - add the second pwm channel (tested on raspberry pi B+) - add the code and code style recommendations diff --git a/Documentation/devicetree/bindings/pwm/pwm

Re: [resend rfc v3] pwm: add BCM2835 PWM driver

2014-09-26 Thread Bart Tanghe
On 2014-09-26 09:11, Thierry Reding wrote: > On Thu, Sep 04, 2014 at 09:06:48AM -0600, Stephen Warren wrote: >> On 09/04/2014 04:05 AM, Bart Tanghe wrote: >>> No problem. Thanks for the feedback. >>> I've got some question below. >>> >>> On 2014-

Re: [resend rfc v3] pwm: add BCM2835 PWM driver

2014-09-26 Thread Bart Tanghe
On 2014-09-26 09:11, Thierry Reding wrote: On Thu, Sep 04, 2014 at 09:06:48AM -0600, Stephen Warren wrote: On 09/04/2014 04:05 AM, Bart Tanghe wrote: No problem. Thanks for the feedback. I've got some question below. On 2014-08-25 15:19, Thierry Reding wrote: Sorry for taking so long

Re: [rfc]pwm: add xilinx pwm driver

2014-09-04 Thread Bart Tanghe
See below On 2014-05-15 15:56, Michal Simek wrote: > On 05/15/2014 02:20 PM, Arnd Bergmann wrote: >> On Thursday 15 May 2014 11:48:52 Michal Simek wrote: >>> On 05/14/2014 01:26 PM, Bart Tanghe wrote: >>>>add Xilinx PWM support - axi timer hardware block >&g

Re: [resend rfc v3] pwm: add BCM2835 PWM driver

2014-09-04 Thread Bart Tanghe
No problem. Thanks for the feedback. I've got some question below. On 2014-08-25 15:19, Thierry Reding wrote: > Sorry for taking so long to reply to this, I had completely forgotten. > > On Mon, Apr 28, 2014 at 02:54:46PM +0200, Bart Tanghe wrote: >> Add some better

Re: [resend rfc v3] pwm: add BCM2835 PWM driver

2014-09-04 Thread Bart Tanghe
No problem. Thanks for the feedback. I've got some question below. On 2014-08-25 15:19, Thierry Reding wrote: Sorry for taking so long to reply to this, I had completely forgotten. On Mon, Apr 28, 2014 at 02:54:46PM +0200, Bart Tanghe wrote: Add some better error handling and Device

Re: [rfc]pwm: add xilinx pwm driver

2014-09-04 Thread Bart Tanghe
See below On 2014-05-15 15:56, Michal Simek wrote: On 05/15/2014 02:20 PM, Arnd Bergmann wrote: On Thursday 15 May 2014 11:48:52 Michal Simek wrote: On 05/14/2014 01:26 PM, Bart Tanghe wrote: add Xilinx PWM support - axi timer hardware block Signed-off-by: Bart Tanghe bart.tan

Re: [rfc]pwm: add xilinx pwm driver

2014-05-15 Thread Bart Tanghe
On 05/15/2014 12:33 PM, Michal Simek wrote: On 05/15/2014 10:50 AM, Bart Tanghe wrote: On 05/15/2014 09:23 AM, Arnd Bergmann wrote: On Wednesday 14 May 2014 13:26:13 Bart Tanghe wrote: @@ -0,0 +1,20 @@ +Xilinx PWM controller + +Required properties: +- compatible: should be "xlnx,pwm

Re: [rfc]pwm: add xilinx pwm driver

2014-05-15 Thread Bart Tanghe
On 05/15/2014 09:23 AM, Arnd Bergmann wrote: On Wednesday 14 May 2014 13:26:13 Bart Tanghe wrote: @@ -0,0 +1,20 @@ +Xilinx PWM controller + +Required properties: +- compatible: should be "xlnx,pwm-xlnx" +- add a clock source to the description + +Examples: + + axi_time

Re: [rfc]pwm: add xilinx pwm driver

2014-05-15 Thread Bart Tanghe
On 05/15/2014 09:23 AM, Arnd Bergmann wrote: On Wednesday 14 May 2014 13:26:13 Bart Tanghe wrote: @@ -0,0 +1,20 @@ +Xilinx PWM controller + +Required properties: +- compatible: should be xlnx,pwm-xlnx +- add a clock source to the description + +Examples: + + axi_timer_0: timer

Re: [rfc]pwm: add xilinx pwm driver

2014-05-15 Thread Bart Tanghe
On 05/15/2014 12:33 PM, Michal Simek wrote: On 05/15/2014 10:50 AM, Bart Tanghe wrote: On 05/15/2014 09:23 AM, Arnd Bergmann wrote: On Wednesday 14 May 2014 13:26:13 Bart Tanghe wrote: @@ -0,0 +1,20 @@ +Xilinx PWM controller + +Required properties: +- compatible: should be xlnx,pwm-xlnx

[rfc]pwm: add xilinx pwm driver

2014-05-14 Thread Bart Tanghe
add Xilinx PWM support - axi timer hardware block Signed-off-by: Bart Tanghe diff --git a/Documentation/devicetree/bindings/pwm/pwm-xlnx.txt b/Documentation/devicetree/bindings/pwm/pwm-xlnx.txt new file mode 100644 index 000..cb48926 --- /dev/null +++ b/Documentation/devicetree

[rfc]pwm: add xilinx pwm driver

2014-05-14 Thread Bart Tanghe
add Xilinx PWM support - axi timer hardware block Signed-off-by: Bart Tanghe bart.tan...@thomasmore.be diff --git a/Documentation/devicetree/bindings/pwm/pwm-xlnx.txt b/Documentation/devicetree/bindings/pwm/pwm-xlnx.txt new file mode 100644 index 000..cb48926 --- /dev/null +++ b

[resend rfc v3] pwm: add BCM2835 PWM driver

2014-04-28 Thread Bart Tanghe
Add some better error handling and Device table support Added Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt Signed-off-by: Bart Tanghe diff --git a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt new

[resend rfc v3] pwm: add BCM2835 PWM driver

2014-04-28 Thread Bart Tanghe
Add some better error handling and Device table support Added Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt Signed-off-by: Bart Tanghe bart.tan...@thomasmore.be diff --git a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt b/Documentation/devicetree/bindings

[resend rfc] pwm: add BCM2835 PWM driver

2014-04-25 Thread Bart Tanghe
0x10 +#define CHANNEL0x10 + +#define PWM_ENABLE 0x0001 +#define PWM_POLARITY 0x0010 + +#define MASK_CTL_PWM 0x00FF +#define CTL_PWM0x0081 + +#define DRIVER_AUTHOR "Bart Tanghe " +#define DRIVER_DESC "A bcm2835 p

[resend rfc] pwm: add BCM2835 PWM driver

2014-04-25 Thread Bart Tanghe
mapping*/ + +#define DUTY 0x14 +#define PERIOD 0x10 +#define CHANNEL0x10 + +#define PWM_ENABLE 0x0001 +#define PWM_POLARITY 0x0010 + +#define MASK_CTL_PWM 0x00FF +#define CTL_PWM0x0081 + +#define DRIVER_AUTHOR Bart

Re: [rfc]pwm: add BCM2835 PWM driver

2014-04-14 Thread Bart Tanghe
Kryger wrote: On Thu, Apr 3, 2014 at 6:44 AM, Bart Tanghe wrote: need some recommendation the memory mapped io registers of the bcm2835 pwm hardware are spreaded over the memory mapped io gpio config 0x2024 - clk config 0x201010A0 - pwm configuration 0x2020C000 to handle this, I've used

Re: [rfc]pwm: add BCM2835 PWM driver

2014-04-14 Thread Bart Tanghe
/08/2014 05:02 PM, Tim Kryger wrote: On Thu, Apr 3, 2014 at 6:44 AM, Bart Tanghe bart.tan...@thomasmore.be wrote: need some recommendation the memory mapped io registers of the bcm2835 pwm hardware are spreaded over the memory mapped io gpio config 0x2024 - clk config 0x201010A0 - pwm

[rfc]pwm: add BCM2835 PWM driver

2014-04-03 Thread Bart Tanghe
offsets this give some nasty stuff in for instance, /proc/iomem Has anyone got a nice solution? Signed-off-by: Bart Tanghe --- diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig index 22f2f28..977e5f6 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -62,6 +62,17 @@ config

[rfc]pwm: add BCM2835 PWM driver

2014-04-03 Thread Bart Tanghe
offsets this give some nasty stuff in for instance, /proc/iomem Has anyone got a nice solution? Signed-off-by: Bart Tanghe bart.tan...@thomasmore.be --- diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig index 22f2f28..977e5f6 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -62,6