Commit Graph
112 Commits
Author SHA1 Message Date
Nolen Johnson 363a56fd99 nx: Hardcode FCM level to 4
* We have our own device-specific HAL (sensor),
  so we can't use the common one.

Change-Id: I0a6fcba7f99256d592ebaef2a3f162f9e316a489
2024-06-02 18:30:27 +00:00
Nolen Johnson b06291c0f0 nx: Use rel-shield-r memtrack
* Due to some race condition, nvmap header isn't avaible
  sometimes, use this until it's fixed.

Change-Id: I0dff36059aecb3575307373f20d51531ccf0ae1e
2024-06-02 18:30:27 +00:00
Michael Bestas cdde544ea1 nx: Enforce vintf kernel requirements
The build system enables this for shipping API level >=29
but we also want it to pass the vintf runtime checks.

Change-Id: Ie2147893a1551b736880913334a3c134a17ca91c
2024-06-02 18:30:27 +00:00
Aaron Kling 53f089a206 Switch to light module
Currently results in no change to the target image, but this allows
updates to the target in one place instead of each device tree.

Change-Id: I13d095307ed1dcb2375ae7193b9abc3be30b3bdf
2024-06-02 18:30:27 +00:00
Aaron Kling 2c5e112178 Switch to thermal module
Currently results in no change to the target image, but this allows
updates to the target in one place instead of each device tree.

Change-Id: I9dbc06b6a64604c46851f3c4aef3f189c83f042d
2024-06-02 18:30:27 +00:00
Nolen Johnson 8a7e83f617 nx: Drop legacy trust HAL
* Dead, will need to move to newer USB HAL at some
  point if we decide to.

Change-Id: Ic356186642f3a7fc777e2ddc956dbb49842ef451
2024-03-21 17:18:56 -04:00
Nolen Johnson 056f28d82a Revert "nx: Use minimal GMS if building with it"
This reverts commit 525c9b6d18.

Reason: We now have enough space for full GMS with dynamic partitions.
Change-Id: I7c3ab4c187b7284f5d03471531cd57238e6fd953
(cherry picked from commit 0bf0c81a31bf64c11b58be5b27ed3a57add2c9d6)
2024-02-06 07:45:28 +00:00
tmakin 14af49d754 nx: Pretend to be launched to dynamic partitions
* We are aren't launched with Android at all to, but
  our partitions were origianlly set up to match
  foster, as it is our closest hardware counterpart.

* Those partition sizes are now to small to fit
  almost any form of GMS.

* The fact that users have to exploit their console,
  run a custom first stage bootloader (Hekate), and
  applications bootloader (u-boot) that we control
  means that instead of retrofitting dynamic partitions
  we can just _launch with them_ (as we have yet to ship
  this device).

* Treat this device as if it has always had dynamic
  partitions and let Hekate set us up to reflect that.

* Do away with SAR in the process, as Hekate can turn
  that off.

* Nuke MDA, we don't support hardware backed encryption
  anyway, so it doesn't make any sense to house.

Reference: https://github.com/CTCaer/hekate/pull/922
Change-Id: I1e5d8c309d08559873ea3c93ac5b4b6e197b528e
2024-02-05 00:57:38 +00:00
Tim Zimmermann be5097fe23 nx: Inherit non_ab_device.mk
* This is required to build applypatch for updating recovery

Change-Id: I38053691f7724b5d6c30159c410d5d04ac136180
2024-01-29 13:43:29 -05:00
Nolen Johnson d452398bb4 nx: Account for vendor restructure
Change-Id: I880c51ec4bb435f086c36639bd4a036fd243ce1f
2024-01-29 13:43:29 -05:00
Aaron Kling f73490fc10 Convert vendor makefile inherits to includes
Some variables that need checked in the vendor makefiles are being
purged by the inherit macro.

Change-Id: I3942e953ff0fb3adfaabc7189a92bff92818de0d
2024-01-29 11:58:41 -05:00
Aaron Kling ba8c478824 Switch to modules.load for lkm
Change-Id: I1a44f93747c37db7faea2a54cce90bfdbdb7ae1c
2024-01-29 11:58:41 -05:00
Chenyang Zhong 66cd5b36e1 nx: Ship cgroups.json and task_profiles.json
Google's prebuilt cgroups.json and task_profiles.json for products
launched with previous API levels only covers
ro.product.first_api_level >= 28. [1]

SHEILD Android TV was launched with Lollipop (API level 21), so
schedtune and task groups are completely broken. Since the system
also checks /vendor/etc for vendor profiles, make a copy of
cgroups_28.json and task_profiles_28.json and ship them to
/vendor/etc. Profiles for previous API levels are all the same
anyway.

Test: boot and check /dev/stune/

