platform/kernel/linux-starfive.git
16 months agoMerge branch 'CR_2506_515_usb_wifi_jianlong' into 'vf2-515-devel'
andy.hu [Fri, 30 Dec 2022 11:27:56 +0000 (11:27 +0000)]
Merge branch 'CR_2506_515_usb_wifi_jianlong' into 'vf2-515-devel'

CR_2506_515 net:wireless:Support eswin usb wifi ECR6600U

See merge request sbc/linux!45

16 months agoMerge branch 'CR_2936_MMC_515_william.qiu' into 'vf2-515-devel'
andy.hu [Fri, 30 Dec 2022 11:20:41 +0000 (11:20 +0000)]
Merge branch 'CR_2936_MMC_515_william.qiu' into 'vf2-515-devel'

CR_2936_515: mmc: starfive: resolving warning logs

See merge request sbc/linux!49

16 months agoconfigs:starfive:Enable usb wifi ECR6600U
Jianlong Huang [Mon, 31 Oct 2022 09:02:55 +0000 (17:02 +0800)]
configs:starfive:Enable usb wifi ECR6600U

Enable usb wifi ECR6600U

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
16 months agonet:wireless:Support eswin usb wifi ECR6600U
Jianlong Huang [Mon, 31 Oct 2022 08:59:48 +0000 (16:59 +0800)]
net:wireless:Support eswin usb wifi ECR6600U

Add usb wifi ECR6600U driver

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
17 months agommc: starfive: resolving warning logs
William Qiu [Wed, 21 Dec 2022 02:59:23 +0000 (10:59 +0800)]
mmc: starfive: resolving warning logs

delete switch_voltage interface to resolving
warning logs

Signed-off-by: William Qiu <william.qiu@starfivetech.com>
17 months agoMerge tag 'JH7110_515_SDK_v3.5.1' from sdk into vf2-515-devel
Andy Hu [Mon, 19 Dec 2022 07:12:22 +0000 (15:12 +0800)]
Merge tag 'JH7110_515_SDK_v3.5.1' from sdk into vf2-515-devel

version JH7110_515_SDK_v3.5.1 for JH7110 EVB board

17 months agoMerge branch 'CR_2868_515_evb_rgb2hdmi_shengyang.chen' into 'jh7110-5.15.y-devel'
andy.hu [Mon, 19 Dec 2022 04:02:54 +0000 (04:02 +0000)]
Merge branch 'CR_2868_515_evb_rgb2hdmi_shengyang.chen' into 'jh7110-5.15.y-devel'

CR_2868: riscv: linux: vout: fix rgb2hdmi display problem

See merge request sdk/linux!639

17 months agoMerge branch 'CR_2069_515_evb_cusor_keith.zhao' into 'jh7110-5.15.y-devel'
andy.hu [Mon, 19 Dec 2022 04:00:26 +0000 (04:00 +0000)]
Merge branch 'CR_2069_515_evb_cusor_keith.zhao' into 'jh7110-5.15.y-devel'

CR_2069: riscv: linux: vout: fix cusor problem

See merge request sdk/linux!647

17 months agoMerge branch 'CR_2888_515_clocktree_pll0_Xingyu.Wu' into 'jh7110-5.15.y-devel'
andy.hu [Mon, 19 Dec 2022 03:55:01 +0000 (03:55 +0000)]
Merge branch 'CR_2888_515_clocktree_pll0_Xingyu.Wu' into 'jh7110-5.15.y-devel'

CR_2888_515_clocktree_pll0_Xingyu.Wu

See merge request sdk/linux!644

17 months agoMerge branch 'CR_2871_MMC_515_william.qiu' into 'jh7110-5.15.y-devel'
andy.hu [Mon, 19 Dec 2022 03:52:06 +0000 (03:52 +0000)]
Merge branch 'CR_2871_MMC_515_william.qiu' into 'jh7110-5.15.y-devel'

CR_2871riscv: dts: mmc:modify mmc1 config

See merge request sdk/linux!643

17 months agoMerge branch 'CR_2865_RNG_jiajie.ho' into 'jh7110-5.15.y-devel'
andy.hu [Mon, 19 Dec 2022 03:49:44 +0000 (03:49 +0000)]
Merge branch 'CR_2865_RNG_jiajie.ho' into 'jh7110-5.15.y-devel'

CR_2865: hwrng: Reworked driver for speed performance and efficiency

See merge request sdk/linux!640

17 months agoriscv: linux: vout: fix cusor problem
shengyang.chen [Fri, 16 Dec 2022 08:15:39 +0000 (16:15 +0800)]
riscv: linux: vout: fix cusor problem

fix cusor bluring problem of debian

Signed-off-by: keith <keith.zhao@starfivetech.com>
17 months agoriscv: dts: mmc:modify mmc1 config
William Qiu [Thu, 15 Dec 2022 09:03:28 +0000 (17:03 +0800)]
riscv: dts: mmc:modify mmc1 config

modify mmc1 config

Signed-off-by: William Qiu <william.qiu@starfivetech.com>
17 months agoclk: starfive: pll: Remove high frequency of PLL0
Xingyu Wu [Thu, 15 Dec 2022 06:48:40 +0000 (14:48 +0800)]
clk: starfive: pll: Remove high frequency of PLL0

Remove high frequency of PLL0 and make sure PLL0 max frequency is 1.5GHz.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
17 months agoclk: starfive: Change divider value of cpu_core clock
Xingyu Wu [Thu, 15 Dec 2022 06:17:59 +0000 (14:17 +0800)]
clk: starfive: Change divider value of cpu_core clock

Change divider value to make sure the frequency is half of PLL0.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
17 months agoCR_2865: hwrng: Reworked driver for speed performance and efficiency
Jia Jie Ho [Wed, 14 Dec 2022 06:14:39 +0000 (14:14 +0800)]
CR_2865: hwrng: Reworked driver for speed performance and efficiency

Changes:
1. Reseed during init only, not for every read.
2. Completion struct for irqreturn for better efficiency.
3. Add module_param for reseed operations based on request counter
and/or timer countdown.
4. Removed unused macros and steps.

Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
17 months agoriscv: linux: vout: fix rgb2hdmi display problem
shengyang.chen [Wed, 14 Dec 2022 02:46:19 +0000 (10:46 +0800)]
riscv: linux: vout: fix rgb2hdmi display problem

fix problem of rgb2hdmi without display in first test

Signed-off-by: shengyang.chen<shengyang.chen@starfivetech.com>
17 months agoMerge remote-tracking branch 'sdk/jh7110-5.15.y-devel' into vf2-515-devel
Andy Hu [Fri, 9 Dec 2022 16:16:09 +0000 (00:16 +0800)]
Merge remote-tracking branch 'sdk/jh7110-5.15.y-devel' into vf2-515-devel

17 months agoMerge branch 'CR_2822_PCIE_Kevin.xie' into 'jh7110-5.15.y-devel'
andy.hu [Fri, 9 Dec 2022 04:49:48 +0000 (04:49 +0000)]
Merge branch 'CR_2822_PCIE_Kevin.xie' into 'jh7110-5.15.y-devel'

CR 2822 riscv: configs: Add port bus driver for PCIe switch.

See merge request sdk/linux!633

17 months agoMerge branch 'CR_2796_515_sound_card_Xingyu.Wu' into 'jh7110-5.15.y-devel'
andy.hu [Fri, 9 Dec 2022 04:46:38 +0000 (04:46 +0000)]
Merge branch 'CR_2796_515_sound_card_Xingyu.Wu' into 'jh7110-5.15.y-devel'

CR_2796_515_sound_card_Xingyu.Wu

See merge request sdk/linux!631

17 months agoMerge branch 'CR_2789_refresh_uboot/spl_under_kernel_5.15_ziv.xu' into 'jh7110-5...
andy.hu [Fri, 9 Dec 2022 04:45:04 +0000 (04:45 +0000)]
Merge branch 'CR_2789_refresh_uboot/spl_under_kernel_5.15_ziv.xu' into 'jh7110-5.15.y-devel'

CR_2789_refresh_uboot/spl_under_kernel_5.15_ziv.xu

See merge request sdk/linux!635

17 months agosound:starfive:Move playback and capture driver as slave to starfive I2S
Xingyu Wu [Tue, 22 Nov 2022 03:42:34 +0000 (11:42 +0800)]
sound:starfive:Move playback and capture driver as slave to starfive I2S

Move playback and capture driver as slave from snps I2S merge to starfive I2S.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
17 months agoriscv:jh7110.dtsi: add uboot and spl partition on qspi node
ziv.xu [Fri, 2 Dec 2022 09:26:19 +0000 (17:26 +0800)]
riscv:jh7110.dtsi: add uboot and spl partition on qspi node

add uboot and spl partition on qspi node

Signed-off-by: ziv.xu <ziv.xu@starfive.com>
17 months agoMerge remote-tracking branch 'sdk/jh7110-5.15.y-devel' into vf2-515-devel
Andy Hu [Wed, 7 Dec 2022 08:55:40 +0000 (16:55 +0800)]
Merge remote-tracking branch 'sdk/jh7110-5.15.y-devel' into vf2-515-devel

17 months agoriscv: configs: Add port bus driver for PCIe switch.
Kevin.xie [Wed, 7 Dec 2022 06:20:16 +0000 (14:20 +0800)]
riscv: configs: Add port bus driver for PCIe switch.

Verified on JH7110EVB with ASMedia EV Board (asm1806 version).

Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
17 months agoriscv: dts: starfive: jh7110: Add multiple sound cards
Xingyu Wu [Tue, 6 Dec 2022 03:19:51 +0000 (11:19 +0800)]
riscv: dts: starfive: jh7110: Add multiple sound cards

