update for dtbo for m4berry and m4zero

This commit is contained in:
August 2024-06-11 20:49:27 +08:00
parent dc09fa0020
commit 38ec662a66
34 changed files with 587 additions and 32 deletions

View File

@ -65,6 +65,32 @@ endif
# Select the SoC with specific arch and wafer
if ARCH_SUN50IW9
choice
prompt "Select the Board with wafer ARCH_SUN50IW9"
help
Select the SoC with wafer ARCH_SUN50IW9
config BOARD_BANANAPI_M4BERRY
bool "Bananapi M4 Berry Single Board Computer"
help
This enables support for the board Bananapi M4 Berry of Sinovoip
which is based on Allwinner SUN50IW9(H618) SoC.
config BOARD_BANANAPI_M4ZERO
bool "Bananapi M4 Zero Single Board Computer"
help
This enables support for the board Bananapi M4 Zero of Sinovoip
which is based on Allwinner SUN50IW9(H618) SoC.
config BOARD_ORANGEPI_ZERO3
bool "OrangePi Zero3 Single Board Computer"
help
This enables support for the OrangePi Zero3 of Xunlong
which is based on Allwinner SUN50IW9(H618) SoC.
endchoice
endif
if ARCH_SUN50IW10
choice

View File

@ -1,11 +1,14 @@
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero3.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bananapi-m4berry.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bananapi-m4zero.dtb
dtb-$(CONFIG_BOARD_BANANAPI_M4BERRY) += sun50i-h616-bananapi-m4berry.dtb
dtb-$(CONFIG_BOARD_BANANAPI_M4ZERO) += sun50i-h616-bananapi-m4zero.dtb
dtb-$(CONFIG_BOARD_ORANGEPI_ZERO3) += sun50i-h616-orangepi-zero3.dtb
always := $(dtb-y)
subdir-y := $(dts-dirs)
clean-files := *.dtb
DTC_FLAGS_board += -@
DTC_FLAGS ?= -a 262144
subdir-y := $(dts-dirs) overlay
subdir-$(CONFIG_BOARD_BANANAPI_M4BERRY) += overlay/bpi-m4berry
subdir-$(CONFIG_BOARD_BANANAPI_M4ZERO) += overlay/bpi-m4zero
subdir-$(CONFIG_BOARD_ORANGEPI_ZERO3) += overlay/bpi-zero3

View File

@ -1,11 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
dtbo-$(CONFIG_ARCH_SUNXI) += \
bpi-m4berry-i2c4.dtbo \
bpi-m4berry-nxez-pcm512x-hifi.dtbo \
bpi-m4berry-waveshare-wm8960-hifi.dtbo
targets += $(dtbo-y) $(scr-y) $(dtbotxt-y)
always := $(dtbo-y) $(scr-y) $(dtbotxt-y)
clean-files := *.dtbo *.scr

View File

@ -0,0 +1,20 @@
# SPDX-License-Identifier: GPL-2.0
dtbo-$(CONFIG_BOARD_BANANAPI_M4BERRY) += \
bpi-m4berry-i2c3.dtbo \
bpi-m4berry-i2c4.dtbo \
bpi-m4berry-uart1.dtbo \
bpi-m4berry-pg-uart2.dtbo \
bpi-m4berry-ph-uart2.dtbo \
bpi-m4berry-uart5.dtbo \
bpi-m4berry-pwm1.dtbo \
bpi-m4berry-spi1.dtbo \
bpi-m4berry-spdifout.dtbo \
bpi-m4berry-i2smic-mems.dtbo \
bpi-m4berry-nxez-pcm512x-hifi.dtbo \
bpi-m4berry-waveshare-wm8960-hifi.dtbo
targets += $(dtbo-y)
always := $(dtbo-y)
clean-files := *.dtbo

View File

@ -0,0 +1,12 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&twi3>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,12 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&twi4>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,20 @@
/dts-v1/;
/plugin/;
/ {
fragment@2 {
target = <&ahub2_plat>;
__overlay__ {
status = "okay";
};
};
fragment@3 {
target = <&ahub2_mach>;
__overlay__ {
status = "okay";
soundcard-mach,capture-only;
};
};
};

View File

@ -0,0 +1,15 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&uart2>;
__overlay__ {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&uart2_pg_pin>;
pinctrl-1 = <&uart2_pg_sleep>;
};
};
};

View File

@ -0,0 +1,15 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&uart2>;
__overlay__ {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&uart2_ph_pin>;
pinctrl-1 = <&uart2_ph_sleep>;
};
};
};

View File

