- Dec 14, 2020
-
-
Clark Wang authored
If add this arbitration check, it will block camera probe on imx7D-sdb. So remove this check for now to avoid blocking camera function in TC release. Repreduce step: 1. Write 0x42 to 0x3008 reg 2. Write 0x2 to 0x3008 reg Then the arbitration lost flag will be set. Reviewed-by:
Fugang Duan <fugang.duan@nxp.com> Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com>
-
Clark Wang authored
Add the missing pm_runtime_disable() to keep the balance of power.disable_depth in i2c_imx_xfer function. Otherwise, after resumed, warning log will be shown: imx-i2c 30a20000.i2c: Unbalanced pm_runtime_enable! Reviewed-by:
Fugang Duan <fugang.duan@nxp.com> Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com>
-
Biwen Li authored
Auto switch mode between master and slave Signed-off-by:
Biwen Li <biwen.li@nxp.com>
-
Clark Wang authored
Claim clkhi and clklo as integer type to avoid possible calculation errors caused by data overflow. Reviewed-by:
Fugang Duan <fugang.duan@nxp.com> Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com>
-
Clark Wang authored
The clkhi and clklo ratio was not very precise before that can make the time of START/STOP/HIGH LEVEL out of specification. Therefore, the calculation of these times has been modified in this patch. At the same time, the mode rate definition of i2c is corrected. Reviewed-by:
Fugang Duan <fugang.duan@nxp.com> Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com>
-
Biwen Li authored
Support I2C_SLAVE_STOP event for the read transactions(master read from slave) Signed-off-by:
Biwen Li <biwen.li@nxp.com>
-
Clark Wang authored
Add bus recovery feature for LPI2C. Need add gpio pinctrl, scl-gpios and sda-gpios configuration in dts. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com>
-
Biwen Li authored
Fix warning as follows, drivers/i2c/busses/i2c-imx.c:1046:7: warning: unused variable ‘enable_runtime_pm’ [-Wunused-variable] bool enable_runtime_pm = false; Signed-off-by:
Biwen Li <biwen.li@nxp.com>
-
Biwen Li authored
The patch supports slave mode for imx I2C driver Reviewed-by:
Clark Wang <xiaoning.wang@nxp.com> Signed-off-by:
Biwen Li <biwen.li@nxp.com>
-
Zhang Ying-22455 authored
Based on the I2C specification, if the data line (SDA) is stuck low, the master should send nine clock pulses. The I2C slave device that held the bus low should release it sometime within those nine clocks. Because pinctrl is not supported on Layerscape, current bus recovery is not avalible for Layerscape. This patch uses an open drain GPIO pin to connect to the IICx_SCL to drive nine clock pulses to unlock the I2C bus. Signed-off-by:
Zhang Ying-22455 <ying.zhang22455@nxp.com> Reviewed-by:
Clark Wang <xiaoning.wang@nxp.com> Signed-off-by:
Biwen Li <biwen.li@nxp.com>
-
Zhang Ying-22455 authored
ERR010027: Attempting a start cycle while the bus is busy may generate a short clock pulse. Software must ensure that the I2C BUS is idle by checking the bus busy before switching to master mode and attempting a Start cycle. Signed-off-by:
Zhang Ying-22455 <ying.zhang22455@nxp.com> [ Aisheng: fix big conflict due to 3a5ee18d ("i2c: imx: implement master_xfer_atomic callback") ] Sign-off-by:
Dong Aisheng <aisheng.dong@nxp.com>
-
Peng Ma authored
DMA might not be available yet when the i2c device probes. Properly handle EPROBE_DEFER on dma channel allocation by passing on this error. Signed-off-by:
Peng Ma <peng.ma@nxp.com>
-
Clark Wang authored
Switching the clock frequently will affect the data transmission efficiency, and prolong the timeout to reduce autosuspend times for i2c-imx. Acked-by:
Fugang Duan <fugang.duan@nxp.com> Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com>
-
Clark Wang authored
Switching the clock frequently will affect the data transmission efficiency, and prolong the timeout to reduce autosuspend times for lpi2c. Acked-by:
Fugang Duan <fugang.duan@nxp.com> Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com>
-
Clark Wang authored
"i2c_clk_rate / 2" might be zero when the i2c_clk_rate gets the clock is 0 or 1, so add a judgment to avoid the denominator is equal to 0. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com> [Arul: Add support to check return value everywhere in the driver] Signed-off-by:
Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com> Signed-off-by:
Shrikant Bobade <Shrikant_Bobade@mentor.com> (cherry picked from commit d382de595bffc0975ab7c0582e08dd4f7afc0c1a) (cherry picked from commit 456caa9b)
-
Clark Wang authored
According the e7805 in Errata, the SCK low level period should be less than 1.3us. The other series platform use this same IP can match the errata, and ensure the low level period longer than 1.3us when the speed set to 400KHz. However, only at imx7d platform, the low level period is less than 1.3us in the same situation. Therefore, limit the maximum transfer speed to 384KHz when probe at imx7d platform. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com> (cherry picked from commit 19f553846e872b5c379b37ed029132b79566cab0) (cherry picked from commit 5d355407)
-
Gao Pan authored
When we do system suspend, the runtime pm will be disabled, but we need to control the PMIC to power on/off the regulator, if the runtime pm is disabled, if will failed to request runtime wakeup. So data transfer will failed. Signed-off-by:
Bai Ping <ping.bai@nxp.com> Signed-off-by:
Gao Pan <pandy.gao@nxp.com> Signed-off-by:
Vipul Kumar <vipul_kumar@mentor.com> (cherry picked from commit 93adab71) [ Aisheng: fix big conflict due to 3a5ee18d ("i2c: imx: implement master_xfer_atomic callback") ] Sign-off-by:
Dong Aisheng <aisheng.dong@nxp.com>
-
Gao Pan authored
restore pin setting for i2c in suspend/resume Signed-off-by:
Gao Pan <gaopan@freescale.com> (Vipul: Fixed merge conflicts) Signed-off-by:
Vipul Kumar <vipul_kumar@mentor.com> (cherry picked from commit 42b5aa1d)
-
gaopan authored
The i2c irq is masked when pcie starts a i2c transfer process during noirq suspend stage. As a result, i2c transfer fails. To solve the problem, IRQF_NO_SUSPEND is added to i2c bus. Signed-off-by:
Gao Pan <b54642@freescale.com> Signed-off-by:
Fugang Duan <B38611@freescale.com> Signed-off-by:
Vipul Kumar <vipul_kumar@mentor.com> (cherry picked from commit d21259d9)
-
Gao Pan authored
use subsys_initcall for i2c driver to improve i2c driver probe priority Signed-off-by:
Gao Pan <pandy.gao@nxp.com> (cherry picked from commit 3661eef8) (cherry picked from commit 9c867985)
-
Leonard Crestez authored
During porting commit ede264ac ("MLK-14982-1 imx8: lpi2c: add ipg clk for lpi2c driver") which replaced the single clk with clk_ipg and clk_per was skipped. Part of the code was later added in commit 96dbdd8c3d0b ("MLK-16713 i2c: imx-lpi2c: add runtime pm support") except the "clk" field was kept and clk_get calls were not updated. Fix imx7ulp boot by fetching both clocks. Fixes: 96dbdd8c3d0b ("MLK-16713 i2c: imx-lpi2c: add runtime pm support") Signed-off-by:
Leonard Crestez <leonard.crestez@nxp.com> Acked-by:
Fugang Duan <fugang.duan@nxp.com> (cherry picked from commit 1b9c92f3)
-
Gao Pan authored
add debug message when i2c peripheral clk rate is 0, then directly return -EINVAL. Signed-off-by:
Gao Pan <pandy.gao@nxp.com> Reviewed-by:
Andy Duan <fugang.duan@nxp.com> (Vipul: Fixed merge conflicts) Signed-off-by:
Vipul Kumar <vipul_kumar@mentor.com> (cherry picked from commit 1e6707bb)
-
Fugang Duan authored
Manage irq resource request/release in runtime pm to save irq domain's power. Signed-off-by:
Frank Li <Frank.Li@nxp.com> Signed-off-by:
Fugang Duan <fugang.duan@nxp.com> Tested-by:
Guoniu.Zhou <guoniu.zhou@nxp.com> Reviewed-by:
Frank Li <Frank.Li@nxp.com> (Vipul: Fixed merge conflicts) Signed-off-by:
Vipul Kumar <vipul_kumar@mentor.com> (cherry picked from commit e1aa13df)
-
Fugang Duan authored
- Add runtime pm support to dynamicly manage the ipg and per clocks. - Put the suspend to suspend_noirq. - Call .pm_runtime_force_suspend() to force runtime pm suspended in .suspend_noirq(). BuildInfo: - SCFW 88456c73, IMX-MKIMAGE 06bc2767, ATF a438801 - U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g7953d47 Signed-off-by:
Fugang Duan <fugang.duan@nxp.com> Signed-off-by:
Gao Pan <pandy.gao@nxp.com> Reviewed-by:
Anson Huang <Anson.Huang@nxp.com> During 4.14 rebase added pm_runtime_get_sync/pm_runtime_put around the reading of LPI2C_PARAM. Signed-off-by:
Leonard Crestez <leonard.crestez@nxp.com> (Vipul: Fixed merge conflicts) Signed-off-by:
Vipul Kumar <vipul_kumar@mentor.com> (cherry picked from commit 31cc4be3)
-
Gao Pan authored
A NACK flag in ISR means i2c bus error. In such codition, there is no need to do read/write operation. It's better to return ISR directly and then stop i2c transfer. Signed-off-by:
Gao Pan <pandy.gao@nxp.com> (cherry-pick from 839d59e48b6fdbd882776a48a88ce26ff14d8b86) Signed-off-by:
Vipul Kumar <vipul_kumar@mentor.com> (cherry picked from commit 3d052746)
-
Clark Wang authored
Add defer probe when rpbus probe, so if the rpmsg channel is not created, the rpbus will try to probe later. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com>
-
Clark Wang authored
For some chips may need long time to get the response from M4 sometimes, enlarge timeout to 500ms. Add a judgement to check if the received data is the current transfer wanted. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com> (cherry picked from commit 222e201b) (cherry picked from commit 6cfc8578)
-
Clark Wang authored
I2c_lock_bus function in i2c-core-base will not stop the transfer to different devices on different buses at the same time. Since the multiple rpmsg i2c buses share one rpmsg channel, so it has to add mutex to protect rpmsg resource accessing. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com> (cherry picked from commit d592afe9) (cherry picked from commit 44622ff8)
-
Peng Fan authored
The alias ID must be defined in device tree, because that will be used as BUS ID to Cortex M4. If the alias ID not defined, linux kernel will automatically allocate one ID which might not be the same number used in Cortex M4 and Cortex M4 will not send msg to I2C controller. So let's add BUG_ON to catch issue as earlier as possible to avoid wasting efforts. Signed-off-by:
Peng Fan <peng.fan@nxp.com> Reviewed-by:
Clark Wang <xiaoning.wang@nxp.com> (cherry picked from commit b9ff2035) (cherry picked from commit 8e509705)
-
Clark Wang authored
Add virtual i2c driver to send SRTM i2c messages to M4. Each virtual I2C bus has a specal bus id, which is abstracted by M4. Each SRTM message include a bus id for the bus which the device is on. Virtual i2c rpmsg bus will bind rpbus nodes with compatible string "fsl,i2c-rpbus". And "rpmsg-i2c-channel" will probe only one rpmsg channel for all rpbuses. This virtual i2c driver depends on CONFIG_I2C and CONFIG_RPMSG. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com> (cherry picked from commit 9feeac93) (cherry picked from commit 379ab839)
-
Richard Zhu authored
Add i2c bus switch PCA9646 chip support, which 2-wire bus switch and buffered 4-channel. Signed-off-by:
Fugang Duan <fugang.duan@nxp.com>
-
- Dec 13, 2020
-
-
Linus Torvalds authored
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds authored
Pull x86 fixes from Thomas Gleixner: "A set of x86 and membarrier fixes: - Correct a few problems in the x86 and the generic membarrier implementation. Small corrections for assumptions about visibility which have turned out not to be true. - Make the PAT bits for memory encryption correct vs 4K and 2M/1G page table entries as they are at a different location. - Fix a concurrency issue in the the local bandwidth readout of resource control leading to incorrect values - Fix the ordering of allocating a vector for an interrupt. The order missed to respect the provided cpumask when the first attempt of allocating node local in the mask fails. It then tries the node instead of trying the full provided mask first. This leads to erroneous error messages and breaking the (user) supplied affinity request. Reorder it. - Make the INT3 padding detection in optprobe work correctly" * tag 'x86-urgent-2020-12-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kprobes: Fix optprobe to detect INT3 padding correctly x86/apic/vector: Fix ordering in vector assignment x86/resctrl: Fix incorrect local bandwidth when mba_sc is enabled x86/mm/mem_encrypt: Fix definition of PMD_FLAGS_DEC_WP membarrier: Execute SYNC_CORE on the calling thread membarrier: Explicitly sync remote cores when SYNC_CORE is requested membarrier: Add an actual barrier before rseq_preempt() x86/membarrier: Get rid of a dubious optimization
-
git://git.kernel.dk/linux-blockLinus Torvalds authored
Pull block fixes from Jens Axboe: "This should be it for 5.10. Mike and Song looked into the warning case, and thankfully it appears the fix was pretty trivial - we can just change the md device chunk type to unsigned int to get rid of it. They cannot currently be < 0, and nobody is checking for that either. We're reverting the discard changes as the corruption reports came in very late, and there's just no time to attempt to deal with it at this point. Reverting the changes in question is the right call for 5.10" * tag 'block-5.10-2020-12-12' of git://git.kernel.dk/linux-block: md: change mddev 'chunk_sectors' from int to unsigned Revert "md: add md_submit_discard_bio() for submitting discard bio" Revert "md/raid10: extend r10bio devs to raid disks" Revert "md/raid10: pull codes that wait for blocked dev into one function" Revert "md/raid10: improve raid10 discard request" Revert "md/raid10: improve discard request for far layout" Revert "dm raid: remove unnecessary discard limits for raid10"
-
- Dec 12, 2020
-
-
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds authored
Pull SCSI fixes from James Bottomley: "Five small fixes. Four in drivers: - hisi_sas: fix internal queue timeout - be2iscsi: revert a prior fix causing problems - bnx2i: add missing dependency - storvsc: late arriving revert of a problem fix and one in the core. The core one is a minor change to stop paying attention to the busy count when returning out of resources because there's a race window where the queue might not restart due to missing returning I/O" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: Revert "scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback()" scsi: hisi_sas: Select a suitable queue for internal I/Os scsi: core: Fix race between handling STS_RESOURCE and completion scsi: be2iscsi: Revert "Fix a theoretical leak in beiscsi_create_eqs()" scsi: bnx2i: Requires MMU
-
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linuxLinus Torvalds authored
Pull i2c fix from Wolfram Sang: "Bugfix for the AT24 EEPROM driver" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: misc: eeprom: at24: fix NVMEM name with custom AT24 device name
-
git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds authored
Pull kvm fixes from Paolo Bonzini: "Bugfixes for ARM, x86 and tools" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: tools/kvm_stat: Exempt time-based counters KVM: mmu: Fix SPTE encoding of MMIO generation upper half kvm: x86/mmu: Use cpuid to determine max gfn kvm: svm: de-allocate svm_cpu_data for all cpus in svm_cpu_uninit() selftests: kvm/set_memory_region_test: Fix race in move region test KVM: arm64: Add usage of stage 2 fault lookup level in user_mem_abort() KVM: arm64: Fix handling of merging tables into a block entry KVM: arm64: Fix memory leak on stage2 update of a valid PTE
-
git://git.kernel.org/pub/scm/linux/kernel/git/xen/tipLinus Torvalds authored
Pull xen fixes from Juergen Gross: "A short series fixing a regression introduced in 5.9 for running as Xen dom0 on a system with NVMe backed storage" * tag 'for-linus-5.10c-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: don't use page->lru for ZONE_DEVICE memory xen: add helpers for caching grant mapping pages
-
git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linuxLinus Torvalds authored
Pull RISC-V fix from Palmer Dabbelt: "Just one fix. It's nothing critical, just a randconfig that wasn't building. That said, it does seem pretty safe and is technically a regression so I'm sending it along for 5.10: - define get_cycles64() all the time, as it's used by most configurations" * tag 'riscv-for-linus-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Define get_cycles64() regardless of M-mode
-
git://git.kernel.dk/linux-blockLinus Torvalds authored
Pull io_uring fixes from Jens Axboe: "Two fixes in here, fixing issues introduced in this merge window" * tag 'io_uring-5.10-2020-12-11' of git://git.kernel.dk/linux-block: io_uring: fix file leak on error path of io ctx creation io_uring: fix mis-seting personality's creds
-