Commit Graph

38 Commits

Author SHA1 Message Date
Sebastian Reichel
f94500eb73 arm64: dts: rockchip: Add GPU power domain regulator dependency for RK3588
Enabling the GPU power domain requires that the GPU regulator is
enabled. The regulator is enabled at boot time, but gets disabled
automatically when there are no users.

This means the system might run into a failure state hanging the
whole system for the following use cases:

 * if the GPU driver is being probed late (e.g. build as a
   module and firmware is not in initramfs), the regulator
   might already have been disabled. In that case the power
   domain is enabled before the regulator.
 * unbinding the GPU driver will disable the PM domain and
   the regulator. When the driver is bound again, the PM
   domain will be enabled before the regulator and error
   appears.

Avoid this by adding an explicit regulator dependency to the
power domain.

Tested-by: Heiko Stuebner <heiko@sntech.de>
Reported-by: Adrián Martínez Larumbe <adrian.larumbe@collabora.com>
Tested-by: Adrian Larumbe <adrian.larumbe@collabora.com> # On Rock 5B
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20250220-rk3588-gpu-pwr-domain-regulator-v6-8-a4f9c24e5b81@kernel.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2025-02-28 14:44:49 +01:00
Damon Ding
2efdb04101 arm64: dts: rockchip: Fix label name of hdptxphy for RK3588
The hdptxphy is a combo transmit-PHY for HDMI2.1 TMDS Link, FRL Link, DP
and eDP Link. Therefore, it is better to name it hdptxphy0 other than
hdptxphy_hdmi0, which will be referenced by both hdmi0 and edp0 nodes.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Link: https://lore.kernel.org/r/20250206030330.680424-3-damon.ding@rock-chips.com
[added armsom-sige7, where hdmi-support was added recently and also
 the hdptxphy0-as-dclk source I just added]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2025-02-06 12:04:51 +01:00
Johan Jonker
5c96e63301 arm64: dts: rockchip: adapt regulator nodenames to preferred form
The preferred nodename for fixed-regulators has changed to
pattern: '^regulator(-[0-9]+v[0-9]+|-[0-9a-z-]+)?$'

Fix all Rockchip DT regulator nodenames.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/0ae40493-93e9-40cd-9ca9-990ae064f21a@gmail.com
[adapted rebased on top of a number of other changes and included
 neu6a-wifi + wolfvision-pf5-io-expander overlays]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-11-11 16:31:34 +01:00
Cristian Ciocaltea
f57a8daf6b arm64: dts: rockchip: Enable HDMI0 on rock-5a
Add the necessary DT changes to enable HDMI0 on Radxa ROCK 5A.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://lore.kernel.org/r/20241022-rk3588-hdmi0-dt-v3-1-3cc981e89afb@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-10-24 10:28:23 +02:00
FUKAUMI Naoki
a98053d098 arm64: dts: rockchip: add and enable gpu node for Radxa ROCK 5A
add gpu node to make it usable on Radxa ROCK 5A.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://lore.kernel.org/r/20241019025008.852-1-naoki@radxa.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-10-22 16:10:27 +02:00
Sam Edwards
4294e32111 arm64: dts: rockchip: Split up RK3588's PCIe pinctrls
These pinctrls manage the low-speed PCIe signals:
- CLKREQ#: An output on the RK3588 (both RC or EP modes), used to
  request that external clock-generation circuitry provide a clock.
- PERST#: An input on the RK3588 in EP mode, used to detect a reset
  signal from the RC. In RC mode, the hardware does not use this signal:
  Linux itself generates it by putting the pin in GPIO mode.
- WAKE#: In EP mode, this is an output; in RC mode, this is an input.

Each of these signals serves a distinct purpose, and more importantly,
PERST# should not be muxed when the RK3588 is in the RC role. Bundling
them together in pinctrl groups prevents proper use: indeed, almost none
of the current board-specific .dts files make any use of them.
(Exception: Rock 5A recently had a patch land that misuses _pins; this
 patch corrects that.)

However, on some RK3588 boards, the PCIe 3 controller will indefinitely
stall the boot if CLKREQ# is not muxed (details in the next patch).
This patch unbundles the signals to allow them to be used.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Link: https://lore.kernel.org/r/20240912025034.180233-2-CFSworks@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-09-30 12:11:46 +02:00
FUKAUMI Naoki
b728d4c51f arm64: dts: rockchip: enable PCIe on M.2 E key for Radxa ROCK 5A
Enable pcie2x1l2 and related combphy/regulator routed to M.2 E key
connector on Radxa ROCK 5A.

