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 <[email protected]>
---
 arch/arm/dts/rk3528-u-boot.dtsi | 249 ++++++++++++++++++++++++++++++++
 1 file changed, 249 insertions(+)
 create mode 100644 arch/arm/dts/rk3528-u-boot.dtsi

diff --git a/arch/arm/dts/rk3528-u-boot.dtsi b/arch/arm/dts/rk3528-u-boot.dtsi
new file mode 100644
index 000000000000..4b7e4693ac62
--- /dev/null
+++ b/arch/arm/dts/rk3528-u-boot.dtsi
@@ -0,0 +1,249 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+#include <dt-bindings/clock/rk3528-cru.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 {
+               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>;
+               };
+
+               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 0x400>;
+               };
+
+               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;
+};
-- 
2.48.1

Reply via email to