[1] system/core/libprocessgroup/profiles/

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Change-Id: I65fe622a804a720a97b43d8092cc8a37703f4b64
2024-01-29 11:58:41 -05:00
tmakin 00463cc094 nx: power: add powerhal xml
Based on xml parsing code in NVIDIA power HAL. This allows
JoyCon proper sleep functionality to work.

Change-Id: If4d50b43ac592a22dfc02d3a13a711ac68c0b227
2024-01-25 15:54:02 -05:00
tmakin c2632c6fa3 nx: cec: Use the AOSP CEC HAL
* `nx` does not support nvhdmi.

Change-Id: Ie68babe3240b9f50cc99f80819cbbe66bdc94199
2024-01-25 15:54:02 -05:00
tmakin 2ef2da1d0f nx: use intel iio/sysfs sensor hal
Set up in polling mode--trigger and event mode will need testing. Will
also require testing for generalized calib profile for max range.

Change-Id: I8e58cac0288ba8b53f3451c239c15c0a906db8d4
2024-01-25 15:54:02 -05:00
tmakin c34b5ceee1 nx: use a better default dpi
The small ~7" 16:9 displays need smaller, higher res elements,
without making TVs look terrible when docked (without forcing
wm-based dpi changes). Use 214 (~tvdpi) for density and use tvdpi
assets on atv and xhdpi assets on mobile.

Change-Id: I1d5847ef5dbb11a83e403788f4f8d757b0ec55cd
2024-01-25 15:54:02 -05:00
tmakin 04fbabf802 nx: CEC: Add idc to disable CEC rc device
* Inputs are duplicated because the CEC HAL directly processes them while
  the RC device is handled as a standard input device. This disables the
  latter to stop the duplication.

Change-Id: Ifa07683b4f0509e8027630a15af6e0dbd1636452
2024-01-25 15:54:02 -05:00
tmakin 4c4e9d36da nx: Override and hide cec on vali
* Again, we do not plan to support vali display hacks for the
  time being. If so, we will add env and do it that way.

* filter-out CEC for vali because common trees assume that unified
  devices will all support CEC or none.

Change-Id: I1df0d895de870a3ebd76825fe278997e83435922
2024-01-25 15:54:02 -05:00
Billy Laws ef6a02e5f6 nx: Add Wi-Fi reset script
Change-Id: Ica5129d824253b5a2576b68f290555d90dd31116
2024-01-25 15:54:02 -05:00
Billy Laws 5342e76c3a nx: Build joycond
* A daemon providing mappings for joycons and controlling docking.

Change-Id: I0f9832bd2edfce628ef296bec7117e2a7b0370af
2024-01-25 15:54:02 -05:00
tmakin 18f3ced0a6 nx: joycons: Add auto-pairing scripts
Change-Id: I24d093638eb6b8ff1d4ad218f7cc2f303711766a
2024-01-25 15:54:02 -05:00
Nolen Johnson 2197a26d86 nx: Opt out of GMS comms suite
Change-Id: I7ebd0960ac9adad758ecb5ca1a3660f73447a9d1
2024-01-25 15:54:02 -05:00
Bruno Martins 525c9b6d18 nx: Use minimal GMS if building with it
Only minimal GMS fits.

Change-Id: If9ce99880bcd6949354f80882176aaaded9aad85
2024-01-25 15:54:02 -05:00
tmakin 0bcbb773ae nx: devicesettings: Add OLED panel preference
* Adds selection for Samsung OLED panel modes.

Change-Id: Ifd90e764deb8b481b81c04911e8680a4bb577ac6
2024-01-25 15:54:02 -05:00
de575ce4ac nx: devicesettings: Initial NX specific version
This is a squash of the following loosely kept history:

```
Rename device settings, override the common version, and build it

Change-Id: Ifff795f77ccc299d284eed56b050dfd59c8563a3

Set display resolution, disable HW overlays and unlock screen automatically when docked

devicesettings: Add power profiles support and cleanup scaling

Code cleanup and fix docked display size setting

devicesettings: Add DPI scaling

Always disable HW Overlays

Properly handle multiple external displays rather than hardcoding ID

devicesettings: Add fan profile support

Remove internal display dpi scaling

Add nice devicesettings icon

devicesettings: Fix atv scaling by restoring past resolution on undock

devicesettings: Fix icon colour and reset power profile on unlock

Expose DeviceSettings in leanback launcher

In the future a leanback variant should be made.

DockService: Updates to support ATV display handling

devicesettings: Add HWC wake rotation workaround

Remove HW overlays workaround from DockService and use prop instead

devicesettings: Add fan coefficient setting for perf profiles
Change-Id: Idf524a50ac96e1adc299b109be9319f6cc161cd9

Cleanup DockService

dockservice: update log statements

- Adds log statement on entering HDMI disconnected block
- Changes display index logging from error to information
```

