linux.git
4 years agortc: pcf8563: Enable or disable clock out due to clk_disable_unused hang. imx_4.9.88_2.0.0_ga-somdevices.y
Josep Orga [Thu, 30 Apr 2020 10:45:01 +0000 (12:45 +0200)]
rtc: pcf8563: Enable or disable clock out due to clk_disable_unused hang.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agommc: pwrseq_simple: Bug solve.
Josep Orga [Sun, 19 Apr 2020 18:05:53 +0000 (20:05 +0200)]
mmc: pwrseq_simple: Bug solve.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agonet: ethernet: fec_main: Add reset PHY GPIOs when CONFIG_OF is not defined.
Josep Orga [Sat, 18 Apr 2020 09:00:21 +0000 (11:00 +0200)]
net: ethernet: fec_main: Add reset PHY GPIOs when CONFIG_OF is not defined.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: imx6ull-somdevices.dtsi: Add frequency-voltage scaling with pf1550.
Josep Orga [Fri, 17 Apr 2020 19:22:41 +0000 (21:22 +0200)]
ARM: imx6ull-somdevices.dtsi: Add frequency-voltage scaling with pf1550.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: imx6ull-somdevices.dtsi: Add clock-frequency for avoiding missing clock-frequenc...
Josep Orga [Fri, 17 Apr 2020 15:30:17 +0000 (17:30 +0200)]
ARM: imx6ull-somdevices.dtsi: Add clock-frequency for avoiding missing clock-frequency warning.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: imx6ull-somdevices-C8P1.dts: Removed unused comments.
Josep Orga [Fri, 17 Apr 2020 09:24:20 +0000 (11:24 +0200)]
ARM: imx6ull-somdevices-C8P1.dts: Removed unused comments.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: imx6ull-somdevices-C8P1.dtsi:
Josep Orga [Thu, 16 Apr 2020 19:31:53 +0000 (21:31 +0200)]
ARM: imx6ull-somdevices-C8P1.dtsi:
· Changed to I2C2.
· Changed GPIOs of LEDs and Keys (removed pinctrl_keys).
· Changed EEPROM configuration.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: imx6ull-somdevices-C0P1.dtsi:
Josep Orga [Thu, 16 Apr 2020 19:30:05 +0000 (21:30 +0200)]
ARM: imx6ull-somdevices-C0P1.dtsi:
· Changed pins to H0.1 version (I2C2, GPIOs, USB1_ID and USBs).
· Added EEPROM.
· Disable FEC2 with regulator.
· Two GPIO-LEDs to control USBs enables.
· FEC reset pins must be at SNVS section.
· Enable Watchdog.
· Remove not used reg_sd1_vmmc.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: fec_main.c: Enable PHYs at boot and enable suspend functionallity.
Josep Orga [Tue, 14 Apr 2020 20:29:39 +0000 (22:29 +0200)]
ARM: fec_main.c: Enable PHYs at boot and enable suspend functionallity.
· imx6ull-somdevices.dtsi: Disable second phy when one ethernet selected.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: Add WILC3000 pwrseq adding chip_en gpio and proper power on and off sequences.
Josep Orga [Tue, 14 Apr 2020 17:51:59 +0000 (19:51 +0200)]
ARM: Add WILC3000 pwrseq adding chip_en gpio and proper power on and off sequences.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: imx6ull-somdevices.dtsi: Put MX6UL_PAD_GPIO1_IO03__REF_CLK_32K to correct location.
Josep Orga [Tue, 14 Apr 2020 17:46:51 +0000 (19:46 +0200)]
ARM: imx6ull-somdevices.dtsi: Put MX6UL_PAD_GPIO1_IO03__REF_CLK_32K to correct location.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: imx6ull-somdevices.dtsi: Add suport to WILC3000.
Josep Orga [Tue, 14 Apr 2020 16:12:05 +0000 (18:12 +0200)]
ARM: imx6ull-somdevices.dtsi: Add suport to WILC3000.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: Workaround to have NULL pointer problem with 15.3.1 wilc3000 firmware
Josep Orga [Tue, 14 Apr 2020 09:41:52 +0000 (11:41 +0200)]
ARM: Workaround to have NULL pointer problem with 15.3.1 wilc3000 firmware
TODO: Try not to use it or verify all cases.

To solve the problem:

get_if_handler Invalid handle
wilc_wlan_handle_rx_buff: wilc_netdev in wilc is NULL
wilc_wlan_handle_rx_buff: Data corrupted 0, 0
wilc_handle_isr,>> UNKNOWN_INTERRUPT - 0x00000182
get_if_handler Invalid handle
wilc_wlan_handle_rx_buff: wilc_netdev in wilc is NULL
wilc_handle_isr,>> UNKNOWN_INTERRUPT - 0x00004fea
cfg_get Timed Out
wilc_sdio mmc0:0001:1 wlan0: ERR [wilc_send_config_pkt:1800] Get Timed out
wilc_sdio mmc0:0001:1 wlan0: ERR [wilc_get_statistics:1106] Failed to send scan parameters
Unable to handle kernel paging request at virtual address ffff8cc4
pgd = 80004000
[ffff8cc4] *pgd=8bf5e861, *pte=00000000, *ppte=00000000
Internal error: Oops: 37 [#1] PREEMPT SMP ARM
Modules linked in: evbug wilc_sdio
CPU: 0 PID: 203 Comm: K_TXQ_TASK Not tainted 4.9.88-04802-g84dfb5dab852-dirty #115
Hardware name: Freescale i.MX6 UltraLite (Device Tree)
task: 887f0b00 task.stack: 88904000
PC is at wilc_wlan_txq_remove_from_head+0x4c/0x10c [wilc_sdio]
LR is at preempt_count_add+0xd4/0x14c
pc : [<7f00ce08>] lr : [<8014e52c>] psr: a00e0093
sp : 88905d40 ip : 0acbd000 fp : 00000000
r10: 88905dd4 r9 : 88905dc2 r8 : 0000000b
r7 : 200e0013 r6 : 884ae4e4 r5 : ffff8cc0 r4 : 884ae420
r3 : 884ae630 r2 : ffff8cc0 r1 : 884aed74 r0 : 200e0013
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c53c7d Table: 88a7c06a DAC: 00000051
Process K_TXQ_TASK (pid: 203, stack limit = 0x88904210)
Stack: (0x88905d40 to 0x88906000)
5d40: 88905dc0 887b6d00 88980000 0000000b 88905e04 00000060 884ae500 7f00f11c
5d60: 00000400 00000000 00000000 887404c0 7f013fa0 884aeb64 00000001 7f0185d4
5d80: 7f018600 884ae420 88905da8 884ae4cc 88905f3c 00000001 7f01a414 88980000
5da0: f0f8aea7 0d010000 01010101 00000001 00000000 00000000 00000000 00000000
5dc0: 887f0b00 8bb38a78 000029aa 00000000 b243dcee 00000006 000029aa 00000000
5de0: 8bb38a40 80e7ba40 887f0b00 8bb38a40 00000000 80160774 00000000 8bb38a40
5e00: 00000418 00000000 8bb38a40 00000000 0000000a 00000000 80f02d00 00000001
5e20: 887f0b80 0000003d 8bb38a78 80e7ba40 8bb38a40 887f0b00 88905e8c 809f8e5c
5e40: 8bb38a40 8014e1e4 80f03244 887f0e40 ffffffff 00000000 80f00000 8014a6fc
5e60: 887f0b00 00000000 80f00000 8bb38a40 887f0b00 80f06600 882398c0 00000000
5e80: 8bb35440 400e0013 80e78440 80f03244 00000001 809f8a88 02400000 8bb35440
5ea0: 80e78440 80180c74 88905ef0 88905ef0 8bb35440 88905ef0 00000001 809f8e08
5ec0: 8bb35440 80180cdc 00000000 400e0013 88905ee4 88905ef0 8bb35440 80180e98
5ee0: fffff2c8 809f801c 7fffffff 400e0013 00000200 00000000 fffff2c8 80180eb8
5f00: 887f0b00 884ae420 ffffe000 7f01a40c 884acf88 ffffff97 884ae450 884ae448
5f20: 00000001 7f005560 88740000 7f015e94 884ae538 884ae548 888f5840 00000001
5f40: 884ae420 00000000 888f5840 88904000 884ae420 7f0054c4 00000000 00000000
5f60: 00000000 80149344 00000000 00000000 887f0b00 884ae420 00000000 00000000
5f80: 88905f80 88905f80 00000000 00000000 88905f90 88905f90 888f5840 8014923c
5fa0: 00000000 00000000 00000000 80107950 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<7f00ce08>] (wilc_wlan_txq_remove_from_head [wilc_sdio]) from [<7f00f11c>] (wilc_wlan_handle_txq+0xb64/0xd80 [wilc_sdio])
[<7f00f11c>] (wilc_wlan_handle_txq [wilc_sdio]) from [<7f005560>] (wilc_txq_task+0x9c/0x248 [wilc_sdio])
[<7f005560>] (wilc_txq_task [wilc_sdio]) from [<80149344>] (kthread+0x108/0x110)
[<80149344>] (kthread) from [<80107950>] (ret_from_fork+0x14/0x24)
Code: e0234893 e5935744 e3550000 0a000016 (e5952004)
---[ end trace 875555a42b5ff364 ]---
note: K_TXQ_TASK[203] exited with preempt_count 1

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: Bug with iMX6ULL when large size data is managed: C0P2-H0.0--20200415
Josep Orga [Mon, 6 Apr 2020 15:03:42 +0000 (17:03 +0200)]
ARM: Bug with iMX6ULL when large size data is managed:
https://community.nxp.com/thread/447193

Error solved:

cfg_get Timed Out
wilc_sdio mmc0:0001:1 wlan0: ERR [wilc_send_config_pkt:1789] Get Timed out
wilc_sdio mmc0:0001:1 wlan0: ERR [wilc_get_statistics:1106] Failed to send scan parameters
mmc0: Timeout waiting for hardware interrupt.
mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
mmc0: sdhci: Sys addr:  0x88a00800 | Version:  0x00000002
mmc0: sdhci: Blk size:  0x00000200 | Blk cnt:  0x00000086
mmc0: sdhci: Argument:  0x1c000087 | Trn mode: 0x00000033
mmc0: sdhci: Present:   0x01308a8e | Host ctl: 0x00000013
mmc0: sdhci: Power:     0x00000002 | Blk gap:  0x00000080
mmc0: sdhci: Wake-up:   0x00000008 | Clock:    0x0000002f
mmc0: sdhci: Timeout:   0x0000008f | Int stat: 0x00000000
mmc0: sdhci: Int enab:  0x107f100b | Sig enab: 0x107f100b
mmc0: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000302
mmc0: sdhci: Caps:      0x07eb0000 | Caps_1:   0x0000b407
mmc0: sdhci: Cmd:       0x0000353a | Max curr: 0x00ffffff
mmc0: sdhci: Resp[0]:   0x00001000 | Resp[1]:  0x00000000
mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
mmc0: sdhci: Host ctl2: 0x00000000
mmc0: sdhci: ADMA Err:  0x00000003 | ADMA Ptr: 0x8c077204
mmc0: sdhci: ============================================
wilc_sdio mmc0:0001:1: wilc_sdio_cmd53..failed, err(-110)
wilc_sdio mmc0:0001:1: Failed cmd53 [0], block read...
wilc_wlan_handle_isr_ext: fail block rx
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 80004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in: option usb_wwan usbserial evbug wilc_sdio
CPU: 0 PID: 208 Comm: K_TXQ_TASK Not tainted 4.9.88-04794-g4659c284c25a-dirty #1
Hardware name: Freescale i.MX6 UltraLite (Device Tree)
task: 888ecb00 task.stack: 889e2000
PC is at wilc_wlan_txq_remove_from_head+0x4c/0x90 [wilc_sdio]
LR is at 0x100
pc : [<7f00cdac>]    lr : [<00000100>]    psr: a00e0093
sp : 889e3d50  ip : 00000200  fp : 00000000
r10: 889e3de6  r9 : 889e3dc6  r8 : 884ce500
r7 : 00000220  r6 : 884ce4e4  r5 : 00000000  r4 : 884ce420
r3 : 00000000  r2 : 884d0570  r1 : 200e0013  r0 : 884d0544
Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c53c7d  Table: 8884406a  DAC: 00000051
Process K_TXQ_TASK (pid: 208, stack limit = 0x889e2210)
Stack: (0x889e3d50 to 0x889e4000)
3d40:                                     88960000 0000008a 889e3e14 7f00f0a0
3d60: 00000400 00000000 00000000 887704c0 7f013f24 884cebc4 00000005 7f0184cc
3d80: 7f0184f8 884ce420 889e3da8 884ce4cc 889e3f3c 00000001 7f01a314 88960000
3da0: 39383736 10030200 01010101 00040001 00000000 00000000 00000000 00000000
3dc0: 00020202 8bb38a02 00000001 8015c3c0 80f03244 00000000 0000000c 00000000
3de0: 80f02d00 00000001 888ecb80 00000017 8bb38a78 80e7ba40 8bb38a40 888ecb00
3e00: 0000001c 0000001c 0000001c 00000418 0000001c 00000000 ffffffff 00000000
3e20: 887aa000 8014a6fc 888ecb00 00000001 887aa000 8bb38a40 888ecb00 8864a100
3e40: 887c4a80 887c4a80 00000000 00000000 889e3e9c 809f4d9c 00000001 809f56b0
3e60: 80f033a8 80f1c000 f4a0200c 809f5110 600b0013 ffffffff 889e3ed4 ffffe000
3e80: 884ce53c 884ce538 889e2000 00000002 00000000 00000000 889e3eac 809f5118
3ea0: 7fffffff 884ce53c 00000001 809f7f94 7fffffff 884ce53c 884ce538 889e2000
3ec0: 00000002 00000000 00000000 00000001 884ce53c 884ce53c 884ce538 884ccf88
3ee0: 00000001 809f8dbc 7fffffff 809f5dac 7f01a30c 00000001 0000000c 00000001
3f00: 80c95370 884ce420 ffffe000 7f01a30c 884ccf88 7f015e18 884ce450 88770000
3f20: 00000001 7f005560 88770000 7f015e18 884ce538 884ce548 889a65c0 00000005
3f40: 884ce420 00000000 889a65c0 889e2000 884ce420 7f0054c4 00000000 00000000
3f60: 00000000 80149344 0013003f 00000000 888ecb00 884ce420 00000000 00000000
3f80: 889e3f80 889e3f80 00000000 00000000 889e3f90 889e3f90 889a65c0 8014923c
3fa0: 00000000 00000000 00000000 80107950 00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 0013003f 00003d22
[<7f00cdac>] (wilc_wlan_txq_remove_from_head [wilc_sdio]) from [<7f00f0a0>] (wilc_wlan_handle_txq+0xb64/0xd80 [wilc_sdio])
[<7f00f0a0>] (wilc_wlan_handle_txq [wilc_sdio]) from [<7f005560>] (wilc_txq_task+0x9c/0x248 [wilc_sdio])
[<7f005560>] (wilc_txq_task [wilc_sdio]) from [<80149344>] (kthread+0x108/0x110)
[<80149344>] (kthread) from [<80107950>] (ret_from_fork+0x14/0x24)
Code: e3a0ec01 e3a0cc02 e2852e77 e5955744 (e8950009)
---[ end trace 61f15caa55e80a4b ]---

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: imx6ull-somdevices.dtb: Remove wakeup capabilities to pf1550 and remove charger.
Josep Orga [Mon, 6 Apr 2020 15:02:58 +0000 (17:02 +0200)]
ARM: imx6ull-somdevices.dtb: Remove wakeup capabilities to pf1550 and remove charger.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: imx6ull-somdevices.dtsi: WILC1000 minor changes seems to have better performance.
Josep Orga [Mon, 6 Apr 2020 15:00:53 +0000 (17:00 +0200)]
ARM: imx6ull-somdevices.dtsi: WILC1000 minor changes seems to have better performance.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: wilc_debugfs.c: Disable wilc driver debug mode.
Josep Orga [Sun, 22 Mar 2020 18:08:20 +0000 (19:08 +0100)]
ARM: wilc_debugfs.c: Disable wilc driver debug mode.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: wilc_netdev.c: Added firmware reload retries:
Josep Orga [Sun, 22 Mar 2020 18:06:42 +0000 (19:06 +0100)]
ARM: wilc_netdev.c: Added firmware reload retries:
·Based on the function wl12xx_init_fw in ./drivers/net/wireless/ti/wlcore/main.c.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM: Updated WiFi WILC1000 source code:
Josep Orga [Sun, 22 Mar 2020 17:58:33 +0000 (18:58 +0100)]
ARM: Updated WiFi WILC1000 source code:
· Based on tag wilc_linux_15_3_1 in https://github.com/linux4wilc/driver/tree/wilc_linux_15_3_1
· Firmware wilc1000_wifi_firmware.bin is located in https://github.com/linux4wilc/firmware/tree/wilc_linux_15_3_1

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM:imx6ull-somdevices.dtsi:
Josep Orga [Sun, 22 Mar 2020 17:00:00 +0000 (18:00 +0100)]
ARM:imx6ull-somdevices.dtsi:
· Added RESET and CHIP_EN functionallity to WiFi.
· Changed PMIC_INT GPIO.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM:imx6ull_somdevices_defconfig: MMC_SPI, RTC, SOUND and PPP support.
Josep Orga [Sun, 22 Mar 2020 16:49:05 +0000 (17:49 +0100)]
ARM:imx6ull_somdevices_defconfig: MMC_SPI, RTC, SOUND and PPP support.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoimx6ull-somdevices-C8P1.dts: imx6ull-somdevices-C8P1--10032020.dts
Josep Orga [Tue, 10 Mar 2020 07:41:25 +0000 (08:41 +0100)]
imx6ull-somdevices-C8P1.dts: imx6ull-somdevices-C8P1--10032020.dts
· Added BUTTON SHUTDOWN.
· Added wakeup capabilities to RTC.
· Removed not used peripherals.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoimx6ull-somdevices-C8P1.dts: Added and changed Makefile.
Josep Orga [Thu, 16 Jan 2020 12:04:17 +0000 (13:04 +0100)]
imx6ull-somdevices-C8P1.dts: Added and changed Makefile.
mach-imx6ul.c: Added imx6ul_sai_clk_init function.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoimx6ull-somdevices.dtsi: Deleted #defines as they should be in dts files.
Josep Orga [Thu, 16 Jan 2020 12:02:47 +0000 (13:02 +0100)]
imx6ull-somdevices.dtsi: Deleted #defines as they should be in dts files.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoimx6ull-somdevices.dtsi: Renamed imx6ull-somdevices.dts -> imx6ull-somdevices.dtsi.
Josep Orga [Thu, 16 Jan 2020 11:57:13 +0000 (12:57 +0100)]
imx6ull-somdevices.dtsi: Renamed imx6ull-somdevices.dts -> imx6ull-somdevices.dtsi.
imx6ull-somdevices-C0P1.dts: Added and changed Makefile.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoimx6ull-somdevices.dts: Added LED heartbeat, MMC_SPI functionallity, GPIOs and enet...
Josep Orga [Thu, 16 Jan 2020 11:44:56 +0000 (12:44 +0100)]
imx6ull-somdevices.dts: Added LED heartbeat, MMC_SPI functionallity, GPIOs and enet RST pins bug.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM:imx6ull_somdevices_defconfig: Added SMSC PHY and WILC functionallity.
Josep Orga [Thu, 28 Nov 2019 09:11:43 +0000 (10:11 +0100)]
ARM:imx6ull_somdevices_defconfig: Added SMSC PHY and WILC functionallity.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoARM:imx6ull_somdevices_defconfig: Create file based on imx_v7_defconfig.
Josep Orga [Thu, 28 Nov 2019 08:55:08 +0000 (09:55 +0100)]
ARM:imx6ull_somdevices_defconfig: Create file based on imx_v7_defconfig.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoimx6ull-somdevices.dts: Added LCD, ecspi2, changed UART2 pins and corrected indent.
Josep Orga [Wed, 27 Nov 2019 16:58:37 +0000 (17:58 +0100)]
imx6ull-somdevices.dts: Added LCD, ecspi2, changed UART2 pins and corrected indent.
spidev: Added spidev not to have kernel warnings.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoimx6ull-somdevices.dts: Removed not used peripherals flexcan2, spi4, qspi, tsc and...
Josep Orga [Wed, 27 Nov 2019 15:32:26 +0000 (16:32 +0100)]
imx6ull-somdevices.dts: Removed not used peripherals flexcan2, spi4, qspi, tsc and indent tabs.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoimx6ull-somdevices.dtb: Added WiFi WILC1000 fuinctionallity.
Josep Orga [Wed, 27 Nov 2019 12:26:03 +0000 (13:26 +0100)]
imx6ull-somdevices.dtb: Added WiFi WILC1000 fuinctionallity.
wilc1000: Added drivers.
TODO: Check all functionallity and fix this warning related to regs:

Warning (reg_format): "reg" property in /soc/aips-bus@02100000/usdhc@02190000/wilc_sdio@0 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value for /soc/aips-bus@02100000/usdhc@02190000/wilc_sdio@0
Warning (avoid_default_addr_size): Relying on default #size-cells value for /soc/aips-bus@02100000/usdhc@02190000/wilc_sdio@0

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoimx6ull-somdevices.dts: Added support to pf1510/pf1550 PMIC and removed other I2C...
Josep Orga [Wed, 27 Nov 2019 10:55:12 +0000 (11:55 +0100)]
imx6ull-somdevices.dts: Added support to pf1510/pf1550 PMIC and removed other I2C devices.
TODO: Check if the PMIC has full functionallity.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoimx6ull-somdevices.dts: Add support to single/dual ethernet.
Josep Orga [Wed, 27 Nov 2019 10:40:34 +0000 (11:40 +0100)]
imx6ull-somdevices.dts: Add support to single/dual ethernet.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoChanged machine model to "Freescale i.MX6 ULL µSMARC SOMDEVICES Board" arch/arm/boot...
Josep Orga [Wed, 27 Nov 2019 09:57:15 +0000 (10:57 +0100)]
Changed machine model to "Freescale i.MX6 ULL µSMARC SOMDEVICES Board" arch/arm/boot/dts/imx6ull-somdevices.dts.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoAdded arch/arm/boot/dts/imx6ull-somdevices.dts copying arch/arm/boot/dts/imx6ull...
Josep Orga [Wed, 27 Nov 2019 09:42:02 +0000 (10:42 +0100)]
Added arch/arm/boot/dts/imx6ull-somdevices.dts copying arch/arm/boot/dts/imx6ull-14x14-evk.dts.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoEnable ENET1_TX_CLK during board startup.
Josep Orga [Wed, 27 Nov 2019 09:39:27 +0000 (10:39 +0100)]
Enable ENET1_TX_CLK during board startup.
TODO: Check if it is necessary when hard reset is present.

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoadd "phy-reset-in-suspend" device tree option
Josep Orga [Mon, 6 May 2019 09:25:17 +0000 (11:25 +0200)]
add "phy-reset-in-suspend" device tree option