Add multiple sound cards to let one device corresponds to
one sound card.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
17 months agoe24: xrp: remove from Kconfig and Makefile
Andy Hu [Tue, 6 Dec 2022 10:43:31 +0000 (18:43 +0800)]
e24: xrp: remove from Kconfig and Makefile

since run git filter-repo, then need to remove from Kconfig and
Makefile

Signed-off-by: Andy Hu <andy.hu@starfivetech.com>
17 months agoconfigs:starfive:Enable QSPI for visionfive2
Jianlong Huang [Fri, 2 Dec 2022 03:01:42 +0000 (11:01 +0800)]
configs:starfive:Enable QSPI for visionfive2

Enable QSPI for visionfive2

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
17 months agoMerge tag 'JH7110_515_SDK_v3.3.0' into vf2-515-devel
Jianlong Huang [Fri, 2 Dec 2022 02:43:01 +0000 (10:43 +0800)]
Merge tag 'JH7110_515_SDK_v3.3.0' into vf2-515-devel

version JH7110_515_SDK_v3.3.0 for JH7110 EVB board

17 months agoMerge branch 'CR_2650_PWM_hal.feng' into 'jh7110-5.15.y-devel'
andy.hu [Thu, 1 Dec 2022 10:52:21 +0000 (10:52 +0000)]
Merge branch 'CR_2650_PWM_hal.feng' into 'jh7110-5.15.y-devel'

CR 2650 PWM hal.feng

See merge request sdk/linux!626

17 months agoMerge branch 'CR_2653_QSPI_5.15_ziv.xu' into 'jh7110-5.15.y-devel'
andy.hu [Thu, 1 Dec 2022 10:37:13 +0000 (10:37 +0000)]
Merge branch 'CR_2653_QSPI_5.15_ziv.xu' into 'jh7110-5.15.y-devel'

CR 2653 QSPI 5.15 ziv.xu

See merge request sdk/linux!612

17 months agoMerge branch 'CR_2752_CPUfreq_515_mason.huo' into 'jh7110-5.15.y-devel'
andy.hu [Thu, 1 Dec 2022 10:35:43 +0000 (10:35 +0000)]
Merge branch 'CR_2752_CPUfreq_515_mason.huo' into 'jh7110-5.15.y-devel'

CR_2752 riscv: dts: Change cpu vdd per stress test

See merge request sdk/linux!624

17 months agopwm: starfive: Use pm_runtime functions to disable clock when the device being removed
Hal Feng [Wed, 30 Nov 2022 07:15:11 +0000 (15:15 +0800)]
pwm: starfive: Use pm_runtime functions to disable clock when the device being removed

So this can avoid disabling the pwm clock again when
the pwm device is suspended and being removed.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
17 months agoriscv: dts: Change cpu vdd per stress test
mason.huo [Mon, 28 Nov 2022 01:14:51 +0000 (09:14 +0800)]
riscv: dts: Change cpu vdd per stress test

18 months agoMerge tag 'JH7110_515_SDK_v3.2.0' into vf2-515-devel
Jianlong Huang [Sat, 26 Nov 2022 07:49:42 +0000 (15:49 +0800)]
Merge tag 'JH7110_515_SDK_v3.2.0' into vf2-515-devel

version JH7110_515_SDK_v3.2.0 for JH7110 EVB board

18 months agoMerge branch 'CR_2651_spi_dtbo_reload_faild_5.15_ziv.xu' into 'jh7110-5.15.y-devel'
andy.hu [Fri, 25 Nov 2022 12:56:08 +0000 (12:56 +0000)]
Merge branch 'CR_2651_spi_dtbo_reload_faild_5.15_ziv.xu' into 'jh7110-5.15.y-devel'

CR_2651_spi_dtbo_reload_faild_5.15_ziv.xu

See merge request sdk/linux!619

18 months agoMerge branch 'CR_2463_PCIE_Kevin.xie' into 'jh7110-5.15.y-devel'
andy.hu [Fri, 25 Nov 2022 10:31:21 +0000 (10:31 +0000)]
Merge branch 'CR_2463_PCIE_Kevin.xie' into 'jh7110-5.15.y-devel'

CR 2463 drivers: nvme: Add precheck and delay for CQE pending status.

See merge request sdk/linux!621

18 months agodrivers: nvme: Add precheck and delay for CQE pending status.
Kevin.xie [Thu, 24 Nov 2022 08:59:12 +0000 (16:59 +0800)]
drivers: nvme: Add precheck and delay for CQE pending status.

To workaroud the NVMe I/O timeout problem in bootup S10udev case
which caused by the CQE update lantancy.

Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
18 months agospi-pl022-starfive:fix the problem of spi overlay reload
ziv.xu [Wed, 23 Nov 2022 06:53:58 +0000 (14:53 +0800)]
spi-pl022-starfive:fix the problem of spi overlay reload

