ack again
Change-Id: If55f4617e18459f7ee03418dd8ddba0dcd032462
This commit is contained in:
1 parent
6d1ad8d1d6
commit
03a97d2bc1
26 files changed
+204
-1174
No files matched your search
@@ -19,12 +19,6 @@ ifneq ($(TARGET_PREBUILT_KERNEL),)
|
||||
DTB_PATH := $(dir $(TARGET_PREBUILT_KERNEL))
|
||||
else ifneq ($(TARGET_KERNEL_PLATFORM_TARGET),)
|
||||
DTB_PATH := $(abspath $(KERNEL_OUT))
|
||||
else ifneq ($(filter 4.9, $(TARGET_KERNEL_VERSION)),)
|
||||
DTB_PATH := $(abspath $(KERNEL_OUT)/arch/arm64/boot/dts)
|
||||
else ifneq ($(findstring dtstree,$(TARGET_KERNEL_ADDITIONAL_FLAGS)),)
|
||||
DTB_PATH := $(abspath $(KERNEL_OUT)/../lineage-oot/device-tree/platform/generic-dts/t21x/lineage)
|
||||
else
|
||||
DTB_PATH := $(abspath $(KERNEL_OUT)/arch/arm64/boot/dts/nvidia)
|
||||
endif
|
||||
|
||||
INSTALLED_DTBIMAGE_TARGET := $(PRODUCT_OUT)/install/nx-plat.dtimg
|
||||
|
||||
+3
-36
@@ -55,38 +55,13 @@ WITH_LINEAGE_CHARGER := false
|
||||
TARGET_SCREEN_DENSITY := 186
|
||||
|
||||
# Kernel Source
|
||||
ifeq ($(TARGET_KERNEL_VERSION),4.9)
|
||||
KERNEL_TOOLCHAIN := $(shell pwd)/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-gnu-9.3/bin
|
||||
KERNEL_TOOLCHAIN_PREFIX := aarch64-buildroot-linux-gnu-
|
||||
TARGET_KERNEL_CLANG_COMPILE := false
|
||||
TARGET_KERNEL_SOURCE := kernel/nvidia/kernel-$(TARGET_KERNEL_VERSION)-nx
|
||||
TARGET_KERNEL_CONFIG := tegra_android_defconfig
|
||||
TARGET_KERNEL_ADDITIONAL_FLAGS := \
|
||||
NV_BUILD_KERNEL_OPTIONS=$(TARGET_KERNEL_VERSION) \
|
||||
HOSTCFLAGS="-fuse-ld=lld -Wno-unused-command-line-argument" \
|
||||
CONFIG_EXFAT_FS=m
|
||||
|
||||
TARGET_KERNEL_EXT_MODULE_ROOT := kernel/nvidia
|
||||
TARGET_KERNEL_EXT_MODULES := \
|
||||
exfat:kbuild \
|
||||
nvgpu/drivers/gpu/nvgpu:kbuild
|
||||
include device/nintendo/nx/modules.mk
|
||||
|
||||
ifneq ($(TARGET_PREBUILT_KERNEL),)
|
||||
MODDIR := $(dir $(TARGET_PREBUILT_KERNEL))
|
||||
BOARD_VENDOR_KERNEL_MODULES := $(wildcard $(MODDIR)/*.ko)
|
||||
BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(addprefix $(MODDIR)/,$(BOOT_KERNEL_MODULES))
|
||||
BOARD_RECOVERY_KERNEL_MODULES := $(addprefix $(MODDIR)/,$(RECOVERY_KERNEL_MODULES))
|
||||
endif
|
||||
else
|
||||
ifeq ($(TARGET_PREBUILT_KERNEL),)
|
||||
TARGET_KERNEL_PLATFORM_TARGET := tegra
|
||||
TARGET_KERNEL_SOURCE := vendor/nvidia/$(TARGET_KERNEL_PLATFORM_TARGET)
|
||||
BOARD_KERNEL_IMAGE_NAME := Image.gz
|
||||
endif
|
||||
BOARD_KERNEL_CMDLINE := firmware_class.path=/vendor/firmware cpufreq.default_governor=performance cma=512MB nouveau.atomic=1
|
||||
include device/nintendo/nx/modules-ack.mk
|
||||
endif
|
||||
include device/nintendo/nx/modules.mk
|
||||
|
||||
# Kernel Image Parameters
|
||||
BOARD_KERNEL_IMAGE_NAME := Image.gz
|
||||
@@ -108,18 +83,10 @@ TARGET_RELEASETOOLS_EXTENSIONS := device/nintendo/nx/releasetools
|
||||
VENDOR_SECURITY_PATCH := 2024-12-05
|
||||
|
||||
# SELinux
|
||||
ifneq ($(filter 4.9 5.10, $(TARGET_KERNEL_VERSION)),)
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/nvidia/foster/sepolicy/vendor
|
||||
SELINUX_IGNORE_NEVERALLOWS := true
|
||||
#SELINUX_IGNORE_NEVERALLOWS := true
|
||||
|
||||
# Include Joycond sepolicy if present
|
||||
-include hardware/nintendo/joycond/joycond-sepolicy.mk
|
||||
endif
|
||||
|
||||
# Treble
|
||||
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
|
||||
BOARD_VNDK_VERSION := current
|
||||
PRODUCT_FULL_TREBLE_OVERRIDE := true
|
||||
#-include hardware/nintendo/joycond/joycond-sepolicy.mk
|
||||
|
||||
# Updater
|
||||
AB_OTA_UPDATER := false
|
||||
|
||||
@@ -1,249 +0,0 @@
|
||||
# Set defaults for missing env variables.
|
||||
setenv boot_dir ${prefix}
|
||||
test -n ${loader_rev} || setenv loader_rev 0
|
||||
test -n ${id} || setenv id SWANDR
|
||||
test -n ${emmc} || setenv emmc 0
|
||||
test -n ${fbconsole} || setenv fbconsole 9
|
||||
test -n ${uart_port} || setenv uart_port 0
|
||||
test -n ${earlycon} || setenv earlycon 0
|
||||
test -n ${r2p_action} || setenv r2p_action bootloader
|
||||
test -n ${autoboot} || setenv autoboot 0
|
||||
test -n ${autoboot_list} || setenv autoboot_list 0
|
||||
|
||||
# Set logging params for each serial type.
|
||||
setenv uarta "no_console_suspend console=ttyS0,115200,8n1 loglevel=8 androidboot.console=ttyS0"
|
||||
setenv uartb "no_console_suspend console=ttyS1,115200,8n1 loglevel=8 androidboot.console=ttyS1"
|
||||
setenv uartc "no_console_suspend console=ttyS2,115200,8n1 loglevel=8 androidboot.console=ttyS2"
|
||||
setenv no_args "console=null"
|
||||
setenv usblg "usb_logging loglevel=8"
|
||||
setenv uarta_early "earlycon=uart,mmio32,0x70006000"
|
||||
setenv uartb_early "earlycon=uart,mmio32,0x70006040"
|
||||
setenv uartc_early "earlycon=uart,mmio32,0x70006200"
|
||||
|
||||
# Set important addresses.
|
||||
setenv kernload 0xA0000000
|
||||
setenv initaddr 0x92000000
|
||||
setenv fdtrload 0xA8000000
|
||||
setenv fdtraddr 0x8d000000
|
||||
|
||||
# Set temp addresses.
|
||||
setenv enviraddr 0x8d100000
|
||||
setenv fdtovaddr 0x8d200000
|
||||
|
||||
|
||||
# L4T Loader check. Min rev 4.
|
||||
if test "${loader_rev}" < 4; then echoe Old L4T Loader! Update bootloader folder!; echoe Rebooting in 10s..; sleep 10; reset; fi
|
||||
|
||||
|
||||
# Set SoC info.
|
||||
if test ${t210b01} = 1; then setenv plat_info T210B01; else setenv plat_info T210; fi
|
||||
|
||||
# Set SKU info. Frig is used instead of Fric for compatibility reasons.
|
||||
if test ${sku} = 0; then setenv sku_info ODIN; setenv sku_rev a00; setenv variant odin
|
||||
elif test ${sku} = 1; then setenv sku_info ODIN; setenv sku_rev b01; setenv variant modin
|
||||
elif test ${sku} = 2; then setenv sku_info VALI; setenv sku_rev a00; setenv variant vali
|
||||
elif test ${sku} = 3; then setenv sku_info FRIG; setenv sku_rev a00; setenv variant fric
|
||||
fi
|
||||
|
||||
# Print platform info.
|
||||
echo PLAT: ${plat_info} SKU: ${sku_info}
|
||||
echo Serial: ${device_serial_restricted}
|
||||
echo BT MAC: ${device_bt_mac}
|
||||
echo WF MAC: ${device_wifi_mac}
|
||||
|
||||
|
||||
# Set MMC device.
|
||||
setenv mmcnum 1
|
||||
if test ${emmc} = 1; then
|
||||
echoe emmc enabled
|
||||
setenv mmcnum 0
|
||||
fi
|
||||
mmc dev ${mmcnum}
|
||||
|
||||
# Load Kernel.
|
||||
if gpio input 190 && test ${recovery} = "0"; then
|
||||
# Normal Kernel.
|
||||
if part start mmc ${mmcnum} boot boot_start; then echo Boot partition found
|
||||
else echoe Boot partition not found!; echoe Rebooting in 10s..; sleep 10; reset; fi
|
||||
part size mmc ${mmcnum} boot boot_size
|
||||
else
|
||||
# Recovery.
|
||||
if part start mmc ${mmcnum} recovery boot_start; then echo Recovery partition found
|
||||
else echoe Recovery partition not found!; echoe Rebooting in 10s..; sleep 10; reset; fi
|
||||
part size mmc ${mmcnum} recovery boot_size
|
||||
|
||||
echo Applying WAR: USB3 required for recovery
|
||||
setenv usb3_enable 1
|
||||
fi
|
||||
mmc read ${kernload} ${boot_start} ${boot_size};
|
||||
|
||||
# Load DT img.
|
||||
if part start mmc ${mmcnum} dtb dtb_start; then echo DTB partition found
|
||||
else echoe DTB partition not found!; echoe Rebooting in 10s..; sleep 10; reset; fi
|
||||
part size mmc ${mmcnum} dtb dtb_size
|
||||
mmc read ${fdtrload} ${dtb_start} ${dtb_size}
|
||||
|
||||
# Check for Super.
|
||||
if part start mmc ${mmcnum} super super_start; then echo Super partition found
|
||||
else echoe Super partition not found!; echoe Rebooting in 10s..; sleep 10; reset; fi
|
||||
|
||||
# Get DT from image.
|
||||
if dtimg load ${fdtrload} ${sku} ${fdtraddr} fdtrsize; then echo Device Tree for SKU ${sku_info} loaded
|
||||
else echoe Device Tree load for SKU ${sku_info} failed!; echoe Rebooting in 10s..; sleep 10; reset; fi
|
||||
|
||||
# Load dtb and resize to fit overlays.
|
||||
fdt addr ${fdtraddr} ${fdtrsize}
|
||||
fdt resize 16384
|
||||
|
||||
|
||||
# Dtb sanity checks.
|
||||
if test ${sku_info} != ${fdt_id_text} -o ${sku_rev} != ${fdt_rev}; then
|
||||
echoe Device Tree loaded not correct! (SKU: ${fdt_id_text}, Rev: ${fdt_rev})
|
||||
echoe Expected SKU: ${sku_info}, Rev: ${sku_rev}
|
||||
echoe Rebooting in 10s..; sleep 10; reset
|
||||
fi
|
||||
|
||||
|
||||
# Patch dtb with overlays if they exist.
|
||||
if test -n ${dtb_overlays}; then
|
||||
echo loading dtb overlays: ${dtb_overlays}
|
||||
for ov in ${dtb_overlays}; do
|
||||
echo Setting ${ov}...
|
||||
# Check if DT overlay and apply it.
|
||||
if load mmc ${devnum}:${distro_bootpart} ${fdtovaddr} ${boot_dir}/overlays/${ov}.dtbo; then
|
||||
if fdt apply ${fdtovaddr}; then echo Successfully loaded ${ov}.dtbo...
|
||||
else echoe Overlay ${ov}.dtbo loading failed!; echoe Rebooting in 10s..; sleep 10; reset; fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# UART Logging.
|
||||
if test ${uart_port} = 1; then
|
||||
echoe UART-A logging enabled
|
||||
setenv bootargs_extra ${bootargs_extra} ${uarta}
|
||||
fdt set /serial@70006000 compatible nvidia,tegra20-uart
|
||||
fdt set /serial@70006000 status okay
|
||||
|
||||
if test ${earlycon} = 1; then
|
||||
echoe Early logging enabled
|
||||
setenv bootargs_extra ${bootargs_extra} ${uarta_early}
|
||||
fdt set /serial@70006000 reset-names noreset
|
||||
fi
|
||||
elif test ${uart_port} = 2; then
|
||||
echoe UART-B logging enabled
|
||||
setenv bootargs_extra ${bootargs_extra} ${uartb}
|
||||
fdt set /serial@70006040 compatible nvidia,tegra20-uart
|
||||
fdt set /serial@70006040/joyconr status disabled
|
||||
|
||||
if test ${earlycon} = 1; then
|
||||
echoe Early logging enabled
|
||||
setenv bootargs_extra ${bootargs_extra} ${uartb_early}
|
||||
fdt set /serial@70006040 reset-names noreset
|
||||
fi
|
||||
elif test ${uart_port} = 3; then
|
||||
echoe UART-C logging enabled
|
||||
setenv bootargs_extra ${bootargs_extra} ${uartc}
|
||||
fdt set /serial@70006200 compatible nvidia,tegra20-uart
|
||||
fdt set /serial@70006200/joyconl status disabled
|
||||
|
||||
if test ${earlycon} = 1; then
|
||||
echoe Early logging enabled
|
||||
setenv bootargs_extra ${bootargs_extra} ${uartc_early}
|
||||
fdt set /serial@70006200 reset-names noreset
|
||||
fi
|
||||
else
|
||||
setenv bootargs_extra ${bootargs_extra} ${no_args}
|
||||
fi
|
||||
|
||||
# USB Serial Logging.
|
||||
if test ${uart_port} = 4; then setenv bootargs_extra ${usblg} ${bootargs_extra}; echoe USB Serial logging enabled; fi
|
||||
|
||||
# Disable Joycon Rails.
|
||||
if test ${jc_rail_disable} = 1; then
|
||||
echoe Joycon Rails disabled
|
||||
fdt set /serial@70006040 status disabled
|
||||
fdt set /serial@70006040/joyconr status disabled
|
||||
fdt set /serial@70006200 status disabled
|
||||
fdt set /serial@70006200/joyconl status disabled
|
||||
fi
|
||||
|
||||
# Disable CEC.
|
||||
if test ${sku} = 2 -o ${cec_disable} = 1; then setenv bootargs_extra ${bootargs_extra} "androidboot.cec_disable=1"; fi
|
||||
|
||||
# Disable Touch panel tuning.
|
||||
if test ${touch_skip_tuning} = 1; then setenv bootargs_extra ${bootargs_extra} "ftm4.skip_tuning=1"; fi
|
||||
|
||||
# Disable Bluetooth ERTM.
|
||||
if test ${bt_ertm_disable} = 1; then setenv bootargs_extra ${bootargs_extra} "bluetooth.disable_ertm=1"; fi
|
||||
|
||||
|
||||
# Enable eMMC.
|
||||
if test ${emmc} = 1; then
|
||||
fdt set /mmc@700b0600 status okay
|
||||
fdt set /firmware/android boot_devices 700b0600.mmc
|
||||
|
||||
# Check if eMMC is initialized in 1-bit mode.
|
||||
if test "${mmc_1bit}" = 1; then
|
||||
echoe eMMC is initialized in 1-bit mode!
|
||||
fdt set /mmc@700b0600 bus-width <0x1>
|
||||
fdt set /mmc@700b0600 uhs-mask <0x7F>
|
||||
fi
|
||||
else
|
||||
fdt set /firmware/android boot_devices 700b0000.mmc
|
||||
fi
|
||||
|
||||
# Check if SD is initialized in 1-bit mode.
|
||||
if test "${sd_1bit}" = 1; then
|
||||
echoe SD Card is initialized in 1-bit mode!
|
||||
fdt set /mmc@700b0600 bus-width <0x1>
|
||||
fdt set /mmc@700b0600 uhs-mask <0x7F>
|
||||
fi
|
||||
|
||||
# Set serial number.
|
||||
if test -n ${device_serial_restricted}; then fdt set / serial-number ${device_serial_restricted}; fi
|
||||
|
||||
# Load mac address info file from sd
|
||||
if fatload mmc 1:1 ${enviraddr} switchroot/joycon_mac.ini; then
|
||||
if ini "joycon_00" ${enviraddr}; then echo Found Joycon Pairing Info; else echoe Malformed joycon_mac.ini!; fi
|
||||
if test -n "${host}" -a "${host}" = "00:00:00:00:00:00"; then ini "joycon_01" ${enviraddr}; fi
|
||||
fi
|
||||
|
||||
# Set BT mac.
|
||||
if test ! -n "${bt_mac}"; then
|
||||
if test -n "${host}" -a "${host}" != "00:00:00:00:00:00"; then setenv bt_mac ${host}; else setenv bt_mac ${device_bt_mac}; fi;
|
||||
fi
|
||||
|
||||
# Set Wi-Fi mac. Use BT MAC with FF as the last byte.
|
||||
if test ! -n "${wifi_mac}"; then
|
||||
if test -n "${host}" -a "${host}" != "00:00:00:00:00:00"; then setexpr wifi_mac sub "\:..$" ":FF" ${host}; else setenv wifi_mac ${device_wifi_mac}; fi;
|
||||
fi
|
||||
|
||||
echo CAL0 BT MAC: ${bt_mac}
|
||||
echo CAL0 WF MAC: ${wifi_mac}
|
||||
|
||||
# Import to DT.
|
||||
fdt set /chosen nvidia,wifi-mac ${wifi_mac}
|
||||
fdt set /chosen nvidia,bluetooth-mac ${bt_mac}
|
||||
|
||||
|
||||
# Set kernel cmdline.
|
||||
setenv bootargs ${bootargs_extra} "ro init=/init firmware_class.path=/vendor/firmware \
|
||||
pmc_r2p.enabled=1 pmc_r2p.action=${r2p_action} \
|
||||
pmc_r2p.param1=${autoboot} pmc_r2p.param2=${autoboot_list} \
|
||||
fbcon=map:${fbconsole} consoleblank=0 \
|
||||
latency_allowance.ptsa_rework \
|
||||
nvdec_enabled=0 tegra_fbmem=0x800000@0xf5a00000 \
|
||||
androidboot.bootloader=${blver} androidboot.hardware=nx \
|
||||
androidboot.hardware.sku=${variant} androidboot.serialno=${device_serial_restricted} \
|
||||
androidboot.modem=none androidboot.dtb_idx=${sku} "
|
||||
|
||||
# Boot kernel.
|
||||
echo Launching Kernel!
|
||||
bootm ${kernload} ${kernload} ${fdtraddr}
|
||||
|
||||
echoe Failed to launch Kernel!
|
||||
echoe
|
||||
echoe Rebooting in 10s..
|
||||
|
||||
sleep 10
|
||||
reset
|
||||
+7
-207
@@ -9,48 +9,6 @@ test -n ${earlycon} || setenv earlycon 0
|
||||
test -n ${r2p_action} || setenv r2p_action bootloader
|
||||
test -n ${autoboot} || setenv autoboot 0
|
||||
test -n ${autoboot_list} || setenv autoboot_list 0
|
||||
test -n ${usb3_enable} || setenv usb3_enable 0
|
||||
test -n ${4k60_disable} || setenv 4k60_disable 0
|
||||
test -n ${dvfsb} || setenv dvfsb 0
|
||||
test -n ${gpu_dvfsc} || setenv gpu_dvfsc 0
|
||||
test -n ${limit_gpu_clk} || setenv limit_gpu_clk 0
|
||||
test -n ${jc_rail_disable} || setenv jc_rail_disable 0
|
||||
test -n ${cec_disable} || setenv cec_disable 0
|
||||
test -n ${touch_skip_tuning} || setenv touch_skip_tuning 0
|
||||
test -n ${bt_ertm_disable} || setenv bt_ertm_disable 0
|
||||
test -n ${wifi_disable_vht80} || setenv wifi_disable_vht80 0
|
||||
test -n ${alarms_disable} || setenv alarms_disable 0
|
||||
test -n ${oc} || setenv oc 0
|
||||
test -n ${ddr200_enable} || setenv ddr200_enable 0
|
||||
|
||||
# Built-in IMU.
|
||||
test -n ${acc_cal_off_x} || setenv acc_cal_off_x 0x0
|
||||
test -n ${acc_cal_off_y} || setenv acc_cal_off_y 0x0
|
||||
test -n ${acc_cal_off_z} || setenv acc_cal_off_z 0x0
|
||||
test -n ${acc_cal_scl_x} || setenv acc_cal_scl_x 0x0
|
||||
test -n ${acc_cal_scl_y} || setenv acc_cal_scl_y 0x0
|
||||
test -n ${acc_cal_scl_z} || setenv acc_cal_scl_z 0x0
|
||||
test -n ${gyr_cal_off_x} || setenv gyr_cal_off_x 0x0
|
||||
test -n ${gyr_cal_off_y} || setenv gyr_cal_off_y 0x0
|
||||
test -n ${gyr_cal_off_z} || setenv gyr_cal_off_z 0x0
|
||||
test -n ${gyr_cal_scl_x} || setenv gyr_cal_scl_x 0x0
|
||||
test -n ${gyr_cal_scl_y} || setenv gyr_cal_scl_y 0x0
|
||||
test -n ${gyr_cal_scl_z} || setenv gyr_cal_scl_z 0x0
|
||||
|
||||
# Lite Gamepad analog sticks calibration.
|
||||
test -n ${lite_cal_lx_lof} || setenv lite_cal_lx_lof 0x0
|
||||
test -n ${lite_cal_lx_cnt} || setenv lite_cal_lx_cnt 0x0
|
||||
test -n ${lite_cal_lx_rof} || setenv lite_cal_lx_rof 0x0
|
||||
test -n ${lite_cal_ly_dof} || setenv lite_cal_ly_dof 0x0
|
||||
test -n ${lite_cal_ly_cnt} || setenv lite_cal_ly_cnt 0x0
|
||||
test -n ${lite_cal_ly_uof} || setenv lite_cal_ly_uof 0x0
|
||||
|
||||
test -n ${lite_cal_rx_lof} || setenv lite_cal_rx_lof 0x0
|
||||
test -n ${lite_cal_rx_cnt} || setenv lite_cal_rx_cnt 0x0
|
||||
test -n ${lite_cal_rx_rof} || setenv lite_cal_rx_rof 0x0
|
||||
test -n ${lite_cal_ry_dof} || setenv lite_cal_ry_dof 0x0
|
||||
test -n ${lite_cal_ry_cnt} || setenv lite_cal_ry_cnt 0x0
|
||||
test -n ${lite_cal_ry_uof} || setenv lite_cal_ry_uof 0x0
|
||||
|
||||
# Set logging params for each serial type.
|
||||
setenv uarta "no_console_suspend console=ttyS0,115200,8n1 loglevel=8 androidboot.console=ttyS0"
|
||||
@@ -221,184 +179,26 @@ if test ${bt_ertm_disable} = 1; then setenv bootargs_extra ${bootargs_extra} "bl
|
||||
|
||||
# Enable eMMC.
|
||||
if test ${emmc} = 1; then
|
||||
fdt set /sdhci@700b0600 status okay
|
||||
fdt set /firmware/android boot_devices sdhci-tegra.3
|
||||
fdt set /mmc@700b0600 status okay
|
||||
fdt set /firmware/android boot_devices 700b0600.mmc
|
||||
|
||||
# Check if eMMC is initialized in 1-bit mode.
|
||||
if test "${mmc_1bit}" = 1; then
|
||||
echoe eMMC is initialized in 1-bit mode!
|
||||
fdt set /sdhci@700b0600 bus-width <0x1>
|
||||
fdt set /sdhci@700b0600 uhs-mask <0x7F>
|
||||
fdt set /mmc@700b0600 bus-width <0x1>
|
||||
fdt set /mmc@700b0600 uhs-mask <0x7F>
|
||||
fi
|
||||
else
|
||||
fdt set /firmware/android boot_devices sdhci-tegra.0
|
||||
fdt set /firmware/android boot_devices 700b0000.mmc
|
||||
fi
|
||||
|
||||
# Check if SD is initialized in 1-bit mode.
|
||||
if test "${sd_1bit}" = 1; then
|
||||
echoe SD Card is initialized in 1-bit mode!
|
||||
fdt set /sdhci@700b0000 bus-width <0x1>
|
||||
fdt set /sdhci@700b0000 uhs-mask <0x7F>
|
||||
fdt set /mmc@700b0600 bus-width <0x1>
|
||||
fdt set /mmc@700b0600 uhs-mask <0x7F>
|
||||
fi
|
||||
|
||||
# Check if SD DDR200 mode can be enabled.
|
||||
mmc info manid
|
||||
if test ${manid} = 1b; then
|
||||
echo Samsung SD Card Detected
|
||||
setenv ddr200_enable 1
|
||||
fi
|
||||
|
||||
if test ${ddr200_enable} = 1; then
|
||||
echoe SD DDR200 mode enabled
|
||||
fdt set /sdhci@700b0000 enable-ddr200
|
||||
fi
|
||||
|
||||
# Force PLLP for 408/204MHz Host/Card clock if set.
|
||||
if test "${ddr200_mode}" = 2; then
|
||||
echoe SD DDR200 PLLP enabled
|
||||
fdt set /sdhci@700b0000 ddr200-clk-limit 210000000
|
||||
fi
|
||||
|
||||
# Disable WiFi VHT80 bonding.
|
||||
if test ${wifi_disable_vht80} = 1; then setenv bootargs_extra ${bootargs_extra} "brcmfmac.vht_mask=12"; fi
|
||||
|
||||
# Set calibration data.
|
||||
if load mmc ${devnum}:${distro_bootpart} ${enviraddr} /switchroot/switch.cal; then
|
||||
env import -t -r ${enviraddr} ${filesize}
|
||||
if test ${sku} = 2; then
|
||||
echo Sio Calibration set
|
||||
fdt set /serial@70006200/sio sio-stick-cal-l <$lite_cal_lx_lof $lite_cal_lx_cnt $lite_cal_lx_rof $lite_cal_ly_dof $lite_cal_ly_cnt $lite_cal_ly_uof>
|
||||
fdt set /serial@70006200/sio sio-stick-cal-r <$lite_cal_rx_lof $lite_cal_rx_cnt $lite_cal_rx_rof $lite_cal_ry_dof $lite_cal_ry_cnt $lite_cal_ry_uof>
|
||||
fdt set /serial@70006200/sio sio-acc-cal <$acc_cal_off_x $acc_cal_off_y $acc_cal_off_z $acc_cal_scl_x $acc_cal_scl_y $acc_cal_scl_z>
|
||||
fdt set /serial@70006200/sio sio-gyr-cal <$gyr_cal_off_x $gyr_cal_off_y $gyr_cal_off_z $gyr_cal_scl_x $gyr_cal_scl_y $gyr_cal_scl_z>
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get display handle.
|
||||
if test ${display_id} = f20; then echo Display is INN 6.2; fdt get value DHANDLE /host1x/dsi/panel-i-720p-6-2 phandle
|
||||
elif test ${display_id} = f30; then echo Display is AUO 6.2; fdt get value DHANDLE /host1x/dsi/panel-a-720p-6-2 phandle
|
||||
elif test ${display_id} = 10; then echo Display is JDI 6.2; fdt get value DHANDLE /host1x/dsi/panel-j-720p-6-2 phandle
|
||||
elif test ${display_id} = 1020; then echo Display is INN 5.5; fdt get value DHANDLE /host1x/dsi/panel-i-720p-5-5 phandle
|
||||
elif test ${display_id} = 1030; then echo Display is AUO 5.5; fdt get value DHANDLE /host1x/dsi/panel-a-720p-5-5 phandle
|
||||
elif test ${display_id} = 1040; then echo Display is SHP 5.5; fdt get value DHANDLE /host1x/dsi/panel-s-720p-5-5 phandle
|
||||
elif test ${display_id} = 2050; then echo Display is SAM 7.0
|
||||
elif test ${display_id} = f83; then echo Display is Clone 6.2
|
||||
elif test ${display_id} = B3; then echo Display is Clone 5.5
|
||||
elif test ${display_id} = 0; then echo Display is Clone 5.5
|
||||
else echoe Unknown Display ID: ${display_id}! Please report it!; fi
|
||||
|
||||
# Set active display handle.
|
||||
if test -n "${DHANDLE}" -a ${sku} != 3; then echo Setting Display panel; fdt set /host1x/dsi nvidia,active-panel <$DHANDLE>; fi
|
||||
|
||||
# Disable USB3.
|
||||
if test ${usb3_enable} = 0; then
|
||||
echo USB3 disabled
|
||||
fdt get value DHANDLE_USB2 /xusb_padctl@7009f000/pads/usb2/lanes/usb2-0 phandle
|
||||
fdt set /xusb@70090000 phys <$DHANDLE_USB2>
|
||||
fdt set /xusb@70090000 phy-names usb2-0
|
||||
fdt set /xudc@700d0000 phys <$DHANDLE_USB2>
|
||||
fdt set /xudc@700d0000 phy-names usb2
|
||||
fdt set /xusb_padctl@7009f000 usb3-no-mapping-war <0x1>
|
||||
fdt set /xusb_padctl@7009f000/ports/usb2-0 nvidia,usb3-port-fake <0xffffffff>
|
||||
fdt set /xusb_padctl@7009f000/ports/usb3-0 status disabled
|
||||
else
|
||||
echoe USB3 enabled
|
||||
fi
|
||||
|
||||
# Disable 4 DP lanes (4K@60) on Fric.
|
||||
if test ${sku} = 3 -a ${4k60_disable} = 1 -a ${usb3_enable} != 0; then
|
||||
echoe 4K60 disabled
|
||||
fdt set /i2c@7000c000/bm92t@18 rohm,dp-lanes <2>
|
||||
fi
|
||||
|
||||
# Set battery voltage limit via cell age for Vali.
|
||||
if test ${sku} = 2 -a -n "${VLIM}"; then
|
||||
echo VALI: voltage limits [${VLIM}, ${SOCLIM}]
|
||||
if test "${VLIM}" != 1070; then
|
||||
# Newer Vali. 4320 mV / 1664 mA.
|
||||
fdt set /i2c@7000c000/battery-charger@6b/charger ti,charge-voltage-limit-millivolt <0x$VLIM>
|
||||
fdt set /i2c@7000c000/battery-charger@6b/charger ti,charge-thermal-voltage-limit <0x$VLIM 0x$VLIM 0x$VLIM 0xFF0>
|
||||
fdt set /i2c@7000c000/battery-gauge@36 maxim,kernel-maximum-soc <0x$SOCLIM>
|
||||
else
|
||||
# Old Vali. 4208 mV / 1536 mA. (Unreleased?)
|
||||
fdt set /i2c@7000c000/battery-charger@6b/charger ti,charge-voltage-limit-millivolt <0x1070>
|
||||
fdt set /i2c@7000c000/battery-charger@6b/charger ti,charge-thermal-voltage-limit <0x1070 0x1070 0x1070 0xF70>
|
||||
fdt set /i2c@7000c000/battery-charger@6b/charger ti,fast-charge-current-limit-milliamp <0x600>
|
||||
fdt set /i2c@7000c000/battery-charger@6b/charger ti,charge-current-limit <0x200 0x240 0x600 0x600>
|
||||
fi
|
||||
fi
|
||||
|
||||
# DVFS B-Side.
|
||||
if test ${t210b01} = 1 -a ${dvfsb} = 1; then
|
||||
echoe DVFS B-Side enabled
|
||||
setenv bootargs_extra ${bootargs_extra} "speedo_tegra210.sku_id=0x83 speedo_tegra210.cspd_id=2 speedo_tegra210.sspd_id=2"
|
||||
fdt set /cpufreq/cpu-scaling-data max-frequency <0x249348>
|
||||
|
||||
if test ${gpu_dvfsc} = 0; then
|
||||
setenv bootargs_extra ${bootargs_extra} "speedo_tegra210.gspd_id=2"
|
||||
fi
|
||||
|
||||
if test ${sku} = 2; then
|
||||
# 2091 MHz CPU and 844 MHz GPU hard limit. Vali.
|
||||
fdt set /cpufreq/cpu-scaling-data max-frequency <0x1FE7F8>
|
||||
fdt set /dvfs nvidia,gpu-max-freq-khz <0xCE400>
|
||||
fi
|
||||
fi
|
||||
|
||||
# GPU DVFS C-Side.
|
||||
if test ${t210b01} = 1 -a ${gpu_dvfsc} = 1; then
|
||||
echoe DVFS C-Side GPU enabled
|
||||
|
||||
if test ${dvfsb} != 1; then
|
||||
setenv bootargs_extra ${bootargs_extra} "speedo_tegra210.sku_id=0x83 speedo_tegra210.gspd_id=3"
|
||||
else
|
||||
setenv bootargs_extra ${bootargs_extra} "speedo_tegra210.gspd_id=3"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Allow overclocking.
|
||||
if test ${oc} = 1; then
|
||||
echoe "CPU OC enabled"
|
||||
setenv bootargs_extra ${bootargs_extra} "androidboot.oc=1"
|
||||
fi
|
||||
|
||||
if test -n ${max_cpu_freq}; then
|
||||
echoe "Max CPU freq applied: ${max_cpu_freq} KHz"
|
||||
fdt set /cpufreq/cpu-scaling-data max-frequency <${max_cpu_freq}>
|
||||
fi
|
||||
|
||||
if test -n ${max_gpu_freq}; then
|
||||
echoe "Max GPU freq applied: ${max_gpu_freq} KHz"
|
||||
fdt set /dvfs nvidia,gpu-max-freq-khz <${max_gpu_freq}>
|
||||
fi
|
||||
|
||||
# Limit GPU clock.
|
||||
if test ${t210b01} = 1 -a ${limit_gpu_clk} = 1; then
|
||||
if test ${sku} != 2; then
|
||||
# If not Vali set GPU hard limit to 1075 MHz.
|
||||
echoe GPU clock limited
|
||||
fdt set /dvfs nvidia,gpu-max-freq-khz <0x106800>
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set pmic type if devboard.
|
||||
if test ${t210b01} = 1 -a -n "${pmic_type}" -a ${pmic_type} = 1; then
|
||||
echoe GPU 15A Regulator enabled
|
||||
fdt set /i2c@7000d000/max77812@33 reg <0x31>
|
||||
fdt set /i2c@7000d000/max77812@33/m3vout status disabled
|
||||
fdt set /i2c@7000d000/fan53528@52 status okay
|
||||
fdt set /dvfs nvidia,gpu-max-volt-mv <0x3B6>
|
||||
fi
|
||||
|
||||
# Disable Wake up from RTC.
|
||||
if test ${alarms_disable} = 1; then
|
||||
echoe Wakeup Alarms disabled
|
||||
fdt set /rtc nvidia,pmc-wakeup <0>
|
||||
fdt set /pcie@1003000 nvidia,wake-gpio <0>
|
||||
fdt set /brcmfmac@0 nvidia,pmc-wakeup <0>
|
||||
fi
|
||||
|
||||
|
||||
# Set serial number.
|
||||
if test -n ${device_serial_restricted}; then fdt set / serial-number ${device_serial_restricted}; fi
|
||||
|
||||
|
||||
@@ -19,36 +19,7 @@ UBOOT_PATH := $(BUILD_TOP)/hardware/nintendo/u-boot
|
||||
NX_BOOTFILES_PATH := $(BUILD_TOP)/device/nintendo/nx/bootfiles
|
||||
NX_FIRMWARE_PATH := $(BUILD_TOP)/vendor/nintendo/nx/external/u-boot
|
||||
|
||||
ifneq ($(TARGET_TEGRA_UBOOT),prebuilt)
|
||||
|
||||
_uboot_bin := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE))
|
||||
_uboot_bin := $(_uboot_bin)/$(LOCAL_MODULE)$(LOCAL_MODULE_SUFFIX)
|
||||
|
||||
$(_uboot_bin): $(sort $(shell find -L $(UBOOT_PATH)))
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) +$(KERNEL_MAKE_CMD) $(KERNEL_CROSS_COMPILE) \
|
||||
HOSTCC=$(TARGET_KERNEL_CLANG_PATH)/bin/clang HOSTLDFLAGS="-fuse-ld=lld" \
|
||||
YACC=$(BUILD_TOOLS_BINS)/bin/bison LEX=$(BUILD_TOOLS_BINS)/bin/flex M4=$(BUILD_TOOLS_BINS)/bin/m4 \
|
||||
-C $(UBOOT_PATH) O=$(dir $(_uboot_bin)) nx_defconfig
|
||||
$(hide) +$(KERNEL_MAKE_CMD) $(KERNEL_CROSS_COMPILE) \
|
||||
HOSTCC=$(TARGET_KERNEL_CLANG_PATH)/bin/clang HOSTLDFLAGS="-fuse-ld=lld" \
|
||||
YACC=$(BUILD_TOOLS_BINS)/bin/bison LEX=$(BUILD_TOOLS_BINS)/bin/flex M4=$(BUILD_TOOLS_BINS)/bin/m4 \
|
||||
-C $(UBOOT_PATH) O=$(dir $(_uboot_bin)) bl33.bin
|
||||
@mv $(_uboot_bin)/bl33.bin $(_uboot_bin)
|
||||
|
||||
$(PRODUCT_OUT)/bl33.bin: $(_uboot_bin)
|
||||
$(hide) cp $< $@
|
||||
.PHONY: bl33
|
||||
u-boot-dtb: $(PRODUCT_OUT)/bl33.bin
|
||||
endif # TARGET_TEGRA_UBOOT
|
||||
|
||||
ifneq ($(filter 4.9, $(TARGET_KERNEL_VERSION)),)
|
||||
NX_BOOTSCRIPT ?= android_boot.txt
|
||||
else
|
||||
NX_BOOTSCRIPT ?= android_boot.ack.txt
|
||||
endif
|
||||
|
||||
_uscript_input := $(abspath $(NX_BOOTFILES_PATH)/$(NX_BOOTSCRIPT))
|
||||
_uscript_input := $(abspath $(NX_BOOTFILES_PATH)/android_boot.txt)
|
||||
_uscript_archive := $(call intermediates-dir-for,EXECUTABLES,boot.scr)/boot.scr
|
||||
$(_uscript_archive): $(_uscript_input)
|
||||
@mkdir -p $(dir $@)
|
||||
@@ -76,14 +47,10 @@ $(BUILT_TARGET_FILES_ZIPROOT)/IMAGES/boot.scr: $(BUILT_TARGET_FILES_ZIPROOT).zip
|
||||
INSTALLED_RADIOIMAGE_TARGET += $(NX_BOOTFILES_PATH)/android.ini
|
||||
INSTALLED_RADIOIMAGE_TARGET += $(NX_BOOTFILES_PATH)/bootlogo_android.bmp
|
||||
INSTALLED_RADIOIMAGE_TARGET += $(NX_BOOTFILES_PATH)/icon_android_hue.bmp
|
||||
|
||||
ifneq ($(TARGET_TEGRA_UBOOT),prebuilt)
|
||||
INSTALLED_RADIOIMAGE_TARGET += $(_uboot_bin)
|
||||
else
|
||||
INSTALLED_RADIOIMAGE_TARGET += $(NX_FIRMWARE_PATH)/bl33.bin
|
||||
endif
|
||||
|
||||
INSTALLED_RADIOIMAGE_TARGET += $(PRODUCT_OUT)/boot.scr
|
||||
INSTALLED_RADIOIMAGE_TARGET += $(PRODUCT_OUT)/bl31.bin
|
||||
|
||||
$(BUILT_TARGET_FILES_DIR): $(INSTALLED_RADIOIMAGE_TARGET)
|
||||
|
||||
endif # TARGET_DEVICE
|
||||
@@ -1,4 +0,0 @@
|
||||
filegroup {
|
||||
name: "vnd_nx.txt",
|
||||
srcs: ["vnd_nx.txt"],
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2012 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _BDROID_BUILDCFG_H
|
||||
#define _BDROID_BUILDCFG_H
|
||||
|
||||
// SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
|
||||
// MAJOR CLASS: COMPUTER
|
||||
// MINOR CLASS: TABLET
|
||||
#define BTA_DM_COD {0x5A, 0x01, 0x10}
|
||||
|
||||
// SERVICE_CLASS:0x20 (Bit18 - Rendering)
|
||||
// MAJOR CLASS: AUDIO/VIDEO
|
||||
// MINOR CLASS: set top box
|
||||
#define BTA_DM_COD_ATV {0x20, BTM_COD_MAJOR_AUDIO, BTM_COD_MINOR_SET_TOP_BOX}
|
||||
|
||||
#define BTIF_HF_WBS_PREFERRED TRUE
|
||||
#define BTM_WBS_INCLUDED TRUE
|
||||
#define BLE_VND_INCLUDED TRUE
|
||||
|
||||
#define BTSNOOP_MEM_BUFFER_SIZE (1024 * 1024)
|
||||
#define DEBUG_FS_UART_PATH "/d/70006300.serial/tty_buffer_count"
|
||||
|
||||
// To sync with CONN TIMEOUT of pepper
|
||||
#define BTM_BLE_CONN_TIMEOUT_DEF 1000
|
||||
|
||||
// Increase MAX GATT notification to 75
|
||||
#define BTA_GATTC_NOTIF_REG_MAX 75
|
||||
|
||||
// Turn off BLE_PRIVACY_SPT. Remote reconnect fails often if this is enabled.
|
||||
#define BLE_PRIVACY_SPT FALSE
|
||||
|
||||
#endif
|
||||
@@ -1,3 +0,0 @@
|
||||
BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyTHS3"
|
||||
FW_PATCHFILE_LOCATION = "/vendor/firmware/"
|
||||
FW_PATCH_SETTLEMENT_DELAY_MS = 200
|
||||
@@ -16,32 +16,13 @@
|
||||
|
||||
TARGET_TEGRA_VARIANT ?= common
|
||||
|
||||
TARGET_KERNEL_VERSION ?= 4.9
|
||||
TARGET_TEGRA_KEYSTORE := software
|
||||
TARGET_TEGRA_LIGHT ?= lineage
|
||||
#TARGET_TEGRA_THERMAL ?= lineage
|
||||
TARGET_TEGRA_UBOOT := prebuilt
|
||||
TARGET_TEGRA_POWER := perfmgr
|
||||
TARGET_KERNEL_VERSION ?= mainline
|
||||
TARGET_LIGHT_HAL ?= tegra
|
||||
|
||||
TARGET_ATV_FORCE_1080_SCALING := false
|
||||
|
||||
ifneq ($(filter 4.9, $(TARGET_KERNEL_VERSION)),)
|
||||
TARGET_TEGRA_BT ?= bcm
|
||||
TARGET_TEGRA_CAMERA ?= rel-shield-r
|
||||
TARGET_TEGRA_CEC := aosp
|
||||
TARGET_TEGRA_CPL := none
|
||||
TARGET_TEGRA_SENSORS := iio
|
||||
TARGET_TEGRA_SENSOR_FEATURES := accelerometer gyroscope light
|
||||
TARGET_TEGRA_WIDEVINE ?= rel-shield-r
|
||||
TARGET_TEGRA_WIFI ?= bcm
|
||||
else
|
||||
TARGET_TEGRA_FIRMWARE_BRANCH ?= linux-firmware
|
||||
TARGET_AUDIO_HAL := baylibre
|
||||
TARGET_TV_HDMI_CEC_HAL :=
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/nintendo/nx/initfiles/ack.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/ack.rc \
|
||||
device/nintendo/nx/initfiles/init.recovery.ack.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.ack.rc
|
||||
endif
|
||||
device/nintendo/nx/initfiles/ack.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/ack.rc
|
||||
|
||||
include device/nvidia/t210-common/t210.mk
|
||||
|
||||
@@ -84,20 +65,11 @@ PRODUCT_PACKAGES += \
|
||||
init.sensors.nx.rc \
|
||||
init.vali.rc
|
||||
|
||||
ifneq ($(filter 4.9 5.10, $(TARGET_KERNEL_VERSION)),)
|
||||
ifneq ($(TARGET_TEGRA_CPL),none)
|
||||
PRODUCT_PACKAGES += \
|
||||
power.nx.rc
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_POWER_HAL),perfmgr-lineage)
|
||||
ifeq ($(TARGET_GRAPHICS),mesa)
|
||||
PRODUCT_PACKAGES += \
|
||||
powerhint.nouveau.json
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
vendor.powerhal.config=powerhint.nouveau.json
|
||||
endif
|
||||
powerhint.nouveau.json \
|
||||
powerhint.t210b01.json \
|
||||
powerhint.t210b01.nouveau.json
|
||||
endif
|
||||
|
||||
# Permissions
|
||||
@@ -119,30 +91,20 @@ PRODUCT_COPY_FILES += \
|
||||
device/nvidia/tegra-common/audio/primary_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml
|
||||
endif
|
||||
|
||||
# Bluetooth
|
||||
ifeq ($(TARGET_TEGRA_BT),bcm)
|
||||
$(call soong_config_set,brcm_libbt,bdroid_buildcfg_include_dir,device/nintendo/nx/comms)
|
||||
$(call soong_config_set,brcm_libbt,custom_bt_config,//device/nintendo/nx:vnd_nx.txt)
|
||||
endif
|
||||
|
||||
# CEC
|
||||
ifneq ($(filter 4.9, $(TARGET_KERNEL_VERSION)),)
|
||||
PRODUCT_COPY_FILES := $(filter-out frameworks/native/data/etc/android.hardware.hdmi.cec.xml%android.hardware.hdmi.cec.xml,$(PRODUCT_COPY_FILES))
|
||||
# PRODUCT_COPY_FILES := $(filter-out frameworks/native/data/etc/android.hardware.hdmi.cec.xml%android.hardware.hdmi.cec.xml,$(PRODUCT_COPY_FILES))
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.hdmi.cec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/staging/android.hardware.hdmi.cec.xml
|
||||
# PRODUCT_COPY_FILES += \
|
||||
# frameworks/native/data/etc/android.hardware.hdmi.cec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/staging/android.hardware.hdmi.cec.xml
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
nx_cec.rc \
|
||||
cec_disable.xml
|
||||
endif
|
||||
# PRODUCT_PACKAGES += \
|
||||
# nx_cec.rc \
|
||||
# cec_disable.xml
|
||||
|
||||
# Device Settings
|
||||
# TEMP
|
||||
ifneq ($(filter 4.9, $(TARGET_KERNEL_VERSION)),)
|
||||
PRODUCT_PACKAGES += \
|
||||
DeviceSettingsNX
|
||||
endif
|
||||
# PRODUCT_PACKAGES += \
|
||||
# DeviceSettingsNX
|
||||
|
||||
# DocumentsUI
|
||||
# We are the exception, being an ATV device with touch
|
||||
@@ -162,18 +124,10 @@ endif
|
||||
PRODUCT_PACKAGES += \
|
||||
excluded-input-devices.xml
|
||||
|
||||
ifneq ($(filter 4.9, $(TARGET_KERNEL_VERSION)),)
|
||||
# Joycons
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.nintendo.joycond-service \
|
||||
jc_setup
|
||||
endif
|
||||
|
||||
# Kernel Modules
|
||||
ifneq ($(filter 4.9, $(TARGET_KERNEL_VERSION)),)
|
||||
PRODUCT_PACKAGES += \
|
||||
cypress-fmac-upstream
|
||||
endif
|
||||
# PRODUCT_PACKAGES += \
|
||||
# android.hardware.nintendo.joycond-service \
|
||||
# jc_setup
|
||||
|
||||
# Keylayouts
|
||||
PRODUCT_PACKAGES += \
|
||||
@@ -185,47 +139,22 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/nvidia/tegra-common/initfiles/init.lkm.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.lkm.rc
|
||||
ifneq ($(filter 4.9, $(TARGET_KERNEL_VERSION)),)
|
||||
PRODUCT_PACKAGES += \
|
||||
lkm_loader_target
|
||||
else
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/nintendo/nx/initfiles/lkm.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/lkm.rc
|
||||
endif
|
||||
|
||||
# Partitions
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/non_ab_device.mk)
|
||||
|
||||
# PHS
|
||||
ifneq ($(TARGET_TEGRA_PHS),)
|
||||
PRODUCT_PACKAGES += \
|
||||
nvphsd.conf
|
||||
endif
|
||||
|
||||
# Recovery
|
||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += persist.vendor.recovery_update=true
|
||||
|
||||
# Shipping API
|
||||
ifneq ($(filter 4.9 5.10, $(TARGET_KERNEL_VERSION)),)
|
||||
PRODUCT_COPY_FILES += \
|
||||
system/core/libprocessgroup/profiles/cgroups_28.json:$(TARGET_COPY_OUT_VENDOR)/etc/cgroups.json \
|
||||
system/core/libprocessgroup/profiles/task_profiles_28.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json
|
||||
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_l.mk)
|
||||
else
|
||||
PRODUCT_SHIPPING_API_LEVEL := 36
|
||||
endif
|
||||
PRODUCT_SHIPPING_API_LEVEL := 37
|
||||
|
||||
# Thermal
|
||||
ifneq ($(TARGET_TEGRA_THERMAL),)
|
||||
ifneq ($(filter 4.9 5.10, $(TARGET_KERNEL_VERSION)),)
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/nintendo/nx/thermal/thermalhal.nx.xml:$(TARGET_COPY_OUT_VENDOR)/etc/thermalhal.nx.xml
|
||||
else
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/nintendo/nx/thermal/thermalhal.nx.ack.xml:$(TARGET_COPY_OUT_VENDOR)/etc/thermalhal.nx.xml
|
||||
endif
|
||||
endif
|
||||
|
||||
# WiFi
|
||||
PRODUCT_PACKAGES += \
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023-2025 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
android_app {
|
||||
name: "DeviceSettingsNX",
|
||||
manifest: "AndroidManifest.xml",
|
||||
srcs: [
|
||||
"src/**/*.java",
|
||||
],
|
||||
resource_dirs: [
|
||||
"res",
|
||||
],
|
||||
overrides: ["DeviceSettings"],
|
||||
platform_apis: true,
|
||||
certificate: "platform",
|
||||
optimize: {
|
||||
proguard_flags_files: ["proguard.flags"],
|
||||
},
|
||||
privileged: true,
|
||||
privapp_allowlist: "org.lineageos.settings.device.xml",
|
||||
static_libs: [
|
||||
"androidx.preference_preference",
|
||||
"androidx.appcompat_appcompat",
|
||||
"androidx.leanback_leanback-preference",
|
||||
"androidx.leanback_leanback",
|
||||
"org.lineageos.settings.resources",
|
||||
"org.lineageos.platform.internal",
|
||||
"vendor.nvidia.hardware.graphics.display-V1.0-java",
|
||||
"android.hardware.nintendo.joycond-V1-java",
|
||||
],
|
||||
}
|
||||
@@ -51,4 +51,15 @@ void vendor_load_properties()
|
||||
ti.property_set("ro.product.vendor.model", ti.property_get("ro.product.model"));
|
||||
ti.property_set("ro.product.vendor.manufacturer", ti.property_get("ro.product.manufacturer"));
|
||||
}
|
||||
|
||||
if (ti.vendor_context()) {
|
||||
std::string perfmgr_suffix;
|
||||
if (ti.is_model("sif") || ti.is_model("modin") ||
|
||||
ti.is_model("fric") || ti.is_model("vali"))
|
||||
perfmgr_suffix += ".t210b01";
|
||||
if (ti.property_get("ro.hardware.vulkan") == "nouveau")
|
||||
perfmgr_suffix += ".nouveau";
|
||||
|
||||
ti.property_set("vendor.powerhal.config", "powerhint" + perfmgr_suffix + ".json");
|
||||
}
|
||||
}
|
||||
@@ -77,19 +77,6 @@ prebuilt_etc {
|
||||
sub_dir: "staging",
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "power.nx.rc",
|
||||
src: "power.nx.rc",
|
||||
device_specific: true, // odm
|
||||
}
|
||||
|
||||
cc_prebuilt_binary {
|
||||
name: "lkm_loader_target",
|
||||
srcs: ["lkm_loader_target.sh"],
|
||||
stem: "lkm_loader_target.sh",
|
||||
vendor: true,
|
||||
}
|
||||
|
||||
cc_prebuilt_binary {
|
||||
name: "jc_setup",
|
||||
srcs: ["jc_setup.sh"],
|
||||
|
||||
@@ -41,8 +41,8 @@ on post-fs-data
|
||||
chown system system /sys/bus/platform/devices/tegradc.0/enable
|
||||
|
||||
# enable oc only if passed from bootloader (no userspace toggle)
|
||||
on property:vold.post_fs_data_done=1 && property:ro.boot.oc=1
|
||||
write /sys/kernel/tegra_cpufreq/overclock 1
|
||||
#on property:vold.post_fs_data_done=1 && property:ro.boot.oc=1
|
||||
# write /sys/kernel/tegra_cpufreq/overclock 1
|
||||
|
||||
on boot
|
||||
write /sys/devices/system/cpu/cpufreq/schedutil/up_rate_limit_us 500
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
on early-init
|
||||
mount debugfs debugfs /sys/kernel/debug mode=0755
|
||||
write /sys/kernel/debug/bpmp/debug/clk/emc/min_rate 2133000000
|
||||
@@ -13,7 +13,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
import init.recovery.usb.rc
|
||||
import init.recovery.ack.rc
|
||||
|
||||
on init
|
||||
setprop ro.minui.pixel_format "BGRA_8888"
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
# limitations under the License.
|
||||
|
||||
# Override and disable cec HAL
|
||||
service vendor.cec-hal-1-0 /vendor/bin/hw/android.hardware.tv.cec@1.0-service
|
||||
override
|
||||
interface android.hardware.tv.cec@1.0::IHdmiCec default
|
||||
class hal
|
||||
user system
|
||||
group system
|
||||
disabled
|
||||
#service vendor.cec-hal-1-0 /vendor/bin/hw/android.hardware.tv.cec@1.0-service
|
||||
# override
|
||||
# interface android.hardware.tv.cec@1.0::IHdmiCec default
|
||||
# class hal
|
||||
# user system
|
||||
# group system
|
||||
# disabled
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/vendor/bin/sh
|
||||
|
||||
/vendor/bin/insmod /vendor/lib/modules/pci-tegra.ko
|
||||
|
||||
/vendor/bin/insmod /vendor/lib/modules/compat.ko
|
||||
/vendor/bin/insmod /vendor/lib/modules/cy_cfg80211.ko
|
||||
/vendor/bin/insmod /vendor/lib/modules/brcmutil.ko
|
||||
/vendor/bin/insmod /vendor/lib/modules/brcmfmac.ko
|
||||
@@ -1,52 +0,0 @@
|
||||
# FORMAT:
|
||||
# panelresolution=[xres]X[yres], such as panelresolution=1280X720
|
||||
# powernode1 maxperf optimized maxbatterylife
|
||||
# powernode2 maxperf optimized maxbatterylife
|
||||
# ......
|
||||
# powernoden maxperf optimized maxbatterylife
|
||||
# panelresolution=[xres]X[yres], such as panelresolution=1920X1080
|
||||
# powernode1 maxperf optimized maxbatterylife
|
||||
# powernode2 maxperf optimized maxbatterylife
|
||||
# ......
|
||||
# powernoden maxperf optimized maxbatterylife
|
||||
# ......
|
||||
# ......
|
||||
# panelresolution=[xres]X[yres], such as panelresolution=1920X1200
|
||||
# powernode1 maxperf optimized maxbatterylife
|
||||
# powernode2 maxperf optimized maxbatterylife
|
||||
# ......
|
||||
# powernoden maxperf optimized maxbatterylife
|
||||
#
|
||||
# NOTES:
|
||||
# The panelresolution is the lcd panel resolution.
|
||||
# No space should exist in panelresolution=[xres]X[yres].
|
||||
# panelresolution=720X1280 equals with panelresolution=1280X720.
|
||||
# For panelresolution=-1X-1, it should be the last set of power settings in this file.
|
||||
# When your panel resolution is found in this file,
|
||||
# it will use the set of power settings followed by your panel resolution.
|
||||
# When your panel resolution is not found in this file, it will use the default power settings.
|
||||
# The power settings followed by panelresolution=-1X-1 is the default power settings.
|
||||
# powernode is the sysfs or variable we need to write and it is followed by three ints.
|
||||
# maxperf, optimized, maxbatterylife are the three ints for different power modes.
|
||||
#
|
||||
# Default power mode: can be set to 0, 1, or 2
|
||||
NV_DEFAULT_MODE 1
|
||||
panelresolution=-1X-1
|
||||
NV_FPSLIMIT 0 0 0
|
||||
NV_MAX_CORES 0 0 0
|
||||
NV_MIN_CORES 2 2 2
|
||||
NV_MAX_FREQ 0 0 1428000
|
||||
NV_MIN_FREQ 900000 0 0
|
||||
NV_MAX_GPU_FREQ 0 0 768000
|
||||
NV_MIN_GPU_FREQ 0 0 0
|
||||
NV_HYPERVOLT_ALPHA 50 0 0
|
||||
NV_APM_CPU_BOOST 5 0 0
|
||||
NV_APM_GPU_BOOST 5 0 0
|
||||
NV_APM_FRT_BOOST 5 0 0
|
||||
NV_APM_PRETHROTTLE 0 1 1
|
||||
NV_APM_FRT_MIN 20 15 15
|
||||
NV_APM_LOADAPPFRT 0 1 1
|
||||
NV_PBC_SYSPOWER_CAP 15000 11000 8500
|
||||
NV_PBC_BATCURRENT_CAP 5000 5000 4100
|
||||
NV_FAN_STATE_CAP 7 3 2
|
||||
NV_FAN_STATE_MAP 80/110/150/200/255 80/110/150/200/255 80/110/150/200/255
|
||||
+5
-17
@@ -1,7 +1,7 @@
|
||||
[
|
||||
{
|
||||
"type": "kernel",
|
||||
"version": "6.12"
|
||||
"version": "mainline"
|
||||
},
|
||||
{
|
||||
"repository": "android_device_nvidia_t210-common",
|
||||
@@ -11,14 +11,6 @@
|
||||
"repository": "android_hardware_nintendo_arm-trusted-firmware",
|
||||
"target_path": "hardware/nintendo/arm-trusted-firmware"
|
||||
},
|
||||
{
|
||||
"repository": "android_hardware_nintendo_joycond",
|
||||
"target_path": "hardware/nintendo/joycond"
|
||||
},
|
||||
{
|
||||
"repository": "android_kernel_nvidia_exfat",
|
||||
"target_path": "kernel/nvidia/exfat"
|
||||
},
|
||||
{
|
||||
"repository": "android_hardware_intel_sensors-iio",
|
||||
"target_path": "hardware/intel/sensors-iio"
|
||||
@@ -31,21 +23,17 @@
|
||||
"repository": "android_hardware_nvidia_light",
|
||||
"target_path": "hardware/nvidia/light"
|
||||
},
|
||||
{
|
||||
"repository": "android_hardware_nvidia_platform_t210_nx",
|
||||
"target_path": "hardware/nvidia/platform/t210/nx"
|
||||
},
|
||||
{
|
||||
"repository": "android_hardware_nvidia_power",
|
||||
"target_path": "hardware/nvidia/power"
|
||||
},
|
||||
{
|
||||
"repository": "android_hardware_nvidia_thermal",
|
||||
"target_path": "hardware/nvidia/thermal"
|
||||
"repository": "android_kernel_nvidia_tegra-build",
|
||||
"target_path": "kernel/platform/kernel-mainline/vendor/nvidia/tegra"
|
||||
},
|
||||
{
|
||||
"repository": "android_kernel_nvidia_tegra-build",
|
||||
"target_path": "kernel/platform/kernel-6.12/vendor/nvidia/tegra"
|
||||
"repository": "android_external_libdisplay-info-upstream",
|
||||
"target_path": "external/libdisplay-info-upstream"
|
||||
},
|
||||
{
|
||||
"repository": "android_prebuilts_gcc_linux-x86_aarch64_aarch64-linux-gnu-9.3",
|
||||
|
||||
-160
@@ -1,160 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2022-2023 The LineageOS Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Gpu driver
|
||||
ifeq ($(TARGET_TEGRA_GPU),nvgpu)
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
governor_pod_scaling \
|
||||
nvgpu
|
||||
else
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
nouveau
|
||||
endif
|
||||
|
||||
# Tegra high speed serial
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
serial-tegra
|
||||
|
||||
# Usb Bluetooth
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
btusb
|
||||
|
||||
# Broadcom wifi
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
brcmfmac-wcc
|
||||
|
||||
# Tegra cec
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
tegra_cec
|
||||
|
||||
# Tegra hdmi audio
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
snd-hda-codec-hdmi \
|
||||
snd-hda-tegra
|
||||
|
||||
# Tegra audio processing engine
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
tegra-aconnect \
|
||||
tegra210-adma \
|
||||
snd-soc-tegra210-sfc \
|
||||
snd-soc-tegra210-i2s \
|
||||
snd-soc-tegra210-mixer \
|
||||
snd-soc-tegra210-amx \
|
||||
snd-soc-tegra210-admaif \
|
||||
snd-soc-tegra210-adx \
|
||||
snd-soc-tegra210-iqc \
|
||||
snd-soc-tegra210-afc \
|
||||
snd-soc-tegra210-dmic \
|
||||
snd-soc-tegra210-mvc \
|
||||
snd-soc-tegra210-ope \
|
||||
snd-soc-tegra-audio-graph-card \
|
||||
snd-soc-rt5640
|
||||
|
||||
# Nvidia Controllers
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
hid-nvidia-shield \
|
||||
hid-nvidia-shield-oot
|
||||
|
||||
# Copy to boot
|
||||
BOOT_KERNEL_MODULES := \
|
||||
system_heap.ko \
|
||||
tegra30-devfreq.ko \
|
||||
cpufreq-dt.ko \
|
||||
tegra124-cpufreq.ko \
|
||||
i2c-tegra.ko \
|
||||
spi-tegra114.ko \
|
||||
spi-tegra210-quad.ko \
|
||||
bq24190_charger.ko \
|
||||
bq27xxx_battery.ko \
|
||||
bq27xxx_battery_i2c.ko \
|
||||
rtc-tegra.ko \
|
||||
gpio-tegra.ko \
|
||||
max77620.ko \
|
||||
gpio-max77620.ko \
|
||||
pinctrl-max77620.ko \
|
||||
max77620-regulator.ko \
|
||||
rtc-max77686.ko \
|
||||
max77812-regulator.ko \
|
||||
gpio-pca953x.ko \
|
||||
tegra20-apb-dma.ko \
|
||||
phy-tegra-xusb.ko \
|
||||
xhci-tegra.ko \
|
||||
tegra-xudc.ko \
|
||||
usb-conn-gpio.ko \
|
||||
pci-tegra.ko \
|
||||
hwmon.ko \
|
||||
pwm-tegra.ko \
|
||||
pwm-fan.ko \
|
||||
pwm-regulator.ko \
|
||||
tegra-soctherm.ko \
|
||||
cqhci.ko \
|
||||
sdhci-tegra.ko \
|
||||
host1x.ko \
|
||||
drm_display_helper.ko \
|
||||
drm_dp_aux_bus.ko \
|
||||
tegra-drm.ko \
|
||||
panel-jdi-58-1440-810.ko \
|
||||
panel-nx-dsi.ko \
|
||||
pwm_bl.ko \
|
||||
bm92txx.ko \
|
||||
ftm4.ko
|
||||
|
||||
# Load in first stage boot
|
||||
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := \
|
||||
system_heap \
|
||||
tegra30-devfreq \
|
||||
tegra124-cpufreq \
|
||||
i2c-tegra \
|
||||
spi-tegra114 \
|
||||
spi-tegra210-quad \
|
||||
bq24190_charger \
|
||||
bq27xxx_battery_i2c \
|
||||
rtc-tegra \
|
||||
gpio-tegra \
|
||||
max77620 \
|
||||
gpio-max77620 \
|
||||
pinctrl-max77620 \
|
||||
max77620-regulator \
|
||||
max77812-regulator \
|
||||
gpio-pca953x \
|
||||
tegra20-apb-dma \
|
||||
phy-tegra-xusb \
|
||||
xhci-tegra \
|
||||
tegra-xudc \
|
||||
usb-conn-gpio \
|
||||
pci-tegra \
|
||||
pwm-tegra \
|
||||
pwm-fan \
|
||||
pwm-regulator \
|
||||
tegra-soctherm \
|
||||
sdhci-tegra \
|
||||
tegra-drm \
|
||||
panel-nx-dsi \
|
||||
pwm_bl \
|
||||
bm92txx \
|
||||
ftm4
|
||||
|
||||
# Copy to recovery
|
||||
RECOVERY_KERNEL_MODULES := \
|
||||
$(BOOT_KERNEL_MODULES) \
|
||||
hid-nvidia-shield.ko \
|
||||
hid-nvidia-shield-oot.ko
|
||||
|
||||
# Load in recovery
|
||||
BOARD_RECOVERY_KERNEL_MODULES_LOAD := \
|
||||
$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD) \
|
||||
hid-nvidia-shield \
|
||||
hid-nvidia-shield-oot
|
||||
+134
-78
@@ -14,98 +14,154 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Nvhost podgov
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
governor_pod_scaling
|
||||
|
||||
# Proprietary gpu driver
|
||||
# Gpu driver
|
||||
ifeq ($(TARGET_TEGRA_GPU),nvgpu)
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
governor_pod_scaling \
|
||||
nvgpu
|
||||
|
||||
# Bluedroid power management
|
||||
else
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
bluedroid_pm
|
||||
nouveau
|
||||
endif
|
||||
|
||||
# Tegra high speed serial
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
serial-tegra
|
||||
|
||||
# Usb Bluetooth
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
btusb
|
||||
|
||||
# Broadcom wifi
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
brcmfmac-wcc
|
||||
|
||||
# Tegra cec
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
tegra_cec
|
||||
|
||||
# Tegra hdmi audio
|
||||
ifeq ($(TARGET_KERNEL_VERSION),6.12)
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
snd-hda-codec-hdmi
|
||||
else
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
snd-hda-codec-tegrahdmi
|
||||
endif
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
snd-hda-tegra
|
||||
|
||||
# Sound codec
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
snd-soc-rt5640
|
||||
|
||||
# Tegra audio processing engine
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
snd-soc-tegra210-alt-xbar \
|
||||
snd-soc-tegra210-alt-admaif \
|
||||
snd-soc-tegra210-alt-sfc \
|
||||
snd-soc-tegra210-alt-i2s \
|
||||
snd-soc-tegra210-alt-mixer \
|
||||
snd-soc-tegra210-alt-afc \
|
||||
snd-soc-tegra210-alt-adx \
|
||||
snd-soc-tegra210-alt-amx \
|
||||
snd-soc-tegra210-alt-dmic \
|
||||
snd-soc-tegra210-alt-mvc \
|
||||
snd-soc-tegra210-alt-ope \
|
||||
snd-soc-tegra-machine-driver
|
||||
|
||||
# Userspace aes crypto access
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
tegra-cryptodev
|
||||
|
||||
# Input cpufreq boost
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
input-cfboost
|
||||
|
||||
# JoyCons
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
joycon-serdev
|
||||
|
||||
# Fan
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
pwm_fan
|
||||
|
||||
# Power Monitor
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
ina3221
|
||||
|
||||
# TV Tuners
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
videobuf-dvb \
|
||||
lgdt3306a \
|
||||
si2168 \
|
||||
si2157 \
|
||||
lgdt3305 \
|
||||
tda18272 \
|
||||
em28xx-dvb \
|
||||
em28xx-rc \
|
||||
cx25840 \
|
||||
cx231xx-dvb
|
||||
|
||||
# FS
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
exfat
|
||||
|
||||
# USB Storage
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
usb-storage
|
||||
|
||||
# USB Modem
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
cdc-acm
|
||||
tegra210-adma \
|
||||
snd-soc-tegra210-ahub \
|
||||
snd-soc-tegra210-sfc \
|
||||
snd-soc-tegra210-i2s \
|
||||
snd-soc-tegra210-mixer \
|
||||
snd-soc-tegra210-amx \
|
||||
snd-soc-tegra210-admaif \
|
||||
snd-soc-tegra210-adx \
|
||||
snd-soc-tegra210-dmic \
|
||||
snd-soc-tegra210-mvc \
|
||||
snd-soc-tegra210-ope \
|
||||
snd-soc-tegra-audio-graph-card
|
||||
|
||||
# Nvidia Controllers
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
ozwpan \
|
||||
hid-nvidia-blake \
|
||||
hid-jarvis-remote
|
||||
hid-nvidia-shield \
|
||||
hid-nvidia-shield-oot
|
||||
|
||||
# Misc Controllers
|
||||
BOARD_VENDOR_KERNEL_MODULES_LOAD += \
|
||||
hid-xinmo \
|
||||
hid-betopff
|
||||
# Copy to boot
|
||||
BOOT_KERNEL_MODULES := \
|
||||
system_heap.ko \
|
||||
tegra30-devfreq.ko \
|
||||
cpufreq-dt.ko \
|
||||
tegra124-cpufreq.ko \
|
||||
i2c-tegra.ko \
|
||||
spi-tegra114.ko \
|
||||
spi-tegra210-quad.ko \
|
||||
bq24190_charger.ko \
|
||||
rtc-tegra.ko \
|
||||
gpio-tegra.ko \
|
||||
max77620.ko \
|
||||
gpio-max77620.ko \
|
||||
pinctrl-max77620.ko \
|
||||
max77620-regulator.ko \
|
||||
max77812-regulator.ko \
|
||||
max77620-restart.ko \
|
||||
max17042_battery.ko \
|
||||
tegra20-apb-dma.ko \
|
||||
phy-tegra-xusb.ko \
|
||||
xhci-tegra.ko \
|
||||
tegra-xudc.ko \
|
||||
usb-conn-gpio.ko \
|
||||
pci-tegra.ko \
|
||||
hwmon.ko \
|
||||
pwm-tegra.ko \
|
||||
pwm-fan.ko \
|
||||
pwm-regulator.ko \
|
||||
tegra-soctherm.ko \
|
||||
cqhci.ko \
|
||||
sdhci-tegra.ko \
|
||||
mtd.ko \
|
||||
spi-nor.ko \
|
||||
mtd_blkdevs.ko \
|
||||
mtdblock.ko \
|
||||
host1x.ko \
|
||||
drm_display_helper.ko \
|
||||
drm_dp_aux_bus.ko \
|
||||
tegra-aconnect.ko \
|
||||
tegra-drm.ko \
|
||||
panel-nx-dsi.ko \
|
||||
pwm_bl.ko \
|
||||
bm92txx.ko \
|
||||
ftm4.ko
|
||||
|
||||
# Load in first stage boot
|
||||
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := \
|
||||
system_heap \
|
||||
tegra20-apb-dma \
|
||||
i2c-tegra \
|
||||
max77620 \
|
||||
max77620-regulator \
|
||||
gpio-tegra \
|
||||
pwm-tegra \
|
||||
pwm-regulator \
|
||||
pinctrl-max77620 \
|
||||
gpio-max77620 \
|
||||
max77812-regulator \
|
||||
tegra124-cpufreq \
|
||||
spi-tegra114 \
|
||||
spi-tegra210-quad \
|
||||
bq24190_charger \
|
||||
rtc-tegra \
|
||||
xhci-tegra \
|
||||
tegra-xudc \
|
||||
usb-conn-gpio \
|
||||
pci-tegra \
|
||||
pwm-fan \
|
||||
tegra-soctherm \
|
||||
max77620-restart \
|
||||
max17042_battery \
|
||||
tegra-aconnect \
|
||||
sdhci-tegra \
|
||||
spi-nor \
|
||||
mtdblock \
|
||||
tegra-drm \
|
||||
panel-nx-dsi \
|
||||
pwm_bl \
|
||||
tegra30-devfreq \
|
||||
bm92txx \
|
||||
ftm4
|
||||
|
||||
# Copy to recovery
|
||||
BOARD_RECOVERY_RAMDISK_KERNEL_MODULES_LOAD := \
|
||||
exfat \
|
||||
hid-nvidia-blake \
|
||||
hid-jarvis-remote \
|
||||
usb-storage
|
||||
RECOVERY_KERNEL_MODULES := \
|
||||
$(BOOT_KERNEL_MODULES)
|
||||
|
||||
RECOVERY_KERNEL_MODULES := $(addsuffix .ko,$(BOARD_RECOVERY_RAMDISK_KERNEL_MODULES_LOAD))
|
||||
# Load in recovery
|
||||
BOARD_RECOVERY_KERNEL_MODULES_LOAD := \
|
||||
$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD)
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
prebuilt_etc {
|
||||
name: "nvphsd.conf",
|
||||
src: "nvphsd.nx.conf",
|
||||
device_specific: true, // odm
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
# Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# T210 platform-specific configuration for NVIDIA's
|
||||
# Power Hinting Service running under /usr/sbin/nvphsd.
|
||||
#
|
||||
cpu_fmax_at_vmin=918000
|
||||
gpu_fmax_at_vmin=460000
|
||||
# tbc, spincircle should be enabled/disabled in sync
|
||||
# il should always be the last governor in the list
|
||||
governor=boot,generic,camera,gpucompute,ui,force,tbc,spincircle,il
|
||||
@@ -1,36 +0,0 @@
|
||||
<!--ThermalHAL Config
|
||||
Attributes for thermal
|
||||
These must be declared as a 'thermal-prop' element node
|
||||
Attributes:
|
||||
name - name of thermal device
|
||||
type - type defined by AOSP
|
||||
sensor-label - tz name
|
||||
multiplier - converting factor to degree Celsius
|
||||
cores - only for CPU type
|
||||
threshold-label - to use a different temperature threshold
|
||||
Attributes for cooling
|
||||
These must be declared as a 'cooling-prop' element node
|
||||
name - name of cooling device
|
||||
type - type defined by AOSP
|
||||
cooling-path - node that represents cooling state
|
||||
Attributes for cpu-usages
|
||||
These must be part of 'cpu_usages' element node
|
||||
cpus - number of cpus in the platform-->
|
||||
<!-- TODO: port est changes from 4.9 -->
|
||||
<thermalhal>
|
||||
<thermal_devices>
|
||||
<thermal_device>
|
||||
<thermal-prop name="CPU" type="DEVICE_TEMPERATURE_CPU" sensor-label="cpu-thermal" multiplier='0.001' />
|
||||
<thermal-prop cores='4' />
|
||||
</thermal_device>
|
||||
<thermal_device>
|
||||
<thermal-prop name="GPU" type="DEVICE_TEMPERATURE_GPU" sensor-label="gpu-thermal" multiplier='0.001' />
|
||||
</thermal_device>
|
||||
</thermal_devices>
|
||||
<cooling_devices>
|
||||
<cooling_device>
|
||||
<cooling-prop name="FAN" type="FAN_RPM" cooling-path="/sys/class/hwmon/hwmon0/rpm" />
|
||||
</cooling_device>
|
||||
</cooling_devices>
|
||||
<cpu_usages cpus="4" />
|
||||
</thermalhal>
|
||||
@@ -16,22 +16,20 @@ Attributes for cooling
|
||||
Attributes for cpu-usages
|
||||
These must be part of 'cpu_usages' element node
|
||||
cpus - number of cpus in the platform-->
|
||||
<!-- TODO: port est changes from 4.9 -->
|
||||
<thermalhal>
|
||||
<thermal_devices>
|
||||
<thermal_device>
|
||||
<thermal-prop name="SKIN" type="DEVICE_TEMPERATURE_SKIN" sensor-label="thermal-fan-est" multiplier='0.001' />
|
||||
</thermal_device>
|
||||
<thermal_device>
|
||||
<thermal-prop name="CPU" type="DEVICE_TEMPERATURE_CPU" sensor-label="CPU-therm" multiplier='0.001' />
|
||||
<thermal-prop name="CPU" type="DEVICE_TEMPERATURE_CPU" sensor-label="cpu-thermal" multiplier='0.001' />
|
||||
<thermal-prop cores='4' />
|
||||
</thermal_device>
|
||||
<thermal_device>
|
||||
<thermal-prop name="GPU" type="DEVICE_TEMPERATURE_GPU" sensor-label="GPU-therm" multiplier='0.001' />
|
||||
<thermal-prop name="GPU" type="DEVICE_TEMPERATURE_GPU" sensor-label="gpu-thermal" multiplier='0.001' />
|
||||
</thermal_device>
|
||||
</thermal_devices>
|
||||
<cooling_devices>
|
||||
<cooling_device>
|
||||
<cooling-prop name="FAN" type="FAN_RPM" cooling-path="/sys/devices/pwm-fan/rpm_measured" />
|
||||
<cooling-prop name="FAN" type="FAN_RPM" cooling-path="/sys/class/hwmon/hwmon0/rpm" />
|
||||
</cooling_device>
|
||||
</cooling_devices>
|
||||
<cpu_usages cpus="4" />
|
||||
|
||||
Vendored
+9
-11
@@ -19,15 +19,13 @@ COMMON_BCM_PATH := vendor/nvidia/common/rel-shield-r/bcm
|
||||
NX_BCM_PATH := vendor/nintendo/nx/rel-shield-r/bcm
|
||||
NX_BCM_EXTERNAL_PATH := vendor/nintendo/nx/external/bcm
|
||||
|
||||
include device/nvidia/tegra-common/vendor/$(TARGET_TEGRA_FIRMWARE_BRANCH)/bcm/bcm4356.mk
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(NX_BCM_PATH)/bcm4356/brcmfmac4356-pcie.clm_blob:$(TARGET_COPY_OUT_VENDOR)/firmware/brcmfmac4356-pcie.clm_blob \
|
||||
$(NX_BCM_EXTERNAL_PATH)/bcm4356/brcmfmac4356A3-pcie.txt:$(TARGET_COPY_OUT_VENDOR)/firmware/brcmfmac4356-pcie.nvidia,odin.txt \
|
||||
$(NX_BCM_EXTERNAL_PATH)/bcm4356/brcmfmac4356A3-pcie.txt:$(TARGET_COPY_OUT_VENDOR)/firmware/brcmfmac4356-pcie.nvidia,modin.txt \
|
||||
$(NX_BCM_EXTERNAL_PATH)/bcm4356/brcmfmac4356A3-pcie.txt:$(TARGET_COPY_OUT_VENDOR)/firmware/brcmfmac4356-pcie.nvidia,vali.txt \
|
||||
$(NX_BCM_EXTERNAL_PATH)/bcm4356/brcmfmac4356A3-pcie.txt:$(TARGET_COPY_OUT_VENDOR)/firmware/brcmfmac4356-pcie.nvidia,fric.txt \
|
||||
$(NX_BCM_EXTERNAL_PATH)/bcm4356/CYW4356A3_001.004.009.0092.0095.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/BCM4356A3.hcd
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(COMMON_BCM_PATH)/bcm4356/brcmfmac4356-pcie.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/brcmfmac4356-pcie.bin
|
||||
$(NX_BCM_PATH)/bcm4356/brcmfmac4356-pcie.clm_blob:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/brcmfmac4356-pcie.nvidia,odin.clm_blob \
|
||||
$(NX_BCM_PATH)/bcm4356/brcmfmac4356-pcie.clm_blob:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/brcmfmac4356-pcie.nvidia,modin.clm_blob \
|
||||
$(NX_BCM_PATH)/bcm4356/brcmfmac4356-pcie.clm_blob:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/brcmfmac4356-pcie.nvidia,vali.clm_blob \
|
||||
$(NX_BCM_PATH)/bcm4356/brcmfmac4356-pcie.clm_blob:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/brcmfmac4356-pcie.nvidia,fric.clm_blob \
|
||||
$(NX_BCM_EXTERNAL_PATH)/bcm4356/brcmfmac4356A3-pcie.txt:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/brcmfmac4356-pcie.nvidia,odin.txt \
|
||||
$(NX_BCM_EXTERNAL_PATH)/bcm4356/brcmfmac4356A3-pcie.txt:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/brcmfmac4356-pcie.nvidia,modin.txt \
|
||||
$(NX_BCM_EXTERNAL_PATH)/bcm4356/brcmfmac4356A3-pcie.txt:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/brcmfmac4356-pcie.nvidia,vali.txt \
|
||||
$(NX_BCM_EXTERNAL_PATH)/bcm4356/brcmfmac4356A3-pcie.txt:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/brcmfmac4356-pcie.nvidia,fric.txt \
|
||||
$(NX_BCM_EXTERNAL_PATH)/bcm4356/CYW4356A3_001.004.009.0092.0095.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/BCM4356A3.hcd
|
||||
Reference in new issue
Block a user