linux-2.6-microblaze.git
11 months agoarm64: dts: imx8mm-emcon: Fix the regulator names
Fabio Estevam [Fri, 4 Aug 2023 02:09:47 +0000 (23:09 -0300)]
arm64: dts: imx8mm-emcon: Fix the regulator names

Fix the regulator names as per rohm,bd71847-pmic.yaml to fix the
following schema warnings:

imx8mm-emcon-avari.dtb: pmic@4b: regulators:LDO1:regulator-name:0: 'LDO1' does not match '^ldo[1-6]$'

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx: Pass a single BD71847 clock entry
Fabio Estevam [Fri, 4 Aug 2023 02:09:46 +0000 (23:09 -0300)]
arm64: dts: imx: Pass a single BD71847 clock entry

Pass a single BD71847 clock entry to fix the following schema
warning:

imx8mm-var-som-symphony.dtb: pmic@4b: clocks: [[22], [0]] is too long
from schema $id: http://devicetree.org/schemas/mfd/rohm,bd71847-pmic.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: ls1028a: add l1 and l2 cache info
Hui Wang [Mon, 31 Jul 2023 08:46:14 +0000 (16:46 +0800)]
arm64: dts: ls1028a: add l1 and l2 cache info

When we ran the stress-ng cache related stressors, we got the log as
below:
ubuntu@ubuntu:~$ stress-ng --l1cache 4
stress-ng: info:  [656] defaulting to a 86400 second (1 day, 0.00 secs) run per stressor
stress-ng: info:  [656] dispatching hogs: 4 l1cache
stress-ng: info:  [657] stress-ng-l1cache: skipping stressor, cannot determine cache level 1 information from kernel

This is because the l1 and l2 cache info is missing in the devicetree,
ls1028a has dual cortex-a72 cores and has 48KB icache, 32KB dcache and
1MB l2 ucache:
  - icache is 3-way set associative
  - dcache is 2-way set associative
  - l2cache is 16-way set associative
  - line size are 64bytes

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm-phyboard-polis-rdk: Remove 'fsl,spi-num-chipselects'
Fabio Estevam [Wed, 26 Jul 2023 12:50:25 +0000 (09:50 -0300)]
arm64: dts: imx8mm-phyboard-polis-rdk: Remove 'fsl,spi-num-chipselects'

The 'fsl,spi-num-chipselects' property is not a valid one, so remove it.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8dxl-evk: Remove 'fsl,spi-num-chipselects'
Fabio Estevam [Wed, 26 Jul 2023 12:50:24 +0000 (09:50 -0300)]
arm64: dts: imx8dxl-evk: Remove 'fsl,spi-num-chipselects'

The 'fsl,spi-num-chipselects' property is not a valid one, so remove it.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: freescale: Replace deprecated extcon-usb-gpio id-gpio/vbus-gpio properties
Alexander Stein [Mon, 24 Jul 2023 10:39:11 +0000 (12:39 +0200)]
arm64: dts: freescale: Replace deprecated extcon-usb-gpio id-gpio/vbus-gpio properties

Use id-gpios and vbus-gpios instead.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: tqma8mqnl: Add vcc supply to i2c eeproms
Alexander Stein [Mon, 24 Jul 2023 09:13:02 +0000 (11:13 +0200)]
arm64: dts: tqma8mqnl: Add vcc supply to i2c eeproms

Fixes the warnings:
at24 0-0053: supply vcc not found, using dummy regulator
at24 0-0057: supply vcc not found, using dummy regulator

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8ulp-evk: enable lpi2c7 bus
Haibo Chen [Mon, 24 Jul 2023 07:58:33 +0000 (15:58 +0800)]
arm64: dts: imx8ulp-evk: enable lpi2c7 bus

Enable lpi2c7 bus, and enable i2c IO expander.

Reviewed-by: Clark Wang <xiaoning.wang@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8ulp-evk: add 100MHz/200MHz pinctrl setting for eMMC
Haibo Chen [Mon, 24 Jul 2023 07:58:32 +0000 (15:58 +0800)]
arm64: dts: imx8ulp-evk: add 100MHz/200MHz pinctrl setting for eMMC

Add 100MHz and 200MHz pinctrl setting for eMMC, and enable 8 bit bus mode
to config the eMMC work at HS400ES mode.

Also update to use Standard Drive Strength for USDHC pad to get a better
signal quality per Hardware team suggests.

Reviewed-by: Sherry Sun <sherry.sun@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8ulp-evk: add spi-nor device support
Han Xu [Mon, 24 Jul 2023 07:58:31 +0000 (15:58 +0800)]
arm64: dts: imx8ulp-evk: add spi-nor device support

Add spi-nor support.
- 8 bit mode for RX/TX.
- Set the clock rate to 200MHz.
- add default/sleep pinctrl.

Co-developed-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8ulp-evk: enable CM33 node
Peng Fan [Mon, 24 Jul 2023 07:58:30 +0000 (15:58 +0800)]
arm64: dts: imx8ulp-evk: enable CM33 node

Enable CM33 node to support rpmsg feature. To use rpmsg, also need
to enable mu node for mailbox doorbell and reserved memory node
for vring, and data buffer. And reserved a piece DRAM memory for case
that m33 images loaded in DRAM.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8ulp-evk: add reserved memory for cma
Peng Fan [Mon, 24 Jul 2023 07:58:29 +0000 (15:58 +0800)]
arm64: dts: imx8ulp-evk: add reserved memory for cma

Add reserved memory node for CMA usage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8ulp: add flexspi node
Haibo Chen [Mon, 24 Jul 2023 07:58:28 +0000 (15:58 +0800)]
arm64: dts: imx8ulp: add flexspi node

Add flexspi node, flexspi has a special memory region mapped to
0x60000000~0x6fffffff. This region is for AHB usage. So add this region
to SoC ranges.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8ulp: add cpuidle node
Peng Fan [Mon, 24 Jul 2023 07:58:27 +0000 (15:58 +0800)]
arm64: dts: imx8ulp: add cpuidle node

Add cpuidle node and enable cpuidle for dual cores. The HW mode in
Arm Trusted Firmware is SoC Application Power Domain Sleep mode.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8ulp: add thermal node
Peng Fan [Mon, 24 Jul 2023 07:58:26 +0000 (15:58 +0800)]
arm64: dts: imx8ulp: add thermal node

Add thermal node. Cooling map is not added, because frequency runtime
changing not supported for now.

Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8ulp: set default clock for SDHC
Peng Fan [Mon, 24 Jul 2023 07:58:25 +0000 (15:58 +0800)]
arm64: dts: imx8ulp: set default clock for SDHC

Set default clock rate and parents for SDHC[0,1,2].

The PLL3 PFD2 maximum frequency is 332Mhz, we can't set it to 389Mhz
as USDHC clock parent. Because PLL3 PFD0 is used for NIC, PFD1 is used
for audio, the only choice is PFD3 which can reach to 400Mhz.

USDHC1 and USDHC2 maximum PCC clock rate is 200Mhz in Over Drive mode,
and 100Mhz in Nominal/Low Drive mode, when PTE or PTF is used.

The patch adjusts clock parent to PLL3 PFD3 DIV1 for USDHC0, PLL3
PFD3 DIV2 for USDHC1 and USDHC2. And set the max rate to meet
restrictions.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8ulp: add cm33 node
Peng Fan [Mon, 24 Jul 2023 07:58:24 +0000 (15:58 +0800)]
arm64: dts: imx8ulp: add cm33 node

Add i.MX8ULP CM33 node.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm-phycore: drop uncorrect vselect-en
Krzysztof Kozlowski [Tue, 25 Jul 2023 14:26:53 +0000 (16:26 +0200)]
arm64: dts: imx8mm-phycore: drop uncorrect vselect-en

There is no "vselect-en" property, neither in the bindings nor in the
Linux driver:

  imx8mm-phyboard-polis-rdk.dtb: pmic@8: regulators:ldo2: Unevaluated properties are not allowed ('vselect-en' was unexpected)

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8: conn: Fix reg order for USB3 controller
Alexander Stein [Fri, 21 Jul 2023 11:10:38 +0000 (13:10 +0200)]
arm64: dts: imx8: conn: Fix reg order for USB3 controller