fix the problem of spi overlay reload

Signed-off-by: ziv.xu <ziv.xu@starfive.com>
18 months agoMerge tag 'JH7110_515_SDK_v3.1.0' into vf2-515-devel
Jianlong Huang [Sat, 19 Nov 2022 14:51:04 +0000 (22:51 +0800)]
Merge tag 'JH7110_515_SDK_v3.1.0' into vf2-515-devel

version JH7110_515_SDK_v3.1.0 for JH7110 EVB board

18 months agodriver:spi-cadence-quadspi: enable qspi
ziv.xu [Tue, 15 Nov 2022 01:50:09 +0000 (09:50 +0800)]
driver:spi-cadence-quadspi: enable qspi

enable qspi

Signed-off-by: ziv.xu <ziv.xu@starfive.com>
18 months agoMerge branch 'CR_2429_spi_error_of_freq-5.15_ziv.xu' into 'jh7110-5.15.y-devel'
andy.hu [Thu, 17 Nov 2022 09:18:17 +0000 (09:18 +0000)]
Merge branch 'CR_2429_spi_error_of_freq-5.15_ziv.xu' into 'jh7110-5.15.y-devel'

CR 2429 spi error of freq 5.15 ziv.xu

See merge request sdk/linux!603

18 months agoMerge branch 'CR_2661_V4L2_Kevin.xie' into 'jh7110-5.15.y-devel'
andy.hu [Thu, 17 Nov 2022 09:12:03 +0000 (09:12 +0000)]
Merge branch 'CR_2661_V4L2_Kevin.xie' into 'jh7110-5.15.y-devel'

CR 2661 v4l2_driver: vin: Add skip frames for isp control.

See merge request sdk/linux!610

18 months agoMerge branch 'CR_2434_imx219_515_changhuang.liang' into 'jh7110-5.15.y-devel'
andy.hu [Thu, 17 Nov 2022 09:08:34 +0000 (09:08 +0000)]
Merge branch 'CR_2434_imx219_515_changhuang.liang' into 'jh7110-5.15.y-devel'

CR_2434_imx219_515_changhuang.liang media: v4l2_driver: Supplement the missing runtime pm get ops on more than once stream_on cases.

See merge request sdk/linux!595

18 months agoMerge branch 'CR_2642_PCIe_Kevin.xie' into 'jh7110-5.15.y-devel'
andy.hu [Thu, 17 Nov 2022 07:10:11 +0000 (07:10 +0000)]
Merge branch 'CR_2642_PCIe_Kevin.xie' into 'jh7110-5.15.y-devel'

CR 2642 drivers: pci: Set PCIe PCI standard configuration ID.

See merge request sdk/linux!613

18 months agoMerge branch 'CR_2583_fix_usb_resume_hub_minda' into 'jh7110-5.15.y-devel'
andy.hu [Thu, 17 Nov 2022 07:02:36 +0000 (07:02 +0000)]
Merge branch 'CR_2583_fix_usb_resume_hub_minda' into 'jh7110-5.15.y-devel'

CR_2583 USB: core: Fix bug in resuming hub's handling of wakeup requests

See merge request sdk/linux!600

18 months agoMerge branch 'CR_2588_515_watchdog_timeleft_Xingyu.Wu' into 'jh7110-5.15.y-devel'
andy.hu [Thu, 17 Nov 2022 06:53:09 +0000 (06:53 +0000)]
Merge branch 'CR_2588_515_watchdog_timeleft_Xingyu.Wu' into 'jh7110-5.15.y-devel'

CR_2588_515_watchdog_timeleft_Xingyu.Wu

See merge request sdk/linux!597

18 months agoMerge branch 'CR_2621_CPUIDLE_mason.huo' into 'jh7110-5.15.y-devel'
andy.hu [Thu, 17 Nov 2022 06:51:07 +0000 (06:51 +0000)]
Merge branch 'CR_2621_CPUIDLE_mason.huo' into 'jh7110-5.15.y-devel'

CR_2621 riscv: dts: Remove unsupported cpuidle state

See merge request sdk/linux!608

18 months agoMerge branch 'CR_2435_hibernation-for-main_5.15_vout_shengyang.chen' into 'jh7110...
andy.hu [Thu, 17 Nov 2022 06:48:28 +0000 (06:48 +0000)]
Merge branch 'CR_2435_hibernation-for-main_5.15_vout_shengyang.chen' into 'jh7110-5.15.y-devel'

CR_2435: clk:starfive:vout:Add runtime and system pm && riscv:linux:drm: Add runtime and system pm

See merge request sdk/linux!596

18 months agodrivers: pci: Set PCIe PCI standard configuration ID.
Kevin.xie [Tue, 15 Nov 2022 09:27:32 +0000 (17:27 +0800)]
drivers: pci: Set PCIe PCI standard configuration ID.

