rockchip平台ov9281驱动设备树
时间: 2023-08-30 21:10:46 浏览: 467
以下是Rockchip平台上OV9281摄像头的设备树示例:
```
&i2c1 {
ov9281@30 {
compatible = "ovti,ov9281";
reg = <0x30>;
clocks = <&cru SCLK_I2C1>;
clock-names = "xclk";
reset-gpios = <&gpio3 RK_PD0 GPIO_ACTIVE_LOW>;
powerdown-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&ov9281_mclk &ov9281_pwdn &ov9281_rst>;
mclk = <24000000>;
mclk_source = <0>;
mclk_inv;
mclk_ext;
mclk_initial_skip;
mclk_cont;
mclk_no_stop;
mclk_sample_delay = <0>;
mclk_sample_edge = <0>;
mclk_sample_phase = <0>;
mclk_calculate_rate;
mclk_calculate_div;
avdd-supply = <&vcc_3v3>;
dvdd-supply = <&vcc_1v8>;
iovdd-supply = <&vcc_io>;
pwnn-supply = <&vcc_1v8>;
reset-gpio = <&gpio3 RK_PD0 GPIO_ACTIVE_LOW>;
status = "okay";
};
};
&vcc_io {
regulator-name = "vcc-io";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
&vcc_1v8 {
regulator-name = "vcc-1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
&vcc_3v3 {
regulator-name = "vcc-3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
&gpio3 {
ov9281_mclk: ov9281-mclk {
rockchip,pins = <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
rockchip,pinmux = <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
rockchip,direction = <0>;
rockchip,output = <0>;
};
ov9281_pwdn: ov9281-pwdn {
rockchip,pins = <0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
rockchip,pinmux = <0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
rockchip,direction = <0>;
rockchip,output = <1>;
};
ov9281_rst: ov9281-rst {
rockchip,pins = <1 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
rockchip,pinmux = <1 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
rockchip,direction = <0>;
rockchip,output = <1>;
};
};
```
需要注意以下几点:
- `compatible` 属性必须为 "ovti,ov9281"。
- `reg` 属性为 OV9281 I2C 地址。
- `mclk` 属性为 OV9281 的时钟频率。
- `reset-gpios` 和 `powerdown-gpios` 属性为 OV9281 的复位和电源管理引脚。
- `pinctrl-names` 和 `pinctrl-0` 属性为 OV9281 的引脚配置信息。
- `avdd-supply`、`dvdd-supply`、`iovdd-supply` 和 `pwnn-supply` 属性为 OV9281 的电源供应信息。
- `status` 属性为 "okay" 表示设备节点已启用。
阅读全文