Re: [PATCH 5/5] arm64: dts: qcom: Add Sony Xperia 10 V (PDX235) support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-08-18 17:23:28, Konrad Dybcio wrote:
> 10 V is a carbon copy of the 10 IV, sans:
> 
> - camera setup (V obviously has a new, better one)
> - the phone's body and SIM/sdcard tray changed a bit
> - SM5038 is gone, PMIC QGauge is used for battery monitoring
> - some wires may be routed differently (e.g. i2c devices are routed to
>   different hosts)
> - possibly some small other differences that we're about to discover
> 
> Introduce support for PDX235, currently requiring zero changes other
> than adding msm-id and board-id, which seems to be the result of Sony
> (or their chinese ODM) fusing in a non-zero value in there..
> 
> All of the flashing and prepwork shenanigans described in
> Commit 4420e60416cb ("arm64: dts: qcom: Add device tree for Sony Xperia
> 10 IV") are also necessary on this device :/
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
> ---
>  arch/arm64/boot/dts/qcom/Makefile                  |  1 +
>  .../dts/qcom/sm6375-sony-xperia-murray-pdx235.dts  | 54 ++++++++++++++++++++++

I just learned that the new device actually has a slightly different
board, with codename zambezi:

https://github.com/sonyxperiadev/kernel-copyleft-dts/blob/68.0.A.0.xxx/somc/blair-zambezi-pdx235_common.dtsi

How do you want to represent that?  We could have:

    sm6375-sony-xperia(-common?).dtsi
    sm6375-sony-xperia-murray-pdx225.dts
    sm6375-sony-xperia-zambezi-pdx235.dts

So that you can still keep 95% of the common configuration in the same
file, but without pretending that pdx235 uses the murray board.

- Marijn

>  .../boot/dts/qcom/sm6375-sony-xperia-murray.dtsi   |  2 +-
>  3 files changed, 56 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index 2cca20563a1d..832b4acb20dd 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -196,6 +196,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-sony-xperia-seine-pdx201.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-xiaomi-laurel-sprout.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm6350-sony-xperia-lena-pdx213.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm6375-sony-xperia-murray-pdx225.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= sm6375-sony-xperia-murray-pdx235.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm7225-fairphone-fp4.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-microsoft-surface-duo.dtb
> diff --git a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx235.dts b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx235.dts
> new file mode 100644
> index 000000000000..80a61961e5c5
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx235.dts
> @@ -0,0 +1,54 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2023, Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/arm/qcom,ids.h>
> +
> +#include "sm6375-sony-xperia-murray.dtsi"
> +
> +/ {
> +	model = "Sony Xperia 10 V";
> +	compatible = "sony,pdx235", "qcom,sm6375";
> +	chassis-type = "handset";
> +	qcom,msm-id = <QCOM_ID_SM6375 0x10000>;
> +	qcom,board-id = <QCOM_BOARD_ID(QRD, 0x1, 0x0) 0x0>;
> +
> +	aliases {
> +		i2c0 = &i2c0;
> +		i2c1 = &i2c7;
> +		i2c2 = &i2c10;
> +		i2c3 = &i2c8;
> +	};
> +};
> +
> +&i2c0 {
> +	clock-frequency = <400000>;
> +	status = "okay";
> +
> +	/* NXP SN2x0 NFC @ 28. (or on &spi2.. TBD!) */
> +};
> +
> +&i2c7 {
> +	clock-frequency = <400000>;
> +	status = "okay";
> +
> +	/* Awinic AW882xx audio amplifier ("channel 0") @ 34 */
> +};
> +
> +/* I2C8 inherited from common DTSI */
> +
> +&i2c10 {
> +	clock-frequency = <400000>;
> +	status = "okay";
> +
> +	/* Awinic AW882xx audio amplifier ("channel 1") @ 34 */
> +	/* PM8008 @ 8, 9 */
> +};
> +
> +/* For reasons yet unknown, it's broken on the mark V.. */
> +&touchscreen {
> +	status = "fail";
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray.dtsi b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray.dtsi
> index 072f7ce2a7f6..243e60d9bbb5 100644
> --- a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray.dtsi
> @@ -123,7 +123,7 @@ &i2c8 {
>  	clock-frequency = <400000>;
>  	status = "okay";
>  
> -	touchscreen@48 {
> +	touchscreen: touchscreen@48 {
>  		compatible = "samsung,s6sy761";
>  		reg = <0x48>;
>  		interrupt-parent = <&tlmm>;
> 
> -- 
> 2.41.0
> 



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux