rockchip: dts: rk3399: Sync rk3399-opp from Linux
Subsystems (2)
PATCH 1/4 rockchip: dts: rk3399: Sync rk3399-opp from Linux
Sync rk3399-opp.dtsi from Linux.
Linux commit details about the rk3399-opp.dtsi sync:
"arm64: dts: rockchip: use SPDX-License-Identifier" (sha1: 4ee99cebd486238ac433da823b95cc5f8d8a6905)
--- arch/arm/dts/rk3399-opp.dtsi | 133 +++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 arch/arm/dts/rk3399-opp.dtsi
arch/arm/dts/rk3399-opp.dtsi new file +133 -0
@@ -0,0 +1,133 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2016-2017 Fuzhou Rockchip Electronics Co., Ltd + */ + +/ { + cluster0_opp: opp-table0 { + compatible = "operating-points-v2"; + opp-shared; + + opp00 { + opp-hz = /bits/ 64 <408000000>; + opp-microvolt = <800000>; + clock-latency-ns = <40000>; + }; + opp01 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <800000>; + }; + opp02 { + opp-hz = /bits/ 64 <816000000>; + opp-microvolt = <850000>; + }; + opp03 { + opp-hz = /bits/ 64 <1008000000>; + opp-microvolt = <925000>; + }; + opp04 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <1000000>; + }; + opp05 { + opp-hz = /bits/ 64 <1416000000>; + opp-microvolt = <1125000>; + }; + }; + + cluster1_opp: opp-table1 { + compatible = "operating-points-v2"; + opp-shared; + + opp00 { + opp-hz = /bits/ 64 <408000000>; + opp-microvolt = <800000>; + clock-latency-ns = <40000>; + }; + opp01 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <800000>; + }; + opp02 { + opp-hz = /bits/ 64 <816000000>; + opp-microvolt = <825000>; + }; + opp03 { + opp-hz = /bits/ 64 <1008000000>; + opp-microvolt = <875000>; + }; + opp04 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <950000>; + }; + opp05 { + opp-hz = /bits/ 64 <1416000000>; + opp-microvolt = <1025000>; + }; + opp06 { + opp-hz = /bits/ 64 <1608000000>; + opp-microvolt = <1100000>; + }; + opp07 { + opp-hz = /bits/ 64 <1800000000>; + opp-microvolt = <1200000>; + }; + }; + + gpu_opp_table: opp-table2 { + compatible = "operating-points-v2"; + + opp00 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <800000>; + }; + opp01 { + opp-hz = /bits/ 64 <297000000>; + opp-microvolt = <800000>; + }; + opp02 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <825000>; + }; + opp03 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <875000>; + }; + opp04 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <925000>; + }; + opp05 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <1100000>; + }; + }; +}; + +&cpu_l0 { + operating-points-v2 = <&cluster0_opp>; +}; + +&cpu_l1 { + operating-points-v2 = <&cluster0_opp>; +}; + +&cpu_l2 { + operating-points-v2 = <&cluster0_opp>; +}; + +&cpu_l3 { + operating-points-v2 = <&cluster0_opp>; +}; + +&cpu_b0 { + operating-points-v2 = <&cluster1_opp>; +}; + +&cpu_b1 { + operating-points-v2 = <&cluster1_opp>; +}; + +&gpu { + operating-points-v2 = <&gpu_opp_table>; +};
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 2/4 rockchip: dts: rk3399: Create initial rk3399-u-boot.dtsi
u-boot,dm-pre-reloc is required for SDMMC booted rk3399 boards and which is U-Boot specific devicetrees binding.
Move it on global rk3399-u-boot.dtsi file and rest of the U-Boot bindings will move it future based on the requirement.
This would help to sync the devicetrees from Linux whenever required instead of adding specific nodes.
--- arch/arm/dts/rk3399-evb.dts | 1 - arch/arm/dts/rk3399-firefly.dts | 1 - arch/arm/dts/rk3399-puma.dtsi | 1 - arch/arm/dts/rk3399-u-boot.dtsi | 8 ++++++++ 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 arch/arm/dts/rk3399-u-boot.dtsi
arch/arm/dts/rk3399-evb.dts +0 -1
@@ -155,7 +155,6 @@ }; &sdmmc { - u-boot,dm-pre-reloc; bus-width = <4>; status = "okay"; };
arch/arm/dts/rk3399-firefly.dts +0 -1
@@ -592,7 +592,6 @@ }; &sdmmc { - u-boot,dm-pre-reloc; bus-width = <4>; status = "okay"; };
arch/arm/dts/rk3399-puma.dtsi +0 -1
@@ -492,7 +492,6 @@ }; &sdmmc { - u-boot,dm-pre-reloc; clock-frequency = <150000000>; max-frequency = <40000000>; supports-sd;
arch/arm/dts/rk3399-u-boot.dtsi new file +8 -0
@@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Jagan Teki <[email protected]> + */ + +&sdmmc { + u-boot,dm-pre-reloc; +};
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 3/4 rockchip: rk3399: Add Orangepi RK3399 support
In reply to Jagan TekiAdd initial support for Orangepi RK3399 board.
Specification
- Rockchip RK3399
- 2GB/4GB DDR3
- 16GB eMMC
- SD card slot
- RTL8211E 1Gbps
- AP6356S WiFI/BT
- HDMI In/Out, DP, MIPI DSI/CSI
- Mini PCIe
- Sensors, Keys etc
- DC12V-2A and DC5V-2A
Commit details about Linux DTS sync:
"arm64: dts: rockchip: Add support for the Orange Pi RK3399" (sha1: d3e71487a790979057c0fdbf32f85033639c16e6)
--- arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-orangepi-u-boot.dtsi | 7 + arch/arm/dts/rk3399-orangepi.dts | 771 +++++++++++++++++++++++ board/rockchip/evb_rk3399/MAINTAINERS | 7 + configs/orangepi-rk3399_defconfig | 75 +++ 5 files changed, 861 insertions(+) create mode 100644 arch/arm/dts/rk3399-orangepi-u-boot.dtsi create mode 100644 arch/arm/dts/rk3399-orangepi.dts create mode 100644 configs/orangepi-rk3399_defconfig
arch/arm/dts/Makefile +1 -0
@@ -50,6 +50,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3368-px5-evb.dtb \ rk3399-evb.dtb \ rk3399-firefly.dtb \ + rk3399-orangepi.dtb \ rk3399-puma-ddr1333.dtb \ rk3399-puma-ddr1600.dtb \ rk3399-puma-ddr1866.dtb \
arch/arm/dts/rk3399-orangepi-u-boot.dtsi new file +7 -0
@@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Jagan Teki <[email protected]> + */ + +#include "rk3399-u-boot.dtsi" +#include "rk3399-sdram-ddr3-1333.dtsi"
arch/arm/dts/rk3399-orangepi.dts new file +771 -0
771 lines not on this page · raw message
board/rockchip/evb_rk3399/MAINTAINERS +7 -0
@@ -5,3 +5,10 @@ F: board/rockchip/evb_rk3399 F: include/configs/evb_rk3399.h F: configs/evb-rk3399_defconfig F: configs/firefly-rk3399_defconfig + +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
configs/orangepi-rk3399_defconfig new file +75 -0
75 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 4/4 doc: rockchip: Add global doc for rk3399 build/run
In reply to Jagan TekiSince rockchip have an individual doc/README.rockchip, it would be better to update the same instead of maintaining it separately in board files.
So, add the documentation for rk3399
- procedure to build
- procedure to boot from SD
--- doc/README.rockchip | 69 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+)
doc/README.rockchip +69 -0
@@ -88,8 +88,36 @@ One RV3188 baord is supported: For example: +1. To build RK3288 board: + CROSS_COMPILE=arm-linux-gnueabi- make O=firefly firefly-rk3288_defconfig all +2. To build RK3399 board: + + (export cross compiler path for aarch64) + + 2.1 Compile ATF + + $ git clone https://github.com/ARM-software/arm-trusted-firmware.git + $ cd arm-trusted-firmware + + (export cross compiler path for Cortex-M0 MCU likely arm-none-eabi-) + $ make realclean + $ make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 + + (copy bl31.elf U-Boot root dir) + $ cp build/rk3399/release/bl31/bl31.elf /path/to/u-boot + + 2.2 Compile U-Boot + + $ cd /path/to/u-boot + $ make orangepi-rk3399_defconfig + $ make + $ make u-boot.itb + + (Get spl/u-boot-spl-dtb.bin, u-boot.itb images and some boards would get + spl/u-boot-spl.bin since it doesn't enable CONFIG_SPL_OF_CONTROL) + (or you can use another cross compiler if you prefer)
@@ -225,6 +253,45 @@ tools/mkimage -n rk3188 -T rksd -d spl/u-boot-spl.bin out truncate -s %2048 u-boot.bin cat u-boot.bin | split -b 512 --filter='openssl rc4 -K 7C4E0304550509072D2C7B38170D1711' >> out +Booting from an SD card on RK3399 +================================= + +To write an image that boots from an SD card (assumed to be /dev/sdc): + +1. Prefix rk3399 header to SPL image + + $ cd /path/to/u-boot + $ ./tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl-dtb.bin out + +2. Write prefixed SPL at 64th sector + + $ sudo dd if=out of=/dev/sdc seek=64 + +3. Write U-Boot proper at 16384 sector + + $ sudo dd if=u-boot.itb of=/dev/sdc seek=16384 + $ sync + +Put this SD (or micro-SD) card into your board and reset it. You should see +something like: + +U-Boot SPL board init +Trying to boot from MMC1 + + +U-Boot 2019.01-00004-g14db5ee998 (Mar 11 2019 - 13:18:41 +0530) + +Model: Orange Pi RK3399 Board +DRAM: 2 GiB +MMC: dwmmc at fe310000: 2, dwmmc at fe320000: 1, sdhci at fe330000: 0 +Loading Environment from MMC... OK +In: serial at ff1a0000 +Out: serial at ff1a0000 +Err: serial at ff1a0000 +Model: Orange Pi RK3399 Board +Net: eth0: ethernet at fe300000 +Hit any key to stop autoboot: 0 +=> Using fastboot on rk3288 ========================
@@ -385,5 +452,7 @@ There are some documents about partitions in the links below. http://rockchip.wikidot.com/partitions -- +Jagan Teki <[email protected]> +11 Mar 2019 Simon Glass <[email protected]> 24 June 2015
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 1/4 rockchip: dts: rk3399: Sync rk3399-opp from Linux
In reply to Jagan TekiQuoted 6 lines
Sync
rk3399-opp.dtsifrom Linux.Linux commit details about the
rk3399-opp.dtsisync:
"arm64: dts: rockchip: use SPDX-License-Identifier" (sha1:4ee99cebd486238ac433da823b95cc5f8d8a6905)
Quoted 6 lines
Signed-off-by Jagan Teki <[email protected]>--- arch/arm/dts/rk3399-opp.dtsi | 133 +++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 arch/arm/dts/rk3399-opp.dtsi
PATCH 2/4 rockchip: dts: rk3399: Create initial rk3399-u-boot.dtsi
In reply to Jagan TekiQuoted 9 lines
u-boot,dm-pre-reloc is required for SDMMC booted rk3399 boards and which is U-Boot specific devicetrees binding.
Move it on global
rk3399-u-boot.dtsifile and rest of the U-Boot bindings will move it future based on the requirement.This would help to sync the devicetrees from Linux whenever required instead of adding specific nodes.
Quoted 9 lines
Signed-off-by Jagan Teki <[email protected]>--- arch/arm/dts/rk3399-evb.dts | 1 - arch/arm/dts/rk3399-firefly.dts | 1 - arch/arm/dts/rk3399-puma.dtsi | 1 - arch/arm/dts/rk3399-u-boot.dtsi | 8 ++++++++ 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 arch/arm/dts/rk3399-u-boot.dtsi
PATCH 3/4 rockchip: rk3399: Add Orangepi RK3399 support
In reply to Jagan TekiQuoted 19 lines
Add initial support for Orangepi RK3399 board.
Specification
- Rockchip RK3399
- 2GB/4GB DDR3
- 16GB eMMC
- SD card slot
- RTL8211E 1Gbps
- AP6356S WiFI/BT
- HDMI In/Out, DP, MIPI DSI/CSI
- Mini PCIe
- Sensors, Keys etc
- DC12V-2A and DC5V-2ACommit details about Linux DTS sync:
"arm64: dts: rockchip: Add support for the Orange Pi RK3399" (sha1:d3e71487a790979057c0fdbf32f85033639c16e6)Signed-off-by Jagan Teki <[email protected]>
Quoted 11 lines
--- arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-orangepi-u-boot.dtsi | 7 + arch/arm/dts/rk3399-orangepi.dts | 771 +++++++++++++++++++++++ board/rockchip/evb_rk3399/MAINTAINERS | 7 + configs/orangepi-rk3399_defconfig | 75 +++ 5 files changed, 861 insertions(+) create mode 100644 arch/arm/dts/rk3399-orangepi-u-boot.dtsi create mode 100644 arch/arm/dts/rk3399-orangepi.dts create mode 100644 configs/orangepi-rk3399_defconfig
PATCH 4/4 doc: rockchip: Add global doc for rk3399 build/run
In reply to Jagan TekiQuoted 4 lines
Since rockchip have an individual doc/README.rockchip, it would be better to update the same instead of maintaining it separately in board files.
Quoted 9 lines
So, add the documentation for rk3399
- procedure to build
- procedure to boot from SDSigned-off-by Jagan Teki <[email protected]>--- doc/README.rockchip | 69 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+)
PATCH 2/4 rockchip: dts: rk3399: Create initial rk3399-u-boot.dtsi
In reply to Philipp TomsichHi Philipp,
Quoted 20 lines · Philipp Tomsich
Quoted 10 lines
u-boot,dm-pre-reloc is required for SDMMC booted rk3399 boards and which is U-Boot specific devicetrees binding.
Move it on global
rk3399-u-boot.dtsifile and rest of the U-Boot bindings will move it future based on the requirement.This would help to sync the devicetrees from Linux whenever required instead of adding specific nodes.
Quoted 9 lines
Signed-off-by Jagan Teki <[email protected]>--- arch/arm/dts/rk3399-evb.dts | 1 - arch/arm/dts/rk3399-firefly.dts | 1 - arch/arm/dts/rk3399-puma.dtsi | 1 - arch/arm/dts/rk3399-u-boot.dtsi | 8 ++++++++ 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 arch/arm/dts/rk3399-u-boot.dtsi
Quoted 1 line
Reviewed-by Philipp Tomsich <[email protected]>
I have v2 version for these changes, [1] please have a look, thanks!
PATCH 3/4 rockchip: rk3399: Add Orangepi RK3399 support
In reply to a message not in the archiveHi Steven,
Quoted 6 lines · zhaoyifan
Hi friend,
Could you please advice the the problem with RK3399 in detail?
Sorry, couldn't get which issue are you talking about?
Mainline u-boot work well on OrangePI, if you want to look refer the doc patch[1] or wiki[2] for more information.
[1] https://patchwork.ozlabs.org/patch/1086231/
[2] https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/orangepi.html