Based on: https://github.com/digi-embedded/linux/commit/f0ddbc0153b269bfd21b84dbd4ad16acdfd21f29#diff-28c0935b4b5bf1738a0ee788d25a18ffR3408

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoEnable PHY reset line when the fec is probed
Josep Orga [Mon, 6 May 2019 08:45:17 +0000 (10:45 +0200)]
Enable PHY reset line when the fec is probed
Based on: https://github.com/digi-embedded/linux/commit/f0ddbc0153b269bfd21b84dbd4ad16acdfd21f29#diff-28c0935b4b5bf1738a0ee788d25a18ff

Signed-off-by: Josep Orga <jorga@somdevices.com>
5 years agoFunction fec_enet_clk_enable() was disabling this line leaving the PHY
Josep Orga [Thu, 2 May 2019 18:19:04 +0000 (20:19 +0200)]
Function fec_enet_clk_enable() was disabling this line leaving the PHY
without a running clock. This makes the PHY lose its internal state
requiring a reset of the PHY to be reactivated.

This patch enables the clk_enet_out once at probe() so that it remains
enabled during all MDIO accesses.

References: https://github.com/digi-embedded/linux/commit/fa3f9ab2d2650ba6b24f2ef62ddedbf971e56d07#diff-28c0935b4b5bf1738a0ee788d25a18ffR1952
https://patchwork.ozlabs.org/patch/549391/

Signed-off-by: Josep Orga <jorga@somdevices.com>
6 years agoarm: Invalidate BTB on prefetch abort outside of user mapping on Cortex A8, A9, A12... imx_4.9.88_2.0.0_ga
Marc Zyngier [Thu, 1 Feb 2018 11:07:34 +0000 (11:07 +0000)]
arm: Invalidate BTB on prefetch abort outside of user mapping on Cortex A8, A9, A12 and A17

** Not yet queued for inclusion in mainline **

In order to prevent aliasing attacks on the branch predictor,
invalidate the BTB on CPUs that are known to be affected when taking
a prefetch abort on a address that is outside of a user task limit.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
6 years agoarm: Add BTB invalidation on switch_mm for Cortex-A9, A12 and A17
Marc Zyngier [Thu, 1 Feb 2018 11:07:33 +0000 (11:07 +0000)]
arm: Add BTB invalidation on switch_mm for Cortex-A9, A12 and A17

** Not yet queued for inclusion in mainline **

In order to avoid aliasing attacks against the branch predictor,
some implementations require to invalidate the BTB when switching
from one user context to another.

For this, we reuse the existing implementation for Cortex-A8, and
apply it to A9, A12 and A17.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
6 years agoMLK-18276-02 ARM64: defconfig: add regulatory rules database config
Andy Duan [Fri, 11 May 2018 02:01:57 +0000 (10:01 +0800)]
MLK-18276-02 ARM64: defconfig: add regulatory rules database config

Enable regulatory rules database config:
    CONFIG_CFG80211_INTERNAL_REGDB

(Run "make savedefconfig" to change the defconfig)

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit: 2044e8f366119b79b17cfe47bb91c40c39e9b440)

6 years agoMLK-18276-01 ARM: imx_v7_defconfig: add regulatory rules t database config
Andy Duan [Fri, 11 May 2018 02:26:51 +0000 (10:26 +0800)]
MLK-18276-01 ARM: imx_v7_defconfig: add regulatory rules t database config

Enable regulatory rules database config:
        CONFIG_CFG80211_INTERNAL_REGDB

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit: 99a27c4880a091d74ab5e3fb112a2d778f7c26b0)

6 years agoMLK-18275 wireless: bcmdhd: fix the un-supported country code set by regdb
Andy Duan [Thu, 10 May 2018 11:49:48 +0000 (19:49 +0800)]
MLK-18275 wireless: bcmdhd: fix the un-supported country code set by regdb

Driver should return when un-supported country code set by regdb.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit: 9b3b65ec3df5ed7b404784ae4ef4cf9f906c0520)

6 years agoMLK-18261 irqchip: imx-irqsteer: fix idx calculation for mask callback
Antoine Bouyer [Fri, 4 May 2018 09:48:09 +0000 (11:48 +0200)]
MLK-18261 irqchip: imx-irqsteer: fix idx calculation for mask callback

Fixes: a2e6a7833495 (MLK-16136-9 irqchip: imx-irqsteer: adjust irq config
via 'endian')

This patch fixes mask register offset calculation, when endian is not
default value 0 (i.e imx8mq).

Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 8a5643a5bd1f5b6490431bd96ef3cd004efd83b1)

6 years agoMLK-18218 ARM: dts: imx7ulp-evk: delete property to support SD3.0
Haibo Chen [Tue, 8 May 2018 01:49:08 +0000 (09:49 +0800)]
MLK-18218 ARM: dts: imx7ulp-evk: delete property to support SD3.0

commit b62dd733a100 ("MLK-18127 ARM: dts: imx7ulp-evk: few correction
for usdhc1") add property "no-1-8-v" for the usdhc1 which limit the
wifi. The sd slot on base board share this usdhc1, so the usdhc1
in imx7ulp-evk-sd1.dts also inherit this property.

delete the "no-1-8-v" property, then the sd slot can support SD3.0

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit 6cb30044642b43f9e55d63beca61bc1397d3d996)

6 years agoMLK-18180 ARM64: dts: correct the pad configurations of pcie
Richard Zhu [Thu, 3 May 2018 04:44:12 +0000 (12:44 +0800)]
MLK-18180 ARM64: dts: correct the pad configurations of pcie

The correct default should be 0x04000021. In which we have the open
drain input option for field [25:26] with a pull up resistor and low
drive strength. This will allow the end point device to drive low the
wake and clkreq signals when necessary and don't have the PCIe
driving back to the endpoint device.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
(cherry picked from commit 2d3e439c1b32d78807bfc74dfc90f62aa897a709)

6 years agoMLK-17951 ARM: imx_v7_defconfig: enable AHCI_IMX in default
Richard Zhu [Tue, 10 Apr 2018 02:43:26 +0000 (10:43 +0800)]
MLK-17951 ARM: imx_v7_defconfig: enable AHCI_IMX in default

Enable the AHCI_IMX defaultly in imx_v7_defconfig

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
(cherry picked from commit a090146de2ef4be0ac9ccf2225a5bb4926a503dd)

