OSDN Git Service

tomoyo/tomoyo-test1.git
7 years agoMerge tag 'juno-updates-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Olof Johansson [Mon, 19 Jun 2017 03:55:51 +0000 (20:55 -0700)]
Merge tag 'juno-updates-4.13' of git://git./linux/kernel/git/sudeep.holla/linux into next/dt64

ARMv8 Vexpress/Juno DT updates for v4.13

1. Adds support for Coresight CPU debug MMIO interface on all Juno variants.

2. Enables support for few SMMUs on Juno which were previously disabled
   waiting for IOMMU-backed DMA API support to be stabilised.

* tag 'juno-updates-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  arm64: dts: juno: enable some SMMUs
  arm64: dts: juno: add coresight CPU debug nodes

Signed-off-by: Olof Johansson <olof@lixom.net>
7 years agoMerge tag 'sunxi-dt-h5-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Mon, 19 Jun 2017 03:45:17 +0000 (20:45 -0700)]
Merge tag 'sunxi-dt-h5-for-4.13' of https://git./linux/kernel/git/sunxi/linux into next/dt64

Allwinner H5 DT changes for 4.13

Just like the H3, this is mostly about enabling the EMAC on the H5, and
also has a new board, the Orange Pi Zero Plus 2

* tag 'sunxi-dt-h5-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: allwinner: h5: Add initial Orangepi Zero Plus 2 support
  arm64: allwinner: h5: enable dwmac-sun8i for Nano Pi NEO2
  arm64: allwinner: h5: enable dwmac-sun8i for Orange Pi Prime
  arm64: allwinner: h5: sort the device nodes in / part for some boards
  arm64: allwinner: h5: add support for NanoPi NEO2 board
  arm64: allwinner: h5: add support for Orange Pi Prime board
  arm64: allwinner: orangepi-pc2: Enable dwmac-sun8i
  arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver
  arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module
  ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros

Signed-off-by: Olof Johansson <olof@lixom.net>
7 years agoMerge tag 'sunxi-dt64-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Mon, 19 Jun 2017 03:41:35 +0000 (20:41 -0700)]
Merge tag 'sunxi-dt64-for-4.13' of https://git./linux/kernel/git/sunxi/linux into next/dt64

Allwinner arm64 DT changes for 4.13

Our usual arm64 changes. The most notable things are the EMAC support and
USB support enhancements. There's also support for the SoPine SoM, and the
OrangePi Win.

* tag 'sunxi-dt64-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
  arm64: allwinner: a64: add device tree for SoPine with baseboard
  arm64: allwinner: bananapi-m64: Enable dwmac-sun8i
  arm64: allwinner: pine64-plus: Enable dwmac-sun8i
  arm64: allwinner: pine64: Enable dwmac-sun8i
  arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver
  arm64: allwinner: sun50i-a64: Add dt node for the syscon control module
  arm64: allwinner: a64: add DTSI file for SoPine SoM
  arm64: allwinner: a64: Convert CCU raw number references to macros
  arm64: dts: allwinner: pine64: Prepare optional UART nodes with pinctrl
  arm64: allwinner: a64: enable RSB on A64
  arm64: dts: allwinner: pine64: Add remaining UART aliases
  arm64: dts: allwinner: a64: Add UART2 pin nodes
  arm64: allwinner: a64: enable EHCI0/OHCI0 for Pine64
  arm64: allwinner: a64: add EHCI0/OHCI0 nodes to A64 DTSI

Signed-off-by: Olof Johansson <olof@lixom.net>
7 years agoMerge tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman...
Olof Johansson [Mon, 19 Jun 2017 03:38:22 +0000 (20:38 -0700)]
Merge tag 'amlogic-dt64' of git://git./linux/kernel/git/khilman/linux-amlogic into next/dt64

Amlogic 64-bit DT changes for v4.13
- cleanup/reorganize alphabetically to better avoid conflicts
- add HDMI and CVBS nodes for multiple boards
- new pinctrl pins: SPI, HDMI CEC
- SCPI: fix thermal sensor reporting

New board support
- NanoPi K2 (GXBB)
- R-Box Pro (GXM)

* tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: (36 commits)
  ARM64: dts: meson-gxl-s905x-p212: Add HDMI and CVBS nodes
  ARM64: dts: meson-gxl-s905x-khadas-vim: Add HDMI nodes
  ARM64: dts: meson-gxl-s905d-p230: Add HDMI nodes
  ARM64: dts: meson-gxbb-wetek-play2: Add HDMI and CVBS Nodes
  ARM64: dts: meson-gx: Fix sensors reporting from SCP
  ARM64: dts: meson-gxl: Add SPI pinctrl nodes
  ARM64: dts: meson-gxbb: Add SPI pinctrl nodes
  ARM64: dts: meson-gxl: Add Ethernet PHY LEDS pins nodes
  ARM64: dts: meson-gxl: Add CEC pins nodes
  ARM64: dts: meson-gxbb: Add CEC pins nodes
  ARM64: dts: Fix GXBB periphs pinctrl pull-enable register base
  ARM64: dts: Fix GXL periphs pinctrl pull-enable register base
  ARM64: dts: meson-gxl: Fix pinctrl periphs gpio-ranges
  arm64: dts: amlogic: Add NanoPi K2
  dt-bindings: arm: amlogic: Add NanoPi K2
  arm64: dts: meson-gxm: Add R-Box Pro
  dt-bindings: arm: amlogic: Add R-Box Pro
  dt-bindings: Add Kingnovel vendor prefix
  arm64: dts: meson-gx-p23x-q20x: Fix node order
  arm64: dts: meson-gxm-nexbox-a1: Fix node order
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
7 years agoMerge tag 'arm-soc/for-4.13/devicetree-arm64' of http://github.com/Broadcom/stblinux...
Olof Johansson [Mon, 19 Jun 2017 03:18:44 +0000 (20:18 -0700)]
Merge tag 'arm-soc/for-4.13/devicetree-arm64' of github.com/Broadcom/stblinux into next/dt64

This pull request contains Broadcom ARM64-based SoCs Device Tree changes for
4.13. Please note the following from Eric:

I've based this summary on the bcm2835-dt-next tag, to clarify what's in this
patch series, but it does require being careful since it involves a cross-merge
between branches.

- Anup documents the Broadcom Stingray binding, common clocks, adds initial
  support for the Stingray DTSI and DTS files and adds support for the PL022,
  PL330 and SP805

- Sandeep adds the clock nodes to the Stingray Device Tree nodes

- Pramod adds support for the NAND, pinctrl, GPIO to the Stingray Device Tree nodes

- Oza adds I2C Device Tree nodes to the Stingray DTSes

- Srinath adds PWM and SDHCI Device Tree nodes for the Stingray SoC

- Ravijeta adds support for the USB Dual Role PHY on Northstar 2

- Gerd starts adding references to the sdhost and sdhci controllers, and then
  switches the sdcard to to use the SDHOST (faster than SDHCI)

- Stefan defines the BCM2837 thermal coefficients in order for the Raspberry Pi
  thermal driver to work correctly

* tag 'arm-soc/for-4.13/devicetree-arm64' of http://github.com/Broadcom/stblinux:
  arm64: dts: NS2: Add USB DRD PHY device tree node
  ARM64: dts: bcm2837: Define CPU thermal coefficients
  arm64: dts: Add PWM and SDHCI DT nodes for Stingray SOC
  arm64: dts: Add PL022, PL330 and SP805 DT nodes for Stingray
  arm64: dts: Add I2C DT nodes for Stingray SoC
  arm64: dts: Add GPIO DT nodes for Stingray SOC
  arm64: dts: Add pinctrl DT nodes for Stingray SOC
  arm64: dts: Add NAND DT nodes for Stingray SOC
  arm64: dts: Add clock DT nodes for Stingray SOC
  arm64: dts: Initial DTS files for Broadcom Stingray SOC
  dt-bindings: clk: Extend binding doc for Stingray SOC
  dt-bindings: bcm: Add Broadcom Stingray bindings document
  ARM: dts: bcm283x: switch from &sdhci to &sdhost
  arm64: dts: bcm2837: add &sdhci and &sdhost
  ARM: dts: bcm283x: Add CPU thermal zone with 1 trip point
  ARM: dts: Add devicetree for the Raspberry Pi 3, for arm32 (v6)

Signed-off-by: Olof Johansson <olof@lixom.net>
7 years agoMerge tag 'uniphier-dt64-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Mon, 19 Jun 2017 03:12:57 +0000 (20:12 -0700)]
Merge tag 'uniphier-dt64-v4.13' of git://git./linux/kernel/git/masahiroy/linux-uniphier into next/dt64

UniPhier ARM64 SoC DT updates for v4.13

- specify timing delay properties of eMMC
- fix W=1 build warnings
- increase memory reserve size
- use SPDX License Identifier
- add new board support (LD11/LD20 global)

* tag 'uniphier-dt64-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier:
  arm64: dts: uniphier: add support for LD20 Global board
  arm64: dts: uniphier: add support for LD11 Global board
  arm64: dts: uniphier: use SPDX-License-Identifier
  arm64: dts: uniphier: reserve more memory for LD11/LD20
  arm64: dts: uniphier: fix simple-bus unit address format error
  arm64: dts: uniphier: Use - instead of @ for DT OPP entries
  arm64: dts: uniphier: add cdns, phy-dll-delay-sdclk(-hsmmc) for eMMC
  arm64: dts: uniphier: add input-delay properties to Cadence eMMC node

Signed-off-by: Olof Johansson <olof@lixom.net>
7 years agoMerge tag 'v4.12-next-dts64' of https://github.com/mbgg/linux-mediatek into next...
Olof Johansson [Mon, 19 Jun 2017 02:35:00 +0000 (19:35 -0700)]
Merge tag 'v4.12-next-dts64' of https://github.com/mbgg/linux-mediatek into next/dt64

Add device tree nodes for
mt8173:
- split USB SuperSpeed port in HighSpeed and SuperSpeed ports.
- move USB phy clocks up in hierarchy to met new bindings description
- move MDP nodes up in hierarchy to met new bindings description

mt6797:
- add basic SoC support
- add clock driver
- add power domain

dt-bindings:
- clean-up i2c binding description
- add binding for mt2701 i2c node
- add fallback compatible to scpsys binding description
- add bindings description for mt7622 and mt6796

* tag 'v4.12-next-dts64' of https://github.com/mbgg/linux-mediatek:
  dt-bindings: mediatek: add bindings for MediaTek MT7622 SoC
  arm64: dts: mt8173: Fix mdp device tree
  dt-bindings: i2c: Add Mediatek MT2701 i2c binding
  dt-bindings: i2c-mtk: Add mt7623 binding
  dt-bindings: i2c-mtk: Delete bindings
  dt-bindings: i2c-mt6577: Rename file to reflect bindings
  dt-bindings: mtk-sysirq: Correct bindings for supported SoCs
  arm64: dts: mediatek: add clk and scp nodes for MT6797
  dt-bindings: mediatek: add MT6797 power dt-bindings
  arm64: dts: mediatek: add mt6797 support
  dt-bindings: mediatek: Add bindings for mediatek MT6797 Platform
  arm64: dts: mt8173: move clock from phy node into port nodes
  arm64: dts: mt8173: split usb SuperSpeed port into two ports

Signed-off-by: Olof Johansson <olof@lixom.net>
7 years agoMerge tag 'samsung-dt64-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk...
Olof Johansson [Mon, 19 Jun 2017 02:11:03 +0000 (19:11 -0700)]
Merge tag 'samsung-dt64-4.13' of git://git./linux/kernel/git/krzk/linux into next/dt64

Samsung DeviceTree ARM64 update for v4.13:
1. Remove unneeded TE interrupt gpio property.

* tag 'samsung-dt64-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: exynos: Remove the te-gpios property in the TM2 boards

Signed-off-by: Olof Johansson <olof@lixom.net>
7 years agoMerge tag 'v4.13-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Mon, 19 Jun 2017 02:08:10 +0000 (19:08 -0700)]
Merge tag 'v4.13-rockchip-dts64-1' of git://git./linux/kernel/git/mmind/linux-rockchip into next/dt64

Support for the new rk3399 firefly board; extending the pcie ranges to
make usage of pci switches possible; some more qos and pinctrl nodes on
rk3399; updates for the rk3399 cpu operating points including separate
opps for the higher rates OP1 variant of the chip and mmc-nodes for
the rk3328.

* tag 'v4.13-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: update common rk3399 operating points
  arm64: dts: rockchip: introduce rk3399-op1 operating points
  arm64: dts: rockchip: enable usb3 controllers on rk3399-firefly
  arm64: dts: rockchip: add ethernet0 alias on rk3399
  arm64: dts: rockchip: bring rk3399-firefly power-tree in line
  arm64: dts: rockchip: add sdmmc/sdio/emmc nodes for RK3328 SoCs
  arm64: dts: rockchip: extent IORESOURCE_MEM_64 of PCIe for rk3399
  arm64: dts: rockchip: extent bus-ranges of PCIe for rk3399
  arm64: dts: rockchip: add pinctrl settings for some rk3399 peripherals
  arm64: dts: rockchip: add some missing qos nodes on rk3399
  arm64: dts: rockchip: add support for firefly-rk3399 board
  dt-bindings: add firefly-rk3399 board support

Signed-off-by: Olof Johansson <olof@lixom.net>
7 years agoMerge tag 'bcm2835-dt-64-next-2017-06-08' into devicetree-arm64/next
Florian Fainelli [Tue, 13 Jun 2017 19:39:57 +0000 (12:39 -0700)]
Merge tag 'bcm2835-dt-64-next-2017-06-08' into devicetree-arm64/next

This pull request brings in the switch to sdhost for MMC on RPi3
(improving storage performance and leaving sdhci for wireless), and
the correct CPU thermal coefficients.

The thermal changes required a merge from bcm2835-dt-next, where the
nodes were added.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoarm64: allwinner: h5: Add initial Orangepi Zero Plus 2 support
Jagan Teki [Mon, 12 Jun 2017 09:53:14 +0000 (15:23 +0530)]
arm64: allwinner: h5: Add initial Orangepi Zero Plus 2 support

Orangepi Zero Plus 2 is an open-source single-board computer
using the Allwinner h5 SOC.

H5 Orangepi Zero Plus 2 has
- Quad-core Cortex-A53
- 512MB DDR3
- micrSD slot and 8GB eMMC
- Debug TTL UART
- HDMI
- Wifi + BT
- OTG+power supply

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: a64: Add initial Orangepi Win/WinPlus support
Jagan Teki [Mon, 12 Jun 2017 09:53:13 +0000 (15:23 +0530)]
arm64: allwinner: a64: Add initial Orangepi Win/WinPlus support

Orangepi Win/WinPlus is an open-source single-board computer
using the Allwinner A64 SOC.

A64 Orangepi Win/WinPlus has
- A64 Quad-core Cortex-A53 64bit
- 1GB(Win)/2GB(Win Plus) DDR3 SDRAM
- Debug TTL UART
- Four USB 2.0
- HDMI
- LCD
- Audio and MIC
- Wifi + BT
- IR receiver
- 5V DC power supply

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: dts: uniphier: add support for LD20 Global board
Kunihiko Hayashi [Mon, 12 Jun 2017 06:07:39 +0000 (15:07 +0900)]
arm64: dts: uniphier: add support for LD20 Global board

Add initial device tree support for LD20 Global board.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoarm64: dts: uniphier: add support for LD11 Global board
Kunihiko Hayashi [Mon, 12 Jun 2017 06:07:38 +0000 (15:07 +0900)]
arm64: dts: uniphier: add support for LD11 Global board

Add initial device tree support for LD11 Global board.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM64: dts: meson-gxl-s905x-p212: Add HDMI and CVBS nodes
Neil Armstrong [Thu, 8 Jun 2017 15:31:23 +0000 (17:31 +0200)]
ARM64: dts: meson-gxl-s905x-p212: Add HDMI and CVBS nodes

Add HDMI and CVBS nodes for the Amlogic P212 reference board.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoARM64: dts: meson-gxl-s905x-khadas-vim: Add HDMI nodes
Neil Armstrong [Thu, 8 Jun 2017 15:31:22 +0000 (17:31 +0200)]
ARM64: dts: meson-gxl-s905x-khadas-vim: Add HDMI nodes

Add HDMI nodes for the Khadas Vim board.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoARM64: dts: meson-gxl-s905d-p230: Add HDMI nodes
Neil Armstrong [Thu, 8 Jun 2017 15:31:21 +0000 (17:31 +0200)]
ARM64: dts: meson-gxl-s905d-p230: Add HDMI nodes

Add HDMI nodes for the Amlogic P230 board.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoARM64: dts: meson-gxbb-wetek-play2: Add HDMI and CVBS Nodes
Neil Armstrong [Thu, 8 Jun 2017 15:31:20 +0000 (17:31 +0200)]
ARM64: dts: meson-gxbb-wetek-play2: Add HDMI and CVBS Nodes

Add HDMI and CVBS nodes for the Wetek Play2 board.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoarm64: dts: NS2: Add USB DRD PHY device tree node
Raviteja Garimella [Thu, 8 Jun 2017 10:35:03 +0000 (16:05 +0530)]
arm64: dts: NS2: Add USB DRD PHY device tree node

This patch adds device tree node for USB Dual Role Device PHY for
Broadcom's Northstar2 SoC.

Signed-off-by: Raviteja Garimella <raviteja.garimella@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoARM64: dts: bcm2837: Define CPU thermal coefficients
Stefan Wahren [Fri, 31 Mar 2017 20:03:05 +0000 (20:03 +0000)]
ARM64: dts: bcm2837: Define CPU thermal coefficients

This defines the bcm2837 SoC specific thermal coefficients in
order to initialize the thermal driver correctly.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
7 years agoMerge tag 'bcm2835-dt-next-2017-06-08' into bcm2835-dt-64-next
Eric Anholt [Thu, 8 Jun 2017 19:34:26 +0000 (12:34 -0700)]
Merge tag 'bcm2835-dt-next-2017-06-08' into bcm2835-dt-64-next

This merge brings in the cpu-thermal node we in bcm283x that we need
in order to set the rpi3's coefficients.

7 years agodt-bindings: mediatek: add bindings for MediaTek MT7622 SoC
Sean Wang [Wed, 31 May 2017 17:28:59 +0000 (01:28 +0800)]
dt-bindings: mediatek: add bindings for MediaTek MT7622 SoC

This adds dt-binding documentation for MediaTek MT7622 SoC
which currently only includes basic items such as ARM CPU,
MediaTek SYSIRQ and UART.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
7 years agoarm64: dts: mt8173: Fix mdp device tree
Daniel Kurtz [Tue, 23 May 2017 03:24:10 +0000 (11:24 +0800)]
arm64: dts: mt8173: Fix mdp device tree

If the mdp_* nodes are under an mdp sub-node, their corresponding
platform device does not automatically get its iommu assigned properly.

Fix this by moving the mdp component nodes up a level such that they are
siblings of mdp and all other SoC subsystems.  This also simplifies the
device tree.

Although it fixes iommu assignment issue, it also break compatibility
with old device tree. So, the patch in driver is needed to iterate over
sibling mdp device nodes, not child ones, to keep driver work properly.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
7 years agodt-bindings: i2c: Add Mediatek MT2701 i2c binding
Jun Gao [Fri, 26 May 2017 07:35:06 +0000 (15:35 +0800)]
dt-bindings: i2c: Add Mediatek MT2701 i2c binding

Add MT2701 i2c binding to i2c-mt6577.txt and there is no need to
modify i2c driver.

Signed-off-by: Jun Gao <jun.gao@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
7 years agodt-bindings: i2c-mtk: Add mt7623 binding
Matthias Brugger [Mon, 22 May 2017 09:40:21 +0000 (11:40 +0200)]
dt-bindings: i2c-mtk: Add mt7623 binding

The mt7623 dtsi has support for the i2c block, but this is not documented.
Add the documentation for SoC mt7623 to de description.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
7 years agodt-bindings: i2c-mtk: Delete bindings
Matthias Brugger [Mon, 22 May 2017 09:40:20 +0000 (11:40 +0200)]
dt-bindings: i2c-mtk: Delete bindings

The bindings file list bindings for mt1827 and mt8135 but
these bindings are not supported by the driver. Remove the bindings.
Also do some minor style changes to the compatible documentation

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
7 years agodt-bindings: i2c-mt6577: Rename file to reflect bindings
Matthias Brugger [Mon, 22 May 2017 09:40:19 +0000 (11:40 +0200)]
dt-bindings: i2c-mt6577: Rename file to reflect bindings

The i2c-mt6577.txt actually holds the bindings for all mediatek supported i2c
controller. Change the name to i2c.mtk.txt to reflect that.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
7 years agoarm64: dts: uniphier: use SPDX-License-Identifier
Masahiro Yamada [Mon, 5 Jun 2017 03:57:59 +0000 (12:57 +0900)]
arm64: dts: uniphier: use SPDX-License-Identifier

Follow the recent trend for the license description, and fix the wrongly
stated X11 to MIT.

The X11 license text [1] is explicitly for the X Consortium and has a
couple of extra clauses.  The MIT license text [2] is actually what the
current DT files claim.

[1] https://spdx.org/licenses/X11.html
[2] https://spdx.org/licenses/MIT.html

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoarm64: dts: uniphier: reserve more memory for LD11/LD20
Masahiro Yamada [Fri, 26 May 2017 08:18:15 +0000 (17:18 +0900)]
arm64: dts: uniphier: reserve more memory for LD11/LD20

Reserve enough space below the kernel base.
The assumed address map is:
  80000000 - 80ffffff : for IPP
  81000000 - 81ffffff : for ARM secure
  82000000 -          : for Linux

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoarm64: allwinner: h5: enable dwmac-sun8i for Nano Pi NEO2
Icenowy Zheng [Wed, 7 Jun 2017 00:23:05 +0000 (08:23 +0800)]
arm64: allwinner: h5: enable dwmac-sun8i for Nano Pi NEO2

Add the required DT parts to enable Ethernet (dwmac-sun8i driver) on
the Nano Pi NEO2 board. It uses an external Realtek RTL8211E PHY
connected via RGMII to provide GbE network. Specially unlike other
Allwinner boards, the phy is connected to MDIO address 7, not 1.

This includes the regulator (which is controlled by a GPIO pin) and
the actual Ethernet MAC node, referring the RGMII pins of the device.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: h5: enable dwmac-sun8i for Orange Pi Prime
Icenowy Zheng [Wed, 7 Jun 2017 00:23:04 +0000 (08:23 +0800)]
arm64: allwinner: h5: enable dwmac-sun8i for Orange Pi Prime

Add the required DT parts to enable Ethernet (dwmac-sun8i driver) on
the Orange Pi Prime board. It uses an external Realtek RTL8211E PHY
connected via RGMII to provide GbE network.

This includes the regulator (which is controlled by a GPIO pin) and
the actual Ethernet MAC node, referring the RGMII pins of the device.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: h5: sort the device nodes in / part for some boards
Icenowy Zheng [Wed, 7 Jun 2017 00:23:03 +0000 (08:23 +0800)]
arm64: allwinner: h5: sort the device nodes in / part for some boards

The reg_vcc3v3 node is wrongly placed at the start of the / part, but
not with other fixed regulators used by the board, which makes the
device nodes unsorted.

As Orange Pi Prime and Nano Pi NEO2 device trees are copy'n'paste works,
they share the device node unsorted issue.

Fix this by move reg_vcc3v3 node to the position before reg_usb0_vbus.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: a64: add device tree for SoPine with baseboard
Icenowy Zheng [Sun, 4 Jun 2017 02:43:45 +0000 (10:43 +0800)]
arm64: allwinner: a64: add device tree for SoPine with baseboard

Pine64 have made an official baseboard when SoPine SoM is out.

The official baseboard is like the original Pine64 -- but with SD card
slot replaced with Pine64's eMMC module slot.

Add a device tree for SoPine with the baseboard.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: bananapi-m64: Enable dwmac-sun8i
Corentin Labbe [Wed, 31 May 2017 07:18:49 +0000 (09:18 +0200)]
arm64: allwinner: bananapi-m64: Enable dwmac-sun8i

The dwmac-sun8i  hardware is present on the BananaPi M64.
It uses an external PHY rtl8211e via RGMII.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: pine64-plus: Enable dwmac-sun8i
Corentin Labbe [Wed, 31 May 2017 07:18:48 +0000 (09:18 +0200)]
arm64: allwinner: pine64-plus: Enable dwmac-sun8i

The dwmac-sun8i hardware is present on the pine64 plus.
It uses an external PHY rtl8211e via RGMII.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: pine64: Enable dwmac-sun8i
Corentin Labbe [Wed, 31 May 2017 07:18:47 +0000 (09:18 +0200)]
arm64: allwinner: pine64: Enable dwmac-sun8i

The dwmac-sun8i hardware is present on the pine64
It uses an external PHY via RMII.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver
Corentin Labbe [Wed, 31 May 2017 07:18:46 +0000 (09:18 +0200)]
arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver

The dwmac-sun8i is an Ethernet MAC that supports 10/100/1000 Mbit
connections. It is very similar to the device found in the Allwinner
H3, but lacks the internal 100 Mbit PHY and its associated control
bits.
This adds the necessary bits to the Allwinner A64 SoC .dtsi, but keeps
it disabled at this level.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: sun50i-a64: Add dt node for the syscon control module
Corentin Labbe [Wed, 31 May 2017 07:18:45 +0000 (09:18 +0200)]
arm64: allwinner: sun50i-a64: Add dt node for the syscon control module

This patch add the dt node for the syscon register present on the
Allwinner A64.

Only two register are present in this syscon and the only one useful is
the one dedicated to EMAC clock.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: a64: add DTSI file for SoPine SoM
Icenowy Zheng [Sun, 4 Jun 2017 02:43:44 +0000 (10:43 +0800)]
arm64: allwinner: a64: add DTSI file for SoPine SoM

SoPine is a SoM by Pine64, which have a gold finger compatible with the
slot of DDR3 SODIMM (signals are not compatible), and have an A64, an
AXP803, a LPDDR3 DRAM chip, a power led and a MicroSD slot on it.

The card detect pin of the MicroSD slot on the SoM is pulled down, which
makes it unusable; however, the slot is at the surface of the SoM that
is closed to the baseboard, so it's nearly impossible to hot-swap it,
thus I make it non-removable.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: a64: Convert CCU raw number references to macros
Chen-Yu Tsai [Mon, 5 Jun 2017 09:00:33 +0000 (17:00 +0800)]
arm64: allwinner: a64: Convert CCU raw number references to macros

The A64 device tree file has some remnants of raw number references
to the CCU node, likely from when the CCU bindings and device tree
changes were first merged.

Convert these, and the R_CCU ones, to use the proper defined macros
from their respective device tree binding header files.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: dts: allwinner: pine64: Prepare optional UART nodes with pinctrl
Andreas Färber [Tue, 18 Apr 2017 19:25:38 +0000 (21:25 +0200)]
arm64: dts: allwinner: pine64: Prepare optional UART nodes with pinctrl

Pine64 exposes all A64 UARTs, not just UART0.

Since the pins can be used as GPIO, don't enable the new UART nodes by
default, but prepare the pinctrl settings to aid in activating them via
overlays, i.e., overriding the status property of &uartX nodes.

For UART4 (Euler) the safer route of not including RTS/CTS pins is chosen,
whereas for UART1 (Bluetooth) they are included.

Add the corresponding pinctrl nodes where missing.

Suggested-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: a64: enable RSB on A64
Icenowy Zheng [Mon, 17 Apr 2017 11:57:36 +0000 (19:57 +0800)]
arm64: allwinner: a64: enable RSB on A64

Allwinner A64 have a RSB controller like the one on A23/A33 SoCs.

Add it and its pinmux.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: dts: allwinner: pine64: Add remaining UART aliases
Andreas Färber [Fri, 14 Apr 2017 19:08:04 +0000 (21:08 +0200)]
arm64: dts: allwinner: pine64: Add remaining UART aliases

Enabling uart2 node currently leads to a /dev/ttyS1 device, with ttyS0..4
always present, causing confusion on the user's part.

dtc cannot resolve an overlay's &uart2 reference for strings, only for
phandles, so it would need to hardcode the full node path.

Avoid this and enforce reliable numbering by adding serialX aliases for:

UART1 - on Wifi/BT connector
UART2 - on Pi-2 connector
UART3 - on Euler connector
UART4 - on Euler connector

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: dts: allwinner: a64: Add UART2 pin nodes
Andreas Färber [Fri, 14 Apr 2017 17:13:20 +0000 (19:13 +0200)]
arm64: dts: allwinner: a64: Add UART2 pin nodes

UART2 is exposed on the Pi connector of Pine64. Make a pinctrl node
available at the SoC level, to simplify enabling UART2 via DT overlay.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: h5: add support for NanoPi NEO2 board
Icenowy Zheng [Mon, 17 Apr 2017 11:15:41 +0000 (19:15 +0800)]
arm64: allwinner: h5: add support for NanoPi NEO2 board

NanoPi NEO2 is a board with the same size factor with the original
NanoPi NEO by FriendlyELEC.

It has a H5 instead of H3 on NanoPi NEO, and the ethernet is upgraded to
1Gbps (with external RTL8211E PHY).

Add support for this board.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: allwinner: h5: add support for Orange Pi Prime board
Icenowy Zheng [Thu, 13 Apr 2017 16:38:07 +0000 (00:38 +0800)]
arm64: allwinner: h5: add support for Orange Pi Prime board

Orange Pi Prime is a new Allwinner H5-based SBC by Xunlong.

It's like a Orange Pi Plus 2E with H3 replaced with H5, eMMC replaced
with onboard SPI NOR Flash and wireless card changed to Realtek
RTL8723BS (with Bluetooth functionality).

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoARM64: dts: meson-gx: Fix sensors reporting from SCP
Carlo Caione [Tue, 6 Jun 2017 10:23:42 +0000 (12:23 +0200)]
ARM64: dts: meson-gx: Fix sensors reporting from SCP

Switch to use the new compatible for the SCPI sensors so that the
sensor readings are reported using the correct scale.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoarm64: allwinner: orangepi-pc2: Enable dwmac-sun8i
Corentin Labbe [Mon, 5 Jun 2017 19:21:28 +0000 (21:21 +0200)]
arm64: allwinner: orangepi-pc2: Enable dwmac-sun8i

The dwmac-sun8i hardware is present on the Orange PI PC2.
It uses an external PHY rtl8211e via RGMII.

This patch create the needed regulator, emac and phy nodes.
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver
Corentin Labbe [Wed, 31 May 2017 07:18:38 +0000 (09:18 +0200)]
arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver

The dwmac-sun8i is an ethernet MAC hardware that support 10/100/1000
speed.

This patch enable the dwmac-sun8i on Allwinner H3/H5 SoC Device-tree.
SoC H3/H5 have an internal PHY, so optionals syscon and ephy are set.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module
Corentin Labbe [Wed, 31 May 2017 07:18:37 +0000 (09:18 +0200)]
arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module

This patch add the dt node for the syscon register present on the
Allwinner H3/H5

Only two register are present in this syscon and the only one useful is
the one dedicated to EMAC clock..

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros
Chen-Yu Tsai [Mon, 5 Jun 2017 09:00:32 +0000 (17:00 +0800)]
ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros

Now that the R_CCU device tree binding headers have been merged, we
can convert the raw number references in the device trees to use the
defined macros.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agoarm64: dts: Add PWM and SDHCI DT nodes for Stingray SOC
Srinath Mannam [Fri, 2 Jun 2017 06:34:35 +0000 (12:04 +0530)]
arm64: dts: Add PWM and SDHCI DT nodes for Stingray SOC

The Stingray SoC has two instances of SDHCI controller
and one instance of iProc PWM.

Let's enable above mentioned devices in Stingray DT.

Signed-off-by: Srinath Mannam <srinath.mannam@broadcom.com>
Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoarm64: dts: Add PL022, PL330 and SP805 DT nodes for Stingray
Anup Patel [Fri, 2 Jun 2017 06:34:34 +0000 (12:04 +0530)]
arm64: dts: Add PL022, PL330 and SP805 DT nodes for Stingray

We have two instance of PL022 SPI controllers, one instance of
DMA PL330, and one non-secure SP805 Watchdog on Stingray SOC.

This patch adds DT nodes for the above mentioned devices in
Stingray DT.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Pramod KUMAR <pramod.kumar@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoarm64: dts: Add I2C DT nodes for Stingray SoC
Oza Pawandeep [Fri, 2 Jun 2017 06:34:33 +0000 (12:04 +0530)]
arm64: dts: Add I2C DT nodes for Stingray SoC

This patch adds I2C DT nodes on Stingray SoC.

Signed-off-by: Oza Pawandeep <oza.oza@broadcom.com>
Reviewed-by: Vikram Prakash <vikram.prakash@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoarm64: dts: Add GPIO DT nodes for Stingray SOC
Pramod Kumar [Fri, 2 Jun 2017 06:34:32 +0000 (12:04 +0530)]
arm64: dts: Add GPIO DT nodes for Stingray SOC

The GPIOs on Stingray SOC are based on iProc GPIOs hence
using this we add GPIO DT nodes for Stingray SOC.

Signed-off-by: Pramod Kumar <pramodku@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Reviewed-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoarm64: dts: Add pinctrl DT nodes for Stingray SOC
Pramod Kumar [Fri, 2 Jun 2017 06:34:31 +0000 (12:04 +0530)]
arm64: dts: Add pinctrl DT nodes for Stingray SOC

This patch adds pinctrl and pinmux related DT nodes for
Stingray SOC.

For manageability, pinctrl and pinmum DT nodes are added
as separate DTSi file and included in main DTSi file.

Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com>
Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Vikram Prakash <vikram.prakash@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoarm64: dts: Add NAND DT nodes for Stingray SOC
Pramod Kumar [Fri, 2 Jun 2017 06:34:30 +0000 (12:04 +0530)]
arm64: dts: Add NAND DT nodes for Stingray SOC

This patch adds NAND controller DT Node and NAND chip DT
node for Stingray SOC and Stingray reference boards.

Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com>
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
Reviewed-by: Vikram Prakash <vikram.prakash@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoarm64: dts: Add clock DT nodes for Stingray SOC
Sandeep Tripathy [Fri, 2 Jun 2017 06:34:29 +0000 (12:04 +0530)]
arm64: dts: Add clock DT nodes for Stingray SOC

This patch describes Stingray SOC clock tree using
DT nodes in Stingray DTS.

Signed-off-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoarm64: dts: Initial DTS files for Broadcom Stingray SOC
Anup Patel [Fri, 2 Jun 2017 06:34:28 +0000 (12:04 +0530)]
arm64: dts: Initial DTS files for Broadcom Stingray SOC

The Broadcom Stingray SoC is a new member in Broadcom iProc
SoC family.

This patch adds initial DTS files for Broadcom Stingray SoC
and two of its reference boards (bcm958742k and bcm958742t).

We have lot of reference boards and large number of devices
in Broadcom Stingray SoC so eventually we will have quite
a few DTS files for Stingray. To tackle, we have added a
separate directory for Stingray DTS files.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agodt-bindings: clk: Extend binding doc for Stingray SOC
Sandeep Tripathy [Fri, 2 Jun 2017 06:34:26 +0000 (12:04 +0530)]
dt-bindings: clk: Extend binding doc for Stingray SOC

Update iproc clock dt-binding documentation with
Stingray pll and clock details.

Signed-off-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoarm64: dts: uniphier: fix simple-bus unit address format error
Masahiro Yamada [Sat, 13 May 2017 17:20:50 +0000 (02:20 +0900)]
arm64: dts: uniphier: fix simple-bus unit address format error

Compiling the UniPhier DT files with W=1, DTC warns like follows:

Warning (simple_bus_reg): Node /soc/smpctrl@59800000 simple-bus unit address format error, expected "59801000"

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoarm64: dts: uniphier: Use - instead of @ for DT OPP entries
Viresh Kumar [Thu, 20 Apr 2017 10:55:10 +0000 (16:25 +0530)]
arm64: dts: uniphier: Use - instead of @ for DT OPP entries

Compiling the DT file with W=1, DTC warns like follows:

Warning (unit_address_vs_reg): Node /opp_table0/opp@1000000000 has a
unit name, but no reg property

Fix this by replacing '@' with '-' as the OPP nodes will never have a
"reg" property.

Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agodt-bindings: bcm: Add Broadcom Stingray bindings document
Anup Patel [Fri, 2 Jun 2017 06:34:25 +0000 (12:04 +0530)]
dt-bindings: bcm: Add Broadcom Stingray bindings document

This patch adds DT bindings info for Broadcom Stingray SOC
and related reference boards.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoMerge tag 'realtek-arm64-dt-for-4.12' of git://github.com/afaerber/linux into next...
Olof Johansson [Fri, 2 Jun 2017 00:29:02 +0000 (17:29 -0700)]
Merge tag 'realtek-arm64-dt-for-4.12' of git://github.com/afaerber/linux into next/dt64

Realtek ARM64 based SoC DT for v4.12

This adds an initial DT for the RTD1295 SoC and a TV box based on it.

* tag 'realtek-arm64-dt-for-4.12' of git://github.com/afaerber/linux:
  ARM64: dts: Add Realtek RTD1295 and Zidoo X9S
  dt-bindings: arm: Add Realtek RTD1295 bindings
  dt-bindings: Add vendor prefix for Zidoo

Signed-off-by: Olof Johansson <olof@lixom.net>
7 years agoMerge tag 'renesas-arm64-dt-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Fri, 2 Jun 2017 00:25:24 +0000 (17:25 -0700)]
Merge tag 'renesas-arm64-dt-for-v4.13' of https://git./linux/kernel/git/horms/renesas into next/dt64

Renesas ARM64 Based SoC DT Updates for v4.13

* Add support for R-Car H3 ES2.0
* Break out common board support
* Set drive-strength for ravb pins for r8a7795/h3ulcb and r8a7796/m3ulcb
* Enable HDMI outputs on r8a7795/salvator-x
* Add R-Car audio to DT of r8a7796 SoC
* Add current sense amplifiers to DT of r8a779[56]/salvator-x
* Enable NFS-root on r8a7796/salvator-x
* Enable HS200 for eMMC on r8a779[56]/salvator-x,
  r8a7795/h3ulcb and r8a7796/m3ulcb
* Enable EthernetAVB, I2C r8a7796/m3ulcb
* Update memory node to 2 GiB map on r8a7796/m3ulcb

* tag 'renesas-arm64-dt-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (35 commits)
  arm64: dts: r8a7795: salvator-x: Add support for R-Car H3 ES2.0
  arm64: dts: r8a7795: Add support for R-Car H3 ES2.0
  arm64: dts: ulcb: Set drive-strength for ravb pins
  arm64: dts: renesas: r8a7795-salvator-x: Enable HDMI outputs
  arm64: dts: renesas: r8a7795-salvator-x: Add DU external dot clocks
  arm64: dts: renesas: salvator-x: Add HDMI output connectors
  arm64: dts: renesas: salvator-x: Add DU external dot clock sources
  arm64: dts: renesas: r8a7795: Add HDMI encoder support
  arm64: dts: salvator-x: Add panel backlight support
  arm64: dts: r8a7796: Add PWM device nodes
  arm64: dts: r8a7796: add Sound MIX support
  arm64: dts: r8a7796: add Sound CTU support
  arm64: dts: r8a7796: add Sound DVC support
  arm64: dts: r8a7796: add Sound SRC support
  arm64: dts: r8a7796: add Sound SSI DMA support
  arm64: dts: r8a7796: add Sound SSI PIO support
  arm64: dts: r8a7796: add AUDIO_DMAC support
  arm64: dts: salvator-x: Add current sense amplifiers
  arm64: dts: renesas: Extract common ULCB board support
  arm64: dts: renesas: Extract common Salvator-X board support
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
7 years agodt-bindings: mtk-sysirq: Correct bindings for supported SoCs
Matthias Brugger [Mon, 22 May 2017 09:40:18 +0000 (11:40 +0200)]
dt-bindings: mtk-sysirq: Correct bindings for supported SoCs

All SoCs supported up to now rely on the fallback binding of mt6577.
Fix the binding description to reflect this.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
7 years agoARM64: dts: meson-gxl: Add SPI pinctrl nodes
Neil Armstrong [Wed, 24 May 2017 08:28:25 +0000 (10:28 +0200)]
ARM64: dts: meson-gxl: Add SPI pinctrl nodes

This patch adds the SPICC Controller pins nodes for Amlogic GXL SoCs.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoARM64: dts: meson-gxbb: Add SPI pinctrl nodes
Neil Armstrong [Wed, 24 May 2017 08:28:24 +0000 (10:28 +0200)]
ARM64: dts: meson-gxbb: Add SPI pinctrl nodes

This patch adds the SPICC Controller pins nodes for Amlogic GXBB SoCs.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoARM64: dts: meson-gxl: Add Ethernet PHY LEDS pins nodes
Neil Armstrong [Wed, 24 May 2017 08:28:23 +0000 (10:28 +0200)]
ARM64: dts: meson-gxl: Add Ethernet PHY LEDS pins nodes

The Amlogic Meson GXL SoCs embeds an 10/100 Ethernet PHY, this patchs adds
the Link and Activity LEDs signals pins nodes.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoARM64: dts: meson-gxl: Add CEC pins nodes
Neil Armstrong [Wed, 24 May 2017 08:28:22 +0000 (10:28 +0200)]
ARM64: dts: meson-gxl: Add CEC pins nodes

Add the AO and EE domain CEC pins nodes for the Amlogic Meson GXL SoCs.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoARM64: dts: meson-gxbb: Add CEC pins nodes
Neil Armstrong [Wed, 24 May 2017 08:28:21 +0000 (10:28 +0200)]
ARM64: dts: meson-gxbb: Add CEC pins nodes

Add the AO and EE domain CEC pins nodes for the Amlogic Meson GXBB SoCs.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoARM64: dts: Fix GXBB periphs pinctrl pull-enable register base
Neil Armstrong [Tue, 23 May 2017 14:21:51 +0000 (16:21 +0200)]
ARM64: dts: Fix GXBB periphs pinctrl pull-enable register base

The pull-enable register base was wrongly copied from the meson8b pinctrl node,
but was not used yet.

Fixes: c328666d58aa ("ARM64: dts: amlogic: Add Meson GX dtsi from GXBB")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoARM64: dts: Fix GXL periphs pinctrl pull-enable register base
Neil Armstrong [Tue, 23 May 2017 14:21:50 +0000 (16:21 +0200)]
ARM64: dts: Fix GXL periphs pinctrl pull-enable register base

The pull-enable register base was wrongly copied from the GXBB pinctrl node,
but was not used yet.

Fixes: fb0fe92294a9 ("ARM64: dts: meson-gxl: Add pinctrl nodes")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoARM64: dts: meson-gxl: Fix pinctrl periphs gpio-ranges
Neil Armstrong [Tue, 23 May 2017 14:21:49 +0000 (16:21 +0200)]
ARM64: dts: meson-gxl: Fix pinctrl periphs gpio-ranges

The gpio-range was badly added on the GXL dtsi, the AO pin count is 10
instead of 14.

Fixes: 84412e4e857f ("ARM64: dts: meson-gxl: Add gpio-ranges properties")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoarm64: dts: amlogic: Add NanoPi K2
Andreas Färber [Sun, 21 May 2017 18:51:05 +0000 (20:51 +0200)]
arm64: dts: amlogic: Add NanoPi K2

The FriendlyARM NanoPi K2 is a single-board computer.

Cc: techsupport@friendlyarm.com
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agodt-bindings: arm: amlogic: Add NanoPi K2
Andreas Färber [Sun, 21 May 2017 18:51:04 +0000 (20:51 +0200)]
dt-bindings: arm: amlogic: Add NanoPi K2

The FriendlyARM NanoPi K2 is a single-board computer.

Cc: techsupport@friendlyarm.com
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoarm64: dts: meson-gxm: Add R-Box Pro
Andreas Färber [Sat, 13 May 2017 15:23:12 +0000 (17:23 +0200)]
arm64: dts: meson-gxm: Add R-Box Pro

The R-Box Pro is a TV box derived from Amlogic q200 reference design.
It uses an AP6255 Wifi module. It features an LED tube that lights a
surrounding stripe and the top logo in blue or red or pink'ish - blue
is on by default, and red (i.e., pink) is configured as panic indicator.

This device is available in at least two models, with 2 GB vs. 3 GB RAM
as well as varying eMMC size. The intent is to handle this with a single
.dts that gets the actual RAM size from U-Boot.

Cc: ada@kingnoval.com
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agodt-bindings: arm: amlogic: Add R-Box Pro
Andreas Färber [Sat, 13 May 2017 15:23:11 +0000 (17:23 +0200)]
dt-bindings: arm: amlogic: Add R-Box Pro

Cc: ada@kingnoval.com
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agodt-bindings: Add Kingnovel vendor prefix
Andreas Färber [Sat, 13 May 2017 15:23:10 +0000 (17:23 +0200)]
dt-bindings: Add Kingnovel vendor prefix

Their domain name is spelled kingnoval, but textually Kingnovel.

Cc: ada@kingnoval.com
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
7 years agoarm64: dts: rockchip: update common rk3399 operating points
Heiko Stuebner [Tue, 23 May 2017 09:12:35 +0000 (11:12 +0200)]
arm64: dts: rockchip: update common rk3399 operating points

The rk3399 has multiple variants with different frequency ratings.
The operating points currently in the kernel stem from the op1 variant
used in Gru ChromeOS devices and may not be suitable for general rk3399
chips. Therefore bring it back to the official general operating points.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
7 years agoarm64: dts: rockchip: introduce rk3399-op1 operating points
Heiko Stuebner [Tue, 23 May 2017 09:17:19 +0000 (11:17 +0200)]
arm64: dts: rockchip: introduce rk3399-op1 operating points

The OP1 is a rk3399 variant used in ChromeOS devices with a slightly
higher frequency rating compared to the regular rk3399, but right now
the only available operating points don't match either variant
with both needing adjustments to actually fit their specs.

Therefore introduce separate operting points, from the ChromeOS kernel,
for the OP1 and use it on Gru devices.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
7 years agoarm64: dts: rockchip: enable usb3 controllers on rk3399-firefly
Heiko Stuebner [Tue, 9 May 2017 21:24:11 +0000 (23:24 +0200)]
arm64: dts: rockchip: enable usb3 controllers on rk3399-firefly

This allows basic usage of usb3 devices but no typec specific things yet.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
7 years agoarm64: dts: rockchip: add ethernet0 alias on rk3399
Heiko Stuebner [Tue, 9 May 2017 18:34:06 +0000 (20:34 +0200)]
arm64: dts: rockchip: add ethernet0 alias on rk3399

This is used by bootloaders to override the mac address in the devicetree
if needed.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
7 years agoarm64: dts: rockchip: bring rk3399-firefly power-tree in line
Heiko Stuebner [Sat, 6 May 2017 08:20:38 +0000 (10:20 +0200)]
arm64: dts: rockchip: bring rk3399-firefly power-tree in line

The power-tree on the rk3399-firefly did not completely match the
documentation and vendor devicetree. It was also missing some
supply-hirarchy information and some regulator-gpio names did not
match the schematics. Fix this for the existing regulators before
introducing new things.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
7 years agoarm64: dts: rockchip: add sdmmc/sdio/emmc nodes for RK3328 SoCs
Shawn Lin [Wed, 24 May 2017 00:34:49 +0000 (08:34 +0800)]
arm64: dts: rockchip: add sdmmc/sdio/emmc nodes for RK3328 SoCs

This patch adds sdmmc, sdio, emmc nodes for Rockchip RK3328 SoCs.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
7 years agoLinux 4.12-rc3 v4.12-rc3
Linus Torvalds [Mon, 29 May 2017 00:20:53 +0000 (17:20 -0700)]
Linux 4.12-rc3

7 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
Linus Torvalds [Sun, 28 May 2017 23:18:27 +0000 (16:18 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/evalenti/linux-soc-thermal

Pull thermal SoC management fixes from Eduardo Valentin:

 - fixes to TI SoC driver, Broadcom, qoriq

 - small sparse warning fix on thermal core

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
  thermal: broadcom: ns-thermal: default on iProc SoCs
  ti-soc-thermal: Fix a typo in a comment line
  ti-soc-thermal: Delete error messages for failed memory allocations in ti_bandgap_build()
  ti-soc-thermal: Use devm_kcalloc() in ti_bandgap_build()
  thermal: core: make thermal_emergency_poweroff static
  thermal: qoriq: remove useless call for of_thermal_get_trip_points()

7 years agoMerge tag 'tty-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sat, 27 May 2017 16:39:09 +0000 (09:39 -0700)]
Merge tag 'tty-4.12-rc3' of git://git./linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are some serial and tty fixes for 4.12-rc3. They are a bit bigger
  than normal, which is why I had them bake in linux-next for a few
  weeks and didn't send them to you for -rc2.

  They revert a few of the serdev patches from 4.12-rc1, and bring
  things back to how they were in 4.11, to try to make things a bit more
  stable there. Rob and Johan both agree that this is the way forward,
  so this isn't people squabbling over semantics. Other than that, just
  a few minor serial driver fixes that people have had problems with.

  All of these have been in linux-next for a few weeks with no reported
  issues"

* tag 'tty-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: altera_uart: call iounmap() at driver remove
  serial: imx: ensure UCR3 and UFCR are setup correctly
  MAINTAINERS/serial: Change maintainer of jsm driver
  serial: enable serdev support
  tty/serdev: add serdev registration interface
  serdev: Restore serdev_device_write_buf for atomic context
  serial: core: fix crash in uart_suspend_port
  tty: fix port buffer locking
  tty: ehv_bytechan: clean up init error handling
  serial: ifx6x60: fix use-after-free on module unload
  serial: altera_jtaguart: adding iounmap()
  serial: exar: Fix stuck MSIs
  serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'
  serdev: fix tty-port client deregistration
  Revert "tty_port: register tty ports with serdev bus"
  drivers/tty: 8250: only call fintek_8250_probe when doing port I/O

7 years agoMerge tag 'powerpc-4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sat, 27 May 2017 16:28:34 +0000 (09:28 -0700)]
Merge tag 'powerpc-4.12-4' of git://git./linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
 "Fix running SPU programs on Cell, and a few other minor fixes.

  Thanks to Alistair Popple, Jeremy Kerr, Michael Neuling, Nicholas
  Piggin"

* tag 'powerpc-4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc: Add PPC_FEATURE userspace bits for SCV and DARN instructions
  powerpc/spufs: Fix hash faults for kernel regions
  powerpc: Fix booting P9 hash with CONFIG_PPC_RADIX_MMU=N
  powerpc/powernv/npu-dma.c: Fix opal_npu_destroy_context() call
  selftests/powerpc: Fix TM resched DSCR test with some compilers

7 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 27 May 2017 16:17:58 +0000 (09:17 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "A series of fixes for X86:

   - The final fix for the end-of-stack issue in the unwinder
   - Handle non PAT systems gracefully
   - Prevent access to uninitiliazed memory
   - Move early delay calaibration after basic init
   - Fix Kconfig help text
   - Fix a cross compile issue
   - Unbreak older make versions"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/timers: Move simple_udelay_calibration past init_hypervisor_platform
  x86/alternatives: Prevent uninitialized stack byte read in apply_alternatives()
  x86/PAT: Fix Xorg regression on CPUs that don't support PAT
  x86/watchdog: Fix Kconfig help text file path reference to lockup watchdog documentation
  x86/build: Permit building with old make versions
  x86/unwind: Add end-of-stack check for ftrace handlers
  Revert "x86/entry: Fix the end of the stack for newly forked tasks"
  x86/boot: Use CROSS_COMPILE prefix for readelf

7 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 27 May 2017 16:14:24 +0000 (09:14 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull timer fixlet from Thomas Gleixner:
 "Silence dmesg spam by making the posix cpu timer printks depend on
  print_fatal_signals"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  posix-timers: Make signal printks conditional

7 years agoMerge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 27 May 2017 16:06:43 +0000 (09:06 -0700)]
Merge branch 'ras-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull RAS fixes from Thomas Gleixner:
 "Two fixlets for RAS:

   - Export memory_error() so the NFIT module can utilize it

   - Handle memory errors in NFIT correctly"

* 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  acpi, nfit: Fix the memory error check in nfit_handle_mce()
  x86/MCE: Export memory_error()

7 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 27 May 2017 16:02:41 +0000 (09:02 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf tooling fixes from Thomas Gleixner:

 - Synchronization of tools and kernel headers

 - A series of fixes for perf report addressing various failures:
    * Handle invalid maps proper
    * Plug a memory leak
    * Handle frames and callchain order correctly

 - Fixes for handling inlines and children mode

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tools/include: Sync kernel ABI headers with tooling headers
  perf tools: Put caller above callee in --children mode
  perf report: Do not drop last inlined frame
  perf report: Always honor callchain order for inlined nodes
  perf script: Add --inline option for debugging
  perf report: Fix off-by-one for non-activation frames
  perf report: Fix memory leak in addr2line when called by addr2inlines
  perf report: Don't crash on invalid maps in `-g srcline` mode

7 years agoMerge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 27 May 2017 15:59:37 +0000 (08:59 -0700)]
Merge branch 'locking-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull locking fix from Thomas Gleixner:
 "A fix for a state leak which was introduced in the recent rework of
  futex/rtmutex interaction"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex,rt_mutex: Fix rt_mutex_cleanup_proxy_lock()

7 years agoMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 27 May 2017 15:52:27 +0000 (08:52 -0700)]
Merge branch 'core-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull kthread fix from Thomas Gleixner:
 "A single fix which prevents a use after free when kthread fork fails"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  kthread: Fix use-after-free if kthread fork fails

7 years agoMerge tag 'trace-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
Linus Torvalds [Sat, 27 May 2017 15:30:30 +0000 (08:30 -0700)]
Merge tag 'trace-v4.12-rc2' of git://git./linux/kernel/git/rostedt/linux-trace

Pull ftrace fixes from Steven Rostedt:
 "There's been a few memory issues found with ftrace.

  One was simply a memory leak where not all was being freed that should
  have been in releasing a file pointer on set_graph_function.

  Then Thomas found that the ftrace trampolines were marked for
  read/write as well as execute. To shrink the possible attack surface,
  he added calls to set them to ro. Which also uncovered some other
  issues with freeing module allocated memory that had its permissions
  changed.

  Kprobes had a similar issue which is fixed and a selftest was added to
  trigger that issue again"

* tag 'trace-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  x86/ftrace: Make sure that ftrace trampolines are not RWX
  x86/mm/ftrace: Do not bug in early boot on irqs_disabled in cpu_flush_range()
  selftests/ftrace: Add a testcase for many kprobe events
  kprobes/x86: Fix to set RWX bits correctly before releasing trampoline
  ftrace: Fix memory leak in ftrace_graph_release()

7 years agox86/ftrace: Make sure that ftrace trampolines are not RWX
Thomas Gleixner [Thu, 25 May 2017 08:57:51 +0000 (10:57 +0200)]
x86/ftrace: Make sure that ftrace trampolines are not RWX

ftrace use module_alloc() to allocate trampoline pages. The mapping of
module_alloc() is RWX, which makes sense as the memory is written to right
after allocation. But nothing makes these pages RO after writing to them.

Add proper set_memory_rw/ro() calls to protect the trampolines after
modification.

Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1705251056410.1862@nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
7 years agox86/mm/ftrace: Do not bug in early boot on irqs_disabled in cpu_flush_range()
Steven Rostedt (VMware) [Fri, 26 May 2017 14:14:11 +0000 (10:14 -0400)]
x86/mm/ftrace: Do not bug in early boot on irqs_disabled in cpu_flush_range()

With function tracing starting in early bootup and having its trampoline
pages being read only, a bug triggered with the following:

kernel BUG at arch/x86/mm/pageattr.c:189!
invalid opcode: 0000 [#1] SMP
Modules linked in:
CPU: 0 PID: 0 Comm: swapper Not tainted 4.12.0-rc2-test+ #3
Hardware name: MSI MS-7823/CSM-H87M-G43 (MS-7823), BIOS V1.6 02/22/2014
task: ffffffffb4222500 task.stack: ffffffffb4200000
RIP: 0010:change_page_attr_set_clr+0x269/0x302
RSP: 0000:ffffffffb4203c88 EFLAGS: 00010046
RAX: 0000000000000046 RBX: 0000000000000000 RCX: 00000001b6000000
RDX: ffffffffb4203d40 RSI: 0000000000000000 RDI: ffffffffb4240d60
RBP: ffffffffb4203d18 R08: 00000001b6000000 R09: 0000000000000001
R10: ffffffffb4203aa8 R11: 0000000000000003 R12: ffffffffc029b000
R13: ffffffffb4203d40 R14: 0000000000000001 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff9a639ea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff9a636b384000 CR3: 00000001ea21d000 CR4: 00000000000406b0
Call Trace:
 change_page_attr_clear+0x1f/0x21
 set_memory_ro+0x1e/0x20
 arch_ftrace_update_trampoline+0x207/0x21c
 ? ftrace_caller+0x64/0x64
 ? 0xffffffffc029b000
 ftrace_startup+0xf4/0x198
 register_ftrace_function+0x26/0x3c
 function_trace_init+0x5e/0x73
 tracer_init+0x1e/0x23
 tracing_set_tracer+0x127/0x15a
 register_tracer+0x19b/0x1bc
 init_function_trace+0x90/0x92
 early_trace_init+0x236/0x2b3
 start_kernel+0x200/0x3f5
 x86_64_start_reservations+0x29/0x2b
 x86_64_start_kernel+0x17c/0x18f
 secondary_startup_64+0x9f/0x9f
 ? secondary_startup_64+0x9f/0x9f

Interrupts should not be enabled at this early in the boot process. It is
also fine to leave interrupts enabled during this time as there's only one
CPU running, and on_each_cpu() means to only run on the current CPU.

If early_boot_irqs_disabled is set, it is safe to run cpu_flush_range() with
interrupts disabled. Don't trigger a BUG_ON() in that case.

Link: http://lkml.kernel.org/r/20170526093717.0be3b849@gandalf.local.home
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
7 years agoselftests/ftrace: Add a testcase for many kprobe events
Masami Hiramatsu [Fri, 26 May 2017 04:44:54 +0000 (13:44 +0900)]
selftests/ftrace: Add a testcase for many kprobe events

Add a testcase to test kprobes via ftrace interface
with many concurrent kprobe events.

This tries to add many kprobe events (up to 256) on
kernel functions. To avoid making ftrace-based
kprobes (kprobes on fentry), it skips first N bytes
(on x86 N=5, on ppc or arm N=4) of function entry.
After that, it enables all those events, disable it,
and remove it.

Since the unoptimization buffer reclaiming will
be delayed, after removing events, it will wait
enough time.

Link: http://lkml.kernel.org/r/149577388470.11702.11832460851769204511.stgit@devbox
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
7 years agokprobes/x86: Fix to set RWX bits correctly before releasing trampoline
Masami Hiramatsu [Thu, 25 May 2017 10:38:17 +0000 (19:38 +0900)]
kprobes/x86: Fix to set RWX bits correctly before releasing trampoline

Fix kprobes to set(recover) RWX bits correctly on trampoline
buffer before releasing it. Releasing readonly page to
module_memfree() crash the kernel.

Without this fix, if kprobes user register a bunch of kprobes
in function body (since kprobes on function entry usually
use ftrace) and unregister it, kernel hits a BUG and crash.

Link: http://lkml.kernel.org/r/149570868652.3518.14120169373590420503.stgit@devbox
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: d0381c81c2f7 ("kprobes/x86: Set kprobes pages read-only")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>