Class - PCI-to-PCI bridge.
Revision - 2.

Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
18 months agov4l2_driver: vin: Add skip frames for isp control.
Kevin.xie [Tue, 15 Nov 2022 06:04:20 +0000 (14:04 +0800)]
v4l2_driver: vin: Add skip frames for isp control.

The duration of extra isp control skip frames are fixed to 1 second.

Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
18 months agostarfive:defconfig: modify defconfig to enable qspi
ziv.xu [Tue, 15 Nov 2022 08:06:06 +0000 (16:06 +0800)]
starfive:defconfig: modify defconfig to enable qspi

modify defconfig to enable qspi

Signed-off-by: ziv.xu <ziv.xu@starfive.com>
18 months agodrm:verisilicon:hdmi-audio:Adjust when to configure registers
Xingyu Wu [Thu, 10 Nov 2022 09:02:38 +0000 (17:02 +0800)]
drm:verisilicon:hdmi-audio:Adjust when to configure registers

Adjust when to configure registers before HDMI suspend.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
18 months agodma:dw:Add stg_axi clock and reset of noc_bus
Xingyu Wu [Tue, 8 Nov 2022 14:04:07 +0000 (22:04 +0800)]
dma:dw:Add stg_axi clock and reset of noc_bus

Add 'JH7110_NOC_BUS_CLK_STG_AXI' clock and
'RSTN_U0_NOC_BUS_STG_AXI_N' reset.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
18 months agoriscv:linux:drm : fix vout pm bug
shengyang.chen [Wed, 9 Nov 2022 02:15:19 +0000 (10:15 +0800)]
riscv:linux:drm : fix vout pm bug

fix display problem of hdmi sys pm

Signed-off-by: shengyang.chen<shengyang.chen@starfivetech.com>
18 months agoriscv:linux:drm: fix double display bug
shengyang.chen [Fri, 4 Nov 2022 10:17:52 +0000 (18:17 +0800)]
riscv:linux:drm: fix double display bug

fix double display bug

Signed-off-by: shengyang.chen<shengyang.chen@starfivetech.com>
18 months agolinux:dts:starfive: remove some useless port of vout dts
shengyang.chen [Fri, 4 Nov 2022 10:17:06 +0000 (18:17 +0800)]
linux:dts:starfive: remove some useless port of vout dts

fix double display bug
remove some useless port of vout dts

Signed-off-by: shengyang.chen<shengyang.chen@starfivetech.com>
18 months agoriscv:linux:drm: Add basic runtime and system pm support for vout
shengyang.chen [Wed, 2 Nov 2022 03:35:47 +0000 (11:35 +0800)]
riscv:linux:drm: Add basic runtime and system pm support for vout

Add basic runtime and system pm support for vout
remove some useless clk/rst function and calling in vs_dc.c
improve vout driver structure

Signed-off-by: shengyang.chen<shengyang.chen@starfivetech.com>
18 months agolinux:dts:starfive: Add pm support for vout dts
shengyang.chen [Wed, 2 Nov 2022 03:34:32 +0000 (11:34 +0800)]
linux:dts:starfive: Add pm support for vout dts

Add pm support for vout dts
remove some useless port of vout dts

Signed-off-by: shengyang.chen<shengyang.chen@starfivetech.com>
18 months agoclk:starfive:vout:Add parent about disp_apb clk
Xingyu Wu [Tue, 8 Nov 2022 13:53:31 +0000 (21:53 +0800)]
clk:starfive:vout:Add parent about disp_apb clk

Clock "u0_pclk_mux_func_pclk" is the parent of "disp_apb" clock.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
18 months agoclk:starfive:vout:Add runtime and system pm
Xingyu Wu [Wed, 19 Oct 2022 09:06:17 +0000 (17:06 +0800)]
clk:starfive:vout:Add runtime and system pm

Add runtime and system pm in vout clock tree driver.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
18 months agospi-pl022-starfive.c: prompt warning when frequency does not surpport
ziv.xu [Thu, 10 Nov 2022 08:13:19 +0000 (16:13 +0800)]
spi-pl022-starfive.c: prompt warning when frequency does not surpport

prompt warning when frequency does not surpport

Signed-off-by: ziv.xu <ziv.xu@starfive.com>
18 months agoriscv: dts: Remove unsupported cpuidle state
mason.huo [Fri, 11 Nov 2022 02:13:04 +0000 (10:13 +0800)]
riscv: dts: Remove unsupported cpuidle state

The cpuidle state1 is also implemented in sbi with
WFI C state, but it cause audio play failed.
Remove the cpuidle state1.

Signed-off-by: mason.huo <mason.huo@starfivetech.com>
18 months agoUSB: core: Fix bug in resuming hub's handling of wakeup requests
Alan Stern [Sat, 1 Jan 2022 19:52:14 +0000 (14:52 -0500)]
USB: core: Fix bug in resuming hub's handling of wakeup requests

