Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…oot-sunxi

Beside some rather unexciting sync of the DTs from the kernel tree, and
some Kconfig cleanup, there are some improvements for the ARMv5 Allwinner
family, to support boards with the F1C200s (64MB DRAM) better. We will
get actual board support as soon as the DTs have passed the Linux review
process.
There is also support for the X96 Mate TV Box, featuring the H616 SoC and
a full 4GB of DRAM.
Also we found the secret to enable SPI booting on the H616 (pin PC5 must
be pulled to GND), so the SPI boot support patch is now good to go.

Passed the gitlab CI, plus briefly tested on Pine64-LTS, LicheePi Nano,
X96 Mate and OrangePi Zero.
  • Loading branch information
trini committed Oct 20, 2022
2 parents 3724ddf + 843ed98 commit 73ceadc
Show file tree
Hide file tree
Showing 230 changed files with 657 additions and 1,037 deletions.
6 changes: 3 additions & 3 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ config SYS_MALLOC_LEN
default 0x4000000 if SANDBOX
default 0x2000000 if ARCH_ROCKCHIP || ARCH_OMAP2PLUS || ARCH_MESON
default 0x200000 if ARCH_BMIPS || X86
default 0x120000 if MACH_SUNIV
default 0x220000 if MACH_SUN8I_V3S
default 0x4020000 if ARCH_SUNXI
default 0x4020000 if SUNXI_MINIMUM_DRAM_MB >= 256
default 0x220000 if SUNXI_MINIMUM_DRAM_MB >= 64
default 0x120000 if SUNXI_MINIMUM_DRAM_MB >= 32
default 0x400000
help
This defines memory to be allocated for Dynamic allocation
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,8 @@ dtb-$(CONFIG_MACH_SUN50I_H6) += \
sun50i-h6-tanix-tx6.dtb \
sun50i-h6-tanix-tx6-mini.dtb
dtb-$(CONFIG_MACH_SUN50I_H616) += \
sun50i-h616-orangepi-zero2.dtb
sun50i-h616-orangepi-zero2.dtb \
sun50i-h616-x96-mate.dtb
dtb-$(CONFIG_MACH_SUN50I) += \
sun50i-a64-amarula-relic.dtb \
sun50i-a64-bananapi-m64.dtb \
Expand Down
40 changes: 20 additions & 20 deletions arch/arm/dts/sun4i-a10-inet9f-rev03.dts
Original file line number Diff line number Diff line change
Expand Up @@ -63,145 +63,145 @@
compatible = "gpio-keys-polled";
poll-interval = <20>;

