mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
408 lines
9.2 KiB
Diff
408 lines
9.2 KiB
Diff
--- a/arch/arm/dts/Makefile
|
|
+++ b/arch/arm/dts/Makefile
|
|
@@ -171,6 +171,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
|
|
|
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
|
rk3568-evb.dtb \
|
|
+ rk3568-opc-h68k.dtb \
|
|
rk3568-mrkaio-m68s.dtb \
|
|
rk3568-nanopi-r5s.dtb \
|
|
rk3566-radxa-cm3-io.dtb \
|
|
--- /dev/null
|
|
+++ b/arch/arm/dts/rk3568-opc-h68k-u-boot.dtsi
|
|
@@ -0,0 +1,21 @@
|
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
+
|
|
+#include "rk356x-u-boot.dtsi"
|
|
+
|
|
+/ {
|
|
+ chosen {
|
|
+ stdout-path = &uart2;
|
|
+ u-boot,spl-boot-order = "same-as-spl", &sdmmc0, &sdhci;
|
|
+ };
|
|
+};
|
|
+
|
|
+&sdmmc0 {
|
|
+ bus-width = <4>;
|
|
+ u-boot,spl-fifo-mode;
|
|
+};
|
|
+
|
|
+&uart2 {
|
|
+ u-boot,dm-spl;
|
|
+ clock-frequency = <24000000>;
|
|
+ status = "okay";
|
|
+};
|
|
--- /dev/null
|
|
+++ b/arch/arm/dts/rk3568-opc-h68k.dts
|
|
@@ -0,0 +1,277 @@
|
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
+
|
|
+#include "rk3568-evb.dts"
|
|
+
|
|
+/ {
|
|
+ model = "HINLINK OPC-H68K Board";
|
|
+ compatible = "hinlink,opc-h68k", "rockchip,rk3568";
|
|
+
|
|
+ aliases {
|
|
+ mmc0 = &sdmmc0;
|
|
+ mmc1 = &sdhci;
|
|
+ };
|
|
+};
|
|
+
|
|
+&cpu0 {
|
|
+ cpu-supply = <&vdd_cpu>;
|
|
+};
|
|
+
|
|
+&cpu1 {
|
|
+ cpu-supply = <&vdd_cpu>;
|
|
+};
|
|
+
|
|
+&cpu2 {
|
|
+ cpu-supply = <&vdd_cpu>;
|
|
+};
|
|
+
|
|
+&cpu3 {
|
|
+ cpu-supply = <&vdd_cpu>;
|
|
+};
|
|
+
|
|
+&i2c0 {
|
|
+ status = "okay";
|
|
+
|
|
+ vdd_cpu: regulator@1c {
|
|
+ compatible = "tcs,tcs4525";
|
|
+ reg = <0x1c>;
|
|
+ fcs,suspend-voltage-selector = <1>;
|
|
+ regulator-name = "vdd_cpu";
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ regulator-min-microvolt = <800000>;
|
|
+ regulator-max-microvolt = <1150000>;
|
|
+ regulator-ramp-delay = <2300>;
|
|
+ vin-supply = <&vcc5v0_sys>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ rk809: pmic@20 {
|
|
+ compatible = "rockchip,rk809";
|
|
+ reg = <0x20>;
|
|
+ interrupt-parent = <&gpio0>;
|
|
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
|
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
|
|
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
|
|
+ #clock-cells = <1>;
|
|
+ clock-names = "mclk";
|
|
+ clocks = <&cru I2S1_MCLKOUT_TX>;
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
|
|
+ rockchip,system-power-controller;
|
|
+ #sound-dai-cells = <0>;
|
|
+ vcc1-supply = <&vcc3v3_sys>;
|
|
+ vcc2-supply = <&vcc3v3_sys>;
|
|
+ vcc3-supply = <&vcc3v3_sys>;
|
|
+ vcc4-supply = <&vcc3v3_sys>;
|
|
+ vcc5-supply = <&vcc3v3_sys>;
|
|
+ vcc6-supply = <&vcc3v3_sys>;
|
|
+ vcc7-supply = <&vcc3v3_sys>;
|
|
+ vcc8-supply = <&vcc3v3_sys>;
|
|
+ vcc9-supply = <&vcc3v3_sys>;
|
|
+ wakeup-source;
|
|
+
|
|
+ regulators {
|
|
+ vdd_logic: DCDC_REG1 {
|
|
+ regulator-name = "vdd_logic";
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ regulator-init-microvolt = <900000>;
|
|
+ regulator-initial-mode = <0x2>;
|
|
+ regulator-min-microvolt = <500000>;
|
|
+ regulator-max-microvolt = <1350000>;
|
|
+ regulator-ramp-delay = <6001>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vdd_gpu: DCDC_REG2 {
|
|
+ regulator-name = "vdd_gpu";
|
|
+ regulator-always-on;
|
|
+ regulator-init-microvolt = <900000>;
|
|
+ regulator-initial-mode = <0x2>;
|
|
+ regulator-min-microvolt = <500000>;
|
|
+ regulator-max-microvolt = <1350000>;
|
|
+ regulator-ramp-delay = <6001>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vcc_ddr: DCDC_REG3 {
|
|
+ regulator-name = "vcc_ddr";
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ regulator-initial-mode = <0x2>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-on-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vdd_npu: DCDC_REG4 {
|
|
+ regulator-name = "vdd_npu";
|
|
+ regulator-init-microvolt = <900000>;
|
|
+ regulator-initial-mode = <0x2>;
|
|
+ regulator-min-microvolt = <500000>;
|
|
+ regulator-max-microvolt = <1350000>;
|
|
+ regulator-ramp-delay = <6001>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vcc_1v8: DCDC_REG5 {
|
|
+ regulator-name = "vcc_1v8";
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ regulator-min-microvolt = <1800000>;
|
|
+ regulator-max-microvolt = <1800000>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vdda0v9_image: LDO_REG1 {
|
|
+ regulator-name = "vdda0v9_image";
|
|
+ regulator-min-microvolt = <900000>;
|
|
+ regulator-max-microvolt = <900000>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vdda_0v9: LDO_REG2 {
|
|
+ regulator-name = "vdda_0v9";
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ regulator-min-microvolt = <900000>;
|
|
+ regulator-max-microvolt = <900000>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vdda0v9_pmu: LDO_REG3 {
|
|
+ regulator-name = "vdda0v9_pmu";
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ regulator-min-microvolt = <900000>;
|
|
+ regulator-max-microvolt = <900000>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-on-in-suspend;
|
|
+ regulator-suspend-microvolt = <900000>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vccio_acodec: LDO_REG4 {
|
|
+ regulator-name = "vccio_acodec";
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vccio_sd: LDO_REG5 {
|
|
+ regulator-name = "vccio_sd";
|
|
+ regulator-min-microvolt = <1800000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vcc3v3_pmu: LDO_REG6 {
|
|
+ regulator-name = "vcc3v3_pmu";
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-on-in-suspend;
|
|
+ regulator-suspend-microvolt = <3300000>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vcca_1v8: LDO_REG7 {
|
|
+ regulator-name = "vcca_1v8";
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ regulator-min-microvolt = <1800000>;
|
|
+ regulator-max-microvolt = <1800000>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vcca1v8_pmu: LDO_REG8 {
|
|
+ regulator-name = "vcca1v8_pmu";
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+ regulator-min-microvolt = <1800000>;
|
|
+ regulator-max-microvolt = <1800000>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-on-in-suspend;
|
|
+ regulator-suspend-microvolt = <1800000>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vcca1v8_image: LDO_REG9 {
|
|
+ regulator-name = "vcca1v8_image";
|
|
+ regulator-min-microvolt = <1800000>;
|
|
+ regulator-max-microvolt = <1800000>;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vcc_3v3: SWITCH_REG1 {
|
|
+ regulator-name = "vcc_3v3";
|
|
+ regulator-always-on;
|
|
+ regulator-boot-on;
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ vcc3v3_sd: SWITCH_REG2 {
|
|
+ regulator-name = "vcc3v3_sd";
|
|
+
|
|
+ regulator-state-mem {
|
|
+ regulator-off-in-suspend;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ codec {
|
|
+ mic-in-differential;
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+&pinctrl {
|
|
+ pmic {
|
|
+ pmic_int: pmic_int {
|
|
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
+ };
|
|
+ };
|
|
+};
|
|
--- /dev/null
|
|
+++ b/configs/opc-h68k-rk3568_defconfig
|
|
@@ -0,0 +1,91 @@
|
|
+CONFIG_ARM=y
|
|
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
|
+CONFIG_COUNTER_FREQUENCY=24000000
|
|
+CONFIG_ARCH_ROCKCHIP=y
|
|
+CONFIG_TEXT_BASE=0x00a00000
|
|
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
|
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
|
+CONFIG_NR_DRAM_BANKS=2
|
|
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
|
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000
|
|
+CONFIG_DEFAULT_DEVICE_TREE="rk3568-opc-h68k"
|
|
+CONFIG_ROCKCHIP_RK3568=y
|
|
+CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
|
|
+CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
|
|
+CONFIG_SPL_BOARD_INIT=y
|
|
+CONFIG_SPL_MMC=y
|
|
+CONFIG_SPL_SERIAL=y
|
|
+CONFIG_SPL_STACK_R_ADDR=0x600000
|
|
+CONFIG_TARGET_EVB_RK3568=y
|
|
+CONFIG_SPL_STACK=0x400000
|
|
+CONFIG_DEBUG_UART_BASE=0xFE660000
|
|
+CONFIG_DEBUG_UART_CLOCK=24000000
|
|
+CONFIG_SYS_LOAD_ADDR=0xc00800
|
|
+CONFIG_DEBUG_UART=y
|
|
+CONFIG_FIT=y
|
|
+CONFIG_FIT_VERBOSE=y
|
|
+CONFIG_SPL_LOAD_FIT=y
|
|
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-opc-h68k.dtb"
|
|
+# CONFIG_DISPLAY_CPUINFO is not set
|
|
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
|
+CONFIG_SPL_MAX_SIZE=0x40000
|
|
+CONFIG_SPL_PAD_TO=0x7f8000
|
|
+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
|
+CONFIG_SPL_BSS_START_ADDR=0x4000000
|
|
+CONFIG_SPL_BSS_MAX_SIZE=0x4000
|
|
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
|
+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
|
|
+CONFIG_SPL_STACK_R=y
|
|
+CONFIG_SPL_ADC=y
|
|
+CONFIG_SPL_ATF=y
|
|
+CONFIG_CMD_ADC=y
|
|
+CONFIG_CMD_GPIO=y
|
|
+CONFIG_CMD_GPT=y
|
|
+CONFIG_CMD_I2C=y
|
|
+CONFIG_CMD_MMC=y
|
|
+CONFIG_CMD_USB=y
|
|
+CONFIG_CMD_REGULATOR=y
|
|
+# CONFIG_CMD_SETEXPR is not set
|
|
+# CONFIG_SPL_DOS_PARTITION is not set
|
|
+CONFIG_SPL_OF_CONTROL=y
|
|
+CONFIG_OF_LIVE=y
|
|
+CONFIG_NET_RANDOM_ETHADDR=y
|
|
+CONFIG_SPL_REGMAP=y
|
|
+CONFIG_SPL_SYSCON=y
|
|
+CONFIG_SPL_CLK=y
|
|
+CONFIG_CLK_SCMI=y
|
|
+CONFIG_RESET_SCMI=y
|
|
+CONFIG_ROCKCHIP_GPIO=y
|
|
+CONFIG_SYS_I2C_ROCKCHIP=y
|
|
+CONFIG_MISC=y
|
|
+CONFIG_SUPPORT_EMMC_RPMB=y
|
|
+CONFIG_MMC_DW=y
|
|
+CONFIG_MMC_DW_ROCKCHIP=y
|
|
+CONFIG_MMC_SDHCI=y
|
|
+CONFIG_MMC_SDHCI_SDMA=y
|
|
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
|
+CONFIG_ETH_DESIGNWARE=y
|
|
+CONFIG_GMAC_ROCKCHIP=y
|
|
+CONFIG_DM_PMIC=y
|
|
+CONFIG_PMIC_RK8XX=y
|
|
+CONFIG_SPL_PMIC_RK8XX=y
|
|
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
|
+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
|
|
+CONFIG_REGULATOR_PWM=y
|
|
+CONFIG_DM_REGULATOR_FIXED=y
|
|
+CONFIG_SPL_DM_REGULATOR_FIXED=y
|
|
+CONFIG_REGULATOR_RK8XX=y
|
|
+CONFIG_PWM_ROCKCHIP=y
|
|
+CONFIG_SPL_RAM=y
|
|
+CONFIG_BAUDRATE=1500000
|
|
+CONFIG_DEBUG_UART_SHIFT=2
|
|
+CONFIG_SYS_NS16550_MEM32=y
|
|
+CONFIG_SYSRESET=y
|
|
+CONFIG_USB=y
|
|
+CONFIG_USB_XHCI_HCD=y
|
|
+CONFIG_USB_XHCI_DWC3=y
|
|
+CONFIG_USB_EHCI_HCD=y
|
|
+CONFIG_USB_EHCI_GENERIC=y
|
|
+CONFIG_USB_DWC3=y
|
|
+CONFIG_USB_DWC3_GENERIC=y
|
|
+CONFIG_ERRNO_STR=y
|