mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
372 lines
8.5 KiB
Diff
372 lines
8.5 KiB
Diff
From efd80d2ddee68e1f070396c67a7f76426d065017 Mon Sep 17 00:00:00 2001
|
|
From: Jonas Karlman <jonas@kwiboo.se>
|
|
Date: Thu, 23 Jan 2025 22:48:23 +0000
|
|
Subject: [PATCH 2/4] arm: dts: rockchip: Add rk3528-u-boot.dtsi
|
|
|
|
Add a rk3528-u-boot.dtsi extending the basic dts/upstream rk3528.dtsi
|
|
with bare minimum nodes to have a booting system from eMMC and SD-card.
|
|
|
|
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
|
---
|
|
arch/arm/dts/rk3528-u-boot.dtsi | 354 ++++++++++++++++++++++++++++++++
|
|
1 file changed, 354 insertions(+)
|
|
create mode 100644 arch/arm/dts/rk3528-u-boot.dtsi
|
|
|
|
--- /dev/null
|
|
+++ b/arch/arm/dts/rk3528-u-boot.dtsi
|
|
@@ -0,0 +1,354 @@
|
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
+
|
|
+#include <dt-bindings/clock/rk3528-cru.h>
|
|
+#include <dt-bindings/gpio/gpio.h>
|
|
+#include "rockchip-u-boot.dtsi"
|
|
+
|
|
+/ {
|
|
+ aliases {
|
|
+ gpio0 = &gpio0;
|
|
+ gpio1 = &gpio1;
|
|
+ gpio2 = &gpio2;
|
|
+ gpio3 = &gpio3;
|
|
+ gpio4 = &gpio4;
|
|
+ mmc0 = &sdhci;
|
|
+ mmc1 = &sdmmc;
|
|
+ };
|
|
+
|
|
+ chosen {
|
|
+ u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci;
|
|
+ };
|
|
+
|
|
+ dmc {
|
|
+ compatible = "rockchip,rk3528-dmc";
|
|
+ bootph-all;
|
|
+ };
|
|
+
|
|
+ soc {
|
|
+ usb_host0_ehci: usb@ff100000 {
|
|
+ compatible = "rockchip,rk3528-ehci", "generic-ehci";
|
|
+ reg = <0x0 0xff100000 0x0 0x40000>;
|
|
+ interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ clocks = <&cru HCLK_USBHOST>, <&cru HCLK_USBHOST_ARB>,
|
|
+ <&u2phy>;
|
|
+ phys = <&u2phy_host>;
|
|
+ phy-names = "usb";
|
|
+ status = "disabled";
|
|
+ };
|
|
+
|
|
+ usb_host0_ohci: usb@ff140000 {
|
|
+ compatible = "rockchip,rk3528-ohci", "generic-ohci";
|
|
+ reg = <0x0 0xff140000 0x0 0x40000>;
|
|
+ interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ clocks = <&cru HCLK_USBHOST>, <&cru HCLK_USBHOST_ARB>,
|
|
+ <&u2phy>;
|
|
+ phys = <&u2phy_host>;
|
|
+ phy-names = "usb";
|
|
+ status = "disabled";
|
|
+ };
|
|
+
|
|
+ grf: syscon@ff300000 {
|
|
+ compatible = "rockchip,rk3528-grf",
|
|
+ "syscon", "simple-mfd";
|
|
+ reg = <0x0 0xff300000 0x0 0x90000>;
|
|
+ };
|
|
+
|
|
+ cru: clock-controller@ff4a0000 {
|
|
+ compatible = "rockchip,rk3528-cru";
|
|
+ reg = <0x0 0xff4a0000 0x0 0x30000>;
|
|
+ #clock-cells = <1>;
|
|
+ #reset-cells = <1>;
|
|
+ };
|
|
+
|
|
+ ioc_grf: syscon@ff540000 {
|
|
+ compatible = "rockchip,rk3528-ioc-grf", "syscon";
|
|
+ reg = <0x0 0xff540000 0x0 0x40000>;
|
|
+ };
|
|
+
|
|
+ saradc: adc@ffae0000 {
|
|
+ compatible = "rockchip,rk3528-saradc";
|
|
+ reg = <0x0 0xffae0000 0x0 0x10000>;
|
|
+ interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ #io-channel-cells = <1>;
|
|
+ clocks = <&cru CLK_SARADC>, <&cru PCLK_SARADC>;
|
|
+ clock-names = "saradc", "apb_pclk";
|
|
+ resets = <&cru SRST_PRESETN_SARADC>;
|
|
+ reset-names = "saradc-apb";
|
|
+ status = "disabled";
|
|
+ };
|
|
+
|
|
+ gmac1: ethernet@ffbe0000 {
|
|
+ compatible = "rockchip,rk3528-gmac", "snps,dwmac-4.20a";
|
|
+ reg = <0x0 0xffbe0000 0x0 0x10000>;
|
|
+ interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
|
|
+ <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ interrupt-names = "macirq", "eth_wake_irq";
|
|
+ clocks = <&cru CLK_GMAC1_SRC_VPU>, <&cru CLK_GMAC1_RMII_VPU>,
|
|
+ <&cru PCLK_MAC_VPU>, <&cru ACLK_MAC_VPU>;
|
|
+ clock-names = "stmmaceth", "clk_mac_ref",
|
|
+ "pclk_mac", "aclk_mac";
|
|
+ resets = <&cru SRST_ARESETN_MAC>;
|
|
+ reset-names = "stmmaceth";
|
|
+ rockchip,grf = <&grf>;
|
|
+ snps,axi-config = <&gmac1_stmmac_axi_setup>;
|
|
+ snps,mixed-burst;
|
|
+ snps,mtl-rx-config = <&gmac1_mtl_rx_setup>;
|
|
+ snps,mtl-tx-config = <&gmac1_mtl_tx_setup>;
|
|
+ snps,tso;
|
|
+ status = "disabled";
|
|
+
|
|
+ mdio1: mdio {
|
|
+ compatible = "snps,dwmac-mdio";
|
|
+ #address-cells = <0x1>;
|
|
+ #size-cells = <0x0>;
|
|
+ };
|
|
+
|
|
+ gmac1_stmmac_axi_setup: stmmac-axi-config {
|
|
+ snps,blen = <0 0 0 0 16 8 4>;
|
|
+ snps,rd_osr_lmt = <8>;
|
|
+ snps,wr_osr_lmt = <4>;
|
|
+ };
|
|
+
|
|
+ gmac1_mtl_rx_setup: rx-queues-config {
|
|
+ snps,rx-queues-to-use = <1>;
|
|
+ queue0 {};
|
|
+ };
|
|
+
|
|
+ gmac1_mtl_tx_setup: tx-queues-config {
|
|
+ snps,tx-queues-to-use = <1>;
|
|
+ queue0 {};
|
|
+ };
|
|
+ };
|
|
+
|
|
+ sdhci: mmc@ffbf0000 {
|
|
+ compatible = "rockchip,rk3528-dwcmshc";
|
|
+ reg = <0x0 0xffbf0000 0x0 0x10000>;
|
|
+ interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ clocks = <&cru CCLK_SRC_EMMC>, <&cru HCLK_EMMC>,
|
|
+ <&cru ACLK_EMMC>, <&cru BCLK_EMMC>,
|
|
+ <&cru TCLK_EMMC>;
|
|
+ clock-names = "core", "bus", "axi", "block", "timer";
|
|
+ max-frequency = <200000000>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+
|
|
+ sdmmc: mmc@ffc30000 {
|
|
+ compatible = "rockchip,rk3528-dw-mshc",
|
|
+ "rockchip,rk3288-dw-mshc";
|
|
+ reg = <0x0 0xffc30000 0x0 0x4000>;
|
|
+ interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ max-frequency = <150000000>;
|
|
+ clocks = <&cru HCLK_SDMMC0>, <&cru CCLK_SRC_SDMMC0>;
|
|
+ clock-names = "biu", "ciu";
|
|
+ fifo-depth = <0x100>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+
|
|
+ rng: rng@ffc50000 {
|
|
+ compatible = "rockchip,rkrng";
|
|
+ reg = <0x0 0xffc50000 0x0 0x200>;
|
|
+ };
|
|
+
|
|
+ otp: otp@ffce0000 {
|
|
+ compatible = "rockchip,rk3528-otp",
|
|
+ "rockchip,rk3568-otp";
|
|
+ reg = <0x0 0xffce0000 0x0 0x4000>;
|
|
+ };
|
|
+
|
|
+ u2phy: usb2phy@ffdf0000 {
|
|
+ compatible = "rockchip,rk3528-usb2phy";
|
|
+ reg = <0x0 0xffdf0000 0x0 0x10000>;
|
|
+ clocks = <&cru CLK_REF_USBPHY>, <&cru PCLK_USBPHY>;
|
|
+ clock-names = "phyclk", "apb_pclk";
|
|
+ #clock-cells = <0>;
|
|
+ rockchip,usbgrf = <&grf>;
|
|
+ status = "disabled";
|
|
+
|
|
+ u2phy_otg: otg-port {
|
|
+ interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
|
|
+ <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
|
|
+ <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ interrupt-names = "otg-bvalid", "otg-id",
|
|
+ "linestate";
|
|
+ #phy-cells = <0>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+
|
|
+ u2phy_host: host-port {
|
|
+ interrupts = <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ interrupt-names = "linestate";
|
|
+ #phy-cells = <0>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+ };
|
|
+
|
|
+ pinctrl: pinctrl {
|
|
+ compatible = "rockchip,rk3528-pinctrl";
|
|
+ rockchip,grf = <&ioc_grf>;
|
|
+ #address-cells = <2>;
|
|
+ #size-cells = <2>;
|
|
+ ranges;
|
|
+
|
|
+ gpio0: gpio@ff610000 {
|
|
+ compatible = "rockchip,gpio-bank";
|
|
+ reg = <0x0 0xff610000 0x0 0x200>;
|
|
+ clocks = <&cru PCLK_GPIO0>, <&cru DBCLK_GPIO0>;
|
|
+ interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ gpio-controller;
|
|
+ #gpio-cells = <2>;
|
|
+ gpio-ranges = <&pinctrl 0 0 32>;
|
|
+ interrupt-controller;
|
|
+ #interrupt-cells = <2>;
|
|
+ };
|
|
+
|
|
+ gpio1: gpio@ffaf0000 {
|
|
+ compatible = "rockchip,gpio-bank";
|
|
+ reg = <0x0 0xffaf0000 0x0 0x200>;
|
|
+ clocks = <&cru PCLK_GPIO1>, <&cru DBCLK_GPIO1>;
|
|
+ interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ gpio-controller;
|
|
+ #gpio-cells = <2>;
|
|
+ gpio-ranges = <&pinctrl 0 32 32>;
|
|
+ interrupt-controller;
|
|
+ #interrupt-cells = <2>;
|
|
+ };
|
|
+
|
|
+ gpio2: gpio@ffb00000 {
|
|
+ compatible = "rockchip,gpio-bank";
|
|
+ reg = <0x0 0xffb00000 0x0 0x200>;
|
|
+ clocks = <&cru PCLK_GPIO2>, <&cru DBCLK_GPIO2>;
|
|
+ interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ gpio-controller;
|
|
+ #gpio-cells = <2>;
|
|
+ gpio-ranges = <&pinctrl 0 64 32>;
|
|
+ interrupt-controller;
|
|
+ #interrupt-cells = <2>;
|
|
+ };
|
|
+
|
|
+ gpio3: gpio@ffb10000 {
|
|
+ compatible = "rockchip,gpio-bank";
|
|
+ reg = <0x0 0xffb10000 0x0 0x200>;
|
|
+ clocks = <&cru PCLK_GPIO3>, <&cru DBCLK_GPIO3>;
|
|
+ interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ gpio-controller;
|
|
+ #gpio-cells = <2>;
|
|
+ gpio-ranges = <&pinctrl 0 96 32>;
|
|
+ interrupt-controller;
|
|
+ #interrupt-cells = <2>;
|
|
+ };
|
|
+
|
|
+ gpio4: gpio@ffb20000 {
|
|
+ compatible = "rockchip,gpio-bank";
|
|
+ reg = <0x0 0xffb20000 0x0 0x200>;
|
|
+ clocks = <&cru PCLK_GPIO4>, <&cru DBCLK_GPIO4>;
|
|
+ interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ gpio-controller;
|
|
+ #gpio-cells = <2>;
|
|
+ gpio-ranges = <&pinctrl 0 128 32>;
|
|
+ interrupt-controller;
|
|
+ #interrupt-cells = <2>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+#include "rk3528-pinctrl.dtsi"
|
|
+
|
|
+&cru {
|
|
+ bootph-all;
|
|
+};
|
|
+
|
|
+&emmc_bus8 {
|
|
+ bootph-pre-ram;
|
|
+ bootph-some-ram;
|
|
+};
|
|
+
|
|
+&emmc_clk {
|
|
+ bootph-pre-ram;
|
|
+ bootph-some-ram;
|
|
+};
|
|
+
|
|
+&emmc_cmd {
|
|
+ bootph-pre-ram;
|
|
+ bootph-some-ram;
|
|
+};
|
|
+
|
|
+&emmc_strb {
|
|
+ bootph-pre-ram;
|
|
+ bootph-some-ram;
|
|
+};
|
|
+
|
|
+&grf {
|
|
+ bootph-all;
|
|
+};
|
|
+
|
|
+&ioc_grf {
|
|
+ bootph-all;
|
|
+};
|
|
+
|
|
+&otp {
|
|
+ bootph-some-ram;
|
|
+};
|
|
+
|
|
+&pcfg_pull_none {
|
|
+ bootph-all;
|
|
+};
|
|
+
|
|
+&pcfg_pull_up {
|
|
+ bootph-all;
|
|
+};
|
|
+
|
|
+&pcfg_pull_up_drv_level_2 {
|
|
+ bootph-pre-ram;
|
|
+ bootph-some-ram;
|
|
+};
|
|
+
|
|
+&pinctrl {
|
|
+ bootph-all;
|
|
+};
|
|
+
|
|
+&sdhci {
|
|
+ bootph-pre-ram;
|
|
+ bootph-some-ram;
|
|
+ u-boot,spl-fifo-mode;
|
|
+};
|
|
+
|
|
+&sdmmc {
|
|
+ bootph-pre-ram;
|
|
+ bootph-some-ram;
|
|
+ u-boot,spl-fifo-mode;
|
|
+};
|
|
+
|
|
+&sdmmc_bus4 {
|
|
+ bootph-pre-ram;
|
|
+ bootph-some-ram;
|
|
+};
|
|
+
|
|
+&sdmmc_clk {
|
|
+ bootph-pre-ram;
|
|
+ bootph-some-ram;
|
|
+};
|
|
+
|
|
+&sdmmc_cmd {
|
|
+ bootph-pre-ram;
|
|
+ bootph-some-ram;
|
|
+};
|
|
+
|
|
+&sdmmc_det {
|
|
+ bootph-pre-ram;
|
|
+ bootph-some-ram;
|
|
+};
|
|
+
|
|
+&uart0 {
|
|
+ bootph-all;
|
|
+ clock-frequency = <24000000>;
|
|
+};
|
|
+
|
|
+&uart0m0_xfer {
|
|
+ bootph-pre-sram;
|
|
+ bootph-pre-ram;
|
|
+};
|
|
+
|
|
+&xin24m {
|
|
+ bootph-all;
|
|
+};
|