[PATCH v2] gpio-pca953x: Support NXP PCAL9555A with Agile I/O

2015-07-07 Thread Clemens Gruber
Signed-off-by: Clemens Gruber clemens.gru...@pqgruber.com --- Changes from v1: - The mapping between bits and pins was counterintuitive. Corrected! - Improved documentation for new properties and example comments --- .../devicetree/bindings/gpio/gpio-pca953x.txt | 24 +++- drivers/gpio

Re: RX packet loss on i.MX6Q running 4.2-rc7

2015-08-21 Thread Clemens Gruber
On Fri, Aug 21, 2015 at 06:49:20AM +0200, Jon Nettleton wrote: On Fri, Aug 21, 2015 at 12:30 AM, Clemens Gruber clemens.gru...@pqgruber.com wrote: Hi, I am experiencing massive RX packet loss on my i.MX6Q (Chip rev 1.3) on Linux 4.2-rc7 with a Marvell 88E1510 Gigabit Ethernet PHY

RX packet loss on i.MX6Q running 4.2-rc7

2015-08-20 Thread Clemens Gruber
Hi, I am experiencing massive RX packet loss on my i.MX6Q (Chip rev 1.3) on Linux 4.2-rc7 with a Marvell 88E1510 Gigabit Ethernet PHY connected over RGMII. I noticed it when doing an UDP benchmark with iperf3. When sending UDP packets from a Debian PC to the i.MX6 with a rate of 100 Mbit/s, 99%

Re: [PATCH v4 0/2] pwm-pca9685: Bugfixes and prescaler support

2015-08-14 Thread Clemens Gruber
On Thu, Jul 23, 2015 at 05:19:00PM +0200, Clemens Gruber wrote: Hi, the first patch from this series contains bugfixes and the second patch adds support for changing the PWM output frequency of the PCA9685. Regards, Clemens Cc: Thierry Reding thierry.red...@gmail.com Cc: Steffen

[PATCH v4 2/2] pwm-pca9685: Support changing the output frequency

2015-07-23 Thread Clemens Gruber
using the duty cycle to period ratio from before the period change. When using LEDs for example, previously set brightness levels stay the same when the frequency changes. Cc: Thierry Reding thierry.red...@gmail.com Cc: Steffen Trumtrar s.trumt...@pengutronix.de Signed-off-by: Clemens Gruber

[PATCH v4 1/2] pwm-pca9685: Fix several driver bugs

2015-07-23 Thread Clemens Gruber
, therefore the exact OFF time was ignored when setting a duty_ns period_ns Solution: Clear both OFF registers when setting full ON and clear the full ON bit when changing the OFF registers. Cc: Thierry Reding thierry.red...@gmail.com Cc: Steffen Trumtrar s.trumt...@pengutronix.de Signed-off-by: Clemens

[PATCH v4 0/2] pwm-pca9685: Bugfixes and prescaler support

2015-07-23 Thread Clemens Gruber
one prescaler and changing the period affects all outputs. Clemens Gruber (2): pwm-pca9685: Fix several driver bugs pwm-pca9685: Support changing the output frequency drivers/pwm/pwm-pca9685.c | 89 ++- 1 file changed, 88 insertions(+), 1 deletion

Re: [PATCH] Revert net: fec: Ensure clocks are enabled while using mdio bus

2015-07-16 Thread Clemens Gruber
On Wed, Jul 15, 2015 at 05:32:13PM -0700, David Miller wrote: From: Clemens Gruber clemens.gru...@pqgruber.com Date: Thu, 16 Jul 2015 02:04:04 +0200 This reverts commit 6c3e921b18edca290099adfddde8a50236bf2d80. The change did break ethernet support on the i.MX6Q and possibly also

[PATCH] Revert net: fec: Ensure clocks are enabled while using mdio bus

2015-07-15 Thread Clemens Gruber
This reverts commit 6c3e921b18edca290099adfddde8a50236bf2d80. The change did break ethernet support on the i.MX6Q and possibly also on other platforms: The PHY was not detected anymore and eth0 was not found. Signed-off-by: Clemens Gruber clemens.gru...@pqgruber.com Cc: Andrew Lunn

[PATCH v2 1/2] pwm-pca9685: Fix several driver bugs

2015-07-20 Thread Clemens Gruber
, therefore the exact OFF time was ignored when setting a duty_ns period_ns Solution: Clear both OFF registers when setting full ON and clear the full ON bit when changing the OFF registers. Cc: Thierry Reding thierry.red...@gmail.com Cc: Steffen Trumtrar s.trumt...@pengutronix.de Signed-off-by: Clemens

[PATCH v2 0/2] pwm-pca9685: Bugfixes and prescaler support

2015-07-20 Thread Clemens Gruber
Hi, the first patch from this series contains bugfixes and the second patch adds support for changing the PWM output frequency of the PCA9685. Cc: Thierry Reding thierry.red...@gmail.com Changes from v1: - Only put chip into sleep mode if the bounds checking succeeds Clemens Gruber (2): pwm

[PATCH v2 2/2] pwm-pca9685: Support changing the output frequency

