summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2023-01-18hwmon: sfctemp: Fix the problem that cannot disable sfctemp after enabling PMSamin Guo1-43/+43
[runtime_pm off] After Linux starts, it will enable clk and put tempsensor in standby state. When 'cat /sys/class/hwmon/hwmon0/temp1_input' is executed, will switch to the run state, and return the value of the sensor after the interrupt is generated. $ cat /sys/kernel/debug/clk/clk_summary | grep "temp_sensor" enable prepare protect duty hardware clock count count count rate accuracy phase cycle enable ------------------------------------------------------------------------------------------- u0_temp_sensor_clk_temp 1 1 0 1000000 0 0 50000 Y u0_temp_sensor_clk_apb0 1 1 0 49500000 0 0 50000 Y $ cat /sys/class/hwmon/hwmon0/temp1_input 46135 $ cat /sys/class/hwmon/hwmon0/temp1_enable 1 You can 'echo 0 >/sys/class/hwmon/hwmon0/temp1_enable' to turn off the tempsensor and clk. $ echo 0 > /sys/class/hwmon/hwmon0/temp1_enable $ cat /sys/kernel/debug/clk/clk_summary | grep "temp_sensor" enable prepare protect duty hardware clock count count count rate accuracy phase cycle enable ------------------------------------------------------------------------------------------- u0_temp_sensor_clk_temp 0 0 0 1000000 0 0 50000 N u0_temp_sensor_clk_apb0 0 0 0 49500000 0 0 50000 N $ cat /sys/class/hwmon/hwmon0/temp1_enable 0 $ cat /sys/class/hwmon/hwmon0/temp1_input cat: read error: No data available [runtime_pm on] When runtime_pm is turned on, sfctemp will automatically enter the suspend state and close clk after the system is started. $ cat /sys/kernel/debug/clk/clk_summary | grep "temp_sensor" enable prepare protect duty hardware clock count count count rate accuracy phase cycle enable ------------------------------------------------------------------------------------------- u0_temp_sensor_clk_temp 0 0 0 1000000 0 0 50000 N u0_temp_sensor_clk_apb0 0 0 0 49500000 0 0 50000 N when 'cat /sys/class/hwmon/hwmon0/temp1_input', it will call starfive_temp_resume, enable clk and put sfctemp into power on state. $ cat /sys/class/hwmon/hwmon0/temp1_input 46235 After the interrupt is generated and the sensor value is obtained, it will enter the suspend state again. so, hardware-enable-stats is always 'N'. Of course, in this mode (runtime_pm on), it also supports the opening and closing of functions (in fact, clk is not directly operated, and the opening and closing of clk are controlled by runtime_pm) $ cat /sys/class/hwmon/hwmon0/temp1_input 46235 $ cat /sys/class/hwmon/hwmon0/temp1_enable 1 $ echo 0 > /sys/class/hwmon/hwmon0/temp1_enable $ cat /sys/class/hwmon/hwmon0/temp1_enable 0 $ cat /sys/class/hwmon/hwmon0/temp1_input cat: read error: No data available Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-01-17Merge branch 'CR_2956_gpu_shanlong.li' into 'jh7110-5.15.y-devel'andy.hu3-2/+2
CR_2956: gpu:driver: fix up hibernation resume problem See merge request sdk/linux!672
2023-01-17net:wireless:eswin:disable p2p functionMichaelZhuxx1-1/+1
To fix dynamic naming issue, disable CONFIG_ECRNX_P2P for wifi ECR6600U Signed-off-by: MichaelZhuxx <michael.zhu@starfivetech.com>
2023-01-17Merge branch 'CR_3027_pinctrl_hal.feng' into 'jh7110-5.15.y-devel'andy.hu2-16/+18
CR 3027 pinctrl hal.feng See merge request sdk/linux!671
2023-01-17media: starfive: Modify support imx219 compile to moduleChanghuang Liang1-1/+1
Modify support imx219 compile to module. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
2023-01-16gpu:driver: fix up hibernation resume problemshanlong.li3-2/+2
fix up hibernation resume problem Signed-off-by: shanlong.li <shanlong.li@starfivetech.com>
2023-01-13pinctrl: starfive: Save all register values when suspending and restore them ↵Hal Feng2-16/+18
when resuming Restore the other registers besides irq registers when resuming. Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-01-13clk: starfive: Fixed UART3-5 error after resumeXingyu Wu1-5/+6
Fixed UART3-5 error after hibernation by adjusting register shift. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2023-01-11Merge tag 'JH7110_515_SDK_v4.0.0-rc2' into vf2-515-develVF2_v2.8.0Andy Hu11-176/+355
version JH7110_515_SDK_v4.0.0-rc2 for JH7110 EVB board 1. Fix hibernation issue: spdif, pwmdac, tdm, pdm, wave511, wave420l, jpu, can, isp, clk tree, gmac, gpio 2. Porting the upstream opensbi and add pm patch for hibernation 3. #3120 omx fix low probability of segment fault when decoding finish
2023-01-11Merge branch 'CR_2862_gt9xx_ts_515_changhuang.liang' into 'vf2-515-devel'andy.hu3-0/+1974
CR_2862_gt9xx_ts_515_changhuang.liang input: touchscreen: Add gt9xx driver support See merge request sbc/linux!56
2023-01-11Merge branch 'CR_3027_pinctrl_hal.feng' into 'jh7110-5.15.y-devel'andy.hu3-20/+43
CR 3027 pinctrl hal.feng See merge request sdk/linux!669
2023-01-11Merge branch 'CR_3122_fix_usb_resume_device_minda' into 'jh7110-5.15.y-devel'andy.hu1-19/+30
CR_3122 usb: phy: init phy in resume function See merge request sdk/linux!667
2023-01-11Merge branch 'CR_3051_ts_515_changhuang.liang' into 'jh7110-5.15.y-devel'andy.hu1-23/+20
CR_3051_ts_515_changhuang.liang input: touchscreen: tinker_ft5406: Delete unused code. See merge request sdk/linux!661
2023-01-11Merge branch 'CR_3054_vin_system_pm_changhuang.liang' into 'jh7110-5.15.y-devel'andy.hu4-114/+77
CR_3054_vin_system_pm_changhuang.liang media: starfive: Delete unused USE_MEDIA_PIPELINE macro code See merge request sdk/linux!665
2023-01-11clk: starfive: Add funtions of saving and restoring data about SYS, AON and STGXingyu Wu2-0/+185
Add 'save_context' ops to save register value of clock and 'restore_context' ops to restore the value to register. The ops only suitable for SYS, AON and STG clock tree not ISP and VOUT. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2023-01-11usb: phy: init phy in resume functionminda.chen1-19/+30
usb phy will be reset in suspend procedure. After resume. Some devices can not work. In usb resume, init phy again. Signed-off-by: minda.chen <minda.chen@starfivetech.com>
2023-01-11media: starfive: Update VIN system PM operationChanghuang Liang2-39/+63
Update VIN system PM operation, fixed multi open the same video node cause resume fail. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
2023-01-11media: starfive: stf_video: Multi open only set power one timeChanghuang Liang2-6/+17
Multi open the same video node only set power one time. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
2023-01-11media: starfive: Delete unused USE_MEDIA_PIPELINE macro codeChanghuang Liang1-73/+1
Delete unused USE_MEDIA_PIPELINE macro code. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
2023-01-09pinctrl: starfive: Save register values when suspending and restore them ↵Hal Feng2-0/+24
when resuming Restore the register configuration after resuming. Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-01-09input: touchscreen: tinker_ft5406: Update log showChanghuang Liang1-20/+19
Update log show. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
2023-01-09input: touchscreen: tinker_ft5406: Enable multipoint functionChanghuang Liang1-1/+1
Enable multipoint function. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
2023-01-09input: touchscreen: tinker_ft5406: Delete unused code.Changhuang Liang1-2/+0
Delete unused code avoid warning. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
2023-01-09pinctrl: starfive: Move pm ops to pinctrl-starfive-jh7110.cHal Feng3-20/+19
Because different SoCs have their own registers. We want to save all registers in the pm suspend function and restore them in the pm resume function. Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-01-07Merge tag 'JH7110_515_SDK_v4.0.0-rc1' into vf2-515-develAndy Hu9-43/+1601
version JH7110_515_SDK_v4.0.0-rc1 for JH7110 EVB board 1. #2828 support linux perf tool 2. #3049 merge hibernation branch to SDK 3. #2708 uboot support vout clk driver 4. #3006 uboot handle OTP return value 5. #2969, #3039 venc jpu fix futex issue
2023-01-06Merge branch 'CR_3049_Hibernation_mason.huo' into 'jh7110-5.15.y-devel'andy.hu4-43/+247
CR_3049 Add hibernation feature See merge request sdk/linux!658
2023-01-06Hibernation: canfd: Add system PM API for can/canfdWilliam Qiu1-3/+43
Add system PM API for can/canfd. Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2023-01-06input: touchscreen: Add gt9xx driver supportChanghuang Liang3-0/+1974
Add gt9xx touchscreen driver support in jh7110 platform. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
2023-01-05irqchip/irq-sifive-plic: Add syscore callbacks for hibernationmason.huo1-2/+91
The priority and enable registers of plic will be reset during hibernation power cycle in poweroff mode, add the syscore callbacks to save/restore those registers. Signed-off-by: mason.huo <mason.huo@starfivetech.com>
2023-01-05timer-starfive:add pm ops for timerziv.xu2-38/+113
add system pm ops for timer Signed-off-by: ziv.xu <ziv.xu@starfive.com>
2023-01-03RISC-V: Support CPUID for risc-v in perfJoão Mário Domingos1-0/+18
This patch creates the header.c file for the risc-v architecture and introduces support for PMU identification through sysfs. It is now possible to configure pmu-events in risc-v. Depends on patch [1], that introduces the id sysfs file. Signed-off-by: João Mário Domingos <joao.mario@tecnico.ulisboa.pt> Signed-off-by: minda.chen <minda.chen@starfivetech.com>
2023-01-03RISC-V: Create unique identification for SoC PMUJoão Mário Domingos1-0/+47
The SBI PMU platform driver did not provide any identification for perf events matching. This patch introduces a new sysfs file inside the platform device (soc:pmu/id) for pmu identification. The identification is a 64-bit value generated as: [63-32]: mvendorid; [31]: marchid[MSB]; [30-16]: marchid[15-0]; [15-0]: mimpid[15MSBs]; The CSRs are detailed in the RISC-V privileged spec [1]. The marchid is split in MSB + 15LSBs, due to the MSB being used for open-source architecture identification. [1] https://github.com/riscv/riscv-isa-manual Signed-off-by: João Mário Domingos <joao.mario@tecnico.ulisboa.pt>
2023-01-03RISC-V: Add sscofpmf extension supportAtish Patra1-5/+217
The sscofpmf extension allows counter overflow and filtering for programmable counters. Enable the perf driver to handle the overflow interrupt. The overflow interrupt is a hart local interrupt. Thus, per cpu overflow interrupts are setup as a child under the root INTC irq domain. Signed-off-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Atish Patra <atishp@rivosinc.com>
2023-01-03RISC-V: Add perf platform driver based on SBI PMU extensionAtish Patra4-0/+591
RISC-V SBI specification added a PMU extension that allows to configure start/stop any pmu counter. The RISC-V perf can use most of the generic perf features except interrupt overflow and event filtering based on privilege mode which will be added in future. It also allows to monitor a handful of firmware counters that can provide insights into firmware activity during a performance analysis. Signed-off-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Atish Patra <atishp@rivosinc.com>
2023-01-03RISC-V: Add a simple platform driver for RISC-V legacy perfAtish Patra3-0/+153
The old RISC-V perf implementation allowed counting of only cycle/instruction counters using perf. Restore that feature by implementing a simple platform driver under a separate config to provide backward compatibility. Any existing software stack will continue to work as it is. However, it provides an easy way out in future where we can remove the legacy driver. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Atish Patra <atishp@rivosinc.com>
2023-01-03RISC-V: Add a perf core library for pmu driversAtish Patra3-0/+333
Implement a perf core library that can support all the essential perf features in future. It can also accommodate any type of PMU implementation in future. Currently, both SBI based perf driver and legacy driver implemented uses the library. Most of the common perf functionalities are kept in this core library wile PMU specific driver can implement PMU specific features. For example, the SBI specific functionality will be implemented in the SBI specific driver. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Atish Patra <atishp@rivosinc.com>
2022-12-30Merge tag 'JH7110_515_SDK_v3.6.0' into vf2-515-develAndy Hu3-0/+420
version JH7110_515_SDK_v3.6.0 for JH7110 EVB board
2022-12-30Merge branch 'CR_2506_515_usb_wifi_jianlong' into 'vf2-515-devel'andy.hu109-0/+52820
CR_2506_515 net:wireless:Support eswin usb wifi ECR6600U See merge request sbc/linux!45
2022-12-30net:wireless:Support eswin usb wifi ECR6600UJianlong Huang109-0/+52820
Add usb wifi ECR6600U driver Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
2022-12-29Merge branch 'CR_2861_ts_515_changhuang.liang' into 'jh7110-5.15.y-devel'andy.hu3-0/+420
CR_2861_ts_515_changhuang.liang input: touchscreen: Add tinker_ft5406 driver support See merge request sdk/linux!654
2022-12-23input: touchscreen: tinker_ft5406: Fixed show more error log bugChanghuang Liang1-17/+12
Fixed show more error log bug when not attach the touchscreen. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
2022-12-22input: touchscreen: tinker_ft5406: Add open&close ioctlChanghuang Liang1-18/+14
Add open&close ioctl. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
2022-12-21input: touchscreen: Add tinker_ft5406 driver supportChanghuang Liang3-0/+429
Add tinker_ft5406 driver support Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
2022-12-21mmc: starfive: resolving warning logsWilliam Qiu1-29/+1
delete switch_voltage interface to resolving warning logs Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2022-12-19Merge tag 'JH7110_515_SDK_v3.5.1' from sdk into vf2-515-develVF2_v2.5.0Andy Hu8-464/+273
version JH7110_515_SDK_v3.5.1 for JH7110 EVB board
2022-12-19Merge branch 'CR_2868_515_evb_rgb2hdmi_shengyang.chen' into ↵andy.hu1-1/+0
'jh7110-5.15.y-devel' CR_2868: riscv: linux: vout: fix rgb2hdmi display problem See merge request sdk/linux!639
2022-12-19Merge branch 'CR_2069_515_evb_cusor_keith.zhao' into 'jh7110-5.15.y-devel'andy.hu1-0/+2
CR_2069: riscv: linux: vout: fix cusor problem See merge request sdk/linux!647
2022-12-19Merge branch 'CR_2888_515_clocktree_pll0_Xingyu.Wu' into 'jh7110-5.15.y-devel'andy.hu2-24/+4
CR_2888_515_clocktree_pll0_Xingyu.Wu See merge request sdk/linux!644
2022-12-16riscv: linux: vout: fix cusor problemshengyang.chen1-0/+2
fix cusor bluring problem of debian Signed-off-by: keith <keith.zhao@starfivetech.com>
2022-12-15clk: starfive: pll: Remove high frequency of PLL0Xingyu Wu1-23/+3
Remove high frequency of PLL0 and make sure PLL0 max frequency is 1.5GHz. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>