RockPi 4 - io-domain settings for new 4.4 kernel?

Hi @lili @jack

Need some help with io-domain settings for 4.4 kernel for RockPi 4.

It seems since March 2020, Rockchip intruduce these new commits into kernel, u-boot


More info, read
9.1.2.2 U-BOOT 配置 IO-DOMAIN configuration
https://mega.nz/file/IVUC3YSZ#8q5u8rrk0ITLTxjJsKRdYr55_wybCcaOgiUlpzoPCyU

The second grey block is the kernel patch.
Please check what pin values and voltages are required for RockPi 4 so I can add patch to my linux kernel, RockPi 4 dts/dtsi file(and Android in future) so it can boot correctly.

Regards


image


image

image

image

image

image

image

Hi,

The IO domain of ROCK Pi 4 is the following:

&io_domains {
	status = "okay";

	bt656-supply = <&vcc_3v0>; /* bt656_gpio2ab_ms */
	audio-supply = <&vcc_3v0>; /* audio_gpio3d4a_ms */
	sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
	gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
};

&pmu_io_domains {
	status = "okay";
	pmu1830-supply = <&vcc_3v0>;
};

We will merge the u-boot update.

Thanks
Would be great if the kernel and u-boot patch can be merged.

Just check the 2 ‘uboot-set’ values, what they must be, since I don’t know difference between vcc & vdd 3v0?

   *     OTHER DEALINGS IN THE SOFTWARE.
     */
+    #include <dt-bindings/soc/rockchip-io-domain.h>

    &io_domains {
    	status = "okay";

    	/*
+    	 * If the uboot use rkdevelop branch, the io-domain is not set
+    	 * during uboot phase, it will cause the io voltage is not suit for
+    	 * the hardware,maybe will damage the io of rk3399, so we add
+    	 * uboot-set value to make sure the value is same with the kernel,
+    	 * ofcause you must make sure firstly the value here is suit for your
+    	 * hardware. The available value is defined in
+    	 * include/dt-bindings/soc/rockchip-io-domain.h, they are
+    	 * also list here for more convenient configuration:
+    	 * bt656-supply: RK3399_BT656_VDD_1V8 or RK3399_BT656_VDD_3V3
+    	 * audio-supply: RK3399_AUDIO_VDD_1V8 or RK3399_AUDIO_VDD_3V3
+    	 * gpio1830-supply: RK3399_GPIO1833_VDD_1V8 or RK3399_GPIO1833_VDD_3V3
+    	 * sdmmc-supply: don't need to configure because the voltage
+    	 *                       is set in source code during runtime.
+    	 * NOTE:
+    	 * 1. The value in uboot-set must be enclosed in "()", otherwise will
+    	 *     cause compile error.
+    	 * 2. The uboot-set configuration must be cooperated with submit
+    	 *     in u-boot.
+    	 */
+    	uboot-set = <(RK3399_BT656_VDD_3V0 | RK3399_AUDIO_VDD_3V0 |
+    				RK3399_GPIO1833_VDD_3V0)>;
	bt656-supply = <&vcc_3v0>; /* bt656_gpio2ab_ms */
	audio-supply = <&vcc_3v0>; /* audio_gpio3d4a_ms */
	sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
	gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */

    &pmu_io_domains {
    	status = "okay";
 +   	/*
 +   	 * If the uboot use rkdevelop branch, the pmu_io_domain is not set
 +   	 * during uboot phase, it will cause the io voltage is not suit for
 +   	 * the hardware,maybe will damage the io of rk3399, so we add
 +   	 * uboot-set value to make sure the value is same with the kernel,
 +   	 * ofcause you must make sure firstly the value here is suit for your
 +   	 * hardware. The available value is defined in
 +   	 * include/dt-bindings/soc/rockchip-io-domain.h, they are
 +   	 * also list here for more convenient configuration:
 +   	 * pmu1830-supply: RK3399_PMU1830_VDD_1V8 or RK3399_PMU1830_VDD_3V0
 +   	 */
 +   	uboot-set = <RK3399_PMU1830_VDD_3V0>;
    	pmu1830-supply = <&vcc_3v0>;
    };
1 Like