Skip to content

Commit

Permalink
add Wiren Board 8 defconfig and DTS (Nikita Maslov - 53544d33f9059efb…
Browse files Browse the repository at this point in the history
…7bb873f4eb5d6f1952c1e865)
  • Loading branch information
taraant committed Dec 11, 2024
1 parent 36429f4 commit 3bc884a
Show file tree
Hide file tree
Showing 3 changed files with 373 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,8 @@ dtb-$(CONFIG_MACH_SUN50I_H616) += \
sun50i-h618-orangepi-zero2w.dtb \
sun50i-h618-orangepi-zero3.dtb \
sun50i-h618-transpeed-8k618-t.dtb \
sun50i-h616-x96-mate.dtb
sun50i-h616-x96-mate.dtb \
sun50i-h616-wirenboard8xx.dtb
dtb-$(CONFIG_MACH_SUN50I) += \
sun50i-a64-amarula-relic.dtb \
sun50i-a64-bananapi-m64.dtb \
Expand Down
309 changes: 309 additions & 0 deletions arch/arm/dts/sun50i-h616-wirenboard8xx.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,309 @@
// SPDX-License-Identifier: (GPL-2.0+ or MIT)
/*
* Copyright (C) 2020 Arm Ltd.
*/

/dts-v1/;

#include "sun50i-h616.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/leds/common.h>

/ {
model = "Wiren Board 8.x";
compatible = "wirenboard,wirenboard-8xx", "allwinner,sun50i-h616";

aliases {
serial0 = &uart0;
mmc1 = &mmc2;
mmc0 = &mmc0;
};

chosen {
stdout-path = "serial0:115200n8";
};

regulators {
vdd_sd_power: vdd-sd-power {
compatible = "regulator-fixed";
gpio = <&pio 4 16 GPIO_ACTIVE_LOW>; // PE16
regulator-name = "vdd-sd-power";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-low;
};
};
};

&nmi_intc {
compatible = "allwinner,sun8i-v3s-nmi";
interrupt-parent = <&gic>;
interrupt-controller;
#interrupt-cells = <2>;
reg = <0x07010320 0x0c>;
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
};

&ehci1 {
status = "okay";
};

/* USB 2 & 3 are on headers only. */

&mmc0 {
vmmc-supply = <&vdd_sd_power>;
vqmcc-supply = <&reg_dcdc1>;
broken-cd;
bus-width = <4>;
status = "okay";
};

&mmc2 {
vmmc-supply = <&reg_dcdc1>;
vqmmc-supply = <&reg_aldo1>;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe; // does not change anything on test board
no-sdio;
no-sd;
bus-width = <8>;
status = "okay";
};

&r_i2c {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&r_i2c_pins>;

axp15060: pmic@36{
compatible = "x-powers,axp15060";
reg = <0x36>;
interrupt-controller;
#interrupt-cells = <1>;

x-powers,self-working-mode;
overtemp_shutdown = <1>;
overtemp_value = <145>;

regulators {
reg_dcdc1: dcdc1 {
regulator-name = "axp858-dcdc1";
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <3400000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
under_voltage_shutdown = <1>;
};

reg_dcdc2: dcdc2 {
regulator-name = "axp858-dcdc2";
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1540000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-ramp-delay = <6001>; /* FIXME */
regulator-always-on;
under_voltage_shutdown = <1>;
};

reg_dcdc3: dcdc3 {
regulator-name = "axp858-dcdc3";
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1540000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
under_voltage_shutdown = <1>;
};

reg_dcdc4: dcdc4 {
regulator-name = "axp858-dcdc4";
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1540000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-enable-ramp-delay = <1000>;
under_voltage_shutdown = <1>;
};

reg_dcdc5: dcdc5 {
regulator-name = "axp858-dcdc5";
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1840000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
under_voltage_shutdown = <1>;
};

reg_dcdc6: dcdc6 {
regulator-name = "axp858-dcdc6";
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
under_voltage_shutdown = <1>;
};

reg_aldo1: aldo1 {
regulator-name = "axp858-aldo1";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
};

reg_aldo2: aldo2 {
regulator-name = "axp858-aldo2";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
};

reg_aldo3: aldo3 {
regulator-name = "axp858-aldo3";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
};

reg_aldo4: aldo4 {
regulator-name = "axp858-aldo4";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
};

reg_aldo5: aldo5 {
regulator-name = "axp858-aldo5";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
};

reg_bldo1: bldo1 {
regulator-name = "axp858-bldo1";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
};

reg_bldo2: bldo2 {
regulator-name = "axp858-bldo2";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
};

reg_bldo3: bldo3 {
regulator-name = "axp858-bldo3";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
};

reg_bldo4: bldo4 {
regulator-name = "axp858-bldo4";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1800000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
};

reg_bldo5: bldo5 {
regulator-name = "axp858-bldo5";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
};

reg_cldo1: cldo1 {
regulator-name = "axp858-cldo1";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
};

reg_cldo2: cldo2 {
regulator-name = "axp858-cldo2";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1800000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
};

reg_cldo3: cldo3 {
regulator-name = "axp858-cldo3";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
};

reg_cldo4: cldo4 {
regulator-name = "axp858-cldo4";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <4200000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
};

reg_cpusldo: cpusldo {
regulator-name = "axp858-cpusldo";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1400000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
};

reg_sw: sw {
regulator-name = "axp858-sw";
regulator-always-on;
};
};
};
};

&pio {
vcc-pa-supply = <&reg_dcdc1>;
vcc-pc-supply = <&reg_aldo1>;
vcc-pd-supply = <&reg_dcdc1>, <&reg_bldo1>;
vcc-pe-supply = <&reg_dcdc1>;
vcc-pf-supply = <&reg_dcdc1>; // vcc-io
vcc-pg-supply = <&reg_dcdc1>;
vcc-ph-supply = <&reg_dcdc1>; // vcc-io
vcc-pi-supply = <&reg_dcdc1>;
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_ph_pins>;
status = "okay";
};

&spi1 {
compatible = "allwinner,sun50i-h616-spi";
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins &spi1_cs0_pin>;
interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
status = "okay";
};
62 changes: 62 additions & 0 deletions configs/sun50i_wirenboard8_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
CONFIG_ARM=y
CONFIG_ARM_SMCCC=y
CONFIG_ARCH_SUNXI=y
CONFIG_ENV_SIZE=0xC000
CONFIG_DEFAULT_DEVICE_TREE="sun50i-h616-wirenboard8xx"
CONFIG_SPL=y
CONFIG_BOOTSTAGE_STASH_ADDR=0
CONFIG_DRAM_SUN50I_H616_DX_ODT=0x07070707
CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0e0e0e0e
CONFIG_DRAM_SUN50I_H616_CA_DRI=0x0e0e
CONFIG_DRAM_SUN50I_H616_ODT_EN=0xaaaaeeee
CONFIG_DRAM_SUN50I_H616_TPR6=0x44000000
CONFIG_DRAM_SUN50I_H616_TPR10=0x402f6633
CONFIG_DRAM_SUN50I_H616_TPR11=0x24242624
CONFIG_DRAM_SUN50I_H616_TPR12=0x0f0f100f
CONFIG_MACH_SUN50I_H616=y
CONFIG_SUNXI_DRAM_T507_LPDDR4=y
CONFIG_DRAM_CLK=792
CONFIG_TARGET_SUN50I_WIRENBOARD8=y
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
CONFIG_R_I2C_ENABLE=y
# CONFIG_PSCI_RESET is not set
CONFIG_CHECK_AUTH=y
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_ANDROID_BOOT_IMAGE=y
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Hit <SPACE> to stop autoboot... (%d s)\n"
CONFIG_AUTOBOOT_STOP_STR=" "
CONFIG_LOGLEVEL=9
CONFIG_SYS_DEVICE_NULLDEV=y
CONFIG_SPL_I2C=y
# CONFIG_SYS_MMCSD_FS_BOOT is not set
CONFIG_CMD_ABOOTIMG=y
# CONFIG_OF_TAG_MIGRATE is not set
# CONFIG_ENV_IS_IN_FAT is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_SPL_SYS_I2C_LEGACY=y
CONFIG_SYS_I2C_MVTWSI=y
CONFIG_SYS_I2C_SLAVE=0x36
CONFIG_SYS_MMC_MAX_BLK_COUNT=1
CONFIG_REGULATOR_AXP=y
# CONFIG_DM_REGULATOR_FIXED is not set
CONFIG_AXP15060_POWER=y
CONFIG_AXP_DCDC1_VOLT=3300
CONFIG_AXP_DCDC2_VOLT=900
CONFIG_AXP_DCDC3_VOLT=940
CONFIG_AXP_DCDC4_VOLT=900
CONFIG_AXP_DCDC5_VOLT=1100
CONFIG_AXP_ALDO1_VOLT=1800
CONFIG_AXP_ALDO2_VOLT=1800
CONFIG_AXP_ALDO3_VOLT=0
CONFIG_AXP_ALDO4_VOLT=1800
CONFIG_AXP_SW_ON=y
# CONFIG_EFI_LOADER is not set
CONFIG_SPI=y
CONFIG_SPI_SUNXI=y
CONFIG_CMD_SPI=y
CONFIG_DEFAULT_SPI_BUS=0
CONFIG_DEFAULT_SPI_MODE=0x0
CONFIG_CMD_SQUASHFS=y
CONFIG_FS_SQUASHFS=y

0 comments on commit 3bc884a

Please sign in to comment.