static int rdu2_devices_init(void) { struct i2c_client client; if (!of_machine_is_compatible("zii,imx6q-zii-rdu2") && !of_machine_is_compatible("zii,imx6qp-zii-rdu2")) return 0; client.adapter = i2c_get_adapter(1); if (client.adapter) { u8 reg; /* * Reset PMIC SW1AB and SW1C rails to 1.375V. If an event * caused only the i.MX6 SoC reset, the PMIC might still be * stuck on the low voltage for the slow operating point. */ client.addr = 0x08; /* PMIC i2c address */ reg = 0x2b; /* 1.375V, valid for both rails */ i2c_write_reg(&client, 0x20, ®, 1); i2c_write_reg(&client, 0x2e, ®, 1); } barebox_set_hostname("rdu2"); imx6_bbu_internal_spi_i2c_register_handler("SPI", "/dev/m25p0.barebox", BBU_HANDLER_FLAG_DEFAULT); imx6_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc3", 0); defaultenv_append_directory(defaultenv_rdu2); return 0; }
static int rdu2_devices_init(void) { if (!of_machine_is_compatible("zii,imx6q-zii-rdu2") && !of_machine_is_compatible("zii,imx6qp-zii-rdu2")) return 0; barebox_set_hostname("rdu2"); imx6_bbu_internal_spi_i2c_register_handler("SPI", "/dev/m25p0.barebox", BBU_HANDLER_FLAG_DEFAULT); imx6_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc3", 0); defaultenv_append_directory(defaultenv_rdu2); return 0; }