Cadence USB3 bindings specify a specific reg order. Adjust DT entries
to match the bindings.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8qm: Fix VPU core alias name
Alexander Stein [Fri, 21 Jul 2023 11:10:37 +0000 (13:10 +0200)]
arm64: dts: imx8qm: Fix VPU core alias name

Alias names use dashes instead of underscores, fix this.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8qm: Fix VPU core alias name
Alexander Stein [Fri, 21 Jul 2023 11:10:36 +0000 (13:10 +0200)]
arm64: dts: imx8qm: Fix VPU core alias name

Alias names use dashes instead of underscores, fix this. Silences also
dtbs_check warning:
imx8qxp-tqma8xqp-mba8xx.dtb: aliases: 'vpu_core0', 'vpu_core1', 'vpu_core2'
 do not match any of the regexes: '^[a-z][a-z0-9\\-]*$', 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/aliases.yaml#

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: freescale: Add imx8mp-venice-gw73xx-2x
Tim Harvey [Wed, 19 Jul 2023 16:18:27 +0000 (09:18 -0700)]
arm64: dts: freescale: Add imx8mp-venice-gw73xx-2x

The Gateworks imx8mp-venice-gw73xx-2x consists of a SOM + baseboard.

The GW702x SOM contains the following:
 - i.MX8M Plus SoC
 - LPDDR4 memory
 - eMMC Boot device
 - Gateworks System Controller (GSC) with integrated EEPROM, button
   controller, and ADC's
 - PMIC
 - SOM connector providing:
  - eQoS GbE MII
  - 1x SPI
  - 2x I2C
  - 4x UART
  - 2x USB 3.0
  - 1x PCI
  - 1x SDIO (4-bit 3.3V)
  - 1x SDIO (4-bit 3.3V/1.8V)
  - GPIO

The GW73xx Baseboard contains the following:
  - GPS
  - microSD
  - off-board I/O connector with SPI
  - off-board I/O connector with I2C, and GPIO
  - off-board I/O connector with MIPI DSI, MIPI CSI, I2C, and GPIO
  - off-board I/O connector with RS232 and RS485
  - EERPOM
  - USB 3.0 HUB
  - USB 3.0 TypeA socket
  - USB 2.0 Micro-B OTG socket
  - Accelerometer
  - 1x GbE (eQoS)
  - 1x GbE (PCI)
  - PCIe clock generator
  - PCIe switch
  - 2x full-length miniPCIe socket with PCI and USB2.0
  - 1x full-length miniPCIe socket with PCI/USB3 (via mux) SIM, and USB2.0
  - 1x half-length miniPCIe socket with USB2.0 and USB3.0
  - USB Type-C with USB PD Sink capability and peripheral support
  - USB Type-C with USB 3.0 host support
  - on-board 802.11abgnac with Bluetooth 5.2
  - Wide range DC input supply

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: freescale: Add imx8mp-venice-gw72xx-2x
Tim Harvey [Wed, 19 Jul 2023 16:15:31 +0000 (09:15 -0700)]
arm64: dts: freescale: Add imx8mp-venice-gw72xx-2x

The Gateworks imx8mp-venice-gw72xx-2x consists of a SOM + baseboard.

The GW702x SOM contains the following:
 - i.MX8M Plus SoC
 - LPDDR4 memory
 - eMMC Boot device
 - Gateworks System Controller (GSC) with integrated EEPROM, button
   controller, and ADC's
 - PMIC
 - SOM connector providing:
  - eQoS GbE MII
  - 1x SPI
  - 2x I2C
  - 4x UART
  - 2x USB 3.0
  - 1x PCI
  - 1x SDIO (4-bit 3.3V)
  - 1x SDIO (4-bit 3.3V/1.8V)
  - GPIO

The GW72xx Baseboard contains the following:
 - GPS
 - microSD
 - off-board I/O connector with SPI
 - off-board I/O connector with I2C, and GPIO
 - off-board I/O connector with MIPI DSI, MIPI CSI, I2C, and GPIO
 - off-board I/O connector with RS232 and RS485
 - EERPOM
 - USB 3.0 HUB
 - USB 3.0 TypeA socket
 - USB 2.0 Micro-B OTG socket
 - Accelerometer
 - 1x GbE (eQoS)
 - 1x GbE (PCI)
 - PCIe clock generator
 - PCIe switch
 - 1x full-length miniPCIe socket with PCI and USB2.0
 - 1x full-length miniPCIe socket with PCI/USB3 (via mux) SIM, and USB2.0
 - 1x half-length miniPCIe socket with USB2.0 and USB3.0
 - USB Type-C with USB PD Sink capability and peripheral support
 - USB Type-C with USB 3.0 host support
 - Wide range DC input supply

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: freescale: Add imx8mp-venice-gw71xx-2x
Tim Harvey [Wed, 19 Jul 2023 16:14:51 +0000 (09:14 -0700)]
arm64: dts: freescale: Add imx8mp-venice-gw71xx-2x

The Gateworks imx8mp-venice-gw71xx-2x consists of a SOM + baseboard.

The GW702x SOM contains the following:
 - i.MX8M Plus SoC
 - LPDDR4 memory
 - eMMC Boot device
 - Gateworks System Controller (GSC) with integrated EEPROM, button
   controller, and ADC's
 - PMIC
 - SOM connector providing:
  - eQoS GbE MII
  - 1x SPI
  - 2x I2C
  - 4x UART
  - 2x USB 3.0
  - 1x PCI
  - 1x SDIO (4-bit 3.3V)
  - 1x SDIO (4-bit 3.3V/1.8V)
  - GPIO

The GW71xx Baseboard contains the following:
 - GPS
 - RJ45 GbE (eQoS)
 - off-board I/O connector with UART, I2C, SPI, GPIO
 - EERPOM
 - PCIe clock generator
 - full-length miniPCIe socket with PCI/USB3 (via mux) and USB2.0
 - USB Type-C with USB 2.0 host and peripheral support
 - Wide range DC input supply

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: freescale: Add imx8mm-venice-gw7905-0x
Tim Harvey [Wed, 19 Jul 2023 16:12:21 +0000 (09:12 -0700)]
arm64: dts: freescale: Add imx8mm-venice-gw7905-0x

The Gateworks imx8mm-venice-gw7905-0x consists of a SOM + baseboard.

The GW700x SOM contains the following:
 - i.MX8M Mini SoC
 - LPDDR4 memory
 - eMMC Boot device
 - Gateworks System Controller (GSC) with integrated EEPROM, button
   controller, and ADC's
 - PMIC
 - SOM connector providing:
  - FEC GbE MII
  - 1x SPI
  - 2x I2C
  - 4x UART
  - 2x USB 2.0
  - 1x PCI
  - 1x SDIO (4-bit 3.3V)
  - 1x SDIO (4-bit 3.3V/1.8V)
  - GPIO

The GW7905 Baseboard contains the following:
 - GPS
 - microSD
 - off-board I/O connector with I2C, SPI, GPIO
 - EERPOM
 - PCIe clock generator
 - 1x full-length miniPCIe socket with PCI/USB3 (via mux) and USB2.0
 - 1x half-length miniPCIe socket with USB2.0 and USB3.0
 - USB 3.0 HUB
 - USB Type-C with USB PD Sink capability and peripheral support
 - USB Type-C with USB 3.0 host support

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mp: add imx8mp-venice-gw74xx-rpidsi overlay for display
Tim Harvey [Wed, 19 Jul 2023 15:29:20 +0000 (08:29 -0700)]
arm64: dts: imx8mp: add imx8mp-venice-gw74xx-rpidsi overlay for display

Add support for the following Raspberry Pi displays:
 - DFROBOT DRF0678 7in 800x480 TFT DSI capacitive touch
 - DFROBOT DRF0550 5in 800x480 TFT DSI capacitive touch

Both have the following hardware:
 - FocalTech FT5406 10pt touch controller (with no interrupt)
 - Powertip PH800480T013-IDF02 compatible panel
 - Toshiba TC358762 compatible DSI to DBI bridge
 - ATTINY based regulator used for backlight controller and panel enable

Support is added via a device-tree overlay. The touch controller is not
yet supported as polling mode is needed.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mn-var-som-symphony: update USB OTG for new board versions
Hugo Villeneuve [Wed, 19 Jul 2023 13:52:37 +0000 (09:52 -0400)]
arm64: dts: imx8mn-var-som-symphony: update USB OTG for new board versions

USB OTG is currently not working for new versions of the Variscite
Symphony EVK and imx8mn nano SOM (versions >= 1.4a).

The PTN5150 circuitry on newer versions of the Symphony EVK board has
a non-standard configuration in which the PTN5150 IRQ pin is left
unconnected, and the PTN5150 ID pin is connected to GPIO1_IO11. This
requires changes to the ptn5150 driver to support this new mode.
Variscite have indicated their intention to submit those changes
upstream.

In the meantime, import device tree changes from linux-5.15 branch of
varigit repos to at least make the USB OTG port operate correctly in
host mode.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mq: Add coresight trace components
Alexander Stein [Wed, 19 Jul 2023 09:06:16 +0000 (11:06 +0200)]
arm64: dts: imx8mq: Add coresight trace components

Add coresight trace components (ETM, ETF, ETB and Funnel).

┌───────┐  ┌───────┐  ┌───────┐
│ CPU0  ├─►│ ETM0  ├─►│       │
└───────┘  └───────┘  │       │
                      │       │
┌───────┐  ┌───────┐  │  ATP  │
│ CPU1  ├─►│ ETM1  ├─►│       │
└───────┘  └───────┘  │       │
                      │ FUNNEL│
┌───────┐  ┌───────┐  │       │
│ CPU2  ├─►│ ETM2  ├─►│       │
└───────┘  └───────┘  │       │   ┌─────┐
                      │       │   │     │
┌───────┐  ┌───────┐  │       │   │ M4  │
│ CPU3  ├─►│ ETM3  ├─►│       │   │     │
└───────┘  └───────┘  └───┬───┘   └──┬──┘                        AXI
                          │          │                            ▲
                          ▼          ▼                            │
                      ┌───────────────────────────┐   ┌─────┐   ┌─┴──┐
                      │          ATP FUNNEL       ├──►│ ETF ├─► │ETR │
                      └───────────────────────────┘   └─────┘   └────┘

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mq-librem5: Reduce usdhc2's post-power-on-delay-ms to 20ms
Sebastian Krzyszkowiak [Mon, 17 Jul 2023 10:00:56 +0000 (10:00 +0000)]
arm64: dts: imx8mq-librem5: Reduce usdhc2's post-power-on-delay-ms to 20ms

This appears to be enough for both Redpine and SparkLAN cards.
Waiting for too long makes us waste time in resume from system
suspend, so let's keep it as short as possible.

Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mq-librem5: Mark tps65982 as wakeup source
Sebastian Krzyszkowiak [Mon, 17 Jul 2023 10:00:55 +0000 (10:00 +0000)]
arm64: dts: imx8mq-librem5: Mark tps65982 as wakeup source

This allows to wake up from system suspend on USB-C plug/unplug.

Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mq-librem5-r4: Bump up proximity sensor's near level
Sebastian Krzyszkowiak [Mon, 17 Jul 2023 10:00:54 +0000 (10:00 +0000)]
arm64: dts: imx8mq-librem5-r4: Bump up proximity sensor's near level

There is at least one Evergreen phone out there that reports levels
of 5-6 at rest: https://gitlab.gnome.org/GNOME/calls/-/issues/560

Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mq-librem5: set audio-1v8 always-on
Martin Kepplinger [Mon, 17 Jul 2023 10:00:53 +0000 (10:00 +0000)]
arm64: dts: imx8mq-librem5: set audio-1v8 always-on

Unfortunately the codec can't be switched off on it's own. It would ground
the whole bus it's connected to (because of it's built-in diodes to VDD on
i2c pins), making all the other devices on the same bus inaccessible:

[    0.237154] lm3692x 2-0036: Cannot read/clear faults: -11
[    0.242628] lm3692x 2-0036: Fail writing initialization values
[    0.286462] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@30800000/mipi-dsi@30a00000 to encoder None-34: -517

Work around this hardware limitation by keeping audio-1v8 enabled.

Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mp-phyboard-pollux: Add missing usdhc clocks assignment
Jonas Kuenstler [Wed, 19 Jul 2023 07:13:13 +0000 (09:13 +0200)]
arm64: dts: imx8mp-phyboard-pollux: Add missing usdhc clocks assignment

Add the missing usdhc2 root clock to 200MHz to be able to support
SDR104 mode for SD-Card on phyBOARD-Pollux-i.MX8MP.

Signed-off-by: Jonas Kuenstler <j.kuenstler@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mp-phycore-som: Update regulator output voltages
Teresa Remmet [Wed, 19 Jul 2023 07:13:12 +0000 (09:13 +0200)]
arm64: dts: imx8mp-phycore-som: Update regulator output voltages

Set the regulator voltages to the min and max values the i.MX8MP
requires and not what the PMIC provides.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mp-phycore-som: Add regulator names
Teresa Remmet [Wed, 19 Jul 2023 07:13:11 +0000 (09:13 +0200)]
arm64: dts: imx8mp-phycore-som: Add regulator names

Add regulator-names for more meaningful description.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mp-phycore-som: Remove LDO2 and LDO4 pmic nodes
Teresa Remmet [Wed, 19 Jul 2023 07:13:10 +0000 (09:13 +0200)]
arm64: dts: imx8mp-phycore-som: Remove LDO2 and LDO4 pmic nodes

We do not touch LDO2 and LDO4 in linux as they are bypassed.
So remove them completely from device tree.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mp-phycore-som: Correct pad settings
Teresa Remmet [Wed, 19 Jul 2023 07:13:09 +0000 (09:13 +0200)]
arm64: dts: imx8mp-phycore-som: Correct pad settings

Do not set reserved bits 0 and 3 in pad configuration.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mp-phycore-som: Order properties alphabetically
Teresa Remmet [Wed, 19 Jul 2023 07:13:08 +0000 (09:13 +0200)]
arm64: dts: imx8mp-phycore-som: Order properties alphabetically

Rearrange properties in order:
- compatible
- reg
- other generic properties
- device specific properties
- vendor specific properties
- status

And use alphabetical order inside a group.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mp-phycore-som: Remove eth phy interrupt
Christian Hemp [Wed, 19 Jul 2023 07:13:07 +0000 (09:13 +0200)]
arm64: dts: imx8mp-phycore-som: Remove eth phy interrupt

In some occasions the ethernet phy IRQ can not be detected correctly
by the SoC. This leads to a non detected link in Linux. The problem is
caused by the buffer that adjusts the voltage between ethernet phy
and SoC. To workaround this, remove the IRQ support for the ethernet
phy and use polling instead.

Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: freescale: add initial device tree for MBa93xxLA SBC board
Alexander Stein [Tue, 18 Jul 2023 08:57:21 +0000 (10:57 +0200)]
arm64: dts: freescale: add initial device tree for MBa93xxLA SBC board

This adds support for TQMa93xx module and MBa93xxLA SBC board.
TQMa93xx is a SOM using i.MX93 SOC. The SOM features PMIC, RAM, e-MMC and
some optional peripherals like SPI-NOR, RTC, EEPROM, gyroscope and
secure element.
TQMa93xxLA is a solder on type SOM and can be used directly on MBa93XXLA.
TQMa93xxCA is a feature compatible, socketable type SOM.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mn-evk: Add camera support
Fabio Estevam [Sat, 15 Jul 2023 23:02:09 +0000 (20:02 -0300)]
arm64: dts: imx8mn-evk: Add camera support

Add support for the OV5640 camera.

Tested with the following commands:

media-ctl -l "'ov5640 2-003c':0 -> 'csis-32e30000.mipi-csi':0 [1]"
media-ctl -V "'ov5640 2-003c':0 [fmt:UYVY8_1X16/640x480 field:none]"
media-ctl -V "'crossbar':0 [fmt:UYVY8_1X16/640x480 field:none]"
media-ctl -V "'mxc_isi.0':0 [fmt:UYVY8_1X16/640x480 field:none]"
v4l2-ctl --device /dev/video0 --set-fmt-video=width=640,height=480,pixelformat=YUYV
v4l2-ctl --stream-mmap -d /dev/video0;
gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! waylandsink

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mn-evk: Add HDMI support
Fabio Estevam [Sat, 15 Jul 2023 23:02:08 +0000 (20:02 -0300)]
arm64: dts: imx8mn-evk: Add HDMI support

imx8mn-evk has a MIPI DSI port that can be used with a ADV7535 MIPI
DSI to HDMI bridge.

Add support for it.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm-evk: Add camera support
Fabio Estevam [Fri, 14 Jul 2023 03:08:09 +0000 (00:08 -0300)]
arm64: dts: imx8mm-evk: Add camera support

Add support for the OV5640 camera.

Tested with the following commands:

media-ctl -l "'ov5640 2-003c':0 -> 'csis-32e30000.mipi-csi':0 [1]"
media-ctl -V "'ov5640 2-003c':0 [fmt:UYVY8_1X16/640x480 field:none]"
media-ctl -V "'csis-32e30000.mipi-csi':0 [fmt:UYVY8_1X16/640x480 field:none]"
media-ctl -V "'csi':0 [fmt:UYVY8_1X16/640x480 field:none]";
v4l2-ctl --stream-mmap -d /dev/video0

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8qm-mek: delete A72 thermal zone
Frank Li [Thu, 13 Jul 2023 20:49:31 +0000 (16:49 -0400)]
arm64: dts: imx8qm-mek: delete A72 thermal zone

The A72 nodes have been deleted in this DTB. Removes the corresponding
thermal zone to ensure a successful build.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8qm: add thermal zone and cooling map
Frank Li [Thu, 13 Jul 2023 20:49:30 +0000 (16:49 -0400)]
arm64: dts: imx8qm: add thermal zone and cooling map

Add thermal zone and cooling map for cpufreq.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8qm: add cpu frequency table
Frank Li [Thu, 13 Jul 2023 20:49:29 +0000 (16:49 -0400)]
arm64: dts: imx8qm: add cpu frequency table

Add A53 and A72 opp_table.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mp-phyboard-pollux-rdk: Fix led sub-node names
Yashwanth Varakala [Thu, 13 Jul 2023 13:59:23 +0000 (15:59 +0200)]
arm64: dts: imx8mp-phyboard-pollux-rdk: Fix led sub-node names

Dtschema of the leds sub-node names expects "led-1" instead of led1.
So, the sub-node names are corrected according to the regexes.

Signed-off-by: Yashwanth Varakala <y.varakala@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm: add imx8mm-venice-gw72xx-0x-rpidsi overlay for display
Tim Harvey [Tue, 18 Jul 2023 20:55:38 +0000 (13:55 -0700)]
arm64: dts: imx8mm: add imx8mm-venice-gw72xx-0x-rpidsi overlay for display

Add support for the following Raspberry Pi displays:
 - DFROBOT DRF0678 7in 800x480 TFT DSI capacitive touch
 - DFROBOT DRF0550 5in 800x480 TFT DSI capacitive touch

Both have the following hardware:
 - FocalTech FT5406 10pt touch controller (with no interrupt)
 - Powertip PH800480T013-IDF02 compatible panel
 - Toshiba TC358762 compatible DSI to DBI bridge
 - ATTINY based regulator used for backlight controller and panel enable

Support is added via a device-tree overlay. The touch controller is not
yet supported as polling mode is needed.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm: add imx8mm-venice-gw73xx-0x-rpidsi overlay for display
Tim Harvey [Tue, 18 Jul 2023 20:55:00 +0000 (13:55 -0700)]
arm64: dts: imx8mm: add imx8mm-venice-gw73xx-0x-rpidsi overlay for display

Add support for the following Raspberry Pi displays:
 - DFROBOT DRF0678 7in 800x480 TFT DSI capacitive touch
 - DFROBOT DRF0550 5in 800x480 TFT DSI capacitive touch

Both have the following hardware:
 - FocalTech FT5406 10pt touch controller (with no interrupt)
 - Powertip PH800480T013-IDF02 compatible panel
 - Toshiba TC358762 compatible DSI to DBI bridge
 - ATTINY based regulator used for backlight controller and panel enable

Support is added via a device-tree overlay. The touch controller is not
yet supported as polling mode is needed.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mp: remove arm,primecell-periphid at etm nodes
Frank Li [Wed, 5 Jul 2023 20:59:53 +0000 (16:59 -0400)]
arm64: dts: imx8mp: remove arm,primecell-periphid at etm nodes