Tested with Radxa Wireless Module A8:

$ lspci
0004:40:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01)
0004:41:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8852BE PCIe 802.11ax Wireless Network Controller

$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: end0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether c2:58:fc:70:55:86 brd ff:ff:ff:ff:ff:ff
3: wlP4p65s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 2c:05:47:65:5b:ed brd ff:ff:ff:ff:ff:ff

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 003: ID 0bda:b85b Realtek Semiconductor Corp. Bluetooth Radio
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 006 Device 002: ID 0789:0336 Logitec Corp. LMD USB Device
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

$ hciconfig
hci0:	Type: Primary  Bus: USB
	BD Address: 2C:05:47:65:5B:EE  ACL MTU: 1021:6  SCO MTU: 255:12
	UP RUNNING
	RX bytes:2698 acl:0 sco:0 events:329 errors:0
	TX bytes:69393 acl:0 sco:0 commands:329 errors:0

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://lore.kernel.org/r/20240826080456.525-1-naoki@radxa.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-08-28 16:06:41 +02:00
FUKAUMI Naoki
b8ac0cf405 arm64: dts: rockchip: remove unnecessary properties for Radxa ROCK 5A
There is no "on-board WLAN/BT chip" on Radxa ROCK 5A. remove related
properties.

Fixes: 1642bf66e2 ("arm64: dts: rockchip: add USB2 to rk3588s-rock5a")
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://lore.kernel.org/r/20240826075130.546-1-naoki@radxa.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-08-28 16:05:35 +02:00
Linus Torvalds
e3950967f6 soc: dt updates for 6.11
The devicetree updates are fairly well spread out across platforms,
 with Qualcomm making up about a third of the total.
 
 There are three new SoCs in existing product families this:
 
  - NXP i.MX95 is a variant of i.MX93, now with six Cortex-A55 cores
    instead of just two as well as a GPU and more high-speed I/O
    devices.
 
  - Qualcomm QCS8550 is a variant of SM8550 for IOT devices
 
  - Airoha EN7581 is a 10G-PON network chip and related to
    the MT7981 Wireless router chip from its parent Mediatek.
 
 In total there are 58 new machines, including four riscv
 boards and eight for 32-bit arm.
 
 The most exciting new addition is probably a pair of laptops
 based on the Qualcomm x1e80100 (Snapdragon X1 Elite) chip,
 the Asus Vivobook S15 and the Lenovo Yoga Slim7x.
 
 Other noteworthy new additions are:
 
  - A total of 20 Qualcomm based machines, mostly Android devices
    from Samsung, Motorola and LG, as well as a wireless router
    and some reference designs
 
  - Six NXP i.MX based machines, mostly industrial boards along
    with some reference designs
 
  - Mediatek sees some interesting Filogic based routers
    including the "OpenWRT One", a few new Chromebooks as
    well as single-board computers.
 
  - Four machines from Solidrun based on Marvell cn913x,
    replacing the older Armada 8000 based counterparts
 
  - The four Amlogic machines are all set top boxes or reference
    designs for them
 
  - The nine new Rockchips machines are mostly single-board
    computers including some interesting ones based on the
    rk3588 chip like the ROCK 5 ITX board and the CM3588
    with its four NVMe slots
 
  - The RISC-V boards are all single-board computers based on
    Starfive JH7110, Microchip MPFS and Allwinner D1, which all
    had similar boards already
 
 There are also a lot of updates to already supported machines,
 notably for the TI K3, Rockchips, Freescale and of course
 Qualcomm platforms.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaVTSYACgkQYKtH/8kJ
 UidZrQ/9GKrfiZ9xJ/7Vvh/jtF5uObsoVuEC2ZFNXY4q6x6KV8BxuHV6LVHgWVaS
 3+Mp5ER1N+h13cB8aDNQ9lq/TYfINQrAGFPMWK2Ytkg57klqeCblfSiKuQxIfdmG
 SH146R3NPe6lqEZ9yv8KWr1GS8kkkVFgzcOBD2BPwx77elazBvG4Ff5rd3Nizua2
 aAcrO2tKHMOJz4eUOJNvrDppwBZUARwPlScBx+QrJWUIDvjRafGvmwSp80FEQorz
 k258DeBzn3JiHUtvE5MLsaBC1WNghV5WTujEI+SLd5T0XohSr5Y8oisSnn/9fAn4
 CCji0eeeqG/KfIWzEGvs7AKmym1oW1OpdbLRN601YSNxLS7mLE5gEySjFXR3dYje
 IxbYzDV9A8qst/znk+uR6be8YB9r7r+aYi4IlE4lg9xWripTOPNuCx/5tdfa2Ge6
 +fBs4WBz+t0Xba19VjonaP+6HsEPqC2LP0/D44QMktG7QRrYbqILX66Mg/jgPccM
 f167D9WGcWUwoKH2nDZ+m1oXQj0UkSge40gBOFRtGfdCsV77TssmGeq0OeDDSA9K
 bIQgaDVwZuYXr9kyNoYIqziU0JA+mhALLiaAVaMLS8+VcNXRZKscv3fs+yFgCGFy
 aDkqWw6j2M3/O93+t4j4He/KNglquA81DBT8ZZPV1KJ4flTQIk0=
 =xGqj
 -----END PGP SIGNATURE-----

Merge tag 'soc-dt-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC dt updates from Arnd Bergmann:
 "The devicetree updates are fairly well spread out across platforms,
  with Qualcomm making up about a third of the total.

  There are three new SoCs in existing product families this:

   - NXP i.MX95 is a variant of i.MX93, now with six Cortex-A55 cores
     instead of just two as well as a GPU and more high-speed I/O
     devices.

   - Qualcomm QCS8550 is a variant of SM8550 for IOT devices

   - Airoha EN7581 is a 10G-PON network chip and related to the MT7981
     Wireless router chip from its parent Mediatek.

  In total there are 58 new machines, including four riscv boards and
  eight for 32-bit arm.

  The most exciting new addition is probably a pair of laptops based on
  the Qualcomm x1e80100 (Snapdragon X1 Elite) chip, the Asus Vivobook
  S15 and the Lenovo Yoga Slim7x.

  Other noteworthy new additions are:

   - A total of 20 Qualcomm based machines, mostly Android devices from
     Samsung, Motorola and LG, as well as a wireless router and some
     reference designs

   - Six NXP i.MX based machines, mostly industrial boards along with
     some reference designs

   - Mediatek sees some interesting Filogic based routers including the
     "OpenWRT One", a few new Chromebooks as well as single-board
     computers.

   - Four machines from Solidrun based on Marvell cn913x, replacing the
     older Armada 8000 based counterparts

   - The four Amlogic machines are all set top boxes or reference
     designs for them

   - The nine new Rockchips machines are mostly single-board computers
     including some interesting ones based on the rk3588 chip like the
     ROCK 5 ITX board and the CM3588 with its four NVMe slots

   - The RISC-V boards are all single-board computers based on Starfive
     JH7110, Microchip MPFS and Allwinner D1, which all had similar
     boards already

  There are also a lot of updates to already supported machines, notably
  for the TI K3, Rockchips, Freescale and of course Qualcomm platforms"

* tag 'soc-dt-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (846 commits)
  arm64: dts: allwinner: h616: add crypto engine node
  riscv: dts: add clock generator for Sophgo SG2042 SoC
  arm64: dts: rockchip: Add Xunlong Orange Pi 3B
  dt-bindings: arm: rockchip: Add Xunlong Orange Pi 3B
  arm64: dts: rockchip: Add Radxa ROCK 3B
  dt-bindings: arm: rockchip: Add Radxa ROCK 3B
  mailmap: Update Luca Weiss's email address
  ARM: dts: ixp4xx: nslu2: beeper uses PWM
  arm64: dts: rockchip: add ROCK 5 ITX board
  dt-bindings: arm: rockchip: Add ROCK 5 ITX board
  arm64: dts: rockchip: Add dma-names to uart1 on Pine64 rk3566 devices
  arm64: dts: rockchip: Add avdd supplies to hdmi on rock64
  arm64: dts: qcom: msm8916-lg-c50: add initial dts for LG Leon LTE
  arm64: dts: qcom: msm8916-lg-m216: Add initial device tree
  dt-bindings: arm: qcom: Add msm8916 based LG devices
  ARM: dts: qcom: msm8960: correct memory base
  arm64: dts: qcom: ipq9574: Add icc provider ability to gcc
  dt-bindings: interconnect: Add Qualcomm IPQ9574 support
  arm64: dts: qcom: sm8150: Add video clock controller node
  arm64: dts: qcom: pm6150: Add vibrator
  ...
