From 36b8bfdc5494e0848a013de11933c3a97f852690 Mon Sep 17 00:00:00 2001 From: Douglas Teles Date: Thu, 26 Mar 2026 17:47:42 -0300 Subject: [PATCH] Update device tree for R36S "soysauce" variant: modify GPIO mappings, joypad configuration, and add panel overlays --- .../archr-dts/rk3326-gameconsole-soysauce.dts | 149 +++++------- config/mipi-generator/generator.sh | 20 +- projects/ArchR/bootloader/mkimage | 25 +- .../rockchip/rk3326-gameconsole-soysauce.dts | 225 ++++++++++++++++++ .../devices/RK3326/packages/u-boot/package.mk | 4 +- 5 files changed, 317 insertions(+), 106 deletions(-) mode change 100644 => 100755 config/mipi-generator/generator.sh create mode 100644 projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-soysauce.dts diff --git a/config/archr-dts/rk3326-gameconsole-soysauce.dts b/config/archr-dts/rk3326-gameconsole-soysauce.dts index e8c31b48f7..2f2eb4381f 100644 --- a/config/archr-dts/rk3326-gameconsole-soysauce.dts +++ b/config/archr-dts/rk3326-gameconsole-soysauce.dts @@ -4,12 +4,12 @@ * * Device tree for R36S "soysauce" variant (Y3506 boards). * Hardware differences from standard R36S: - * - Panel reset GPIO: GPIO3_PB0 (standard uses GPIO3_PC0) - * - Panel enable GPIO: GPIO1_PC2 (standard has none) - * - Speaker control GPIO: GPIO3_PC4 (same pin, different function) - * - LED GPIOs: GPIO0_PA5 (red), GPIO0_PA0 (blue) on soysauce - * - No backlight-supply regulator (backlight powered directly) - * - Different panel timing parameters (varies by sub-variant) + * - All buttons on GPIO3 (standard uses GPIO1/GPIO2) + * - Analog mux on GPIO0 (standard uses GPIO3) + * - Panel reset GPIO: GPIO3_PB0 + * - Panel enable GPIO: GPIO1_PC2 + * - amux-channel-mapping reordered + * - Different joypad product ID (0x1100 "GO-Super Gamepad") */ /dts-v1/; @@ -24,15 +24,6 @@ this = "soysauce"; }; - /* Soysauce uses speaker amp on same GPIO as standard R36S */ - spk_amp: audio-amplifier { - compatible = "simple-audio-amplifier"; - enable-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&spk_amp_enable_h>; - pinctrl-names = "default"; - sound-name-prefix = "Speaker Amp"; - }; - /* LED indicators (soysauce-specific) */ leds { compatible = "gpio-leds"; @@ -57,35 +48,28 @@ rumble-boost-weak = <0x0000>; rumble-boost-strong = <0x0000>; - joypad-name = "r36s_Gamepad"; - joypad-product = <0x1188>; - joypad-revision = <0x0188>; + joypad-name = "GO-Super Gamepad"; + joypad-product = <0x1100>; + joypad-revision = <0x0100>; status = "okay"; - /* gpio pincontrol setup */ pinctrl-names = "default"; pinctrl-0 = <&btn_pins>; pinctrl-1 = <&pwm0_pin>; - /* Analog mux define */ + /* Analog mux on GPIO0 (different from standard R36S) */ io-channel-names = "amux_adc"; io-channels = <&saradc 1>; - /* adc mux channel count */ amux-count = <4>; - /* adc mux select(a,b) gpio */ - amux-a-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; - amux-b-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; - /* adc mux enable gpio */ - amux-en-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>; + amux-channel-mapping = <3 2 0 1>; + amux-a-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_LOW>; + amux-b-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_LOW>; + amux-en-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_LOW>; - /* adc calculate scale */ button-adc-scale = <2>; - - /* adc deadzone range */ button-adc-deadzone = <64>; - button-adc-fuzz = <32>; button-adc-flat = <32>; @@ -98,113 +82,100 @@ abs_ry-p-tuning = <200>; abs_ry-n-tuning = <200>; - /* poll device interval (ms) */ poll-interval = <10>; - /* required for R36S */ invert-absx; invert-absy; + /* All buttons on GPIO3 (soysauce layout) */ sw1 { - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>; label = "GPIO DPAD-UP"; linux,code = ; }; sw2 { - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; label = "GPIO DPAD-DOWN"; linux,code = ; }; sw3 { - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; label = "GPIO DPAD-LEFT"; linux,code = ; }; sw4 { - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; label = "GPIO DPAD-RIGHT"; linux,code = ; }; sw5 { - gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; label = "GPIO KEY BTN-A"; linux,code = ; }; sw6 { - gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; label = "GPIO BTN-B"; linux,code = ; }; sw7 { - gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; label = "GPIO BTN-Y"; linux,code = ; }; sw8 { - gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>; label = "GPIO BTN-X"; linux,code = ; }; sw11 { - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; + gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>; label = "GPIO BTN_THUMBL"; linux,code = ; }; sw12 { - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PD3 GPIO_ACTIVE_LOW>; label = "GPIO BTN_THUMBR"; linux,code = ; }; sw13 { - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_FN"; + gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>; + label = "GPIO BTN_MODE"; linux,code = ; }; sw15 { - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>; label = "GPIO TOP-LEFT"; linux,code = ; }; sw16 { - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>; label = "GPIO TOP-RIGHT"; linux,code = ; }; sw19 { - gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>; label = "GPIO BTN_SELECT"; linux,code = ; }; sw20 { - gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT2"; - linux,code = ; - }; - sw21 { - gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>; label = "GPIO TOP-LEFT2"; linux,code = ; }; + sw21 { + gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>; + label = "GPIO TOP-RIGHT2"; + linux,code = ; + }; sw22 { - gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; + gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>; label = "GPIO BTN_START"; linux,code = ; }; }; }; -/* Override sound card from r3xs.dtsi: add speaker amplifier */ -/ { - rk817-sound { - simple-audio-card,aux-devs = <&spk_amp>; - simple-audio-card,routing = - "MICL", "Mic Jack", - "Headphones", "HPOL", - "Headphones", "HPOR", - "Speaker Amp INL", "SPKO"; - }; -}; - /* Soysauce panel: different reset GPIO + additional enable GPIO */ &internal_display { compatible = "archr,generic-dsi", "rocknix,generic-dsi"; @@ -213,37 +184,33 @@ }; &rk817_codec { - /* Soysauce has spk-ctl on GPIO3_PC4 */ spk-ctl-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; }; &pinctrl { btns { btn_pins: btn-pins { - rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - speaker { - spk_amp_enable_h: spk-amp-enable-h { - rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; + rockchip,pins = + <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>, + <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>, + <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, + <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, + <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; }; }; diff --git a/config/mipi-generator/generator.sh b/config/mipi-generator/generator.sh old mode 100644 new mode 100755 index 3752e91f07..fadf1ffcfa --- a/config/mipi-generator/generator.sh +++ b/config/mipi-generator/generator.sh @@ -189,18 +189,18 @@ if [ -d "$SOYSAUCE_DIR" ]; then log "" declare -A SOYSAUCE_PANELS=( - [soysauce_v03_1104]="Y3506_V03_20241104/rk3326-r36s-linux.dtb" - [soysauce_v03_1210]="Y3506_v03_20241210/rk3326-r36s-linux.dtb" - [soysauce_v03_0317]="Y3506_V03_20250317/rk3326-r36s-linux.dtb" - [soysauce_v04_253x]="Y3506_V04_20250529 253x Panel 6/rk3326-r36s-linux.dtb" - [soysauce_v04_2548]="Y3506_V04_20250529 2548/rk3326-r36s-linux.dtb" - [soysauce_v05_2551]="Y3506_V05_20251215 2551/rk3326-r36s-linux.dtb" - [soysauce_v05_2601]="Y3506_V05_20251215 2601/rk3326-r36s-linux.dtb" + [ss_v03_20241104]="Y3506_V03_20241104/rk3326-r36s-linux.dtb" + [ss_v03_20241210]="Y3506_v03_20241210/rk3326-r36s-linux.dtb" + [ss_v03_20250317]="Y3506_V03_20250317/rk3326-r36s-linux.dtb" + [ss_v04_20250529_253x]="Y3506_V04_20250529 253x Panel 6/rk3326-r36s-linux.dtb" + [ss_v04_20250529_2548]="Y3506_V04_20250529 2548/rk3326-r36s-linux.dtb" + [ss_v05_20251215_2551]="Y3506_V05_20251215 2551/rk3326-r36s-linux.dtb" + [ss_v05_20251215_2601]="Y3506_V05_20251215 2601/rk3326-r36s-linux.dtb" ) - SOYSAUCE_ORDER=(soysauce_v03_1104 soysauce_v03_1210 soysauce_v03_0317 - soysauce_v04_253x soysauce_v04_2548 - soysauce_v05_2551 soysauce_v05_2601) + SOYSAUCE_ORDER=(ss_v03_20241104 ss_v03_20241210 ss_v03_20250317 + ss_v04_20250529_253x ss_v04_20250529_2548 + ss_v05_20251215_2551 ss_v05_20251215_2601) for key in "${SOYSAUCE_ORDER[@]}"; do dtb="${SOYSAUCE_PANELS[$key]}" diff --git a/projects/ArchR/bootloader/mkimage b/projects/ArchR/bootloader/mkimage index 914891d6ea..de09352b9b 100644 --- a/projects/ArchR/bootloader/mkimage +++ b/projects/ArchR/bootloader/mkimage @@ -67,15 +67,34 @@ mkimage_dtb() { case "$DEVICE" in RK3326) mmd ::dtbs 2>/dev/null || true - mcopy "${RELEASE_DIR}/3rdparty/bootloader/device_trees/"*.dtb ::dtbs/ + # Copy only DTBs listed in config.xml for this SUBDEVICE + DTB_LIST=$(xmlstarlet sel -t -v "//archr/RK3326/${SUBDEVICE}/file" "${PROJECT_DIR}/${PROJECT}/config.xml" 2>/dev/null) + if [ -n "${DTB_LIST}" ]; then + for dtb_name in ${DTB_LIST}; do + DTB_FILE="${RELEASE_DIR}/3rdparty/bootloader/device_trees/rockchip/${dtb_name}.dtb" + [ ! -f "${DTB_FILE}" ] && DTB_FILE="${RELEASE_DIR}/3rdparty/bootloader/device_trees/${dtb_name}.dtb" + if [ -f "${DTB_FILE}" ]; then + mcopy "${DTB_FILE}" ::dtbs/ + else + echo "WARNING: DTB not found: ${dtb_name}.dtb" + fi + done + else + # Fallback: copy all DTBs if config.xml parsing fails + mcopy "${RELEASE_DIR}/3rdparty/bootloader/device_trees/"*.dtb ::dtbs/ + fi mcopy "${RELEASE_DIR}/3rdparty/bootloader/stock" :: # Copy SUBDEVICE-specific panel overlays, fallback to generic if [ -d "${RELEASE_DIR}/3rdparty/bootloader/overlays_${SUBDEVICE}" ]; then echo "image: copying ${SUBDEVICE} panel overlays..." mmd ::overlays 2>/dev/null || true mcopy "${RELEASE_DIR}/3rdparty/bootloader/overlays_${SUBDEVICE}/"*.dtbo ::overlays/ - elif [ -d "${RELEASE_DIR}/3rdparty/bootloader/overlays" ]; then - mcopy "${RELEASE_DIR}/3rdparty/bootloader/overlays" :: + fi + # Copy soysauce overlays into original image (soysauce shares ADC with original) + if [ "${SUBDEVICE}" = "original" ] && [ -d "${RELEASE_DIR}/3rdparty/bootloader/overlays_soysauce" ]; then + echo "image: copying soysauce panel overlays..." + mmd ::overlays/soysauce 2>/dev/null || true + mcopy "${RELEASE_DIR}/3rdparty/bootloader/overlays_soysauce/"*.dtbo ::overlays/soysauce/ fi ;; SM8550|SM8650|SM8250|SDM845) diff --git a/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-soysauce.dts b/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-soysauce.dts new file mode 100644 index 0000000000..2f2eb4381f --- /dev/null +++ b/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-soysauce.dts @@ -0,0 +1,225 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2026 ArchR (https://github.com/archr-linux/Arch-R) + * + * Device tree for R36S "soysauce" variant (Y3506 boards). + * Hardware differences from standard R36S: + * - All buttons on GPIO3 (standard uses GPIO1/GPIO2) + * - Analog mux on GPIO0 (standard uses GPIO3) + * - Panel reset GPIO: GPIO3_PB0 + * - Panel enable GPIO: GPIO1_PC2 + * - amux-channel-mapping reordered + * - Different joypad product ID (0x1100 "GO-Super Gamepad") + */ + +/dts-v1/; +#include "rk3326-gameconsole-r3xs.dtsi" +#include "rk3326-device-group-r36.dtsi" + +/ { + model = "Game Console R36S Soysauce"; + compatible = "gameconsole,soysauce", "gameconsole,r36s", "rockchip,rk3326"; + + archr,device_switch { + this = "soysauce"; + }; + + /* LED indicators (soysauce-specific) */ + leds { + compatible = "gpio-leds"; + + led-red { + gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; + label = "red"; + default-state = "off"; + }; + + led-blue { + gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; + label = "blue"; + default-state = "off"; + }; + }; + + joypad: odroidgo3-joypad { + compatible = "odroidgo3-joypad"; + pwms = <&pwm0 0 200000000 0>; + pwm-names = "enable"; + rumble-boost-weak = <0x0000>; + rumble-boost-strong = <0x0000>; + + joypad-name = "GO-Super Gamepad"; + joypad-product = <0x1100>; + joypad-revision = <0x0100>; + + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&btn_pins>; + pinctrl-1 = <&pwm0_pin>; + + /* Analog mux on GPIO0 (different from standard R36S) */ + io-channel-names = "amux_adc"; + io-channels = <&saradc 1>; + + amux-count = <4>; + amux-channel-mapping = <3 2 0 1>; + amux-a-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_LOW>; + amux-b-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_LOW>; + amux-en-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_LOW>; + + button-adc-scale = <2>; + button-adc-deadzone = <64>; + button-adc-fuzz = <32>; + button-adc-flat = <32>; + + abs_x-p-tuning = <200>; + abs_x-n-tuning = <200>; + abs_y-p-tuning = <200>; + abs_y-n-tuning = <200>; + abs_rx-p-tuning = <200>; + abs_rx-n-tuning = <200>; + abs_ry-p-tuning = <200>; + abs_ry-n-tuning = <200>; + + poll-interval = <10>; + + invert-absx; + invert-absy; + + /* All buttons on GPIO3 (soysauce layout) */ + sw1 { + gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>; + label = "GPIO DPAD-UP"; + linux,code = ; + }; + sw2 { + gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; + label = "GPIO DPAD-DOWN"; + linux,code = ; + }; + sw3 { + gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; + label = "GPIO DPAD-LEFT"; + linux,code = ; + }; + sw4 { + gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; + label = "GPIO DPAD-RIGHT"; + linux,code = ; + }; + sw5 { + gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; + label = "GPIO KEY BTN-A"; + linux,code = ; + }; + sw6 { + gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; + label = "GPIO BTN-B"; + linux,code = ; + }; + sw7 { + gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; + label = "GPIO BTN-Y"; + linux,code = ; + }; + sw8 { + gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>; + label = "GPIO BTN-X"; + linux,code = ; + }; + sw11 { + gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>; + label = "GPIO BTN_THUMBL"; + linux,code = ; + }; + sw12 { + gpios = <&gpio3 RK_PD3 GPIO_ACTIVE_LOW>; + label = "GPIO BTN_THUMBR"; + linux,code = ; + }; + sw13 { + gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>; + label = "GPIO BTN_MODE"; + linux,code = ; + }; + sw15 { + gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>; + label = "GPIO TOP-LEFT"; + linux,code = ; + }; + sw16 { + gpios = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>; + label = "GPIO TOP-RIGHT"; + linux,code = ; + }; + sw19 { + gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>; + label = "GPIO BTN_SELECT"; + linux,code = ; + }; + sw20 { + gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>; + label = "GPIO TOP-LEFT2"; + linux,code = ; + }; + sw21 { + gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>; + label = "GPIO TOP-RIGHT2"; + linux,code = ; + }; + sw22 { + gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>; + label = "GPIO BTN_START"; + linux,code = ; + }; + }; +}; + +/* Soysauce panel: different reset GPIO + additional enable GPIO */ +&internal_display { + compatible = "archr,generic-dsi", "rocknix,generic-dsi"; + reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; + enable-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>; +}; + +&rk817_codec { + spk-ctl-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; +}; + +&pinctrl { + btns { + btn_pins: btn-pins { + rockchip,pins = + <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>, + <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>, + <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, + <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, + <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + panel { + panel_reset: panel-reset { + rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + panel_enable: panel-enable { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; diff --git a/projects/ArchR/devices/RK3326/packages/u-boot/package.mk b/projects/ArchR/devices/RK3326/packages/u-boot/package.mk index c8caba295f..26de47a8aa 100644 --- a/projects/ArchR/devices/RK3326/packages/u-boot/package.mk +++ b/projects/ArchR/devices/RK3326/packages/u-boot/package.mk @@ -100,10 +100,10 @@ makeinstall_target() { find_dir_path config/stock && cp -av ${FOUND_PATH} "${INSTALL}/usr/share/bootloader/" - # Generate MIPI panel overlays if not already present + # Generate MIPI panel overlays MIPI_GEN="${ROOT}/config/mipi-generator" MIPI_OUT="${MIPI_GEN}/output" - if [ -x "${MIPI_GEN}/generator.sh" ] && [ ! -d "${MIPI_OUT}/original" ] || [ -z "$(ls -A "${MIPI_OUT}/original" 2>/dev/null)" ]; then + if [ -x "${MIPI_GEN}/generator.sh" ]; then echo "Generating MIPI panel overlays..." bash "${MIPI_GEN}/generator.sh" || echo "WARNING: Panel overlay generation failed (non-fatal)" fi