修改dts配置文件,以som 256的camera为例,查看实际硬件连接的是i2C3:
&i2c_gpio0 {
status = "disabled";
hm1055@24 {
compatible = "himax,hm1055";
reg = <0x24>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ccap0>;
clocks = <&clk CCAP0_GATE>;
clock-names = "xclk";
reset-gpios = <&gpiom 1 GPIO_ACTIVE_LOW>; /* PM1 */
powerdown-gpios = <&gpiok 8 GPIO_ACTIVE_HIGH>; /* PK8 */
port {
hm1055_0: endpoint {
remote-endpoint = <&ccap0_1>;
};
};
};
};
修改为:
&i2c3 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
hm1055@24 {
compatible = "himax,hm1055";
reg = <0x24>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ccap0>;
clocks = <&clk CCAP0_GATE>;
clock-names = "xclk";
reset-gpios = <&gpiom 1 GPIO_ACTIVE_LOW>; /* PM1 */
powerdown-gpios = <&gpiok 8 GPIO_ACTIVE_HIGH>; /* PK8 */
port {
hm1055_0: endpoint {
remote-endpoint = <&ccap0_1>;
};
};
};
};
然后增加i2c3相关配置:
i2c3 {
pinctrl_i2c3: i2c3grp{
nuvoton,pins =
<SYS_GPM_MFPH_PM14MFP_I2C3_SDA &pcfg_default>,
<SYS_GPM_MFPH_PM15MFP_I2C3_SCL &pcfg_default>;
};
}; |
[url=]使用特权[/url]
|