6 years agoMGS-3705-2 [#imx-939] fix build break for 4.14 linux kernel
Xianzhong [Mon, 23 Apr 2018 13:09:14 +0000 (21:09 +0800)]
MGS-3705-2 [#imx-939] fix build break for 4.14 linux kernel

remove the obsolete code to fix build break for 4.14 kernel

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 17ef2e4e9f62f2ab24d5c6d3e053da38687b4519)

6 years agoMGS-3705-1 [#imx-939] fix gpu build for 4.14 linux kernel
Yuchou Gan [Fri, 2 Mar 2018 09:58:29 +0000 (17:58 +0800)]
MGS-3705-1 [#imx-939] fix gpu build for 4.14 linux kernel

"DRIVER_ATTR" no longer supported in 4.14 linux kernel,
using "DRIVER_ATTR_RW" to replace it.

Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
(cherry picked from commit cee4766bd6dc3d48e95578098ef981ec67af8153)

6 years agoMGS-3856-2 [#imx-1018] disable openvg2d for arm64 build
Xianzhong [Fri, 4 May 2018 11:19:39 +0000 (19:19 +0800)]
MGS-3856-2 [#imx-1018] disable openvg2d for arm64 build

MX8 chips does not have GC355. So no need to build the drivers

Signed-off-by : Xianzhong Li <xianzhong.li@nxp.com>
Reviewed-by : Prabhu Sundararaj <prabhu.sundararaj@nxp.com>

(cherry picked from commit a85b9583d459d6a0888db30564f0136739d7ec26)

6 years agoMLK-18069 ARM: dts: imx7ulp-evk: correct the touch setting
Haibo Chen [Thu, 3 May 2018 03:16:05 +0000 (11:16 +0800)]
MLK-18069 ARM: dts: imx7ulp-evk: correct the touch setting

The MIPI DSI config the DPI as 480 * 854, so correct the touch
display-coords property, to aligned with MIPI DSI.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit a00aa0ea7199fb04e425a49a4221d9202782eecf)

6 years agoMLK-17909 RNG Instantation done in Secure Firmware
Cedric Neveux [Tue, 17 Apr 2018 16:04:39 +0000 (18:04 +0200)]
MLK-17909 RNG Instantation done in Secure Firmware

   - For i.MX 6 and 7 check if the Secure Firmware (OPTEE) is present.
     If present don't do the RNG instantation in the CAAM driver

Reviewed-by: Silvano Di Ninno <silvano.dininno@nxp.com>
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
(cherry picked from commit 2b9489d18b6eca5b1f72689602f0eed16e88db84)

7 years agoMLK-18167 ARM64: defconfig: enable wilrless configs for Qca6174 qcacld-2.0
Andy Duan [Fri, 27 Apr 2018 04:07:27 +0000 (12:07 +0800)]
MLK-18167 ARM64: defconfig: enable wilrless configs for Qca6174 qcacld-2.0

Add some necessary configs for qualcomm wifi QCA6174 qcacld-2.0
and remove the ath10k configs.
(Run "make savedefconfig" to change the defconfig)

Reviewed-by: Andy Tian <yang.tian@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-18001 wireless: bcmdhd_1363: fix the build warning with [-Wpointer-compare]
Andy Duan [Wed, 25 Apr 2018 08:54:26 +0000 (16:54 +0800)]
MLK-18001 wireless: bcmdhd_1363: fix the build warning with [-Wpointer-compare]

Fix the build warning with [-Wpointer-compare] parameters.

Reviewed-by: Bough Chen <haibo.chen@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit:414b9eb9d5dd309988e409698ae4173967305a74)

7 years agoMLK-18101-6 gpu: imx: imx8_dprc: Dynamic enable/disable SC_C_SEL0
Yuchou Gan [Fri, 27 Apr 2018 10:15:01 +0000 (18:15 +0800)]
MLK-18101-6 gpu: imx: imx8_dprc: Dynamic enable/disable SC_C_SEL0

If enable _BLIT0:SC_C_SEL0, the prg for _BLIT0
will connect to _BLIT1, so _BLIT1 will have two prgs,
and _BLIT1 could works for multi planes conversion.
Check the plane num and dynamic enable or disable SC_C_SEL0.

Signed-off-by: yuchou gan <yuchou.gan@nxp.com>
7 years agoMLK-18101-5 gpu: imx: imx8_prg: Add prg_put_auxiliary() helper support
Yuchou Gan [Fri, 27 Apr 2018 10:14:07 +0000 (18:14 +0800)]
MLK-18101-5 gpu: imx: imx8_prg: Add prg_put_auxiliary() helper support

This patch adds prg_put_auxiliary() helper support so that users may
set a particular PRG not serve as an auxiliary one.

Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
7 years agoMLK-18101-4 gpu: imx: dpu-blit: Refine the first frame irq handle
Yuchou Gan [Fri, 20 Apr 2018 15:46:22 +0000 (23:46 +0800)]
MLK-18101-4 gpu: imx: dpu-blit: Refine the first frame irq handle

As the display will also use dprc0-irq, which will disturb the
interrupt for blit engine if blit engine use irq.
Refine the first frame process so that blit engine never use irq any more.

Signed-off-by: yuchou gan <yuchou.gan@nxp.com>
7 years agoMLK-18101-3 gpu: imx: imx8_dprc: Set has_aux_prg as true for _BLIT1
Yuchou Gan [Fri, 20 Apr 2018 17:33:15 +0000 (01:33 +0800)]
MLK-18101-3 gpu: imx: imx8_dprc: Set has_aux_prg as true for _BLIT1

On qxp b0 board, _BLIT1 will have aux_prg if enable PRG0_SEL.

Signed-off-by: yuchou gan <yuchou.gan@nxp.com>
7 years agoMLK-18101-2 arm64: dtsi: fsl-imx8qxp: Add prg1 for dpr1_channel2
Yuchou Gan [Fri, 20 Apr 2018 15:15:50 +0000 (23:15 +0800)]
MLK-18101-2 arm64: dtsi: fsl-imx8qxp: Add prg1 for dpr1_channel2

On QXP B0 board, prg1 can alternative connect to
dpr_channel1 and channel2. And if enable PRG0_SEL:BLIT0,
prg1 will connect to channel2, so it could
support 2-plane format tile to linear convert.

Signed-off-by: yuchou gan <yuchou.gan@nxp.com>
7 years agoMLK-18101-1 include: soc: imx8: sc: types: Add SC_C_SEL0 for B0 imx8qxp board
Yuchou Gan [Fri, 30 Mar 2018 09:41:19 +0000 (17:41 +0800)]
MLK-18101-1 include: soc: imx8: sc: types: Add SC_C_SEL0 for B0 imx8qxp board

Add SC_C_SEL0 for imx8qm/qxp B0.

Signed-off-by: yuchou gan <yuchou.gan@nxp.com>
7 years agoMGS-3848-5 [#imx-854] OCL1.2: test_image_streams failures
Xianzhong [Thu, 26 Apr 2018 15:33:37 +0000 (23:33 +0800)]
MGS-3848-5 [#imx-854] OCL1.2: test_image_streams failures

there are 2 test failed on 8QXP FB. CL151757 fixed bug #20196,
for image objects using host ptr, set the cacheable flag correctly.

merged CL151774 fix build error cause by CL151757.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 0be7546b8798645cea95e7dc935c43380f763458)

7 years agoMGS-3848-4 [#imx-854] correct hw-event synchronization between pm and other threads
Xianzhong [Wed, 25 Apr 2018 20:00:09 +0000 (04:00 +0800)]
MGS-3848-4 [#imx-854] correct hw-event synchronization between pm and other threads

When pm is running power ON to OFF (not broadcast), gckCOMMAND_Stall is called for synchronization.
But it does not blocks more events.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 1e2fae3d33a5e4b0690722dc112fd5a77eb90eac)

7 years agoMGS-3848-3 [#imx-854] correct command commit synchronization between pm and other...
Xianzhong [Wed, 25 Apr 2018 19:58:25 +0000 (03:58 +0800)]
MGS-3848-3 [#imx-854] correct command commit synchronization between pm and other threads

When power ON to other mode with broadcast (SUSPEND_BROADCAST,
IDLE_BROADCAST, OFF_BROADCAST), command->powerSemaphore is acquired after check idle.
code sequence:
    check commit atom
    check idle
    >>> at this point, other thread may have new commits at this
    >>> point.
    Acquire command->powerSemaphore
    ... do clock off

This can cause unexpected interrupts after clock OFF or power
OFF.

To fix: try to acquire powerSemaphore before check commit atom,
abort when failure, because command commit is in progress.

fix bug #19216, #19230.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 5228271314e8f575e4bbd9d3087c220b6a344b7d)

7 years agoMGS-3848-2 [#imx-854] fix events stuck issue when clock off
Xianzhong [Wed, 25 Apr 2018 19:56:08 +0000 (03:56 +0800)]
MGS-3848-2 [#imx-854] fix events stuck issue when clock off

When pm (SetPowerManagementState) is running power ON to
SUSPEND_BROADCAST, it only checks wait-link FE, but not Async FE. Clock
can be off when read AsyncFE Acknowledge register and other.

pm thread:
    ...
    check commit atom ok
    >> check idle OK
    (former stopIsr before cl144673 is here)
    set GPU clock off
    ...

isr:
    gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_Address));
    gckEVENT_Interrupt
    >>> here, at this point, all interrupt comes, check idle in
    >>> pm thread can pass.
    gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_EX_Address));
    gckFE_UpdateAvaiable -> ReadRegister(GCREG_FE_ASYNC_STATUS_Address)

If gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_EX_Address))
fail of clock off, then gckHARDWARE_Interrupt fails. In isrRoutine, it
won't wake up threadRoutine. Then it's stuck!
ReadRegister(GCREG_FE_ASYNC_STATUS_Address) failure can cause
unexpected behavior, too.

Former stopIsr (free_irq, before cl144673) can remove isr before
GPU clock off. So the issue is hidden.

To fix:
1. We should return success when either FE or AsyncFE reports
correct interrupts, so that isr can wake up threadRoutine for either FE.
That means, only need return ERROR when both FEs reports ERROR.
2. Add check for status of
ReadRegister(GCREG_FE_ASYNC_STATUS_Address).

Fix bug #19216, #19230.

merged BUG#19216 BUG#19230 CL152073 add missing part for CL151955

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 274841e0b05704726e28cc10185b6fb5973969f4)

7 years agoMGS-3848-1 [#imx-854] refinements for pm and isr
Xianzhong [Wed, 25 Apr 2018 19:53:47 +0000 (03:53 +0800)]
MGS-3848-1 [#imx-854] refinements for pm and isr

1. slightly increate performance for interrupt handler
2. refine powerMutex lock
3. remove obsolete power management mode
4. code refinement  preparing fix for bug #19216, #19230

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit e002022c3143b3e266af893b02bb913e3d156c54)

7 years agoMGS-3846 [#imx-1015] fix coverity high impact issue
Yuchou Gan [Thu, 26 Apr 2018 10:52:58 +0000 (18:52 +0800)]
MGS-3846 [#imx-1015] fix coverity high impact issue

Using uninitialized value minf when calling snprintf.
Initilize it to fix.

Date: 25th Apr, 2018
Signed-off-by: Yuchou Gan<yuchou.gan@nxp.com>
7 years agoMLK-18127 ARM: dts: imx7ulp-evk: few correction for usdhc1
Haibo Chen [Wed, 25 Apr 2018 08:03:24 +0000 (16:03 +0800)]
MLK-18127 ARM: dts: imx7ulp-evk: few correction for usdhc1

Currently, WiFi only work on SDIO2.0 mode, so add property
"no-1-8-v", otherwise following warning log will be print

sdhci-esdhc-imx 40380000.usdhc: could not get ultra high speed state, work on normal mode

The regulator reg_vsd_3v3 and reg_sd1_vmmc has the same
regulator name, so will trigger the following error log:

VSD_3V3: Failed to create debugfs directory

So change the regulator name of reg_sd1_vmmc.

According to the spec suggestion, ibe need to be enabled
for usdhc clock pin, and clock is better to pull down.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit b62dd733a100e35e93543642149bcf8b61e13242)

7 years agoclockevents: Retry programming min delta up to 10 times
James Hogan [Thu, 19 Oct 2017 14:17:23 +0000 (15:17 +0100)]
clockevents: Retry programming min delta up to 10 times

When CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=n, the call path
hrtimer_reprogram -> clockevents_program_event ->
clockevents_program_min_delta will not retry if the clock event driver
returns -ETIME.

If the driver could not satisfy the program_min_delta for any reason, the
lack of a retry means the CPU may not receive a tick interrupt, potentially
until the counter does a full period. This leads to rcu_sched timeout
messages as the stalled CPU is detected by other CPUs, and other issues if
the CPU is holding locks or other resources at the point at which it
stalls.

There have been a couple of observed mechanisms through which a clock event
driver could not satisfy the requested min_delta and return -ETIME.

With the MIPS GIC driver, the shared execution resource within MT cores
means inconventient latency due to execution of instructions from other
hardware threads in the core, within gic_next_event, can result in an event
being set in the past.

Additionally under virtualisation it is possible to get unexpected latency
during a clockevent device's set_next_event() callback which can make it
return -ETIME even for a delta based on min_delta_ns.

It isn't appropriate to use MIN_ADJUST in the virtualisation case as
occasional hypervisor induced high latency will cause min_delta_ns to
quickly increase to the maximum.

Instead, borrow the retry pattern from the MIN_ADJUST case, but without
making adjustments. Retry up to 10 times, each time increasing the
attempted delta by min_delta, before giving up.

[ Matt: Reworked the loop and made retry increase the delta. ]

Signed-off-by: James Hogan <jhogan@kernel.org>
Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: "Martin Schwidefsky" <schwidefsky@de.ibm.com>
Cc: James Hogan <james.hogan@mips.com>
Link: https://lkml.kernel.org/r/1508422643-6075-1-git-send-email-matt.redfearn@mips.com
7 years agoMGS-3832 [#imx-921] Fix the cl_convolution of ACL which cause MMU exception
Chenyan Feng [Tue, 24 Apr 2018 15:13:42 +0000 (23:13 +0800)]
MGS-3832 [#imx-921] Fix the cl_convolution of ACL which cause MMU exception

Dump the error info only when there is an error. If the gcdALLOC_ON_FAULT is not enabled, still need to check
the HW status to decide whether to dump the exception info or not

Signed-off-by: Ella Feng <ella.feng@nxp.com>
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
7 years agoMGS-3694 [#imx-913] enable fb fd and tile status fd in GPU and DCSS on wayland
Yong Gan [Tue, 17 Apr 2018 23:20:55 +0000 (07:20 +0800)]
MGS-3694 [#imx-913] enable fb fd and tile status fd in GPU and DCSS on wayland

Save the meta data info in the _gcsVIDMEM_NODE.
DCSS can query the meta data, and get the tile statust buffer info.

Date: Apr 13, 2018
Signed-off-by: Yong Gan yong.gan@nxp.com
(cherry picked from commit cea92256fec8380e6e185d65c7746988e7c6426e)

7 years agoMLK-18031 video: mxsfb: enable global alpha when grayscale is 0 for 32bpp format
Fancy Fang [Mon, 23 Apr 2018 10:52:13 +0000 (18:52 +0800)]
MLK-18031 video: mxsfb: enable global alpha when grayscale is 0 for 32bpp format

For overlay framebuffer, when its grayscale is '0' and the format
bpp is 32, enable the global alpha blending by default which can
make the overlay fb can display the framebuffer content as long as
it is unblanked.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit fede70b9066b03c24347619775fd7d007c5ddafb)

7 years agoMLK-18051 arm: imx: fix the audio bus hang when tee enabled
Bai Ping [Mon, 23 Apr 2018 09:55:16 +0000 (17:55 +0800)]
MLK-18051 arm: imx: fix the audio bus hang when tee enabled

fix audio bus mode hang issue on imx6sl. The root cause of
this issue is that busfreq mode passed to TEE side is wrong,
it will lead to ccm setting is wrong in TEE.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Tested-by: Anson huang <anson.huang@nxp.com>
7 years agoMLK-18036-3: ARM: dts: Remove imx optee dts files from Makefile
Leonard Crestez [Fri, 20 Apr 2018 14:40:51 +0000 (17:40 +0300)]
MLK-18036-3: ARM: dts: Remove imx optee dts files from Makefile

Fixes: a6fd1613cca4 ("MLK-18036-2 Delete *optee.dts files")

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Clement Faure <clement.faure@nxp.com>
(cherry picked from commit 4706425bb745850c8d28608ebcaffd239a945e63)

7 years agoMLK-18036-2 Delete *optee.dts files
Clement Faure [Tue, 17 Apr 2018 12:43:21 +0000 (14:43 +0200)]
MLK-18036-2 Delete *optee.dts files

A specific node for OCRAM mapping in optee as been added in
the device tree. These dedicated optee device trees can be
removed.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit a6fd1613cca4a5008c347d4473b92b119385644c)

7 years agoMLK-18036-1 Add "fsl,optee-lpm-sram" node for optee os power management.
Clement Faure [Fri, 13 Apr 2018 09:11:36 +0000 (11:11 +0200)]
MLK-18036-1 Add "fsl,optee-lpm-sram" node for optee os power management.

This node will be used by the OCRAM driver in optee to:
* Get the OCRAM start address for power management in optee.
* Add an entry that will overwrite ocrams nodes and dynamically reduce
the OCRAM available for mmio-sram in Linux.

That way we do not touch the legacy Linux boot and remove the dedicated
optee device tree.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit e96a3bcd754dee0aef3519bc08979985493be52c)

7 years agoMLK-16912 PL310: unlock ways during initialization
Cedric Neveux [Tue, 14 Nov 2017 16:42:42 +0000 (16:42 +0000)]
MLK-16912 PL310: unlock ways during initialization

This change affects all i.MX 6 with PL310 L2 Cache controller.
When Linux runs in Non-secure World the PL310 has already
been initialized by the ARM secure World running OP-TEE os.
However, in order to have a proper Linux Initialization all the
L2 cache ways have been locked by the secure world.

This patch unlock all the ways during pl310 initialization.

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
(cherry picked from commit be7971b62e0c77cf70f828868a5d5a4184a926d2)

7 years agoMLK-18088: arm: dts: enable the 7ulp mmdc profiling feature
Shenwei Wang [Thu, 19 Apr 2018 21:06:43 +0000 (16:06 -0500)]
MLK-18088: arm: dts: enable the 7ulp mmdc profiling feature

7ULP uses the same mmdc profiling block as i.mx6q. Added the
"fsl,imx6q-mmdc" compatible string to enable the mmdc profiling
feature.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
7 years agocfg80211: improve warnings in VHT rate calculation
Johannes Berg [Thu, 4 May 2017 05:52:10 +0000 (07:52 +0200)]
cfg80211: improve warnings in VHT rate calculation

Linus reported hitting the bandwidth warning, but it is indeed
pretty useless - improve it by printing the rate configuration
and make it only warn once, for both warnings here.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agoMGS-3806: clocksource: tpm: make sure returning -ETIME case correct
Anson Huang [Wed, 18 Apr 2018 07:20:03 +0000 (15:20 +0800)]
MGS-3806: clocksource: tpm: make sure returning -ETIME case correct

Incorrect condition check causes -ETIME return only
happen when next event is equal to current counter, and
it would cause various system issue like RCU stalls etc.,
the correct case should be whenever next event is less
than current counter, -ETIME should be returned. Correct
the type cast during return condition check to make it
work right.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-18011: imx7ulp: caam: Configure CAAM clocks
Franck LENORMAND [Tue, 17 Apr 2018 12:28:14 +0000 (14:28 +0200)]
MLK-18011: imx7ulp: caam: Configure CAAM clocks

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit 0b122f882429a82274fc99439b5d73986b731672)

7 years agoMLK-17992: caam: sm: Fix compilation warnings
Franck LENORMAND [Wed, 11 Apr 2018 11:57:33 +0000 (13:57 +0200)]
MLK-17992: caam: sm: Fix compilation warnings

Fix the following warnings in CAAM SM:

    drivers/crypto/caam/sm_store.c: In function 'blacken_key_jobdesc':
    drivers/crypto/caam/sm_store.c:141:19: warning: cast from pointer
     to integer of different size [-Wpointer-to-int-cast]
      tmpdesc[idx++] = (u32)key;
                       ^
    drivers/crypto/caam/sm_store.c:153:19: warning: cast from pointer
     to integer of different size [-Wpointer-to-int-cast]
      tmpdesc[idx++] = (u32)key;
                       ^
    drivers/crypto/caam/sm_store.c: In function 'blob_encap_jobdesc':
    drivers/crypto/caam/sm_store.c:274:19: warning: cast from pointer
     to integer of different size [-Wpointer-to-int-cast]
      tmpdesc[idx++] = (u32)secretbuf;
                       ^
    drivers/crypto/caam/sm_store.c: In function 'blob_decap_jobdesc':
    drivers/crypto/caam/sm_store.c:390:19: warning: cast from pointer
     to integer of different size [-Wpointer-to-int-cast]
      tmpdesc[idx++] = (u32)outbuf;
                       ^
    drivers/crypto/caam/sm_store.c: In function 'slot_get_base':
    drivers/crypto/caam/sm_store.c:569:9: warning: cast from pointer
     to integer of different size [-Wpointer-to-int-cast]
      return (u32)(ksdata->base_address);
             ^
    drivers/crypto/caam/sm_store.c: In function 'sm_keystore_slot_load':
    drivers/crypto/caam/sm_store.c:789:6:
     warning: unused variable 'i' [-Wunused-variable]
      u32 i;

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit b6bd87e624bbe30b9be19c3f8ccb8f5526e4186b)

7 years agoMLK-18042-02 arm: dts: update the backlight brightness on imx7ulp evk
Bai Ping [Tue, 17 Apr 2018 06:00:14 +0000 (14:00 +0800)]
MLK-18042-02 arm: dts: update the backlight brightness on imx7ulp evk

On the i.MX7ULP EVK Rev.B baord, the backlight brigntness driver circuit
is updated. A RC filter is added on the MP3301's EN pin. So the PWM's frequency
should be change to 20KHZ. for EN pin, A DC voltage from 0.7V to 1.4V can control
the LED current from 0% to 100%. the backlight brightness level also need to be
updated.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 82555e15a5f958c09492d0103425dc30bc7cd927)

7 years agoMLK-18042-01 driver: pwm: fix pwm pre-scale div config
Bai Ping [Tue, 17 Apr 2018 05:57:21 +0000 (13:57 +0800)]
MLK-18042-01 driver: pwm: fix pwm pre-scale div config

In i.MX7ULP TPM PWM module, it has a pre-scale divider,
this divider setting is missed, so fix it.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 3ffd915e44320a8142698ca3f6e19c30ec434f61)

7 years agoMLK-17993: arm: dts: rename the dts to match i.MX7ULP board design
Shenwei Wang [Wed, 11 Apr 2018 03:38:13 +0000 (22:38 -0500)]
MLK-17993: arm: dts: rename the dts to match i.MX7ULP board design

The default display interface on i.MX7ULP EVK board is the HDMI
interface, and a hardware rework is required to support the MIPI
panel. To match the current board design, added the HDMI node in
the imx7ulp-evk.dts and created a  new file named imx7ulp-evk-mipi.dts.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
7 years agoMLK-18026 dts: imx7ulp-evk-sd1: delete non-removable property for sd1 slot
Haibo Chen [Fri, 13 Apr 2018 07:03:00 +0000 (15:03 +0800)]
MLK-18026 dts: imx7ulp-evk-sd1: delete non-removable property for sd1 slot

commit a56e6e190015 ("MLK-17961 dts: imx7ulp-evk: add non-removable
property for wifi sdio") add non-removable property, sd1 slot on
base board share the same usdhc with wifi, and the sd1 slot support
card detect, so for sd1 slot, need to remove the non-removable
property.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Andy Duan <fuguang.duan@nxp.com>
(cherry picked from commit 2a40d8123aff4b4fb7a5cbf286d0c308a42c2fc7)

7 years agoMLK-18004: ARM: imx: pm-imx7ulp: fix resume failure in freeze mode
Robin Gong [Fri, 13 Apr 2018 11:35:12 +0000 (19:35 +0800)]
MLK-18004: ARM: imx: pm-imx7ulp: fix resume failure in freeze mode

This patch fix resume failure in freeze suspend mode on i.mx7ULP
("echo freeze > /sys/power/state") while pressing onoff key or
enabling rtc alarm wakeup. In freeze mode, kernel can only be woken
up by drivers which register wakup source such as 'device_init_wakeup'
or 'irq_set_irq_wake', otherwise, kernel will wait for irq handler
freeze_wake(). Unfortunately, our NMI interrupt which used to wakeup
A7 by M4 is not a common device and request irq as 'IRQF_NO_SUSPEND'
which means feeze_wake() never get chance to run while wakeup by any
event from M4 such as RTC, ONOFF. In this case, use pm_system_wakeup()
instead in NMI interrupt handle to trigger freeze_wake() directly.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-17979: ASoC: rpmsg_wm8960: add mixer control for ADC input
Shengjiu Wang [Wed, 11 Apr 2018 06:42:05 +0000 (14:42 +0800)]
MLK-17979: ASoC: rpmsg_wm8960: add mixer control for ADC input

The microphone only connect to left input, when record stereo channel
data, the right channel is mute. Add 'ADC Data Output Select' mixer
control that user can select the wanted configure. The default setting
is 'Left Data = Left ADC;  Right Data = Left ADC'.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit cce63c3e843b7d705df6e36adffc0226bfe40e42)

7 years agoMLK-17971 clk: imx: fix pll set rate failure issue on imx7ulp
Bai Ping [Mon, 9 Apr 2018 05:11:02 +0000 (13:11 +0800)]
MLK-17971 clk: imx: fix pll set rate failure issue on imx7ulp

The logic of 'if' check for the mult is wrong, this will lead
to set rate to PLL type failed. Additionally, remove the
unnecessary 'CLK_IS_CRITICAL' flags.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit a67aa226b9d0d294b51cfc43371fe78a005dfae4)