Co-authored-by: Thomas Makin <halorocker89@gmail.com>
Co-authored-by: CTCaer <ctcaer@gmail.com>
Co-authored-by: Billy Laws <blaws05@gmail.com>
Co-authored-by: Aaron Kling <webgeek1234@gmail.com>
Change-Id: I0013b598431c7ec28e95de92343f4aa25b9ee5e5
2024-01-25 15:54:02 -05:00
Billy Laws 222288f085 nx: Add upstream brcmfmac support
Change-Id: I75d23cac951610f23c3a6f8f7a9e0dea573de243
2024-01-25 15:54:02 -05:00
Nolen Johnson 594315bd7e nx: Inherit proper shipping API via makefile
* We don't have multiple shipping API's, so set
  the lowest common denominator for blobs/kernel.

Change-Id: I69248774df49c42253ef967df057f467625bb5b1
2024-01-25 15:54:02 -05:00
Nolen Johnson 878f432e06 nx: Remove wifi_scan_config
* Used for blake and nvwifi support, which we
  don't include on nx.

Change-Id: Idce7243ccbe9f380700680c5b2d47d51dfde1237
2024-01-25 14:56:46 -05:00
Nolen Johnson f126e4a849 nx: Inherit 7-inch dalvik-head instead of 10-inch
* We're closer to a 7-inch tablet.

Change-Id: I7961697b565fd415b0c87c49c62bb2fe65374a65
2024-01-25 14:56:46 -05:00
Nolen Johnson c043f8fde0 nx: Inherit loki_foster_e_common instead of loki_e_common
* We don't need `update_js_touch_fw.sh` which is the only
  thing housed in `init.loki_e_common.rc`.

Change-Id: I0025fc0fd7297af276964a73e54195cd30513be6
2024-01-25 14:56:46 -05:00
Nolen Johnson e558c2d2e8 nx: Don't include NVidia Shield specific permissions or apps
Change-Id: I8430cef9a4c17822d5cba3257406d92163a40a6f
2024-01-25 14:56:46 -05:00
Nolen Johnson 1296f86b45 nx: Drop nvcamera
* We don't need/want it.

Change-Id: I8478dd3f97d105f6e0443dee389a922789933ea0
2024-01-25 14:56:46 -05:00
Nolen Johnson 2d301eb17f nx: Remove aptX
* NX is not licensed for this feature.

Change-Id: If5c15d3e0666b6399fd197853b5fdb3b60d23fc0
2024-01-25 14:56:46 -05:00
Nolen Johnson 819888bfec nx: Drop prebuilt kernel support
* We have no compatible prebuilts to make use of.
* Make comment more accurate.

Change-Id: I1aa8ce48a251b2237d9d9edefcc53aa96d2bcc2f
2024-01-25 14:56:46 -05:00
Nolen Johnson d77796eebe nx: Remove support for EKS2
* Useless on devies without L1 keys, which `nx` devices
  clearly don't have.

Change-Id: I8e2cd27fbfe278bcc70eb35bff2d0a594b1c63f3
2024-01-25 14:56:46 -05:00
Aaron Kling 31b4eccfcb nx: Fallback to software gatekeeper/keymaster
* On nx, the tegra keymaster doesn't work, as we don't have
  a proper TEE to interact with.

Change-Id: Id71d2b02a6ea05a38928f5fe97306201513feb7f
2024-01-25 14:56:46 -05:00
Nolen Johnson 8fe2b74fb6 nx: Remove 3.10 kernel conditionals
* All `nx` models use the 4.9 kernel.

Change-Id: I1eea3007a5658af6f6c733b2811d853ae4014efb
2024-01-25 14:56:46 -05:00
Nolen Johnson 13b922a5d6 nx: Remove convertible-port support
This is a squashed revert of:

Revert "Add darcy rro"

This reverts commit 6c4b0320ee.

Revert "convertiblehal: This is a device specific prebuilt, not common"

This reverts commit a72b1112d2

Only enable covertible port hal on darcy/mdarcy

This reverts commits 447e73d8a2

Add convertible port hal

Used by darcy and mdarcy to switch one of the usb ports from host
to device mode for adb.

This reverts commit c98dc6335b

Reason: We aren't darcy.
Change-Id: I0087736ad07c98828b821f8b53894420aacb9e9b
2024-01-25 14:56:46 -05:00
Nolen Johnson 39b16e7fa7 nx: Remove netflix configurations/permissions
This is a squashed revert of:

Revert "Import Netflix permissions and properties"

This reverts commit 6982b5917a.

Revert "Allow netflix to operate in doze"

This reverts commit c7241664f9.

Revert "Set nrdp modelgroup prop based on device"

