Skip to content

Commit

Permalink
dts: msm8952: Add support for HMD Global Nokia 5
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgigena committed Nov 22, 2024
1 parent d76b47d commit 8b00ee0
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 0 deletions.
1 change: 1 addition & 0 deletions Documentation/devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@

- BQ X5 Plus (Longcheer L9360)
- HMD Global Nokia 6 (ple)
- HMD Global Nokia 5 (nd1)
- Huawei Honor 7C (aum-l41) (quirky - see comment in `lk2nd/device/dts/msm8952/msm8937-huawei-aum.dts`)
- Leeco s2
- Lenovo K5 Play (l38011)
Expand Down
26 changes: 26 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
description = "Development shell for building lk2nd";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
};

outputs = { self, nixpkgs }: {
devShell.x86_64-linux =
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
pkgs.mkShell {
packages = with pkgs; [
android-tools # Fastboot and ADB
gcc-arm-embedded # ARM GCC toolchain
dtc # Device Tree Compiler
gnutar # GNU tar
python312 # Python 3.12
python312Packages.libfdt # Development files for libfdt
python312Packages.pyasn1-modules # Python ASN.1 modules (optional, for signing)
python312Packages.pycryptodome # Python cryptography library (optional, for signing)
];

shellHook = ''
echo "Development shell for building lk2nd"
echo "To build, run: make TOOLCHAIN_PREFIX=arm-none-eabi- <target>"
'';
};
};
}
27 changes: 27 additions & 0 deletions lk2nd/device/dts/msm8952/msm8937-nokia-nd1.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <skeleton64.dtsi>
#include <lk2nd.dtsi>

/ {
qcom,msm-id = <QCOM_ID_MSM8937 0x2000>;
qcom,board-id = <0x94 0>;
};

&lk2nd {
nd1 {
model = "HMD Global Nokia 5 (nd1)";
compatible = "nokia,nd1";
lk2nd,match-device = "ND1";

lk2nd,dtb-files = "msm8937-nokia-nd1";

gpio-keys {
compatible = "gpio-keys";
up {
lk2nd,code = <KEY_VOLUMEUP>;
gpios = <&tlmm 91 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};
};
};
1 change: 1 addition & 0 deletions lk2nd/device/dts/msm8952/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ADTBS += \
$(LOCAL_DIR)/msm8937-motorola-jeter.dtb \
$(LOCAL_DIR)/msm8937-mtp.dtb \
$(LOCAL_DIR)/msm8937-nokia-ple.dtb \
$(LOCAL_DIR)/msm8937-nokia-nd1.dtb \
$(LOCAL_DIR)/msm8937-xiaomi-land.dtb \
$(LOCAL_DIR)/msm8940-mtp.dtb \
$(LOCAL_DIR)/msm8940-oppo-a57.dtb \
Expand Down

0 comments on commit 8b00ee0

Please sign in to comment.