Add basic Rockchip rk3128 DT support.
Features:
Quad-core ARM Cortex-A7MP Core processor
Clock & reset unit
Power management unit
Interrupt controller
DMAC
6x 64 bits Timers
4x PWMs
1x 32 bits watchdog
Internal memory:
Internal BootRom
Internal SRAM 8KB
External memory:
Dynamic Memory Interface (DDR3/DDR3L/LPDDR2)
Nand Flash Interface
eMMC Interface
SD/MMC Interface
Connectivity:
SDIO interface
SPI Controller
3x UART controller
4x I2C controllers
4x groups of GPIO (GPIO0~GPIO3), 32 GPIOs per group
USB Host2.0
USB OTG2.0
===
The Linux kernel has added a rk3128 clock driver in the past,
but the DT is still missing.
In U-boot the rk3128 DT doesn't conform the latest bindings
and also the pin definition don't match the TRM.
On request from the U-boot maintainers I submit a basic rk3128 DT.
https://lore.kernel.org/u-boot/[email protected]/
Based on:
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/rk3128.dtsi
https://github.com/rockchip-linux/kernel/blob/develop-4.4/arch/arm/boot/dts/rk312x.dtsi
rk3128 TRM:
https://rockchip.fr/RK312X%20TRM/
rk3128 datasheet:
https://rockchip.fr/RK3128%20datasheet%20V1.2.pdf
===
NOT TESTED WITH HARDWARE
NO THERMAL PROTECTION
===
Request:
Help with testing on hardware.
===
Changed V2:
rk3128.dtsi:
remove aliases
add gic interrupts mask defines
add virtual timer interrupts
rk3128-evb.dts:
use generic node names
remove underscores in node names
add more aliases
sort
===
Johan Jonker (4):
dt-bindings: arm: rockchip: Add Rockchip RK3128 Evaluation board
dt-bindings: timer: rockchip: add rockchip,rk3128-timer
ARM: dts: rockchip: add rk3128.dtsi
ARM: dts: rockchip: add rk3128-evb.dts
.../devicetree/bindings/arm/rockchip.yaml | 5 +
.../bindings/timer/rockchip,rk-timer.yaml | 1 +
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/rk3128-evb.dts | 110 +++
arch/arm/boot/dts/rk3128.dtsi | 916 ++++++++++++++++++
5 files changed, 1033 insertions(+)
create mode 100644 arch/arm/boot/dts/rk3128-evb.dts
create mode 100644 arch/arm/boot/dts/rk3128.dtsi
--
2.20.1
Add rk3128-evb.dts
Signed-off-by: Johan Jonker <[email protected]>
---
Changed V2:
use generic node names
remove underscores in node names
add more aliases
sort
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/rk3128-evb.dts | 110 +++++++++++++++++++++++++++++++
2 files changed, 111 insertions(+)
create mode 100644 arch/arm/boot/dts/rk3128-evb.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 68ac9b360..0f26539d2 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1127,6 +1127,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
rk3066a-marsboard.dtb \
rk3066a-mk808.dtb \
rk3066a-rayeager.dtb \
+ rk3128-evb.dtb \
rk3188-bqedison2qc.dtb \
rk3188-px3-evb.dtb \
rk3188-radxarock.dtb \
diff --git a/arch/arm/boot/dts/rk3128-evb.dts b/arch/arm/boot/dts/rk3128-evb.dts
new file mode 100644
index 000000000..c529e7437
--- /dev/null
+++ b/arch/arm/boot/dts/rk3128-evb.dts
@@ -0,0 +1,110 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2017 Rockchip Electronics Co., Ltd
+ */
+
+/dts-v1/;
+
+#include "rk3128.dtsi"
+
+/ {
+ model = "Rockchip RK3128 Evaluation board";
+ compatible = "rockchip,rk3128-evb", "rockchip,rk3128";
+
+ aliases {
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
+ i2c1 = &i2c1;
+ mmc0 = &emmc;
+ };
+
+ chosen {
+ stdout-path = &uart2;
+ };
+
+ memory@60000000 {
+ device_type = "memory";
+ reg = <0x60000000 0x40000000>;
+ };
+
+ vcc5v0_otg: vcc5v0-otg-regulator {
+ compatible = "regulator-fixed";
+ gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&otg_vbus_drv>;
+ regulator-name = "vcc5v0_otg";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = "regulator-fixed";
+ gpio = <&gpio2 23 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&host_vbus_drv>;
+ regulator-name = "vcc5v0_host";
+ regulator-always-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+};
+
+&emmc {
+ bus-width = <8>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
+ status = "okay";
+};
+
+&i2c1 {
+ status = "okay";
+
+ hym8563: rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ clock-output-names = "xin32k";
+ };
+};
+
+&usb2phy {
+ status = "okay";
+};
+
+&usb2phy_host {
+ status = "okay";
+};
+
+&usb2phy_otg {
+ status = "okay";
+};
+
+&usb_host_ehci {
+ status = "okay";
+};
+
+&usb_host_ohci {
+ status = "okay";
+};
+
+&usb_otg {
+ vbus-supply = <&vcc5v0_otg>;
+ status = "okay";
+};
+
+&pinctrl {
+ usb-host {
+ host_vbus_drv: host-vbus-drv {
+ rockchip,pins = <2 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb-otg {
+ otg_vbus_drv: otg-vbus-drv {
+ rockchip,pins = <0 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
--
2.20.1
Add rockchip,rk3128-timer compatible string.
Signed-off-by: Johan Jonker <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Heiko Stuebner <[email protected]>
---
Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
index dc3bc1e62..b61ed1a43 100644
--- a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
+++ b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
@@ -18,6 +18,7 @@ properties:
- enum:
- rockchip,rv1108-timer
- rockchip,rk3036-timer
+ - rockchip,rk3128-timer
- rockchip,rk3188-timer
- rockchip,rk3228-timer
- rockchip,rk3229-timer
--
2.20.1
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 9ffa5e6b8f93ccf1a217dd12e204c1a5e211abef
Gitweb: https://git.kernel.org/tip/9ffa5e6b8f93ccf1a217dd12e204c1a5e211abef
Author: Johan Jonker <[email protected]>
AuthorDate: Fri, 28 Oct 2022 16:41:30 +02:00
Committer: Daniel Lezcano <[email protected]>
CommitterDate: Fri, 02 Dec 2022 12:48:27 +01:00
dt-bindings: timer: rockchip: Add rockchip,rk3128-timer
Add rockchip,rk3128-timer compatible string.
Signed-off-by: Johan Jonker <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Heiko Stuebner <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
index dc3bc1e..b61ed1a 100644
--- a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
+++ b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
@@ -18,6 +18,7 @@ properties:
- enum:
- rockchip,rv1108-timer
- rockchip,rk3036-timer
+ - rockchip,rk3128-timer
- rockchip,rk3188-timer
- rockchip,rk3228-timer
- rockchip,rk3229-timer
On Fri, 28 Oct 2022 16:39:04 +0200, Johan Jonker wrote:
> Add basic Rockchip rk3128 DT support.
>
> Features:
> Quad-core ARM Cortex-A7MP Core processor
> Clock & reset unit
> Power management unit
> Interrupt controller
> DMAC
> 6x 64 bits Timers
> 4x PWMs
> 1x 32 bits watchdog
>
> [...]
Applied for 6.3, thanks!
[1/4] dt-bindings: arm: rockchip: Add Rockchip RK3128 Evaluation board
commit: a1392d5ac60864a3682c447fe62392eb56e9d93b
[3/4] ARM: dts: rockchip: add rk3128.dtsi
commit: 9ef609cbdbf7a45599b0c9c21e9e7d2ae625896f
[4/4] ARM: dts: rockchip: add rk3128-evb.dts
commit: 7232dafab89ac23b570d0adb3402164719fcbe3d
Best regards,
--
Heiko Stuebner <[email protected]>