Skip to content

Commit

Permalink
Base Rockchip platfrom drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
GuEe-GUI committed Feb 3, 2024
1 parent 80d7885 commit 2058ff1
Show file tree
Hide file tree
Showing 480 changed files with 76,275 additions and 4,748 deletions.
4 changes: 2 additions & 2 deletions bsp/hpmicro/hpm6750evk/board/eth_phy_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ eth_phy_monitor_handle_t phy_monitor_handle =
.phy_handle = s_gphys
};

static struct rt_phy_ops phy_ops;
static const struct rt_phy_ops phy_ops;

static rt_phy_status phy_init(void *object, rt_uint32_t phy_addr, rt_uint32_t src_clock_hz)
static rt_phy_status phy_init(rt_phy_t *phy, void *object, rt_uint32_t phy_addr, rt_uint32_t src_clock_hz)
{
return PHY_STATUS_OK;
}
Expand Down
4 changes: 2 additions & 2 deletions bsp/hpmicro/hpm6750evkmini/board/eth_phy_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ eth_phy_monitor_handle_t phy_monitor_handle =
.phy_handle = s_gphys
};

static struct rt_phy_ops phy_ops;
static const struct rt_phy_ops phy_ops;

static rt_phy_status phy_init(void *object, rt_uint32_t phy_addr, rt_uint32_t src_clock_hz)
static rt_phy_status phy_init(rt_phy_t *phy, void *object, rt_uint32_t phy_addr, rt_uint32_t src_clock_hz)
{
return PHY_STATUS_OK;
}
Expand Down
14 changes: 7 additions & 7 deletions bsp/imxrt/libraries/drivers/drv_ksz8081.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static inline rt_bool_t write_reg(rt_mdio_t *bus, rt_uint32_t addr, rt_uint32_t
return RT_TRUE;
}

static rt_phy_status rt_phy_init(void *object, rt_uint32_t phy_addr, rt_uint32_t src_clock_hz)
static rt_phy_status rt_phy_init(struct rt_phy_device *phy, void *object, rt_uint32_t phy_addr, rt_uint32_t src_clock_hz)
{
rt_bool_t ret;
rt_phy_status result;
Expand Down Expand Up @@ -208,7 +208,7 @@ static rt_phy_status rt_phy_init(void *object, rt_uint32_t phy_addr, rt_uint32_t
}


static rt_phy_status rt_phy_read(rt_uint32_t reg, rt_uint32_t *data)
static rt_phy_status rt_phy_read(struct rt_phy_device *phy, rt_uint32_t reg, rt_uint32_t *data)
{
rt_mdio_t *mdio_bus = phy_ksz8081.bus;
rt_uint32_t device_id = phy_ksz8081.addr;
Expand All @@ -220,7 +220,7 @@ static rt_phy_status rt_phy_read(rt_uint32_t reg, rt_uint32_t *data)
return PHY_STATUS_FAIL;
}

static rt_phy_status rt_phy_write(rt_uint32_t reg, rt_uint32_t data)
static rt_phy_status rt_phy_write(struct rt_phy_device *phy, rt_uint32_t reg, rt_uint32_t data)
{
rt_mdio_t *mdio_bus = phy_ksz8081.bus;
rt_uint32_t device_id = phy_ksz8081.addr;
Expand All @@ -232,7 +232,7 @@ static rt_phy_status rt_phy_write(rt_uint32_t reg, rt_uint32_t data)
return PHY_STATUS_FAIL;
}

static rt_phy_status rt_phy_loopback(rt_uint32_t mode, rt_uint32_t speed, rt_bool_t enable)
static rt_phy_status rt_phy_loopback(struct rt_phy_device *phy, rt_uint32_t mode, rt_uint32_t speed, rt_bool_t enable)
{
rt_uint32_t data = 0;
rt_phy_status result;
Expand Down Expand Up @@ -288,7 +288,7 @@ static rt_phy_status rt_phy_loopback(rt_uint32_t mode, rt_uint32_t speed, rt_boo
return result;
}

static rt_phy_status get_link_status(rt_bool_t *status)
static rt_phy_status get_link_status(struct rt_phy_device *phy, rt_bool_t *status)
{
rt_phy_status result;
rt_uint32_t data;
Expand All @@ -310,7 +310,7 @@ static rt_phy_status get_link_status(rt_bool_t *status)
}
return result;
}
static rt_phy_status get_link_speed_duplex(rt_uint32_t *speed, rt_uint32_t *duplex)
static rt_phy_status get_link_speed_duplex(struct rt_phy_device *phy, rt_uint32_t *speed, rt_uint32_t *duplex)
{
rt_phy_status result = PHY_STATUS_OK;
rt_uint32_t data, ctl_reg;
Expand Down Expand Up @@ -346,7 +346,7 @@ static rt_phy_status get_link_speed_duplex(rt_uint32_t *speed, rt_uint32_t *dupl
return result;
}

static struct rt_phy_ops phy_ops =
static const struct rt_phy_ops phy_ops =
{
.init = rt_phy_init,
.read = rt_phy_read,
Expand Down
14 changes: 7 additions & 7 deletions bsp/imxrt/libraries/drivers/drv_rtl8211f.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static status_t PHY_RTL8211F_MMD_Write(uint8_t device, uint16_t addr, uint32_t d
return result;
}

static rt_phy_status rt_phy_init(void *object, rt_uint32_t phy_addr, rt_uint32_t src_clock_hz)
static rt_phy_status rt_phy_init(struct rt_phy_device *phy, void *object, rt_uint32_t phy_addr, rt_uint32_t src_clock_hz)
{
rt_bool_t ret;
rt_phy_status result;
Expand Down Expand Up @@ -309,7 +309,7 @@ static rt_phy_status rt_phy_init(void *object, rt_uint32_t phy_addr, rt_uint32_t
return result;
}

static rt_phy_status rt_phy_read(rt_uint32_t reg, rt_uint32_t *data)
static rt_phy_status rt_phy_read(struct rt_phy_device *phy, rt_uint32_t reg, rt_uint32_t *data)
{
rt_mdio_t *mdio_bus = phy_rtl8211f.bus;
rt_uint32_t device_id = phy_rtl8211f.addr;
Expand All @@ -321,7 +321,7 @@ static rt_phy_status rt_phy_read(rt_uint32_t reg, rt_uint32_t *data)
return PHY_STATUS_FAIL;
}

static rt_phy_status rt_phy_write(rt_uint32_t reg, rt_uint32_t data)
static rt_phy_status rt_phy_write(struct rt_phy_device *phy, rt_uint32_t reg, rt_uint32_t data)
{
rt_mdio_t *mdio_bus = phy_rtl8211f.bus;
rt_uint32_t device_id = phy_rtl8211f.addr;
Expand All @@ -333,7 +333,7 @@ static rt_phy_status rt_phy_write(rt_uint32_t reg, rt_uint32_t data)
return PHY_STATUS_FAIL;
}

static rt_phy_status rt_phy_loopback(rt_uint32_t mode, rt_uint32_t speed, rt_bool_t enable)
static rt_phy_status rt_phy_loopback(struct rt_phy_device *phy, rt_uint32_t mode, rt_uint32_t speed, rt_bool_t enable)
{
/* This PHY only supports local loopback. */
// rt_assert(mode == PHY_LOCAL_LOOP);
Expand Down Expand Up @@ -371,7 +371,7 @@ static rt_phy_status rt_phy_loopback(rt_uint32_t mode, rt_uint32_t speed, rt_boo
return result;
}

static rt_phy_status get_link_status(rt_bool_t *status)
static rt_phy_status get_link_status(struct rt_phy_device *phy, rt_bool_t *status)
{
// assert(status);

Expand All @@ -396,7 +396,7 @@ static rt_phy_status get_link_status(rt_bool_t *status)
return result;
}

static rt_phy_status get_link_speed_duplex(rt_uint32_t *speed, rt_uint32_t *duplex)
static rt_phy_status get_link_speed_duplex(struct rt_phy_device *phy, rt_uint32_t *speed, rt_uint32_t *duplex)
{
// assert(!((speed == NULL) && (duplex == NULL)));

Expand Down Expand Up @@ -441,7 +441,7 @@ static rt_phy_status get_link_speed_duplex(rt_uint32_t *speed, rt_uint32_t *dupl
return result;
}

static struct rt_phy_ops phy_ops =
static const struct rt_phy_ops phy_ops =
{
.init = rt_phy_init,
.read = rt_phy_read,
Expand Down
116 changes: 78 additions & 38 deletions bsp/qemu-virt64-aarch64/.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# RT-Thread Kernel
#
CONFIG_RT_NAME_MAX=16
CONFIG_RT_NAME_MAX=24
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
CONFIG_RT_USING_SMART=y
CONFIG_RT_USING_SMP=y
Expand Down Expand Up @@ -64,7 +64,7 @@ CONFIG_RT_USING_MESSAGEQUEUE=y
# Memory Management
#
CONFIG_RT_PAGE_MAX_ORDER=11
# CONFIG_RT_USING_MEMPOOL is not set
CONFIG_RT_USING_MEMPOOL=y
# CONFIG_RT_USING_SMALL_MEM is not set
CONFIG_RT_USING_SLAB=y
CONFIG_RT_USING_MEMHEAP=y
Expand Down Expand Up @@ -174,6 +174,7 @@ CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=512
CONFIG_RT_DFS_ELM_REENTRANT=y
CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT=3000
CONFIG_RT_USING_DFS_DEVFS=y
CONFIG_RT_USING_DFS_DIRECTFS=y
CONFIG_RT_USING_DFS_ROMFS=y
# CONFIG_RT_USING_DFS_CROMFS is not set
# CONFIG_RT_USING_DFS_RAMFS is not set
Expand All @@ -192,30 +193,46 @@ CONFIG_RT_LWP_SHM_MAX_NR=64
#
# Device Drivers
#
CONFIG_RT_USING_DEVICE_IPC=y
CONFIG_RT_UNAMED_PIPE_NUMBER=64
CONFIG_RT_USING_SYSTEM_WORKQUEUE=y
CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=8192
CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23
CONFIG_RT_USING_TTY=y
# CONFIG_RT_TTY_DEBUG is not set
# CONFIG_RT_USING_CAN is not set
# CONFIG_RT_USING_CPUTIME is not set
# CONFIG_RT_USING_I2C is not set
# CONFIG_RT_USING_PHY is not set
# CONFIG_RT_USING_ADC is not set
# CONFIG_RT_USING_DAC is not set
CONFIG_RT_USING_NULL=y
CONFIG_RT_USING_ZERO=y
CONFIG_RT_USING_RANDOM=y
# CONFIG_RT_USING_PWM is not set
# CONFIG_RT_USING_SDIO is not set
# CONFIG_RT_USING_SPI is not set
# CONFIG_RT_USING_WDT is not set
# CONFIG_RT_USING_AUDIO is not set
# CONFIG_RT_USING_SENSOR is not set
# CONFIG_RT_USING_PM is not set
# CONFIG_RT_USING_TOUCH is not set
# CONFIG_RT_USING_LCD is not set
# CONFIG_RT_USING_PULSE_ENCODER is not set
# CONFIG_RT_USING_INPUT_CAPTURE is not set
CONFIG_RT_USING_DEV_BUS=y
# CONFIG_RT_USING_WIFI is not set
CONFIG_RT_USING_DEVICE_IPC=y
CONFIG_RT_UNAMED_PIPE_NUMBER=64
CONFIG_RT_USING_SYSTEM_WORKQUEUE=y
CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=8192
CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23
# CONFIG_RT_USING_ADC is not set
CONFIG_RT_USING_AUDIO=y
CONFIG_RT_AUDIO_REPLAY_MP_BLOCK_SIZE=4096
CONFIG_RT_AUDIO_REPLAY_MP_BLOCK_COUNT=2
CONFIG_RT_AUDIO_RECORD_PIPE_SIZE=2048
CONFIG_RT_AUDIO_INTEL_HDA=y
# CONFIG_RT_AUDIO_ROCKCHIP is not set
CONFIG_RT_USING_BLK=y

#
# Partition Types
#
CONFIG_RT_BLK_PARTITION_DFS=y
CONFIG_RT_BLK_PARTITION_EFI=y
# CONFIG_RT_USING_CAN is not set
CONFIG_RT_USING_CLK=y
# CONFIG_RT_CLK_ROCKCHIP is not set
CONFIG_RT_USING_FIRMWARE=y
CONFIG_RT_FIRMWARE_PSCI=y
CONFIG_RT_FIRMWARE_QEMU_FW_CFG=y
# CONFIG_RT_FIRMWARE_ARM_SCMI is not set
CONFIG_RT_USING_HWCRYPTO=y
CONFIG_RT_HWCRYPTO_DEFAULT_NAME="hwcryto"
CONFIG_RT_HWCRYPTO_IV_MAX_SIZE=16
Expand All @@ -231,65 +248,87 @@ CONFIG_RT_HWCRYPTO_KEYBIT_MAX_SIZE=256
CONFIG_RT_HWCRYPTO_USING_RNG=y
# CONFIG_RT_HWCRYPTO_USING_CRC is not set
# CONFIG_RT_HWCRYPTO_USING_BIGNUM is not set
# CONFIG_RT_USING_PULSE_ENCODER is not set
# CONFIG_RT_USING_INPUT_CAPTURE is not set
CONFIG_RT_USING_DEV_BUS=y
# CONFIG_RT_USING_WIFI is not set
CONFIG_RT_USING_CLK=y
CONFIG_RT_USING_FIRMWARE=y
CONFIG_RT_FIRMWARE_PSCI=y
# CONFIG_RT_HWCRYPTO_RNG_ROCKCHIP is not set
# CONFIG_RT_USING_HWSPINLOCK is not set
CONFIG_RT_USING_HWTIMER=y
CONFIG_RT_HWTIMER_ARM_ARCH=y
# CONFIG_RT_HWTIMER_RISCV_CLINT is not set
# CONFIG_RT_HWTIMER_BCM2835 is not set
# CONFIG_RT_HWTIMER_ROCKCHIP is not set
# CONFIG_RT_USING_I2C is not set
CONFIG_RT_USING_INPUT=y
CONFIG_RT_INPUT_KEYBOARD=y
CONFIG_RT_INPUT_KEYBOARD_GPIO_KEYS=y
# CONFIG_RT_INPUT_MISC is not set
# CONFIG_RT_USING_LED is not set
# CONFIG_RT_USING_MBOX is not set
# CONFIG_RT_USING_MFD is not set
# CONFIG_RT_USING_MTD_NAND is not set
CONFIG_RT_USING_MTD_NOR=y
CONFIG_RT_USING_MTD_NOR_CFI=y
CONFIG_RT_USING_OFW=y
# CONFIG_RT_USING_BUILTIN_FDT is not set
CONFIG_RT_FDT_EARLYCON_MSG_SIZE=128
CONFIG_RT_USING_OFW_DIRECTFS=y
CONFIG_RT_USING_PCI=y
CONFIG_RT_PCI_MSI=y
CONFIG_RT_PCI_SYS_64BIT=y
CONFIG_RT_PCI_CACHE_LINE_SIZE=8
# CONFIG_RT_PCI_LOCKLESS is not set
CONFIG_RT_PCI_ECAM=y
CONFIG_RT_PCI_HOST_COMMON=y
CONFIG_RT_PCI_HOST_GENERIC=y
# CONFIG_RT_PCI_DW_HOST is not set
# CONFIG_RT_USING_PHY is not set
CONFIG_RT_USING_PIC=y
CONFIG_MAX_HANDLERS=512
# CONFIG_RT_PIC_BCM2835_INTC is not set
# CONFIG_RT_PIC_BCM2836_L1_INTC is not set
CONFIG_RT_PIC_ARM_GIC=y
# CONFIG_RT_PIC_ARM_GIC_V2M is not set
CONFIG_RT_PIC_ARM_GIC_V2M=y
CONFIG_RT_PIC_ARM_GIC_V3=y
# CONFIG_RT_PIC_ARM_GIC_V3_ITS is not set
CONFIG_RT_PIC_ARM_GIC_V3_ITS=y
CONFIG_RT_PIC_ARM_GIC_MAX_NR=1
# CONFIG_RT_PIC_RISCV_INTC is not set
# CONFIG_RT_PIC_SIFIVE_PLIC is not set
# CONFIG_RT_USING_PINCTRL is not set
CONFIG_RT_USING_PIN=y
CONFIG_RT_PIN_PL061=y
CONFIG_RT_USING_PM=y
CONFIG_PM_TICKLESS_THRESHOLD_TIME=2
# CONFIG_PM_USING_CUSTOM_CONFIG is not set
# CONFIG_PM_ENABLE_DEBUG is not set
# CONFIG_PM_ENABLE_SUSPEND_SLEEP_MODE is not set
# CONFIG_PM_ENABLE_THRESHOLD_SLEEP_MODE is not set
# CONFIG_RT_PM_RESET_SYSCON is not set
# CONFIG_RT_PM_RESET_SYSCON_POWEROFF is not set
# CONFIG_RT_PIN_ROCKCHIP is not set
# CONFIG_RT_USING_POWER_RESET is not set
# CONFIG_RT_USING_PWM is not set
# CONFIG_RT_USING_REGULATOR is not set
# CONFIG_RT_USING_RESET is not set
CONFIG_RT_USING_RTC=y
CONFIG_RT_USING_ALARM=y
# CONFIG_RT_USING_SOFT_RTC is not set
CONFIG_RT_RTC_PL031=y
# CONFIG_RT_RTC_GOLDFISH is not set
# CONFIG_RT_RTC_HYM8563 is not set
CONFIG_RT_RTC_PL031=y
# CONFIG_RT_RTC_RK_TIMER is not set
# CONFIG_RT_USING_SDIO is not set
# CONFIG_RT_USING_SENSOR is not set
CONFIG_RT_USING_SERIAL=y
CONFIG_RT_USING_SERIAL_V1=y
# CONFIG_RT_USING_SERIAL_V2 is not set
CONFIG_RT_SERIAL_USING_DMA=y
CONFIG_RT_SERIAL_RB_BUFSZ=256
CONFIG_RT_SERIAL_PL011=y
CONFIG_RT_SERIAL_8250=y
# CONFIG_RT_SERIAL_8250_BCM2835AUX is not set
# CONFIG_RT_SERIAL_8250_DW is not set
# CONFIG_RT_SERIAL_8250_OFW is not set
CONFIG_RT_SERIAL_8250_PCI=y
# CONFIG_RT_USING_SOC is not set
# CONFIG_RT_USING_SPI is not set
CONFIG_RT_USING_VIRTIO=y
CONFIG_RT_VIRTIO_TRANSPORT_MMIO=y
CONFIG_RT_VIRTIO_TRANSPORT_PCI=y
CONFIG_RT_VIRTIO_NET=y
CONFIG_RT_VIRTIO_BLK=y
CONFIG_RT_VIRTIO_CONSOLE=y
CONFIG_RT_VIRTIO_RNG=y
CONFIG_RT_VIRTIO_GPU=y
CONFIG_RT_VIRTIO_INPUT=y
CONFIG_RT_VIRTIO_SOUND=y
# CONFIG_RT_USING_WDT is not set

#
# Using USB
Expand Down Expand Up @@ -424,6 +463,7 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_RT_USING_ULOG is not set
# CONFIG_RT_USING_UTEST is not set
# CONFIG_RT_USING_VAR_EXPORT is not set
CONFIG_RT_USING_CRASH_CORE=y
CONFIG_RT_USING_ADT=y
CONFIG_RT_USING_ADT_AVL=y
CONFIG_RT_USING_ADT_BITMAP=y
Expand Down
1 change: 1 addition & 0 deletions bsp/qemu-virt64-aarch64/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.qcow2
Loading

0 comments on commit 2058ff1

Please sign in to comment.