初始化奇妙小屏幕控制器项目
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# AXP313A / cpufreq candidate kernel
|
||||
|
||||
The production application version is intentionally unchanged. This directory describes the
|
||||
separately named `6.1.31-matrix-axp313a1` kernel used to repair the WalnutPi ZeroW PMIC binding.
|
||||
|
||||
Source inputs are fixed to:
|
||||
|
||||
- WalnutPi Linux branch `6.1.31`, commit `30ff3fd5cf45417622b447a12e7a947402ffe34d`.
|
||||
- Upstream MFD commit `75c8cb2f4cb218aaf4ea68cab08d6dbc96eeae15`.
|
||||
- Upstream regulator commit `60fd7eb89670d2636ac3156881acbd103c6eba6a`.
|
||||
- Upstream identifier fix `4628b804555773daa982d9578d89fe04fcdde374`.
|
||||
|
||||
The build used the official GitHub archive named
|
||||
`walnutpi-linux-6.1.31-30ff3fd5.tar.gz`; its measured SHA-256 is
|
||||
`8659bb3d64313c4693c3605374167a8145186e5c9d43eb771a52a7359699302f`.
|
||||
The fixed archive is registered at
|
||||
`发布更新相关/其他依赖/kernel-source/walnutpi-linux-6.1.31-30ff3fd5/` so the kernel can be
|
||||
rebuilt without network access. It is a build input and is never copied into an IMG or OTA.
|
||||
|
||||
The exact production files accepted by the browser and real HUB75 GPIO tests are registered at
|
||||
`发布更新相关/其他依赖/aarch64-kernel/6.1.31-matrix-axp313a1/`. Future IMG exports install this
|
||||
precompiled payload and do not rebuild the kernel unless patches, DTS, or kernel configuration
|
||||
change.
|
||||
|
||||
`scripts/build_axp313a_kernel.sh` accepts an already extracted source tree and a copy of the
|
||||
running board's `/boot/config-6.1.31`. It never downloads dependencies. The three verbatim
|
||||
upstream patches, the WalnutPi 6.1 reconciliation patch, and the board DTS patches are verified
|
||||
against `patches/SHA256SUMS` before use. WalnutPi's branch already contains a partial AXP313A
|
||||
backport, so the reconciliation patch asserts that baseline and completes the three pinned
|
||||
upstream changes using the vendor kernel's older power-off API. The follow-up DTS patch keeps
|
||||
the bootloader's DLDO1 VCC-IO rail explicitly always-on at 3.3V; DCDC3 remains at the measured
|
||||
bootloader value of 1.10V so the candidate does not raise a non-CPU rail. The final local
|
||||
build-only patch replaces a vendor UWE5622 Makefile's output-tree-relative include lookup with
|
||||
Kbuild's `$(srctree)` path. It is required only so the unchanged board configuration can be
|
||||
built in the isolated `O=` directory; it does not change driver logic. A second mechanical
|
||||
build-only patch applies the same `$(srctree)` correction to the five Realtek module directories
|
||||
identified in the first config audit. A third patch covers the separately enabled RTL8192EU
|
||||
directory. A fourth covers the enabled `CONFIG_88XXAU=m`/RTL8812AU directory found by auditing
|
||||
every vendor entry in the wireless parent Makefile, rather than only symbols prefixed `RTL`.
|
||||
Its PHYDM include root is fixed in a separate final patch so each discovered build assumption
|
||||
remains independently auditable. These patches do not change C source, feature selection, or
|
||||
runtime paths. The RTL88x2CS `CONFIG_RTL8822C` branch has one additional `TopDIR` include fixed
|
||||
to `$(srctree)` after the full module build reached that otherwise output-tree-relative file.
|
||||
|
||||
The install path is deliberately separate from the vendor kernel:
|
||||
|
||||
- `/boot/Image-matrix-axp313a1`
|
||||
- `/boot/sun50i-h616-walnutpi-1b-matrix-axp313a1.dtb`
|
||||
- `/boot/sun50i-h616-walnutpi-1b-emmc-matrix-axp313a1.dtb`
|
||||
- `/lib/modules/6.1.31-matrix-axp313a1`
|
||||
|
||||
The managed boot script consumes `/boot/matrix-kernel-good` once before each candidate boot.
|
||||
Only `matrix-axp313a-health.service` recreates it after the kernel, AXP313A, cpufreq, application,
|
||||
and HUB75 checks pass. If the candidate fails and reboots, the absent marker selects the original
|
||||
`Image` and original DTB. Original boot files are retained as `.matrix-original` copies.
|
||||
@@ -0,0 +1,140 @@
|
||||
From: Matrix Screen Controller maintainers
|
||||
Subject: [PATCH] mfd: regulator: complete the AXP313A backport for WalnutPi 6.1
|
||||
|
||||
WalnutPi's 6.1.31 tree already carries an early, partial copy of the
|
||||
AXP313A MFD and regulator changes. Complete that backport with the
|
||||
upstream shutdown register and power-key resources, use the upstream
|
||||
regulator identifiers and names, and include the later CONTROL spelling
|
||||
fix from upstream commit 4628b804555773daa982d9578d89fe04fcdde374.
|
||||
|
||||
The originating upstream commits are stored verbatim beside this patch:
|
||||
75c8cb2f4cb218aaf4ea68cab08d6dbc96eeae15 and
|
||||
60fd7eb89670d2636ac3156881acbd103c6eba6a.
|
||||
|
||||
---
|
||||
drivers/mfd/axp20x.c | 24 ++++++++++++++++++------
|
||||
drivers/regulator/axp20x-regulator.c | 14 +++++++-------
|
||||
include/linux/mfd/axp20x.h | 17 +++++++++--------
|
||||
3 files changed, 34 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
|
||||
--- a/drivers/mfd/axp20x.c
|
||||
+++ b/drivers/mfd/axp20x.c
|
||||
@@ -160,7 +160,8 @@ static const struct regmap_range axp313a_writeable_ranges[] = {
|
||||
};
|
||||
|
||||
static const struct regmap_range axp313a_volatile_ranges[] = {
|
||||
- regmap_reg_range(AXP313A_ON_INDICATE, AXP313A_IRQ_STATE),
|
||||
+ regmap_reg_range(AXP313A_SHUTDOWN_CTRL, AXP313A_SHUTDOWN_CTRL),
|
||||
+ regmap_reg_range(AXP313A_IRQ_STATE, AXP313A_IRQ_STATE),
|
||||
};
|
||||
|
||||
static const struct regmap_access_table axp313a_writeable_table = {
|
||||
@@ -255,6 +256,11 @@ static const struct resource axp809_pek_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(AXP809_IRQ_PEK_FAL_EDGE, "PEK_DBF"),
|
||||
};
|
||||
|
||||
+static const struct resource axp313a_pek_resources[] = {
|
||||
+ DEFINE_RES_IRQ_NAMED(AXP313A_IRQ_PEK_RIS_EDGE, "PEK_DBR"),
|
||||
+ DEFINE_RES_IRQ_NAMED(AXP313A_IRQ_PEK_FAL_EDGE, "PEK_DBF"),
|
||||
+};
|
||||
+
|
||||
static const struct regmap_config axp152_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
@@ -735,8 +741,12 @@ static const struct mfd_cell axp152_cells[] = {
|
||||
};
|
||||
|
||||
static struct mfd_cell axp313a_cells[] = {
|
||||
- {
|
||||
- .name = "axp20x-regulator",
|
||||
+ {
|
||||
+ .name = "axp20x-regulator",
|
||||
+ }, {
|
||||
+ .name = "axp313a-pek",
|
||||
+ .num_resources = ARRAY_SIZE(axp313a_pek_resources),
|
||||
+ .resources = axp313a_pek_resources,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -898,9 +909,14 @@ static struct axp20x_dev *axp20x_pm_power_off;
|
||||
static void axp20x_power_off(void)
|
||||
{
|
||||
+ unsigned int shutdown_reg = AXP20X_OFF_CTRL;
|
||||
+
|
||||
if (axp20x_pm_power_off->variant == AXP288_ID)
|
||||
return;
|
||||
|
||||
- regmap_write(axp20x_pm_power_off->regmap, AXP20X_OFF_CTRL,
|
||||
+ if (axp20x_pm_power_off->variant == AXP313A_ID)
|
||||
+ shutdown_reg = AXP313A_SHUTDOWN_CTRL;
|
||||
+
|
||||
+ regmap_write(axp20x_pm_power_off->regmap, shutdown_reg,
|
||||
AXP20X_OFF);
|
||||
|
||||
/* Give capacitors etc. time to drain to avoid kernel panic msg. */
|
||||
diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
|
||||
--- a/drivers/regulator/axp20x-regulator.c
|
||||
+++ b/drivers/regulator/axp20x-regulator.c
|
||||
@@ -666,20 +666,20 @@ static const struct regulator_desc axp313a_regulators[] = {
|
||||
AXP_DESC_RANGES(AXP313A, DCDC1, "dcdc1", "vin1",
|
||||
axp313a_dcdc1_ranges, AXP313A_DCDC1_NUM_VOLTAGES,
|
||||
- AXP313A_DCDC1_CONRTOL, AXP313A_DCDC_V_OUT_MASK,
|
||||
+ AXP313A_DCDC1_CONTROL, AXP313A_DCDC_V_OUT_MASK,
|
||||
AXP313A_OUTPUT_CONTROL, BIT(0)),
|
||||
AXP_DESC_RANGES(AXP313A, DCDC2, "dcdc2", "vin2",
|
||||
axp313a_dcdc2_ranges, AXP313A_DCDC23_NUM_VOLTAGES,
|
||||
- AXP313A_DCDC2_CONRTOL, AXP313A_DCDC_V_OUT_MASK,
|
||||
+ AXP313A_DCDC2_CONTROL, AXP313A_DCDC_V_OUT_MASK,
|
||||
AXP313A_OUTPUT_CONTROL, BIT(1)),
|
||||
AXP_DESC_RANGES(AXP313A, DCDC3, "dcdc3", "vin3",
|
||||
axp313a_dcdc3_ranges, AXP313A_DCDC23_NUM_VOLTAGES,
|
||||
- AXP313A_DCDC3_CONRTOL, AXP313A_DCDC_V_OUT_MASK,
|
||||
+ AXP313A_DCDC3_CONTROL, AXP313A_DCDC_V_OUT_MASK,
|
||||
AXP313A_OUTPUT_CONTROL, BIT(2)),
|
||||
- AXP_DESC(AXP313A, LDO1, "ldo1", "vin1", 500, 3500, 100,
|
||||
- AXP313A_ALDO1_CONRTOL, AXP313A_LDO_V_OUT_MASK,
|
||||
+ AXP_DESC(AXP313A, ALDO1, "aldo1", "vin1", 500, 3500, 100,
|
||||
+ AXP313A_ALDO1_CONTROL, AXP313A_LDO_V_OUT_MASK,
|
||||
AXP313A_OUTPUT_CONTROL, BIT(3)),
|
||||
- AXP_DESC(AXP313A, LDO2, "ldo2", "vin1", 500, 3500, 100,
|
||||
- AXP313A_DLDO1_CONRTOL, AXP313A_LDO_V_OUT_MASK,
|
||||
+ AXP_DESC(AXP313A, DLDO1, "dldo1", "vin1", 500, 3500, 100,
|
||||
+ AXP313A_DLDO1_CONTROL, AXP313A_LDO_V_OUT_MASK,
|
||||
AXP313A_OUTPUT_CONTROL, BIT(4)),
|
||||
AXP_DESC_FIXED(AXP313A, RTC_LDO, "rtc-ldo", "vin1", 1800),
|
||||
};
|
||||
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h
|
||||
--- a/include/linux/mfd/axp20x.h
|
||||
+++ b/include/linux/mfd/axp20x.h
|
||||
@@ -94,11 +94,12 @@ enum axp20x_variants {
|
||||
|
||||
#define AXP313A_ON_INDICATE 0x00
|
||||
#define AXP313A_OUTPUT_CONTROL 0x10
|
||||
-#define AXP313A_DCDC1_CONRTOL 0x13
|
||||
-#define AXP313A_DCDC2_CONRTOL 0x14
|
||||
-#define AXP313A_DCDC3_CONRTOL 0x15
|
||||
-#define AXP313A_ALDO1_CONRTOL 0x16
|
||||
-#define AXP313A_DLDO1_CONRTOL 0x17
|
||||
+#define AXP313A_DCDC1_CONTROL 0x13
|
||||
+#define AXP313A_DCDC2_CONTROL 0x14
|
||||
+#define AXP313A_DCDC3_CONTROL 0x15
|
||||
+#define AXP313A_ALDO1_CONTROL 0x16
|
||||
+#define AXP313A_DLDO1_CONTROL 0x17
|
||||
+#define AXP313A_SHUTDOWN_CTRL 0x1a
|
||||
#define AXP313A_OUTPUT_MONITOR 0x1d
|
||||
#define AXP313A_IRQ_EN 0x20
|
||||
#define AXP313A_IRQ_STATE 0x21
|
||||
@@ -338,8 +339,8 @@ enum {
|
||||
AXP313A_DCDC1 = 0,
|
||||
AXP313A_DCDC2,
|
||||
AXP313A_DCDC3,
|
||||
- AXP313A_LDO1,
|
||||
- AXP313A_LDO2,
|
||||
+ AXP313A_ALDO1,
|
||||
+ AXP313A_DLDO1,
|
||||
AXP313A_RTC_LDO,
|
||||
AXP313A_REG_ID_MAX,
|
||||
};
|
||||
--
|
||||
2.39.2
|
||||
@@ -0,0 +1,54 @@
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b.dts
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b.dts
|
||||
@@ -306,26 +306,19 @@
|
||||
&r_i2c {
|
||||
status = "okay";
|
||||
|
||||
- axp305: pmic@36 {
|
||||
- compatible = "x-powers,axp305", "x-powers,axp805",
|
||||
- "x-powers,axp806";
|
||||
+ axp313a: pmic@36 {
|
||||
+ compatible = "x-powers,axp313a";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
reg = <0x36>;
|
||||
|
||||
- x-powers,self-working-mode;
|
||||
- vina-supply = <®_vcc5v>;
|
||||
- vinb-supply = <®_vcc5v>;
|
||||
- vinc-supply = <®_vcc5v>;
|
||||
- vind-supply = <®_vcc5v>;
|
||||
- vine-supply = <®_vcc5v>;
|
||||
- aldoin-supply = <®_vcc5v>;
|
||||
- bldoin-supply = <®_vcc5v>;
|
||||
- cldoin-supply = <®_vcc5v>;
|
||||
+ vin1-supply = <®_vcc5v>;
|
||||
+ vin2-supply = <®_vcc5v>;
|
||||
+ vin3-supply = <®_vcc5v>;
|
||||
|
||||
regulators {
|
||||
|
||||
- reg_bldo1: bldo1 {
|
||||
+ reg_bldo1: aldo1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
@@ -348,15 +341,11 @@
|
||||
|
||||
reg_dcdc3: dcdc3 {
|
||||
regulator-always-on;
|
||||
- regulator-min-microvolt = <1300000>;
|
||||
- regulator-max-microvolt = <1300000>;
|
||||
+ regulator-min-microvolt = <1100000>;
|
||||
+ regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-dram";
|
||||
};
|
||||
|
||||
-
|
||||
- sw {
|
||||
- /* unused */
|
||||
- };
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
From: Matrix Screen Controller maintainers
|
||||
Subject: [PATCH] arm64: dts: walnutpi: keep AXP313A DLDO1 at boot voltage
|
||||
|
||||
The WalnutPi U-Boot board description keeps DLDO1 enabled at 3.3V for
|
||||
VCC-IO. Describe that rail as always-on after switching the Linux PMIC
|
||||
binding to AXP313A so regulator cleanup cannot disable it as unused.
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b.dts | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b.dts
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b.dts
|
||||
@@ -328 +328,8 @@
|
||||
+ reg_dldo1: dldo1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc3v3";
|
||||
+ };
|
||||
+
|
||||
- reg_dcdc2: dcdc2 {
|
||||
+ reg_dcdc2: dcdc2 {
|
||||
--
|
||||
2.39.2
|
||||
@@ -0,0 +1,54 @@
|
||||
From: Matrix Screen Controller maintainers
|
||||
Subject: [PATCH] wifi: uwe5622: make the vendor include path O= safe
|
||||
|
||||
The vendor Makefile resolves its source directory by changing into a path
|
||||
relative to the output tree. That fails for the isolated O= build used by
|
||||
the candidate kernel and drops the directory containing wcn_bus.h. Use
|
||||
Kbuild's absolute srctree instead. This does not change driver behaviour.
|
||||
|
||||
---
|
||||
drivers/net/wireless/rtl8189es/Makefile | 6 +++---
|
||||
drivers/net/wireless/rtl8189es/hal/phydm/phydm.mk | 2 +-
|
||||
drivers/net/wireless/uwe5622/Makefile | 2 +-
|
||||
drivers/net/wireless/uwe5622/unisocwcn/Makefile | 6 +++---
|
||||
4 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/uwe5622/Makefile b/drivers/net/wireless/uwe5622/Makefile
|
||||
--- a/drivers/net/wireless/uwe5622/Makefile
|
||||
+++ b/drivers/net/wireless/uwe5622/Makefile
|
||||
@@ -5 +5 @@
|
||||
-UNISOCWCN_DIR := $(shell cd $(src)/unisocwcn/ && /bin/pwd)
|
||||
+UNISOCWCN_DIR := $(srctree)/drivers/net/wireless/uwe5622/unisocwcn
|
||||
|
||||
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/Makefile b/drivers/net/wireless/uwe5622/unisocwcn/Makefile
|
||||
--- a/drivers/net/wireless/uwe5622/unisocwcn/Makefile
|
||||
+++ b/drivers/net/wireless/uwe5622/unisocwcn/Makefile
|
||||
@@ -132,3 +132,3 @@
|
||||
-ccflags-y += -I$(src)/include/
|
||||
-ccflags-y += -I$(src)/platform/
|
||||
-ccflags-y += -I$(src)/platform/rf/
|
||||
+ccflags-y += -I$(srctree)/drivers/net/wireless/uwe5622/unisocwcn/include/
|
||||
+ccflags-y += -I$(srctree)/drivers/net/wireless/uwe5622/unisocwcn/platform/
|
||||
+ccflags-y += -I$(srctree)/drivers/net/wireless/uwe5622/unisocwcn/platform/rf/
|
||||
|
||||
diff --git a/drivers/net/wireless/rtl8189es/Makefile b/drivers/net/wireless/rtl8189es/Makefile
|
||||
--- a/drivers/net/wireless/rtl8189es/Makefile
|
||||
+++ b/drivers/net/wireless/rtl8189es/Makefile
|
||||
@@ -22 +22 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/include
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8189es/include
|
||||
@@ -252 +252 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/platform
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8189es/platform
|
||||
@@ -255 +255 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/btc
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8189es/hal/btc
|
||||
|
||||
diff --git a/drivers/net/wireless/rtl8189es/hal/phydm/phydm.mk b/drivers/net/wireless/rtl8189es/hal/phydm/phydm.mk
|
||||
--- a/drivers/net/wireless/rtl8189es/hal/phydm/phydm.mk
|
||||
+++ b/drivers/net/wireless/rtl8189es/hal/phydm/phydm.mk
|
||||
@@ -1 +1 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8189es/hal/phydm
|
||||
--
|
||||
2.39.2
|
||||
@@ -0,0 +1,197 @@
|
||||
--- a/drivers/net/wireless/rtl8189fs/Makefile
|
||||
+++ b/drivers/net/wireless/rtl8189fs/Makefile
|
||||
@@ -20,7 +20,7 @@
|
||||
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/include
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8189fs/include
|
||||
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
||||
@@ -250,10 +250,10 @@
|
||||
hal/led/hal_$(HCI_NAME)_led.o
|
||||
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/platform
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8189fs/platform
|
||||
_PLATFORM_FILES := platform/platform_ops.o
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/btc
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8189fs/hal/btc
|
||||
|
||||
########### HAL_RTL8188E #################################
|
||||
ifeq ($(CONFIG_RTL8188E), y)
|
||||
--- a/drivers/net/wireless/rtl8189fs/hal/phydm/phydm.mk
|
||||
+++ b/drivers/net/wireless/rtl8189fs/hal/phydm/phydm.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8189fs/hal/phydm
|
||||
|
||||
_PHYDM_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/phydm_antdiv.o\
|
||||
--- a/drivers/net/wireless/rtl8189fs/hal/phydm/sd4_phydm_2_kernel.mk
|
||||
+++ b/drivers/net/wireless/rtl8189fs/hal/phydm/sd4_phydm_2_kernel.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8189fs/hal/phydm
|
||||
|
||||
_PHYDM_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/phydm_interface.o\
|
||||
--- a/drivers/net/wireless/rtl8723ds/Makefile
|
||||
+++ b/drivers/net/wireless/rtl8723ds/Makefile
|
||||
@@ -19,8 +19,8 @@
|
||||
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/include
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8723ds/include
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8723ds/hal/phydm
|
||||
|
||||
EXTRA_LDFLAGS += --strip-debug
|
||||
|
||||
@@ -232,11 +232,11 @@
|
||||
hal/phydm/phydm_ccx.o
|
||||
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/platform
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8723ds/platform
|
||||
_PLATFORM_FILES := platform/platform_ops.o
|
||||
|
||||
ifeq ($(CONFIG_BT_COEXIST), y)
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/btc
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8723ds/hal/btc
|
||||
_OUTSRC_FILES += hal/btc/HalBtc8192e1Ant.o \
|
||||
hal/btc/HalBtc8192e2Ant.o \
|
||||
hal/btc/HalBtc8723b1Ant.o \
|
||||
--- a/drivers/net/wireless/rtl8723du/Makefile
|
||||
+++ b/drivers/net/wireless/rtl8723du/Makefile
|
||||
@@ -6,7 +6,7 @@
|
||||
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/include
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8723du/include
|
||||
|
||||
#EXTRA_LDFLAGS += --strip-debug
|
||||
|
||||
@@ -59,10 +59,10 @@
|
||||
hal/hal_usb_led.o
|
||||
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/platform
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8723du/platform
|
||||
_PLATFORM_FILES := platform/platform_ops.o
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/hal
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8723du/hal
|
||||
|
||||
include $(TopDIR)/hal/phydm/phydm.mk
|
||||
########### HAL_RTL8723D #################################
|
||||
--- a/drivers/net/wireless/rtl8723du/hal/phydm/phydm.mk
|
||||
+++ b/drivers/net/wireless/rtl8723du/hal/phydm/phydm.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8723du/hal/phydm
|
||||
|
||||
_PHYDM_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/phydm_antdiv.o\
|
||||
--- a/drivers/net/wireless/rtl8811cu/Makefile
|
||||
+++ b/drivers/net/wireless/rtl8811cu/Makefile
|
||||
@@ -28,7 +28,7 @@
|
||||
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/include
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8811cu/include
|
||||
|
||||
EXTRA_LDFLAGS += --strip-debug
|
||||
|
||||
@@ -282,10 +282,10 @@
|
||||
hal/led/hal_$(HCI_NAME)_led.o
|
||||
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/platform
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8811cu/platform
|
||||
_PLATFORM_FILES := platform/platform_ops.o
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/btc
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8811cu/hal/btc
|
||||
|
||||
########### HAL_RTL8188E #################################
|
||||
ifeq ($(CONFIG_RTL8188E), y)
|
||||
@@ -2459,7 +2459,7 @@
|
||||
rtk_core += core/rtw_sdio.o
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/core/crypto
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8811cu/core/crypto
|
||||
rtk_core += \
|
||||
core/crypto/aes-internal.o \
|
||||
core/crypto/aes-internal-enc.o \
|
||||
--- a/drivers/net/wireless/rtl8811cu/hal/phydm/phydm.mk
|
||||
+++ b/drivers/net/wireless/rtl8811cu/hal/phydm/phydm.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8811cu/hal/phydm
|
||||
|
||||
_PHYDM_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/phydm_antdiv.o\
|
||||
--- a/drivers/net/wireless/rtl8811cu/hal/phydm/sd4_phydm_2_kernel.mk
|
||||
+++ b/drivers/net/wireless/rtl8811cu/hal/phydm/sd4_phydm_2_kernel.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8811cu/hal/phydm
|
||||
|
||||
_PHYDM_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/phydm_interface.o\
|
||||
--- a/drivers/net/wireless/rtl88x2cs/Makefile
|
||||
+++ b/drivers/net/wireless/rtl88x2cs/Makefile
|
||||
@@ -20,7 +20,7 @@
|
||||
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/include
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl88x2cs/include
|
||||
|
||||
EXTRA_LDFLAGS += --strip-debug
|
||||
|
||||
@@ -268,10 +268,10 @@
|
||||
hal/led/hal_$(HCI_NAME)_led.o
|
||||
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/platform
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl88x2cs/platform
|
||||
_PLATFORM_FILES := platform/platform_ops.o
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/btc
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl88x2cs/hal/btc
|
||||
|
||||
########### HAL_RTL8188E #################################
|
||||
ifeq ($(CONFIG_RTL8188E), y)
|
||||
@@ -2370,7 +2370,7 @@
|
||||
rtk_core += core/rtw_sdio.o
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/core/crypto
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl88x2cs/core/crypto
|
||||
rtk_core += \
|
||||
core/crypto/aes-internal.o \
|
||||
core/crypto/aes-internal-enc.o \
|
||||
--- a/drivers/net/wireless/rtl88x2cs/hal/phydm/phydm.mk
|
||||
+++ b/drivers/net/wireless/rtl88x2cs/hal/phydm/phydm.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl88x2cs/hal/phydm
|
||||
|
||||
_PHYDM_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/phydm_antdiv.o\
|
||||
--- a/drivers/net/wireless/rtl88x2cs/hal/phydm/sd4_phydm_2_kernel.mk
|
||||
+++ b/drivers/net/wireless/rtl88x2cs/hal/phydm/sd4_phydm_2_kernel.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl88x2cs/hal/phydm
|
||||
|
||||
_PHYDM_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/phydm_interface.o\
|
||||
@@ -0,0 +1,40 @@
|
||||
--- a/drivers/net/wireless/rtl8192eu/Makefile
|
||||
+++ b/drivers/net/wireless/rtl8192eu/Makefile
|
||||
@@ -11,7 +11,7 @@
|
||||
ifeq ($(GCC_VER_49),1)
|
||||
endif
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/include
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8192eu/include
|
||||
|
||||
EXTRA_LDFLAGS += --strip-debug
|
||||
|
||||
@@ -251,10 +251,10 @@
|
||||
hal/led/hal_$(HCI_NAME)_led.o
|
||||
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/platform
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8192eu/platform
|
||||
_PLATFORM_FILES := platform/platform_ops.o
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/btc
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8192eu/hal/btc
|
||||
|
||||
########### HAL_RTL8188E #################################
|
||||
ifeq ($(CONFIG_RTL8188E), y)
|
||||
--- a/drivers/net/wireless/rtl8192eu/hal/phydm/phydm.mk
|
||||
+++ b/drivers/net/wireless/rtl8192eu/hal/phydm/phydm.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8192eu/hal/phydm
|
||||
|
||||
_PHYDM_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/phydm_antdiv.o\
|
||||
--- a/drivers/net/wireless/rtl8192eu/hal/phydm/sd4_phydm_2_kernel.mk
|
||||
+++ b/drivers/net/wireless/rtl8192eu/hal/phydm/sd4_phydm_2_kernel.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8192eu/hal/phydm
|
||||
|
||||
_PHYDM_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/phydm_interface.o\
|
||||
@@ -0,0 +1,24 @@
|
||||
--- a/drivers/net/wireless/rtl8812au/Makefile
|
||||
+++ b/drivers/net/wireless/rtl8812au/Makefile
|
||||
@@ -20,7 +20,7 @@
|
||||
#EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
|
||||
#endif
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/include
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8812au/include
|
||||
EXTRA_LDFLAGS += --strip-all -O3
|
||||
|
||||
########################## WIFI IC ############################
|
||||
@@ -230,10 +230,10 @@
|
||||
hal/led/hal_$(HCI_NAME)_led.o
|
||||
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/platform
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8812au/platform
|
||||
_PLATFORM_FILES := platform/platform_ops.o
|
||||
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/btc
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8812au/hal/btc
|
||||
|
||||
########### HAL_RTL8188E #################################
|
||||
ifeq ($(CONFIG_RTL8188E), y)
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/drivers/net/wireless/rtl8812au/hal/phydm/phydm.mk
|
||||
+++ b/drivers/net/wireless/rtl8812au/hal/phydm/phydm.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8812au/hal/phydm
|
||||
|
||||
_PHYDM_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/phydm_antdiv.o\
|
||||
--- a/drivers/net/wireless/rtl8812au/hal/phydm/sd4_phydm_2_kernel.mk
|
||||
+++ b/drivers/net/wireless/rtl8812au/hal/phydm/sd4_phydm_2_kernel.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
+EXTRA_CFLAGS += -I$(srctree)/drivers/net/wireless/rtl8812au/hal/phydm
|
||||
|
||||
_PHYDM_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/phydm_interface.o\
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/drivers/net/wireless/rtl88x2cs/Makefile
|
||||
+++ b/drivers/net/wireless/rtl88x2cs/Makefile
|
||||
@@ -2316,7 +2316,7 @@
|
||||
|
||||
########### HAL_RTL8822C #################################
|
||||
ifeq ($(CONFIG_RTL8822C), y)
|
||||
-include $(TopDIR)/drivers/net/wireless/rtl88x2cs/rtl8822c.mk
|
||||
+include $(srctree)/drivers/net/wireless/rtl88x2cs/rtl8822c.mk
|
||||
EXTRA_CFLAGS += -DCONFIG_RTW_IOCTL_SET_COUNTRY
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
From: Matrix Screen Controller maintainers
|
||||
Subject: [PATCH] arm64: dts: walnutpi: describe AXP313A on eMMC variant
|
||||
|
||||
The vendor eMMC board DTS duplicates the PMIC description instead of
|
||||
including the non-eMMC board DTS. Apply the same AXP313A regulator mapping
|
||||
to both variants so either boot-device layout gets the cpufreq and rail
|
||||
safety fix.
|
||||
|
||||
---
|
||||
.../sun50i-h616-walnutpi-1b-emmc.dts | 34 ++++++++-----------
|
||||
1 file changed, 15 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b-emmc.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b-emmc.dts
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b-emmc.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-walnutpi-1b-emmc.dts
|
||||
@@ -306,32 +306,32 @@
|
||||
&r_i2c {
|
||||
status = "okay";
|
||||
|
||||
- axp305: pmic@36 {
|
||||
- compatible = "x-powers,axp305", "x-powers,axp805",
|
||||
- "x-powers,axp806";
|
||||
+ axp313a: pmic@36 {
|
||||
+ compatible = "x-powers,axp313a";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
reg = <0x36>;
|
||||
|
||||
- x-powers,self-working-mode;
|
||||
- vina-supply = <®_vcc5v>;
|
||||
- vinb-supply = <®_vcc5v>;
|
||||
- vinc-supply = <®_vcc5v>;
|
||||
- vind-supply = <®_vcc5v>;
|
||||
- vine-supply = <®_vcc5v>;
|
||||
- aldoin-supply = <®_vcc5v>;
|
||||
- bldoin-supply = <®_vcc5v>;
|
||||
- cldoin-supply = <®_vcc5v>;
|
||||
+ vin1-supply = <®_vcc5v>;
|
||||
+ vin2-supply = <®_vcc5v>;
|
||||
+ vin3-supply = <®_vcc5v>;
|
||||
|
||||
regulators {
|
||||
|
||||
- reg_bldo1: bldo1 {
|
||||
+ reg_bldo1: aldo1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc1v8";
|
||||
};
|
||||
|
||||
+ reg_dldo1: dldo1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc3v3";
|
||||
+ };
|
||||
+
|
||||
reg_dcdc2: dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <810000>;
|
||||
@@ -348,15 +348,11 @@
|
||||
|
||||
reg_dcdc3: dcdc3 {
|
||||
regulator-always-on;
|
||||
- regulator-min-microvolt = <1300000>;
|
||||
- regulator-max-microvolt = <1300000>;
|
||||
+ regulator-min-microvolt = <1100000>;
|
||||
+ regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-dram";
|
||||
};
|
||||
|
||||
-
|
||||
- sw {
|
||||
- /* unused */
|
||||
- };
|
||||
};
|
||||
};
|
||||
};
|
||||
--
|
||||
2.39.2
|
||||
@@ -0,0 +1,30 @@
|
||||
From: Matrix Screen Controller maintainers
|
||||
Subject: [PATCH] regulator: axp20x: accept absent DCDC frequency on AXP313A
|
||||
|
||||
The vendor 6.1.31 tree contains an early AXP313A implementation which
|
||||
requires dcdcfreq to equal 3000000. The parser passes zero when the
|
||||
x-powers,dcdc-freq property is absent, so that implementation rejects the
|
||||
valid binding and logs -EINVAL during every boot.
|
||||
|
||||
AXP313A has a fixed 3 MHz switching frequency and the upstream binding
|
||||
disallows the property. Match the final upstream behaviour: accept the
|
||||
zero value representing an absent property and reject any configured value.
|
||||
|
||||
---
|
||||
drivers/regulator/axp20x-regulator.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
|
||||
--- a/drivers/regulator/axp20x-regulator.c
|
||||
+++ b/drivers/regulator/axp20x-regulator.c
|
||||
@@ -1090,7 +1090,7 @@ static int axp20x_set_dcdc_freq(struct platform_device *pdev, u32 dcdcfreq)
|
||||
case AXP313A_ID:
|
||||
/* The DCDC PWM frequency seems to be fixed to 3 MHz. */
|
||||
- if (dcdcfreq != 3000000) {
|
||||
+ if (dcdcfreq != 0) {
|
||||
dev_err(&pdev->dev,
|
||||
"DCDC frequency on AXP313a is fixed to 3 MHz.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
--
|
||||
2.39.2
|
||||
@@ -0,0 +1,73 @@
|
||||
From 4628b804555773daa982d9578d89fe04fcdde374 Mon Sep 17 00:00:00 2001
|
||||
From: Andre Przywara <andre.przywara@arm.com>
|
||||
Date: Sun, 10 Mar 2024 01:02:08 +0000
|
||||
Subject: [PATCH] regulator: axp20x: fix typo-ed identifier
|
||||
|
||||
The registers to set the X-Powers AXP313 regulators are of course
|
||||
"CONTROL" registers, not "CONRTOL" ones.
|
||||
|
||||
Fix the typo in the header file and in its users. No functional change.
|
||||
|
||||
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
|
||||
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
|
||||
Tested-by: Ryan Walklin <ryan@testtoast.com>
|
||||
Link: https://lore.kernel.org/r/20240310010211.28653-2-andre.przywara@arm.com
|
||||
Signed-off-by: Lee Jones <lee@kernel.org>
|
||||
---
|
||||
drivers/regulator/axp20x-regulator.c | 10 +++++-----
|
||||
include/linux/mfd/axp20x.h | 10 +++++-----
|
||||
2 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
|
||||
index c657820b0bbb56..7bcc2d508b65a3 100644
|
||||
--- a/drivers/regulator/axp20x-regulator.c
|
||||
+++ b/drivers/regulator/axp20x-regulator.c
|
||||
@@ -733,21 +733,21 @@ static const struct linear_range axp313a_dcdc3_ranges[] = {
|
||||
static const struct regulator_desc axp313a_regulators[] = {
|
||||
AXP_DESC_RANGES(AXP313A, DCDC1, "dcdc1", "vin1",
|
||||
axp313a_dcdc1_ranges, AXP313A_DCDC1_NUM_VOLTAGES,
|
||||
- AXP313A_DCDC1_CONRTOL, AXP313A_DCDC_V_OUT_MASK,
|
||||
+ AXP313A_DCDC1_CONTROL, AXP313A_DCDC_V_OUT_MASK,
|
||||
AXP313A_OUTPUT_CONTROL, BIT(0)),
|
||||
AXP_DESC_RANGES(AXP313A, DCDC2, "dcdc2", "vin2",
|
||||
axp313a_dcdc2_ranges, AXP313A_DCDC23_NUM_VOLTAGES,
|
||||
- AXP313A_DCDC2_CONRTOL, AXP313A_DCDC_V_OUT_MASK,
|
||||
+ AXP313A_DCDC2_CONTROL, AXP313A_DCDC_V_OUT_MASK,
|
||||
AXP313A_OUTPUT_CONTROL, BIT(1)),
|
||||
AXP_DESC_RANGES(AXP313A, DCDC3, "dcdc3", "vin3",
|
||||
axp313a_dcdc3_ranges, AXP313A_DCDC23_NUM_VOLTAGES,
|
||||
- AXP313A_DCDC3_CONRTOL, AXP313A_DCDC_V_OUT_MASK,
|
||||
+ AXP313A_DCDC3_CONTROL, AXP313A_DCDC_V_OUT_MASK,
|
||||
AXP313A_OUTPUT_CONTROL, BIT(2)),
|
||||
AXP_DESC(AXP313A, ALDO1, "aldo1", "vin1", 500, 3500, 100,
|
||||
- AXP313A_ALDO1_CONRTOL, AXP313A_LDO_V_OUT_MASK,
|
||||
+ AXP313A_ALDO1_CONTROL, AXP313A_LDO_V_OUT_MASK,
|
||||
AXP313A_OUTPUT_CONTROL, BIT(3)),
|
||||
AXP_DESC(AXP313A, DLDO1, "dldo1", "vin1", 500, 3500, 100,
|
||||
- AXP313A_DLDO1_CONRTOL, AXP313A_LDO_V_OUT_MASK,
|
||||
+ AXP313A_DLDO1_CONTROL, AXP313A_LDO_V_OUT_MASK,
|
||||
AXP313A_OUTPUT_CONTROL, BIT(4)),
|
||||
AXP_DESC_FIXED(AXP313A, RTC_LDO, "rtc-ldo", "vin1", 1800),
|
||||
};
|
||||
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h
|
||||
index f1755163dd9f14..9b2b7ac2107f44 100644
|
||||
--- a/include/linux/mfd/axp20x.h
|
||||
+++ b/include/linux/mfd/axp20x.h
|
||||
@@ -104,11 +104,11 @@ enum axp20x_variants {
|
||||
|
||||
#define AXP313A_ON_INDICATE 0x00
|
||||
#define AXP313A_OUTPUT_CONTROL 0x10
|
||||
-#define AXP313A_DCDC1_CONRTOL 0x13
|
||||
-#define AXP313A_DCDC2_CONRTOL 0x14
|
||||
-#define AXP313A_DCDC3_CONRTOL 0x15
|
||||
-#define AXP313A_ALDO1_CONRTOL 0x16
|
||||
-#define AXP313A_DLDO1_CONRTOL 0x17
|
||||
+#define AXP313A_DCDC1_CONTROL 0x13
|
||||
+#define AXP313A_DCDC2_CONTROL 0x14
|
||||
+#define AXP313A_DCDC3_CONTROL 0x15
|
||||
+#define AXP313A_ALDO1_CONTROL 0x16
|
||||
+#define AXP313A_DLDO1_CONTROL 0x17
|
||||
#define AXP313A_SHUTDOWN_CTRL 0x1a
|
||||
#define AXP313A_IRQ_EN 0x20
|
||||
#define AXP313A_IRQ_STATE 0x21
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
From 60fd7eb89670d2636ac3156881acbd103c6eba6a Mon Sep 17 00:00:00 2001
|
||||
From: Martin Botka <martin.botka@somainline.org>
|
||||
Date: Wed, 24 May 2023 01:00:11 +0100
|
||||
Subject: [PATCH] regulator: axp20x: Add support for AXP313a variant
|
||||
|
||||
The AXP313a is your typical I2C controlled PMIC, although in a lighter
|
||||
fashion compared to the other X-Powers PMICs: it has only three DCDC
|
||||
rails, three LDOs, and no battery charging support.
|
||||
|
||||
The AXP313a datasheet does not describe a register to change the DCDC
|
||||
switching frequency, and talks of it being fixed at 3 MHz. Check that
|
||||
the property allowing to change that frequency is absent from the DT,
|
||||
and bail out otherwise.
|
||||
|
||||
The third LDO, RTCLDO, is fixed, and cannot even be turned on or off,
|
||||
programmatically. On top of that, its voltage is customisable (either
|
||||
1.8V or 3.3V), which we cannot describe easily using the existing
|
||||
regulator wrapper functions. This should be fixed properly, using
|
||||
regulator-{min,max}-microvolt in the DT, but this requires more changes
|
||||
to the code. As some other PMICs (AXP2xx, AXP803) seem to paper over the
|
||||
same problem as well, we follow suit here and pretend it's a fixed 1.8V
|
||||
regulator. A proper fix can follow later. The BSP code seems to ignore
|
||||
this regulator altogether.
|
||||
|
||||
Describe the AXP313A's voltage settings and switch registers, how the
|
||||
voltages are encoded, and connect this to the MFD device via its
|
||||
regulator ID.
|
||||
|
||||
Signed-off-by: Martin Botka <martin.botka@somainline.org>
|
||||
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
|
||||
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
|
||||
Reviewed-by: Mark Brown <broonie@kernel.org>
|
||||
Tested-by: Shengyu Qu <wiagn233@outlook.com>
|
||||
Link: https://lore.kernel.org/r/20230524000012.15028-3-andre.przywara@arm.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
---
|
||||
drivers/regulator/axp20x-regulator.c | 60 ++++++++++++++++++++++++++++
|
||||
1 file changed, 60 insertions(+)
|
||||
|
||||
diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
|
||||
index 943172b1972262..db77c72d39a0fb 100644
|
||||
--- a/drivers/regulator/axp20x-regulator.c
|
||||
+++ b/drivers/regulator/axp20x-regulator.c
|
||||
@@ -134,6 +134,11 @@
|
||||
#define AXP22X_PWR_OUT_DLDO4_MASK BIT_MASK(6)
|
||||
#define AXP22X_PWR_OUT_ALDO3_MASK BIT_MASK(7)
|
||||
|
||||
+#define AXP313A_DCDC1_NUM_VOLTAGES 107
|
||||
+#define AXP313A_DCDC23_NUM_VOLTAGES 88
|
||||
+#define AXP313A_DCDC_V_OUT_MASK GENMASK(6, 0)
|
||||
+#define AXP313A_LDO_V_OUT_MASK GENMASK(4, 0)
|
||||
+
|
||||
#define AXP803_PWR_OUT_DCDC1_MASK BIT_MASK(0)
|
||||
#define AXP803_PWR_OUT_DCDC2_MASK BIT_MASK(1)
|
||||
#define AXP803_PWR_OUT_DCDC3_MASK BIT_MASK(2)
|
||||
@@ -638,6 +643,48 @@ static const struct regulator_desc axp22x_drivevbus_regulator = {
|
||||
.ops = &axp20x_ops_sw,
|
||||
};
|
||||
|
||||
+static const struct linear_range axp313a_dcdc1_ranges[] = {
|
||||
+ REGULATOR_LINEAR_RANGE(500000, 0, 70, 10000),
|
||||
+ REGULATOR_LINEAR_RANGE(1220000, 71, 87, 20000),
|
||||
+ REGULATOR_LINEAR_RANGE(1600000, 88, 106, 100000),
|
||||
+};
|
||||
+
|
||||
+static const struct linear_range axp313a_dcdc2_ranges[] = {
|
||||
+ REGULATOR_LINEAR_RANGE(500000, 0, 70, 10000),
|
||||
+ REGULATOR_LINEAR_RANGE(1220000, 71, 87, 20000),
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * This is deviating from the datasheet. The values here are taken from the
|
||||
+ * BSP driver and have been confirmed by measurements.
|
||||
+ */
|
||||
+static const struct linear_range axp313a_dcdc3_ranges[] = {
|
||||
+ REGULATOR_LINEAR_RANGE(500000, 0, 70, 10000),
|
||||
+ REGULATOR_LINEAR_RANGE(1220000, 71, 102, 20000),
|
||||
+};
|
||||
+
|
||||
+static const struct regulator_desc axp313a_regulators[] = {
|
||||
+ AXP_DESC_RANGES(AXP313A, DCDC1, "dcdc1", "vin1",
|
||||
+ axp313a_dcdc1_ranges, AXP313A_DCDC1_NUM_VOLTAGES,
|
||||
+ AXP313A_DCDC1_CONRTOL, AXP313A_DCDC_V_OUT_MASK,
|
||||
+ AXP313A_OUTPUT_CONTROL, BIT(0)),
|
||||
+ AXP_DESC_RANGES(AXP313A, DCDC2, "dcdc2", "vin2",
|
||||
+ axp313a_dcdc2_ranges, AXP313A_DCDC23_NUM_VOLTAGES,
|
||||
+ AXP313A_DCDC2_CONRTOL, AXP313A_DCDC_V_OUT_MASK,
|
||||
+ AXP313A_OUTPUT_CONTROL, BIT(1)),
|
||||
+ AXP_DESC_RANGES(AXP313A, DCDC3, "dcdc3", "vin3",
|
||||
+ axp313a_dcdc3_ranges, AXP313A_DCDC23_NUM_VOLTAGES,
|
||||
+ AXP313A_DCDC3_CONRTOL, AXP313A_DCDC_V_OUT_MASK,
|
||||
+ AXP313A_OUTPUT_CONTROL, BIT(2)),
|
||||
+ AXP_DESC(AXP313A, ALDO1, "aldo1", "vin1", 500, 3500, 100,
|
||||
+ AXP313A_ALDO1_CONRTOL, AXP313A_LDO_V_OUT_MASK,
|
||||
+ AXP313A_OUTPUT_CONTROL, BIT(3)),
|
||||
+ AXP_DESC(AXP313A, DLDO1, "dldo1", "vin1", 500, 3500, 100,
|
||||
+ AXP313A_DLDO1_CONRTOL, AXP313A_LDO_V_OUT_MASK,
|
||||
+ AXP313A_OUTPUT_CONTROL, BIT(4)),
|
||||
+ AXP_DESC_FIXED(AXP313A, RTC_LDO, "rtc-ldo", "vin1", 1800),
|
||||
+};
|
||||
+
|
||||
/* DCDC ranges shared with AXP813 */
|
||||
static const struct linear_range axp803_dcdc234_ranges[] = {
|
||||
REGULATOR_LINEAR_RANGE(500000,
|
||||
@@ -1040,6 +1087,15 @@ static int axp20x_set_dcdc_freq(struct platform_device *pdev, u32 dcdcfreq)
|
||||
def = 3000;
|
||||
step = 150;
|
||||
break;
|
||||
+ case AXP313A_ID:
|
||||
+ /* The DCDC PWM frequency seems to be fixed to 3 MHz. */
|
||||
+ if (dcdcfreq != 0) {
|
||||
+ dev_err(&pdev->dev,
|
||||
+ "DCDC frequency on AXP313a is fixed to 3 MHz.\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
default:
|
||||
dev_err(&pdev->dev,
|
||||
"Setting DCDC frequency for unsupported AXP variant\n");
|
||||
@@ -1232,6 +1288,10 @@ static int axp20x_regulator_probe(struct platform_device *pdev)
|
||||
drivevbus = of_property_read_bool(pdev->dev.parent->of_node,
|
||||
"x-powers,drive-vbus-en");
|
||||
break;
|
||||
+ case AXP313A_ID:
|
||||
+ regulators = axp313a_regulators;
|
||||
+ nregulators = AXP313A_REG_ID_MAX;
|
||||
+ break;
|
||||
case AXP803_ID:
|
||||
regulators = axp803_regulators;
|
||||
nregulators = AXP803_REG_ID_MAX;
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
From 75c8cb2f4cb218aaf4ea68cab08d6dbc96eeae15 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Botka <martin.botka@somainline.org>
|
||||
Date: Wed, 24 May 2023 01:00:10 +0100
|
||||
Subject: [PATCH] mfd: axp20x: Add support for AXP313a PMIC
|
||||
|
||||
The AXP313a is a PMIC chip produced by X-Powers, it can be connected via
|
||||
an I2C bus.
|
||||
The name AXP1530 seems to appear as well, and this is what is used in
|
||||
the BSP driver. From all we know it's the same chip, just a different
|
||||
name. However we have only seen AXP313a chips in the wild, so go with
|
||||
this name.
|
||||
|
||||
Compared to the other AXP PMICs it's a rather simple affair: just three
|
||||
DCDC converters, three LDOs, and no battery charging support.
|
||||
|
||||
Describe the regmap and the MFD bits, along with the registers exposed
|
||||
via I2C. Aside from the various regulators, also describe the power key
|
||||
interrupts, and adjust the shutdown handler routine to use a different
|
||||
register than the other PMICs.
|
||||
Eventually advertise the device using the new compatible string.
|
||||
|
||||
Signed-off-by: Martin Botka <martin.botka@somainline.org>
|
||||
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
|
||||
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
|
||||
Link: https://lore.kernel.org/r/20230524000012.15028-2-andre.przywara@arm.com
|
||||
Signed-off-by: Lee Jones <lee@kernel.org>
|
||||
---
|
||||
drivers/mfd/axp20x-i2c.c | 2 +
|
||||
drivers/mfd/axp20x.c | 78 +++++++++++++++++++++++++++++++++++++-
|
||||
include/linux/mfd/axp20x.h | 32 ++++++++++++++++
|
||||
3 files changed, 111 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mfd/axp20x-i2c.c b/drivers/mfd/axp20x-i2c.c
|
||||
index b4f5cb457117ee..a49e5e217554ae 100644
|
||||
--- a/drivers/mfd/axp20x-i2c.c
|
||||
+++ b/drivers/mfd/axp20x-i2c.c
|
||||
@@ -63,6 +63,7 @@ static const struct of_device_id axp20x_i2c_of_match[] = {
|
||||
{ .compatible = "x-powers,axp209", .data = (void *)AXP209_ID },
|
||||
{ .compatible = "x-powers,axp221", .data = (void *)AXP221_ID },
|
||||
{ .compatible = "x-powers,axp223", .data = (void *)AXP223_ID },
|
||||
+ { .compatible = "x-powers,axp313a", .data = (void *)AXP313A_ID },
|
||||
{ .compatible = "x-powers,axp803", .data = (void *)AXP803_ID },
|
||||
{ .compatible = "x-powers,axp806", .data = (void *)AXP806_ID },
|
||||
{ .compatible = "x-powers,axp15060", .data = (void *)AXP15060_ID },
|
||||
@@ -77,6 +78,7 @@ static const struct i2c_device_id axp20x_i2c_id[] = {
|
||||
{ "axp209", 0 },
|
||||
{ "axp221", 0 },
|
||||
{ "axp223", 0 },
|
||||
+ { "axp313a", 0 },
|
||||
{ "axp803", 0 },
|
||||
{ "axp806", 0 },
|
||||
{ "axp15060", 0 },
|
||||
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
|
||||
index 72b87aae60cc02..07a846ecbf18eb 100644
|
||||
--- a/drivers/mfd/axp20x.c
|
||||
+++ b/drivers/mfd/axp20x.c
|
||||
@@ -39,6 +39,7 @@ static const char * const axp20x_model_names[] = {
|
||||
"AXP221",
|
||||
"AXP223",
|
||||
"AXP288",
|
||||
+ "AXP313a",
|
||||
"AXP803",
|
||||
"AXP806",
|
||||
"AXP809",
|
||||
@@ -156,6 +157,25 @@ static const struct regmap_range axp806_writeable_ranges[] = {
|
||||
regmap_reg_range(AXP806_REG_ADDR_EXT, AXP806_REG_ADDR_EXT),
|
||||
};
|
||||
|
||||
+static const struct regmap_range axp313a_writeable_ranges[] = {
|
||||
+ regmap_reg_range(AXP313A_ON_INDICATE, AXP313A_IRQ_STATE),
|
||||
+};
|
||||
+
|
||||
+static const struct regmap_range axp313a_volatile_ranges[] = {
|
||||
+ regmap_reg_range(AXP313A_SHUTDOWN_CTRL, AXP313A_SHUTDOWN_CTRL),
|
||||
+ regmap_reg_range(AXP313A_IRQ_STATE, AXP313A_IRQ_STATE),
|
||||
+};
|
||||
+
|
||||
+static const struct regmap_access_table axp313a_writeable_table = {
|
||||
+ .yes_ranges = axp313a_writeable_ranges,
|
||||
+ .n_yes_ranges = ARRAY_SIZE(axp313a_writeable_ranges),
|
||||
+};
|
||||
+
|
||||
+static const struct regmap_access_table axp313a_volatile_table = {
|
||||
+ .yes_ranges = axp313a_volatile_ranges,
|
||||
+ .n_yes_ranges = ARRAY_SIZE(axp313a_volatile_ranges),
|
||||
+};
|
||||
+
|
||||
static const struct regmap_range axp806_volatile_ranges[] = {
|
||||
regmap_reg_range(AXP20X_IRQ1_STATE, AXP20X_IRQ2_STATE),
|
||||
};
|
||||
@@ -248,6 +268,11 @@ static const struct resource axp288_fuel_gauge_resources[] = {
|
||||
DEFINE_RES_IRQ(AXP288_IRQ_WL1),
|
||||
};
|
||||
|
||||
+static const struct resource axp313a_pek_resources[] = {
|
||||
+ DEFINE_RES_IRQ_NAMED(AXP313A_IRQ_PEK_RIS_EDGE, "PEK_DBR"),
|
||||
+ DEFINE_RES_IRQ_NAMED(AXP313A_IRQ_PEK_FAL_EDGE, "PEK_DBF"),
|
||||
+};
|
||||
+
|
||||
static const struct resource axp803_pek_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(AXP803_IRQ_PEK_RIS_EDGE, "PEK_DBR"),
|
||||
DEFINE_RES_IRQ_NAMED(AXP803_IRQ_PEK_FAL_EDGE, "PEK_DBF"),
|
||||
@@ -304,6 +329,15 @@ static const struct regmap_config axp288_regmap_config = {
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
};
|
||||
|
||||
+static const struct regmap_config axp313a_regmap_config = {
|
||||
+ .reg_bits = 8,
|
||||
+ .val_bits = 8,
|
||||
+ .wr_table = &axp313a_writeable_table,
|
||||
+ .volatile_table = &axp313a_volatile_table,
|
||||
+ .max_register = AXP313A_IRQ_STATE,
|
||||
+ .cache_type = REGCACHE_RBTREE,
|
||||
+};
|
||||
+
|
||||
static const struct regmap_config axp806_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
@@ -456,6 +490,16 @@ static const struct regmap_irq axp288_regmap_irqs[] = {
|
||||
INIT_REGMAP_IRQ(AXP288, BC_USB_CHNG, 5, 1),
|
||||
};
|
||||
|
||||
+static const struct regmap_irq axp313a_regmap_irqs[] = {
|
||||
+ INIT_REGMAP_IRQ(AXP313A, PEK_RIS_EDGE, 0, 7),
|
||||
+ INIT_REGMAP_IRQ(AXP313A, PEK_FAL_EDGE, 0, 6),
|
||||
+ INIT_REGMAP_IRQ(AXP313A, PEK_SHORT, 0, 5),
|
||||
+ INIT_REGMAP_IRQ(AXP313A, PEK_LONG, 0, 4),
|
||||
+ INIT_REGMAP_IRQ(AXP313A, DCDC3_V_LOW, 0, 3),
|
||||
+ INIT_REGMAP_IRQ(AXP313A, DCDC2_V_LOW, 0, 2),
|
||||
+ INIT_REGMAP_IRQ(AXP313A, DIE_TEMP_HIGH, 0, 0),
|
||||
+};
|
||||
+
|
||||
static const struct regmap_irq axp803_regmap_irqs[] = {
|
||||
INIT_REGMAP_IRQ(AXP803, ACIN_OVER_V, 0, 7),
|
||||
INIT_REGMAP_IRQ(AXP803, ACIN_PLUGIN, 0, 6),
|
||||
@@ -606,6 +650,17 @@ static const struct regmap_irq_chip axp288_regmap_irq_chip = {
|
||||
|
||||
};
|
||||
|
||||
+static const struct regmap_irq_chip axp313a_regmap_irq_chip = {
|
||||
+ .name = "axp313a_irq_chip",
|
||||
+ .status_base = AXP313A_IRQ_STATE,
|
||||
+ .ack_base = AXP313A_IRQ_STATE,
|
||||
+ .unmask_base = AXP313A_IRQ_EN,
|
||||
+ .init_ack_masked = true,
|
||||
+ .irqs = axp313a_regmap_irqs,
|
||||
+ .num_irqs = ARRAY_SIZE(axp313a_regmap_irqs),
|
||||
+ .num_regs = 1,
|
||||
+};
|
||||
+
|
||||
static const struct regmap_irq_chip axp803_regmap_irq_chip = {
|
||||
.name = "axp803",
|
||||
.status_base = AXP20X_IRQ1_STATE,
|
||||
@@ -745,6 +800,11 @@ static const struct mfd_cell axp152_cells[] = {
|
||||
},
|
||||
};
|
||||
|
||||
+static struct mfd_cell axp313a_cells[] = {
|
||||
+ MFD_CELL_NAME("axp20x-regulator"),
|
||||
+ MFD_CELL_RES("axp313a-pek", axp313a_pek_resources),
|
||||
+};
|
||||
+
|
||||
static const struct resource axp288_adc_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(AXP288_IRQ_GPADC, "GPADC"),
|
||||
};
|
||||
@@ -914,8 +974,18 @@ static const struct mfd_cell axp_regulator_only_cells[] = {
|
||||
static int axp20x_power_off(struct sys_off_data *data)
|
||||
{
|
||||
struct axp20x_dev *axp20x = data->cb_data;
|
||||
+ unsigned int shutdown_reg;
|
||||
|
||||
- regmap_write(axp20x->regmap, AXP20X_OFF_CTRL, AXP20X_OFF);
|
||||
+ switch (axp20x->variant) {
|
||||
+ case AXP313A_ID:
|
||||
+ shutdown_reg = AXP313A_SHUTDOWN_CTRL;
|
||||
+ break;
|
||||
+ default:
|
||||
+ shutdown_reg = AXP20X_OFF_CTRL;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ regmap_write(axp20x->regmap, shutdown_reg, AXP20X_OFF);
|
||||
|
||||
/* Give capacitors etc. time to drain to avoid kernel panic msg. */
|
||||
mdelay(500);
|
||||
@@ -978,6 +1048,12 @@ int axp20x_match_device(struct axp20x_dev *axp20x)
|
||||
axp20x->regmap_irq_chip = &axp288_regmap_irq_chip;
|
||||
axp20x->irq_flags = IRQF_TRIGGER_LOW;
|
||||
break;
|
||||
+ case AXP313A_ID:
|
||||
+ axp20x->nr_cells = ARRAY_SIZE(axp313a_cells);
|
||||
+ axp20x->cells = axp313a_cells;
|
||||
+ axp20x->regmap_cfg = &axp313a_regmap_config;
|
||||
+ axp20x->regmap_irq_chip = &axp313a_regmap_irq_chip;
|
||||
+ break;
|
||||
case AXP803_ID:
|
||||
axp20x->nr_cells = ARRAY_SIZE(axp803_cells);
|
||||
axp20x->cells = axp803_cells;
|
||||
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h
|
||||
index beb3f44f85c50c..fff7fa6b7c5dc6 100644
|
||||
--- a/include/linux/mfd/axp20x.h
|
||||
+++ b/include/linux/mfd/axp20x.h
|
||||
@@ -17,6 +17,7 @@ enum axp20x_variants {
|
||||
AXP221_ID,
|
||||
AXP223_ID,
|
||||
AXP288_ID,
|
||||
+ AXP313A_ID,
|
||||
AXP803_ID,
|
||||
AXP806_ID,
|
||||
AXP809_ID,
|
||||
@@ -92,6 +93,17 @@ enum axp20x_variants {
|
||||
#define AXP22X_ALDO3_V_OUT 0x2a
|
||||
#define AXP22X_CHRG_CTRL3 0x35
|
||||
|
||||
+#define AXP313A_ON_INDICATE 0x00
|
||||
+#define AXP313A_OUTPUT_CONTROL 0x10
|
||||
+#define AXP313A_DCDC1_CONRTOL 0x13
|
||||
+#define AXP313A_DCDC2_CONRTOL 0x14
|
||||
+#define AXP313A_DCDC3_CONRTOL 0x15
|
||||
+#define AXP313A_ALDO1_CONRTOL 0x16
|
||||
+#define AXP313A_DLDO1_CONRTOL 0x17
|
||||
+#define AXP313A_SHUTDOWN_CTRL 0x1a
|
||||
+#define AXP313A_IRQ_EN 0x20
|
||||
+#define AXP313A_IRQ_STATE 0x21
|
||||
+
|
||||
#define AXP806_STARTUP_SRC 0x00
|
||||
#define AXP806_CHIP_ID 0x03
|
||||
#define AXP806_PWR_OUT_CTRL1 0x10
|
||||
@@ -363,6 +375,16 @@ enum {
|
||||
AXP22X_REG_ID_MAX,
|
||||
};
|
||||
|
||||
+enum {
|
||||
+ AXP313A_DCDC1 = 0,
|
||||
+ AXP313A_DCDC2,
|
||||
+ AXP313A_DCDC3,
|
||||
+ AXP313A_ALDO1,
|
||||
+ AXP313A_DLDO1,
|
||||
+ AXP313A_RTC_LDO,
|
||||
+ AXP313A_REG_ID_MAX,
|
||||
+};
|
||||
+
|
||||
enum {
|
||||
AXP806_DCDCA = 0,
|
||||
AXP806_DCDCB,
|
||||
@@ -616,6 +638,16 @@ enum axp288_irqs {
|
||||
AXP288_IRQ_BC_USB_CHNG,
|
||||
};
|
||||
|
||||
+enum axp313a_irqs {
|
||||
+ AXP313A_IRQ_DIE_TEMP_HIGH,
|
||||
+ AXP313A_IRQ_DCDC2_V_LOW = 2,
|
||||
+ AXP313A_IRQ_DCDC3_V_LOW,
|
||||
+ AXP313A_IRQ_PEK_LONG,
|
||||
+ AXP313A_IRQ_PEK_SHORT,
|
||||
+ AXP313A_IRQ_PEK_FAL_EDGE,
|
||||
+ AXP313A_IRQ_PEK_RIS_EDGE,
|
||||
+};
|
||||
+
|
||||
enum axp803_irqs {
|
||||
AXP803_IRQ_ACIN_OVER_V = 1,
|
||||
AXP803_IRQ_ACIN_PLUGIN,
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
4732299a8d031b7c47467be396cd2fc39fd550aaf375f5c7c682e48d1f6ee374 0003-walnutpi-6.1-axp313a-strict-backport.patch
|
||||
25d38b4a5bd4c2b4fa756f0e99b16634dffac78422461377ef09fdc53a44425e 0004-walnutpi-axp313a-dts.patch
|
||||
b8d1626136366cecfc8f0c8c0670e2a56ec054f1f60c6a747f2ca166c07a76a1 0005-walnutpi-axp313a-preserve-dldo1.patch
|
||||
8c90cf4c86e6d842d7d6920129cff222b0dcd119a76666b8a43ed8674d74bd95 0006-walnutpi-uwe5622-out-of-tree-build.patch
|
||||
9eafe8cc28d58f43c452e8b09abc47fb2fbc7df44fe946528a7bb991b057d60f 0007-walnutpi-enabled-realtek-out-of-tree-build.patch
|
||||
ba883758b870f56103e0edfdd1e14cf7bfda294ecb6bf7f9e35f0f0540764e49 0008-walnutpi-rtl8192eu-out-of-tree-build.patch
|
||||
c32ec66a62bee42785120f767f24aec91f45bd62d8dabceae3b4b662cc9ddb68 0009-walnutpi-rtl8812au-out-of-tree-build.patch
|
||||
4f31e4665a01cb12a750485e6650105e4afe0bf89dcf7a1035f655ff48339bff 0010-walnutpi-rtl8812au-phydm-out-of-tree-build.patch
|
||||
fd0f25bc723a3e597b74aaad5c34326b7cf963fb413f0e1861bf592e810e9f6f 0011-walnutpi-rtl88x2cs-topdir-out-of-tree-build.patch
|
||||
bf4fb64669ebcb2403ce89faf8ef27849d1373b35d92b1b39114e2993ca2aee6 0012-walnutpi-emmc-axp313a-dts.patch
|
||||
2b6b6dd7ca744f282ab66ebee9d054152dc763dbd5a0eb8c87bbd7404898c535 0013-walnutpi-axp313a-fixed-dcdc-frequency.patch
|
||||
f7ed2aa06de80e5a2c64ba3f2e45ab09f951611d96a8e24188df57eee95a096c 4628b804555773daa982d9578d89fe04fcdde374.patch
|
||||
28bb52ee914724cf8d72e01b758f021d41344c34dc76cefe697189c7a4a0ebf8 60fd7eb89670d2636ac3156881acbd103c6eba6a.patch
|
||||
7121582279b9344a9b653d97905c87955fb4716001b411b89bddb0ca8b3b4e2f 75c8cb2f4cb218aaf4ea68cab08d6dbc96eeae15.patch
|
||||
Reference in New Issue
Block a user