Merge pull request #1844 from brooksytech/dev
Enable GPIO wifi control on RK3399
This commit is contained in:
commit
d552e0bac5
3 changed files with 19 additions and 4 deletions
|
@ -14,6 +14,7 @@ DEVICE_JACK="8"
|
|||
DEVICE_HEADPHONE_DEV="/dev/input/by-path/platform-es8316-sound-event"
|
||||
DEVICE_HAS_HDMI=true
|
||||
DEVICE_HDMI_GPIO="54"
|
||||
DEVICE_WIFI="113"
|
||||
DEVICE_BATTERY_LED_STATUS=true
|
||||
DEVICE_PWR_LED_CONTROL=true
|
||||
UI_SERVICE="weston.service"
|
||||
|
|
13
packages/hardware/quirks/devices/Anbernic RG552/005-wifi
Normal file
13
packages/hardware/quirks/devices/Anbernic RG552/005-wifi
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
# Set export GPIO for Wifi and enable
|
||||
if [ ! -d "/sys/class/gpio/gpio${DEVICE_WIFI}" ]; then
|
||||
echo ${DEVICE_WIFI} > /sys/class/gpio/export
|
||||
echo out > /sys/class/gpio/gpio${DEVICE_WIFI}/direction
|
||||
echo 1 > /sys/class/gpio/gpio${DEVICE_WIFI}/value
|
||||
fi
|
|
@ -177,8 +177,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552-opp.dts
|
|||
+};
|
||||
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts linux/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts
|
||||
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts 2023-07-27 13:51:07.753940750 +0000
|
||||
@@ -0,0 +1,1328 @@
|
||||
+++ linux/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts 2023-07-28 03:39:31.373986693 +0000
|
||||
@@ -0,0 +1,1329 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
|
||||
|
@ -686,7 +686,8 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts lin
|
|||
+ vcc_wifi: vcc-wifi-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
+ gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_pwr>;
|
||||
+ regulator-name = "wifi_enable";
|
||||
|
@ -1354,7 +1355,7 @@ diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3399-anbernic-rg552.dts lin
|
|||
+ };
|
||||
+
|
||||
+ wifi {
|
||||
+ wifi_pwr: wifi-pwr-en {
|
||||
+ wifi_pwr: wifi-pwr {
|
||||
+ rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
|
|
Loading…
Reference in a new issue