Skip to content

dts: qcom: msm8916-mf601xx, msm8916-mf32: initial support #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

Conversation

ghost
Copy link

@ghost ghost commented Jun 15, 2024

Previous pull request see #329 #310

Tested MF601SL_CT_V07 and MF32_MB_V2 devices.

rbqvq added 5 commits June 15, 2024 10:41
This commit adds support for the MF32 series WiFi/LTE dongle made by
Tong Heng Wei Chuang based on MSM8916.
Compared to previous UFI-001C, MF32 ships more peripherals, such as
battery/charger, SD Card slot, more LEDs and buttons etc.

Note: The original firmware does not support 64-bit OS. It is necessary
to flash 64-bit TZ firmware to boot arm64.
Note: The original firmware works on 750MHz, It is necessary to downgrade
cpu frequency

Currently supported:
- All CPU cores
- Buttons
- LEDs
- Modem
- SDHC
- USB Device Mode / Host Mode
- UART

Signed-off-by: Coia Prant <[email protected]>
Document the new thwc,mf32-v2 device tree bindings used in their device
trees.

Signed-off-by: Coia Prant <[email protected]>
This commit adds support for the MF601 series WiFi/LTE dongle made by
Tong Heng Wei Chuang based on MSM8916.
Compared to previous UFI-001C, MF601 ships more peripherals, such as
battery/charger, SD Card slot, more LEDs and buttons etc.

Note: The original firmware does not support 64-bit OS. It is necessary
to flash 64-bit TZ firmware to boot arm64.
Note: The original firmware works on 750MHz, It is necessary to downgrade
cpu frequency

Currently supported:
- All CPU cores
- Buttons
- LEDs
- Modem
- SDHC
- USB Device Mode / Host Mode
- UART

Signed-off-by: Yang Xiwen <[email protected]>
Tested-by: Coia Prant <[email protected]>
Document the new thwc,mf601sl-v7 device tree bindings used in their device
trees.

Signed-off-by: Yang Xiwen <[email protected]>
All of them already have arm64 support in mainline. But for the
following reasons, it might be appropriate to add arm32 aupport:

1. arm64 is only supoorted with an updated tz. It's quite dangerous to
   flash tz, and it will break the downstream Android system.
2. arm64 consumes more RAM than arm32, which can not be ignored due to
   only 512 MiB of RAM (~320MiB available) for these devices.

So add arm32 support for them, even when arm64 is available.

Signed-off-by: Yang Xiwen <[email protected]>
Signed-off-by: Coia Prant <[email protected]>
Copy link

@wonderfulShrineMaidenOfParadise wonderfulShrineMaidenOfParadise left a comment

Choose a reason for hiding this comment

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

You will also need to sign off on every patches authored by yourself.

0003-arm64-dts-qcom-msm8916-thwc-mf601xx-Add-initial-devi.patch:333: ERROR:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Coia Prant <[email protected]>'
0004-dt-bindings-qcom-Document-msm8916-thwc-mf601sl-v7.patch:28: ERROR:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Coia Prant <[email protected]>'

Comment on lines +253 to +254
- thwc,mf601sl-v7
- thwc,mf32-v2

Choose a reason for hiding this comment

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

              - thwc,mf32-v2
              - thwc,mf601sl-v7
              - thwc,uf896
              - thwc,ufi001c

Comment on lines +38 to +42
qcom-msm8916-thwc-uf896.dtb \
qcom-msm8916-thwc-ufi001c.dtb \
qcom-msm8916-thwc-mf601sl-v7.dtb \
qcom-msm8916-thwc-mf32-v2.dtb \
qcom-msm8916-yiming-uz801v3.dtb \

Choose a reason for hiding this comment

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

Suggested change
qcom-msm8916-thwc-uf896.dtb \
qcom-msm8916-thwc-ufi001c.dtb \
qcom-msm8916-thwc-mf601sl-v7.dtb \
qcom-msm8916-thwc-mf32-v2.dtb \
qcom-msm8916-yiming-uz801v3.dtb \
qcom-msm8916-thwc-mf32-v2.dtb \
qcom-msm8916-thwc-mf601sl-v7.dtb \
qcom-msm8916-thwc-uf896.dtb \
qcom-msm8916-thwc-ufi001c.dtb \
qcom-msm8916-yiming-uz801v3.dtb \

Comment on lines +65 to +66
dtb-$(CONFIG_ARCH_QCOM) += msm8916-thwc-mf601sl-v7.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-thwc-mf32-v2.dtb

Choose a reason for hiding this comment

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

dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-thwc-mf32-v2.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-thwc-mf601sl-v7.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-thwc-uf896.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-thwc-ufi001c.dtb

};

