Skip to contentSkip to conversation

rockchip: Add initial support for RK3506

PATCH In review Jonas Karlman 2 participants 15 messages Mar 10

Subsystems (10)
lore
Share & tools
lore
#0 lore raw

v3 cover rockchip: Add initial support for RK3506

This series add initial support for the Rockchip RK3506 SoC.

Clk and pinctrl drivers have been imported from vendor U-Boot with some adjustments and fixes.

Upstream DT is currently not existing for RK3506, so this series does not add support for any new boards, it only add initial arch support.

Please see my U-Boot rk3506 branch at [1] for a few more commits that add DTs and defconfig for e.g. Luckfox Lyra variants and ArmSoM Forge1.

With this series, board DTs and defconfigs it should be possible to boot into U-Boot proper (without OP-TEE) and still have support for MMC, Ethernet, OTP, RNG, LEDs, buttons and USB gadget/host.

Changes in v3:
- Add parentheses to mod checks to be consistent in clk driver
- Remove and add blank lines in pinctrl driver
- Remove unneeded rockchip_get_clk()
- Remove unneeded syscon_rk3506.c
- Add BOOTSOURCE_SPINOR mapping
- Update emmc/sdmmc comment
- Collect r-b tags

Changes in v2:
- Use common handling of USB bootsource_id 0x81
- Re-sort the spl_infos list alphanumerically
- Drop use of struct rk3506_cru and of_to_plat() ops
- Define LOG_CATEGORY and use log_debug() in clk driver
- Extract rk3506_clk_init_xpl() from clk bind() ops
- Enable SPL_ARMV7_SET_CORTEX_SMPEN
- Fix mac1 and otg1 access to ddr memory
- Collect a-b and t-b tags (where applicable)

[1] https://source.denx.de/u-boot/contributors/kwiboo/u-boot/-/commits/rk3506

Finley Xiao (2):
dt-bindings: clock: rockchip: Add RK3506 clock and reset unit
clk: rockchip: Add support for RK3506

Jonas Karlman (8):
rockchip: spl: Add common handling of USB bootsource_id 0x81
rockchip: mkimage: Re-sort the spl_infos list alphanumerically
ram: rockchip: Add basic support for RK3506
pinctrl: rockchip: Use syscon_regmap_lookup_by_phandle()
rockchip: otp: Add support for RK3506
phy: rockchip-inno-usb2: Add support for RK3506
net: dwc_eth_qos_rockchip: Add support for RK3506
arch: arm: rockchip: Add initial support for RK3506

Xuhui Lin (1):
rockchip: mkimage: Add support for RK3506

Ye Zhang (1):
pinctrl: rockchip: Add support for RK3506

 arch/arm/include/asm/arch-rk3506/boot0.h      |    9 +
 arch/arm/include/asm/arch-rk3506/gpio.h       |    9 +
 arch/arm/include/asm/arch-rockchip/clock.h    |   10 +
 .../include/asm/arch-rockchip/cru_rk3506.h    |  181 +++
 arch/arm/mach-rockchip/Kconfig                |   44 +
 arch/arm/mach-rockchip/Makefile               |    1 +
 arch/arm/mach-rockchip/rk3506/Kconfig         |   15 +
 arch/arm/mach-rockchip/rk3506/Makefile        |    4 +
 arch/arm/mach-rockchip/rk3506/clk_rk3506.c    |    9 +
 arch/arm/mach-rockchip/rk3506/rk3506.c        |  126 ++
 arch/arm/mach-rockchip/rk3528/rk3528.c        |   15 -
 arch/arm/mach-rockchip/spl.c                  |   12 +-
 drivers/clk/rockchip/Makefile                 |    1 +
 drivers/clk/rockchip/clk_rk3506.c             | 1166 +++++++++++++++++
 drivers/misc/rockchip-otp.c                   |    4 +
 drivers/net/dwc_eth_qos.c                     |    4 +
 drivers/net/dwc_eth_qos_rockchip.c            |   86 ++
 drivers/phy/rockchip/phy-rockchip-inno-usb2.c |   20 +
 drivers/pinctrl/rockchip/Makefile             |    1 +
 drivers/pinctrl/rockchip/pinctrl-rk3506.c     |  462 +++++++
 .../pinctrl/rockchip/pinctrl-rockchip-core.c  |   46 +-
 drivers/pinctrl/rockchip/pinctrl-rockchip.h   |    1 +
 drivers/ram/rockchip/Makefile                 |    1 +
 drivers/ram/rockchip/sdram_rk3506.c           |   33 +
 drivers/reset/Makefile                        |    2 +-
 drivers/reset/rst-rk3506.c                    |  222 ++++
 drivers/usb/gadget/Kconfig                    |    1 +
 .../Bindings/clock/rockchip,rk3506-cru.yaml   |   55 +
 .../dt-bindings/clock/rockchip,rk3506-cru.h   |  285 ++++
 .../dt-bindings/reset/rockchip,rk3506-cru.h   |  211 +++
 include/configs/rk3506_common.h               |   38 +
 tools/rkcommon.c                              |    5 +-
 32 files changed, 3034 insertions(+), 45 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-rk3506/boot0.h
 create mode 100644 arch/arm/include/asm/arch-rk3506/gpio.h
 create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rk3506.h
 create mode 100644 arch/arm/mach-rockchip/rk3506/Kconfig
 create mode 100644 arch/arm/mach-rockchip/rk3506/Makefile
 create mode 100644 arch/arm/mach-rockchip/rk3506/clk_rk3506.c
 create mode 100644 arch/arm/mach-rockchip/rk3506/rk3506.c
 create mode 100644 drivers/clk/rockchip/clk_rk3506.c
 create mode 100644 drivers/pinctrl/rockchip/pinctrl-rk3506.c
 create mode 100644 drivers/ram/rockchip/sdram_rk3506.c
 create mode 100644 drivers/reset/rst-rk3506.c
 create mode 100644 dts/upstream/Bindings/clock/rockchip,rk3506-cru.yaml
 create mode 100644 dts/upstream/include/dt-bindings/clock/rockchip,rk3506-cru.h
 create mode 100644 dts/upstream/include/dt-bindings/reset/rockchip,rk3506-cru.h
 create mode 100644 include/configs/rk3506_common.h
Signature · 1 line
2.53.0
#1 lore raw

PATCH v3 1/12 rockchip: spl: Add common handling of USB bootsource_id 0x81

Multiple newer Rockchip SoCs report 0x81 instead of 0xa when booting from USB, i.e. on RK3576, RK3528, RK3506 and RV1106.

Move the bootsource_id 0x81 handling currently only used for RK3528 to the common read_brom_bootsource_id() to reduce the need to override this function when support for newer SoCs is introduced.

---
v3: Collect r-b tag
v2: New patch

---
 arch/arm/mach-rockchip/rk3528/rk3528.c | 15 ---------------
 arch/arm/mach-rockchip/spl.c           | 12 +++++++++++-
 2 files changed, 11 insertions(+), 16 deletions(-)
arch/arm/mach-rockchip/rk3528/rk3528.c +0 -15
index 57ead0006f1f..f9bfc445b857 100644
@@ -49,21 +49,6 @@ void board_debug_uart_init(void)
 {
 }
 
-u32 read_brom_bootsource_id(void)
-{
-	u32 bootsource_id = readl(BROM_BOOTSOURCE_ID_ADDR);
-
-	/* Re-map the raw value read from reg to an existing BROM_BOOTSOURCE
-	 * enum value to avoid having to create a larger boot_devices table.
-	 */
-	if (bootsource_id == 0x81)
-		return BROM_BOOTSOURCE_USB;
-	else if (bootsource_id > BROM_LAST_BOOTSOURCE)
-		log_debug("Unknown bootsource %x\n", bootsource_id);
-
-	return bootsource_id;
-}
-
 int arch_cpu_init(void)
 {
 	u32 val;
arch/arm/mach-rockchip/spl.c +11 -1
index a9155dceedb4..e989c148079a 100644
@@ -35,7 +35,17 @@ __weak const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
 
 __weak u32 read_brom_bootsource_id(void)
 {
-	return readl(BROM_BOOTSOURCE_ID_ADDR);
+	u32 bootsource_id = readl(BROM_BOOTSOURCE_ID_ADDR);
+
+	/* Re-map the raw value read from reg to an existing BROM_BOOTSOURCE
+	 * enum value to avoid having to create a larger boot_devices table.
+	 */
+	if (bootsource_id == 0x81)
+		return BROM_BOOTSOURCE_USB;
+	else if (bootsource_id > BROM_LAST_BOOTSOURCE)
+		log_debug("Unknown bootsource %x\n", bootsource_id);
+
+	return bootsource_id;
 }
 
 const char *board_spl_was_booted_from(void)
Signature · 1 line
2.53.0
#2 lore raw

PATCH v3 2/12 rockchip: mkimage: Re-sort the spl_infos list alphanumerically

In reply to Jonas Karlman

The first RK35xx SoC was initially appended to the end of the otherwise alphanumerically sorted spl_infos list, possible because it was using a new header structure.

Re-sort the spl_infos list to keep it alphanumerically ordered based on imagename.

---
v3: Collect r-b tag
v2: New patch

---
 tools/rkcommon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/rkcommon.c +2 -2
index e7e78ef7e5b7..dbc1c177843a 100644
@@ -148,12 +148,12 @@ static struct spl_info spl_infos[] = {
 	{ "rk3328", "RK32", 0x8000 - 0x800, false, RK_HEADER_V1 },
 	{ "rk3368", "RK33", 0x8000 - 0x1000, false, RK_HEADER_V1 },
 	{ "rk3399", "RK33", 0x30000 - 0x2000, false, RK_HEADER_V1 },
-	{ "rv1108", "RK11", 0x1800, false, RK_HEADER_V1 },
-	{ "rv1126", "110B", 0x10000 - 0x1000, false, RK_HEADER_V1 },
 	{ "rk3528", "RK35", 0x10000 - 0x1000, false, RK_HEADER_V2 },
 	{ "rk3568", "RK35", 0x10000 - 0x1000, false, RK_HEADER_V2 },
 	{ "rk3576", "RK35", 0x80000 - 0x1000, false, RK_HEADER_V2 },
 	{ "rk3588", "RK35", 0x100000 - 0x1000, false, RK_HEADER_V2 },
+	{ "rv1108", "RK11", 0x1800, false, RK_HEADER_V1 },
+	{ "rv1126", "110B", 0x10000 - 0x1000, false, RK_HEADER_V1 },
 };
 
 /**
Signature · 1 line
2.53.0
#3 lore raw

PATCH v3 3/12 rockchip: mkimage: Add support for RK3506

In reply to Jonas Karlman

From: Xuhui Lin <[email protected]>

Add support for generating Rockchip Boot Image for RK3506.

The RK3506 has 48 KiB SRAM and 4 KiB is reserved for BootROM.

---
v3: Collect r-b tag
v2: Collect t-b tag

---
 tools/rkcommon.c | 1 +
 1 file changed, 1 insertion(+)
tools/rkcommon.c +1 -0
index dbc1c177843a..cb2d30bfd57a 100644
@@ -148,6 +148,7 @@ static struct spl_info spl_infos[] = {
 	{ "rk3328", "RK32", 0x8000 - 0x800, false, RK_HEADER_V1 },
 	{ "rk3368", "RK33", 0x8000 - 0x1000, false, RK_HEADER_V1 },
 	{ "rk3399", "RK33", 0x30000 - 0x2000, false, RK_HEADER_V1 },
+	{ "rk3506", "RK35", 0xC000 - 0x1000, false, RK_HEADER_V2 },
 	{ "rk3528", "RK35", 0x10000 - 0x1000, false, RK_HEADER_V2 },
 	{ "rk3568", "RK35", 0x10000 - 0x1000, false, RK_HEADER_V2 },
 	{ "rk3576", "RK35", 0x80000 - 0x1000, false, RK_HEADER_V2 },
Signature · 1 line
2.53.0
#4 lore raw

PATCH v3 4/12 ram: rockchip: Add basic support for RK3506

In reply to Jonas Karlman

Add support for reading DRAM size information from PMUGRF os_reg2 reg.

---
v3: Collect r-b tag
v2: Collect t-b tag

---
 drivers/ram/rockchip/Makefile       |  1 +
 drivers/ram/rockchip/sdram_rk3506.c | 33 +++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 drivers/ram/rockchip/sdram_rk3506.c
drivers/ram/rockchip/Makefile +1 -0
index fd94aad0cd49..27921ae4921a 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_ROCKCHIP_RK3288) = sdram_rk3288.o
 obj-$(CONFIG_ROCKCHIP_RK3308) = sdram_rk3308.o
 obj-$(CONFIG_ROCKCHIP_RK3328) = sdram_rk3328.o sdram_pctl_px30.o sdram_phy_px30.o
 obj-$(CONFIG_ROCKCHIP_RK3399) += sdram_rk3399.o
+obj-$(CONFIG_ROCKCHIP_RK3506) += sdram_rk3506.o
 obj-$(CONFIG_ROCKCHIP_RK3528) += sdram_rk3528.o
 obj-$(CONFIG_ROCKCHIP_RK3568) += sdram_rk3568.o
 obj-$(CONFIG_ROCKCHIP_RK3576) += sdram_rk3576.o
drivers/ram/rockchip/sdram_rk3506.c new file +33 -0
new file mode 100644
index 000000000000..a8396ea88883
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+// Copyright Contributors to the U-Boot project.
+
+#include <dm.h>
+#include <ram.h>
+#include <asm/arch-rockchip/sdram.h>
+
+#define PMUGRF_BASE			0xff910000
+#define OS_REG2_REG			0x208
+
+static int rk3506_dmc_get_info(struct udevice *dev, struct ram_info *info)
+{
+	info->base = CFG_SYS_SDRAM_BASE;
+	info->size = rockchip_sdram_size(PMUGRF_BASE + OS_REG2_REG);
+
+	return 0;
+}
+
+static struct ram_ops rk3506_dmc_ops = {
+	.get_info = rk3506_dmc_get_info,
+};
+
+static const struct udevice_id rk3506_dmc_ids[] = {
+	{ .compatible = "rockchip,rk3506-dmc" },
+	{ }
+};
+
+U_BOOT_DRIVER(rockchip_rk3506_dmc) = {
+	.name = "rockchip_rk3506_dmc",
+	.id = UCLASS_RAM,
+	.of_match = rk3506_dmc_ids,
+	.ops = &rk3506_dmc_ops,
+};
Signature · 1 line
2.53.0
#5 lore raw

PATCH v3 5/12 dt-bindings: clock: rockchip: Add RK3506 clock and reset unit

In reply to Jonas Karlman

From: Finley Xiao <[email protected]>

Add device tree bindings for clock and reset unit on RK3506 SoC. Add clock and reset IDs for RK3506 SoC.

[ upstream commit: 84898f8e9cea06f8178fc5ca53f068180f7bfba0 ]

(cherry picked from commit 516951213a82094f7f49f149cbf3c66dfb14c65d)

---
v3: Collect r-b tag
v2: No change

---
 .../Bindings/clock/rockchip,rk3506-cru.yaml   |  55 ++++
 .../dt-bindings/clock/rockchip,rk3506-cru.h   | 285 ++++++++++++++++++
 .../dt-bindings/reset/rockchip,rk3506-cru.h   | 211 +++++++++++++
 3 files changed, 551 insertions(+)
 create mode 100644 dts/upstream/Bindings/clock/rockchip,rk3506-cru.yaml
 create mode 100644 dts/upstream/include/dt-bindings/clock/rockchip,rk3506-cru.h
 create mode 100644 dts/upstream/include/dt-bindings/reset/rockchip,rk3506-cru.h
dts/upstream/Bindings/clock/rockchip,rk3506-cru.yaml new file +55 -0
new file mode 100644
index 000000000000..ca940475336c
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/rockchip,rk3506-cru.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip RK3506 Clock and Reset Unit (CRU)
+
+maintainers:
+  - Finley Xiao <[email protected]>
+  - Heiko Stuebner <[email protected]>
+
+description:
+  The RK3506 CRU generates the clock and also implements reset for SoC
+  peripherals.
+
+properties:
+  compatible:
+    const: rockchip,rk3506-cru
+
+  reg:
+    maxItems: 1
+
+  "#clock-cells":
+    const: 1
+
+  "#reset-cells":
+    const: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: xin
+
+required:
+  - compatible
+  - reg
+  - "#clock-cells"
+  - "#reset-cells"
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    clock-controller@ff9a0000 {
+      compatible = "rockchip,rk3506-cru";
+      reg = <0xff9a0000 0x20000>;
+      #clock-cells = <1>;
+      #reset-cells = <1>;
+      clocks = <&xin24m>;
+      clock-names = "xin";
+    };
dts/upstream/include/dt-bindings/clock/rockchip,rk3506-cru.h new file +285 -0

285 lines not on this page · raw message

dts/upstream/include/dt-bindings/reset/rockchip,rk3506-cru.h new file +211 -0

211 lines not on this page · raw message

Signature · 1 line
2.53.0
#6 lore raw

PATCH v3 6/12 clk: rockchip: Add support for RK3506

In reply to Jonas Karlman

From: Finley Xiao <[email protected]>

Add clock driver for RK3506.

Imported from vendor U-Boot linux-6.1-stan-rkr6 tag with minor adjustments and fixes for mainline.

---
Changes in v3:
- Add parentheses to mod checks to be consistent
- Collect r-b tag
Changes in v2:
- Drop use of struct rk3506_cru and of_to_plat() ops
- Define LOG_CATEGORY and use log_debug()
- Extract rk3506_clk_init_xpl() from bind() ops

---
 arch/arm/include/asm/arch-rockchip/clock.h    |   10 +
 .../include/asm/arch-rockchip/cru_rk3506.h    |  181 +++
 drivers/clk/rockchip/Makefile                 |    1 +
 drivers/clk/rockchip/clk_rk3506.c             | 1166 +++++++++++++++++
 drivers/reset/Makefile                        |    2 +-
 drivers/reset/rst-rk3506.c                    |  222 ++++
 6 files changed, 1581 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rk3506.h
 create mode 100644 drivers/clk/rockchip/clk_rk3506.c
 create mode 100644 drivers/reset/rst-rk3506.c
arch/arm/include/asm/arch-rockchip/clock.h +10 -0
index 3c204501f709..95b08bfd046f 100644
@@ -214,6 +214,16 @@ int rockchip_reset_bind(struct udevice *pdev, u32 reg_offset, u32 reg_number);
  */
 int rockchip_reset_bind_lut(struct udevice *pdev, const int *lookup_table,
 			    u32 reg_offset, u32 reg_number);
+/*
+ * rk3506_reset_bind_lut() - Bind soft reset device as child of clock device
+ *			     using dedicated RK3506 lookup table
+ *
+ * @pdev: clock udevice
+ * @reg_offset: the first offset in cru for softreset registers
+ * @reg_number: the reg numbers of softreset registers
+ * Return: 0 success, or error value
+ */
+int rk3506_reset_bind_lut(struct udevice *pdev, u32 reg_offset, u32 reg_number);
 /*
  * rk3528_reset_bind_lut() - Bind soft reset device as child of clock device
  *			     using dedicated RK3528 lookup table
arch/arm/include/asm/arch-rockchip/cru_rk3506.h new file +181 -0

181 lines not on this page · raw message

drivers/clk/rockchip/Makefile +1 -0
index 34b63d4df34a..07525c364326 100644
@@ -15,6 +15,7 @@ obj-$(CONFIG_ROCKCHIP_RK3308) += clk_rk3308.o
 obj-$(CONFIG_ROCKCHIP_RK3328) += clk_rk3328.o
 obj-$(CONFIG_ROCKCHIP_RK3368) += clk_rk3368.o
 obj-$(CONFIG_ROCKCHIP_RK3399) += clk_rk3399.o
+obj-$(CONFIG_ROCKCHIP_RK3506) += clk_rk3506.o
 obj-$(CONFIG_ROCKCHIP_RK3528) += clk_rk3528.o
 obj-$(CONFIG_ROCKCHIP_RK3568) += clk_rk3568.o
 obj-$(CONFIG_ROCKCHIP_RK3576) += clk_rk3576.o
drivers/clk/rockchip/clk_rk3506.c new file +1166 -0

1,166 lines not on this page · raw message

drivers/reset/Makefile +1 -1
index ee5b009d1341..088545c64733 100644
@@ -16,7 +16,7 @@ obj-$(CONFIG_RESET_BCM6345) += reset-bcm6345.o
 obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o
 obj-$(CONFIG_RESET_AST2500) += reset-ast2500.o
 obj-$(CONFIG_RESET_AST2600) += reset-ast2600.o
-obj-$(CONFIG_RESET_ROCKCHIP) += reset-rockchip.o rst-rk3528.o rst-rk3576.o rst-rk3588.o
+obj-$(CONFIG_RESET_ROCKCHIP) += reset-rockchip.o rst-rk3506.o rst-rk3528.o rst-rk3576.o rst-rk3588.o
 obj-$(CONFIG_RESET_MESON) += reset-meson.o
 obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o
 obj-$(CONFIG_RESET_MEDIATEK) += reset-mediatek.o
drivers/reset/rst-rk3506.c new file +222 -0

222 lines not on this page · raw message

Signature · 1 line
2.53.0
#7 lore raw

PATCH v3 7/12 pinctrl: rockchip: Use syscon_regmap_lookup_by_phandle()

In reply to Jonas Karlman

Use syscon_regmap_lookup_by_phandle() to simplify the code.

---
v3: No change
v2: No change

---
 .../pinctrl/rockchip/pinctrl-rockchip-core.c  | 39 ++++++-------------
 1 file changed, 12 insertions(+), 27 deletions(-)
drivers/pinctrl/rockchip/pinctrl-rockchip-core.c +12 -27
index 4de67aba1c34..273e356e7c02 100644
@@ -10,6 +10,7 @@
 #include <syscon.h>
 #include <fdtdec.h>
 #include <linux/bitops.h>
+#include <linux/err.h>
 #include <linux/libfdt.h>
 
 #include "pinctrl-rockchip.h"
@@ -641,37 +642,21 @@ int rockchip_pinctrl_probe(struct udevice *dev)
 {
 	struct rockchip_pinctrl_priv *priv = dev_get_priv(dev);
 	struct rockchip_pin_ctrl *ctrl;
-	struct udevice *syscon;
-	struct regmap *regmap;
-	int ret = 0;
 
-	/* get rockchip grf syscon phandle */
-	ret = uclass_get_device_by_phandle(UCLASS_SYSCON, dev, "rockchip,grf",
-					   &syscon);
-	if (ret) {
-		debug("unable to find rockchip,grf syscon device (%d)\n", ret);
-		return ret;
+	priv->regmap_base =
+			syscon_regmap_lookup_by_phandle(dev, "rockchip,grf");
+	if (IS_ERR(priv->regmap_base)) {
+		debug("unable to find rockchip,grf regmap\n");
+		return PTR_ERR(priv->regmap_base);
 	}
 
-	/* get grf-reg base address */
-	regmap = syscon_get_regmap(syscon);
-	if (!regmap) {
-		debug("unable to find rockchip grf regmap\n");
-		return -ENODEV;
-	}
-	priv->regmap_base = regmap;
-
-	/* option: get pmu-reg base address */
-	ret = uclass_get_device_by_phandle(UCLASS_SYSCON, dev, "rockchip,pmu",
-					   &syscon);
-	if (!ret) {
-		/* get pmugrf-reg base address */
-		regmap = syscon_get_regmap(syscon);
-		if (!regmap) {
-			debug("unable to find rockchip pmu regmap\n");
-			return -ENODEV;
+	if (dev_read_bool(dev, "rockchip,pmu")) {
+		priv->regmap_pmu =
+			syscon_regmap_lookup_by_phandle(dev, "rockchip,pmu");
+		if (IS_ERR(priv->regmap_pmu)) {
+			debug("unable to find rockchip,pmu regmap\n");
+			return PTR_ERR(priv->regmap_pmu);
 		}
-		priv->regmap_pmu = regmap;
 	}
 
 	ctrl = rockchip_pinctrl_get_soc_data(dev);
Signature · 1 line
2.53.0
#8 lore raw

PATCH v3 8/12 pinctrl: rockchip: Add support for RK3506

In reply to Jonas Karlman

From: Ye Zhang <[email protected]>

Add pinctrl driver for RK3506.

Imported from vendor U-Boot linux-6.1-stan-rkr6 tag with adjustments to use regmap_update_bits().

---
Changes in v3:
- Remove and add blank lines
- Collect r-b tag
Changes in v3:
- Collect t-b tag

---
 drivers/pinctrl/rockchip/Makefile             |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk3506.c     | 462 ++++++++++++++++++
 .../pinctrl/rockchip/pinctrl-rockchip-core.c  |   9 +
 drivers/pinctrl/rockchip/pinctrl-rockchip.h   |   1 +
 4 files changed, 473 insertions(+)
 create mode 100644 drivers/pinctrl/rockchip/pinctrl-rk3506.c
drivers/pinctrl/rockchip/Makefile +1 -0
index e17415e1ca68..0405df128dfa 100644
@@ -14,6 +14,7 @@ obj-$(CONFIG_ROCKCHIP_RK3308) += pinctrl-rk3308.o
 obj-$(CONFIG_ROCKCHIP_RK3328) += pinctrl-rk3328.o
 obj-$(CONFIG_ROCKCHIP_RK3368) += pinctrl-rk3368.o
 obj-$(CONFIG_ROCKCHIP_RK3399) += pinctrl-rk3399.o
+obj-$(CONFIG_ROCKCHIP_RK3506) += pinctrl-rk3506.o
 obj-$(CONFIG_ROCKCHIP_RK3528) += pinctrl-rk3528.o
 obj-$(CONFIG_ROCKCHIP_RK3568) += pinctrl-rk3568.o
 obj-$(CONFIG_ROCKCHIP_RK3576) += pinctrl-rk3576.o
drivers/pinctrl/rockchip/pinctrl-rk3506.c new file +462 -0

462 lines not on this page · raw message

drivers/pinctrl/rockchip/pinctrl-rockchip-core.c +9 -0
index 273e356e7c02..957dcb520591 100644
@@ -659,6 +659,15 @@ int rockchip_pinctrl_probe(struct udevice *dev)
 		}
 	}
 
+	if (dev_read_bool(dev, "rockchip,ioc1")) {
+		priv->regmap_ioc1 =
+			syscon_regmap_lookup_by_phandle(dev, "rockchip,ioc1");
+		if (IS_ERR(priv->regmap_ioc1)) {
+			debug("unable to find rockchip,ioc1 regmap\n");
+			return PTR_ERR(priv->regmap_ioc1);
+		}
+	}
+
 	ctrl = rockchip_pinctrl_get_soc_data(dev);
 	if (!ctrl) {
 		debug("driver data not available\n");
drivers/pinctrl/rockchip/pinctrl-rockchip.h +1 -0
index ba684baed24d..568e6024b78c 100644
@@ -528,6 +528,7 @@ struct rockchip_pinctrl_priv {
 	struct rockchip_pin_ctrl	*ctrl;
 	struct regmap			*regmap_base;
 	struct regmap			*regmap_pmu;
+	struct regmap			*regmap_ioc1;
 };
 
 extern const struct pinctrl_ops rockchip_pinctrl_ops;
Signature · 1 line
2.53.0
#9 lore raw

PATCH v3 9/12 rockchip: otp: Add support for RK3506

In reply to Jonas Karlman

Add support for the OTP controller in RK3506. The OTPC is similar to the OTPC in RK3568 and can use the same ops for reading OTP data.

---
v3: Collect r-b tag
v2: No change

---
 drivers/misc/rockchip-otp.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/misc/rockchip-otp.c +4 -0
index 46820425a84d..64b6238981b8 100644
@@ -390,6 +390,10 @@ static const struct udevice_id rockchip_otp_ids[] = {
 		.compatible = "rockchip,rk3308-otp",
 		.data = (ulong)&px30_data,
 	},
+	{
+		.compatible = "rockchip,rk3506-otp",
+		.data = (ulong)&rk3568_data,
+	},
 	{
 		.compatible = "rockchip,rk3528-otp",
 		.data = (ulong)&rk3568_data,
Signature · 1 line
2.53.0
#10 lore raw

PATCH v3 10/12 phy: rockchip-inno-usb2: Add support for RK3506

In reply to Jonas Karlman

Add support for the two USB2.0 PHYs used in the RK3506 SoC.

---
v3: Collect r-b tag
v2: Collect t-b tag

---
 drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +20 -0
index 4ea6600ce7f5..f80b2789333d 100644
@@ -421,6 +421,22 @@ static const struct rockchip_usb2phy_cfg rk3399_usb2phy_cfgs[] = {
 	{ /* sentinel */ }
 };
 
+static const struct rockchip_usb2phy_cfg rk3506_phy_cfgs[] = {
+	{
+		.reg		= 0xff2b0000,
+		.clkout_ctl_phy = { 0x041c, 7, 2, 0, 0x27 },
+		.port_cfgs	= {
+			[USB2PHY_PORT_OTG] = {
+				.phy_sus	= { 0x0060, 1, 0, 2, 1 },
+			},
+			[USB2PHY_PORT_HOST] = {
+				.phy_sus	= { 0x0070, 1, 0, 2, 1 },
+			}
+		},
+	},
+	{ /* sentinel */ }
+};
+
 static const struct rockchip_usb2phy_cfg rk3528_phy_cfgs[] = {
 	{
 		.reg		= 0xffdf0000,
@@ -540,6 +556,10 @@ static const struct udevice_id rockchip_usb2phy_ids[] = {
 		.compatible = "rockchip,rk3399-usb2phy",
 		.data = (ulong)&rk3399_usb2phy_cfgs,
 	},
+	{
+		.compatible = "rockchip,rk3506-usb2phy",
+		.data = (ulong)&rk3506_phy_cfgs,
+	},
 	{
 		.compatible = "rockchip,rk3528-usb2phy",
 		.data = (ulong)&rk3528_phy_cfgs,
Signature · 1 line
2.53.0
#11 lore raw

PATCH v3 11/12 net: dwc_eth_qos_rockchip: Add support for RK3506

In reply to Jonas Karlman

Rockchip RK3506 has two Ethernet controllers based on Synopsys DWC Ethernet QoS IP.

Add initial support for the RK3506 GMAC variant.

---
v3: Collect r-b tag
v2: No change

---
 drivers/net/dwc_eth_qos.c          |  4 ++
 drivers/net/dwc_eth_qos_rockchip.c | 86 ++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+)
drivers/net/dwc_eth_qos.c +4 -0
index 8a396d0b29ea..0f31d6468456 100644
@@ -1620,6 +1620,10 @@ static const struct udevice_id eqos_ids[] = {
 	},
 #endif
 #if IS_ENABLED(CONFIG_DWC_ETH_QOS_ROCKCHIP)
+	{
+		.compatible = "rockchip,rk3506-gmac",
+		.data = (ulong)&eqos_rockchip_config
+	},
 	{
 		.compatible = "rockchip,rk3528-gmac",
 		.data = (ulong)&eqos_rockchip_config
drivers/net/dwc_eth_qos_rockchip.c +86 -0

98 lines not on this page · raw message

Signature · 1 line
2.53.0
#12 lore raw

PATCH v3 12/12 arch: arm: rockchip: Add initial support for RK3506

In reply to Jonas Karlman

Rockchip RK3506 is a ARM-based SoC with tri-core Cortex-A7.

Add initial arch support for the RK3506 SoC.

---
Changes in v3:
- Remove unneeded rockchip_get_clk()
- Remove unneeded syscon_rk3506.c
- Add BOOTSOURCE_SPINOR mapping
- Update emmc/sdmmc comment
- Collect r-b tag
Changes in v2:
- Enable SPL_ARMV7_SET_CORTEX_SMPEN
- Drop read_brom_bootsource_id() now that default impl support 0x81
- Fix mac1 and otg1 access to ddr memory
- Collect a-b tag

---
 arch/arm/include/asm/arch-rk3506/boot0.h   |   9 ++
 arch/arm/include/asm/arch-rk3506/gpio.h    |   9 ++
 arch/arm/mach-rockchip/Kconfig             |  44 +++++++
 arch/arm/mach-rockchip/Makefile            |   1 +
 arch/arm/mach-rockchip/rk3506/Kconfig      |  15 +++
 arch/arm/mach-rockchip/rk3506/Makefile     |   4 +
 arch/arm/mach-rockchip/rk3506/clk_rk3506.c |   9 ++
 arch/arm/mach-rockchip/rk3506/rk3506.c     | 126 +++++++++++++++++++++
 drivers/usb/gadget/Kconfig                 |   1 +
 include/configs/rk3506_common.h            |  38 +++++++
 10 files changed, 256 insertions(+)
 create mode 100644 arch/arm/include/asm/arch-rk3506/boot0.h
 create mode 100644 arch/arm/include/asm/arch-rk3506/gpio.h
 create mode 100644 arch/arm/mach-rockchip/rk3506/Kconfig
 create mode 100644 arch/arm/mach-rockchip/rk3506/Makefile
 create mode 100644 arch/arm/mach-rockchip/rk3506/clk_rk3506.c
 create mode 100644 arch/arm/mach-rockchip/rk3506/rk3506.c
 create mode 100644 include/configs/rk3506_common.h
arch/arm/include/asm/arch-rk3506/boot0.h new file +9 -0
new file mode 100644
index 000000000000..8ae46f25a87a
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* Copyright Contributors to the U-Boot project. */
+
+#ifndef __ASM_ARCH_BOOT0_H__
+#define __ASM_ARCH_BOOT0_H__
+
+#include <asm/arch-rockchip/boot0.h>
+
+#endif
arch/arm/include/asm/arch-rk3506/gpio.h new file +9 -0
new file mode 100644
index 000000000000..5516e649b80b
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* Copyright Contributors to the U-Boot project. */
+
+#ifndef __ASM_ARCH_GPIO_H__
+#define __ASM_ARCH_GPIO_H__
+
+#include <asm/arch-rockchip/gpio.h>
+
+#endif
arch/arm/mach-rockchip/Kconfig +44 -0

56 lines not on this page · raw message

arch/arm/mach-rockchip/Makefile +1 -0
index 06fb527b21a0..d3bc0689f893 100644
@@ -42,6 +42,7 @@ obj-$(CONFIG_ROCKCHIP_RK3308) += rk3308/
 obj-$(CONFIG_ROCKCHIP_RK3328) += rk3328/
 obj-$(CONFIG_ROCKCHIP_RK3368) += rk3368/
 obj-$(CONFIG_ROCKCHIP_RK3399) += rk3399/
+obj-$(CONFIG_ROCKCHIP_RK3506) += rk3506/
 obj-$(CONFIG_ROCKCHIP_RK3528) += rk3528/
 obj-$(CONFIG_ROCKCHIP_RK3568) += rk3568/
 obj-$(CONFIG_ROCKCHIP_RK3576) += rk3576/
arch/arm/mach-rockchip/rk3506/Kconfig new file +15 -0
new file mode 100644
index 000000000000..92f187458c66
@@ -0,0 +1,15 @@
+if ROCKCHIP_RK3506
+
+config ROCKCHIP_BOOT_MODE_REG
+	default 0xff910200
+
+config ROCKCHIP_STIMER_BASE
+	default 0xff980000
+
+config SYS_SOC
+	default "rk3506"
+
+config SYS_CONFIG_NAME
+	default "rk3506_common"
+
+endif
arch/arm/mach-rockchip/rk3506/Makefile new file +4 -0
new file mode 100644
index 000000000000..63a6c2c2d18d
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+obj-y += rk3506.o
+obj-y += clk_rk3506.o
arch/arm/mach-rockchip/rk3506/clk_rk3506.c new file +9 -0
new file mode 100644
index 000000000000..38b9cbc16da2
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+// Copyright Contributors to the U-Boot project.
+
+#include <asm/arch-rockchip/cru_rk3506.h>
+
+void *rockchip_get_cru(void)
+{
+	return (void *)RK3506_CRU_BASE;
+}
arch/arm/mach-rockchip/rk3506/rk3506.c new file +126 -0

126 lines not on this page · raw message

drivers/usb/gadget/Kconfig +1 -0
index ebb306852a65..baa2eb61ea33 100644
@@ -89,6 +89,7 @@ config USB_GADGET_PRODUCT_NUM
 	default 0x350b if ROCKCHIP_RK3588
 	default 0x350c if ROCKCHIP_RK3528
 	default 0x350e if ROCKCHIP_RK3576
+	default 0x350f if ROCKCHIP_RK3506
 	default 0x4ee0 if ARCH_SNAPDRAGON
 	default 0x0
 	help
include/configs/rk3506_common.h new file +38 -0
new file mode 100644
index 000000000000..5e4ef67289f0
@@ -0,0 +1,38 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* Copyright Contributors to the U-Boot project. */
+
+#ifndef __CONFIG_RK3506_COMMON_H
+#define __CONFIG_RK3506_COMMON_H
+
+#define CFG_CPUID_OFFSET		0xa
+
+#include "rockchip-common.h"
+
+#define CFG_IRAM_BASE			0xfff80000
+
+#define CFG_SYS_SDRAM_BASE		0
+#define SDRAM_MAX_SIZE			0xc0000000
+
+#ifndef ROCKCHIP_DEVICE_SETTINGS
+#define ROCKCHIP_DEVICE_SETTINGS
+#endif
+
+#define ENV_MEM_LAYOUT_SETTINGS			\
+	"scriptaddr=0x00500000\0"		\
+	"script_offset_f=0xffe000\0"		\
+	"script_size_f=0x2000\0"		\
+	"pxefile_addr_r=0x00600000\0"		\
+	"kernel_addr_r=0x02080000\0"		\
+	"kernel_comp_addr_r=0x08000000\0"	\
+	"fdt_addr_r=0x01e00000\0"		\
+	"fdtoverlay_addr_r=0x01f00000\0"	\
+	"ramdisk_addr_r=0x06000000\0"		\
+	"kernel_comp_size=0x2000000\0"
+
+#define CFG_EXTRA_ENV_SETTINGS			\
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"	\
+	ENV_MEM_LAYOUT_SETTINGS			\
+	ROCKCHIP_DEVICE_SETTINGS		\
+	"boot_targets=" BOOT_TARGETS "\0"
+
+#endif /* __CONFIG_RK3506_COMMON_H */
Signature · 1 line
2.53.0
#13 lore raw
In reply to Jonas Karlman

Hi Jonas,

    This patch set V2 has been landed, please send the fix/new patches instead if needed.

Thanks,
- Kever

Quoted 105 lines · Jonas Karlman

This series add initial support for the Rockchip RK3506 SoC.

Clk and pinctrl drivers have been imported from vendor U-Boot with some adjustments and fixes.

Upstream DT is currently not existing for RK3506, so this series does not add support for any new boards, it only add initial arch support.

Please see my U-Boot rk3506 branch at [1] for a few more commits that add DTs and defconfig for e.g. Luckfox Lyra variants and ArmSoM Forge1.

With this series, board DTs and defconfigs it should be possible to boot into U-Boot proper (without OP-TEE) and still have support for MMC, Ethernet, OTP, RNG, LEDs, buttons and USB gadget/host.

Changes in v3:
- Add parentheses to mod checks to be consistent in clk driver
- Remove and add blank lines in pinctrl driver
- Remove unneeded rockchip_get_clk()
- Remove unneeded syscon_rk3506.c
- Add BOOTSOURCE_SPINOR mapping
- Update emmc/sdmmc comment
- Collect r-b tags

Changes in v2:
- Use common handling of USB bootsource_id 0x81
- Re-sort the spl_infos list alphanumerically
- Drop use of struct rk3506_cru and of_to_plat() ops
- Define LOG_CATEGORY and use log_debug() in clk driver
- Extract rk3506_clk_init_xpl() from clk bind() ops
- Enable SPL_ARMV7_SET_CORTEX_SMPEN
- Fix mac1 and otg1 access to ddr memory
- Collect a-b and t-b tags (where applicable)

[1] https://source.denx.de/u-boot/contributors/kwiboo/u-boot/-/commits/rk3506

Finley Xiao (2):
dt-bindings: clock: rockchip: Add RK3506 clock and reset unit
clk: rockchip: Add support for RK3506

Jonas Karlman (8):
rockchip: spl: Add common handling of USB bootsource_id 0x81
rockchip: mkimage: Re-sort the spl_infos list alphanumerically
ram: rockchip: Add basic support for RK3506
pinctrl: rockchip: Use syscon_regmap_lookup_by_phandle()
rockchip: otp: Add support for RK3506
phy: rockchip-inno-usb2: Add support for RK3506
net: dwc_eth_qos_rockchip: Add support for RK3506
arch: arm: rockchip: Add initial support for RK3506

Xuhui Lin (1):
rockchip: mkimage: Add support for RK3506

Ye Zhang (1):
pinctrl: rockchip: Add support for RK3506

  arch/arm/include/asm/arch-rk3506/boot0.h      |    9 +
  arch/arm/include/asm/arch-rk3506/gpio.h       |    9 +
  arch/arm/include/asm/arch-rockchip/clock.h    |   10 +
  .../include/asm/arch-rockchip/cru_rk3506.h    |  181 +++
  arch/arm/mach-rockchip/Kconfig                |   44 +
  arch/arm/mach-rockchip/Makefile               |    1 +
  arch/arm/mach-rockchip/rk3506/Kconfig         |   15 +
  arch/arm/mach-rockchip/rk3506/Makefile        |    4 +
  arch/arm/mach-rockchip/rk3506/clk_rk3506.c    |    9 +
  arch/arm/mach-rockchip/rk3506/rk3506.c        |  126 ++
  arch/arm/mach-rockchip/rk3528/rk3528.c        |   15 -
  arch/arm/mach-rockchip/spl.c                  |   12 +-
  drivers/clk/rockchip/Makefile                 |    1 +
  drivers/clk/rockchip/clk_rk3506.c             | 1166 +++++++++++++++++
  drivers/misc/rockchip-otp.c                   |    4 +
  drivers/net/dwc_eth_qos.c                     |    4 +
  drivers/net/dwc_eth_qos_rockchip.c            |   86 ++
  drivers/phy/rockchip/phy-rockchip-inno-usb2.c |   20 +
  drivers/pinctrl/rockchip/Makefile             |    1 +
  drivers/pinctrl/rockchip/pinctrl-rk3506.c     |  462 +++++++
  .../pinctrl/rockchip/pinctrl-rockchip-core.c  |   46 +-
  drivers/pinctrl/rockchip/pinctrl-rockchip.h   |    1 +
  drivers/ram/rockchip/Makefile                 |    1 +
  drivers/ram/rockchip/sdram_rk3506.c           |   33 +
  drivers/reset/Makefile                        |    2 +-
  drivers/reset/rst-rk3506.c                    |  222 ++++
  drivers/usb/gadget/Kconfig                    |    1 +
  .../Bindings/clock/rockchip,rk3506-cru.yaml   |   55 +
  .../dt-bindings/clock/rockchip,rk3506-cru.h   |  285 ++++
  .../dt-bindings/reset/rockchip,rk3506-cru.h   |  211 +++
  include/configs/rk3506_common.h               |   38 +
  tools/rkcommon.c                              |    5 +-
  32 files changed, 3034 insertions(+), 45 deletions(-)

create mode 100644 arch/arm/include/asm/arch-rk3506/boot0.h
create mode 100644 arch/arm/include/asm/arch-rk3506/gpio.h
create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rk3506.h create mode 100644 arch/arm/mach-rockchip/rk3506/Kconfig
create mode 100644 arch/arm/mach-rockchip/rk3506/Makefile
create mode 100644 arch/arm/mach-rockchip/rk3506/clk_rk3506.c create mode 100644 arch/arm/mach-rockchip/rk3506/rk3506.c
create mode 100644 drivers/clk/rockchip/clk_rk3506.c
create mode 100644 drivers/pinctrl/rockchip/pinctrl-rk3506.c create mode 100644 drivers/ram/rockchip/sdram_rk3506.c
create mode 100644 drivers/reset/rst-rk3506.c
create mode 100644 dts/upstream/Bindings/clock/rockchip,rk3506-cru.yaml create mode 100644 dts/upstream/include/dt-bindings/clock/rockchip,rk3506-cru.h create mode 100644 dts/upstream/include/dt-bindings/reset/rockchip,rk3506-cru.h create mode 100644 include/configs/rk3506_common.h

#14 lore raw

Hi Kever,

Quoted 4 lines · Kever Yang

Hi Jonas,

    This patch set V2 has been landed, please send the fix/new patches
instead if needed.

Sure, I can re-work the changes into a fixup series instead. I was not really expecting anything Rockchip related to land for 2026.04 so this caught me by surprise and I tried to send an email about this pending v3 earlier today [1].

[1] https://lore.kernel.org/u-boot/[email protected]/

Regards,
Jonas

Quoted 110 lines

Thanks,
- Kever

Quoted 105 lines · Jonas Karlman

This series add initial support for the Rockchip RK3506 SoC.

Clk and pinctrl drivers have been imported from vendor U-Boot with some adjustments and fixes.

Upstream DT is currently not existing for RK3506, so this series does not add support for any new boards, it only add initial arch support.

Please see my U-Boot rk3506 branch at [1] for a few more commits that add DTs and defconfig for e.g. Luckfox Lyra variants and ArmSoM Forge1.

With this series, board DTs and defconfigs it should be possible to boot into U-Boot proper (without OP-TEE) and still have support for MMC, Ethernet, OTP, RNG, LEDs, buttons and USB gadget/host.

Changes in v3:
- Add parentheses to mod checks to be consistent in clk driver
- Remove and add blank lines in pinctrl driver
- Remove unneeded rockchip_get_clk()
- Remove unneeded syscon_rk3506.c
- Add BOOTSOURCE_SPINOR mapping
- Update emmc/sdmmc comment
- Collect r-b tags

Changes in v2:
- Use common handling of USB bootsource_id 0x81
- Re-sort the spl_infos list alphanumerically
- Drop use of struct rk3506_cru and of_to_plat() ops
- Define LOG_CATEGORY and use log_debug() in clk driver
- Extract rk3506_clk_init_xpl() from clk bind() ops
- Enable SPL_ARMV7_SET_CORTEX_SMPEN
- Fix mac1 and otg1 access to ddr memory
- Collect a-b and t-b tags (where applicable)

[1] https://source.denx.de/u-boot/contributors/kwiboo/u-boot/-/commits/rk3506

Finley Xiao (2):
dt-bindings: clock: rockchip: Add RK3506 clock and reset unit
clk: rockchip: Add support for RK3506

Jonas Karlman (8):
rockchip: spl: Add common handling of USB bootsource_id 0x81
rockchip: mkimage: Re-sort the spl_infos list alphanumerically
ram: rockchip: Add basic support for RK3506
pinctrl: rockchip: Use syscon_regmap_lookup_by_phandle()
rockchip: otp: Add support for RK3506
phy: rockchip-inno-usb2: Add support for RK3506
net: dwc_eth_qos_rockchip: Add support for RK3506
arch: arm: rockchip: Add initial support for RK3506

Xuhui Lin (1):
rockchip: mkimage: Add support for RK3506

Ye Zhang (1):
pinctrl: rockchip: Add support for RK3506

  arch/arm/include/asm/arch-rk3506/boot0.h      |    9 +
  arch/arm/include/asm/arch-rk3506/gpio.h       |    9 +
  arch/arm/include/asm/arch-rockchip/clock.h    |   10 +
  .../include/asm/arch-rockchip/cru_rk3506.h    |  181 +++
  arch/arm/mach-rockchip/Kconfig                |   44 +
  arch/arm/mach-rockchip/Makefile               |    1 +
  arch/arm/mach-rockchip/rk3506/Kconfig         |   15 +
  arch/arm/mach-rockchip/rk3506/Makefile        |    4 +
  arch/arm/mach-rockchip/rk3506/clk_rk3506.c    |    9 +
  arch/arm/mach-rockchip/rk3506/rk3506.c        |  126 ++
  arch/arm/mach-rockchip/rk3528/rk3528.c        |   15 -
  arch/arm/mach-rockchip/spl.c                  |   12 +-
  drivers/clk/rockchip/Makefile                 |    1 +
  drivers/clk/rockchip/clk_rk3506.c             | 1166 +++++++++++++++++
  drivers/misc/rockchip-otp.c                   |    4 +
  drivers/net/dwc_eth_qos.c                     |    4 +
  drivers/net/dwc_eth_qos_rockchip.c            |   86 ++
  drivers/phy/rockchip/phy-rockchip-inno-usb2.c |   20 +
  drivers/pinctrl/rockchip/Makefile             |    1 +
  drivers/pinctrl/rockchip/pinctrl-rk3506.c     |  462 +++++++
  .../pinctrl/rockchip/pinctrl-rockchip-core.c  |   46 +-
  drivers/pinctrl/rockchip/pinctrl-rockchip.h   |    1 +
  drivers/ram/rockchip/Makefile                 |    1 +
  drivers/ram/rockchip/sdram_rk3506.c           |   33 +
  drivers/reset/Makefile                        |    2 +-
  drivers/reset/rst-rk3506.c                    |  222 ++++
  drivers/usb/gadget/Kconfig                    |    1 +
  .../Bindings/clock/rockchip,rk3506-cru.yaml   |   55 +
  .../dt-bindings/clock/rockchip,rk3506-cru.h   |  285 ++++
  .../dt-bindings/reset/rockchip,rk3506-cru.h   |  211 +++
  include/configs/rk3506_common.h               |   38 +
  tools/rkcommon.c                              |    5 +-
  32 files changed, 3034 insertions(+), 45 deletions(-)

create mode 100644 arch/arm/include/asm/arch-rk3506/boot0.h
create mode 100644 arch/arm/include/asm/arch-rk3506/gpio.h
create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rk3506.h create mode 100644 arch/arm/mach-rockchip/rk3506/Kconfig
create mode 100644 arch/arm/mach-rockchip/rk3506/Makefile
create mode 100644 arch/arm/mach-rockchip/rk3506/clk_rk3506.c create mode 100644 arch/arm/mach-rockchip/rk3506/rk3506.c
create mode 100644 drivers/clk/rockchip/clk_rk3506.c
create mode 100644 drivers/pinctrl/rockchip/pinctrl-rk3506.c create mode 100644 drivers/ram/rockchip/sdram_rk3506.c
create mode 100644 drivers/reset/rst-rk3506.c
create mode 100644 dts/upstream/Bindings/clock/rockchip,rk3506-cru.yaml create mode 100644 dts/upstream/include/dt-bindings/clock/rockchip,rk3506-cru.h create mode 100644 dts/upstream/include/dt-bindings/reset/rockchip,rk3506-cru.h create mode 100644 include/configs/rk3506_common.h