宏定义相关
是设备树有问题,比如没包含宏定义所在的头文件:
&i2c2 {
status = "okay";
pinctrl-0 = <&i2c2_pb0_pins>;
pinctrl-names = "default";
touchscreen@48 {
reg = <0x48>;
compatible = "ti,tsc2007";
interrupt-parent = <&pio>;
interrupts = <6 14 IRQ_TYPE_EDGE_FALLING>;
gpios = <&pio 6 14 GPIO_ACTIVE_LOW>; /* PG14 */
ti,x-plate-ohms = <660>;
wakeup-source;
};
};
这里用到了IRQ_TYPE_EDGE_FALLING
和GPIO_ACTIVE_LOW
这两个宏定义,但是没有引用宏定义所在的头文件,加上就行:
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
port 相关
/ {
soc {
hdmi: hdmi@5500000 {
compatible = "allwinner,sun20i-d1-dw-hdmi";
reg = <0x5500000 0x10000>;
reg-io-width = <1>;
interrupts = <109 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_HDMI>,
<&ccu CLK_HDMI_24M>,
<&ccu CLK_HDMI_CEC>;
clock-names = "iahb", "isfr", "cec";
resets = <&ccu RST_BUS_HDMI_SUB>;
reset-names = "ctrl";
phys = <&hdmi_phy>;
phy-names = "phy";
status = "disabled";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
hdmi_in_tcon_top: endpoint {
remote-endpoint = <&tcon_top_hdmi_out_hdmi>;
};
};
hdmi_out: port@1 {
reg = <1>;
};
};
};
};
};
/ {
hdmi_connector: connector {
compatible = "hdmi-connector";
type = "a";
port {
hdmi_connector_in: endpoint { // A
remote-endpoint = <&hdmi_out_connector>;
};
};
};
};
&hdmi_out {
hdmi_out_connector: endpoint { // B
remote-endpoint = <&hdmi_connector_in>;
};
};
A 和 B 是成对出现的,两者要互相指向对方,单独出现就会有问题,编译不会报错但是uboot解析会出这个问题,而出现一个 C 也指向 A 会在编译时报错。要么都注释掉