• 周三. 5月 14th, 2025

dts — rk3368-android.dtsi

3月 7, 2020

关键词:rk3368-android.dtsi , linux-4.4, rockchip, dts

dts — rk3368-android.dtsi

/ {
	chosen {
		bootargs = "earlycon=uart8250,mmio32,0xff690000 swiotlb=1 firmware_class.path=/system/vendor/firmware";
	};

	fiq_debugger: fiq-debugger {
		compatible = "rockchip,fiq-debugger";
		rockchip,serial-id = <2>;
		rockchip,wake-irq = <0>;
		rockchip,irq-mode-enable = <0>;  /* If enable uart uses irq instead of fiq */
		rockchip,baudrate = <115200>;  /* Only 115200 and 1500000 */
		pinctrl-names = "default";
		pinctrl-0 = <&uart2_xfer>;
		interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;   /* signal irq */
	};

	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		drm_logo: drm-logo@00000000 {
			compatible = "rockchip,drm-logo";
			reg = <0x0 0x0 0x0 0x0>;
		};

		/* global autoconfigured region for contiguous allocations */
		linux,cma {
			compatible = "shared-dma-pool";
			reusable;
			size = <0x0 0x2000000>;
			linux,cma-default;
		};
	};

	ion {
		compatible = "rockchip,ion";
		#address-cells = <1>;
		#size-cells = <0>;

		cma-heap {
			reg = <0x00000000 0x2800000>;
		};

		system-heap {
		};
	};

	firmware {
		android {
			compatible = "android,firmware";
			fstab {
				compatible = "android,fstab";
				system {
					compatible = "android,system";
					dev = "/dev/block/platform/ff0f0000.dwmmc/by-name/system";
					type = "ext4";
					mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
					fsmgr_flags = "wait,verify";
				};
				vendor {
					compatible = "android,vendor";
					dev = "/dev/block/platform/ff0f0000.dwmmc/by-name/vendor";
					type = "ext4";
					mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
					fsmgr_flags = "wait,verify";
				};
			};
		};
	};

	rga@ff920000 {
		compatible = "rockchip,rga2";
		dev_mode = <1>;
		reg = <0x0 0xff920000 0x0 0x1000>;
		interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>;
		clock-names = "aclk_rga", "hclk_rga", "clk_rga";
		dma-coherent;
		status = "okay";
	};

	dwc_control_usb: dwc-control-usb {
		compatible = "rockchip,rk3368-dwc-control-usb";
		status = "okay";

		rockchip,grf = <&grf>;
		grf-offset = <0x04bc>; /* GRF_SOC_STATUS for USB2.0 OTG */
		interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
			     <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "otg_id", "otg_bvalid",
				  "otg_linestate", "host0_linestate";
		clocks = <&cru HCLK_USB_PERI>;
		clock-names = "hclk_usb_peri";

		otg_drv_gpio = <&gpio0 25 GPIO_ACTIVE_LOW>;
		rockchip,remote_wakeup;
		rockchip,usb_irq_wakeup;

		usb_bc {
			compatible = "inno,phy";
			regbase = &dwc_control_usb;
			rk_usb,bvalid     = <0x4bc 23 1>;
			rk_usb,iddig      = <0x4bc 26 1>;
			rk_usb,vdmsrcen   = <0x718 12 1>;
			rk_usb,vdpsrcen   = <0x718 11 1>;
			rk_usb,rdmpden    = <0x718 10 1>;
			rk_usb,idpsrcen   = <0x718  9 1>;
			rk_usb,idmsinken  = <0x718  8 1>;
			rk_usb,idpsinken  = <0x718  7 1>;
			rk_usb,dpattach   = <0x4b8 31 1>;
			rk_usb,cpdet      = <0x4b8 30 1>;
			rk_usb,dcpattach  = <0x4b8 29 1>;
		};
	};
};

&cluster1_opp {
	rockchip,avs = <1>;
};

&display_subsystem {
	status = "okay";

	logo-memory-region = <&drm_logo>;
	route {
		route_dsi: route-dsi {
			status = "disabled";
			logo,uboot = "logo.bmp";
			logo,kernel = "logo_kernel.bmp";
			logo,mode = "center";
			charge_logo,mode = "center";
			connect = <&vop_out_dsi>;
		};

		route_edp: route-edp {
			status = "disabled";
			logo,uboot = "logo.bmp";
			logo,kernel = "logo_kernel.bmp";
			logo,mode = "center";
			charge_logo,mode = "center";
			connect = <&vop_out_edp>;
		};

		route_hdmi: route-hdmi {
			status = "disabled";
			logo,uboot = "logo.bmp";
			logo,kernel = "logo_kernel.bmp";
			logo,mode = "center";
			charge_logo,mode = "center";
			connect = <&vop_out_hdmi>;
		};

		route_lvds: route-lvds {
			status = "disabled";
			logo,uboot = "logo.bmp";
			logo,kernel = "logo_kernel.bmp";
			logo,mode = "center";
			charge_logo,mode = "center";
			connect = <&vop_out_lvds>;
		};
	};
};

&iep {
	status = "okay";
};

&iep_mmu {
	status = "okay";
};

&mailbox {
	status = "okay";
};

&mailbox_scpi {
	status = "okay";
};

&vpu_combo {
	status = "okay";
};

