platform/kernel/linux-starfive.git
17 months agoBluetooth: Add stop LE auto connection feature 51/294151/2
Sudha Bheemanna [Thu, 25 Aug 2016 06:11:34 +0000 (11:41 +0530)]
Bluetooth: Add stop LE auto connection feature

Added new MGMT command to disable LE auto connection.

Change-Id: I1f5f61b83227501ad54019008b405fd47fd722a3
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
17 months agoBluetooth: Add BT LE discovery feature 50/294150/2
Sudha Bheemanna [Thu, 25 Aug 2016 05:53:02 +0000 (11:23 +0530)]
Bluetooth: Add BT LE discovery feature

This patch adds new MGMT commands to start LE discovery separately
and handles LE discovery state.

Change-Id: I85958b8c2b5c7e28f57c69e86037ab1e61a75db0
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
17 months agoBluetooth: Update device name on remote_name_event 49/294149/2
Sudha Bheemanna [Thu, 25 Aug 2016 04:47:19 +0000 (10:17 +0530)]
Bluetooth: Update device name on remote_name_event

This patch updates the device name on receiving the HCI event
remote_name_event during connection establishment.

Change-Id: I9a217e6760b1803a70af201a3f6903e722079749
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
17 months agoBluetooth: Add RSSI Monitor feature 48/294148/2
Sudha Bheemanna [Wed, 24 Aug 2016 11:51:15 +0000 (17:21 +0530)]
Bluetooth: Add RSSI Monitor feature

Added feature support for monitoring the RSSI value.
Commands and events for enabling, disabling and setting
rssi threshold values are added.

Change-Id: I850643a9228afc017e54217a11826b9c6a68a96b
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
17 months agoBluetooth: Functions to modify WhiteList 47/294147/2
Sudha Bheemanna [Wed, 24 Aug 2016 09:32:56 +0000 (15:02 +0530)]
Bluetooth: Functions to modify WhiteList

This patch provides MGMT commands to manage the white
list which includes, adding, removing and clearing the
devices from white list.

Change-Id: If71107129d3a090ae81448a8122b76accd4f5522
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
17 months agoBluetooth: Add Advertising Packet Configuration 46/294146/2
Sudha Bheemanna [Wed, 24 Aug 2016 06:47:16 +0000 (12:17 +0530)]
Bluetooth: Add Advertising Packet Configuration

This patch provides new MGMT commands to configure
the advertising data and scan response data packets for
LE peripheral devices.

Change-Id: I914d13795f4fb58e5f2e1cadb55086f4bcbc82df
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
[jhoon20.kim: adjust some codes to apply it in 5.4 kernel]
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
17 months agoBluetooth: Add MGMT tizen_handlers and TIZEN_OP_BASE_CODE. 45/294145/2
h.sandeep [Thu, 1 Sep 2016 06:30:57 +0000 (12:00 +0530)]
Bluetooth: Add MGMT tizen_handlers and TIZEN_OP_BASE_CODE.

Added the basic skeleton code for tizen_mgmt_handlers and
mgmt_tizen.h header file.

Change-Id: I8f3100aa79e6673840ba561f0a9c50238ca0880b
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
17 months agoBluetooth: Add "TIZEN_BT" flag 44/294144/2
Sudha Bheemanna [Tue, 23 Aug 2016 11:37:10 +0000 (17:07 +0530)]
Bluetooth: Add "TIZEN_BT" flag

Added the tizen specific flag for use in adding tizen patches.

Change-Id: Ia391644fddbe600c8d845e0bf0808f587aa73e0c
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
17 months agoRISCV: configs: Enable configurations relevant to network 79/294079/1
Jaehoon Chung [Mon, 12 Jun 2023 03:11:17 +0000 (12:11 +0900)]
RISCV: configs: Enable configurations relevant to network

Enable configurations relevant to network stack.
It's referred to tizen-kernel-config.

Change-Id: Ice536221113ab67c45cb01be14dc38f0e76345c4
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
17 months agoRISCV: config: Enable INPUT_EDEV config 35/294035/1
Hoegeun Kwon [Fri, 9 Jun 2023 07:25:00 +0000 (16:25 +0900)]
RISCV: config: Enable INPUT_EDEV config

Enable INPUT_EDEV configuration.

Change-Id: I4dee6d72f2fac9aa3c4fc229df9a207e24a9fff4
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
17 months agoRISCV: config: Disable APPARMOR and SELINUX for security 30/294030/1
Hoegeun Kwon [Fri, 9 Jun 2023 07:49:03 +0000 (16:49 +0900)]
RISCV: config: Disable APPARMOR and SELINUX for security

Disable SECURITY_SELINUX SECURITY_APPARMOR configuration. and chhange
LSM order.

Change-Id: I19dfa9811c4427bef6ee4336c0a8fd956c817b4e
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
17 months agoRISCV: configs: tien_visionfive2: Enable RTL8XXXU config as module 48/293948/1
Jaehoon Chung [Fri, 9 Jun 2023 03:52:28 +0000 (12:52 +0900)]
RISCV: configs: tien_visionfive2: Enable RTL8XXXU config as module

Enable RTL8XXXU configuration as module.
And Other realtek drivers is enabled to use if someone wants to use
them.

Change-Id: I9ff25360d2d17bc315db7e09f9958e170ab1691d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
17 months agopackaging: Remove variant from Source file name 32/293932/1
Jaehoon Chung [Thu, 8 Jun 2023 10:51:39 +0000 (19:51 +0900)]
packaging: Remove variant from Source file name

