ASoC: Updates for for v6.11

There are a lot of changes in here, though the big bulk of things is
 cleanups and simplifications of various kinds which are internally
 rather than externally visible.  A good chunk of those are DT schema
 conversions, but there's also a lot of changes in the code.
 
 Highlights:
 
  - Syncing of features between simple-audio-card and the two
    audio-graph cards so there is no reason to stick with an older
    driver.
  - Support for specifying the order of operations for components within
    cards to allow quirking for unusual systems.
  - New support for Asahi Kasei AK4619, Cirrus Logic CS530x, Everest
    Semiconductors ES8311, NXP i.MX95 and LPC32xx, Qualcomm LPASS v2.5
    and WCD937x, Realtek RT1318 and RT1320 and Texas Instruments PCM5242.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmaVJSQACgkQJNaLcl1U
 h9C8vwf/Q/wzwY5DSx8JM+qRkhjQdN11ILm5ZL8CD36K5frpv4YuqkHxvI3AO8Yb
 +LGLVzmcf6XW4+SGBkXoSOUZOYK726Ld2+BoqTM0isPXHinGdrkcUhUcHKy7qS7g
 3MImaVM+nGJGyO718cJ++XnEy7uNkbiA0ztIxy2Ui2Dzxq5LX++tT0IroRxf4AAf
 zIFgZpaZz4lueTJ1d0FB7uIG4XHxg4nTn7cSllPhGr5mjiZZhOIwDGE1+9GQC44q
 k8oMOACrh887qDSScCbW+pplLJunlei2EC28oVNxsUkNaxl+ItEj1s+X0XH1id6u
 FZquRQPHZ9mJ0/QTlzo2l4g4EvOxKg==
 =YXaR
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for for v6.11

There are a lot of changes in here, though the big bulk of things is
cleanups and simplifications of various kinds which are internally
rather than externally visible.  A good chunk of those are DT schema
conversions, but there's also a lot of changes in the code.

Highlights:

 - Syncing of features between simple-audio-card and the two
   audio-graph cards so there is no reason to stick with an older
   driver.
 - Support for specifying the order of operations for components within
   cards to allow quirking for unusual systems.
 - New support for Asahi Kasei AK4619, Cirrus Logic CS530x, Everest
   Semiconductors ES8311, NXP i.MX95 and LPC32xx, Qualcomm LPASS v2.5
   and WCD937x, Realtek RT1318 and RT1320 and Texas Instruments PCM5242.
This commit is contained in:
Takashi Iwai 2024-07-15 16:31:00 +02:00
commit 97b10a77b1
661 changed files with 23936 additions and 5974 deletions

View File

@ -9,8 +9,8 @@ TOMOYO is a name-based MAC extension (LSM module) for the Linux kernel.
LiveCD-based tutorials are available at
http://tomoyo.sourceforge.jp/1.8/ubuntu12.04-live.html
http://tomoyo.sourceforge.jp/1.8/centos6-live.html
https://tomoyo.sourceforge.net/1.8/ubuntu12.04-live.html
https://tomoyo.sourceforge.net/1.8/centos6-live.html
Though these tutorials use non-LSM version of TOMOYO, they are useful for you
to know what TOMOYO is.
@ -21,45 +21,32 @@ How to enable TOMOYO?
Build the kernel with ``CONFIG_SECURITY_TOMOYO=y`` and pass ``security=tomoyo`` on
kernel's command line.
Please see http://tomoyo.osdn.jp/2.5/ for details.
Please see https://tomoyo.sourceforge.net/2.6/ for details.
Where is documentation?
=======================
User <-> Kernel interface documentation is available at
https://tomoyo.osdn.jp/2.5/policy-specification/index.html .
https://tomoyo.sourceforge.net/2.6/policy-specification/index.html .
Materials we prepared for seminars and symposiums are available at
https://osdn.jp/projects/tomoyo/docs/?category_id=532&language_id=1 .
https://sourceforge.net/projects/tomoyo/files/docs/ .
Below lists are chosen from three aspects.
What is TOMOYO?
TOMOYO Linux Overview
https://osdn.jp/projects/tomoyo/docs/lca2009-takeda.pdf
https://sourceforge.net/projects/tomoyo/files/docs/lca2009-takeda.pdf
TOMOYO Linux: pragmatic and manageable security for Linux
https://osdn.jp/projects/tomoyo/docs/freedomhectaipei-tomoyo.pdf
https://sourceforge.net/projects/tomoyo/files/docs/freedomhectaipei-tomoyo.pdf
TOMOYO Linux: A Practical Method to Understand and Protect Your Own Linux Box
https://osdn.jp/projects/tomoyo/docs/PacSec2007-en-no-demo.pdf
https://sourceforge.net/projects/tomoyo/files/docs/PacSec2007-en-no-demo.pdf
What can TOMOYO do?
Deep inside TOMOYO Linux
https://osdn.jp/projects/tomoyo/docs/lca2009-kumaneko.pdf
https://sourceforge.net/projects/tomoyo/files/docs/lca2009-kumaneko.pdf
The role of "pathname based access control" in security.
https://osdn.jp/projects/tomoyo/docs/lfj2008-bof.pdf
https://sourceforge.net/projects/tomoyo/files/docs/lfj2008-bof.pdf
History of TOMOYO?
Realities of Mainlining
https://osdn.jp/projects/tomoyo/docs/lfj2008.pdf
What is future plan?
====================
We believe that inode based security and name based security are complementary
and both should be used together. But unfortunately, so far, we cannot enable
multiple LSM modules at the same time. We feel sorry that you have to give up
SELinux/SMACK/AppArmor etc. when you want to use TOMOYO.
We hope that LSM becomes stackable in future. Meanwhile, you can use non-LSM
version of TOMOYO, available at http://tomoyo.osdn.jp/1.8/ .
LSM version of TOMOYO is a subset of non-LSM version of TOMOYO. We are planning
to port non-LSM version's functionalities to LSM versions.
https://sourceforge.net/projects/tomoyo/files/docs/lfj2008.pdf

View File

@ -467,11 +467,11 @@ anon_fault_fallback_charge
instead falls back to using huge pages with lower orders or
small pages even though the allocation was successful.
anon_swpout
swpout
is incremented every time a huge page is swapped out in one
piece without splitting.
anon_swpout_fallback
swpout_fallback
is incremented if a huge page has to be split before swapout.
Usually because failed to allocate some continuous swap space
for the huge page.

View File

@ -217,7 +217,7 @@ current *struct* is::
int (*media_changed)(struct cdrom_device_info *, int);
int (*tray_move)(struct cdrom_device_info *, int);
int (*lock_door)(struct cdrom_device_info *, int);
int (*select_speed)(struct cdrom_device_info *, int);
int (*select_speed)(struct cdrom_device_info *, unsigned long);
int (*get_last_session) (struct cdrom_device_info *,
struct cdrom_multisession *);
int (*get_mcn)(struct cdrom_device_info *, struct cdrom_mcn *);
@ -396,7 +396,7 @@ action need be taken, and the return value should be 0.
::
int select_speed(struct cdrom_device_info *cdi, int speed)
int select_speed(struct cdrom_device_info *cdi, unsigned long speed)
Some CD-ROM drives are capable of changing their head-speed. There
are several reasons for changing the speed of a CD-ROM drive. Badly

View File

@ -54,11 +54,10 @@ unevaluatedProperties: false
examples:
- |
mlahb: ahb@38000000 {
ahb {
compatible = "st,mlahb", "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x10000000 0x40000>;
ranges;
dma-ranges = <0x00000000 0x38000000 0x10000>,
<0x10000000 0x10000000 0x60000>,

View File

@ -57,17 +57,17 @@ properties:
- const: allwinner,sun8i-v3s
- description: Anbernic RG35XX (2024)
- items:
items:
- const: anbernic,rg35xx-2024
- const: allwinner,sun50i-h700
- description: Anbernic RG35XX Plus
- items:
items:
- const: anbernic,rg35xx-plus
- const: allwinner,sun50i-h700
- description: Anbernic RG35XX H
- items:
items:
- const: anbernic,rg35xx-h
- const: allwinner,sun50i-h700

View File

@ -18,9 +18,12 @@ allOf:
properties:
compatible:
enum:
- elan,ekth6915
- ilitek,ili2901
oneOf:
- items:
- enum:
- elan,ekth5015m
- const: elan,ekth6915
- const: elan,ekth6915
reg:
const: 0x10
@ -33,6 +36,12 @@ properties:
reset-gpios:
description: Reset GPIO; not all touchscreens using eKTH6915 hook this up.
no-reset-on-power-off:
type: boolean
description:
Reset line is wired so that it can (and should) be left deasserted when
the power supply is off.
vcc33-supply:
description: The 3.3V supply to the touchscreen.
@ -58,8 +67,8 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
ap_ts: touchscreen@10 {
compatible = "elan,ekth6915";
touchscreen@10 {
compatible = "elan,ekth5015m", "elan,ekth6915";
reg = <0x10>;
interrupt-parent = <&tlmm>;

View File

@ -0,0 +1,66 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/ilitek,ili2901.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Ilitek ILI2901 touchscreen controller
maintainers:
- Jiri Kosina <jkosina@suse.com>
description:
Supports the Ilitek ILI2901 touchscreen controller.
This touchscreen controller uses the i2c-hid protocol with a reset GPIO.
allOf:
- $ref: /schemas/input/touchscreen/touchscreen.yaml#
properties:
compatible:
enum:
- ilitek,ili2901
reg:
maxItems: 1
interrupts:
maxItems: 1
panel: true
reset-gpios:
maxItems: 1
vcc33-supply: true
vccio-supply: true
required:
- compatible
- reg
- interrupts
- vcc33-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@41 {
compatible = "ilitek,ili2901";
reg = <0x41>;
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
vcc33-supply = <&pp3300_ts>;
};
};

View File

@ -1,25 +0,0 @@
AK4104 S/PDIF transmitter
This device supports SPI mode only.
Required properties:
- compatible : "asahi-kasei,ak4104"
- reg : The chip select number on the SPI bus
- vdd-supply : A regulator node, providing 2.7V - 3.6V
Optional properties:
- reset-gpios : a GPIO spec for the reset pin. If specified, it will be
deasserted before communication to the device starts.
Example:
spdif: ak4104@0 {
compatible = "asahi-kasei,ak4104";
reg = <0>;
spi-max-frequency = <5000000>;
vdd-supply = <&vdd_3v3_reg>;
};

View File

@ -1,11 +0,0 @@
AK4554 ADC/DAC
Required properties:
- compatible : "asahi-kasei,ak4554"
Example:
ak4554-adc-dac {
compatible = "asahi-kasei,ak4554";
};

View File

@ -1,58 +0,0 @@
* Amlogic HDMI Tx control glue
Required properties:
- compatible: "amlogic,g12a-tohdmitx" or
"amlogic,sm1-tohdmitx"
- reg: physical base address of the controller and length of memory
mapped region.
- #sound-dai-cells: should be 1.
- resets: phandle to the dedicated reset line of the hdmitx glue.
Example on the S905X2 SoC:
tohdmitx: audio-controller@744 {
compatible = "amlogic,g12a-tohdmitx";
reg = <0x0 0x744 0x0 0x4>;
#sound-dai-cells = <1>;
resets = <&clkc_audio AUD_RESET_TOHDMITX>;
};
Example of an 'amlogic,axg-sound-card':
sound {
compatible = "amlogic,axg-sound-card";
[...]
dai-link-x {
sound-dai = <&tdmif_a>;
dai-format = "i2s";
dai-tdm-slot-tx-mask-0 = <1 1>;
codec-0 {
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
};
codec-1 {
sound-dai = <&external_dac>;
};
};
dai-link-y {
sound-dai = <&tdmif_c>;
dai-format = "i2s";
dai-tdm-slot-tx-mask-0 = <1 1>;
codec {
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
};
};
dai-link-z {
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
codec {
sound-dai = <&hdmi_tx>;
};
};
};

View File

@ -0,0 +1,54 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/amlogic,g12a-tohdmitx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic G12a HDMI TX Control Glue
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
allOf:
- $ref: dai-common.yaml#
properties:
$nodename:
pattern: "^audio-controller@.*"
compatible:
oneOf:
- items:
- const: amlogic,g12a-tohdmitx
- items:
- enum:
- amlogic,sm1-tohdmitx
- const: amlogic,g12a-tohdmitx
reg:
maxItems: 1
resets:
maxItems: 1
"#sound-dai-cells":
const: 1
required:
- compatible
- reg
- resets
- "#sound-dai-cells"
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
tohdmitx: audio-controller@744 {
compatible = "amlogic,g12a-tohdmitx";
reg = <0x744 0x4>;
resets = <&clkc_audio AUD_RESET_TOHDMITX>;
#sound-dai-cells = <1>;
};

View File

@ -23,7 +23,6 @@ properties:
audio-widgets:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
minItems: 2
description: |-
A list off component DAPM widget. Each entry is a pair of strings,
the first being the widget type, the second being the widget name

View File

@ -0,0 +1,49 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4104.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4104 S/PDIF transmitter
allOf:
- $ref: dai-common.yaml#
maintainers:
- Daniel Mack <github@zonque.org>
- Xiaxi Shen <shenxiaxi26@gmail.com>
properties:
compatible:
const: asahi-kasei,ak4104
reg:
description: Chip select number on the SPI bus
maxItems: 1
vdd-supply:
description: A regulator node providing between 2.7V and 3.6V.
reset-gpios:
maxItems: 1
description: Optional GPIO spec for the reset pin, deasserted
before communication starts.
required:
- compatible
- reg
- vdd-supply
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@0 {
compatible = "asahi-kasei,ak4104";
reg = <0>;
vdd-supply = <&vdd_3v3_reg>;
};
};

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ak4375.yaml#
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4375.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4375 DAC and headphones amplifier

View File

@ -0,0 +1,27 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4554.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4554 sound codec
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
- Liam Girdwood <lgirdwood@gmail.com>
- Mark Brown <broonie@kernel.org>
properties:
compatible:
const: asahi-kasei,ak4554
required:
- compatible
additionalProperties: false
examples:
- |
codec {
compatible = "asahi-kasei,ak4554";
};

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ak4613.yaml#
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4613.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4613 I2C transmitter

View File

@ -0,0 +1,62 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4619.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4619 I2C transmitter
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
- Khanh Le <khanh.le.xr@renesas.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: asahi-kasei,ak4619
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: mclk
"#sound-dai-cells":
const: 0
port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@10 {
compatible = "asahi-kasei,ak4619";
reg = <0x10>;
clocks = <&rcar_sound>;
clock-names = "mclk";
#sound-dai-cells = <0>;
port {
ak4619_endpoint: endpoint {
remote-endpoint = <&rsnd_endpoint>;
};
};
};
};

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ak4642.yaml#
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4642.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4642 I2C transmitter

View File

@ -23,6 +23,11 @@ properties:
Each entry is a pair of strings, the first being the
connection's sink, the second being the connection's source.
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
aux-devs:
description: |
List of phandles pointing to auxiliary devices, such
as amplifiers, to be added to the sound card.
$ref: /schemas/types.yaml#/definitions/phandle-array
multi:
type: object
description: Multi-CPU/Codec node

View File

@ -25,6 +25,15 @@ definitions:
capture-only:
description: port connection used only for capture
$ref: /schemas/types.yaml#/definitions/flag
link-trigger-order:
description: trigger order for both start/stop
$ref: /schemas/types.yaml#/definitions/uint32-array
link-trigger-order-start:
description: trigger order for start
$ref: /schemas/types.yaml#/definitions/uint32-array
link-trigger-order-stop:
description: trigger order for stop
$ref: /schemas/types.yaml#/definitions/uint32-array
endpoint-base:
allOf:

View File

@ -0,0 +1,59 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/cirrus,cs4270.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cirrus Logic CS4270 audio CODEC
maintainers:
- patches@opensource.cirrus.com
description:
The CS4270 is a stereo audio codec. The driver for this device currently only
supports I2C.
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: cirrus,cs4270
reg:
maxItems: 1
'#sound-dai-cells':
const: 0
reset-gpios:
description:
This pin will be deasserted before communication to the codec starts.
maxItems: 1
va-supply:
description: Analog power supply.
vd-supply:
description: Digital power supply.
vlc-supply:
description: Serial Control Port power supply.
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@48 {
compatible = "cirrus,cs4270";
reg = <0x48>;
};
};

View File

@ -0,0 +1,81 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/cirrus,cs42xx8.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cirrus Logic CS42448/CS42888 audio CODEC
maintainers:
- patches@opensource.cirrus.com
properties:
compatible:
enum:
- cirrus,cs42448
- cirrus,cs42888
reg:
maxItems: 1
clocks:
minItems: 1
maxItems: 2
clock-names:
const: mclk
VA-supply:
description: Analog power supply.
VD-supply:
description: Digital power supply.
VLC-supply:
description: Control port power supply
VLS-supply:
description: Serial port interface power supply.
reset-gpios:
description: This pin is connected to the chip's RESET pin.
maxItems: 1
required:
- compatible
- reg
- clocks
- clock-names
if:
properties:
compatible:
contains:
const: cirrus,cs42888
then:
required:
- VA-supply
- VD-supply
- VLC-supply
- VLS-supply
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@48 {
compatible = "cirrus,cs42888";
reg = <0x48>;
clocks = <&codec_mclk 0>;
clock-names = "mclk";
VA-supply = <&reg_audio>;
VD-supply = <&reg_audio>;
VLS-supply = <&reg_audio>;
VLC-supply = <&reg_audio>;
reset-gpios = <&gpio 1>;
};
};

View File

@ -0,0 +1,85 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/cirrus,cs530x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cirrus Logic cs530x family of audio ADCs
maintainers:
- Paul Handrigan <paulha@opensource.cirrus.com>
- patches@opensource.cirrus.com
description:
The CS530X devices are a family of high performance audio ADCs.
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- cirrus,cs5302
- cirrus,cs5304
- cirrus,cs5308
reg:
maxItems: 1
'#sound-dai-cells':
const: 1
reset-gpios:
maxItems: 1
vdd-a-supply:
description: Analog power supply
vdd-io-supply:
description: Digital IO power supply
cirrus,in-hiz-pin12:
description:
Sets input channels one and two to high impedance.
type: boolean
cirrus,in-hiz-pin34:
description:
Sets input channels three and four to high impedance.
type: boolean
cirrus,in-hiz-pin56:
description:
Sets input channels five and six to high impedance.
type: boolean
cirrus,in-hiz-pin78:
description:
Sets input channels seven and eight to high impedance.
type: boolean
required:
- compatible
- reg
- "#sound-dai-cells"
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
cs5304: adc@48 {
compatible = "cirrus,cs5304";
reg = <0x48>;
#sound-dai-cells = <1>;
reset-gpios = <&gpio 110 GPIO_ACTIVE_LOW>;
vdd-a-supply = <&vreg>;
vdd-io-supply = <&vreg>;
cirrus,in-hiz-pin34;
};
};

View File

@ -1,21 +0,0 @@
CS4270 audio CODEC
The driver for this device currently only supports I2C.
Required properties:
- compatible : "cirrus,cs4270"
- reg : the I2C address of the device for I2C
Optional properties:
- reset-gpios : a GPIO spec for the reset pin. If specified, it will be
deasserted before communication to the codec starts.
Example:
codec: cs4270@48 {
compatible = "cirrus,cs4270";
reg = <0x48>;
};

View File

@ -1,34 +0,0 @@
CS42448/CS42888 audio CODEC
Required properties:
- compatible : must contain one of "cirrus,cs42448" and "cirrus,cs42888"
- reg : the I2C address of the device for I2C
- clocks : a list of phandles + clock-specifiers, one for each entry in
clock-names
- clock-names : must contain "mclk"
- VA-supply, VD-supply, VLS-supply, VLC-supply: power supplies for the device,
as covered in Documentation/devicetree/bindings/regulator/regulator.txt
Optional properties:
- reset-gpios : a GPIO spec to define which pin is connected to the chip's
!RESET pin
Example:
cs42888: codec@48 {
compatible = "cirrus,cs42888";
reg = <0x48>;
clocks = <&codec_mclk 0>;
clock-names = "mclk";
VA-supply = <&reg_audio>;
VD-supply = <&reg_audio>;
VLS-supply = <&reg_audio>;
VLC-supply = <&reg_audio>;
reset-gpios = <&pca9557_b 1 GPIO_ACTIVE_LOW>;
};

View File

@ -1,15 +0,0 @@
ES7134 i2s DA converter
Required properties:
- compatible : "everest,es7134" or
"everest,es7144" or
"everest,es7154"
- VDD-supply : regulator phandle for the VDD supply
- PVDD-supply: regulator phandle for the PVDD supply for the es7154
Example:
i2s_codec: external-codec {
compatible = "everest,es7134";
VDD-supply = <&vcc_5v>;
};

View File

@ -0,0 +1,62 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/everest,es71x4.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Everest ES7134/7144/7154 2 channels I2S analog to digital converter
maintainers:
- Neil Armstrong <neil.armstrong@linaro.org>
properties:
compatible:
enum:
- everest,es7134
- everest,es7144
- everest,es7154
VDD-supply: true
PVDD-supply: true
'#sound-dai-cells':
const: 0
required:
- compatible
- VDD-supply
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
enum:
- everest,es7134
- everest,es7144
then:
properties:
PVDD-supply: false
- if:
properties:
compatible:
contains:
enum:
- everest,es7154
then:
required:
- PVDD-supply
unevaluatedProperties: false
examples:
- |
codec {
compatible = "everest,es7134";
#sound-dai-cells = <0>;
VDD-supply = <&vdd_supply>;
};
...

View File

@ -1,28 +0,0 @@
ES7241 i2s AD converter
Required properties:
- compatible : "everest,es7241"
- VDDP-supply: regulator phandle for the VDDA supply
- VDDA-supply: regulator phandle for the VDDP supply
- VDDD-supply: regulator phandle for the VDDD supply
Optional properties:
- reset-gpios: gpio connected to the reset pin
- m0-gpios : gpio connected to the m0 pin
- m1-gpios : gpio connected to the m1 pin
- everest,sdout-pull-down:
Format used by the serial interface is controlled by pulling
the sdout. If the sdout is pulled down, leftj format is used.
If this property is not provided, sdout is assumed to pulled
up and i2s format is used
Example:
linein: audio-codec@2 {
#sound-dai-cells = <0>;
compatible = "everest,es7241";
VDDA-supply = <&vcc_3v3>;
VDDP-supply = <&vcc_3v3>;
VDDD-supply = <&vcc_3v3>;
reset-gpios = <&gpio GPIOH_42>;
};

View File

@ -0,0 +1,67 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/everest,es7241.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Everest ES7241 2 channels I2S analog to digital converter
maintainers:
- Neil Armstrong <neil.armstrong@linaro.org>
properties:
compatible:
enum:
- everest,es7241
reset-gpios:
maxItems: 1
description: GPIO connected to the reset pin
m0-gpios:
maxItems: 1
description: GPIO connected to the m0 pin
m1-gpios:
maxItems: 1
description: GPIO connected to the m0 pin
everest,sdout-pull-down:
type: boolean
description:
Format used by the serial interface is controlled by pulling
the sdout. If the sdout is pulled down, leftj format is used.
If this property is not provided, sdout is assumed to pulled
up and i2s format is used
VDDP-supply: true
VDDA-supply: true
VDDD-supply: true
'#sound-dai-cells':
const: 0
required:
- compatible
- VDDP-supply
- VDDA-supply
- VDDD-supply
allOf:
- $ref: dai-common.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
codec {
compatible = "everest,es7241";
#sound-dai-cells = <0>;
reset-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
VDDP-supply = <&vddp_supply>;
VDDA-supply = <&vdda_supply>;
VDDD-supply = <&vddd_supply>;
};
...

View File

@ -4,18 +4,21 @@
$id: http://devicetree.org/schemas/sound/everest,es8316.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Everest ES8316 audio CODEC
title: Everest ES8311 and ES8316 audio CODECs
maintainers:
- Daniel Drake <drake@endlessm.com>
- Katsuhiro Suzuki <katsuhiro@katsuster.net>
- Matteo Martelli <matteomartelli3@gmail.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: everest,es8316
enum:
- everest,es8311
- everest,es8316
reg:
maxItems: 1

View File

@ -1,66 +0,0 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/fsl,imx-audio-spdif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale i.MX audio complex with S/PDIF transceiver
maintainers:
- Shengjiu Wang <shengjiu.wang@nxp.com>
properties:
compatible:
oneOf:
- items:
- enum:
- fsl,imx-sabreauto-spdif
- fsl,imx6sx-sdb-spdif
- const: fsl,imx-audio-spdif
- enum:
- fsl,imx-audio-spdif
model:
$ref: /schemas/types.yaml#/definitions/string
description: User specified audio sound card name
spdif-controller:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of the i.MX S/PDIF controller
spdif-out:
type: boolean
description:
If present, the transmitting function of S/PDIF will be enabled,
indicating there's a physical S/PDIF out connector or jack on the
board or it's connecting to some other IP block, such as an HDMI
encoder or display-controller.
spdif-in:
type: boolean
description:
If present, the receiving function of S/PDIF will be enabled,
indicating there is a physical S/PDIF in connector/jack on the board.
required:
- compatible
- model
- spdif-controller
anyOf:
- required:
- spdif-in
- required:
- spdif-out
additionalProperties: false
examples:
- |
sound-spdif {
compatible = "fsl,imx-audio-spdif";
model = "imx-spdif";
spdif-controller = <&spdif>;
spdif-out;
spdif-in;
};

View File

@ -23,6 +23,8 @@ properties:
- fsl,imx8qm-mqs
- fsl,imx8qxp-mqs
- fsl,imx93-mqs
- fsl,imx95-aonmix-mqs
- fsl,imx95-netcmix-mqs
clocks:
minItems: 1

View File

@ -12,7 +12,9 @@ maintainers:
description: |
The QMC audio is an ASoC component which uses QMC (QUICC Multichannel
Controller) channels to transfer the audio data.
It provides as many DAI as the number of QMC channel used.
It provides several DAIs. For each DAI, the DAI is working in interleaved mode
if only one QMC channel is used by the DAI or it is working in non-interleaved
mode if several QMC channels are used by the DAI.
allOf:
- $ref: dai-common.yaml#
@ -45,12 +47,19 @@ patternProperties:
fsl,qmc-chan:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: phandle to QMC node
- description: Channel number
items:
- description: phandle to QMC node
- description: Channel number
minItems: 1
description:
Should be a phandle/number pair. The phandle to QMC node and the QMC
channel to use for this DAI.
Should be a phandle/number pair list. The list of phandle to QMC node
and the QMC channel pair to use for this DAI.
If only one phandle/number pair is provided, this DAI works in
interleaved mode, i.e. audio channels for this DAI are interleaved in
the QMC channel. If more than one pair is provided, this DAI works
in non-interleave mode. In that case the first audio channel uses the
the first QMC channel, the second audio channel uses the second QMC
channel, etc...
required:
- reg
@ -79,6 +88,11 @@ examples:
reg = <17>;
fsl,qmc-chan = <&qmc 17>;
};
dai@18 {
reg = <18>;
/* Non-interleaved mode */
fsl,qmc-chan = <&qmc 18>, <&qmc 19>;
};
};
sound {
@ -115,4 +129,19 @@ examples:
dai-tdm-slot-rx-mask = <0 0 1 0 1 0 1 0 1>;
};
};
simple-audio-card,dai-link@2 {
reg = <2>;
format = "dsp_b";
cpu {
sound-dai = <&audio_controller 18>;
};
codec {
sound-dai = <&codec3>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <8>;
/* TS 9, 10 */
dai-tdm-slot-tx-mask = <0 0 0 0 0 0 0 0 0 1 1>;
dai-tdm-slot-rx-mask = <0 0 0 0 0 0 0 0 0 1 1>;
};
};
};

View File

@ -29,6 +29,7 @@ properties:
- fsl,imx8mp-rpmsg-audio
- fsl,imx8ulp-rpmsg-audio
- fsl,imx93-rpmsg-audio
- fsl,imx95-rpmsg-audio
clocks:
items:

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/sgtl5000.yaml#
$id: http://devicetree.org/schemas/sound/fsl,sgtl5000.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale SGTL5000 Stereo Codec

View File

@ -22,6 +22,7 @@ properties:
enum:
- fsl,imx8mp-xcvr
- fsl,imx93-xcvr
- fsl,imx95-xcvr
reg:
items:
@ -41,6 +42,7 @@ properties:
items:
- description: WAKEUPMIX Audio XCVR Interrupt 1
- description: WAKEUPMIX Audio XCVR Interrupt 2
- description: SPDIF wakeup interrupt from PHY
minItems: 1
clocks:
@ -49,6 +51,9 @@ properties:
- description: PHY clock
- description: SPBA clock
- description: PLL clock
- description: PLL clock source for 8kHz series
- description: PLL clock source for 11kHz series
minItems: 4
clock-names:
items:
@ -56,6 +61,9 @@ properties:
- const: phy
- const: spba
- const: pll_ipg
- const: pll8k
- const: pll11k
minItems: 4
dmas:
items:
@ -79,15 +87,25 @@ required:
- clock-names
- dmas
- dma-names
- resets
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
const: fsl,imx8mp-xcvr
then:
required:
- resets
- if:
properties:
compatible:
contains:
enum:
- fsl,imx93-xcvr
- fsl,imx95-xcvr
then:
properties:
interrupts:
@ -96,9 +114,24 @@ allOf:
else:
properties:
interrupts:
maxItems: 1
minItems: 3
maxItems: 3
additionalProperties: false
- if:
properties:
compatible:
contains:
enum:
- fsl,imx8mp-xcvr
- fsl,imx93-xcvr
then:
properties:
clocks:
maxItems: 4
clock-names:
maxItems: 4
unevaluatedProperties: false
examples:
- |
@ -113,7 +146,9 @@ examples:
<0x30cc0c00 0x080>,
<0x30cc0e00 0x080>;
reg-names = "ram", "regs", "rxfifo", "txfifo";
interrupts = <0x0 128 IRQ_TYPE_LEVEL_HIGH>;
interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_IPG>,
<&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_PHY>,
<&audiomix_clk IMX8MP_CLK_AUDIOMIX_SPBA2_ROOT>,

View File

@ -65,6 +65,11 @@ properties:
- fsl,imx-audio-sgtl5000
- fsl,imx-audio-wm8960
- fsl,imx-audio-wm8962
- items:
- enum:
- fsl,imx-sabreauto-spdif
- fsl,imx6sx-sdb-spdif
- const: fsl,imx-audio-spdif
- items:
- enum:
- fsl,imx-audio-ac97
@ -81,6 +86,7 @@ properties:
- fsl,imx-audio-wm8960
- fsl,imx-audio-wm8962
- fsl,imx-audio-wm8958
- fsl,imx-audio-spdif
model:
$ref: /schemas/types.yaml#/definitions/string
@ -93,8 +99,15 @@ properties:
need to add ASRC support via DPCM.
audio-codec:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of an audio codec
$ref: /schemas/types.yaml#/definitions/phandle-array
description: |
The phandle of an audio codec.
With "fsl,imx-audio-spdif", either SPDIF audio codec spdif_transmitter,
spdif_receiver or both.
minItems: 1
maxItems: 2
items:
maxItems: 1
audio-cpu:
$ref: /schemas/types.yaml#/definitions/phandle
@ -150,8 +163,10 @@ properties:
description: dai-link uses bit clock inversion.
mclk-id:
$ref: /schemas/types.yaml#/definitions/uint32
description: main clock id, specific for each card configuration.
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Main clock id for each codec, specific for each card configuration.
minItems: 1
maxItems: 2
mux-int-port:
$ref: /schemas/types.yaml#/definitions/uint32
@ -167,6 +182,27 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of an CPU DAI controller
spdif-controller:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
description: The phandle of an S/PDIF CPU DAI controller.
spdif-out:
type: boolean
deprecated: true
description: |
If present, the transmitting function of S/PDIF will be enabled,
indicating there's a physical S/PDIF out connector or jack on the
board or it's connecting to some other IP block, such as an HDMI
encoder or display-controller.
spdif-in:
type: boolean
deprecated: true
description: |
If present, the receiving function of S/PDIF will be enabled,
indicating there is a physical S/PDIF in connector/jack on the board.
required:
- compatible
- model
@ -195,3 +231,12 @@ examples:
"AIN2L", "Line In Jack",
"AIN2R", "Line In Jack";
};
- |
sound-spdif-asrc {
compatible = "fsl,imx-audio-spdif";
model = "spdif-asrc-audio";
audio-cpu = <&spdif>;
audio-asrc = <&easrc>;
audio-codec = <&spdifdit>, <&spdifdir>;
};

View File

@ -1,10 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/linux,spdif-dit.yaml#
$id: http://devicetree.org/schemas/sound/linux,spdif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Dummy SPDIF Transmitter
title: Dummy SPDIF Transmitter/Receiver
maintainers:
- Mark Brown <broonie@kernel.org>
@ -14,7 +14,9 @@ allOf:
properties:
compatible:
const: linux,spdif-dit
enum:
- linux,spdif-dit
- linux,spdif-dir
"#sound-dai-cells":
const: 0

View File

@ -1,23 +0,0 @@
MAX98088 audio CODEC
This device supports I2C only.
Required properties:
- compatible: "maxim,max98088" or "maxim,max98089".
- reg: The I2C address of the device.
Optional properties:
- clocks: the clock provider of MCLK, see ../clock/clock-bindings.txt section
"consumer" for more information.
- clock-names: must be set to "mclk"
Example:
max98089: codec@10 {
compatible = "maxim,max98089";
reg = <0x10>;
clocks = <&clks IMX6QDL_CLK_CKO2>;
clock-names = "mclk";
};

View File

@ -0,0 +1,47 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/maxim,max98088.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MAX98088 audio CODEC
maintainers:
- Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
properties:
compatible:
enum:
- maxim,max98088
- maxim,max98089
reg:
maxItems: 1
clocks:
items:
- description: master clock
clock-names:
items:
- const: mclk
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
audio-codec@10 {
compatible = "maxim,max98089";
reg = <0x10>;
clocks = <&clks 0>;
clock-names = "mclk";
};
};

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/zl38060.yaml#
$id: http://devicetree.org/schemas/sound/mscc,zl38060.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ZL38060 Connected Home Audio Processor from Microsemi.

View File

@ -23,6 +23,14 @@ properties:
'#sound-dai-cells':
const: 0
clocks:
items:
- description: The phandle of the master clock to the CODEC
clock-names:
items:
- const: mclk
interrupts:
maxItems: 1

View File

@ -0,0 +1,73 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nxp,lpc3220-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP LPC32XX I2S Controller
description:
The I2S controller in LPC32XX SoCs, ASoC DAI.
maintainers:
- J.M.B. Downing <jonathan.downing@nautel.com>
- Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- nxp,lpc3220-i2s
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
items:
- description: input clock of the peripheral.
dmas:
items:
- description: RX DMA Channel
- description: TX DMA Channel
dma-names:
items:
- const: rx
- const: tx
"#sound-dai-cells":
const: 0
required:
- compatible
- reg
- interrupts
- clocks
- dmas
- dma-names
- '#sound-dai-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/lpc32xx-clock.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2s@20094000 {
compatible = "nxp,lpc3220-i2s";
reg = <0x20094000 0x1000>;
interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk LPC32XX_CLK_I2S0>;
dmas = <&dma 0 1>, <&dma 13 1>;
dma-names = "rx", "tx";
#sound-dai-cells = <0>;
};
...

View File

@ -1,30 +0,0 @@
* Texas Instruments OMAP4+ McPDM
Required properties:
- compatible: "ti,omap4-mcpdm"
- reg: Register location and size as an array:
<MPU access base address, size>,
<L3 interconnect address, size>;
- interrupts: Interrupt number for McPDM
- ti,hwmods: Name of the hwmod associated to the McPDM
- clocks: phandle for the pdmclk provider, likely <&twl6040>
- clock-names: Must be "pdmclk"
Example:
mcpdm: mcpdm@40132000 {
compatible = "ti,omap4-mcpdm";
reg = <0x40132000 0x7f>, /* MPU private access */
<0x49032000 0x7f>; /* L3 Interconnect */
interrupts = <0 112 0x4>;
interrupt-parent = <&gic>;
ti,hwmods = "mcpdm";
};
In board DTS file the pdmclk needs to be added:
&mcpdm {
clocks = <&twl6040>;
clock-names = "pdmclk";
status = "okay";
};

View File

@ -6,7 +6,7 @@ on the board). The TAS575x devices only support I2C.
Required properties:
- compatible : One of "ti,pcm5121", "ti,pcm5122", "ti,pcm5141",
"ti,pcm5142", "ti,tas5754" or "ti,tas5756"
"ti,pcm5142", "ti,pcm5242", "ti,tas5754" or "ti,tas5756"
- reg : the I2C address of the device for I2C, the chip select
number for SPI.

View File

@ -1,128 +0,0 @@
* Qualcomm Technologies APQ8096 ASoC sound card driver
This binding describes the APQ8096 sound card, which uses qdsp for audio.
- compatible:
Usage: required
Value type: <stringlist>
Definition: must be "qcom,apq8096-sndcard"
- audio-routing:
Usage: Optional
Value type: <stringlist>
Definition: A list of the connections between audio components.
Each entry is a pair of strings, the first being the
connection's sink, the second being the connection's
source. Valid names could be power supplies, MicBias
of codec and the jacks on the board:
Valid names include:
Board Connectors:
"Headphone Left"
"Headphone Right"
"Earphone"
"Line Out1"
"Line Out2"
"Line Out3"
"Line Out4"
"Analog Mic1"
"Analog Mic2"
"Analog Mic3"
"Analog Mic4"
"Analog Mic5"
"Analog Mic6"
"Digital Mic2"
"Digital Mic3"
Audio pins and MicBias on WCD9335 Codec:
"MIC_BIAS1"
"MIC_BIAS2"
"MIC_BIAS3"
"MIC_BIAS4"
"AMIC1"
"AMIC2"
"AMIC3"
"AMIC4"
"AMIC5"
"AMIC6"
"AMIC6"
"DMIC1"
"DMIC2"
"DMIC3"
- model:
Usage: required
Value type: <stringlist>
Definition: The user-visible name of this sound card.
- aux-devs
Usage: optional
Value type: <array of phandles>
Definition: A list of phandles for auxiliary devices (e.g. analog
amplifiers) that do not appear directly within the DAI
links. Should be connected to another audio component
using "audio-routing".
= dailinks
Each subnode of sndcard represents either a dailink, and subnodes of each
dailinks would be cpu/codec/platform dais.
- link-name:
Usage: required
Value type: <string>
Definition: User friendly name for dai link
= CPU, PLATFORM, CODEC dais subnodes
- cpu:
Usage: required
Value type: <subnode>
Definition: cpu dai sub-node
- codec:
Usage: Optional
Value type: <subnode>
Definition: codec dai sub-node
- platform:
Usage: Optional
Value type: <subnode>
Definition: platform dai sub-node
- sound-dai:
Usage: required
Value type: <phandle with arguments>
Definition: dai phandle/s and port of CPU/CODEC/PLATFORM node.
Obsolete:
qcom,model: String for soundcard name (Use model instead)
qcom,audio-routing: A list of the connections between audio components.
(Use audio-routing instead)
Example:
audio {
compatible = "qcom,apq8096-sndcard";
model = "DB820c";
mm1-dai-link {
link-name = "MultiMedia1";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
};
};
hdmi-dai-link {
link-name = "HDMI Playback";
cpu {
sound-dai = <&q6afe HDMI_RX>;
};
platform {
sound-dai = <&q6adm>;
};
codec {
sound-dai = <&hdmi 0>;
};
};
};

View File

@ -0,0 +1,55 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,msm8916-wcd-digital-codec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm MSM8916 WCD Digital Audio Codec
maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
description:
The digital WCD audio codec found on Qualcomm MSM8916 LPASS.
properties:
compatible:
const: qcom,msm8916-wcd-digital-codec
reg:
maxItems: 1
clocks:
maxItems: 2
clock-names:
items:
- const: ahbix-clk
- const: mclk
'#sound-dai-cells':
const: 1
required:
- compatible
- reg
- clocks
- clock-names
- '#sound-dai-cells'
allOf:
- $ref: dai-common.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-msm8916.h>
audio-codec@771c000 {
compatible = "qcom,msm8916-wcd-digital-codec";
reg = <0x0771c000 0x400>;
clocks = <&gcc GCC_ULTAUDIO_AHBFABRIC_IXFABRIC_CLK>,
<&gcc GCC_CODEC_DIGCODEC_CLK>;
clock-names = "ahbix-clk", "mclk";
#sound-dai-cells = <1>;
};

View File

@ -1,20 +0,0 @@
msm8916 digital audio CODEC
## Bindings for codec core in lpass:
Required properties
- compatible = "qcom,msm8916-wcd-digital-codec";
- reg: address space for lpass codec.
- clocks: Handle to mclk and ahbclk
- clock-names: should be "mclk", "ahbix-clk".
Example:
audio-codec@771c000{
compatible = "qcom,msm8916-wcd-digital-codec";
reg = <0x0771c000 0x400>;
clocks = <&gcc GCC_ULTAUDIO_AHBFABRIC_IXFABRIC_CLK>,
<&gcc GCC_CODEC_DIGCODEC_CLK>;
clock-names = "ahbix-clk", "mclk";
#sound-dai-cells = <1>;
};

View File

@ -28,6 +28,7 @@ properties:
- const: qcom,sm8450-sndcard
- enum:
- qcom,apq8016-sbc-sndcard
- qcom,apq8096-sndcard
- qcom,msm8916-qdsp6-sndcard
- qcom,qcm6490-idp-sndcard
- qcom,qcs6490-rb3gen2-sndcard

View File

@ -0,0 +1,91 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,wcd937x-sdw.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm SoundWire Slave devices on WCD9370/WCD9375
maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
description: |
Qualcomm WCD9370/WCD9375 Codec is a standalone Hi-Fi audio codec IC.
It has RX and TX Soundwire slave devices. This bindings is for the
slave devices.
properties:
compatible:
const: sdw20217010a00
reg:
maxItems: 1
qcom,tx-port-mapping:
description: |
Specifies static port mapping between device and host tx ports.
In the order of the device port index which are adc1_port, adc23_port,
dmic03_mbhc_port, dmic46_port.
Supports maximum 4 tx soundwire ports.
WCD9370 TX Port 1 (ADC1) <=> SWR2 Port 2
WCD9370 TX Port 2 (ADC2, 3) <=> SWR2 Port 2
WCD9370 TX Port 3 (DMIC0,1,2,3 & MBHC) <=> SWR2 Port 3
WCD9370 TX Port 4 (DMIC4,5,6,7) <=> SWR2 Port 4
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 4
maxItems: 4
items:
enum: [1, 2, 3, 4]
qcom,rx-port-mapping:
description: |
Specifies static port mapping between device and host rx ports.
In the order of device port index which are hph_port, clsh_port,
comp_port, lo_port, dsd port.
Supports maximum 5 rx soundwire ports.
WCD9370 RX Port 1 (HPH_L/R) <==> SWR1 Port 1 (HPH_L/R)
WCD9370 RX Port 2 (CLSH) <==> SWR1 Port 2 (CLSH)
WCD9370 RX Port 3 (COMP_L/R) <==> SWR1 Port 3 (COMP_L/R)
WCD9370 RX Port 4 (LO) <==> SWR1 Port 4 (LO)
WCD9370 RX Port 5 (DSD_L/R) <==> SWR1 Port 5 (DSD)
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 5
maxItems: 5
items:
enum: [1, 2, 3, 4, 5]
required:
- compatible
- reg
additionalProperties: false
examples:
- |
soundwire@3210000 {
reg = <0x03210000 0x2000>;
#address-cells = <2>;
#size-cells = <0>;
wcd937x_rx: codec@0,4 {
compatible = "sdw20217010a00";
reg = <0 4>;
qcom,rx-port-mapping = <1 2 3 4 5>;
};
};
soundwire@3230000 {
reg = <0x03230000 0x2000>;
#address-cells = <2>;
#size-cells = <0>;
wcd937x_tx: codec@0,3 {
compatible = "sdw20217010a00";
reg = <0 3>;
qcom,tx-port-mapping = <2 2 3 4>;
};
};
...

View File

@ -0,0 +1,82 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,wcd937x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm WCD9370/WCD9375 Audio Codec
maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
description:
Qualcomm WCD9370/WCD9375 Codec is a standalone Hi-Fi audio codec IC.
It has RX and TX Soundwire slave devices.
allOf:
- $ref: dai-common.yaml#
- $ref: qcom,wcd93xx-common.yaml#
properties:
compatible:
oneOf:
- const: qcom,wcd9370-codec
- items:
- const: qcom,wcd9375-codec
- const: qcom,wcd9370-codec
vdd-px-supply:
description: A reference to the 1.8V I/O supply
required:
- compatible
- vdd-px-supply
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
codec {
compatible = "qcom,wcd9370-codec";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&wcd_reset_n>;
pinctrl-1 = <&wcd_reset_n_sleep>;
reset-gpios = <&tlmm 83 GPIO_ACTIVE_HIGH>;
vdd-buck-supply = <&vreg_l17b_1p8>;
vdd-rxtx-supply = <&vreg_l18b_1p8>;
vdd-px-supply = <&vreg_l18b_1p8>;
vdd-mic-bias-supply = <&vreg_bob>;
qcom,micbias1-microvolt = <1800000>;
qcom,micbias2-microvolt = <1800000>;
qcom,micbias3-microvolt = <1800000>;
qcom,micbias4-microvolt = <1800000>;
qcom,rx-device = <&wcd937x_rx>;
qcom,tx-device = <&wcd937x_tx>;
#sound-dai-cells = <1>;
};
/* ... */
soundwire@3210000 {
reg = <0x03210000 0x2000>;
#address-cells = <2>;
#size-cells = <0>;
wcd937x_rx: codec@0,4 {
compatible = "sdw20217010a00";
reg = <0 4>;
qcom,rx-port-mapping = <1 2 3 4 5>;
};
};
soundwire@3230000 {
reg = <0x03230000 0x2000>;
#address-cells = <2>;
#size-cells = <0>;
wcd937x_tx: codec@0,3 {
compatible = "sdw20217010a00";
reg = <0 3>;
qcom,tx-port-mapping = <1 2 3 4>;
};
};
...

View File

@ -32,6 +32,14 @@ properties:
vdd-supply:
description: VDD Supply for the Codec
qcom,port-mapping:
description: |
Specifies static port mapping between slave and master ports.
In the order of slave port index.
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 4
maxItems: 4
'#thermal-sensor-cells':
const: 0

View File

@ -32,6 +32,14 @@ properties:
description: Powerdown/Shutdown line to use (pin SD_N)
maxItems: 1
qcom,port-mapping:
description: |
Specifies static port mapping between slave and master ports.
In the order of slave port index.
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 6
maxItems: 6
'#sound-dai-cells':
const: 0

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/rt1019.yaml#
$id: http://devicetree.org/schemas/sound/realtek,rt1019.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RT1019 Mono Class-D Audio Amplifier

View File

@ -0,0 +1,70 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/realtek,rt5514.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RT5514 audio CODEC
maintainers:
- Animesh Agarwal <animeshagarwal28@gmail.com>
description: |
This device supports both I2C and SPI.
Pins on the device (for linking into audio routes) for I2C:
* DMIC1L
* DMIC1R
* DMIC2L
* DMIC2R
* AMICL
* AMICR
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- $ref: dai-common.yaml#
properties:
compatible:
const: realtek,rt5514
reg:
maxItems: 1
clocks:
items:
- description: Master clock to the CODEC
clock-names:
items:
- const: mclk
interrupts:
maxItems: 1
description: The interrupt number to the cpu.
realtek,dmic-init-delay-ms:
description: Set the DMIC initial delay (ms) to wait it ready for I2C.
spi-max-frequency: true
wakeup-source:
type: boolean
description: Flag to indicate this device can wake system (suspend/resume).
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@57 {
compatible = "realtek,rt5514";
reg = <0x57>;
};
};

View File

@ -0,0 +1,67 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/realtek,rt5631.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ALC5631/RT5631 audio CODEC
maintainers:
- Animesh Agarwal <animeshagarwal28@gmail.com>
description: |
This device supports I2C only.
Pins on the device (for linking into audio routes):
* SPK_OUT_R_P
* SPK_OUT_R_N
* SPK_OUT_L_P
* SPK_OUT_L_N
* HP_OUT_L
* HP_OUT_R
* AUX_OUT2_LP
* AUX_OUT2_RN
* AUX_OUT1_LP
* AUX_OUT1_RN
* AUX_IN_L_JD
* AUX_IN_R_JD
* MONO_IN_P
* MONO_IN_N
* MIC1_P
* MIC1_N
* MIC2_P
* MIC2_N
* MONO_OUT_P
* MONO_OUT_N
* MICBIAS1
* MICBIAS2
properties:
compatible:
enum:
- realtek,alc5631
- realtek,rt5631
reg:
maxItems: 1
port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1a {
compatible = "realtek,alc5631";
reg = <0x1a>;
};
};

View File

@ -0,0 +1,131 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/realtek,rt5645.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RT5650/RT5645 audio CODEC
maintainers:
- Animesh Agarwal <animeshagarwal28@gmail.com>
description: |
This device supports I2C only.
Pins on the device (for linking into audio routes) for RT5645/RT5650:
* DMIC L1
* DMIC R1
* DMIC L2
* DMIC R2
* IN1P
* IN1N
* IN2P
* IN2N
* Haptic Generator
* HPOL
* HPOR
* LOUTL
* LOUTR
* PDM1L
* PDM1R
* SPOL
* SPOR
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- realtek,rt5645
- realtek,rt5650
reg:
maxItems: 1
interrupts:
maxItems: 1
description: The CODEC's interrupt output.
avdd-supply:
description: Power supply for AVDD, providing 1.8V.
cpvdd-supply:
description: Power supply for CPVDD, providing 3.5V.
hp-detect-gpios:
description:
A GPIO spec for the external headphone detect pin. If jd-mode = 0, we
will get the JD status by getting the value of hp-detect-gpios.
maxItems: 1
cbj-sleeve-gpios:
description:
A GPIO spec to control the external combo jack circuit to tie the
sleeve/ring2 contacts to the ground or floating. It could avoid some
electric noise from the active speaker jacks.
maxItems: 1
realtek,in2-differential:
description:
Indicate MIC2 input are differential, rather than single-ended.
type: boolean
realtek,dmic1-data-pin:
description: Specify which pin to be used as DMIC1 data pin.
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # dmic1 is not used
- 1 # using IN2P pin as dmic1 data pin
- 2 # using GPIO6 pin as dmic1 data pin
- 3 # using GPIO10 pin as dmic1 data pin
- 4 # using GPIO12 pin as dmic1 data pin
realtek,dmic2-data-pin:
description: Specify which pin to be used as DMIC2 data pin.
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # dmic2 is not used
- 1 # using IN2N pin as dmic2 data pin
- 2 # using GPIO5 pin as dmic2 data pin
- 3 # using GPIO11 pin as dmic2 data pin
realtek,jd-mode:
description: The JD mode of rt5645/rt5650.
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # rt5645/rt5650 JD function is not used
- 1 # Mode-0 (VDD=3.3V), two port jack detection
- 2 # Mode-1 (VDD=3.3V), one port jack detection
- 3 # Mode-2 (VDD=1.8V), one port jack detection
required:
- compatible
- reg
- interrupts
- avdd-supply
- cpvdd-supply
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1a {
compatible = "realtek,rt5650";
reg = <0x1a>;
hp-detect-gpios = <&gpio 19 0>;
cbj-sleeve-gpios = <&gpio 20 0>;
interrupt-parent = <&gpio>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
avdd-supply = <&avdd_reg>;
cpvdd-supply = <&cpvdd_supply>;
realtek,jd-mode = <3>;
};
};

View File

@ -0,0 +1,129 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/realtek,rt5659.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RT5659/RT5658 audio CODEC
maintainers:
- Animesh Agarwal <animeshagarwal28@gmail.com>
description: |
This device supports I2C only.
Pins on the device (for linking into audio routes) for RT5659/RT5658:
* DMIC L1
* DMIC R1
* DMIC L2
* DMIC R2
* IN1P
* IN1N
* IN2P
* IN2N
* IN3P
* IN3N
* IN4P
* IN4N
* HPOL
* HPOR
* SPOL
* SPOR
* LOUTL
* LOUTR
* MONOOUT
* PDML
* PDMR
* SPDIF
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- realtek,rt5659
- realtek,rt5658
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: mclk
realtek,dmic1-data-pin:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # dmic1 is not used
- 1 # using IN2N pin as dmic1 data pin
- 2 # using GPIO5 pin as dmic1 data pin
- 3 # using GPIO9 pin as dmic1 data pin
- 4 # using GPIO11 pin as dmic1 data pin
description: Specify which pin to be used as DMIC1 data pin.
default: 0
realtek,dmic2-data-pin:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # dmic2 is not used
- 1 # using IN2P pin as dmic2 data pin
- 2 # using GPIO6 pin as dmic2 data pin
- 3 # using GPIO10 pin as dmic2 data pin
- 4 # using GPIO12 pin as dmic2 data pin
description: Specify which pin to be used as DMIC2 data pin.
default: 0
realtek,jd-src:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # No JD is used
- 1 # using JD3 as JD source
- 2 # JD source for Intel HDA header
description: Specify which JD source be used.
default: 0
realtek,ldo1-en-gpios:
maxItems: 1
description: CODEC's LDO1_EN pin.
realtek,reset-gpios:
maxItems: 1
description: CODEC's RESET pin.
ports:
$ref: /schemas/graph.yaml#/properties/ports
port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1b {
compatible = "realtek,rt5659";
reg = <0x1b>;
interrupt-parent = <&gpio>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
realtek,ldo1-en-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
};
};

View File

@ -0,0 +1,135 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/realtek,rt5677.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RT5677 audio CODEC
maintainers:
- Animesh Agarwal <animeshagarwal28@gmail.com>
description: |
This device supports I2C only.
Pins on the device (for linking into audio routes):
* IN1P
* IN1N
* IN2P
* IN2N
* MICBIAS1
* DMIC1
* DMIC2
* DMIC3
* DMIC4
* LOUT1
* LOUT2
* LOUT3
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: realtek,rt5677
reg:
maxItems: 1
interrupts:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
realtek,pow-ldo2-gpio:
maxItems: 1
description: CODEC's POW_LDO2 pin.
realtek,reset-gpio:
maxItems: 1
description: CODEC's RESET pin. Active low.
realtek,gpio-config:
description: |
Array of six 8bit elements that configures GPIO.
0 - floating (reset value)
1 - pull down
2 - pull up
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 6
maxItems: 6
items:
maximum: 2
realtek,jd1-gpio:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # OFF
- 1 # GPIO1 for jd1.
- 2 # GPIO2 for jd1.
- 3 # GPIO3 for jd1.
description: Configures GPIO Mic Jack detection 1.
realtek,jd2-gpio:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # OFF
- 1 # GPIO4 for jd2.
- 2 # GPIO5 for jd2.
- 3 # GPIO6 for jd2.
description: Configures GPIO Mic Jack detection 2.
realtek,jd3-gpio:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # OFF
- 1 # GPIO4 for jd3.
- 2 # GPIO5 for jd3.
- 3 # GPIO6 for jd3.
description: Configures GPIO Mic Jack detection 3.
patternProperties:
'^realtek,in[1-2]-differential$':
type: boolean
description: Indicate MIC1/2 input are differential, rather than
single-ended.
'^realtek,lout[1-3]-differential$':
type: boolean
description: Indicate LOUT1/2/3 outputs are differential, rather than
single-ended.
required:
- compatible
- reg
- interrupts
- gpio-controller
- '#gpio-cells'
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@2c {
compatible = "realtek,rt5677";
reg = <0x2c>;
interrupt-parent = <&gpio>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
realtek,pow-ldo2-gpio = <&gpio 3 GPIO_ACTIVE_HIGH>;
realtek,reset-gpio = <&gpio 3 GPIO_ACTIVE_LOW>;
realtek,in1-differential;
realtek,gpio-config = <0 0 0 0 0 2>;
};
};

View File

@ -1,37 +0,0 @@
RT5514 audio CODEC
This device supports both I2C and SPI.
Required properties:
- compatible : "realtek,rt5514".
- reg : the I2C address of the device for I2C, the chip select
number for SPI.
Optional properties:
- clocks: The phandle of the master clock to the CODEC
- clock-names: Should be "mclk"
- interrupts: The interrupt number to the cpu. The interrupt specifier format
depends on the interrupt controller.
- realtek,dmic-init-delay-ms
Set the DMIC initial delay (ms) to wait it ready for I2C.
Pins on the device (for linking into audio routes) for I2C:
* DMIC1L
* DMIC1R
* DMIC2L
* DMIC2R
* AMICL
* AMICR
Example:
rt5514: codec@57 {
compatible = "realtek,rt5514";
reg = <0x57>;
};

View File

@ -1,48 +0,0 @@
ALC5631/RT5631 audio CODEC
This device supports I2C only.
Required properties:
- compatible : "realtek,alc5631" or "realtek,rt5631"
- reg : the I2C address of the device.
Pins on the device (for linking into audio routes):
* SPK_OUT_R_P
* SPK_OUT_R_N
* SPK_OUT_L_P
* SPK_OUT_L_N
* HP_OUT_L
* HP_OUT_R
* AUX_OUT2_LP
* AUX_OUT2_RN
* AUX_OUT1_LP
* AUX_OUT1_RN
* AUX_IN_L_JD
* AUX_IN_R_JD
* MONO_IN_P
* MONO_IN_N
* MIC1_P
* MIC1_N
* MIC2_P
* MIC2_N
* MONO_OUT_P
* MONO_OUT_N
* MICBIAS1
* MICBIAS2
Example:
alc5631: audio-codec@1a {
compatible = "realtek,alc5631";
reg = <0x1a>;
};
or
rt5631: audio-codec@1a {
compatible = "realtek,rt5631";
reg = <0x1a>;
};

View File

@ -1,82 +0,0 @@
RT5650/RT5645 audio CODEC
This device supports I2C only.
Required properties:
- compatible : One of "realtek,rt5645" or "realtek,rt5650".
- reg : The I2C address of the device.
- interrupts : The CODEC's interrupt output.
- avdd-supply: Power supply for AVDD, providing 1.8V.
- cpvdd-supply: Power supply for CPVDD, providing 3.5V.
Optional properties:
- hp-detect-gpios:
a GPIO spec for the external headphone detect pin. If jd-mode = 0,
we will get the JD status by getting the value of hp-detect-gpios.
- cbj-sleeve-gpios:
a GPIO spec to control the external combo jack circuit to tie the sleeve/ring2
contacts to the ground or floating. It could avoid some electric noise from the
active speaker jacks.
- realtek,in2-differential
Boolean. Indicate MIC2 input are differential, rather than single-ended.
- realtek,dmic1-data-pin
0: dmic1 is not used
1: using IN2P pin as dmic1 data pin
2: using GPIO6 pin as dmic1 data pin
3: using GPIO10 pin as dmic1 data pin
4: using GPIO12 pin as dmic1 data pin
- realtek,dmic2-data-pin
0: dmic2 is not used
1: using IN2N pin as dmic2 data pin
2: using GPIO5 pin as dmic2 data pin
3: using GPIO11 pin as dmic2 data pin
-- realtek,jd-mode : The JD mode of rt5645/rt5650
0 : rt5645/rt5650 JD function is not used
1 : Mode-0 (VDD=3.3V), two port jack detection
2 : Mode-1 (VDD=3.3V), one port jack detection
3 : Mode-2 (VDD=1.8V), one port jack detection
Pins on the device (for linking into audio routes) for RT5645/RT5650:
* DMIC L1
* DMIC R1
* DMIC L2
* DMIC R2
* IN1P
* IN1N
* IN2P
* IN2N
* Haptic Generator
* HPOL
* HPOR
* LOUTL
* LOUTR
* PDM1L
* PDM1R
* SPOL
* SPOR
Example:
codec: rt5650@1a {
compatible = "realtek,rt5650";
reg = <0x1a>;
hp-detect-gpios = <&gpio 19 0>;
cbj-sleeve-gpios = <&gpio 20 0>;
interrupt-parent = <&gpio>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
realtek,dmic-en = "true";
realtek,en-jd-func = "true";
realtek,jd-mode = <3>;
};

View File

@ -1,89 +0,0 @@
RT5659/RT5658 audio CODEC
This device supports I2C only.
Required properties:
- compatible : One of "realtek,rt5659" or "realtek,rt5658".
- reg : The I2C address of the device.
- interrupts : The CODEC's interrupt output.
Optional properties:
- clocks: The phandle of the master clock to the CODEC
- clock-names: Should be "mclk"
- realtek,in1-differential
- realtek,in3-differential
- realtek,in4-differential
Boolean. Indicate MIC1/3/4 input are differential, rather than single-ended.
- realtek,dmic1-data-pin
0: dmic1 is not used
1: using IN2N pin as dmic1 data pin
2: using GPIO5 pin as dmic1 data pin
3: using GPIO9 pin as dmic1 data pin
4: using GPIO11 pin as dmic1 data pin
- realtek,dmic2-data-pin
0: dmic2 is not used
1: using IN2P pin as dmic2 data pin
2: using GPIO6 pin as dmic2 data pin
3: using GPIO10 pin as dmic2 data pin
4: using GPIO12 pin as dmic2 data pin
- realtek,jd-src
0: No JD is used
1: using JD3 as JD source
2: JD source for Intel HDA header
- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
- realtek,reset-gpios : The GPIO that controls the CODEC's RESET pin.
- sound-name-prefix: Please refer to dai-common.yaml
- ports: A Codec may have a single or multiple I2S interfaces. These
interfaces on Codec side can be described under 'ports' or 'port'.
When the SoC or host device is connected to multiple interfaces of
the Codec, the connectivity can be described using 'ports' property.
If a single interface is used, then 'port' can be used. The usage
depends on the platform or board design.
Please refer to Documentation/devicetree/bindings/graph.txt
Pins on the device (for linking into audio routes) for RT5659/RT5658:
* DMIC L1
* DMIC R1
* DMIC L2
* DMIC R2
* IN1P
* IN1N
* IN2P
* IN2N
* IN3P
* IN3N
* IN4P
* IN4N
* HPOL
* HPOR
* SPOL
* SPOR
* LOUTL
* LOUTR
* MONOOUT
* PDML
* PDMR
* SPDIF
Example:
rt5659 {
compatible = "realtek,rt5659";
reg = <0x1b>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>;
realtek,ldo1-en-gpios =
<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
};

View File

@ -1,78 +0,0 @@
RT5677 audio CODEC
This device supports I2C only.
Required properties:
- compatible : "realtek,rt5677".
- reg : The I2C address of the device.
- interrupts : The CODEC's interrupt output.
- gpio-controller : Indicates this device is a GPIO controller.
- #gpio-cells : Should be two. The first cell is the pin number and the
second cell is used to specify optional parameters (currently unused).
Optional properties:
- realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin.
- realtek,reset-gpio : The GPIO that controls the CODEC's RESET pin. Active low.
- realtek,in1-differential
- realtek,in2-differential
- realtek,lout1-differential
- realtek,lout2-differential
- realtek,lout3-differential
Boolean. Indicate MIC1/2 input and LOUT1/2/3 outputs are differential,
rather than single-ended.
- realtek,gpio-config
Array of six 8bit elements that configures GPIO.
0 - floating (reset value)
1 - pull down
2 - pull up
- realtek,jd1-gpio
Configures GPIO Mic Jack detection 1.
Select 0 ~ 3 as OFF, GPIO1, GPIO2 and GPIO3 respectively.
- realtek,jd2-gpio
- realtek,jd3-gpio
Configures GPIO Mic Jack detection 2 and 3.
Select 0 ~ 3 as OFF, GPIO4, GPIO5 and GPIO6 respectively.
Pins on the device (for linking into audio routes):
* IN1P
* IN1N
* IN2P
* IN2N
* MICBIAS1
* DMIC1
* DMIC2
* DMIC3
* DMIC4
* LOUT1
* LOUT2
* LOUT3
Example:
rt5677 {
compatible = "realtek,rt5677";
reg = <0x2c>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
realtek,pow-ldo2-gpio =
<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
realtek,reset-gpio = <&gpio TEGRA_GPIO(BB, 3) GPIO_ACTIVE_LOW>;
realtek,in1-differential = "true";
realtek,gpio-config = /bits/ 8 <0 0 0 0 0 2>; /* pull up GPIO6 */
realtek,jd2-gpio = <3>; /* Enables Jack detection for GPIO6 */
};

View File

@ -53,6 +53,9 @@ properties:
submic-bias-supply:
description: Supply for the micbias on the Sub microphone
headset-mic-bias-supply:
description: Supply for the micbias on the Headset microphone
fm-sel-gpios:
maxItems: 1
description: GPIO pin for FM selection
@ -61,6 +64,36 @@ properties:
maxItems: 1
description: GPIO pin for line out selection
headset-detect-gpios:
maxItems: 1
description: GPIO for detection of headset insertion
headset-key-gpios:
maxItems: 1
description: GPIO for detection of headset key press
io-channels:
maxItems: 1
description: IO channel to read micbias voltage for headset detection
io-channel-names:
const: headset-detect
samsung,headset-4pole-threshold-microvolt:
minItems: 2
maxItems: 2
description:
Array containing minimum and maximum IO channel value for 4-pole
(with microphone/button) headsets. If the IO channel value is
outside of this range, a 3-pole headset is assumed.
samsung,headset-button-threshold-microvolt:
minItems: 3
maxItems: 3
description: |
Array of minimum (inclusive) IO channel values for headset button
detection, in order: "Media", "Volume Up" and "Volume Down".
required:
- compatible
- cpu

View File

@ -24,6 +24,11 @@ properties:
description: |
GPIOs used to select the input line.
state-labels:
description: State of input line. default is "Input 1", "Input 2"
$ref: /schemas/types.yaml#/definitions/string-array
maxItems: 2
sound-name-prefix: true
required:
@ -37,4 +42,5 @@ examples:
mux {
compatible = "simple-audio-mux";
mux-gpios = <&gpio 3 0>;
state-labels = "Label_A", "Label_B";
};

View File

@ -1,10 +0,0 @@
Device-Tree bindings for dummy spdif receiver
Required properties:
- compatible: should be "linux,spdif-dir".
Example node:
codec: spdif-receiver {
compatible = "linux,spdif-dir";
};

View File

@ -1,49 +0,0 @@
Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 stereo power amplifiers
The codec is controlled through an I2C interface. It also has two other
signals that can be wired up to GPIOs: reset (strongly recommended), and
powerdown (optional).
Required properties:
- compatible: should be one of the following:
- "ti,tas5707"
- "ti,tas5711",
- "ti,tas5717",
- "ti,tas5719",
- "ti,tas5721"
- "ti,tas5733"
- reg: The I2C address of the device
- #sound-dai-cells: must be equal to 0
Optional properties:
- reset-gpios: GPIO specifier for the TAS571x's active low reset line
- pdn-gpios: GPIO specifier for the TAS571x's active low powerdown line
- clocks: clock phandle for the MCLK input
- clock-names: should be "mclk"
- AVDD-supply: regulator phandle for the AVDD supply (all chips)
- DVDD-supply: regulator phandle for the DVDD supply (all chips)
- HPVDD-supply: regulator phandle for the HPVDD supply (5717/5719)
- PVDD_AB-supply: regulator phandle for the PVDD_AB supply (5717/5719)
- PVDD_CD-supply: regulator phandle for the PVDD_CD supply (5717/5719)
- PVDD_A-supply: regulator phandle for the PVDD_A supply (5711)
- PVDD_B-supply: regulator phandle for the PVDD_B supply (5711)
- PVDD_C-supply: regulator phandle for the PVDD_C supply (5711)
- PVDD_D-supply: regulator phandle for the PVDD_D supply (5711)
- DRVDD-supply: regulator phandle for the DRVDD supply (5721)
- PVDD-supply: regulator phandle for the PVDD supply (5721)
Example:
tas5717: audio-codec@2a {
compatible = "ti,tas5717";
reg = <0x2a>;
#sound-dai-cells = <0>;
reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
pdn-gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
clocks = <&clk_core CLK_I2S>;
clock-names = "mclk";
};

View File

@ -0,0 +1,73 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,omap4-mcpdm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: OMAP McPDM
maintainers:
- Misael Lopez Cruz <misael.lopez@ti.com>
description:
OMAP ALSA SoC DAI driver using McPDM port used by TWL6040
properties:
compatible:
const: ti,omap4-mcpdm
reg:
items:
- description: MPU access base address
- description: L3 interconnect address
reg-names:
items:
- const: mpu
- const: dma
interrupts:
maxItems: 1
dmas:
maxItems: 2
dma-names:
items:
- const: up_link
- const: dn_link
clocks:
maxItems: 1
clock-names:
items:
- const: pdmclk
required:
- compatible
- reg
- reg-names
- interrupts
- dmas
- dma-names
- clocks
- clock-names
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
mcpdm@0 {
compatible = "ti,omap4-mcpdm";
reg = <0x0 0x7f>, /* MPU private access */
<0x49032000 0x7f>; /* L3 Interconnect */
reg-names = "mpu", "dma";
interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>;
dmas = <&sdma 65>, <&sdma 66>;
dma-names = "up_link", "dn_link";
clocks = <&twl6040>;
clock-names = "pdmclk";
};

View File

@ -2,7 +2,7 @@
# Copyright (C) 2019 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/tas2562.yaml#
$id: http://devicetree.org/schemas/sound/ti,tas2562.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TAS2562 Smart PA

View File

@ -2,7 +2,7 @@
# Copyright (C) 2019-20 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/tas2770.yaml#
$id: http://devicetree.org/schemas/sound/ti,tas2770.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TAS2770 Smart PA

View File

@ -2,7 +2,7 @@
# Copyright (C) 2020-2022 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/tas27xx.yaml#
$id: http://devicetree.org/schemas/sound/ti,tas27xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TAS2764/TAS2780 Smart PA

View File

@ -0,0 +1,133 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,tas57xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 stereo power amplifiers
maintainers:
- Neil Armstrong <neil.armstrong@linaro.org>
properties:
compatible:
enum:
- ti,tas5707
- ti,tas5711
- ti,tas5717
- ti,tas5719
- ti,tas5721
- ti,tas5733
reg:
maxItems: 1
reset-gpios:
maxItems: 1
description: GPIO for the active low reset line
pdn-gpios:
maxItems: 1
description: GPIO for the active low powerdown line
clocks:
maxItems: 1
clock-names:
const: mclk
AVDD-supply: true
DVDD-supply: true
HPVDD-supply: true
PVDD_AB-supply: true
PVDD_CD-supply: true
PVDD_A-supply: true
PVDD_B-supply: true
PVDD_C-supply: true
PVDD_D-supply: true
DRVDD-supply: true
PVDD-supply: true
'#sound-dai-cells':
const: 0
port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
- '#sound-dai-cells'
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
enum:
- ti,tas5717
- ti,tas5719
then:
properties:
PVDD_A-supply: false
PVDD_B-supply: false
PVDD_C-supply: false
PVDD_D-supply: false
DRVDD-supply: false
PVDD-supply: false
- if:
properties:
compatible:
contains:
enum:
- ti,tas5711
then:
properties:
HPVDD-supply: false
PVDD_AB-supply: false
PVDD_CD-supply: false
DRVDD-supply: false
PVDD-supply: false
- if:
properties:
compatible:
contains:
enum:
- ti,tas5721
then:
properties:
HPVDD-supply: false
PVDD_AB-supply: false
PVDD_CD-supply: false
PVDD_A-supply: false
PVDD_B-supply: false
PVDD_C-supply: false
PVDD_D-supply: false
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@2a {
compatible = "ti,tas5717";
reg = <0x2a>;
#sound-dai-cells = <0>;
reset-gpios = <&gpio1 15 0>;
pdn-gpios = <&gpio1 15 0>;
AVDD-supply = <&avdd_supply>;
DVDD-supply = <&dvdd_supply>;
HPVDD-supply = <&hpvdd_supply>;
PVDD_AB-supply = <&pvdd_ab_supply>;
PVDD_CD-supply = <&pvdd_cd_supply>;
};
};
...

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/tas5805m.yaml#
$id: http://devicetree.org/schemas/sound/ti,tas5805m.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TAS5805M audio amplifier

View File

@ -58,8 +58,8 @@ properties:
description: |
Configuration for DMDIN/GPIO1 pin.
When ADC3XXX_GPIO_GPO is configured, this causes corresponding the
ALSA control "GPIOx Output" to appear, as a switch control.
When ADC3XXX_GPIO_GPO is selected, the pin may be controlled via the
GPIO framework, as pin number 0 on the device.
ti,dmclk-gpio2:
$ref: /schemas/types.yaml#/definitions/uint32
@ -76,12 +76,32 @@ properties:
description: |
Configuration for DMCLK/GPIO2 pin.
When ADC3XXX_GPIO_GPO is configured, this causes corresponding the
ALSA control "GPIOx Output" to appear, as a switch control.
When ADC3XXX_GPIO_GPO is selected, the pin may be controlled via the
GPIO framework, as pin number 1 on the device.
Note that there is currently no support for reading the GPIO pins as
inputs.
ti,micbias1-gpo:
type: boolean
description: |
When set, the MICBIAS1 pin may be controlled via the GPIO framework,
as pin number 3 on the device.
In this mode, when the pin is activated, it will be set to the voltage
specified by the ti,micbias1-vg property. When deactivated, the pin will
float.
ti,micbias2-gpo:
type: boolean
description: |
When set, the MICBIAS2 pin may be controlled via the GPIO framework,
as pin number 4 on the device.
In this mode, when the pin is activated, it will be set to the voltage
specified by the ti,micbias2-vg property. When deactivated, the pin will
float.
ti,micbias1-vg:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
@ -104,6 +124,10 @@ properties:
description: |
Mic bias voltage output on MICBIAS2 pin
dependencies:
ti,micbias1-gpo: ['ti,micbias1-vg']
ti,micbias2-gpo: ['ti,micbias2-vg']
required:
- compatible
- reg

View File

@ -2,7 +2,7 @@
# Copyright (C) 2019 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/tlv320adcx140.yaml#
$id: http://devicetree.org/schemas/sound/ti,tlv320adcx140.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TLV320ADCX140 Quad Channel Analog-to-Digital Converter

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/wm8750.yaml#
$id: http://devicetree.org/schemas/sound/wlf,wm8750.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: WM8750 and WM8987 audio CODECs

View File

@ -0,0 +1,47 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/wlf,wm8782.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Wolfson Microelectromics WM8782 audio CODEC
maintainers:
- patches@opensource.cirrus.com
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: wlf,wm8782
Vdda-supply:
description: Regulator for the analog power supply (2.7V - 5.5V)
Vdd-supply:
description: Regulator for the digital power supply (2.7V - 3.6V)
wlf,fsampen:
description: FSAMPEN pin value, 0 for low, 1 for high, 2 for disconnected.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2]
"#sound-dai-cells":
const: 0
required:
- compatible
- Vdda-supply
- Vdd-supply
unevaluatedProperties: false
examples:
- |
wm8782: codec {
compatible = "wlf,wm8782";
Vdda-supply = <&vdda_supply>;
Vdd-supply = <&vdd_supply>;
wlf,fsampen = <2>;
};

View File

@ -0,0 +1,58 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/wlf,wm8804.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: WM8804 audio codec
description: |
This device supports both I2C and SPI (configured with pin strapping on the
board).
maintainers:
- patches@opensource.cirrus.com
properties:
compatible:
const: wlf,wm8804
reg:
description:
The I2C address of the device for I2C, the chip select number for SPI.
maxItems: 1
"#sound-dai-cells":
const: 0
PVDD-supply:
description: PLL core supply
DVDD-supply:
description: Digital core supply
wlf,reset-gpio:
description: A GPIO specifier for the GPIO controlling the reset pin.
maxItems: 1
required:
- reg
- compatible
- PVDD-supply
- DVDD-supply
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1a {
compatible = "wlf,wm8804";
reg = <0x1a>;
PVDD-supply = <&pvdd_reg>;
DVDD-supply = <&dvdd_reg>;
};
};

View File

@ -1,24 +0,0 @@
WM8782 stereo ADC
This device does not have any control interface or reset pins.
Required properties:
- compatible : "wlf,wm8782"
- Vdda-supply : phandle to a regulator for the analog power supply (2.7V - 5.5V)
- Vdd-supply : phandle to a regulator for the digital power supply (2.7V - 3.6V)
Optional properties:
- wlf,fsampen:
FSAMPEN pin value, 0 for low, 1 for high, 2 for disconnected.
Defaults to 0 if left unspecified.
Example:
wm8782: stereo-adc {
compatible = "wlf,wm8782";
Vdda-supply = <&vdda_supply>;
Vdd-supply = <&vdd_supply>;
wlf,fsampen = <2>; /* 192KHz */
};

View File

@ -1,25 +0,0 @@
WM8804 audio CODEC
This device supports both I2C and SPI (configured with pin strapping
on the board).
Required properties:
- compatible : "wlf,wm8804"
- reg : the I2C address of the device for I2C, the chip select
number for SPI.
- PVDD-supply, DVDD-supply : Power supplies for the device, as covered
in Documentation/devicetree/bindings/regulator/regulator.txt
Optional properties:
- wlf,reset-gpio: A GPIO specifier for the GPIO controlling the reset pin
Example:
wm8804: codec@1a {
compatible = "wlf,wm8804";
reg = <0x1a>;
};

View File

@ -150,6 +150,12 @@ applicable everywhere (see syntax).
That will limit the usefulness but on the other hand avoid
the illegal configurations all over.
If "select" <symbol> is followed by "if" <expr>, <symbol> will be
selected by the logical AND of the value of the current menu symbol
and <expr>. This means, the lower limit can be downgraded due to the
presence of "if" <expr>. This behavior may seem weird, but we rely on
it. (The future of this behavior is undecided.)
- weak reverse dependencies: "imply" <symbol> ["if" <expr>]
This is similar to "select" as it enforces a lower limit on another
@ -184,7 +190,7 @@ applicable everywhere (see syntax).
ability to hook into a secondary subsystem while allowing the user to
configure that subsystem out without also having to unset these drivers.
Note: If the combination of FOO=y and BAR=m causes a link error,
Note: If the combination of FOO=y and BAZ=m causes a link error,
you can guard the function call with IS_REACHABLE()::
foo_init()
@ -202,6 +208,10 @@ applicable everywhere (see syntax).
imply BAR
imply BAZ
Note: If "imply" <symbol> is followed by "if" <expr>, the default of <symbol>
will be the logical AND of the value of the current menu symbol and <expr>.
(The future of this behavior is undecided.)
- limiting menu display: "visible if" <expr>
This attribute is only applicable to menu blocks, if the condition is

View File

@ -329,24 +329,23 @@ XDP_SHARED_UMEM option and provide the initial socket's fd in the
sxdp_shared_umem_fd field as you registered the UMEM on that
socket. These two sockets will now share one and the same UMEM.
In this case, it is possible to use the NIC's packet steering
capabilities to steer the packets to the right queue. This is not
possible in the previous example as there is only one queue shared
among sockets, so the NIC cannot do this steering as it can only steer
between queues.
There is no need to supply an XDP program like the one in the previous
case where sockets were bound to the same queue id and
device. Instead, use the NIC's packet steering capabilities to steer
the packets to the right queue. In the previous example, there is only
one queue shared among sockets, so the NIC cannot do this steering. It
can only steer between queues.
In libxdp (or libbpf prior to version 1.0), you need to use the
xsk_socket__create_shared() API as it takes a reference to a FILL ring
and a COMPLETION ring that will be created for you and bound to the
shared UMEM. You can use this function for all the sockets you create,
or you can use it for the second and following ones and use
xsk_socket__create() for the first one. Both methods yield the same
result.
In libbpf, you need to use the xsk_socket__create_shared() API as it
takes a reference to a FILL ring and a COMPLETION ring that will be
created for you and bound to the shared UMEM. You can use this
function for all the sockets you create, or you can use it for the
second and following ones and use xsk_socket__create() for the first
one. Both methods yield the same result.
Note that a UMEM can be shared between sockets on the same queue id
and device, as well as between queues on the same device and between
devices at the same time. It is also possible to redirect to any
socket as long as it is bound to the same umem with XDP_SHARED_UMEM.
devices at the same time.
XDP_USE_NEED_WAKEUP bind flag
-----------------------------
@ -823,10 +822,6 @@ A: The short answer is no, that is not supported at the moment. The
switch, or other distribution mechanism, in your NIC to direct
traffic to the correct queue id and socket.
Note that if you are using the XDP_SHARED_UMEM option, it is
possible to switch traffic between any socket bound to the same
umem.
Q: My packets are sometimes corrupted. What is wrong?
A: Care has to be taken not to feed the same buffer in the UMEM into

View File

@ -582,7 +582,7 @@ depending on the hardware. In all cases, however, only routes that have the
Devices generating the streams may allow enabling and disabling some of the
routes or have a fixed routing configuration. If the routes can be disabled, not
declaring the routes (or declaring them without
``VIDIOC_SUBDEV_STREAM_FL_ACTIVE`` flag set) in ``VIDIOC_SUBDEV_S_ROUTING`` will
``V4L2_SUBDEV_STREAM_FL_ACTIVE`` flag set) in ``VIDIOC_SUBDEV_S_ROUTING`` will
disable the routes. ``VIDIOC_SUBDEV_S_ROUTING`` will still return such routes
back to the user in the routes array, with the ``V4L2_SUBDEV_STREAM_FL_ACTIVE``
flag unset.

View File

@ -1107,7 +1107,6 @@ L: linux-pm@vger.kernel.org
S: Supported
F: Documentation/admin-guide/pm/amd-pstate.rst
F: drivers/cpufreq/amd-pstate*
F: include/linux/amd-pstate.h
F: tools/power/x86/amd_pstate_tracer/amd_pstate_trace.py
AMD PTDMA DRIVER
@ -8910,6 +8909,16 @@ S: Maintained
F: sound/soc/fsl/fsl*
F: sound/soc/fsl/imx*
FREESCALE SOC LPC32XX SOUND DRIVERS
M: J.M.B. Downing <jonathan.downing@nautel.com>
M: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
R: Vladimir Zapolskiy <vz@mleia.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
L: linuxppc-dev@lists.ozlabs.org
S: Maintained
F: Documentation/devicetree/bindings/sound/nxp,lpc3220-i2s.yaml
F: sound/soc/fsl/lpc3xxx-*
FREESCALE SOC SOUND QMC DRIVER
M: Herve Codina <herve.codina@bootlin.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
@ -15238,7 +15247,6 @@ F: drivers/staging/most/
F: include/linux/most.h
MOTORCOMM PHY DRIVER
M: Peter Geis <pgwipeout@gmail.com>
M: Frank <Frank.Sae@motor-comm.com>
L: netdev@vger.kernel.org
S: Maintained
@ -16197,7 +16205,7 @@ NXP SGTL5000 DRIVER
M: Fabio Estevam <festevam@gmail.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/sound/sgtl5000.yaml
F: Documentation/devicetree/bindings/sound/fsl,sgtl5000.yaml
F: sound/soc/codecs/sgtl5000*
NXP SJA1105 ETHERNET SWITCH DRIVER
@ -22177,13 +22185,13 @@ M: Baojun Xu <baojun.xu@ti.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/sound/tas2552.txt
F: Documentation/devicetree/bindings/sound/tas2562.yaml
F: Documentation/devicetree/bindings/sound/tas2770.yaml
F: Documentation/devicetree/bindings/sound/tas27xx.yaml
F: Documentation/devicetree/bindings/sound/ti,tas2562.yaml
F: Documentation/devicetree/bindings/sound/ti,tas2770.yaml
F: Documentation/devicetree/bindings/sound/ti,tas27xx.yaml
F: Documentation/devicetree/bindings/sound/ti,pcm1681.yaml
F: Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
F: Documentation/devicetree/bindings/sound/ti,tlv320*.yaml
F: Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
F: Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml
F: Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
F: Documentation/devicetree/bindings/sound/tpa6130a2.txt
F: include/sound/tas2*.h
@ -22680,7 +22688,7 @@ L: tomoyo-users-en@lists.osdn.me (subscribers-only, for users in English)
L: tomoyo-dev@lists.osdn.me (subscribers-only, for developers in Japanese)
L: tomoyo-users@lists.osdn.me (subscribers-only, for users in Japanese)
S: Maintained
W: https://tomoyo.osdn.jp/
W: https://tomoyo.sourceforge.net/
F: security/tomoyo/
TOPSTAR LAPTOP EXTRAS DRIVER

View File

@ -2,7 +2,7 @@
VERSION = 6
PATCHLEVEL = 10
SUBLEVEL = 0
EXTRAVERSION = -rc2
EXTRAVERSION = -rc3
NAME = Baby Opossum Posse
# *DOCUMENTATION*

View File

@ -311,7 +311,6 @@ CONFIG_SND_IMX_SOC=y
CONFIG_SND_SOC_EUKREA_TLV320=y
CONFIG_SND_SOC_IMX_ES8328=y
CONFIG_SND_SOC_IMX_SGTL5000=y
CONFIG_SND_SOC_IMX_SPDIF=y
CONFIG_SND_SOC_FSL_ASOC_CARD=y
CONFIG_SND_SOC_AC97_CODEC=y
CONFIG_SND_SOC_CS42XX8_I2C=y

View File

@ -940,7 +940,6 @@ CONFIG_SND_SOC_FSL_MICFIL=m
CONFIG_SND_SOC_FSL_EASRC=m
CONFIG_SND_IMX_SOC=m
CONFIG_SND_SOC_IMX_SGTL5000=m
CONFIG_SND_SOC_IMX_SPDIF=m
CONFIG_SND_SOC_FSL_ASOC_CARD=m
CONFIG_SND_SOC_IMX_AUDMIX=m
CONFIG_SND_SOC_MT8183=m

View File

@ -146,7 +146,7 @@
/* Coprocessor traps */
.macro __init_el2_cptr
__check_hvhe .LnVHE_\@, x1
mov x0, #(CPACR_EL1_FPEN_EL1EN | CPACR_EL1_FPEN_EL0EN)
mov x0, #CPACR_ELx_FPEN
msr cpacr_el1, x0
b .Lskip_set_cptr_\@
.LnVHE_\@:
@ -277,7 +277,7 @@
// (h)VHE case
mrs x0, cpacr_el1 // Disable SVE traps
orr x0, x0, #(CPACR_EL1_ZEN_EL1EN | CPACR_EL1_ZEN_EL0EN)
orr x0, x0, #CPACR_ELx_ZEN
msr cpacr_el1, x0
b .Lskip_set_cptr_\@
@ -298,7 +298,7 @@
// (h)VHE case
mrs x0, cpacr_el1 // Disable SME traps
orr x0, x0, #(CPACR_EL1_SMEN_EL0EN | CPACR_EL1_SMEN_EL1EN)
orr x0, x0, #CPACR_ELx_SMEN
msr cpacr_el1, x0
b .Lskip_set_cptr_sme_\@

View File

@ -153,8 +153,9 @@ extern void __memset_io(volatile void __iomem *, int, size_t);
* emit the large TLP from the CPU.
*/
static inline void __const_memcpy_toio_aligned32(volatile u32 __iomem *to,
const u32 *from, size_t count)
static __always_inline void
__const_memcpy_toio_aligned32(volatile u32 __iomem *to, const u32 *from,
size_t count)
{
switch (count) {
case 8:
@ -196,24 +197,22 @@ static inline void __const_memcpy_toio_aligned32(volatile u32 __iomem *to,
void __iowrite32_copy_full(void __iomem *to, const void *from, size_t count);
static inline void __const_iowrite32_copy(void __iomem *to, const void *from,
size_t count)
static __always_inline void
__iowrite32_copy(void __iomem *to, const void *from, size_t count)
{
if (count == 8 || count == 4 || count == 2 || count == 1) {
if (__builtin_constant_p(count) &&
(count == 8 || count == 4 || count == 2 || count == 1)) {
__const_memcpy_toio_aligned32(to, from, count);
dgh();
} else {
__iowrite32_copy_full(to, from, count);
}
}
#define __iowrite32_copy __iowrite32_copy
#define __iowrite32_copy(to, from, count) \
(__builtin_constant_p(count) ? \
__const_iowrite32_copy(to, from, count) : \
__iowrite32_copy_full(to, from, count))
static inline void __const_memcpy_toio_aligned64(volatile u64 __iomem *to,
const u64 *from, size_t count)
static __always_inline void
__const_memcpy_toio_aligned64(volatile u64 __iomem *to, const u64 *from,
size_t count)
{
switch (count) {
case 8:
@ -255,21 +254,18 @@ static inline void __const_memcpy_toio_aligned64(volatile u64 __iomem *to,
void __iowrite64_copy_full(void __iomem *to, const void *from, size_t count);
static inline void __const_iowrite64_copy(void __iomem *to, const void *from,
size_t count)
static __always_inline void
__iowrite64_copy(void __iomem *to, const void *from, size_t count)
{
if (count == 8 || count == 4 || count == 2 || count == 1) {
if (__builtin_constant_p(count) &&
(count == 8 || count == 4 || count == 2 || count == 1)) {
__const_memcpy_toio_aligned64(to, from, count);
dgh();
} else {
__iowrite64_copy_full(to, from, count);
}
}
#define __iowrite64_copy(to, from, count) \
(__builtin_constant_p(count) ? \
__const_iowrite64_copy(to, from, count) : \
__iowrite64_copy_full(to, from, count))
#define __iowrite64_copy __iowrite64_copy
/*
* I/O memory mapping functions.

View File

@ -305,6 +305,12 @@
GENMASK(19, 14) | \
BIT(11))
#define CPTR_VHE_EL2_RES0 (GENMASK(63, 32) | \
GENMASK(27, 26) | \
GENMASK(23, 22) | \
GENMASK(19, 18) | \
GENMASK(15, 0))
/* Hyp Debug Configuration Register bits */
#define MDCR_EL2_E2TB_MASK (UL(0x3))
#define MDCR_EL2_E2TB_SHIFT (UL(24))

View File

@ -557,6 +557,68 @@ static __always_inline void kvm_incr_pc(struct kvm_vcpu *vcpu)
vcpu_set_flag((v), e); \
} while (0)
#define __build_check_all_or_none(r, bits) \
BUILD_BUG_ON(((r) & (bits)) && ((r) & (bits)) != (bits))
#define __cpacr_to_cptr_clr(clr, set) \
({ \
u64 cptr = 0; \
\
if ((set) & CPACR_ELx_FPEN) \
cptr |= CPTR_EL2_TFP; \
if ((set) & CPACR_ELx_ZEN) \
cptr |= CPTR_EL2_TZ; \
if ((set) & CPACR_ELx_SMEN) \
cptr |= CPTR_EL2_TSM; \
if ((clr) & CPACR_ELx_TTA) \
cptr |= CPTR_EL2_TTA; \
if ((clr) & CPTR_EL2_TAM) \
cptr |= CPTR_EL2_TAM; \
if ((clr) & CPTR_EL2_TCPAC) \
cptr |= CPTR_EL2_TCPAC; \
\
cptr; \
})
#define __cpacr_to_cptr_set(clr, set) \
({ \
u64 cptr = 0; \
\
if ((clr) & CPACR_ELx_FPEN) \
cptr |= CPTR_EL2_TFP; \
if ((clr) & CPACR_ELx_ZEN) \
cptr |= CPTR_EL2_TZ; \
if ((clr) & CPACR_ELx_SMEN) \
cptr |= CPTR_EL2_TSM; \
if ((set) & CPACR_ELx_TTA) \
cptr |= CPTR_EL2_TTA; \
if ((set) & CPTR_EL2_TAM) \
cptr |= CPTR_EL2_TAM; \
if ((set) & CPTR_EL2_TCPAC) \
cptr |= CPTR_EL2_TCPAC; \
\
cptr; \
})
#define cpacr_clear_set(clr, set) \
do { \
BUILD_BUG_ON((set) & CPTR_VHE_EL2_RES0); \
BUILD_BUG_ON((clr) & CPACR_ELx_E0POE); \
__build_check_all_or_none((clr), CPACR_ELx_FPEN); \
__build_check_all_or_none((set), CPACR_ELx_FPEN); \
__build_check_all_or_none((clr), CPACR_ELx_ZEN); \
__build_check_all_or_none((set), CPACR_ELx_ZEN); \
__build_check_all_or_none((clr), CPACR_ELx_SMEN); \
__build_check_all_or_none((set), CPACR_ELx_SMEN); \
\
if (has_vhe() || has_hvhe()) \
sysreg_clear_set(cpacr_el1, clr, set); \
else \
sysreg_clear_set(cptr_el2, \
__cpacr_to_cptr_clr(clr, set), \
__cpacr_to_cptr_set(clr, set));\
} while (0)
static __always_inline void kvm_write_cptr_el2(u64 val)
{
if (has_vhe() || has_hvhe())
@ -570,17 +632,16 @@ static __always_inline u64 kvm_get_reset_cptr_el2(struct kvm_vcpu *vcpu)
u64 val;
if (has_vhe()) {
val = (CPACR_EL1_FPEN_EL0EN | CPACR_EL1_FPEN_EL1EN |
CPACR_EL1_ZEN_EL1EN);
val = (CPACR_ELx_FPEN | CPACR_EL1_ZEN_EL1EN);
if (cpus_have_final_cap(ARM64_SME))
val |= CPACR_EL1_SMEN_EL1EN;
} else if (has_hvhe()) {
val = (CPACR_EL1_FPEN_EL0EN | CPACR_EL1_FPEN_EL1EN);
val = CPACR_ELx_FPEN;
if (!vcpu_has_sve(vcpu) || !guest_owns_fp_regs())
val |= CPACR_EL1_ZEN_EL1EN | CPACR_EL1_ZEN_EL0EN;
val |= CPACR_ELx_ZEN;
if (cpus_have_final_cap(ARM64_SME))
val |= CPACR_EL1_SMEN_EL1EN | CPACR_EL1_SMEN_EL0EN;
val |= CPACR_ELx_SMEN;
} else {
val = CPTR_NVHE_EL2_RES1;

View File

@ -76,6 +76,7 @@ static inline enum kvm_mode kvm_get_mode(void) { return KVM_MODE_NONE; };
DECLARE_STATIC_KEY_FALSE(userspace_irqchip_in_use);
extern unsigned int __ro_after_init kvm_sve_max_vl;
extern unsigned int __ro_after_init kvm_host_sve_max_vl;
int __init kvm_arm_init_sve(void);
u32 __attribute_const__ kvm_target_cpu(void);
@ -521,6 +522,20 @@ struct kvm_cpu_context {
u64 *vncr_array;
};
struct cpu_sve_state {
__u64 zcr_el1;
/*
* Ordering is important since __sve_save_state/__sve_restore_state
* relies on it.
*/
__u32 fpsr;
__u32 fpcr;
/* Must be SVE_VQ_BYTES (128 bit) aligned. */
__u8 sve_regs[];
};
/*
* This structure is instantiated on a per-CPU basis, and contains
* data that is:
@ -534,7 +549,15 @@ struct kvm_cpu_context {
*/
struct kvm_host_data {
struct kvm_cpu_context host_ctxt;
struct user_fpsimd_state *fpsimd_state; /* hyp VA */
/*
* All pointers in this union are hyp VA.
* sve_state is only used in pKVM and if system_supports_sve().
*/
union {
struct user_fpsimd_state *fpsimd_state;
struct cpu_sve_state *sve_state;
};
/* Ownership of the FP regs */
enum {

View File

@ -111,7 +111,8 @@ void __debug_restore_host_buffers_nvhe(struct kvm_vcpu *vcpu);
void __fpsimd_save_state(struct user_fpsimd_state *fp_regs);
void __fpsimd_restore_state(struct user_fpsimd_state *fp_regs);
void __sve_restore_state(void *sve_pffr, u32 *fpsr);
void __sve_save_state(void *sve_pffr, u32 *fpsr, int save_ffr);
void __sve_restore_state(void *sve_pffr, u32 *fpsr, int restore_ffr);
u64 __guest_enter(struct kvm_vcpu *vcpu);
@ -142,5 +143,6 @@ extern u64 kvm_nvhe_sym(id_aa64smfr0_el1_sys_val);
extern unsigned long kvm_nvhe_sym(__icache_flags);
extern unsigned int kvm_nvhe_sym(kvm_arm_vmid_bits);
extern unsigned int kvm_nvhe_sym(kvm_host_sve_max_vl);
#endif /* __ARM64_KVM_HYP_H__ */

View File

@ -128,4 +128,13 @@ static inline unsigned long hyp_ffa_proxy_pages(void)
return (2 * KVM_FFA_MBOX_NR_PAGES) + DIV_ROUND_UP(desc_max, PAGE_SIZE);
}
static inline size_t pkvm_host_sve_state_size(void)
{
if (!system_supports_sve())
return 0;
return size_add(sizeof(struct cpu_sve_state),
SVE_SIG_REGS_SIZE(sve_vq_from_vl(kvm_host_sve_max_vl)));
}
#endif /* __ARM64_KVM_PKVM_H__ */

View File

@ -462,6 +462,9 @@ static int run_all_insn_set_hw_mode(unsigned int cpu)
for (int i = 0; i < ARRAY_SIZE(insn_emulations); i++) {
struct insn_emulation *insn = insn_emulations[i];
bool enable = READ_ONCE(insn->current_mode) == INSN_HW;
if (insn->status == INSN_UNAVAILABLE)
continue;
if (insn->set_hw_mode && insn->set_hw_mode(enable)) {
pr_warn("CPU[%u] cannot support the emulation of %s",
cpu, insn->name);

View File

@ -1931,6 +1931,11 @@ static unsigned long nvhe_percpu_order(void)
return size ? get_order(size) : 0;
}
static size_t pkvm_host_sve_state_order(void)
{
return get_order(pkvm_host_sve_state_size());
}
/* A lookup table holding the hypervisor VA for each vector slot */
static void *hyp_spectre_vector_selector[BP_HARDEN_EL2_SLOTS];
@ -2310,12 +2315,20 @@ static void __init teardown_subsystems(void)
static void __init teardown_hyp_mode(void)
{
bool free_sve = system_supports_sve() && is_protected_kvm_enabled();
int cpu;
free_hyp_pgds();
for_each_possible_cpu(cpu) {
free_page(per_cpu(kvm_arm_hyp_stack_page, cpu));
free_pages(kvm_nvhe_sym(kvm_arm_hyp_percpu_base)[cpu], nvhe_percpu_order());
if (free_sve) {
struct cpu_sve_state *sve_state;
sve_state = per_cpu_ptr_nvhe_sym(kvm_host_data, cpu)->sve_state;
free_pages((unsigned long) sve_state, pkvm_host_sve_state_order());
}
}
}
@ -2398,6 +2411,58 @@ static int __init kvm_hyp_init_protection(u32 hyp_va_bits)
return 0;
}
static int init_pkvm_host_sve_state(void)
{
int cpu;
if (!system_supports_sve())
return 0;
/* Allocate pages for host sve state in protected mode. */
for_each_possible_cpu(cpu) {
struct page *page = alloc_pages(GFP_KERNEL, pkvm_host_sve_state_order());
if (!page)
return -ENOMEM;
per_cpu_ptr_nvhe_sym(kvm_host_data, cpu)->sve_state = page_address(page);
}
/*
* Don't map the pages in hyp since these are only used in protected
* mode, which will (re)create its own mapping when initialized.
*/
return 0;
}
/*
* Finalizes the initialization of hyp mode, once everything else is initialized
* and the initialziation process cannot fail.
*/
static void finalize_init_hyp_mode(void)
{
int cpu;
if (system_supports_sve() && is_protected_kvm_enabled()) {
for_each_possible_cpu(cpu) {
struct cpu_sve_state *sve_state;
sve_state = per_cpu_ptr_nvhe_sym(kvm_host_data, cpu)->sve_state;
per_cpu_ptr_nvhe_sym(kvm_host_data, cpu)->sve_state =
kern_hyp_va(sve_state);
}
} else {
for_each_possible_cpu(cpu) {
struct user_fpsimd_state *fpsimd_state;
fpsimd_state = &per_cpu_ptr_nvhe_sym(kvm_host_data, cpu)->host_ctxt.fp_regs;
per_cpu_ptr_nvhe_sym(kvm_host_data, cpu)->fpsimd_state =
kern_hyp_va(fpsimd_state);
}
}
}
static void pkvm_hyp_init_ptrauth(void)
{
struct kvm_cpu_context *hyp_ctxt;
@ -2566,6 +2631,10 @@ static int __init init_hyp_mode(void)
goto out_err;
}
err = init_pkvm_host_sve_state();
if (err)
goto out_err;
err = kvm_hyp_init_protection(hyp_va_bits);
if (err) {
kvm_err("Failed to init hyp memory protection\n");
@ -2730,6 +2799,13 @@ static __init int kvm_arm_init(void)
if (err)
goto out_subs;
/*
* This should be called after initialization is done and failure isn't
* possible anymore.
*/
if (!in_hyp_mode)
finalize_init_hyp_mode();
kvm_arm_initialised = true;
return 0;

View File

@ -2181,16 +2181,23 @@ void kvm_emulate_nested_eret(struct kvm_vcpu *vcpu)
if (forward_traps(vcpu, HCR_NV))
return;
spsr = vcpu_read_sys_reg(vcpu, SPSR_EL2);
spsr = kvm_check_illegal_exception_return(vcpu, spsr);
/* Check for an ERETAx */
esr = kvm_vcpu_get_esr(vcpu);
if (esr_iss_is_eretax(esr) && !kvm_auth_eretax(vcpu, &elr)) {
/*
* Oh no, ERETAx failed to authenticate. If we have
* FPACCOMBINE, deliver an exception right away. If we
* don't, then let the mangled ELR value trickle down the
* Oh no, ERETAx failed to authenticate.
*
* If we have FPACCOMBINE and we don't have a pending
* Illegal Execution State exception (which has priority
* over FPAC), deliver an exception right away.
*
* Otherwise, let the mangled ELR value trickle down the
* ERET handling, and the guest will have a little surprise.
*/
if (kvm_has_pauth(vcpu->kvm, FPACCOMBINE)) {
if (kvm_has_pauth(vcpu->kvm, FPACCOMBINE) && !(spsr & PSR_IL_BIT)) {
esr &= ESR_ELx_ERET_ISS_ERETA;
esr |= FIELD_PREP(ESR_ELx_EC_MASK, ESR_ELx_EC_FPAC);
kvm_inject_nested_sync(vcpu, esr);
@ -2201,17 +2208,11 @@ void kvm_emulate_nested_eret(struct kvm_vcpu *vcpu)
preempt_disable();
kvm_arch_vcpu_put(vcpu);
spsr = __vcpu_sys_reg(vcpu, SPSR_EL2);
spsr = kvm_check_illegal_exception_return(vcpu, spsr);
if (!esr_iss_is_eretax(esr))
elr = __vcpu_sys_reg(vcpu, ELR_EL2);
trace_kvm_nested_eret(vcpu, elr, spsr);
/*
* Note that the current exception level is always the virtual EL2,
* since we set HCR_EL2.NV bit only when entering the virtual EL2.
*/
*vcpu_pc(vcpu) = elr;
*vcpu_cpsr(vcpu) = spsr;

View File

@ -90,6 +90,13 @@ void kvm_arch_vcpu_load_fp(struct kvm_vcpu *vcpu)
fpsimd_save_and_flush_cpu_state();
}
}
/*
* If normal guests gain SME support, maintain this behavior for pKVM
* guests, which don't support SME.
*/
WARN_ON(is_protected_kvm_enabled() && system_supports_sme() &&
read_sysreg_s(SYS_SVCR));
}
/*
@ -161,9 +168,7 @@ void kvm_arch_vcpu_put_fp(struct kvm_vcpu *vcpu)
if (has_vhe() && system_supports_sme()) {
/* Also restore EL0 state seen on entry */
if (vcpu_get_flag(vcpu, HOST_SME_ENABLED))
sysreg_clear_set(CPACR_EL1, 0,
CPACR_EL1_SMEN_EL0EN |
CPACR_EL1_SMEN_EL1EN);
sysreg_clear_set(CPACR_EL1, 0, CPACR_ELx_SMEN);
else
sysreg_clear_set(CPACR_EL1,
CPACR_EL1_SMEN_EL0EN,

View File

@ -251,6 +251,7 @@ static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
case PSR_AA32_MODE_SVC:
case PSR_AA32_MODE_ABT:
case PSR_AA32_MODE_UND:
case PSR_AA32_MODE_SYS:
if (!vcpu_el1_is_32bit(vcpu))
return -EINVAL;
break;
@ -276,7 +277,7 @@ static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
if (*vcpu_cpsr(vcpu) & PSR_MODE32_BIT) {
int i, nr_reg;
switch (*vcpu_cpsr(vcpu)) {
switch (*vcpu_cpsr(vcpu) & PSR_AA32_MODE_MASK) {
/*
* Either we are dealing with user mode, and only the
* first 15 registers (+ PC) must be narrowed to 32bit.

Some files were not shown because too many files have changed in this diff Show More