Skip to content

Commit

Permalink
Merge branch 'net-next-2025-01-06--18-00' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jan 6, 2025
2 parents 5c57fa7 + e140c1c commit 35bdd58
Show file tree
Hide file tree
Showing 1,306 changed files with 44,167 additions and 13,497 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ Wolfram Sang <[email protected]> <[email protected]>
Wolfram Sang <[email protected]> <[email protected]>
Yakir Yang <[email protected]> <[email protected]>
Yanteng Si <[email protected]> <[email protected]>
Ying Huang <[email protected]> <[email protected]>
Yusuke Goda <[email protected]>
Zack Rusin <[email protected]> <[email protected]>
Zhu Yanjun <[email protected]> <[email protected]>
10 changes: 7 additions & 3 deletions Documentation/admin-guide/laptops/thinkpad-acpi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,10 @@ event code Key Notes
0x1008 0x07 FN+F8 IBM: toggle screen expand
Lenovo: configure UltraNav,
or toggle screen expand.
On newer platforms (2024+)
replaced by 0x131f (see below)
On 2024 platforms replaced by
0x131f (see below) and on newer
platforms (2025 +) keycode is
replaced by 0x1401 (see below).

0x1009 0x08 FN+F9 -

Expand Down Expand Up @@ -506,9 +508,11 @@ event code Key Notes

0x1019 0x18 unknown

0x131f ... FN+F8 Platform Mode change.
0x131f ... FN+F8 Platform Mode change (2024 systems).
Implemented in driver.

0x1401 ... FN+F8 Platform Mode change (2025 + systems).
Implemented in driver.
... ... ...

0x1020 0x1F unknown
Expand Down
4 changes: 1 addition & 3 deletions Documentation/admin-guide/pm/amd-pstate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ performance supported in `AMD CPPC Performance Capability <perf_cap_>`_).
In some ASICs, the highest CPPC performance is not the one in the ``_CPC``
table, so we need to expose it to sysfs. If boost is not active, but
still supported, this maximum frequency will be larger than the one in
``cpuinfo``. On systems that support preferred core, the driver will have
different values for some cores than others and this will reflect the values
advertised by the platform at bootup.
``cpuinfo``.
This attribute is read-only.

``amd_pstate_lowest_nonlinear_freq``
Expand Down
118 changes: 113 additions & 5 deletions Documentation/core-api/packing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,119 @@ Intended use

Drivers that opt to use this API first need to identify which of the above 3
quirk combinations (for a total of 8) match what the hardware documentation
describes. Then they should wrap the packing() function, creating a new
xxx_packing() that calls it using the proper QUIRK_* one-hot bits set.
describes.

There are 3 supported usage patterns, detailed below.

packing()
^^^^^^^^^

This API function is deprecated.

The packing() function returns an int-encoded error code, which protects the
programmer against incorrect API use. The errors are not expected to occur
during runtime, therefore it is reasonable for xxx_packing() to return void
and simply swallow those errors. Optionally it can dump stack or print the
error description.
during runtime, therefore it is reasonable to wrap packing() into a custom
function which returns void and swallows those errors. Optionally it can
dump stack or print the error description.

.. code-block:: c
void my_packing(void *buf, u64 *val, int startbit, int endbit,
size_t len, enum packing_op op)
{
int err;
/* Adjust quirks accordingly */
err = packing(buf, val, startbit, endbit, len, op, QUIRK_LSW32_IS_FIRST);
if (likely(!err))
return;
if (err == -EINVAL) {
pr_err("Start bit (%d) expected to be larger than end (%d)\n",
startbit, endbit);
} else if (err == -ERANGE) {
if ((startbit - endbit + 1) > 64)
pr_err("Field %d-%d too large for 64 bits!\n",
startbit, endbit);
else
pr_err("Cannot store %llx inside bits %d-%d (would truncate)\n",
*val, startbit, endbit);
}
dump_stack();
}
pack() and unpack()
^^^^^^^^^^^^^^^^^^^

These are const-correct variants of packing(), and eliminate the last "enum
packing_op op" argument.

Calling pack(...) is equivalent, and preferred, to calling packing(..., PACK).

Calling unpack(...) is equivalent, and preferred, to calling packing(..., UNPACK).

pack_fields() and unpack_fields()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The library exposes optimized functions for the scenario where there are many
fields represented in a buffer, and it encourages consumer drivers to avoid
repetitive calls to pack() and unpack() for each field, but instead use
pack_fields() and unpack_fields(), which reduces the code footprint.

These APIs use field definitions in arrays of ``struct packed_field_u8`` or
``struct packed_field_u16``, allowing consumer drivers to minimize the size
of these arrays according to their custom requirements.

The pack_fields() and unpack_fields() API functions are actually macros which
automatically select the appropriate function at compile time, based on the
type of the fields array passed in.

An additional benefit over pack() and unpack() is that sanity checks on the
field definitions are handled at compile time with ``BUILD_BUG_ON`` rather
than only when the offending code is executed. These functions return void and
wrapping them to handle unexpected errors is not necessary.

It is recommended, but not required, that you wrap your packed buffer into a
structured type with a fixed size. This generally makes it easier for the
compiler to enforce that the correct size buffer is used.

Here is an example of how to use the fields APIs:

.. code-block:: c
/* Ordering inside the unpacked structure is flexible and can be different
* from the packed buffer. Here, it is optimized to reduce padding.
*/
struct data {
u64 field3;
u32 field4;
u16 field1;
u8 field2;
};
#define SIZE 13
typdef struct __packed { u8 buf[SIZE]; } packed_buf_t;
static const struct packed_field_u8 fields[] = {
PACKED_FIELD(100, 90, struct data, field1),
PACKED_FIELD(90, 87, struct data, field2),
PACKED_FIELD(86, 30, struct data, field3),
PACKED_FIELD(29, 0, struct data, field4),
};
void unpack_your_data(const packed_buf_t *buf, struct data *unpacked)
{
BUILD_BUG_ON(sizeof(*buf) != SIZE;
unpack_fields(buf, sizeof(*buf), unpacked, fields,
QUIRK_LITTLE_ENDIAN);
}
void pack_your_data(const struct data *unpacked, packed_buf_t *buf)
{
BUILD_BUG_ON(sizeof(*buf) != SIZE;
pack_fields(buf, sizeof(*buf), unpacked, fields,
QUIRK_LITTLE_ENDIAN);
}
10 changes: 6 additions & 4 deletions Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ patternProperties:
table that specifies the PPID to LIODN mapping. Needed if the PAMU is
used. Value is a 12 bit value where value is a LIODN ID for this JR.
This property is normally set by boot firmware.
$ref: /schemas/types.yaml#/definitions/uint32
maximum: 0xfff
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
- maximum: 0xfff

'^rtic@[0-9a-f]+$':
type: object
Expand Down Expand Up @@ -186,8 +187,9 @@ patternProperties:
Needed if the PAMU is used. Value is a 12 bit value where value
is a LIODN ID for this JR. This property is normally set by boot
firmware.
$ref: /schemas/types.yaml#/definitions/uint32
maximum: 0xfff
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
- maximum: 0xfff

fsl,rtic-region:
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ properties:
adi,dsi-lanes:
description: Number of DSI data lanes connected to the DSI host.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 1, 2, 3, 4 ]
enum: [ 2, 3, 4 ]

"#sound-dai-cells":
const: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ examples:
uimage@100000 {
reg = <0x0100000 0x200000>;
compress = "lzma";
compression = "lzma";
};
};
Expand Down
18 changes: 18 additions & 0 deletions Documentation/devicetree/bindings/net/microchip,sparx5-switch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,24 @@ properties:
minimum: 0
maximum: 383

rx-internal-delay-ps:
description:
RGMII Receive Clock Delay defined in pico seconds, used to select
the DLL phase shift between 1000 ps (45 degree shift at 1Gbps) and
3300 ps (147 degree shift at 1Gbps). A value of 0 ps will disable
any delay. The Default is no delay.
enum: [0, 1000, 1700, 2000, 2500, 3000, 3300]
default: 0

tx-internal-delay-ps:
description:
RGMII Transmit Clock Delay defined in pico seconds, used to select
the DLL phase shift between 1000 ps (45 degree shift at 1Gbps) and
3300 ps (147 degree shift at 1Gbps). A value of 0 ps will disable
any delay. The Default is no delay.
enum: [0, 1000, 1700, 2000, 2500, 3000, 3300]
default: 0

required:
- reg
- phys
Expand Down
105 changes: 105 additions & 0 deletions Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2021-2024 NXP
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/nxp,s32-dwmac.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP S32G2xx/S32G3xx/S32R45 GMAC ethernet controller

maintainers:
- Jan Petrous (OSS) <[email protected]>

description:
This device is a Synopsys DWC IP, integrated on NXP S32G/R SoCs.
The SoC series S32G2xx and S32G3xx feature one DWMAC instance,
the SoC S32R45 has two instances. The devices can use RGMII/RMII/MII
interface over Pinctrl device or the output can be routed
to the embedded SerDes for SGMII connectivity.

properties:
compatible:
oneOf:
- const: nxp,s32g2-dwmac
- items:
- enum:
- nxp,s32g3-dwmac
- nxp,s32r45-dwmac
- const: nxp,s32g2-dwmac

reg:
items:
- description: Main GMAC registers
- description: GMAC PHY mode control register

interrupts:
maxItems: 1

interrupt-names:
const: macirq

clocks:
items:
- description: Main GMAC clock
- description: Transmit clock
- description: Receive clock
- description: PTP reference clock

clock-names:
items:
- const: stmmaceth
- const: tx
- const: rx
- const: ptp_ref

required:
- clocks
- clock-names

allOf:
- $ref: snps,dwmac.yaml#

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/phy/phy.h>
bus {
#address-cells = <2>;
#size-cells = <2>;
ethernet@4033c000 {
compatible = "nxp,s32g2-dwmac";
reg = <0x0 0x4033c000 0x0 0x2000>, /* gmac IP */
<0x0 0x4007c004 0x0 0x4>; /* GMAC_0_CTRL_STS */
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq";
snps,mtl-rx-config = <&mtl_rx_setup>;
snps,mtl-tx-config = <&mtl_tx_setup>;
clocks = <&clks 24>, <&clks 17>, <&clks 16>, <&clks 15>;
clock-names = "stmmaceth", "tx", "rx", "ptp_ref";
phy-mode = "rgmii-id";
phy-handle = <&phy0>;
mtl_rx_setup: rx-queues-config {
snps,rx-queues-to-use = <5>;
};
mtl_tx_setup: tx-queues-config {
snps,tx-queues-to-use = <5>;
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy0: ethernet-phy@0 {
reg = <0>;
};
};
};
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/net/snps,dwmac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ properties:
- ingenic,x2000-mac
- loongson,ls2k-dwmac
- loongson,ls7a-dwmac
- nxp,s32g2-dwmac
- qcom,qcs404-ethqos
- qcom,sa8775p-ethqos
- qcom,sc8280xp-ethqos
Expand Down
27 changes: 27 additions & 0 deletions Documentation/devicetree/bindings/net/ti,dp83822.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,32 @@ properties:
- master
- slave

ti,gpio2-clk-out:
description: |
DP83822 PHY only.
The GPIO2 pin on the DP83822 can be configured as clock output. When
omitted, the PHY's default will be left as is.
- 'mac-if': In MII mode the clock frequency is 25-MHz, in RMII Mode the
clock frequency is 50-MHz and in RGMII Mode the clock frequency is
25-MHz.
- 'xi': XI clock(pass-through clock from XI pin).
- 'int-ref': Internal reference clock 25-MHz.
- 'rmii-master-mode-ref': RMII master mode reference clock 50-MHz. RMII
master mode reference clock is identical to MAC IF clock in RMII master
mode.
- 'free-running': Free running clock 125-MHz.
- 'recovered': Recovered clock is a 125-MHz recovered clock from a
connected link partner.
$ref: /schemas/types.yaml#/definitions/string
enum:
- mac-if
- xi
- int-ref
- rmii-master-mode-ref
- free-running
- recovered

required:
- reg

Expand All @@ -110,6 +136,7 @@ examples:
reg = <0>;
rx-internal-delay-ps = <1>;
tx-internal-delay-ps = <1>;
ti,gpio2-clk-out = "xi";
};
};
Expand Down
Loading

0 comments on commit 35bdd58

Please sign in to comment.