2024-07-16 11:43:51 -07:00
FUKAUMI Naoki
00224650dd arm64: dts: rockchip: add (but disabled) SFC node for Radxa ROCK 5A
This commit adds SFC node for Radxa ROCK 5A.

since sdhci and sfc on RK3588s share pins(i.e. exclusive), it cannot
be enabled both nodes at the same time. so status = "okay" is omitted
here.

you may be able to enable sfc (and disable sdhci) by fdt overlay.

SPI NOR flash chip may vary, so use safe(lowest) spi-max-frequency.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://lore.kernel.org/r/20240623023329.1044-2-naoki@radxa.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-06-24 18:14:02 +02:00
Alexey Charkov
2f8064b9c4 arm64: dts: rockchip: enable thermal management on all RK3588 boards
This enables the on-chip thermal monitoring sensor (TSADC) on all
RK3588(s) boards that don't have it enabled yet. It provides temperature
monitoring for the SoC and emergency thermal shutdowns, and is thus
important to have in place before CPU DVFS is enabled, as high CPU
operating performance points can overheat the chip quickly in the
absence of thermal management.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-2-c1f5f3267f1e@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-06-24 18:14:01 +02:00
FUKAUMI Naoki
d05f7aff7a arm64: dts: rockchip: make poweroff(8) work on Radxa ROCK 5A
Designate the RK806 PMIC on the Radxa ROCK 5A as the system power
controller, so the board shuts down properly on poweroff(8).

Fixes: 75fdcbc8f4 ("arm64: dts: rockchip: add PMIC to rock-5a")
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://lore.kernel.org/r/20240612033523.37166-1-naoki@radxa.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-06-17 23:13:10 +02:00
FUKAUMI Naoki
b56aed4a61 Revert "arm64: dts: rockchip: remove redundant cd-gpios from rk3588 sdmmc nodes"
This reverts commit d859ad305e.

Inserting and removing microSD card is not detected since above commit.
Reverting it fixes this problem.

This is probably the same thing as 5 years ago on rk3399
https://lore.kernel.org/all/0608599d485117a9d99f5fb274fbb1b55f6ba9f7.1547466003.git.robin.murphy@arm.com/

So we'll go back to cd-gpios for now.

this patch is tested on Radxa ROCK 5A and 5B.

Fixes: d859ad305e ("arm64: dts: rockchip: remove redundant cd-gpios from rk3588 sdmmc nodes")
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://lore.kernel.org/r/20240613001757.1350-1-naoki@radxa.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-06-17 23:12:34 +02:00
Jing Luo
d7f2039e53 arm64: dts: rockchip: correct gpio_pwrctrl1 typos on rk3588(s) boards
gpio_pwrctrl2 gets duplicated by both rk806_dvs1_null and rk806_dvs2_null
gpio_pwrctrl1 is unset. This typo appears in multiple files. Let's fix them.

Note: I haven't had the chance to test them all because I don't own all
of these boards (obviously). Please test if it's needed.

Signed-off-by: Jing Luo <jing@jing.rocks>
Link: https://lore.kernel.org/r/20240420130355.639406-1-jing@jing.rocks
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-04-23 17:37:40 +02:00
Dragan Simic
45e831033f arm64: dts: rockchip: Correct the model names for Radxa ROCK 5 boards
Correct the descriptions of a few Radxa boards, according to the up-to-date
documentation from Radxa and the detailed explanation from Naoki. [1]  To sum
it up, the short naming, as specified by Radxa, is preferred.

[1] https://lore.kernel.org/linux-rockchip/B26C732A4DCEA9B3+282b8775-601b-4d4a-a513-4924b7940076@radxa.com/

Suggested-by: FUKAUMI Naoki <naoki@radxa.com>
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/6931289a252dc2d6c7bfd2388835c5e98ba0d8c9.1713457260.git.dsimic@manjaro.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-04-23 17:13:15 +02:00
Sebastian Reichel
af7ec140dd arm64: dts: rockchip: add upper USB3 port to rock-5a
Enable full support (XHCI, EHCI, OHCI) for the upper USB3 port from
Radxa Rock 5 Model A. The lower one is already supported.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20240408225109.128953-10-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-04-12 16:20:42 +02:00
Kever Yang
d859ad305e arm64: dts: rockchip: remove redundant cd-gpios from rk3588 sdmmc nodes
The sdmmc node already have a "&sdmmc_det" for pinctrl which switch the
GPIO0A4 to sdmmc detect function, no need to define a separate "cd-gpios".

