1. Home
  2. Software Development for MediaTek X20
  3. Camera Porting Guide
  4. 2.DTS

2.DTS

2.1 Power on template

Add your sensor to PowerOnList @ kd_camera_hw.c

No default power on sequence

kdCISModulePowerOn()

kdCISModulePowerOn()

– hwpoweron()

  • _hwPowerOn() for regulator( aka LDO)
  • mtkcam_gpio_set() for gpio
  • mt_set_gpio_mode(), mt_set_gpio_dir() and mt_set_gpio_out()
  • hwPowerOn() regulator( aka LDO)

2.2 GPIO

2.2.1 Usage

– To control the PWD/RST pin for camera power on

– To control the external LDO for camera

2.2.2Kernel 3.18

– Kernel standard

– PINCTRL

For details, please find kernel-3.18/ Documentation/pinctrl.txt

– Need customized for each project manually

Ex.kernel-3.18/arch/arm64/boot/dts/amt6797_64_open.dts

2.3 PINCTRL

pinctrl_state

Functions

pinctrl_lookup_state()

get specified pinctrl_state descripted in xxx.dts

am0_pnd_hGPIO state for PDN of main cam @ high,

cam0_pnd_l→GPIO state for PDN of main cam @ low

  – pinctrl_select_state()

pinctrl_select_state(camctrl, cam0_pnd_l); →set PDN of main cam to low

Was this article helpful to you? Yes No

How can we help?