left-joystick-left {
event-left-joystick-left {
label = "Left Joystick Left";
linux,code = <ABS_X>;
linux,input-type = <EV_ABS>;
linux,input-value = <0xffffffff>; /* -1 */
gpios = <&pio 0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA6 */
};

left-joystick-right {
event-left-joystick-right {
label = "Left Joystick Right";
linux,code = <ABS_X>;
linux,input-type = <EV_ABS>;
linux,input-value = <1>;
gpios = <&pio 0 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA5 */
};

left-joystick-up {
event-left-joystick-up {
label = "Left Joystick Up";
linux,code = <ABS_Y>;
linux,input-type = <EV_ABS>;
linux,input-value = <0xffffffff>; /* -1 */
gpios = <&pio 0 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA8 */
};

left-joystick-down {
event-left-joystick-down {
label = "Left Joystick Down";
linux,code = <ABS_Y>;
linux,input-type = <EV_ABS>;
linux,input-value = <1>;
gpios = <&pio 0 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA9 */
};

right-joystick-left {
event-right-joystick-left {
label = "Right Joystick Left";
linux,code = <ABS_Z>;
linux,input-type = <EV_ABS>;
linux,input-value = <0xffffffff>; /* -1 */
gpios = <&pio 0 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA1 */
};

right-joystick-right {
event-right-joystick-right {
label = "Right Joystick Right";
linux,code = <ABS_Z>;
linux,input-type = <EV_ABS>;
linux,input-value = <1>;
gpios = <&pio 0 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA0 */
};

right-joystick-up {
event-right-joystick-up {
label = "Right Joystick Up";
linux,code = <ABS_RZ>;
linux,input-type = <EV_ABS>;
linux,input-value = <0xffffffff>; /* -1 */
gpios = <&pio 0 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA3 */
};

right-joystick-down {
event-right-joystick-down {
label = "Right Joystick Down";
linux,code = <ABS_RZ>;
linux,input-type = <EV_ABS>;
linux,input-value = <1>;
gpios = <&pio 0 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA4 */
};

dpad-left {
event-dpad-left {
label = "DPad Left";
linux,code = <ABS_HAT0X>;
linux,input-type = <EV_ABS>;
linux,input-value = <0xffffffff>; /* -1 */
gpios = <&pio 7 23 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH23 */
};

dpad-right {
event-dpad-right {
label = "DPad Right";
linux,code = <ABS_HAT0X>;
linux,input-type = <EV_ABS>;
linux,input-value = <1>;
gpios = <&pio 7 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH24 */
};

dpad-up {
event-dpad-up {
label = "DPad Up";
linux,code = <ABS_HAT0Y>;
linux,input-type = <EV_ABS>;
linux,input-value = <0xffffffff>; /* -1 */
gpios = <&pio 7 25 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH25 */
};

dpad-down {
event-dpad-down {
label = "DPad Down";
linux,code = <ABS_HAT0Y>;
linux,input-type = <EV_ABS>;
linux,input-value = <1>;
gpios = <&pio 7 26 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH26 */
};

x {
event-x {
label = "Button X";
linux,code = <BTN_X>;
gpios = <&pio 0 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA16 */
};

y {
event-y {
label = "Button Y";
linux,code = <BTN_Y>;
gpios = <&pio 0 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA14 */
};

a {
event-a {
label = "Button A";
linux,code = <BTN_A>;
gpios = <&pio 0 17 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA17 */
};

b {
event-b {
label = "Button B";
linux,code = <BTN_B>;
gpios = <&pio 0 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA15 */
};

select {
event-select {
label = "Select Button";
linux,code = <BTN_SELECT>;
gpios = <&pio 0 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA11 */
};

start {
event-start {
label = "Start Button";
linux,code = <BTN_START>;
gpios = <&pio 0 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA12 */
};

top-left {
event-top-left {
label = "Top Left Button";
linux,code = <BTN_TL>;
gpios = <&pio 7 22 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH22 */
};

top-right {
event-top-right {
label = "Top Right Button";
linux,code = <BTN_TR>;
gpios = <&pio 0 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA13 */
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/dts/sun4i-a10-pcduino.dts
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,19 @@
gpio-keys {
compatible = "gpio-keys";

back {
key-back {
label = "Key Back";
linux,code = <KEY_BACK>;
gpios = <&pio 7 17 GPIO_ACTIVE_LOW>;
};

home {
key-home {
label = "Key Home";
linux,code = <KEY_HOME>;
gpios = <&pio 7 18 GPIO_ACTIVE_LOW>;
};

menu {
key-menu {
label = "Key Menu";
linux,code = <KEY_MENU>;
gpios = <&pio 7 19 GPIO_ACTIVE_LOW>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/sun50i-a64-amarula-relic.dts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

wifi_pwrseq: wifi-pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&rtc 1>;
clocks = <&rtc CLK_OSC32K_FANOUT>;
clock-names = "ext_clock";
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */
};
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/dts/sun50i-a64-bananapi-m64.dts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
clocks = <&rtc 1>;
clocks = <&rtc CLK_OSC32K_FANOUT>;
clock-names = "ext_clock";
};
};
Expand Down Expand Up @@ -355,7 +355,7 @@

bluetooth {
compatible = "brcm,bcm43438-bt";
clocks = <&rtc 1>;
clocks = <&rtc CLK_OSC32K_FANOUT>;
clock-names = "lpo";
vbat-supply = <&reg_dldo2>;
vddio-supply = <&reg_dldo4>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/sun50i-a64-nanopi-a64.dts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&rtc 1>;
clocks = <&rtc CLK_OSC32K_FANOUT>;
clock-names = "ext_clock";
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
};
Expand Down
30 changes: 30 additions & 0 deletions arch/arm/dts/sun50i-a64-olinuxino.dts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@
};
};

&codec {
status = "okay";
};

&codec_analog {
cpvdd-supply = <&reg_eldo1>;
status = "okay";
};

&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
Expand All @@ -74,6 +83,10 @@
cpu-supply = <&reg_dcdc2>;
};

&dai {
status = "okay";
};

&de {
status = "okay";
};
Expand Down Expand Up @@ -328,6 +341,23 @@
vcc-hdmi-supply = <&reg_dldo1>;
};

&sound {
simple-audio-card,aux-devs = <&codec_analog>;
simple-audio-card,widgets = "Microphone", "Microphone Jack Left",
"Microphone", "Microphone Jack Right",
"Headphone", "Headphone Jack";
simple-audio-card,routing = "Left DAC", "DACL",
"Right DAC", "DACR",
"Headphone Jack", "HP",
"ADCL", "Left ADC",
"ADCR", "Right ADC",
"Microphone Jack Left", "MBIAS",
"MIC1", "Microphone Jack Left",
"Microphone Jack Right", "MBIAS",
"MIC2", "Microphone Jack Right";
status = "okay";
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/dts/sun50i-a64-orangepi-win.dts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
leds {
compatible = "gpio-leds";

status {
led-0 {
label = "orangepi:green:status";
gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
};
Expand Down Expand Up @@ -71,7 +71,7 @@
wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
clocks = <&rtc 1>;
clocks = <&rtc CLK_OSC32K_FANOUT>;
clock-names = "ext_clock";
};
};
Expand Down Expand Up @@ -369,7 +369,7 @@
bluetooth {
compatible = "brcm,bcm43438-bt";
max-speed = <1500000>;
clocks = <&rtc 1>;
clocks = <&rtc CLK_OSC32K_FANOUT>;
clock-names = "lpo";
vbat-supply = <&reg_dldo2>;
vddio-supply = <&reg_dldo4>;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/dts/sun50i-a64-pinebook.dts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
stdout-path = "serial0:115200n8";
};

gpio_keys {
gpio-keys {
compatible = "gpio-keys";

lid_switch {
lid-switch {
label = "Lid Switch";
gpios = <&r_pio 0 12 GPIO_ACTIVE_LOW>; /* PL12 */
linux,input-type = <EV_SW>;
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/dts/sun50i-a64-pinephone-1.0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
compatible = "pine64,pinephone-1.0", "pine64,pinephone", "allwinner,sun50i-a64";
};

&codec_analog {
allwinner,internal-bias-resistor;
};

&sgm3140 {
enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/dts/sun50i-a64-pinephone-1.1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
default-brightness-level = <400>;
};

&codec_analog {
allwinner,internal-bias-resistor;
};

&sgm3140 {
enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
Expand Down
8 changes: 8 additions & 0 deletions arch/arm/dts/sun50i-a64-teres-i.dts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@
status = "okay";
};

&pio {
vcc-pc-supply = <&reg_dcdc1>;
vcc-pd-supply = <&reg_dldo2>;
vcc-pe-supply = <&reg_aldo1>;
vcc-pf-supply = <&reg_dcdc1>; /* No dedicated supply-pin for this */
vcc-pg-supply = <&reg_aldo2>;
};

&pwm {
status = "okay";
};
Expand Down
Loading

0 comments on commit 73ceadc

Please sign in to comment.