2015-07-20 Thread Clemens Gruber
-off-by: Clemens Gruber clemens.gru...@pqgruber.com --- Changes from v1: - Only put chip into sleep mode if the bounds checking succeeds --- drivers/pwm/pwm-pca9685.c | 48 ++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/drivers/pwm/pwm

[PATCH v3 2/2] pwm-pca9685: Support changing the output frequency

2015-07-20 Thread Clemens Gruber
-off-by: Clemens Gruber clemens.gru...@pqgruber.com --- drivers/pwm/pwm-pca9685.c | 47 ++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c index f4a9c4a..26767d9 100644 --- a/drivers/pwm

[PATCH v3 0/2] pwm-pca9685: Bugfixes and prescaler support

2015-07-20 Thread Clemens Gruber
if the bounds checking succeeds Changes from v2: - Fix checkpatch style warnings introduced in v2 Clemens Gruber (2): pwm-pca9685: Fix several driver bugs pwm-pca9685: Support changing the output frequency drivers/pwm/pwm-pca9685.c | 72 ++- 1 file changed, 71

[PATCH v3 1/2] pwm-pca9685: Fix several driver bugs

2015-07-20 Thread Clemens Gruber
, therefore the exact OFF time was ignored when setting a duty_ns period_ns Solution: Clear both OFF registers when setting full ON and clear the full ON bit when changing the OFF registers. Cc: Thierry Reding thierry.red...@gmail.com Cc: Steffen Trumtrar s.trumt...@pengutronix.de Signed-off-by: Clemens

imx serial driver commit breaks system boot on i.MX6 boards

2015-10-07 Thread Clemens Gruber
Hi, the imx serial driver is broken after the "serial: imx: remove unbalanced clk_prepare" commit 9e7b399d6528eac33a6fbfceb2b92af209c3454d. My i.MX6Q boards do not boot anymore due to aforementioned commit. The error looks like this: ... [0.510764] 202.serial: ttymxc0 at MMIO 0x202

Re: imx serial driver commit breaks system boot on i.MX6 boards

2015-10-07 Thread Clemens Gruber
On Wed, Oct 07, 2015 at 11:42:07AM -0300, Fabio Estevam wrote: > On Wed, Oct 7, 2015 at 11:39 AM, Clemens Gruber > <clemens.gru...@pqgruber.com> wrote: > > > A revert patch from Fabio Estevam was sent on Aug 18th of 2015. > > > > Is there a reason why that rev

[PATCH] kvm: fix maybe-uninitialized compiler warning

2015-09-04 Thread Clemens Gruber
u.c:3304:12: note: ‘leaf’ was declared here int root, leaf; Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- arch/x86/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index fb16a8e..0af5a39 100644 --- a/arc

[PATCH] vmlinux.lds.h: Fix errors in comments and clean up

2015-12-08 Thread Clemens Gruber
Fix multiple errors in the comments, improve the wording, fix indentation and clean up some areas reported by checkpatch. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- include/asm-generic/vmlinux.lds.h | 57 ++- 1 file changed, 33 inse

Re: gpio-mxc: gpiod_get_value returns INT_MIN when the GPIO is off

2015-12-10 Thread Clemens Gruber
Hi Linus, On Thu, Dec 10, 2015 at 03:58:39PM +0100, Linus Walleij wrote: > On Sun, Nov 29, 2015 at 12:02 AM, Clemens Gruber > <clemens.gru...@pqgruber.com> wrote: > > > I am writing a module which reads several GPIO input states from a > > Freescale i.MX6Q. I can contr

gpio-mxc: gpiod_get_value returns INT_MIN when the GPIO is off

2015-11-28 Thread Clemens Gruber
Hi, I am writing a module which reads several GPIO input states from a Freescale i.MX6Q. I can control the input states through hardware buttons attached to my development board. They are all connected exactly the same, with external pull up resistors. I am using the current torvalds/linux master

Re: [PATCH] ASoC: sgtl5000: only check VDDD-supply, not revision

2016-06-03 Thread Clemens Gruber
On Thu, Jun 02, 2016 at 05:56:51PM +0100, Mark Brown wrote: > On Thu, Jun 02, 2016 at 12:48:15PM -0300, Fabio Estevam wrote: > > > Sometime ago you were looking at this. What do you think about this patch? > > I'm rather concerned that the patches came from people working closely > with

Re: [alsa-devel] [PATCH] ASoC: sgtl5000: only check VDDD-supply, not revision

2016-06-06 Thread Clemens Gruber
Hi Fabio, On Sun, Jun 05, 2016 at 10:22:55PM -0300, Fabio Estevam wrote: > Hi Clemens, > > On Sun, Jun 5, 2016 at 8:16 PM, Clemens Gruber > <clemens.gru...@pqgruber.com> wrote: > > > I looked into this today and discovered the following: > > > > With my p

[PATCH] phy: marvell: remove LED config override

2016-06-10 Thread Clemens Gruber
figuration from the device tree. This patch removes this override and allows the user to again set the PHY LED configuration through marvell,reg-init or if that does not exist, keep the original defaults as documented in the datasheet. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com&

