Integrate linux-imx-kuk/linux-5.15.32-seco-santvend
Commit: seco-ne/kernel/linux-imx-kuk@be9e1ffe
video: fbdev: mxc_ipuv3_fb: Set default value for bits_per_pixel
We have to set up bits_per_pixel here for the first time, otherwise, it will be set to 16bpp always to user space in var info.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@8ba9eef6
video: fbdev: mxc_ipuv3_fb: Add syncronous enable/disable of the IPU
Add helper function for syncronous enable and disable of the IPU during the power sequence for the display.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@89969b5e
video: fbdev: mxc_ipuv3_fb: Update mxcfb_set_par
Port changes from linux 4.1 kernel.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@b4898bff
video: fbdev: mxc: lcdif: Add Display sync flags override
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@c1c71fd9
video: fbdev: mxc: lcdif: fb_videomode from DT
Add the ability to read video mode ("mode_str") from device tree.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@17792557
video: fbdev: mxc: ldb: Add display sequence
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@7b54c75b
video: mxc: Add "forbid_int_pixclk" property
Forbid driver to use internal IPU-HSP clock as base-clock for the pixel clock (necessary on Solo/DualLite to run the IPU at max. clock speed but still allow spread-spectrum clocking of the pixel-clock).
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@954cdea5
video: fbdev: mxc: hdmi: Add "edid-overwrite" property
There was an option in previous kernels to override EDID info from device tree. At the moment it is not used by any board. Just in case, port the feature.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@7b7c524f
video: fbdev: mxc: hdmi: Add display sequence
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@d422f9f8
video: fbdev: mxc: ldb: Add Display sync flags override
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@a27726c9
video: fbdev: mxc: ldb: Add "fsl,sel6_8-polarity" and "fsl,sel6_8-gpio"
This allows to configure GPIO via device tree for SEL68 signal (6/8bit LVDS data input selection).
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@b1938dc9
video: fbdev: mxc: ldb: Add display sequence
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@fc825f0a
video: fbdev: Add callbacks for signal enable
These callbacks are used in custom display power sequence for HDMI, LDB and LCDIF.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@cbcf637b
video: fbdev: mxc: Adjust screen unblanking
Leave HDMI blank by default, unblank in cable connect routine.
Unblank the very first framebuffer to prevent that a secondary not-in-use framebuffer steals IPU bandwidth that causes IPU_INT_STAT* exceptions.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@50531849
ipu3: fix stripe calculation
fix a couple of calculations that I believe should not be adjusting the width by 1. This patch resolves 8-byte alignment errors when transforming to I420 mode by fixing the fact that spliting a 1280 width by 2 should result in a 640/640 split instead of 632/648. When the split is un-even it can result in the U and/or V offsets not being 8-byte aligned which causes a Y and UV mis-alignment in the 2nd strip of the image which is clearly visible.
Link: https://github.com/Gateworks/linux-imx6/commit/0d54f90b94a0d968241847226f70e189b15900ea
Signed-off-by: Tim Harvey tharvey@gateworks.com
--
Commit: seco-ne/kernel/linux-imx-kuk@264cd25f
mxc: ipu3: limit number of request in IDMAC
Enable feature to limit number of pending non-realtime requests in IDMAC. This fixes IPU FIFO underruns in high-res dual-display setups.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@3046f7aa
video: fbdev: mxc: Add GuF display support files
The commit adds helper functions to control display power and sync flags. Ported from linux 4.1.15.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@466da9ce
video: backlight: Add backlight_{get/set}_power()
These functions are used by display control helper (disp_ctrl.c).
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@9f5b1ca0
arm:dts:santvend: Update ldb node for NXP kernel
Signed-off-by: Mikhail Vanyulin mikhail.vanyulin@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@e59f5a88
Revert "net: fec: force mii bus runtime pm suspend during device suspend"
This reverts commit 274c03a54122d2d56427ce4fbe2d019dab00c818.
After applying commit 91a7cda1 ("net: phy: Fix race condition on link status change") on current NXP branch, a new problem appears: sometimes the board failed to suspend due to a deadlock in the network subsystem.
[ 85.862077] PM: suspend entry (deep) [ 85.889548] Filesystems sync: 0.022 seconds [ 85.966869] Freezing user space processes ... (elapsed 0.008 seconds) done. [ 85.983522] OOM killer disabled. [ 85.987342] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done. [ 86.066921] fec 2188000.ethernet eth0: Link is Down [ 86.072680] ------------[ cut here ]------------ [ 86.077808] WARNING: CPU: 0 PID: 899 at drivers/net/phy/phy.c:969 phy_error+0x20/0x68 [ 86.085814] Modules linked in: [ 86.088940] CPU: 0 PID: 899 Comm: irq/115-2188000 Not tainted 5.15.32-06057-g2ab27b58ed04 #28 [ 86.097486] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 86.104029] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 86.111807] [] (show_stack) from [] (dump_stack_lvl+0x58/0x70) [ 86.119406] [] (dump_stack_lvl) from [] (__warn+0xd4/0x154) [ 86.126743] [] (__warn) from [] (warn_slowpath_fmt+0x74/0xa8) [ 86.134249] [] (warn_slowpath_fmt) from [] (phy_error+0x20/0x68) [ 86.142012] [] (phy_error) from [] (smsc_phy_handle_interrupt+0x58/0x60) [ 86.150473] [] (smsc_phy_handle_interrupt) from [] (phy_interrupt+0xa8/0xe0) [ 86.159278] [] (phy_interrupt) from [] (irq_thread_fn+0x1c/0x78) [ 86.167045] [] (irq_thread_fn) from [] (irq_thread+0x154/0x294) [ 86.174722] [] (irq_thread) from [] (kthread+0x144/0x168) [ 86.181886] [] (kthread) from [] (ret_from_fork+0x14/0x38) [ 86.189129] Exception stack(0xc445ffb0 to 0xc445fff8) [ 86.194194] ffa0: 00000000 00000000 00000000 00000000 [ 86.202385] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 86.210575] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 86.217359] irq event stamp: 123 [ 86.220606] hardirqs last enabled at (131): [] __up_console_sem+0x50/0x60 [ 86.228582] hardirqs last disabled at (140): [] __up_console_sem+0x3c/0x60 [ 86.228629] softirqs last enabled at (122): [] __do_softirq+0x300/0x5b8 [ 86.228648] softirqs last disabled at (107): [] __irq_exit_rcu+0x160/0x1d8 [ 86.228669] ---[ end trace f05ce4efa956a935 ]--- [ 86.228898] [ 86.228903] ============================================ [ 86.263364] WARNING: possible recursive locking detected [ 86.263370] 5.15.32-06057-g2ab27b58ed04 #28 Tainted: G W [ 86.263376] -------------------------------------------- [ 86.263380] irq/115-2188000/899 is trying to acquire lock: [ 86.263386] c4b74ce8 (&dev->lock){+.+.}-{3:3}, at: phy_error+0x2c/0x68 [ 86.263418] [ 86.263418] but task is already holding lock: [ 86.263421] c4b74ce8 (&dev->lock){+.+.}-{3:3}, at: phy_interrupt+0x9c/0xe0 [ 86.263443] [ 86.263443] other info that might help us debug this: [ 86.263447] Possible unsafe locking scenario: [ 86.263447] [ 86.263450] CPU0 [ 86.263453] ---- [ 86.263456] lock(&dev->lock); [ 86.263464] lock(&dev->lock); [ 86.263472] [ 86.263472] *** DEADLOCK *** [ 86.263472] [ 86.263475] May be due to missing lock nesting notation [ 86.263475] [ 86.263478] 1 lock held by irq/115-2188000/899: [ 86.263485] #0: c4b74ce8 (&dev->lock){+.+.}-{3:3}, at: phy_interrupt+0x9c/0xe0 [ 86.263509] [ 86.263509] stack backtrace: [ 86.263514] CPU: 0 PID: 899 Comm: irq/115-2188000 Tainted: G W 5.15.32-06057-g2ab27b58ed04 #28 [ 86.263524] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 86.263533] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 86.263554] [] (show_stack) from [] (dump_stack_lvl+0x58/0x70) [ 86.263572] [] (dump_stack_lvl) from [] (__lock_acquire+0x14d0/0x2e24) [ 86.263589] [] (__lock_acquire) from [] (lock_acquire+0x130/0x420) [ 86.263602] [] (lock_acquire) from [] (__mutex_lock+0x94/0xa38) [ 86.263619] [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) [ 86.263631] [] (mutex_lock_nested) from [] (phy_error+0x2c/0x68) [ 86.263645] [] (phy_error) from [] (smsc_phy_handle_interrupt+0x58/0x60) [ 86.263660] [] (smsc_phy_handle_interrupt) from [] (phy_interrupt+0xa8/0xe0) [ 86.263672] [] (phy_interrupt) from [] (irq_thread_fn+0x1c/0x78) [ 86.263687] [] (irq_thread_fn) from [] (irq_thread+0x154/0x294) [ 86.263700] [] (irq_thread) from [] (kthread+0x144/0x168) [ 86.263719] [] (kthread) from [] (ret_from_fork+0x14/0x38) [ 86.263733] Exception stack(0xc445ffb0 to 0xc445fff8) [ 86.263741] ffa0: 00000000 00000000 00000000 00000000 [ 86.263749] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 86.263756] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 86.518543] PM: suspend devices took 0.520 seconds
Meanwhile, suspend works well on mainline kernel. Searching the difference led to drivers/net/freescale. There are several changes in fec_suspend(). Reverting the commit to fix the suspend problem.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@34983a35
net: phy: Fix race condition on link status change
commit 91a7cda1f4b8bdf770000a3b60640576dafe0cec upstream.
This fixes the following error caused by a race condition between phydev->adjust_link() and a MDIO transaction in the phy interrupt handler. The issue was reproduced with the ethernet FEC driver and a micrel KSZ9031 phy.
[ 146.195696] fec 2188000.ethernet eth0: MDIO read timeout [ 146.201779] ------------[ cut here ]------------ [ 146.206671] WARNING: CPU: 0 PID: 571 at drivers/net/phy/phy.c:942 phy_error+0x24/0x6c [ 146.214744] Modules linked in: bnep imx_vdoa imx_sdma evbug [ 146.220640] CPU: 0 PID: 571 Comm: irq/128-2188000 Not tainted 5.18.0-rc3-00080-gd569e86915b7 #9 [ 146.229563] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 146.236257] unwind_backtrace from show_stack+0x10/0x14 [ 146.241640] show_stack from dump_stack_lvl+0x58/0x70 [ 146.246841] dump_stack_lvl from __warn+0xb4/0x24c [ 146.251772] __warn from warn_slowpath_fmt+0x5c/0xd4 [ 146.256873] warn_slowpath_fmt from phy_error+0x24/0x6c [ 146.262249] phy_error from kszphy_handle_interrupt+0x40/0x48 [ 146.268159] kszphy_handle_interrupt from irq_thread_fn+0x1c/0x78 [ 146.274417] irq_thread_fn from irq_thread+0xf0/0x1dc [ 146.279605] irq_thread from kthread+0xe4/0x104 [ 146.284267] kthread from ret_from_fork+0x14/0x28 [ 146.289164] Exception stack(0xe6fa1fb0 to 0xe6fa1ff8) [ 146.294448] 1fa0: 00000000 00000000 00000000 00000000 [ 146.302842] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 146.311281] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 146.318262] irq event stamp: 12325 [ 146.321780] hardirqs last enabled at (12333): [] __up_console_sem+0x50/0x60 [ 146.330013] hardirqs last disabled at (12342): [] __up_console_sem+0x3c/0x60 [ 146.338259] softirqs last enabled at (12324): [] __do_softirq+0x2c0/0x624 [ 146.346311] softirqs last disabled at (12319): [] __irq_exit_rcu+0x138/0x178 [ 146.354447] ---[ end trace 0000000000000000 ]---
With the FEC driver phydev->adjust_link() calls fec_enet_adjust_link() calls fec_stop()/fec_restart() and both these function reset and temporary disable the FEC disrupting any MII transaction that could be happening at the same time.
fec_enet_adjust_link() and phy_read() can be running at the same time when we have one additional interrupt before the phy_state_machine() is able to terminate.
Thread 1 (phylib WQ) | Thread 2 (phy interrupt) | | phy_interrupt() <-- PHY IRQ | handle_interrupt() | phy_read() | phy_trigger_machine() | --> schedule phylib WQ | | phy_state_machine() | phy_check_link_status() | phy_link_change() | phydev->adjust_link() | fec_enet_adjust_link() | --> FEC reset | phy_interrupt() <-- PHY IRQ | phy_read() |
Fix this by acquiring the phydev lock in phy_interrupt().
Link: https://lore.kernel.org/all/20220422152612.GA510015@francesco-nb.int.toradex.com/ Fixes: c974bdbc3e77 ("net: phy: Use threaded IRQ, to allow IRQ from sleeping devices") cc: stable@vger.kernel.org Signed-off-by: Francesco Dolcini francesco.dolcini@toradex.com Reviewed-by: Andrew Lunn andrew@lunn.ch Link: https://lore.kernel.org/r/20220506060815.327382-1-francesco.dolcini@toradex.com Signed-off-by: Jakub Kicinski kuba@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
--
Commit: seco-ne/kernel/linux-imx-kuk@c98ea028
i2c: imx: Fix deadlock in i2c_imx_start() call
The following warning can be observed starting from commit 4f7ad5de1107 ("MLK-20368 i2c-imx: Coverity: fix divide by zero warning"):
[ 47.565451] ====================================================== [ 47.571642] WARNING: possible circular locking dependency detected [ 47.577835] 5.15.32 #1 Tainted: G O [ 47.582641] ------------------------------------------------------ [ 47.588828] kworker/0:3/171 is trying to acquire lock: [ 47.593979] c1650af4 (prepare_lock){+.+.}-{3:3}, at: clk_prepare_lock+0x3c/0xec [ 47.601362] [ 47.601362] but task is already holding lock: [ 47.607205] c41df884 (i2c_register_adapter){+.+.}-{3:3}, at: i2c_transfer+0x88/0x108 [ 47.615003] [ 47.615003] which lock already depends on the new lock. [ 47.615003] [ 47.623186] [ 47.623186] the existing dependency chain (in reverse order) is: [ 47.630672] [ 47.630672] -> #1 (i2c_register_adapter){+.+.}-{3:3}: [ 47.637225] i2c_transfer+0x88/0x108 [ 47.641335] pcf8563_clkout_recalc_rate+0x78/0xdc [rtc_pcf8563_guf] [ 47.648167] __clk_register+0x2d8/0x840 [ 47.652536] devm_clk_register+0x54/0xb0 [ 47.656988] pcf8563_probe+0x1c8/0x2c4 [rtc_pcf8563_guf] [ 47.662837] i2c_device_probe+0x2a0/0x2c8 [ 47.667378] really_probe.part.0+0x9c/0x32c [ 47.672100] __driver_probe_device+0xa0/0x138 [ 47.676988] driver_probe_device+0x30/0x10c [ 47.681702] __driver_attach+0xb4/0x174 [ 47.686069] bus_for_each_dev+0x74/0xc0 [ 47.690435] bus_add_driver+0xf0/0x1d8 [ 47.694714] driver_register+0x88/0x118 [ 47.699078] i2c_register_driver+0x3c/0xac [ 47.703704] do_one_initcall+0x78/0x380 [ 47.708074] do_init_module+0x40/0x24c [ 47.712360] sys_finit_module+0xb4/0xf8 [ 47.716728] ret_fast_syscall+0x0/0x2c [ 47.721007] 0xbefcfb68 [ 47.723980] [ 47.723980] -> #0 (prepare_lock){+.+.}-{3:3}: [ 47.729839] lock_acquire+0x130/0x420 [ 47.734035] __mutex_lock+0x94/0xa38 [ 47.738145] mutex_lock_nested+0x1c/0x24 [ 47.742597] clk_prepare_lock+0x3c/0xec [ 47.746968] clk_get_rate+0x10/0x68 [ 47.750985] i2c_imx_start+0x14/0x170 [ 47.755183] i2c_imx_xfer_common+0x24/0xaf4 [ 47.759897] i2c_imx_xfer+0x19c/0x34c [ 47.764089] __i2c_transfer+0x1c0/0x9b4 [ 47.768454] i2c_transfer+0x98/0x108 [ 47.772558] i2c_transfer_buffer_flags+0x4c/0x80 [ 47.777704] regmap_i2c_write+0x14/0x30 [ 47.782078] _regmap_raw_write_impl+0x690/0x880 [ 47.787139] _regmap_bus_raw_write+0x78/0xa4 [ 47.791938] _regmap_write+0x4c/0x1d4 [ 47.796129] _regmap_update_bits+0xe8/0xf4 [ 47.800756] regmap_update_bits_base+0x50/0x74 [ 47.805729] regulator_set_voltage_sel_regmap+0x48/0x98 [ 47.811488] _regulator_call_set_voltage_sel+0x64/0xb0 [ 47.817163] _regulator_do_set_voltage+0x518/0x778 [ 47.822483] regulator_set_voltage_rdev+0xc0/0x2a4 [ 47.827803] regulator_do_balance_voltage+0x380/0x538 [ 47.833383] regulator_set_voltage_unlocked+0xd8/0x11c [ 47.839050] regulator_set_voltage_rdev+0x250/0x2a4 [ 47.844457] regulator_do_balance_voltage+0x380/0x538 [ 47.850037] regulator_set_voltage_unlocked+0xd8/0x11c [ 47.855703] regulator_set_voltage+0x44/0x84 [ 47.860502] imx6q_set_target+0x144/0x598 [ 47.865048] __cpufreq_driver_target+0x190/0x244 [ 47.870195] od_dbs_update+0xb0/0x160 [ 47.874388] dbs_work_handler+0x2c/0x60 [ 47.878754] process_one_work+0x294/0x7bc [ 47.883294] worker_thread+0x4c/0x558 [ 47.887484] kthread+0x144/0x168 [ 47.891247] ret_from_fork+0x14/0x38 [ 47.895351] 0x0 [ 47.897715] [ 47.897715] other info that might help us debug this: [ 47.897715] [ 47.905722] Possible unsafe locking scenario: [ 47.905722] [ 47.911643] CPU0 CPU1 [ 47.916175] ---- ---- [ 47.920707] lock(i2c_register_adapter); [ 47.924728] lock(prepare_lock); [ 47.930571] lock(i2c_register_adapter); [ 47.937110] lock(prepare_lock); [ 47.940435] [ 47.940435] *** DEADLOCK *** [ 47.940435] [ 47.946357] 7 locks held by kworker/0:3/171: [ 47.950633] #0: c40066a8 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x1ec/0x7bc [ 47.959366] #1: c48a7f28 ((work_completion)(&policy_dbs->work)){+.+.}-{0:0}, at: process_one_work+0x1ec/0x7bc [ 47.969400] #2: c4c07abc (&policy_dbs->update_mutex){+.+.}-{3:3}, at: dbs_work_handler+0x20/0x60 [ 47.978309] #3: c48a7e30 (regulator_ww_class_acquire){+.+.}-{0:0}, at: regulator_set_voltage+0x30/0x84 [ 47.987737] #4: c4b140c0 (regulator_ww_class_mutex){+.+.}-{3:3}, at: regulator_lock_recursive+0x84/0x1d8 [ 47.997342] #5: c42c7c38 (pfuze100_regulator:725:(&pfuze_regmap_config)->lock){+.+.}-{3:3}, at: regmap_update_bits_base+0x2c/0x74 [ 48.009117] #6: c41df884 (i2c_register_adapter){+.+.}-{3:3}, at: i2c_transfer+0x88/0x108 [ 48.017328] [ 48.017328] stack backtrace: [ 48.021691] CPU: 0 PID: 171 Comm: kworker/0:3 Tainted: G O 5.15.32 #1 [ 48.029446] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 48.035981] Workqueue: events dbs_work_handler [ 48.040447] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 48.048217] [] (show_stack) from [] (dump_stack_lvl+0x58/0x70) [ 48.055812] [] (dump_stack_lvl) from [] (check_noncircular+0xf4/0x168) [ 48.064098] [] (check_noncircular) from [] (__lock_acquire+0x1634/0x2e24) [ 48.072640] [] (__lock_acquire) from [] (lock_acquire+0x130/0x420) [ 48.080571] [] (lock_acquire) from [] (__mutex_lock+0x94/0xa38) [ 48.088246] [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) [ 48.096265] [] (mutex_lock_nested) from [] (clk_prepare_lock+0x3c/0xec) [ 48.104639] [] (clk_prepare_lock) from [] (clk_get_rate+0x10/0x68) [ 48.112573] [] (clk_get_rate) from [] (i2c_imx_start+0x14/0x170) [ 48.120336] [] (i2c_imx_start) from [] (i2c_imx_xfer_common+0x24/0xaf4) [ 48.128705] [] (i2c_imx_xfer_common) from [] (i2c_imx_xfer+0x19c/0x34c) [ 48.137074] [] (i2c_imx_xfer) from [] (__i2c_transfer+0x1c0/0x9b4) [ 48.145008] [] (__i2c_transfer) from [] (i2c_transfer+0x98/0x108) [ 48.152852] [] (i2c_transfer) from [] (i2c_transfer_buffer_flags+0x4c/0x80) [ 48.161565] [] (i2c_transfer_buffer_flags) from [] (regmap_i2c_write+0x14/0x30) [ 48.170631] [] (regmap_i2c_write) from [] (_regmap_raw_write_impl+0x690/0x880) [ 48.179609] [] (_regmap_raw_write_impl) from [] (_regmap_bus_raw_write+0x78/0xa4) [ 48.188844] [] (_regmap_bus_raw_write) from [] (_regmap_write+0x4c/0x1d4) [ 48.197385] [] (_regmap_write) from [] (_regmap_update_bits+0xe8/0xf4) [ 48.205664] [] (_regmap_update_bits) from [] (regmap_update_bits_base+0x50/0x74) [ 48.214813] [] (regmap_update_bits_base) from [] (regulator_set_voltage_sel_regmap+0x48/0x98) [ 48.225094] [] (regulator_set_voltage_sel_regmap) from [] (_regulator_call_set_voltage_sel+0x64/0xb0) [ 48.236072] [] (_regulator_call_set_voltage_sel) from [] (_regulator_do_set_voltage+0x518/0x778) [ 48.246611] [] (_regulator_do_set_voltage) from [] (regulator_set_voltage_rdev+0xc0/0x2a4) [ 48.256627] [] (regulator_set_voltage_rdev) from [] (regulator_do_balance_voltage+0x380/0x538) [ 48.266990] [] (regulator_do_balance_voltage) from [] (regulator_set_voltage_unlocked+0xd8/0x11c) [ 48.277614] [] (regulator_set_voltage_unlocked) from [] (regulator_set_voltage_rdev+0x250/0x2a4) [ 48.288151] [] (regulator_set_voltage_rdev) from [] (regulator_do_balance_voltage+0x380/0x538) [ 48.298514] [] (regulator_do_balance_voltage) from [] (regulator_set_voltage_unlocked+0xd8/0x11c) [ 48.309137] [] (regulator_set_voltage_unlocked) from [] (regulator_set_voltage+0x44/0x84) [ 48.319065] [] (regulator_set_voltage) from [] (imx6q_set_target+0x144/0x598) [ 48.327960] [] (imx6q_set_target) from [] (__cpufreq_driv
This deadlock is caused by clk_get_rate() in the i2c_imx_start() call.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@6b12c0c1
cpufreq: imx6q: Add ldo-bypass feature
The internal ldo can be used to generate some internal supplies but it is also possible to set the voltage correctly in the PMIC and bypass the ldo completely, which is the preferred mode. This patch implements such bypass.
The feature is ported from Jethro BSP (linux-imx-4.5.15).
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@38ace581
regulator: Add regulator_get_name() and regulator_get_supply()
Add new calls to regulator core which return the name and supply for specified regulator. This functionality is needed to implement the bypassing of LDO.
The feature is ported from Jethro BSP (linux-imx-4.5.15).
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@41919098
regulator: anatop: Set supply_name from device tree
Set a supply_name in regulator_desc for vin-supply based on value from device tree. This is needed to implement an LDO bypass.
This feature is ported from Jethro BSP (linux-imx-4.5.15).
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@d6f4a7c8
regulator: pfuze100: Fix shutdown callback
During testing of shutdown feature on SantVend board it was discovered that in some cases (one out of five):
- a board turns off immediately after a power-off gpio is asserted (and not after 4 seconds);
- but after 4 seconds, the board turns on again.
The problem appears only when edge triggering mode has been configured in shutdown callback - see "regulator: pfuze100: Implement an off state"
After experimenting it has been found that the issue cannot be reproduced when:
- the edge triggered mode is configured in the driver at boot time (and not in shutdown callback);
- the edge triggered mode is configured after boot in userspace via i2cset commands (and not in shutdown callback);
- a huge delay (about 15sec) is added after setting the edge triggered mode in shutdown callback;
- a small delay (10ms) is added after each regmap_write call during setting the edge triggered mode in shutdown callback.
It looks like PMIC needs some time to apply the changes performed via regmap_write() calls when the edge triggered mode is activated. And if regmap_write() calls are issued without delays, the PMIC gets fail to process them, despite the fact that proper values can be read back from registers.
So, the commit adds small delays between i2c commands to work around this issue.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@49fe8c08
regulator: pfuze100: Add support of SYSTEM_SCHEDULING state
After switching to 5.15 kernel, PMIC setting are not restored properly after boot. The problem is casued by new system state, which was added in 'commit 69a78ff226fe ("init: Introduce SYSTEM_SCHEDULING state")'
Update "pfuze100_reset_factory_defaults" function to take this new state into account.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@6ead645d
dt-bindings: pfuze100: Add optional poweroff-capable
Document an optional property "poweroff-capable" for the PFUZE100 driver.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@6cd44474
regulator: pfuze100: Implement an off state
Add support of "off" state for pfuze100 chip:
- add a shutdown callback to the driver;
- switch to the edge triggered mode when the device is in shutdown state;
- after booting, restore the settings for pfuze100 back to factory defaults (including level triggred mode).
The feature is ported from Jethro BSP (linux-imx-4.5.15).
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@ca569707
spi: spidev: Add Wurth Elektronik Proteus-III device compatible
Add compatible string for Wurth Elektronik Proteus-III device.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@d2143dc0
spi: spidev: Make spidev_class public
The "spidev_class" structure will be also used in spidevas driver. So make it public using EXPORT_SYMBOL_GPL macro.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@f4ca8422
spi: spidevas: Port main changes
This includes it's own chip select and "ready" interrupt handling. The changes are ported from Jethro BSP (linux-imx-4.1.15).
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@c1bb6cdc
spi: spidevas: Get rid of spidev_probe_acpi
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@49aa6635
spi: spidevas: Update compatible list
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@ef7e487f
spi: spidevas: use spi_async instead of spi_sync
Revert changes introduced in commit 98d6f4795800 ("spi: spidev: use spi_sync instead of spi_async")
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@3dee7718
spi: spidevas: Add async spidev driver
For now it's just a copy of current spidev driver.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@1866c75a
spi: imx: Add support of SPI_LSB_FIRST mode
SANTVEND v1.2 is equipped with ISP091201 Bluetooth LE module, based on Nordic Semiconductor nRF8001 chip. The chip sends data in LSB mode.
Add bit order reversal to i.MX SPI controller driver to work with nRF8001.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@a7622f7e
USB: serial: option: Specify ZLP for Quectel EC21/EC25
According to the Quectel WCDMA<E Linux USB Driver User Guide [1] the ZLP is required for Quectel UCxx/EC2x/EGxx/EP06/EM06/BG96/AG35 for processing zero packets during bulk out transmission.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@763543f8
USB: serial: qcserial: Add product IDs for Quectel EC21/EC25
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@b9b0dc43
net: usb: qmi_wwan: Add USB IDs for Quectel EC21/EC25
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@12da646e
hwmon: (tmp116) Add debug output
By analogy with Jethro BSP, for debugging purpose, make it possible to print raw values for all sensors. To enable this feature, define a DEBUG symbol at the beginning of the file.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@22ce741b
dt-bindings: hwmon: Add TI TMP116 bindings
Document bindings for the Texas Instruments TMP116 driver.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@c459e758
hwmon: (tmp116) Add TI TMP116 driver
Initial commit for a TMP116 driver. The code is ported from Jethro BSP (linux-imx-4.1.15) and is based on the ad7414 driver.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@b02e2235
ARM: errata: workaround Cortex-A9 errata 845369
Under very rare timing circumstances, transition into streaming mode might create a data corruption. Exists on all Cortex-A9 revisions.
Signed-off-by: Nitin Garg nitin.garg@freescale.com Link: https://u-boot.denx.narkive.com/pI5AD3NE/patch-v3-1-2-arm-add-workaround-for-cortex-a9-errata-845369 Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@ec32f259
ARM: errata: workaround Cortex-A9 errata 761320 and 794072
Add workaround for Cortex-A9 errata 761320 ([present on r0, r1, r2, r3) and 794072 (present on all revisions). These are Category B, present on SMP systems.
Signed-off-by: Nitin Garg nitin.garg@freescale.com Link: https://patchwork.kernel.org/project/linux-arm-kernel/patch/1396298072-13254-2-git-send-email-nitin.garg@freescale.com/ Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@bbb9703d
arm:dts:santvend: Initial update for NXP kernel
Signed-off-by: Mikhail Vanyulin mikhail.vanyulin@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@47ad1202
arm:dts: Add support for SANTVEND
Add support for SECO SANTVEND platform. The SANTVEND platform is based on NXP i.MX6 Solo, DualLite, Dual or Quad SoCs. This platform supports:
- Audio;
- Buttons;
- CAN;
- eMMC;
- External battery;
- I2C Touch Controller;
- LEDs;
- LVDS Display;
- MDB;
- RS232;
- RTC;
- SD-Card;
- Temperature Sensor;
- USB.
Copy initial version of dts and dtsi for imx6q SantVend board as is from linux-5.15.29-guf repo. commit 744d4f96755e ("arm: dts: imx6qdl-santvend: Fix style issues")
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@2342f232
arm:dts:san*: Drop "fsl,mode" property from ssi* nodes
According to Documentation/devicetree/bindings/sound/fsl,ssi.txt, a 'fsl,mode' property should be specified for AC97 mode of operation only. But existing codecs (like SGTL) work in I2S mode. So, remove these properties from ssi* nodes for all "San" boards.
Signed-off-by: Mikhail Vanyulin mikhail.vanyulin@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@e09ec80b
arm:dts:san*: Fix compatible string for rtc-pcf8563
Update a compatible string in the "rtc" node for all SAN boards. The device uses an out-of-tree driver with SECO specific changes. A new compatible ID can be found in the source code of the driver [1].
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@ad420d16
arm:dts:san*: Add missing pin-muxes for SANTVEND
The commit adds pin-muxes configuration which is specific for SANTVEND platform.
And according to current device tree abstraction schema and to internal rules, pin-muxes for iomuxc node are added to device tree with definitions common for all SAN* platforms.
Signed-off-by: Dmitry Petrov dmitry.petrov@rtsoft.de
--
Commit: seco-ne/kernel/linux-imx-kuk@2fe06607
arm:dts: Groundwork for Garz & Fricke i.MX6 systems
Add create Garz & Fricke directory below arch/arm/boot/dts to keep the Garz & Fricke specific files separated. This is not the "common" mainline approach for ARM dts definitions, however it is the practice for ARM64 platform.
Add the common imx6qdl-san.dtsi include file that is common for all garz & Fricke SAN* platforms. Later commits will add those separately.
- Add aliases for all platforms
- Add default std-out
- Add common audio parts like audio amplifier, audio-codec-clock, sgtl5000, ssi
- Add backlight
- Add gfplatdetect
- Add common regulators
- Configure AUDMUX for different platforms. The actual routing is done in the platform definition
- Add CAN
- Add common clock definition for the IPU
- Add Fast Ethernet Controller (FEC)
- Add I2C1, I2C2 and I2C3
- Add all pinctrl entries.
- Add UARTs
- Add USB ports
- Add USDHC
- Add watchdog reset pin
--
Commit: seco-ne/kernel/linux-imx-kuk@7a6c0412
arm:setup: Add Garz & Fricke version detection
This patchset adds Garz & Fricke specific version info to the mainline kernel. It adds information to /proc/cpuinfo, exports symbols to be used by a separate Garz & Fricke versioning module and exports the ATAG_Version (used for the Flash-N-Go Boot bootloader version) to the device tree.
On previous implementations we introduced the board revision and the bootloader revision in the /proc/cpuinfo. Because of legacy consumers namely the install script, the demos and maybe more tools, we decided to add those also to this more mainline kernel.
The detection itself should come from a platform-detection module and may be built out of kernel.
Add the variables for the board revision and the Flash-N-Go Boot bootloader version, export them and show the contents in the /proc/cpuinfo entry.
For a platform detection module more information of the actual hardware is needed. Specifically the mxc_cpu_type and the iMX SoC revision information is needed.
Avoid exporting the __mxc_cpu_type though, as it should not be overwritten by an external module.
Thus add a new function mxc_get_cpu_type and export both, the newly added function and the imx_get_soc_revision.
The modification of the machine name is not possible if the machine name is not exported. Thus export the machine_name variable.
By default the machine name comes from ATAGS or the machines_desc structure that most often is created by the {DT_}MACHINE_START macros.
For our custom boards, however, we want to set the machine name externally from a module. The alternative would be to creta a custom board-* oder mach-* .c file in arch/arm/mach-imx/. This, however, would copy most of the sensible platform code, which I regard as disencouraged.
A "platform-detection" module would be a clean and nicely separated solution.
The ATAGS have various tags useful to determine platform specific data already acquired from or generated by the bootloader. In this case it is the revision tag that the bootloader might fill in the ATAGS structure.
In the G&F case and using the Flash-N-Go Boot bootloader the bootloader version is propagated in the ATAGS_REVISION tag.
To be able to handle this later after the ATAGS are destroyed parse the ATAG_REVISION and add it to a atag-revision entry in the device tree.
--
Commit: seco-ne/kernel/linux-imx-kuk@6d7418d5
arm: Set Garz & Fricke specific kernel virtual address
On Garz & Fricke linux ports for historic and legacy reasons a different virtual kernel address offset is being used.
Set the textofs from 0x00008000 to 0x00010000 and do so as well for the KERNEL_RAM_VADDR.
TODO: Perhaps add a Garz & Fricke specific config or preprocessor variable.