Re: [PATCH 3/9] arm64: dts: qcom: Add initial QCM2290, PM2250 & RB1 device trees

From: Krzysztof Kozlowski
Date: Tue Apr 04 2023 - 02:06:41 EST


On 03/04/2023 19:36, Konrad Dybcio wrote:
> Add initial device trees for the QCM2290 SoC, QC Robotics RB1 board, as
> well as the bundled PM2250 PMIC.
>
> On the SoC part, CA53 compatibles were used, as Qualcomm claims that's
> what has been implemented, despite the cores reporting a Qualcomm Kryo
> MIDR_EL1[PART_NUM].
>
> To get a successful boot on RB1, run:
>
> cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/qrb2210-rb1.dtb >\
> .Image.gz-dtb
>
> mkbootimg \
> --kernel .Image.gz-dtb \
> --ramdisk some_initrd \
> --output rb1-boot.img \
> --pagesize 4096 \
> --base 0x8000 \
> --cmdline 'some cmdline'
>
> fastboot boot rb1-boot.img
>
> There's no dtbo or other craziness to worry about.
> For the best dev experience, you can erase boot and use fastboot boot
> everytime, so that the bootloader doesn't mess with you.
>
> If you have a SoM revision 3 or older (there should be a sticker on it
> with text like -r00, where r is the revision), you will need to apply
> this additional diff:
>
> aliases {
> - serial0 = &uart0;
> + serial0 = &uart4;
>
> /* UART connected to the Micro-USB port via a FTDI chip */
> -&uart0 {
> +&uart4 {
>
> That should however only concern preproduction boards.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
> ---
> arch/arm64/boot/dts/qcom/Makefile | 1 +
> arch/arm64/boot/dts/qcom/pm2250.dtsi | 63 +++
> arch/arm64/boot/dts/qcom/qcm2290.dtsi | 848 +++++++++++++++++++++++++++++++
> arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 107 ++++
> 4 files changed, 1019 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index 1a29403400b7..6fc8d6664f0c 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -70,6 +70,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8998-xiaomi-sagit.dtb
> dtb-$(CONFIG_ARCH_QCOM) += qcs404-evb-1000.dtb
> dtb-$(CONFIG_ARCH_QCOM) += qcs404-evb-4000.dtb
> dtb-$(CONFIG_ARCH_QCOM) += qdu1000-idp.dtb
> +dtb-$(CONFIG_ARCH_QCOM) += qrb2210-rb1.dtb
> dtb-$(CONFIG_ARCH_QCOM) += qrb5165-rb5.dtb
> dtb-$(CONFIG_ARCH_QCOM) += qrb5165-rb5-vision-mezzanine.dtb
> dtb-$(CONFIG_ARCH_QCOM) += qru1000-idp.dtb
> diff --git a/arch/arm64/boot/dts/qcom/pm2250.dtsi b/arch/arm64/boot/dts/qcom/pm2250.dtsi
> new file mode 100644
> index 000000000000..c5344d6e47c4
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/pm2250.dtsi
> @@ -0,0 +1,63 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)

Odd license. Unless you based it on 2.0+, please use standard dual-license.

> +/*
> + * Copyright (c) 2023, Linaro Ltd
> + */
> +
> +#include <dt-bindings/iio/qcom,spmi-vadc.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/spmi/spmi.h>
> +
> +&spmi_bus {
> + pmic@0 {
> + compatible = "qcom,pm2250", "qcom,spmi-pmic";
> + reg = <0x0 SPMI_USID>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + pon@800 {
> + compatible = "qcom,pm8916-pon";
> + reg = <0x800>;
> +
> + pm2250_pwrkey: pwrkey {
> + compatible = "qcom,pm8941-pwrkey";
> + interrupts-extended = <&spmi_bus 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
> + linux,code = <KEY_POWER>;
> + debounce = <15625>;
> + bias-pull-up;
> + };
> +
> + pm2250_resin: resin {
> + compatible = "qcom,pm8941-resin";
> + interrupts-extended = <&spmi_bus 0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
> + debounce = <15625>;
> + bias-pull-up;
> + status = "disabled";
> + };
> + };
> +
> + rtc@6000 {
> + compatible = "qcom,pm8941-rtc";
> + reg = <0x6000>, <0x6100>;
> + reg-names = "rtc", "alarm";
> + interrupts-extended = <&spmi_bus 0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
> + };
> +
> + pm2250_gpios: gpio@c000 {
> + compatible = "qcom,pm2250-gpio", "qcom,spmi-gpio";
> + reg = <0xc000>;
> + gpio-controller;
> + gpio-ranges = <&pm2250_gpios 0 0 10>;
> + #gpio-cells = <2>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> + };
> +
> + pmic@1 {
> + compatible = "qcom,pm2250", "qcom,spmi-pmic";
> + reg = <0x1 SPMI_USID>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +};
> \ No newline at end of file

Patch error to fix.

> diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
> new file mode 100644
> index 000000000000..27d4742cdb19
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
> @@ -0,0 +1,848 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)

Same concern. Also in DTS.

Best regards,
Krzysztof