project:build.sh: Added fastboot support; custom modifications to U-Boot and kernel implemented using patches.

project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between
the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door
for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more
usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp:
Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for
compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem.
sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device
tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately.
sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick
boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades.
sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for
fastboot.

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
This commit is contained in:
luckfox-eng29
2024-08-21 10:05:47 +08:00
parent e79fd21975
commit 8f34c2760d
20902 changed files with 6567362 additions and 11248383 deletions

View File

@@ -51,13 +51,6 @@ config I2C_MUX_MAX96745
If you say yes here you get support for the Maxim MAX96745
I2C multiplexer.
config I2C_MUX_MAX96752F
tristate "Maxim MAX96752F I2C multiplexer"
depends on I2C_MUX
help
If you say yes here you get support for the Maxim MAX96752F
I2C multiplexer.
config I2C_MUX_MAX96755F
tristate "Maxim MAX96755F I2C multiplexer"
depends on I2C_MUX

View File

@@ -8,6 +8,5 @@ obj-$(CONFIG_$(SPL_)I2C_MUX) += i2c-mux-uclass.o
obj-$(CONFIG_I2C_MUX_PCA954x) += pca954x.o
obj-$(CONFIG_I2C_MUX_GPIO) += i2c-mux-gpio.o
obj-$(CONFIG_I2C_MUX_MAX96745) += max96745.o
obj-$(CONFIG_I2C_MUX_MAX96752F) += max96752f.o
obj-$(CONFIG_I2C_MUX_MAX96755F) += max96755f.o

View File

@@ -13,11 +13,18 @@
struct max96745_priv {
struct udevice *dev;
struct gpio_desc enable_gpio;
struct gpio_desc pwdnb_gpio;
bool idle_disc;
};
static int max96745_select(struct udevice *mux, struct udevice *bus,
uint channel)
{
struct max96745_priv *priv = dev_get_priv(mux);
if (!priv->idle_disc)
return 0;
if (channel == 1)
dm_i2c_reg_clrset(mux, 0x0086, DIS_REM_CC,
FIELD_PREP(DIS_REM_CC, 0));
@@ -31,6 +38,11 @@ static int max96745_select(struct udevice *mux, struct udevice *bus,
static int max96745_deselect(struct udevice *mux, struct udevice *bus,
uint channel)
{
struct max96745_priv *priv = dev_get_priv(mux);
if (!priv->idle_disc)
return 0;
if (channel == 1)
dm_i2c_reg_clrset(mux, 0x0086, DIS_REM_CC,
FIELD_PREP(DIS_REM_CC, 1));
@@ -55,15 +67,27 @@ static int max96745_power_on(struct max96745_priv *priv)
mdelay(200);
}
ret = dm_i2c_reg_clrset(priv->dev, 0x0076, DIS_REM_CC,
FIELD_PREP(DIS_REM_CC, 1));
if (dm_gpio_is_valid(&priv->pwdnb_gpio)) {
dm_gpio_set_value(&priv->pwdnb_gpio, 0);
mdelay(30);
}
/* Set for I2C Fast-mode speed */
ret = dm_i2c_reg_write(priv->dev, 0x0070, 0x16);
if (ret < 0)
return ret;
ret = dm_i2c_reg_clrset(priv->dev, 0x0086, DIS_REM_CC,
FIELD_PREP(DIS_REM_CC, 1));
if (ret < 0)
return ret;
if (priv->idle_disc) {
ret = dm_i2c_reg_clrset(priv->dev, 0x0076, DIS_REM_CC,
FIELD_PREP(DIS_REM_CC, 1));
if (ret < 0)
return ret;
ret = dm_i2c_reg_clrset(priv->dev, 0x0086, DIS_REM_CC,
FIELD_PREP(DIS_REM_CC, 1));
if (ret < 0)
return ret;
}
return 0;
}
@@ -78,6 +102,7 @@ static int max96745_probe(struct udevice *dev)
return ret;
priv->dev = dev;
priv->idle_disc = dev_read_bool(dev, "i2c-mux-idle-disconnect");
ret = gpio_request_by_name(dev, "enable-gpios", 0,
&priv->enable_gpio, GPIOD_IS_OUT);
@@ -86,6 +111,13 @@ static int max96745_probe(struct udevice *dev)
return ret;
}
ret = gpio_request_by_name(dev, "pwdnb-gpios", 0,
&priv->pwdnb_gpio, GPIOD_IS_OUT);
if (ret && ret != -ENOENT) {
dev_err(dev, "%s: failed to get pwdnb GPIO: %d\n", __func__, ret);
return ret;
}
max96745_power_on(priv);
return 0;

View File

@@ -1,100 +0,0 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2022 Rockchip Electronics Co., Ltd
*/
#include <common.h>
#include <dm.h>
#include <errno.h>
#include <i2c.h>
#include <max96752f.h>
#include <asm-generic/gpio.h>
static int max96752f_select(struct udevice *mux, struct udevice *bus,
uint channel)
{
return 0;
}
static int max96752f_deselect(struct udevice *mux, struct udevice *bus,
uint channel)
{
return 0;
}
static const struct i2c_mux_ops max96752f_ops = {
.select = max96752f_select,
.deselect = max96752f_deselect,
};
static uint addr_list[] = {
0x48, 0x68, 0x6a, 0x4a, 0x4c, 0x6c, 0x28, 0x2a
};
void max96752f_init(struct udevice *dev)
{
struct dm_i2c_chip *chip = dev_get_parent_platdata(dev);
u32 stream_id = dev_read_u32_default(dev->parent, "reg", 0);
uint addr = chip->chip_addr;
int i, ret;
for (i = 0; i < ARRAY_SIZE(addr_list); i++) {
chip->chip_addr = addr_list[i];
ret = dm_i2c_reg_read(dev, 0x000d);
if (ret < 0)
continue;
if (ret == 0x82) {
dm_i2c_reg_write(dev, 0x0000, addr << 1);
break;
}
}
chip->chip_addr = addr;
dm_i2c_reg_clrset(dev, 0x0050, STR_SEL,
FIELD_PREP(STR_SEL, stream_id));
dm_i2c_reg_clrset(dev, 0x0073, TX_SRC_ID,
FIELD_PREP(TX_SRC_ID, stream_id));
}
static int max96752f_probe(struct udevice *dev)
{
struct gpio_desc enable_gpio;
int ret;
ret = i2c_set_chip_offset_len(dev, 2);
if (ret)
return ret;
ret = gpio_request_by_name(dev, "enable-gpios", 0, &enable_gpio,
GPIOD_IS_OUT);
if (ret && ret != -ENOENT) {
dev_err(dev, "%s: failed to get enable GPIO: %d\n",
__func__, ret);
return ret;
}
if (dm_gpio_is_valid(&enable_gpio)) {
dm_gpio_set_value(&enable_gpio, 1);
mdelay(200);
}
return 0;
}
static const struct udevice_id max96752f_of_match[] = {
{ .compatible = "maxim,max96752f" },
{}
};
U_BOOT_DRIVER(max96752f) = {
.name = "max96752f",
.id = UCLASS_I2C_MUX,
.of_match = max96752f_of_match,
.bind = dm_scan_fdt_dev,
.probe = max96752f_probe,
.ops = &max96752f_ops,
};