* Re: [PATCH v2 2/2] hwmon: pmbus: Add support for Sony APS-379
From: Chris Packham @ 2026-04-01 4:05 UTC (permalink / raw)
To: Guenter Roeck, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org
Cc: devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <451d4cca-5966-4817-92b5-b886c7f7271d@roeck-us.net>
On 01/04/2026 16:58, Guenter Roeck wrote:
> On 3/31/26 19:42, Chris Packham wrote:
>> Add pmbus support for Sony APS-379 power supplies. There are a few PMBUS
>> commands that return data that is undocumented/invalid so these need to
>> be rejected with -ENXIO. The READ_VOUT command returns data in linear11
>> format instead of linear16 so we need to workaround this.
>>
>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>> ---
>>
>
> Here is the AI feedback:
>
> https://scanmail.trustwave.com/?c=20988&d=-5fM6Qyi3kX42boReXvp_F06nhM1_AVskUmlQ71c3g&u=https%3a%2f%2fsashiko%2edev%2f%23%2fpatchset%2f20260401024214%2e804237-1-chris%2epackham%2540alliedtelesis%2eco%2enz
>
>
> All good points ...
Yep agreed. The lack of MODULE_DEVICE_TABLE() is an omission on my part.
The other two are arguably style but I find myself agreeing with both
suggestions. I'll wait to send a v3.
>
>
> Guenter
>
>> Notes:
>> Changes in v2:
>> - Simplify code per recommendations from Guenter
>> - Add driver documentation
>>
>> Documentation/hwmon/aps-379.rst | 58 +++++++++++
>> Documentation/hwmon/index.rst | 1 +
>> drivers/hwmon/pmbus/Kconfig | 6 ++
>> drivers/hwmon/pmbus/Makefile | 1 +
>> drivers/hwmon/pmbus/aps-379.c | 168 ++++++++++++++++++++++++++++++++
>> 5 files changed, 234 insertions(+)
>> create mode 100644 Documentation/hwmon/aps-379.rst
>> create mode 100644 drivers/hwmon/pmbus/aps-379.c
>>
>> diff --git a/Documentation/hwmon/aps-379.rst
>> b/Documentation/hwmon/aps-379.rst
>> new file mode 100644
>> index 000000000000..468ec5a98fd6
>> --- /dev/null
>> +++ b/Documentation/hwmon/aps-379.rst
>> @@ -0,0 +1,58 @@
>> +Kernel driver aps-379
>> +=====================
>> +
>> +Supported chips:
>> +
>> + * Sony APS-379
>> +
>> + Prefix: 'aps-379'
>> +
>> + Addresses scanned: -
>> +
>> + Authors:
>> + - Chris Packham
>> +
>> +Description
>> +-----------
>> +
>> +This driver implements support for the PMBus monitor on the Sony
>> APS-379
>> +modular power supply. The APS-379 deviates from the PMBus standard
>> for the
>> +READ_VOUT command by using the linear11 format instead of linear16.
>> +
>> +The known supported PMBus commands are:
>> +
>> +=== ============================= ========= ======= =====
>> +Cmd Function Protocol Scaling Bytes
>> +=== ============================= ========= ======= =====
>> +01 On / Off Command (OPERATION) Byte R/W -- 1
>> +10 WRITE_PROTECT Byte R/W -- 1
>> +3B FAN_COMMAND_1 Word R/W -- 2
>> +46 Current Limit (in percent) Word R/W 2^0 2
>> +47 Current Limit Fault Response Byte R/W -- 1
>> +79 Alarm Data Bits (STATUS_WORD) Word Rd -- 2
>> +8B Output Voltage (READ_VOUT) Word Rd 2^-4 2
>> +8C Output Current (READ_IOUT) Word Rd 2^-2 2
>> +8D Power Supply Ambient Temp Word Rd 2^0 2
>> +90 READ_FAN_SPEED_1 Word Rd 2^6 2
>> +91 READ_FAN_SPEED_2 Word Rd 2^6 2
>> +96 Output Wattage (READ_POUT) Word Rd 2^1 2
>> +97 Input Wattage (READ_PIN) Word Rd 2^1 2
>> +9A Unit Model Number (MFR_MODEL) Block R/W -- 10
>> +9B Unit Revision Number Block R/W -- 10
>> +9E Unit Serial Number Block R/W -- 8
>> +99 Unit Manufacturer ID (MFR_ID) Block R/W -- 8
>> +D0 Unit Run Time Information Block Rd -- 4
>> +D5 Firmware Version Rd cust -- 8
>> +B0 User Data 1 (USER_DATA_00) Block R/W -- 4
>> +B1 User Data 2 (USER_DATA_01) Block R/W -- 4
>> +B2 User Data 3 (USER_DATA_02) Block R/W -- 4
>> +B3 User Data 4 (USER_DATA_03) Block R/W -- 4
>> +B4 User Data 5 (USER_DATA_04) Block R/W -- 4
>> +B5 User Data 6 (USER_DATA_05) Block R/W -- 4
>> +B6 User Data 7 (USER_DATA_06) Block R/W -- 4
>> +B7 User Data 8 (USER_DATA_07) Block R/W -- 4
>> +F0 Calibration command Byte R/W -- 1
>> +F1 Calibration data Word Wr 2^9 2
>> +F2 Unlock Calibration Byte Wr -- 1
>> +=== ============================= ========= ======= =====
>> +
>> diff --git a/Documentation/hwmon/index.rst
>> b/Documentation/hwmon/index.rst
>> index b2ca8513cfcd..2bc8d88b5724 100644
>> --- a/Documentation/hwmon/index.rst
>> +++ b/Documentation/hwmon/index.rst
>> @@ -41,6 +41,7 @@ Hardware Monitoring Kernel Drivers
>> adt7475
>> aht10
>> amc6821
>> + aps-379
>> aquacomputer_d5next
>> asb100
>> asc7621
>> diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
>> index fc1273abe357..29076921e330 100644
>> --- a/drivers/hwmon/pmbus/Kconfig
>> +++ b/drivers/hwmon/pmbus/Kconfig
>> @@ -77,6 +77,12 @@ config SENSORS_ADP1050_REGULATOR
>> µModule regulators that can provide microprocessor power from
>> 54V
>> power distribution architecture.
>> +config SENSORS_APS_379
>> + tristate "Sony APS-379 Power Supplies"
>> + help
>> + If you say yes here you get hardware monitoring support for Sony
>> + APS-379 Power Supplies.
>> +
>> config SENSORS_BEL_PFE
>> tristate "Bel PFE Compatible Power Supplies"
>> help
>> diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile
>> index d6c86924f887..94f36c7069ec 100644
>> --- a/drivers/hwmon/pmbus/Makefile
>> +++ b/drivers/hwmon/pmbus/Makefile
>> @@ -9,6 +9,7 @@ obj-$(CONFIG_SENSORS_ACBEL_FSG032) += acbel-fsg032.o
>> obj-$(CONFIG_SENSORS_ADM1266) += adm1266.o
>> obj-$(CONFIG_SENSORS_ADM1275) += adm1275.o
>> obj-$(CONFIG_SENSORS_ADP1050) += adp1050.o
>> +obj-$(CONFIG_SENSORS_APS_379) += aps-379.o
>> obj-$(CONFIG_SENSORS_BEL_PFE) += bel-pfe.o
>> obj-$(CONFIG_SENSORS_BPA_RS600) += bpa-rs600.o
>> obj-$(CONFIG_SENSORS_DELTA_AHE50DC_FAN) += delta-ahe50dc-fan.o
>> diff --git a/drivers/hwmon/pmbus/aps-379.c
>> b/drivers/hwmon/pmbus/aps-379.c
>> new file mode 100644
>> index 000000000000..edc489558437
>> --- /dev/null
>> +++ b/drivers/hwmon/pmbus/aps-379.c
>> @@ -0,0 +1,168 @@
>> +// SPDX-License-Identifier: GPL-2.0-or-later
>> +/*
>> + * Hardware monitoring driver for Sony APS-379 Power Supplies
>> + *
>> + * Copyright 2026 Allied Telesis Labs
>> + */
>> +
>> +#include <linux/i2c.h>
>> +#include <linux/init.h>
>> +#include <linux/kernel.h>
>> +#include <linux/module.h>
>> +#include <linux/pmbus.h>
>> +#include "pmbus.h"
>> +
>> +struct aps_379_data {
>> + struct pmbus_driver_info info;
>> + u8 vout_linear_exponent;
>> +};
>> +
>> +#define to_aps_379_data(x) container_of(x, struct aps_379_data, info)
>> +
>> +static const struct i2c_device_id aps_379_id[] = {
>> + { "aps-379", 0 },
>> + {},
>> +};
>> +
>> +static int aps_379_read_byte_data(struct i2c_client *client, int
>> page, int reg)
>> +{
>> + const struct pmbus_driver_info *info =
>> pmbus_get_driver_info(client);
>> + struct aps_379_data *data = to_aps_379_data(info);
>> +
>> + switch (reg) {
>> + case PMBUS_VOUT_MODE:
>> + /*
>> + * The VOUT format used by the chip is linear11,
>> + * not linear16. Report that VOUT is in linear mode
>> + * and return exponent value extracted while probing
>> + * the chip.
>> + */
>> + return data->vout_linear_exponent;
>> + default:
>> + return -ENODATA;
>> + }
>> +}
>> +
>> +/*
>> + * The APS-379 uses linear11 format instead of linear16. We've
>> reported the exponent
>> + * via the PMBUS_VOUT_MODE so we just return the mantissa here.
>> + */
>> +static int aps_379_read_vout(struct i2c_client *client)
>> +{
>> + int ret;
>> +
>> + ret = pmbus_read_word_data(client, 0, 0xff, PMBUS_READ_VOUT);
>> + if (ret < 0)
>> + return ret;
>> +
>> + return sign_extend32(ret & 0x7ff, 11);
>> +}
>> +
>> +static int aps_379_read_word_data(struct i2c_client *client, int
>> page, int phase, int reg)
>> +{
>> + switch (reg) {
>> + case PMBUS_VOUT_UV_WARN_LIMIT:
>> + case PMBUS_VOUT_OV_WARN_LIMIT:
>> + case PMBUS_VOUT_UV_FAULT_LIMIT:
>> + case PMBUS_VOUT_OV_FAULT_LIMIT:
>> + case PMBUS_PIN_OP_WARN_LIMIT:
>> + case PMBUS_POUT_OP_WARN_LIMIT:
>> + case PMBUS_MFR_IIN_MAX:
>> + case PMBUS_MFR_PIN_MAX:
>> + case PMBUS_MFR_VOUT_MIN:
>> + case PMBUS_MFR_VOUT_MAX:
>> + case PMBUS_MFR_IOUT_MAX:
>> + case PMBUS_MFR_POUT_MAX:
>> + case PMBUS_MFR_MAX_TEMP_1:
>> + /* These commands return data but it is
>> invalid/un-documented */
>> + return -ENXIO;
>> + case PMBUS_READ_VOUT:
>> + return aps_379_read_vout(client);
>> + default:
>> + if (reg >= PMBUS_VIRT_BASE)
>> + return -ENXIO;
>> + else
>> + return -ENODATA;
>> + }
>> +}
>> +
>> +static struct pmbus_driver_info aps_379_info = {
>> + .pages = 1,
>> + .format[PSC_VOLTAGE_OUT] = linear,
>> + .format[PSC_CURRENT_OUT] = linear,
>> + .format[PSC_POWER] = linear,
>> + .format[PSC_TEMPERATURE] = linear,
>> + .format[PSC_FAN] = linear,
>> + .func[0] = PMBUS_HAVE_VOUT |
>> + PMBUS_HAVE_IOUT |
>> + PMBUS_HAVE_PIN | PMBUS_HAVE_POUT |
>> + PMBUS_HAVE_TEMP |
>> + PMBUS_HAVE_FAN12,
>> + .read_byte_data = aps_379_read_byte_data,
>> + .read_word_data = aps_379_read_word_data,
>> +};
>> +
>> +static int aps_379_probe(struct i2c_client *client)
>> +{
>> + struct device *dev = &client->dev;
>> + struct pmbus_driver_info *info;
>> + struct aps_379_data *data;
>> + u8 buf[I2C_SMBUS_BLOCK_MAX + 1];
>> + int ret;
>> +
>> + data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
>> + if (!data)
>> + return -ENOMEM;
>> +
>> + memcpy(&data->info, &aps_379_info, sizeof(*info));
>> + info = &data->info;
>> +
>> + if (!i2c_check_functionality(client->adapter,
>> + I2C_FUNC_SMBUS_READ_BYTE_DATA
>> + | I2C_FUNC_SMBUS_READ_WORD_DATA
>> + | I2C_FUNC_SMBUS_READ_BLOCK_DATA))
>> + return -ENODEV;
>> +
>> + ret = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL, buf);
>> + if (ret < 0) {
>> + dev_err(dev, "Failed to read Manufacturer Model\n");
>> + return ret;
>> + }
>> +
>> + if (strncasecmp(buf,
>> http://scanmail.trustwave.com/?c=20988&d=-5fM6Qyi3kX42boReXvp_F06nhM1_AVskRzwE-YPiQ&u=http%3a%2f%2faps%5f379%5fid%5b0%5d%2ename
>> strlen(aps_379_id[0].name)) != 0) {
>> + buf[ret] = '\0';
>> + dev_err(dev, "Unsupported Manufacturer Model '%s'\n", buf);
>> + return -ENODEV;
>> + }
>> +
>> + ret = i2c_smbus_read_word_data(client, PMBUS_READ_VOUT);
>> + if (ret < 0) {
>> + dev_err(dev, "Can't get vout exponent.\n");
>> + return ret;
>> + }
>> + data->vout_linear_exponent = (u8)((ret >> 11) & 0x1f);
>> +
>> + return pmbus_do_probe(client, info);
>> +}
>> +
>> +static const struct of_device_id __maybe_unused aps_379_of_match[] = {
>> + { .compatible = "sony,aps-379" },
>> + {},
>> +};
>> +MODULE_DEVICE_TABLE(of, aps_379_of_match);
>> +
>> +static struct i2c_driver aps_379_driver = {
>> + .driver = {
>> + .name = "aps-379",
>> + .of_match_table = of_match_ptr(aps_379_of_match),
>> + },
>> + .probe = aps_379_probe,
>> + .id_table = aps_379_id,
>> +};
>> +
>> +module_i2c_driver(aps_379_driver);
>> +
>> +MODULE_AUTHOR("Chris Packham");
>> +MODULE_DESCRIPTION("PMBus driver for Sony APS-379");
>> +MODULE_LICENSE("GPL");
>> +MODULE_IMPORT_NS("PMBUS");
^ permalink raw reply
* Re: [PATCH v4 3/3] riscv: dts: spacemit: Enable USB3.0/PCIe on OrangePi RV2
From: Yixun Lan @ 2026-04-01 4:04 UTC (permalink / raw)
To: Han Gao
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Chukun Pan,
devicetree, linux-riscv, spacemit, linux-kernel, Han Gao
In-Reply-To: <0ec229e2fb138092672773f134d0739e70740ce0.1774974017.git.gaohan@iscas.ac.cn>
Hi Han,
On 00:27 Wed 01 Apr , Han Gao wrote:
> Enable the DWC3 USB 3.0 controller and its associated usbphy2 on the
> OrangePi RV2 board.
>
> The board utilizes a Genesys Logic GL3523 USB3.0 hub.
>
> Define a 3.3v fixed voltage regulator for PCIe and enable PCIe and
> PHY-related Device Tree nodes for the OrangePi RV2.
>
> Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
> ---
> .../boot/dts/spacemit/k1-orangepi-rv2.dts | 68 +++++++++++++++++++
> 1 file changed, 68 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> index e5e358d49c09..e93e7f660820 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> @@ -23,6 +23,15 @@ chosen {
> stdout-path = "serial0";
> };
>
> + pcie_vcc_3v3: regulator-pcie-vcc3v3 {
> + compatible = "regulator-fixed";
> + regulator-name = "pcie_vcc3v3";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + gpio = <&gpio K1_GPIO(116) GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +
I've noticed you dropped usb3_hub_5v which actually provide vbus supply..
so in current version, it will leave vbus as undetermined state - whether
vbus is on or not will depend on bootloader to enable it or not?
The best choice would be waiting for Marco's onboard-dev vbus patch[1],
while in K1 platform, we workaround it by force enabling vbus after power on
(set regulator as always-on)..
Link: https://lore.kernel.org/all/20260223-v6-16-topic-usb-onboard-dev-v5-0-28d3018a8026@pengutronix.de/ [1]
> reg_vcc_4v: regulator-vcc-4v {
> compatible = "regulator-fixed";
> regulator-name = "vcc4v0";
> @@ -44,6 +53,10 @@ led1 {
> };
> };
>
> +&combo_phy {
> + status = "okay";
> +};
> +
> ð0 {
> phy-handle = <&rgmii0>;
> phy-mode = "rgmii-id";
> @@ -190,8 +203,63 @@ dldo6 {
> };
> };
>
> +&pcie1_phy {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pcie1_3_cfg>;
> + status = "okay";
> +};
> +
> +&pcie1_port {
> + phys = <&pcie1_phy>;
> + vpcie3v3-supply = <&pcie_vcc_3v3>;
> +};
> +
> +&pcie1 {
> + vpcie3v3-supply = <&pcie_vcc_3v3>;
> + status = "okay";
> +};
> +
> +&pcie2_phy {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pcie2_4_cfg>;
> + status = "okay";
> +};
> +
> +&pcie2_port {
> + phys = <&pcie2_phy>;
> + vpcie3v3-supply = <&pcie_vcc_3v3>;
> +};
> +
> +&pcie2 {
> + vpcie3v3-supply = <&pcie_vcc_3v3>;
> + status = "okay";
> +};
> +
> &uart0 {
> pinctrl-names = "default";
> pinctrl-0 = <&uart0_2_cfg>;
> status = "okay";
> };
> +
> +&usbphy2 {
> + status = "okay";
> +};
> +
> +&usb_dwc3 {
> + dr_mode = "host";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + status = "okay";
> +
> + hub_2_0: hub@1 {
> + compatible = "usb5e3,610";
> + reg = <0x1>;
> + peer-hub = <&hub_3_0>;
> + };
> +
> + hub_3_0: hub@2 {
> + compatible = "usb5e3,620";
> + reg = <0x2>;
> + peer-hub = <&hub_2_0>;
Can you confirm all usb ports work fine with this?
> + };
> +};
> --
> 2.47.3
>
--
Yixun Lan (dlan)
^ permalink raw reply
* Re: [PATCH v2 2/2] hwmon: pmbus: Add support for Sony APS-379
From: Guenter Roeck @ 2026-04-01 3:58 UTC (permalink / raw)
To: Chris Packham, robh, krzk+dt, conor+dt
Cc: devicetree, linux-hwmon, linux-kernel
In-Reply-To: <20260401024214.804237-3-chris.packham@alliedtelesis.co.nz>
On 3/31/26 19:42, Chris Packham wrote:
> Add pmbus support for Sony APS-379 power supplies. There are a few PMBUS
> commands that return data that is undocumented/invalid so these need to
> be rejected with -ENXIO. The READ_VOUT command returns data in linear11
> format instead of linear16 so we need to workaround this.
>
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
>
Here is the AI feedback:
https://sashiko.dev/#/patchset/20260401024214.804237-1-chris.packham%40alliedtelesis.co.nz
All good points ...
Guenter
> Notes:
> Changes in v2:
> - Simplify code per recommendations from Guenter
> - Add driver documentation
>
> Documentation/hwmon/aps-379.rst | 58 +++++++++++
> Documentation/hwmon/index.rst | 1 +
> drivers/hwmon/pmbus/Kconfig | 6 ++
> drivers/hwmon/pmbus/Makefile | 1 +
> drivers/hwmon/pmbus/aps-379.c | 168 ++++++++++++++++++++++++++++++++
> 5 files changed, 234 insertions(+)
> create mode 100644 Documentation/hwmon/aps-379.rst
> create mode 100644 drivers/hwmon/pmbus/aps-379.c
>
> diff --git a/Documentation/hwmon/aps-379.rst b/Documentation/hwmon/aps-379.rst
> new file mode 100644
> index 000000000000..468ec5a98fd6
> --- /dev/null
> +++ b/Documentation/hwmon/aps-379.rst
> @@ -0,0 +1,58 @@
> +Kernel driver aps-379
> +=====================
> +
> +Supported chips:
> +
> + * Sony APS-379
> +
> + Prefix: 'aps-379'
> +
> + Addresses scanned: -
> +
> + Authors:
> + - Chris Packham
> +
> +Description
> +-----------
> +
> +This driver implements support for the PMBus monitor on the Sony APS-379
> +modular power supply. The APS-379 deviates from the PMBus standard for the
> +READ_VOUT command by using the linear11 format instead of linear16.
> +
> +The known supported PMBus commands are:
> +
> +=== ============================= ========= ======= =====
> +Cmd Function Protocol Scaling Bytes
> +=== ============================= ========= ======= =====
> +01 On / Off Command (OPERATION) Byte R/W -- 1
> +10 WRITE_PROTECT Byte R/W -- 1
> +3B FAN_COMMAND_1 Word R/W -- 2
> +46 Current Limit (in percent) Word R/W 2^0 2
> +47 Current Limit Fault Response Byte R/W -- 1
> +79 Alarm Data Bits (STATUS_WORD) Word Rd -- 2
> +8B Output Voltage (READ_VOUT) Word Rd 2^-4 2
> +8C Output Current (READ_IOUT) Word Rd 2^-2 2
> +8D Power Supply Ambient Temp Word Rd 2^0 2
> +90 READ_FAN_SPEED_1 Word Rd 2^6 2
> +91 READ_FAN_SPEED_2 Word Rd 2^6 2
> +96 Output Wattage (READ_POUT) Word Rd 2^1 2
> +97 Input Wattage (READ_PIN) Word Rd 2^1 2
> +9A Unit Model Number (MFR_MODEL) Block R/W -- 10
> +9B Unit Revision Number Block R/W -- 10
> +9E Unit Serial Number Block R/W -- 8
> +99 Unit Manufacturer ID (MFR_ID) Block R/W -- 8
> +D0 Unit Run Time Information Block Rd -- 4
> +D5 Firmware Version Rd cust -- 8
> +B0 User Data 1 (USER_DATA_00) Block R/W -- 4
> +B1 User Data 2 (USER_DATA_01) Block R/W -- 4
> +B2 User Data 3 (USER_DATA_02) Block R/W -- 4
> +B3 User Data 4 (USER_DATA_03) Block R/W -- 4
> +B4 User Data 5 (USER_DATA_04) Block R/W -- 4
> +B5 User Data 6 (USER_DATA_05) Block R/W -- 4
> +B6 User Data 7 (USER_DATA_06) Block R/W -- 4
> +B7 User Data 8 (USER_DATA_07) Block R/W -- 4
> +F0 Calibration command Byte R/W -- 1
> +F1 Calibration data Word Wr 2^9 2
> +F2 Unlock Calibration Byte Wr -- 1
> +=== ============================= ========= ======= =====
> +
> diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
> index b2ca8513cfcd..2bc8d88b5724 100644
> --- a/Documentation/hwmon/index.rst
> +++ b/Documentation/hwmon/index.rst
> @@ -41,6 +41,7 @@ Hardware Monitoring Kernel Drivers
> adt7475
> aht10
> amc6821
> + aps-379
> aquacomputer_d5next
> asb100
> asc7621
> diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
> index fc1273abe357..29076921e330 100644
> --- a/drivers/hwmon/pmbus/Kconfig
> +++ b/drivers/hwmon/pmbus/Kconfig
> @@ -77,6 +77,12 @@ config SENSORS_ADP1050_REGULATOR
> µModule regulators that can provide microprocessor power from 54V
> power distribution architecture.
>
> +config SENSORS_APS_379
> + tristate "Sony APS-379 Power Supplies"
> + help
> + If you say yes here you get hardware monitoring support for Sony
> + APS-379 Power Supplies.
> +
> config SENSORS_BEL_PFE
> tristate "Bel PFE Compatible Power Supplies"
> help
> diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile
> index d6c86924f887..94f36c7069ec 100644
> --- a/drivers/hwmon/pmbus/Makefile
> +++ b/drivers/hwmon/pmbus/Makefile
> @@ -9,6 +9,7 @@ obj-$(CONFIG_SENSORS_ACBEL_FSG032) += acbel-fsg032.o
> obj-$(CONFIG_SENSORS_ADM1266) += adm1266.o
> obj-$(CONFIG_SENSORS_ADM1275) += adm1275.o
> obj-$(CONFIG_SENSORS_ADP1050) += adp1050.o
> +obj-$(CONFIG_SENSORS_APS_379) += aps-379.o
> obj-$(CONFIG_SENSORS_BEL_PFE) += bel-pfe.o
> obj-$(CONFIG_SENSORS_BPA_RS600) += bpa-rs600.o
> obj-$(CONFIG_SENSORS_DELTA_AHE50DC_FAN) += delta-ahe50dc-fan.o
> diff --git a/drivers/hwmon/pmbus/aps-379.c b/drivers/hwmon/pmbus/aps-379.c
> new file mode 100644
> index 000000000000..edc489558437
> --- /dev/null
> +++ b/drivers/hwmon/pmbus/aps-379.c
> @@ -0,0 +1,168 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Hardware monitoring driver for Sony APS-379 Power Supplies
> + *
> + * Copyright 2026 Allied Telesis Labs
> + */
> +
> +#include <linux/i2c.h>
> +#include <linux/init.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/pmbus.h>
> +#include "pmbus.h"
> +
> +struct aps_379_data {
> + struct pmbus_driver_info info;
> + u8 vout_linear_exponent;
> +};
> +
> +#define to_aps_379_data(x) container_of(x, struct aps_379_data, info)
> +
> +static const struct i2c_device_id aps_379_id[] = {
> + { "aps-379", 0 },
> + {},
> +};
> +
> +static int aps_379_read_byte_data(struct i2c_client *client, int page, int reg)
> +{
> + const struct pmbus_driver_info *info = pmbus_get_driver_info(client);
> + struct aps_379_data *data = to_aps_379_data(info);
> +
> + switch (reg) {
> + case PMBUS_VOUT_MODE:
> + /*
> + * The VOUT format used by the chip is linear11,
> + * not linear16. Report that VOUT is in linear mode
> + * and return exponent value extracted while probing
> + * the chip.
> + */
> + return data->vout_linear_exponent;
> + default:
> + return -ENODATA;
> + }
> +}
> +
> +/*
> + * The APS-379 uses linear11 format instead of linear16. We've reported the exponent
> + * via the PMBUS_VOUT_MODE so we just return the mantissa here.
> + */
> +static int aps_379_read_vout(struct i2c_client *client)
> +{
> + int ret;
> +
> + ret = pmbus_read_word_data(client, 0, 0xff, PMBUS_READ_VOUT);
> + if (ret < 0)
> + return ret;
> +
> + return sign_extend32(ret & 0x7ff, 11);
> +}
> +
> +static int aps_379_read_word_data(struct i2c_client *client, int page, int phase, int reg)
> +{
> + switch (reg) {
> + case PMBUS_VOUT_UV_WARN_LIMIT:
> + case PMBUS_VOUT_OV_WARN_LIMIT:
> + case PMBUS_VOUT_UV_FAULT_LIMIT:
> + case PMBUS_VOUT_OV_FAULT_LIMIT:
> + case PMBUS_PIN_OP_WARN_LIMIT:
> + case PMBUS_POUT_OP_WARN_LIMIT:
> + case PMBUS_MFR_IIN_MAX:
> + case PMBUS_MFR_PIN_MAX:
> + case PMBUS_MFR_VOUT_MIN:
> + case PMBUS_MFR_VOUT_MAX:
> + case PMBUS_MFR_IOUT_MAX:
> + case PMBUS_MFR_POUT_MAX:
> + case PMBUS_MFR_MAX_TEMP_1:
> + /* These commands return data but it is invalid/un-documented */
> + return -ENXIO;
> + case PMBUS_READ_VOUT:
> + return aps_379_read_vout(client);
> + default:
> + if (reg >= PMBUS_VIRT_BASE)
> + return -ENXIO;
> + else
> + return -ENODATA;
> + }
> +}
> +
> +static struct pmbus_driver_info aps_379_info = {
> + .pages = 1,
> + .format[PSC_VOLTAGE_OUT] = linear,
> + .format[PSC_CURRENT_OUT] = linear,
> + .format[PSC_POWER] = linear,
> + .format[PSC_TEMPERATURE] = linear,
> + .format[PSC_FAN] = linear,
> + .func[0] = PMBUS_HAVE_VOUT |
> + PMBUS_HAVE_IOUT |
> + PMBUS_HAVE_PIN | PMBUS_HAVE_POUT |
> + PMBUS_HAVE_TEMP |
> + PMBUS_HAVE_FAN12,
> + .read_byte_data = aps_379_read_byte_data,
> + .read_word_data = aps_379_read_word_data,
> +};
> +
> +static int aps_379_probe(struct i2c_client *client)
> +{
> + struct device *dev = &client->dev;
> + struct pmbus_driver_info *info;
> + struct aps_379_data *data;
> + u8 buf[I2C_SMBUS_BLOCK_MAX + 1];
> + int ret;
> +
> + data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
> + if (!data)
> + return -ENOMEM;
> +
> + memcpy(&data->info, &aps_379_info, sizeof(*info));
> + info = &data->info;
> +
> + if (!i2c_check_functionality(client->adapter,
> + I2C_FUNC_SMBUS_READ_BYTE_DATA
> + | I2C_FUNC_SMBUS_READ_WORD_DATA
> + | I2C_FUNC_SMBUS_READ_BLOCK_DATA))
> + return -ENODEV;
> +
> + ret = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL, buf);
> + if (ret < 0) {
> + dev_err(dev, "Failed to read Manufacturer Model\n");
> + return ret;
> + }
> +
> + if (strncasecmp(buf, aps_379_id[0].name, strlen(aps_379_id[0].name)) != 0) {
> + buf[ret] = '\0';
> + dev_err(dev, "Unsupported Manufacturer Model '%s'\n", buf);
> + return -ENODEV;
> + }
> +
> + ret = i2c_smbus_read_word_data(client, PMBUS_READ_VOUT);
> + if (ret < 0) {
> + dev_err(dev, "Can't get vout exponent.\n");
> + return ret;
> + }
> + data->vout_linear_exponent = (u8)((ret >> 11) & 0x1f);
> +
> + return pmbus_do_probe(client, info);
> +}
> +
> +static const struct of_device_id __maybe_unused aps_379_of_match[] = {
> + { .compatible = "sony,aps-379" },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, aps_379_of_match);
> +
> +static struct i2c_driver aps_379_driver = {
> + .driver = {
> + .name = "aps-379",
> + .of_match_table = of_match_ptr(aps_379_of_match),
> + },
> + .probe = aps_379_probe,
> + .id_table = aps_379_id,
> +};
> +
> +module_i2c_driver(aps_379_driver);
> +
> +MODULE_AUTHOR("Chris Packham");
> +MODULE_DESCRIPTION("PMBus driver for Sony APS-379");
> +MODULE_LICENSE("GPL");
> +MODULE_IMPORT_NS("PMBUS");
^ permalink raw reply
* Re: [PATCH v2 4/7] PCI: intel-gw: Add start_link callback function
From: kernel test robot @ 2026-04-01 3:45 UTC (permalink / raw)
To: Florian Eckert, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Johan Hovold,
Sajid Dalvi, Ajay Agarwal, Krzysztof Kozlowski, Conor Dooley,
Rahul Tanwar
Cc: oe-kbuild-all, linux-pci, linux-kernel, devicetree,
Florian Eckert, Eckert.Florian, ms
In-Reply-To: <20260330-pcie-intel-gw-v2-4-8bd07367a298@dev.tdt.de>
Hi Florian,
kernel test robot noticed the following build warnings:
[auto build test WARNING on f338e77383789c0cae23ca3d48adcc5e9e137e3c]
url: https://github.com/intel-lab-lkp/linux/commits/Florian-Eckert/PCI-intel-gw-Remove-unused-define/20260401-051352
base: f338e77383789c0cae23ca3d48adcc5e9e137e3c
patch link: https://lore.kernel.org/r/20260330-pcie-intel-gw-v2-4-8bd07367a298%40dev.tdt.de
patch subject: [PATCH v2 4/7] PCI: intel-gw: Add start_link callback function
config: sparc-randconfig-002-20260401 (https://download.01.org/0day-ci/archive/20260401/202604011153.Qo18yHpp-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260401/202604011153.Qo18yHpp-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604011153.Qo18yHpp-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/pci/controller/dwc/pcie-intel-gw.c: In function 'intel_pcie_host_setup':
>> drivers/pci/controller/dwc/pcie-intel-gw.c:329:1: warning: label 'err' defined but not used [-Wunused-label]
err:
^~~
vim +/err +329 drivers/pci/controller/dwc/pcie-intel-gw.c
6cbd614d1f7c81 Florian Eckert 2026-03-30 296
733770d4a2bea0 Fan Fei 2021-12-22 297 static int intel_pcie_host_setup(struct intel_pcie *pcie)
ed22aaaede44f6 Dilip Kota 2019-12-09 298 {
ed22aaaede44f6 Dilip Kota 2019-12-09 299 int ret;
733770d4a2bea0 Fan Fei 2021-12-22 300 struct dw_pcie *pci = &pcie->pci;
ed22aaaede44f6 Dilip Kota 2019-12-09 301
733770d4a2bea0 Fan Fei 2021-12-22 302 intel_pcie_core_rst_assert(pcie);
733770d4a2bea0 Fan Fei 2021-12-22 303 intel_pcie_device_rst_assert(pcie);
733770d4a2bea0 Fan Fei 2021-12-22 304 intel_pcie_core_rst_deassert(pcie);
ed22aaaede44f6 Dilip Kota 2019-12-09 305
1927e1ec66a6ee Florian Eckert 2026-03-30 306 /* Controller clock must be provided earlier than PHY */
733770d4a2bea0 Fan Fei 2021-12-22 307 ret = clk_prepare_enable(pcie->core_clk);
ed22aaaede44f6 Dilip Kota 2019-12-09 308 if (ret) {
733770d4a2bea0 Fan Fei 2021-12-22 309 dev_err(pcie->pci.dev, "Core clock enable failed: %d\n", ret);
ed22aaaede44f6 Dilip Kota 2019-12-09 310 goto clk_err;
ed22aaaede44f6 Dilip Kota 2019-12-09 311 }
ed22aaaede44f6 Dilip Kota 2019-12-09 312
1cc9a559993a4a Rob Herring 2020-11-05 313 pci->atu_base = pci->dbi_base + 0xC0000;
1cc9a559993a4a Rob Herring 2020-11-05 314
1927e1ec66a6ee Florian Eckert 2026-03-30 315 ret = phy_init(pcie->phy);
1927e1ec66a6ee Florian Eckert 2026-03-30 316 if (ret)
1927e1ec66a6ee Florian Eckert 2026-03-30 317 goto phy_err;
1927e1ec66a6ee Florian Eckert 2026-03-30 318
733770d4a2bea0 Fan Fei 2021-12-22 319 intel_pcie_ltssm_disable(pcie);
733770d4a2bea0 Fan Fei 2021-12-22 320 intel_pcie_link_setup(pcie);
1cc9a559993a4a Rob Herring 2020-11-05 321 intel_pcie_init_n_fts(pci);
ce06bf570390fb Serge Semin 2022-06-24 322
1cc9a559993a4a Rob Herring 2020-11-05 323 dw_pcie_upconfig_setup(pci);
1cc9a559993a4a Rob Herring 2020-11-05 324
4db57fd92a7d2d Florian Eckert 2026-03-30 325 intel_pcie_core_irq_enable(pcie);
ed22aaaede44f6 Dilip Kota 2019-12-09 326
ed22aaaede44f6 Dilip Kota 2019-12-09 327 return 0;
ed22aaaede44f6 Dilip Kota 2019-12-09 328
1927e1ec66a6ee Florian Eckert 2026-03-30 @329 err:
1927e1ec66a6ee Florian Eckert 2026-03-30 330 phy_exit(pcie->phy);
1927e1ec66a6ee Florian Eckert 2026-03-30 331 phy_err:
733770d4a2bea0 Fan Fei 2021-12-22 332 clk_disable_unprepare(pcie->core_clk);
ed22aaaede44f6 Dilip Kota 2019-12-09 333 clk_err:
733770d4a2bea0 Fan Fei 2021-12-22 334 intel_pcie_core_rst_assert(pcie);
ed22aaaede44f6 Dilip Kota 2019-12-09 335
ed22aaaede44f6 Dilip Kota 2019-12-09 336 return ret;
ed22aaaede44f6 Dilip Kota 2019-12-09 337 }
ed22aaaede44f6 Dilip Kota 2019-12-09 338
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* [PATCH v7 15/15] arm64: dts: qcom: sdm845-lg-{judyln, judyp}: Reference memory region in fb
From: Paul Sajna @ 2026-04-01 3:23 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: Paul Sajna, linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown
In-Reply-To: <20260331-judyln-dts-v7-0-fbbc4b7cc557@postmarketos.org>
To prevent duplicating the framebuffer address and size point out the
existing framebuffer memory region instead of specifying the address
manually.
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 3 +--
arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 2 +-
arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 85dc4468b6c4..86cf4eb44084 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -98,8 +98,7 @@ spss_mem: memory@99000000 {
no-map;
};
- /* Framebuffer region */
- memory@9d400000 {
+ framebuffer_mem: memory@9d400000 {
reg = <0x0 0x9d400000 0x0 0x2400000>;
no-map;
};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
index adf41aa0146a..83e392907244 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
@@ -16,7 +16,7 @@ / {
chosen {
framebuffer@9d400000 {
compatible = "simple-framebuffer";
- reg = <0x0 0x9d400000 0x0 (1440 * 3120 * 4)>;
+ memory-region = <&framebuffer_mem>;
width = <1440>;
height = <3120>;
stride = <(1440 * 4)>;
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
index d244ebdd17be..5f7ddb2c4076 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
@@ -16,7 +16,7 @@ / {
chosen {
framebuffer@9d400000 {
compatible = "simple-framebuffer";
- reg = <0x0 0x9d400000 0x0 (1440 * 2880 * 4)>;
+ memory-region = <&framebuffer_mem>;
width = <1440>;
height = <2880>;
stride = <(1440 * 4)>;
--
2.53.0
^ permalink raw reply related
* [PATCH v7 14/15] arm64: dts: qcom: sdm845-lg-common: Change ipa gsi-loader to 'self', add memory-region
From: Paul Sajna @ 2026-04-01 3:22 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: Paul Sajna, linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Konrad Dybcio
In-Reply-To: <20260331-judyln-dts-v7-0-fbbc4b7cc557@postmarketos.org>
The modem firmware for this device doesn't preload the IPA firmware
and requires the OS handles that instead. Set qcom,gsi-loader = "self"
to reflect that.
Ensure the ipa uses the correct memory.
ipa 1e40000.ipa: channel 4 limited to 256 TREs
ipa 1e40000.ipa: IPA driver initialized
ipa 1e40000.ipa: received modem starting event
ipa 1e40000.ipa: received modem running event
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 9d82961d527e..85dc4468b6c4 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -473,7 +473,9 @@ &gpu {
};
&ipa {
- qcom,gsi-loader = "modem";
+ qcom,gsi-loader = "self";
+ memory-region = <&ipa_fw_mem>;
+
status = "okay";
};
--
2.53.0
^ permalink raw reply related
* [PATCH v7 13/15] arm64: dts: qcom: sdm845-lg-common: Add camera flash
From: Paul Sajna @ 2026-04-01 3:22 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: Paul Sajna, linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Konrad Dybcio
In-Reply-To: <20260331-judyln-dts-v7-0-fbbc4b7cc557@postmarketos.org>
Camera doesn't work yet (imx351), but we can use the flash as a flashlight.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 71d070619ad7..9d82961d527e 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -496,6 +496,19 @@ &pm8998_resin {
status = "okay";
};
+&pmi8998_flash {
+ status = "okay";
+
+ led-0 {
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_WHITE>;
+ led-sources = <1>, <2>;
+ led-max-microamp = <100000>;
+ flash-max-microamp = <500000>;
+ flash-max-timeout-us = <500000>;
+ };
+};
+
&pmi8998_lpg {
status = "okay";
--
2.53.0
^ permalink raw reply related
* [PATCH v7 12/15] arm64: dts: qcom: sdm845-lg-common: Add chassis-type
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna, Konrad Dybcio, Dmitry Baryshkov
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
The sdm845-lg devices are all phones, therefore handset chassis
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 8481f0cce974..71d070619ad7 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -28,6 +28,8 @@
/delete-node/ &wlan_msa_mem;
/ {
+ chassis-type = "handset";
+
aliases {
serial0 = &uart9;
serial1 = &uart6;
--
2.53.0
^ permalink raw reply related
* [PATCH v7 11/15] arm64: dts: qcom: sdm845-lg: Add wifi nodes
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna, Konrad Dybcio, Dmitry Baryshkov
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
Wi-Fi now works with this patch, relevant firmware and
qcom,snoc-host-cap-skip-quirk
qcom,snoc-host-cap-skip-quirk has not been approved/merged in mainline,
so it is not included here.
ath10k_snoc 18800000.wifi: qmi chip_id 0x30214 chip_family 0x4001 board_id 0xff soc_id 0x40030001
ath10k_snoc 18800000.wifi: qmi fw_version 0x20060285 fw_build_timestamp 2020-10-12 23:35 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c4-00645-QCAHLSWMTPLZ-1.336037.2
ath10k_snoc 18800000.wifi: wcn3990 hw1.0 target 0x00000008 chip_id 0x00000000 sub 0000:0000
ath10k_snoc 18800000.wifi: kconfig debug 1 debugfs 1 tracing 0 dfs 0 testmode 0
ath10k_snoc 18800000.wifi: firmware ver api 5 features wowlan,mgmt-tx-by-reference,non-bmi crc32 b3d4b790
ath10k_snoc 18800000.wifi: htt-ver 3.83 wmi-op 4 htt-op 3 cal file max-sta 32 raw 0 hwcrypto 1
ath10k_snoc 18800000.wifi: invalid MAC address; choosing random
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 10 ++++++++++
arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 4 ++++
arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts | 4 ++++
3 files changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 552d9719bede..8481f0cce974 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -670,3 +670,13 @@ &usb_1_qmpphy {
&venus {
status = "okay";
};
+
+&wifi {
+ vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
+ vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
+ vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
+ vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
+ vdd-3.3-ch1-supply = <&vreg_l23a_3p3>;
+
+ status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
index 7948fe3dbaa2..adf41aa0146a 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
@@ -175,3 +175,7 @@ sde_te_active_sleep: sde-te-active-sleep-state {
&venus {
firmware-name = "qcom/sdm845/LG/judyln/venus.mbn";
};
+
+&wifi {
+ qcom,calibration-variant = "lg_judyln";
+};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
index efca260c3dcf..d244ebdd17be 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
@@ -56,3 +56,7 @@ &mss_pil {
&venus {
firmware-name = "qcom/sdm845/LG/judyp/venus.mbn";
};
+
+&wifi {
+ qcom,calibration-variant = "lg_judyp";
+};
--
2.53.0
^ permalink raw reply related
* [PATCH v7 10/15] arm64: dts: qcom: sdm845-lg-judyln: Add display panel
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna, Konrad Dybcio, Dmitry Baryshkov
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
Also include other supporting msm drm nodes, gpio and backlight
Co-developed-by: Amir Dahan <system64fumo@tuta.io>
Signed-off-by: Amir Dahan <system64fumo@tuta.io>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 13 +++--
arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 68 +++++++++++++++++++++++++-
2 files changed, 75 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 51cd930488a9..552d9719bede 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -450,10 +450,6 @@ &cdsp_pas {
status = "okay";
};
-&dispcc {
- status = "disabled";
-};
-
&gcc {
protected-clocks = <GCC_QSPI_CORE_CLK>,
<GCC_QSPI_CORE_CLK_SRC>,
@@ -525,6 +521,15 @@ led@5 {
};
};
+&pmi8998_wled {
+ qcom,current-limit-microamp = <20000>;
+ qcom,ovp-millivolt = <29600>;
+ qcom,switching-freq = <800>;
+ qcom,num-strings = <3>;
+ qcom,cabc;
+ status = "okay";
+};
+
&qupv3_id_0 {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
index 2c024b32c00c..7948fe3dbaa2 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
@@ -21,8 +21,6 @@ framebuffer@9d400000 {
height = <3120>;
stride = <(1440 * 4)>;
format = "a8r8g8b8";
- lab-supply = <&lab>;
- ibb-supply = <&ibb>;
};
};
@@ -71,6 +69,51 @@ &ipa {
firmware-name = "qcom/sdm845/LG/judyln/ipa_fws.mbn";
};
+&mdss {
+ status = "okay";
+};
+
+&mdss_dsi0 {
+ vdda-supply = <&vdda_mipi_dsi0_1p2>;
+
+ status = "okay";
+
+ display_panel: panel@0 {
+ reg = <0>;
+ compatible = "lg,sw49410-lh609qh1", "lg,sw49410";
+
+ backlight = <&pmi8998_wled>;
+ reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
+ width-mm = <65>;
+ height-mm = <140>;
+
+ vsp-supply = <&lab>;
+ vsn-supply = <&ibb>;
+
+ pinctrl-0 = <&sde_dsi_active &sde_te_active_sleep>;
+ pinctrl-1 = <&sde_dsi_sleep &sde_te_active_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+ };
+};
+
+&mdss_dsi0_phy {
+ vdds-supply = <&vdda_mipi_dsi0_pll>;
+
+ status = "okay";
+};
+
+&mdss_dsi0_out {
+ data-lanes = <0 1 2 3>;
+ remote-endpoint = <&panel_in>;
+ qcom,te-source = "mdp_vsync_e";
+};
+
&ibb {
regulator-min-microvolt = <5500000>;
regulator-max-microvolt = <5500000>;
@@ -106,6 +149,27 @@ thinq_key_default: thinq-key-default-state {
drive-strength = <2>;
bias-pull-up;
};
+
+ sde_dsi_active: sde-dsi-active-state {
+ pins = "gpio6";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ sde_dsi_sleep: sde-dsi-sleep-state {
+ pins = "gpio6";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ sde_te_active_sleep: sde-te-active-sleep-state {
+ pins = "gpio10";
+ function = "mdp_vsync";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
};
&venus {
--
2.53.0
^ permalink raw reply related
* [PATCH v7 09/15] arm64: dts: qcom: sdm845-lg-judyln: Add lab/ibb
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna, Konrad Dybcio
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
These regulators are required for the LCD
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
index 6b837da4ef21..2c024b32c00c 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
@@ -71,6 +71,23 @@ &ipa {
firmware-name = "qcom/sdm845/LG/judyln/ipa_fws.mbn";
};
+&ibb {
+ regulator-min-microvolt = <5500000>;
+ regulator-max-microvolt = <5500000>;
+ regulator-over-current-protection;
+ regulator-pull-down;
+ regulator-soft-start;
+ qcom,discharge-resistor-kohms = <300>;
+};
+
+&lab {
+ regulator-min-microvolt = <5500000>;
+ regulator-max-microvolt = <5500000>;
+ regulator-over-current-protection;
+ regulator-pull-down;
+ regulator-soft-start;
+};
+
&mss_pil {
firmware-name = "qcom/sdm845/LG/judyln/mba.mbn", "qcom/sdm845/LG/judyln/modem.mbn";
};
--
2.53.0
^ permalink raw reply related
* [PATCH v7 08/15] arm64: dts: qcom: sdm845-lg-common: Add LEDs
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna, Pavel Machek, Konrad Dybcio
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
From: Amir Dahan <system64fumo@tuta.io>
Add the multicolor status LED in the phone's notch.
Signed-off-by: Amir Dahan <system64fumo@tuta.io>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 28 ++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 27221b3afb30..51cd930488a9 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -6,6 +6,7 @@
*/
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
@@ -497,6 +498,33 @@ &pm8998_resin {
status = "okay";
};
+&pmi8998_lpg {
+ status = "okay";
+
+ multi-led {
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@3 {
+ reg = <3>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+
+ led@4 {
+ reg = <4>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@5 {
+ reg = <5>;
+ color = <LED_COLOR_ID_RED>;
+ };
+ };
+};
+
&qupv3_id_0 {
status = "okay";
};
--
2.53.0
^ permalink raw reply related
* [PATCH v7 07/15] arm64: dts: qcom: sdm845-lg-judyln: Add battery and charger
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna, Konrad Dybcio
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
From: Christopher Brown <crispybrown@gmail.com>
Values based on lineageos kernel
https://github.com/LineageOS/android_kernel_lge_sdm845/blob/lineage-22.2/arch/arm64/boot/dts/lge/sdm845-battery/LGE_BLT39_LGC_3000mAh.dtsi
Signed-off-by: Christopher Brown <crispybrown@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
index 90dd5a2a6f30..6b837da4ef21 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
@@ -37,6 +37,14 @@ key-thinq {
interrupts = <89 IRQ_TYPE_LEVEL_LOW>;
};
};
+
+ battery: battery {
+ compatible = "simple-battery";
+
+ charge-full-design-microamp-hours = <3000000>;
+ voltage-min-design-microvolt = <3200000>;
+ voltage-max-design-microvolt = <4400000>;
+ };
};
&adsp_pas {
@@ -67,6 +75,12 @@ &mss_pil {
firmware-name = "qcom/sdm845/LG/judyln/mba.mbn", "qcom/sdm845/LG/judyln/modem.mbn";
};
+&pmi8998_charger {
+ monitored-battery = <&battery>;
+
+ status = "okay";
+};
+
&tlmm {
thinq_key_default: thinq-key-default-state {
pins = "gpio89";
--
2.53.0
^ permalink raw reply related
* [PATCH v7 06/15] arm64: dts: qcom: sdm845-lg: Add uarts and Bluetooth
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna, Dmitry Baryshkov
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
uart9 is debug serial on USB SBU1/2
UART RX is SBU1 and UART TX is SBU2 of the USB-C port).
1.8V Logic Level
Tested using pololu usb07a https://www.pololu.com/product/2585
and CH340 USB-UART
uart6 is bluetooth
Bluetooth: hci0: setting up wcn399x
Bluetooth: hci0: QCA Product ID :0x0000000a
Bluetooth: hci0: QCA SOC Version :0x40010214
Bluetooth: hci0: QCA ROM Version :0x00000201
Bluetooth: hci0: QCA Patch Version:0x00000001
Bluetooth: hci0: QCA controller version 0x02140201
Bluetooth: hci0: QCA Downloading qca/crbtfw21.tlv
Bluetooth: hci0: QCA Downloading qca/judyln/crnv21.bin
Bluetooth: hci0: QCA setup on UART is completed
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 37 ++++++++++++++++++++++++++
arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 8 ++++++
arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts | 8 ++++++
3 files changed, 53 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 8b7a271b7568..27221b3afb30 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -27,10 +27,17 @@
/delete-node/ &wlan_msa_mem;
/ {
+ aliases {
+ serial0 = &uart9;
+ serial1 = &uart6;
+ };
+
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
+
+ stdout-path = "serial0:115200n8";
};
reserved-memory {
@@ -498,6 +505,16 @@ &qupv3_id_1 {
status = "okay";
};
+&qup_uart9_rx {
+ drive-strength = <2>;
+ bias-pull-up;
+};
+
+&qup_uart9_tx {
+ drive-strength = <2>;
+ bias-disable;
+};
+
&sdhc_2 {
cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>;
@@ -548,6 +565,26 @@ sd_card_det_n: sd-card-det-n-state {
};
};
+&uart6 {
+ pinctrl-0 = <&qup_uart6_4pin>;
+
+ status = "okay";
+
+ bluetooth: bluetooth {
+ compatible = "qcom,wcn3990-bt";
+
+ vddio-supply = <&vreg_s4a_1p8>;
+ vddxo-supply = <&vreg_l7a_1p8>;
+ vddrf-supply = <&vreg_l17a_1p3>;
+ vddch0-supply = <&vreg_l25a_3p3>;
+ max-speed = <3200000>;
+ };
+};
+
+&uart9 {
+ status = "okay";
+};
+
/*
* UFS works partially and only with clk_ignore_unused.
* Sometimes it crashes with I/O errors.
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
index 6d6cc197176c..90dd5a2a6f30 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
@@ -43,6 +43,14 @@ &adsp_pas {
firmware-name = "qcom/sdm845/LG/judyln/adsp.mbn";
};
+&bluetooth {
+ /*
+ * This path is relative to the qca/
+ * subdir under lib/firmware.
+ */
+ firmware-name = "judyln/crnv21.bin";
+};
+
&cdsp_pas {
firmware-name = "qcom/sdm845/LG/judyln/cdsp.mbn";
};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
index fd62abbb7128..efca260c3dcf 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
@@ -29,6 +29,14 @@ &adsp_pas {
firmware-name = "qcom/sdm845/LG/judyp/adsp.mbn";
};
+&bluetooth {
+ /*
+ * This path is relative to the qca/
+ * subdir under lib/firmware.
+ */
+ firmware-name = "judyp/crnv21.bin";
+};
+
&cdsp_pas {
firmware-name = "qcom/sdm845/LG/judyp/cdsp.mbn";
};
--
2.53.0
^ permalink raw reply related
* [PATCH v7 05/15] arm64: dts: qcom: sdm845-lg-common: Enable qups and their dma controllers
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
Qualcomm serial communicators required for i2c, serial, and spi
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 87ac41ec2e46..8b7a271b7568 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -454,6 +454,14 @@ &gcc {
<GCC_LPASS_SWAY_CLK>;
};
+&gpi_dma0 {
+ status = "okay";
+};
+
+&gpi_dma1 {
+ status = "okay";
+};
+
&gpu {
status = "okay";
};
@@ -482,6 +490,14 @@ &pm8998_resin {
status = "okay";
};
+&qupv3_id_0 {
+ status = "okay";
+};
+
+&qupv3_id_1 {
+ status = "okay";
+};
+
&sdhc_2 {
cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>;
--
2.53.0
^ permalink raw reply related
* [PATCH v7 04/15] arm64: dts: qcom: sdm845-lg-common: Enable venus
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
Qualcomm video en/de-coder
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 93ed8f240461..87ac41ec2e46 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -580,3 +580,7 @@ &usb_1_qmpphy {
status = "okay";
};
+
+&venus {
+ status = "okay";
+};
--
2.53.0
^ permalink raw reply related
* [PATCH v7 03/15] arm64: dts: qcom: sdm845-lg-judyp: Define firmware paths for judyp
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
For consistency with judyln and new naming scheme for firmware
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
index ffe1da2227f0..fd62abbb7128 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts
@@ -26,17 +26,25 @@ framebuffer@9d400000 {
};
&adsp_pas {
- firmware-name = "qcom/sdm845/judyp/adsp.mbn";
+ firmware-name = "qcom/sdm845/LG/judyp/adsp.mbn";
};
&cdsp_pas {
- firmware-name = "qcom/sdm845/judyp/cdsp.mbn";
+ firmware-name = "qcom/sdm845/LG/judyp/cdsp.mbn";
};
&gpu_zap_shader {
- firmware-name = "qcom/sdm845/judyp/a630_zap.mbn";
+ firmware-name = "qcom/sdm845/LG/judyp/a630_zap.mbn";
+};
+
+&ipa {
+ firmware-name = "qcom/sdm845/LG/judyp/ipa_fws.mbn";
};
&mss_pil {
- firmware-name = "qcom/sdm845/judyp/mba.mbn", "qcom/sdm845/judyp/modem.mbn";
+ firmware-name = "qcom/sdm845/LG/judyp/mba.mbn", "qcom/sdm845/LG/judyp/modem.mbn";
+};
+
+&venus {
+ firmware-name = "qcom/sdm845/LG/judyp/venus.mbn";
};
--
2.53.0
^ permalink raw reply related
* [PATCH v7 00/15] arm64: dts: qcom: sdm845-lg: Improve hardware support in devicetree
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna, Konrad Dybcio, Dmitry Baryshkov, Pavel Machek
Rollup of improved hardware support via devicetree for LG G7 ThinQ
(judyln) from sdm845-mainline kernel fork
Notably, this patch-series enables full DRM acceleration and wifi,
among other small improvements in individual commits
after this patch-series the main things that remain to be worked
on include touchscreen, audio, and modem.
Depends upon panel driver patch-series https://lore.kernel.org/all/20250910-judyln-panel-v1-1-825c74403bbb@postmarketos.org/T/#r9a976ca01e309b6c03100e984a26a0ffc2fe2002
Co-developed-by: Amir Dahan <system64fumo@tuta.io>
Co-developed-by: Christopher Brown <crispybrown@gmail.com>
Signed-off-by: Amir Dahan <system64fumo@tuta.io>
Signed-off-by: Christopher Brown <crispybrown@gmail.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
Changes in v7:
- Reorganize commits
- Add firmware-paths for judyp
- Reword framebuffer reference commit message
- Squash qups and dma-controllers commits
- Link to v6: https://lore.kernel.org/r/20260323-judyln-dts-v6-0-29d70ca1651c@postmarketos.org
Changes in v6:
- Mistakes were made with b4 and branch was rebuilt, hopefully correctly
- Split more things that got mixed into the sort commit (qups and venus)
- Added more backlight properties from downstream
- Framebuffer added back in
- Update compatible for panel
- Add qcom,te-source
- Reference memory region in framebuffer instead of reg
- Correction to rmtfs_mem
- Set lab/ibb to 5.5V
- Fixed flashlight/torch
- Update commit message for gsi-loader=self
- Update LG to capitalized in firmware paths
- Remove qcom,snoc-host-cap-skip-quirk dependency (break wifi)
- Enable dma controllers
- Link to v5: https://lore.kernel.org/r/20251203-judyln-dts-v5-0-80c1ffca8487@postmarketos.org
Changes in v5:
- update system64's email
- reduce lab/ibb voltage range
- status should go last
- remove rebase leftovers
- fix flashlight
- Link to v4: https://lore.kernel.org/r/20251125-judyln-dts-v4-0-a5a60500b267@postmarketos.org
Changes in v4:
- add panel identifier in addition to ddic
- make sde_te pull-down
- fixup flash current
- remove framebuffer reserved-mem
- remove manual lower guard
- depend upon https://lore.kernel.org/all/20251110-skip-host-cam-qmi-req-v2-0-0daf485a987a@ixit.cz/T
- reword commits
- Link to v3: https://lore.kernel.org/r/20250928-judyln-dts-v3-0-b14cf9e9a928@postmarketos.org
Changes in v3:
- change firmware paths to lowercase 'lg' (matching dt-bindings)
- fix signoffs
- add wifi dmesg to commit message
- remove regulator-always-on from ibb
- remove framebuffer
- remove msm ids
- don't continue commit subject into commit messages
- split bluetooth node
- add sbu uart details to commit message
- change ipa gsi-loader to self
- Link to v2: https://lore.kernel.org/r/20250916-judyln-dts-v2-0-5e16e60263af@postmarketos.org
Changes in v2:
- sort at the start
- drop unnecessary labels
- drop unnecessary gmu
- multi-led
- split fb-panel changes
- expand upon firmware commit message
- use qcom,calibration-variant instead of
qcom,ath10k-calibration-variant
- change firmware paths to include "LG"
- remove framebuffer reservation
- add lab/ibb
- Link to v1: https://lore.kernel.org/r/20250913-judyln-dts-v1-0-23b4b7790dce@postmarketos.org
---
Amir Dahan (1):
arm64: dts: qcom: sdm845-lg-common: Add LEDs
Christopher Brown (1):
arm64: dts: qcom: sdm845-lg-judyln: Add battery and charger
Paul Sajna (13):
arm64: dts: qcom: sdm845-lg-common: Sort nodes and properties
arm64: dts: qcom: sdm845-lg-judyln: Add firmware nodes, change path
arm64: dts: qcom: sdm845-lg-judyp: Define firmware paths for judyp
arm64: dts: qcom: sdm845-lg-common: Enable venus
arm64: dts: qcom: sdm845-lg-common: Enable qups and their dma controllers
arm64: dts: qcom: sdm845-lg: Add uarts and Bluetooth
arm64: dts: qcom: sdm845-lg-judyln: Add lab/ibb
arm64: dts: qcom: sdm845-lg-judyln: Add display panel
arm64: dts: qcom: sdm845-lg: Add wifi nodes
arm64: dts: qcom: sdm845-lg-common: Add chassis-type
arm64: dts: qcom: sdm845-lg-common: Add camera flash
arm64: dts: qcom: sdm845-lg-common: Change ipa gsi-loader to 'self', add memory-region
arm64: dts: qcom: sdm845-lg-{judyln, judyp}: Reference memory region in fb
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 228 +++++++++++++++++++------
arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 129 +++++++++++++-
arch/arm64/boot/dts/qcom/sdm845-lg-judyp.dts | 30 +++-
3 files changed, 319 insertions(+), 68 deletions(-)
---
base-commit: 674feabdc26e80c4dbc884d7b6e2d2a4b93919e6
change-id: 20250911-judyln-dts-17c41e59dc0f
prerequisite-message-id: <20250910-judyln-panel-v1-1-825c74403bbb@postmarketos.org>
prerequisite-patch-id: e51151ea7f8fdad6ad7d90713febc5c6b6fc4f9c
prerequisite-patch-id: b3dd44250da9cd12bc5b2d0d7e865dbe19ceed92
prerequisite-patch-id: fd6c8077806cb03fcf37d0e0d730314c2760e334
Best regards,
--
Paul Sajna <sajattack@postmarketos.org>
^ permalink raw reply
* [PATCH v7 02/15] arm64: dts: qcom: sdm845-lg-judyln: Add firmware nodes, change path
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
Add paths for Qualcomm firmware, including:
ipa, modem, venus, gpu
GPU and bluetooth are confirmed working, others may need more
testing/fixes
But regardless they will need the firmware paths specified here
and firmware added upstream before they will work, so might as well
get started on it now.
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
index 09bfcef42402..6d6cc197176c 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
@@ -40,19 +40,23 @@ key-thinq {
};
&adsp_pas {
- firmware-name = "qcom/sdm845/judyln/adsp.mbn";
+ firmware-name = "qcom/sdm845/LG/judyln/adsp.mbn";
};
&cdsp_pas {
- firmware-name = "qcom/sdm845/judyln/cdsp.mbn";
+ firmware-name = "qcom/sdm845/LG/judyln/cdsp.mbn";
};
&gpu_zap_shader {
- firmware-name = "qcom/sdm845/judyln/a630_zap.mbn";
+ firmware-name = "qcom/sdm845/LG/judyln/a630_zap.mbn";
+};
+
+&ipa {
+ firmware-name = "qcom/sdm845/LG/judyln/ipa_fws.mbn";
};
&mss_pil {
- firmware-name = "qcom/sdm845/judyln/mba.mbn", "qcom/sdm845/judyln/modem.mbn";
+ firmware-name = "qcom/sdm845/LG/judyln/mba.mbn", "qcom/sdm845/LG/judyln/modem.mbn";
};
&tlmm {
@@ -64,3 +68,7 @@ thinq_key_default: thinq-key-default-state {
bias-pull-up;
};
};
+
+&venus {
+ firmware-name = "qcom/sdm845/LG/judyln/venus.mbn";
+};
--
2.53.0
^ permalink raw reply related
* [PATCH v7 01/15] arm64: dts: qcom: sdm845-lg-common: Sort nodes and properties
From: Paul Sajna @ 2026-04-01 3:15 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, David Heidelberg
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
~postmarketos/upstreaming, Amir Dahan, Christopher Brown,
Paul Sajna, Konrad Dybcio, Dmitry Baryshkov
In-Reply-To: <20260331-judyln-dts-v7-0-87217b15fefb@postmarketos.org>
Improve adherance to style guidelines below:
https://docs.kernel.org/devicetree/bindings/dts-coding-style.html
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 124 ++++++++++++-------------
1 file changed, 62 insertions(+), 62 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 0ee2f4b99fbd..93ed8f240461 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -38,11 +38,6 @@ reserved-memory {
#size-cells = <2>;
ranges;
- qseecom_mem: memory@b2000000 {
- reg = <0 0xb2000000 0 0x1800000>;
- no-map;
- };
-
gpu_mem: memory@8c415000 {
reg = <0 0x8c415000 0 0x2000>;
no-map;
@@ -99,6 +94,11 @@ memory@9d400000 {
no-map;
};
+ qseecom_mem: memory@b2000000 {
+ reg = <0 0xb2000000 0 0x1800000>;
+ no-map;
+ };
+
rmtfs_mem: rmtfs-region@f0800000 {
compatible = "qcom,rmtfs-mem";
reg = <0 0xf0800000 0 0x202000>;
@@ -467,14 +467,22 @@ &mss_pil {
status = "okay";
};
+&pm8998_gpios {
+ vol_up_pin_a: vol-up-active-state {
+ pins = "gpio6";
+ function = "normal";
+ input-enable;
+ bias-pull-up;
+ qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
+ };
+};
+
&pm8998_resin {
linux,code = <KEY_VOLUMEDOWN>;
status = "okay";
};
&sdhc_2 {
- status = "okay";
-
cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
@@ -482,55 +490,8 @@ &sdhc_2 {
vmmc-supply = <&vreg_l21a_2p95>;
vqmmc-supply = <&vddpx_2>;
-};
-
-/*
- * UFS works partially and only with clk_ignore_unused.
- * Sometimes it crashes with I/O errors.
- */
-&ufs_mem_hc {
- status = "okay";
-
- reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
-
- vcc-supply = <&vreg_l20a_2p95>;
- vcc-max-microamp = <600000>;
-};
-
-&ufs_mem_phy {
- status = "okay";
-
- vdda-phy-supply = <&vdda_ufs1_core>;
- vdda-pll-supply = <&vdda_ufs1_1p2>;
-};
-
-&usb_1 {
- status = "okay";
-};
-
-&usb_1_dwc3 {
- /* TODO: these devices have usb id pin */
- dr_mode = "peripheral";
-};
-
-&usb_1_hsphy {
- status = "okay";
-
- vdd-supply = <&vdda_usb1_ss_core>;
- vdda-pll-supply = <&vdda_qusb_hs0_1p8>;
- vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>;
-
- qcom,imp-res-offset-value = <8>;
- qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
- qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
- qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
-};
-&usb_1_qmpphy {
status = "okay";
-
- vdda-phy-supply = <&vdda_usb1_ss_1p2>;
- vdda-pll-supply = <&vdda_usb1_ss_core>;
};
/* PINCTRL - additions to nodes defined in sdm845.dtsi */
@@ -571,12 +532,51 @@ sd_card_det_n: sd-card-det-n-state {
};
};
-&pm8998_gpios {
- vol_up_pin_a: vol-up-active-state {
- pins = "gpio6";
- function = "normal";
- input-enable;
- bias-pull-up;
- qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
- };
+/*
+ * UFS works partially and only with clk_ignore_unused.
+ * Sometimes it crashes with I/O errors.
+ */
+&ufs_mem_hc {
+ reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
+
+ vcc-supply = <&vreg_l20a_2p95>;
+ vcc-max-microamp = <600000>;
+
+ status = "okay";
+};
+
+&ufs_mem_phy {
+ vdda-phy-supply = <&vdda_ufs1_core>;
+ vdda-pll-supply = <&vdda_ufs1_1p2>;
+
+ status = "okay";
+};
+
+&usb_1 {
+ status = "okay";
+};
+
+&usb_1_dwc3 {
+ /* TODO: these devices have usb id pin */
+ dr_mode = "peripheral";
+};
+
+&usb_1_hsphy {
+ vdd-supply = <&vdda_usb1_ss_core>;
+ vdda-pll-supply = <&vdda_qusb_hs0_1p8>;
+ vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>;
+
+ qcom,imp-res-offset-value = <8>;
+ qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
+ qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
+ qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
+
+ status = "okay";
+};
+
+&usb_1_qmpphy {
+ vdda-phy-supply = <&vdda_usb1_ss_1p2>;
+ vdda-pll-supply = <&vdda_usb1_ss_core>;
+
+ status = "okay";
};
--
2.53.0
^ permalink raw reply related
* Re: [PATCH RFC 0/4] ASoC: Add TAS675x quad-channel Class-D amplifier driver
From: Sen Wang @ 2026-04-01 2:53 UTC (permalink / raw)
To: linux-sound
Cc: broonie, lgirdwood, robh, krzk+dt, conor+dt, devicetree, perex,
tiwai, shenghao-ding, kevin-lu, baojun.xu, niranjan.hy,
l-badrinarayanan, devarsht, v-singh1, linux-kernel
In-Reply-To: <20260401024210.28542-1-sen@ti.com>
On 3/31/26 21:42, Sen Wang wrote:
Apologies, the RFC tag was included by mistake. This is a proper
upstream submission, please kindly ignore the RFC tag.
> This series adds support for the TI TAS675x (TAS6754, TAS67524)
> quad-channel automotive Class-D amplifiers. The devices have an
> integrated DSP and load diagnostics, and are controlled over I2C.
>
> Patch 1 adds the dt-binding, patch 2 the codec driver, patch 3 the
> ALSA mixer controls documentation, and patch 4 adds the MAINTAINERS
> entry.
>
> Tested on AM62D-EVM with a TAS67CD-AEC daughter card, on setups &
> test procedures, refer to the Github repository.
>
> GitHub: https://github.com/SenWang125/tas67-linux
>
> Sen Wang (4):
> dt-bindings: sound: Add ti,tas675x
> ASoC: codecs: Add TAS675x quad-channel audio amplifier driver
> Documentation: sound: Add TAS675x codec mixer controls documentation
> MAINTAINERS: add entry for TAS675x audio amplifier
>
> .../devicetree/bindings/sound/ti,tas675x.yaml | 278 +++
> Documentation/sound/codecs/index.rst | 1 +
> Documentation/sound/codecs/tas675x.rst | 618 +++++
> MAINTAINERS | 4 +
> sound/soc/codecs/Kconfig | 12 +
> sound/soc/codecs/Makefile | 2 +
> sound/soc/codecs/tas675x.c | 2172 +++++++++++++++++
> sound/soc/codecs/tas675x.h | 367 +++
> 8 files changed, 3454 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/ti,tas675x.yaml
> create mode 100644 Documentation/sound/codecs/tas675x.rst
> create mode 100644 sound/soc/codecs/tas675x.c
> create mode 100644 sound/soc/codecs/tas675x.h
>
^ permalink raw reply
* [PATCH v2 2/2] hwmon: pmbus: Add support for Sony APS-379
From: Chris Packham @ 2026-04-01 2:42 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, linux
Cc: devicetree, linux-hwmon, linux-kernel, Chris Packham
In-Reply-To: <20260401024214.804237-1-chris.packham@alliedtelesis.co.nz>
Add pmbus support for Sony APS-379 power supplies. There are a few PMBUS
commands that return data that is undocumented/invalid so these need to
be rejected with -ENXIO. The READ_VOUT command returns data in linear11
format instead of linear16 so we need to workaround this.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Notes:
Changes in v2:
- Simplify code per recommendations from Guenter
- Add driver documentation
Documentation/hwmon/aps-379.rst | 58 +++++++++++
Documentation/hwmon/index.rst | 1 +
drivers/hwmon/pmbus/Kconfig | 6 ++
drivers/hwmon/pmbus/Makefile | 1 +
drivers/hwmon/pmbus/aps-379.c | 168 ++++++++++++++++++++++++++++++++
5 files changed, 234 insertions(+)
create mode 100644 Documentation/hwmon/aps-379.rst
create mode 100644 drivers/hwmon/pmbus/aps-379.c
diff --git a/Documentation/hwmon/aps-379.rst b/Documentation/hwmon/aps-379.rst
new file mode 100644
index 000000000000..468ec5a98fd6
--- /dev/null
+++ b/Documentation/hwmon/aps-379.rst
@@ -0,0 +1,58 @@
+Kernel driver aps-379
+=====================
+
+Supported chips:
+
+ * Sony APS-379
+
+ Prefix: 'aps-379'
+
+ Addresses scanned: -
+
+ Authors:
+ - Chris Packham
+
+Description
+-----------
+
+This driver implements support for the PMBus monitor on the Sony APS-379
+modular power supply. The APS-379 deviates from the PMBus standard for the
+READ_VOUT command by using the linear11 format instead of linear16.
+
+The known supported PMBus commands are:
+
+=== ============================= ========= ======= =====
+Cmd Function Protocol Scaling Bytes
+=== ============================= ========= ======= =====
+01 On / Off Command (OPERATION) Byte R/W -- 1
+10 WRITE_PROTECT Byte R/W -- 1
+3B FAN_COMMAND_1 Word R/W -- 2
+46 Current Limit (in percent) Word R/W 2^0 2
+47 Current Limit Fault Response Byte R/W -- 1
+79 Alarm Data Bits (STATUS_WORD) Word Rd -- 2
+8B Output Voltage (READ_VOUT) Word Rd 2^-4 2
+8C Output Current (READ_IOUT) Word Rd 2^-2 2
+8D Power Supply Ambient Temp Word Rd 2^0 2
+90 READ_FAN_SPEED_1 Word Rd 2^6 2
+91 READ_FAN_SPEED_2 Word Rd 2^6 2
+96 Output Wattage (READ_POUT) Word Rd 2^1 2
+97 Input Wattage (READ_PIN) Word Rd 2^1 2
+9A Unit Model Number (MFR_MODEL) Block R/W -- 10
+9B Unit Revision Number Block R/W -- 10
+9E Unit Serial Number Block R/W -- 8
+99 Unit Manufacturer ID (MFR_ID) Block R/W -- 8
+D0 Unit Run Time Information Block Rd -- 4
+D5 Firmware Version Rd cust -- 8
+B0 User Data 1 (USER_DATA_00) Block R/W -- 4
+B1 User Data 2 (USER_DATA_01) Block R/W -- 4
+B2 User Data 3 (USER_DATA_02) Block R/W -- 4
+B3 User Data 4 (USER_DATA_03) Block R/W -- 4
+B4 User Data 5 (USER_DATA_04) Block R/W -- 4
+B5 User Data 6 (USER_DATA_05) Block R/W -- 4
+B6 User Data 7 (USER_DATA_06) Block R/W -- 4
+B7 User Data 8 (USER_DATA_07) Block R/W -- 4
+F0 Calibration command Byte R/W -- 1
+F1 Calibration data Word Wr 2^9 2
+F2 Unlock Calibration Byte Wr -- 1
+=== ============================= ========= ======= =====
+
diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
index b2ca8513cfcd..2bc8d88b5724 100644
--- a/Documentation/hwmon/index.rst
+++ b/Documentation/hwmon/index.rst
@@ -41,6 +41,7 @@ Hardware Monitoring Kernel Drivers
adt7475
aht10
amc6821
+ aps-379
aquacomputer_d5next
asb100
asc7621
diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
index fc1273abe357..29076921e330 100644
--- a/drivers/hwmon/pmbus/Kconfig
+++ b/drivers/hwmon/pmbus/Kconfig
@@ -77,6 +77,12 @@ config SENSORS_ADP1050_REGULATOR
µModule regulators that can provide microprocessor power from 54V
power distribution architecture.
+config SENSORS_APS_379
+ tristate "Sony APS-379 Power Supplies"
+ help
+ If you say yes here you get hardware monitoring support for Sony
+ APS-379 Power Supplies.
+
config SENSORS_BEL_PFE
tristate "Bel PFE Compatible Power Supplies"
help
diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile
index d6c86924f887..94f36c7069ec 100644
--- a/drivers/hwmon/pmbus/Makefile
+++ b/drivers/hwmon/pmbus/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_SENSORS_ACBEL_FSG032) += acbel-fsg032.o
obj-$(CONFIG_SENSORS_ADM1266) += adm1266.o
obj-$(CONFIG_SENSORS_ADM1275) += adm1275.o
obj-$(CONFIG_SENSORS_ADP1050) += adp1050.o
+obj-$(CONFIG_SENSORS_APS_379) += aps-379.o
obj-$(CONFIG_SENSORS_BEL_PFE) += bel-pfe.o
obj-$(CONFIG_SENSORS_BPA_RS600) += bpa-rs600.o
obj-$(CONFIG_SENSORS_DELTA_AHE50DC_FAN) += delta-ahe50dc-fan.o
diff --git a/drivers/hwmon/pmbus/aps-379.c b/drivers/hwmon/pmbus/aps-379.c
new file mode 100644
index 000000000000..edc489558437
--- /dev/null
+++ b/drivers/hwmon/pmbus/aps-379.c
@@ -0,0 +1,168 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Hardware monitoring driver for Sony APS-379 Power Supplies
+ *
+ * Copyright 2026 Allied Telesis Labs
+ */
+
+#include <linux/i2c.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pmbus.h>
+#include "pmbus.h"
+
+struct aps_379_data {
+ struct pmbus_driver_info info;
+ u8 vout_linear_exponent;
+};
+
+#define to_aps_379_data(x) container_of(x, struct aps_379_data, info)
+
+static const struct i2c_device_id aps_379_id[] = {
+ { "aps-379", 0 },
+ {},
+};
+
+static int aps_379_read_byte_data(struct i2c_client *client, int page, int reg)
+{
+ const struct pmbus_driver_info *info = pmbus_get_driver_info(client);
+ struct aps_379_data *data = to_aps_379_data(info);
+
+ switch (reg) {
+ case PMBUS_VOUT_MODE:
+ /*
+ * The VOUT format used by the chip is linear11,
+ * not linear16. Report that VOUT is in linear mode
+ * and return exponent value extracted while probing
+ * the chip.
+ */
+ return data->vout_linear_exponent;
+ default:
+ return -ENODATA;
+ }
+}
+
+/*
+ * The APS-379 uses linear11 format instead of linear16. We've reported the exponent
+ * via the PMBUS_VOUT_MODE so we just return the mantissa here.
+ */
+static int aps_379_read_vout(struct i2c_client *client)
+{
+ int ret;
+
+ ret = pmbus_read_word_data(client, 0, 0xff, PMBUS_READ_VOUT);
+ if (ret < 0)
+ return ret;
+
+ return sign_extend32(ret & 0x7ff, 11);
+}
+
+static int aps_379_read_word_data(struct i2c_client *client, int page, int phase, int reg)
+{
+ switch (reg) {
+ case PMBUS_VOUT_UV_WARN_LIMIT:
+ case PMBUS_VOUT_OV_WARN_LIMIT:
+ case PMBUS_VOUT_UV_FAULT_LIMIT:
+ case PMBUS_VOUT_OV_FAULT_LIMIT:
+ case PMBUS_PIN_OP_WARN_LIMIT:
+ case PMBUS_POUT_OP_WARN_LIMIT:
+ case PMBUS_MFR_IIN_MAX:
+ case PMBUS_MFR_PIN_MAX:
+ case PMBUS_MFR_VOUT_MIN:
+ case PMBUS_MFR_VOUT_MAX:
+ case PMBUS_MFR_IOUT_MAX:
+ case PMBUS_MFR_POUT_MAX:
+ case PMBUS_MFR_MAX_TEMP_1:
+ /* These commands return data but it is invalid/un-documented */
+ return -ENXIO;
+ case PMBUS_READ_VOUT:
+ return aps_379_read_vout(client);
+ default:
+ if (reg >= PMBUS_VIRT_BASE)
+ return -ENXIO;
+ else
+ return -ENODATA;
+ }
+}
+
+static struct pmbus_driver_info aps_379_info = {
+ .pages = 1,
+ .format[PSC_VOLTAGE_OUT] = linear,
+ .format[PSC_CURRENT_OUT] = linear,
+ .format[PSC_POWER] = linear,
+ .format[PSC_TEMPERATURE] = linear,
+ .format[PSC_FAN] = linear,
+ .func[0] = PMBUS_HAVE_VOUT |
+ PMBUS_HAVE_IOUT |
+ PMBUS_HAVE_PIN | PMBUS_HAVE_POUT |
+ PMBUS_HAVE_TEMP |
+ PMBUS_HAVE_FAN12,
+ .read_byte_data = aps_379_read_byte_data,
+ .read_word_data = aps_379_read_word_data,
+};
+
+static int aps_379_probe(struct i2c_client *client)
+{
+ struct device *dev = &client->dev;
+ struct pmbus_driver_info *info;
+ struct aps_379_data *data;
+ u8 buf[I2C_SMBUS_BLOCK_MAX + 1];
+ int ret;
+
+ data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ memcpy(&data->info, &aps_379_info, sizeof(*info));
+ info = &data->info;
+
+ if (!i2c_check_functionality(client->adapter,
+ I2C_FUNC_SMBUS_READ_BYTE_DATA
+ | I2C_FUNC_SMBUS_READ_WORD_DATA
+ | I2C_FUNC_SMBUS_READ_BLOCK_DATA))
+ return -ENODEV;
+
+ ret = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL, buf);
+ if (ret < 0) {
+ dev_err(dev, "Failed to read Manufacturer Model\n");
+ return ret;
+ }
+
+ if (strncasecmp(buf, aps_379_id[0].name, strlen(aps_379_id[0].name)) != 0) {
+ buf[ret] = '\0';
+ dev_err(dev, "Unsupported Manufacturer Model '%s'\n", buf);
+ return -ENODEV;
+ }
+
+ ret = i2c_smbus_read_word_data(client, PMBUS_READ_VOUT);
+ if (ret < 0) {
+ dev_err(dev, "Can't get vout exponent.\n");
+ return ret;
+ }
+ data->vout_linear_exponent = (u8)((ret >> 11) & 0x1f);
+
+ return pmbus_do_probe(client, info);
+}
+
+static const struct of_device_id __maybe_unused aps_379_of_match[] = {
+ { .compatible = "sony,aps-379" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, aps_379_of_match);
+
+static struct i2c_driver aps_379_driver = {
+ .driver = {
+ .name = "aps-379",
+ .of_match_table = of_match_ptr(aps_379_of_match),
+ },
+ .probe = aps_379_probe,
+ .id_table = aps_379_id,
+};
+
+module_i2c_driver(aps_379_driver);
+
+MODULE_AUTHOR("Chris Packham");
+MODULE_DESCRIPTION("PMBus driver for Sony APS-379");
+MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("PMBUS");
--
2.53.0
^ permalink raw reply related
* [PATCH v2 1/2] dt-bindings: trivial-devices: Add sony,aps-379
From: Chris Packham @ 2026-04-01 2:42 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, linux
Cc: devicetree, linux-hwmon, linux-kernel, Chris Packham
In-Reply-To: <20260401024214.804237-1-chris.packham@alliedtelesis.co.nz>
Add the compatible string for the sony,aps-379. This is a simple PMBus
(I2C) device that requires no additional attributes.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index a482aeadcd44..0a559beff878 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -430,6 +430,8 @@ properties:
- smsc,emc6d103s
# Socionext Uniphier SMP control registers
- socionext,uniphier-smpctrl
+ # Sony APS-379 Power Supply
+ - sony,aps-379
# SparkFun Qwiic Joystick (COM-15168) with i2c interface
- sparkfun,qwiic-joystick
# STMicroelectronics Hot-swap controller stef48h28
--
2.53.0
^ permalink raw reply related
* [PATCH v2 0/2] hwmon: pmbus: Sony APS-379
From: Chris Packham @ 2026-04-01 2:42 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, linux
Cc: devicetree, linux-hwmon, linux-kernel, Chris Packham
This series add support for the PMBus hwmon on the Sony
APS-379 power supply module. There's some deviations from
the PMBus specification that need to be dealt with.
Chris Packham (2):
dt-bindings: trivial-devices: Add sony,aps-379
hwmon: pmbus: Add support for Sony APS-379
.../devicetree/bindings/trivial-devices.yaml | 2 +
Documentation/hwmon/aps-379.rst | 58 ++++++
Documentation/hwmon/index.rst | 1 +
drivers/hwmon/pmbus/Kconfig | 6 +
drivers/hwmon/pmbus/Makefile | 1 +
drivers/hwmon/pmbus/aps-379.c | 168 ++++++++++++++++++
6 files changed, 236 insertions(+)
create mode 100644 Documentation/hwmon/aps-379.rst
create mode 100644 drivers/hwmon/pmbus/aps-379.c
--
2.53.0
^ permalink raw reply
* [PATCH 3/4] Documentation: sound: Add TAS675x codec mixer controls documentation
From: Sen Wang @ 2026-04-01 2:42 UTC (permalink / raw)
To: linux-sound
Cc: broonie, lgirdwood, robh, krzk+dt, conor+dt, devicetree, perex,
tiwai, shenghao-ding, kevin-lu, baojun.xu, niranjan.hy,
l-badrinarayanan, devarsht, v-singh1, linux-kernel, Sen Wang
In-Reply-To: <20260401024210.28542-1-sen@ti.com>
Add ALSA mixer controls documentation for the TAS675x driver, covering
DSP signal path modes, volume controls, load diagnostics, and fault
monitoring.
Signed-off-by: Sen Wang <sen@ti.com>
---
Documentation/sound/codecs/index.rst | 1 +
Documentation/sound/codecs/tas675x.rst | 618 +++++++++++++++++++++++++
2 files changed, 619 insertions(+)
create mode 100644 Documentation/sound/codecs/tas675x.rst
diff --git a/Documentation/sound/codecs/index.rst b/Documentation/sound/codecs/index.rst
index 2cb95d87bbef..7594d0a38d6b 100644
--- a/Documentation/sound/codecs/index.rst
+++ b/Documentation/sound/codecs/index.rst
@@ -7,3 +7,4 @@ Codec-Specific Information
:maxdepth: 2
cs35l56
+ tas675x
diff --git a/Documentation/sound/codecs/tas675x.rst b/Documentation/sound/codecs/tas675x.rst
new file mode 100644
index 000000000000..334b1d8be3ea
--- /dev/null
+++ b/Documentation/sound/codecs/tas675x.rst
@@ -0,0 +1,618 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+======================================
+TAS675x Codec Mixer Controls
+======================================
+
+This document describes the ALSA mixer controls for the TAS675x
+4-channel automotive Class-D amplifier driver.
+
+For device tree bindings, see:
+Documentation/devicetree/bindings/sound/ti,tas675x.yaml
+
+DSP Signal Path Mode
+====================
+
+DSP Signal Path Mode
+--------------------
+
+:Description: Signal processing mode selection.
+:Type: Enumerated
+:Default: Normal
+:Options: Normal, LLP, FFLP
+
+Normal
+ Full DSP with all features available.
+
+LLP (Low Latency Path)
+ Bypasses DSP processing. DSP protection features (Thermal Foldback,
+ PVDD Foldback, Clip Detect) and Real-Time Load Diagnostics unavailable.
+
+FFLP (Full Feature Low Latency Path)
+ Reduced latency. Real-Time Load Diagnostics unavailable.
+
+The following controls are unavailable in LLP mode:
+``Thermal Foldback Switch``, ``PVDD Foldback Switch``,
+``DC Blocker Bypass Switch``, ``Clip Detect Switch``, ``Audio SDOUT Switch``.
+
+The following controls require Normal mode (unavailable in FFLP and LLP):
+``CHx RTLDG Switch``, ``RTLDG Clip Mask Switch``, ``ISENSE Calibration Switch``,
+``RTLDG Open Load Threshold``, ``RTLDG Short Load Threshold``,
+``CHx RTLDG Impedance``, ``RTLDG Fault Latched``.
+
+Volume Controls
+===============
+
+Analog Playback Volume
+----------------------
+
+:Description: Analog output gain for all channels (CH1/CH2 and CH3/CH4 pairs).
+:Type: Volume (TLV)
+:Default: 0 dB
+:Range: -15.5 dB to 0 dB (0.5 dB steps)
+
+Analog Gain Ramp Step
+---------------------
+
+:Description: Anti-pop ramp step duration for analog gain transitions.
+:Type: Enumerated
+:Default: 15us
+:Options: 15us, 60us, 200us, 400us
+
+CHx Digital Playback Volume
+---------------------------
+
+:Description: Per-channel digital volume control (x = 1, 2, 3, 4).
+:Type: Volume (TLV)
+:Default: 0 dB
+:Range: -103 dB to 0 dB (0.5 dB steps)
+:Bounds: 0x30 (min/mute) to 0xFF (max)
+
+Volume Ramp Down Rate
+---------------------
+
+:Description: Update frequency during mute transition.
+:Type: Enumerated
+:Default: 16 FS
+:Options: 4 FS, 16 FS, 32 FS, Instant
+
+Volume Ramp Down Step
+---------------------
+
+:Description: dB change per update during mute.
+:Type: Enumerated
+:Default: 0.5dB
+:Options: 4dB, 2dB, 1dB, 0.5dB
+
+Volume Ramp Up Rate
+-------------------
+
+:Description: Update frequency during unmute transition.
+:Type: Enumerated
+:Default: 16 FS
+:Options: 4 FS, 16 FS, 32 FS, Instant
+
+Volume Ramp Up Step
+-------------------
+
+:Description: dB change per update during unmute.
+:Type: Enumerated
+:Default: 0.5dB
+:Options: 4dB, 2dB, 1dB, 0.5dB
+
+CH1/2 Volume Combine
+--------------------
+
+:Description: Links digital volume controls for CH1 and CH2.
+:Type: Enumerated
+:Default: Independent
+:Options: Independent, CH2 follows CH1, CH1 follows CH2
+
+CH3/4 Volume Combine
+--------------------
+
+:Description: Links digital volume controls for CH3 and CH4.
+:Type: Enumerated
+:Default: Independent
+:Options: Independent, CH4 follows CH3, CH3 follows CH4
+
+Auto Mute & Silence Detection
+==============================
+
+CHx Auto Mute Switch
+--------------------
+
+:Description: Enables automatic muting on zero-signal detection (x = 1, 2, 3, 4).
+:Type: Boolean Switch
+:Default: Disabled (0)
+
+Auto Mute Combine Switch
+------------------------
+
+:Description: Coordinated muting behaviour across all channels.
+:Type: Boolean Switch
+:Default: Disabled (0)
+:Behavior: Disabled: channels mute independently when their signal is zero.
+ Enabled: all channels mute together only when all detect zero
+ signal; unmute when any channel has non-zero signal.
+
+CHx Auto Mute Time
+------------------
+
+:Description: Duration of zero signal before muting triggers (x = 1, 2, 3, 4).
+:Type: Enumerated
+:Default: 11.5ms
+:Options: 11.5ms, 53ms, 106.5ms, 266.5ms, 535ms, 1065ms, 2665ms, 5330ms
+:Note: Values are at 96 kHz. At 48 kHz, times are doubled.
+
+Clock & EMI Management
+======================
+
+Spread Spectrum Mode
+--------------------
+
+:Description: Frequency dithering mode to reduce peak EMI.
+:Type: Enumerated
+:Default: Disabled
+:Options: Disabled, Triangle, Random, Triangle and Random
+
+SS Triangle Range
+-----------------
+
+:Description: Frequency deviation range for Triangle spread spectrum.
+:Type: Enumerated
+:Default: 6.5%
+:Options: 6.5%, 13.5%, 5%, 10%
+:Note: Applies only when Spread Spectrum Mode includes Triangle.
+
+SS Random Range
+---------------
+
+:Description: Frequency deviation range for Random spread spectrum.
+:Type: Enumerated
+:Default: 0.83%
+:Options: 0.83%, 2.50%, 5.83%, 12.50%, 25.83%
+:Note: Applies only when Spread Spectrum Mode includes Random.
+
+SS Random Dwell Range
+---------------------
+
+:Description: Dwell time range for Random spread spectrum (FSS = spread
+ spectrum modulation frequency).
+:Type: Enumerated
+:Default: 1/FSS to 2/FSS
+:Options: 1/FSS to 2/FSS, 1/FSS to 4/FSS, 1/FSS to 8/FSS, 1/FSS to 15/FSS
+:Note: Applies only when Spread Spectrum Mode includes Random.
+
+SS Triangle Dwell Min
+---------------------
+
+:Description: Minimum dwell time for Triangle spread spectrum.
+:Type: Integer
+:Default: 0
+:Range: 0 to 15 (raw register value)
+
+SS Triangle Dwell Max
+---------------------
+
+:Description: Maximum dwell time for Triangle spread spectrum.
+:Type: Integer
+:Default: 0
+:Range: 0 to 15 (raw register value)
+
+Hardware Protection
+===================
+
+OTSD Auto Recovery Switch
+--------------------------
+
+:Description: Enables automatic recovery from over-temperature shutdown.
+:Type: Boolean Switch
+:Default: Disabled (0)
+:Note: When disabled, manual fault clearing is required after OTSD events.
+
+Overcurrent Limit Level
+-----------------------
+
+:Description: Current-limit trip point sensitivity.
+:Type: Enumerated
+:Default: Level 4 (least sensitive)
+:Options: Level 4 (least sensitive), Level 3, Level 2, Level 1 (most sensitive)
+
+CHx OTW Threshold
+-----------------
+
+:Description: Over-temperature warning threshold per channel (x = 1, 2, 3, 4).
+:Type: Enumerated
+:Default: >95C
+:Options: Disabled, >95C, >110C, >125C, >135C, >145C, >155C, >165C
+
+Temperature and Voltage Monitoring
+===================================
+
+PVDD Sense
+----------
+
+:Description: Supply voltage sense register.
+:Type: Integer (read-only)
+:Range: 0 to 255
+:Conversion: value × 0.19 V
+
+Global Temperature
+------------------
+
+:Description: Global die temperature sense register.
+:Type: Integer (read-only)
+:Range: 0 to 255
+:Conversion: (value × 0.5 °C) − 50 °C
+
+CHx Temperature Range
+---------------------
+
+:Description: Per-channel coarse temperature range indicator (x = 1, 2, 3, 4).
+:Type: Integer (read-only)
+:Range: 0 to 3
+:Mapping: 0 = <80 °C, 1 = 80–100 °C, 2 = 100–120 °C, 3 = >120 °C
+
+Load Diagnostics
+================
+
+The TAS675x provides three load diagnostic modes:
+
+DC Load Diagnostics (DC LDG)
+ Measures DC resistance to detect S2G (short-to-ground), S2P
+ (short-to-power), OL (open load), and SL (shorted load) faults.
+
+AC Load Diagnostics (AC LDG)
+ Measures complex AC impedance at a configurable frequency. Detects
+ capacitive loads and tweeter configurations.
+
+Real-Time Load Diagnostics (RTLDG)
+ Monitors impedance continuously during playback using a pilot tone.
+ Normal DSP mode only, at 48 kHz or 96 kHz.
+
+Fast Boot Mode
+--------------
+
+By default the device runs DC load diagnostics at initialisation before
+accepting audio. Setting ``ti,fast-boot`` in the device tree bypasses this
+initial diagnostic run for faster startup. Automatic diagnostics after
+fault recovery remain enabled::
+
+ codec: tas675x@70 {
+ compatible = "ti,tas67524";
+ reg = <0x70>;
+ ti,fast-boot;
+ };
+
+DC Load Diagnostics
+-------------------
+
+The ``CHx DC LDG Report`` 4-bit fault field uses the following encoding:
+
+ ====== =========== ===================================================
+ Bit Fault Description
+ ====== =========== ===================================================
+ [3] S2G Short-to-Ground
+ [2] S2P Short-to-Power
+ [1] OL Open Load
+ [0] SL Shorted Load
+ ====== =========== ===================================================
+
+DC LDG Trigger
+~~~~~~~~~~~~~~
+
+:Description: Triggers manual DC load diagnostics on all channels.
+:Type: Boolean (write-only)
+:Note: Returns -EBUSY if any DAI stream (playback or capture) is active.
+ The driver manages all channel state transitions. Blocks until
+ diagnostics complete or time out (300 ms).
+
+DC LDG Auto Diagnostics Switch
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+:Description: Enables automatic DC diagnostics after fault recovery.
+:Type: Boolean Switch
+:Default: Enabled (1)
+:Note: When enabled, affected channels re-run diagnostics after fault
+ recovery and retry approximately every 750 ms until resolved.
+
+CHx LO LDG Switch
+~~~~~~~~~~~~~~~~~
+
+:Description: Enables line output load detection per channel (x = 1, 2, 3, 4).
+:Type: Boolean Switch
+:Default: Disabled (0)
+:Note: When enabled and DC diagnostics report OL, the device tests for
+ a high-impedance line output load.
+
+DC LDG SLOL Ramp Time
+~~~~~~~~~~~~~~~~~~~~~
+
+:Description: Voltage ramp time for shorted-load and open-load detection.
+:Type: Enumerated
+:Default: 15 ms
+:Options: 15 ms, 30 ms, 10 ms, 20 ms
+
+DC LDG SLOL Settling Time
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+:Description: Settling time for shorted-load and open-load detection.
+:Type: Enumerated
+:Default: 10 ms
+:Options: 10 ms, 5 ms, 20 ms, 15 ms
+
+DC LDG S2PG Ramp Time
+~~~~~~~~~~~~~~~~~~~~~
+
+:Description: Voltage ramp time for short-to-power and short-to-ground detection.
+:Type: Enumerated
+:Default: 5 ms
+:Options: 5 ms, 2.5 ms, 10 ms, 15 ms
+
+DC LDG S2PG Settling Time
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+:Description: Settling time for short-to-power and short-to-ground detection.
+:Type: Enumerated
+:Default: 10 ms
+:Options: 10 ms, 5 ms, 20 ms, 30 ms
+
+CHx DC LDG SL Threshold
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+:Description: Shorted-load detection threshold per channel (x = 1, 2, 3, 4).
+:Type: Enumerated
+:Default: 1 Ohm
+:Options: 0.5 Ohm, 1 Ohm, 1.5 Ohm, 2 Ohm, 2.5 Ohm,
+ 3 Ohm, 3.5 Ohm, 4 Ohm, 4.5 Ohm, 5 Ohm
+
+DC LDG Result
+~~~~~~~~~~~~~
+
+:Description: Overall DC diagnostic result register.
+:Type: Integer (read-only)
+:Range: 0x00 to 0xFF
+:Bit Encoding:
+
+ ======== =====================================================
+ Bits Description
+ ======== =====================================================
+ [7:4] Line output detection result, one bit per channel
+ [3:0] DC diagnostic pass/fail per channel (1=pass, 0=fail)
+ ======== =====================================================
+
+CHx DC LDG Report
+~~~~~~~~~~~~~~~~~
+
+:Description: DC diagnostic fault status per channel (x = 1, 2, 3, 4).
+:Type: Integer (read-only)
+:Range: 0x0 to 0xF
+:Note: See fault bit encoding table at the start of this section.
+
+CHx LO LDG Report
+~~~~~~~~~~~~~~~~~
+
+:Description: Line output load detection result per channel (x = 1, 2, 3, 4).
+:Type: Boolean (read-only)
+:Values: 0 = not detected, 1 = line output load detected
+
+CHx DC Resistance
+~~~~~~~~~~~~~~~~~
+
+:Description: Measured DC load resistance per channel (x = 1, 2, 3, 4).
+:Type: Float (read-only, displayed in ohms)
+:Resolution: 0.1 ohm per code (10-bit value)
+:Range: 0.0 to 102.3 ohms
+
+AC Load Diagnostics
+-------------------
+
+AC LDG Trigger
+~~~~~~~~~~~~~~
+
+:Description: Triggers AC impedance measurement on all channels.
+:Type: Boolean (write-only)
+:Note: Returns -EBUSY if any DAI stream (playback or capture) is active.
+ The driver transitions all channels to SLEEP state before starting
+ the measurement. Blocks until diagnostics complete or time out.
+
+AC DIAG GAIN
+~~~~~~~~~~~~
+
+:Description: Measurement resolution for AC diagnostics.
+:Type: Boolean Switch
+:Default: 1 (Gain 8)
+:Values: 0 = 0.8 ohm/code (Gain 1), 1 = 0.1 ohm/code (Gain 8)
+:Note: Gain 8 recommended for load impedances below 8 ohms.
+
+AC LDG Test Frequency
+~~~~~~~~~~~~~~~~~~~~~
+
+:Description: Test signal frequency for AC impedance measurement.
+:Type: Integer
+:Default: 200 (0xC8 = 18.75 kHz)
+:Range: 0x01 to 0xFF (0x00 reserved)
+:Formula: Frequency = 93.75 Hz × register value
+
+CHx AC LDG Real / CHx AC LDG Imag
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+:Description: Real and imaginary AC impedance components per channel
+ (x = 1, 2, 3, 4).
+:Type: Integer (read-only)
+:Range: 0x00 to 0xFF (8-bit signed)
+:Note: Scale set by AC DIAG GAIN.
+
+Speaker Protection & Detection
+-------------------------------
+
+Tweeter Detection Switch
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+:Description: Enables tweeter detection using the AC impedance magnitude comparator.
+:Type: Boolean Switch
+:Default: Enabled (1)
+:Note: Inverted logic — control value 0 = enabled, 1 = disabled.
+
+Tweeter Detect Threshold
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+:Description: Magnitude threshold for tweeter detection.
+:Type: Integer
+:Default: 0
+:Range: 0x00 to 0xFF
+:Resolution: 0.8 ohm/code (AC DIAG GAIN=0) or 0.1 ohm/code (AC DIAG GAIN=1)
+
+CHx Tweeter Detect Report
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+:Description: Tweeter detection result per channel (x = 1, 2, 3, 4).
+:Type: Boolean (read-only)
+:Values: 0 = no tweeter detected, 1 = tweeter detected
+
+DSP Protection Features
+=======================
+
+These controls are unavailable in LLP mode.
+
+Thermal Foldback Switch
+-----------------------
+
+:Description: Enables dynamic gain reduction based on die temperature.
+:Type: Boolean Switch
+:Default: Disabled (0)
+
+PVDD Foldback Switch
+--------------------
+
+:Description: Enables automatic gain limiting when supply voltage drops
+ (Automatic Gain Limiter).
+:Type: Boolean Switch
+:Default: Disabled (0)
+
+DC Blocker Bypass Switch
+------------------------
+
+:Description: Bypasses the DC-blocking high-pass filter.
+:Type: Boolean Switch
+:Default: Not bypassed (0)
+
+Clip Detect Switch
+------------------
+
+:Description: Enables DSP-based clip detection (Pseudo-Analog Clip Detect).
+:Type: Boolean Switch
+:Default: Disabled (0)
+
+Audio SDOUT Switch
+------------------
+
+:Description: Routes post-processed audio to the SDOUT pin instead of
+ Vpredict data.
+:Type: Boolean Switch
+:Default: Disabled (0)
+:Note: Requires I2S or TDM format. Not supported in Left-justified
+ or DSP mode formats.
+
+Real-Time Load Diagnostics
+===========================
+
+These controls require Normal DSP mode at 48 kHz or 96 kHz. They are
+unavailable at 192 kHz and in FFLP and LLP modes.
+
+The ``RTLDG Fault Latched`` register uses the following encoding:
+
+ ======== ==========================================
+ Bits Description
+ ======== ==========================================
+ [7:4] Shorted Load faults, CH1–CH4 respectively
+ [3:0] Open Load faults, CH1–CH4 respectively
+ ======== ==========================================
+
+CHx RTLDG Switch
+----------------
+
+:Description: Enables real-time impedance monitoring during playback
+ (x = 1, 2, 3, 4).
+:Type: Boolean Switch
+:Default: Disabled (0)
+
+RTLDG Clip Mask Switch
+----------------------
+
+:Description: Suppresses impedance updates during clipping events.
+:Type: Boolean Switch
+:Default: Enabled (1)
+
+ISENSE Calibration Switch
+--------------------------
+
+:Description: Enables current sense calibration for accurate impedance
+ measurements.
+:Type: Boolean Switch
+:Default: Disabled (0)
+
+RTLDG Open Load Threshold
+--------------------------
+
+:Description: DSP coefficient for open load fault detection threshold.
+:Type: DSP coefficient (extended control)
+:Location: DSP book 0x8C, page 0x22
+
+RTLDG Short Load Threshold
+---------------------------
+
+:Description: DSP coefficient for shorted load fault detection threshold.
+:Type: DSP coefficient (extended control)
+:Location: DSP book 0x8C, page 0x22
+
+CHx RTLDG Impedance
+-------------------
+
+:Description: Real-time load impedance per channel (x = 1, 2, 3, 4).
+:Type: Float (read-only, displayed in ohms)
+:Note: Valid only during PLAY state with RTLDG enabled at 48 or
+ 96 kHz. Holds stale data in SLEEP, MUTE, or Hi-Z states.
+
+RTLDG Fault Latched
+-------------------
+
+:Description: Latched fault register for OL and SL conditions detected
+ during playback.
+:Type: Integer (read-only, read-to-clear)
+:Range: 0x00 to 0xFF
+:Note: See bit encoding table at the start of this section.
+ Reading the register clears all latched bits.
+
+Known Limitations
+=================
+
+Clock Fault Behaviour
+---------------------
+
+On Stream Stop
+~~~~~~~~~~~~~~
+
+Every time a playback stream stops the FAULT pin briefly asserts.
+The CPU DAI (McASP) stops SCLK during ``trigger(STOP)`` — an atomic
+context where codec I2C writes are not permitted — before the codec can
+transition to sleep. The device detects the clock halt and latches
+``CLK_FAULT_LATCHED``, which asserts the FAULT pin. The driver clears
+the latch in the ``mute_stream`` callback that follows, so the FAULT pin
+flicker lasts only a few milliseconds. Audio output is not affected and
+no kernel log message is produced.
+
+On Rapid Rate Switching
+~~~~~~~~~~~~~~~~~~~~~~~
+
+When streams are started in rapid succession, an intermittent
+``Clock Fault Latched: 0x01`` message may appear in the kernel log.
+A 0.5 second settling gap between sessions eliminates this.
+
+References
+==========
+
+- TAS675x Technical Reference Manual: SLOU589A
+- Device Tree Bindings: Documentation/devicetree/bindings/sound/ti,tas675x.yaml
+- ALSA Control Name Conventions: Documentation/sound/designs/control-names.rst
--
2.43.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox