summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-01-15Merge branch 'CR_8950_openwrt-6.1_pll0-1.5G_hal.feng' into 'openwrt-6.1.y'JH7110_OpenWRT_6.1_v0.1.0openwrt-6.1.yandy.hu1-1/+48
CR_8950_openwrt-6.1_pll0-1.5G_hal.feng See merge request sbc/linux!187
2024-01-12clk: starfive: jh7110-sys: Fix lower rate of CPUfreq by setting PLL0 rate to ↵Xingyu Wu1-1/+48
1.5GHz CPUfreq supports 4 cpu frequency loads on 375/500/750/1500MHz. But now PLL0 rate is 1GHz and the cpu frequency loads become 333/500/500/1000MHz in fact. So PLL0 rate should be set to 1.5GHz. Change the parent of cpu_root clock and the divider of cpu_core before the setting. Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Fixes: e2c510d6d630 ("riscv: dts: starfive: Add cpu scaling for JH7110 SoC") Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2024-01-11net: phy: motorcomm: Add pad drive strength cfg supportshanlong.li1-24/+38
The motorcomm phy (YT8531) supports the ability to adjust the drive strength of the rx_clk/rx_data, and the default strength may not be suitable for all boards. So add configurable options to better match the boards.(e.g. StarFive VisionFive 2) Signed-off-by: shanlong.li <shanlong.li@starfivetech.com>
2024-01-11net: phy: motorcomm: Add pad drive strength cfg supportSamin Guo1-0/+32
The motorcomm phy (YT8531) supports the ability to adjust the drive strength of the rx_clk/rx_data, and the default strength may not be suitable for all boards. So add configurable options to better match the boards.(e.g. StarFive VisionFive 2) Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2024-01-11net: phy: motorcomm: uninitialized variables in yt8531_link_change_notify()Dan Carpenter1-3/+3
These booleans are never set to false, but are just used without being initialized. Fixes: 4ac94f728a58 ("net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy") Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Frank Sae <Frank.Sae@motor-comm.com> Link: https://lore.kernel.org/r/Y+xd2yJet2ImHLoQ@kili Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-11net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phyFrank Sae2-3/+207
Add a driver for the motorcomm yt8531 gigabit ethernet phy. We have verified the driver on AM335x platform with yt8531 board. On the board, yt8531 gigabit ethernet phy works in utp mode, RGMII interface, supports 1000M/100M/10M speeds, and wol(magic package). Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-11net: phy: Add dts support for Motorcomm yt8531s gigabit ethernet phyFrank Sae1-24/+27
Add dts support for Motorcomm yt8531s gigabit ethernet phy. Change yt8521_probe to support clk config of yt8531s. Becase yt8521_probe does the things which yt8531s is needed, so removed yt8531s function. This patch has been verified on AM335x platform with yt8531s board. Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-11net: phy: Add dts support for Motorcomm yt8521 gigabit ethernet phyFrank Sae1-54/+199
Add dts support for Motorcomm yt8521 gigabit ethernet phy. Add ytphy_rgmii_clk_delay_config function to support dst config for the delay of rgmii clk. This funciont is common for yt8521, yt8531s and yt8531. This patch has been verified on AM335x platform. Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-11net: phy: Add BIT macro for Motorcomm yt8521/yt8531 gigabit ethernet phyFrank Sae1-4/+51
Add BIT macro for Motorcomm yt8521/yt8531 gigabit ethernet phy. This is a preparatory patch. Add BIT macro for 0xA012 reg, and supplement for 0xA001 and 0xA003 reg. These will be used to support dts. Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-11net: phy: motorcomm: change the phy id of yt8521 and yt8531s to lowercaseFrank Sae1-2/+2
The phy id is usually defined in lower case. Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20230128063558.5850-2-Frank.Sae@motor-comm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-11net: phy: fix the spelling problem of SentinelFrank Sae1-1/+1
CHECK: 'sentinal' may be misspelled - perhaps 'sentinel'? Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20230128063558.5850-1-Frank.Sae@motor-comm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-11net: phy: add Motorcomm YT8531S phy id.Frank2-6/+48
We added patch for motorcomm.c to support YT8531S. This patch has been tested on AM335x platform which has one YT8531S interface card and passed all test cases. The tested cases indluding: YT8531S UTP function with support of 10M/100M/1000M; YT8531S Fiber function with support of 100M/1000M; and YT8531S Combo function that supports auto detection of media type. Since most functions of YT8531S are similar to YT8521 and we reuse some codes for YT8521 in the patch file. Signed-off-by: Frank <Frank.Sae@motor-comm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-11net: phy: fix yt8521 duplicated argument to & or |Frank1-4/+4
cocci warnings: (new ones prefixed by >>) >> drivers/net/phy/motorcomm.c:1122:8-35: duplicated argument to & or | drivers/net/phy/motorcomm.c:1126:8-35: duplicated argument to & or | drivers/net/phy/motorcomm.c:1130:8-34: duplicated argument to & or | drivers/net/phy/motorcomm.c:1134:8-34: duplicated argument to & or | The second YT8521_RC1R_GE_TX_DELAY_xx should be YT8521_RC1R_FE_TX_DELAY_xx. Fixes: 70479a40954c ("net: phy: Add driver for Motorcomm yt8521 gigabit ethernet phy") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Frank <Frank.Sae@motor-comm.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-11net: phy: Add driver for Motorcomm yt8521 gigabit ethernet phyFrank3-3/+1635
Add a driver for the motorcomm yt8521 gigabit ethernet phy. We have verified the driver on StarFive VisionFive development board, which is developed by Shanghai StarFive Technology Co., Ltd.. On the board, yt8521 gigabit ethernet phy works in utp mode, RGMII interface, supports 1000M/100M/10M speeds, and wol(magic package). Signed-off-by: Frank <Frank.Sae@motor-comm.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-11drivers: include cpufreq/Kconfig for riscvZoltan HERPAI1-0/+2
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-01-11riscv: dts: visionfive2: add mmc aliasesZoltan HERPAI1-0/+2
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-01-11riscv: dts: visionfive2: add EEPROM nodeZoltan HERPAI1-0/+6
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-01-11driver: regulator: axp20x: Support AXP15060 variant.ziv.xu1-8/+283
Add axp15060 variant support to axp20x Signed-off-by: ziv.xu <ziv.xu@starfive.com>
2024-01-11driver: mfd: axp20x: Add support for AXP15060ziv.xu3-36/+557
axp20x add support for AXP15060 Signed-off-by: ziv.xu <ziv.xu@starfive.com>
2024-01-11RISC-V: Add arch functions to support hibernation/suspend-to-diskSia Jee Heng7-1/+556
Low level Arch functions were created to support hibernation. swsusp_arch_suspend() relies code from __cpu_suspend_enter() to write cpu state onto the stack, then calling swsusp_save() to save the memory image. Arch specific hibernation header is implemented and is utilized by the arch_hibernation_header_restore() and arch_hibernation_header_save() functions. The arch specific hibernation header consists of satp, hartid, and the cpu_resume address. The kernel built version is also need to be saved into the hibernation image header to making sure only the same kernel is restore when resume. swsusp_arch_resume() creates a temporary page table that covering only the linear map. It copies the restore code to a 'safe' page, then start to restore the memory image. Once completed, it restores the original kernel's page table. It then calls into __hibernate_cpu_resume() to restore the CPU context. Finally, it follows the normal hibernation path back to the hibernation core. To enable hibernation/suspend to disk into RISCV, the below config need to be enabled: - CONFIG_HIBERNATION - CONFIG_ARCH_HIBERNATION_HEADER - CONFIG_ARCH_HIBERNATION_POSSIBLE Signed-off-by: Sia Jee Heng <jeeheng.sia@starfivetech.com> Reviewed-by: Ley Foon Tan <leyfoon.tan@starfivetech.com> Reviewed-by: Mason Huo <mason.huo@starfivetech.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
2024-01-11RISC-V: Factor out common code of __cpu_resume_enter()Sia Jee Heng2-31/+65
The cpu_resume() function is very similar for the suspend to disk and suspend to ram cases. Factor out the common code into suspend_restore_csrs macro and suspend_restore_regs macro. Signed-off-by: Sia Jee Heng <jeeheng.sia@starfivetech.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
2024-01-11RISC-V: Change suspend_save_csrs and suspend_restore_csrs to public functionSia Jee Heng2-2/+5
Currently suspend_save_csrs() and suspend_restore_csrs() functions are statically defined in the suspend.c. Change the function's attribute to public so that the functions can be used by hibernation as well. Signed-off-by: Sia Jee Heng <jeeheng.sia@starfivetech.com> Reviewed-by: Ley Foon Tan <leyfoon.tan@starfivetech.com> Reviewed-by: Mason Huo <mason.huo@starfivetech.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
2024-01-11dmaengine: dw-axi-dmac: Increase polling time to DMA transmission completion ↵Walker Chen1-1/+1
status The bit DMAC_CHEN[0] is automatically cleared by hardware to disable the channel after the last AMBA transfer of the DMA transfer to the destination has completed. Software can therefore poll this bit to determine when this channel is free for a new DMA transfer. This time requires at least 40 milliseconds on JH7110 SoC, otherwise an error message 'failed to stop' will be reported. Signed-off-by: Walker Chen <walker.chen@starfivetech.com>
2024-01-11dmaengine: dw-axi-dmac: Add support for StarFive JH7110 DMAWalker Chen2-5/+34
Add DMA reset operation in device probe and use different configuration on CH_CFG registers according to match data. Update all uses of of_device_is_compatible with of_device_get_match_data. Signed-off-by: Walker Chen <walker.chen@starfivetech.com> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
2024-01-11dt-bindings: dma: snps,dw-axi-dmac: constrain the items of resets for JH7110 dmaWalker Chen1-1/+22
The DMA controller needs two reset items to work properly on JH7110 SoC, so there is need to constrain the items' value to 2, other platforms have 1 reset item at most. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Walker Chen <walker.chen@starfivetech.com>
2024-01-11hwmon: (sfctemp) Add StarFive JH71x0 temperature sensorEmil Renner Berthing6-0/+384
Add driver for the StarFive JH71x0 temperature sensor. You can enable/disable it and read temperature in milli Celcius through sysfs. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Co-developed-by: Samin Guo <samin.guo@starfivetech.com> Signed-off-by: Samin Guo <samin.guo@starfivetech.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-01-11dt-bindings: hwmon: Add starfive,jh71x0-tempEmil Renner Berthing1-0/+70
Add bindings for the temperature sensor on the StarFive JH7100 and JH7110 SoCs. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Rob Herring <robh@kernel.org>
2024-01-11mmc: starfive: Add sdio/emmc driver supportWilliam Qiu4-0/+203
Add sdio/emmc driver support for StarFive JH7110 soc. Tested-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2024-01-11dt-bindings: mmc: Add StarFive MMC moduleWilliam Qiu1-0/+77
Add documentation to describe StarFive designware mobile storage host controller driver. Signed-off-by: William Qiu <william.qiu@starfivetech.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-01-11riscv: dts: starfive: jh7100: Add watchdog nodeXingyu Wu1-0/+10
Add watchdog node for the StarFive JH7100 RISC-V SoC. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
2024-01-11drivers: watchdog: Add StarFive Watchdog driverXingyu Wu4-0/+627
Add watchdog driver for the StarFive JH7100 and JH7110 SoC. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2024-01-11dt-bindings: watchdog: Add watchdog for StarFive JH7100 and JH7110Xingyu Wu1-0/+71
Add bindings to describe the watchdog for the StarFive JH7100/JH7110 SoC. And Use JH7100 as first StarFive SoC with watchdog. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2024-01-11hwrng: starfive - Enable compile testingHerbert Xu1-2/+1
Enable compile testing for jh7110. Also remove the dependency on HW_RANDOM. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Jia Jie Ho <jiajie.ho@starfivetech.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2024-01-11hwrng: starfive - Add TRNG driver for StarFive SoCJia Jie Ho4-0/+411
This adds driver support for the hardware random number generator in Starfive SoCs and adds StarFive TRNG entry to MAINTAINERS. Co-developed-by: Jenny Zhang <jenny.zhang@starfivetech.com> Signed-off-by: Jenny Zhang <jenny.zhang@starfivetech.com> Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
2024-01-11dt-bindings: rng: Add StarFive TRNG moduleJia Jie Ho1-0/+55
Add documentation to describe Starfive true random number generator module. Co-developed-by: Jenny Zhang <jenny.zhang@starfivetech.com> Signed-off-by: Jenny Zhang <jenny.zhang@starfivetech.com> Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
2024-01-11Add readmeHal Feng1-0/+62
2024-01-11update jh7110_defconfig for testshanlong.li1-1/+14
Signed-off-by: shanlong.li <shanlong.li@starfivetech.com>
2024-01-11riscv: dts: starfive: Add full support for JH7110 and VisionFive 2 boardshanlong.li3-5/+847
Merge all StarFive dts patches together. Signed-off-by: shanlong.li <shanlong.li@starfivetech.com>
2024-01-11cpufreq: dt-platdev: Add JH7110 SOC to the allowlistMason Huo1-0/+2
Add the compatible strings for supporting the generic cpufreq driver on the StarFive JH7110 SoC. Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
2024-01-11pcie: starfive: add StarFive JH7110 PCIe driver.Minda Chen3-0/+967
Add PCIe controller driver for StarFive JH7110 SoC platform. The PCIe controller is PCIe 2.0, single lane. Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2024-01-11spi: cadence-quadspi: Add support for StarFive JH7110 QSPIWilliam Qiu2-2/+21
Add QSPI reset operation in device probe and add RISCV support to QUAD SPI Kconfig. Co-developed-by: Ziv Xu <ziv.xu@starfivetech.com> Signed-off-by: Ziv Xu <ziv.xu@starfivetech.com> Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2024-01-11dt-binding: pci: add JH7110 PCIe dt-binding documents.Minda Chen1-0/+163
Add PCIe controller driver dt-binding documents for StarFive JH7110 SoC platform. Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2024-01-11usb: cdns3: Add StarFive JH7110 USB driverMinda Chen3-0/+258
Adds Specific Glue layer to support USB peripherals on StarFive JH7110 SoC. There is a Cadence USB3 core for JH7110 SoCs, the cdns core is the child of this USB wrapper module device. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Acked-by: Peter Chen <peter.chen@kernel.org>
2024-01-11dt-bindings: qspi: cdns,qspi-nor: constrain minItems/maxItems of resetsWilliam Qiu1-4/+33
The QSPI controller needs three reset items to work properly on JH7110 SoC, so there is need to change the maxItems's value to 3 and add minItems whose value is equal to 2. Other platforms do not have this constraint. Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2024-01-11dt-bindings: usb: Add StarFive JH7110 USB controllerMinda Chen1-0/+115
StarFive JH7110 platforms USB have a wrapper module around the Cadence USBSS-DRD controller. Add binding information doc for that. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Peter Chen <peter.chen@kernel.org> Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
2024-01-11phy: starfive: Add JH7110 PCIE 2.0 PHY driverMinda Chen3-0/+215
Add Starfive JH7110 SoC PCIe 2.0 PHY driver support. PCIe 2.0 PHY default connect to PCIe controller. PCIe PHY can connect to USB 3.0 controller. Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2024-01-11phy: starfive: Add JH7110 USB 2.0 PHY driverMinda Chen3-0/+162
Add Starfive JH7110 SoC USB 2.0 PHY driver support. USB 2.0 PHY default connect to Cadence USB controller. Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2024-01-11dt-bindings: phy: Add StarFive JH7110 PCIe PHYMinda Chen1-0/+58
Add StarFive JH7110 SoC PCIe 2.0 PHY dt-binding. PCIe PHY0 (phy@10210000) can be used as USB 3.0 PHY. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Rob Herring <robh@kernel.org>
2024-01-11dt-bindings: phy: Add StarFive JH7110 USB PHYMinda Chen1-0/+50
Add StarFive JH7110 SoC USB 2.0 PHY dt-binding. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Rob Herring <robh@kernel.org>
2024-01-11media: starfive: Add VIN driverJack Zhu6-2/+1598
Add Video In Controller driver for StarFive Camera Subsystem. Signed-off-by: Jack Zhu <jack.zhu@starfivetech.com>