Remove varianet from Source  file name.
During build, it's faield with below log.
(It's same on build system.)

[    9s] error: File /home/abuild/rpmbuild/SOURCES/riscv-visionfive2-linux-kernel-6.1.21.tar.xz: No such file or directory

Change-Id: I635d0e34bb73e02c910cd99c1db1a4af8b893fbc
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
17 months agoRISCV: config: Enable INPUT_UINPUT config 80/293880/1
Jaehoon Chung [Wed, 7 Jun 2023 08:58:54 +0000 (17:58 +0900)]
RISCV: config: Enable INPUT_UINPUT config

Enable INPUT_UINPUT configuration.

Change-Id: Ie72a5072abd1202f4fb0611a8ebbbe2eda847699
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
17 months agoRISCV: dts: starfive: use the aliases about mmc 45/293845/1
Jaehoon Chung [Wed, 7 Jun 2023 05:13:01 +0000 (14:13 +0900)]
RISCV: dts: starfive: use the aliases about mmc

The index of mmc is assigned according to probing sequence.
It means that index can be changed every booting time.
To prevent the wrong index, use the aliases as fixed index.
- eMMC : mmc0
- SD   : mmc1

Change-Id: Ie0abe1b01be55decf8be7cb9ae553a421240e422
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
17 months agoBuild packages for different platforms 45/293345/4
Łukasz Stelmach [Tue, 23 May 2023 10:11:52 +0000 (12:11 +0200)]
Build packages for different platforms

Build separate packages for QEMU and VisionFive2 platforms

Change-Id: I0a44f7065f284bc40cde907238a2591836534251
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
17 months agoRISCV: config: Enable configurations relevant to F2FS 25/293625/1
Jaehoon Chung [Thu, 1 Jun 2023 06:49:48 +0000 (15:49 +0900)]
RISCV: config: Enable configurations relevant to F2FS

Enable configurations relevant to F2FS.
Tizen is using F2FS filesystem on Headed image.

Change-Id: I5dcc1976815740b8d5c93a5f2036a08258327b68
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
17 months agoRISCV: configs: Enable rtc defconfig 78/293278/1
Hoegeun Kwon [Tue, 23 May 2023 10:22:24 +0000 (19:22 +0900)]
RISCV: configs: Enable rtc defconfig

Enable RTC defconfig for starfive.

Change-Id: I0dea1a230c1c147caaf26fe7215a951c5d0b7c53
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
17 months agortc: starfive: Add support jh7100 rtc driver 77/293277/1
SaminGuo [Wed, 17 Nov 2021 07:55:45 +0000 (15:55 +0800)]
rtc: starfive: Add support jh7100 rtc driver

Add support rtc driver and device tree of starfive JH7110. This
driver is from [1], and the imported patch list[2]. We modified
compatible and clock in the device-tree to fix kernel v6.1.

[1] https://github.com/starfive-tech/linux

[2] patch list from v5.15.y
  fc56ea25c7ca ziv.xu   rtc:starfive: add pm ops for rtc
  cc1a7edcd475 ziv.xu   rtc-starfive.c:add system pm for rtc
  d369d91bd926 Hal Feng rtc: starfive: Standardize property "compatible"
  3d1b30793d55 Hal Feng rtc: starfive: Fix time may be not updated when date updated
  d85e29ea7625 Hal Feng rtc: starfive: Fix command 'hwclock' can't work in rootfs
  f344adc8fb81 Hal Feng rtc: starfive: Change reset api
  8cf53d91eb5f Hal Feng rtc: starfive: Improve rtc driver
  66422888adb5 Hal Feng rtc: starfive: Improve coding style
  99ae7e93b897 Hal Feng rtc: starfive: Use stardand clock and reset apis for initialization
  8b570194e872 samin    rtc: starfive: Get the interrupt status using Completion.
  1fafc8d35f88 SaminGuo rtc: starfive-rtc: Add RTC support for StarFive JH7110.

Signed-off-by: SaminGuo <samin.guo@starfivetech.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Signed-off-by: ziv.xu <ziv.xu@starfive.com>
Change-Id: I4475e4314237bb8be670aefa40039c166107cb15
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
17 months agoRISCV: configs: Enable snd audio defconfig 36/293036/4
Hoegeun Kwon [Thu, 11 May 2023 11:06:53 +0000 (20:06 +0900)]
RISCV: configs: Enable snd audio defconfig

Enable SND audio defconfig for starfive.

Change-Id: Ia190e39c22a530ccc0adfbc4b40cade25e046319
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
17 months agoASoC: SOC: Add support jh7110 audio driver 35/293035/4
curry.zhang [Thu, 16 Dec 2021 06:14:04 +0000 (22:14 -0800)]
ASoC: SOC: Add support jh7110 audio driver

Add support audio driver and device tree of starfive JH7110. This
driver is from [1], and the imported patch list[2]. We modified
compatible and clock in the device-tree to fix kernel v6.1. Also fix
the build error for incompatible pointer types and others. And add
set 'legacy_dai_naming' value into starfive_i2s driver, for set to use
legacy dai naming when looking up DAI.

[1] https://github.com/starfive-tech/linux

[2] patch list from v5.15.y
  258954bfe609 Xingyu Wu sound: starfive: I2S: Fixed error after hibernation when building module
  09407b6be383 Xingyu Wu sound: starfive: pwmdac: Support module building
  00a1eaebe170 Xingyu Wu sound: starfive: pwmdac: Fixed playback failed after hibernation
  1f6659ddf77c Xingyu Wu sound:starfive:Move playback and capture driver as slave to starfive I2S
  c1ec8ddaa121 Xingyu Wu sound:starfive:pwmdac:Add runtime pm operation
  78f5ba02befa Xingyu Wu sound:starfive:Add hibernation in I2S
  40cbb24940b3 Walker Chen CR_2307_PWMDAC_515: fix playback repeatly issue
  099a9cd86939 Xingyu Wu sound:starfive:Remove i2srx-master and merge into starfive_i2s
  c813586d1913 Xingyu Wu  sound:starfive:Add I2S driver
  abd5f99857c5 Walker Chen CR_2071_audio_compatible_standard_515
  14d6015d73ed Xingyu Wu sound:starfive:pwmdac:Modify compatible name
  8fba0f28d470 Walker Chen CR_1827_cannot_record_play_simultaneously
  ae6c3943ef0c minda.chen  pwmdac:sound: support 11025hz play mode.
  279155cf4805 curry.zhang [Audio: PWMDAC] enable pwmdac driver on 7110 evb board
  7868835794ac curry.zhang [Audio: PWMDAC] Adjust code style
  1e872b48a7a7 curry.zhang [Audio: PWMDAC] Add standard system clock tree api
  e0f5d0916020 “jenny.zhang” [alsa] Add jh7110 audio module driver code

Signed-off-by: jenny.zhang <jenny.zhang@starfivetech.com>
Signed-off-by: curry.zhang <curry.zhang@starfivetech.com>
Signed-off-by: minda.chen <minda.chen@starfivetech.com>
Signed-off-by: Walker Chen <walker.chen@starfivetech.com>
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Signed-off-by: PeterYang <linsheng.yang@seeed.cc>
Signed-off-by: Baozhu Zuo <zuobaozhu@gmail.com>
Signed-off-by: Rajeev Kumar <rajeevkumar.linux@gmail.com>
Signed-off-by: michael.yan <michael.yan@starfivetech.com>
Change-Id: If1b6c957bbe5ea9f3464e591138da4cf57c6fd84
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
18 months agoRISCV: configs: Enable spi defconfig 38/292738/1
Hoegeun Kwon [Fri, 12 May 2023 05:23:08 +0000 (14:23 +0900)]
RISCV: configs: Enable spi defconfig

Enable SPI starfive driver.

Change-Id: I395a723ca0e5f35e8666f59c5ab9d5067e549c46
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
18 months agospi: Add support pl022 spi driver 37/292737/1
xingyu.wu [Thu, 30 Jun 2022 06:45:38 +0000 (14:45 +0800)]
spi: Add support pl022 spi driver

Add support pl022 spi driver and device tree of starfive JH7110. This
driver is from [1], and the imported patch list[2]. We modified
compatible and clock in the device-tree to fix kernel v6.1.

[1] https://github.com/starfive-tech/linux

[2] patch list from v5.15.y
  d88bd4b6aa1d ziv.xu    spi-pl022-starfive:Enable spi to be compiled into modules
  871266269a62 ziv.xu    spi-pl022-starfive:fix the problem of spi overlay reload
  9e71e5c05fee ziv.xu    spi-pl022-starfive.c: prompt warning when frequency does not surpport
  a1c1236322ba ziv.xu    spi-pl022-starfive.c: make spi work without dma
  9962a36e5788 Ziv.Xu    add device pm for spi
  9bd42158c0bd Xingyu Wu spi:starfive:Modify compatible name
  c9c015abab34 xingyu.wu spi:pl022-starfive:Turn off dma channel search under overlay
  c4eef3b4b80e xingyu.wu spi:pl022-starfive:Avoid power device error when CONFIG_PM enable
  e10123abbc5d xingyu.wu spi:Modify pl022 driver format
  a86c836215ce xingyu.wu spi-pl022:starfive:Add platform bus register to adapt overlay
  17c6be971d69 xingyu.wu spi-pl022:starfive:Add spi driver for StarFive SoC platform

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Signed-off-by: ziv.xu <ziv.xu@starfive.com>
Change-Id: I631a219d56ea26e6609e33daa6c470b512da2698
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
18 months agoRISCV: configs: Enable regulator AXP20X 15/292615/2
Hoegeun Kwon [Mon, 8 May 2023 11:25:30 +0000 (20:25 +0900)]
RISCV: configs: Enable regulator AXP20X

Enable AXP20X regulator used by cpufreq.

Change-Id: I79160b30440732277bd25844ace40e4a8d54e734
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
18 months agoregulator: axp20x: Add AXP15060 support 14/292614/2
Shengyu Qu [Mon, 8 May 2023 11:14:47 +0000 (20:14 +0900)]
regulator: axp20x: Add AXP15060 support

The AXP15060 is a typical I2C-controlled PMIC, seen on multiple boards
with different default register value. Current driver is tested on
Starfive Visionfive 2.

The RTCLDO is fixed, and cannot even be turned on or off. On top of
that, its voltage is customisable (either 1.8V or 3.3V). We pretend it's
a fixed 1.8V regulator since other AXP driver also do like this. Also,
BSP code ignores this regulator and it's not used according to VF2
schematic.

Describe the AXP15060's voltage settings and switch registers, how the
voltages are encoded, and connect this to the MFD device via its
regulator ID.

[1] https://lore.kernel.org/linux-sunxi/20230401001850.4988-1-andre.przywara@arm.com/

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
[Backported patch : https://lore.kernel.org/lkml/TY3P286MB2611DA5F918F90491A3AA02298609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/#Z31drivers:regulator:axp20x-regulator.c]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I24a8cc725d57bb07273df316e14d2eb05943d162

18 months agomfd: axp20x: Add support for AXP15060 PMIC 13/292613/2
Shengyu Qu [Mon, 8 May 2023 08:30:25 +0000 (17:30 +0900)]
mfd: axp20x: Add support for AXP15060 PMIC

The AXP15060 is a PMIC chip produced by X-Powers, and could be connected
via an I2C bus.

Describe the regmap and the MFD bits, along with the registers exposed
via I2C. Eventually advertise the device using a new compatible string
and add support for power off the system.

The driver would disable PEK function if IRQ is not configured in device
tree, since some boards (For example, Starfive Visionfive 2) didn't
connect IRQ line of PMIC to SOC.

GPIO function isn't enabled in this commit, since its configuration
operation is different from any existing AXP PMICs and needs
logic modification on existing driver. GPIO support might come in later
patches.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/TY3P286MB261162D57695AC8164ED50E298609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM
[Backported patch : https://lore.kernel.org/lkml/TY3P286MB261162D57695AC8164ED50E298609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I53ddfe6ea5df415f84f401c64fb29d1378ba1569

18 months agodt-bindings: mfd: x-powers,axp152: Document the AXP15060 variant 12/292612/2
Shengyu Qu [Mon, 8 May 2023 07:43:12 +0000 (16:43 +0900)]
dt-bindings: mfd: x-powers,axp152: Document the AXP15060 variant

The X-Powers AXP15060 is a PMIC seen on Starfive Visionfive 2 board. Add
relative compatible item and CPUSLDO support and disables DC-DC
frequency setting for it.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
[Backported patch : https://lore.kernel.org/lkml/TY3P286MB261177CF7AA2959BD9517DA998609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: Ia8ada01c0f0e56642a14401d34a1b2a47ddf6851

18 months agoRISCV: configs: Enable cpufreq defconfig 11/292611/2
Hoegeun Kwon [Thu, 4 May 2023 07:50:32 +0000 (16:50 +0900)]
RISCV: configs: Enable cpufreq defconfig

Enable cpufreq defconfig. Set default gov is ondemand.

Change-Id: I0c6ec29322e1e846d81e686528ac4c825b81287e
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
18 months agoriscv: Kconfig: Enable cpufreq kconfig menu 10/292610/2
Lad Prabhakar [Tue, 15 Nov 2022 10:51:33 +0000 (10:51 +0000)]
riscv: Kconfig: Enable cpufreq kconfig menu

Enable cpufreq kconfig menu for RISC-V.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20221115105135.1180490-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
[Backported from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_upstream]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: Ibc4020587fecdfcdbbde43732b4673c423c53e25

18 months agoriscv: dts: starfive: Add cpu scaling for JH7110 SoC 09/292609/2
Mason Huo [Thu, 4 May 2023 05:40:23 +0000 (14:40 +0900)]
riscv: dts: starfive: Add cpu scaling for JH7110 SoC

Add the operating-points-v2 to support cpu scaling on StarFive JH7110 SoC.
It supports up to 4 cpu frequency loads.

Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
[Backported patch : https://lore.kernel.org/all/20230421031431.23010-4-mason.huo@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I0aeac76676938da45165a460a1d042fc36d2c8e4

18 months agocpufreq: dt-platdev: Add JH7110 SOC to the allowlist 08/292608/2
Mason Huo [Thu, 4 May 2023 05:34:59 +0000 (14:34 +0900)]
cpufreq: dt-platdev: Add JH7110 SOC to the allowlist

Add the compatible strings for supporting the generic
cpufreq driver on the StarFive JH7110 SoC.

Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
[Backported patch :https://lore.kernel.org/all/20230421031431.23010-3-mason.huo@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I40c1539d935367f3da4b74f01aabde8428dc49d9

18 months agoriscv: dts: starfive: Enable axp15060 pmic for cpufreq 07/292607/2
Mason Huo [Thu, 4 May 2023 05:31:44 +0000 (14:31 +0900)]
riscv: dts: starfive: Enable axp15060 pmic for cpufreq

The VisionFive 2 board has an embedded pmic axp15060,
which supports the cpu DVFS through the dcdc2 regulator.
This patch enables axp15060 pmic and configs the dcdc2.

Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
[Backported patch : https://lore.kernel.org/all/20230421031431.23010-2-mason.huo@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I79e08462d7bd09766526418d65fb4299fc122fdc

18 months agoRISCV: configs: Enable crypto defconfig 25/292325/1
Hoegeun Kwon [Wed, 3 May 2023 06:57:31 +0000 (15:57 +0900)]
RISCV: configs: Enable crypto defconfig

Enable crypto driver for jh7110.

Change-Id: I25902a13d2a2d907ad04f2985059b40782ba394e
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
18 months agoRISCV: dts: starfive: Add missing interrupt number of crypto 24/292324/1
Hoegeun Kwon [Thu, 4 May 2023 02:20:19 +0000 (11:20 +0900)]
RISCV: dts: starfive: Add missing interrupt number of crypto

The interrupt number of crypto is missing and add.

Ref patch:
  https://lore.kernel.org/all/20230426065848.842221-4-jiajie.ho@starfivetech.com/

Change-Id: I2fe8951d5b68c5e21ca50b24c2c0de490937e4a9
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
18 months agoRISCV: configs: Enable pwm defconfig 10/292310/2
Hoegeun Kwon [Wed, 3 May 2023 05:53:28 +0000 (14:53 +0900)]
RISCV: configs: Enable pwm defconfig

Enable pwm defconfig for pwm driver.

Change-Id: I860ff49fddacb47143f33d446e31a528c25b7fab
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
18 months agopwm: starfive: Fix incompatible pointer types 09/292309/2
Hoegeun Kwon [Wed, 3 May 2023 05:04:20 +0000 (14:04 +0900)]
pwm: starfive: Fix incompatible pointer types

Fix starfive_pwm_ptc_get_state func and get_state pointer func and
return types not matching. In the current kernel version, get_status
does not use return value, so no problem. Fix return type to void.

  drivers/pwm/pwm-starfive-ptc.c:152:15: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    .get_state = starfive_pwm_ptc_get_state,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: Ifd9fb81ead2b174d138dcad60f464e484074aac4
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
18 months agoRISCV: configs: Enable dma defconfig 08/292308/1
Hoegeun Kwon [Wed, 3 May 2023 04:48:51 +0000 (13:48 +0900)]
RISCV: configs: Enable dma defconfig

Enable dma devices defconfig for dma driver.

Change-Id: I3172db384cca03691850acd300feee9f6d51cd06
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
18 months agoRISCV: configs: Enable temperature sensor defconfig 07/292307/1
Hoegeun Kwon [Wed, 3 May 2023 04:31:47 +0000 (13:31 +0900)]
RISCV: configs: Enable temperature sensor defconfig

Enable temperature sensor defconfig for sensor driver.

Change-Id: Ifbc7734b5670389c4826eba08a39dab8d693afa3
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
18 months agoRISCV: configs: Enable power reset gpio 26/291926/2
Hoegeun Kwon [Tue, 25 Apr 2023 06:50:03 +0000 (15:50 +0900)]
RISCV: configs: Enable power reset gpio

When rebooting, there is a problem that the pmic gpio is not set, so
rebooting is not possible. Enable power reset gpio.

Change-Id: I59c35303fe9416b4839d244e161776a034259a4b
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agoRISCV: configs: Enable pcie defconfig 73/291473/2
Hoegeun Kwon [Mon, 17 Apr 2023 06:46:56 +0000 (15:46 +0900)]
RISCV: configs: Enable pcie defconfig

Enable CONFIG_PCIE_STARFIVE defconfig for pcie host controller driver.

Change-Id: Ie55481519cd03f9a7bf2679c0ca6a0f5703ceb21
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agoriscv: dts: starfive: Add full support for JH7110 and VisionFive 2 board 72/291472/2
Hal Feng [Tue, 11 Apr 2023 08:31:15 +0000 (16:31 +0800)]
riscv: dts: starfive: Add full support for JH7110 and VisionFive 2 board

Merge all StarFive dts patches together.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
 Conflicts:
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
arch/riscv/boot/dts/starfive/jh7110.dtsi

[Backported from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_upstream]
Change-Id: I0b498d1c7694877a210026717bd1c4e8fffac22a
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agopcie: starfive: add StarFive JH7110 PCIe driver. 71/291471/2
Minda Chen [Thu, 6 Apr 2023 11:11:41 +0000 (19:11 +0800)]
pcie: starfive: add StarFive JH7110 PCIe driver.

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>
[Backported from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_upstream]
Change-Id: I04b0fd6ef7085030ecc682de384b009e2e1d66fe
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agodt-binding: pci: add JH7110 PCIe dt-binding documents. 70/291470/2
Minda Chen [Thu, 6 Apr 2023 11:11:40 +0000 (19:11 +0800)]
dt-binding: pci: add JH7110 PCIe dt-binding documents.

Add PCIe controller driver dt-binding documents
for StarFive JH7110 SoC platform.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
[Backported from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_upstream]
Change-Id: Ibd3ed0ecf830d56cedaf496510fecc610b4700cf
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agodt-bindings: phy: Add StarFive JH7110 PCIe document 69/291469/2
Minda Chen [Thu, 6 Apr 2023 01:52:11 +0000 (09:52 +0800)]
dt-bindings: phy: Add StarFive JH7110 PCIe document

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>
[Backported from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_upstream]
Change-Id: I67a7522fe31e9adb476e895f2107f4432d2ad19a
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agodt-bindings: phy: Add StarFive JH7110 USB document 68/291468/2
Minda Chen [Thu, 6 Apr 2023 01:52:10 +0000 (09:52 +0800)]
dt-bindings: phy: Add StarFive JH7110 USB document

Add StarFive JH7110 SoC USB 2.0 PHY dt-binding.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
[Backported from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_upstream]
Change-Id: I402d255181b5ff3a14e2faea7f54753f83757cd2
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agoRevert "PCI: Add support plda pcie host controller driver" 67/291467/2
Hoegeun Kwon [Mon, 17 Apr 2023 06:18:48 +0000 (15:18 +0900)]
Revert "PCI: Add support plda pcie host controller driver"

This reverts commit b31cbbfa7c21b27610b850734b419469494948b7.

Revert this patch for use the pcie driver from upstream branch of
starfive-tech/linux.

Change-Id: I7617faba6679d0988140b22bda05c2cfd2a8d4cf
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agoRevert "RISCV: configs: Enable pcie plda defconfig" 66/291466/2
Hoegeun Kwon [Mon, 17 Apr 2023 06:18:41 +0000 (15:18 +0900)]
Revert "RISCV: configs: Enable pcie plda defconfig"

This reverts commit c8cfb82195d6e397017aa28e3e347766402e43ac.

Revert this patch for use the pcie driver from upstream branch of
starfive-tech/linux.

Change-Id: I2769cb8e90bd8430508bda95762f39ac21fe0580
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agoRISCV: configs: Enable usb BT defconfig 42/291442/1
Hoegeun Kwon [Thu, 13 Apr 2023 11:43:26 +0000 (20:43 +0900)]
RISCV: configs: Enable usb BT defconfig

Enable usb BT defconfig.

Change-Id: Ia751e369e4a6aad13c730c7e1f5129f347877b6b
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agoRISCV: configs: Enable usb wireless defconfig 41/291441/1
Hoegeun Kwon [Thu, 13 Apr 2023 04:33:52 +0000 (13:33 +0900)]
RISCV: configs: Enable usb wireless defconfig

Enable usb wireless defconfig and realtek module.

Change-Id: Id186de5d13078a11b7142afceb881ade5da2683d
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agoRISCV: configs: Enable pcie plda defconfig 85/291385/2
Hoegeun Kwon [Fri, 14 Apr 2023 04:27:13 +0000 (13:27 +0900)]
RISCV: configs: Enable pcie plda defconfig

Enable CONFIG_PCIE_PLDA defconfig for plda pcie host controller
driver.

Change-Id: Ie09fdf5761d4b5a4a758b69c91f7f7100e820f0f
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agoPCI: Add support plda pcie host controller driver 40/291240/3
ke.zhu [Fri, 14 Apr 2023 04:22:11 +0000 (13:22 +0900)]
PCI: Add support plda pcie host controller driver

Add support plda pcie host controller driver and device tree of
starfive JH7110. This driver is from [1], and the imported patch list
[2]. We modified pinctrl and clock in device-tree to fit kernel v6.1.

[1] https://github.com/starfive-tech/linux

[2] patch list from v5.15.y
    9edf6749fde8 drivers: pci: Fix crash in rt-linux because of an uninitialized lock.
    2757ebeaf399 drivers: pci: Add PHY settings in pcie host driver.
    d3b5483a84d4 drivers: pci: Set PCIe PCI standard configuration ID.
    758a22e27bc6 dts: starfive: Modified PCIe pin setting for bring up PCIe USB hub.
    1c1671ff173d drivers: pci: Support system pm no irq ops.
    d38610f5403c drivers: pci: Support runtime pm & release when found empty slot in probe.
    fecebab6581f drivers: pci: Support 64bit prefetchable MMIO range.
    39cbd7746b45 driver: pci: Add extended reset time for better compatibility
    b1163a7a7de2 driver: pci: Fix kernel stuck caused by ASPM LTR
    036944785f52 PCIe: plda: Add support for evb
    38e23080fe16 PCI: plda: Add port1 support
    157cf2806f0a PCI: plda: Fix kernel compile warnings
    64e6d9f6f659 PCI: plda: Add syscon register config
    48ed9fb901ff PCI: plda: Add pcie clk & rst
    08c3249e8021 PCI: plda: Optimize plda pcie host driver
    4ac91988fa82 1.Add plda pcie host controller driver. 2.Add PCIe host controller DT bingdings of starfive JH7110.

Signed-off-by: ke.zhu <ke.zhu@starfivetech.com>
Signed-off-by: mason.huo <mason.huo@starfivetech.com>
Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
Change-Id: I7e58f62026e69318c9305e5fea4d0a3d9e40e7e3
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agoRISCV: configs: Fix to build-in clk_starfive
Hoegeun Kwon [Fri, 7 Apr 2023 08:46:01 +0000 (17:46 +0900)]
RISCV: configs: Fix to build-in clk_starfive

When the clk operates as a module, defered occurs in ethernet,
causing a problem in which eth0 and eth1 are switched. Modify the
corresponding clk to built-in.

Change-Id: I734b470294538a080aa02a01f0585c52a3d29acf
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
19 months agoRISCV: configs: enable motorcomm phy driver 06/291106/2
Jaehoon Chung [Mon, 10 Apr 2023 02:14:16 +0000 (11:14 +0900)]
RISCV: configs: enable motorcomm phy driver

Enable motrocomm phy driver to use ethernet.

Change-Id: I71e988989fc9332b2d38339858fa49109daf6163
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
19 months agonet: phy: motorcomm: uninitialized variables in yt8531_link_change_notify() 05/291105/2
Dan Carpenter [Wed, 15 Feb 2023 04:21:47 +0000 (07:21 +0300)]
net: phy: motorcomm: uninitialized variables in yt8531_link_change_notify()

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>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I1b34e53290b0e99aa7d2e5c7269625cdc6a779cb

19 months agonet: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy 04/291104/2
Frank Sae [Thu, 2 Feb 2023 03:00:37 +0000 (11:00 +0800)]
net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy

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>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Iaab41bb4da6fc537ec994ec09beaf65a92a4d8f6

19 months agonet: phy: Add dts support for Motorcomm yt8531s gigabit ethernet phy 03/291103/2
Frank Sae [Thu, 2 Feb 2023 03:00:36 +0000 (11:00 +0800)]
net: phy: Add dts support for Motorcomm yt8531s gigabit ethernet phy

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>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I85e5655baba7120eadad1e25c4da1797c9943154

19 months agonet: phy: Add dts support for Motorcomm yt8521 gigabit ethernet phy 02/291102/2
Frank Sae [Thu, 2 Feb 2023 03:00:35 +0000 (11:00 +0800)]
net: phy: Add dts support for Motorcomm yt8521 gigabit ethernet phy

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>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I96c978c5b0ee9c6d227f771b35001e331882f33a

19 months agonet: phy: Add BIT macro for Motorcomm yt8521/yt8531 gigabit ethernet phy 01/291101/2
Frank Sae [Thu, 2 Feb 2023 03:00:34 +0000 (11:00 +0800)]
net: phy: Add BIT macro for Motorcomm yt8521/yt8531 gigabit ethernet phy

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>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Ia86f4b51b61329bcc4b585ec4cfa26fe80943d02

19 months agonet: phy: motorcomm: change the phy id of yt8521 and yt8531s to lowercase 00/291100/2
Frank Sae [Sat, 28 Jan 2023 06:35:58 +0000 (14:35 +0800)]
net: phy: motorcomm: change the phy id of yt8521 and yt8531s to lowercase

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>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: If5dba6dda0ac08f235f08bb333298b093d180853

19 months agonet: phy: fix the spelling problem of Sentinel 99/291099/2
Frank Sae [Sat, 28 Jan 2023 06:35:57 +0000 (14:35 +0800)]
net: phy: fix the spelling problem of Sentinel

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>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I1b526c10df1df49984224c1a2cd8d690918f0a72

19 months agonet: phy: add Motorcomm YT8531S phy id. 98/291098/2
Frank [Tue, 22 Nov 2022 08:42:32 +0000 (16:42 +0800)]
net: phy: add Motorcomm YT8531S phy id.

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>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Ic52d4469045c2bfbf97250e137004729fc6dea46

19 months agonet: phy: fix yt8521 duplicated argument to & or | 97/291097/2
Frank [Fri, 4 Nov 2022 08:44:41 +0000 (16:44 +0800)]
net: phy: fix yt8521 duplicated argument to & or |

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>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I3f15389f5b7c13d23c068b1f5c178dc9462d05d1

19 months agonet: phy: Add driver for Motorcomm yt8521 gigabit ethernet phy 96/291096/2
Frank [Fri, 28 Oct 2022 09:26:21 +0000 (17:26 +0800)]
net: phy: Add driver for Motorcomm yt8521 gigabit ethernet phy

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>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I98c7dd937da59afce8a5a79fa78c6cca8dc47096

19 months agoRISCV: configs: enable FUSE_FS configuration 05/290905/1
Jaehoon Chung [Wed, 5 Apr 2023 00:12:46 +0000 (09:12 +0900)]
RISCV: configs: enable FUSE_FS configuration

Enable CONFIG_FUSE_FS configs and other missed configs.

Change-Id: If6c234ad9b945bd0e9b634cd03fafe681a15dfe1
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
19 months agoRISCV: configs: Enanble some configs from module to static 64/290764/1
Jaehoon Chung [Mon, 3 Apr 2023 02:00:43 +0000 (11:00 +0900)]
RISCV: configs: Enanble some configs from module to static

Enable some configs from module to static.
Current module partitions is using to 32MB, so it needs to decrease
module size under 32MB.

Change-Id: I9925f0019540b984e4d400b1fbc054ee8b05e960
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
19 months agoconfig: Enable FTRACE 56/290756/1
Marek Pikuła [Fri, 31 Mar 2023 14:16:59 +0000 (16:16 +0200)]
config: Enable FTRACE

Required by IoT-headless preset.

Change-Id: I779f566b1e7bd74a7db168c909e1ebdb7287caee
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
19 months agopackaging: Add version to modules directory 55/290755/1
Marek Pikuła [Fri, 31 Mar 2023 13:14:22 +0000 (15:14 +0200)]
packaging: Add version to modules directory

Prevents conflict with `filesystem` package.

Change-Id: I5281cf8f5349d82bdcaed9b66fdc0cb6896af96b
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
19 months agoconfig: Enable NBD module 54/290754/1
Marek Pikuła [Fri, 31 Mar 2023 13:13:17 +0000 (15:13 +0200)]
config: Enable NBD module

Useful for development with networked SD card emulation.

Change-Id: Ie02b2bdd81b44d874978497cb9dded874a9482a3
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
19 months agomedia: starfive: add "WITH Linux-syscall-note" to SPDX tag of uapi headers 18/290618/2
Łukasz Stelmach [Wed, 29 Mar 2023 12:28:23 +0000 (14:28 +0200)]
media: starfive: add "WITH Linux-syscall-note" to SPDX tag of uapi headers

UAPI headers licensed under GPL are supposed to have exception
"WITH Linux-syscall-note" so that they can be included into non-GPL
user space application code.

Change-Id: I129c7bf343e3da61f8d49a023b5d16699cb18796
Origin: upstream, https://github.com/starfive-tech/linux/pull/94
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
19 months agoRISCV: configs: enable USB/ETH configurations
Jaehoon Chung [Wed, 29 Mar 2023 08:06:58 +0000 (17:06 +0900)]
RISCV: configs: enable USB/ETH configurations

Enable USB/ETH configuration relevant to JH7110.

Change-Id: I14b9e28cb96b38765997373375f87bdb71ca00f7
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
19 months agobuild: add the separated device tree file
Jaehoon Chung [Tue, 28 Mar 2023 08:32:52 +0000 (17:32 +0900)]
build: add the separated device tree file

Add the separated device tree file according to VisionFive2 board
revision.

Change-Id: I35fa7e81199f363e0cda53fd9ecac5943743a3ab
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
19 months agobuild: Add local build script for VisionFive2
Jaehoon Chung [Mon, 13 Mar 2023 03:31:05 +0000 (12:31 +0900)]
build: Add local build script for VisionFive2

Add local build script for VisionFive2.

Change-Id: I0ca80fd1e383b9ce62797944fba1755e315fa9c7
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
19 months agopackaging: Add linux-visionfive2 spec file
Jaehoon Chung [Fri, 10 Mar 2023 06:31:40 +0000 (15:31 +0900)]
packaging: Add linux-visionfive2 spec file

Add linux-visionfive2 spec vile to build with gbs.
This is for only visionfive2 board.

Change-Id: Icc8feec48b9d77c27b4ce8f2d9468ca882d1fca1
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
19 months agoriscv: fix riscv64 unrecognized opcode build error
Marek Szulc [Fri, 19 Aug 2022 10:29:48 +0000 (12:29 +0200)]
riscv: fix riscv64 unrecognized opcode build error

Considering older gcc version, "imafd" has to be changed
to "g", in order for asm to handle "zicsr" and "zifencei"
extensions.

Support for the mentioned extensions has been added
in GCC 11.1, hence this commit may be removed
after GCC update.

The lack of this causes following errors:
Error: unrecognized opcode `csrr a5,0xc01'
Error: unrecognized opcode `csrr a2,0xc01'

Change-Id: I0768a7b1255c828c4fc319f74f2783bc7e1581bf
Signed-off-by: Marek Szulc <m.szulc3@samsung.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
19 months agoRISCV: configs: Add tizen_vf2_defconfig file
Jaehoon Chung [Fri, 10 Mar 2023 05:32:13 +0000 (14:32 +0900)]
RISCV: configs: Add tizen_vf2_defconfig file

Add tizen_vf2_defconfig file for VisionFive2 boardi.
This defconfig is an initial version to use Tizen on VisionFive2.

Change-Id: Ie675e71129f698d294f637f7545be323466537de
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
19 months agoRISC-V: Add arch functions to support hibernation/suspend-to-disk
Sia Jee Heng [Tue, 14 Mar 2023 05:03:16 +0000 (13:03 +0800)]
RISC-V: Add arch functions to support hibernation/suspend-to-disk

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_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>
19 months agoRISC-V: mm: Enable huge page support to kernel_page_present() function
Sia Jee Heng [Tue, 14 Mar 2023 05:03:15 +0000 (13:03 +0800)]
RISC-V: mm: Enable huge page support to kernel_page_present() function

Currently kernel_page_present() function doesn't support huge page
detection causes the function to mistakenly return false to the
hibernation core.

Add huge page detection to the function to solve the problem.

Fixes: 9e953cda5cdf ("riscv: Introduce huge page support for 32/64bit kernel")
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: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
19 months agoRISC-V: Factor out common code of __cpu_resume_enter()
Sia Jee Heng [Tue, 14 Mar 2023 05:03:14 +0000 (13:03 +0800)]
RISC-V: Factor out common code of __cpu_resume_enter()

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>
19 months agoRISC-V: Change suspend_save_csrs and suspend_restore_csrs to public function
Sia Jee Heng [Tue, 14 Mar 2023 05:03:13 +0000 (13:03 +0800)]
RISC-V: Change suspend_save_csrs and suspend_restore_csrs to public function

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>
19 months agodts: usb: add StarFive JH7110 USB dts configuration.
Minda Chen [Wed, 15 Mar 2023 10:44:11 +0000 (18:44 +0800)]
dts: usb: add StarFive JH7110 USB dts configuration.

USB Glue layer and Cadence USB subnode configuration,
also includes USB and PCIe phy dts configuration.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
19 months agousb: cdns3: add StarFive JH7110 USB driver.
Minda Chen [Wed, 15 Mar 2023 10:44:10 +0000 (18:44 +0800)]
usb: cdns3: add StarFive JH7110 USB driver.

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>
19 months agodt-binding: Add JH7110 USB wrapper layer doc.
Minda Chen [Wed, 15 Mar 2023 10:44:09 +0000 (18:44 +0800)]
dt-binding: Add JH7110 USB wrapper layer doc.

The dt-binding doc of Cadence USBSS-DRD controller wrapper
layer.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Peter Chen <peter.chen@kernel.org>
19 months agophy: starfive: add JH7110 PCIE 2.0 and USB 2.0 PHY driver.
Minda Chen [Wed, 15 Mar 2023 10:44:08 +0000 (18:44 +0800)]
phy: starfive: add JH7110 PCIE 2.0 and USB 2.0 PHY driver.

Add Starfive JH7110 SoC PCIe 2.0 and USB 2.0 PHY driver support.
PCIe 2.0 PHY can used as USB 3.0 PHY

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
19 months agodt-bindings: phy: Add StarFive JH7110 USB/PCIe document
Minda Chen [Wed, 15 Mar 2023 10:44:07 +0000 (18:44 +0800)]
dt-bindings: phy: Add StarFive JH7110 USB/PCIe document

Add StarFive JH7110 SoC USB 2.0/3.0 and PCIe 2.0 PHY dt-binding.
PCIe 2.0 phy can use as USB 3.0 PHY.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
19 months agomedia: starfive: Add Starfive Camera Subsystem driver
Jack Zhu [Fri, 10 Mar 2023 12:05:53 +0000 (20:05 +0800)]
media: starfive: Add Starfive Camera Subsystem driver

Add the driver for Starfive Camera Subsystem found on
Starfive JH7110 SoC. It is used for handing image sensor
data.

Signed-off-by: Jack Zhu <jack.zhu@starfivetech.com>
19 months agoMAINTAINERS: Add Starfive Camera Subsystem driver
Jack Zhu [Thu, 9 Mar 2023 10:48:44 +0000 (18:48 +0800)]
MAINTAINERS: Add Starfive Camera Subsystem driver

Add an entry for Starfive Camera Subsystem driver.

Signed-off-by: Jack Zhu <jack.zhu@starfivetech.com>
19 months agomedia: cadence: Add support for external dphy and JH7110 SoC
Jack Zhu [Fri, 10 Mar 2023 12:05:51 +0000 (20:05 +0800)]
media: cadence: Add support for external dphy and JH7110 SoC

Add support for external MIPI D-PHY and Starfive JH7110 SoC which
has the cadence csi2 receiver.

Signed-off-by: Jack Zhu <jack.zhu@starfivetech.com>
19 months agomedia: admin-guide: Add starfive_camss.rst for Starfive Camera Subsystem
Jack Zhu [Fri, 10 Mar 2023 12:05:50 +0000 (20:05 +0800)]
media: admin-guide: Add starfive_camss.rst for Starfive Camera Subsystem

Add the file 'starfive_camss.rst' that documents the Starfive Camera
Subsystem driver which is used for handing image sensor data.

Signed-off-by: Jack Zhu <jack.zhu@starfivetech.com>
19 months agomedia: dt-bindings: cadence-csi2rx: Convert to DT schema
Jack Zhu [Fri, 10 Mar 2023 12:05:49 +0000 (20:05 +0800)]
media: dt-bindings: cadence-csi2rx: Convert to DT schema

Convert DT bindings document for Cadence MIPI-CSI2 RX controller
to DT schema format and add new properties.

Signed-off-by: Jack Zhu <jack.zhu@starfivetech.com>
19 months agomedia: dt-bindings: Add bindings for JH7110 Camera Subsystem
Jack Zhu [Fri, 10 Mar 2023 12:05:48 +0000 (20:05 +0800)]
media: dt-bindings: Add bindings for JH7110 Camera Subsystem

Add the bindings documentation for Starfive JH7110 Camera Subsystem
which is used for handing image sensor data.

Signed-off-by: Jack Zhu <jack.zhu@starfivetech.com>
19 months agoriscv: dts: starfive: Add dphy rx node
Changhuang Liang [Wed, 15 Mar 2023 10:04:21 +0000 (03:04 -0700)]
riscv: dts: starfive: Add dphy rx node

Add dphy rx node for the StarFive JH7110 SoC. It is used to transfer CSI
camera data.

Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
19 months agophy: starfive: Add mipi dphy rx support
Changhuang Liang [Wed, 15 Mar 2023 10:04:20 +0000 (03:04 -0700)]
phy: starfive: Add mipi dphy rx support

Add mipi dphy rx support for the StarFive JH7110 SoC. It is used to
transfer CSI camera data.

Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
19 months agodt-bindings: phy: Add starfive,jh7110-dphy-rx
Changhuang Liang [Wed, 15 Mar 2023 10:04:19 +0000 (03:04 -0700)]
dt-bindings: phy: Add starfive,jh7110-dphy-rx

StarFive SoCs like the jh7110 use a MIPI D-PHY RX controller based on
a M31 IP. Add a binding for it.

Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
19 months agocrypto: starfive - Add hash and HMAC support
Jia Jie Ho [Mon, 13 Mar 2023 13:56:46 +0000 (21:56 +0800)]
crypto: starfive - Add hash and HMAC support

Adding hash/HMAC support for SHA-2 and SM3 to StarFive cryptographic
module.

Co-developed-by: Huan Feng <huan.feng@starfivetech.com>
Signed-off-by: Huan Feng <huan.feng@starfivetech.com>
Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
19 months agoriscv: dts: starfive: Add crypto and DMA node for VisionFive 2
Jia Jie Ho [Tue, 22 Nov 2022 05:56:50 +0000 (13:56 +0800)]
riscv: dts: starfive: Add crypto and DMA node for VisionFive 2

Add StarFive cryptographic module and dedicated DMA controller node to
VisionFive 2 SoCs.

Co-developed-by: Huan Feng <huan.feng@starfivetech.com>
Signed-off-by: Huan Feng <huan.feng@starfivetech.com>
Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
19 months agocrypto: starfive - Add crypto engine support
Jia Jie Ho [Mon, 13 Mar 2023 13:56:44 +0000 (21:56 +0800)]
crypto: starfive - Add crypto engine support

Adding device probe and DMA init for StarFive cryptographic module.

Co-developed-by: Huan Feng <huan.feng@starfivetech.com>
Signed-off-by: Huan Feng <huan.feng@starfivetech.com>
Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
19 months agodt-bindings: crypto: Add StarFive crypto module
Jia Jie Ho [Mon, 13 Mar 2023 13:56:43 +0000 (21:56 +0800)]
dt-bindings: crypto: Add StarFive crypto module

Add documentation to describe StarFive cryptographic engine.

Co-developed-by: Huan Feng <huan.feng@starfivetech.com>
Signed-off-by: Huan Feng <huan.feng@starfivetech.com>
Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
Reviewed-by: Rob Herring <robh@kernel.org>
19 months agoriscv: dts: starfive: Add TRNG node for VisionFive 2
Jia Jie Ho [Fri, 2 Dec 2022 06:25:38 +0000 (14:25 +0800)]
riscv: dts: starfive: Add TRNG node for VisionFive 2

Adding StarFive TRNG controller node to VisionFive 2 board.

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>
19 months agoriscv: dts: starfive: add dma controller node
Walker Chen [Mon, 27 Feb 2023 12:51:36 +0000 (20:51 +0800)]
riscv: dts: starfive: add dma controller node

Add the dma controller node for the Starfive JH7110 SoC.

Signed-off-by: Walker Chen <walker.chen@starfivetech.com>
19 months agodmaengine: dw-axi-dmac: Add support for StarFive JH7110 DMA
Walker Chen [Tue, 14 Mar 2023 08:35:36 +0000 (16:35 +0800)]
dmaengine: dw-axi-dmac: Add support for StarFive JH7110 DMA

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>