Skip to content

Commit

Permalink
rockchip: add Hugsun X99 TV Box
Browse files Browse the repository at this point in the history
Signed-off-by: Marty Jones <[email protected]>
  • Loading branch information
mj22226 committed Oct 4, 2024
1 parent ce243c9 commit 960bc9a
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 0 deletions.
8 changes: 8 additions & 0 deletions package/boot/uboot-rockchip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ define U-Boot/rk3399/Default
ATF:=rk3399_bl31.elf
endef

define U-Boot/hugsun-x99-rk3399
$(U-Boot/rk3399/Default)
NAME:=Hugsun x99
BUILD_DEVICES:= \
hugsun_hugsun-x99
endef

define U-Boot/nanopc-t4-rk3399
$(U-Boot/rk3399/Default)
NAME:=NanoPC T4
Expand Down Expand Up @@ -321,6 +328,7 @@ define U-Boot/rock5a-rk3588s
endef

UBOOT_TARGETS := \
hugsun-x99-rk3399 \
nanopc-t4-rk3399 \
nanopi-m4-rk3399 \
nanopi-m4-2gb-rk3399 \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
From cd2c16aff93200a936771ed707870a206cebbf4f Mon Sep 17 00:00:00 2001
From: Marty Jones <[email protected]>
Date: Sat, 14 Sep 2024 14:26:12 -0400
Subject: [PATCH] rockchip: add add Hugsun X99 TV Box

---
arch/arm/dts/rk3399-hugsun-x99-u-boot.dtsi | 27 ++++++++
configs/hugsun-x99-rk3399_defconfig | 79 ++++++++++++++++++++++
2 files changed, 106 insertions(+)
create mode 100644 arch/arm/dts/rk3399-hugsun-x99-u-boot.dtsi
create mode 100644 configs/hugsun-x99-rk3399_defconfig

--- /dev/null
+++ b/arch/arm/dts/rk3399-hugsun-x99-u-boot.dtsi
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2024
+ */
+
+#include "rk3399-u-boot.dtsi"
+#include "rk3399-sdram-lpddr3-samsung-4GB-1866.dtsi"
+
+&gpio0 {
+ bootph-pre-ram;
+};
+
+&sdmmc {
+ pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
+};
+
+
+
+
+
+&vcc3v0_sd {
+ bootph-pre-ram;
+};
+
+&vcc_sd {
+ regulator-init-microvolt = <3000000>;
+};
--- /dev/null
+++ b/configs/hugsun-x99-rk3399_defconfig
@@ -0,0 +1,79 @@
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_COUNTER_FREQUENCY=24000000
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_OFFSET=0x3F8000
+CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-hugsun-x99"
+CONFIG_DM_RESET=y
+CONFIG_ROCKCHIP_RK3399=y
+CONFIG_TARGET_EVB_RK3399=y
+CONFIG_DEBUG_UART_BASE=0xFF1A0000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_SYS_LOAD_ADDR=0x800800
+CONFIG_PCI=y
+CONFIG_DEBUG_UART=y
+CONFIG_AHCI=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-hugsun-x99.dtb"
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_SPL_MAX_SIZE=0x40000
+CONFIG_SPL_PAD_TO=0x7f8000
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
+CONFIG_TPL=y
+CONFIG_CMD_BOOTZ=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_TIME=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SCSI_AHCI=y
+CONFIG_AHCI_PCI=y
+CONFIG_ROCKCHIP_GPIO=y
+CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_ROCKCHIP_IODOMAIN=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_PHY_REALTEK=y
+CONFIG_DM_ETH_PHY=y
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_GMAC_ROCKCHIP=y
+CONFIG_NVME_PCI=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_PHY_ROCKCHIP_TYPEC=y
+CONFIG_PMIC_RK8XX=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
+CONFIG_REGULATOR_RK8XX=y
+CONFIG_PWM_ROCKCHIP=y
+CONFIG_SCSI=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_EHCI_HCD=y
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_USB_HOST_ETHER=y
+CONFIG_USB_ETHER_ASIX=y
+CONFIG_USB_ETHER_ASIX88179=y
+CONFIG_USB_ETHER_MCS7830=y
+CONFIG_USB_ETHER_RTL8152=y
+CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_VIDEO=y
+CONFIG_DISPLAY=y
+CONFIG_VIDEO_ROCKCHIP=y
+CONFIG_DISPLAY_ROCKCHIP_HDMI=y
+CONFIG_ERRNO_STR=y
3 changes: 3 additions & 0 deletions target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ boardname="${board##*,}"
board_config_update

case $board in
hugsun,x99)
ucidef_set_led_netdev "lan" "LAN" "blue:power" "eth0"
;;
friendlyarm,nanopi-r2c|\
friendlyarm,nanopi-r2c-plus|\
friendlyarm,nanopi-r2s|\
Expand Down
10 changes: 10 additions & 0 deletions target/linux/rockchip/image/armv8.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ define Device/firefly_roc-rk3328-cc
endef
TARGET_DEVICES += firefly_roc-rk3328-cc

define Device/hugsun_hugsun-x99
DEVICE_VENDOR := Hugsun
DEVICE_MODEL := X99 TV BOX
SOC := rk3399
SUPPORTED_DEVICES := hugsun,x99
DEVICE_PACKAGES := brcmfmac-firmware-ap6255-hugsun-x99 \
kmod-brcmfmac brcmfmac-sdio-firmware-43430-bt kmod-usb-net-rtl8152 wpad-basic-mbedtls
endef
TARGET_DEVICES += hugsun_hugsun-x99

define Device/friendlyarm_nanopc-t4
DEVICE_VENDOR := FriendlyARM
DEVICE_MODEL := NanoPC T4
Expand Down

0 comments on commit 960bc9a

Please sign in to comment.