rockchip: rk3399: Migrate to use IO-domain driver
Subsystems (4)
v2 cover rockchip: rk3399: Migrate to use IO-domain driver
This series remove old unused board_early_init_f() functions, adds support for RK3399 to the IO-domain driver and migrates all boards that used setup_iodomain() to now use the IO-domain driver instead.
Also add device tree files and myself as reviewer to MAINTAINERS.
Changes in v2:
- Use glob pattern where appropriate
- Split gpt_capsule_update_setup() change into own patch
- Collect r-b tags
This series depends on following series for a clean apply:
- rockchip: rk3328: Update defconfigs, DTs and enable boot from SPI [1]
- rockchip: Read cpuid and generate MAC address from efuse for RK3328 and RK3399 [2]
- rockchip: Update stack and bss addresses on RK3308, RK3328, RK3399, RK356x and RK3588 [3]
- rockchip: add support for Theobroma JAGUAR SBC-RK3588-AMR [4]
A copy of this series and its depends can also be found at [5]
[1] https://patchwork.ozlabs.org/cover/1900345/
[2] https://patchwork.ozlabs.org/cover/1897743/
[3] https://patchwork.ozlabs.org/cover/1907155/
[4] https://patchwork.ozlabs.org/cover/1910408/
[5] https://github.com/Kwiboo/u-boot-rockchip/commits/rk3399-io-domain-v2
Jonas Karlman (12):
board: rockchip: rk3399: Add device tree files to MAINTAINERS
board: rockchip: rk3399: Add myself as reviewer to MAINTAINERS
board: rockchip: rk3399: Remove unused board_early_init_f functions
board: rockchip: Add a common ROCK Pi 4 target
rockchip: io-domain: Add support for RK3399
rockchip: pine64: rockpro64: Migrate to use IO-domain driver
rockchip: pine64: pinebook-pro: Migrate to use IO-domain driver
rockchip: pine64: pinephone-pro: Migrate to use IO-domain driver
rockchip: vamrs: rock960: Migrate to use IO-domain driver
rockchip: theobroma-systems: puma: Migrate to use IO-domain driver
rockchip: google: gru: Migrate to use IO-domain driver
rockchip: board: Move gpt_capsule_update_setup() call
arch/arm/mach-rockchip/board.c | 10 +--
arch/arm/mach-rockchip/rk3399/Kconfig | 6 ++
board/firefly/roc-pc-rk3399/MAINTAINERS | 1 +
board/firefly/roc-pc-rk3399/roc-pc-rk3399.c | 22 +-----
board/google/gru/gru.c | 35 --------
board/pine64/pinebook-pro-rk3399/MAINTAINERS | 6 +-
board/pine64/pinebook-pro-rk3399/Makefile | 1 -
.../pinebook-pro-rk3399/pinebook-pro-rk3399.c | 61 --------------
board/pine64/pinephone-pro-rk3399/MAINTAINERS | 5 +-
board/pine64/pinephone-pro-rk3399/Makefile | 1 -
.../pinephone-pro-rk3399.c | 64 ---------------
board/pine64/rockpro64_rk3399/MAINTAINERS | 3 +-
board/pine64/rockpro64_rk3399/Makefile | 7 --
.../rockpro64_rk3399/rockpro64-rk3399.c | 39 ---------
board/radxa/rockpi4-rk3399/Kconfig | 15 ++++
board/radxa/rockpi4-rk3399/MAINTAINERS | 22 ++++++
.../rockpi4-rk3399}/Makefile | 2 +-
.../rockpi4-rk3399/rockpi4-rk3399.c} | 33 +-------
board/rockchip/evb_rk3399/MAINTAINERS | 48 ++++-------
.../puma_rk3399/puma-rk3399.c | 21 -----
board/vamrs/rock960_rk3399/MAINTAINERS | 2 +
board/vamrs/rock960_rk3399/Makefile | 6 --
board/vamrs/rock960_rk3399/rock960-rk3399.c | 27 -------
configs/chromebook_bob_defconfig | 1 +
configs/chromebook_kevin_defconfig | 1 +
configs/ficus-rk3399_defconfig | 1 +
configs/pinebook-pro-rk3399_defconfig | 1 +
configs/pinephone-pro-rk3399_defconfig | 1 +
configs/puma-rk3399_defconfig | 1 +
configs/rock-4c-plus-rk3399_defconfig | 2 +-
configs/rock-4se-rk3399_defconfig | 2 +-
configs/rock-pi-4-rk3399_defconfig | 2 +-
configs/rock-pi-4c-rk3399_defconfig | 2 +-
configs/rock960-rk3399_defconfig | 1 +
configs/rockpro64-rk3399_defconfig | 1 +
drivers/misc/rockchip-io-domain.c | 79 ++++++++++++++++++-
include/configs/rk3399_common.h | 16 ----
include/configs/rockpi4-rk3399.h | 32 ++++++++
38 files changed, 198 insertions(+), 382 deletions(-)
delete mode 100644 board/pine64/pinebook-pro-rk3399/Makefile
delete mode 100644 board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c
delete mode 100644 board/pine64/pinephone-pro-rk3399/Makefile
delete mode 100644 board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c
delete mode 100644 board/pine64/rockpro64_rk3399/Makefile
delete mode 100644 board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
create mode 100644 board/radxa/rockpi4-rk3399/Kconfig
create mode 100644 board/radxa/rockpi4-rk3399/MAINTAINERS
rename board/{rockchip/evb_rk3399 => radxa/rockpi4-rk3399}/Makefile (79%)
rename board/{rockchip/evb_rk3399/evb-rk3399.c => radxa/rockpi4-rk3399/rockpi4-rk3399.c} (65%)
delete mode 100644 board/vamrs/rock960_rk3399/Makefile
delete mode 100644 board/vamrs/rock960_rk3399/rock960-rk3399.c
create mode 100644 include/configs/rockpi4-rk3399.hSignature · 1 line
2.43.2
PATCH v2 1/12 board: rockchip: rk3399: Add device tree files to MAINTAINERS
Update MAINTAINERS files for RK3399 boards to include related device tree files. Also correct a few filenames.
---
v2:
- Use glob pattern where appropriate
--- board/firefly/roc-pc-rk3399/MAINTAINERS | 1 + board/pine64/pinebook-pro-rk3399/MAINTAINERS | 5 ++- board/pine64/pinephone-pro-rk3399/MAINTAINERS | 5 ++- board/pine64/rockpro64_rk3399/MAINTAINERS | 2 +- board/rockchip/evb_rk3399/MAINTAINERS | 35 ++++++++++--------- board/vamrs/rock960_rk3399/MAINTAINERS | 2 ++ 6 files changed, 27 insertions(+), 23 deletions(-)
board/firefly/roc-pc-rk3399/MAINTAINERS +1 -0
@@ -6,3 +6,4 @@ F: board/firefly/roc-pc-rk3399 F: include/configs/roc-pc-rk3399.h F: configs/roc-pc-rk3399_defconfig F: configs/roc-pc-mezzanine-rk3399_defconfig +F: arch/arm/dts/rk3399-roc-pc*
board/pine64/pinebook-pro-rk3399/MAINTAINERS +2 -3
@@ -2,7 +2,6 @@ PINEBOOK_PRO M: Peter Robinson <[email protected]> S: Maintained F: board/pine64/pinebook-pro-rk3399/ -F: include/configs/rk3399-pinebook-pro.h -F: arch/arm/dts/rk3399-pinebook-pro.dts -F: arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +F: include/configs/pinebook-pro-rk3399.h +F: arch/arm/dts/rk3399-pinebook-pro* F: configs/pinebook-pro-rk3399_defconfig
board/pine64/pinephone-pro-rk3399/MAINTAINERS +2 -3
@@ -2,7 +2,6 @@ PINEPHONE_PRO M: Peter Robinson <[email protected]> S: Maintained F: board/pine64/pinephone-pro-rk3399/ -F: include/configs/rk3399-pinephone-pro.h -F: arch/arm/dts/rk3399-pinephone-pro.dts -F: arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi +F: include/configs/pinephone-pro-rk3399.h +F: arch/arm/dts/rk3399-pinephone-pro* F: configs/pinephone-pro-rk3399_defconfig
board/pine64/rockpro64_rk3399/MAINTAINERS +1 -1
@@ -3,5 +3,5 @@ M: Jagan Teki <[email protected]> S: Maintained F: board/pine64/rockpro64_rk3399 F: include/configs/rockpro64_rk3399.h -F: arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +F: arch/arm/dts/rk3399-rockpro64* F: configs/rockpro64-rk3399_defconfig
board/rockchip/evb_rk3399/MAINTAINERS +19 -16
@@ -4,48 +4,53 @@ S: Maintained F: board/rockchip/evb_rk3399 F: include/configs/evb_rk3399.h F: configs/evb-rk3399_defconfig +F: arch/arm/dts/rk3399-evb* F: configs/firefly-rk3399_defconfig +F: arch/arm/dts/rk3399-firefly* EAIDK-610 M: Andy Yan <[email protected]> S: Maintained F: configs/eaidk-610-rk3399_defconfig -F: arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi +F: arch/arm/dts/rk3399-eaidk-610* KHADAS-EDGE M: Nick Xie <[email protected]> S: Maintained F: configs/khadas-edge-rk3399_defconfig +F: arch/arm/dts/rk3399-khadas-edge.dts +F: arch/arm/dts/rk3399-khadas-edge.dtsi F: arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi KHADAS-EDGE-CAPTAIN M: Nick Xie <[email protected]> S: Maintained F: configs/khadas-edge-captain-rk3399_defconfig -F: arch/arm/dts/rk3399-khadas-edge-captain-u-boot.dtsi +F: arch/arm/dts/rk3399-khadas-edge-captain* KHADAS-EDGE-V M: Nick Xie <[email protected]> S: Maintained F: configs/khadas-edge-v-rk3399_defconfig -F: arch/arm/dts/rk3399-khadas-edge-v-u-boot.dtsi +F: arch/arm/dts/rk3399-khadas-edge-v* LEEZ-P710 M: Andy Yan <[email protected]> S: Maintained -F: arch/arm/dts/rk3399-leez-p710-u-boot.dtsi +F: arch/arm/dts/rk3399-leez-p710* F: configs/leez-rk3399_defconfig NANOPC-T4 M: Jagan Teki <[email protected]> S: Maintained F: configs/nanopc-t4-rk3399_defconfig -F: arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi +F: arch/arm/dts/rk3399-nanopc-t4* NANOPI-M4 M: Jagan Teki <[email protected]> S: Maintained F: configs/nanopi-m4-rk3399_defconfig +F: arch/arm/dts/rk3399-nanopi-m4.dts F: arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi NANOPI-M4-2GB
@@ -53,55 +58,53 @@ M: Jagan Teki <[email protected]> M: Deepak Das <[email protected]> S: Maintained F: configs/nanopi-m4-2gb-rk3399_defconfig -F: arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi +F: arch/arm/dts/rk3399-nanopi-m4-2gb* NANOPI-M4B M: Alexandre Vicenzi <[email protected]> S: Maintained F: configs/nanopi-m4b-rk3399_defconfig -F: arch/arm/dts/rk3399-nanopi-m4b-u-boot.dtsi +F: arch/arm/dts/rk3399-nanopi-m4b* NANOPI-NEO4 M: Jagan Teki <[email protected]> S: Maintained F: configs/nanopi-neo4-rk3399_defconfig -F: arch/arm/dts/rk3399-nanopi-neo4-u-boot.dtsi +F: arch/arm/dts/rk3399-nanopi-neo4* NANOPI-R4S M: Xiaobo Tian <[email protected]> S: Maintained F: configs/nanopi-r4s-rk3399_defconfig -F: arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi +F: arch/arm/dts/rk3399-nanopi-r4s* ORANGEPI-RK3399 M: Jagan Teki <[email protected]> S: Maintained F: configs/orangepi-rk3399_defconfig -F: arch/arm/dts/rk3399-u-boot.dtsi -F: arch/arm/dts/rk3399-orangepi-u-boot.dtsi +F: arch/arm/dts/rk3399-orangepi* ROCK-4C+ M: FUKAUMI Naoki <[email protected]> S: Maintained F: configs/rock-4c-plus-rk3399_defconfig -F: arch/arm/dts/rk3399-rock-4c-plus.dts +F: arch/arm/dts/rk3399-rock-4c-plus* ROCK-4SE M: Christopher Obbard <[email protected]> S: Maintained F: configs/rock-4se-rk3399_defconfig -F: arch/arm/dts/rk3399-rock-4se-u-boot.dtsi +F: arch/arm/dts/rk3399-rock-4se* ROCK-PI-4 M: Jagan Teki <[email protected]> S: Maintained F: configs/rock-pi-4-rk3399_defconfig -F: arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi F: configs/rock-pi-4c-rk3399_defconfig -F: arch/arm/dts/rk3399-rock-pi-4c-u-boot.dtsi +F: arch/arm/dts/rk3399-rock-pi-4* ROCK-PI-N10 M: Jagan Teki <[email protected]> S: Maintained F: configs/rock-pi-n10-rk3399pro_defconfig -F: arch/arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi +F: arch/arm/dts/rk3399pro-rock-pi-n10*
board/vamrs/rock960_rk3399/MAINTAINERS +2 -0
@@ -4,8 +4,10 @@ S: Maintained F: board/vamrs/rock960_rk3399/ F: include/configs/rock960_rk3399.h F: configs/rock960-rk3399_defconfig +F: arch/arm/dts/rk3399-rock960* FICUS EE M: Manivannan Sadhasivam <[email protected]> S: Maintained F: configs/ficus-rk3399_defconfig +F: arch/arm/dts/rk3399-ficus*
Signature · 1 line
2.43.2
Re: [PATCH v2 01/12] board: rockchip: rk3399: Add device tree files to MAINTAINERS
Quoted 4 lines · Jonas Karlman
Update
MAINTAINERSfiles for RK3399 boards to include related device tree files. Also correct a few filenames.Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 203 lines
---
v2:
- Use glob pattern where appropriate--- board/firefly/roc-pc-rk3399/MAINTAINERS | 1 + board/pine64/pinebook-pro-rk3399/MAINTAINERS | 5 ++- board/pine64/pinephone-pro-rk3399/MAINTAINERS | 5 ++- board/pine64/rockpro64_rk3399/MAINTAINERS | 2 +- board/rockchip/evb_rk3399/MAINTAINERS | 35 ++++++++++--------- board/vamrs/rock960_rk3399/MAINTAINERS | 2 ++ 6 files changed, 27 insertions(+), 23 deletions(-)board/firefly/roc-pc-rk3399/MAINTAINERS +1
-0@@ -6,3 +6,4 @@ F: board/firefly/roc-pc-rk3399 F: include/configs/roc-pc-rk3399.h F: configs/roc-pc-rk3399_defconfig F: configs/roc-pc-mezzanine-rk3399_defconfig +F: arch/arm/dts/rk3399-roc-pc*board/pine64/pinebook-pro-rk3399/MAINTAINERS +2
-3@@ -2,7 +2,6 @@ PINEBOOK_PRO M: Peter Robinson <[email protected]> S: Maintained F: board/pine64/pinebook-pro-rk3399/ -F: include/configs/rk3399-pinebook-pro.h -F: arch/arm/dts/rk3399-pinebook-pro.dts -F: arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +F: include/configs/pinebook-pro-rk3399.h +F: arch/arm/dts/rk3399-pinebook-pro* F: configs/pinebook-pro-rk3399_defconfigboard/pine64/pinephone-pro-rk3399/MAINTAINERS +2
-3@@ -2,7 +2,6 @@ PINEPHONE_PRO M: Peter Robinson <[email protected]> S: Maintained F: board/pine64/pinephone-pro-rk3399/ -F: include/configs/rk3399-pinephone-pro.h -F: arch/arm/dts/rk3399-pinephone-pro.dts -F: arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi +F: include/configs/pinephone-pro-rk3399.h +F: arch/arm/dts/rk3399-pinephone-pro* F: configs/pinephone-pro-rk3399_defconfigboard/pine64/rockpro64_rk3399/MAINTAINERS +1
-1@@ -3,5 +3,5 @@ M: Jagan Teki <[email protected]> S: Maintained F: board/pine64/rockpro64_rk3399 F: include/configs/rockpro64_rk3399.h -F: arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +F: arch/arm/dts/rk3399-rockpro64* F: configs/rockpro64-rk3399_defconfigboard/rockchip/evb_rk3399/MAINTAINERS +19
-16@@ -4,48 +4,53 @@ S: Maintained F: board/rockchip/evb_rk3399 F: include/configs/evb_rk3399.h F: configs/evb-rk3399_defconfig +F: arch/arm/dts/rk3399-evb* F: configs/firefly-rk3399_defconfig +F: arch/arm/dts/rk3399-firefly* EAIDK-610 M: Andy Yan <[email protected]> S: Maintained F: configs/eaidk-610-rk3399_defconfig -F: arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi +F: arch/arm/dts/rk3399-eaidk-610* KHADAS-EDGE M: Nick Xie <[email protected]> S: Maintained F: configs/khadas-edge-rk3399_defconfig +F: arch/arm/dts/rk3399-khadas-edge.dts +F: arch/arm/dts/rk3399-khadas-edge.dtsi F: arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi KHADAS-EDGE-CAPTAIN M: Nick Xie <[email protected]> S: Maintained F: configs/khadas-edge-captain-rk3399_defconfig -F: arch/arm/dts/rk3399-khadas-edge-captain-u-boot.dtsi +F: arch/arm/dts/rk3399-khadas-edge-captain* KHADAS-EDGE-V M: Nick Xie <[email protected]> S: Maintained F: configs/khadas-edge-v-rk3399_defconfig -F: arch/arm/dts/rk3399-khadas-edge-v-u-boot.dtsi +F: arch/arm/dts/rk3399-khadas-edge-v* LEEZ-P710 M: Andy Yan <[email protected]> S: Maintained -F: arch/arm/dts/rk3399-leez-p710-u-boot.dtsi +F: arch/arm/dts/rk3399-leez-p710* F: configs/leez-rk3399_defconfig NANOPC-T4 M: Jagan Teki <[email protected]> S: Maintained F: configs/nanopc-t4-rk3399_defconfig -F: arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi +F: arch/arm/dts/rk3399-nanopc-t4* NANOPI-M4 M: Jagan Teki <[email protected]> S: Maintained F: configs/nanopi-m4-rk3399_defconfig +F: arch/arm/dts/rk3399-nanopi-m4.dts F: arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi NANOPI-M4-2GB@@ -53,55 +58,53 @@ M: Jagan Teki <[email protected]> M: Deepak Das <[email protected]> S: Maintained F: configs/nanopi-m4-2gb-rk3399_defconfig -F: arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi +F: arch/arm/dts/rk3399-nanopi-m4-2gb* NANOPI-M4B M: Alexandre Vicenzi <[email protected]> S: Maintained F: configs/nanopi-m4b-rk3399_defconfig -F: arch/arm/dts/rk3399-nanopi-m4b-u-boot.dtsi +F: arch/arm/dts/rk3399-nanopi-m4b* NANOPI-NEO4 M: Jagan Teki <[email protected]> S: Maintained F: configs/nanopi-neo4-rk3399_defconfig -F: arch/arm/dts/rk3399-nanopi-neo4-u-boot.dtsi +F: arch/arm/dts/rk3399-nanopi-neo4* NANOPI-R4S M: Xiaobo Tian <[email protected]> S: Maintained F: configs/nanopi-r4s-rk3399_defconfig -F: arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi +F: arch/arm/dts/rk3399-nanopi-r4s* ORANGEPI-RK3399 M: Jagan Teki <[email protected]> S: Maintained F: configs/orangepi-rk3399_defconfig -F: arch/arm/dts/rk3399-u-boot.dtsi -F: arch/arm/dts/rk3399-orangepi-u-boot.dtsi +F: arch/arm/dts/rk3399-orangepi* ROCK-4C+ M: FUKAUMI Naoki <[email protected]> S: Maintained F: configs/rock-4c-plus-rk3399_defconfig -F: arch/arm/dts/rk3399-rock-4c-plus.dts +F: arch/arm/dts/rk3399-rock-4c-plus* ROCK-4SE M: Christopher Obbard <[email protected]> S: Maintained F: configs/rock-4se-rk3399_defconfig -F: arch/arm/dts/rk3399-rock-4se-u-boot.dtsi +F: arch/arm/dts/rk3399-rock-4se* ROCK-PI-4 M: Jagan Teki <[email protected]> S: Maintained F: configs/rock-pi-4-rk3399_defconfig -F: arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi F: configs/rock-pi-4c-rk3399_defconfig -F: arch/arm/dts/rk3399-rock-pi-4c-u-boot.dtsi +F: arch/arm/dts/rk3399-rock-pi-4* ROCK-PI-N10 M: Jagan Teki <[email protected]> S: Maintained F: configs/rock-pi-n10-rk3399pro_defconfig -F: arch/arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi +F: arch/arm/dts/rk3399pro-rock-pi-n10*board/vamrs/rock960_rk3399/MAINTAINERS +2
-0@@ -4,8 +4,10 @@ S: Maintained F: board/vamrs/rock960_rk3399/ F: include/configs/rock960_rk3399.h F: configs/rock960-rk3399_defconfig +F: arch/arm/dts/rk3399-rock960* FICUS EE M: Manivannan Sadhasivam <[email protected]> S: Maintained F: configs/ficus-rk3399_defconfig +F: arch/arm/dts/rk3399-ficus*
PATCH v2 2/12 board: rockchip: rk3399: Add myself as reviewer to MAINTAINERS
In reply to Jonas KarlmanAdd myself as a reviewer for RK3399 boards that I have and can help with review and testing of defconfig and device tree changes.
---
v2:
- Collect r-b tag
--- board/pine64/pinebook-pro-rk3399/MAINTAINERS | 1 + board/pine64/rockpro64_rk3399/MAINTAINERS | 1 + board/rockchip/evb_rk3399/MAINTAINERS | 3 +++ 3 files changed, 5 insertions(+)
board/pine64/pinebook-pro-rk3399/MAINTAINERS +1 -0
@@ -1,5 +1,6 @@ PINEBOOK_PRO M: Peter Robinson <[email protected]> +R: Jonas Karlman <[email protected]> S: Maintained F: board/pine64/pinebook-pro-rk3399/ F: include/configs/pinebook-pro-rk3399.h
board/pine64/rockpro64_rk3399/MAINTAINERS +1 -0
@@ -1,5 +1,6 @@ ROCKPRO64 M: Jagan Teki <[email protected]> +R: Jonas Karlman <[email protected]> S: Maintained F: board/pine64/rockpro64_rk3399 F: include/configs/rockpro64_rk3399.h
board/rockchip/evb_rk3399/MAINTAINERS +3 -0
@@ -86,18 +86,21 @@ F: arch/arm/dts/rk3399-orangepi* ROCK-4C+ M: FUKAUMI Naoki <[email protected]> +R: Jonas Karlman <[email protected]> S: Maintained F: configs/rock-4c-plus-rk3399_defconfig F: arch/arm/dts/rk3399-rock-4c-plus* ROCK-4SE M: Christopher Obbard <[email protected]> +R: Jonas Karlman <[email protected]> S: Maintained F: configs/rock-4se-rk3399_defconfig F: arch/arm/dts/rk3399-rock-4se* ROCK-PI-4 M: Jagan Teki <[email protected]> +R: Jonas Karlman <[email protected]> S: Maintained F: configs/rock-pi-4-rk3399_defconfig F: configs/rock-pi-4c-rk3399_defconfig
Signature · 1 line
2.43.2
PATCH v2 3/12 board: rockchip: rk3399: Remove unused board_early_init_f functions
In reply to Jonas KarlmanThese functions is excluded from SPL build and BOARD_EARLY_INIT_F is not enabled for any of the affected boards, so this legacy code is not used.
Rockchip common board code already enable all regulators flagged as always-on or boot-on in device tree, and fixed/gpio regulators now have basic reference counting support so the original intent of this code is no longer valid.
Remove the unneeded and unused code that used to enable usb regulators.
---
v2:
- Collect r-b tag
--- board/firefly/roc-pc-rk3399/roc-pc-rk3399.c | 22 +------------------ .../pinebook-pro-rk3399/pinebook-pro-rk3399.c | 22 ------------------- .../pinephone-pro-rk3399.c | 22 ------------------- board/rockchip/evb_rk3399/evb-rk3399.c | 20 ----------------- 4 files changed, 1 insertion(+), 85 deletions(-)
board/firefly/roc-pc-rk3399/roc-pc-rk3399.c +1 -21
@@ -9,32 +9,12 @@#include <log.h> #include <spl_gpio.h> #include <asm/io.h> -#include <power/regulator.h> #include <asm/arch-rockchip/cru.h> #include <asm/arch-rockchip/gpio.h> #include <asm/arch-rockchip/grf_rk3399.h> -#ifndef CONFIG_SPL_BUILD -int board_early_init_f (void ) -{ -struct udevice *regulator; -int ret; - - ret =regulator_get_by_platname ("vcc5v0_host" , ®ulator); -if (ret) { -debug ("%s vcc5v0_host init fail! ret %d\n" , __func__, ret); - goto out; - } - - ret =regulator_set_enable (regulator, true); -if (ret) -debug ("%s vcc5v0-host-en set fail! ret %d\n" , __func__, ret); -out: -return 0 ; -} - -#else +#ifdef CONFIG_SPL_BUILD #define PMUGRF_BASE 0xff320000#define GPIO0_BASE 0xff720000
board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c +0 -22
@@ -11,32 +11,10 @@#include <asm/arch-rockchip/grf_rk3399.h> #include <asm/arch-rockchip/hardware.h> #include <linux/printk.h> -#include <power/regulator.h> #define GRF_IO_VSEL_BT565_SHIFT 0#define PMUGRF_CON0_VSEL_SHIFT 8 -#ifndef CONFIG_SPL_BUILD -int board_early_init_f (void ) -{ -struct udevice *regulator; -int ret; - - ret =regulator_get_by_platname ("vcc5v0_usb" , ®ulator); -if (ret) { -pr_debug ("%s vcc5v0_usb init fail! ret %d\n" , __func__, ret); - goto out; - } - - ret =regulator_set_enable (regulator, true); -if (ret) -pr_debug ("%s vcc5v0-host-en-gpio set fail! ret %d\n" , __func__, ret); - -out: -return 0 ; -} -#endif -#ifdef CONFIG_MISC_INIT_R static void setup_iodomain (void ) {
board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c +0 -22
@@ -11,33 +11,11 @@#include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/grf_rk3399.h> #include <asm/arch-rockchip/hardware.h> -#include <power/regulator.h> #define GRF_IO_VSEL_BT565_GPIO2AB 1#define GRF_IO_VSEL_AUDIO_GPIO3D4A 2#define PMUGRF_CON0_VSEL_SHIFT 8 -#ifndef CONFIG_SPL_BUILD -int board_early_init_f (void ) -{ -struct udevice *regulator; -int ret; - - ret =regulator_get_by_platname ("vcc5v0_usb" , ®ulator); -if (ret) { -pr_debug ("%s vcc5v0_usb init fail! ret %d\n" , __func__, ret); - goto out; - } - - ret =regulator_set_enable (regulator, true); -if (ret) -pr_debug ("%s vcc5v0-host-en-gpio set fail! ret %d\n" , __func__, ret); - -out: -return 0 ; -} -#endif -#ifdef CONFIG_MISC_INIT_R static void setup_iodomain (void ) {
board/rockchip/evb_rk3399/evb-rk3399.c +0 -20
@@ -10,7 +10,6 @@#include <log.h> #include <asm/arch-rockchip/periph.h> #include <linux/kernel.h> -#include <power/regulator.h> #define ROCKPI4_UPDATABLE_IMAGES 2
@@ -25,25 +24,6 @@ struct efi_capsule_update_info update_info = {#endif #ifndef CONFIG_SPL_BUILD -int board_early_init_f(void) -{ - struct udevice *regulator; - int ret; - - ret = regulator_get_by_platname("vcc5v0_host", ®ulator); - if (ret) { - debug("%s vcc5v0_host init fail! ret %d\n", __func__, ret); - goto out; - } - - ret = regulator_set_enable(regulator, true); - if (ret) - debug("%s vcc5v0-host-en set fail! ret %d\n", __func__, ret); - -out: - return 0; -} - #if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && defined(CONFIG_EFI_PARTITION) static bool board_is_rockpi_4b(void) {
Signature · 1 line
2.43.2
PATCH v2 4/12 board: rockchip: Add a common ROCK Pi 4 target
In reply to Jonas KarlmanMove ROCK Pi 4 specific board code from the shared evb_rk3399 target into its own board target and update related defconfigs to use the new TARGET_ROCKPI4_RK3399 option.
---
v2:
- Use glob pattern
- Collect r-b tags
---
arch/arm/mach-rockchip/rk3399/Kconfig | 6 ++++
board/radxa/rockpi4-rk3399/Kconfig | 15 +++++++++
board/radxa/rockpi4-rk3399/MAINTAINERS | 22 +++++++++++++
.../rockpi4-rk3399}/Makefile | 2 +-
.../rockpi4-rk3399/rockpi4-rk3399.c} | 13 ++------
board/rockchip/evb_rk3399/MAINTAINERS | 22 -------------
configs/rock-4c-plus-rk3399_defconfig | 2 +-
configs/rock-4se-rk3399_defconfig | 2 +-
configs/rock-pi-4-rk3399_defconfig | 2 +-
configs/rock-pi-4c-rk3399_defconfig | 2 +-
include/configs/rk3399_common.h | 16 ----------
include/configs/rockpi4-rk3399.h | 32 +++++++++++++++++++
12 files changed, 83 insertions(+), 53 deletions(-)
create mode 100644 board/radxa/rockpi4-rk3399/Kconfig
create mode 100644 board/radxa/rockpi4-rk3399/MAINTAINERS
rename board/{rockchip/evb_rk3399 => radxa/rockpi4-rk3399}/Makefile (79%)
rename board/{rockchip/evb_rk3399/evb-rk3399.c => radxa/rockpi4-rk3399/rockpi4-rk3399.c} (79%)
create mode 100644 include/configs/rockpi4-rk3399.harch/arm/mach-rockchip/rk3399/Kconfig +6 -0
@@ -89,6 +89,11 @@ config TARGET_ROCK960_RK3399 * 2x USB 3.0 type A, 2x USB 2.0 type A (host mode only), 1x USB 3.0 type C OTG +config TARGET_ROCKPI4_RK3399 + bool "Radxa ROCK Pi 4 board" + help + Support for ROCK Pi 4 board family by Radxa. + config TARGET_ROCKPRO64_RK3399 bool "Pine64 Rockpro64 board" help
@@ -177,6 +182,7 @@ source "board/google/gru/Kconfig" source "board/pine64/pinebook-pro-rk3399/Kconfig" source "board/pine64/pinephone-pro-rk3399/Kconfig" source "board/pine64/rockpro64_rk3399/Kconfig" +source "board/radxa/rockpi4-rk3399/Kconfig" source "board/rockchip/evb_rk3399/Kconfig" source "board/theobroma-systems/puma_rk3399/Kconfig" source "board/vamrs/rock960_rk3399/Kconfig"
board/radxa/rockpi4-rk3399/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +if TARGET_ROCKPI4_RK3399 + +config SYS_BOARD + default "rockpi4-rk3399" + +config SYS_VENDOR + default "radxa" + +config SYS_CONFIG_NAME + default "rockpi4-rk3399" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif
board/radxa/rockpi4-rk3399/MAINTAINERS new file +22 -0
@@ -0,0 +1,22 @@ +ROCK-PI-4 +M: Jagan Teki <[email protected]> +R: Jonas Karlman <[email protected]> +S: Maintained +F: board/radxa/rockpi4-rk3399/ +F: configs/rock-pi-4-rk3399_defconfig +F: configs/rock-pi-4c-rk3399_defconfig +F: arch/arm/dts/rk3399-rock-pi-4* + +ROCK-4C+ +M: FUKAUMI Naoki <[email protected]> +R: Jonas Karlman <[email protected]> +S: Maintained +F: configs/rock-4c-plus-rk3399_defconfig +F: arch/arm/dts/rk3399-rock-4c-plus* + +ROCK-4SE +M: Christopher Obbard <[email protected]> +R: Jonas Karlman <[email protected]> +S: Maintained +F: configs/rock-4se-rk3399_defconfig +F: arch/arm/dts/rk3399-rock-4se*
board/radxa/rockpi4-rk3399/Makefile renamed from board/rockchip/evb_rk3399/Makefile +1 -1
@@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += evb-rk3399.o +obj-y += rockpi4-rk3399.o
board/radxa/rockpi4-rk3399/rockpi4-rk3399.c renamed from board/rockchip/evb_rk3399/evb-rk3399.c +3 -10
@@ -3,13 +3,8 @@* (C) Copyright 2016 Rockchip Electronics Co., Ltd */ -#include <common.h> #include <dm.h> #include <efi_loader.h> -#include <init.h> -#include <log.h> -#include <asm/arch-rockchip/periph.h> -#include <linux/kernel.h> #define ROCKPI4_UPDATABLE_IMAGES 2
@@ -24,17 +19,15 @@ struct efi_capsule_update_info update_info = {#endif #ifndef CONFIG_SPL_BUILD -#if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) && defined(CONFIG_EFI_PARTITION ) +#if IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) &&IS_ENABLED (CONFIG_EFI_PARTITION )static bool board_is_rockpi_4b (void ) { -return CONFIG_IS_ENABLED (TARGET_EVB_RK3399 ) && -of_machine_is_compatible ("radxa,rockpi4b" ); +return of_machine_is_compatible ("radxa,rockpi4b" ); }static bool board_is_rockpi_4c (void ) { -return CONFIG_IS_ENABLED (TARGET_EVB_RK3399 ) && -of_machine_is_compatible ("radxa,rockpi4c" ); +return of_machine_is_compatible ("radxa,rockpi4c" ); }void rockchip_capsule_update_board_setup (void )
board/rockchip/evb_rk3399/MAINTAINERS +0 -22
@@ -84,28 +84,6 @@ S: Maintained F: configs/orangepi-rk3399_defconfig F: arch/arm/dts/rk3399-orangepi* -ROCK-4C+ -M: FUKAUMI Naoki <[email protected]> -R: Jonas Karlman <[email protected]> -S: Maintained -F: configs/rock-4c-plus-rk3399_defconfig -F: arch/arm/dts/rk3399-rock-4c-plus* - -ROCK-4SE -M: Christopher Obbard <[email protected]> -R: Jonas Karlman <[email protected]> -S: Maintained -F: configs/rock-4se-rk3399_defconfig -F: arch/arm/dts/rk3399-rock-4se* - -ROCK-PI-4 -M: Jagan Teki <[email protected]> -R: Jonas Karlman <[email protected]> -S: Maintained -F: configs/rock-pi-4-rk3399_defconfig -F: configs/rock-pi-4c-rk3399_defconfig -F: arch/arm/dts/rk3399-rock-pi-4* - ROCK-PI-N10 M: Jagan Teki <[email protected]> S: Maintained
configs/rock-4c-plus-rk3399_defconfig +1 -1
@@ -8,7 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-4c-plus" CONFIG_OF_LIBFDT_OVERLAY=y CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y -CONFIG_TARGET_EVB_RK3399=y +CONFIG_TARGET_ROCKPI4_RK3399=y CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SYS_LOAD_ADDR=0x800800
configs/rock-4se-rk3399_defconfig +1 -1
@@ -8,7 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-4se" CONFIG_OF_LIBFDT_OVERLAY=y CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y -CONFIG_TARGET_EVB_RK3399=y +CONFIG_TARGET_ROCKPI4_RK3399=y CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SYS_LOAD_ADDR=0x800800
configs/rock-pi-4-rk3399_defconfig +1 -1
@@ -8,7 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4a" CONFIG_OF_LIBFDT_OVERLAY=y CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y -CONFIG_TARGET_EVB_RK3399=y +CONFIG_TARGET_ROCKPI4_RK3399=y CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SYS_LOAD_ADDR=0x800800
configs/rock-pi-4c-rk3399_defconfig +1 -1
@@ -8,7 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4c" CONFIG_OF_LIBFDT_OVERLAY=y CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y -CONFIG_TARGET_EVB_RK3399=y +CONFIG_TARGET_ROCKPI4_RK3399=y CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SYS_LOAD_ADDR=0x800800
include/configs/rk3399_common.h +0 -16
@@ -13,22 +13,6 @@#define CFG_SYS_SDRAM_BASE 0#define SDRAM_MAX_SIZE 0xf8000000 -#define ROCKPI_4B_IDBLOADER_IMAGE_GUID \ - EFI_GUID(0x02f4d760, 0xcfd5, 0x43bd, 0x8e, 0x2d, \ - 0xa4, 0x2a, 0xcb, 0x33, 0xc6, 0x60) - -#define ROCKPI_4B_UBOOT_IMAGE_GUID \ - EFI_GUID(0x4ce292da, 0x1dd8, 0x428d, 0xa1, 0xc2, \ - 0x77, 0x74, 0x3e, 0xf8, 0xb9, 0x6e) - -#define ROCKPI_4C_IDBLOADER_IMAGE_GUID \ - EFI_GUID(0xfd68510c, 0x12d3, 0x4f0a, 0xb8, 0xd3, \ - 0xd8, 0x79, 0xe1, 0xd3, 0xa5, 0x40) - -#define ROCKPI_4C_UBOOT_IMAGE_GUID \ - EFI_GUID(0xb81fb4ae, 0xe4f3, 0x471b, 0x99, 0xb4, \ - 0x0b, 0x3d, 0xa5, 0x49, 0xce, 0x13) -#ifndef CONFIG_SPL_BUILD #define ENV_MEM_LAYOUT_SETTINGS \
include/configs/rockpi4-rk3399.h new file +32 -0
@@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* (C) Copyright 2016 Rockchip Electronics Co., Ltd +*/ + +#ifndef __ROCKPI4_RK3399_H +#define __ROCKPI4_RK3399_H + +#define ROCKPI_4B_IDBLOADER_IMAGE_GUID \ + EFI_GUID(0x02f4d760, 0xcfd5, 0x43bd, 0x8e, 0x2d, \ + 0xa4, 0x2a, 0xcb, 0x33, 0xc6, 0x60) + +#define ROCKPI_4B_UBOOT_IMAGE_GUID \ + EFI_GUID(0x4ce292da, 0x1dd8, 0x428d, 0xa1, 0xc2, \ + 0x77, 0x74, 0x3e, 0xf8, 0xb9, 0x6e) + +#define ROCKPI_4C_IDBLOADER_IMAGE_GUID \ + EFI_GUID(0xfd68510c, 0x12d3, 0x4f0a, 0xb8, 0xd3, \ + 0xd8, 0x79, 0xe1, 0xd3, 0xa5, 0x40) + +#define ROCKPI_4C_UBOOT_IMAGE_GUID \ + EFI_GUID(0xb81fb4ae, 0xe4f3, 0x471b, 0x99, 0xb4, \ + 0x0b, 0x3d, 0xa5, 0x49, 0xce, 0x13) + +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdin=serial,usbkbd\0" \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + +#include <configs/rk3399_common.h> + +#endif
Signature · 1 line
2.43.2
PATCH v2 5/12 rockchip: io-domain: Add support for RK3399
In reply to Jonas KarlmanPort the RK3399 part of the Rockchip IO-domain driver from linux.
This differs from linux version in that pmu io iodomain bit is enabled in the write ops instead of in an init ops as in linux, this way we can avoid keeping a full state of all supply that have been configured.
---
v2:
- Collect r-b tags
--- drivers/misc/rockchip-io-domain.c | 79 +++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 4 deletions(-)
drivers/misc/rockchip-io-domain.c +75 -4
@@ -5,7 +5,6 @@* Ported from linux drivers/soc/rockchip/io-domain.c */ -#include <common.h> #include <dm.h> #include <dm/device_compat.h> #include <regmap.h>
@@ -28,6 +27,10 @@#define MAX_VOLTAGE_1_8 1980000#define MAX_VOLTAGE_3_3 3600000 +#define RK3399_PMUGRF_CON0 0x180 +#define RK3399_PMUGRF_CON0_VSEL BIT(8) +#define RK3399_PMUGRF_VSEL_SUPPLY_NUM 9 +#define RK3568_PMU_GRF_IO_VSEL0 0x0140#define RK3568_PMU_GRF_IO_VSEL1 0x0144#define RK3568_PMU_GRF_IO_VSEL2 0x0148
@@ -35,10 +38,10 @@struct rockchip_iodomain_soc_data {int grf_offset;const char *supply_names[MAX_SUPPLIES ]; -int (*write)(struct regmap *grf,int idx,int uV); +int (*write)(struct regmap *grf,uint offset,int idx,int uV); }; -static int rk3568_iodomain_write (struct regmap *grf,int idx,int uV) +static int rk3568_iodomain_write (struct regmap *grf,uint offset,int idx,int uV) {u32 is_3v3 = uV >MAX_VOLTAGE_1_8 ;u32 val0, val1;
@@ -78,6 +81,64 @@ static int rk3568_iodomain_write(struct regmap *grf, int idx, int uV)return 0 ; } +static int rockchip_iodomain_write (struct regmap *grf,uint offset,int idx,int uV) +{ +u32 val; + +/* set value bit */ + val = (uV >MAX_VOLTAGE_1_8 ) ?0 :1 ; + val <<= idx; + +/* apply hiword-mask */ + val |= (BIT (idx) <<16 ); + +return regmap_write (grf, offset, val); +} + +static int rk3399_pmu_iodomain_write (struct regmap *grf,uint offset,int idx,int uV) +{ +int ret =rockchip_iodomain_write (grf, offset, idx, uV); + +if (!ret && idx ==RK3399_PMUGRF_VSEL_SUPPLY_NUM ) { +/* +* set pmu io iodomain to also use this framework +* instead of a special gpio. +*/ +u32 val =RK3399_PMUGRF_CON0_VSEL | (RK3399_PMUGRF_CON0_VSEL <<16 ); + ret =regmap_write (grf,RK3399_PMUGRF_CON0 , val); + } + +return ret; +} + +static const struct rockchip_iodomain_soc_data soc_data_rk3399 = { + .grf_offset =0xe640 , + .supply_names = { +"bt656-supply" ,/* APIO2_VDD */ +"audio-supply" ,/* APIO5_VDD */ +"sdmmc-supply" ,/* SDMMC0_VDD */ +"gpio1830-supply" ,/* APIO4_VDD */ + }, + .write = rockchip_iodomain_write, +}; + +static const struct rockchip_iodomain_soc_data soc_data_rk3399_pmu = { + .grf_offset =0x180 , + .supply_names = { +NULL , +NULL , +NULL , +NULL , +NULL , +NULL , +NULL , +NULL , +NULL , +"pmu1830-supply" ,/* PMUIO2_VDD */ + }, + .write = rk3399_pmu_iodomain_write, +}; +static const struct rockchip_iodomain_soc_data soc_data_rk3568_pmu = { .grf_offset =0x140 , .supply_names = {
@@ -95,6 +156,14 @@ static const struct rockchip_iodomain_soc_data soc_data_rk3568_pmu = { };static const struct udevice_id rockchip_iodomain_ids[] = { + { + .compatible ="rockchip,rk3399-io-voltage-domain" , + .data = (ulong)&soc_data_rk3399, + }, + { + .compatible ="rockchip,rk3399-pmu-io-voltage-domain" , + .data = (ulong)&soc_data_rk3399_pmu, + }, { .compatible ="rockchip,rk3568-pmu-io-voltage-domain" , .data = (ulong)&soc_data_rk3568_pmu,
@@ -152,7 +221,9 @@ static int rockchip_iodomain_probe(struct udevice *dev)continue ; } - soc_data->write (grf, i, uV); + ret = soc_data->write (grf, soc_data->grf_offset, i, uV); +if (ret) +dev_err (dev,"%s: Couldn't write to GRF\n" , supply_name); }return 0 ;
Signature · 1 line
2.43.2
PATCH v2 6/12 rockchip: pine64: rockpro64: Migrate to use IO-domain driver
In reply to Jonas KarlmanSwitch to use the IO-domain driver to configure IO-domain based on device tree instead of a setup_iodomain() function.
---
v2:
- Collect r-b tag
--- board/pine64/rockpro64_rk3399/Makefile | 7 ---- .../rockpro64_rk3399/rockpro64-rk3399.c | 39 ------------------- configs/rockpro64-rk3399_defconfig | 1 + 3 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 board/pine64/rockpro64_rk3399/Makefile delete mode 100644 board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
board/pine64/rockpro64_rk3399/Makefile deleted +0 -7
@@ -1,7 +0,0 @@ -# -# (C) Copyright 2019 Vasily Khoruzhick -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y += rockpro64-rk3399.o
board/pine64/rockpro64_rk3399/rockpro64-rk3399.c deleted +0 -39
@@ -1,39 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* -* (C) Copyright 2019 Vasily Khoruzhick <[email protected]> -*/ - -#include <common.h> -#include <dm.h> -#include <init.h> -#include <syscon.h> -#include <asm/arch-rockchip/clock.h> -#include <asm/arch-rockchip/grf_rk3399.h> -#include <asm/arch-rockchip/hardware.h> - -#define GRF_IO_VSEL_BT565_SHIFT 0 -#define PMUGRF_CON0_VSEL_SHIFT 8 - -#ifdef CONFIG_MISC_INIT_R -static void setup_iodomain (void ) -{ -struct rk3399_grf_regs *grf = -syscon_get_first_range (ROCKCHIP_SYSCON_GRF ); -struct rk3399_pmugrf_regs *pmugrf = -syscon_get_first_range (ROCKCHIP_SYSCON_PMUGRF ); - -/* BT565 is in 1.8v domain */ -rk_setreg (&grf->io_vsel,1 <<GRF_IO_VSEL_BT565_SHIFT ); - -/* Set GPIO1 1.8v/3.0v source select to PMU1830_VOL */ -rk_setreg (&pmugrf->soc_con0,1 <<PMUGRF_CON0_VSEL_SHIFT ); -} - -int rockchip_early_misc_init_r (void ) -{ -setup_iodomain (); - -return 0 ; -} - -#endif
configs/rockpro64-rk3399_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_LED=y CONFIG_LED_GPIO=y +CONFIG_ROCKCHIP_IODOMAIN=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y
Signature · 1 line
2.43.2
PATCH v2 7/12 rockchip: pine64: pinebook-pro: Migrate to use IO-domain driver
In reply to Jonas KarlmanSwitch to use the IO-domain driver to configure IO-domain based on device tree instead of a setup_iodomain() function.
---
v2:
- Collect r-b tag
--- board/pine64/pinebook-pro-rk3399/Makefile | 1 - .../pinebook-pro-rk3399/pinebook-pro-rk3399.c | 39 ------------------- configs/pinebook-pro-rk3399_defconfig | 1 + 3 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 board/pine64/pinebook-pro-rk3399/Makefile delete mode 100644 board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c
board/pine64/pinebook-pro-rk3399/Makefile deleted +0 -1
@@ -1 +0,0 @@ -obj-y += pinebook-pro-rk3399.o
board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c deleted +0 -39
@@ -1,39 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* -* (C) Copyright 2016 Rockchip Electronics Co., Ltd -* (C) Copyright 2020 Peter Robinson <pbrobinson at gmail.com> -*/ - -#include <common.h> -#include <dm.h> -#include <syscon.h> -#include <asm/arch-rockchip/clock.h> -#include <asm/arch-rockchip/grf_rk3399.h> -#include <asm/arch-rockchip/hardware.h> -#include <linux/printk.h> - -#define GRF_IO_VSEL_BT565_SHIFT 0 -#define PMUGRF_CON0_VSEL_SHIFT 8 - -#ifdef CONFIG_MISC_INIT_R -static void setup_iodomain (void ) -{ -struct rk3399_grf_regs *grf = -syscon_get_first_range (ROCKCHIP_SYSCON_GRF ); -struct rk3399_pmugrf_regs *pmugrf = -syscon_get_first_range (ROCKCHIP_SYSCON_PMUGRF ); - -/* BT565 is in 1.8v domain */ -rk_setreg (&grf->io_vsel,1 <<GRF_IO_VSEL_BT565_SHIFT ); - -/* Set GPIO1 1.8v/3.0v source select to PMU1830_VOL */ -rk_setreg (&pmugrf->soc_con0,1 <<PMUGRF_CON0_VSEL_SHIFT ); -} - -int rockchip_early_misc_init_r (void ) -{ -setup_iodomain (); - -return 0 ; -} -#endif
configs/pinebook-pro-rk3399_defconfig +1 -0
@@ -49,6 +49,7 @@ CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_LED=y CONFIG_LED_GPIO=y +CONFIG_ROCKCHIP_IODOMAIN=y CONFIG_MMC_IO_VOLTAGE=y CONFIG_SPL_MMC_IO_VOLTAGE=y CONFIG_MMC_UHS_SUPPORT=y
Signature · 1 line
2.43.2
PATCH v2 8/12 rockchip: pine64: pinephone-pro: Migrate to use IO-domain driver
In reply to Jonas KarlmanSwitch to use the IO-domain driver to configure IO-domain based on device tree instead of a setup_iodomain() function.
---
v2:
- Collect r-b tag
--- board/pine64/pinephone-pro-rk3399/Makefile | 1 - .../pinephone-pro-rk3399.c | 42 ------------------- configs/pinephone-pro-rk3399_defconfig | 1 + 3 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 board/pine64/pinephone-pro-rk3399/Makefile delete mode 100644 board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c
board/pine64/pinephone-pro-rk3399/Makefile deleted +0 -1
@@ -1 +0,0 @@ -obj-y += pinephone-pro-rk3399.o
board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c deleted +0 -42
42 lines not on this page · raw message
configs/pinephone-pro-rk3399_defconfig +1 -0
@@ -48,6 +48,7 @@ CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_LED=y CONFIG_LED_GPIO=y +CONFIG_ROCKCHIP_IODOMAIN=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y
Signature · 1 line
2.43.2
PATCH v2 9/12 rockchip: vamrs: rock960: Migrate to use IO-domain driver
In reply to Jonas KarlmanSwitch to use the IO-domain driver to configure IO-domain based on device tree instead of a setup_iodomain() function.
---
v2:
- Collect r-b tag
--- board/vamrs/rock960_rk3399/Makefile | 6 ----- board/vamrs/rock960_rk3399/rock960-rk3399.c | 27 --------------------- configs/ficus-rk3399_defconfig | 1 + configs/rock960-rk3399_defconfig | 1 + 4 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 board/vamrs/rock960_rk3399/Makefile delete mode 100644 board/vamrs/rock960_rk3399/rock960-rk3399.c
board/vamrs/rock960_rk3399/Makefile deleted +0 -6
@@ -1,6 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2018 Manivannan Sadhasivam <[email protected]> -# - -obj-y += rock960-rk3399.o
board/vamrs/rock960_rk3399/rock960-rk3399.c deleted +0 -27
@@ -1,27 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* -* Copyright (C) 2018 Manivannan Sadhasivam <[email protected]> -*/ - -#include <common.h> -#include <syscon.h> -#include <asm/arch-rockchip/clock.h> -#include <asm/arch-rockchip/grf_rk3399.h> -#include <asm/arch-rockchip/hardware.h> -#include <linux/bitops.h> - -#ifdef CONFIG_MISC_INIT_R -int misc_init_r (void ) -{ -struct rk3399_grf_regs *grf = -syscon_get_first_range (ROCKCHIP_SYSCON_GRF ); - -/** -* Some SSD's to work on rock960 would require explicit -* domain voltage change, so BT565 is in 1.8v domain -*/ -rk_setreg (&grf->io_vsel,BIT (0 )); - -return 0 ; -} -#endif
configs/ficus-rk3399_defconfig +1 -0
@@ -42,6 +42,7 @@ CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_NET_RANDOM_ETHADDR=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_ROCKCHIP_IODOMAIN=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y
configs/rock960-rk3399_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_ROCKCHIP_IODOMAIN=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y
Signature · 1 line
2.43.2
PATCH v2 10/12 rockchip: theobroma-systems: puma: Migrate to use IO-domain driver
In reply to Jonas KarlmanSwitch to use the IO-domain driver to configure IO-domain based on device tree instead of a setup_iodomain() function.
---
v2:
- Collect r-b tag
--- .../puma_rk3399/puma-rk3399.c | 21 ------------------- configs/puma-rk3399_defconfig | 1 + 2 files changed, 1 insertion(+), 21 deletions(-)
board/theobroma-systems/puma_rk3399/puma-rk3399.c +0 -21
@@ -3,31 +3,10 @@* (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH */ -#include <dm.h> -#include <syscon.h> -#include <dm/pinctrl.h> -#include <asm/arch-rockchip/clock.h> -#include <asm/arch-rockchip/hardware.h> -#include <asm/arch-rockchip/grf_rk3399.h> #include "../common/common.h" -static void setup_iodomain (void ) -{ -const u32 GRF_IO_VSEL_GPIO4CD_SHIFT =3 ; -struct rk3399_grf_regs *grf = -syscon_get_first_range (ROCKCHIP_SYSCON_GRF ); - -/* -* Set bit 3 in GRF_IO_VSEL so PCIE_RST# works (pin GPIO4_C6). -* Linux assumes that PCIE_RST# works out of the box as it probes -* PCIe before loading the iodomain driver. -*/ -rk_setreg (&grf->io_vsel,1 <<GRF_IO_VSEL_GPIO4CD_SHIFT ); -} -int rockchip_early_misc_init_r (void ) { -setup_iodomain ();setup_boottargets ();return 0 ;
configs/puma-rk3399_defconfig +1 -0
@@ -66,6 +66,7 @@ CONFIG_GPIO_HOG=y CONFIG_SPL_GPIO_HOG=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_ROCKCHIP_IODOMAIN=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y
Signature · 1 line
2.43.2
PATCH v2 11/12 rockchip: google: gru: Migrate to use IO-domain driver
In reply to Jonas KarlmanSwitch to use the IO-domain driver to configure IO-domain based on device tree instead of a setup_iodomain() function.
---
v2:
- Collect r-b tag
--- board/google/gru/gru.c | 35 ------------------------------ configs/chromebook_bob_defconfig | 1 + configs/chromebook_kevin_defconfig | 1 + 3 files changed, 2 insertions(+), 35 deletions(-)
board/google/gru/gru.c +0 -35
@@ -3,18 +3,9 @@* Copyright 2018 Google */ -#include <common.h> #include <dm.h> #include <init.h> -#include <syscon.h> #include <asm/arch-rockchip/clock.h> -#include <asm/arch-rockchip/grf_rk3399.h> -#include <asm/arch-rockchip/hardware.h> - -#define GRF_IO_VSEL_BT656_SHIFT 0 -#define GRF_IO_VSEL_AUDIO_SHIFT 1 -#define PMUGRF_CON0_VSEL_SHIFT 8 -#define PMUGRF_CON0_VOL_SHIFT 9#ifdef CONFIG_SPL_BUILD /* provided to defeat compiler optimisation in board_init_f() */
@@ -63,29 +54,3 @@ int board_early_init_r(void) return 0; }#endif - -static void setup_iodomain (void ) -{ -struct rk3399_grf_regs *grf = -syscon_get_first_range (ROCKCHIP_SYSCON_GRF ); -struct rk3399_pmugrf_regs *pmugrf = -syscon_get_first_range (ROCKCHIP_SYSCON_PMUGRF ); - -/* BT656 and audio is in 1.8v domain */ -rk_setreg (&grf->io_vsel, (1 <<GRF_IO_VSEL_BT656_SHIFT | -1 <<GRF_IO_VSEL_AUDIO_SHIFT )); - -/* -* Set GPIO1 1.8v/3.0v source select to PMU1830_VOL -* and explicitly configure that PMU1830_VOL to be 1.8V -*/ -rk_setreg (&pmugrf->soc_con0, (1 <<PMUGRF_CON0_VSEL_SHIFT | -1 <<PMUGRF_CON0_VOL_SHIFT )); -} - -int rockchip_early_misc_init_r (void ) -{ -setup_iodomain (); - -return 0 ; -}
configs/chromebook_bob_defconfig +1 -0
@@ -66,6 +66,7 @@ CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_I2C_MUX=y CONFIG_CROS_EC_KEYB=y +CONFIG_ROCKCHIP_IODOMAIN=y CONFIG_CROS_EC=y CONFIG_CROS_EC_SPI=y CONFIG_PWRSEQ=y
configs/chromebook_kevin_defconfig +1 -0
@@ -67,6 +67,7 @@ CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_I2C_MUX=y CONFIG_CROS_EC_KEYB=y +CONFIG_ROCKCHIP_IODOMAIN=y CONFIG_CROS_EC=y CONFIG_CROS_EC_SPI=y CONFIG_PWRSEQ=y
Signature · 1 line
2.43.2
PATCH v2 12/12 rockchip: board: Move gpt_capsule_update_setup() call
In reply to Jonas KarlmanMove the call to gpt_capsule_update_setup() from the weak function rk_board_late_init() into the main board_late_init() function.
Also change to use IS_ENABLED() instead for defined().
---
v2:
- New patch, split from "board: rockchip: Add a common ROCK Pi 4 target"
--- arch/arm/mach-rockchip/board.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-rockchip/board.c +5 -5
@@ -34,7 +34,7 @@#include <asm/arch-rockchip/periph.h> #include <power/regulator.h> -#if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) && defined(CONFIG_EFI_PARTITION ) +#if IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) &&IS_ENABLED (CONFIG_EFI_PARTITION )#define DFU_ALT_BUF_LEN SZ_1K
@@ -185,10 +185,6 @@ static void gpt_capsule_update_setup(void)__weak int rk_board_late_init (void ) { -#if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) && defined(CONFIG_EFI_PARTITION ) -gpt_capsule_update_setup (); -#endif -return 0 ; }
@@ -196,6 +192,10 @@ int board_late_init(void) {setup_boot_mode (); +#if IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) &&IS_ENABLED (CONFIG_EFI_PARTITION ) +gpt_capsule_update_setup (); +#endif +return rk_board_late_init (); }
Signature · 1 line
2.43.2
Re: [PATCH v2 12/12] rockchip: board: Move gpt_capsule_update_setup() call
Quoted 6 lines · Jonas Karlman
Move the call to
gpt_capsule_update_setup()from the weak functionrk_board_late_init()into the mainboard_late_init()function.Also change to use
IS_ENABLED()instead fordefined().Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 42 lines
---
v2:
- New patch, split from "board: rockchip: Add a common ROCK Pi 4 target"--- arch/arm/mach-rockchip/board.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)arch/arm/mach-rockchip/board.c +5
-5@@ -34,7 +34,7 @@#include <asm/arch-rockchip/periph.h> #include <power/regulator.h> -#if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) && defined(CONFIG_EFI_PARTITION ) +#if IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) &&IS_ENABLED (CONFIG_EFI_PARTITION )#define DFU_ALT_BUF_LEN SZ_1K@@ -185,10 +185,6 @@ static void gpt_capsule_update_setup(void)__weak int rk_board_late_init (void ) { -#if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) && defined(CONFIG_EFI_PARTITION ) -gpt_capsule_update_setup (); -#endif -return 0 ; }@@ -196,6 +192,10 @@ int board_late_init(void) {setup_boot_mode (); +#if IS_ENABLED (CONFIG_EFI_HAVE_CAPSULE_SUPPORT ) &&IS_ENABLED (CONFIG_EFI_PARTITION ) +gpt_capsule_update_setup (); +#endif +return rk_board_late_init (); }