&vpu_mmu {
	status = "okay";
};

&hevc_mmu {
	status = "okay";
};

&vop {
	status = "okay";
};

&vop_mmu {
	status = "okay";
};

&isp {
	status = "okay";
};

&isp_mmu {
	status = "okay";
};

&cif {
	status = "okay";
};

&vip_mmu {
	status = "okay";
};

&usb_otg {
	status = "okay";

	compatible = "rockchip,rk3368-usb";
	clocks = <&cru SCLK_OTGPHY0>, <&cru HCLK_OTG0>;
	clock-names = "sclk_otgphy0", "otg";
	resets = <&cru SRST_USBOTG_AHB>,
		 <&cru SRST_USBOTG_PHY>,
		 <&cru SRST_USBOTG_CON>;
	reset-names = "otg_ahb", "otg_phy", "otg_controller";
	/* 0 - Normal, 1 - Force Host, 2 - Force Device */
	rockchip,usb-mode = <0>;
};

&pinctrl {
	isp {
		cif_clkout: cif-clkout {
			rockchip,pins = <1 11 RK_FUNC_1 &pcfg_pull_none>;//cif_clkout
		};

		isp_dvp_d2d9: isp-dvp-d2d9 {
			rockchip,pins =
					<1 0 RK_FUNC_1 &pcfg_pull_none>,//cif_data2
					<1 1 RK_FUNC_1 &pcfg_pull_none>,//cif_data3
					<1 2 RK_FUNC_1 &pcfg_pull_none>,//cif_data4
					<1 3 RK_FUNC_1 &pcfg_pull_none>,//cif_data5
					<1 4 RK_FUNC_1 &pcfg_pull_none>,//cif_data6
					<1 5 RK_FUNC_1 &pcfg_pull_none>,//cif_data7
					<1 6 RK_FUNC_1 &pcfg_pull_none>,//cif_data8
					<1 7 RK_FUNC_1 &pcfg_pull_none>,//cif_data9
					<1 8 RK_FUNC_1 &pcfg_pull_none>,//cif_sync
					<1 9 RK_FUNC_1 &pcfg_pull_none>,//cif_href
					<1 10 RK_FUNC_1 &pcfg_pull_none>,//cif_clkin
					<1 11 RK_FUNC_1 &pcfg_pull_none>;//cif_clkout
		};

		isp_dvp_d0d1: isp-dvp-d0d1 {
			rockchip,pins =
					<1 12 RK_FUNC_1 &pcfg_pull_none>,//cif_data0
					<1 13 RK_FUNC_1 &pcfg_pull_none>;//cif_data1
		};

		isp_dvp_d10d11:isp_d10d11 {
			rockchip,pins =
					<1 14 RK_FUNC_1 &pcfg_pull_none>,//cif_data10
					<1 15 RK_FUNC_1 &pcfg_pull_none>;//cif_data11
		};

		isp_dvp_d0d7: isp-dvp-d0d7 {
			rockchip,pins =
					<1 12 RK_FUNC_1 &pcfg_pull_none>,//cif_data0
					<1 13 RK_FUNC_1 &pcfg_pull_none>,//cif_data1
					<1 0 RK_FUNC_1 &pcfg_pull_none>,//cif_data2
					<1 1 RK_FUNC_1 &pcfg_pull_none>,//cif_data3
					<1 2 RK_FUNC_1 &pcfg_pull_none>,//cif_data4
					<1 3 RK_FUNC_1 &pcfg_pull_none>,//cif_data5
					<1 4 RK_FUNC_1 &pcfg_pull_none>,//cif_data6
					<1 5 RK_FUNC_1 &pcfg_pull_none>;//cif_data7
		};

		isp_dvp_d4d11: isp-dvp-d4d11 {
			rockchip,pins =
					<1 2 RK_FUNC_1 &pcfg_pull_none>,//cif_data4
					<1 3 RK_FUNC_1 &pcfg_pull_none>,//cif_data5
					<1 4 RK_FUNC_1 &pcfg_pull_none>,//cif_data6
					<1 5 RK_FUNC_1 &pcfg_pull_none>,//cif_data7
					<1 6 RK_FUNC_1 &pcfg_pull_none>,//cif_data8
					<1 7 RK_FUNC_1 &pcfg_pull_none>,//cif_data9
					<1 14 RK_FUNC_1 &pcfg_pull_none>,//cif_data10
					<1 17 RK_FUNC_1 &pcfg_pull_none>;//cif_data11
		};

		isp_shutter: isp-shutter {
			rockchip,pins =
					<3 19 RK_FUNC_2 &pcfg_pull_none>, //SHUTTEREN
					<3 22 RK_FUNC_2 &pcfg_pull_none>;//SHUTTERTRIG
		};

		isp_flash_trigger: isp-flash-trigger {
			rockchip,pins = <3 20 RK_FUNC_2 &pcfg_pull_none>; //ISP_FLASHTRIGOU
		};

		isp_prelight: isp-prelight {
			rockchip,pins = <3 21 RK_FUNC_2 &pcfg_pull_none>;//ISP_PRELIGHTTRIG
		};

		isp_flash_trigger_as_gpio: isp_flash_trigger_as_gpio {
			rockchip,pins = <3 20 RK_FUNC_GPIO &pcfg_pull_none>;//ISP_FLASHTRIGOU
		};
	};
};