[PATCH v2 0/7] soc: rockchip: add driver for rockchip io domains

Michael Riesch michael.riesch at wolfvision.net
Mon Sep 19 04:39:41 PDT 2022


Hi all,

The IO domains in Rockchip SoCs need to be configured to match the
corresponding bank voltage. In Linux this is achieved by means of a
platform driver that reads the voltage value of the supplies and
configures the bits in the general register file (GRF) accordingly.

This series ports this driver to barebox to provide support for the
Rockchip RK356x SoCs. Please note that I could only test the changes
on RK3568 boards, so I left out the parts for the other SoCs supported
by the Linux driver. Also, it should be noted that the Linux driver
uses notifiers to react to voltage changes. This is not supported by
this barebox driver.

The driver has been tested on a Radxa ROCK3 Model A and a Rockchip
RK3568 EVB1. I do not have a BananaPi R2Pro and would therefore like
to ask someone with such a board a test.

The removal of the IO domain configuration in the low-level code allows
to refactor the low-level initialization to a common method rk3568_start.
This is introduced and used in patches 6 and 7.

Looking forward to your comments!

Best regards,
Michael

Changes since v1:
 - add defconfig
 - extend removal of IO domain configuration code
 - refactor initialization to rk3568_start()

Michael Riesch (7):
  soc: rockchip: add driver for rockchip io domains
  arm: rockchip_v8_defconfig: enable io domain driver
  arm: rockchip: radxa-rock3: remove io domain configuration
  arm: rockchip: rk3568-evb: remove io domain configuration
  arm: rockchip: rk3568-bpi-r2pro: remove io domain configuration
  arm: rockchip: rk3568: refactor common rk3568_start method
  arm: rockchip: rk3568-bpi-r2pro: use common method rk3568_start

 arch/arm/boards/pine64-quartz64/lowlevel.c    |  30 +--
 arch/arm/boards/radxa-rock3/lowlevel.c        |  33 ---
 .../rockchip-rk3568-bpi-r2pro/lowlevel.c      |  42 +---
 .../arm/boards/rockchip-rk3568-evb/lowlevel.c |  39 +--
 arch/arm/configs/rockchip_v8_defconfig        |   4 +
 .../arm/mach-rockchip/include/mach/rockchip.h |   1 +
 arch/arm/mach-rockchip/rk3568.c               |  24 ++
 drivers/soc/Kconfig                           |   1 +
 drivers/soc/Makefile                          |   1 +
 drivers/soc/rockchip/Kconfig                  |  17 ++
 drivers/soc/rockchip/Makefile                 |   6 +
 drivers/soc/rockchip/io-domain.c              | 223 ++++++++++++++++++
 12 files changed, 280 insertions(+), 141 deletions(-)
 create mode 100644 drivers/soc/rockchip/Kconfig
 create mode 100644 drivers/soc/rockchip/Makefile
 create mode 100644 drivers/soc/rockchip/io-domain.c

-- 
2.30.2




More information about the barebox mailing list