7 years agoMGS-3786 [#ccc] Cncrease the clock rate of GPU3D/GPU2D for 7ulp B0 board
Yuchou Gan [Fri, 30 Mar 2018 17:45:52 +0000 (01:45 +0800)]
MGS-3786 [#ccc] Cncrease the clock rate of GPU3D/GPU2D for 7ulp B0 board

The gpu3d/2d clock rate for 7ulp B0 board is 400M, increase it

Signed-off-by: yuchou gan <yuchou.gan@nxp.com>
(cherry picked from commit b51ae7e98ccfd9e25697d3e5b9795699917496ea)

7 years agoMGS-3778 [#imx-989] fix GPU performance regression with 6.2.4.p1
Xianzhong [Thu, 29 Mar 2018 11:46:42 +0000 (19:46 +0800)]
MGS-3778 [#imx-989] fix GPU performance regression with 6.2.4.p1

the original patch will skip CMA memory allocation with CMA_LIMIT flag,
that enforces GPU memory allocation from virtual pool with MMU mapping,
then both 2D and 3D performance will have performance regression on i.MX6.

Revert "6.2.4.p1-0044-CL142820-check-flag-match-even-try-to-allocate-from-"

This reverts commit 8a8cbf389ad56dc49685ea078698087be867655a.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 951e42c0ec05d4cdaf739eadd5fd40c2b8321b10)

7 years agoMLK-17944: ARM: dts: imx7ulp-evk: add poweron key
Robin Gong [Mon, 2 Apr 2018 09:42:43 +0000 (17:42 +0800)]
MLK-17944: ARM: dts: imx7ulp-evk: add poweron key

Add poweron key support on i.mx7ulp-evk board since M4 take
over snvs on B0 chip.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-17961 dts: imx7ulp-evk: add non-removable property for wifi sdio
Fugang Duan [Sat, 31 Mar 2018 09:00:38 +0000 (17:00 +0800)]
MLK-17961 dts: imx7ulp-evk: add non-removable property for wifi sdio

Add non-removable property for usdhc1 that is used as Murata
1PJ wifi sdio interface, which means wifi card always is present.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Tested-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-17779 input: egalax_ts: free irq resource before request the line as GPIO
Fugang Duan [Fri, 30 Mar 2018 08:45:26 +0000 (16:45 +0800)]
MLK-17779 input: egalax_ts: free irq resource before request the line as GPIO

If GPIO is connected to an IRQ then it should not request it as
GPIO function only when free its IRQ resouce.

Tested-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Robin Gong <yibin.gong@nxp.com
7 years agoMLK-17924 gpu: imx: imx8_dprc: Do not set FRAME_2P_PIX_X/Y_CTRL for updated IP
Liu Ying [Mon, 26 Mar 2018 08:05:03 +0000 (16:05 +0800)]
MLK-17924 gpu: imx: imx8_dprc: Do not set FRAME_2P_PIX_X/Y_CTRL for updated IP

We've got some fixups for DPR IP in the new i.MX8QXP silicon.
To address the cropping issue(TKT344978), the new IP changes the
FRAME_2P_PIX_X/Y_CTRL(@F0h and @100h) register definitions to be
FRAME_PIX_X/Y_ULC_CTRL.  Thus, we should not set the two registers
for the new IP.  FRAME_PIX_X/Y_ULC_CTRL will be programmed after
we figure out how to use them to do fb x/y offset for tile formats.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoMLK-17923 drm/imx: dpu: plane: Do not support fb x/y src offset for tile fmts
Liu Ying [Mon, 26 Mar 2018 08:19:37 +0000 (16:19 +0800)]
MLK-17923 drm/imx: dpu: plane: Do not support fb x/y src offset for tile fmts

We don't have correct support for fb x/y source offset for tile formats.
The buffer address calculation is wrong when the offset is non-zero.
Also, finer offset needs a fix in silicon(TKT344978).  So, let's do not
support the offset currently.  We may add it back after we figure out
how the updated silicon supports the offset.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
7 years agoarm64: Kill PSCI_GET_VERSION as a variant-2 workaround
Marc Zyngier [Tue, 6 Feb 2018 17:56:21 +0000 (17:56 +0000)]
arm64: Kill PSCI_GET_VERSION as a variant-2 workaround

commit 3a0a397ff5ff upstream.

Now that we've standardised on SMCCC v1.1 to perform the branch
prediction invalidation, let's drop the previous band-aid.
If vendors haven't updated their firmware to do SMCCC 1.1, they
haven't updated PSCI either, so we don't loose anything.

Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Conflicts:
no falkor/thunderx2/vulcan in arch/arm64/kernel/cpu_errata.c

7 years agoarm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support
Marc Zyngier [Tue, 6 Feb 2018 17:56:20 +0000 (17:56 +0000)]
arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support

commit b092201e0020 upstream.

Add the detection and runtime code for ARM_SMCCC_ARCH_WORKAROUND_1.
It is lovely. Really.

Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Conflicts:
no qcom hyp functions in
arch/arm64/kernel/bpi.S
arch/arm64/kernel/cpu_errata.c

7 years agoarm/arm64: smccc: Implement SMCCC v1.1 inline primitive
Marc Zyngier [Tue, 6 Feb 2018 17:56:19 +0000 (17:56 +0000)]
arm/arm64: smccc: Implement SMCCC v1.1 inline primitive

commit f2d3b2e8759a upstream.

One of the major improvement of SMCCC v1.1 is that it only clobbers
the first 4 registers, both on 32 and 64bit. This means that it
becomes very easy to provide an inline version of the SMC call
primitive, and avoid performing a function call to stash the
registers that would otherwise be clobbered by SMCCC v1.0.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
7 years agoarm/arm64: smccc: Make function identifiers an unsigned quantity
Marc Zyngier [Tue, 6 Feb 2018 17:56:18 +0000 (17:56 +0000)]
arm/arm64: smccc: Make function identifiers an unsigned quantity

commit ded4c39e93f3 upstream.

Function identifiers are a 32bit, unsigned quantity. But we never
tell so to the compiler, resulting in the following:

 4ac:   b26187e0        mov     x0, #0xffffffff80000001

We thus rely on the firmware narrowing it for us, which is not
always a reasonable expectation.

Cc: stable@vger.kernel.org
Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>