mdarcy and sif have a different value than foster and darcy

Also restrict setting netflix props and installing configs to atv
targets

This reverts commit 22912ef909

Revert "Add netflix config overlay"

This replicates the stock configs

Based on example by luca020400

This reverts commit 3e0a9c33f6

Reason: NX devices do not support Netflix on Android
Change-Id: Ifafb5a6b81567bf177ba186518bf4b2c1d7ca14a
2024-01-25 14:56:46 -05:00
Nolen Johnson 1adef049d8 nx: Add support for tablet style builds
* `nx_tab` build target.
* Split TV/Tablet build characteristics and DPI.

Change-Id: I1c94647bb2e43fdc04a6f33249585a24a2e310bc
2024-01-25 14:56:46 -05:00
c03875880c nx: Intial rebrand from foster
* This is a tree for all Nintendo Switch variants:
  `odin`, `modin`, `vali`, and `frig`.
* `ro.hardware` will be NX on all variants with
   `ro.hardware.sku` being set per variant by u-boot.

Changes are as follows:
* At the moment the packaged DTB is only for `odin`, more to follow.
 * Note: We may make `modin`, `vail`, and `frig` device-tree-overlays
   on the `odin` base DTB to simplify things.
* Use darcy's thermal config as it's the most lenient, and is a same SoC STB.
* Unlike `icosa_sr` previously did, we will use the BCM HAL for BT over
  BTLinux, as A2DP is tested and verified, no need to deviate.

Changes that will require follow-up commits to build out:
* Update init to reflect nx's needs - will need more work to support devices
  other than `odin`.

Removals are as follows:
* Remove all non-nx device support files.

Co-authored-by: Thomas Makin <halorocker89@gmail.com>
Co-authored-by: Billy Laws <blaws05@gmail.com>
Co-authored-by: Aaron Kling <webgeek1234@gmail.com>
Co-authored-by: CTCaer <ctcaer@gmail.com>
Co-authored-by: John Smith <nemui3353@gmail.com>
Co-authored-by: langerhans <langerhans@users.noreply.github.com>
Co-authored-by: Nolen Johnson <johnsonnolen@gmail.com>
Change-Id: I9bab4d94c6e94a9c6e2a7cf04d16c4b76c0b6ac5
2024-01-25 14:56:45 -05:00
tmakin c202c404d1 nvaudio: Remove broken nvaudio_fx.xml
* Broken even on stock, so basically a no-op.

Change-Id: If4e0593f6ecbc8ca1102e4b618a77a4f5774c504
2024-01-25 14:47:58 -05:00
Aaron Kling c76adb8408 Refactor audio policy
Previously, audio policy was handled by product type, such as tablet or
atv. This was never correct, as policy should be based on the device
variant and is not affect by product type. This sets the default policy
to the basic set top box and devkit variant, and moves the mobile
variant to be used by devices with speakers. As the variants are no longer
in the same folder as other xmls, all includes need to use absolute paths.

Change-Id: I9de7848e653cf90353be915aec46247fa9d49739
2024-01-07 20:29:59 -06:00
Roshan Pius de645ec8d8 Add WifiOverlay
Bug: 148617260
Test: Device boots up and connects to wifi networks.
Change-Id: Iec27a6d947a232a42451ef095dc73d1a52327db5
2023-09-24 18:29:18 +00:00
Aaron Kling 2de1ada59e Rebrand icosa to nx
Change-Id: Ic97a429c449dd6f7c7d0d5999ebc9b9640d2e8f0
2023-03-09 21:38:47 -06:00
Aaron Kling a737cd9d80 Only build cypress-fmac module on kernel 4.9
Change-Id: I4c900cc508a04a2d20240418da045a7e0607f800
2022-08-06 15:48:04 -05:00
Aaron Kling baf32600be Only build wireguard module on kernel 3.10 and 4.9
Wireguard was merged in kernel 5.6, thus not needed on 5.10 or newer

Change-Id: Ic89ab82666c33bd7a76cd5038f1f82b16d3424fc
2022-08-06 15:48:04 -05:00
Aaron Kling 2540e46752 Set NV_BUILD_KERNEL_OPTIONS as needed by the rel-34 kernel
For simplicity, refactor TARGET_TEGRA_KERNEL to contain the decimal
point, and pass that to NV_BUILD_KERNEL_OPTIONS.

Change-Id: I08311ab07358cdd1d6e180dac8230f22f8de317c
2022-04-25 14:22:31 -05:00
Aaron Kling 9a5a77bc3f Add enctune config for nvmm
This config is used for encoder tuning, setting bitrates for nvenc

Change-Id: Ib0de6557ecda8ececc0b461a72313d873a3db583
2022-03-22 20:22:53 -05:00