mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 12:56:00 +01:00
sunxi: Add a U-Boot port for the Lichee RV and its dock
Signed-off-by: Jisheng Zhang <jszhang@kernel.org> [Samuel: licheepi -> lichee; drop DRAM size; other changes] Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
parent
e3a2628d25
commit
9f9ee4816a
@ -7,7 +7,10 @@ dtb-$(CONFIG_TARGET_OPENPITON_RISCV64) += openpiton-riscv64.dtb
|
||||
dtb-$(CONFIG_TARGET_SIFIVE_UNLEASHED) += hifive-unleashed-a00.dtb
|
||||
dtb-$(CONFIG_TARGET_SIFIVE_UNMATCHED) += hifive-unmatched-a00.dtb
|
||||
dtb-$(CONFIG_TARGET_SIPEED_MAIX) += k210-maix-bit.dtb
|
||||
dtb-$(CONFIG_TARGET_SUNXI) += sun20i-d1-nezha.dtb
|
||||
dtb-$(CONFIG_TARGET_SUNXI) += \
|
||||
sun20i-d1-lichee-rv.dtb \
|
||||
sun20i-d1-lichee-rv-dock.dtb \
|
||||
sun20i-d1-nezha.dtb
|
||||
|
||||
include $(srctree)/scripts/Makefile.dts
|
||||
|
||||
|
165
arch/riscv/dts/sun20i-d1-lichee-rv-dock.dts
Normal file
165
arch/riscv/dts/sun20i-d1-lichee-rv-dock.dts
Normal file
@ -0,0 +1,165 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
||||
// Copyright (C) 2022 Jisheng Zhang <jszhang@kernel.org>
|
||||
// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
#include "sun20i-d1-lichee-rv.dts"
|
||||
|
||||
/ {
|
||||
model = "Sipeed Lichee RV Dock";
|
||||
compatible = "sipeed,lichee-rv-dock", "sipeed,lichee-rv",
|
||||
"allwinner,sun20i-d1";
|
||||
|
||||
aliases {
|
||||
mmc1 = &mmc1;
|
||||
};
|
||||
|
||||
dmic-card {
|
||||
compatible = "simple-audio-card";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
simple-audio-card,dai-link@0 {
|
||||
format = "pdm";
|
||||
frame-master = <&link0_cpu>;
|
||||
bitclock-master = <&link0_cpu>;
|
||||
|
||||
link0_cpu: cpu {
|
||||
sound-dai = <&dmic>;
|
||||
};
|
||||
|
||||
link0_codec: codec {
|
||||
sound-dai = <&dmic_codec>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dmic_codec: dmic-codec {
|
||||
compatible = "dmic-codec";
|
||||
num-channels = <2>;
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
||||
|
||||
hdmi_connector: connector {
|
||||
compatible = "hdmi-connector";
|
||||
type = "a";
|
||||
|
||||
port {
|
||||
hdmi_con_in: endpoint {
|
||||
remote-endpoint = <&hdmi_out_con>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&gpio 6 12 GPIO_ACTIVE_LOW>; /* PG12 */
|
||||
};
|
||||
};
|
||||
|
||||
&codec {
|
||||
allwinner,routing = "Internal Speaker", "HPOUTL",
|
||||
"Internal Speaker", "HPOUTR",
|
||||
"LINEINL", "HPOUTL",
|
||||
"LINEINR", "HPOUTR",
|
||||
"MICIN3", "Internal Microphone",
|
||||
"Internal Microphone", "HBIAS";
|
||||
allwinner,widgets = "Microphone", "Internal Microphone",
|
||||
"Speaker", "Internal Speaker";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&de {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dmic {
|
||||
pinctrl-0 = <&dmic_pb11_d0_pin>, <&dmic_pe17_clk_pin>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio {
|
||||
dmic_pb11_d0_pin: dmic-pb11-d0-pin {
|
||||
pins = "PB11";
|
||||
function = "dmic";
|
||||
};
|
||||
|
||||
dmic_pe17_clk_pin: dmic-pe17-clk-pin {
|
||||
pins = "PE17";
|
||||
function = "dmic";
|
||||
};
|
||||
|
||||
ledc_pc0_pin: ledc-pc0-pin {
|
||||
pins = "PC0";
|
||||
function = "ledc";
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
hdmi_out_con: endpoint {
|
||||
remote-endpoint = <&hdmi_con_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ledc {
|
||||
pinctrl-0 = <&ledc_pc0_pin>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
led@0 {
|
||||
reg = <0x0>;
|
||||
color = <LED_COLOR_ID_RGB>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
};
|
||||
};
|
||||
|
||||
&lradc {
|
||||
wakeup-source;
|
||||
status = "okay";
|
||||
|
||||
button-220 {
|
||||
label = "OK";
|
||||
linux,code = <KEY_OK>;
|
||||
channel = <0>;
|
||||
voltage = <220000>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
bus-width = <4>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
non-removable;
|
||||
vmmc-supply = <®_vcc_3v3>;
|
||||
vqmmc-supply = <®_vcc_3v3>;
|
||||
pinctrl-0 = <&mmc1_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
pinctrl-0 = <&uart1_pg6_pins>, <&uart1_pg8_rts_cts_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_vcc>;
|
||||
};
|
88
arch/riscv/dts/sun20i-d1-lichee-rv.dts
Normal file
88
arch/riscv/dts/sun20i-d1-lichee-rv.dts
Normal file
@ -0,0 +1,88 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
||||
// Copyright (C) 2022 Jisheng Zhang <jszhang@kernel.org>
|
||||
// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
#include "sun20i-d1.dtsi"
|
||||
#include "sun20i-d1-common-regulators.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Sipeed Lichee RV";
|
||||
compatible = "sipeed,lichee-rv", "allwinner,sun20i-d1";
|
||||
|
||||
aliases {
|
||||
mmc0 = &mmc0;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led-0 {
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio 2 1 GPIO_ACTIVE_HIGH>; /* PC1 */
|
||||
};
|
||||
};
|
||||
|
||||
reg_vdd_cpu: vdd-cpu {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vdd-cpu";
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
vin-supply = <®_vcc>;
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <®_vdd_cpu>;
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
broken-cd;
|
||||
bus-width = <4>;
|
||||
disable-wp;
|
||||
vmmc-supply = <®_vcc_3v3>;
|
||||
vqmmc-supply = <®_vcc_3v3>;
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
pinctrl-0 = <&spi0_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-0 = <&uart0_pb8_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "otg";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb0_vbus-supply = <®_vcc>;
|
||||
usb0_vbus_det-gpios = <&gpio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
|
||||
status = "okay";
|
||||
};
|
24
configs/lichee_rv_defconfig
Normal file
24
configs/lichee_rv_defconfig
Normal file
@ -0,0 +1,24 @@
|
||||
CONFIG_RISCV=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun20i-d1-lichee-rv"
|
||||
CONFIG_TARGET_SUNXI=y
|
||||
CONFIG_ARCH_RV64I=y
|
||||
CONFIG_RISCV_SMODE=y
|
||||
# CONFIG_SPL_SMP is not set
|
||||
CONFIG_SYS_LOAD_ADDR=0x4a000000
|
||||
CONFIG_CMD_CLK=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_LSBLK=y
|
||||
CONFIG_CMD_SPI=y
|
||||
CONFIG_CMD_WDT=y
|
||||
CONFIG_CMD_TIMER=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_DM_REGULATOR_FIXED=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_DM_USB_GADGET=y
|
||||
CONFIG_USB_MUSB_GADGET=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
CONFIG_USB_FUNCTION_MASS_STORAGE=y
|
Loading…
x
Reference in New Issue
Block a user