@ -0,0 +1,20 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&pwm1>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,37 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&twi4>;
__overlay__ {
status = "okay";
pcm5122: pcm5122@4d {
compatible = "ti,pcm5122";
reg = <0x4d>;
#sound-dai-cells = <0>;
status = "okay";
};
};
};
fragment@1 {
target = <&ahub2_plat>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&ahub2_mach>;
__overlay__ {
status = "okay";
soundcard-mach,playback-only;
soundcard-mach,codec {
sound-dai = <&pcm5122>;
};
};
};
};

View File

@ -0,0 +1,30 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&spi1>;
__overlay__ {
status = "okay";
spi1_cs_number = <0x2>;
spi1_cs_bitmap = <0x3>;
spi_board0@0 {
device_type = "spi_board0";
compatible = "linux,spidev";
spi-max-frequency = <10000000>;
reg = <0x0>;
status = "okay";
};
spi_board1@1 {
device_type = "spi_board1";
compatible = "linux,spidev";
spi-max-frequency = <10000000>;
reg = <0x1>;
status = "okay";
};
};
};
};

View File

@ -0,0 +1,12 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&uart1>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,12 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&uart5>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,17 @@
# SPDX-License-Identifier: GPL-2.0
dtbo-$(CONFIG_BOARD_BANANAPI_M4ZERO) += \
bpi-m4zero-i2c0.dtbo \
bpi-m4zero-i2c1.dtbo \
bpi-m4zero-uart4.dtbo \
bpi-m4zero-uart5.dtbo \
bpi-m4zero-pwm2.dtbo \
bpi-m4zero-spi1.dtbo \
bpi-m4zero-spdifout.dtbo \
bpi-m4zero-i2smic-mems.dtbo \
bpi-m4zero-nxez-pcm512x-hifi.dtbo \
bpi-m4zero-waveshare-wm8960-hifi.dtbo
targets += $(dtbo-y)
always := $(dtbo-y)
clean-files := *.dtbo

View File

@ -0,0 +1,12 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&twi0>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,12 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&twi1>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,20 @@
/dts-v1/;
/plugin/;
/ {
fragment@2 {
target = <&ahub0_plat>;
__overlay__ {
status = "okay";
};
};
fragment@3 {
target = <&ahub0_mach>;
__overlay__ {
status = "okay";
soundcard-mach,capture-only;
};
};
};

View File

@ -0,0 +1,37 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&twi0>;
__overlay__ {
status = "okay";
pcm5122: pcm5122@4d {
compatible = "ti,pcm5122";
reg = <0x4d>;
#sound-dai-cells = <0>;
status = "okay";
};
};
};
fragment@1 {
target = <&ahub0_plat>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&ahub0_mach>;
__overlay__ {
status = "okay";
soundcard-mach,playback-only;
soundcard-mach,codec {
sound-dai = <&pcm5122>;
};
};
};
};

View File

@ -0,0 +1,20 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&pwm1>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,37 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&twi4>;
__overlay__ {
status = "okay";
pcm5122: pcm5122@4d {
compatible = "ti,pcm5122";
reg = <0x4d>;
#sound-dai-cells = <0>;
status = "okay";
};
};
};
fragment@1 {
target = <&ahub2_plat>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&ahub2_mach>;
__overlay__ {
status = "okay";
soundcard-mach,playback-only;
soundcard-mach,codec {
sound-dai = <&pcm5122>;
};
};
};
};

View File

@ -0,0 +1,30 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&spi1>;
__overlay__ {
status = "okay";
spi1_cs_number = <0x2>;
spi1_cs_bitmap = <0x3>;
spi_board0@0 {
device_type = "spi_board0";
compatible = "linux,spidev";
spi-max-frequency = <10000000>;
reg = <0x0>;
status = "okay";
};
spi_board1@1 {
device_type = "spi_board1";
compatible = "linux,spidev";
spi-max-frequency = <10000000>;
reg = <0x1>;
status = "okay";
};
};
};
};

View File

@ -0,0 +1,12 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&uart4>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,12 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&uart5>;
__overlay__ {
status = "okay";
};
};
};

View File

@ -0,0 +1,66 @@
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target-path = "/";
__overlay__ {
wm8960_mclk: wm8960_mclk {
compatible = "fixed-clock";
status = "okay";
#clock-cells = <0x0>;
clock-frequency = <0xbb8000>;
};
};
};
fragment@1 {
target = <&twi0>;
__overlay__ {
status = "okay";
wm8960: wm8960@1a {
#sound-dai-cells = <0>;
compatible = "wlf,wm8960";
reg = <0x1a>;
status = "okay";
clocks = <&wm8960_mclk>;
clock-names = "mclk";
};
};
};
fragment@2 {
target = <&ahub0_plat>;
__overlay__ {
status = "okay";
};
};
fragment@3 {
target = <&ahub0_mach>;
__overlay__ {
status = "okay";
soundcard-mach,widgets =
"Microphone", "Mic Jack",
"Line", "Line In",
"Line", "Line Out",
"Speaker", "Speaker",
"Headphone", "Headphone Jack";
soundcard-mach,routing =
"Headphone Jack", "HP_L",
"Headphone Jack", "HP_R",
"Speaker", "SPK_LP",
"Speaker", "SPK_LN",
"LINPUT1", "Mic Jack",
"LINPUT3", "Mic Jack",
"RINPUT1", "Mic Jack",
"RINPUT2", "Mic Jack";
soundcard-mach,codec {
sound-dai = <&wm8960>;
};
};
};
};

View File

@ -0,0 +1,34 @@
# SPDX-License-Identifier: GPL-2.0
dtbo-$(CONFIG_BOARD_ORANGEPI_ZERO3) += \
sun50i-h616-ph-i2c1.dtbo \
sun50i-h616-ph-i2c2.dtbo \
sun50i-h616-ph-i2c3.dtbo \
sun50i-h616-ph-i2c4.dtbo \
sun50i-h616-pi-i2c0.dtbo \
sun50i-h616-pi-i2c1.dtbo \
sun50i-h616-pi-i2c2.dtbo \
sun50i-h616-ph-pwm12.dtbo \
sun50i-h616-ph-pwm34.dtbo \
sun50i-h616-pi-pwm1.dtbo \
sun50i-h616-pi-pwm2.dtbo \
sun50i-h616-pi-pwm3.dtbo \
sun50i-h616-pi-pwm4.dtbo \
sun50i-h616-ph-uart2.dtbo \
sun50i-h616-pi-uart2.dtbo \
sun50i-h616-pi-uart3.dtbo \
sun50i-h616-pi-uart4.dtbo \
sun50i-h616-ph-uart5.dtbo \
sun50i-h616-powerkey.dtbo \
sun50i-h616-usb0-host.dtbo \
sun50i-h616-spi0-spidev.dtbo \
sun50i-h616-spi1-cs0-spidev.dtbo \
sun50i-h616-spi1-cs1-spidev.dtbo \
sun50i-h616-spi1-cs0-cs1-spidev.dtbo \
sun50i-h616-disable-leds.dtbo \
sun50i-h616-disable-uart0.dtbo \
sun50i-h616-zero2w-disable-led.dtbo
targets += $(dtbo-y) $(scr-y) $(dtbotxt-y)
always := $(dtbo-y) $(scr-y) $(dtbotxt-y)
clean-files := *.dtbo *.scr

View File

@ -915,37 +915,47 @@
};
uart2-ph-pins {
pins = "PH5", "PH6";
pins = "PH5", "PH6", "PH7", "PH8";
function = "uart2";
phandle = <0x2d>;
};
uart2-ph-sleep {
pins = "PH5", "PH6";
pins = "PH5", "PH6", "PH7", "PH8";
function = "gpio_in";
phandle = <0x2e>;
};
uart3-ph-pins {
pins = "PI9", "PI10";
uart2-pg-pins {
pins = "PG15", "PG16", "PG17", "PG18";
function = "uart2";
};
uart2-pg-sleep {
pins = "PG15", "PG16", "PG17", "PG18";
function = "gpio_in";
};
uart3-pi-pins {
pins = "PI9", "PI10", "PI11", "PI12";
function = "uart3";
phandle = <0x2f>;
};
uart3-ph-sleep {
pins = "PI9", "PI10";
uart3-pi-sleep {
pins = "PI9", "PI10", "PI11", "PI12";
function = "gpio_in";
phandle = <0x30>;
};
uart4-ph-pins {
pins = "PI13", "PI14";
uart4-pi-pins {
pins = "PI13", "PI14", "PI15", "PI16";
function = "uart4";
phandle = <0x31>;
};
uart4-ph-sleep {
pins = "PI13", "PI14";
uart4-pi-sleep {
pins = "PI13", "PI14", "PI15", "PI16";
function = "gpio_in";
phandle = <0x32>;
};
@ -2952,10 +2962,12 @@
uart1_ph_sleep = "/soc@3000000/pinctrl@300b000/uart1-ph-sleep";
uart2_ph_pins = "/soc@3000000/pinctrl@300b000/uart2-ph-pins";
uart2_ph_sleep = "/soc@3000000/pinctrl@300b000/uart2-ph-sleep";
uart3_ph_pins = "/soc@3000000/pinctrl@300b000/uart3-ph-pins";
uart3_ph_sleep = "/soc@3000000/pinctrl@300b000/uart3-ph-sleep";
uart4_ph_pins = "/soc@3000000/pinctrl@300b000/uart4-ph-pins";
uart4_ph_sleep = "/soc@3000000/pinctrl@300b000/uart4-ph-sleep";
uart2_pg_pins = "/soc@3000000/pinctrl@300b000/uart2-pg-pins";
uart2_pg_sleep = "/soc@3000000/pinctrl@300b000/uart2-pg-sleep";
uart3_pi_pins = "/soc@3000000/pinctrl@300b000/uart3-pi-pins";
uart3_pi_sleep = "/soc@3000000/pinctrl@300b000/uart3-pi-sleep";
uart4_pi_pins = "/soc@3000000/pinctrl@300b000/uart4-pi-pins";
uart4_pi_sleep = "/soc@3000000/pinctrl@300b000/uart4-pi-sleep";
uart5_ph_pins = "/soc@3000000/pinctrl@300b000/uart5-ph-pins";
uart5_ph_sleep = "/soc@3000000/pinctrl@300b000/uart5-ph-sleep";
s_cir0_pins_a = "/soc@3000000/pinctrl@300b000/s_cir0@0";

View File

@ -2890,7 +2890,7 @@
gpio-keys {
compatible = "gpio-keys";
status = "okay";
status = "disabled";
autorepeat;
power {

View File

@ -274,6 +274,9 @@ CONFIG_ARCH_SUN50I=y
CONFIG_ARCH_SUN50IW9=y
# CONFIG_ARCH_SUN50IW10 is not set
# CONFIG_ARCH_SUN50IW12 is not set
CONFIG_BOARD_BANANAPI_M4BERRY=y
# CONFIG_BOARD_BANANAPI_M4ZERO is not set
# CONFIG_BOARD_ORANGEPI_ZERO3 is not set
# CONFIG_FPGA_V4_PLATFORM is not set
# CONFIG_FPGA_V7_PLATFORM is not set
CONFIG_EVB_PLATFORM=y

View File

@ -274,6 +274,9 @@ CONFIG_ARCH_SUN50I=y
CONFIG_ARCH_SUN50IW9=y
# CONFIG_ARCH_SUN50IW10 is not set
# CONFIG_ARCH_SUN50IW12 is not set
# CONFIG_BOARD_BANANAPI_M4BERRY is not set
CONFIG_BOARD_BANANAPI_M4ZERO=y
# CONFIG_BOARD_ORANGEPI_ZERO3 is not set
# CONFIG_FPGA_V4_PLATFORM is not set
# CONFIG_FPGA_V7_PLATFORM is not set
CONFIG_EVB_PLATFORM=y
@ -4347,7 +4350,8 @@ CONFIG_SND_SOC_I2C_AND_SPI=y
# CONFIG_SND_SOC_PCM3060_SPI is not set
# CONFIG_SND_SOC_PCM3168A_I2C is not set
# CONFIG_SND_SOC_PCM3168A_SPI is not set
# CONFIG_SND_SOC_PCM512x_I2C is not set
CONFIG_SND_SOC_PCM512x=m
CONFIG_SND_SOC_PCM512x_I2C=m
# CONFIG_SND_SOC_PCM512x_SPI is not set
# CONFIG_SND_SOC_RK3328 is not set
# CONFIG_SND_SOC_RT5616 is not set
@ -4398,7 +4402,7 @@ CONFIG_SND_SOC_I2C_AND_SPI=y
# CONFIG_SND_SOC_WM8804_SPI is not set
# CONFIG_SND_SOC_WM8903 is not set
# CONFIG_SND_SOC_WM8904 is not set
# CONFIG_SND_SOC_WM8960 is not set
CONFIG_SND_SOC_WM8960=m
# CONFIG_SND_SOC_WM8962 is not set
# CONFIG_SND_SOC_WM8974 is not set
# CONFIG_SND_SOC_WM8978 is not set

View File

@ -275,6 +275,9 @@ CONFIG_ARCH_SUN50I=y
CONFIG_ARCH_SUN50IW9=y
# CONFIG_ARCH_SUN50IW10 is not set
# CONFIG_ARCH_SUN50IW12 is not set
# CONFIG_BOARD_BANANAPI_M4BERRY is not set
# CONFIG_BOARD_BANANAPI_M4ZERO is not set
CONFIG_BOARD_ORANGEPI_ZERO3=y
# CONFIG_FPGA_V4_PLATFORM is not set
# CONFIG_FPGA_V7_PLATFORM is not set
CONFIG_EVB_PLATFORM=y

View File

@ -671,6 +671,7 @@ static struct class *spidev_class;
#ifdef CONFIG_OF
static const struct of_device_id spidev_dt_ids[] = {
{ .compatible = "linux,spidev" },
{ .compatible = "rohm,dh2228fv" },
{ .compatible = "lineartechnology,ltc2488" },
{ .compatible = "ge,achc" },