Skip to content

dts: msm8952 & msm8953: add support for Samsung j3poplte and j7poplte#594

Open
agrecascino wants to merge 2 commits intomsm8916-mainline:mainfrom
agrecascino:main
Open

dts: msm8952 & msm8953: add support for Samsung j3poplte and j7poplte#594
agrecascino wants to merge 2 commits intomsm8916-mainline:mainfrom
agrecascino:main

Conversation

@agrecascino
Copy link

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpicks.

Comment on lines +14 to +15
<QCOM_BOARD_ID_MTP 0x06>;
soc {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<QCOM_BOARD_ID_MTP 0x06>;
soc {
<QCOM_BOARD_ID_MTP 0x06>;
soc {

linux,phandle = <0xff>;
phandle = <0xff>;
};
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
};
};


&lk2nd {
model = "Samsung J7 Perx (SM-J727P)";
compatible = "samsung,j7poplte";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
compatible = "samsung,j7poplte";
compatible = "samsung,j7popltespr";


&lk2nd {
model = "Samsung J3 Emerge (SM-J327P)";
compatible = "samsung,j3poplte";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
compatible = "samsung,j3poplte";
compatible = "samsung,j3popltespr";

- Redmi Note 3 Pro (kenzo)
- Redmi Note 5A (ugglite)
- Redmi Note 5A Prime (ugg)
- Samsung J3 Emerge (j3poplte)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Samsung J3 Emerge (j3poplte)
- Samsung J3 Emerge (j3popltespr)

- OPPO R9s/R9sk (R9s/R9sk) (quirky - see comments in `lk2nd/device/dts/msm8953/msm8953-oppo-r9s.dts`)
- Samsung Galaxy A6+
- Samsung Galaxy J8 LTE
- Samsung J7 Perx (j7poplte)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Samsung J7 Perx (j7poplte)
- Samsung J7 Perx (j7popltespr)

#include <lk2nd.dtsi>

/ {
qcom,msm-id = <0x12f 0x00 0x134 0x00 0x135 0x00>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it msm8917 or msm8937?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Varies by carrier. They share the same board, but the sprint variant packages the full MSM8937, all other carriers package the 8917.

Comment on lines +31 to +32
$(LOCAL_DIR)/sdm450-samsung-r04.dtb \
$(LOCAL_DIR)/msm8953-samsung-j7poplte.dtb \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$(LOCAL_DIR)/sdm450-samsung-r04.dtb \
$(LOCAL_DIR)/msm8953-samsung-j7poplte.dtb \
$(LOCAL_DIR)/msm8953-samsung-j7popltespr.dtb \
$(LOCAL_DIR)/sdm450-samsung-r04.dtb \

$(LOCAL_DIR)/msm8917-huawei-agassi.dtb \

QCDTBS += \
$(LOCAL_DIR)/msm8917-samsung-j3poplte.dtb \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$(LOCAL_DIR)/msm8917-samsung-j3poplte.dtb \
$(LOCAL_DIR)/msm8917-samsung-j3popltespr.dtb \

};
};

reserved-memory {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this reserved-memory range is necessary?

#size-cells = <0x01>;
ranges = <0x00 0x00 0xffffffff>;

qcom,memshare {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this memshare node is necessary

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The memshare node is necessary, along with the reserved memory regions. Samsung's variant of LK attempts to delete these nodes upon loading the DTB, and if they are not present crashes and reboots the phone.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a comment with those quirks noted, like in other dts where bootloader wants to update/delete nodes.

soc {
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x0 0x0 0xffffffff>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is part of the skeleton

#size-cells = <1>;
ranges = <0x0 0x0 0x0 0xffffffff>;

qcom,memshare {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is neccassry

};
};

reserved-memory {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this reserved-memory node is necessary

@agrecascino
Copy link
Author

I'm going to clean up this PR sometime soon and change the j3poplte port to just cover the j3popltespr variant as I think that resolves the DTB ambiguity. Hopefully that should be enough.

@agrecascino
Copy link
Author

Force pushed my fixes.

Comment on lines 30 to +32
$(LOCAL_DIR)/msm8953-motorola-potter.dtb \
$(LOCAL_DIR)/sdm450-samsung-r04.dtb \
$(LOCAL_DIR)/msm8953-samsung-j7popltespr.dtb \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$(LOCAL_DIR)/msm8953-motorola-potter.dtb \
$(LOCAL_DIR)/sdm450-samsung-r04.dtb \
$(LOCAL_DIR)/msm8953-samsung-j7popltespr.dtb \
$(LOCAL_DIR)/msm8953-motorola-potter.dtb \
$(LOCAL_DIR)/msm8953-samsung-j7popltespr.dtb \
$(LOCAL_DIR)/sdm450-samsung-r04.dtb \

Copy link
Member

@TravMurav TravMurav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for a delay, see some comments below


/ {
qcom,msm-id = <QCOM_ID_MSM8917 0x00>;
qcom,board-id = <QCOM_BOARD_ID_MTP 0x00>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 clashes with msm8917-mtp. Are you sure you need all those ids?

#size-cells = <0x01>;
ranges = <0x00 0x00 0xffffffff>;

qcom,memshare {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a comment with those quirks noted, like in other dts where bootloader wants to update/delete nodes.

Comment on lines +50 to +51
linux,phandle = <0xff>;
phandle = <0xff>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like hardcoded phandles. Please drop those, give this node a label and use it above in memory-region = <0xff>;

&lk2nd {
model = "Samsung J3 Emerge (SM-J327P)";
compatible = "samsung,j3popltespr";
lk2nd,match-device = "J3POPLTE";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we're doing match-device and this is mtp-ish, I'd appreciate to see a subnode for j3popwhatever here, like in other dts that cover many devices.

@@ -0,0 +1,72 @@
// SPDX-License-Identifier: GPL-2.0-only

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the license inherited from somewhere? If this is a new file, I'd appreciate this being BSD-3-Clause

/* bootloader refuses the dtb if it cannot delete some nodes. */
soc {
qcom,memshare {
memory-region = <0xff>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto for label/phandle but this is even worse since it points to some random node, who knows if it may crash some bootloader later...

&lk2nd {
model = "Samsung J7 Perx (SM-J727P)";
compatible = "samsung,j7popltespr";
lk2nd,match-device = "J7POPLTE";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto for subnode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants