mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-18 02:38:56 +00:00
afc13335a5
The Qualcomm device trees in U-Boot are currently not consistent with the upstream DTs used in the Linux kernel. While some bindings are similar to the official specification in the Linux kernel, several nodes have subtle differences, e.g. the "compatible"s or the exact specification of memory registers. This means that some of the Qualcomm-related U-Boot drivers are not compatible with the Linux DT (and vice versa). The SPMI node is one such example: the "core" region starts at 0x0200f000 in the upstream Linux MSM8916 DT, but in U-Boot it starts at 0x0200f800. The end result is normally the same, since the Linux SPMI driver simply adds the 0x800 internally. However, commitf5a2d6b4b0
("spmi: msm: add arbiter version 5 support") imported this behavior into the U-Boot driver, without adjusting the DB410c/DB820c device trees. This means that the 0x800 offset is now added twice, breaking all SPMI read/write operations: Failed to find PMIC pon node. Check device tree Failed to find pm8916_gpios@c000 node. USB init failed: -6 starting USB... Bus ehci@78d9000: Failed to find pm8916_gpios@c000 node. probe failed, error -6 No working controllers found While the mistake is strictly speaking in the spmi-msm driver, fix the issue by making the SPMI nodes in the DB410c/DB820c consistent with the upstream Linux DT instead. Ideally we should even go a step further by fixing the remaining uses of custom bindings in the U-Boot drivers and moving to using the Linux DTs as-is. This would likely avoid such mistakes in the future and would also make the porting process much easier. Cc: Dzmitry Sankouski <dsankouski@gmail.com> Fixes:f5a2d6b4b0
("spmi: msm: add arbiter version 5 support") Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
142 lines
2.9 KiB
Text
142 lines
2.9 KiB
Text
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Qualcomm APQ8096 based Dragonboard 820C board device tree source
|
|
*
|
|
* (C) Copyright 2017 Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
|
|
*/
|
|
|
|
/dts-v1/;
|
|
|
|
#include "skeleton64.dtsi"
|
|
#include <dt-bindings/pinctrl/pinctrl-snapdragon.h>
|
|
|
|
/ {
|
|
model = "Qualcomm Technologies, Inc. DB820c";
|
|
compatible = "arrow,apq8096-db820c", "qcom,apq8096-sbc";
|
|
#address-cells = <2>;
|
|
#size-cells = <2>;
|
|
|
|
aliases {
|
|
serial0 = &blsp2_uart2;
|
|
};
|
|
|
|
chosen {
|
|
stdout-path = "serial0:115200n8";
|
|
};
|
|
|
|
memory {
|
|
device_type = "memory";
|
|
reg = <0 0x80000000 0 0xc0000000>;
|
|
};
|
|
|
|
reserved-memory {
|
|
#address-cells = <2>;
|
|
#size-cells = <2>;
|
|
ranges;
|
|
|
|
smem_mem: smem_region@86300000 {
|
|
reg = <0x0 0x86300000 0x0 0x200000>;
|
|
no-map;
|
|
};
|
|
};
|
|
|
|
psci {
|
|
compatible = "arm,psci-1.0";
|
|
method = "smc";
|
|
};
|
|
|
|
smem {
|
|
compatible = "qcom,smem";
|
|
memory-region = <&smem_mem>;
|
|
};
|
|
|
|
soc: soc {
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
ranges = <0 0 0 0xffffffff>;
|
|
compatible = "simple-bus";
|
|
|
|
gcc: clock-controller@300000 {
|
|
compatible = "qcom,gcc-msm8996";
|
|
#clock-cells = <1>;
|
|
#reset-cells = <1>;
|
|
#power-domain-cells = <1>;
|
|
reg = <0x300000 0x90000>;
|
|
};
|
|
|
|
pinctrl: qcom,tlmm@1010000 {
|
|
compatible = "qcom,tlmm-apq8096";
|
|
reg = <0x1010000 0x400000>;
|
|
|
|
blsp8_uart: uart {
|
|
function = "blsp_uart8";
|
|
pins = "GPIO_4", "GPIO_5";
|
|
drive-strength = <DRIVE_STRENGTH_8MA>;
|
|
bias-disable;
|
|
};
|
|
};
|
|
|
|
blsp2_uart2: serial@75b0000 {
|
|
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
|
|
reg = <0x75b0000 0x1000>;
|
|
clock = <&gcc 4>;
|
|
pinctrl-names = "uart";
|
|
pinctrl-0 = <&blsp8_uart>;
|
|
};
|
|
|
|
sdhc2: sdhci@74a4900 {
|
|
compatible = "qcom,sdhci-msm-v4";
|
|
reg = <0x74a4900 0x314>, <0x74a4000 0x800>;
|
|
index = <0x0>;
|
|
bus-width = <4>;
|
|
clock = <&gcc 0>;
|
|
clock-frequency = <200000000>;
|
|
};
|
|
|
|
spmi_bus: spmi@400f000 {
|
|
compatible = "qcom,spmi-pmic-arb";
|
|
reg = <0x0400f000 0x1000>,
|
|
<0x04400000 0x800000>,
|
|
<0x04c00000 0x800000>,
|
|
<0x05800000 0x200000>,
|
|
<0x0400a000 0x002100>;
|
|
reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
|
|
#address-cells = <0x1>;
|
|
#size-cells = <0x1>;
|
|
|
|
pmic0: pm8994@0 {
|
|
compatible = "qcom,spmi-pmic";
|
|
reg = <0x0 0x1>;
|
|
#address-cells = <0x1>;
|
|
#size-cells = <0x1>;
|
|
|
|
pm8994_pon: pm8994_pon@800 {
|
|
compatible = "qcom,pm8994-pwrkey";
|
|
reg = <0x800 0x96>;
|
|
#gpio-cells = <2>;
|
|
gpio-controller;
|
|
gpio-bank-name="pm8994_key.";
|
|
};
|
|
|
|
pm8994_gpios: pm8994_gpios@c000 {
|
|
compatible = "qcom,pm8994-gpio";
|
|
reg = <0xc000 0x400>;
|
|
gpio-controller;
|
|
gpio-count = <24>;
|
|
#gpio-cells = <2>;
|
|
gpio-bank-name="pm8994.";
|
|
};
|
|
};
|
|
|
|
pmic1: pm8994@1 {
|
|
compatible = "qcom,spmi-pmic";
|
|
reg = <0x1 0x1>;
|
|
#address-cells = <0x1>;
|
|
#size-cells = <0x1>;
|
|
};
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
#include "dragonboard820c-uboot.dtsi"
|