The reg size of etm nodes is incorrectly set to 64k instead of 4k. This
leads to a crash when calling amba_read_periphid().  After corrected reg
size, amba_read_periphid() retrieve the correct periphid.
arm,primecell-periphid were removed from the etm nodes.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: freescale: add missing space before {
Krzysztof Kozlowski [Wed, 5 Jul 2023 14:59:53 +0000 (16:59 +0200)]
arm64: dts: freescale: add missing space before {

Add missing whitespace between node name/label and opening {.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm: split PCIe ranges
Krzysztof Kozlowski [Sun, 2 Jul 2023 18:51:49 +0000 (20:51 +0200)]
arm64: dts: imx8mm: split PCIe ranges

Two entries are expected for PCIe ranges.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx: minor whitespace cleanup around '='
Krzysztof Kozlowski [Sun, 2 Jul 2023 18:51:48 +0000 (20:51 +0200)]
arm64: dts: imx: minor whitespace cleanup around '='

The DTS code coding style expects exactly one space before and after '='
sign.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx93: add "fsl,imx8ulp-lpuart" compatible for imx93
Sherry Sun [Tue, 27 Jun 2023 02:53:31 +0000 (10:53 +0800)]
arm64: dts: imx93: add "fsl,imx8ulp-lpuart" compatible for imx93

i.MX93 and i.MX8ULP lpuart add some new featurs based on i.MX7ULP, for
example, i.MX93 and i.MX8ULP can support EOP(end-of-packet) function
while i.MX7ULP doesn't support, so add "fsl,imx8ulp-lpuart" compatible
string for i.MX93 to support those new features.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8dxl: remove "fsl,imx7ulp-lpuart" compatible for imx8dxl
Sherry Sun [Tue, 27 Jun 2023 02:53:30 +0000 (10:53 +0800)]
arm64: dts: imx8dxl: remove "fsl,imx7ulp-lpuart" compatible for imx8dxl

Drop the i.MX8DXL backwards compatibility with i.MX7ULP since they
differ from clocks handling point of view.

dtbs_check has the following warnings:
linux-next/arch/arm64/boot/dts/freescale/imx8dxl-evk.dtb: serial@5a060000: compatible: 'oneOf' conditional failed, one must be fixed:
        ['fsl,imx8qxp-lpuart', 'fsl,imx7ulp-lpuart'] is too long
        'fsl,imx93-lpuart' was expected
        'fsl,imx8qxp-lpuart' is not one of ['fsl,imx8qm-lpuart', 'fsl,imx8dxl-lpuart']
        'fsl,imxrt1050-lpuart' was expected
        'fsl,imx8ulp-lpuart' was expected
        'fsl,imx8qxp-lpuart' was expected
        'fsl,imxrt1170-lpuart' was expected
        From schema: linux-next/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx93: enable CM33 for 11x11 EVK
Peng Fan [Sun, 25 Jun 2023 12:25:49 +0000 (20:25 +0800)]
arm64: dts: imx93: enable CM33 for 11x11 EVK

Add reserved memory node for rpmsg
Enable CM33 node with mailbox property included for doorbell.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx93: add cm33 node
Peng Fan [Sun, 25 Jun 2023 12:25:48 +0000 (20:25 +0800)]
arm64: dts: imx93: add cm33 node

Add CM33 node for i.MX93

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx93: add cma area for i.MX93 11x11 EVK
Peng Fan [Sun, 25 Jun 2023 12:25:47 +0000 (20:25 +0800)]
arm64: dts: imx93: add cma area for i.MX93 11x11 EVK

Add CMA region for DMA usage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx93: add thermal support
Peng Fan [Sun, 25 Jun 2023 12:25:46 +0000 (20:25 +0800)]
arm64: dts: imx93: add thermal support

Add tmu node and thermal-zones

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mn-evk: Pass GPIO_OPEN_DRAIN flag
Fabio Estevam [Wed, 21 Jun 2023 17:37:11 +0000 (14:37 -0300)]
arm64: dts: imx8mn-evk: Pass GPIO_OPEN_DRAIN flag

scl-gpios and sda-gpios need GPIO_OPEN_DRAIN flag, otherwise the
following run-time warning is seen:

gpio-144 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
gpio-146 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: ls1028a: sl28: get MAC addresses from VPD
Michael Walle [Fri, 16 Jun 2023 11:11:22 +0000 (13:11 +0200)]
arm64: dts: ls1028a: sl28: get MAC addresses from VPD

Now that it is finally possible to get the MAC addresses from the OTP
memory, use it to set the addresses of the network devices.

There are 8 reserved MAC addresses in total per board. Distribute them
as follows:

+----------+------+------+------+------+------+
|          | var1 | var2 | var3 | var4 | kbox |
+----------+------+------+------+------+------+
| enetc #0 |   +0 |      |      |   +0 |   +0 |
| enetc #1 |      |      |   +0 |   +1 |   +1 |
| enetc #2 |      |   +2 |      |      |   +2 |
| enetc #3 |      |   +3 |      |      |   +3 |
| felix p0 |      |   +0 |      |      |   +4 |
| felix p1 |      |   +1 |      |      |   +5 |
| felix p2 |      |      |      |      |   +6 |
| felix p3 |      |      |      |      |   +7 |
| felix p4 |      |      |      |      |      |
| felix p5 |      |      |      |      |      |
+----------+------+------+------+------+------+

An empty cell means, the port is not available and thus doesn't need an
ethernet address.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm-phyboard-polis: Add i2c4 sda-/scl-gpios
Cem Tenruh [Fri, 16 Jun 2023 09:50:11 +0000 (11:50 +0200)]
arm64: dts: imx8mm-phyboard-polis: Add i2c4 sda-/scl-gpios

Add i2c4 sda-/scl-gpios with the corresponding pinmux entries.

Signed-off-by: Cem Tenruh <c.tenruh@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm-phyboard-polis: Set debug uart muxing to 0x140
Yannic Moog [Fri, 16 Jun 2023 09:50:10 +0000 (11:50 +0200)]
arm64: dts: imx8mm-phyboard-polis: Set debug uart muxing to 0x140

Set Pull Resistors Enable bit to put signal into a defined state.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Cem Tenruh <c.tenruh@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: phycore-imx8mm: fix nor mtd partitions
Yannic Moog [Fri, 16 Jun 2023 09:50:08 +0000 (11:50 +0200)]
arm64: dts: phycore-imx8mm: fix nor mtd partitions

Add #address-cells and #size-cells properties to som_flash. This
enables correct parsing of added SPI NOR mtd partition child nodes that
are set in the bootloader.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Cem Tenruh <c.tenruh@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: freescale: imx8mm-phyboard-polis: Add TPM node
Yashwanth Varakala [Fri, 16 Jun 2023 09:50:06 +0000 (11:50 +0200)]
arm64: dts: freescale: imx8mm-phyboard-polis: Add TPM node

Add TPM node for phyBOARD-Polis i.MX 8M Mini which has the Infineon-SLB
9670 TPM2.0 module populated.

Signed-off-by: Yashwanth Varakala <y.varakala@phytec.de>
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Cem Tenruh <c.tenruh@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm-beacon: Add HDMI video with sound
Adam Ford [Thu, 15 Jun 2023 21:53:13 +0000 (16:53 -0500)]
arm64: dts: imx8mm-beacon: Add HDMI video with sound

The Beacon Embedded imx8mm development kit has a DSI
to HDMI bridge chip.  The bridge supports stereo audio
and hot-plugging.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm-beacon: Change camera I2C address
Adam Ford [Thu, 15 Jun 2023 21:53:12 +0000 (16:53 -0500)]
arm64: dts: imx8mm-beacon: Change camera I2C address

The DSI to HDMI bridge uses the address currently assigned to
the camera, so change the camera address to the alternative
address of 0x10 in preparation to enable the bridge.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mn-beacon: Add HDMI video with sound
Adam Ford [Thu, 15 Jun 2023 21:53:11 +0000 (16:53 -0500)]
arm64: dts: imx8mn-beacon: Add HDMI video with sound

The Beacon Embedded imx8mn development kit has a DSI
to HDMI bridge chip.  The bridge supports stereo audio
and hot-plug detection.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: freescale: fix imx8mm-venice-gw72xx-0x-imx219 overlay
Tim Harvey [Fri, 9 Jun 2023 23:35:21 +0000 (16:35 -0700)]
arm64: dts: freescale: fix imx8mm-venice-gw72xx-0x-imx219 overlay

Fix typo in imx8mm-venice-gw72xx-0x-imx219 overlay causing it to use
gw73xx configuration.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mp-venice-gw74xx: update to revB PCB
Tim Harvey [Fri, 9 Jun 2023 19:52:19 +0000 (12:52 -0700)]
arm64: dts: imx8mp-venice-gw74xx: update to revB PCB

Update the imx8mp-venice-gw74xx for revB:
 - add CAN1
 - add TIS-TPM on SPI2
 - add FAN controller
 - fix PMIC I2C bus (revA PMIC I2C was non-functional so no need for
   backward compatible option)
 - M2 socket GPIO's moved

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm-venice-gw7904: enable UART1 hardware flow control
Tim Harvey [Tue, 6 Jun 2023 15:38:19 +0000 (08:38 -0700)]
arm64: dts: imx8mm-venice-gw7904: enable UART1 hardware flow control

On the GW7904 uart1 can use UART3_TX/RX for hardware flow control
which was the desired default configuration. Remove uart3 and configure
uart1 for hardware flow control.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8m{m,n}-venice-gw7902: add SDR50/SDR104 SDIO support for wifi
Tim Harvey [Tue, 6 Jun 2023 15:35:50 +0000 (08:35 -0700)]
arm64: dts: imx8m{m,n}-venice-gw7902: add SDR50/SDR104 SDIO support for wifi

The GW7902 has a Murata LBEE5H 802.11abgnac / BT5 module based on the
Cypress CYW43455 which supports SDR50/SDR104.

Add dt pinctrl for the 100mhz and 200mhz states to support SDR50/SDR104.

While at it add the dt node for the CYW43455 wifi.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm-venice-gw7901: add SDR50/SDR104 SDIO support for wifi
Tim Harvey [Tue, 6 Jun 2023 15:33:51 +0000 (08:33 -0700)]
arm64: dts: imx8mm-venice-gw7901: add SDR50/SDR104 SDIO support for wifi

The GW7901 has a Murata LBEE5H 802.11abgnac / BT5 module based on the
Cypress CYW43455 which supports SDR50/SDR104.

Add dt pinctrl for the 100mhz and 200mhz states to support SDR50/SDR104.

While at it add the dt node for the CYW43455 wifi for the brcmfmac
driver.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mm-venice-gw7901: add cpu-supply node for cpufreq
Tim Harvey [Tue, 6 Jun 2023 15:32:38 +0000 (08:32 -0700)]
arm64: dts: imx8mm-venice-gw7901: add cpu-supply node for cpufreq

Add regulator config for cpu-supply in order to support cpufreq.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoarm64: dts: imx8mq-librem5: Use 'vqmmc-supply'
Fabio Estevam [Mon, 5 Jun 2023 21:49:13 +0000 (18:49 -0300)]
arm64: dts: imx8mq-librem5: Use 'vqmmc-supply'

'power-supply' is an invalid property for usdhc and it gives
the following schema warning:

imx8mq-librem5-r2.dtb: mmc@30b40000: Unevaluated properties are not allowed ('power-supply' was unexpected)
From schema: Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml

Change it to 'vqmmc-supply', which represents the supply for the bus IO.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
11 months agoLinux 6.5-rc1
Linus Torvalds [Sun, 9 Jul 2023 20:53:13 +0000 (13:53 -0700)]
Linux 6.5-rc1

11 months agoMAINTAINERS 2: Electric Boogaloo
Linus Torvalds [Sun, 9 Jul 2023 17:29:53 +0000 (10:29 -0700)]
MAINTAINERS 2: Electric Boogaloo

We just sorted the entries and fields last release, so just out of a
perverse sense of curiosity, I decided to see if we can keep things
ordered for even just one release.

The answer is "No. No we cannot".

I suggest that all kernel developers will need weekly training sessions,
involving a lot of Big Bird and Sesame Street.  And at the yearly
maintainer summit, we will all sing the alphabet song together.

I doubt I will keep doing this.  At some point "perverse sense of
curiosity" turns into just a cold dark place filled with sadness and
despair.

Repeats: 80e62bc8487b ("MAINTAINERS: re-sort all entries and fields")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 months agoMerge tag 'dma-mapping-6.5-2023-07-09' of git://git.infradead.org/users/hch/dma-mapping
Linus Torvalds [Sun, 9 Jul 2023 17:24:22 +0000 (10:24 -0700)]
Merge tag 'dma-mapping-6.5-2023-07-09' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping fixes from Christoph Hellwig:

 - swiotlb area sizing fixes (Petr Tesarik)

* tag 'dma-mapping-6.5-2023-07-09' of git://git.infradead.org/users/hch/dma-mapping:
  swiotlb: reduce the number of areas to match actual memory pool size
  swiotlb: always set the number of areas before allocating the pool

11 months agoMerge tag 'irq_urgent_for_v6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 9 Jul 2023 17:16:04 +0000 (10:16 -0700)]
Merge tag 'irq_urgent_for_v6.5_rc1' of git://git./linux/kernel/git/tip/tip

Pull irq update from Borislav Petkov:

 - Optimize IRQ domain's name assignment

* tag 'irq_urgent_for_v6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqdomain: Use return value of strreplace()

11 months agoMerge tag 'x86_urgent_for_v6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 9 Jul 2023 17:13:32 +0000 (10:13 -0700)]
Merge tag 'x86_urgent_for_v6.5_rc1' of git://git./linux/kernel/git/tip/tip

Pull x86 fpu fix from Borislav Petkov:

 - Do FPU AP initialization on Xen PV too which got missed by the recent
   boot reordering work

* tag 'x86_urgent_for_v6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/xen: Fix secondary processors' FPU initialization

11 months agoMerge tag 'x86-core-2023-07-09' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 9 Jul 2023 17:08:38 +0000 (10:08 -0700)]
Merge tag 'x86-core-2023-07-09' of git://git./linux/kernel/git/tip/tip

Pull x86 fix from Thomas Gleixner:
 "A single fix for the mechanism to park CPUs with an INIT IPI.

  On shutdown or kexec, the kernel tries to park the non-boot CPUs with
  an INIT IPI. But the same code path is also used by the crash utility.
  If the CPU which panics is not the boot CPU then it sends an INIT IPI
  to the boot CPU which resets the machine.

  Prevent this by validating that the CPU which runs the stop mechanism
  is the boot CPU. If not, leave the other CPUs in HLT"

* tag 'x86-core-2023-07-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/smp: Don't send INIT to boot CPU

11 months agoMerge tag 'mips_6.5_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Linus Torvalds [Sun, 9 Jul 2023 17:02:49 +0000 (10:02 -0700)]
Merge tag 'mips_6.5_1' of git://git./linux/kernel/git/mips/linux

Pull MIPS fixes from Thomas Bogendoerfer:

 - fixes for KVM

 - fix for loongson build and cpu probing

 - DT fixes

* tag 'mips_6.5_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  MIPS: kvm: Fix build error with KVM_MIPS_DEBUG_COP0_COUNTERS enabled
  MIPS: dts: add missing space before {
  MIPS: Loongson: Fix build error when make modules_install
  MIPS: KVM: Fix NULL pointer dereference
  MIPS: Loongson: Fix cpu_probe_loongson() again

11 months agoMerge tag 'xfs-6.5-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Sun, 9 Jul 2023 16:50:42 +0000 (09:50 -0700)]
Merge tag 'xfs-6.5-merge-6' of git://git./fs/xfs/xfs-linux

Pull xfs fix from Darrick Wong:
 "Nothing exciting here, just getting rid of a gcc warning that I got
  tired of seeing when I turn on gcov"

* tag 'xfs-6.5-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: fix uninit warning in xfs_growfs_data

11 months agoMerge tag '6.5-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sun, 9 Jul 2023 16:45:32 +0000 (09:45 -0700)]
Merge tag '6.5-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6

Pull more smb client updates from Steve French:

 - fix potential use after free in unmount

 - minor cleanup

 - add worker to cleanup stale directory leases

* tag '6.5-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Add a laundromat thread for cached directories
  smb: client: remove redundant pointer 'server'
  cifs: fix session state transition to avoid use-after-free issue

11 months agoMerge tag 'ntb-6.5' of https://github.com/jonmason/ntb
Linus Torvalds [Sun, 9 Jul 2023 16:35:51 +0000 (09:35 -0700)]
Merge tag 'ntb-6.5' of https://github.com/jonmason/ntb

Pull NTB updates from Jon Mason:
 "Fixes for pci_clean_master, error handling in driver inits, and
  various other issues/bugs"

* tag 'ntb-6.5' of https://github.com/jonmason/ntb:
  ntb: hw: amd: Fix debugfs_create_dir error checking
  ntb.rst: Fix copy and paste error
  ntb_netdev: Fix module_init problem
  ntb: intel: Remove redundant pci_clear_master
  ntb: epf: Remove redundant pci_clear_master
  ntb_hw_amd: Remove redundant pci_clear_master
  ntb: idt: drop redundant pci_enable_pcie_error_reporting()
  MAINTAINERS: git://github -> https://github.com for jonmason
  NTB: EPF: fix possible memory leak in pci_vntb_probe()
  NTB: ntb_tool: Add check for devm_kcalloc
  NTB: ntb_transport: fix possible memory leak while device_register() fails
  ntb: intel: Fix error handling in intel_ntb_pci_driver_init()
  NTB: amd: Fix error handling in amd_ntb_pci_driver_init()
  ntb: idt: Fix error handling in idt_pci_driver_init()

11 months agomm: lock newly mapped VMA with corrected ordering
Hugh Dickins [Sat, 8 Jul 2023 23:04:00 +0000 (16:04 -0700)]
mm: lock newly mapped VMA with corrected ordering

Lockdep is certainly right to complain about

  (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_write+0x2d/0x3f
                 but task is already holding lock:
  (&mapping->i_mmap_rwsem){+.+.}-{3:3}, at: mmap_region+0x4dc/0x6db

Invert those to the usual ordering.

Fixes: 33313a747e81 ("mm: lock newly mapped VMA which can be modified after it becomes visible")
Cc: stable@vger.kernel.org
Signed-off-by: Hugh Dickins <hughd@google.com>
Tested-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 months agoMerge tag 'mm-hotfixes-stable-2023-07-08-10-43' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sat, 8 Jul 2023 21:30:25 +0000 (14:30 -0700)]
Merge tag 'mm-hotfixes-stable-2023-07-08-10-43' of git://git./linux/kernel/git/akpm/mm

Pull hotfixes from Andrew Morton:
 "16 hotfixes. Six are cc:stable and the remainder address post-6.4
  issues"

The merge undoes the disabling of the CONFIG_PER_VMA_LOCK feature, since
it was all hopefully fixed in mainline.

* tag 'mm-hotfixes-stable-2023-07-08-10-43' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  lib: dhry: fix sleeping allocations inside non-preemptable section
  kasan, slub: fix HW_TAGS zeroing with slub_debug
  kasan: fix type cast in memory_is_poisoned_n
  mailmap: add entries for Heiko Stuebner
  mailmap: update manpage link
  bootmem: remove the vmemmap pages from kmemleak in free_bootmem_page
  MAINTAINERS: add linux-next info
  mailmap: add Markus Schneider-Pargmann
  writeback: account the number of pages written back
  mm: call arch_swap_restore() from do_swap_page()
  squashfs: fix cache race with migration
  mm/hugetlb.c: fix a bug within a BUG(): inconsistent pte comparison
  docs: update ocfs2-devel mailing list address
  MAINTAINERS: update ocfs2-devel mailing list address
  mm: disable CONFIG_PER_VMA_LOCK until its fixed
  fork: lock VMAs of the parent process when forking

11 months agofork: lock VMAs of the parent process when forking
Suren Baghdasaryan [Sat, 8 Jul 2023 19:12:12 +0000 (12:12 -0700)]
fork: lock VMAs of the parent process when forking

When forking a child process, the parent write-protects anonymous pages
and COW-shares them with the child being forked using copy_present_pte().

We must not take any concurrent page faults on the source vma's as they
are being processed, as we expect both the vma and the pte's behind it
to be stable.  For example, the anon_vma_fork() expects the parents
vma->anon_vma to not change during the vma copy.

A concurrent page fault on a page newly marked read-only by the page
copy might trigger wp_page_copy() and a anon_vma_prepare(vma) on the
source vma, defeating the anon_vma_clone() that wasn't done because the
parent vma originally didn't have an anon_vma, but we now might end up
copying a pte entry for a page that has one.

Before the per-vma lock based changes, the mmap_lock guaranteed
exclusion with concurrent page faults.  But now we need to do a
vma_start_write() to make sure no concurrent faults happen on this vma
while it is being processed.

This fix can potentially regress some fork-heavy workloads.  Kernel
build time did not show noticeable regression on a 56-core machine while
a stress test mapping 10000 VMAs and forking 5000 times in a tight loop
shows ~5% regression.  If such fork time regression is unacceptable,
disabling CONFIG_PER_VMA_LOCK should restore its performance.  Further
optimizations are possible if this regression proves to be problematic.

Suggested-by: David Hildenbrand <david@redhat.com>
Reported-by: Jiri Slaby <jirislaby@kernel.org>
Closes: https://lore.kernel.org/all/dbdef34c-3a07-5951-e1ae-e9c6e3cdf51b@kernel.org/
Reported-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Closes: https://lore.kernel.org/all/b198d649-f4bf-b971-31d0-e8433ec2a34c@applied-asynchrony.com/
Reported-by: Jacob Young <jacobly.alt@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217624
Fixes: 0bff0aaea03e ("x86/mm: try VMA lock-based page fault handling first")
Cc: stable@vger.kernel.org
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 months agomm: lock newly mapped VMA which can be modified after it becomes visible
Suren Baghdasaryan [Sat, 8 Jul 2023 19:12:11 +0000 (12:12 -0700)]
mm: lock newly mapped VMA which can be modified after it becomes visible

mmap_region adds a newly created VMA into VMA tree and might modify it
afterwards before dropping the mmap_lock.  This poses a problem for page
faults handled under per-VMA locks because they don't take the mmap_lock
and can stumble on this VMA while it's still being modified.  Currently
this does not pose a problem since post-addition modifications are done
only for file-backed VMAs, which are not handled under per-VMA lock.
However, once support for handling file-backed page faults with per-VMA
locks is added, this will become a race.

Fix this by write-locking the VMA before inserting it into the VMA tree.
Other places where a new VMA is added into VMA tree do not modify it
after the insertion, so do not need the same locking.

Cc: stable@vger.kernel.org
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 months agomm: lock a vma before stack expansion
Suren Baghdasaryan [Sat, 8 Jul 2023 19:12:10 +0000 (12:12 -0700)]
mm: lock a vma before stack expansion

With recent changes necessitating mmap_lock to be held for write while
expanding a stack, per-VMA locks should follow the same rules and be
write-locked to prevent page faults into the VMA being expanded. Add
the necessary locking.

Cc: stable@vger.kernel.org
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 months agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 8 Jul 2023 19:35:18 +0000 (12:35 -0700)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi

Pull more SCSI updates from James Bottomley:
 "A few late arriving patches that missed the initial pull request. It's
  mostly bug fixes (the dt-bindings is a fix for the initial pull)"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: ufs: core: Remove unused function declaration
  scsi: target: docs: Remove tcm_mod_builder.py
  scsi: target: iblock: Quiet bool conversion warning with pr_preempt use
  scsi: dt-bindings: ufs: qcom: Fix ICE phandle
  scsi: core: Simplify scsi_cdl_check_cmd()
  scsi: isci: Fix comment typo
  scsi: smartpqi: Replace one-element arrays with flexible-array members
  scsi: target: tcmu: Replace strlcpy() with strscpy()
  scsi: ncr53c8xx: Replace strlcpy() with strscpy()
  scsi: lpfc: Fix lpfc_name struct packing

11 months agoMerge tag 'i2c-for-6.5-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 8 Jul 2023 19:28:00 +0000 (12:28 -0700)]
Merge tag 'i2c-for-6.5-rc1-part2' of git://git./linux/kernel/git/wsa/linux

Pull more i2c updates from Wolfram Sang:

 - xiic patch should have been in the original pull but slipped through

 - mpc patch fixes a build regression

 - nomadik cleanup

* tag 'i2c-for-6.5-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: mpc: Drop unused variable
  i2c: nomadik: Remove a useless call in the remove function
  i2c: xiic: Don't try to handle more interrupt events after error

11 months agoMerge tag 'hardening-v6.5-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 8 Jul 2023 19:08:39 +0000 (12:08 -0700)]
Merge tag 'hardening-v6.5-rc1-fixes' of git://git./linux/kernel/git/kees/linux

Pull hardening fixes from Kees Cook:

 - Check for NULL bdev in LoadPin (Matthias Kaehlcke)

 - Revert unwanted KUnit FORTIFY build default

 - Fix 1-element array causing boot warnings with xhci-hub

* tag 'hardening-v6.5-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  usb: ch9: Replace bmSublinkSpeedAttr 1-element array with flexible array
  Revert "fortify: Allow KUnit test to build without FORTIFY"
  dm: verity-loadpin: Add NULL pointer check for 'bdev' parameter

11 months agontb: hw: amd: Fix debugfs_create_dir error checking
Anup Sharma [Fri, 12 May 2023 20:24:34 +0000 (01:54 +0530)]
ntb: hw: amd: Fix debugfs_create_dir error checking

The debugfs_create_dir function returns ERR_PTR in case of error, and the
only correct way to check if an error occurred is 'IS_ERR' inline function.
This patch will replace the null-comparison with IS_ERR.

Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
Suggested-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
11 months agoMerge tag 'perf-tools-for-v6.5-2-2023-07-06' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sat, 8 Jul 2023 17:21:51 +0000 (10:21 -0700)]
Merge tag 'perf-tools-for-v6.5-2-2023-07-06' of git://git./linux/kernel/git/perf/perf-tools-next

Pull more perf tools updates from Namhyung Kim:
 "These are remaining changes and fixes for this cycle.

  Build:

   - Allow generating vmlinux.h from BTF using `make GEN_VMLINUX_H=1`
     and skip if the vmlinux has no BTF.

   - Replace deprecated clang -target xxx option by --target=xxx.

  perf record:

   - Print event attributes with well known type and config symbols in
     the debug output like below:

       # perf record -e cycles,cpu-clock -C0 -vv true
       <SNIP>
       ------------------------------------------------------------
       perf_event_attr:
         type                             0 (PERF_TYPE_HARDWARE)
         size                             136
         config                           0 (PERF_COUNT_HW_CPU_CYCLES)
         { sample_period, sample_freq }   4000
         sample_type                      IP|TID|TIME|CPU|PERIOD|IDENTIFIER
         read_format                      ID
         disabled                         1
         inherit                          1
         freq                             1
         sample_id_all                    1
         exclude_guest                    1
       ------------------------------------------------------------
       sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
       ------------------------------------------------------------
       perf_event_attr:
         type                             1 (PERF_TYPE_SOFTWARE)
         size                             136
         config                           0 (PERF_COUNT_SW_CPU_CLOCK)
         { sample_period, sample_freq }   4000
         sample_type                      IP|TID|TIME|CPU|PERIOD|IDENTIFIER
         read_format                      ID
         disabled                         1
         inherit                          1
         freq                             1
         sample_id_all                    1
         exclude_guest                    1

   - Update AMD IBS event error message since it now support per-process
     profiling but no priviledge filters.

       $ sudo perf record -e ibs_op//k -C 0
       Error:
       AMD IBS doesn't support privilege filtering. Try again without
       the privilege modifiers (like 'k') at the end.

  perf lock contention:

   - Support CSV style output using -x option

       $ sudo perf lock con -ab -x, sleep 1
       # output: contended, total wait, max wait, avg wait, type, caller
       19, 194232, 21415, 10222, spinlock, process_one_work+0x1f0
       15, 162748, 23843, 10849, rwsem:R, do_user_addr_fault+0x40e
       4, 86740, 23415, 21685, rwlock:R, ep_poll_callback+0x2d
       1, 84281, 84281, 84281, mutex, iwl_mvm_async_handlers_wk+0x135
       8, 67608, 27404, 8451, spinlock, __queue_work+0x174
       3, 58616, 31125, 19538, rwsem:W, do_mprotect_pkey+0xff
       3, 52953, 21172, 17651, rwlock:W, do_epoll_wait+0x248
       2, 30324, 19704, 15162, rwsem:R, do_madvise+0x3ad
       1, 24619, 24619, 24619, spinlock, rcu_core+0xd4

   - Add --output option to save the data to a file not to be interfered
     by other debug messages.

  Test:

   - Fix event parsing test on ARM where there's no raw PMU nor supports
     PERF_PMU_CAP_EXTENDED_HW_TYPE.

   - Update the lock contention test case for CSV output.

   - Fix a segfault in the daemon command test.

  Vendor events (JSON):

   - Add has_event() to check if the given event is available on system
     at runtime. On Intel machines, some transaction events may not be
     present when TSC extensions are disabled.

   - Update Intel event metrics.

  Misc:

   - Sort symbols by name using an external array of pointers instead of
     a rbtree node in the symbol. This will save 16-bytes or 24-bytes
     per symbol whether the sorting is actually requested or not.

   - Fix unwinding DWARF callstacks using libdw when --symfs option is
     used"

* tag 'perf-tools-for-v6.5-2-2023-07-06' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next: (38 commits)
  perf test: Fix event parsing test when PERF_PMU_CAP_EXTENDED_HW_TYPE isn't supported.
  perf test: Fix event parsing test on Arm
  perf evsel amd: Fix IBS error message
  perf: unwind: Fix symfs with libdw
  perf symbol: Fix uninitialized return value in symbols__find_by_name()
  perf test: Test perf lock contention CSV output
  perf lock contention: Add --output option
  perf lock contention: Add -x option for CSV style output
  perf lock: Remove stale comments
  perf vendor events intel: Update tigerlake to 1.13
  perf vendor events intel: Update skylakex to 1.31
  perf vendor events intel: Update skylake to 57
  perf vendor events intel: Update sapphirerapids to 1.14
  perf vendor events intel: Update icelakex to 1.21
  perf vendor events intel: Update icelake to 1.19
  perf vendor events intel: Update cascadelakex to 1.19
  perf vendor events intel: Update meteorlake to 1.03
  perf vendor events intel: Add rocketlake events/metrics
  perf vendor metrics intel: Make transaction metrics conditional
  perf jevents: Support for has_event function
  ...

11 months agoMerge tag 'bitmap-6.5-rc1' of https://github.com/norov/linux
Linus Torvalds [Sat, 8 Jul 2023 17:02:24 +0000 (10:02 -0700)]
Merge tag 'bitmap-6.5-rc1' of https://github.com/norov/linux

Pull bitmap updates from Yury Norov:
 "Fixes for different bitmap pieces:

   - lib/test_bitmap: increment failure counter properly

     The tests that don't use expect_eq() macro to determine that a test
     is failured must increment failed_tests explicitly.

   - lib/bitmap: drop optimization of bitmap_{from,to}_arr64

     bitmap_{from,to}_arr64() optimization is overly optimistic
     on 32-bit LE architectures when it's wired to
     bitmap_copy_clear_tail().

   - nodemask: Drop duplicate check in for_each_node_mask()

     As the return value type of first_node() became unsigned, the node
     >= 0 became unnecessary.

   - cpumask: fix function description kernel-doc notation

   - MAINTAINERS: Add bits.h and bitfield.h to the BITMAP API record

     Add linux/bits.h and linux/bitfield.h for visibility"

* tag 'bitmap-6.5-rc1' of https://github.com/norov/linux:
  MAINTAINERS: Add bitfield.h to the BITMAP API record
  MAINTAINERS: Add bits.h to the BITMAP API record
  cpumask: fix function description kernel-doc notation
  nodemask: Drop duplicate check in for_each_node_mask()
  lib/bitmap: drop optimization of bitmap_{from,to}_arr64
  lib/test_bitmap: increment failure counter properly

11 months agolib: dhry: fix sleeping allocations inside non-preemptable section
Geert Uytterhoeven [Wed, 5 Jul 2023 14:54:04 +0000 (16:54 +0200)]
lib: dhry: fix sleeping allocations inside non-preemptable section

The Smatch static checker reports the following warnings:

    lib/dhry_run.c:38 dhry_benchmark() warn: sleeping in atomic context
    lib/dhry_run.c:43 dhry_benchmark() warn: sleeping in atomic context

Indeed, dhry() does sleeping allocations inside the non-preemptable
section delimited by get_cpu()/put_cpu().

Fix this by using atomic allocations instead.
Add error handling, as atomic these allocations may fail.

Link: https://lkml.kernel.org/r/bac6d517818a7cd8efe217c1ad649fffab9cc371.1688568764.git.geert+renesas@glider.be
Fixes: 13684e966d46283e ("lib: dhry: fix unstable smp_processor_id(_) usage")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/0469eb3a-02eb-4b41-b189-de20b931fa56@moroto.mountain
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 months agokasan, slub: fix HW_TAGS zeroing with slub_debug
Andrey Konovalov [Wed, 5 Jul 2023 12:44:02 +0000 (14:44 +0200)]
kasan, slub: fix HW_TAGS zeroing with slub_debug

Commit 946fa0dbf2d8 ("mm/slub: extend redzone check to extra allocated
kmalloc space than requested") added precise kmalloc redzone poisoning to
the slub_debug functionality.

However, this commit didn't account for HW_TAGS KASAN fully initializing
the object via its built-in memory initialization feature.  Even though
HW_TAGS KASAN memory initialization contains special memory initialization
handling for when slub_debug is enabled, it does not account for in-object
slub_debug redzones.  As a result, HW_TAGS KASAN can overwrite these
redzones and cause false-positive slub_debug reports.

To fix the issue, avoid HW_TAGS KASAN memory initialization when
slub_debug is enabled altogether.  Implement this by moving the
__slub_debug_enabled check to slab_post_alloc_hook.  Common slab code
seems like a more appropriate place for a slub_debug check anyway.

Link: https://lkml.kernel.org/r/678ac92ab790dba9198f9ca14f405651b97c8502.1688561016.git.andreyknvl@google.com
Fixes: 946fa0dbf2d8 ("mm/slub: extend redzone check to extra allocated kmalloc space than requested")
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reported-by: Will Deacon <will@kernel.org>
Acked-by: Marco Elver <elver@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Feng Tang <feng.tang@intel.com>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: kasan-dev@googlegroups.com
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 months agokasan: fix type cast in memory_is_poisoned_n
Andrey Konovalov [Tue, 4 Jul 2023 00:52:05 +0000 (02:52 +0200)]
kasan: fix type cast in memory_is_poisoned_n

Commit bb6e04a173f0 ("kasan: use internal prototypes matching gcc-13
builtins") introduced a bug into the memory_is_poisoned_n implementation:
it effectively removed the cast to a signed integer type after applying
KASAN_GRANULE_MASK.

As a result, KASAN started failing to properly check memset, memcpy, and
other similar functions.

Fix the bug by adding the cast back (through an additional signed integer
variable to make the code more readable).

Link: https://lkml.kernel.org/r/8c9e0251c2b8b81016255709d4ec42942dcaf018.1688431866.git.andreyknvl@google.com
Fixes: bb6e04a173f0 ("kasan: use internal prototypes matching gcc-13 builtins")
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Marco Elver <elver@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 months agomailmap: add entries for Heiko Stuebner
Heiko Stuebner [Tue, 4 Jul 2023 16:39:19 +0000 (18:39 +0200)]
mailmap: add entries for Heiko Stuebner

I am going to lose my vrull.eu address at the end of july, and while
adding it to mailmap I also realised that there are more old addresses
from me dangling, so update .mailmap for all of them.

Link: https://lkml.kernel.org/r/20230704163919.1136784-3-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Heiko Stuebner <heiko.stuebner@vrull.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>