RK3588 has force_jtage feature which is enable JTAG function via sdmmc
pins automatically when there is no SD card insert, this feature will
need the GPIO0A4 works in sdmmc_det function like other mmc signal instead
of GPIO function, or else the force_jtag can not auto be disabled when
SD card insert.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Link: https://lore.kernel.org/r/20240201034621.1970279-1-kever.yang@rock-chips.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2024-02-13 20:11:42 +01:00
Dragan Simic
b0140a1b3b arm64: dts: rockchip: Add ethernet0 alias to the dts for RK3588(S) boards
Add ethernet0 alias to the board dts files for a few supported RK3588 and
RK3588S boards that had it missing.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/9af2026bf8a5538aff627381289cb06f2fab4263.1702368023.git.dsimic@manjaro.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-12-12 21:43:48 +01:00
Heiko Stuebner
9918d10d16 arm64: dts: rockchip: move rk3588 serial aliases to soc dtsi
The serial ports on rk3588 are named uart0 - uart9. Board schematics
also use these exact numbers and we want those names to also reflect
in the OS devices because everything else would just cause confusion.

To prevent each board repeating their list of serial aliases, move them
to the soc dtsi, as all previous Rockchip soc do already.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/20231205164842.556684-2-heiko@sntech.de
2023-12-12 21:43:46 +01:00
Sebastian Reichel
0773a4a199 arm64: dts: rockchip: add USB3 host to rock-5a
Enable USB3 host controller for the Radxa ROCK 5 Model A. This adds
USB3 for the lower USB3 port (the one closer to the PCB).

The upper USB3 port uses the RK3588 USB TypeC host controller, which
use a different PHY without upstream support.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20231106155934.80838-2-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-12-12 21:43:46 +01:00
FUKAUMI Naoki
c75b725ea6 arm64: dts: rockchip: fix/update sdmmc properties for rock-5a and -5b
add alias for sdmmc as mmc1.
make card detect work.

Fixes: ea3e66e7ad ("arm64: dts: rockchip: add SD card support to rock-5a")
Fixes: 2a6d4af5f1 ("arm64: dts: rockchip: Add SD card support to rock-5b")
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://lore.kernel.org/r/20230722121150.130126-1-naoki@radxa.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-24 20:55:20 +02:00
Sebastian Reichel
1642bf66e2 arm64: dts: rockchip: add USB2 to rk3588s-rock5a
Enable USB2 (EHCI and OCHI mode) support for the Radxa ROCK 5 Model A.
This adds USB support for the on-board WLAN/BT chip, the two USB2
ports, the USB available from the 2x20 connector and the lower USB3
port (in USB2 mode).

The upper USB3 (further away from the PCB) uses the RK3588S USB TypeC
OTG controller for USB2 and USB3 and thus is not supported at all at
the moment.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230712165106.65603-5-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-14 17:33:26 +02:00
Jagan Teki
e70d283904 arm64: dts: rockchip: Drop unchanged max-frequency from rk3588 boards
200MHz is the default rk3588 emmc max-frequency added in dtsi, so why
the board DT files are adding the same value explicitly?

Drop that unchanged property value.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Link: https://lore.kernel.org/r/20230621064507.479891-1-jagan@edgeble.ai
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:42:58 +02:00
Sebastian Reichel
dd4464ecce arm64: dts: rockchip: add fan support to rock-5a
Add the necessary DT changes for the Rock 5A board to enable support for
the PWM controlled heat sink fan.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230710165228.105983-14-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:24:30 +02:00
Sebastian Reichel
43465c6751 arm64: dts: rockchip: add SARADC to rock-5a
Enable ADC support for Rock 5A, which has the following ADC channels:

Channel 0 = Boot Mode Config
Channel 1 = Recovery Key
Channel 2 = PWM Fan
Channel 3 = Headphone Hook
Channel 4 = System Input Voltage
Channel 5 = Board ID Config

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230710165228.105983-13-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:24:30 +02:00
Sebastian Reichel
aa00cf88bd arm64: dts: rockchip: enable I2C interface from DSI and CSI connectors on rock-5a
I2C3 is routed to the Camera connector and I2C5 is routed to the LCD
connector. On I2C5 additionally there is an unpopulated footprint for
a HYM8563TS RTC.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230710165228.105983-12-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:24:30 +02:00
Sebastian Reichel
afc3925f69 arm64: dts: rockchip: add vdd_npu_s0 regulator to rock-5a
Add the NPU regulator.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230710165228.105983-11-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:24:30 +02:00
Sebastian Reichel
89c880808c arm64: dts: rockchip: add I2C EEPROM to rock-5a
Add the I2C EEPROM to the Rock 5A DT.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230710165228.105983-10-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:24:30 +02:00
Sebastian Reichel
fb031e6275 arm64: dts: rockchip: add analog audio to rock-5a
Add analog audio support based on the Everest Semi ES8316 codec.

Note, that this currently does not support headphone plug events. The
Rock 5A uses a different headphone jack with a different logic to detect
a headphone plug. Unfortunately the detect GPIO is always low.
Downstream uses an ADC channel instead, but that is currently not
supported upstream.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230710165228.105983-9-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:24:30 +02:00
Sebastian Reichel
db02f866b1 arm64: dts: rockchip: add status LED to rock-5a
Describe the Rock 5A status LED in its device tree.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230710165228.105983-8-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:24:30 +02:00
Lucas Tanure
ea3e66e7ad arm64: dts: rockchip: add SD card support to rock-5a
Add sdmmc support for Rock Pi 5A board.

Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230710165228.105983-7-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:24:29 +02:00
Sebastian Reichel
53bf040e14 arm64: dts: rockchip: add 5V regulator to rock-5a
Add GPIO controlled 5V regulator, which is used for supplying
the fan, on-board USB hub and HDMI.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230710165228.105983-6-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:24:29 +02:00
Sebastian Reichel
4bbca5c7f4 arm64: dts: rockchip: add vdd_cpu_big regulators to rock-5a
The RK8602 and RK8603 voltage regulators on the Rock 5A board provide
the power lines vdd_cpu_big0 and vdd_cpu_big1, respectively.

Add the necessary device tree nodes and bind them to the corresponding
CPU big core nodes.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230710165228.105983-5-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:24:29 +02:00
Sebastian Reichel
75fdcbc8f4 arm64: dts: rockchip: add PMIC to rock-5a
This adds PMIC support for the Radxa ROCK 5A

Co-developed-by: shengfei Xu <xsf@rock-chips.com>
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230710165228.105983-4-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-07-11 15:24:29 +02:00
Lucas Tanure
cda0c2ea65 arm64: dts: rockchip: Fix RX delay for ethernet phy on rk3588s-rock5a
Add network PHY rx delay and change type to rgmii, so
that it is applied. This fixes packet loss when more
than a few packets are exchanged.

Fixes: d1824cf957 ("arm64: dts: rockchip: Add rock-5a board")
Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com>
Link: https://lore.kernel.org/r/20230113130220.662194-1-lucas.tanure@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-16 11:14:35 +01:00
Christopher Obbard
304c8a7599 arm64: dts: rockchip: Remove empty line from rock-5a
There is a line which is empty. Remove it.

Fixes: a4a8f1afb360 ("arm64: dts: rockchip: Add rock-5a board")
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Link: https://lore.kernel.org/r/20230110195352.272360-3-chris.obbard@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-11 11:15:45 +01:00
Christopher Obbard
991f136c9f arm64: dts: rockchip: Update sdhci alias for rock-5a
In the previous version, the sdhci alias was set to mmc1: an artifact
leftover from the port from vendor kernel. Update the alias to mmc0 to
match the device's boot order.

Fixes: a4a8f1afb360 ("arm64: dts: rockchip: Add rock-5a board")
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Link: https://lore.kernel.org/r/20230110195352.272360-2-chris.obbard@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-11 11:15:45 +01:00
Sebastian Reichel
d1824cf957 arm64: dts: rockchip: Add rock-5a board
Add board file for the RK3588s Rock 5A board. While the hardware
offers plenty of peripherals and connectivity this basic implementation
just handles things required to access eMMC, UART and Ethernet (i.e.
enough to successfully boot Linux).

Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
Tested-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230109155801.51642-7-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-10 23:15:17 +01:00