Re: [PATCH] phy: marvell: remove LED config override

2016-06-10 Thread Clemens Gruber
Hi Andrew, On Fri, Jun 10, 2016 at 08:38:57PM +0200, Andrew Lunn wrote: > On Fri, Jun 10, 2016 at 07:42:52PM +0200, Clemens Gruber wrote: > > Configuring the PHY LED registers for the Marvell 88E1510 and others is > > not possible, because regardless of the values in m

Re: [PATCH] ASoC: sgtl5000: only check VDDD-supply, not revision

2016-06-04 Thread Clemens Gruber
Hi Eric, On Sat, Jun 04, 2016 at 07:18:28AM +0200, Eric Nelson wrote: > AFAIK, the SGTL5000 versions < 0x11 are like Sasquatch: I've seen > no real proof of their existence. I tried to chase down when this > code was introduced, but it seems to have been around since > the dawn of the driver. >

[PATCH] phy: marvell: fix LED configuration via marvell,reg-init

2016-06-11 Thread Clemens Gruber
the LED configuration through marvell,reg-init in the device tree, which should override said default if it exists. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/net/phy/marvell.c | 38 ++ 1 file changed, 26 insertions(+), 12 del

[PATCH 6/6] ASoC: sgtl5000: Remove misleading comment

2016-06-06 Thread Clemens Gruber
All new designs should use external VDDD according to official documentation. See ER1 in errata sheet: http://cache.nxp.com/files/analog/doc/errata/SGTL5000ER.pdf Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- sound/soc/codecs/sgtl5000.c | 1 - 1 file changed, 1 de

[PATCH 3/6] ASoC: sgtl5000: Initialize CHIP_ANA_POWER to power-on defaults

2016-06-06 Thread Clemens Gruber
OWERUP and CHIP_LINREG_CTRL/LINREG_VDD_MASK And remove CHIP_ANA_POWER and CHIP_LINREG_CTRL from the set of default registers so they don't get clobbered by sgtl5000_fill_defaults(). Signed-off-by: Eric Nelson <e...@nelint.com> Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com&

[PATCH 2/6] ASoC: sgtl5000: Write all default registers

2016-06-06 Thread Clemens Gruber
though continuing allowed the device to operate properly. Signed-off-by: Eric Nelson <e...@nelint.com> Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- sound/soc/codecs/sgtl5000.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/

[PATCH 4/6] ASoC: sgtl5000: Disable internal PLL early

2016-06-06 Thread Clemens Gruber
; Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- sound/soc/codecs/sgtl5000.c | 9 - sound/soc/codecs/sgtl5000.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 59eee45..9f1d51e 100644 ---

[PATCH 1/6] ASoC: sgtl5000: Fix regulator support

2016-06-06 Thread Clemens Gruber
ng app note http://cache.nxp.com/files/analog/doc/app_note/AN3663.pdf Signed-off-by: Eric Nelson <e...@nelint.com> Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- sound/soc/codecs/sgtl5000.c | 343 ++-- 1 file changed, 78

[PATCH 5/6] ASoC: sgtl5000: Do not disable regulators in SND_SOC_BIAS_OFF

2016-06-06 Thread Clemens Gruber
simply disable the reference bias currents. Signed-off-by: Eric Nelson <e...@nelint.com> Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- sound/soc/codecs/sgtl5000.c | 35 +-- 1 file changed, 5 insertions(+), 30 deletions(-) diff --git

[PATCH 0/6] ASoC: sgtl5000: fix use of regulators and internal LDO

2016-06-06 Thread Clemens Gruber
sheet says that if an external VDDD is used, it should be enabled before MCLK is started and I2C activity begins. [I rebased Eric's patches from Feb 2015, fixed a few warnings, URLs, etc. and squashed two patches into one. - Clemens] Clemens Gruber (1): ASoC: sgtl5000: Remove misleading comment

Re: [alsa-devel] [PATCH] ASoC: sgtl5000: only check VDDD-supply, not revision

2016-06-05 Thread Clemens Gruber
Hi Eric, Fabio, Mark, On Sat, Jun 04, 2016 at 07:15:25PM +0200, Clemens Gruber wrote: > please don't merge the patch yet, I just observed a strange effect when > resetting the board during playback / just after playback stops. > At next boot time, sometimes the following error occu

[PATCH] ASoC: sgtl5000: only check VDDD-supply, not revision

2016-06-02 Thread Clemens Gruber
000 erratum ER1. This also applies to revisions >= 0x11. Tested on an i.MX6Q board with SGTL5000 rev 0x11 and external VDDD. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- sound/soc/codecs/sgtl5000.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-)

[PATCH] ASoC: sgtl5000: only check VDDD-supply, not revision

2016-05-31 Thread Clemens Gruber
000 erratum ER1. This also applies to revisions >= 0x11. Tested on an i.MX6Q board with SGTL5000 rev 0x11 and external VDDD. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- sound/soc/codecs/sgtl5000.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-)

[PATCH] Revert "net: phy: turn carrier off on phy attach"

2016-02-12 Thread Clemens Gruber
orker load in that state. This reverts commit 113c74d83eef870e43a0d9279044e9d5435f0d07. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/net/phy/phy_device.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/ph