&leds {
led-wan-green {

Choose a reason for hiding this comment

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

Sort the nodes in alphabetical order or GPIO pins.

};

&leds {
led-wan-green {

Choose a reason for hiding this comment

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

Sort.

@@ -0,0 +1,3 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "arm64/qcom/msm8916-thwc-mf32-v2.dts"
#include "qcom-msm8916-smp.dtsi"

Choose a reason for hiding this comment

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

A bit of weird without newline.

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.

Please also check what checkpatch complains about.

Also probably want to look at the commit authorship since I see two s-o-b on most of them but i.e. no Co-developed-by: or [changelog] note to show why two people handled these commits.

So please:

  • Make sure all commits have s-o-b of the author.
  • If you want to give additional attribution to Yang, add either:
    • Co-developed-by: + s-o-b from Yang (or from you if Yang is suppsed to be the Author:), or
    • a note like [Coia: Added x y z] + s-o-b

Thanks for working on this!


/dts-v1/;

#include "msm8916-thwc-mf32.dtsi"
Copy link
Member

Choose a reason for hiding this comment

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

Would this dtsi be used by some other device later? You may want to motivate this in the commit message.

@@ -250,6 +250,7 @@ properties:
- samsung,serranove
- thwc,uf896
- thwc,ufi001c
- thwc,mf32-v2
Copy link
Member

Choose a reason for hiding this comment

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

Please reorder commits so that the dt-bindings is always before the usage of the binding (i.e. first bindings then dts that uses it)

@@ -62,6 +62,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-on7.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-thwc-uf896.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-thwc-ufi001c.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-thwc-mf601sl-v7.dtb
Copy link
Member

Choose a reason for hiding this comment

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

Authorship on this commit looks weird weird...

From e0513f159f005d12f1ba91716bc4f0b405498059 Mon Sep 17 00:00:00 2001
From: Coia Prant <[email protected]>
Date: Sat, 15 Jun 2024 10:24:54 +0000
Subject: [PATCH] arm64: dts: qcom: msm8916-thwc-mf601xx: Add initial device
 tree
...
Signed-off-by: Yang Xiwen <[email protected]>
Tested-by: Coia Prant <[email protected]>

You're designated as an author but sob is from Yang, then there is your tested-by, which looks weird as author's testing their own patch is implied...

@ghost ghost closed this by deleting the head repository Oct 27, 2024
barni2000 pushed a commit to msm89x7-mainline/linux that referenced this pull request Dec 20, 2024
…ode.

[ Upstream commit d5c367e ]

creating a large files during checkpoint disable until it runs out of
space and then delete it, then remount to enable checkpoint again, and
then unmount the filesystem triggers the f2fs_bug_on as below:

------------[ cut here ]------------
kernel BUG at fs/f2fs/inode.c:896!
CPU: 2 UID: 0 PID: 1286 Comm: umount Not tainted 6.11.0-rc7-dirty msm8916-mainline#360
Oops: invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
RIP: 0010:f2fs_evict_inode+0x58c/0x610
Call Trace:
 __die_body+0x15/0x60
 die+0x33/0x50
 do_trap+0x10a/0x120
 f2fs_evict_inode+0x58c/0x610
 do_error_trap+0x60/0x80
 f2fs_evict_inode+0x58c/0x610
 exc_invalid_op+0x53/0x60
 f2fs_evict_inode+0x58c/0x610
 asm_exc_invalid_op+0x16/0x20
 f2fs_evict_inode+0x58c/0x610
 evict+0x101/0x260
 dispose_list+0x30/0x50
 evict_inodes+0x140/0x190
 generic_shutdown_super+0x2f/0x150
 kill_block_super+0x11/0x40
 kill_f2fs_super+0x7d/0x140
 deactivate_locked_super+0x2a/0x70
 cleanup_mnt+0xb3/0x140
 task_work_run+0x61/0x90

The root cause is: creating large files during disable checkpoint
period results in not enough free segments, so when writing back root
inode will failed in f2fs_enable_checkpoint. When umount the file
system after enabling checkpoint, the root inode is dirty in
f2fs_evict_inode function, which triggers BUG_ON. The steps to
reproduce are as follows:

dd if=/dev/zero of=f2fs.img bs=1M count=55
mount f2fs.img f2fs_dir -o checkpoint=disable:10%
dd if=/dev/zero of=big bs=1M count=50
sync
rm big
mount -o remount,checkpoint=enable f2fs_dir
umount f2fs_dir

Let's redirty inode when there is not free segments during checkpoint
is disable.

Signed-off-by: Qi Han <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This pull request was closed.
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.

3 participants