feat: add luckfox pico pro/max support
This commit is contained in:
parent
7e5e289d7e
commit
e1dea8a98d
|
|
@ -14,7 +14,7 @@ TARGET5 = luckfox_uart_test
|
||||||
TARGET6 = luckfox_spi_test
|
TARGET6 = luckfox_spi_test
|
||||||
|
|
||||||
|
|
||||||
all: $(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4) $(TARGET5) $(TARGET6)
|
all: $(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4) $(TARGET5) $(TARGET6)
|
||||||
|
|
||||||
$(TARGET1): $(TARGET1).o $(OBJ)
|
$(TARGET1): $(TARGET1).o $(OBJ)
|
||||||
@$(CC) $(CFLAGS) $(TARGET1).o $(OBJ) -o $@
|
@$(CC) $(CFLAGS) $(TARGET1).o $(OBJ) -o $@
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,37 @@
|
||||||
int GPIO_BEGIN_PIN, GPIO_END_PIN;
|
int GPIO_BEGIN_PIN, GPIO_END_PIN;
|
||||||
int *TEST_PIN;
|
int *TEST_PIN;
|
||||||
|
|
||||||
|
int PICO_MAX_GPIOS[] = {
|
||||||
|
LUCKFOX_PICO_MAX_GPIO0,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO1,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO2,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO3,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO4,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO5,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO6,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO7,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO8,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO9,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO10,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO11,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO12,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO13,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO14,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO15,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO16,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO17,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO18,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO19,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO20,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO21,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO22,
|
||||||
|
/*23-25*/
|
||||||
|
LUCKFOX_PICO_MAX_GPIO26,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO27,
|
||||||
|
LUCKFOX_PICO_MAX_GPIO28,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
int PICO_PLUS_GPIOS[] = {
|
int PICO_PLUS_GPIOS[] = {
|
||||||
LUCKFOX_PICO_PLUS_GPIO0,
|
LUCKFOX_PICO_PLUS_GPIO0,
|
||||||
LUCKFOX_PICO_PLUS_GPIO1,
|
LUCKFOX_PICO_PLUS_GPIO1,
|
||||||
|
|
@ -62,6 +93,7 @@ int PICO_PLUS_GPIOS[] = {
|
||||||
LUCKFOX_PICO_PLUS_GPIO20,
|
LUCKFOX_PICO_PLUS_GPIO20,
|
||||||
LUCKFOX_PICO_PLUS_GPIO21,
|
LUCKFOX_PICO_PLUS_GPIO21,
|
||||||
LUCKFOX_PICO_PLUS_GPIO22,
|
LUCKFOX_PICO_PLUS_GPIO22,
|
||||||
|
/*23-25*/
|
||||||
LUCKFOX_PICO_PLUS_GPIO26,
|
LUCKFOX_PICO_PLUS_GPIO26,
|
||||||
LUCKFOX_PICO_PLUS_GPIO27,
|
LUCKFOX_PICO_PLUS_GPIO27,
|
||||||
};
|
};
|
||||||
|
|
@ -125,12 +157,13 @@ int main(int argc, char *argv[])
|
||||||
printf("Please select your test borad\r\n");
|
printf("Please select your test borad\r\n");
|
||||||
printf("* 1. LUCKFOX PICO\r\n");
|
printf("* 1. LUCKFOX PICO\r\n");
|
||||||
printf("* 2. LUCKFOX PICO PLUS\r\n");
|
printf("* 2. LUCKFOX PICO PLUS\r\n");
|
||||||
|
printf("* 3. LUCKFOX PICO MAX\r\n");
|
||||||
printf("-----------------------------\r\n");
|
printf("-----------------------------\r\n");
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
printf("Which would you like? :");
|
printf("Which would you like? :");
|
||||||
input_char = getchar();
|
input_char = getchar();
|
||||||
if (input_char >= '1' && input_char <= '2')
|
if (input_char >= '1' && input_char <= '3')
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -148,6 +181,12 @@ int main(int argc, char *argv[])
|
||||||
GPIO_END_PIN = 22;
|
GPIO_END_PIN = 22;
|
||||||
TEST_PIN = PICO_PLUS_GPIOS;
|
TEST_PIN = PICO_PLUS_GPIOS;
|
||||||
}
|
}
|
||||||
|
else if (input_char == '3')
|
||||||
|
{
|
||||||
|
GPIO_BEGIN_PIN = 16;
|
||||||
|
GPIO_END_PIN = 22;
|
||||||
|
TEST_PIN = PICO_MAX_GPIOS;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
@ -155,7 +194,7 @@ int main(int argc, char *argv[])
|
||||||
printf("-----------------------------\r\n");
|
printf("-----------------------------\r\n");
|
||||||
printf("Please select your test borad\r\n");
|
printf("Please select your test borad\r\n");
|
||||||
printf("* 1. Default part(GP%d-GP%d)\r\n", GPIO_BEGIN_PIN, GPIO_END_PIN);
|
printf("* 1. Default part(GP%d-GP%d)\r\n", GPIO_BEGIN_PIN, GPIO_END_PIN);
|
||||||
printf("* 2. ALL(Except GP0 GP1)\r\n");
|
printf("* 2. ALL(GP2-GP%d)\r\n", GPIO_END_PIN);
|
||||||
printf("-----------------------------\r\n");
|
printf("-----------------------------\r\n");
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,9 @@
|
||||||
#include <signal.h> //signal()
|
#include <signal.h> //signal()
|
||||||
#include "luckfox_pwm.h"
|
#include "luckfox_pwm.h"
|
||||||
|
|
||||||
int PWMS[] = {0, 1, 10, 11};
|
int PICO_PWMS[] = {0, 1, 10, 11};
|
||||||
|
int PICO_MAX_PWMS[] = {5, 6, 10, 11};
|
||||||
|
int *TEST_PWM;
|
||||||
|
|
||||||
void Delay_ms(uint32_t xms)
|
void Delay_ms(uint32_t xms)
|
||||||
{
|
{
|
||||||
|
|
@ -51,9 +53,9 @@ void Handler(int signo)
|
||||||
printf("\r\nHandler:exit\r\n");
|
printf("\r\nHandler:exit\r\n");
|
||||||
for (int x = 0; x < 4; x++)
|
for (int x = 0; x < 4; x++)
|
||||||
{
|
{
|
||||||
luckfox_pwm_set_duty(PWMS[x], 0);
|
luckfox_pwm_set_duty(TEST_PWM[x], 0);
|
||||||
luckfox_pwm_deinit(PWMS[x]);
|
luckfox_pwm_deinit(TEST_PWM[x]);
|
||||||
printf("PWM%dM0 deinit\r\n", PWMS[x]);
|
printf("PWM%dM0 deinit\r\n", TEST_PWM[x]);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
@ -61,12 +63,43 @@ void Handler(int signo)
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
char input_char = '0';
|
||||||
signal(SIGINT, Handler);
|
signal(SIGINT, Handler);
|
||||||
|
printf("-----------------------------\r\n");
|
||||||
|
printf("----------PWM TEST----------\r\n");
|
||||||
|
printf("-----------------------------\r\n");
|
||||||
|
printf("Please select your test borad\r\n");
|
||||||
|
printf("* 1. LUCKFOX PICO & LUCKFOX PICO PLUS\r\n");
|
||||||
|
printf("* 2. LUCKFOX PICO MAX\r\n");
|
||||||
|
printf("-----------------------------\r\n");
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
printf("Which would you like? :");
|
||||||
|
input_char = getchar();
|
||||||
|
if (input_char >= '1' && input_char <= '2')
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (input_char == '1')
|
||||||
|
{
|
||||||
|
TEST_PWM = PICO_PWMS;
|
||||||
|
}
|
||||||
|
else if (input_char == '2')
|
||||||
|
{
|
||||||
|
TEST_PWM = PICO_MAX_PWMS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
for (int x = 0; x < 4; x++)
|
for (int x = 0; x < 4; x++)
|
||||||
{
|
{
|
||||||
luckfox_pwm_init(PWMS[x], 100000, 15000 * (x + 1), PWM_POLARITY_NORMAL);
|
luckfox_pwm_init(TEST_PWM[x], 100000, 15000 * (x + 1), PWM_POLARITY_NORMAL);
|
||||||
luckfox_pwm_set_enable(PWMS[x], true);
|
luckfox_pwm_set_enable(TEST_PWM[x], true);
|
||||||
printf("PWM%dM0 period=%d duty=%d\r\n", PWMS[x], luckfox_pwm_get_period(PWMS[x]), luckfox_pwm_get_duty(PWMS[x]));
|
printf("PWM%dM0 period=%d duty=%d\r\n", TEST_PWM[x], luckfox_pwm_get_period(TEST_PWM[x]), luckfox_pwm_get_duty(TEST_PWM[x]));
|
||||||
}
|
}
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,46 @@
|
||||||
|
|
||||||
#define GPIO(bank, pin) ((((bank) * 32) + (pin)))
|
#define GPIO(bank, pin) ((((bank) * 32) + (pin)))
|
||||||
|
|
||||||
|
/**********************************************/
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO0 GPIO(GPIO1,PB2)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO1 GPIO(GPIO1,PB3)
|
||||||
|
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO2 GPIO(GPIO1,PC7)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO3 GPIO(GPIO1,PC6)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO4 GPIO(GPIO1,PC5)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO5 GPIO(GPIO1,PC4)
|
||||||
|
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO6 GPIO(GPIO1,PD2)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO7 GPIO(GPIO1,PD3)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO8 GPIO(GPIO2,PB1)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO9 GPIO(GPIO1,PC0)
|
||||||
|
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO10 GPIO(GPIO1,PC1)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO11 GPIO(GPIO1,PC2)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO12 GPIO(GPIO1,PC3)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO13 GPIO(GPIO2,PB0)
|
||||||
|
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO14 GPIO(GPIO1,PD0)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO15 GPIO(GPIO1,PD1)
|
||||||
|
|
||||||
|
/**********************************************/
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO28 GPIO(GPIO2,PA7)
|
||||||
|
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO27 GPIO(GPIO4,PC1)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO26 GPIO(GPIO4,PC0)
|
||||||
|
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO22 GPIO(GPIO2,PA6)
|
||||||
|
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO21 GPIO(GPIO2,PA3)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO20 GPIO(GPIO2,PA2)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO19 GPIO(GPIO2,PA1)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO18 GPIO(GPIO2,PA0)
|
||||||
|
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO17 GPIO(GPIO2,PA5)
|
||||||
|
#define LUCKFOX_PICO_MAX_GPIO16 GPIO(GPIO2,PA4)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************/
|
/**********************************************/
|
||||||
#define LUCKFOX_PICO_PLUS_GPIO0 GPIO(GPIO1,PB2)
|
#define LUCKFOX_PICO_PLUS_GPIO0 GPIO(GPIO1,PB2)
|
||||||
#define LUCKFOX_PICO_PLUS_GPIO1 GPIO(GPIO1,PB3)
|
#define LUCKFOX_PICO_PLUS_GPIO1 GPIO(GPIO1,PB3)
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,9 @@ enable_venc_1 = 1
|
||||||
enable_venc_2 = 0
|
enable_venc_2 = 0
|
||||||
enable_npu = 1
|
enable_npu = 1
|
||||||
npu_fps = 10
|
npu_fps = 10
|
||||||
|
buffer_line = 1296
|
||||||
enable_rtsp = 1
|
enable_rtsp = 1
|
||||||
enable_rtmp = 1
|
enable_rtmp = 0
|
||||||
rotation = 0 ; available value:0 90 180 270
|
rotation = 0 ; available value:0 90 180 270
|
||||||
|
|
||||||
[video.0]
|
[video.0]
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ enable_venc_2 = 0
|
||||||
enable_npu = 1
|
enable_npu = 1
|
||||||
npu_fps = 10
|
npu_fps = 10
|
||||||
enable_rtsp = 1
|
enable_rtsp = 1
|
||||||
enable_rtmp = 1
|
enable_rtmp = 0
|
||||||
rotation = 0 ; available value:0 90 180 270
|
rotation = 0 ; available value:0 90 180 270
|
||||||
|
|
||||||
[video.0]
|
[video.0]
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ enable_venc_2 = 0
|
||||||
enable_npu = 1
|
enable_npu = 1
|
||||||
npu_fps = 10
|
npu_fps = 10
|
||||||
enable_rtsp = 1
|
enable_rtsp = 1
|
||||||
enable_rtmp = 1
|
enable_rtmp = 0
|
||||||
rotation = 0 ; available value:0 90 180 270
|
rotation = 0 ; available value:0 90 180 270
|
||||||
|
|
||||||
[video.0]
|
[video.0]
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Target arch
|
||||||
|
export RK_ARCH=arm
|
||||||
|
|
||||||
|
# Target CHIP
|
||||||
|
export RK_CHIP=rv1106
|
||||||
|
|
||||||
|
# Target Toolchain Cross Compile
|
||||||
|
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
|
||||||
|
|
||||||
|
# Target boot medium: emmc/spi_nor/spi_nand
|
||||||
|
export RK_BOOT_MEDIUM=spi_nand
|
||||||
|
|
||||||
|
# Uboot defconfig
|
||||||
|
export RK_UBOOT_DEFCONFIG=rv1106_defconfig
|
||||||
|
|
||||||
|
# Uboot defconfig fragment
|
||||||
|
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config
|
||||||
|
|
||||||
|
# Kernel defconfig
|
||||||
|
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
|
||||||
|
|
||||||
|
# Kernel dts
|
||||||
|
export RK_KERNEL_DTS=rv1106g-luckfox-pico-max.dts
|
||||||
|
|
||||||
|
#misc image
|
||||||
|
export RK_MISC=wipe_all-misc.img
|
||||||
|
|
||||||
|
# Config sensor IQ files
|
||||||
|
# RK_CAMERA_SENSOR_IQFILES format:
|
||||||
|
# "iqfile1 iqfile2 iqfile3 ..."
|
||||||
|
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
|
||||||
|
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json"
|
||||||
|
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
|
||||||
|
|
||||||
|
# Config sensor lens CAC calibrattion bin files
|
||||||
|
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
|
||||||
|
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
|
||||||
|
|
||||||
|
# Config CMA size in environment
|
||||||
|
# export RK_BOOTARGS_CMA_SIZE="24M"
|
||||||
|
export RK_BOOTARGS_CMA_SIZE="66M"
|
||||||
|
|
||||||
|
# config partition in environment
|
||||||
|
# RK_PARTITION_CMD_IN_ENV format:
|
||||||
|
# <partdef>[,<partdef>]
|
||||||
|
# <partdef> := <size>[@<offset>](part-name)
|
||||||
|
# Note:
|
||||||
|
# If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding.
|
||||||
|
export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),32M(rootfs),48M(oem),160M(userdata)"
|
||||||
|
#export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),256K(uboot),8M(boot),32M(rootfs),48M(oem),32M(userdata),-(media)"
|
||||||
|
|
||||||
|
# config partition's filesystem type (squashfs is readonly)
|
||||||
|
# emmc: squashfs/ext4
|
||||||
|
# nand: squashfs/ubifs
|
||||||
|
# spi nor: squashfs/jffs2
|
||||||
|
# RK_PARTITION_FS_TYPE_CFG format:
|
||||||
|
# AAAA:/BBBB/CCCC@ext4
|
||||||
|
# AAAA ----------> partition name
|
||||||
|
# /BBBB/CCCC ----> partition mount point
|
||||||
|
# ext4 ----------> partition filesystem type
|
||||||
|
#export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@squashfs,oem@/oem@squashfs,userdata@/userdata@ubifs
|
||||||
|
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/userdata@ubifs
|
||||||
|
|
||||||
|
# config filesystem compress (Just for squashfs or ubifs)
|
||||||
|
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
|
||||||
|
# ubifs: lzo/zlib, default lzo
|
||||||
|
# export RK_SQUASHFS_COMP=xz
|
||||||
|
# export RK_UBIFS_COMP=lzo
|
||||||
|
|
||||||
|
# app config
|
||||||
|
# export RK_APP_TYPE=RKIPC_RV1103
|
||||||
|
export RK_APP_TYPE=RKIPC_RV1106
|
||||||
|
|
||||||
|
# build ipc web backend
|
||||||
|
# export RK_APP_IPCWEB_BACKEND=y
|
||||||
|
|
||||||
|
# enable install app to oem partition
|
||||||
|
export RK_BUILD_APP_TO_OEM_PARTITION=y
|
||||||
|
|
||||||
|
# enable rockchip test
|
||||||
|
export RK_ENABLE_ROCKCHIP_TEST=y
|
||||||
|
|
||||||
278
sysdrv/source/kernel/arch/arm/boot/dts/rv1106-luckfox-pico-max-ipc.dtsi
Executable file
278
sysdrv/source/kernel/arch/arm/boot/dts/rv1106-luckfox-pico-max-ipc.dtsi
Executable file
|
|
@ -0,0 +1,278 @@
|
||||||
|
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Rockchip Electronics Co., Ltd.
|
||||||
|
*/
|
||||||
|
#include "rv1106-amp.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
bootargs = "earlycon=uart8250,mmio32,0xff4c0000 console=ttyFIQ0 rootwait snd_soc_core.prealloc_buffer_size_kbytes=16 coherent_pool=0";
|
||||||
|
};
|
||||||
|
|
||||||
|
acodec_sound: acodec-sound {
|
||||||
|
compatible = "simple-audio-card";
|
||||||
|
simple-audio-card,name = "rv-acodec";
|
||||||
|
simple-audio-card,format = "i2s";
|
||||||
|
simple-audio-card,mclk-fs = <256>;
|
||||||
|
simple-audio-card,cpu {
|
||||||
|
sound-dai = <&i2s0_8ch>;
|
||||||
|
};
|
||||||
|
simple-audio-card,codec {
|
||||||
|
sound-dai = <&acodec>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc_1v8: vcc-1v8 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vcc_1v8";
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc_3v3: vcc-3v3 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vcc_3v3";
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-min-microvolt = <3300000>;
|
||||||
|
regulator-max-microvolt = <3300000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vdd_arm: vdd-arm {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vdd_arm";
|
||||||
|
regulator-min-microvolt = <900000>;
|
||||||
|
regulator-max-microvolt = <900000>;
|
||||||
|
regulator-always-on;
|
||||||
|
|
||||||
|
regulator-boot-on;
|
||||||
|
};
|
||||||
|
leds: leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
work_led: work{
|
||||||
|
gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "activity";
|
||||||
|
default-state = "on";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&acodec {
|
||||||
|
#sound-dai-cells = <0>;
|
||||||
|
pa-ctl-gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&cpu0 {
|
||||||
|
cpu-supply = <&vdd_arm>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&csi2_dphy_hw {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&csi2_dphy0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
ports {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
port@0 {
|
||||||
|
reg = <0>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
csi_dphy_input0: endpoint@0 {
|
||||||
|
reg = <0>;
|
||||||
|
remote-endpoint = <&sc3336_out>;
|
||||||
|
data-lanes = <1 2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
csi_dphy_input1: endpoint@1 {
|
||||||
|
reg = <1>;
|
||||||
|
remote-endpoint = <&sc4336_out>;
|
||||||
|
data-lanes = <1 2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
csi_dphy_input2: endpoint@2 {
|
||||||
|
reg = <2>;
|
||||||
|
remote-endpoint = <&sc530ai_out>;
|
||||||
|
data-lanes = <1 2>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
port@1 {
|
||||||
|
reg = <1>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
csi_dphy_output: endpoint@0 {
|
||||||
|
reg = <0>;
|
||||||
|
remote-endpoint = <&mipi_csi2_input>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c4 {
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <400000>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&i2c4m2_xfer>;
|
||||||
|
|
||||||
|
sc3336: sc3336@30 {
|
||||||
|
compatible = "smartsens,sc3336";
|
||||||
|
status = "okay";
|
||||||
|
reg = <0x30>;
|
||||||
|
clocks = <&cru MCLK_REF_MIPI0>;
|
||||||
|
clock-names = "xvclk";
|
||||||
|
pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&mipi_refclk_out0>;
|
||||||
|
rockchip,camera-module-index = <0>;
|
||||||
|
rockchip,camera-module-facing = "back";
|
||||||
|
rockchip,camera-module-name = "CMK-OT2119-PC1";
|
||||||
|
rockchip,camera-module-lens-name = "30IRC-F16";
|
||||||
|
port {
|
||||||
|
sc3336_out: endpoint {
|
||||||
|
remote-endpoint = <&csi_dphy_input0>;
|
||||||
|
data-lanes = <1 2>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sc4336: sc4336@30 {
|
||||||
|
compatible = "smartsens,sc4336";
|
||||||
|
status = "okay";
|
||||||
|
reg = <0x30>;
|
||||||
|
clocks = <&cru MCLK_REF_MIPI0>;
|
||||||
|
clock-names = "xvclk";
|
||||||
|
pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&mipi_refclk_out0>;
|
||||||
|
rockchip,camera-module-index = <0>;
|
||||||
|
rockchip,camera-module-facing = "back";
|
||||||
|
rockchip,camera-module-name = "OT01";
|
||||||
|
rockchip,camera-module-lens-name = "40IRC_F16";
|
||||||
|
port {
|
||||||
|
sc4336_out: endpoint {
|
||||||
|
remote-endpoint = <&csi_dphy_input1>;
|
||||||
|
data-lanes = <1 2>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sc530ai: sc530ai@30 {
|
||||||
|
compatible = "smartsens,sc530ai";
|
||||||
|
status = "okay";
|
||||||
|
reg = <0x30>;
|
||||||
|
clocks = <&cru MCLK_REF_MIPI0>;
|
||||||
|
clock-names = "xvclk";
|
||||||
|
pwdn-gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&mipi_refclk_out0>;
|
||||||
|
rockchip,camera-module-index = <0>;
|
||||||
|
rockchip,camera-module-facing = "back";
|
||||||
|
rockchip,camera-module-name = "CMK-OT2115-PC1";
|
||||||
|
rockchip,camera-module-lens-name = "30IRC-F16";
|
||||||
|
port {
|
||||||
|
sc530ai_out: endpoint {
|
||||||
|
remote-endpoint = <&csi_dphy_input2>;
|
||||||
|
data-lanes = <1 2>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2s0_8ch {
|
||||||
|
#sound-dai-cells = <0>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mipi0_csi2 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
ports {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
port@0 {
|
||||||
|
reg = <0>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
mipi_csi2_input: endpoint@1 {
|
||||||
|
reg = <1>;
|
||||||
|
remote-endpoint = <&csi_dphy_output>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
port@1 {
|
||||||
|
reg = <1>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
mipi_csi2_output: endpoint@0 {
|
||||||
|
reg = <0>;
|
||||||
|
remote-endpoint = <&cif_mipi_in>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&rkcif {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&rkcif_mipi_lvds {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&mipi_pins>;
|
||||||
|
port {
|
||||||
|
/* MIPI CSI-2 endpoint */
|
||||||
|
cif_mipi_in: endpoint {
|
||||||
|
remote-endpoint = <&mipi_csi2_output>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&rkcif_mipi_lvds_sditf {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
port {
|
||||||
|
/* MIPI CSI-2 endpoint */
|
||||||
|
mipi_lvds_sditf: endpoint {
|
||||||
|
remote-endpoint = <&isp_in>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&rkisp {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&rkisp_vir0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
port@0 {
|
||||||
|
isp_in: endpoint {
|
||||||
|
remote-endpoint = <&mipi_lvds_sditf>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&saradc {
|
||||||
|
status = "okay";
|
||||||
|
vref-supply = <&vcc_1v8>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
&tsadc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
207
sysdrv/source/kernel/arch/arm/boot/dts/rv1106g-luckfox-pico-max.dts
Executable file
207
sysdrv/source/kernel/arch/arm/boot/dts/rv1106g-luckfox-pico-max.dts
Executable file
|
|
@ -0,0 +1,207 @@
|
||||||
|
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Rockchip Electronics Co., Ltd.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include "rv1106.dtsi"
|
||||||
|
#include "rv1106-evb.dtsi"
|
||||||
|
#include "rv1106-luckfox-pico-max-ipc.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Luckfox Pico Max";
|
||||||
|
compatible = "rockchip,rv1103g-38x38-ipc-v10", "rockchip,rv1106";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**********FLASH**********/
|
||||||
|
&sfc {
|
||||||
|
status = "okay";
|
||||||
|
flash@0 {
|
||||||
|
compatible = "spi-nand";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <75000000>;
|
||||||
|
spi-rx-bus-width = <4>;
|
||||||
|
spi-tx-bus-width = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/**********SDMMC**********/
|
||||||
|
&sdmmc {
|
||||||
|
max-frequency = <50000000>;
|
||||||
|
no-sdio;
|
||||||
|
no-mmc;
|
||||||
|
bus-width = <4>;
|
||||||
|
cap-mmc-highspeed;
|
||||||
|
cap-sd-highspeed;
|
||||||
|
disable-wp;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_bus4>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
/**********SDIO**********/
|
||||||
|
// &sdio {
|
||||||
|
// max-frequency = <50000000>;
|
||||||
|
// no-sdio;
|
||||||
|
// no-mmc;
|
||||||
|
// bus-width = <4>;
|
||||||
|
// cap-mmc-highspeed;
|
||||||
|
// cap-sd-highspeed;
|
||||||
|
// disable-wp;
|
||||||
|
// pinctrl-names = "default";
|
||||||
|
// pinctrl-0 = <&sdmmc1m0_cmd &sdmmc1m0_clk &sdmmc1m0_bus4 &clk_32k>;
|
||||||
|
// status = "okay";
|
||||||
|
// };
|
||||||
|
|
||||||
|
/**********ETH**********/
|
||||||
|
&gmac {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
/**********USB**********/
|
||||||
|
&usbdrd_dwc3 {
|
||||||
|
status = "okay";
|
||||||
|
dr_mode = "peripheral";
|
||||||
|
};
|
||||||
|
|
||||||
|
/**********I2C**********/
|
||||||
|
// &i2c1 {
|
||||||
|
// status = "okay";
|
||||||
|
// pinctrl-0 = <&i2c1m1_xfer>;
|
||||||
|
// clock-frequency = <100000>;
|
||||||
|
// };
|
||||||
|
&i2c3 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&i2c3m1_xfer>;
|
||||||
|
clock-frequency = <100000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
// /**********SPI**********/
|
||||||
|
&spi0 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&spi0m0_pins>;
|
||||||
|
cs-gpios = <&gpio1 RK_PC0 1>;
|
||||||
|
// cs-gpios = <&gpio1 26 1>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
spidev@0 {
|
||||||
|
compatible = "rockchip,spidev";
|
||||||
|
spi-max-frequency = <50000000>;
|
||||||
|
reg = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**********UART**********/
|
||||||
|
|
||||||
|
// &uart0 {
|
||||||
|
// status = "okay";
|
||||||
|
// pinctrl-names = "default";
|
||||||
|
// pinctrl-0 = <&uart0m1_xfer>;
|
||||||
|
// };
|
||||||
|
|
||||||
|
// &uart1 {
|
||||||
|
// status = "okay";
|
||||||
|
// pinctrl-names = "default";
|
||||||
|
// pinctrl-0 = <&uart1m1_xfer>;
|
||||||
|
// };
|
||||||
|
|
||||||
|
&uart3 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&uart3m1_xfer>;
|
||||||
|
};
|
||||||
|
&uart4 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&uart4m1_xfer>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// /**********PWM**********/
|
||||||
|
|
||||||
|
// &pwm0 {
|
||||||
|
// status = "okay";
|
||||||
|
// pinctrl-names = "active";
|
||||||
|
// pinctrl-0 = <&pwm0m0_pins>;
|
||||||
|
// // pinctrl-0 = <&pwm0m1_pins>;
|
||||||
|
// };
|
||||||
|
// &pwm1 {
|
||||||
|
// status = "okay";
|
||||||
|
// pinctrl-names = "active";
|
||||||
|
// pinctrl-0 = <&pwm1m0_pins>;
|
||||||
|
// // pinctrl-0 = <&pwm1m1_pins>;
|
||||||
|
// };
|
||||||
|
|
||||||
|
//&pwm2 {
|
||||||
|
// status = "okay";
|
||||||
|
// pinctrl-names = "active";
|
||||||
|
// pinctrl-0 = <&pwm2m2_pins>;
|
||||||
|
//};
|
||||||
|
//&pwm3 {
|
||||||
|
// status = "okay";
|
||||||
|
// pinctrl-names = "active";
|
||||||
|
// pinctrl-0 = <&pwm3m2_pins>;
|
||||||
|
//};
|
||||||
|
//&pwm4 {
|
||||||
|
// status = "okay";
|
||||||
|
// pinctrl-names = "active";
|
||||||
|
// pinctrl-0 = <&pwm4m2_pins>;
|
||||||
|
//};
|
||||||
|
&pwm5 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "active";
|
||||||
|
pinctrl-0 = <&pwm5m1_pins>;
|
||||||
|
// pinctrl-0 = <&pwm5m2_pins>;
|
||||||
|
};
|
||||||
|
&pwm6 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "active";
|
||||||
|
pinctrl-0 = <&pwm6m1_pins>;
|
||||||
|
// pinctrl-0 = <&pwm6m2_pins>;
|
||||||
|
};
|
||||||
|
//&pwm7 {
|
||||||
|
// status = "okay";
|
||||||
|
// pinctrl-names = "active";
|
||||||
|
// pinctrl-0 = <&pwm7m2_pins>;
|
||||||
|
//};
|
||||||
|
//&pwm8 {
|
||||||
|
// status = "okay";
|
||||||
|
// pinctrl-names = "active";
|
||||||
|
// // pinctrl-0 = <&pwm8m1_pins>;
|
||||||
|
// pinctrl-0 = <&pwm8m0_pins>;
|
||||||
|
//};
|
||||||
|
//&pwm9 {
|
||||||
|
// status = "okay";
|
||||||
|
// pinctrl-names = "active";
|
||||||
|
// // pinctrl-0 = <&pwm9m1_pins>;
|
||||||
|
// pinctrl-0 = <&pwm9m0_pins>;
|
||||||
|
//};
|
||||||
|
|
||||||
|
&pwm10 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "active";
|
||||||
|
pinctrl-0 = <&pwm10m1_pins>;
|
||||||
|
// pinctrl-0 = <&pwm10m2_pins>;
|
||||||
|
// pinctrl-0 = <&pwm10m0_pins>;
|
||||||
|
};
|
||||||
|
&pwm11 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "active";
|
||||||
|
pinctrl-0 = <&pwm11m1_pins>;
|
||||||
|
// pinctrl-0 = <&pwm11m2_pins>;
|
||||||
|
// pinctrl-0 = <&pwm11m0_pins>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
&rtc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user