&firmware {
    android {
        vbmeta {
            parts = "vbmeta,boot,system,vendor,dtbo,recovery,vendor_boot";
        };
    };
};

&pmk8550 {
//#ifdef CONFIG_OPLUS_FEATURE_QCOM_PMICWD
//pmicwd depend on pon_pbs@800
	pon_pbs@800 {
		compatible = "qcom,qpnp-power-on";
		reg = <0x800>;
		qcom,system-reset;
		qcom,store-hard-reset-reason;
	};

	pon_pmicwd@800 {
		compatible = "oplus,pmicwd_qpnp-power-on";
		qcom,pmicwd;
	};
//#endif /* CONFIG_OPLUS_FEATURE_QCOM_PMICWD */
};

&sdhc_2 {
	status = "ok";

	vdd-io-supply = <&L8B>;
	qcom,vdd-io-voltage-level = <1800000 1800000>;
	qcom,vdd-io-current-level = <0 5600>;

	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&sdc2_on &cd_pin_pulldown>;
	pinctrl-1 = <&sdc2_off>;

	cd-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>;
	cd-debounce-delay-ms = <1>;

	filter-enable;
	no-sd;
	no-mmc;
};

&pcie1 {
	status = "disabled";
};

&soc {
    bootloader_log {
        compatible = "bootloader_log";
        linux,contiguous-region = <&bootloader_log_mem>;
    };

    oplus-pmic-monitor-log {
        compatible = "oplus,pmic-monitor-log";
        nvmem = <&pmk8550_sdam_5>, <&pmk8550_sdam_6>;
        nvmem-names = "pon_log0", "pon_log1";
    };

    //#ifdef CONFIG_OPLUS_OMRG
    oplus-omrg {
        compatible = "oplus,oplus-omrg";
        oplus-omrg0 {
                oplus,divider-cells = <2>;
                oplus,omrg-master = <&CPU3 1536000 1920000>;
                oplus,omrg-slave = <&CPU0 1459200 1785600>;
                up_limit_enable;
                /* down_limit_enable; */
                /* thermal_enable; */
        };
    };
    //#endif

    //#ifdef OPLUS_FEATURE_SECURITY_COMMON
    /* 2022/08/29 add for oplus secure */
    oplus_secure_common {
        compatible = "oplus,secure_common";
        oplus,sec_reg_num = <0x221C8C70>;
        oplus,sec_en_anti_reg = <0x221C8314>;
        oplus,sec_override1_reg = <0x221C8314>;
        oplus,override1_en_value = <0x1>;
    };
    //#endif /*OPLUS_FEATURE_SECURITY_COMMON*/

	midas_pdev {
		compatible = "oplus,midas-pdev";
	};
};

&reserved_memory {
        /*
        This size is from
        boot_images/boot/QcomPkg/SocPkg/Palima/Common/uefiplat.cfg
        0xA7605000, 0x00008000, "Log Buffer",        AddMem, SYS_MEM, SYS_MEM_CAP, RtData, WRITE_BACK_XN
        so we reserve this for bootloader log
        */
        bootloader_log_mem: botloader_mem@0xA7605000 {
                reg = <0 0xA7605000 0 0x00008000>;
                label = "bootloader_log_mem";
        };
};

&tlmm {
	cd_pin_pulldown: cd_pin_pulldown {
		mux {
			pins = "gpio99";
			function = "gpio";
		};

		config {
			pins = "gpio99";
			drive-strength = <2>;
			bias-pull-down;
			input-enable;
		};
	};
};

/* #ifdef OPLUS_FEATURE_DUMP_DEVICE_INFO */
&reserved_memory {
	dump_device_info_mem: device_info_mem@0xA4F00000 {
		reg = <0 0xA4F00000 0 0x00008000>;
		label = "dump_device_info_mem";
	};
};

&soc {
	dump_device_info {
		compatible = "dump_device_info";
		linux,contiguous-region = <&dump_device_info_mem>;
	};
};

&ramoops_mem {
	alloc-ranges = <0x0 0x00000000 0xffffffff 0xffffffff>;
	size = <0x0 0x240000>;
	pmsg-size = <0x200000>;
	console-size = <0x40000>;
	mem-type = <2>;
};
/* #endif OPLUS_FEATURE_DUMP_DEVICE_INFO */
