Re: [PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

From: Krzysztof Kozlowski
Date: Sun Oct 22 2023 - 14:46:19 EST


On 22/10/2023 19:38, Luka Panio wrote:
> Initial support for Xiaomi Pad 6 tablet, that have sm8250 soc.
>
> Signed-off-by: Luka Panio <lukapanio@xxxxxxxxx>
> ---
> v2:
> Update commit message. Drop reserved gpio's as this device in reality do not have gpio, and pins are not protected.
>

> v3:
> Update commit message.
>
> v4:
> Update commit message.
>
> v5:
> Update commit message.
>
> v6:
> Update commit message.
> ---
> arch/arm64/boot/dts/qcom/Makefile | 1 +
> .../boot/dts/qcom/sm8250-xiaomi-pipa.dts | 625 ++++++++++++++++++
> 2 files changed, 626 insertions(+)
> create mode 100644 arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
>
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index 2cca20563a1d..41ab333d1f81 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -208,6 +208,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sm8250-sony-xperia-edo-pdx203.dtb
> dtb-$(CONFIG_ARCH_QCOM) += sm8250-sony-xperia-edo-pdx206.dtb
> dtb-$(CONFIG_ARCH_QCOM) += sm8250-xiaomi-elish-boe.dtb
> dtb-$(CONFIG_ARCH_QCOM) += sm8250-xiaomi-elish-csot.dtb
> +dtb-$(CONFIG_ARCH_QCOM) += sm8250-xiaomi-pipa.dtb
> dtb-$(CONFIG_ARCH_QCOM) += sm8350-hdk.dtb
> dtb-$(CONFIG_ARCH_QCOM) += sm8350-microsoft-surface-duo2.dtb
> dtb-$(CONFIG_ARCH_QCOM) += sm8350-mtp.dtb
> diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
> new file mode 100644
> index 000000000000..41eae1aaa2a8
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
> @@ -0,0 +1,625 @@
> +// SPDX-License-Identifier: BSD-3-Clause

If there are no other copyrights here, why did you use BSD-3 license?

> +/*
> + * Copyright (c) 2023 luka177 <lukapanio@xxxxxxxxx>
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/arm/qcom,ids.h>
> +#include <dt-bindings/phy/phy.h>
> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include "sm8250.dtsi"
> +#include "pm8150.dtsi"
> +#include "pm8150b.dtsi"
> +#include "pm8150l.dtsi"
> +#include "pm8009.dtsi"
> +
> +/*
> + * Delete following upstream (sm8250.dtsi) reserved
> + * memory mappings which are different on this device.
> + */
> +/delete-node/ &adsp_mem;
> +/delete-node/ &cdsp_secure_heap;
> +/delete-node/ &slpi_mem;
> +/delete-node/ &spss_mem;
> +/delete-node/ &xbl_aop_mem;
> +
> +/ {
> +
> + model = "Xiaomi Pad 6";
> + compatible = "xiaomi,pipa", "qcom,sm8250";
> +
> + classis-type = "tablet";

chassis-type

It does not look like you tested the DTS against bindings. Please run
`make dtbs_check W=1` (see
Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).


> +
> + /* required for bootloader to select correct board */
> + qcom,msm-id = <QCOM_ID_SM8250 0x20001>; /* SM8250 v2.1 */
> + qcom,board-id = <0x34 0>;

0x34 or 34?

> +
> + chosen {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;

....

> +
> +&i2c13 {
> + clock-frequency = <400000>;
> + status = "okay";
> +
> + fuel-gauge@55 {
> + compatible = "ti,bq27z561";
> + reg = <0x55>;
> + monitored-battery = <&battery_l>;
> + };
> +};
> +
> +
> +

Just one blank line

> +&pcie0 {
> + status = "okay";
> +};
> +
> +&pcie0_phy {
> + vdda-phy-supply = <&vreg_l5a_0p88>;
> + vdda-pll-supply = <&vreg_l9a_1p2>;
> + status = "okay";
> +};



Best regards,
Krzysztof