ASoC: Updates for v6.10

This is a very big update, in large part due to extensive work the Intel
 people have been doing in their drivers though it's also been busy
 elsewhere.  There's also a big overhaul of the DAPM documentation from
 Luca Ceresoli arising from the work he did putting together his recent
 ELC talk, and he also contributed a new tool for visualising the DAPM
 state.
 
  - A new tool dapm-graph for visualising the DAPM state.
  - Substantial fixes and clarifications for the DAPM documentation.
  - Very large updates throughout the Intel audio drivers.
  - Cleanups of accessors for driver data, module labelling, and for
    constification.
  - Modernsation and cleanup work in the Mediatek drivers.
  - Several fixes and features for the DaVinci I2S driver.
  - New drivers for several AMD and Intel platforms, Nuvoton NAU8325,
    Rockchip RK3308 and Texas Instruments PCM6240.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZB2aoACgkQJNaLcl1U
 h9D9YQf+K66pFTAMro/X4KWXfg3EeHnqgwbdb1pN/3zKqFgnxPfxJvhvpeM+bFSj
 yZGssZZzd9jMkm6rLOZRPCycqSZtimy9DjSnNyPhQgU0jA2ZS1NRMnpN77ubMkPW
 IBeWO8j5TBYaqttlmM0YBscErng9GsNqOD5a+HW9AJz5+TYbIIWt/2TVnyBRU0LV
 NGkKj1x7AvJY239kitJ4cfFGZpPaGU7bxUk1HCpSPWM+asIpNSxBhKD73zZlWHZ/
 kwJSbFslXdCm/TZZQtox/Z8GClxQ2dasWEfXWZK9kBJbHD3UH7VJ4Em50pBWnKis
 piarddgSvu5zhVmZkhJhkmOe8jiswA==
 =N5Dj
 -----END PGP SIGNATURE-----

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

ASoC: Updates for v6.10

This is a very big update, in large part due to extensive work the Intel
people have been doing in their drivers though it's also been busy
elsewhere.  There's also a big overhaul of the DAPM documentation from
Luca Ceresoli arising from the work he did putting together his recent
ELC talk, and he also contributed a new tool for visualising the DAPM
state.

 - A new tool dapm-graph for visualising the DAPM state.
 - Substantial fixes and clarifications for the DAPM documentation.
 - Very large updates throughout the Intel audio drivers.
 - Cleanups of accessors for driver data, module labelling, and for
   constification.
 - Modernsation and cleanup work in the Mediatek drivers.
 - Several fixes and features for the DaVinci I2S driver.
 - New drivers for several AMD and Intel platforms, Nuvoton NAU8325,
   Rockchip RK3308 and Texas Instruments PCM6240.
This commit is contained in:
Takashi Iwai 2024-05-13 11:39:49 +02:00
commit 3a07362fab
1365 changed files with 28588 additions and 16668 deletions

View File

@ -38,6 +38,16 @@ Alexei Starovoitov <ast@kernel.org> <alexei.starovoitov@gmail.com>
Alexei Starovoitov <ast@kernel.org> <ast@fb.com> Alexei Starovoitov <ast@kernel.org> <ast@fb.com>
Alexei Starovoitov <ast@kernel.org> <ast@plumgrid.com> Alexei Starovoitov <ast@kernel.org> <ast@plumgrid.com>
Alexey Makhalov <alexey.amakhalov@broadcom.com> <amakhalov@vmware.com> Alexey Makhalov <alexey.amakhalov@broadcom.com> <amakhalov@vmware.com>
Alex Elder <elder@kernel.org>
Alex Elder <elder@kernel.org> <aelder@sgi.com>
Alex Elder <elder@kernel.org> <alex.elder@linaro.org>
Alex Elder <elder@kernel.org> <alex.elder@linary.org>
Alex Elder <elder@kernel.org> <elder@dreamhost.com>
Alex Elder <elder@kernel.org> <elder@dreawmhost.com>
Alex Elder <elder@kernel.org> <elder@ieee.org>
Alex Elder <elder@kernel.org> <elder@inktank.com>
Alex Elder <elder@kernel.org> <elder@linaro.org>
Alex Elder <elder@kernel.org> <elder@newdream.net>
Alex Hung <alexhung@gmail.com> <alex.hung@canonical.com> Alex Hung <alexhung@gmail.com> <alex.hung@canonical.com>
Alex Shi <alexs@kernel.org> <alex.shi@intel.com> Alex Shi <alexs@kernel.org> <alex.shi@intel.com>
Alex Shi <alexs@kernel.org> <alex.shi@linaro.org> Alex Shi <alexs@kernel.org> <alex.shi@linaro.org>
@ -98,6 +108,8 @@ Ben Widawsky <bwidawsk@kernel.org> <ben@bwidawsk.net>
Ben Widawsky <bwidawsk@kernel.org> <ben.widawsky@intel.com> Ben Widawsky <bwidawsk@kernel.org> <ben.widawsky@intel.com>
Ben Widawsky <bwidawsk@kernel.org> <benjamin.widawsky@intel.com> Ben Widawsky <bwidawsk@kernel.org> <benjamin.widawsky@intel.com>
Benjamin Poirier <benjamin.poirier@gmail.com> <bpoirier@suse.de> Benjamin Poirier <benjamin.poirier@gmail.com> <bpoirier@suse.de>
Benjamin Tissoires <bentiss@kernel.org> <benjamin.tissoires@gmail.com>
Benjamin Tissoires <bentiss@kernel.org> <benjamin.tissoires@redhat.com>
Bjorn Andersson <andersson@kernel.org> <bjorn@kryo.se> Bjorn Andersson <andersson@kernel.org> <bjorn@kryo.se>
Bjorn Andersson <andersson@kernel.org> <bjorn.andersson@linaro.org> Bjorn Andersson <andersson@kernel.org> <bjorn.andersson@linaro.org>
Bjorn Andersson <andersson@kernel.org> <bjorn.andersson@sonymobile.com> Bjorn Andersson <andersson@kernel.org> <bjorn.andersson@sonymobile.com>
@ -446,7 +458,8 @@ Mythri P K <mythripk@ti.com>
Nadav Amit <nadav.amit@gmail.com> <namit@vmware.com> Nadav Amit <nadav.amit@gmail.com> <namit@vmware.com>
Nadav Amit <nadav.amit@gmail.com> <namit@cs.technion.ac.il> Nadav Amit <nadav.amit@gmail.com> <namit@cs.technion.ac.il>
Nadia Yvette Chambers <nyc@holomorphy.com> William Lee Irwin III <wli@holomorphy.com> Nadia Yvette Chambers <nyc@holomorphy.com> William Lee Irwin III <wli@holomorphy.com>
Naoya Horiguchi <naoya.horiguchi@nec.com> <n-horiguchi@ah.jp.nec.com> Naoya Horiguchi <nao.horiguchi@gmail.com> <n-horiguchi@ah.jp.nec.com>
Naoya Horiguchi <nao.horiguchi@gmail.com> <naoya.horiguchi@nec.com>
Nathan Chancellor <nathan@kernel.org> <natechancellor@gmail.com> Nathan Chancellor <nathan@kernel.org> <natechancellor@gmail.com>
Neeraj Upadhyay <quic_neeraju@quicinc.com> <neeraju@codeaurora.org> Neeraj Upadhyay <quic_neeraju@quicinc.com> <neeraju@codeaurora.org>
Neil Armstrong <neil.armstrong@linaro.org> <narmstrong@baylibre.com> Neil Armstrong <neil.armstrong@linaro.org> <narmstrong@baylibre.com>
@ -524,6 +537,7 @@ Rémi Denis-Courmont <rdenis@simphalempin.com>
Ricardo Ribalda <ribalda@kernel.org> <ricardo@ribalda.com> Ricardo Ribalda <ribalda@kernel.org> <ricardo@ribalda.com>
Ricardo Ribalda <ribalda@kernel.org> Ricardo Ribalda Delgado <ribalda@kernel.org> Ricardo Ribalda <ribalda@kernel.org> Ricardo Ribalda Delgado <ribalda@kernel.org>
Ricardo Ribalda <ribalda@kernel.org> <ricardo.ribalda@gmail.com> Ricardo Ribalda <ribalda@kernel.org> <ricardo.ribalda@gmail.com>
Richard Genoud <richard.genoud@bootlin.com> <richard.genoud@gmail.com>
Richard Leitner <richard.leitner@linux.dev> <dev@g0hl1n.net> Richard Leitner <richard.leitner@linux.dev> <dev@g0hl1n.net>
Richard Leitner <richard.leitner@linux.dev> <me@g0hl1n.net> Richard Leitner <richard.leitner@linux.dev> <me@g0hl1n.net>
Richard Leitner <richard.leitner@linux.dev> <richard.leitner@skidata.com> Richard Leitner <richard.leitner@linux.dev> <richard.leitner@skidata.com>

View File

@ -3146,6 +3146,10 @@ S: Triftstra=DFe 55
S: 13353 Berlin S: 13353 Berlin
S: Germany S: Germany
N: Gustavo Pimental
E: gustavo.pimentel@synopsys.com
D: PCI driver for Synopsys DesignWare
N: Emanuel Pirker N: Emanuel Pirker
E: epirker@edu.uni-klu.ac.at E: epirker@edu.uni-klu.ac.at
D: AIC5800 IEEE 1394, RAW I/O on 1394 D: AIC5800 IEEE 1394, RAW I/O on 1394

View File

@ -138,11 +138,10 @@ associated with the source address of the indirect branch. Specifically,
the BHB might be shared across privilege levels even in the presence of the BHB might be shared across privilege levels even in the presence of
Enhanced IBRS. Enhanced IBRS.
Currently the only known real-world BHB attack vector is via Previously the only known real-world BHB attack vector was via unprivileged
unprivileged eBPF. Therefore, it's highly recommended to not enable eBPF. Further research has found attacks that don't require unprivileged eBPF.
unprivileged eBPF, especially when eIBRS is used (without retpolines). For a full mitigation against BHB attacks it is recommended to set BHI_DIS_S or
For a full mitigation against BHB attacks, it's recommended to use use the BHB clearing sequence.
retpolines (or eIBRS combined with retpolines).
Attack scenarios Attack scenarios
---------------- ----------------
@ -430,6 +429,23 @@ The possible values in this file are:
'PBRSB-eIBRS: Not affected' CPU is not affected by PBRSB 'PBRSB-eIBRS: Not affected' CPU is not affected by PBRSB
=========================== ======================================================= =========================== =======================================================
- Branch History Injection (BHI) protection status:
.. list-table::
* - BHI: Not affected
- System is not affected
* - BHI: Retpoline
- System is protected by retpoline
* - BHI: BHI_DIS_S
- System is protected by BHI_DIS_S
* - BHI: SW loop, KVM SW loop
- System is protected by software clearing sequence
* - BHI: Vulnerable
- System is vulnerable to BHI
* - BHI: Vulnerable, KVM: SW loop
- System is vulnerable; KVM is protected by software clearing sequence
Full mitigation might require a microcode update from the CPU Full mitigation might require a microcode update from the CPU
vendor. When the necessary microcode is not available, the kernel will vendor. When the necessary microcode is not available, the kernel will
report vulnerability. report vulnerability.
@ -484,7 +500,11 @@ Spectre variant 2
Systems which support enhanced IBRS (eIBRS) enable IBRS protection once at Systems which support enhanced IBRS (eIBRS) enable IBRS protection once at
boot, by setting the IBRS bit, and they're automatically protected against boot, by setting the IBRS bit, and they're automatically protected against
Spectre v2 variant attacks. some Spectre v2 variant attacks. The BHB can still influence the choice of
indirect branch predictor entry, and although branch predictor entries are
isolated between modes when eIBRS is enabled, the BHB itself is not isolated
between modes. Systems which support BHI_DIS_S will set it to protect against
BHI attacks.
On Intel's enhanced IBRS systems, this includes cross-thread branch target On Intel's enhanced IBRS systems, this includes cross-thread branch target
injections on SMT systems (STIBP). In other words, Intel eIBRS enables injections on SMT systems (STIBP). In other words, Intel eIBRS enables
@ -638,6 +658,18 @@ kernel command line.
spectre_v2=off. Spectre variant 1 mitigations spectre_v2=off. Spectre variant 1 mitigations
cannot be disabled. cannot be disabled.
spectre_bhi=
[X86] Control mitigation of Branch History Injection
(BHI) vulnerability. This setting affects the deployment
of the HW BHI control and the SW BHB clearing sequence.
on
(default) Enable the HW or SW mitigation as
needed.
off
Disable the mitigation.
For spectre_v2_user see Documentation/admin-guide/kernel-parameters.txt For spectre_v2_user see Documentation/admin-guide/kernel-parameters.txt
Mitigation selection guide Mitigation selection guide

View File

@ -3444,6 +3444,7 @@
retbleed=off [X86] retbleed=off [X86]
spec_rstack_overflow=off [X86] spec_rstack_overflow=off [X86]
spec_store_bypass_disable=off [X86,PPC] spec_store_bypass_disable=off [X86,PPC]
spectre_bhi=off [X86]
spectre_v2_user=off [X86] spectre_v2_user=off [X86]
srbds=off [X86,INTEL] srbds=off [X86,INTEL]
ssbd=force-off [ARM64] ssbd=force-off [ARM64]
@ -6063,6 +6064,15 @@
sonypi.*= [HW] Sony Programmable I/O Control Device driver sonypi.*= [HW] Sony Programmable I/O Control Device driver
See Documentation/admin-guide/laptops/sonypi.rst See Documentation/admin-guide/laptops/sonypi.rst
spectre_bhi= [X86] Control mitigation of Branch History Injection
(BHI) vulnerability. This setting affects the
deployment of the HW BHI control and the SW BHB
clearing sequence.
on - (default) Enable the HW or SW mitigation
as needed.
off - Disable the mitigation.
spectre_v2= [X86,EARLY] Control mitigation of Spectre variant 2 spectre_v2= [X86,EARLY] Control mitigation of Spectre variant 2
(indirect branch speculation) vulnerability. (indirect branch speculation) vulnerability.
The default operation protects the kernel from The default operation protects the kernel from

View File

@ -53,6 +53,15 @@ patternProperties:
compatible: compatible:
const: qcom,sm8150-dpu const: qcom,sm8150-dpu
"^displayport-controller@[0-9a-f]+$":
type: object
additionalProperties: true
properties:
compatible:
contains:
const: qcom,sm8150-dp
"^dsi@[0-9a-f]+$": "^dsi@[0-9a-f]+$":
type: object type: object
additionalProperties: true additionalProperties: true

View File

@ -52,6 +52,9 @@ properties:
- const: main - const: main
- const: mm - const: mm
power-domains:
maxItems: 1
required: required:
- compatible - compatible
- reg - reg

View File

@ -8,7 +8,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART) title: Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
maintainers: maintainers:
- Richard Genoud <richard.genoud@gmail.com> - Richard Genoud <richard.genoud@bootlin.com>
properties: properties:
compatible: compatible:

View File

@ -1,50 +0,0 @@
Texas Instruments DaVinci McBSP module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This binding describes the "Multi-channel Buffered Serial Port" (McBSP)
audio interface found in some TI DaVinci processors like the OMAP-L138 or AM180x.
Required properties:
~~~~~~~~~~~~~~~~~~~~
- compatible :
"ti,da850-mcbsp" : for DA850, AM180x and OPAM-L138 platforms
- reg : physical base address and length of the controller memory mapped
region(s).
- reg-names : Should contain:
* "mpu" for the main registers (required).
* "dat" for the data FIFO (optional).
- dmas: three element list of DMA controller phandles, DMA request line and
TC channel ordered triplets.
- dma-names: identifier string for each DMA request line in the dmas property.
These strings correspond 1:1 with the ordered pairs in dmas. The dma
identifiers must be "rx" and "tx".
Optional properties:
~~~~~~~~~~~~~~~~~~~~
- interrupts : Interrupt numbers for McBSP
- interrupt-names : Known interrupt names are "rx" and "tx"
- pinctrl-0: Should specify pin control group used for this controller.
- pinctrl-names: Should contain only one value - "default", for more details
please refer to pinctrl-bindings.txt
Example (AM1808):
~~~~~~~~~~~~~~~~~
mcbsp0: mcbsp@1d10000 {
compatible = "ti,da850-mcbsp";
pinctrl-names = "default";
pinctrl-0 = <&mcbsp0_pins>;
reg = <0x00110000 0x1000>,
<0x00310000 0x1000>;
reg-names = "mpu", "dat";
interrupts = <97 98>;
interrupt-names = "rx", "tx";
dmas = <&edma0 3 1
&edma0 2 1>;
dma-names = "tx", "rx";
};

View File

@ -0,0 +1,113 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/davinci-mcbsp.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: McBSP Controller for TI SoCs
maintainers:
- Bastien Curutchet <bastien.curutchet@bootlin.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- ti,da850-mcbsp
reg:
minItems: 1
items:
- description: CFG registers
- description: data registers
reg-names:
minItems: 1
items:
- const: mpu
- const: dat
dmas:
items:
- description: transmission DMA channel
- description: reception DMA channel
dma-names:
items:
- const: tx
- const: rx
interrupts:
items:
- description: RX interrupt
- description: TX interrupt
interrupt-names:
items:
- const: rx
- const: tx
clocks:
minItems: 1
items:
- description: functional clock
- description: external input clock for sample rate generator.
clock-names:
minItems: 1
items:
- const: fck
- const: clks
power-domains:
maxItems: 1
"#sound-dai-cells":
const: 0
ti,T1-framing-tx:
$ref: /schemas/types.yaml#/definitions/flag
description:
If the property is present, tx data delay is set to 2 bit clock periods.
McBSP will insert a blank period (high-impedance period) before the first
data bit. This can be used to interface to T1-framing devices.
ti,T1-framing-rx:
$ref: /schemas/types.yaml#/definitions/flag
description:
If the property is present, rx data delay is set to 2 bit clock periods.
McBSP will discard the bit preceding the data stream (called framing bit).
This can be used to interface to T1-framing devices.
required:
- "#sound-dai-cells"
- compatible
- reg
- reg-names
- dmas
- dma-names
- clocks
unevaluatedProperties: false
examples:
- |
mcbsp0@1d10000 {
#sound-dai-cells = <0>;
compatible = "ti,da850-mcbsp";
pinctrl-names = "default";
pinctrl-0 = <&mcbsp0_pins>;
reg = <0x111000 0x1000>,
<0x311000 0x1000>;
reg-names = "mpu", "dat";
interrupts = <97>, <98>;
interrupt-names = "rx", "tx";
dmas = <&edma0 3 1>,
<&edma0 2 1>;
dma-names = "tx", "rx";
clocks = <&psc1 14>;
};

View File

@ -1,50 +0,0 @@
NXP Audio Mixer (AUDMIX).
The Audio Mixer is a on-chip functional module that allows mixing of two
audio streams into a single audio stream. Audio Mixer has two input serial
audio interfaces. These are driven by two Synchronous Audio interface
modules (SAI). Each input serial interface carries 8 audio channels in its
frame in TDM manner. Mixer mixes audio samples of corresponding channels
from two interfaces into a single sample. Before mixing, audio samples of
two inputs can be attenuated based on configuration. The output of the
Audio Mixer is also a serial audio interface. Like input interfaces it has
the same TDM frame format. This output is used to drive the serial DAC TDM
interface of audio codec and also sent to the external pins along with the
receive path of normal audio SAI module for readback by the CPU.
The output of Audio Mixer can be selected from any of the three streams
- serial audio input 1
- serial audio input 2
- mixed audio
Mixing operation is independent of audio sample rate but the two audio
input streams must have same audio sample rate with same number of channels
in TDM frame to be eligible for mixing.
Device driver required properties:
=================================
- compatible : Compatible list, contains "fsl,imx8qm-audmix"
- reg : Offset and length of the register set for the device.
- clocks : Must contain an entry for each entry in clock-names.
- clock-names : Must include the "ipg" for register access.
- power-domains : Must contain the phandle to AUDMIX power domain node
- dais : Must contain a list of phandles to AUDMIX connected
DAIs. The current implementation requires two phandles
to SAI interfaces to be provided, the first SAI in the
list being used to route the AUDMIX output.
Device driver configuration example:
======================================
audmix: audmix@59840000 {
compatible = "fsl,imx8qm-audmix";
reg = <0x0 0x59840000 0x0 0x10000>;
clocks = <&clk IMX8QXP_AUD_AUDMIX_IPG>;
clock-names = "ipg";
power-domains = <&pd_audmix>;
dais = <&sai4>, <&sai5>;
};

View File

@ -0,0 +1,83 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/fsl,audmix.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP Audio Mixer (AUDMIX).
maintainers:
- Shengjiu Wang <shengjiu.wang@nxp.com>
- Frank Li <Frank.Li@nxp.com>
description: |
The Audio Mixer is a on-chip functional module that allows mixing of two
audio streams into a single audio stream. Audio Mixer has two input serial
audio interfaces. These are driven by two Synchronous Audio interface
modules (SAI). Each input serial interface carries 8 audio channels in its
frame in TDM manner. Mixer mixes audio samples of corresponding channels
from two interfaces into a single sample. Before mixing, audio samples of
two inputs can be attenuated based on configuration. The output of the
Audio Mixer is also a serial audio interface. Like input interfaces it has
the same TDM frame format. This output is used to drive the serial DAC TDM
interface of audio codec and also sent to the external pins along with the
receive path of normal audio SAI module for readback by the CPU.
The output of Audio Mixer can be selected from any of the three streams
- serial audio input 1
- serial audio input 2
- mixed audio
Mixing operation is independent of audio sample rate but the two audio
input streams must have same audio sample rate with same number of channels
in TDM frame to be eligible for mixing.
properties:
compatible:
const: fsl,imx8qm-audmix
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: ipg
power-domains:
maxItems: 1
dais:
description: contain a list of phandles to AUDMIX connected DAIs.
$ref: /schemas/types.yaml#/definitions/phandle-array
minItems: 2
items:
- description: the AUDMIX output
maxItems: 1
- description: serial audio input 1
maxItems: 1
- description: serial audio input 2
maxItems: 1
required:
- compatible
- reg
- clocks
- clock-names
- power-domains
- dais
unevaluatedProperties: false
examples:
- |
audmix@59840000 {
compatible = "fsl,imx8qm-audmix";
reg = <0x59840000 0x10000>;
clocks = <&amix_lpcg 0>;
clock-names = "ipg";
power-domains = <&pd_audmix>;
dais = <&sai4>, <&sai5>;
};

View File

@ -1,68 +0,0 @@
Freescale Enhanced Serial Audio Interface (ESAI) Controller
The Enhanced Serial Audio Interface (ESAI) provides a full-duplex serial port
for serial communication with a variety of serial devices, including industry
standard codecs, Sony/Phillips Digital Interface (S/PDIF) transceivers, and
other DSPs. It has up to six transmitters and four receivers.
Required properties:
- compatible : Compatible list, should contain one of the following
compatibles:
"fsl,imx35-esai",
"fsl,vf610-esai",
"fsl,imx6ull-esai",
"fsl,imx8qm-esai",
- reg : Offset and length of the register set for the device.
- interrupts : Contains the spdif interrupt.
- dmas : Generic dma devicetree binding as described in
Documentation/devicetree/bindings/dma/dma.txt.
- dma-names : Two dmas have to be defined, "tx" and "rx".
- clocks : Contains an entry for each entry in clock-names.
- clock-names : Includes the following entries:
"core" The core clock used to access registers
"extal" The esai baud clock for esai controller used to
derive HCK, SCK and FS.
"fsys" The system clock derived from ahb clock used to
derive HCK, SCK and FS.
"spba" The spba clock is required when ESAI is placed as a
bus slave of the Shared Peripheral Bus and when two
or more bus masters (CPU, DMA or DSP) try to access
it. This property is optional depending on the SoC
design.
- fsl,fifo-depth : The number of elements in the transmit and receive
FIFOs. This number is the maximum allowed value for
TFCR[TFWM] or RFCR[RFWM].
- fsl,esai-synchronous: This is a boolean property. If present, indicating
that ESAI would work in the synchronous mode, which
means all the settings for Receiving would be
duplicated from Transmission related registers.
Optional properties:
- big-endian : If this property is absent, the native endian mode
will be in use as default, or the big endian mode
will be in use for all the device registers.
Example:
esai: esai@2024000 {
compatible = "fsl,imx35-esai";
reg = <0x02024000 0x4000>;
interrupts = <0 51 0x04>;
clocks = <&clks 208>, <&clks 118>, <&clks 208>;
clock-names = "core", "extal", "fsys";
dmas = <&sdma 23 21 0>, <&sdma 24 21 0>;
dma-names = "rx", "tx";
fsl,fifo-depth = <128>;
fsl,esai-synchronous;
big-endian;
};

View File

@ -0,0 +1,118 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/fsl,esai.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale Enhanced Serial Audio Interface (ESAI) Controller
maintainers:
- Shengjiu Wang <shengjiu.wang@nxp.com>
- Frank Li <Frank.Li@nxp.com>
description:
The Enhanced Serial Audio Interface (ESAI) provides a full-duplex serial port
for serial communication with a variety of serial devices, including industry
standard codecs, Sony/Phillips Digital Interface (S/PDIF) transceivers, and
other DSPs. It has up to six transmitters and four receivers.
properties:
compatible:
enum:
- fsl,imx35-esai
- fsl,imx6ull-esai
- fsl,imx8qm-esai
- fsl,vf610-esai
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
minItems: 3
items:
- description:
The core clock used to access registers.
- description:
The esai baud clock for esai controller used to
derive HCK, SCK and FS.
- description:
The system clock derived from ahb clock used to
derive HCK, SCK and FS.
- description:
The spba clock is required when ESAI is placed as a
bus slave of the Shared Peripheral Bus and when two
or more bus masters (CPU, DMA or DSP) try to access
it. This property is optional depending on the SoC
design.
clock-names:
minItems: 3
items:
- const: core
- const: extal
- const: fsys
- const: spba
dmas:
minItems: 2
maxItems: 2
dma-names:
items:
- const: rx
- const: tx
fsl,fifo-depth:
$ref: /schemas/types.yaml#/definitions/uint32
default: 64
description:
The number of elements in the transmit and receive
FIFOs. This number is the maximum allowed value for
TFCR[TFWM] or RFCR[RFWM].
fsl,esai-synchronous:
$ref: /schemas/types.yaml#/definitions/flag
description:
This is a boolean property. If present, indicating
that ESAI would work in the synchronous mode, which
means all the settings for Receiving would be
duplicated from Transmission related registers.
big-endian:
$ref: /schemas/types.yaml#/definitions/flag
description:
If this property is absent, the native endian mode
will be in use as default, or the big endian mode
will be in use for all the device registers.
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- dmas
- dma-names
unevaluatedProperties: false
allOf:
- $ref: dai-common.yaml#
examples:
- |
esai@2024000 {
compatible = "fsl,imx35-esai";
reg = <0x02024000 0x4000>;
interrupts = <0 51 0x04>;
clocks = <&clks 208>, <&clks 118>, <&clks 208>;
clock-names = "core", "extal", "fsys";
dmas = <&sdma 23 21 0>, <&sdma 24 21 0>;
dma-names = "rx", "tx";
fsl,fifo-depth = <128>;
fsl,esai-synchronous;
big-endian;
};

View File

@ -74,6 +74,9 @@ properties:
- const: asrck_f - const: asrck_f
- const: spba - const: spba
power-domains:
maxItems: 1
fsl,asrc-rate: fsl,asrc-rate:
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
description: The mutual sample rate used by DPCM Back Ends description: The mutual sample rate used by DPCM Back Ends
@ -131,6 +134,17 @@ allOf:
properties: properties:
fsl,asrc-clk-map: false fsl,asrc-clk-map: false
- if:
properties:
compatible:
contains:
enum:
- fsl,imx8qm-asrc
- fsl,imx8qxp-asrc
then:
required:
- power-domains
additionalProperties: false additionalProperties: false
examples: examples:

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/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

@ -81,14 +81,12 @@ properties:
dmas: dmas:
minItems: 1 minItems: 1
items: maxItems: 2
- description: DMA controller phandle and request line for RX
- description: DMA controller phandle and request line for TX
dma-names: dma-names:
minItems: 1 minItems: 1
items: items:
- const: rx - enum: [ rx, tx ]
- const: tx - const: tx
interrupts: interrupts:

View File

@ -31,7 +31,10 @@ properties:
maxItems: 1 maxItems: 1
interrupts: interrupts:
maxItems: 1 minItems: 1
items:
- description: Combined or receive interrupt
- description: Transmit interrupt
dmas: dmas:
items: items:
@ -86,6 +89,9 @@ properties:
registers. Set this flag for HCDs with big endian descriptors and big registers. Set this flag for HCDs with big endian descriptors and big
endian registers. endian registers.
power-domains:
maxItems: 1
required: required:
- compatible - compatible
- reg - reg
@ -97,6 +103,33 @@ required:
additionalProperties: false additionalProperties: false
allOf:
- if:
properties:
compatible:
enum:
- fsl,imx8qm-spdif
- fsl,imx8qxp-spdif
then:
properties:
interrupts:
minItems: 2
else:
properties:
interrupts:
maxItems: 1
- if:
properties:
compatible:
contains:
enum:
- fsl,imx8qm-spdif
- fsl,imx8qxp-spdif
then:
required:
- power-domains
examples: examples:
- | - |
spdif@2004000 { spdif@2004000 {

View File

@ -1,87 +0,0 @@
Freescale Synchronous Serial Interface
The SSI is a serial device that communicates with audio codecs. It can
be programmed in AC97, I2S, left-justified, or right-justified modes.
Required properties:
- compatible: Compatible list, should contain one of the following
compatibles:
fsl,mpc8610-ssi
fsl,imx51-ssi
fsl,imx35-ssi
fsl,imx21-ssi
- cell-index: The SSI, <0> = SSI1, <1> = SSI2, and so on.
- reg: Offset and length of the register set for the device.
- interrupts: <a b> where a is the interrupt number and b is a
field that represents an encoding of the sense and
level information for the interrupt. This should be
encoded based on the information in section 2)
depending on the type of interrupt controller you
have.
- fsl,fifo-depth: The number of elements in the transmit and receive FIFOs.
This number is the maximum allowed value for SFCSR[TFWM0].
- clocks: "ipg" - Required clock for the SSI unit
"baud" - Required clock for SSI master mode. Otherwise this
clock is not used
Required are also ac97 link bindings if ac97 is used. See
Documentation/devicetree/bindings/sound/soc-ac97link.txt for the necessary
bindings.
Optional properties:
- codec-handle: Phandle to a 'codec' node that defines an audio
codec connected to this SSI. This node is typically
a child of an I2C or other control node.
- fsl,fiq-stream-filter: Bool property. Disabled DMA and use FIQ instead to
filter the codec stream. This is necessary for some boards
where an incompatible codec is connected to this SSI, e.g.
on pca100 and pcm043.
- dmas: Generic dma devicetree binding as described in
Documentation/devicetree/bindings/dma/dma.txt.
- dma-names: Two dmas have to be defined, "tx" and "rx", if fsl,imx-fiq
is not defined.
- fsl,mode: The operating mode for the AC97 interface only.
"ac97-slave" - AC97 mode, SSI is clock slave
"ac97-master" - AC97 mode, SSI is clock master
- fsl,ssi-asynchronous:
If specified, the SSI is to be programmed in asynchronous
mode. In this mode, pins SRCK, STCK, SRFS, and STFS must
all be connected to valid signals. In synchronous mode,
SRCK and SRFS are ignored. Asynchronous mode allows
playback and capture to use different sample sizes and
sample rates. Some drivers may require that SRCK and STCK
be connected together, and SRFS and STFS be connected
together. This would still allow different sample sizes,
but not different sample rates.
- fsl,playback-dma: Phandle to a node for the DMA channel to use for
playback of audio. This is typically dictated by SOC
design. See the notes below.
Only used on Power Architecture.
- fsl,capture-dma: Phandle to a node for the DMA channel to use for
capture (recording) of audio. This is typically dictated
by SOC design. See the notes below.
Only used on Power Architecture.
Child 'codec' node required properties:
- compatible: Compatible list, contains the name of the codec
Child 'codec' node optional properties:
- clock-frequency: The frequency of the input clock, which typically comes
from an on-board dedicated oscillator.
Notes on fsl,playback-dma and fsl,capture-dma:
On SOCs that have an SSI, specific DMA channels are hard-wired for playback
and capture. On the MPC8610, for example, SSI1 must use DMA channel 0 for
playback and DMA channel 1 for capture. SSI2 must use DMA channel 2 for
playback and DMA channel 3 for capture. The developer can choose which
DMA controller to use, but the channels themselves are hard-wired. The
purpose of these two properties is to represent this hardware design.
The device tree nodes for the DMA channels that are referenced by
"fsl,playback-dma" and "fsl,capture-dma" must be marked as compatible with
"fsl,ssi-dma-channel". The SOC-specific compatible string (e.g.
"fsl,mpc8610-dma-channel") can remain. If these nodes are left as
"fsl,elo-dma-channel" or "fsl,eloplus-dma-channel", then the generic Elo DMA
drivers (fsldma) will attempt to use them, and it will conflict with the
sound drivers.

View File

@ -0,0 +1,194 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/fsl,ssi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale Synchronous Serial Interface
maintainers:
- Shengjiu Wang <shengjiu.wang@nxp.com>
description:
Notes on fsl,playback-dma and fsl,capture-dma
On SOCs that have an SSI, specific DMA channels are hard-wired for playback
and capture. On the MPC8610, for example, SSI1 must use DMA channel 0 for
playback and DMA channel 1 for capture. SSI2 must use DMA channel 2 for
playback and DMA channel 3 for capture. The developer can choose which
DMA controller to use, but the channels themselves are hard-wired. The
purpose of these two properties is to represent this hardware design.
The device tree nodes for the DMA channels that are referenced by
"fsl,playback-dma" and "fsl,capture-dma" must be marked as compatible with
"fsl,ssi-dma-channel". The SOC-specific compatible string (e.g.
"fsl,mpc8610-dma-channel") can remain. If these nodes are left as
"fsl,elo-dma-channel" or "fsl,eloplus-dma-channel", then the generic Elo DMA
drivers (fsldma) will attempt to use them, and it will conflict with the
sound drivers.
properties:
compatible:
oneOf:
- items:
- enum:
- fsl,imx50-ssi
- fsl,imx53-ssi
- const: fsl,imx51-ssi
- const: fsl,imx21-ssi
- items:
- enum:
- fsl,imx25-ssi
- fsl,imx27-ssi
- fsl,imx35-ssi
- fsl,imx51-ssi
- const: fsl,imx21-ssi
- items:
- enum:
- fsl,imx6q-ssi
- fsl,imx6sl-ssi
- fsl,imx6sx-ssi
- const: fsl,imx51-ssi
- items:
- const: fsl,imx21-ssi
- items:
- const: fsl,mpc8610-ssi
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
items:
- description: The ipg clock for register access
- description: clock for SSI master mode
minItems: 1
clock-names:
items:
- const: ipg
- const: baud
minItems: 1
dmas:
oneOf:
- items:
- description: DMA controller phandle and request line for RX
- description: DMA controller phandle and request line for TX
- items:
- description: DMA controller phandle and request line for RX0
- description: DMA controller phandle and request line for TX0
- description: DMA controller phandle and request line for RX1
- description: DMA controller phandle and request line for TX1
dma-names:
oneOf:
- items:
- const: rx
- const: tx
- items:
- const: rx0
- const: tx0
- const: rx1
- const: tx1
"#sound-dai-cells":
const: 0
description: optional, some dts node didn't add it.
cell-index:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2]
description: The SSI index
ac97-gpios:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: Please refer to soc-ac97link.txt
codec-handle:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Phandle to a 'codec' node that defines an audio
codec connected to this SSI. This node is typically
a child of an I2C or other control node.
fsl,fifo-depth:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The number of elements in the transmit and receive FIFOs.
This number is the maximum allowed value for SFCSR[TFWM0].
enum: [8, 15]
fsl,fiq-stream-filter:
type: boolean
description:
Disabled DMA and use FIQ instead to filter the codec stream.
This is necessary for some boards where an incompatible codec
is connected to this SSI, e.g. on pca100 and pcm043.
fsl,mode:
$ref: /schemas/types.yaml#/definitions/string
enum: [ ac97-slave, ac97-master, i2s-slave, i2s-master,
lj-slave, lj-master, rj-slave, rj-master ]
description: |
"ac97-slave" - AC97 mode, SSI is clock slave
"ac97-master" - AC97 mode, SSI is clock master
"i2s-slave" - I2S mode, SSI is clock slave
"i2s-master" - I2S mode, SSI is clock master
"lj-slave" - Left justified mode, SSI is clock slave
"lj-master" - Left justified mode, SSI is clock master
"rj-slave" - Right justified mode, SSI is clock slave
"rj-master" - Right justified mode, SSI is clock master
fsl,ssi-asynchronous:
type: boolean
description: If specified, the SSI is to be programmed in asynchronous
mode. In this mode, pins SRCK, STCK, SRFS, and STFS must
all be connected to valid signals. In synchronous mode,
SRCK and SRFS are ignored. Asynchronous mode allows
playback and capture to use different sample sizes and
sample rates. Some drivers may require that SRCK and STCK
be connected together, and SRFS and STFS be connected
together. This would still allow different sample sizes,
but not different sample rates.
fsl,playback-dma:
$ref: /schemas/types.yaml#/definitions/phandle
description: Phandle to a node for the DMA channel to use for
playback of audio. This is typically dictated by SOC
design. Only used on Power Architecture.
fsl,capture-dma:
$ref: /schemas/types.yaml#/definitions/phandle
description: Phandle to a node for the DMA channel to use for
capture (recording) of audio. This is typically dictated
by SOC design. Only used on Power Architecture.
required:
- compatible
- reg
- interrupts
- fsl,fifo-depth
allOf:
- $ref: dai-common.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/imx6qdl-clock.h>
ssi@2028000 {
compatible = "fsl,imx6q-ssi", "fsl,imx51-ssi";
reg = <0x02028000 0x4000>;
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6QDL_CLK_SSI1_IPG>,
<&clks IMX6QDL_CLK_SSI1>;
clock-names = "ipg", "baud";
dmas = <&sdma 37 1 0>, <&sdma 38 1 0>;
dma-names = "rx", "tx";
#sound-dai-cells = <0>;
fsl,fifo-depth = <15>;
};

View File

@ -1,117 +0,0 @@
Freescale Generic ASoC Sound Card with ASRC support
The Freescale Generic ASoC Sound Card can be used, ideally, for all Freescale
SoCs connecting with external CODECs.
The idea of this generic sound card is a bit like ASoC Simple Card. However,
for Freescale SoCs (especially those released in recent years), most of them
have ASRC (Documentation/devicetree/bindings/sound/fsl,asrc.txt) inside. And
this is a specific feature that might be painstakingly controlled and merged
into the Simple Card.
So having this generic sound card allows all Freescale SoC users to benefit
from the simplification of a new card support and the capability of the wide
sample rates support through ASRC.
Note: The card is initially designed for those sound cards who use AC'97, I2S
and PCM DAI formats. However, it'll be also possible to support those non
AC'97/I2S/PCM type sound cards, such as S/PDIF audio and HDMI audio, as
long as the driver has been properly upgraded.
The compatible list for this generic sound card currently:
"fsl,imx-audio-ac97"
"fsl,imx-audio-cs42888"
"fsl,imx-audio-cs427x"
(compatible with CS4271 and CS4272)
"fsl,imx-audio-wm8962"
"fsl,imx-audio-sgtl5000"
(compatible with Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt)
"fsl,imx-audio-wm8960"
"fsl,imx-audio-mqs"
"fsl,imx-audio-wm8524"
"fsl,imx-audio-tlv320aic32x4"
"fsl,imx-audio-tlv320aic31xx"
"fsl,imx-audio-si476x"
"fsl,imx-audio-wm8958"
"fsl,imx-audio-nau8822"
Required properties:
- compatible : Contains one of entries in the compatible list.
- model : The user-visible name of this sound complex
- audio-cpu : The phandle of an CPU DAI controller
- audio-codec : The phandle of an audio codec
Optional properties:
- audio-asrc : The phandle of ASRC. It can be absent if there's no
need to add ASRC support via DPCM.
- audio-routing : 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. There're a few pre-designed board connectors:
* Line Out Jack
* Line In Jack
* Headphone Jack
* Mic Jack
* Ext Spk
* AMIC (stands for Analog Microphone Jack)
* DMIC (stands for Digital Microphone Jack)
Note: The "Mic Jack" and "AMIC" are redundant while
coexisting in order to support the old bindings
of wm8962 and sgtl5000.
- hp-det-gpio : The GPIO that detect headphones are plugged in
- mic-det-gpio : The GPIO that detect microphones are plugged in
- bitclock-master : Indicates dai-link bit clock master; for details see simple-card.yaml.
- frame-master : Indicates dai-link frame master; for details see simple-card.yaml.
- dai-format : audio format, for details see simple-card.yaml.
- frame-inversion : dai-link uses frame clock inversion, for details see simple-card.yaml.
- bitclock-inversion : dai-link uses bit clock inversion, for details see simple-card.yaml.
- mclk-id : main clock id, specific for each card configuration.
Optional unless SSI is selected as a CPU DAI:
- mux-int-port : The internal port of the i.MX audio muxer (AUDMUX)
- mux-ext-port : The external port of the i.MX audio muxer
Example:
sound-cs42888 {
compatible = "fsl,imx-audio-cs42888";
model = "cs42888-audio";
audio-cpu = <&esai>;
audio-asrc = <&asrc>;
audio-codec = <&cs42888>;
audio-routing =
"Line Out Jack", "AOUT1L",
"Line Out Jack", "AOUT1R",
"Line Out Jack", "AOUT2L",
"Line Out Jack", "AOUT2R",
"Line Out Jack", "AOUT3L",
"Line Out Jack", "AOUT3R",
"Line Out Jack", "AOUT4L",
"Line Out Jack", "AOUT4R",
"AIN1L", "Line In Jack",
"AIN1R", "Line In Jack",
"AIN2L", "Line In Jack",
"AIN2R", "Line In Jack";
};

View File

@ -0,0 +1,197 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/fsl-asoc-card.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale Generic ASoC Sound Card with ASRC support
description:
The Freescale Generic ASoC Sound Card can be used, ideally,
for all Freescale SoCs connecting with external CODECs.
The idea of this generic sound card is a bit like ASoC Simple Card.
However, for Freescale SoCs (especially those released in recent years),
most of them have ASRC inside. And this is a specific feature that might
be painstakingly controlled and merged into the Simple Card.
So having this generic sound card allows all Freescale SoC users to
benefit from the simplification of a new card support and the capability
of the wide sample rates support through ASRC.
Note, The card is initially designed for those sound cards who use AC'97, I2S
and PCM DAI formats. However, it'll be also possible to support those non
AC'97/I2S/PCM type sound cards, such as S/PDIF audio and HDMI audio, as
long as the driver has been properly upgraded.
maintainers:
- Shengjiu Wang <shengjiu.wang@nxp.com>
properties:
compatible:
oneOf:
- items:
- enum:
- fsl,imx-sgtl5000
- fsl,imx25-pdk-sgtl5000
- fsl,imx53-cpuvo-sgtl5000
- fsl,imx51-babbage-sgtl5000
- fsl,imx53-m53evk-sgtl5000
- fsl,imx53-qsb-sgtl5000
- fsl,imx53-voipac-sgtl5000
- fsl,imx6-armadeus-sgtl5000
- fsl,imx6-rex-sgtl5000
- fsl,imx6-sabreauto-cs42888
- fsl,imx6-wandboard-sgtl5000
- fsl,imx6dl-nit6xlite-sgtl5000
- fsl,imx6q-ba16-sgtl5000
- fsl,imx6q-nitrogen6_max-sgtl5000
- fsl,imx6q-nitrogen6_som2-sgtl5000
- fsl,imx6q-nitrogen6x-sgtl5000
- fsl,imx6q-sabrelite-sgtl5000
- fsl,imx6q-sabresd-wm8962
- fsl,imx6q-udoo-ac97
- fsl,imx6q-ventana-sgtl5000
- fsl,imx6sl-evk-wm8962
- fsl,imx6sx-sdb-mqs
- fsl,imx6sx-sdb-wm8962
- fsl,imx7d-evk-wm8960
- karo,tx53-audio-sgtl5000
- tq,imx53-mba53-sgtl5000
- enum:
- fsl,imx-audio-ac97
- fsl,imx-audio-cs42888
- fsl,imx-audio-mqs
- fsl,imx-audio-sgtl5000
- fsl,imx-audio-wm8960
- fsl,imx-audio-wm8962
- items:
- enum:
- fsl,imx-audio-ac97
- fsl,imx-audio-cs42888
- fsl,imx-audio-cs427x
- fsl,imx-audio-mqs
- fsl,imx-audio-nau8822
- fsl,imx-audio-sgtl5000
- fsl,imx-audio-si476x
- fsl,imx-audio-tlv320aic31xx
- fsl,imx-audio-tlv320aic32x4
- fsl,imx-audio-wm8524
- fsl,imx-audio-wm8904
- fsl,imx-audio-wm8960
- fsl,imx-audio-wm8962
- fsl,imx-audio-wm8958
model:
$ref: /schemas/types.yaml#/definitions/string
description: The user-visible name of this sound complex
audio-asrc:
$ref: /schemas/types.yaml#/definitions/phandle
description:
The phandle of ASRC. It can be absent if there's no
need to add ASRC support via DPCM.
audio-codec:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of an audio codec
audio-cpu:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of an CPU DAI controller
audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description:
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. There're a few pre-designed board
connectors. "AMIC" stands for Analog Microphone Jack.
"DMIC" stands for Digital Microphone Jack. The "Mic Jack" and "AMIC"
are redundant while coexisting in order to support the old bindings
of wm8962 and sgtl5000.
hp-det-gpio:
deprecated: true
maxItems: 1
description: The GPIO that detect headphones are plugged in
hp-det-gpios:
maxItems: 1
description: The GPIO that detect headphones are plugged in
mic-det-gpio:
deprecated: true
maxItems: 1
description: The GPIO that detect microphones are plugged in
mic-det-gpios:
maxItems: 1
description: The GPIO that detect microphones are plugged in
bitclock-master:
$ref: simple-card.yaml#/definitions/bitclock-master
description: Indicates dai-link bit clock master.
frame-master:
$ref: simple-card.yaml#/definitions/frame-master
description: Indicates dai-link frame master.
format:
$ref: simple-card.yaml#/definitions/format
description: audio format.
frame-inversion:
$ref: simple-card.yaml#/definitions/frame-inversion
description: dai-link uses frame clock inversion.
bitclock-inversion:
$ref: simple-card.yaml#/definitions/bitclock-inversion
description: dai-link uses bit clock inversion.
mclk-id:
$ref: /schemas/types.yaml#/definitions/uint32
description: main clock id, specific for each card configuration.
mux-int-port:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 2, 7]
description: The internal port of the i.MX audio muxer (AUDMUX)
mux-ext-port:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [3, 4, 5, 6]
description: The external port of the i.MX audio muxer
ssi-controller:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of an CPU DAI controller
required:
- compatible
- model
unevaluatedProperties: false
examples:
- |
sound-cs42888 {
compatible = "fsl,imx-audio-cs42888";
model = "cs42888-audio";
audio-cpu = <&esai>;
audio-asrc = <&asrc>;
audio-codec = <&cs42888>;
audio-routing =
"Line Out Jack", "AOUT1L",
"Line Out Jack", "AOUT1R",
"Line Out Jack", "AOUT2L",
"Line Out Jack", "AOUT2R",
"Line Out Jack", "AOUT3L",
"Line Out Jack", "AOUT3R",
"Line Out Jack", "AOUT4L",
"Line Out Jack", "AOUT4R",
"AIN1L", "Line In Jack",
"AIN1R", "Line In Jack",
"AIN2L", "Line In Jack",
"AIN2R", "Line In Jack";
};

View File

@ -1,36 +0,0 @@
Freescale i.MX audio complex with S/PDIF transceiver
Required properties:
- compatible : "fsl,imx-audio-spdif"
- model : The user-visible name of this sound complex
- spdif-controller : The phandle of the i.MX S/PDIF controller
Optional properties:
- spdif-out : This is a boolean property. 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 : This is a boolean property. If present, the receiving
function of S/PDIF will be enabled, indicating there
is a physical S/PDIF in connector/jack on the board.
* Note: At least one of these two properties should be set in the DT binding.
Example:
sound-spdif {
compatible = "fsl,imx-audio-spdif";
model = "imx-spdif";
spdif-controller = <&spdif>;
spdif-out;
spdif-in;
};

View File

@ -0,0 +1,54 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mediatek,mt2701-wm8960.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MediaTek MT2701 with WM8960 CODEC
maintainers:
- Kartik Agarwala <agarwala.kartik@gmail.com>
properties:
compatible:
const: mediatek,mt2701-wm8960-machine
mediatek,platform:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of MT2701 ASoC platform.
audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description:
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.
mediatek,audio-codec:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of the WM8960 audio codec.
unevaluatedProperties: false
required:
- compatible
- mediatek,platform
- audio-routing
- mediatek,audio-codec
- pinctrl-names
- pinctrl-0
examples:
- |
sound {
compatible = "mediatek,mt2701-wm8960-machine";
mediatek,platform = <&afe>;
audio-routing =
"Headphone", "HP_L",
"Headphone", "HP_R",
"LINPUT1", "AMIC",
"RINPUT1", "AMIC";
mediatek,audio-codec = <&wm8960>;
pinctrl-names = "default";
pinctrl-0 = <&aud_pins_default>;
};

View File

@ -1,24 +0,0 @@
MT2701 with WM8960 CODEC
Required properties:
- compatible: "mediatek,mt2701-wm8960-machine"
- mediatek,platform: the phandle of MT2701 ASoC platform
- audio-routing: a list of the connections between audio
- mediatek,audio-codec: the phandles of wm8960 codec
- pinctrl-names: Should contain only one value - "default"
- pinctrl-0: Should specify pin control groups used for this controller.
Example:
sound:sound {
compatible = "mediatek,mt2701-wm8960-machine";
mediatek,platform = <&afe>;
audio-routing =
"Headphone", "HP_L",
"Headphone", "HP_R",
"LINPUT1", "AMIC",
"RINPUT1", "AMIC";
mediatek,audio-codec = <&wm8960>;
pinctrl-names = "default";
pinctrl-0 = <&aud_pins_default>;
};

View File

@ -12,17 +12,46 @@ maintainers:
description: description:
This binding describes the MT8186 sound card. This binding describes the MT8186 sound card.
allOf:
- $ref: sound-card-common.yaml#
properties: properties:
compatible: compatible:
enum: enum:
- mediatek,mt8186-mt6366-da7219-max98357-sound - mediatek,mt8186-mt6366-da7219-max98357-sound
audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description:
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 the input or output widgets of audio components,
power supplies, MicBias of codec and the software switch.
minItems: 2
items:
enum:
# Sinks
- HDMI1
- Headphones
- Line Out
- MIC
- Speakers
# Sources
- Headset Mic
- HPL
- HPR
- Speaker
- TX
mediatek,platform: mediatek,platform:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of MT8186 ASoC platform. description: The phandle of MT8186 ASoC platform.
headset-codec: headset-codec:
type: object type: object
deprecated: true
additionalProperties: false additionalProperties: false
properties: properties:
sound-dai: sound-dai:
@ -32,6 +61,7 @@ properties:
playback-codecs: playback-codecs:
type: object type: object
deprecated: true
additionalProperties: false additionalProperties: false
properties: properties:
sound-dai: sound-dai:
@ -53,32 +83,115 @@ properties:
A list of the desired dai-links in the sound card. Each entry is a A list of the desired dai-links in the sound card. Each entry is a
name defined in the machine driver. name defined in the machine driver.
additionalProperties: false patternProperties:
".*-dai-link$":
type: object
additionalProperties: false
description:
Container for dai-link level properties and CODEC sub-nodes.
properties:
link-name:
description: Indicates dai-link name and PCM stream name
items:
enum:
- I2S0
- I2S1
- I2S2
- I2S3
codec:
description: Holds subnode which indicates codec dai.
type: object
additionalProperties: false
properties:
sound-dai:
minItems: 1
maxItems: 2
required:
- sound-dai
dai-format:
description: audio format
items:
enum:
- i2s
- right_j
- left_j
- dsp_a
- dsp_b
mediatek,clk-provider:
$ref: /schemas/types.yaml#/definitions/string
description: Indicates dai-link clock master.
items:
enum:
- cpu
- codec
required:
- link-name
unevaluatedProperties: false
required: required:
- compatible - compatible
- mediatek,platform - mediatek,platform
- headset-codec
- playback-codecs # Disallow legacy properties if xxx-dai-link nodes are specified
if:
not:
patternProperties:
".*-dai-link$": false
then:
properties:
headset-codec: false
speaker-codecs: false
examples: examples:
- | - |
sound: mt8186-sound { sound: mt8186-sound {
compatible = "mediatek,mt8186-mt6366-da7219-max98357-sound"; compatible = "mediatek,mt8186-mt6366-da7219-max98357-sound";
mediatek,platform = <&afe>; model = "mt8186_da7219_m98357";
pinctrl-names = "aud_clk_mosi_off", pinctrl-names = "aud_clk_mosi_off",
"aud_clk_mosi_on"; "aud_clk_mosi_on";
pinctrl-0 = <&aud_clk_mosi_off>; pinctrl-0 = <&aud_clk_mosi_off>;
pinctrl-1 = <&aud_clk_mosi_on>; pinctrl-1 = <&aud_clk_mosi_on>;
mediatek,platform = <&afe>;
headset-codec { audio-routing =
sound-dai = <&da7219>; "Headphones", "HPL",
"Headphones", "HPR",
"MIC", "Headset Mic",
"Speakers", "Speaker",
"HDMI1", "TX";
hs-playback-dai-link {
link-name = "I2S0";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&da7219>;
};
}; };
playback-codecs { hs-capture-dai-link {
sound-dai = <&anx_bridge_dp>, link-name = "I2S1";
<&max98357a>; dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&da7219>;
};
};
spk-dp-playback-dai-link {
link-name = "I2S3";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&anx_bridge_dp>, <&max98357a>;
};
}; };
}; };

View File

@ -12,6 +12,9 @@ maintainers:
description: description:
This binding describes the MT8186 sound card. This binding describes the MT8186 sound card.
allOf:
- $ref: sound-card-common.yaml#
properties: properties:
compatible: compatible:
enum: enum:
@ -19,6 +22,34 @@ properties:
- mediatek,mt8186-mt6366-rt5682s-max98360-sound - mediatek,mt8186-mt6366-rt5682s-max98360-sound
- mediatek,mt8186-mt6366-rt5650-sound - mediatek,mt8186-mt6366-rt5650-sound
audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description:
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 the input or output widgets of audio components,
power supplies, MicBias of codec and the software switch.
minItems: 2
items:
enum:
# Sinks
- HDMI1
- Headphone
- IN1P
- IN1N
- Line Out
- Speakers
# Sources
- Headset Mic
- HPOL
- HPOR
- Speaker
- SPOL
- SPOR
- TX
mediatek,platform: mediatek,platform:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of MT8186 ASoC platform. description: The phandle of MT8186 ASoC platform.
@ -32,6 +63,7 @@ properties:
headset-codec: headset-codec:
type: object type: object
deprecated: true
additionalProperties: false additionalProperties: false
properties: properties:
sound-dai: sound-dai:
@ -41,6 +73,7 @@ properties:
playback-codecs: playback-codecs:
type: object type: object
deprecated: true
additionalProperties: false additionalProperties: false
properties: properties:
sound-dai: sound-dai:
@ -62,13 +95,56 @@ properties:
A list of the desired dai-links in the sound card. Each entry is a A list of the desired dai-links in the sound card. Each entry is a
name defined in the machine driver. name defined in the machine driver.
additionalProperties: false patternProperties:
".*-dai-link$":
type: object
additionalProperties: false
description:
Container for dai-link level properties and CODEC sub-nodes.
properties:
link-name:
description: Indicates dai-link name and PCM stream name
enum: [ I2S0, I2S1, I2S2, I2S3 ]
codec:
description: Holds subnode which indicates codec dai.
type: object
additionalProperties: false
properties:
sound-dai:
minItems: 1
maxItems: 2
required:
- sound-dai
dai-format:
description: audio format
enum: [ i2s, right_j, left_j, dsp_a, dsp_b ]
mediatek,clk-provider:
$ref: /schemas/types.yaml#/definitions/string
description: Indicates dai-link clock master.
enum: [ cpu, codec ]
required:
- link-name
unevaluatedProperties: false
required: required:
- compatible - compatible
- mediatek,platform - mediatek,platform
- headset-codec
- playback-codecs # Disallow legacy properties if xxx-dai-link nodes are specified
if:
not:
patternProperties:
".*-dai-link$": false
then:
properties:
headset-codec: false
speaker-codecs: false
examples: examples:
- | - |
@ -76,23 +152,49 @@ examples:
sound: mt8186-sound { sound: mt8186-sound {
compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound"; compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
mediatek,platform = <&afe>; model = "mt8186_rt1019_rt5682s";
pinctrl-names = "aud_clk_mosi_off", pinctrl-names = "aud_clk_mosi_off",
"aud_clk_mosi_on", "aud_clk_mosi_on",
"aud_gpio_dmic_sec"; "aud_gpio_dmic_sec";
pinctrl-0 = <&aud_clk_mosi_off>; pinctrl-0 = <&aud_clk_mosi_off>;
pinctrl-1 = <&aud_clk_mosi_on>; pinctrl-1 = <&aud_clk_mosi_on>;
pinctrl-2 = <&aud_gpio_dmic_sec>; pinctrl-2 = <&aud_gpio_dmic_sec>;
mediatek,platform = <&afe>;
dmic-gpios = <&pio 23 GPIO_ACTIVE_HIGH>; dmic-gpios = <&pio 23 GPIO_ACTIVE_HIGH>;
headset-codec { audio-routing =
sound-dai = <&rt5682s>; "Headphone", "HPOL",
"Headphone", "HPOR",
"IN1P", "Headset Mic",
"Speakers", "Speaker",
"HDMI1", "TX";
hs-playback-dai-link {
link-name = "I2S0";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&rt5682s 0>;
};
}; };
playback-codecs { hs-capture-dai-link {
sound-dai = <&it6505dptx>, link-name = "I2S1";
<&rt1019p>; dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&rt5682s 0>;
};
};
spk-hdmi-playback-dai-link {
link-name = "I2S3";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&it6505dptx>, <&rt1019p>;
};
}; };
}; };

View File

@ -13,6 +13,9 @@ maintainers:
description: description:
This binding describes the MT8192 sound card. This binding describes the MT8192 sound card.
allOf:
- $ref: sound-card-common.yaml#
properties: properties:
compatible: compatible:
enum: enum:
@ -20,6 +23,31 @@ properties:
- mediatek,mt8192_mt6359_rt1015p_rt5682 - mediatek,mt8192_mt6359_rt1015p_rt5682
- mediatek,mt8192_mt6359_rt1015p_rt5682s - mediatek,mt8192_mt6359_rt1015p_rt5682s
audio-routing:
description:
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 the input or output widgets of audio components,
power supplies, MicBias of codec and the software switch.
minItems: 2
items:
enum:
# Sinks
- Speakers
- Headphone Jack
- IN1P
- Left Spk
- Right Spk
# Sources
- Headset Mic
- HPOL
- HPOR
- Left SPO
- Right SPO
- Speaker
mediatek,platform: mediatek,platform:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of MT8192 ASoC platform. description: The phandle of MT8192 ASoC platform.
@ -27,10 +55,12 @@ properties:
mediatek,hdmi-codec: mediatek,hdmi-codec:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of HDMI codec. description: The phandle of HDMI codec.
deprecated: true
headset-codec: headset-codec:
type: object type: object
additionalProperties: false additionalProperties: false
deprecated: true
properties: properties:
sound-dai: sound-dai:
@ -41,6 +71,7 @@ properties:
speaker-codecs: speaker-codecs:
type: object type: object
additionalProperties: false additionalProperties: false
deprecated: true
properties: properties:
sound-dai: sound-dai:
@ -51,33 +82,121 @@ properties:
required: required:
- sound-dai - sound-dai
additionalProperties: false patternProperties:
".*-dai-link$":
type: object
additionalProperties: false
description:
Container for dai-link level properties and CODEC sub-nodes.
properties:
link-name:
description: Indicates dai-link name and PCM stream name
enum:
- I2S0
- I2S1
- I2S2
- I2S3
- I2S4
- I2S5
- I2S6
- I2S7
- I2S8
- I2S9
- TDM
codec:
description: Holds subnode which indicates codec dai.
type: object
additionalProperties: false
properties:
sound-dai:
minItems: 1
maxItems: 2
required:
- sound-dai
dai-format:
description: audio format
enum: [ i2s, right_j, left_j, dsp_a, dsp_b ]
mediatek,clk-provider:
$ref: /schemas/types.yaml#/definitions/string
description: Indicates dai-link clock master.
enum: [ cpu, codec ]
required:
- link-name
unevaluatedProperties: false
required: required:
- compatible - compatible
- mediatek,platform - mediatek,platform
- headset-codec
- speaker-codecs # Disallow legacy properties if xxx-dai-link nodes are specified
if:
not:
patternProperties:
".*-dai-link$": false
then:
properties:
headset-codec: false
speaker-codecs: false
mediatek,hdmi-codec: false
examples: examples:
- | - |
sound: mt8192-sound { sound: mt8192-sound {
compatible = "mediatek,mt8192_mt6359_rt1015_rt5682"; compatible = "mediatek,mt8192_mt6359_rt1015_rt5682";
mediatek,platform = <&afe>; model = "mt8192_mt6359_rt1015_rt5682";
mediatek,hdmi-codec = <&anx_bridge_dp>;
pinctrl-names = "aud_clk_mosi_off", pinctrl-names = "aud_clk_mosi_off",
"aud_clk_mosi_on"; "aud_clk_mosi_on";
pinctrl-0 = <&aud_clk_mosi_off>; pinctrl-0 = <&aud_clk_mosi_off>;
pinctrl-1 = <&aud_clk_mosi_on>; pinctrl-1 = <&aud_clk_mosi_on>;
mediatek,platform = <&afe>;
headset-codec { audio-routing =
sound-dai = <&rt5682>; "Headphone Jack", "HPOL",
"Headphone Jack", "HPOR",
"IN1P", "Headset Mic",
"Speakers", "Speaker";
spk-playback-dai-link {
link-name = "I2S3";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&rt1015p>;
};
}; };
speaker-codecs { hs-playback-dai-link {
sound-dai = <&rt1015_l>, link-name = "I2S8";
<&rt1015_r>; dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&rt5682 0>;
};
};
hs-capture-dai-link {
link-name = "I2S9";
dai-format = "i2s";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&rt5682 0>;
};
};
displayport-dai-link {
link-name = "TDM";
dai-format = "dsp_a";
codec {
sound-dai = <&anx_bridge_dp>;
};
}; };
}; };

View File

@ -12,6 +12,9 @@ maintainers:
description: description:
This binding describes the MT8195 sound card. This binding describes the MT8195 sound card.
allOf:
- $ref: sound-card-common.yaml#
properties: properties:
compatible: compatible:
enum: enum:
@ -23,6 +26,33 @@ properties:
$ref: /schemas/types.yaml#/definitions/string $ref: /schemas/types.yaml#/definitions/string
description: User specified audio sound card name description: User specified audio sound card name
audio-routing:
description:
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 the input or output widgets of audio components,
power supplies, MicBias of codec and the software switch.
minItems: 2
items:
enum:
# Sinks
- Ext Spk
- Headphone
- IN1P
- Left Spk
- Right Spk
# Sources
- Headset Mic
- HPOL
- HPOR
- Left BE_OUT
- Left SPO
- Right BE_OUT
- Right SPO
- Speaker
mediatek,platform: mediatek,platform:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of MT8195 ASoC platform. description: The phandle of MT8195 ASoC platform.
@ -30,10 +60,12 @@ properties:
mediatek,dptx-codec: mediatek,dptx-codec:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of MT8195 Display Port Tx codec node. description: The phandle of MT8195 Display Port Tx codec node.
deprecated: true
mediatek,hdmi-codec: mediatek,hdmi-codec:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of MT8195 HDMI codec node. description: The phandle of MT8195 HDMI codec node.
deprecated: true
mediatek,adsp: mediatek,adsp:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
@ -45,20 +77,122 @@ properties:
A list of the desired dai-links in the sound card. Each entry is a A list of the desired dai-links in the sound card. Each entry is a
name defined in the machine driver. name defined in the machine driver.
patternProperties:
".*-dai-link$":
type: object
additionalProperties: false
description:
Container for dai-link level properties and CODEC sub-nodes.
properties:
link-name:
description: Indicates dai-link name and PCM stream name
enum:
- DPTX_BE
- ETDM1_IN_BE
- ETDM2_IN_BE
- ETDM1_OUT_BE
- ETDM2_OUT_BE
- ETDM3_OUT_BE
- PCM1_BE
codec:
description: Holds subnode which indicates codec dai.
type: object
additionalProperties: false
properties:
sound-dai:
minItems: 1
maxItems: 2
required:
- sound-dai
dai-format:
description: audio format
enum: [ i2s, right_j, left_j, dsp_a, dsp_b ]
mediatek,clk-provider:
$ref: /schemas/types.yaml#/definitions/string
description: Indicates dai-link clock master.
enum: [ cpu, codec ]
required:
- link-name
additionalProperties: false additionalProperties: false
required: required:
- compatible - compatible
- mediatek,platform - mediatek,platform
# Disallow legacy properties if xxx-dai-link nodes are specified
if:
not:
patternProperties:
".*-dai-link$": false
then:
properties:
mediatek,dptx-codec: false
mediatek,hdmi-codec: false
examples: examples:
- | - |
sound: mt8195-sound { sound: mt8195-sound {
compatible = "mediatek,mt8195_mt6359_rt1019_rt5682"; compatible = "mediatek,mt8195_mt6359_rt1019_rt5682";
model = "mt8195_r1019_5682";
mediatek,platform = <&afe>; mediatek,platform = <&afe>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&aud_pins_default>; pinctrl-0 = <&aud_pins_default>;
audio-routing =
"Headphone", "HPOL",
"Headphone", "HPOR",
"IN1P", "Headset Mic",
"Ext Spk", "Speaker";
mm-dai-link {
link-name = "ETDM1_IN_BE";
mediatek,clk-provider = "cpu";
};
hs-playback-dai-link {
link-name = "ETDM1_OUT_BE";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&headset_codec>;
};
};
hs-capture-dai-link {
link-name = "ETDM2_IN_BE";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&headset_codec>;
};
};
spk-playback-dai-link {
link-name = "ETDM2_OUT_BE";
mediatek,clk-provider = "cpu";
codec {
sound-dai = <&spk_amplifier>;
};
};
hdmi-dai-link {
link-name = "ETDM3_OUT_BE";
codec {
sound-dai = <&hdmi_tx>;
};
};
displayport-dai-link {
link-name = "DPTX_BE";
codec {
sound-dai = <&dp_tx>;
};
};
}; };
... ...

View File

@ -0,0 +1,80 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nuvoton,nau8325.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NAU8325 audio Amplifier
maintainers:
- Seven Lee <WTLI@nuvoton.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: nuvoton,nau8325
reg:
maxItems: 1
nuvoton,vref-impedance-ohms:
description:
The vref impedance to be used in ohms. Middle of voltage enables
Tie-Off selection options. Due to the high impedance of the VREF
pin, it is important to use a low-leakage capacitor.
enum: [0, 25000, 125000, 2500]
nuvoton,dac-vref-microvolt:
description:
The DAC vref to be used in voltage. DAC reference voltage setting. Can
be used for minor tuning of the output level. Since the VDDA is range
between 1.62 to 1.98 voltage, the typical value for design is 1.8V. After
the minor tuning, the final microvolt are as the below.
enum: [1800000, 2700000, 2880000, 3060000]
nuvoton,alc-enable:
description:
Enable digital automatic level control (ALC) function.
type: boolean
nuvoton,clock-detection-disable:
description:
When clock detection is enabled, it will detect whether MCLK
and FS are within the range. MCLK range is from 2.048MHz to 24.576MHz.
FS range is from 8kHz to 96kHz. And also needs to detect the ratio
MCLK_SRC/LRCK of 256, 400 or 500, and needs to detect the BCLK
to make sure data is present. There needs to be at least 8 BCLK
cycles per Frame Sync.
type: boolean
nuvoton,clock-det-data:
description:
Request clock detection to require 2048 non-zero samples before enabling
the audio paths. If set then non-zero samples is required, otherwise it
doesn't matter.
type: boolean
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@21 {
compatible = "nuvoton,nau8325";
reg = <0x21>;
nuvoton,vref-impedance-ohms = <125000>;
nuvoton,dac-vref-microvolt = <2880000>;
nuvoton,alc-enable;
nuvoton,clock-det-data;
};
};

View File

@ -103,6 +103,12 @@ properties:
just limited to the left adc for design demand. just limited to the left adc for design demand.
type: boolean type: boolean
nuvoton,adc-delay-ms:
description: Delay (in ms) to make input path stable and avoid pop noise.
minimum: 125
maximum: 500
default: 125
'#sound-dai-cells': '#sound-dai-cells':
const: 0 const: 0
@ -136,6 +142,7 @@ examples:
nuvoton,jack-eject-debounce = <0>; nuvoton,jack-eject-debounce = <0>;
nuvoton,dmic-clk-threshold = <3072000>; nuvoton,dmic-clk-threshold = <3072000>;
nuvoton,dmic-slew-rate = <0>; nuvoton,dmic-slew-rate = <0>;
nuvoton,adc-delay-ms = <125>;
#sound-dai-cells = <0>; #sound-dai-cells = <0>;
}; };
}; };

View File

@ -1,36 +0,0 @@
NVIDIA Tegra 20 AC97 controller
Required properties:
- compatible : "nvidia,tegra20-ac97"
- reg : Should contain AC97 controller registers location and length
- interrupts : Should contain AC97 interrupt
- resets : Must contain an entry for each entry in reset-names.
See ../reset/reset.txt for details.
- reset-names : Must include the following entries:
- ac97
- dmas : Must contain an entry for each entry in clock-names.
See ../dma/dma.txt for details.
- dma-names : Must include the following entries:
- rx
- tx
- clocks : Must contain one entry, for the module clock.
See ../clocks/clock-bindings.txt for details.
- nvidia,codec-reset-gpio : The Tegra GPIO controller's phandle and the number
of the GPIO used to reset the external AC97 codec
- nvidia,codec-sync-gpio : The Tegra GPIO controller's phandle and the number
of the GPIO corresponding with the AC97 DAP _FS line
Example:
ac97@70002000 {
compatible = "nvidia,tegra20-ac97";
reg = <0x70002000 0x200>;
interrupts = <0 81 0x04>;
nvidia,codec-reset-gpio = <&gpio 170 0>;
nvidia,codec-sync-gpio = <&gpio 120 0>;
clocks = <&tegra_car 3>;
resets = <&tegra_car 3>;
reset-names = "ac97";
dmas = <&apbdma 12>, <&apbdma 12>;
dma-names = "rx", "tx";
};

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/nvidia,tegra20-ac97.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra20 AC97 controller
maintainers:
- Thierry Reding <treding@nvidia.com>
- Jon Hunter <jonathanh@nvidia.com>
properties:
compatible:
const: nvidia,tegra20-ac97
reg:
maxItems: 1
resets:
maxItems: 1
reset-names:
const: ac97
interrupts:
maxItems: 1
clocks:
maxItems: 1
dmas:
maxItems: 2
dma-names:
items:
- const: rx
- const: tx
nvidia,codec-reset-gpios:
description: Reset pin of external AC97 codec
maxItems: 1
nvidia,codec-sync-gpios:
description: AC97 DAP _FS line
maxItems: 1
required:
- compatible
- reg
- resets
- reset-names
- interrupts
- clocks
- dmas
- dma-names
- nvidia,codec-reset-gpios
- nvidia,codec-sync-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/tegra20-car.h>
#include <dt-bindings/gpio/tegra-gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
ac97@70002000 {
compatible = "nvidia,tegra20-ac97";
reg = <0x70002000 0x200>;
resets = <&tegra_car 3>;
reset-names = "ac97";
interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car 3>;
dmas = <&apbdma 12>, <&apbdma 12>;
dma-names = "rx", "tx";
nvidia,codec-reset-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
nvidia,codec-sync-gpios = <&gpio TEGRA_GPIO(P, 0) GPIO_ACTIVE_HIGH>;
};
...

View File

@ -1,12 +0,0 @@
NVIDIA Tegra 20 DAS (Digital Audio Switch) controller
Required properties:
- compatible : "nvidia,tegra20-das"
- reg : Should contain DAS registers location and length
Example:
das@70000c00 {
compatible = "nvidia,tegra20-das";
reg = <0x70000c00 0x80>;
};

View File

@ -0,0 +1,36 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra20-das.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra 20 DAS (Digital Audio Switch) controller
maintainers:
- Thierry Reding <treding@nvidia.com>
- Jon Hunter <jonathanh@nvidia.com>
properties:
compatible:
const: nvidia,tegra20-das
reg:
maxItems: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
bus {
#address-cells = <1>;
#size-cells = <1>;
das@70000c00 {
compatible = "nvidia,tegra20-das";
reg = <0x70000c00 0x80>;
};
};
...

View File

@ -1,27 +0,0 @@
NVIDIA Tegra30 I2S controller
Required properties:
- compatible : For Tegra30, must contain "nvidia,tegra30-i2s". For Tegra124,
must contain "nvidia,tegra124-i2s". Otherwise, must contain
"nvidia,<chip>-i2s" plus at least one of the above, where <chip> is
tegra114 or tegra132.
- reg : Should contain I2S registers location and length
- clocks : Must contain one entry, for the module clock.
See ../clocks/clock-bindings.txt for details.
- resets : Must contain an entry for each entry in reset-names.
See ../reset/reset.txt for details.
- reset-names : Must include the following entries:
- i2s
- nvidia,ahub-cif-ids : The list of AHUB CIF IDs for this port, rx (playback)
first, tx (capture) second. See nvidia,tegra30-ahub.txt for values.
Example:
i2s@70080300 {
compatible = "nvidia,tegra30-i2s";
reg = <0x70080300 0x100>;
nvidia,ahub-cif-ids = <4 4>;
clocks = <&tegra_car 11>;
resets = <&tegra_car 11>;
reset-names = "i2s";
};

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/nvidia,tegra30-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra30 I2S controller
maintainers:
- Thierry Reding <treding@nvidia.com>
- Jon Hunter <jonathanh@nvidia.com>
properties:
compatible:
oneOf:
- enum:
- nvidia,tegra124-i2s
- nvidia,tegra30-i2s
- items:
- const: nvidia,tegra114-i2s
- const: nvidia,tegra30-i2s
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: i2s
resets:
maxItems: 1
reset-names:
const: i2s
nvidia,ahub-cif-ids:
description: list of AHUB CIF IDs
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
- description: rx (playback)
- description: tx (capture)
required:
- compatible
- reg
- clocks
- resets
- reset-names
- nvidia,ahub-cif-ids
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/tegra30-car.h>
i2s@70080300 {
compatible = "nvidia,tegra30-i2s";
reg = <0x70080300 0x100>;
nvidia,ahub-cif-ids = <4 4>;
clocks = <&tegra_car TEGRA30_CLK_I2S0>;
resets = <&tegra_car 30>;
reset-names = "i2s";
};
...

View File

@ -29,6 +29,8 @@ properties:
- enum: - enum:
- qcom,apq8016-sbc-sndcard - qcom,apq8016-sbc-sndcard
- qcom,msm8916-qdsp6-sndcard - qcom,msm8916-qdsp6-sndcard
- qcom,qcm6490-idp-sndcard
- qcom,qcs6490-rb3gen2-sndcard
- qcom,qrb5165-rb5-sndcard - qcom,qrb5165-rb5-sndcard
- qcom,sc7180-qdsp6-sndcard - qcom,sc7180-qdsp6-sndcard
- qcom,sc8280xp-sndcard - qcom,sc8280xp-sndcard

View File

@ -48,13 +48,16 @@ properties:
- const: renesas,rcar_sound-gen3 - const: renesas,rcar_sound-gen3
# for Gen4 SoC # for Gen4 SoC
- items: - items:
- const: renesas,rcar_sound-r8a779g0 # R-Car V4H - enum:
- renesas,rcar_sound-r8a779g0 # R-Car V4H
- renesas,rcar_sound-r8a779h0 # R-Car V4M
- const: renesas,rcar_sound-gen4 - const: renesas,rcar_sound-gen4
# for Generic # for Generic
- enum: - enum:
- renesas,rcar_sound-gen1 - renesas,rcar_sound-gen1
- renesas,rcar_sound-gen2 - renesas,rcar_sound-gen2
- renesas,rcar_sound-gen3 - renesas,rcar_sound-gen3
- renesas,rcar_sound-gen4
reg: reg:
minItems: 1 minItems: 1

View File

@ -0,0 +1,98 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/rockchip,rk3308-codec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Rockchip RK3308 Internal Codec
description: |
This is the audio codec embedded in the Rockchip RK3308
SoC. It has 8 24-bit ADCs and 2 24-bit DACs. The maximum supported
sampling rate is 192 kHz.
It is connected internally to one out of a selection of the internal I2S
controllers.
The RK3308 audio codec has 8 independent capture channels, but some
features work on stereo pairs called groups:
* grp 0 -- MIC1 / MIC2
* grp 1 -- MIC3 / MIC4
* grp 2 -- MIC5 / MIC6
* grp 3 -- MIC7 / MIC8
maintainers:
- Luca Ceresoli <luca.ceresoli@bootlin.com>
properties:
compatible:
const: rockchip,rk3308-codec
reg:
maxItems: 1
rockchip,grf:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Phandle to the General Register Files (GRF)
clocks:
items:
- description: clock for TX
- description: clock for RX
- description: AHB clock driving the interface
clock-names:
items:
- const: mclk_tx
- const: mclk_rx
- const: hclk
resets:
maxItems: 1
reset-names:
items:
- const: codec
"#sound-dai-cells":
const: 0
rockchip,micbias-avdd-percent:
description: |
Voltage setting for the MICBIAS pins expressed as a percentage of
AVDD.
E.g. if rockchip,micbias-avdd-percent = 85 and AVDD = 3v3, then the
MIC BIAS voltage will be 3.3 V * 85% = 2.805 V.
enum: [ 50, 55, 60, 65, 70, 75, 80, 85 ]
required:
- compatible
- reg
- rockchip,grf
- clocks
- resets
- "#sound-dai-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/rk3308-cru.h>
audio_codec: audio-codec@ff560000 {
compatible = "rockchip,rk3308-codec";
reg = <0xff560000 0x10000>;
rockchip,grf = <&grf>;
clock-names = "mclk_tx", "mclk_rx", "hclk";
clocks = <&cru SCLK_I2S2_8CH_TX_OUT>,
<&cru SCLK_I2S2_8CH_RX_OUT>,
<&cru PCLK_ACODEC>;
reset-names = "codec";
resets = <&cru SRST_ACODEC_P>;
#sound-dai-cells = <0>;
};
...

View File

@ -1,15 +0,0 @@
Texas Instruments PCM1681 8-channel PWM Processor
Required properties:
- compatible: Should contain "ti,pcm1681".
- reg: The i2c address. Should contain <0x4c>.
Examples:
i2c_bus {
pcm1681@4c {
compatible = "ti,pcm1681";
reg = <0x4c>;
};
};

View File

@ -0,0 +1,43 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,pcm1681.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments PCM1681 8-channel PWM Processor
maintainers:
- Shenghao Ding <shenghao-ding@ti.com>
- Kevin Lu <kevin-lu@ti.com>
- Baojun Xu <baojun.xu@ti.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: ti,pcm1681
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
pcm1681: audio-codec@4c {
compatible = "ti,pcm1681";
reg = <0x4c>;
};
};

View File

@ -0,0 +1,177 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2022 - 2024 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,pcm6240.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments PCM6240 Family Audio ADC/DAC
maintainers:
- Shenghao Ding <shenghao-ding@ti.com>
description: |
The PCM6240 Family is a big family of Audio ADC/DAC for
different Specifications, range from Personal Electric
to Automotive Electric, even some professional fields.
Specifications about the audio chip can be found at:
https://www.ti.com/lit/gpn/tlv320adc3120
https://www.ti.com/lit/gpn/tlv320adc5120
https://www.ti.com/lit/gpn/tlv320adc6120
https://www.ti.com/lit/gpn/dix4192
https://www.ti.com/lit/gpn/pcm1690
https://www.ti.com/lit/gpn/pcm3120-q1
https://www.ti.com/lit/gpn/pcm3140-q1
https://www.ti.com/lit/gpn/pcm5120-q1
https://www.ti.com/lit/gpn/pcm6120-q1
https://www.ti.com/lit/gpn/pcm6260-q1
https://www.ti.com/lit/gpn/pcm9211
https://www.ti.com/lit/gpn/pcmd3140
https://www.ti.com/lit/gpn/pcmd3180
https://www.ti.com/lit/gpn/taa5212
https://www.ti.com/lit/gpn/tad5212
properties:
compatible:
description: |
ti,adc3120: Stereo-channel, 768-kHz, Burr-Brown™ audio analog-to-
digital converter (ADC) with 106-dB SNR.
ti,adc5120: 2-Channel, 768-kHz, Burr-Brown™ Audio ADC with 120-dB SNR.
ti,adc6120: Stereo-channel, 768-kHz, Burr-Brown™ audio analog-to-
digital converter (ADC) with 123-dB SNR.
ti,dix4192: 216-kHz digital audio converter with Quad-Channel In
and One-Channel Out.
ti,pcm1690: Automotive Catalog 113dB SNR 8-Channel Audio DAC with
Differential Outputs.
ti,pcm3120: Automotive, stereo, 106-dB SNR, 768-kHz, low-power
software-controlled audio ADC.
ti,pcm3140: Automotive, Quad-Channel, 768-kHz, Burr-Brown™ Audio ADC
with 106-dB SNR.
ti,pcm5120: Automotive, stereo, 120-dB SNR, 768-kHz, low-power
software-controlled audio ADC.
ti,pcm5140: Automotive, Quad-Channel, 768-kHz, Burr-Brown™ Audio ADC
with 120-dB SNR.
ti,pcm6120: Automotive, stereo, 123-dB SNR, 768-kHz, low-power
software-controlled audio ADC.
ti,pcm6140: Automotive, Quad-Channel, 768-kHz, Burr-Brown™ Audio ADC
with 123-dB SNR.
ti,pcm6240: Automotive 4-ch audio ADC with integrated programmable mic
bias, boost and input diagnostics.
ti,pcm6260: Automotive 6-ch audio ADC with integrated programmable mic
bias, boost and input diagnostics.
ti,pcm9211: 216-kHz digital audio converter With Stereo ADC and
Routing.
ti,pcmd3140: Four-channel PDM-input to TDM or I2S output converter.
ti,pcmd3180: Eight-channel pulse-density-modulation input to TDM or
I2S output converter.
ti,taa5212: Low-power high-performance stereo audio ADC with 118-dB
dynamic range.
ti,tad5212: Low-power stereo audio DAC with 120-dB dynamic range.
oneOf:
- items:
- enum:
- ti,adc3120
- ti,adc5120
- ti,pcm3120
- ti,pcm5120
- ti,pcm6120
- const: ti,adc6120
- items:
- enum:
- ti,pcmd512x
- ti,pcm9211
- ti,taa5212
- ti,tad5212
- const: ti,adc6120
- items:
- enum:
- ti,pcm3140
- ti,pcm5140
- ti,dix4192
- ti,pcm6140
- ti,pcm6260
- const: ti,pcm6240
- items:
- enum:
- ti,pcmd3140
- ti,pcmd3180
- ti,pcm1690
- ti,taa5412
- ti,tad5412
- const: ti,pcm6240
- enum:
- ti,adc6120
- ti,pcm6240
reg:
description:
I2C address, in multiple pcmdevices case, all the i2c address
aggregate as one Audio Device to support multiple audio slots.
minItems: 1
maxItems: 4
reset-gpios:
maxItems: 1
interrupts:
maxItems: 1
description:
Invalid only for ti,pcm1690 because of no INT pin.
'#sound-dai-cells':
const: 0
required:
- compatible
- reg
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
enum:
- ti,pcm1690
then:
properties:
interrupts: false
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
/* example for two devices with interrupt support */
#address-cells = <1>;
#size-cells = <0>;
pcm6240: audio-codec@48 {
compatible = "ti,pcm6240";
reg = <0x48>, /* primary-device */
<0x4b>; /* secondary-device */
#sound-dai-cells = <0>;
reset-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
interrupt-parent = <&gpio1>;
interrupts = <15>;
};
};
...

View File

@ -0,0 +1,41 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/wlf,wm8776.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: WM8776 audio CODEC
maintainers:
- patches@opensource.cirrus.com
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: wlf,wm8776
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1a {
compatible = "wlf,wm8776";
reg = <0x1a>;
};
};

View File

@ -1,15 +0,0 @@
WM8974 audio CODEC
This device supports both I2C and SPI (configured with pin strapping
on the board).
Required properties:
- compatible: "wlf,wm8974"
- reg: the I2C address or SPI chip select number of the device
Examples:
codec: wm8974@1a {
compatible = "wlf,wm8974";
reg = <0x1a>;
};

View File

@ -0,0 +1,41 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/wlf,wm8974.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: WM8974 audio CODEC
maintainers:
- patches@opensource.cirrus.com
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: wlf,wm8974
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1a {
compatible = "wlf,wm8974";
reg = <0x1a>;
};
};

View File

@ -1,18 +0,0 @@
WM8776 audio CODEC
This device supports both I2C and SPI (configured with pin strapping
on the board).
Required properties:
- compatible : "wlf,wm8776"
- reg : the I2C address of the device for I2C, the chip select
number for SPI.
Example:
wm8776: codec@1a {
compatible = "wlf,wm8776";
reg = <0x1a>;
};

View File

@ -97,7 +97,6 @@ like this::
static struct virtio_driver virtio_dummy_driver = { static struct virtio_driver virtio_dummy_driver = {
.driver.name = KBUILD_MODNAME, .driver.name = KBUILD_MODNAME,
.driver.owner = THIS_MODULE,
.id_table = id_table, .id_table = id_table,
.probe = virtio_dummy_probe, .probe = virtio_dummy_probe,
.remove = virtio_dummy_remove, .remove = virtio_dummy_remove,

View File

@ -0,0 +1,11 @@
.. SPDX-License-Identifier: GPL-2.0
======================
bcachefs Documentation
======================
.. toctree::
:maxdepth: 2
:numbered:
errorcodes

View File

@ -69,6 +69,7 @@ Documentation for filesystem implementations.
afs afs
autofs autofs
autofs-mount-control autofs-mount-control
bcachefs/index
befs befs
bfs bfs
btrfs btrfs

View File

@ -24,10 +24,10 @@ fragmentation statistics can be obtained through gfp flag information of
each page. It is already implemented and activated if page owner is each page. It is already implemented and activated if page owner is
enabled. Other usages are more than welcome. enabled. Other usages are more than welcome.
It can also be used to show all the stacks and their outstanding It can also be used to show all the stacks and their current number of
allocations, which gives us a quick overview of where the memory is going allocated base pages, which gives us a quick overview of where the memory
without the need to screen through all the pages and match the allocation is going without the need to screen through all the pages and match the
and free operation. allocation and free operation.
page owner is disabled by default. So, if you'd like to use it, you need page owner is disabled by default. So, if you'd like to use it, you need
to add "page_owner=on" to your boot cmdline. If the kernel is built to add "page_owner=on" to your boot cmdline. If the kernel is built
@ -75,42 +75,45 @@ Usage
cat /sys/kernel/debug/page_owner_stacks/show_stacks > stacks.txt cat /sys/kernel/debug/page_owner_stacks/show_stacks > stacks.txt
cat stacks.txt cat stacks.txt
prep_new_page+0xa9/0x120 post_alloc_hook+0x177/0x1a0
get_page_from_freelist+0x7e6/0x2140 get_page_from_freelist+0xd01/0xd80
__alloc_pages+0x18a/0x370 __alloc_pages+0x39e/0x7e0
new_slab+0xc8/0x580 allocate_slab+0xbc/0x3f0
___slab_alloc+0x1f2/0xaf0 ___slab_alloc+0x528/0x8a0
__slab_alloc.isra.86+0x22/0x40 kmem_cache_alloc+0x224/0x3b0
kmem_cache_alloc+0x31b/0x350 sk_prot_alloc+0x58/0x1a0
__khugepaged_enter+0x39/0x100 sk_alloc+0x32/0x4f0
dup_mmap+0x1c7/0x5ce inet_create+0x427/0xb50
copy_process+0x1afe/0x1c90 __sock_create+0x2e4/0x650
kernel_clone+0x9a/0x3c0 inet_ctl_sock_create+0x30/0x180
__do_sys_clone+0x66/0x90 igmp_net_init+0xc1/0x130
do_syscall_64+0x7f/0x160 ops_init+0x167/0x410
entry_SYSCALL_64_after_hwframe+0x6c/0x74 setup_net+0x304/0xa60
stack_count: 234 copy_net_ns+0x29b/0x4a0
create_new_namespaces+0x4a1/0x820
nr_base_pages: 16
... ...
... ...
echo 7000 > /sys/kernel/debug/page_owner_stacks/count_threshold echo 7000 > /sys/kernel/debug/page_owner_stacks/count_threshold
cat /sys/kernel/debug/page_owner_stacks/show_stacks> stacks_7000.txt cat /sys/kernel/debug/page_owner_stacks/show_stacks> stacks_7000.txt
cat stacks_7000.txt cat stacks_7000.txt
prep_new_page+0xa9/0x120 post_alloc_hook+0x177/0x1a0
get_page_from_freelist+0x7e6/0x2140 get_page_from_freelist+0xd01/0xd80
__alloc_pages+0x18a/0x370 __alloc_pages+0x39e/0x7e0
alloc_pages_mpol+0xdf/0x1e0 alloc_pages_mpol+0x22e/0x490
folio_alloc+0x14/0x50 folio_alloc+0xd5/0x110
filemap_alloc_folio+0xb0/0x100 filemap_alloc_folio+0x78/0x230
page_cache_ra_unbounded+0x97/0x180 page_cache_ra_order+0x287/0x6f0
filemap_fault+0x4b4/0x1200 filemap_get_pages+0x517/0x1160
__do_fault+0x2d/0x110 filemap_read+0x304/0x9f0
do_pte_missing+0x4b0/0xa30 xfs_file_buffered_read+0xe6/0x1d0 [xfs]
__handle_mm_fault+0x7fa/0xb70 xfs_file_read_iter+0x1f0/0x380 [xfs]
handle_mm_fault+0x125/0x300 __kernel_read+0x3b9/0x730
do_user_addr_fault+0x3c9/0x840 kernel_read_file+0x309/0x4d0
exc_page_fault+0x68/0x150 __do_sys_finit_module+0x381/0x730
asm_exc_page_fault+0x22/0x30 do_syscall_64+0x8d/0x150
stack_count: 8248 entry_SYSCALL_64_after_hwframe+0x62/0x6a
nr_base_pages: 20824
... ...
cat /sys/kernel/debug/page_owner > page_owner_full.txt cat /sys/kernel/debug/page_owner > page_owner_full.txt

View File

@ -252,7 +252,7 @@ an involved disclosed party. The current ambassadors list:
AMD Tom Lendacky <thomas.lendacky@amd.com> AMD Tom Lendacky <thomas.lendacky@amd.com>
Ampere Darren Hart <darren@os.amperecomputing.com> Ampere Darren Hart <darren@os.amperecomputing.com>
ARM Catalin Marinas <catalin.marinas@arm.com> ARM Catalin Marinas <catalin.marinas@arm.com>
IBM Power Anton Blanchard <anton@linux.ibm.com> IBM Power Michael Ellerman <ellerman@au.ibm.com>
IBM Z Christian Borntraeger <borntraeger@de.ibm.com> IBM Z Christian Borntraeger <borntraeger@de.ibm.com>
Intel Tony Luck <tony.luck@intel.com> Intel Tony Luck <tony.luck@intel.com>
Qualcomm Trilok Soni <quic_tsoni@quicinc.com> Qualcomm Trilok Soni <quic_tsoni@quicinc.com>

View File

@ -0,0 +1,375 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.43.0 (0)
-->
<!-- Title: G Pages: 1 -->
<svg width="900pt" height="630pt"
viewBox="0.00 0.00 900.00 630.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 626)">
<title>G</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-626 896,-626 896,4 -4,4"/>
<g id="clust1" class="cluster">
<title>ROOT</title>
<polygon fill="none" stroke="dodgerblue" points="8,-537 8,-614 102,-614 102,-537 8,-537"/>
<text text-anchor="middle" x="55" y="-598.8" font-family="sans-serif" font-size="14.00">ROOT</text>
</g>
<g id="clust2" class="cluster">
<title>4000b000.audio&#45;controller</title>
<polygon fill="none" stroke="dodgerblue" points="120,-378 120,-455 312,-455 312,-378 120,-378"/>
<text text-anchor="middle" x="216" y="-439.8" font-family="sans-serif" font-size="14.00">4000b000.audio&#45;controller</text>
</g>
<g id="clust5" class="cluster">
<title>cs42l51.0&#45;004a</title>
<polygon fill="none" stroke="dodgerblue" points="330,-8 330,-614 884,-614 884,-8 330,-8"/>
<text text-anchor="middle" x="607" y="-598.8" font-family="sans-serif" font-size="14.00">cs42l51.0&#45;004a</text>
</g>
<g id="clust9" class="cluster">
<title>hdmi&#45;audio&#45;codec.1.auto</title>
<polygon fill="none" stroke="dodgerblue" points="110,-463 110,-614 314,-614 314,-463 110,-463"/>
<text text-anchor="middle" x="212" y="-598.8" font-family="sans-serif" font-size="14.00">hdmi&#45;audio&#45;codec.1.auto</text>
</g>
<!-- ROOT_Amplifier -->
<g id="node1" class="node">
<title>ROOT_Amplifier</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="93.5,-583 16.5,-583 16.5,-545 93.5,-545 93.5,-583"/>
<text text-anchor="middle" x="55" y="-567.8" font-family="sans-serif" font-size="14.00">Amplifier</text>
<text text-anchor="middle" x="55" y="-552.8" font-family="sans-serif" font-size="14.00">[out_drv]</text>
</g>
<!-- 4000b000.audio&#45;controller_capture -->
<g id="node2" class="node">
<title>4000b000.audio&#45;controller_capture</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="202,-424 128,-424 128,-386 202,-386 202,-424"/>
<text text-anchor="middle" x="165" y="-408.8" font-family="sans-serif" font-size="14.00">capture</text>
<text text-anchor="middle" x="165" y="-393.8" font-family="sans-serif" font-size="14.00">[dai_out]</text>
</g>
<!-- 4000b000.audio&#45;controller_playback -->
<g id="node3" class="node">
<title>4000b000.audio&#45;controller_playback</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="304,-424 230,-424 230,-386 304,-386 304,-424"/>
<text text-anchor="middle" x="267" y="-408.8" font-family="sans-serif" font-size="14.00">playback</text>
<text text-anchor="middle" x="267" y="-393.8" font-family="sans-serif" font-size="14.00">[dai_in]</text>
</g>
<!-- hdmi&#45;audio&#45;codec.1.auto_I2S Playback -->
<g id="node28" class="node">
<title>hdmi&#45;audio&#45;codec.1.auto_I2S Playback</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="306,-583 208,-583 208,-545 306,-545 306,-583"/>
<text text-anchor="middle" x="257" y="-567.8" font-family="sans-serif" font-size="14.00">I2S Playback</text>
<text text-anchor="middle" x="257" y="-552.8" font-family="sans-serif" font-size="14.00">[dai_in]</text>
</g>
<!-- 4000b000.audio&#45;controller_playback&#45;&gt;hdmi&#45;audio&#45;codec.1.auto_I2S Playback -->
<g id="edge21" class="edge">
<title>4000b000.audio&#45;controller_playback&#45;&gt;hdmi&#45;audio&#45;codec.1.auto_I2S Playback</title>
<path fill="none" stroke="black" d="M276.84,-424.14C282.19,-435.06 288.26,-449.42 291,-463 295.05,-483.04 296.67,-489.36 291,-509 288.25,-518.54 283.26,-528.01 277.93,-536.3"/>
<polygon fill="black" stroke="black" points="274.89,-534.55 272.11,-544.78 280.66,-538.51 274.89,-534.55"/>
</g>
<!-- hdmi&#45;audio&#45;codec.1.auto_Capture -->
<g id="node4" class="node">
<title>hdmi&#45;audio&#45;codec.1.auto_Capture</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="192,-509 118,-509 118,-471 192,-471 192,-509"/>
<text text-anchor="middle" x="155" y="-493.8" font-family="sans-serif" font-size="14.00">Capture</text>
<text text-anchor="middle" x="155" y="-478.8" font-family="sans-serif" font-size="14.00">[dai_out]</text>
</g>
<!-- hdmi&#45;audio&#45;codec.1.auto_Capture&#45;&gt;4000b000.audio&#45;controller_capture -->
<g id="edge1" class="edge">
<title>hdmi&#45;audio&#45;codec.1.auto_Capture&#45;&gt;4000b000.audio&#45;controller_capture</title>
<path fill="none" stroke="black" d="M157.17,-470.99C158.46,-460.3 160.12,-446.5 161.58,-434.37"/>
<polygon fill="black" stroke="black" points="165.08,-434.61 162.8,-424.26 158.13,-433.77 165.08,-434.61"/>
</g>
<!-- cs42l51.0&#45;004a_AIN1L -->
<g id="node5" class="node">
<title>cs42l51.0&#45;004a_AIN1L</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="836.5,-583 775.5,-583 775.5,-545 836.5,-545 836.5,-583"/>
<text text-anchor="middle" x="806" y="-567.8" font-family="sans-serif" font-size="14.00">AIN1L</text>
<text text-anchor="middle" x="806" y="-552.8" font-family="sans-serif" font-size="14.00">[input]</text>
</g>
<!-- cs42l51.0&#45;004a_PGA&#45;ADC Mux Left -->
<g id="node22" class="node">
<title>cs42l51.0&#45;004a_PGA&#45;ADC Mux Left</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="876,-509 736,-509 736,-471 876,-471 876,-509"/>
<text text-anchor="middle" x="806" y="-493.8" font-family="sans-serif" font-size="14.00">PGA&#45;ADC Mux Left</text>
<text text-anchor="middle" x="806" y="-478.8" font-family="sans-serif" font-size="14.00">[mux]</text>
</g>
<!-- cs42l51.0&#45;004a_AIN1L&#45;&gt;cs42l51.0&#45;004a_PGA&#45;ADC Mux Left -->
<g id="edge14" class="edge">
<title>cs42l51.0&#45;004a_AIN1L&#45;&gt;cs42l51.0&#45;004a_PGA&#45;ADC Mux Left</title>
<path fill="none" stroke="black" d="M806,-544.83C806,-537.13 806,-527.97 806,-519.42"/>
<polygon fill="black" stroke="black" points="809.5,-519.41 806,-509.41 802.5,-519.41 809.5,-519.41"/>
</g>
<!-- cs42l51.0&#45;004a_AIN1R -->
<g id="node6" class="node">
<title>cs42l51.0&#45;004a_AIN1R</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="738.5,-583 677.5,-583 677.5,-545 738.5,-545 738.5,-583"/>
<text text-anchor="middle" x="708" y="-567.8" font-family="sans-serif" font-size="14.00">AIN1R</text>
<text text-anchor="middle" x="708" y="-552.8" font-family="sans-serif" font-size="14.00">[input]</text>
</g>
<!-- cs42l51.0&#45;004a_PGA&#45;ADC Mux Right -->
<g id="node23" class="node">
<title>cs42l51.0&#45;004a_PGA&#45;ADC Mux Right</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="717.5,-509 568.5,-509 568.5,-471 717.5,-471 717.5,-509"/>
<text text-anchor="middle" x="643" y="-493.8" font-family="sans-serif" font-size="14.00">PGA&#45;ADC Mux Right</text>
<text text-anchor="middle" x="643" y="-478.8" font-family="sans-serif" font-size="14.00">[mux]</text>
</g>
<!-- cs42l51.0&#45;004a_AIN1R&#45;&gt;cs42l51.0&#45;004a_PGA&#45;ADC Mux Right -->
<g id="edge15" class="edge">
<title>cs42l51.0&#45;004a_AIN1R&#45;&gt;cs42l51.0&#45;004a_PGA&#45;ADC Mux Right</title>
<path fill="none" stroke="black" d="M691.6,-544.83C683.96,-536.37 674.73,-526.15 666.38,-516.9"/>
<polygon fill="black" stroke="black" points="668.92,-514.49 659.62,-509.41 663.73,-519.18 668.92,-514.49"/>
</g>
<!-- cs42l51.0&#45;004a_AIN2L -->
<g id="node7" class="node">
<title>cs42l51.0&#45;004a_AIN2L</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="659.5,-583 598.5,-583 598.5,-545 659.5,-545 659.5,-583"/>
<text text-anchor="middle" x="629" y="-567.8" font-family="sans-serif" font-size="14.00">AIN2L</text>
<text text-anchor="middle" x="629" y="-552.8" font-family="sans-serif" font-size="14.00">[input]</text>
</g>
<!-- cs42l51.0&#45;004a_AIN2R -->
<g id="node8" class="node">
<title>cs42l51.0&#45;004a_AIN2R</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="580.5,-583 519.5,-583 519.5,-545 580.5,-545 580.5,-583"/>
<text text-anchor="middle" x="550" y="-567.8" font-family="sans-serif" font-size="14.00">AIN2R</text>
<text text-anchor="middle" x="550" y="-552.8" font-family="sans-serif" font-size="14.00">[input]</text>
</g>
<!-- cs42l51.0&#45;004a_Capture -->
<g id="node9" class="node">
<title>cs42l51.0&#45;004a_Capture</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="692,-276 618,-276 618,-238 692,-238 692,-276"/>
<text text-anchor="middle" x="655" y="-260.8" font-family="sans-serif" font-size="14.00">Capture</text>
<text text-anchor="middle" x="655" y="-245.8" font-family="sans-serif" font-size="14.00">[dai_out]</text>
</g>
<!-- cs42l51.0&#45;004a_DAC Mux -->
<g id="node10" class="node">
<title>cs42l51.0&#45;004a_DAC Mux</title>
<polygon fill="none" stroke="#008b00" stroke-width="2" points="598.5,-202 521.5,-202 521.5,-164 598.5,-164 598.5,-202"/>
<text text-anchor="middle" x="560" y="-186.8" font-family="sans-serif" font-size="14.00">DAC Mux</text>
<text text-anchor="middle" x="560" y="-171.8" font-family="sans-serif" font-size="14.00">[mux]</text>
</g>
<!-- cs42l51.0&#45;004a_Left DAC -->
<g id="node14" class="node">
<title>cs42l51.0&#45;004a_Left DAC</title>
<polygon fill="none" stroke="#008b00" stroke-width="2" points="548,-128 474,-128 474,-90 548,-90 548,-128"/>
<text text-anchor="middle" x="511" y="-112.8" font-family="sans-serif" font-size="14.00">Left DAC</text>
<text text-anchor="middle" x="511" y="-97.8" font-family="sans-serif" font-size="14.00">[dac]</text>
</g>
<!-- cs42l51.0&#45;004a_DAC Mux&#45;&gt;cs42l51.0&#45;004a_Left DAC -->
<g id="edge9" class="edge">
<title>cs42l51.0&#45;004a_DAC Mux&#45;&gt;cs42l51.0&#45;004a_Left DAC</title>
<path fill="none" stroke="black" d="M547.64,-163.83C542.05,-155.62 535.34,-145.76 529.19,-136.73"/>
<polygon fill="black" stroke="black" points="532.05,-134.71 523.53,-128.41 526.26,-138.65 532.05,-134.71"/>
</g>
<!-- cs42l51.0&#45;004a_Right DAC -->
<g id="node26" class="node">
<title>cs42l51.0&#45;004a_Right DAC</title>
<polygon fill="none" stroke="#008b00" stroke-width="2" points="649.5,-128 566.5,-128 566.5,-90 649.5,-90 649.5,-128"/>
<text text-anchor="middle" x="608" y="-112.8" font-family="sans-serif" font-size="14.00">Right DAC</text>
<text text-anchor="middle" x="608" y="-97.8" font-family="sans-serif" font-size="14.00">[dac]</text>
</g>
<!-- cs42l51.0&#45;004a_DAC Mux&#45;&gt;cs42l51.0&#45;004a_Right DAC -->
<g id="edge18" class="edge">
<title>cs42l51.0&#45;004a_DAC Mux&#45;&gt;cs42l51.0&#45;004a_Right DAC</title>
<path fill="none" stroke="black" d="M572.11,-163.83C577.53,-155.71 584.02,-145.96 589.99,-137.01"/>
<polygon fill="black" stroke="black" points="593.09,-138.68 595.72,-128.41 587.27,-134.79 593.09,-138.68"/>
</g>
<!-- cs42l51.0&#45;004a_HPL -->
<g id="node11" class="node">
<title>cs42l51.0&#45;004a_HPL</title>
<polygon fill="none" stroke="#008b00" stroke-width="2" points="546.5,-54 475.5,-54 475.5,-16 546.5,-16 546.5,-54"/>
<text text-anchor="middle" x="511" y="-38.8" font-family="sans-serif" font-size="14.00">HPL</text>
<text text-anchor="middle" x="511" y="-23.8" font-family="sans-serif" font-size="14.00">[output]</text>
</g>
<!-- cs42l51.0&#45;004a_HPR -->
<g id="node12" class="node">
<title>cs42l51.0&#45;004a_HPR</title>
<polygon fill="none" stroke="#008b00" stroke-width="2" points="643.5,-54 572.5,-54 572.5,-16 643.5,-16 643.5,-54"/>
<text text-anchor="middle" x="608" y="-38.8" font-family="sans-serif" font-size="14.00">HPR</text>
<text text-anchor="middle" x="608" y="-23.8" font-family="sans-serif" font-size="14.00">[output]</text>
</g>
<!-- cs42l51.0&#45;004a_Left ADC -->
<g id="node13" class="node">
<title>cs42l51.0&#45;004a_Left ADC</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="822,-350 748,-350 748,-312 822,-312 822,-350"/>
<text text-anchor="middle" x="785" y="-334.8" font-family="sans-serif" font-size="14.00">Left ADC</text>
<text text-anchor="middle" x="785" y="-319.8" font-family="sans-serif" font-size="14.00">[adc]</text>
</g>
<!-- cs42l51.0&#45;004a_Left ADC&#45;&gt;cs42l51.0&#45;004a_Capture -->
<g id="edge4" class="edge">
<title>cs42l51.0&#45;004a_Left ADC&#45;&gt;cs42l51.0&#45;004a_Capture</title>
<path fill="none" stroke="black" d="M752.2,-311.83C735.41,-302.54 714.8,-291.12 696.88,-281.2"/>
<polygon fill="black" stroke="black" points="698.24,-277.95 687.79,-276.16 694.85,-284.07 698.24,-277.95"/>
</g>
<!-- cs42l51.0&#45;004a_Left DAC&#45;&gt;cs42l51.0&#45;004a_HPL -->
<g id="edge6" class="edge">
<title>cs42l51.0&#45;004a_Left DAC&#45;&gt;cs42l51.0&#45;004a_HPL</title>
<path fill="none" stroke="black" d="M511,-89.83C511,-82.13 511,-72.97 511,-64.42"/>
<polygon fill="black" stroke="black" points="514.5,-64.41 511,-54.41 507.5,-64.41 514.5,-64.41"/>
</g>
<!-- cs42l51.0&#45;004a_Left PGA -->
<g id="node15" class="node">
<title>cs42l51.0&#45;004a_Left PGA</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="838,-424 764,-424 764,-386 838,-386 838,-424"/>
<text text-anchor="middle" x="801" y="-408.8" font-family="sans-serif" font-size="14.00">Left PGA</text>
<text text-anchor="middle" x="801" y="-393.8" font-family="sans-serif" font-size="14.00">[pga]</text>
</g>
<!-- cs42l51.0&#45;004a_Left PGA&#45;&gt;cs42l51.0&#45;004a_Left ADC -->
<g id="edge8" class="edge">
<title>cs42l51.0&#45;004a_Left PGA&#45;&gt;cs42l51.0&#45;004a_Left ADC</title>
<path fill="none" stroke="black" d="M796.96,-385.83C795.25,-378.13 793.22,-368.97 791.31,-360.42"/>
<polygon fill="black" stroke="black" points="794.68,-359.42 789.09,-350.41 787.84,-360.93 794.68,-359.42"/>
</g>
<!-- cs42l51.0&#45;004a_MCLK -->
<g id="node16" class="node">
<title>cs42l51.0&#45;004a_MCLK</title>
<polygon fill="none" stroke="#008b00" stroke-width="2" points="594.5,-350 525.5,-350 525.5,-312 594.5,-312 594.5,-350"/>
<text text-anchor="middle" x="560" y="-334.8" font-family="sans-serif" font-size="14.00">MCLK</text>
<text text-anchor="middle" x="560" y="-319.8" font-family="sans-serif" font-size="14.00">[supply]</text>
</g>
<!-- cs42l51.0&#45;004a_MCLK&#45;&gt;cs42l51.0&#45;004a_Capture -->
<g id="edge2" class="edge">
<title>cs42l51.0&#45;004a_MCLK&#45;&gt;cs42l51.0&#45;004a_Capture</title>
<path fill="none" stroke="black" d="M583.97,-311.83C595.79,-302.88 610.2,-291.96 622.94,-282.3"/>
<polygon fill="black" stroke="black" points="625.18,-284.99 631.04,-276.16 620.95,-279.41 625.18,-284.99"/>
</g>
<!-- cs42l51.0&#45;004a_Playback -->
<g id="node24" class="node">
<title>cs42l51.0&#45;004a_Playback</title>
<polygon fill="none" stroke="#008b00" stroke-width="2" points="597,-276 523,-276 523,-238 597,-238 597,-276"/>
<text text-anchor="middle" x="560" y="-260.8" font-family="sans-serif" font-size="14.00">Playback</text>
<text text-anchor="middle" x="560" y="-245.8" font-family="sans-serif" font-size="14.00">[dai_in]</text>
</g>
<!-- cs42l51.0&#45;004a_MCLK&#45;&gt;cs42l51.0&#45;004a_Playback -->
<g id="edge16" class="edge">
<title>cs42l51.0&#45;004a_MCLK&#45;&gt;cs42l51.0&#45;004a_Playback</title>
<path fill="none" stroke="black" d="M560,-311.83C560,-304.13 560,-294.97 560,-286.42"/>
<polygon fill="black" stroke="black" points="563.5,-286.41 560,-276.41 556.5,-286.41 563.5,-286.41"/>
</g>
<!-- cs42l51.0&#45;004a_MICL -->
<g id="node17" class="node">
<title>cs42l51.0&#45;004a_MICL</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="399.5,-509 338.5,-509 338.5,-471 399.5,-471 399.5,-509"/>
<text text-anchor="middle" x="369" y="-493.8" font-family="sans-serif" font-size="14.00">MICL</text>
<text text-anchor="middle" x="369" y="-478.8" font-family="sans-serif" font-size="14.00">[input]</text>
</g>
<!-- cs42l51.0&#45;004a_Mic Preamp Left -->
<g id="node20" class="node">
<title>cs42l51.0&#45;004a_Mic Preamp Left</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="461.5,-424 338.5,-424 338.5,-386 461.5,-386 461.5,-424"/>
<text text-anchor="middle" x="400" y="-408.8" font-family="sans-serif" font-size="14.00">Mic Preamp Left</text>
<text text-anchor="middle" x="400" y="-393.8" font-family="sans-serif" font-size="14.00">[mixer]</text>
</g>
<!-- cs42l51.0&#45;004a_MICL&#45;&gt;cs42l51.0&#45;004a_Mic Preamp Left -->
<g id="edge12" class="edge">
<title>cs42l51.0&#45;004a_MICL&#45;&gt;cs42l51.0&#45;004a_Mic Preamp Left</title>
<path fill="none" stroke="black" d="M375.73,-470.99C379.8,-460.08 385.08,-445.94 389.68,-433.64"/>
<polygon fill="black" stroke="black" points="392.96,-434.85 393.18,-424.26 386.4,-432.4 392.96,-434.85"/>
</g>
<!-- cs42l51.0&#45;004a_MICR -->
<g id="node18" class="node">
<title>cs42l51.0&#45;004a_MICR</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="501.5,-583 440.5,-583 440.5,-545 501.5,-545 501.5,-583"/>
<text text-anchor="middle" x="471" y="-567.8" font-family="sans-serif" font-size="14.00">MICR</text>
<text text-anchor="middle" x="471" y="-552.8" font-family="sans-serif" font-size="14.00">[input]</text>
</g>
<!-- cs42l51.0&#45;004a_Mic Preamp Right -->
<g id="node21" class="node">
<title>cs42l51.0&#45;004a_Mic Preamp Right</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="550.5,-509 417.5,-509 417.5,-471 550.5,-471 550.5,-509"/>
<text text-anchor="middle" x="484" y="-493.8" font-family="sans-serif" font-size="14.00">Mic Preamp Right</text>
<text text-anchor="middle" x="484" y="-478.8" font-family="sans-serif" font-size="14.00">[mixer]</text>
</g>
<!-- cs42l51.0&#45;004a_MICR&#45;&gt;cs42l51.0&#45;004a_Mic Preamp Right -->
<g id="edge13" class="edge">
<title>cs42l51.0&#45;004a_MICR&#45;&gt;cs42l51.0&#45;004a_Mic Preamp Right</title>
<path fill="none" stroke="black" d="M474.28,-544.83C475.67,-537.13 477.32,-527.97 478.87,-519.42"/>
<polygon fill="black" stroke="black" points="482.34,-519.88 480.68,-509.41 475.45,-518.63 482.34,-519.88"/>
</g>
<!-- cs42l51.0&#45;004a_Mic Bias -->
<g id="node19" class="node">
<title>cs42l51.0&#45;004a_Mic Bias</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="409.5,-583 338.5,-583 338.5,-545 409.5,-545 409.5,-583"/>
<text text-anchor="middle" x="374" y="-567.8" font-family="sans-serif" font-size="14.00">Mic Bias</text>
<text text-anchor="middle" x="374" y="-552.8" font-family="sans-serif" font-size="14.00">[supply]</text>
</g>
<!-- cs42l51.0&#45;004a_Mic Bias&#45;&gt;cs42l51.0&#45;004a_MICL -->
<g id="edge11" class="edge">
<title>cs42l51.0&#45;004a_Mic Bias&#45;&gt;cs42l51.0&#45;004a_MICL</title>
<path fill="none" stroke="black" d="M372.74,-544.83C372.2,-537.13 371.57,-527.97 370.97,-519.42"/>
<polygon fill="black" stroke="black" points="374.46,-519.15 370.28,-509.41 367.48,-519.63 374.46,-519.15"/>
</g>
<!-- cs42l51.0&#45;004a_PGA&#45;ADC Mux Left&#45;&gt;cs42l51.0&#45;004a_Left PGA -->
<g id="edge10" class="edge">
<title>cs42l51.0&#45;004a_PGA&#45;ADC Mux Left&#45;&gt;cs42l51.0&#45;004a_Left PGA</title>
<path fill="none" stroke="black" d="M804.92,-470.99C804.27,-460.3 803.44,-446.5 802.71,-434.37"/>
<polygon fill="black" stroke="black" points="806.2,-434.03 802.1,-424.26 799.21,-434.45 806.2,-434.03"/>
</g>
<!-- cs42l51.0&#45;004a_Right PGA -->
<g id="node27" class="node">
<title>cs42l51.0&#45;004a_Right PGA</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="688.5,-424 605.5,-424 605.5,-386 688.5,-386 688.5,-424"/>
<text text-anchor="middle" x="647" y="-408.8" font-family="sans-serif" font-size="14.00">Right PGA</text>
<text text-anchor="middle" x="647" y="-393.8" font-family="sans-serif" font-size="14.00">[pga]</text>
</g>
<!-- cs42l51.0&#45;004a_PGA&#45;ADC Mux Right&#45;&gt;cs42l51.0&#45;004a_Right PGA -->
<g id="edge19" class="edge">
<title>cs42l51.0&#45;004a_PGA&#45;ADC Mux Right&#45;&gt;cs42l51.0&#45;004a_Right PGA</title>
<path fill="none" stroke="black" d="M643.87,-470.99C644.38,-460.3 645.05,-446.5 645.63,-434.37"/>
<polygon fill="black" stroke="black" points="649.13,-434.42 646.12,-424.26 642.14,-434.08 649.13,-434.42"/>
</g>
<!-- cs42l51.0&#45;004a_Playback&#45;&gt;cs42l51.0&#45;004a_DAC Mux -->
<g id="edge5" class="edge">
<title>cs42l51.0&#45;004a_Playback&#45;&gt;cs42l51.0&#45;004a_DAC Mux</title>
<path fill="none" stroke="black" d="M560,-237.83C560,-230.13 560,-220.97 560,-212.42"/>
<polygon fill="black" stroke="black" points="563.5,-212.41 560,-202.41 556.5,-212.41 563.5,-212.41"/>
</g>
<!-- cs42l51.0&#45;004a_Right ADC -->
<g id="node25" class="node">
<title>cs42l51.0&#45;004a_Right ADC</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="697,-350 613,-350 613,-312 697,-312 697,-350"/>
<text text-anchor="middle" x="655" y="-334.8" font-family="sans-serif" font-size="14.00">Right ADC</text>
<text text-anchor="middle" x="655" y="-319.8" font-family="sans-serif" font-size="14.00">[adc]</text>
</g>
<!-- cs42l51.0&#45;004a_Right ADC&#45;&gt;cs42l51.0&#45;004a_Capture -->
<g id="edge3" class="edge">
<title>cs42l51.0&#45;004a_Right ADC&#45;&gt;cs42l51.0&#45;004a_Capture</title>
<path fill="none" stroke="black" d="M655,-311.83C655,-304.13 655,-294.97 655,-286.42"/>
<polygon fill="black" stroke="black" points="658.5,-286.41 655,-276.41 651.5,-286.41 658.5,-286.41"/>
</g>
<!-- cs42l51.0&#45;004a_Right DAC&#45;&gt;cs42l51.0&#45;004a_HPR -->
<g id="edge7" class="edge">
<title>cs42l51.0&#45;004a_Right DAC&#45;&gt;cs42l51.0&#45;004a_HPR</title>
<path fill="none" stroke="black" d="M608,-89.83C608,-82.13 608,-72.97 608,-64.42"/>
<polygon fill="black" stroke="black" points="611.5,-64.41 608,-54.41 604.5,-64.41 611.5,-64.41"/>
</g>
<!-- cs42l51.0&#45;004a_Right PGA&#45;&gt;cs42l51.0&#45;004a_Right ADC -->
<g id="edge17" class="edge">
<title>cs42l51.0&#45;004a_Right PGA&#45;&gt;cs42l51.0&#45;004a_Right ADC</title>
<path fill="none" stroke="black" d="M649.02,-385.83C649.87,-378.13 650.89,-368.97 651.84,-360.42"/>
<polygon fill="black" stroke="black" points="655.33,-360.74 652.95,-350.41 648.37,-359.97 655.33,-360.74"/>
</g>
<!-- hdmi&#45;audio&#45;codec.1.auto_TX -->
<g id="node30" class="node">
<title>hdmi&#45;audio&#45;codec.1.auto_TX</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="281.5,-509 210.5,-509 210.5,-471 281.5,-471 281.5,-509"/>
<text text-anchor="middle" x="246" y="-493.8" font-family="sans-serif" font-size="14.00">TX</text>
<text text-anchor="middle" x="246" y="-478.8" font-family="sans-serif" font-size="14.00">[output]</text>
</g>
<!-- hdmi&#45;audio&#45;codec.1.auto_I2S Playback&#45;&gt;hdmi&#45;audio&#45;codec.1.auto_TX -->
<g id="edge22" class="edge">
<title>hdmi&#45;audio&#45;codec.1.auto_I2S Playback&#45;&gt;hdmi&#45;audio&#45;codec.1.auto_TX</title>
<path fill="none" stroke="black" d="M254.22,-544.83C253.05,-537.13 251.65,-527.97 250.34,-519.42"/>
<polygon fill="black" stroke="black" points="253.78,-518.77 248.81,-509.41 246.86,-519.83 253.78,-518.77"/>
</g>
<!-- hdmi&#45;audio&#45;codec.1.auto_RX -->
<g id="node29" class="node">
<title>hdmi&#45;audio&#45;codec.1.auto_RX</title>
<polygon fill="#f2f2f2" stroke="#4d4d4d" points="189.5,-583 118.5,-583 118.5,-545 189.5,-545 189.5,-583"/>
<text text-anchor="middle" x="154" y="-567.8" font-family="sans-serif" font-size="14.00">RX</text>
<text text-anchor="middle" x="154" y="-552.8" font-family="sans-serif" font-size="14.00">[output]</text>
</g>
<!-- hdmi&#45;audio&#45;codec.1.auto_RX&#45;&gt;hdmi&#45;audio&#45;codec.1.auto_Capture -->
<g id="edge20" class="edge">
<title>hdmi&#45;audio&#45;codec.1.auto_RX&#45;&gt;hdmi&#45;audio&#45;codec.1.auto_Capture</title>
<path fill="none" stroke="black" d="M154.25,-544.83C154.36,-537.13 154.49,-527.97 154.61,-519.42"/>
<polygon fill="black" stroke="black" points="158.1,-519.46 154.74,-509.41 151.11,-519.36 158.1,-519.46"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -7,8 +7,8 @@ Description
Dynamic Audio Power Management (DAPM) is designed to allow portable Dynamic Audio Power Management (DAPM) is designed to allow portable
Linux devices to use the minimum amount of power within the audio Linux devices to use the minimum amount of power within the audio
subsystem at all times. It is independent of other kernel PM and as subsystem at all times. It is independent of other kernel power
such, can easily co-exist with the other PM systems. management frameworks and, as such, can easily co-exist with them.
DAPM is also completely transparent to all user space applications as DAPM is also completely transparent to all user space applications as
all power switching is done within the ASoC core. No code changes or all power switching is done within the ASoC core. No code changes or
@ -16,11 +16,29 @@ recompiling are required for user space applications. DAPM makes power
switching decisions based upon any audio stream (capture/playback) switching decisions based upon any audio stream (capture/playback)
activity and audio mixer settings within the device. activity and audio mixer settings within the device.
DAPM spans the whole machine. It covers power control within the entire DAPM is based on two basic elements, called widgets and routes:
audio subsystem, this includes internal codec power blocks and machine
level power systems.
There are 4 power domains within DAPM * a **widget** is every part of the audio hardware that can be enabled by
software when in use and disabled to save power when not in use
* a **route** is an interconnection between widgets that exists when sound
can flow from one widget to the other
All DAPM power switching decisions are made automatically by consulting an
audio routing graph. This graph is specific to each sound card and spans
the whole sound card, so some DAPM routes connect two widgets belonging to
different components (e.g. the LINE OUT pin of a CODEC and the input pin of
an amplifier).
The graph for the STM32MP1-DK1 sound card is shown in picture:
.. kernel-figure:: dapm-graph.svg
:alt: Example DAPM graph
:align: center
DAPM power domains
==================
There are 4 power domains within DAPM:
Codec bias domain Codec bias domain
VREF, VMID (core codec and audio power) VREF, VMID (core codec and audio power)
@ -47,17 +65,11 @@ Stream domain
Enabled and disabled when stream playback/capture is started and Enabled and disabled when stream playback/capture is started and
stopped respectively. e.g. aplay, arecord. stopped respectively. e.g. aplay, arecord.
All DAPM power switching decisions are made automatically by consulting an audio
routing map of the whole machine. This map is specific to each machine and
consists of the interconnections between every audio component (including
internal codec components). All audio components that effect power are called
widgets hereafter.
DAPM Widgets DAPM Widgets
============ ============
Audio DAPM widgets fall into a number of types:- Audio DAPM widgets fall into a number of types:
Mixer Mixer
Mixes several analog signals into a single analog signal. Mixes several analog signals into a single analog signal.
@ -141,14 +153,14 @@ Stream Widgets relate to the stream power domain and only consist of ADCs
(analog to digital converters), DACs (digital to analog converters), (analog to digital converters), DACs (digital to analog converters),
AIF IN and AIF OUT. AIF IN and AIF OUT.
Stream widgets have the following format:- Stream widgets have the following format:
:: ::
SND_SOC_DAPM_DAC(name, stream name, reg, shift, invert), SND_SOC_DAPM_DAC(name, stream name, reg, shift, invert),
SND_SOC_DAPM_AIF_IN(name, stream, slot, reg, shift, invert) SND_SOC_DAPM_AIF_IN(name, stream, slot, reg, shift, invert)
NOTE: the stream name must match the corresponding stream name in your codec NOTE: the stream name must match the corresponding stream name in your codec
snd_soc_codec_dai. snd_soc_dai_driver.
e.g. stream widgets for HiFi playback and capture e.g. stream widgets for HiFi playback and capture
:: ::
@ -167,7 +179,7 @@ Path Domain Widgets
------------------- -------------------
Path domain widgets have a ability to control or affect the audio signal or Path domain widgets have a ability to control or affect the audio signal or
audio paths within the audio subsystem. They have the following form:- audio paths within the audio subsystem. They have the following form:
:: ::
SND_SOC_DAPM_PGA(name, reg, shift, invert, controls, num_controls) SND_SOC_DAPM_PGA(name, reg, shift, invert, controls, num_controls)
@ -207,7 +219,7 @@ powered. e.g.
A machine widget can have an optional call back. A machine widget can have an optional call back.
e.g. Jack connector widget for an external Mic that enables Mic Bias e.g. Jack connector widget for an external Mic that enables Mic Bias
when the Mic is inserted:-:: when the Mic is inserted::
static int spitz_mic_bias(struct snd_soc_dapm_widget* w, int event) static int spitz_mic_bias(struct snd_soc_dapm_widget* w, int event)
{ {
@ -221,7 +233,7 @@ when the Mic is inserted:-::
Codec (BIAS) Domain Codec (BIAS) Domain
------------------- -------------------
The codec bias power domain has no widgets and is handled by the codecs DAPM The codec bias power domain has no widgets and is handled by the codec DAPM
event handler. This handler is called when the codec powerstate is changed wrt event handler. This handler is called when the codec powerstate is changed wrt
to any stream event or by kernel PM events. to any stream event or by kernel PM events.
@ -229,17 +241,58 @@ to any stream event or by kernel PM events.
Virtual Widgets Virtual Widgets
--------------- ---------------
Sometimes widgets exist in the codec or machine audio map that don't have any Sometimes widgets exist in the codec or machine audio graph that don't have any
corresponding soft power control. In this case it is necessary to create corresponding soft power control. In this case it is necessary to create
a virtual widget - a widget with no control bits e.g. a virtual widget - a widget with no control bits e.g.
:: ::
SND_SOC_DAPM_MIXER("AC97 Mixer", SND_SOC_NOPM, 0, 0, NULL, 0), SND_SOC_DAPM_MIXER("AC97 Mixer", SND_SOC_NOPM, 0, 0, NULL, 0),
This can be used to merge to signal paths together in software. This can be used to merge two signal paths together in software.
After all the widgets have been defined, they can then be added to the DAPM Registering DAPM controls
subsystem individually with a call to snd_soc_dapm_new_control(). =========================
In many cases the DAPM widgets are implemented statically in a ``static
const struct snd_soc_dapm_widget`` array in a codec driver, and simply
declared via the ``dapm_widgets`` and ``num_dapm_widgets`` fields of the
``struct snd_soc_component_driver``.
Similarly, routes connecting them are implemented statically in a ``static
const struct snd_soc_dapm_route`` array and declared via the
``dapm_routes`` and ``num_dapm_routes`` fields of the same struct.
With the above declared, the driver registration will take care of
populating them::
static const struct snd_soc_dapm_widget wm2000_dapm_widgets[] = {
SND_SOC_DAPM_OUTPUT("SPKN"),
SND_SOC_DAPM_OUTPUT("SPKP"),
...
};
/* Target, Path, Source */
static const struct snd_soc_dapm_route wm2000_audio_map[] = {
{ "SPKN", NULL, "ANC Engine" },
{ "SPKP", NULL, "ANC Engine" },
...
};
static const struct snd_soc_component_driver soc_component_dev_wm2000 = {
...
.dapm_widgets = wm2000_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(wm2000_dapm_widgets),
.dapm_routes = wm2000_audio_map,
.num_dapm_routes = ARRAY_SIZE(wm2000_audio_map),
...
};
In more complex cases the list of DAPM widgets and/or routes can be only
known at probe time. This happens for example when a driver supports
different models having a different set of features. In those cases
separate widgets and routes arrays implementing the case-specific features
can be registered programmatically by calling snd_soc_dapm_new_controls()
and snd_soc_dapm_add_routes().
Codec/DSP Widget Interconnections Codec/DSP Widget Interconnections
@ -247,31 +300,29 @@ Codec/DSP Widget Interconnections
Widgets are connected to each other within the codec, platform and machine by Widgets are connected to each other within the codec, platform and machine by
audio paths (called interconnections). Each interconnection must be defined in audio paths (called interconnections). Each interconnection must be defined in
order to create a map of all audio paths between widgets. order to create a graph of all audio paths between widgets.
This is easiest with a diagram of the codec or DSP (and schematic of the machine This is easiest with a diagram of the codec or DSP (and schematic of the machine
audio system), as it requires joining widgets together via their audio signal audio system), as it requires joining widgets together via their audio signal
paths. paths.
e.g., from the WM8731 output mixer (wm8731.c) For example the WM8731 output mixer (wm8731.c) has 3 inputs (sources):
The WM8731 output mixer has 3 inputs (sources)
1. Line Bypass Input 1. Line Bypass Input
2. DAC (HiFi playback) 2. DAC (HiFi playback)
3. Mic Sidetone Input 3. Mic Sidetone Input
Each input in this example has a kcontrol associated with it (defined in example Each input in this example has a kcontrol associated with it (defined in
above) and is connected to the output mixer via its kcontrol name. We can now the example above) and is connected to the output mixer via its kcontrol
connect the destination widget (wrt audio signal) with its source widgets. name. We can now connect the destination widget (wrt audio signal) with its
:: source widgets. ::
/* output mixer */ /* output mixer */
{"Output Mixer", "Line Bypass Switch", "Line Input"}, {"Output Mixer", "Line Bypass Switch", "Line Input"},
{"Output Mixer", "HiFi Playback Switch", "DAC"}, {"Output Mixer", "HiFi Playback Switch", "DAC"},
{"Output Mixer", "Mic Sidetone Switch", "Mic Bias"}, {"Output Mixer", "Mic Sidetone Switch", "Mic Bias"},
So we have :- So we have:
* Destination Widget <=== Path Name <=== Source Widget, or * Destination Widget <=== Path Name <=== Source Widget, or
* Sink, Path, Source, or * Sink, Path, Source, or
@ -280,12 +331,11 @@ So we have :-
When there is no path name connecting widgets (e.g. a direct connection) we When there is no path name connecting widgets (e.g. a direct connection) we
pass NULL for the path name. pass NULL for the path name.
Interconnections are created with a call to:- Interconnections are created with a call to::
::
snd_soc_dapm_connect_input(codec, sink, path, source); snd_soc_dapm_connect_input(codec, sink, path, source);
Finally, snd_soc_dapm_new_widgets(codec) must be called after all widgets and Finally, snd_soc_dapm_new_widgets() must be called after all widgets and
interconnections have been registered with the core. This causes the core to interconnections have been registered with the core. This causes the core to
scan the codec and machine so that the internal DAPM state matches the scan the codec and machine so that the internal DAPM state matches the
physical state of the machine. physical state of the machine.
@ -326,35 +376,44 @@ jacks can also be switched OFF.
DAPM Widget Events DAPM Widget Events
================== ==================
Some widgets can register their interest with the DAPM core in PM events. Widgets needing to implement a more complex behaviour than what DAPM can do
e.g. A Speaker with an amplifier registers a widget so the amplifier can be can set a custom "event handler" by setting a function pointer. An example
powered only when the spk is in use. is a power supply needing to enable a GPIO::
::
/* turn speaker amplifier on/off depending on use */ static int sof_es8316_speaker_power_event(struct snd_soc_dapm_widget *w,
static int corgi_amp_event(struct snd_soc_dapm_widget *w, int event) struct snd_kcontrol *kcontrol, int event)
{ {
gpio_set_value(CORGI_GPIO_APM_ON, SND_SOC_DAPM_EVENT_ON(event)); if (SND_SOC_DAPM_EVENT_ON(event))
return 0; gpiod_set_value_cansleep(gpio_pa, true);
else
gpiod_set_value_cansleep(gpio_pa, false);
return 0;
} }
/* corgi machine dapm widgets */ static const struct snd_soc_dapm_widget st_widgets[] = {
static const struct snd_soc_dapm_widget wm8731_dapm_widgets = ...
SND_SOC_DAPM_SPK("Ext Spk", corgi_amp_event); SND_SOC_DAPM_SUPPLY("Speaker Power", SND_SOC_NOPM, 0, 0,
sof_es8316_speaker_power_event,
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU),
};
Please see soc-dapm.h for all other widgets that support events. See soc-dapm.h for all other widgets that support events.
Event types Event types
----------- -----------
The following event types are supported by event widgets. The following event types are supported by event widgets::
::
/* dapm event types */ /* dapm event types */
#define SND_SOC_DAPM_PRE_PMU 0x1 /* before widget power up */ #define SND_SOC_DAPM_PRE_PMU 0x1 /* before widget power up */
#define SND_SOC_DAPM_POST_PMU 0x2 /* after widget power up */ #define SND_SOC_DAPM_POST_PMU 0x2 /* after widget power up */
#define SND_SOC_DAPM_PRE_PMD 0x4 /* before widget power down */ #define SND_SOC_DAPM_PRE_PMD 0x4 /* before widget power down */
#define SND_SOC_DAPM_POST_PMD 0x8 /* after widget power down */ #define SND_SOC_DAPM_POST_PMD 0x8 /* after widget power down */
#define SND_SOC_DAPM_PRE_REG 0x10 /* before audio path setup */ #define SND_SOC_DAPM_PRE_REG 0x10 /* before audio path setup */
#define SND_SOC_DAPM_POST_REG 0x20 /* after audio path setup */ #define SND_SOC_DAPM_POST_REG 0x20 /* after audio path setup */
#define SND_SOC_DAPM_WILL_PMU 0x40 /* called at start of sequence */
#define SND_SOC_DAPM_WILL_PMD 0x80 /* called at start of sequence */
#define SND_SOC_DAPM_PRE_POST_PMD (SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD)
#define SND_SOC_DAPM_PRE_POST_PMU (SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU)

View File

@ -2191,7 +2191,6 @@ N: mxs
ARM/FREESCALE LAYERSCAPE ARM ARCHITECTURE ARM/FREESCALE LAYERSCAPE ARM ARCHITECTURE
M: Shawn Guo <shawnguo@kernel.org> M: Shawn Guo <shawnguo@kernel.org>
M: Li Yang <leoyang.li@nxp.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
@ -2708,7 +2707,7 @@ F: sound/soc/rockchip/
N: rockchip N: rockchip
ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
R: Alim Akhtar <alim.akhtar@samsung.com> R: Alim Akhtar <alim.akhtar@samsung.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: linux-samsung-soc@vger.kernel.org L: linux-samsung-soc@vger.kernel.org
@ -3573,6 +3572,7 @@ S: Supported
C: irc://irc.oftc.net/bcache C: irc://irc.oftc.net/bcache
T: git https://evilpiepirate.org/git/bcachefs.git T: git https://evilpiepirate.org/git/bcachefs.git
F: fs/bcachefs/ F: fs/bcachefs/
F: Documentation/filesystems/bcachefs/
BDISP ST MEDIA DRIVER BDISP ST MEDIA DRIVER
M: Fabien Dessenne <fabien.dessenne@foss.st.com> M: Fabien Dessenne <fabien.dessenne@foss.st.com>
@ -4869,7 +4869,6 @@ F: drivers/power/supply/cw2015_battery.c
CEPH COMMON CODE (LIBCEPH) CEPH COMMON CODE (LIBCEPH)
M: Ilya Dryomov <idryomov@gmail.com> M: Ilya Dryomov <idryomov@gmail.com>
M: Xiubo Li <xiubli@redhat.com> M: Xiubo Li <xiubli@redhat.com>
R: Jeff Layton <jlayton@kernel.org>
L: ceph-devel@vger.kernel.org L: ceph-devel@vger.kernel.org
S: Supported S: Supported
W: http://ceph.com/ W: http://ceph.com/
@ -4881,7 +4880,6 @@ F: net/ceph/
CEPH DISTRIBUTED FILE SYSTEM CLIENT (CEPH) CEPH DISTRIBUTED FILE SYSTEM CLIENT (CEPH)
M: Xiubo Li <xiubli@redhat.com> M: Xiubo Li <xiubli@redhat.com>
M: Ilya Dryomov <idryomov@gmail.com> M: Ilya Dryomov <idryomov@gmail.com>
R: Jeff Layton <jlayton@kernel.org>
L: ceph-devel@vger.kernel.org L: ceph-devel@vger.kernel.org
S: Supported S: Supported
W: http://ceph.com/ W: http://ceph.com/
@ -5557,7 +5555,7 @@ F: drivers/cpuidle/cpuidle-big_little.c
CPUIDLE DRIVER - ARM EXYNOS CPUIDLE DRIVER - ARM EXYNOS
M: Daniel Lezcano <daniel.lezcano@linaro.org> M: Daniel Lezcano <daniel.lezcano@linaro.org>
M: Kukjin Kim <kgene@kernel.org> M: Kukjin Kim <kgene@kernel.org>
R: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> R: Krzysztof Kozlowski <krzk@kernel.org>
L: linux-pm@vger.kernel.org L: linux-pm@vger.kernel.org
L: linux-samsung-soc@vger.kernel.org L: linux-samsung-soc@vger.kernel.org
S: Maintained S: Maintained
@ -7831,9 +7829,8 @@ W: http://aeschi.ch.eu.org/efs/
F: fs/efs/ F: fs/efs/
EHEA (IBM pSeries eHEA 10Gb ethernet adapter) DRIVER EHEA (IBM pSeries eHEA 10Gb ethernet adapter) DRIVER
M: Douglas Miller <dougmill@linux.ibm.com>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Orphan
F: drivers/net/ethernet/ibm/ehea/ F: drivers/net/ethernet/ibm/ehea/
ELM327 CAN NETWORK DRIVER ELM327 CAN NETWORK DRIVER
@ -8523,7 +8520,6 @@ S: Maintained
F: drivers/video/fbdev/fsl-diu-fb.* F: drivers/video/fbdev/fsl-diu-fb.*
FREESCALE DMA DRIVER FREESCALE DMA DRIVER
M: Li Yang <leoyang.li@nxp.com>
M: Zhang Wei <zw@zh-kernel.org> M: Zhang Wei <zw@zh-kernel.org>
L: linuxppc-dev@lists.ozlabs.org L: linuxppc-dev@lists.ozlabs.org
S: Maintained S: Maintained
@ -8688,10 +8684,9 @@ F: drivers/soc/fsl/qe/tsa.h
F: include/dt-bindings/soc/cpm1-fsl,tsa.h F: include/dt-bindings/soc/cpm1-fsl,tsa.h
FREESCALE QUICC ENGINE UCC ETHERNET DRIVER FREESCALE QUICC ENGINE UCC ETHERNET DRIVER
M: Li Yang <leoyang.li@nxp.com>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
L: linuxppc-dev@lists.ozlabs.org L: linuxppc-dev@lists.ozlabs.org
S: Maintained S: Orphan
F: drivers/net/ethernet/freescale/ucc_geth* F: drivers/net/ethernet/freescale/ucc_geth*
FREESCALE QUICC ENGINE UCC HDLC DRIVER FREESCALE QUICC ENGINE UCC HDLC DRIVER
@ -8708,10 +8703,9 @@ S: Maintained
F: drivers/tty/serial/ucc_uart.c F: drivers/tty/serial/ucc_uart.c
FREESCALE SOC DRIVERS FREESCALE SOC DRIVERS
M: Li Yang <leoyang.li@nxp.com>
L: linuxppc-dev@lists.ozlabs.org L: linuxppc-dev@lists.ozlabs.org
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Orphan
F: Documentation/devicetree/bindings/misc/fsl,dpaa2-console.yaml F: Documentation/devicetree/bindings/misc/fsl,dpaa2-console.yaml
F: Documentation/devicetree/bindings/soc/fsl/ F: Documentation/devicetree/bindings/soc/fsl/
F: drivers/soc/fsl/ F: drivers/soc/fsl/
@ -8745,17 +8739,15 @@ F: Documentation/devicetree/bindings/sound/fsl,qmc-audio.yaml
F: sound/soc/fsl/fsl_qmc_audio.c F: sound/soc/fsl/fsl_qmc_audio.c
FREESCALE USB PERIPHERAL DRIVERS FREESCALE USB PERIPHERAL DRIVERS
M: Li Yang <leoyang.li@nxp.com>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
L: linuxppc-dev@lists.ozlabs.org L: linuxppc-dev@lists.ozlabs.org
S: Maintained S: Orphan
F: drivers/usb/gadget/udc/fsl* F: drivers/usb/gadget/udc/fsl*
FREESCALE USB PHY DRIVER FREESCALE USB PHY DRIVER
M: Ran Wang <ran.wang_1@nxp.com>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
L: linuxppc-dev@lists.ozlabs.org L: linuxppc-dev@lists.ozlabs.org
S: Maintained S: Orphan
F: drivers/usb/phy/phy-fsl-usb* F: drivers/usb/phy/phy-fsl-usb*
FREEVXFS FILESYSTEM FREEVXFS FILESYSTEM
@ -9000,7 +8992,7 @@ F: drivers/i2c/muxes/i2c-mux-gpio.c
F: include/linux/platform_data/i2c-mux-gpio.h F: include/linux/platform_data/i2c-mux-gpio.h
GENERIC GPIO RESET DRIVER GENERIC GPIO RESET DRIVER
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
S: Maintained S: Maintained
F: drivers/reset/reset-gpio.c F: drivers/reset/reset-gpio.c
@ -9583,7 +9575,7 @@ F: kernel/power/
HID CORE LAYER HID CORE LAYER
M: Jiri Kosina <jikos@kernel.org> M: Jiri Kosina <jikos@kernel.org>
M: Benjamin Tissoires <benjamin.tissoires@redhat.com> M: Benjamin Tissoires <bentiss@kernel.org>
L: linux-input@vger.kernel.org L: linux-input@vger.kernel.org
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
@ -10030,7 +10022,7 @@ F: drivers/media/platform/st/sti/hva
HWPOISON MEMORY FAILURE HANDLING HWPOISON MEMORY FAILURE HANDLING
M: Miaohe Lin <linmiaohe@huawei.com> M: Miaohe Lin <linmiaohe@huawei.com>
R: Naoya Horiguchi <naoya.horiguchi@nec.com> R: Naoya Horiguchi <nao.horiguchi@gmail.com>
L: linux-mm@kvack.org L: linux-mm@kvack.org
S: Maintained S: Maintained
F: mm/hwpoison-inject.c F: mm/hwpoison-inject.c
@ -12001,7 +11993,7 @@ F: include/keys/encrypted-type.h
F: security/keys/encrypted-keys/ F: security/keys/encrypted-keys/
KEYS-TRUSTED KEYS-TRUSTED
M: James Bottomley <jejb@linux.ibm.com> M: James Bottomley <James.Bottomley@HansenPartnership.com>
M: Jarkko Sakkinen <jarkko@kernel.org> M: Jarkko Sakkinen <jarkko@kernel.org>
M: Mimi Zohar <zohar@linux.ibm.com> M: Mimi Zohar <zohar@linux.ibm.com>
L: linux-integrity@vger.kernel.org L: linux-integrity@vger.kernel.org
@ -13295,7 +13287,7 @@ F: drivers/iio/adc/max11205.c
MAXIM MAX17040 FAMILY FUEL GAUGE DRIVERS MAXIM MAX17040 FAMILY FUEL GAUGE DRIVERS
R: Iskren Chernev <iskren.chernev@gmail.com> R: Iskren Chernev <iskren.chernev@gmail.com>
R: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> R: Krzysztof Kozlowski <krzk@kernel.org>
R: Marek Szyprowski <m.szyprowski@samsung.com> R: Marek Szyprowski <m.szyprowski@samsung.com>
R: Matheus Castello <matheus@castello.eng.br> R: Matheus Castello <matheus@castello.eng.br>
L: linux-pm@vger.kernel.org L: linux-pm@vger.kernel.org
@ -13305,7 +13297,7 @@ F: drivers/power/supply/max17040_battery.c
MAXIM MAX17042 FAMILY FUEL GAUGE DRIVERS MAXIM MAX17042 FAMILY FUEL GAUGE DRIVERS
R: Hans de Goede <hdegoede@redhat.com> R: Hans de Goede <hdegoede@redhat.com>
R: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> R: Krzysztof Kozlowski <krzk@kernel.org>
R: Marek Szyprowski <m.szyprowski@samsung.com> R: Marek Szyprowski <m.szyprowski@samsung.com>
R: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> R: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
R: Purism Kernel Team <kernel@puri.sm> R: Purism Kernel Team <kernel@puri.sm>
@ -13363,7 +13355,7 @@ F: Documentation/devicetree/bindings/power/supply/maxim,max77976.yaml
F: drivers/power/supply/max77976_charger.c F: drivers/power/supply/max77976_charger.c
MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
L: linux-pm@vger.kernel.org L: linux-pm@vger.kernel.org
S: Maintained S: Maintained
B: mailto:linux-samsung-soc@vger.kernel.org B: mailto:linux-samsung-soc@vger.kernel.org
@ -13374,7 +13366,7 @@ F: drivers/power/supply/max77693_charger.c
MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BOARDS MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BOARDS
M: Chanwoo Choi <cw00.choi@samsung.com> M: Chanwoo Choi <cw00.choi@samsung.com>
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
B: mailto:linux-samsung-soc@vger.kernel.org B: mailto:linux-samsung-soc@vger.kernel.org
@ -14158,7 +14150,7 @@ F: mm/mm_init.c
F: tools/testing/memblock/ F: tools/testing/memblock/
MEMORY CONTROLLER DRIVERS MEMORY CONTROLLER DRIVERS
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
B: mailto:krzysztof.kozlowski@linaro.org B: mailto:krzysztof.kozlowski@linaro.org
@ -14363,7 +14355,7 @@ F: drivers/dma/at_xdmac.c
F: include/dt-bindings/dma/at91.h F: include/dt-bindings/dma/at91.h
MICROCHIP AT91 SERIAL DRIVER MICROCHIP AT91 SERIAL DRIVER
M: Richard Genoud <richard.genoud@gmail.com> M: Richard Genoud <richard.genoud@bootlin.com>
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml F: Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml
F: drivers/tty/serial/atmel_serial.c F: drivers/tty/serial/atmel_serial.c
@ -15539,7 +15531,7 @@ F: include/uapi/linux/nexthop.h
F: net/ipv4/nexthop.c F: net/ipv4/nexthop.c
NFC SUBSYSTEM NFC SUBSYSTEM
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/net/nfc/ F: Documentation/devicetree/bindings/net/nfc/
@ -15916,7 +15908,7 @@ F: Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml
F: drivers/regulator/pf8x00-regulator.c F: drivers/regulator/pf8x00-regulator.c
NXP PTN5150A CC LOGIC AND EXTCON DRIVER NXP PTN5150A CC LOGIC AND EXTCON DRIVER
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml F: Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml
@ -16527,7 +16519,7 @@ K: of_overlay_remove
OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
M: Rob Herring <robh@kernel.org> M: Rob Herring <robh@kernel.org>
M: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> M: Krzysztof Kozlowski <krzk+dt@kernel.org>
M: Conor Dooley <conor+dt@kernel.org> M: Conor Dooley <conor+dt@kernel.org>
L: devicetree@vger.kernel.org L: devicetree@vger.kernel.org
S: Maintained S: Maintained
@ -16974,7 +16966,6 @@ F: drivers/pci/controller/dwc/pci-exynos.c
PCI DRIVER FOR SYNOPSYS DESIGNWARE PCI DRIVER FOR SYNOPSYS DESIGNWARE
M: Jingoo Han <jingoohan1@gmail.com> M: Jingoo Han <jingoohan1@gmail.com>
M: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
L: linux-pci@vger.kernel.org L: linux-pci@vger.kernel.org
S: Maintained S: Maintained
@ -17485,7 +17476,7 @@ F: Documentation/devicetree/bindings/pinctrl/renesas,*
F: drivers/pinctrl/renesas/ F: drivers/pinctrl/renesas/
PIN CONTROLLER - SAMSUNG PIN CONTROLLER - SAMSUNG
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
M: Sylwester Nawrocki <s.nawrocki@samsung.com> M: Sylwester Nawrocki <s.nawrocki@samsung.com>
R: Alim Akhtar <alim.akhtar@samsung.com> R: Alim Akhtar <alim.akhtar@samsung.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@ -19083,6 +19074,13 @@ S: Maintained
F: Documentation/devicetree/bindings/media/rockchip-rga.yaml F: Documentation/devicetree/bindings/media/rockchip-rga.yaml
F: drivers/media/platform/rockchip/rga/ F: drivers/media/platform/rockchip/rga/
ROCKCHIP RK3308 INTERNAL AUDIO CODEC
M: Luca Ceresoli <luca.ceresoli@bootlin.com>
S: Maintained
F: Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml
F: sound/soc/codecs/rk3308_codec.c
F: sound/soc/codecs/rk3308_codec.h
ROCKCHIP VIDEO DECODER DRIVER ROCKCHIP VIDEO DECODER DRIVER
M: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> M: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
L: linux-media@vger.kernel.org L: linux-media@vger.kernel.org
@ -19453,7 +19451,7 @@ F: Documentation/devicetree/bindings/sound/samsung*
F: sound/soc/samsung/ F: sound/soc/samsung/
SAMSUNG EXYNOS PSEUDO RANDOM NUMBER GENERATOR (RNG) DRIVER SAMSUNG EXYNOS PSEUDO RANDOM NUMBER GENERATOR (RNG) DRIVER
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
L: linux-crypto@vger.kernel.org L: linux-crypto@vger.kernel.org
L: linux-samsung-soc@vger.kernel.org L: linux-samsung-soc@vger.kernel.org
S: Maintained S: Maintained
@ -19488,7 +19486,7 @@ S: Maintained
F: drivers/platform/x86/samsung-laptop.c F: drivers/platform/x86/samsung-laptop.c
SAMSUNG MULTIFUNCTION PMIC DEVICE DRIVERS SAMSUNG MULTIFUNCTION PMIC DEVICE DRIVERS
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
L: linux-samsung-soc@vger.kernel.org L: linux-samsung-soc@vger.kernel.org
S: Maintained S: Maintained
@ -19514,7 +19512,7 @@ F: drivers/media/platform/samsung/s3c-camif/
F: include/media/drv-intf/s3c_camif.h F: include/media/drv-intf/s3c_camif.h
SAMSUNG S3FWRN5 NFC DRIVER SAMSUNG S3FWRN5 NFC DRIVER
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml F: Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
F: drivers/nfc/s3fwrn5 F: drivers/nfc/s3fwrn5
@ -19535,7 +19533,7 @@ S: Supported
F: drivers/media/i2c/s5k5baf.c F: drivers/media/i2c/s5k5baf.c
SAMSUNG S5P Security SubSystem (SSS) DRIVER SAMSUNG S5P Security SubSystem (SSS) DRIVER
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
M: Vladimir Zapolskiy <vz@mleia.com> M: Vladimir Zapolskiy <vz@mleia.com>
L: linux-crypto@vger.kernel.org L: linux-crypto@vger.kernel.org
L: linux-samsung-soc@vger.kernel.org L: linux-samsung-soc@vger.kernel.org
@ -19557,7 +19555,7 @@ F: Documentation/devicetree/bindings/media/samsung,fimc.yaml
F: drivers/media/platform/samsung/exynos4-is/ F: drivers/media/platform/samsung/exynos4-is/
SAMSUNG SOC CLOCK DRIVERS SAMSUNG SOC CLOCK DRIVERS
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
M: Sylwester Nawrocki <s.nawrocki@samsung.com> M: Sylwester Nawrocki <s.nawrocki@samsung.com>
M: Chanwoo Choi <cw00.choi@samsung.com> M: Chanwoo Choi <cw00.choi@samsung.com>
R: Alim Akhtar <alim.akhtar@samsung.com> R: Alim Akhtar <alim.akhtar@samsung.com>
@ -19589,7 +19587,7 @@ F: drivers/net/ethernet/samsung/sxgbe/
SAMSUNG THERMAL DRIVER SAMSUNG THERMAL DRIVER
M: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> M: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
L: linux-pm@vger.kernel.org L: linux-pm@vger.kernel.org
L: linux-samsung-soc@vger.kernel.org L: linux-samsung-soc@vger.kernel.org
S: Maintained S: Maintained
@ -19676,7 +19674,7 @@ F: drivers/scsi/sg.c
F: include/scsi/sg.h F: include/scsi/sg.h
SCSI SUBSYSTEM SCSI SUBSYSTEM
M: "James E.J. Bottomley" <jejb@linux.ibm.com> M: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
M: "Martin K. Petersen" <martin.petersen@oracle.com> M: "Martin K. Petersen" <martin.petersen@oracle.com>
L: linux-scsi@vger.kernel.org L: linux-scsi@vger.kernel.org
S: Maintained S: Maintained
@ -20664,6 +20662,12 @@ F: include/trace/events/sof*.h
F: include/uapi/sound/asoc.h F: include/uapi/sound/asoc.h
F: sound/soc/ F: sound/soc/
SOUND - SOC LAYER / dapm-graph
M: Luca Ceresoli <luca.ceresoli@bootlin.com>
L: linux-sound@vger.kernel.org
S: Maintained
F: tools/sound/dapm-graph
SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
M: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> M: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
M: Liam Girdwood <lgirdwood@gmail.com> M: Liam Girdwood <lgirdwood@gmail.com>
@ -22577,6 +22581,7 @@ Q: https://patchwork.kernel.org/project/linux-pm/list/
B: https://bugzilla.kernel.org B: https://bugzilla.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git turbostat T: git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git turbostat
F: tools/power/x86/turbostat/ F: tools/power/x86/turbostat/
F: tools/testing/selftests/turbostat/
TW5864 VIDEO4LINUX DRIVER TW5864 VIDEO4LINUX DRIVER
M: Bluecherry Maintainers <maintainers@bluecherrydvr.com> M: Bluecherry Maintainers <maintainers@bluecherrydvr.com>
@ -22846,7 +22851,7 @@ F: drivers/usb/host/ehci*
USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...) USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...)
M: Jiri Kosina <jikos@kernel.org> M: Jiri Kosina <jikos@kernel.org>
M: Benjamin Tissoires <benjamin.tissoires@redhat.com> M: Benjamin Tissoires <bentiss@kernel.org>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
@ -23785,7 +23790,7 @@ S: Orphan
F: drivers/mmc/host/vub300.c F: drivers/mmc/host/vub300.c
W1 DALLAS'S 1-WIRE BUS W1 DALLAS'S 1-WIRE BUS
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> M: Krzysztof Kozlowski <krzk@kernel.org>
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/w1/ F: Documentation/devicetree/bindings/w1/
F: Documentation/w1/ F: Documentation/w1/

View File

@ -2,7 +2,7 @@
VERSION = 6 VERSION = 6
PATCHLEVEL = 9 PATCHLEVEL = 9
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc3 EXTRAVERSION = -rc5
NAME = Hurr durr I'ma ninja sloth NAME = Hurr durr I'ma ninja sloth
# *DOCUMENTATION* # *DOCUMENTATION*

View File

@ -1172,12 +1172,12 @@ config PAGE_SIZE_LESS_THAN_256KB
config PAGE_SHIFT config PAGE_SHIFT
int int
default 12 if PAGE_SIZE_4KB default 12 if PAGE_SIZE_4KB
default 13 if PAGE_SIZE_8KB default 13 if PAGE_SIZE_8KB
default 14 if PAGE_SIZE_16KB default 14 if PAGE_SIZE_16KB
default 15 if PAGE_SIZE_32KB default 15 if PAGE_SIZE_32KB
default 16 if PAGE_SIZE_64KB default 16 if PAGE_SIZE_64KB
default 18 if PAGE_SIZE_256KB default 18 if PAGE_SIZE_256KB
# This allows to use a set of generic functions to determine mmap base # This allows to use a set of generic functions to determine mmap base
# address by giving priority to top-down scheme only if the process # address by giving priority to top-down scheme only if the process

View File

@ -666,7 +666,7 @@
bus-width = <4>; bus-width = <4>;
no-1-8-v; no-1-8-v;
no-sdio; no-sdio;
no-emmc; no-mmc;
status = "okay"; status = "okay";
}; };

View File

@ -210,6 +210,7 @@
remote-endpoint = <&mipi_from_sensor>; remote-endpoint = <&mipi_from_sensor>;
clock-lanes = <0>; clock-lanes = <0>;
data-lanes = <1>; data-lanes = <1>;
link-frequencies = /bits/ 64 <330000000>;
}; };
}; };
}; };

View File

@ -79,10 +79,8 @@ static struct musb_hdrc_platform_data tusb_data = {
static struct gpiod_lookup_table tusb_gpio_table = { static struct gpiod_lookup_table tusb_gpio_table = {
.dev_id = "musb-tusb", .dev_id = "musb-tusb",
.table = { .table = {
GPIO_LOOKUP("gpio-0-15", 0, "enable", GPIO_LOOKUP("gpio-0-31", 0, "enable", GPIO_ACTIVE_HIGH),
GPIO_ACTIVE_HIGH), GPIO_LOOKUP("gpio-32-63", 26, "int", GPIO_ACTIVE_HIGH),
GPIO_LOOKUP("gpio-48-63", 10, "int",
GPIO_ACTIVE_HIGH),
{ } { }
}, },
}; };
@ -140,12 +138,11 @@ static int slot1_cover_open;
static int slot2_cover_open; static int slot2_cover_open;
static struct device *mmc_device; static struct device *mmc_device;
static struct gpiod_lookup_table nokia8xx_mmc_gpio_table = { static struct gpiod_lookup_table nokia800_mmc_gpio_table = {
.dev_id = "mmci-omap.0", .dev_id = "mmci-omap.0",
.table = { .table = {
/* Slot switch, GPIO 96 */ /* Slot switch, GPIO 96 */
GPIO_LOOKUP("gpio-80-111", 16, GPIO_LOOKUP("gpio-96-127", 0, "switch", GPIO_ACTIVE_HIGH),
"switch", GPIO_ACTIVE_HIGH),
{ } { }
}, },
}; };
@ -153,12 +150,12 @@ static struct gpiod_lookup_table nokia8xx_mmc_gpio_table = {
static struct gpiod_lookup_table nokia810_mmc_gpio_table = { static struct gpiod_lookup_table nokia810_mmc_gpio_table = {
.dev_id = "mmci-omap.0", .dev_id = "mmci-omap.0",
.table = { .table = {
/* Slot switch, GPIO 96 */
GPIO_LOOKUP("gpio-96-127", 0, "switch", GPIO_ACTIVE_HIGH),
/* Slot index 1, VSD power, GPIO 23 */ /* Slot index 1, VSD power, GPIO 23 */
GPIO_LOOKUP_IDX("gpio-16-31", 7, GPIO_LOOKUP_IDX("gpio-0-31", 23, "vsd", 1, GPIO_ACTIVE_HIGH),
"vsd", 1, GPIO_ACTIVE_HIGH),
/* Slot index 1, VIO power, GPIO 9 */ /* Slot index 1, VIO power, GPIO 9 */
GPIO_LOOKUP_IDX("gpio-0-15", 9, GPIO_LOOKUP_IDX("gpio-0-31", 9, "vio", 1, GPIO_ACTIVE_HIGH),
"vio", 1, GPIO_ACTIVE_HIGH),
{ } { }
}, },
}; };
@ -415,8 +412,6 @@ static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC];
static void __init n8x0_mmc_init(void) static void __init n8x0_mmc_init(void)
{ {
gpiod_add_lookup_table(&nokia8xx_mmc_gpio_table);
if (board_is_n810()) { if (board_is_n810()) {
mmc1_data.slots[0].name = "external"; mmc1_data.slots[0].name = "external";
@ -429,6 +424,8 @@ static void __init n8x0_mmc_init(void)
mmc1_data.slots[1].name = "internal"; mmc1_data.slots[1].name = "internal";
mmc1_data.slots[1].ban_openended = 1; mmc1_data.slots[1].ban_openended = 1;
gpiod_add_lookup_table(&nokia810_mmc_gpio_table); gpiod_add_lookup_table(&nokia810_mmc_gpio_table);
} else {
gpiod_add_lookup_table(&nokia800_mmc_gpio_table);
} }
mmc1_data.nr_slots = 2; mmc1_data.nr_slots = 2;

View File

@ -41,7 +41,7 @@ conn_subsys: bus@5b000000 {
interrupts = <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>;
fsl,usbphy = <&usbphy1>; fsl,usbphy = <&usbphy1>;
fsl,usbmisc = <&usbmisc1 0>; fsl,usbmisc = <&usbmisc1 0>;
clocks = <&usb2_lpcg 0>; clocks = <&usb2_lpcg IMX_LPCG_CLK_6>;
ahb-burst-config = <0x0>; ahb-burst-config = <0x0>;
tx-burst-size-dword = <0x10>; tx-burst-size-dword = <0x10>;
rx-burst-size-dword = <0x10>; rx-burst-size-dword = <0x10>;
@ -58,7 +58,7 @@ conn_subsys: bus@5b000000 {
usbphy1: usbphy@5b100000 { usbphy1: usbphy@5b100000 {
compatible = "fsl,imx7ulp-usbphy"; compatible = "fsl,imx7ulp-usbphy";
reg = <0x5b100000 0x1000>; reg = <0x5b100000 0x1000>;
clocks = <&usb2_lpcg 1>; clocks = <&usb2_lpcg IMX_LPCG_CLK_7>;
power-domains = <&pd IMX_SC_R_USB_0_PHY>; power-domains = <&pd IMX_SC_R_USB_0_PHY>;
status = "disabled"; status = "disabled";
}; };
@ -67,8 +67,8 @@ conn_subsys: bus@5b000000 {
interrupts = <GIC_SPI 232 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 232 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x5b010000 0x10000>; reg = <0x5b010000 0x10000>;
clocks = <&sdhc0_lpcg IMX_LPCG_CLK_4>, clocks = <&sdhc0_lpcg IMX_LPCG_CLK_4>,
<&sdhc0_lpcg IMX_LPCG_CLK_0>, <&sdhc0_lpcg IMX_LPCG_CLK_5>,
<&sdhc0_lpcg IMX_LPCG_CLK_5>; <&sdhc0_lpcg IMX_LPCG_CLK_0>;
clock-names = "ipg", "ahb", "per"; clock-names = "ipg", "ahb", "per";
power-domains = <&pd IMX_SC_R_SDHC_0>; power-domains = <&pd IMX_SC_R_SDHC_0>;
status = "disabled"; status = "disabled";
@ -78,8 +78,8 @@ conn_subsys: bus@5b000000 {
interrupts = <GIC_SPI 233 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 233 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x5b020000 0x10000>; reg = <0x5b020000 0x10000>;
clocks = <&sdhc1_lpcg IMX_LPCG_CLK_4>, clocks = <&sdhc1_lpcg IMX_LPCG_CLK_4>,
<&sdhc1_lpcg IMX_LPCG_CLK_0>, <&sdhc1_lpcg IMX_LPCG_CLK_5>,
<&sdhc1_lpcg IMX_LPCG_CLK_5>; <&sdhc1_lpcg IMX_LPCG_CLK_0>;
clock-names = "ipg", "ahb", "per"; clock-names = "ipg", "ahb", "per";
power-domains = <&pd IMX_SC_R_SDHC_1>; power-domains = <&pd IMX_SC_R_SDHC_1>;
fsl,tuning-start-tap = <20>; fsl,tuning-start-tap = <20>;
@ -91,8 +91,8 @@ conn_subsys: bus@5b000000 {
interrupts = <GIC_SPI 234 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 234 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x5b030000 0x10000>; reg = <0x5b030000 0x10000>;
clocks = <&sdhc2_lpcg IMX_LPCG_CLK_4>, clocks = <&sdhc2_lpcg IMX_LPCG_CLK_4>,
<&sdhc2_lpcg IMX_LPCG_CLK_0>, <&sdhc2_lpcg IMX_LPCG_CLK_5>,
<&sdhc2_lpcg IMX_LPCG_CLK_5>; <&sdhc2_lpcg IMX_LPCG_CLK_0>;
clock-names = "ipg", "ahb", "per"; clock-names = "ipg", "ahb", "per";
power-domains = <&pd IMX_SC_R_SDHC_2>; power-domains = <&pd IMX_SC_R_SDHC_2>;
status = "disabled"; status = "disabled";

View File

@ -28,8 +28,8 @@ dma_subsys: bus@5a000000 {
#size-cells = <0>; #size-cells = <0>;
interrupts = <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
clocks = <&spi0_lpcg 0>, clocks = <&spi0_lpcg IMX_LPCG_CLK_0>,
<&spi0_lpcg 1>; <&spi0_lpcg IMX_LPCG_CLK_4>;
clock-names = "per", "ipg"; clock-names = "per", "ipg";
assigned-clocks = <&clk IMX_SC_R_SPI_0 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_SPI_0 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <60000000>; assigned-clock-rates = <60000000>;
@ -44,8 +44,8 @@ dma_subsys: bus@5a000000 {
#size-cells = <0>; #size-cells = <0>;
interrupts = <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
clocks = <&spi1_lpcg 0>, clocks = <&spi1_lpcg IMX_LPCG_CLK_0>,
<&spi1_lpcg 1>; <&spi1_lpcg IMX_LPCG_CLK_4>;
clock-names = "per", "ipg"; clock-names = "per", "ipg";
assigned-clocks = <&clk IMX_SC_R_SPI_1 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_SPI_1 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <60000000>; assigned-clock-rates = <60000000>;
@ -60,8 +60,8 @@ dma_subsys: bus@5a000000 {
#size-cells = <0>; #size-cells = <0>;
interrupts = <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
clocks = <&spi2_lpcg 0>, clocks = <&spi2_lpcg IMX_LPCG_CLK_0>,
<&spi2_lpcg 1>; <&spi2_lpcg IMX_LPCG_CLK_4>;
clock-names = "per", "ipg"; clock-names = "per", "ipg";
assigned-clocks = <&clk IMX_SC_R_SPI_2 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_SPI_2 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <60000000>; assigned-clock-rates = <60000000>;
@ -76,8 +76,8 @@ dma_subsys: bus@5a000000 {
#size-cells = <0>; #size-cells = <0>;
interrupts = <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
clocks = <&spi3_lpcg 0>, clocks = <&spi3_lpcg IMX_LPCG_CLK_0>,
<&spi3_lpcg 1>; <&spi3_lpcg IMX_LPCG_CLK_4>;
clock-names = "per", "ipg"; clock-names = "per", "ipg";
assigned-clocks = <&clk IMX_SC_R_SPI_3 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_SPI_3 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <60000000>; assigned-clock-rates = <60000000>;
@ -145,8 +145,8 @@ dma_subsys: bus@5a000000 {
compatible = "fsl,imx8qxp-pwm", "fsl,imx27-pwm"; compatible = "fsl,imx8qxp-pwm", "fsl,imx27-pwm";
reg = <0x5a190000 0x1000>; reg = <0x5a190000 0x1000>;
interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&adma_pwm_lpcg 1>, clocks = <&adma_pwm_lpcg IMX_LPCG_CLK_4>,
<&adma_pwm_lpcg 0>; <&adma_pwm_lpcg IMX_LPCG_CLK_0>;
clock-names = "ipg", "per"; clock-names = "ipg", "per";
assigned-clocks = <&clk IMX_SC_R_LCD_0_PWM_0 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_LCD_0_PWM_0 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>; assigned-clock-rates = <24000000>;
@ -355,8 +355,8 @@ dma_subsys: bus@5a000000 {
reg = <0x5a880000 0x10000>; reg = <0x5a880000 0x10000>;
interrupts = <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
clocks = <&adc0_lpcg 0>, clocks = <&adc0_lpcg IMX_LPCG_CLK_0>,
<&adc0_lpcg 1>; <&adc0_lpcg IMX_LPCG_CLK_4>;
clock-names = "per", "ipg"; clock-names = "per", "ipg";
assigned-clocks = <&clk IMX_SC_R_ADC_0 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_ADC_0 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>; assigned-clock-rates = <24000000>;
@ -370,8 +370,8 @@ dma_subsys: bus@5a000000 {
reg = <0x5a890000 0x10000>; reg = <0x5a890000 0x10000>;
interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
clocks = <&adc1_lpcg 0>, clocks = <&adc1_lpcg IMX_LPCG_CLK_0>,
<&adc1_lpcg 1>; <&adc1_lpcg IMX_LPCG_CLK_4>;
clock-names = "per", "ipg"; clock-names = "per", "ipg";
assigned-clocks = <&clk IMX_SC_R_ADC_1 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_ADC_1 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>; assigned-clock-rates = <24000000>;
@ -384,8 +384,8 @@ dma_subsys: bus@5a000000 {
reg = <0x5a8d0000 0x10000>; reg = <0x5a8d0000 0x10000>;
interrupts = <GIC_SPI 235 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 235 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
clocks = <&can0_lpcg 1>, clocks = <&can0_lpcg IMX_LPCG_CLK_4>,
<&can0_lpcg 0>; <&can0_lpcg IMX_LPCG_CLK_0>;
clock-names = "ipg", "per"; clock-names = "ipg", "per";
assigned-clocks = <&clk IMX_SC_R_CAN_0 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_CAN_0 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <40000000>; assigned-clock-rates = <40000000>;
@ -405,8 +405,8 @@ dma_subsys: bus@5a000000 {
* CAN1 shares CAN0's clock and to enable CAN0's clock it * CAN1 shares CAN0's clock and to enable CAN0's clock it
* has to be powered on. * has to be powered on.
*/ */
clocks = <&can0_lpcg 1>, clocks = <&can0_lpcg IMX_LPCG_CLK_4>,
<&can0_lpcg 0>; <&can0_lpcg IMX_LPCG_CLK_0>;
clock-names = "ipg", "per"; clock-names = "ipg", "per";
assigned-clocks = <&clk IMX_SC_R_CAN_0 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_CAN_0 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <40000000>; assigned-clock-rates = <40000000>;
@ -426,8 +426,8 @@ dma_subsys: bus@5a000000 {
* CAN2 shares CAN0's clock and to enable CAN0's clock it * CAN2 shares CAN0's clock and to enable CAN0's clock it
* has to be powered on. * has to be powered on.
*/ */
clocks = <&can0_lpcg 1>, clocks = <&can0_lpcg IMX_LPCG_CLK_4>,
<&can0_lpcg 0>; <&can0_lpcg IMX_LPCG_CLK_0>;
clock-names = "ipg", "per"; clock-names = "ipg", "per";
assigned-clocks = <&clk IMX_SC_R_CAN_0 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_CAN_0 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <40000000>; assigned-clock-rates = <40000000>;

View File

@ -25,8 +25,8 @@ lsio_subsys: bus@5d000000 {
compatible = "fsl,imx27-pwm"; compatible = "fsl,imx27-pwm";
reg = <0x5d000000 0x10000>; reg = <0x5d000000 0x10000>;
clock-names = "ipg", "per"; clock-names = "ipg", "per";
clocks = <&pwm0_lpcg 4>, clocks = <&pwm0_lpcg IMX_LPCG_CLK_6>,
<&pwm0_lpcg 1>; <&pwm0_lpcg IMX_LPCG_CLK_1>;
assigned-clocks = <&clk IMX_SC_R_PWM_0 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_PWM_0 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>; assigned-clock-rates = <24000000>;
#pwm-cells = <3>; #pwm-cells = <3>;
@ -38,8 +38,8 @@ lsio_subsys: bus@5d000000 {
compatible = "fsl,imx27-pwm"; compatible = "fsl,imx27-pwm";
reg = <0x5d010000 0x10000>; reg = <0x5d010000 0x10000>;
clock-names = "ipg", "per"; clock-names = "ipg", "per";
clocks = <&pwm1_lpcg 4>, clocks = <&pwm1_lpcg IMX_LPCG_CLK_6>,
<&pwm1_lpcg 1>; <&pwm1_lpcg IMX_LPCG_CLK_1>;
assigned-clocks = <&clk IMX_SC_R_PWM_1 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_PWM_1 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>; assigned-clock-rates = <24000000>;
#pwm-cells = <3>; #pwm-cells = <3>;
@ -51,8 +51,8 @@ lsio_subsys: bus@5d000000 {
compatible = "fsl,imx27-pwm"; compatible = "fsl,imx27-pwm";
reg = <0x5d020000 0x10000>; reg = <0x5d020000 0x10000>;
clock-names = "ipg", "per"; clock-names = "ipg", "per";
clocks = <&pwm2_lpcg 4>, clocks = <&pwm2_lpcg IMX_LPCG_CLK_6>,
<&pwm2_lpcg 1>; <&pwm2_lpcg IMX_LPCG_CLK_1>;
assigned-clocks = <&clk IMX_SC_R_PWM_2 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_PWM_2 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>; assigned-clock-rates = <24000000>;
#pwm-cells = <3>; #pwm-cells = <3>;
@ -64,8 +64,8 @@ lsio_subsys: bus@5d000000 {
compatible = "fsl,imx27-pwm"; compatible = "fsl,imx27-pwm";
reg = <0x5d030000 0x10000>; reg = <0x5d030000 0x10000>;
clock-names = "ipg", "per"; clock-names = "ipg", "per";
clocks = <&pwm3_lpcg 4>, clocks = <&pwm3_lpcg IMX_LPCG_CLK_6>,
<&pwm3_lpcg 1>; <&pwm3_lpcg IMX_LPCG_CLK_1>;
assigned-clocks = <&clk IMX_SC_R_PWM_3 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_PWM_3 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>; assigned-clock-rates = <24000000>;
#pwm-cells = <3>; #pwm-cells = <3>;

View File

@ -14,6 +14,7 @@
pinctrl-0 = <&pinctrl_usbcon1>; pinctrl-0 = <&pinctrl_usbcon1>;
type = "micro"; type = "micro";
label = "otg"; label = "otg";
vbus-supply = <&reg_usb1_vbus>;
id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
port { port {
@ -183,7 +184,6 @@
}; };
&usb3_phy0 { &usb3_phy0 {
vbus-supply = <&reg_usb1_vbus>;
status = "okay"; status = "okay";
}; };

View File

@ -14,6 +14,7 @@
pinctrl-0 = <&pinctrl_usbcon1>; pinctrl-0 = <&pinctrl_usbcon1>;
type = "micro"; type = "micro";
label = "otg"; label = "otg";
vbus-supply = <&reg_usb1_vbus>;
id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
port { port {
@ -202,7 +203,6 @@
}; };
&usb3_phy0 { &usb3_phy0 {
vbus-supply = <&reg_usb1_vbus>;
status = "okay"; status = "okay";
}; };

View File

@ -153,15 +153,15 @@
}; };
&flexcan2 { &flexcan2 {
clocks = <&can1_lpcg 1>, clocks = <&can1_lpcg IMX_LPCG_CLK_4>,
<&can1_lpcg 0>; <&can1_lpcg IMX_LPCG_CLK_0>;
assigned-clocks = <&clk IMX_SC_R_CAN_1 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_CAN_1 IMX_SC_PM_CLK_PER>;
fsl,clk-source = /bits/ 8 <1>; fsl,clk-source = /bits/ 8 <1>;
}; };
&flexcan3 { &flexcan3 {
clocks = <&can2_lpcg 1>, clocks = <&can2_lpcg IMX_LPCG_CLK_4>,
<&can2_lpcg 0>; <&can2_lpcg IMX_LPCG_CLK_0>;
assigned-clocks = <&clk IMX_SC_R_CAN_2 IMX_SC_PM_CLK_PER>; assigned-clocks = <&clk IMX_SC_R_CAN_2 IMX_SC_PM_CLK_PER>;
fsl,clk-source = /bits/ 8 <1>; fsl,clk-source = /bits/ 8 <1>;
}; };

View File

@ -161,12 +161,18 @@ static inline unsigned long get_trans_granule(void)
#define MAX_TLBI_RANGE_PAGES __TLBI_RANGE_PAGES(31, 3) #define MAX_TLBI_RANGE_PAGES __TLBI_RANGE_PAGES(31, 3)
/* /*
* Generate 'num' values from -1 to 30 with -1 rejected by the * Generate 'num' values from -1 to 31 with -1 rejected by the
* __flush_tlb_range() loop below. * __flush_tlb_range() loop below. Its return value is only
* significant for a maximum of MAX_TLBI_RANGE_PAGES pages. If
* 'pages' is more than that, you must iterate over the overall
* range.
*/ */
#define TLBI_RANGE_MASK GENMASK_ULL(4, 0) #define __TLBI_RANGE_NUM(pages, scale) \
#define __TLBI_RANGE_NUM(pages, scale) \ ({ \
((((pages) >> (5 * (scale) + 1)) & TLBI_RANGE_MASK) - 1) int __pages = min((pages), \
__TLBI_RANGE_PAGES(31, (scale))); \
(__pages >> (5 * (scale) + 1)) - 1; \
})
/* /*
* TLB Invalidation * TLB Invalidation
@ -379,10 +385,6 @@ static inline void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch)
* 3. If there is 1 page remaining, flush it through non-range operations. Range * 3. If there is 1 page remaining, flush it through non-range operations. Range
* operations can only span an even number of pages. We save this for last to * operations can only span an even number of pages. We save this for last to
* ensure 64KB start alignment is maintained for the LPA2 case. * ensure 64KB start alignment is maintained for the LPA2 case.
*
* Note that certain ranges can be represented by either num = 31 and
* scale or num = 0 and scale + 1. The loop below favours the latter
* since num is limited to 30 by the __TLBI_RANGE_NUM() macro.
*/ */
#define __flush_tlb_range_op(op, start, pages, stride, \ #define __flush_tlb_range_op(op, start, pages, stride, \
asid, tlb_level, tlbi_user, lpa2) \ asid, tlb_level, tlbi_user, lpa2) \

View File

@ -289,6 +289,11 @@ SYM_INNER_LABEL(init_el2, SYM_L_LOCAL)
adr_l x1, __hyp_text_end adr_l x1, __hyp_text_end
adr_l x2, dcache_clean_poc adr_l x2, dcache_clean_poc
blr x2 blr x2
mov_q x0, INIT_SCTLR_EL2_MMU_OFF
pre_disable_mmu_workaround
msr sctlr_el2, x0
isb
0: 0:
mov_q x0, HCR_HOST_NVHE_FLAGS mov_q x0, HCR_HOST_NVHE_FLAGS
@ -323,13 +328,11 @@ SYM_INNER_LABEL(init_el2, SYM_L_LOCAL)
cbz x0, 2f cbz x0, 2f
/* Set a sane SCTLR_EL1, the VHE way */ /* Set a sane SCTLR_EL1, the VHE way */
pre_disable_mmu_workaround
msr_s SYS_SCTLR_EL12, x1 msr_s SYS_SCTLR_EL12, x1
mov x2, #BOOT_CPU_FLAG_E2H mov x2, #BOOT_CPU_FLAG_E2H
b 3f b 3f
2: 2:
pre_disable_mmu_workaround
msr sctlr_el1, x1 msr sctlr_el1, x1
mov x2, xzr mov x2, xzr
3: 3:

View File

@ -276,7 +276,10 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
pte_t *ptep = NULL; pte_t *ptep = NULL;
pgdp = pgd_offset(mm, addr); pgdp = pgd_offset(mm, addr);
p4dp = p4d_offset(pgdp, addr); p4dp = p4d_alloc(mm, pgdp, addr);
if (!p4dp)
return NULL;
pudp = pud_alloc(mm, p4dp, addr); pudp = pud_alloc(mm, p4dp, addr);
if (!pudp) if (!pudp)
return NULL; return NULL;

View File

@ -219,9 +219,6 @@ bool kernel_page_present(struct page *page)
pte_t *ptep; pte_t *ptep;
unsigned long addr = (unsigned long)page_address(page); unsigned long addr = (unsigned long)page_address(page);
if (!can_set_direct_map())
return true;
pgdp = pgd_offset_k(addr); pgdp = pgd_offset_k(addr);
if (pgd_none(READ_ONCE(*pgdp))) if (pgd_none(READ_ONCE(*pgdp)))
return false; return false;

View File

@ -100,6 +100,13 @@
#size-cells = <2>; #size-cells = <2>;
dma-coherent; dma-coherent;
isa@18000000 {
compatible = "isa";
#size-cells = <1>;
#address-cells = <2>;
ranges = <1 0x0 0x0 0x18000000 0x4000>;
};
liointc0: interrupt-controller@1fe01400 { liointc0: interrupt-controller@1fe01400 {
compatible = "loongson,liointc-2.0"; compatible = "loongson,liointc-2.0";
reg = <0x0 0x1fe01400 0x0 0x40>, reg = <0x0 0x1fe01400 0x0 0x40>,

View File

@ -61,12 +61,45 @@
&gmac0 { &gmac0 {
status = "okay"; status = "okay";
phy-mode = "gmii";
phy-handle = <&phy0>;
mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;
phy0: ethernet-phy@0 {
reg = <2>;
};
};
}; };
&gmac1 { &gmac1 {
status = "okay"; status = "okay";
phy-mode = "gmii";
phy-handle = <&phy1>;
mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;
phy1: ethernet-phy@1 {
reg = <2>;
};
};
}; };
&gmac2 { &gmac2 {
status = "okay"; status = "okay";
phy-mode = "rgmii";
phy-handle = <&phy2>;
mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;
phy2: ethernet-phy@2 {
reg = <0>;
};
};
}; };

View File

@ -51,6 +51,13 @@
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
isa@18400000 {
compatible = "isa";
#size-cells = <1>;
#address-cells = <2>;
ranges = <1 0x0 0x0 0x18400000 0x4000>;
};
pmc: power-management@100d0000 { pmc: power-management@100d0000 {
compatible = "loongson,ls2k2000-pmc", "loongson,ls2k0500-pmc", "syscon"; compatible = "loongson,ls2k2000-pmc", "loongson,ls2k0500-pmc", "syscon";
reg = <0x0 0x100d0000 0x0 0x58>; reg = <0x0 0x100d0000 0x0 0x58>;
@ -109,6 +116,8 @@
msi: msi-controller@1fe01140 { msi: msi-controller@1fe01140 {
compatible = "loongson,pch-msi-1.0"; compatible = "loongson,pch-msi-1.0";
reg = <0x0 0x1fe01140 0x0 0x8>; reg = <0x0 0x1fe01140 0x0 0x8>;
interrupt-controller;
#interrupt-cells = <1>;
msi-controller; msi-controller;
loongson,msi-base-vec = <64>; loongson,msi-base-vec = <64>;
loongson,msi-num-vecs = <192>; loongson,msi-num-vecs = <192>;
@ -140,27 +149,34 @@
#address-cells = <3>; #address-cells = <3>;
#size-cells = <2>; #size-cells = <2>;
device_type = "pci"; device_type = "pci";
msi-parent = <&msi>;
bus-range = <0x0 0xff>; bus-range = <0x0 0xff>;
ranges = <0x01000000 0x0 0x00008000 0x0 0x18400000 0x0 0x00008000>, ranges = <0x01000000 0x0 0x00008000 0x0 0x18408000 0x0 0x00008000>,
<0x02000000 0x0 0x60000000 0x0 0x60000000 0x0 0x20000000>; <0x02000000 0x0 0x60000000 0x0 0x60000000 0x0 0x20000000>;
gmac0: ethernet@3,0 { gmac0: ethernet@3,0 {
reg = <0x1800 0x0 0x0 0x0 0x0>; reg = <0x1800 0x0 0x0 0x0 0x0>;
interrupts = <12 IRQ_TYPE_LEVEL_HIGH>; interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,
<13 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq", "eth_lpi";
interrupt-parent = <&pic>; interrupt-parent = <&pic>;
status = "disabled"; status = "disabled";
}; };
gmac1: ethernet@3,1 { gmac1: ethernet@3,1 {
reg = <0x1900 0x0 0x0 0x0 0x0>; reg = <0x1900 0x0 0x0 0x0 0x0>;
interrupts = <14 IRQ_TYPE_LEVEL_HIGH>; interrupts = <14 IRQ_TYPE_LEVEL_HIGH>,
<15 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq", "eth_lpi";
interrupt-parent = <&pic>; interrupt-parent = <&pic>;
status = "disabled"; status = "disabled";
}; };
gmac2: ethernet@3,2 { gmac2: ethernet@3,2 {
reg = <0x1a00 0x0 0x0 0x0 0x0>; reg = <0x1a00 0x0 0x0 0x0 0x0>;
interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; interrupts = <17 IRQ_TYPE_LEVEL_HIGH>,
<18 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq", "eth_lpi";
interrupt-parent = <&pic>; interrupt-parent = <&pic>;
status = "disabled"; status = "disabled";
}; };

View File

@ -11,6 +11,7 @@
#define _ASM_ADDRSPACE_H #define _ASM_ADDRSPACE_H
#include <linux/const.h> #include <linux/const.h>
#include <linux/sizes.h>
#include <asm/loongarch.h> #include <asm/loongarch.h>

View File

@ -14,11 +14,6 @@
#include <asm/pgtable-bits.h> #include <asm/pgtable-bits.h>
#include <asm/string.h> #include <asm/string.h>
/*
* Change "struct page" to physical address.
*/
#define page_to_phys(page) ((phys_addr_t)page_to_pfn(page) << PAGE_SHIFT)
extern void __init __iomem *early_ioremap(u64 phys_addr, unsigned long size); extern void __init __iomem *early_ioremap(u64 phys_addr, unsigned long size);
extern void __init early_iounmap(void __iomem *addr, unsigned long size); extern void __init early_iounmap(void __iomem *addr, unsigned long size);
@ -73,6 +68,21 @@ extern void __memcpy_fromio(void *to, const volatile void __iomem *from, size_t
#define __io_aw() mmiowb() #define __io_aw() mmiowb()
#ifdef CONFIG_KFENCE
#define virt_to_phys(kaddr) \
({ \
(likely((unsigned long)kaddr < vm_map_base)) ? __pa((unsigned long)kaddr) : \
page_to_phys(tlb_virt_to_page((unsigned long)kaddr)) + offset_in_page((unsigned long)kaddr);\
})
#define phys_to_virt(paddr) \
({ \
extern char *__kfence_pool; \
(unlikely(__kfence_pool == NULL)) ? __va((unsigned long)paddr) : \
page_address(phys_to_page((unsigned long)paddr)) + offset_in_page((unsigned long)paddr);\
})
#endif
#include <asm-generic/io.h> #include <asm-generic/io.h>
#define ARCH_HAS_VALID_PHYS_ADDR_RANGE #define ARCH_HAS_VALID_PHYS_ADDR_RANGE

View File

@ -16,6 +16,7 @@
static inline bool arch_kfence_init_pool(void) static inline bool arch_kfence_init_pool(void)
{ {
int err; int err;
char *kaddr, *vaddr;
char *kfence_pool = __kfence_pool; char *kfence_pool = __kfence_pool;
struct vm_struct *area; struct vm_struct *area;
@ -35,6 +36,14 @@ static inline bool arch_kfence_init_pool(void)
return false; return false;
} }
kaddr = kfence_pool;
vaddr = __kfence_pool;
while (kaddr < kfence_pool + KFENCE_POOL_SIZE) {
set_page_address(virt_to_page(kaddr), vaddr);
kaddr += PAGE_SIZE;
vaddr += PAGE_SIZE;
}
return true; return true;
} }

View File

@ -78,7 +78,26 @@ typedef struct { unsigned long pgprot; } pgprot_t;
struct page *dmw_virt_to_page(unsigned long kaddr); struct page *dmw_virt_to_page(unsigned long kaddr);
struct page *tlb_virt_to_page(unsigned long kaddr); struct page *tlb_virt_to_page(unsigned long kaddr);
#define virt_to_pfn(kaddr) PFN_DOWN(PHYSADDR(kaddr)) #define pfn_to_phys(pfn) __pfn_to_phys(pfn)
#define phys_to_pfn(paddr) __phys_to_pfn(paddr)
#define page_to_phys(page) pfn_to_phys(page_to_pfn(page))
#define phys_to_page(paddr) pfn_to_page(phys_to_pfn(paddr))
#ifndef CONFIG_KFENCE
#define page_to_virt(page) __va(page_to_phys(page))
#define virt_to_page(kaddr) phys_to_page(__pa(kaddr))
#else
#define WANT_PAGE_VIRTUAL
#define page_to_virt(page) \
({ \
extern char *__kfence_pool; \
(__kfence_pool == NULL) ? __va(page_to_phys(page)) : page_address(page); \
})
#define virt_to_page(kaddr) \ #define virt_to_page(kaddr) \
({ \ ({ \
@ -86,6 +105,11 @@ struct page *tlb_virt_to_page(unsigned long kaddr);
dmw_virt_to_page((unsigned long)kaddr) : tlb_virt_to_page((unsigned long)kaddr);\ dmw_virt_to_page((unsigned long)kaddr) : tlb_virt_to_page((unsigned long)kaddr);\
}) })
#endif
#define pfn_to_virt(pfn) page_to_virt(pfn_to_page(pfn))
#define virt_to_pfn(kaddr) page_to_pfn(virt_to_page(kaddr))
extern int __virt_addr_valid(volatile void *kaddr); extern int __virt_addr_valid(volatile void *kaddr);
#define virt_addr_valid(kaddr) __virt_addr_valid((volatile void *)(kaddr)) #define virt_addr_valid(kaddr) __virt_addr_valid((volatile void *)(kaddr))

View File

@ -4,6 +4,7 @@
*/ */
#include <linux/export.h> #include <linux/export.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/kfence.h>
#include <linux/memblock.h> #include <linux/memblock.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/mman.h> #include <linux/mman.h>
@ -111,6 +112,9 @@ int __virt_addr_valid(volatile void *kaddr)
{ {
unsigned long vaddr = (unsigned long)kaddr; unsigned long vaddr = (unsigned long)kaddr;
if (is_kfence_address((void *)kaddr))
return 1;
if ((vaddr < PAGE_OFFSET) || (vaddr >= vm_map_base)) if ((vaddr < PAGE_OFFSET) || (vaddr >= vm_map_base))
return 0; return 0;

View File

@ -11,13 +11,13 @@
struct page *dmw_virt_to_page(unsigned long kaddr) struct page *dmw_virt_to_page(unsigned long kaddr)
{ {
return pfn_to_page(virt_to_pfn(kaddr)); return phys_to_page(__pa(kaddr));
} }
EXPORT_SYMBOL(dmw_virt_to_page); EXPORT_SYMBOL(dmw_virt_to_page);
struct page *tlb_virt_to_page(unsigned long kaddr) struct page *tlb_virt_to_page(unsigned long kaddr)
{ {
return pfn_to_page(pte_pfn(*virt_to_kpte(kaddr))); return phys_to_page(pfn_to_phys(pte_pfn(*virt_to_kpte(kaddr))));
} }
EXPORT_SYMBOL(tlb_virt_to_page); EXPORT_SYMBOL(tlb_virt_to_page);

View File

@ -159,7 +159,7 @@ extern unsigned long exception_ip(struct pt_regs *regs);
#define exception_ip(regs) exception_ip(regs) #define exception_ip(regs) exception_ip(regs)
#define profile_pc(regs) instruction_pointer(regs) #define profile_pc(regs) instruction_pointer(regs)
extern asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall); extern asmlinkage long syscall_trace_enter(struct pt_regs *regs);
extern asmlinkage void syscall_trace_leave(struct pt_regs *regs); extern asmlinkage void syscall_trace_leave(struct pt_regs *regs);
extern void die(const char *, struct pt_regs *) __noreturn; extern void die(const char *, struct pt_regs *) __noreturn;

View File

@ -101,6 +101,7 @@ void output_thread_info_defines(void)
OFFSET(TI_CPU, thread_info, cpu); OFFSET(TI_CPU, thread_info, cpu);
OFFSET(TI_PRE_COUNT, thread_info, preempt_count); OFFSET(TI_PRE_COUNT, thread_info, preempt_count);
OFFSET(TI_REGS, thread_info, regs); OFFSET(TI_REGS, thread_info, regs);
OFFSET(TI_SYSCALL, thread_info, syscall);
DEFINE(_THREAD_SIZE, THREAD_SIZE); DEFINE(_THREAD_SIZE, THREAD_SIZE);
DEFINE(_THREAD_MASK, THREAD_MASK); DEFINE(_THREAD_MASK, THREAD_MASK);
DEFINE(_IRQ_STACK_SIZE, IRQ_STACK_SIZE); DEFINE(_IRQ_STACK_SIZE, IRQ_STACK_SIZE);

View File

@ -1317,16 +1317,13 @@ long arch_ptrace(struct task_struct *child, long request,
* Notification of system call entry/exit * Notification of system call entry/exit
* - triggered by current->work.syscall_trace * - triggered by current->work.syscall_trace
*/ */
asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall) asmlinkage long syscall_trace_enter(struct pt_regs *regs)
{ {
user_exit(); user_exit();
current_thread_info()->syscall = syscall;
if (test_thread_flag(TIF_SYSCALL_TRACE)) { if (test_thread_flag(TIF_SYSCALL_TRACE)) {
if (ptrace_report_syscall_entry(regs)) if (ptrace_report_syscall_entry(regs))
return -1; return -1;
syscall = current_thread_info()->syscall;
} }
#ifdef CONFIG_SECCOMP #ifdef CONFIG_SECCOMP
@ -1335,7 +1332,7 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)
struct seccomp_data sd; struct seccomp_data sd;
unsigned long args[6]; unsigned long args[6];
sd.nr = syscall; sd.nr = current_thread_info()->syscall;
sd.arch = syscall_get_arch(current); sd.arch = syscall_get_arch(current);
syscall_get_arguments(current, regs, args); syscall_get_arguments(current, regs, args);
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
@ -1345,23 +1342,23 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)
ret = __secure_computing(&sd); ret = __secure_computing(&sd);
if (ret == -1) if (ret == -1)
return ret; return ret;
syscall = current_thread_info()->syscall;
} }
#endif #endif
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
trace_sys_enter(regs, regs->regs[2]); trace_sys_enter(regs, regs->regs[2]);
audit_syscall_entry(syscall, regs->regs[4], regs->regs[5], audit_syscall_entry(current_thread_info()->syscall,
regs->regs[4], regs->regs[5],
regs->regs[6], regs->regs[7]); regs->regs[6], regs->regs[7]);
/* /*
* Negative syscall numbers are mistaken for rejected syscalls, but * Negative syscall numbers are mistaken for rejected syscalls, but
* won't have had the return value set appropriately, so we do so now. * won't have had the return value set appropriately, so we do so now.
*/ */
if (syscall < 0) if (current_thread_info()->syscall < 0)
syscall_set_return_value(current, regs, -ENOSYS, 0); syscall_set_return_value(current, regs, -ENOSYS, 0);
return syscall; return current_thread_info()->syscall;
} }
/* /*

View File

@ -77,6 +77,18 @@ loads_done:
PTR_WD load_a7, bad_stack_a7 PTR_WD load_a7, bad_stack_a7
.previous .previous
/*
* syscall number is in v0 unless we called syscall(__NR_###)
* where the real syscall number is in a0
*/
subu t2, v0, __NR_O32_Linux
bnez t2, 1f /* __NR_syscall at offset 0 */
LONG_S a0, TI_SYSCALL($28) # Save a0 as syscall number
b 2f
1:
LONG_S v0, TI_SYSCALL($28) # Save v0 as syscall number
2:
lw t0, TI_FLAGS($28) # syscall tracing enabled? lw t0, TI_FLAGS($28) # syscall tracing enabled?
li t1, _TIF_WORK_SYSCALL_ENTRY li t1, _TIF_WORK_SYSCALL_ENTRY
and t0, t1 and t0, t1
@ -114,16 +126,7 @@ syscall_trace_entry:
SAVE_STATIC SAVE_STATIC
move a0, sp move a0, sp
/* jal syscall_trace_enter
* syscall number is in v0 unless we called syscall(__NR_###)
* where the real syscall number is in a0
*/
move a1, v0
subu t2, v0, __NR_O32_Linux
bnez t2, 1f /* __NR_syscall at offset 0 */
lw a1, PT_R4(sp)
1: jal syscall_trace_enter
bltz v0, 1f # seccomp failed? Skip syscall bltz v0, 1f # seccomp failed? Skip syscall

View File

@ -44,6 +44,8 @@ NESTED(handle_sysn32, PT_SIZE, sp)
sd a3, PT_R26(sp) # save a3 for syscall restarting sd a3, PT_R26(sp) # save a3 for syscall restarting
LONG_S v0, TI_SYSCALL($28) # Store syscall number
li t1, _TIF_WORK_SYSCALL_ENTRY li t1, _TIF_WORK_SYSCALL_ENTRY
LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? LONG_L t0, TI_FLAGS($28) # syscall tracing enabled?
and t0, t1, t0 and t0, t1, t0
@ -72,7 +74,6 @@ syscall_common:
n32_syscall_trace_entry: n32_syscall_trace_entry:
SAVE_STATIC SAVE_STATIC
move a0, sp move a0, sp
move a1, v0
jal syscall_trace_enter jal syscall_trace_enter
bltz v0, 1f # seccomp failed? Skip syscall bltz v0, 1f # seccomp failed? Skip syscall

View File

@ -46,6 +46,8 @@ NESTED(handle_sys64, PT_SIZE, sp)
sd a3, PT_R26(sp) # save a3 for syscall restarting sd a3, PT_R26(sp) # save a3 for syscall restarting
LONG_S v0, TI_SYSCALL($28) # Store syscall number
li t1, _TIF_WORK_SYSCALL_ENTRY li t1, _TIF_WORK_SYSCALL_ENTRY
LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? LONG_L t0, TI_FLAGS($28) # syscall tracing enabled?
and t0, t1, t0 and t0, t1, t0
@ -82,7 +84,6 @@ n64_syscall_exit:
syscall_trace_entry: syscall_trace_entry:
SAVE_STATIC SAVE_STATIC
move a0, sp move a0, sp
move a1, v0
jal syscall_trace_enter jal syscall_trace_enter
bltz v0, 1f # seccomp failed? Skip syscall bltz v0, 1f # seccomp failed? Skip syscall

View File

@ -79,6 +79,22 @@ loads_done:
PTR_WD load_a7, bad_stack_a7 PTR_WD load_a7, bad_stack_a7
.previous .previous
/*
* absolute syscall number is in v0 unless we called syscall(__NR_###)
* where the real syscall number is in a0
* note: NR_syscall is the first O32 syscall but the macro is
* only defined when compiling with -mabi=32 (CONFIG_32BIT)
* therefore __NR_O32_Linux is used (4000)
*/
subu t2, v0, __NR_O32_Linux
bnez t2, 1f /* __NR_syscall at offset 0 */
LONG_S a0, TI_SYSCALL($28) # Save a0 as syscall number
b 2f
1:
LONG_S v0, TI_SYSCALL($28) # Save v0 as syscall number
2:
li t1, _TIF_WORK_SYSCALL_ENTRY li t1, _TIF_WORK_SYSCALL_ENTRY
LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? LONG_L t0, TI_FLAGS($28) # syscall tracing enabled?
and t0, t1, t0 and t0, t1, t0
@ -113,22 +129,7 @@ trace_a_syscall:
sd a7, PT_R11(sp) # For indirect syscalls sd a7, PT_R11(sp) # For indirect syscalls
move a0, sp move a0, sp
/* jal syscall_trace_enter
* absolute syscall number is in v0 unless we called syscall(__NR_###)
* where the real syscall number is in a0
* note: NR_syscall is the first O32 syscall but the macro is
* only defined when compiling with -mabi=32 (CONFIG_32BIT)
* therefore __NR_O32_Linux is used (4000)
*/
.set push
.set reorder
subu t1, v0, __NR_O32_Linux
move a1, v0
bnez t1, 1f /* __NR_syscall at offset 0 */
ld a1, PT_R4(sp) /* Arg1 for __NR_syscall case */
.set pop
1: jal syscall_trace_enter
bltz v0, 1f # seccomp failed? Skip syscall bltz v0, 1f # seccomp failed? Skip syscall

View File

@ -197,6 +197,9 @@ static struct skcipher_alg algs[] = {
static int __init chacha_p10_init(void) static int __init chacha_p10_init(void)
{ {
if (!cpu_has_feature(CPU_FTR_ARCH_31))
return 0;
static_branch_enable(&have_p10); static_branch_enable(&have_p10);
return crypto_register_skciphers(algs, ARRAY_SIZE(algs)); return crypto_register_skciphers(algs, ARRAY_SIZE(algs));
@ -204,10 +207,13 @@ static int __init chacha_p10_init(void)
static void __exit chacha_p10_exit(void) static void __exit chacha_p10_exit(void)
{ {
if (!static_branch_likely(&have_p10))
return;
crypto_unregister_skciphers(algs, ARRAY_SIZE(algs)); crypto_unregister_skciphers(algs, ARRAY_SIZE(algs));
} }
module_cpu_feature_match(PPC_MODULE_FEATURE_P10, chacha_p10_init); module_init(chacha_p10_init);
module_exit(chacha_p10_exit); module_exit(chacha_p10_exit);
MODULE_DESCRIPTION("ChaCha and XChaCha stream ciphers (P10 accelerated)"); MODULE_DESCRIPTION("ChaCha and XChaCha stream ciphers (P10 accelerated)");

View File

@ -1285,15 +1285,14 @@ spapr_tce_platform_iommu_attach_dev(struct iommu_domain *platform_domain,
struct device *dev) struct device *dev)
{ {
struct iommu_domain *domain = iommu_get_domain_for_dev(dev); struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
struct iommu_group *grp = iommu_group_get(dev);
struct iommu_table_group *table_group; struct iommu_table_group *table_group;
struct iommu_group *grp;
/* At first attach the ownership is already set */ /* At first attach the ownership is already set */
if (!domain) { if (!domain)
iommu_group_put(grp);
return 0; return 0;
}
grp = iommu_group_get(dev);
table_group = iommu_group_get_iommudata(grp); table_group = iommu_group_get_iommudata(grp);
/* /*
* The domain being set to PLATFORM from earlier * The domain being set to PLATFORM from earlier

View File

@ -340,7 +340,8 @@ SYM_CODE_START(pgm_check_handler)
mvc __PT_LAST_BREAK(8,%r11),__LC_PGM_LAST_BREAK mvc __PT_LAST_BREAK(8,%r11),__LC_PGM_LAST_BREAK
stctg %c1,%c1,__PT_CR1(%r11) stctg %c1,%c1,__PT_CR1(%r11)
#if IS_ENABLED(CONFIG_KVM) #if IS_ENABLED(CONFIG_KVM)
lg %r12,__LC_GMAP ltg %r12,__LC_GMAP
jz 5f
clc __GMAP_ASCE(8,%r12), __PT_CR1(%r11) clc __GMAP_ASCE(8,%r12), __PT_CR1(%r11)
jne 5f jne 5f
BPENTER __SF_SIE_FLAGS(%r10),_TIF_ISOLATE_BP_GUEST BPENTER __SF_SIE_FLAGS(%r10),_TIF_ISOLATE_BP_GUEST

View File

@ -2633,6 +2633,16 @@ config MITIGATION_RFDS
stored in floating point, vector and integer registers. stored in floating point, vector and integer registers.
See also <file:Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst> See also <file:Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst>
config MITIGATION_SPECTRE_BHI
bool "Mitigate Spectre-BHB (Branch History Injection)"
depends on CPU_SUP_INTEL
default y
help
Enable BHI mitigations. BHI attacks are a form of Spectre V2 attacks
where the branch history buffer is poisoned to speculatively steer
indirect branches.
See <file:Documentation/admin-guide/hw-vuln/spectre.rst>
endif endif
config ARCH_HAS_ADD_PAGES config ARCH_HAS_ADD_PAGES

View File

@ -49,7 +49,7 @@ static __always_inline bool do_syscall_x64(struct pt_regs *regs, int nr)
if (likely(unr < NR_syscalls)) { if (likely(unr < NR_syscalls)) {
unr = array_index_nospec(unr, NR_syscalls); unr = array_index_nospec(unr, NR_syscalls);
regs->ax = sys_call_table[unr](regs); regs->ax = x64_sys_call(regs, unr);
return true; return true;
} }
return false; return false;
@ -66,7 +66,7 @@ static __always_inline bool do_syscall_x32(struct pt_regs *regs, int nr)
if (IS_ENABLED(CONFIG_X86_X32_ABI) && likely(xnr < X32_NR_syscalls)) { if (IS_ENABLED(CONFIG_X86_X32_ABI) && likely(xnr < X32_NR_syscalls)) {
xnr = array_index_nospec(xnr, X32_NR_syscalls); xnr = array_index_nospec(xnr, X32_NR_syscalls);
regs->ax = x32_sys_call_table[xnr](regs); regs->ax = x32_sys_call(regs, xnr);
return true; return true;
} }
return false; return false;
@ -162,7 +162,7 @@ static __always_inline void do_syscall_32_irqs_on(struct pt_regs *regs, int nr)
if (likely(unr < IA32_NR_syscalls)) { if (likely(unr < IA32_NR_syscalls)) {
unr = array_index_nospec(unr, IA32_NR_syscalls); unr = array_index_nospec(unr, IA32_NR_syscalls);
regs->ax = ia32_sys_call_table[unr](regs); regs->ax = ia32_sys_call(regs, unr);
} else if (nr != -1) { } else if (nr != -1) {
regs->ax = __ia32_sys_ni_syscall(regs); regs->ax = __ia32_sys_ni_syscall(regs);
} }
@ -189,7 +189,7 @@ static __always_inline bool int80_is_external(void)
} }
/** /**
* int80_emulation - 32-bit legacy syscall entry * do_int80_emulation - 32-bit legacy syscall C entry from asm
* *
* This entry point can be used by 32-bit and 64-bit programs to perform * This entry point can be used by 32-bit and 64-bit programs to perform
* 32-bit system calls. Instances of INT $0x80 can be found inline in * 32-bit system calls. Instances of INT $0x80 can be found inline in
@ -207,7 +207,7 @@ static __always_inline bool int80_is_external(void)
* eax: system call number * eax: system call number
* ebx, ecx, edx, esi, edi, ebp: arg1 - arg 6 * ebx, ecx, edx, esi, edi, ebp: arg1 - arg 6
*/ */
DEFINE_IDTENTRY_RAW(int80_emulation) __visible noinstr void do_int80_emulation(struct pt_regs *regs)
{ {
int nr; int nr;
@ -255,6 +255,71 @@ DEFINE_IDTENTRY_RAW(int80_emulation)
instrumentation_end(); instrumentation_end();
syscall_exit_to_user_mode(regs); syscall_exit_to_user_mode(regs);
} }
#ifdef CONFIG_X86_FRED
/*
* A FRED-specific INT80 handler is warranted for the follwing reasons:
*
* 1) As INT instructions and hardware interrupts are separate event
* types, FRED does not preclude the use of vector 0x80 for external
* interrupts. As a result, the FRED setup code does not reserve
* vector 0x80 and calling int80_is_external() is not merely
* suboptimal but actively incorrect: it could cause a system call
* to be incorrectly ignored.
*
* 2) It is called only for handling vector 0x80 of event type
* EVENT_TYPE_SWINT and will never be called to handle any external
* interrupt (event type EVENT_TYPE_EXTINT).
*
* 3) FRED has separate entry flows depending on if the event came from
* user space or kernel space, and because the kernel does not use
* INT insns, the FRED kernel entry handler fred_entry_from_kernel()
* falls through to fred_bad_type() if the event type is
* EVENT_TYPE_SWINT, i.e., INT insns. So if the kernel is handling
* an INT insn, it can only be from a user level.
*
* 4) int80_emulation() does a CLEAR_BRANCH_HISTORY. While FRED will
* likely take a different approach if it is ever needed: it
* probably belongs in either fred_intx()/ fred_other() or
* asm_fred_entrypoint_user(), depending on if this ought to be done
* for all entries from userspace or only system
* calls.
*
* 5) INT $0x80 is the fast path for 32-bit system calls under FRED.
*/
DEFINE_FREDENTRY_RAW(int80_emulation)
{
int nr;
enter_from_user_mode(regs);
instrumentation_begin();
add_random_kstack_offset();
/*
* FRED pushed 0 into regs::orig_ax and regs::ax contains the
* syscall number.
*
* User tracing code (ptrace or signal handlers) might assume
* that the regs::orig_ax contains a 32-bit number on invoking
* a 32-bit syscall.
*
* Establish the syscall convention by saving the 32bit truncated
* syscall number in regs::orig_ax and by invalidating regs::ax.
*/
regs->orig_ax = regs->ax & GENMASK(31, 0);
regs->ax = -ENOSYS;
nr = syscall_32_enter(regs);
local_irq_enable();
nr = syscall_enter_from_user_mode_work(regs, nr);
do_syscall_32_irqs_on(regs, nr);
instrumentation_end();
syscall_exit_to_user_mode(regs);
}
#endif
#else /* CONFIG_IA32_EMULATION */ #else /* CONFIG_IA32_EMULATION */
/* Handles int $0x80 on a 32bit kernel */ /* Handles int $0x80 on a 32bit kernel */

View File

@ -116,6 +116,7 @@ SYM_INNER_LABEL(entry_SYSCALL_64_after_hwframe, SYM_L_GLOBAL)
/* clobbers %rax, make sure it is after saving the syscall nr */ /* clobbers %rax, make sure it is after saving the syscall nr */
IBRS_ENTER IBRS_ENTER
UNTRAIN_RET UNTRAIN_RET
CLEAR_BRANCH_HISTORY
call do_syscall_64 /* returns with IRQs disabled */ call do_syscall_64 /* returns with IRQs disabled */
@ -1491,3 +1492,63 @@ SYM_CODE_START_NOALIGN(rewind_stack_and_make_dead)
call make_task_dead call make_task_dead
SYM_CODE_END(rewind_stack_and_make_dead) SYM_CODE_END(rewind_stack_and_make_dead)
.popsection .popsection
/*
* This sequence executes branches in order to remove user branch information
* from the branch history tracker in the Branch Predictor, therefore removing
* user influence on subsequent BTB lookups.
*
* It should be used on parts prior to Alder Lake. Newer parts should use the
* BHI_DIS_S hardware control instead. If a pre-Alder Lake part is being
* virtualized on newer hardware the VMM should protect against BHI attacks by
* setting BHI_DIS_S for the guests.
*
* CALLs/RETs are necessary to prevent Loop Stream Detector(LSD) from engaging
* and not clearing the branch history. The call tree looks like:
*
* call 1
* call 2
* call 2
* call 2
* call 2
* call 2
* ret
* ret
* ret
* ret
* ret
* ret
*
* This means that the stack is non-constant and ORC can't unwind it with %rsp
* alone. Therefore we unconditionally set up the frame pointer, which allows
* ORC to unwind properly.
*
* The alignment is for performance and not for safety, and may be safely
* refactored in the future if needed.
*/
SYM_FUNC_START(clear_bhb_loop)
push %rbp
mov %rsp, %rbp
movl $5, %ecx
ANNOTATE_INTRA_FUNCTION_CALL
call 1f
jmp 5f
.align 64, 0xcc
ANNOTATE_INTRA_FUNCTION_CALL
1: call 2f
RET
.align 64, 0xcc
2: movl $5, %eax
3: jmp 4f
nop
4: sub $1, %eax
jnz 3b
sub $1, %ecx
jnz 1b
RET
5: lfence
pop %rbp
RET
SYM_FUNC_END(clear_bhb_loop)
EXPORT_SYMBOL_GPL(clear_bhb_loop)
STACK_FRAME_NON_STANDARD(clear_bhb_loop)

View File

@ -92,6 +92,7 @@ SYM_INNER_LABEL(entry_SYSENTER_compat_after_hwframe, SYM_L_GLOBAL)
IBRS_ENTER IBRS_ENTER
UNTRAIN_RET UNTRAIN_RET
CLEAR_BRANCH_HISTORY
/* /*
* SYSENTER doesn't filter flags, so we need to clear NT and AC * SYSENTER doesn't filter flags, so we need to clear NT and AC
@ -206,6 +207,7 @@ SYM_INNER_LABEL(entry_SYSCALL_compat_after_hwframe, SYM_L_GLOBAL)
IBRS_ENTER IBRS_ENTER
UNTRAIN_RET UNTRAIN_RET
CLEAR_BRANCH_HISTORY
movq %rsp, %rdi movq %rsp, %rdi
call do_fast_syscall_32 call do_fast_syscall_32
@ -276,3 +278,17 @@ SYM_INNER_LABEL(entry_SYSRETL_compat_end, SYM_L_GLOBAL)
ANNOTATE_NOENDBR ANNOTATE_NOENDBR
int3 int3
SYM_CODE_END(entry_SYSCALL_compat) SYM_CODE_END(entry_SYSCALL_compat)
/*
* int 0x80 is used by 32 bit mode as a system call entry. Normally idt entries
* point to C routines, however since this is a system call interface the branch
* history needs to be scrubbed to protect against BHI attacks, and that
* scrubbing needs to take place in assembly code prior to entering any C
* routines.
*/
SYM_CODE_START(int80_emulation)
ANNOTATE_NOENDBR
UNWIND_HINT_FUNC
CLEAR_BRANCH_HISTORY
jmp do_int80_emulation
SYM_CODE_END(int80_emulation)

View File

@ -28,9 +28,9 @@ static noinstr void fred_bad_type(struct pt_regs *regs, unsigned long error_code
if (regs->fred_cs.sl > 0) { if (regs->fred_cs.sl > 0) {
pr_emerg("PANIC: invalid or fatal FRED event; event type %u " pr_emerg("PANIC: invalid or fatal FRED event; event type %u "
"vector %u error 0x%lx aux 0x%lx at %04x:%016lx\n", "vector %u error 0x%lx aux 0x%lx at %04x:%016lx\n",
regs->fred_ss.type, regs->fred_ss.vector, regs->orig_ax, regs->fred_ss.type, regs->fred_ss.vector, error_code,
fred_event_data(regs), regs->cs, regs->ip); fred_event_data(regs), regs->cs, regs->ip);
die("invalid or fatal FRED event", regs, regs->orig_ax); die("invalid or fatal FRED event", regs, error_code);
panic("invalid or fatal FRED event"); panic("invalid or fatal FRED event");
} else { } else {
unsigned long flags = oops_begin(); unsigned long flags = oops_begin();
@ -38,10 +38,10 @@ static noinstr void fred_bad_type(struct pt_regs *regs, unsigned long error_code
pr_alert("BUG: invalid or fatal FRED event; event type %u " pr_alert("BUG: invalid or fatal FRED event; event type %u "
"vector %u error 0x%lx aux 0x%lx at %04x:%016lx\n", "vector %u error 0x%lx aux 0x%lx at %04x:%016lx\n",
regs->fred_ss.type, regs->fred_ss.vector, regs->orig_ax, regs->fred_ss.type, regs->fred_ss.vector, error_code,
fred_event_data(regs), regs->cs, regs->ip); fred_event_data(regs), regs->cs, regs->ip);
if (__die("Invalid or fatal FRED event", regs, regs->orig_ax)) if (__die("Invalid or fatal FRED event", regs, error_code))
sig = 0; sig = 0;
oops_end(flags, regs, sig); oops_end(flags, regs, sig);
@ -66,7 +66,7 @@ static noinstr void fred_intx(struct pt_regs *regs)
/* INT80 */ /* INT80 */
case IA32_SYSCALL_VECTOR: case IA32_SYSCALL_VECTOR:
if (ia32_enabled()) if (ia32_enabled())
return int80_emulation(regs); return fred_int80_emulation(regs);
fallthrough; fallthrough;
#endif #endif

View File

@ -18,8 +18,25 @@
#include <asm/syscalls_32.h> #include <asm/syscalls_32.h>
#undef __SYSCALL #undef __SYSCALL
/*
* The sys_call_table[] is no longer used for system calls, but
* kernel/trace/trace_syscalls.c still wants to know the system
* call address.
*/
#ifdef CONFIG_X86_32
#define __SYSCALL(nr, sym) __ia32_##sym, #define __SYSCALL(nr, sym) __ia32_##sym,
const sys_call_ptr_t sys_call_table[] = {
__visible const sys_call_ptr_t ia32_sys_call_table[] = {
#include <asm/syscalls_32.h> #include <asm/syscalls_32.h>
}; };
#undef __SYSCALL
#endif
#define __SYSCALL(nr, sym) case nr: return __ia32_##sym(regs);
long ia32_sys_call(const struct pt_regs *regs, unsigned int nr)
{
switch (nr) {
#include <asm/syscalls_32.h>
default: return __ia32_sys_ni_syscall(regs);
}
};

View File

@ -11,8 +11,23 @@
#include <asm/syscalls_64.h> #include <asm/syscalls_64.h>
#undef __SYSCALL #undef __SYSCALL
/*
* The sys_call_table[] is no longer used for system calls, but
* kernel/trace/trace_syscalls.c still wants to know the system
* call address.
*/
#define __SYSCALL(nr, sym) __x64_##sym, #define __SYSCALL(nr, sym) __x64_##sym,
const sys_call_ptr_t sys_call_table[] = {
asmlinkage const sys_call_ptr_t sys_call_table[] = {
#include <asm/syscalls_64.h> #include <asm/syscalls_64.h>
}; };
#undef __SYSCALL
#define __SYSCALL(nr, sym) case nr: return __x64_##sym(regs);
long x64_sys_call(const struct pt_regs *regs, unsigned int nr)
{
switch (nr) {
#include <asm/syscalls_64.h>
default: return __x64_sys_ni_syscall(regs);
}
};

View File

@ -11,8 +11,12 @@
#include <asm/syscalls_x32.h> #include <asm/syscalls_x32.h>
#undef __SYSCALL #undef __SYSCALL
#define __SYSCALL(nr, sym) __x64_##sym, #define __SYSCALL(nr, sym) case nr: return __x64_##sym(regs);
asmlinkage const sys_call_ptr_t x32_sys_call_table[] = { long x32_sys_call(const struct pt_regs *regs, unsigned int nr)
#include <asm/syscalls_x32.h> {
switch (nr) {
#include <asm/syscalls_x32.h>
default: return __x64_sys_ni_syscall(regs);
}
}; };

View File

@ -1644,6 +1644,7 @@ static void x86_pmu_del(struct perf_event *event, int flags)
while (++i < cpuc->n_events) { while (++i < cpuc->n_events) {
cpuc->event_list[i-1] = cpuc->event_list[i]; cpuc->event_list[i-1] = cpuc->event_list[i];
cpuc->event_constraint[i-1] = cpuc->event_constraint[i]; cpuc->event_constraint[i-1] = cpuc->event_constraint[i];
cpuc->assign[i-1] = cpuc->assign[i];
} }
cpuc->event_constraint[i-1] = NULL; cpuc->event_constraint[i-1] = NULL;
--cpuc->n_events; --cpuc->n_events;

View File

@ -1693,6 +1693,7 @@ void x86_perf_get_lbr(struct x86_pmu_lbr *lbr)
lbr->from = x86_pmu.lbr_from; lbr->from = x86_pmu.lbr_from;
lbr->to = x86_pmu.lbr_to; lbr->to = x86_pmu.lbr_to;
lbr->info = x86_pmu.lbr_info; lbr->info = x86_pmu.lbr_info;
lbr->has_callstack = x86_pmu_has_lbr_callstack();
} }
EXPORT_SYMBOL_GPL(x86_perf_get_lbr); EXPORT_SYMBOL_GPL(x86_perf_get_lbr);

View File

@ -105,7 +105,7 @@ static bool cpu_is_self(int cpu)
* IPI implementation on Hyper-V. * IPI implementation on Hyper-V.
*/ */
static bool __send_ipi_mask_ex(const struct cpumask *mask, int vector, static bool __send_ipi_mask_ex(const struct cpumask *mask, int vector,
bool exclude_self) bool exclude_self)
{ {
struct hv_send_ipi_ex *ipi_arg; struct hv_send_ipi_ex *ipi_arg;
unsigned long flags; unsigned long flags;
@ -132,8 +132,8 @@ static bool __send_ipi_mask_ex(const struct cpumask *mask, int vector,
if (!cpumask_equal(mask, cpu_present_mask) || exclude_self) { if (!cpumask_equal(mask, cpu_present_mask) || exclude_self) {
ipi_arg->vp_set.format = HV_GENERIC_SET_SPARSE_4K; ipi_arg->vp_set.format = HV_GENERIC_SET_SPARSE_4K;
nr_bank = cpumask_to_vpset_skip(&(ipi_arg->vp_set), mask, nr_bank = cpumask_to_vpset_skip(&ipi_arg->vp_set, mask,
exclude_self ? cpu_is_self : NULL); exclude_self ? cpu_is_self : NULL);
/* /*
* 'nr_bank <= 0' means some CPUs in cpumask can't be * 'nr_bank <= 0' means some CPUs in cpumask can't be
@ -147,7 +147,7 @@ static bool __send_ipi_mask_ex(const struct cpumask *mask, int vector,
} }
status = hv_do_rep_hypercall(HVCALL_SEND_IPI_EX, 0, nr_bank, status = hv_do_rep_hypercall(HVCALL_SEND_IPI_EX, 0, nr_bank,
ipi_arg, NULL); ipi_arg, NULL);
ipi_mask_ex_done: ipi_mask_ex_done:
local_irq_restore(flags); local_irq_restore(flags);
@ -155,7 +155,7 @@ ipi_mask_ex_done:
} }
static bool __send_ipi_mask(const struct cpumask *mask, int vector, static bool __send_ipi_mask(const struct cpumask *mask, int vector,
bool exclude_self) bool exclude_self)
{ {
int cur_cpu, vcpu, this_cpu = smp_processor_id(); int cur_cpu, vcpu, this_cpu = smp_processor_id();
struct hv_send_ipi ipi_arg; struct hv_send_ipi ipi_arg;
@ -181,7 +181,7 @@ static bool __send_ipi_mask(const struct cpumask *mask, int vector,
return false; return false;
} }
if ((vector < HV_IPI_LOW_VECTOR) || (vector > HV_IPI_HIGH_VECTOR)) if (vector < HV_IPI_LOW_VECTOR || vector > HV_IPI_HIGH_VECTOR)
return false; return false;
/* /*
@ -218,7 +218,7 @@ static bool __send_ipi_mask(const struct cpumask *mask, int vector,
} }
status = hv_do_fast_hypercall16(HVCALL_SEND_IPI, ipi_arg.vector, status = hv_do_fast_hypercall16(HVCALL_SEND_IPI, ipi_arg.vector,
ipi_arg.cpu_mask); ipi_arg.cpu_mask);
return hv_result_success(status); return hv_result_success(status);
do_ex_hypercall: do_ex_hypercall:
@ -241,7 +241,7 @@ static bool __send_ipi_one(int cpu, int vector)
return false; return false;
} }
if ((vector < HV_IPI_LOW_VECTOR) || (vector > HV_IPI_HIGH_VECTOR)) if (vector < HV_IPI_LOW_VECTOR || vector > HV_IPI_HIGH_VECTOR)
return false; return false;
if (vp >= 64) if (vp >= 64)

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