2022-09-28 17:29:07

by Lin, Meng-Bo

[permalink] [raw]
Subject: [RESEND PATCH v3 0/5] arm64: dts: qcom: msm8916-samsung-j5: Use common device tree

v3: Drop msm8916-samsung-j5.dts temporarily before moving it.
Minor rewords.
v2: Reword and resend. Split common dtsi patch.
Add missing suffix state in pinctrl.

The smartphones below are using the MSM8916 SoC,
which are released in 2015-2016:

Samsung Galaxy J5 2015 (SM-J500*)
Samsung Galaxy J5 2016 (SM-J510*)
Samsung Galaxy J3 2016
- SM-J3109/SM-J320Y/SM-J320YZ
- SM-J320N0/SM-J320ZN
- SM-J320P/SM-J320R4/SM-J320V/SM-S320VL

Add a common device tree for with initial support for:

- GPIO keys
- SDHCI (internal and external storage)
- USB Device Mode
- UART (on USB connector via the SM5703 MUIC)
- WCNSS (WiFi/BT)
- Regulators

The three devices (some varints of J3, all other variants of J5 released
in 2015 and J5X released in 2016) are very similar, with some differences
in display and GPIO pins. The common parts are shared in
msm8916-samsung-j5-common.dtsi to reduce duplication.


2022-09-28 17:50:58

by Lin, Meng-Bo

[permalink] [raw]
Subject: [PATCH v3 1/5] dt-bindings: qcom: Document bindings for new msm8916-samsung-j5 devices

Document the new samsung-j3/j5x device tree bindings used in their
device trees.

Signed-off-by: Lin, Meng-Bo <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
---
Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index fb1d00bcc847..b1c69d4d9a9a 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -176,7 +176,9 @@ properties:
- longcheer,l8910
- samsung,a3u-eur
- samsung,a5u-eur
+ - samsung,j3
- samsung,j5
+ - samsung,j5x
- samsung,serranove
- wingtech,wt88047
- const: qcom,msm8916
--
2.30.2


2022-09-28 17:53:12

by Lin, Meng-Bo

[permalink] [raw]
Subject: [PATCH v3 2/5] arm64: dts: qcom: msm8916-samsung-j5: Drop from Makefile

Before moving msm8916-samsung-j5.dts to msm8916-samsung-j5-common.dtsi,
drop it from Makefile temporarily to avoid errors.

Signed-off-by: Lin, Meng-Bo <[email protected]>
---
arch/arm64/boot/dts/qcom/Makefile | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 1d86a33de528..6db7d9d791d5 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -15,7 +15,6 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-longcheer-l8910.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-mtp.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-a3u-eur.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-a5u-eur.dtb
-dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8992-lg-bullhead-rev-10.dtb
--
2.30.2


2022-09-28 17:56:40

by Lin, Meng-Bo

[permalink] [raw]
Subject: [PATCH v3 3/5] arm64: dts: qcom: msm8916-samsung-j5-common: Add initial common device tree

The smartphones below are using the MSM8916 SoC,
which are released in 2015-2016:

Samsung Galaxy J5 2015 (SM-J500*)
Samsung Galaxy J5 2016 (SM-J510*)
Samsung Galaxy J3 2016
- SM-J3109/SM-J320Y/SM-J320YZ
- SM-J320N0/SM-J320ZN
- SM-J320P/SM-J320R4/SM-J320V/SM-S320VL

Add a common device tree for with initial support for:

- GPIO keys
- SDHCI (internal and external storage)
- USB Device Mode
- UART (on USB connector via the SM5703 MUIC)
- WCNSS (WiFi/BT)
- Regulators

The three devices (some varints of J3, all other variants of J5 released
in 2015 and J5X released in 2016) are very similar, with some differences
in display and GPIO pins. The common parts are shared in
msm8916-samsung-j5-common.dtsi to reduce duplication.

Signed-off-by: Lin, Meng-Bo <[email protected]>
---
...6-samsung-j5.dts => msm8916-samsung-j5-common.dtsi} | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
rename arch/arm64/boot/dts/qcom/{msm8916-samsung-j5.dts => msm8916-samsung-j5-common.dtsi} (94%)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
similarity index 94%
rename from arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts
rename to arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
index eabeed18cfaa..4f71609bf6f8 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
@@ -1,15 +1,10 @@
// SPDX-License-Identifier: GPL-2.0-only

-/dts-v1/;
-
#include "msm8916-pm8916.dtsi"
+
#include <dt-bindings/gpio/gpio.h>

/ {
- model = "Samsung Galaxy J5 (2015)";
- compatible = "samsung,j5", "qcom,msm8916";
- chassis-type = "handset";
-
aliases {
serial0 = &blsp1_uart2;
};
@@ -92,7 +87,6 @@ &usb {

&usb_hs_phy {
extcon = <&pm8916_usbin>;
- qcom,init-seq = /bits/ 8 <0x1 0x19 0x2 0x0b>;
};

&smd_rpm_regulators {
@@ -199,7 +193,7 @@ l18 {
};

&msmgpio {
- gpio_keys_default: gpio-keys-default {
+ gpio_keys_default: gpio-keys-default-state {
pins = "gpio107", "gpio109";
function = "gpio";

--
2.30.2


2022-09-28 17:57:34

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 3/5] arm64: dts: qcom: msm8916-samsung-j5-common: Add initial common device tree

On 28/09/2022 19:00, Lin, Meng-Bo wrote:
> The smartphones below are using the MSM8916 SoC,
> which are released in 2015-2016:
>
> Samsung Galaxy J5 2015 (SM-J500*)
> Samsung Galaxy J5 2016 (SM-J510*)
> Samsung Galaxy J3 2016
> - SM-J3109/SM-J320Y/SM-J320YZ
> - SM-J320N0/SM-J320ZN
> - SM-J320P/SM-J320R4/SM-J320V/SM-S320VL
>
> Add a common device tree for with initial support for:
>
> - GPIO keys
> - SDHCI (internal and external storage)
> - USB Device Mode
> - UART (on USB connector via the SM5703 MUIC)
> - WCNSS (WiFi/BT)
> - Regulators
>
> The three devices (some varints of J3, all other variants of J5 released
> in 2015 and J5X released in 2016) are very similar, with some differences
> in display and GPIO pins. The common parts are shared in
> msm8916-samsung-j5-common.dtsi to reduce duplication.
>
> Signed-off-by: Lin, Meng-Bo <[email protected]>
> ---
> ...6-samsung-j5.dts => msm8916-samsung-j5-common.dtsi} | 10 ++--------

Nope, we loose a board in this commit. Your changes are still not
bisectable - board is gone.

Best regards,
Krzysztof