1.hdmi(edid)+可设置分辨率+默认分辨率
(1)\sdk-9.0\device\rockchip\rk3288\BoardConfig.mk
BOARD_SHOW_HDMI_SETTING = true
(2)添加服务(工程目录下lunch后,使用 get_build_var DEVICE_MANIFEST_FILE 查看自己使用的是哪个 manifest.xml )
\sdk-9.0\device\rockchip\common\manifest.xml
<hal format="hidl">
<name>rockchip.hardware.outputmanager</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IRkOutputManager</name>
<instance>default</instance>
</interface>
</hal>
(3)设置默认分辨率
\sdk-9.0\device\rockchip\rk3288\device.mk
PRODUCT_PROPERTY_OVERRIDES += \
.............
ro.rk.displayd.enable=false \
vendor.hwc.device.primary=LVDS \
vendor.hwc.device.extend=HDMI-A \
persist.vendor.resolution.aux=1920x1080p60
(4) 显示 hdmi logo ( dts)
&route_hdmi {
status = "okay";
};
2.ov13850
(1) sdk-9.0\kernel\arch\arm\configs\rockchip_defconfig
CONFIG_VIDEO_OV13850=y
(2)dts
&i2c3 {
status = "okay";
ov13850: ov13850@10 {
compatible = "ovti,ov13850";
status = "okay";
reg = <0x10>;
clocks = <&cru SCLK_VIP_OUT>;
clock-names = "xvclk";
reset-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
pwdn-gpios = <&gpio8 8 GPIO_ACTIVE_HIGH>;
rockchip,camera-module-index = <0>;
rockchip,camera-module-facing = "back";
rockchip,camera-module-name = "CMK-CT0116";
rockchip,camera-module-lens-name = "Largan-50013A1";
port {
cam_out: endpoint {
remote-endpoint = <&mipi_in_cam>;
data-lanes = <1 2>;
};
};
};
};
&mipi_phy_tx1rx1 {
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
mipi_in_cam: endpoint@1 {
reg = <1>;
remote-endpoint = <&cam_out>;
data-lanes = <1 2>;
};
};
port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
mipi_sensor_input: endpoint@0 {
reg = <0>;
remote-endpoint = <&isp_mipi_in>;
};
};
};
};
&rkisp1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&isp_mipi>;
port {
#address-cells = <1>;
#size-cells = <0>;
isp_mipi_in: endpoint@0 {
reg = <0>;
remote-endpoint = <&mipi_sensor_input>;
};
};
};
(3)dts
有复用脚,为了不影响摄像头正常工作,关掉。
&isp {
status = "disabled";
};
(4) \sdk-9.0\hardware\rockchip\camera\etc\camera\camera3_profiles_rk3288.xml
参照 camera3_profiles_rk3399.xml 中配置的ov13850
3.GPS (ST-91-U7 S/N:40309)
(1)dts
&uart3 {
status = "okay";
};
(2)新建 \sdk-9.0\device\rockchip\common\gps
+ Android.mk
+ gps_zkw.c
mmm device\rockchip\common\gps\
必须单独编译,看打印信息 gps.default.so 是否在 vendor/lib/hw/gps.default.so 下,否则手动添加。(android9 要求)
(3)手动添加 gps.default.so
find -name gps.default.so 查找gps.default.so所在的目录,copy到\sdk-9.0\device\rockchip\common\gps目录下
\sdk-9.0\device\rockchip\common\device.mk
PRODUCT_COPY_FILES += \
device/rockchip/common/gps/gps.default.so:vendor/lib/hw/gps.default.so
将 gps.default.so 自动 copy 到指定目录下。
(4)添加配置
\sdk-9.0\device\rockchip\common\device.mk
# GPS HAL
PRODUCT_PACKAGES += \
android.hardware.gnss@1.0-impl \
android.hardware.gnss@1.0-service
使用 get_build_var DEVICE_MANIFEST_FILE 查看自己使用的是哪个 manifest.xml
\sdk-9.0\device\rockchip\common\manifest.xml
<hal format="hidl">
<name>android.hardware.gnss</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IGnss</name>
<instance>default</instance>
</interface>
</hal>
(5)ttyS3 添加权限 (看权限需求)
\sdk-9.0\device\rockchip\common\init.rk30board.rc
chmod 777 /dev/ttyS3
(6)关掉 logcat 中GPS的打印信息 (看需求修改)
gps_zkw.c
#define GPS_DEBUG 0
#define NEMA_DEBUG 0
(7)app已打开,还是没有数据,查看打印信息,发现uart3 的gpio7_B0被占用,于是修改后,gps接收数据正常。
(8)默认打开或关闭gps(仅app上的打开或关闭,但收星服务一直在进行)
\sdk-9.0\frameworks\base\packages\SettingsProvider\res\values\defaults.xml
<string name="def_location_providers_allowed" translatable="false">gps</string> 默认打开
<string name="def_location_providers_allowed" translatable="false"></string> 默认关闭
4. 4G (EC20)
(1)dts
在 vcc_3g 中查看使能脚gpio7_A3是否配置正确(根据原理图)
(2)\sdk-9.0\device\rockchip\common\BoardConfig.mk
#for rk 4g modem
- #BOARD_HAS_RK_4G_MODEM ?= false
+ BOARD_HAS_RK_4G_MODEM ?= true
+ #ifeq ($(strip $(BOARD_HAS_RK_4G_MODEM)),true)
+ #DEVICE_MANIFEST_FILE := device/rockchip/common/4g_modem/manifest.xml
+ #endif
(3)指定 Vendor ril 库的路径
sdk-9.0\device\rockchip\rk3288\device.mk
PRODUCT_PROPERTY_OVERRIDES += \
...........
+ rild.libpath=/vendor/lib/libreference-ril.so \
+ rild.libargs=-d /dev/ttyUSB0 \
(4)使用 get_build_var DEVICE_MANIFEST_FILE 查看自己使用的是哪个 manifest.xml
\sdk-9.0\device\rockchip\common\manifest.xml
<hal format="hidl">
<name>android.hardware.radio</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>IRadio</name>
<instance>slot1</instance>
</interface>
<interface>
<name>ISap</name>
<instance>slot1</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.radio.deprecated</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IOemHook</name>
<instance>slot1</instance>
</interface>
</hal>
(5)3.拷贝供应商给的arm64-v8a目录下的文件: libreference-ril.so chat ip-down ip-up 到:
device\rockchip\rk3288 目录下。并copy到指定系统目录下。
sdk-9.0\device\rockchip\rk3288\rk3288.mk
+ PRODUCT_COPY_FILES += device/rockchip/rk3288/EC20-4G-lib/libreference-ril.so:vendor/lib/libreference-ril.so
+ PRODUCT_COPY_FILES += device/rockchip/rk3288/EC20-4G-lib/chat:system/bin/chat
+ PRODUCT_COPY_FILES += device/rockchip/rk3288/EC20-4G-lib/ip-up:system/bin/ip-up
+ PRODUCT_COPY_FILES += device/rockchip/rk3288/EC20-4G-lib/ip-down:system/bin/ip-down
5. 音频随机性报错
[ 2.870105] ES8323 2-0010: Failed to issue reset
[ 2.870123] ES8323 2-0010: ASoC: failed to probe component -6
[ 2.870160] asoc-simple-card sound: ASoC: failed to instantiate card -6
到驱动定位到出错的地方,发现是复位的问题,复位失败。
static int es8323_reset(struct snd_soc_codec *codec)
{
int ret,val;
ret=snd_soc_write(codec, ES8323_CONTROL1, 0x80);
mdelay(200);
if(ret<0)
{
val=snd_soc_write(codec, ES8323_CONTROL1, 0x80);
}
ret=snd_soc_write(codec, ES8323_CONTROL1, 0x00);
mdelay(200);
return ret;
}