RK3326: Upgrade Kernel to 6.7.0

This commit is contained in:
brooksytech 2024-01-11 13:44:05 +00:00
parent e46273cabd
commit 8ca3d941d0
No known key found for this signature in database
9 changed files with 5744 additions and 7513 deletions

File diff suppressed because it is too large Load diff

View file

@ -35,14 +35,10 @@ case ${DEVICE} in
GET_HANDLER_SUPPORT="git"
PKG_GIT_CLONE_BRANCH="main"
;;
RK3399)
RK3399|RK3326)
PKG_VERSION="6.7"
PKG_URL="https://www.kernel.org/pub/linux/kernel/v6.x/${PKG_NAME}-${PKG_VERSION}.tar.xz"
;;
RK3326)
PKG_VERSION="6.1.70"
PKG_URL="https://www.kernel.org/pub/linux/kernel/v6.x/${PKG_NAME}-${PKG_VERSION}.tar.xz"
;;
esac
PKG_KERNEL_CFG_FILE=$(kernel_config_path) || die

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,289 @@
diff -rupN linux.orig/drivers/devfreq/Kconfig linux/drivers/devfreq/Kconfig
--- linux.orig/drivers/devfreq/Kconfig 2024-01-10 19:42:04.697152003 +0000
+++ linux/drivers/devfreq/Kconfig 2024-01-10 20:09:49.575772091 +0000
@@ -141,6 +141,12 @@ config ARM_RK3399_DMC_DEVFREQ
It sets the frequency for the memory controller and reads the usage counts
from hardware.
+config ARM_ROCKCHIP_BUS_DEVFREQ
+ tristate "rockchip bus"
+ depends on ARCH_ROCKCHIP
+ help
+ rk bus driver
+
config ARM_SUN8I_A33_MBUS_DEVFREQ
tristate "sun8i/sun50i MBUS DEVFREQ Driver"
depends on ARCH_SUNXI || COMPILE_TEST
diff -rupN linux.orig/drivers/devfreq/Makefile linux/drivers/devfreq/Makefile
--- linux.orig/drivers/devfreq/Makefile 2024-01-10 19:42:04.697152003 +0000
+++ linux/drivers/devfreq/Makefile 2024-01-10 20:09:49.575772091 +0000
@@ -13,6 +13,7 @@ obj-$(CONFIG_ARM_IMX_BUS_DEVFREQ) += imx
obj-$(CONFIG_ARM_IMX8M_DDRC_DEVFREQ) += imx8m-ddrc.o
obj-$(CONFIG_ARM_MEDIATEK_CCI_DEVFREQ) += mtk-cci-devfreq.o
obj-$(CONFIG_ARM_RK3399_DMC_DEVFREQ) += rk3399_dmc.o
+obj-$(CONFIG_ARM_ROCKCHIP_BUS_DEVFREQ) += rockchip_bus.o
obj-$(CONFIG_ARM_SUN8I_A33_MBUS_DEVFREQ) += sun8i-a33-mbus.o
obj-$(CONFIG_ARM_TEGRA_DEVFREQ) += tegra30-devfreq.o
diff -rupN linux.orig/drivers/devfreq/rockchip_bus.c linux/drivers/devfreq/rockchip_bus.c
--- linux.orig/drivers/devfreq/rockchip_bus.c 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/devfreq/rockchip_bus.c 2024-01-10 20:09:49.575772091 +0000
@@ -0,0 +1,258 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2018, Fuzhou Rockchip Electronics Co., Ltd.
+ * Author: Tony Xie <tony.xie@rock-chips.com>
+ */
+
+#include <linux/arm-smccc.h>
+#include <linux/clk.h>
+#include <linux/cpufreq.h>
+#include <linux/delay.h>
+#include <linux/devfreq.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/pm_opp.h>
+#include <linux/platform_device.h>
+#include <linux/regulator/consumer.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+
+#define CLUSTER0 0
+#define CLUSTER1 1
+#define MAX_CLUSTERS 2
+
+#define to_rockchip_bus_clk_nb(nb) \
+ container_of(nb, struct rockchip_bus, clk_nb)
+#define to_rockchip_bus_cpufreq_nb(nb) \
+ container_of(nb, struct rockchip_bus, cpufreq_nb)
+
+struct busfreq_table {
+ unsigned long freq;
+ unsigned long volt;
+};
+
+struct rockchip_bus {
+ struct device *dev;
+ struct regulator *regulator;
+ struct clk *clk;
+ struct notifier_block clk_nb;
+ struct notifier_block cpufreq_nb;
+ struct busfreq_table *freq_table;
+
+ unsigned int max_state;
+
+ unsigned long cur_volt;
+ unsigned long cur_rate;
+
+ /*
+ * Busfreq-policy-cpufreq:
+ * If the cpu frequency of two clusters are both less than or equal to
+ * cpu_high_freq, change bus rate to low_rate, otherwise change it to
+ * high_rate.
+ */
+ unsigned long high_rate;
+ unsigned long low_rate;
+ unsigned int cpu_high_freq;
+ unsigned int cpu_freq[MAX_CLUSTERS];
+};
+
+static int rockchip_bus_set_freq_table(struct rockchip_bus *bus)
+{
+ struct device *dev = bus->dev;
+ struct dev_pm_opp *opp;
+ unsigned long freq;
+ int i, count;
+
+ count = dev_pm_opp_get_opp_count(dev);
+ if (count <= 0)
+ return -EINVAL;
+
+ bus->max_state = count;
+ bus->freq_table = devm_kcalloc(dev,
+ bus->max_state,
+ sizeof(*bus->freq_table),
+ GFP_KERNEL);
+ if (!bus->freq_table) {
+ bus->max_state = 0;
+ return -ENOMEM;
+ }
+
+ for (i = 0, freq = 0; i < bus->max_state; i++, freq++) {
+ opp = dev_pm_opp_find_freq_ceil(dev, &freq);
+ if (IS_ERR(opp)) {
+ devm_kfree(dev, bus->freq_table);
+ bus->max_state = 0;
+ return PTR_ERR(opp);
+ }
+ bus->freq_table[i].volt = dev_pm_opp_get_voltage(opp);
+ bus->freq_table[i].freq = freq;
+ dev_pm_opp_put(opp);
+ }
+
+ return 0;
+}
+
+static int rockchip_bus_power_control_init(struct rockchip_bus *bus)
+{
+ struct device *dev = bus->dev;
+ int ret = 0;
+
+ bus->clk = devm_clk_get(dev, "bus");
+ if (IS_ERR(bus->clk)) {
+ dev_err(dev, "failed to get bus clock\n");
+ return PTR_ERR(bus->clk);
+ }
+
+ bus->regulator = devm_regulator_get(dev, "bus");
+ if (IS_ERR(bus->regulator)) {
+ dev_err(dev, "failed to get bus regulator\n");
+ return PTR_ERR(bus->regulator);
+ }
+
+ ret = dev_pm_opp_of_add_table(dev);
+ if (ret < 0) {
+ dev_err(dev, "failed to get OPP table\n");
+ return ret;
+ }
+
+ ret = rockchip_bus_set_freq_table(bus);
+ if (ret < 0) {
+ dev_err(dev, "failed to set bus freq table\n");
+ return ret;
+ }
+
+ return 0;
+}
+
+static int rockchip_bus_clkfreq_target(struct device *dev, unsigned long freq)
+{
+ struct rockchip_bus *bus = dev_get_drvdata(dev);
+ unsigned long target_volt = bus->freq_table[bus->max_state - 1].volt;
+ int i;
+
+ for (i = 0; i < bus->max_state; i++) {
+ if (freq <= bus->freq_table[i].freq) {
+ target_volt = bus->freq_table[i].volt;
+ break;
+ }
+ }
+
+ printk("AAA target_volt: %lu\n", target_volt);
+
+ if (bus->cur_volt != target_volt) {
+ if (regulator_set_voltage(bus->regulator, target_volt,
+ INT_MAX)) {
+ dev_err(dev, "failed to set voltage %lu uV\n",
+ target_volt);
+ return -EINVAL;
+ }
+ bus->cur_volt = target_volt;
+ }
+
+ return 0;
+}
+
+static int rockchip_bus_clk_notifier(struct notifier_block *nb,
+ unsigned long event, void *data)
+{
+ struct clk_notifier_data *ndata = data;
+ struct rockchip_bus *bus = to_rockchip_bus_clk_nb(nb);
+ int ret = 0;
+
+ printk("AAA event %lu, old_rate %lu, new_rate: %lu\n",
+ event, ndata->old_rate, ndata->new_rate);
+
+ switch (event) {
+ case PRE_RATE_CHANGE:
+ if (ndata->new_rate > ndata->old_rate)
+ ret = rockchip_bus_clkfreq_target(bus->dev,
+ ndata->new_rate);
+ break;
+ case POST_RATE_CHANGE:
+ if (ndata->new_rate < ndata->old_rate)
+ ret = rockchip_bus_clkfreq_target(bus->dev,
+ ndata->new_rate);
+ break;
+ case ABORT_RATE_CHANGE:
+ if (ndata->new_rate > ndata->old_rate)
+ ret = rockchip_bus_clkfreq_target(bus->dev,
+ ndata->old_rate);
+ break;
+ default:
+ break;
+ }
+
+ return notifier_from_errno(ret);
+}
+
+static int rockchip_bus_clkfreq(struct rockchip_bus *bus)
+{
+ struct device *dev = bus->dev;
+ unsigned long init_rate;
+ int ret = 0;
+
+ ret = rockchip_bus_power_control_init(bus);
+ if (ret) {
+ dev_err(dev, "failed to init power control\n");
+ return ret;
+ }
+
+ init_rate = clk_get_rate(bus->clk);
+ printk("init rate %d", init_rate);
+ ret = rockchip_bus_clkfreq_target(dev, init_rate);
+ if (ret)
+ return ret;
+
+ bus->clk_nb.notifier_call = rockchip_bus_clk_notifier;
+ ret = clk_notifier_register(bus->clk, &bus->clk_nb);
+ if (ret) {
+ dev_err(dev, "failed to register clock notifier\n");
+ return ret;
+ }
+
+ return 0;
+}
+
+static const struct of_device_id rockchip_busfreq_of_match[] = {
+ { .compatible = "rockchip,px30-bus", },
+ { .compatible = "rockchip,rk1808-bus", },
+ { .compatible = "rockchip,rk3288-bus", },
+ { .compatible = "rockchip,rk3368-bus", },
+ { .compatible = "rockchip,rk3399-bus", },
+ { .compatible = "rockchip,rv1126-bus", },
+ { },
+};
+
+MODULE_DEVICE_TABLE(of, rockchip_busfreq_of_match);
+
+static int rockchip_busfreq_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct device_node *np = dev->of_node;
+ struct rockchip_bus *bus;
+ const char *policy_name;
+ int ret = 0;
+
+ bus = devm_kzalloc(dev, sizeof(*bus), GFP_KERNEL);
+ if (!bus)
+ return -ENOMEM;
+ bus->dev = dev;
+ platform_set_drvdata(pdev, bus);
+
+ printk("asdfsadfsadffasdafsdhjfsdakasdfjfjasdklsfadkljsdfajklfsadjklfasdjklhasfdhjklafsdhkjsfdajkhfasdk");
+ return rockchip_bus_clkfreq(bus);
+}
+
+static struct platform_driver rockchip_busfreq_driver = {
+ .probe = rockchip_busfreq_probe,
+ .driver = {
+ .name = "rockchip-busfreq",
+ .of_match_table = rockchip_busfreq_of_match,
+ },
+};
+
+module_platform_driver(rockchip_busfreq_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Tony Xie <tony.xie@rock-chips.com>");
+MODULE_DESCRIPTION("rockchip busfreq driver with devfreq framework");

View file

@ -0,0 +1,65 @@
diff -rupN linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c
--- linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-01-10 19:42:04.985158299 +0000
+++ linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-01-10 20:29:27.560112603 +0000
@@ -107,6 +107,8 @@ static int kd35t133_unprepare(struct drm
regulator_disable(ctx->iovcc);
regulator_disable(ctx->vdd);
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+
ctx->prepared = false;
return 0;
diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c
--- linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-01-10 19:42:04.985158299 +0000
+++ linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-01-10 21:11:01.498070258 +0000
@@ -28,6 +28,7 @@ struct nv3051d_panel_info {
unsigned int num_modes;
u16 width_mm, height_mm;
u32 bus_flags;
+ unsigned long mode_flags;
};
struct panel_nv3051d {
@@ -385,15 +386,7 @@ static int panel_nv3051d_probe(struct mi
dsi->lanes = 4;
dsi->format = MIPI_DSI_FMT_RGB888;
- dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
- MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET;
-
- /*
- * The panel in the RG351V is identical to the 353P, except it
- * requires MIPI_DSI_CLOCK_NON_CONTINUOUS to operate correctly.
- */
- if (of_device_is_compatible(dev->of_node, "anbernic,rg351v-panel"))
- dsi->mode_flags |= MIPI_DSI_CLOCK_NON_CONTINUOUS;
+ dsi->mode_flags = ctx->panel_info->mode_flags;
drm_panel_init(&ctx->panel, &dsi->dev, &panel_nv3051d_funcs,
DRM_MODE_CONNECTOR_DSI);
@@ -487,10 +480,24 @@ static const struct nv3051d_panel_info n
.width_mm = 70,
.height_mm = 57,
.bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
+ MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET,
+};
+
+static const struct nv3051d_panel_info nv3051d_rg351v_info = {
+ .display_modes = nv3051d_rgxx3_modes,
+ .num_modes = ARRAY_SIZE(nv3051d_rgxx3_modes),
+ .width_mm = 70,
+ .height_mm = 57,
+ .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
+ MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET |
+ MIPI_DSI_CLOCK_NON_CONTINUOUS,
};
static const struct of_device_id newvision_nv3051d_of_match[] = {
{ .compatible = "newvision,nv3051d", .data = &nv3051d_rgxx3_info },
+ { .compatible = "anbernic,rg351v-panel", .data = &nv3051d_rg351v_info },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, newvision_nv3051d_of_match);

View file

@ -1,315 +0,0 @@
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/Makefile linux/arch/arm64/boot/dts/rockchip/Makefile
--- linux.orig/arch/arm64/boot/dts/rockchip/Makefile 2023-10-29 19:29:06.983692813 +0000
+++ linux/arch/arm64/boot/dts/rockchip/Makefile 2023-10-29 19:30:35.815676699 +0000
@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-an
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-powkiddy-rgb10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
diff -rupN linux.orig/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts
--- linux.orig/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts 1970-01-01 00:00:00.000000000 +0000
+++ linux/arch/arm64/boot/dts/rockchip/rk3326-powkiddy-rgb10.dts 2023-10-29 19:31:19.751624080 +0000
@@ -0,0 +1,299 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Hardkernel Co., Ltd
+ * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH
+ * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com>
+ */
+
+/dts-v1/;
+#include "rk3326-odroid-go.dtsi"
+
+/ {
+ model = "Powkiddy RGB10";
+ compatible = "powkiddy,rk3326-rgb10", "rockchip,rk3326";
+
+ aliases {
+ mmc1 = &sdio;
+ };
+
+ gpio_keys: volume-keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <5>;
+ autorepeat;
+
+ volume-up-button {
+ label = "VOLUME-UP";
+ linux,code = <KEY_VOLUMEUP>;
+ gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>;
+
+ };
+ volume-down-button {
+ label = "VOLUME-DOWN";
+ linux,code = <KEY_VOLUMEDOWN>;
+ gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
+
+ };
+ };
+
+ joypad: odroidgo2-joypad {
+ compatible = "odroidgo2-v11-joypad";
+
+ /*
+ - odroidgo2-joypad sysfs list -
+ * for poll device interval(ms)
+ /sys/devices/platform/odroidgo2_joypad/poll_interval [rw]
+ * for button-adc-fuzz
+ /sys/devices/platform/odroidgo2_joypad/adc_fuzz [r]
+ * for button-adc-flat
+ /sys/devices/platform/odroidgo2_joypad/adc_flat [r]
+
+ * for report control(1:enable, 0:disable)
+ /sys/devices/platform/odroidgo2_joypad/enable [rw]
+ * for adc calibration value setup(1:current adcs value -> cal value)
+ /sys/devices/platform/odroidgo2_joypad/adc_cal [rw]
+ */
+
+ /* gpio pincontrol setup */
+ pinctrl-names = "default";
+ pinctrl-0 = <&btn_pins>;
+
+ /* JOY_X, JOY_Y Channel define */
+ io-channel-names = "joy_x", "joy_y";
+ io-channels = <&saradc 1>, <&saradc 2>;
+
+ /* adc channel count */
+ button-adc-count = <2>;
+
+ /* adc calculate scale */
+ button-adc-scale = <2>;
+
+ /* adc deadzone range */
+ button-adc-deadzone = <20>;
+
+ /*
+ joy-stick voltage range
+ /sys/devices/platform/ff288000.saradc/iio:device0
+ adc-x : in_voltage1_raw
+ adc-y : in_voltage2_raw
+
+ range calculate.
+ (adc raw max value - adc raw min value) * scale * 1.7515
+ */
+ button-adc-x-range = <1800>;
+ button-adc-y-range = <1800>;
+
+ /*
+ specifies fuzz value that is used to filter noise from
+ the event stream.
+ */
+ button-adc-fuzz = <32>;
+ button-adc-flat = <32>;
+
+ /* poll device interval (ms), adc read interval */
+ poll-interval = <10>;
+
+ /* gpio button auto repeat set value : default disable */
+ /*
+ autorepeat;
+ */
+
+ /*
+ *** RGB10 Switch layoout ***
+ |------------------------------------------------|
+ | sw15 sw16 |
+ | sw20 sw21 |
+ |------------------------------------------------|
+ | sw1 vol- |-------------------| vol+ sw8 |
+ | sw3 sw4 | | sw7 sw5 |
+ | sw2 | LCD Display | sw6 |
+ | | | |
+ | |-------------------| |
+ |------------------------------------------------|
+ */
+ /*
+ joypad driver is poll-device driver.
+ poll-device is does not support wakeup-source.
+ */
+ sw1 {
+ gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-UP";
+ linux,code = <BTN_DPAD_UP>; // 0x220
+ };
+ sw2 {
+ gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-DOWN";
+ linux,code = <BTN_DPAD_DOWN>; // 0x221
+ };
+ sw3 {
+ gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-LEFT";
+ linux,code = <BTN_DPAD_LEFT>; // 0x222
+ };
+ sw4 {
+ gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-RIGHT";
+ linux,code = <BTN_DPAD_RIGHT>; // 0x223
+ };
+ sw5 {
+ gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>;
+ label = "GPIO KEY BTN-A";
+ linux,code = <BTN_EAST>; // 0x131
+ };
+ sw6 {
+ gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-B";
+ linux,code = <BTN_SOUTH>; // 0x130
+ };
+ sw7 {
+ gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-Y";
+ linux,code = <BTN_WEST>; // 0x134
+ };
+ sw8 {
+ gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-X";
+ linux,code = <BTN_NORTH>; // 0x133
+ };
+ sw9 {
+ gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
+ label = "GPIO F1";
+ linux,code = <BTN_TRIGGER_HAPPY1>; // 0x2c0
+ };
+ sw10 {
+ gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
+ label = "GPIO F2";
+ linux,code = <BTN_TRIGGER_HAPPY2>; // 0x2c1
+ };
+ sw13 {
+ gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+ label = "GPIO F5";
+ linux,code = <BTN_TRIGGER_HAPPY5>; // 0x2c4
+ };
+ sw14 {
+ gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>;
+ label = "GPIO F6";
+ linux,code = <BTN_TRIGGER_HAPPY6>; // 0x13c
+ };
+ sw15 {
+ gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-LEFT";
+ linux,code = <BTN_TL>; // 0x02
+ };
+ sw16 {
+ gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-RIGHT";
+ linux,code = <BTN_TR>; // 0x05
+ };
+ sw20 {
+ gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-LEFT2";
+ linux,code = <BTN_TL2>;
+ };
+ sw21 {
+ gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-RIGHT2";
+ linux,code = <BTN_TR2>;
+ };
+ };
+
+ battery: battery {
+ compatible = "simple-battery";
+ charge-full-design-microamp-hours = <2800000>;
+ charge-term-current-microamp = <280000>;
+ constant-charge-current-max-microamp = <2000000>;
+ constant-charge-voltage-max-microvolt = <4200000>;
+ factory-internal-resistance-micro-ohms = <180000>;
+ voltage-max-design-microvolt = <4100000>;
+ voltage-min-design-microvolt = <3500000>;
+
+ ocv-capacity-celsius = <20>;
+ ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>,
+ <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>,
+ <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>,
+ <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>,
+ <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>,
+ <3574170 0>;
+ };
+
+ wifi_pwrseq: wifi-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_pwrseq_pins>;
+ /*reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;*/
+ };
+};
+
+&internal_display {
+ compatible = "elida,kd35t133";
+ iovcc-supply = <&vcc_lcd>;
+ vdd-supply = <&vcc_lcd>;
+ rotation = <270>;
+};
+
+&rk817 {
+ regulators {
+ vcc_wifi: LDO_REG9 {
+ regulator-name = "vcc_wifi";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+ };
+};
+
+&rk817_charger {
+ monitored-battery = <&battery>;
+};
+
+&sdio {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ disable-wp;
+ keep-power-in-suspend;
+ non-removable;
+ vmmc-supply = <&vcc_wifi>;
+ status = "okay";
+
+ esp8089: wifi@1 {
+ compatible = "esp,esp8089";
+ reg = <1>;
+ esp,crystal-26M-en = <2>;
+ };
+};
+
+&pinctrl {
+ btns {
+ btn_pins: btn-pins {
+ rockchip,pins = <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>,
+ <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>,
+ <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA1 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_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ wifi {
+ wifi_pwrseq_pins: wifi-pwrseq-pins {
+ rockchip,pins = /*<3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,*/
+ <3 RK_PB6 RK_FUNC_GPIO &pcfg_output_high>;
+ };
+ };
+};

View file

@ -2597,7 +2597,7 @@ index 000000000000..ea702f010eec
+#include <linux/netdevice.h>
+#include <linux/aio.h>
+#include <linux/property.h>
+
+#include <linux/of.h>
+#include "esp_file.h"
+#include "esp_debug.h"
+#include "esp_sif.h"
@ -7427,7 +7427,7 @@ index 000000000000..6602a1e22ab1
+ }
+ }
+ _exit:
+ ieee80211_tx_status(sip->epub->hw, skb);
+ ieee80211_tx_status_skb(sip->epub->hw, skb);
+}
+
+/*

File diff suppressed because it is too large Load diff