Bugzilla #213839 reports a 7-port hub that doesn't work properly when
devices are plugged into some of the ports; the kernel goes into an
unending disconnect/reinitialize loop as shown in the bug report.

This "7-port hub" comprises two four-port hubs with one plugged into
the other; the failures occur when a device is plugged into one of the
downstream hub's ports.  (These hubs have other problems too.  For
example, they bill themselves as USB-2.0 compliant but they only run
at full speed.)

It turns out that the failures are caused by bugs in both the kernel
and the hub.  The hub's bug is that it reports a different
bmAttributes value in its configuration descriptor following a remote
wakeup (0xe0 before, 0xc0 after -- the wakeup-support bit has
changed).

The kernel's bug is inside the hub driver's resume handler.  When
hub_activate() sees that one of the hub's downstream ports got a
wakeup request from a child device, it notes this fact by setting the
corresponding bit in the hub->change_bits variable.  But this variable
is meant for connection changes, not wakeup events; setting it causes
the driver to believe the downstream port has been disconnected and
then connected again (in addition to having received a wakeup
request).

Because of this, the hub driver then tries to check whether the device
currently plugged into the downstream port is the same as the device
that had been attached there before.  Normally this check succeeds and
wakeup handling continues with no harm done (which is why the bug
remained undetected until now).  But with these dodgy hubs, the check
fails because the config descriptor has changed.  This causes the hub
driver to reinitialize the child device, leading to the
disconnect/reinitialize loop described in the bug report.

The proper way to note reception of a downstream wakeup request is
to set a bit in the hub->event_bits variable instead of
hub->change_bits.  That way the hub driver will realize that something
has happened to the port but will not think the port and child device
have been disconnected.  This patch makes that change.

Cc: <stable@vger.kernel.org>
Tested-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/YdCw7nSfWYPKWQoD@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: minda.chen <minda.chen@starfivetech.com>
18 months agowatchdog: starfive: Get timeleft correctly
Xingyu Wu [Wed, 9 Nov 2022 06:34:14 +0000 (14:34 +0800)]
watchdog: starfive: Get timeleft correctly

Use flag to count timeleft and the flag is base on
reading register instead of interrupt handler function.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
18 months agoMerge tag 'JH7110_515_SDK_v3.0.0-rc3' into vf2-515-devel
Jianlong Huang [Thu, 10 Nov 2022 00:22:14 +0000 (08:22 +0800)]
Merge tag 'JH7110_515_SDK_v3.0.0-rc3' into vf2-515-devel

version JH7110_515_SDK_v3.0.0-rc3 for JH7110 EVB board

18 months agoMerge branch 'CR_2553_ytphy_515_samin.guo' into 'jh7110-5.15.y-devel'
andy.hu [Wed, 9 Nov 2022 11:22:58 +0000 (11:22 +0000)]
Merge branch 'CR_2553_ytphy_515_samin.guo' into 'jh7110-5.15.y-devel'

CR_2553:  515: Use ytphy_link_change_notify to detect link changes by yt8521/YT8531.

See merge request sdk/linux!592

18 months agoMerge branch 'CR_2556_vf2_515_DRM_mipi_new_panel_keith.zhao' into 'vf2-515-devel'
jianlong.huang [Wed, 9 Nov 2022 10:26:48 +0000 (10:26 +0000)]
Merge branch 'CR_2556_vf2_515_DRM_mipi_new_panel_keith.zhao' into 'vf2-515-devel'

800*1280屏幕 支持开机探测 解决默认状态为 connected 的问题

See merge request sbc/linux!47

18 months agonet:phy:motorcomm: Fix the problem that phytool cannot be used by YT8531
Samin Guo [Fri, 4 Nov 2022 01:42:40 +0000 (09:42 +0800)]
net:phy:motorcomm: Fix the problem that phytool cannot be used by YT8531

phy_read_status should not judge the auto negotiation speed, which
will cause 0x1e to be frequently modified.

JH7110B In different speed modes, the tx_inverted  needs to be
dynamically updated to match the timming.

known issue:
Function yt8521_read_status, it will be executed once per second.
Can read and write ext reg (0xa001/a002/a003). This may causes the ext value
read by the phytool always is 0.

$ phytool write eth0/0/0x1e 0xa001
$ phytool read eth0/0/0x1f
0000

To avoid this problem, you can read 0x1f as fast as possible after
writing 0x1e.
$ phytool write eth0/0/0x1e 0xa001; phytool read eth0/0/0x1f
0x8160

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
18 months agoriscv:linux:vout:mipi
keith.zhao [Wed, 9 Nov 2022 02:43:13 +0000 (18:43 -0800)]
riscv:linux:vout:mipi

add 800*1280 I2C read to detect the status of connection

Signed-off-by: keith <keith.zhao@starfivetech.com>
18 months agomedia: v4l2_driver: Supplement the missing runtime pm get ops on more than once strea...
Kevin.xie [Tue, 8 Nov 2022 08:37:45 +0000 (16:37 +0800)]
media: v4l2_driver: Supplement the missing runtime pm get ops on more than once stream_on cases.

For example, if we run stf_isp_ctrl & v4l2test at the same time,
s_stream for sensor will be called twice,
so that rpm should be got twice too.

Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
18 months agoRevert "dts:starfive:Disable spi"
Jianlong Huang [Thu, 3 Nov 2022 10:17:17 +0000 (18:17 +0800)]
Revert "dts:starfive:Disable spi"

Have fixed spi issue which lead to crash booting.

This reverts commit bb1b47228930974ab386badc2544a2dbd49ddc18.

18 months agoconfigs:Sync configs of jh7110
Jianlong Huang [Thu, 3 Nov 2022 10:13:30 +0000 (18:13 +0800)]
configs:Sync configs of jh7110

+CONFIG_PM_DEBUG=y
+CONFIG_PM_ADVANCED_DEBUG=y

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agoriscv:linux:vout:mipi
keith.zhao [Mon, 31 Oct 2022 09:51:53 +0000 (17:51 +0800)]
riscv:linux:vout:mipi

mipi dsi driver add 800*1280 panel : update panel driver code

Signed-off-by: keith <keith.zhao@starfivetech.com>
18 months agoriscv:linux:vout:mipi
keith.zhao [Mon, 31 Oct 2022 09:50:48 +0000 (17:50 +0800)]
riscv:linux:vout:mipi

mipi dsi driver add 800*1280 panel: update dts and config

Signed-off-by: keith <keith.zhao@starfivetech.com>
18 months agoconfigs:starfive:Default CPUFREQ governor ondemand
Jianlong Huang [Mon, 31 Oct 2022 01:47:30 +0000 (09:47 +0800)]
configs:starfive:Default CPUFREQ governor ondemand

Change Default CPUFREQ governor to ondemand.

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agoregulator:axp1506:Remove regulator ALDO4
Jianlong Huang [Mon, 31 Oct 2022 01:31:44 +0000 (09:31 +0800)]
regulator:axp1506:Remove regulator ALDO4

Fix bug, remove sdio_vdd and remove ALDO4 enum.
Which may cause cpu freq don't work.

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agodts:starfive:Disable spi
Jianlong Huang [Sat, 29 Oct 2022 13:16:07 +0000 (21:16 +0800)]
dts:starfive:Disable spi

System crash when booting due to pl022_runtime_suspend.
Next version will fix it.

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agoconfigs: enable CPU_FREQ
Jianlong Huang [Sat, 29 Oct 2022 06:45:27 +0000 (14:45 +0800)]
configs: enable CPU_FREQ

enable cpu freq function

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agonet:stmmac:dwc-qos: add support for external rmii_rtx clocks
Samin Guo [Fri, 21 Oct 2022 09:28:39 +0000 (17:28 +0800)]
net:stmmac:dwc-qos: add support for external rmii_rtx clocks

JH7110A use external rmii_rtx clk for tx clk on 100M/10M mode.

Signed-off-by: Samin Guo <samin.guo@linux.starfivetech.com>
18 months agoregulator:axp15060:Remove sdio vdd regulator
Jianlong Huang [Thu, 20 Oct 2022 01:23:51 +0000 (09:23 +0800)]
regulator:axp15060:Remove sdio vdd regulator

Visionfive2 emmc is default 1.8V, there is no need to controll the voltage.
Remove sdio_vdd node and code.

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agoconfigfs: Enable SND_SOC_STARFIVE_I2S
Jianlong Huang [Tue, 18 Oct 2022 03:31:28 +0000 (11:31 +0800)]
configfs: Enable SND_SOC_STARFIVE_I2S

Support hdmi audio

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agoarch:dts:starfive:Enable i2stx_4ch0 node
Jianlong Huang [Mon, 17 Oct 2022 14:15:24 +0000 (22:15 +0800)]
arch:dts:starfive:Enable i2stx_4ch0 node

Add mclk_ext pin and enable i2stx_4ch0

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agoriscv:dts:jh7110: Modify CMA reserved space to better support 2G DRAM
Jianlong Huang [Mon, 17 Oct 2022 13:45:03 +0000 (21:45 +0800)]
riscv:dts:jh7110: Modify CMA reserved space to better support 2G DRAM

When the DDR is 2G (0x40000000-0xc0000000), it may cause address usage
problems.

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agoriscv:starfive:jh7110: change gmac0 tx delay to 0xa
Samin Guo [Mon, 17 Oct 2022 10:59:39 +0000 (18:59 +0800)]
riscv:starfive:jh7110: change gmac0 tx delay to 0xa

0xa will better match gmac0 tx in 1000M

Signed-off-by: Samin Guo <samin.guo@linux.starfivetech.com>
18 months agodts:starfive:jh7110: set gmac phy tx_inverted for JH7110B+YT8531PHY.
Samin Guo [Wed, 12 Oct 2022 05:05:44 +0000 (13:05 +0800)]
dts:starfive:jh7110: set gmac phy tx_inverted for JH7110B+YT8531PHY.

JH7110B requires tx_inverted_10/100/1000 configuration, and different parameters
may be required in 10M/100M/1000M mode.

This parameter supports JH7110B+YT8531PHY by default. Other boards can
modify the parameters of the tx_inverted_10/100/1000 to obtain support.

Signed-off-by: Samin Guo <samin.guo@linux.starfivetech.com>
18 months agodts: starfive: Add A11 dts for vf2 version 1.1 board
Jianlong Huang [Wed, 12 Oct 2022 02:00:10 +0000 (10:00 +0800)]
dts: starfive: Add A11 dts for vf2 version 1.1 board

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agodts: starfive: Enable gpio restart
Jianlong Huang [Tue, 27 Sep 2022 02:50:28 +0000 (10:50 +0800)]
dts: starfive: Enable gpio restart

Add gpio restart dts node
Enable gpio restart config

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agodts: starfive: Enable usb device node
Jianlong Huang [Sat, 24 Sep 2022 00:46:23 +0000 (08:46 +0800)]
dts: starfive: Enable usb device node

Sync jh7110 usb device node and enable
Sync jh7110 imx219 compatible name

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agoconfigs: visionfive2: Enable usb device config
Jianlong Huang [Sat, 24 Sep 2022 00:45:26 +0000 (08:45 +0800)]
configs: visionfive2: Enable usb device config

Sync jh7110 usb device config

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agoconfig: Add led config
Jianlong Huang [Mon, 19 Sep 2022 09:44:30 +0000 (17:44 +0800)]
config: Add led config

Enable led trigger heartbeat

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agodts: starfive: Add led node
Jianlong Huang [Mon, 19 Sep 2022 09:43:13 +0000 (17:43 +0800)]
dts: starfive: Add led node

Add led node on dts file

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agodts: starfive: Move wm8960 and ac108 node under i2c form dtsi file to wm8960/ac108...
Jianlong Huang [Mon, 19 Sep 2022 06:54:44 +0000 (14:54 +0800)]
dts: starfive: Move wm8960 and ac108 node under i2c form dtsi file to wm8960/ac108 file

The default dts do not contain wm8960/ac108, move to the other file.
The booting of default dts do not have wrong log about wm8960/ac108

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agodts: starfive: Replace stf to starfive
Jianlong Huang [Mon, 19 Sep 2022 00:50:08 +0000 (08:50 +0800)]
dts: starfive: Replace stf to starfive

Forget to replace stf to starfive on dtbo file

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agodts: starfive: enhance SD card io Output Drive Strength
Jianlong Huang [Thu, 15 Sep 2022 00:56:06 +0000 (08:56 +0800)]
dts: starfive: enhance SD card io Output Drive Strength

SD card gpio is generic gpio on visionfive2, the default output drive strength may be not enough, some sd card do not work.
So enhance the gpio output drive strength to max.
But on visionfive2, the sd card gpio is fixed 3.3V, there is no need to switch_voltage and not support uhs mode.

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agodts: starfive: Replace sf to starfive
Jianlong Huang [Thu, 15 Sep 2022 00:47:20 +0000 (08:47 +0800)]
dts: starfive: Replace sf to starfive

Because upstream requirement.
Replace sf to starfive.
Replace hdmi_output to rgb_output.
Replace encoder to dsi_output

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agodts: starfive: Add wm8960 and ac108 dts
Jianlong Huang [Thu, 1 Sep 2022 07:22:36 +0000 (15:22 +0800)]
dts: starfive: Add wm8960 and ac108 dts

Add wm8960 and ac108 dts base default dts

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agoconfigs: starfive: sync jh7110 config to visionfive2
Jianlong Huang [Mon, 29 Aug 2022 00:57:59 +0000 (08:57 +0800)]
configs: starfive: sync jh7110 config to visionfive2

sync jh7110 config to visionfive2 about audio config

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
18 months agoriscv: dts: Change the cpu_vdd_0p9 to cpu_vdd
mason.huo [Tue, 23 Aug 2022 03:44:09 +0000 (11:44 +0800)]
riscv: dts: Change the cpu_vdd_0p9 to cpu_vdd

Signed-off-by: mason.huo <mason.huo@starfivetech.com>
18 months agodts: starfive: Add ac108 dts config
jianlonghuang [Tue, 23 Aug 2022 01:13:07 +0000 (09:13 +0800)]
dts: starfive: Add ac108 dts config

    Add ac108 dts

Signed-off-by: jianlonghuang <jianlong.huang@starfivetech.com>