20231227在Firefly的AIO-3399J开发板的Android11的挖掘机的DTS配置单后摄像头ov13850
2023/12/27 18:40
1、简略步骤:
rootroot@rootroot-X99-Turbo:~/3TB$ cat Android11.0.tar.bz2.a* > Android11.0.tar.bz2
rootroot@rootroot-X99-Turbo:~/3TB$ tar jxvf Android11.0.tar.bz2?
rootroot@rootroot-X99-Turbo:~/3TB$ mv Android11.0 61Android11.0
rootroot@rootroot-X99-Turbo:~/3TB$ cd 61Android11.0
rootroot@rootroot-X99-Turbo:~/3TB/61Android11.0$ cd u-boot
rootroot@rootroot-X99-Turbo:~/3TB/61Android11.0/u-boot$ ./make.sh rk3399
rootroot@rootroot-X99-Turbo:~/3TB/61Android11.0/u-boot$ cd ..
rootroot@rootroot-X99-Turbo:~/3TB/61Android11.0$ cd kernel/
rootroot@rootroot-X99-Turbo:~/3TB/61Android11.0/kernel$ make ARCH=arm64 rockchip_defconfig android-11.config -j36
rootroot@rootroot-X99-Turbo:~/3TB/61Android11.0/kernel$ make ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3399_Android11/boot.img rk3399-sapphire-excavator-edp-avb.img -j36
rootroot@rootroot-X99-Turbo:~/3TB/61Android11.0$ source build/envsetup.sh?
rootroot@rootroot-X99-Turbo:~/3TB/61Android11.0$ lunch
? ? ?42. rk3399_Android11-userdebug
Which would you like? [aosp_arm-eng] 42
rootroot@rootroot-X99-Turbo:~/3TB/61Android11.0$?
rootroot@rootroot-X99-Turbo:~/3TB/61Android11.0$ make -j36
rootroot@rootroot-X99-Turbo:~/3TB/61Android11.0$ ./build.sh -u
2、
Z:\3TB\64rk3399-android-11\kernel\arch\arm64\boot\dts\rockchip-excavator\rk3399-sapphire-excavator-edp.dtsi
/*
?* Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
?*
?* This file is dual-licensed: you can use it either under the terms
?* of the GPL or the X11 license, at your option. Note that this dual
?* licensing only applies to this file, and not this project as a
?* whole.
?*
?* ?a) This file is free software; you can redistribute it and/or
?* ? ? modify it under the terms of the GNU General Public License as
?* ? ? published by the Free Software Foundation; either version 2 of the
?* ? ? License, or (at your option) any later version.
?*
?* ? ? This file is distributed in the hope that it will be useful,
?* ? ? but WITHOUT ANY WARRANTY; without even the implied warranty of
?* ? ? MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ?See the
?* ? ? GNU General Public License for more details.
?*
?* Or, alternatively,
?*
?* ?b) Permission is hereby granted, free of charge, to any person
?* ? ? obtaining a copy of this software and associated documentation
?* ? ? files (the "Software"), to deal in the Software without
?* ? ? restriction, including without limitation the rights to use,
?* ? ? copy, modify, merge, publish, distribute, sublicense, and/or
?* ? ? sell copies of the Software, and to permit persons to whom the
?* ? ? Software is furnished to do so, subject to the following
?* ? ? conditions:
?*
?* ? ? The above copyright notice and this permission notice shall be
?* ? ? included in all copies or substantial portions of the Software.
?*
?* ? ? THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
?* ? ? EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
?* ? ? OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
?* ? ? NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
?* ? ? HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
?* ? ? WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
?* ? ? FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
?* ? ? OTHER DEALINGS IN THE SOFTWARE.
?*/
/dts-v1/;
#include "rk3399-excavator-sapphire.dtsi"
#include "rk3399-android.dtsi"
#include "rk3399-vop-clk-set.dtsi"
/ {
?? ?vcc_lcd: vcc-lcd {
?? ??? ?compatible = "regulator-fixed";
?? ??? ?regulator-name = "vcc_lcd";
?? ??? ?gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>;
?? ??? ?startup-delay-us = <20000>;
?? ??? ?enable-active-high;
?? ??? ?regulator-min-microvolt = <3300000>;
?? ??? ?regulator-max-microvolt = <3300000>;
?? ??? ?regulator-boot-on;
?? ??? ?vin-supply = <&vcc5v0_sys>;
?? ?};
?? ?panel: panel {
?? ??? ?compatible = "simple-panel";
?? ??? ?backlight = <&backlight>;
?? ??? ?power-supply = <&vcc_lcd>;
?? ??? ?enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
?? ??? ?prepare-delay-ms = <20>;
?? ??? ?enable-delay-ms = <20>;
?? ??? ?display-timings {
?? ??? ??? ?native-mode = <&timing0>;
?? ??? ??? ?timing0: timing0 {
?? ??? ??? ??? ?clock-frequency = <200000000>;
?? ??? ??? ??? ?hactive = <1536>;
?? ??? ??? ??? ?vactive = <2048>;
?? ??? ??? ??? ?hfront-porch = <12>;
?? ??? ??? ??? ?hsync-len = <16>;
?? ??? ??? ??? ?hback-porch = <48>;
?? ??? ??? ??? ?vfront-porch = <8>;
?? ??? ??? ??? ?vsync-len = <4>;
?? ??? ??? ??? ?vback-porch = <8>;
?? ??? ??? ??? ?hsync-active = <0>;
?? ??? ??? ??? ?vsync-active = <0>;
?? ??? ??? ??? ?de-active = <0>;
?? ??? ??? ??? ?pixelclk-active = <0>;
?? ??? ??? ?};
?? ??? ?};
?? ??? ?ports {
?? ??? ??? ?panel_in: endpoint {
?? ??? ??? ??? ?remote-endpoint = <&edp_out>;
?? ??? ??? ?};
?? ??? ?};
?? ?};
?? ?test-power {
?? ??? ?status = "okay";
?? ?};
?? ?hdmiin_sound: hdmiin-sound {
?? ??? ?compatible = "rockchip,rockchip-rt5651-sound";
?? ??? ?rockchip,cpu = <&i2s0>;
?? ??? ?rockchip,codec = <&rt5651 &rt5651>;
?? ??? ?status = "okay";
?? ?};
?? ?vcc_mipi: vcc_mipi {
?? ??? ??? ?compatible = "regulator-fixed";
?? ??? ??? ?enable-active-high;
?? ??? ??? ?gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
?? ??? ??? ?pinctrl-names = "default";
?? ??? ??? ?pinctrl-0 = <&cif_pwr>;
?? ??? ??? ?regulator-name = "vcc_mipi";
?? ?};
};
vm149c重复了,直接拿掉!
Z:\3TB\64rk3399-android-11\kernel\arch\arm64\boot\dts\rockchip-excavator\rk3399-sapphire-excavator-edp.dtsi
&i2c1 {
?? ?status = "okay";
?? ?gsl3673: gsl3673@40 {
?? ??? ?compatible = "GSL,GSL3673";
?? ??? ?reg = <0x40>;
?? ??? ?screen_max_x = <1536>;
?? ??? ?screen_max_y = <2048>;
?? ??? ?irq_gpio_number = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>;
?? ??? ?rst_gpio_number = <&gpio4 22 GPIO_ACTIVE_HIGH>;
?? ?};
?? ?sgm3784: sgm3784@30 {
?? ??? ?#address-cells = <1>;
?? ??? ?#size-cells = <0>;
?? ??? ?compatible = "sgmicro,gsm3784";
?? ??? ?reg = <0x30>;
?? ??? ?rockchip,camera-module-index = <0>;
?? ??? ?rockchip,camera-module-facing = "back";
?? ??? ?enable-gpio = <&gpio2 RK_PB4 GPIO_ACTIVE_HIGH>;
?? ??? ?strobe-gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
?? ??? ?status = "okay";
?? ??? ?sgm3784_led0: led@0 {
?? ??? ??? ?reg = <0x0>;
?? ??? ??? ?led-max-microamp = <299200>;
?? ??? ??? ?flash-max-microamp = <1122000>;
?? ??? ??? ?flash-max-timeout-us = <1600000>;
?? ??? ?};
?? ??? ?sgm3784_led1: led@1 {
?? ??? ??? ?reg = <0x1>;
?? ??? ??? ?led-max-microamp = <299200>;
?? ??? ??? ?flash-max-microamp = <1122000>;
?? ??? ??? ?flash-max-timeout-us = <1600000>;
?? ??? ?};
?? ?};
?? ?tc358749x: tc358749x@0f {
?? ??? ?compatible = "toshiba,tc358749x";
?? ??? ?reg = <0x0f>;
?? ??? ?power-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
?? ??? ?power18-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
?? ??? ?power33-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
?? ??? ?csi-ctl-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
?? ??? ?stanby-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>;
?? ??? ?reset-gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
?? ??? ?int-gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
?? ??? ?pinctrl-names = "default";
?? ??? ?pinctrl-0 = <&hdmiin_gpios>;
?? ??? ?status = "disabled";
?? ?};
?? ?vm149c: vm149c@0c {
?? ??? ?compatible = "silicon touch,vm149c";
?? ??? ?status = "okay";
?? ??? ?reg = <0x0c>;
?? ??? ?rockchip,camera-module-index = <0>;
?? ??? ?rockchip,camera-module-facing = "back";
?? ?};
?? ?gc2145: gc2145@3c{
?? ??? ?status = "okay";
?? ??? ?compatible = "galaxycore,gc2145";
?? ??? ?reg = <0x3c>;
?? ??? ?pinctrl-names = "default";
?? ??? ?pinctrl-0 = <&cif_clkout>;
?? ??? ?clocks = <&cru SCLK_CIF_OUT>;
?? ??? ?clock-names = "xvclk";
?? ??? ?/* avdd-supply = <>; */
?? ??? ?/* dvdd-supply = <>; */
?? ??? ?/* dovdd-supply = <>; */
?? ??? ?pwdn-gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>;?? ?//ok
?? ??? ?rockchip,camera-module-index = <1>;
?? ??? ?rockchip,camera-module-facing = "front";
?? ??? ?rockchip,camera-module-name = "CameraKing";
?? ??? ?rockchip,camera-module-lens-name = "Largan";
?? ??? ?port {
?? ??? ??? ?gc2145_out: endpoint {
?? ??? ??? ??? ?remote-endpoint = <&dvp_in_fcam>;
?? ??? ??? ?};
?? ??? ?};
?? ?};
?? ?vm149c: vm149c@0c {
?? ??? ?compatible = "silicon touch,vm149c";
?? ??? ?status = "okay";
?? ??? ?reg = <0x0c>;
?? ??? ?rockchip,camera-module-index = <0>;
?? ??? ?rockchip,camera-module-facing = "back";
?? ?};
?? ?ov13850: ov13850@10 {
?? ??? ?compatible = "ovti,ov13850";
?? ??? ?status = "okay";
?? ??? ?reg = <0x10>;
?? ??? ?clocks = <&cru SCLK_CIF_OUT>;
?? ??? ?clock-names = "xvclk";
?? ??? ?/* avdd-supply = <>; */
?? ??? ?/* dvdd-supply = <>; */
?? ??? ?/* dovdd-supply = <>; */
?? ??? ?/* reset-gpios = <>; */
?? ??? ?reset-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>; // conflict with csi-ctl-gpios
?? ??? ?pwdn-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
?? ??? ?pinctrl-names = "rockchip,camera_default";
?? ??? ?pinctrl-0 = <&cif_clkout>;
?? ??? ?rockchip,camera-module-index = <0>;
?? ??? ?rockchip,camera-module-facing = "back";
?? ??? ?rockchip,camera-module-name = "CMK-CT0116";
?? ??? ?rockchip,camera-module-lens-name = "Largan-50013A1";
?? ??? ?lens-focus = <&vm149c>;
?? ??? ?flash-leds = <&sgm3784_led0 &sgm3784_led1>;
?? ??? ?port {
?? ??? ??? ?ucam_out0: endpoint {
?? ??? ??? ??? ?remote-endpoint = <&mipi_in_ucam0>;
?? ??? ??? ??? ?//remote-endpoint = <&mipi_in_ucam1>;
?? ??? ??? ??? ?data-lanes = <1 2>;
?? ??? ??? ?};
?? ??? ?};
?? ?};
?? ?ov4689: ov4689@36 {
?? ??? ?compatible = "ovti,ov4689";
?? ??? ?status = "disabled";
?? ??? ?reg = <0x36>;
?? ??? ?clocks = <&cru SCLK_CIF_OUT>;
?? ??? ?clock-names = "xvclk";
?? ??? ?/* avdd-supply = <>; */
?? ??? ?/* dvdd-supply = <>; */
?? ??? ?/* dovdd-supply = <>; */
?? ??? ?/* reset-gpios = <>; */
?? ??? ?pwdn-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; // conflict with backlight
?? ??? ?pinctrl-names = "rockchip,camera_default";
?? ??? ?pinctrl-0 = <&cif_clkout>;
?? ??? ?rockchip,camera-module-index = <1>;
?? ??? ?rockchip,camera-module-facing = "front";
?? ??? ?rockchip,camera-module-name = "JSD3425-C1";
?? ??? ?rockchip,camera-module-lens-name = "JSD3425-C1";
?? ??? ?port {
?? ??? ??? ?ucam_out1: endpoint {
?? ??? ??? ??? ?//remote-endpoint = <&mipi_in_ucam0>;
?? ??? ??? ??? ?remote-endpoint = <&mipi_in_ucam1>;
?? ??? ??? ??? ?data-lanes = <1 2>;
?? ??? ??? ?};
?? ??? ?};
?? ?};
};
Z:\3TB\64rk3399-android-11\kernel\arch\arm64\boot\dts\rockchip-excavator\rk3399-sapphire-excavator-edp.dtsi
&mipi_dphy_rx0 {
?? ?status = "disabled";
?? ?ports {
?? ??? ?#address-cells = <1>;
?? ??? ?#size-cells = <0>;
?? ??? ?port@0 {
?? ??? ??? ?reg = <0>;
?? ??? ??? ?#address-cells = <1>;
?? ??? ??? ?#size-cells = <0>;
?? ??? ??? ?mipi_in_ucam0: endpoint@1 {
?? ??? ??? ??? ?reg = <1>;
?? ??? ??? ??? ?remote-endpoint = <&ucam_out0>;
?? ??? ??? ??? ?data-lanes = <1 2>;
?? ??? ??? ?};
?? ??? ?};
?? ??? ?port@1 {
?? ??? ??? ?reg = <1>;
?? ??? ??? ?#address-cells = <1>;
?? ??? ??? ?#size-cells = <0>;
?? ??? ??? ?dphy_rx0_out: endpoint@0 {
?? ??? ??? ??? ?reg = <0>;
?? ??? ??? ??? ?remote-endpoint = <&isp0_mipi_in>;
?? ??? ??? ?};
?? ??? ?};
?? ?};
};
Z:\3TB\64rk3399-android-11\kernel\arch\arm64\boot\dts\rockchip-excavator\rk3399-sapphire-excavator-edp.dtsi
&rt5651_sound {
?? ?status = "okay";
};
&pinctrl {
?? ?cam0 {
?? ??? ? cif_pwr: cif-pwr {
?? ??? ??? ?rockchip,pins = <1 22 RK_FUNC_GPIO &pcfg_pull_up>;
?? ??? ? };
?? ?};
?? ?
?? ?lcd-panel {
?? ??? ?lcd_panel_reset: lcd-panel-reset {
?? ??? ??? ?rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
?? ??? ?};
?? ?};
?? ?hdmiin {
?? ??? ?hdmiin_gpios: hdmiin_gpios {
?? ??? ?rockchip,pins =
?? ??? ??? ??? ?<2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>,
?? ??? ??? ??? ?<2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
?? ??? ??? ??? ?<2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>,
?? ??? ??? ??? ?<2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
?? ??? ??? ??? ?<2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
?? ??? ??? ??? ?<2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
?? ??? ?};
?? ?};
};
Z:\3TB\64rk3399-android-11\kernel\arch\arm64\boot\dts\rockchip-excavator\rk3399-sapphire-excavator-edp-avb.dts
&i2c1 {
?? ?status = "okay";
?? ?/delete-node/ tc358749x@0f;
?? ?tc35874x: tc35874x@0f {
?? ??? ?status = "disabled";
?? ??? ?reg = <0x0f>;
?? ??? ?compatible = "toshiba,tc358749";
?? ??? ?clocks = <&ext_cam_clk>;
?? ??? ?clock-names = "refclk";
?? ??? ?reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
?? ??? ?/* interrupt-parent = <&gpio2>; */
?? ??? ?/* interrupts = <12 IRQ_TYPE_LEVEL_HIGH>; */
?? ??? ?pinctrl-names = "default";
?? ??? ?pinctrl-0 = <&tc35874x_gpios>;
?? ??? ?rockchip,camera-module-index = <0>;
?? ??? ?rockchip,camera-module-facing = "back";
?? ??? ?rockchip,camera-module-name = "TC358749XBG";
?? ??? ?rockchip,camera-module-lens-name = "NC";
?? ??? ?port {
?? ??? ??? ?hdmiin_out0: endpoint {
?? ??? ??? ??? ?remote-endpoint = <&hdmi_to_mipi_in>;
?? ??? ??? ??? ?data-lanes = <1 2 3 4>;
?? ??? ??? ??? ?clock-noncontinuous;
?? ??? ??? ??? ?link-frequencies =
?? ??? ??? ??? ??? ?/bits/ 64 <297000000>;
?? ??? ??? ?};
?? ??? ?};
?? ?};
?? ?
?? ?ov13850: ov13850@10 {
?? ??? ?status = "okay";
? ? ? ? ? ? ? ? avdd-supply = <&vcc_mipi>;
?? ??? ?power-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
? ? ? ? ? ? ? ? reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
? ? ? ? ? ? ? ? pwdn-gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
? ? ? ? };
};
参考资料:
http://www.friendlyelec.com.cn/agent.asp
http://www.friendlyelec.com.cn/
https://download.friendlyelec.com/NanoPC-T4
https://wiki.friendlyelec.com/wiki/index.php/NanoPC-T4/zh#.E4.B8.8B.E8.BD.BDAndroid10.E6.BA.90.E4.BB.A3.E7.A0.81
https://item.taobao.com/item.htm?spm=a1z09.2.0.0.37562e8dcotDm6&id=570312633249&_u=7ju3ku004a
友善NanoPC-T4瑞芯微RK3399开发板ROS双摄4K播放开源AI智能安卓10
WiKi维基教程(固件介绍,使用说明,操作步骤等)
http://wiki.friendlyelec.com/wiki/index.php/NanoPC-T4
系统固件下载
https://dl.friendlyelec.com/nanopct4
原理图(pdf格式)
http://wiki.friendlyelec.com/wiki/images/e/e0/NanoPC-T4-1902-Schematic.pdf
尺寸图(dxf格式)
http://wiki.friendlyelec.com/wiki/images/b/bc/NanoPC-T4_1802_Drawing%28dxf%29.zip
http://www.friendlyelec.com.cn/nanopi-m4.asp
NanoPi M4 | NanoPi M4V2
https://wiki.friendlyelec.com/wiki/index.php/NanoPi_M4/zh
15.3 编译Android10源代码
15.3.1 下载Android10源代码
有以下两种途径获取 Android10 的源代码,都需要联网:
使用网盘里的git repo压缩包
网盘下载地址: 点击进入
https://download.friendlyelec.com/NanoPiM4
https://pan.baidu.com/share/init?surl=oBLn9H31hILJKEPQXgrUog
提取码:yn6r