gpt4 book ai didi

linux - 在 linux devicetree (arm) 中定义 3 个由相同 GPIO 引脚控制的调节器

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:43:31 26 4
gpt4 key购买 nike

我有一 block 板,我正在为其修复/编写设备树,基于 rk3288 (rockchip)。在该文件中,目前有以下三个独立监管机构的定义:

    dovdd_1v8: dovdd-1v8-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&dvp_pwr>;
regulator-name = "dovdd_1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&vcc_io>;
};

vcc28_dvp: vcc28-dvp-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&dvp_pwr>;
regulator-name = "vcc28_dvp";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
vin-supply = <&vcc_io>;
};

af_28: af_28-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&dvp_pwr>;
regulator-name = "af_28";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
vin-supply = <&vcc_io>;
};

问题是内核提示它无法将相同的 GPIO 引脚分配给这 3 个调节器。在电路板原理图中,调节器由相同的 GPIO 引脚控制。

正确的做法是什么?

谢谢!B

编辑:这是我在串行控制台上看到的错误消息:

[    0.270507] rockchip-pinctrl pinctrl: pin gpio0-11 already requested 
by dovdd-1v8-regulator; cannot claim for vcc28-dvp-regulator
[ 0.270570] rockchip-pinctrl pinctrl: pin-11 (vcc28-dvp-regulator) status -22
[ 0.270611] rockchip-pinctrl pinctrl: could not request pin 11 (gpio0-11) from group dvp-pwr on device rockchip-pinctrl
[ 0.270663] reg-fixed-voltage vcc28-dvp-regulator: Error applying setting, reverse things back

cif power regulators

最佳答案

稳压器子系统允许单个 GPIO 启用多个稳压器。
我在 fixed.c 中找不到代码或 core.c这将禁止多个监管机构共享一个启用 GPIO。

既然您已经添加了显着错误消息,问题就更清楚了。
您收到的错误消息不是来自 GPIO 资源管理,而是来自 pinctrl 子系统。
可能的原因是每个调节器的 pinctrl 组声明不正确。(您还没有发布设备树的那部分。)
因此你会得到一个 pinctrl 分配错误,这与 GPIO 分配错误不同。
(pinctrl 子系统处于比 GPIO 管理更低的级别,并且可以为外围功能分配引脚,也就是引脚多路复用,以及 GPIO。)

我不确定 DT 中的正确修复应该是什么。
假设只有一个 pinctrl 组为使能 GPIO 声明,您可以尝试在一个调节器节点中只使用一次。 IOW 删除其他两个调节器中的 pinctrl 属性。

关于linux - 在 linux devicetree (arm) 中定义 3 个由相同 GPIO 引脚控制的调节器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40037988/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com