[PATCH] phy: marvell: Fix reg-init bug on 88E1510

2016-02-14 Thread Clemens Gruber
. This commit moves the call of marvell_of_reg_init to config_init. Now, a marvell,reg-init option to enable PHY interrupts on pin LED[2] is set early on and the phy state machine does not get stuck anymore. Tested on i.MX6Q boards with Marvell 88E1510 PHYs. Signed-off-by: Clemens Gruber <clemens.

Re: [PATCH] Revert "net: phy: turn carrier off on phy attach"

2016-02-12 Thread Clemens Gruber
Hi Florian, On Fri, Feb 12, 2016 at 10:56:04AM -0800, Florian Fainelli wrote: > On 12/02/16 10:01, Clemens Gruber wrote: > > Commit 113c74d83eef ("net: phy: turn carrier off on phy attach") breaks > > the eth0 link coming up on all my i.MX6Q boards with a Marvell

Re: [PATCH] phy: marvell: Fix reg-init bug on 88E1510

2016-02-14 Thread Clemens Gruber
On Sun, Feb 14, 2016 at 09:48:22PM +0100, Andrew Lunn wrote: > On Sun, Feb 14, 2016 at 09:31:25PM +0100, Clemens Gruber wrote: > > The function marvell_of_reg_init was called too late, in > > m88e1510_config_aneg. This function was not reached, due to the phy > > stat

Re: [PATCH] Revert "net: phy: turn carrier off on phy attach"

2016-02-14 Thread Clemens Gruber
On Fri, Feb 12, 2016 at 10:56:04AM -0800, Florian Fainelli wrote: > On 12/02/16 10:01, Clemens Gruber wrote: > > Commit 113c74d83eef ("net: phy: turn carrier off on phy attach") breaks > > the eth0 link coming up on all my i.MX6Q boards with a Marvell 88E1510. > > If

[PATCH] phy: marvell: Fix and unify reg-init behavior

2016-02-15 Thread Clemens Gruber
, marvell_of_reg_init was not called at all. Add a generic marvell_config_init function, which in turn calls marvell_of_reg_init and resets the PHY, to get more consistent behavior across all Marvell PHYs. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/net/phy/marvell.

[PATCH v2] phy: marvell: Fix and unify reg-init behavior

2016-02-15 Thread Clemens Gruber
untouched. The generic marvell_config_init function is called for all the others, to get consistent behavior across all Marvell PHYs. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- Changes since v1: - No longer touch the PHYs that already call marvell_of_reg_init

Re: [PATCH v2] phy: marvell: Fix and unify reg-init behavior

2016-02-15 Thread Clemens Gruber
Hi Fabio, On Mon, Feb 15, 2016 at 06:54:29PM -0200, Fabio Estevam wrote: > On Mon, Feb 15, 2016 at 6:01 PM, Clemens Gruber > <clemens.gru...@pqgruber.com> wrote: > > > +static int marvell_config_init(struct phy_device *phydev) > > +{ > > + int err; > &

[PATCH v3] phy: marvell: Fix and unify reg-init behavior

2016-02-15 Thread Clemens Gruber
untouched. The generic marvell_config_init function is called for all the others, to get consistent behavior across all Marvell PHYs. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- Changes from v2: - Simplified marvell_config_init (No preemptive error handling) --- drivers/net/ph

Re: [PATCH 2/2] regmap: cache: Fall back to register by register read for cache defaults

2016-03-07 Thread Clemens Gruber
On Mon, Feb 01, 2016 at 21:41:39PM +, Mark Brown wrote: > Competely untested, hopefully it helps fix the issues with the SSI. Tested-by: Clemens Gruber <clemens.gru...@pqgruber.com> This patch fixes the SSI issues with the SGTL5000 on my i.MX6Q board, which appeared in the 4.5 de

clk: imx6q: fix typo in CAN clock definition

2016-05-02 Thread Clemens Gruber
Hi Shawn, I did search through Linux 4.6-rc6 but could not find the "clk: imx6q: fix typo in CAN clock definition" patch from last month: https://lkml.org/lkml/2016/4/6/430 CAN bus functionality is broken on i.MX6Q boards without that patch. Could you please make sure that it gets into Linus'

Re: [PATCH] watchdog: core: Fix circular locking dependency

2016-05-09 Thread Clemens Gruber
ancel_work_timer) from [<804acfcc>] > (watchdog_release+0x3c/0x190) > [<804acfcc>] (watchdog_release) from [<8022c5e8>] (__fput+0x80/0x1c8) > [<8022c5e8>] (__fput) from [<80147b28>] (task_work_run+0x94/0xc8) > [<80147b28>] (task_work_run) from [<8010b9

watchdog: deadlock warning with imx2_wdt driver and systemd

2016-04-17 Thread Clemens Gruber
Hi, I have an i.MX6Q board with the current mainline tree from Linus and systemd 229, which also acts as watchdog daemon. (RuntimeWatchdogSec=60) Since commit 11d7aba9ceb7 ("watchdog: imx2: Convert to use infrastructure triggered keepalives") I get a kernel lockdep warning after systemd

Re: watchdog: deadlock warning with imx2_wdt driver and systemd

2016-04-21 Thread Clemens Gruber
ed keepalives) first]. Tested-by: Clemens Gruber <clemens.gru...@pqgruber.com> Cheers, Clemens

Re: [PATCH 2/2] pwm: pca9685: fix prescaler initialization

2017-01-25 Thread Clemens Gruber
On Fri, Jan 20, 2017 at 07:39:07AM +0100, Thierry Reding wrote: > On Thu, Jan 19, 2017 at 05:52:10PM +0100, Clemens Gruber wrote: > > Let's go with this one. I'll spin up a v2 where I calculate the > > period_ns value from the current prescaler value in the probe function. >

Re: [PATCH] pwm: pca9685: Fix misuse of regmap_update_bits

2017-01-18 Thread Clemens Gruber
On Wed, Jan 18, 2017 at 12:00:32PM +0100, Thierry Reding wrote: > On Wed, Jan 18, 2017 at 11:55:10AM +0100, Thierry Reding wrote: > > On Mon, Dec 05, 2016 at 05:34:02PM +0100, Clemens Gruber wrote: > > > On Tue, Nov 29, 2016 at 06:02:50PM +0100, Florian Vaussard wr

Re: [PATCH 2/2] pwm: pca9685: fix prescaler initialization

2017-01-19 Thread Clemens Gruber
On Thu, Jan 19, 2017 at 02:34:39PM +0200, Andy Shevchenko wrote: > On Wed, 2017-01-18 at 15:25 +0100, Clemens Gruber wrote: > > Yes, that's what this patch tries to solve by verifying that the > > external setting (the prescale register) is set to its hardware > > defa

Re: [PATCH 2/2] pwm: pca9685: fix prescaler initialization

2017-01-18 Thread Clemens Gruber
On Wed, Jan 18, 2017 at 04:01:58PM +0200, Andy Shevchenko wrote: > On Wed, 2017-01-18 at 14:53 +0100, Clemens Gruber wrote: > > Yes, but the period could be different, maybe modified in the > > bootloader > > or at a previous boot without hardware reset in between. (We do not

Re: [PATCH 2/2] pwm: pca9685: fix prescaler initialization

2017-01-18 Thread Clemens Gruber
On Wed, Jan 18, 2017 at 01:09:24PM +0200, Andy Shevchenko wrote: > On Wed, 2017-01-18 at 11:57 +0100, Thierry Reding wrote: > > On Tue, Dec 13, 2016 at 04:52:51PM +0100, Clemens Gruber wrote: > > > Until now, we assumed that the period is the hardware default of > > >

Re: [PATCH 2/2] pwm: pca9685: fix prescaler initialization

2017-01-19 Thread Clemens Gruber
On Thu, Jan 19, 2017 at 06:10:08PM +0200, Andy Shevchenko wrote: > Combining with your proposal I would see the best approach is to set > pca->period_ns accordingly to current prescaler value if you want to. Yes, I agree. > In your patch I see no benefit, since it's quite unlikely user will want

chipidea: udc: kernel panic in isr_setup_status_phase

2016-08-22 Thread Clemens Gruber
Hi, I am using an i.MX6Q embedded board, acting as a (ethernet) gadget with RNDIS function, connected over an USB OTG cable to a PC. Most of the time it works fine, but in some mysterious circumstances, a kernel panic occurs, just after attaching the OTG cable, connecting it to the other machine:

Re: chipidea: udc: kernel panic in isr_setup_status_phase

2016-09-02 Thread Clemens Gruber
On Fri, Sep 02, 2016 at 09:55:52AM +0800, Peter Chen wrote: > Do you have other 5V to USB_H1_VBUS? USB PHY needs 5V input voltage > as the source for USB LDO (3.0v), either from OTG or Host 1. I suspect > the lower vbus voltage causes the USB LDO voltage less than 3.0v, then > cause the unstable

Re: chipidea: udc: kernel panic in isr_setup_status_phase

2016-09-05 Thread Clemens Gruber
On Mon, Sep 05, 2016 at 11:10:22AM +0800, Peter Chen wrote: > How about below, it will set halt for device, and host will get stall > from the device. > > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c > index 0f692fc..3c46ccb 100644 > --- a/drivers/usb/chipidea/udc.c > +++

[PATCH] usb: chipidea: udc: fix NULL ptr dereference in isr_setup_status_phase

2016-09-05 Thread Clemens Gruber
are design. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/usb/chipidea/udc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index dfec5a1..b933568 100644 --- a/drivers/usb/chipidea/udc.c +++ b/dr

Re: chipidea: udc: kernel panic in isr_setup_status_phase

2016-08-30 Thread Clemens Gruber
On Mon, Aug 29, 2016 at 06:24:03PM +0800, Peter Chen wrote: > Would you please measure the voltage of vbus within 1s at below two > conditions: > > - Just connect cable > - Just disconnect cable We found out that there was a problem with our hardware design! But first, here is the VBUS

Re: chipidea: udc: kernel panic in isr_setup_status_phase

2016-08-28 Thread Clemens Gruber
On Sat, Aug 27, 2016 at 01:21:52AM +0800, Peter Chen wrote: > The gadget triggers UI interrupt due to host sends packet. > > I really can't understand that, why host does not send bus reset > before sending packet (eg, GET_DESCRIPTOR)? It violates USB spec. > > Are you sure the first interrupt

Re: chipidea: udc: kernel panic in isr_setup_status_phase

2016-08-25 Thread Clemens Gruber
On Wed, Aug 24, 2016 at 04:11:02PM +0800, Peter Chen wrote: > UEI is an error interrupt, and software have not handled it, so it will > not affect ci->status. > > > Should we only call isr_tr_complete_handler if UI && !UEI ? > > > > Or would adding a check for ci->status == NULL in

[PATCH v2 2/3] hwmon: (mcp3021) add devicetree bindings documentation

2016-10-27 Thread Clemens Gruber
Document the devicetree bindings for the Microchip MCP3021/3221. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- Documentation/devicetree/bindings/hwmon/mcp3021.txt | 21 + 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bi

[PATCH v2 3/3] hwmon: (mcp3021) replace S_IRUGO with 0444

2016-10-27 Thread Clemens Gruber
Replace S_IRUGO with the better readable 0444. This fixes a checkpatch warning. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/hwmon/mcp3021.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/mcp3021.c b/drivers/hwmon/mcp3021.c

[PATCH v2 1/3] hwmon: (mcp3021) rework for DT support

2016-10-27 Thread Clemens Gruber
Support setting the reference voltage from the device tree. Rework of driver structure, put chip specific data in a separate structure and assign it depending on device id from platform data or DT match. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- Documentation/hwmon/m

[PATCH v3 1/3] hwmon: (mcp3021) add devicetree support

2016-11-09 Thread Clemens Gruber
Support setting the reference voltage from the device tree. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/hwmon/mcp3021.c | 46 -- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/drivers/hwmon/mcp30

[PATCH v3 3/3] hwmon: (mcp3021) replace S_IRUGO with 0444

2016-11-09 Thread Clemens Gruber
Replace S_IRUGO with the better readable 0444. This fixes a checkpatch warning. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/hwmon/mcp3021.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/mcp3021.c b/drivers/hwmon/mcp3021.c

[PATCH v4 1/3] hwmon: (mcp3021) add devicetree support

2016-11-09 Thread Clemens Gruber
Support setting the reference voltage from the device tree. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/hwmon/mcp3021.c | 48 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/drivers/hwmon/mcp30

[PATCH 1/2] hwmon: (mcp3021) rework for DT support

2016-10-19 Thread Clemens Gruber
fixes a checkpatch warning. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- Documentation/hwmon/mcp3021 | 5 ++ drivers/hwmon/mcp3021.c | 143 +++- 2 files changed, 107 insertions(+), 41 deletions(-) diff --git a/Documentation

[PATCH 2/2] hwmon: (mcp3021) add devicetree bindings documentation

2016-10-19 Thread Clemens Gruber
Documents the devicetree bindings for the Microchip MCP3021/3221. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- Documentation/devicetree/bindings/hwmon/mcp3021.txt | 21 + 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bi

[PATCH] mcp3021: rework for DT support of reference-voltage

2016-10-18 Thread Clemens Gruber
change S_IRUGO to the better readable 0444, which fixes a checkpatch warning. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- .../devicetree/bindings/hwmon/mcp3021.txt | 21 +++ Documentation/hwmon/mcp3021| 5 + drivers/hwmon/mcp

[PATCH 1/2] pwm: pca9685: fix period change with same duty cycle

2016-12-13 Thread Clemens Gruber
the absolute value of the duty cycle in nanoseconds instead of the ratio to the period. Fix the problem by removing the shortcut. Fixes: 01ec8472009c9 ("pwm-pca9685: Support changing the output frequency") Cc: <sta...@vger.kernel.org> # v4.3+ Signed-off-by: Clemens Gruber <clemens.

[PATCH 2/2] pwm: pca9685: fix prescaler initialization

2016-12-13 Thread Clemens Gruber
sta...@vger.kernel.org> # v4.3+ Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/pwm/pwm-pca9685.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c index 01a6a83..efc657e 100644 --- a

Re: pca953x: lockdep warning since 4.10

2017-01-11 Thread Clemens Gruber
On Wed, Jan 11, 2017 at 02:43:31PM +0100, Linus Walleij wrote: > On Sat, Jan 7, 2017 at 9:54 PM, Clemens Gruber > <clemens.gru...@pqgruber.com> wrote: > > > I observed the following lockdep warning when booting an i.MX6Q board > > with several PCAL9555A gpio e

Re: imx: RS-485 problems during TX, maybe DMA related

2017-01-10 Thread Clemens Gruber
Hi Fabio, On Sun, Jan 08, 2017 at 07:46:29PM -0200, Fabio Estevam wrote: > > What's the revision of the i.MX6Q on your board? Mine is 1.5 (TO 1.3) > > Mine is a mx6solo rev1.1. Could it be dependent upon SMP? Do you have an i.MX6Q board around to try? -- I made a few interesting discoveries

Re: [PATCH] pwm: pca9685: Fix misuse of regmap_update_bits

2016-12-05 Thread Clemens Gruber
On Tue, Nov 29, 2016 at 06:02:50PM +0100, Florian Vaussard wrote: > Using regmap_update_bits(..., mask, 1) with 'mask' following (1 << k) > and k greater than 0 is wrong. Indeed, _regmap_update_bits will perform > (mask & 1), which results in 0 if LSB of mask is 0. Thus the call >

Re: imx: RS-485 problems during TX, maybe DMA related

2017-01-06 Thread Clemens Gruber
Hi Fabio, On Fri, Jan 06, 2017 at 07:22:32PM -0200, Fabio Estevam wrote: > Hi Clemens, > > On Wed, Jan 4, 2017 at 2:00 PM, Clemens Gruber > <clemens.gru...@pqgruber.com> wrote: > > Hi, > > > > I observed odd behavior of the current tty/serial/imx.c driver

eMMC boot problem: switch to bus width 8 ddr failed

2017-01-05 Thread Clemens Gruber
Hi, with the current mainline 4.10-rc2 kernel, I can no longer boot from the eMMC on my i.MX6Q board. Details: The eMMC is a Micron MTFC4GACAJCN-1M WT but as the i.MX6Q only supports eMMC 4.41 features and we did not implement voltage switching from 3.3V to 1.8V or lower, I did add no-1-8-v;

imx: RS-485 problems during TX, maybe DMA related

2017-01-04 Thread Clemens Gruber
Hi, I observed odd behavior of the current tty/serial/imx.c driver in RS-485 mode. RX works fine, but TX does not: When sending data, it arrives multiple times and with data from previous transmissions at the end, after a delay. # My setup Hardware: i.MX6Q board with UARTn_RX_DATA, _TX_DATA

pca953x: lockdep warning since 4.10

2017-01-07 Thread Clemens Gruber
Hi, I observed the following lockdep warning when booting an i.MX6Q board with several PCAL9555A gpio expanders connected over I2C. They are connected to 3 separate busses, there is no i2c-mux in use. This warning appears with the latest mainline Linux kernel 4.10-rc2: [0.671336] WARNING:

Re: imx: RS-485 problems during TX, maybe DMA related

2017-01-07 Thread Clemens Gruber
Hi Fabio, On Sat, Jan 07, 2017 at 07:43:48PM -0200, Fabio Estevam wrote: > Hi Clemens, > > On Sat, Jan 7, 2017 at 6:59 PM, Clemens Gruber > <clemens.gru...@pqgruber.com> wrote: > > > Great! > > > > Did you observe the same effect I described, with the

Re: imx: RS-485 problems during TX, maybe DMA related

2017-01-07 Thread Clemens Gruber
On Sat, Jan 07, 2017 at 02:48:03PM -0200, Fabio Estevam wrote: > On Sat, Jan 7, 2017 at 1:34 PM, Clemens Gruber > <clemens.gru...@pqgruber.com> wrote: > > Hi Fabio, > > > > On Sat, Jan 07, 2017 at 12:57:10PM -0200, Fabio Estevam wrote: > >> The MX6QDL_PAD

Re: imx: RS-485 problems during TX, maybe DMA related

2017-01-07 Thread Clemens Gruber
Hi Fabio, On Sat, Jan 07, 2017 at 12:57:10PM -0200, Fabio Estevam wrote: > The MX6QDL_PAD_CSI0_DAT16__UART4_CTS_B option is only valid in dte mode. Ah, the input select is limited in that way, I see. You wrote that you tried rts-gpios. What about setting cts-gpios to gpio6 2 in the DT? Or can

Re: imx: RS-485 problems during TX, maybe DMA related

2017-01-07 Thread Clemens Gruber
Hi Fabio, On Fri, Jan 06, 2017 at 10:31:16PM -0200, Fabio Estevam wrote: > Yes, I have tried like this: > > { > pinctrl-names = "default"; > pinctrl-0 = <_uart4>; > uart-has-rtscts; > status = "okay"; > }; > > pinctrl_uart4: uart4grp { > fsl,pins = < >

Re: imx: RS-485 problems during TX, maybe DMA related

2017-01-08 Thread Clemens Gruber
Hi Fabio, On Sun, Jan 08, 2017 at 12:30:24AM -0200, Fabio Estevam wrote: > Hi Clemens, > > On Sat, Jan 7, 2017 at 9:06 PM, Clemens Gruber > <clemens.gru...@pqgruber.com> wrote: > > > Just remuxed GPIO signals to these pads, applied your two patches and > > use

Re: pca953x: lockdep warning since 4.10

2017-01-08 Thread Clemens Gruber
On Sun, Jan 08, 2017 at 07:13:31PM +0100, Bartosz Golaszewski wrote: > 2017-01-07 21:54 GMT+01:00 Clemens Gruber <clemens.gru...@pqgruber.com>: > > Hi, > > > > I observed the following lockdep warning when booting an i.MX6Q board > > with several PCAL9555A

Re: eMMC boot problem: switch to bus width 8 ddr failed

2017-01-06 Thread Clemens Gruber
On Fri, Jan 06, 2017 at 10:33:49AM +0800, Shawn Lin wrote: > On 2017/1/6 8:41, Clemens Gruber wrote: > > Hi, > > > > with the current mainline 4.10-rc2 kernel, I can no longer boot from > > the eMMC on my i.MX6Q board. > > > > Details: >

Re: eMMC boot problem: switch to bus width 8 ddr failed

2017-01-06 Thread Clemens Gruber
On Fri, Jan 06, 2017 at 10:54:35AM +0800, Shawn Lin wrote: > On 2017/1/6 8:41, Clemens Gruber wrote: > > Hi, > > > > with the current mainline 4.10-rc2 kernel, I can no longer boot from > > the eMMC on my i.MX6Q board. > > > > Details: >

Re: [PATCH] serial: imx: Improve PIO prevention if TX DMA has been started

2017-08-14 Thread Clemens Gruber
Hello Uwe, On Mon, Aug 14, 2017 at 08:51:49AM +0200, Uwe Kleine-König wrote: > Hello Clemens, > > On Sun, Aug 13, 2017 at 12:07:56AM +0200, Clemens Gruber wrote: > > On Sat, Aug 12, 2017 at 09:54:51PM +0200, Uwe Kleine-König wrote: > > > On Sat, Aug 12, 2017 at 05:12:10

[PATCH] serial: imx: Improve PIO prevention if TX DMA has been started

2017-08-12 Thread Clemens Gruber
<ian@arkver.com> Cc: Uwe-Kleine König <u.kleine-koe...@pengutronix.de> Fixes: 514ab34dbad6 ("serial: imx: Prevent TX buffer PIO write when a DMA has been started") Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/tty/serial/imx.c | 3 ++- 1 file

Re: [PATCH] serial: imx: Improve PIO prevention if TX DMA has been started

2017-08-12 Thread Clemens Gruber
On Sat, Aug 12, 2017 at 09:54:51PM +0200, Uwe Kleine-König wrote: > On Sat, Aug 12, 2017 at 05:12:10PM +0200, Clemens Gruber wrote: > > The imx_transmit_buffer function should return if TX DMA has already > > been started and not just skip over the buffer PIO write loop. (Wh

Re: [PATCH] serial: imx: disable DMA for RS-485 on i.MX6 SMP

2017-07-02 Thread Clemens Gruber
Hi Fabio, Hi Romain, On Fri, Jun 30, 2017 at 09:15:31AM -0300, Fabio Estevam wrote: > Hi Clemens, > > On Wed, Jun 21, 2017 at 11:12 AM, Fabio Estevam wrote: > > >> I'd also prefer fixing the underlying problem. > > > > Yes, that would be much better. > > Just saw Romain's

Re: serial: imx: disable DMA for RS-485 on i.MX6 SMP

2017-07-02 Thread Clemens Gruber
;dma_is_inited && !sport->rs485_enabled) > > Could you please test the two attached patches and see if it solves the issue? > > Unfortunately I no longer have access to the RS485 half-duplex board. > > Just make sure to pass 'linux,rs485-enabled-at-boot-time' in

Re: [PATCH v2 3/6] serial: imx: remove CTSC and CTS handling

2017-07-05 Thread Clemens Gruber
Hi, On Wed, Jul 05, 2017 at 03:38:45PM +0200, Uwe Kleine-König wrote: > Cc += Clemens Gruber + Fabio Estevam > > On Wed, Jul 05, 2017 at 03:07:03PM +0200, Romain Perier wrote: > > From: Nandor Han <nandor@ge.com> > > > > CTSC and CTS are not related to

Re: [PATCH] serial: imx: disable DMA for RS-485 on i.MX6 SMP

2017-06-21 Thread Clemens Gruber
Hi Fabio, On Tue, Jun 20, 2017 at 01:13:18PM -0300, Fabio Estevam wrote: > The subject gives the impression that the DMA will only be disabled > for RS485, but the impact of this change is wider. > > For example: if I have a mx6q system with a Bluetooth serial > connection I can no longer use

[PATCH] serial: imx: disable DMA for RS-485 on i.MX6 SMP

2017-06-20 Thread Clemens Gruber
the DT and CONFIG_SMP enabled. Fixes: 17b8f2a3fdca ("serial: imx: add support for half duplex rs485") Cc: <sta...@vger.kernel.org> Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/tty/serial/imx.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(

[PATCH] i2c: imx: fix misleading bus recovery debug message

2017-10-09 Thread Clemens Gruber
The arguments for SDA and SCL were swapped. Fix it. Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com> --- drivers/i2c/busses/i2c-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 54a47b

[PATCH] serial: imx: Improve PIO prevention if TX DMA has been started

2017-08-12 Thread Clemens Gruber
Cc: Uwe-Kleine König Fixes: 514ab34dbad6 ("serial: imx: Prevent TX buffer PIO write when a DMA has been started") Signed-off-by: Clemens Gruber --- drivers/tty/serial/imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/se

  1   2   3   4   >