Commit 9bbd4b9f authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'devicetree-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull DeviceTree updates from Rob Herring:
 "A fairly large (by DT standards) pull request this time with the
  majority being some overdue moving DT binding docs around to
  consolidate similar bindings.

   - DT binding doc consolidation moving similar bindings to common
     locations.  The majority of these are display related which were
     scattered in video/, fb/, drm/, gpu/, and panel/ directories.

   - Add new config option, CONFIG_OF_ALL_DTBS, to enable building all
     dtbs in the tree for most arches with dts files (except powerpc for
     now).

   - OF_IRQ=n fixes for user enabled CONFIG_OF.

   - of_node_put ref counting fixes from Julia Lawall.

   - Common DT binding for wakeup-source and deprecation of all similar
     bindings.

   - DT binding for PXA LCD controller.

   - Allow ignoring failed PCI resource translations in order to ignore
     64-bit addresses on non-LPAE 32-bit kernels.

   - Support setting the NUMA node from DT instead of only from parent
     device.

   - Couple of earlycon DT parsing fixes for address and options"

* tag 'devicetree-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (45 commits)
  MAINTAINERS: update DT binding doc locations
  devicetree: add Sigma Designs vendor prefix
  of: simplify arch_find_n_match_cpu_physical_id() function
  Documentation: arm: Fixed typo in socfpga fpga mgr example
  Documentation: devicetree: fix reference to legacy wakeup properties
  Documentation: devicetree: standardize/consolidate on "wakeup-source" property
  drivers: of: removing assignment of 0 to static variable
  xtensa: enable building of all dtbs
  mips: enable building of all dtbs
  metag: enable building of all dtbs
  metag: use common make variables for dtb builds
  h8300: enable building of all dtbs
  arm64: enable building of all dtbs
  arm: enable building of all dtbs
  arc: enable building of all dtbs
  arc: use common make variables for dtb builds
  of: add config option to enable building of all dtbs
  of/fdt: fix error checking for earlycon address
  of/overlay: add missing of_node_put
  of/platform: add missing of_node_put
  ...
parents 3e069ada 2d799dde
...@@ -441,7 +441,7 @@ EXAMPLE: ...@@ -441,7 +441,7 @@ EXAMPLE:
regmap = <&snvs>; regmap = <&snvs>;
interrupts = <0 4 0x4> interrupts = <0 4 0x4>
linux,keycode = <116>; /* KEY_POWER */ linux,keycode = <116>; /* KEY_POWER */
wakeup; wakeup-source;
}; };
===================================================================== =====================================================================
...@@ -530,7 +530,7 @@ FULL EXAMPLE ...@@ -530,7 +530,7 @@ FULL EXAMPLE
regmap = <&sec_mon>; regmap = <&sec_mon>;
interrupts = <0 4 0x4>; interrupts = <0 4 0x4>;
linux,keycode = <116>; /* KEY_POWER */ linux,keycode = <116>; /* KEY_POWER */
wakeup; wakeup-source;
}; };
}; };
......
...@@ -14,8 +14,8 @@ Required properties: ...@@ -14,8 +14,8 @@ Required properties:
-port@[X]: SoC specific port nodes with endpoint definitions as defined -port@[X]: SoC specific port nodes with endpoint definitions as defined
in Documentation/devicetree/bindings/media/video-interfaces.txt, in Documentation/devicetree/bindings/media/video-interfaces.txt,
please refer to the SoC specific binding document: please refer to the SoC specific binding document:
* Documentation/devicetree/bindings/drm/imx/hdmi.txt * Documentation/devicetree/bindings/display/imx/hdmi.txt
* Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt * Documentation/devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt
Optional properties Optional properties
- reg-io-width: the width of the reg:1,4, default set to 1 if not present - reg-io-width: the width of the reg:1,4, default set to 1 if not present
......
...@@ -6,7 +6,7 @@ Required properties: ...@@ -6,7 +6,7 @@ Required properties:
location and size of the framebuffer memory. location and size of the framebuffer memory.
- clocks : phandle + clock specifier pair of the FB reference clock. - clocks : phandle + clock specifier pair of the FB reference clock.
- display : phandle to a display node as described in - display : phandle to a display node as described in
Documentation/devicetree/bindings/video/display-timing.txt. Documentation/devicetree/bindings/display/display-timing.txt.
Additionally, the display node has to define properties: Additionally, the display node has to define properties:
- bits-per-pixel: Bits per pixel. - bits-per-pixel: Bits per pixel.
- ac-prescale : LCD AC bias frequency. This frequency is the required - ac-prescale : LCD AC bias frequency. This frequency is the required
......
...@@ -38,7 +38,7 @@ Optional Properties: ...@@ -38,7 +38,7 @@ Optional Properties:
Can be used in case timings cannot be provided otherwise Can be used in case timings cannot be provided otherwise
or to override timings provided by the panel. or to override timings provided by the panel.
[1]: Documentation/devicetree/bindings/video/display-timing.txt [1]: Documentation/devicetree/bindings/display/display-timing.txt
Example: Example:
......
...@@ -50,7 +50,7 @@ Required properties for dp-controller: ...@@ -50,7 +50,7 @@ Required properties for dp-controller:
number of lanes supported by the panel. number of lanes supported by the panel.
LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4 LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4
- display-timings: timings for the connected panel as described by - display-timings: timings for the connected panel as described by
Documentation/devicetree/bindings/video/display-timing.txt Documentation/devicetree/bindings/display/display-timing.txt
Optional properties for dp-controller: Optional properties for dp-controller:
-interlaced: -interlaced:
......
...@@ -49,7 +49,7 @@ Video interfaces: ...@@ -49,7 +49,7 @@ Video interfaces:
mode mode
- samsung,esc-clock-frequency: specifies DSI frequency in escape mode - samsung,esc-clock-frequency: specifies DSI frequency in escape mode
[1]: Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt [1]: Documentation/devicetree/bindings/display/mipi-dsi-bus.txt
[2]: Documentation/devicetree/bindings/media/video-interfaces.txt [2]: Documentation/devicetree/bindings/media/video-interfaces.txt
Example: Example:
......
...@@ -82,7 +82,7 @@ in [2]. The following are properties specific to those nodes: ...@@ -82,7 +82,7 @@ in [2]. The following are properties specific to those nodes:
3 - for parallel output, 3 - for parallel output,
4 - for write-back interface 4 - for write-back interface
[1]: Documentation/devicetree/bindings/video/display-timing.txt [1]: Documentation/devicetree/bindings/display/display-timing.txt
[2]: Documentation/devicetree/bindings/media/video-interfaces.txt [2]: Documentation/devicetree/bindings/media/video-interfaces.txt
Example: Example:
......
...@@ -9,7 +9,7 @@ Required properties: ...@@ -9,7 +9,7 @@ Required properties:
Required nodes: Required nodes:
- display: Phandle to a display node as described in - display: Phandle to a display node as described in
Documentation/devicetree/bindings/video/display-timing.txt Documentation/devicetree/bindings/display/display-timing.txt
Additional, the display node has to define properties: Additional, the display node has to define properties:
- bits-per-pixel: Bits per pixel - bits-per-pixel: Bits per pixel
- fsl,pcr: LCDC PCR value - fsl,pcr: LCDC PCR value
......
...@@ -63,7 +63,7 @@ Required properties: ...@@ -63,7 +63,7 @@ Required properties:
Optional properties (required if display-timings are used): Optional properties (required if display-timings are used):
- display-timings : A node that describes the display timings as defined in - display-timings : A node that describes the display timings as defined in
Documentation/devicetree/bindings/video/display-timing.txt. Documentation/devicetree/bindings/display/display-timing.txt.
- fsl,data-mapping : should be "spwg" or "jeida" - fsl,data-mapping : should be "spwg" or "jeida"
This describes how the color bits are laid out in the This describes how the color bits are laid out in the
serialized LVDS signal. serialized LVDS signal.
......
PXA LCD Controller
------------------
Required properties:
- compatible : one of these
"marvell,pxa2xx-lcdc",
"marvell,pxa270-lcdc",
"marvell,pxa300-lcdc"
- reg : should contain 1 register range (address and length).
- interrupts : framebuffer controller interrupt.
- clocks: phandle to input clocks
Required nodes:
- port: connection to the LCD panel (see video-interfaces.txt)
This node must have its properties bus-width and remote-endpoint set.
If the panel is not a TFT color panel, then a "lcd-type" property in
the panel should specify the panel type.
This panel node should be in the board dts.
Example:
lcd-controller@40500000 {
compatible = "marvell,pxa2xx-lcdc";
reg = <0x44000000 0x10000>;
interrupts = <17>;
clocks = <&clks CLK_LCD>;
status = "okay";
port {
lcdc_out: endpoint {
remote-endpoint = <&panel_in>;
bus-width = <16>;
};
};
};
...@@ -28,7 +28,7 @@ Required properties: ...@@ -28,7 +28,7 @@ Required properties:
Optional properties: Optional properties:
- panel@0: Node of panel connected to this DSI controller. - panel@0: Node of panel connected to this DSI controller.
See files in Documentation/devicetree/bindings/panel/ for each supported See files in Documentation/devicetree/bindings/display/panel/ for each supported
panel. panel.
- qcom,dual-dsi-mode: Boolean value indicating if the DSI controller is - qcom,dual-dsi-mode: Boolean value indicating if the DSI controller is
driving a panel which needs 2 DSI links. driving a panel which needs 2 DSI links.
......
...@@ -10,7 +10,7 @@ Optional properties: ...@@ -10,7 +10,7 @@ Optional properties:
Required nodes: Required nodes:
- "panel-timing" containing video timings - "panel-timing" containing video timings
(Documentation/devicetree/bindings/video/display-timing.txt) (Documentation/devicetree/bindings/display/display-timing.txt)
- Video port for DPI input - Video port for DPI input
Example Example
......
...@@ -20,7 +20,7 @@ The device node can contain one 'port' child node with one child ...@@ -20,7 +20,7 @@ The device node can contain one 'port' child node with one child
'endpoint' node, according to the bindings defined in [3]. This 'endpoint' node, according to the bindings defined in [3]. This
node should describe panel's video bus. node should describe panel's video bus.
[1]: Documentation/devicetree/bindings/video/display-timing.txt [1]: Documentation/devicetree/bindings/display/display-timing.txt
[2]: Documentation/devicetree/bindings/spi/spi-bus.txt [2]: Documentation/devicetree/bindings/spi/spi-bus.txt
[3]: Documentation/devicetree/bindings/media/video-interfaces.txt [3]: Documentation/devicetree/bindings/media/video-interfaces.txt
......
...@@ -21,7 +21,7 @@ The device node can contain one 'port' child node with one child ...@@ -21,7 +21,7 @@ The device node can contain one 'port' child node with one child
'endpoint' node, according to the bindings defined in [2]. This 'endpoint' node, according to the bindings defined in [2]. This
node should describe panel's video bus. node should describe panel's video bus.
[1]: Documentation/devicetree/bindings/video/display-timing.txt [1]: Documentation/devicetree/bindings/display/display-timing.txt
[2]: Documentation/devicetree/bindings/media/video-interfaces.txt [2]: Documentation/devicetree/bindings/media/video-interfaces.txt
Example: Example:
......
...@@ -9,7 +9,7 @@ Required properties: ...@@ -9,7 +9,7 @@ Required properties:
- compatible: Should be "rockchip,display-subsystem" - compatible: Should be "rockchip,display-subsystem"
- ports: Should contain a list of phandles pointing to display interface port - ports: Should contain a list of phandles pointing to display interface port
of vop devices. vop definitions as defined in of vop devices. vop definitions as defined in
Documentation/devicetree/bindings/video/rockchip-vop.txt Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt
example: example:
......
...@@ -61,7 +61,7 @@ STMicroelectronics stih4xx platforms ...@@ -61,7 +61,7 @@ STMicroelectronics stih4xx platforms
- reg-names: names of the mapped memory regions listed in regs property in - reg-names: names of the mapped memory regions listed in regs property in
the same order. the same order.
- interrupts : HDMI interrupt number to the CPU. - interrupts : HDMI interrupt number to the CPU.
- interrupt-names: name of the interrupts listed in interrupts property in - interrupt-names: names of the interrupts listed in interrupts property in
the same order the same order
- clocks: from common clock binding: handle hardware IP needed clocks, the - clocks: from common clock binding: handle hardware IP needed clocks, the
number of clocks may depend of the SoC type. number of clocks may depend of the SoC type.
...@@ -95,7 +95,7 @@ sti-dvo: ...@@ -95,7 +95,7 @@ sti-dvo:
- clock-names: names of the clocks listed in clocks property in the same - clock-names: names of the clocks listed in clocks property in the same
order. order.
- pinctrl-0: pin control handle - pinctrl-0: pin control handle
- pinctrl-name: names of the pin control to use - pinctrl-names: names of the pin control states to use
- sti,panel: phandle of the panel connected to the DVO output - sti,panel: phandle of the panel connected to the DVO output
sti-hqvdp: sti-hqvdp:
......
...@@ -184,7 +184,7 @@ of the following host1x client modules: ...@@ -184,7 +184,7 @@ of the following host1x client modules:
- avdd-dsi-supply: phandle of a supply that powers the DSI controller - avdd-dsi-supply: phandle of a supply that powers the DSI controller
- nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying - nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying
which pads are used by this DSI output and need to be calibrated. See also which pads are used by this DSI output and need to be calibrated. See also
../mipi/nvidia,tegra114-mipi.txt. ../display/tegra/nvidia,tegra114-mipi.txt.
Optional properties: Optional properties:
- nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
......
Texas Instruments DRA7x Display Subsystem Texas Instruments DRA7x Display Subsystem
========================================= =========================================
See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic
description about OMAP Display Subsystem bindings. description about OMAP Display Subsystem bindings.
DSS Core DSS Core
......
Texas Instruments OMAP2 Display Subsystem Texas Instruments OMAP2 Display Subsystem
========================================= =========================================
See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic
description about OMAP Display Subsystem bindings. description about OMAP Display Subsystem bindings.
DSS Core DSS Core
......
Texas Instruments OMAP3 Display Subsystem Texas Instruments OMAP3 Display Subsystem
========================================= =========================================
See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic
description about OMAP Display Subsystem bindings. description about OMAP Display Subsystem bindings.
DSS Core DSS Core
......
Texas Instruments OMAP4 Display Subsystem Texas Instruments OMAP4 Display Subsystem
========================================= =========================================
See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic
description about OMAP Display Subsystem bindings. description about OMAP Display Subsystem bindings.
DSS Core DSS Core
......
Texas Instruments OMAP5 Display Subsystem Texas Instruments OMAP5 Display Subsystem
========================================= =========================================
See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic See Documentation/devicetree/bindings/display/ti/ti,omap-dss.txt for generic
description about OMAP Display Subsystem bindings. description about OMAP Display Subsystem bindings.
DSS Core DSS Core
......
...@@ -15,7 +15,7 @@ Required properties: ...@@ -15,7 +15,7 @@ Required properties:
- display-timings: typical videomode of lcd panel. Multiple video modes - display-timings: typical videomode of lcd panel. Multiple video modes
can be listed if the panel supports multiple timings, but the 'native-mode' can be listed if the panel supports multiple timings, but the 'native-mode'
should be the preferred/default resolution. Refer to should be the preferred/default resolution. Refer to
Documentation/devicetree/bindings/video/display-timing.txt for display Documentation/devicetree/bindings/display/display-timing.txt for display
timing binding details. timing binding details.
Optional properties: Optional properties:
......
...@@ -9,7 +9,7 @@ Required properties: ...@@ -9,7 +9,7 @@ Required properties:
Example: Example:
hps_0_fpgamgr: fpgamgr@0xff706000 { hps_0_fpgamgr: fpgamgr@ff706000 {
compatible = "altr,socfpga-fpga-mgr"; compatible = "altr,socfpga-fpga-mgr";
reg = <0xFF706000 0x1000 reg = <0xFF706000 0x1000
0xFFB90000 0x1000>; 0xFFB90000 0x1000>;
......
ina209 properties
Required properties:
- compatible: Must be "ti,ina209"
- reg: I2C address
Optional properties:
- shunt-resistor
Shunt resistor value in micro-Ohm
Example:
temp-sensor@4c {
compatible = "ti,ina209";
reg = <0x4c>;
shunt-resistor = <5000>;
};
...@@ -2,6 +2,7 @@ ina2xx properties ...@@ -2,6 +2,7 @@ ina2xx properties
Required properties: Required properties:
- compatible: Must be one of the following: - compatible: Must be one of the following:
- "ti,ina209" for ina209
- "ti,ina219" for ina219 - "ti,ina219" for ina219
- "ti,ina220" for ina220 - "ti,ina220" for ina220
- "ti,ina226" for ina226 - "ti,ina226" for ina226
......
...@@ -65,6 +65,7 @@ Optional properties: ...@@ -65,6 +65,7 @@ Optional properties:
pendown-gpio GPIO handle describing the pin the !PENIRQ pendown-gpio GPIO handle describing the pin the !PENIRQ
line is connected to. line is connected to.
wakeup-source use any event on touchscreen as wakeup event. wakeup-source use any event on touchscreen as wakeup event.
(Legacy property support: "linux,wakeup")
Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC:: Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC::
...@@ -86,6 +87,6 @@ Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC:: ...@@ -86,6 +87,6 @@ Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC::
ti,x-plate-ohms = /bits/ 16 <40>; ti,x-plate-ohms = /bits/ 16 <40>;
ti,pressure-max = /bits/ 16 <255>; ti,pressure-max = /bits/ 16 <255>;
linux,wakeup; wakeup-source;
}; };
}; };
...@@ -28,6 +28,7 @@ Optional subnode-properties: ...@@ -28,6 +28,7 @@ Optional subnode-properties:
- debounce-interval: Debouncing interval time in milliseconds. - debounce-interval: Debouncing interval time in milliseconds.
If not specified defaults to 5. If not specified defaults to 5.
- wakeup-source: Boolean, button can wake-up the system. - wakeup-source: Boolean, button can wake-up the system.
(Legacy property supported: "gpio-key,wakeup")
Example nodes: Example nodes:
......
...@@ -24,6 +24,7 @@ Optional subnode-properties: ...@@ -24,6 +24,7 @@ Optional subnode-properties:
- debounce-interval: Debouncing interval time in milliseconds. - debounce-interval: Debouncing interval time in milliseconds.
If not specified defaults to 5. If not specified defaults to 5.
- wakeup-source: Boolean, button can wake-up the system. - wakeup-source: Boolean, button can wake-up the system.
(Legacy property supported: "gpio-key,wakeup")
- linux,can-disable: Boolean, indicates that button is connected - linux,can-disable: Boolean, indicates that button is connected
to dedicated (not shared) interrupt which can be disabled to to dedicated (not shared) interrupt which can be disabled to
suppress events from the button. suppress events from the button.
......
...@@ -20,6 +20,7 @@ Required Properties: ...@@ -20,6 +20,7 @@ Required Properties:
Optional Properties: Optional Properties:
- linux,no-autorepeat: do no enable autorepeat feature. - linux,no-autorepeat: do no enable autorepeat feature.
- wakeup-source: use any event on keypad as wakeup event. - wakeup-source: use any event on keypad as wakeup event.
(Legacy property supported: "linux,wakeup")
- debounce-delay-ms: debounce interval in milliseconds - debounce-delay-ms: debounce interval in milliseconds
- col-scan-delay-us: delay, measured in microseconds, that is needed - col-scan-delay-us: delay, measured in microseconds, that is needed
before we can scan keypad after activating column gpio before we can scan keypad after activating column gpio
......
...@@ -29,7 +29,8 @@ matrix-keyboard bindings: ...@@ -29,7 +29,8 @@ matrix-keyboard bindings:
- nvidia,debounce-delay-ms: delay in milliseconds per row scan for debouncing - nvidia,debounce-delay-ms: delay in milliseconds per row scan for debouncing
- nvidia,repeat-delay-ms: delay in milliseconds before repeat starts - nvidia,repeat-delay-ms: delay in milliseconds before repeat starts
- nvidia,ghost-filter: enable ghost filtering for this device - nvidia,ghost-filter: enable ghost filtering for this device
- nvidia,wakeup-source: configure keyboard as a wakeup source for suspend/resume - wakeup-source: configure keyboard as a wakeup source for suspend/resume
(Legacy property supported: "nvidia,wakeup-source")
Example: Example:
......
...@@ -37,6 +37,7 @@ PROPERTIES ...@@ -37,6 +37,7 @@ PROPERTIES
Usage: optional Usage: optional
Value type: <bool> Value type: <bool>
Definition: use any event on keypad as wakeup event. Definition: use any event on keypad as wakeup event.
(Legacy property supported: "linux,keypad-wakeup")
- keypad,num-rows: - keypad,num-rows:
Usage: required Usage: required
......
...@@ -38,6 +38,7 @@ Required Board Specific Properties: ...@@ -38,6 +38,7 @@ Required Board Specific Properties:
Optional Properties: Optional Properties:
- wakeup-source: use any event on keypad as wakeup event. - wakeup-source: use any event on keypad as wakeup event.
(Legacy property supported: "linux,input-wakeup")
Optional Properties specific to linux: Optional Properties specific to linux:
- linux,keypad-no-autorepeat: do no enable autorepeat feature. - linux,keypad-no-autorepeat: do no enable autorepeat feature.
...@@ -51,7 +52,7 @@ Example: ...@@ -51,7 +52,7 @@ Example:
samsung,keypad-num-rows = <2>; samsung,keypad-num-rows = <2>;
samsung,keypad-num-columns = <8>; samsung,keypad-num-columns = <8>;
linux,input-no-autorepeat; linux,input-no-autorepeat;
linux,input-wakeup; wakeup-source;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&keypad_rows &keypad_columns>; pinctrl-0 = <&keypad_rows &keypad_columns>;
......
...@@ -15,7 +15,7 @@ Required properties: ...@@ -15,7 +15,7 @@ Required properties:
The HLCDC IP exposes two subdevices: The HLCDC IP exposes two subdevices:
- a PWM chip: see ../pwm/atmel-hlcdc-pwm.txt - a PWM chip: see ../pwm/atmel-hlcdc-pwm.txt
- a Display Controller: see ../drm/atmel-hlcdc-dc.txt - a Display Controller: see ../display/atmel-hlcdc-dc.txt
Example: Example:
......
...@@ -6,7 +6,7 @@ Required properties: ...@@ -6,7 +6,7 @@ Required properties:
Required child nodes: Required child nodes:
- backlight : container node for backlight following the binding - backlight : container node for backlight following the binding
in video/backlight/sky81452-backlight.txt in leds/backlight/sky81452-backlight.txt
- regulator : container node for regulators following the binding - regulator : container node for regulators following the binding
in regulator/sky81452-regulator.txt in regulator/sky81452-regulator.txt
......
...@@ -56,6 +56,7 @@ Optional nodes: ...@@ -56,6 +56,7 @@ Optional nodes:
bindings/input/matrix-keymap.txt bindings/input/matrix-keymap.txt
- linux,no-autorepeat: do no enable autorepeat feature. - linux,no-autorepeat: do no enable autorepeat feature.
- wakeup-source: use any event on keypad as wakeup event. - wakeup-source: use any event on keypad as wakeup event.
(Legacy property supported: "linux,wakeup")
Example: Example:
......
...@@ -68,7 +68,8 @@ polarity is in effect. ...@@ -68,7 +68,8 @@ polarity is in effect.
Optional SDIO properties: Optional SDIO properties:
- keep-power-in-suspend: Preserves card power during a suspend/resume cycle - keep-power-in-suspend: Preserves card power during a suspend/resume cycle
- enable-sdio-wakeup: Enables wake up of host system on SDIO IRQ assertion - wakeup-source: Enables wake up of host system on SDIO IRQ assertion
(Legacy property supported: "enable-sdio-wakeup")
MMC power sequences: MMC power sequences:
...@@ -118,7 +119,7 @@ sdhci@ab000000 { ...@@ -118,7 +119,7 @@ sdhci@ab000000 {
wp-gpios = <&gpio 70 0>; wp-gpios = <&gpio 70 0>;
max-frequency = <50000000>; max-frequency = <50000000>;
keep-power-in-suspend; keep-power-in-suspend;
enable-sdio-wakeup; wakeup-source;
mmc-pwrseq = <&sdhci0_pwrseq> mmc-pwrseq = <&sdhci0_pwrseq>
} }
......
PCI bus bridges have standardized Device Tree bindings: PCI bus bridges have standardized Device Tree bindings:
PCI Bus Binding to: IEEE Std 1275-1994 PCI Bus Binding to: IEEE Std 1275-1994
http://www.openfirmware.org/ofwg/bindings/pci/pci2_1.pdf http://www.firmware.org/1275/bindings/pci/pci2_1.pdf
And for the interrupt mapping part: And for the interrupt mapping part:
Open Firmware Recommended Practice: Interrupt Mapping Open Firmware Recommended Practice: Interrupt Mapping
http://www.openfirmware.org/1275/practice/imap/imap0_9d.pdf http://www.firmware.org/1275/practice/imap/imap0_9d.pdf
Additionally to the properties specified in the above standards a host bridge Additionally to the properties specified in the above standards a host bridge
driver implementation may support the following properties: driver implementation may support the following properties:
......
Specifying wakeup capability for devices
============================================
Any device nodes
----------------
Nodes that describe devices which has wakeup capability must contain an
"wakeup-source" boolean property.
Also, if device is marked as a wakeup source, then all the primary
interrupt(s) can be used as wakeup interrupt(s).
However if the devices have dedicated interrupt as the wakeup source
then they need to specify/identify the same using device specific
interrupt name. In such cases only that interrupt can be used as wakeup
interrupt.
List of legacy properties and respective binding document
---------------------------------------------------------
1. "enable-sdio-wakeup" Documentation/devicetree/bindings/mmc/mmc.txt
2. "gpio-key,wakeup" Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt
3. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt
4. "isil,irq2-can-wakeup-machine" Documentation/devicetree/bindings/rtc/isil,isl12057.txt
5. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
Documentation/devicetree/bindings/mfd/tc3589x.txt
Documentation/devicetree/bindings/input/ads7846.txt
6. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
7. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung-keypad.txt
8. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
Examples
--------
1. With "wakeup" interrupt name
device@10000 {
compatible = "vendor,device-id";
reg = <0x10000 0x1000>;
interrupts = <0 19 4>, <0 21 4>, <0 22 4>;
interrupt-names = "ack", "err", "wakeup";
wakeup-source;
};
2. Without "wakeup" interrupt name
embedded-controller {
compatible = "google,cros-ec-i2c";
reg = <0x1e>;
interrupts = <6 0>;
interrupt-parent = <&gpx1>;
pinctrl-names = "default";
pinctrl-0 = <&ec_irq>;
wakeup-source;
};
3. Without interrupts
gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
button@1 {
debounce_interval = <50>;
wakeup-source;
linux,code = <116>;
label = "POWER";
gpios = <&iofpga_gpio0 0 0x4>;
};
[....]
};
...@@ -5,7 +5,7 @@ consisting of a compatible field, an address and possibly an interrupt ...@@ -5,7 +5,7 @@ consisting of a compatible field, an address and possibly an interrupt
line). line).
Nonetheless, it also supports an option boolean property Nonetheless, it also supports an option boolean property
("isil,irq2-can-wakeup-machine") to handle the specific use-case found ("wakeup-source") to handle the specific use-case found
on at least three in-tree users of the chip (NETGEAR ReadyNAS 102, 104 on at least three in-tree users of the chip (NETGEAR ReadyNAS 102, 104
and 2120 ARM-based NAS); On those devices, the IRQ#2 pin of the chip and 2120 ARM-based NAS); On those devices, the IRQ#2 pin of the chip
(associated with the alarm supported by the driver) is not connected (associated with the alarm supported by the driver) is not connected
...@@ -22,9 +22,9 @@ Required properties supported by the device: ...@@ -22,9 +22,9 @@ Required properties supported by the device:
Optional properties: Optional properties:
- "isil,irq2-can-wakeup-machine": mark the chip as a wakeup source, - "wakeup-source": mark the chip as a wakeup source, independently of
independently of the availability of an IRQ line connected to the the availability of an IRQ line connected to the SoC.
SoC. (Legacy property supported: "isil,irq2-can-wakeup-machine")
- "interrupt-parent", "interrupts": for passing the interrupt line - "interrupt-parent", "interrupts": for passing the interrupt line
of the SoC connected to IRQ#2 of the RTC chip. of the SoC connected to IRQ#2 of the RTC chip.
...@@ -74,5 +74,5 @@ PMIC, allowing the device to be started based on configured alarm: ...@@ -74,5 +74,5 @@ PMIC, allowing the device to be started based on configured alarm:
isl12057: isl12057@68 { isl12057: isl12057@68 {
compatible = "isil,isl12057"; compatible = "isil,isl12057";
reg = <0x68>; reg = <0x68>;
isil,irq2-can-wakeup-machine; wakeup-source;
}; };
...@@ -5,12 +5,13 @@ Required properties: ...@@ -5,12 +5,13 @@ Required properties:
- comapatible: Should be "ibm,opal-rtc" - comapatible: Should be "ibm,opal-rtc"
Optional properties: Optional properties:
- has-tpo: Decides if the wakeup is supported or not. - wakeup-source: Decides if the wakeup is supported or not
(Legacy property supported: "has-tpo")
Example: Example:
rtc { rtc {
compatible = "ibm,opal-rtc"; compatible = "ibm,opal-rtc";
has-tpo; wakeup-source;
phandle = <0x10000029>; phandle = <0x10000029>;
linux,phandle = <0x10000029>; linux,phandle = <0x10000029>;
}; };
...@@ -10,7 +10,6 @@ Required properties: ...@@ -10,7 +10,6 @@ Required properties:
mvrl,pxa168-ssp mvrl,pxa168-ssp
mrvl,pxa910-ssp mrvl,pxa910-ssp
mrvl,ce4100-ssp mrvl,ce4100-ssp
mrvl,lpss-ssp
- reg: The memory base - reg: The memory base
- dmas: Two dma phandles, one for rx, one for tx - dmas: Two dma phandles, one for rx, one for tx
......
SAMSUNG USB-PHY controllers
** Samsung's usb 2.0 phy transceiver
The Samsung's usb 2.0 phy transceiver is used for controlling
usb 2.0 phy for s3c-hsotg as well as ehci-s5p and ohci-exynos
usb controllers across Samsung SOCs.
TODO: Adding the PHY binding with controller(s) according to the under
development generic PHY driver.
Required properties:
Exynos4210:
- compatible : should be "samsung,exynos4210-usb2phy"
- reg : base physical address of the phy registers and length of memory mapped
region.
- clocks: Clock IDs array as required by the controller.
- clock-names: names of clock correseponding IDs clock property as requested
by the controller driver.
Exynos5250:
- compatible : should be "samsung,exynos5250-usb2phy"
- reg : base physical address of the phy registers and length of memory mapped
region.
Optional properties:
- #address-cells: should be '1' when usbphy node has a child node with 'reg'
property.
- #size-cells: should be '1' when usbphy node has a child node with 'reg'
property.
- ranges: allows valid translation between child's address space and parent's
address space.
- The child node 'usbphy-sys' to the node 'usbphy' is for the system controller
interface for usb-phy. It should provide the following information required by
usb-phy controller to control phy.
- reg : base physical address of PHY_CONTROL registers.
The size of this register is the total sum of size of all PHY_CONTROL
registers that the SoC has. For example, the size will be
'0x4' in case we have only one PHY_CONTROL register (e.g.
OTHERS register in S3C64XX or USB_PHY_CONTROL register in S5PV210)
and, '0x8' in case we have two PHY_CONTROL registers (e.g.
USBDEVICE_PHY_CONTROL and USBHOST_PHY_CONTROL registers in exynos4x).
and so on.
Example:
- Exynos4210
usbphy@125B0000 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "samsung,exynos4210-usb2phy";
reg = <0x125B0000 0x100>;
ranges;
clocks = <&clock 2>, <&clock 305>;
clock-names = "xusbxti", "otg";
usbphy-sys {
/* USB device and host PHY_CONTROL registers */
reg = <0x10020704 0x8>;
};
};
** Samsung's usb 3.0 phy transceiver
Starting exynso5250, Samsung's SoC have usb 3.0 phy transceiver
which is used for controlling usb 3.0 phy for dwc3-exynos usb 3.0
controllers across Samsung SOCs.
Required properties:
Exynos5250:
- compatible : should be "samsung,exynos5250-usb3phy"
- reg : base physical address of the phy registers and length of memory mapped
region.
- clocks: Clock IDs array as required by the controller.
- clock-names: names of clocks correseponding to IDs in the clock property
as requested by the controller driver.
Optional properties:
- #address-cells: should be '1' when usbphy node has a child node with 'reg'
property.
- #size-cells: should be '1' when usbphy node has a child node with 'reg'
property.
- ranges: allows valid translation between child's address space and parent's
address space.
- The child node 'usbphy-sys' to the node 'usbphy' is for the system controller
interface for usb-phy. It should provide the following information required by
usb-phy controller to control phy.
- reg : base physical address of PHY_CONTROL registers.
The size of this register is the total sum of size of all PHY_CONTROL
registers that the SoC has. For example, the size will be
'0x4' in case we have only one PHY_CONTROL register (e.g.
OTHERS register in S3C64XX or USB_PHY_CONTROL register in S5PV210)
and, '0x8' in case we have two PHY_CONTROL registers (e.g.
USBDEVICE_PHY_CONTROL and USBHOST_PHY_CONTROL registers in exynos4x).
and so on.
Example:
usbphy@12100000 {
compatible = "samsung,exynos5250-usb3phy";
reg = <0x12100000 0x100>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
clocks = <&clock 1>, <&clock 286>;
clock-names = "ext_xtal", "usbdrd30";
usbphy-sys {
/* USB device and host PHY_CONTROL registers */
reg = <0x10040704 0x8>;
};
};
...@@ -51,6 +51,7 @@ cirrus Cirrus Logic, Inc. ...@@ -51,6 +51,7 @@ cirrus Cirrus Logic, Inc.
cloudengines Cloud Engines, Inc. cloudengines Cloud Engines, Inc.
cnm Chips&Media, Inc. cnm Chips&Media, Inc.
cnxt Conexant Systems, Inc. cnxt Conexant Systems, Inc.
compulab CompuLab Ltd.
cortina Cortina Systems, Inc. cortina Cortina Systems, Inc.
cosmic Cosmic Circuits cosmic Cosmic Circuits
crystalfontz Crystalfontz America, Inc. crystalfontz Crystalfontz America, Inc.
...@@ -196,6 +197,7 @@ seagate Seagate Technology PLC ...@@ -196,6 +197,7 @@ seagate Seagate Technology PLC
semtech Semtech Corporation semtech Semtech Corporation
sgx SGX Sensortech sgx SGX Sensortech
sharp Sharp Corporation sharp Sharp Corporation
sigma Sigma Designs, Inc.
sil Silicon Image sil Silicon Image
silabs Silicon Laboratories silabs Silicon Laboratories
siliconmitus Silicon Mitus, Inc. siliconmitus Silicon Mitus, Inc.
......
...@@ -3616,7 +3616,7 @@ S: Maintained ...@@ -3616,7 +3616,7 @@ S: Maintained
F: drivers/gpu/drm/drm_panel.c F: drivers/gpu/drm/drm_panel.c
F: drivers/gpu/drm/panel/ F: drivers/gpu/drm/panel/
F: include/drm/drm_panel.h F: include/drm/drm_panel.h
F: Documentation/devicetree/bindings/panel/ F: Documentation/devicetree/bindings/display/panel/
INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets) INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets)
M: Daniel Vetter <daniel.vetter@intel.com> M: Daniel Vetter <daniel.vetter@intel.com>
...@@ -3655,15 +3655,15 @@ M: Alison Wang <alison.wang@freescale.com> ...@@ -3655,15 +3655,15 @@ M: Alison Wang <alison.wang@freescale.com>
L: dri-devel@lists.freedesktop.org L: dri-devel@lists.freedesktop.org
S: Supported S: Supported
F: drivers/gpu/drm/fsl-dcu/ F: drivers/gpu/drm/fsl-dcu/
F: Documentation/devicetree/bindings/video/fsl,dcu.txt F: Documentation/devicetree/bindings/display/fsl,dcu.txt
F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt F: Documentation/devicetree/bindings/display/panel/nec,nl4827hc19_05b.txt
DRM DRIVERS FOR FREESCALE IMX DRM DRIVERS FOR FREESCALE IMX
M: Philipp Zabel <p.zabel@pengutronix.de> M: Philipp Zabel <p.zabel@pengutronix.de>
L: dri-devel@lists.freedesktop.org L: dri-devel@lists.freedesktop.org
S: Maintained S: Maintained
F: drivers/gpu/drm/imx/ F: drivers/gpu/drm/imx/
F: Documentation/devicetree/bindings/drm/imx/ F: Documentation/devicetree/bindings/display/imx/
DRM DRIVERS FOR GMA500 (Poulsbo, Moorestown and derivative chipsets) DRM DRIVERS FOR GMA500 (Poulsbo, Moorestown and derivative chipsets)
M: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> M: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
...@@ -3684,7 +3684,7 @@ F: drivers/gpu/drm/tegra/ ...@@ -3684,7 +3684,7 @@ F: drivers/gpu/drm/tegra/
F: drivers/gpu/host1x/ F: drivers/gpu/host1x/
F: include/linux/host1x.h F: include/linux/host1x.h
F: include/uapi/drm/tegra_drm.h F: include/uapi/drm/tegra_drm.h
F: Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt F: Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
DRM DRIVERS FOR RENESAS DRM DRIVERS FOR RENESAS
M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> M: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
...@@ -3701,7 +3701,7 @@ M: Mark Yao <mark.yao@rock-chips.com> ...@@ -3701,7 +3701,7 @@ M: Mark Yao <mark.yao@rock-chips.com>
L: dri-devel@lists.freedesktop.org L: dri-devel@lists.freedesktop.org
S: Maintained S: Maintained
F: drivers/gpu/drm/rockchip/ F: drivers/gpu/drm/rockchip/
F: Documentation/devicetree/bindings/video/rockchip* F: Documentation/devicetree/bindings/display/rockchip*
DRM DRIVERS FOR STI DRM DRIVERS FOR STI
M: Benjamin Gaignard <benjamin.gaignard@linaro.org> M: Benjamin Gaignard <benjamin.gaignard@linaro.org>
...@@ -3710,7 +3710,7 @@ L: dri-devel@lists.freedesktop.org ...@@ -3710,7 +3710,7 @@ L: dri-devel@lists.freedesktop.org
T: git http://git.linaro.org/people/benjamin.gaignard/kernel.git T: git http://git.linaro.org/people/benjamin.gaignard/kernel.git
S: Maintained S: Maintained
F: drivers/gpu/drm/sti F: drivers/gpu/drm/sti
F: Documentation/devicetree/bindings/gpu/st,stih4xx.txt F: Documentation/devicetree/bindings/display/st,stih4xx.txt
DSBR100 USB FM RADIO DRIVER DSBR100 USB FM RADIO DRIVER
M: Alexey Klimov <klimov.linux@gmail.com> M: Alexey Klimov <klimov.linux@gmail.com>
...@@ -4403,7 +4403,6 @@ Q: http://patchwork.kernel.org/project/linux-fbdev/list/ ...@@ -4403,7 +4403,6 @@ Q: http://patchwork.kernel.org/project/linux-fbdev/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev.git
S: Maintained S: Maintained
F: Documentation/fb/ F: Documentation/fb/
F: Documentation/devicetree/bindings/fb/
F: drivers/video/ F: drivers/video/
F: include/video/ F: include/video/
F: include/linux/fb.h F: include/linux/fb.h
...@@ -6967,6 +6966,7 @@ S: Supported ...@@ -6967,6 +6966,7 @@ S: Supported
F: arch/metag/ F: arch/metag/
F: Documentation/metag/ F: Documentation/metag/
F: Documentation/devicetree/bindings/metag/ F: Documentation/devicetree/bindings/metag/
F: Documentation/devicetree/bindings/interrupt-controller/img,*
F: drivers/clocksource/metag_generic.c F: drivers/clocksource/metag_generic.c
F: drivers/irqchip/irq-metag.c F: drivers/irqchip/irq-metag.c
F: drivers/irqchip/irq-metag-ext.c F: drivers/irqchip/irq-metag-ext.c
...@@ -9634,7 +9634,7 @@ SIMPLEFB FB DRIVER ...@@ -9634,7 +9634,7 @@ SIMPLEFB FB DRIVER
M: Hans de Goede <hdegoede@redhat.com> M: Hans de Goede <hdegoede@redhat.com>
L: linux-fbdev@vger.kernel.org L: linux-fbdev@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/video/simple-framebuffer.txt F: Documentation/devicetree/bindings/display/simple-framebuffer.txt
F: drivers/video/fbdev/simplefb.c F: drivers/video/fbdev/simplefb.c
F: include/linux/platform_data/simplefb.h F: include/linux/platform_data/simplefb.h
...@@ -10265,6 +10265,7 @@ L: linux-snps-arc@lists.infraded.org ...@@ -10265,6 +10265,7 @@ L: linux-snps-arc@lists.infraded.org
S: Supported S: Supported
F: arch/arc/ F: arch/arc/
F: Documentation/devicetree/bindings/arc/* F: Documentation/devicetree/bindings/arc/*
F: Documentation/devicetree/bindings/interrupt-controller/snps,arc*
F: drivers/tty/serial/arc_uart.c F: drivers/tty/serial/arc_uart.c
T: git git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git
......
...@@ -121,7 +121,7 @@ $(boot_targets): vmlinux ...@@ -121,7 +121,7 @@ $(boot_targets): vmlinux
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@ $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
dtbs: scripts dtbs: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts dtbs $(Q)$(MAKE) $(build)=$(boot)/dts
archclean: archclean:
$(Q)$(MAKE) $(clean)=$(boot) $(Q)$(MAKE) $(clean)=$(boot)
......
...@@ -6,10 +6,12 @@ ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),"") ...@@ -6,10 +6,12 @@ ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),"")
endif endif
obj-y += $(builtindtb-y).dtb.o obj-y += $(builtindtb-y).dtb.o
targets += $(builtindtb-y).dtb dtb-y := $(builtindtb-y).dtb
.SECONDARY: $(obj)/$(builtindtb-y).dtb.S .SECONDARY: $(obj)/$(builtindtb-y).dtb.S
dtbs: $(addprefix $(obj)/, $(builtindtb-y).dtb) dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
always := $(dtb-y)
clean-files := *.dtb *.dtb.S clean-files := *.dtb *.dtb.S
...@@ -740,5 +740,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ ...@@ -740,5 +740,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
endif endif
dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
always := $(dtb-y) always := $(dtb-y)
clean-files := *.dtb clean-files := *.dtb
...@@ -14,3 +14,9 @@ dts-dirs += sprd ...@@ -14,3 +14,9 @@ dts-dirs += sprd
dts-dirs += xilinx dts-dirs += xilinx
subdir-y := $(dts-dirs) subdir-y := $(dts-dirs)
dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(foreach d,$(dts-dirs), $(wildcard $(dtstree)/$(d)/*.dts)))
always := $(dtb-y)
...@@ -8,5 +8,8 @@ dtb-$(CONFIG_H8300H_SIM) := h8300h_sim.dtb ...@@ -8,5 +8,8 @@ dtb-$(CONFIG_H8300H_SIM) := h8300h_sim.dtb
dtb-$(CONFIG_H8S_SIM) := h8s_sim.dtb dtb-$(CONFIG_H8S_SIM) := h8s_sim.dtb
dtb-$(CONFIG_H8S_EDOSK2674) := edosk2674.dtb dtb-$(CONFIG_H8S_EDOSK2674) := edosk2674.dtb
dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
always := $(dtb-y) always := $(dtb-y)
clean-files := *.dtb.S *.dtb clean-files := *.dtb.S *.dtb
...@@ -72,7 +72,7 @@ $(boot_targets): vmlinux ...@@ -72,7 +72,7 @@ $(boot_targets): vmlinux
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@ $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
dtbs: scripts dtbs: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts dtbs $(Q)$(MAKE) $(build)=$(boot)/dts
archclean: archclean:
$(Q)$(MAKE) $(clean)=$(boot) $(Q)$(MAKE) $(clean)=$(boot)
......
...@@ -12,11 +12,10 @@ endif ...@@ -12,11 +12,10 @@ endif
dtb-$(CONFIG_METAG_BUILTIN_DTB) += $(builtindtb-y).dtb dtb-$(CONFIG_METAG_BUILTIN_DTB) += $(builtindtb-y).dtb
obj-$(CONFIG_METAG_BUILTIN_DTB) += $(builtindtb-y).dtb.o obj-$(CONFIG_METAG_BUILTIN_DTB) += $(builtindtb-y).dtb.o
targets += dtbs dtstree := $(srctree)/$(src)
targets += $(dtb-y) dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
.SECONDARY: $(obj)/$(builtindtb-y).dtb.S .SECONDARY: $(obj)/$(builtindtb-y).dtb.S
dtbs: $(addprefix $(obj)/, $(dtb-y)) always += $(dtb-y)
clean-files += *.dtb *.dtb.S clean-files += *.dtb *.dtb.S
...@@ -9,6 +9,9 @@ dts-dirs += ralink ...@@ -9,6 +9,9 @@ dts-dirs += ralink
obj-y := $(addsuffix /, $(dts-dirs)) obj-y := $(addsuffix /, $(dts-dirs))
dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(foreach d,$(dts-dirs), $(wildcard $(dtstree)/$(d)/*.dts)))
always := $(dtb-y) always := $(dtb-y)
subdir-y := $(dts-dirs) subdir-y := $(dts-dirs)
clean-files := *.dtb *.dtb.S clean-files := *.dtb *.dtb.S
...@@ -101,6 +101,10 @@ zImage: vmlinux ...@@ -101,6 +101,10 @@ zImage: vmlinux
%.dtb: %.dtb:
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@ $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
dtbs: scripts
$(Q)$(MAKE) $(build)=$(boot)/dts
define archhelp define archhelp
@echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
@echo ' dtbs - Build device tree blobs for enabled boards'
endef endef
...@@ -12,4 +12,9 @@ ifneq ($(CONFIG_BUILTIN_DTB),"") ...@@ -12,4 +12,9 @@ ifneq ($(CONFIG_BUILTIN_DTB),"")
obj-$(CONFIG_OF) += $(BUILTIN_DTB) obj-$(CONFIG_OF) += $(BUILTIN_DTB)
endif endif
clean-files := *.dtb.S dtstree := $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
always += $(dtb-y)
clean-files += *.dtb *.dtb.S
...@@ -23,6 +23,16 @@ config OF_UNITTEST ...@@ -23,6 +23,16 @@ config OF_UNITTEST
If unsure, say N here, but this option is safe to enable. If unsure, say N here, but this option is safe to enable.
config OF_ALL_DTBS
bool "Build all Device Tree Blobs"
depends on COMPILE_TEST
select DTC
help
This option builds all possible Device Tree Blobs (DTBs) for the
current architecture.
If unsure, say N here, but this option is safe to enable.
config OF_FLATTREE config OF_FLATTREE
bool bool
select DTC select DTC
......
...@@ -330,6 +330,12 @@ int of_pci_range_to_resource(struct of_pci_range *range, ...@@ -330,6 +330,12 @@ int of_pci_range_to_resource(struct of_pci_range *range,
} }
res->start = port; res->start = port;
} else { } else {
if ((sizeof(resource_size_t) < 8) &&
upper_32_bits(range->cpu_addr)) {
err = -EINVAL;
goto invalid_range;
}
res->start = range->cpu_addr; res->start = range->cpu_addr;
} }
res->end = res->start + range->size - 1; res->end = res->start + range->size - 1;
......
...@@ -375,10 +375,7 @@ bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun, ...@@ -375,10 +375,7 @@ bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun,
cpu, thread)) cpu, thread))
return true; return true;
if (__of_find_n_match_cpu_property(cpun, "reg", cpu, thread)) return __of_find_n_match_cpu_property(cpun, "reg", cpu, thread);
return true;
return false;
} }
/** /**
......
...@@ -184,7 +184,7 @@ static void * unflatten_dt_node(const void *blob, ...@@ -184,7 +184,7 @@ static void * unflatten_dt_node(const void *blob,
struct property *pp, **prev_pp = NULL; struct property *pp, **prev_pp = NULL;
const char *pathp; const char *pathp;
unsigned int l, allocl; unsigned int l, allocl;
static int depth = 0; static int depth;
int old_depth; int old_depth;
int offset; int offset;
int has_name = 0; int has_name = 0;
...@@ -813,20 +813,24 @@ static int __init early_init_dt_scan_chosen_serial(void) ...@@ -813,20 +813,24 @@ static int __init early_init_dt_scan_chosen_serial(void)
if (!p || !l) if (!p || !l)
return -ENOENT; return -ENOENT;
/* Remove console options if present */
l = strchrnul(p, ':') - p;
/* Get the node specified by stdout-path */ /* Get the node specified by stdout-path */
offset = fdt_path_offset(fdt, p); offset = fdt_path_offset_namelen(fdt, p, l);
if (offset < 0) if (offset < 0)
return -ENODEV; return -ENODEV;
while (match->compatible[0]) { while (match->compatible[0]) {
unsigned long addr; u64 addr;
if (fdt_node_check_compatible(fdt, offset, match->compatible)) { if (fdt_node_check_compatible(fdt, offset, match->compatible)) {
match++; match++;
continue; continue;
} }
addr = fdt_translate_address(fdt, offset); addr = fdt_translate_address(fdt, offset);
if (!addr) if (addr == OF_BAD_ADDR)
return -ENXIO; return -ENXIO;
of_setup_earlycon(addr, match->data); of_setup_earlycon(addr, match->data);
......
...@@ -53,7 +53,7 @@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map); ...@@ -53,7 +53,7 @@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
* Returns a pointer to the interrupt parent node, or NULL if the interrupt * Returns a pointer to the interrupt parent node, or NULL if the interrupt
* parent could not be determined. * parent could not be determined.
*/ */
struct device_node *of_irq_find_parent(struct device_node *child) static struct device_node *of_irq_find_parent(struct device_node *child)
{ {
struct device_node *p; struct device_node *p;
const __be32 *parp; const __be32 *parp;
...@@ -501,10 +501,12 @@ void __init of_irq_init(const struct of_device_id *matches) ...@@ -501,10 +501,12 @@ void __init of_irq_init(const struct of_device_id *matches)
* pointer, interrupt-parent device_node etc. * pointer, interrupt-parent device_node etc.
*/ */
desc = kzalloc(sizeof(*desc), GFP_KERNEL); desc = kzalloc(sizeof(*desc), GFP_KERNEL);
if (WARN_ON(!desc)) if (WARN_ON(!desc)) {
of_node_put(np);
goto err; goto err;
}
desc->dev = np; desc->dev = of_node_get(np);
desc->interrupt_parent = of_irq_find_parent(np); desc->interrupt_parent = of_irq_find_parent(np);
if (desc->interrupt_parent == np) if (desc->interrupt_parent == np)
desc->interrupt_parent = NULL; desc->interrupt_parent = NULL;
...@@ -575,6 +577,7 @@ void __init of_irq_init(const struct of_device_id *matches) ...@@ -575,6 +577,7 @@ void __init of_irq_init(const struct of_device_id *matches)
err: err:
list_for_each_entry_safe(desc, temp_desc, &intc_desc_list, list) { list_for_each_entry_safe(desc, temp_desc, &intc_desc_list, list) {
list_del(&desc->list); list_del(&desc->list);
of_node_put(desc->dev);
kfree(desc); kfree(desc);
} }
} }
......
...@@ -249,8 +249,10 @@ int of_pci_get_host_bridge_resources(struct device_node *dev, ...@@ -249,8 +249,10 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,
} }
err = of_pci_range_to_resource(&range, dev, res); err = of_pci_range_to_resource(&range, dev, res);
if (err) if (err) {
goto conversion_failed; kfree(res);
continue;
}
if (resource_type(res) == IORESOURCE_IO) { if (resource_type(res) == IORESOURCE_IO) {
if (!io_base) { if (!io_base) {
......
/* /*
* Device tree based initialization code for reserved memory. * Device tree based initialization code for reserved memory.
* *
* Copyright (c) 2013, The Linux Foundation. All Rights Reserved. * Copyright (c) 2013, 2015 The Linux Foundation. All Rights Reserved.
* Copyright (c) 2013,2014 Samsung Electronics Co., Ltd. * Copyright (c) 2013,2014 Samsung Electronics Co., Ltd.
* http://www.samsung.com * http://www.samsung.com
* Author: Marek Szyprowski <m.szyprowski@samsung.com> * Author: Marek Szyprowski <m.szyprowski@samsung.com>
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/sizes.h> #include <linux/sizes.h>
#include <linux/of_reserved_mem.h> #include <linux/of_reserved_mem.h>
#include <linux/sort.h>
#define MAX_RESERVED_REGIONS 16 #define MAX_RESERVED_REGIONS 16
static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS]; static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS];
...@@ -197,12 +198,52 @@ static int __init __reserved_mem_init_node(struct reserved_mem *rmem) ...@@ -197,12 +198,52 @@ static int __init __reserved_mem_init_node(struct reserved_mem *rmem)
return -ENOENT; return -ENOENT;
} }
static int __init __rmem_cmp(const void *a, const void *b)
{
const struct reserved_mem *ra = a, *rb = b;
return ra->base - rb->base;
}
static void __init __rmem_check_for_overlap(void)
{
int i;
if (reserved_mem_count < 2)
return;
sort(reserved_mem, reserved_mem_count, sizeof(reserved_mem[0]),
__rmem_cmp, NULL);
for (i = 0; i < reserved_mem_count - 1; i++) {
struct reserved_mem *this, *next;
this = &reserved_mem[i];
next = &reserved_mem[i + 1];
if (!(this->base && next->base))
continue;
if (this->base + this->size > next->base) {
phys_addr_t this_end, next_end;
this_end = this->base + this->size;
next_end = next->base + next->size;
WARN(1,
"Reserved memory: OVERLAP DETECTED!\n%s (%pa--%pa) overlaps with %s (%pa--%pa)\n",
this->name, &this->base, &this_end,
next->name, &next->base, &next_end);
}
}
}
/** /**
* fdt_init_reserved_mem - allocate and init all saved reserved memory regions * fdt_init_reserved_mem - allocate and init all saved reserved memory regions
*/ */
void __init fdt_init_reserved_mem(void) void __init fdt_init_reserved_mem(void)
{ {
int i; int i;
/* check for overlapping reserved regions */
__rmem_check_for_overlap();
for (i = 0; i < reserved_mem_count; i++) { for (i = 0; i < reserved_mem_count; i++) {
struct reserved_mem *rmem = &reserved_mem[i]; struct reserved_mem *rmem = &reserved_mem[i];
unsigned long node = rmem->fdt_node; unsigned long node = rmem->fdt_node;
......
...@@ -149,6 +149,7 @@ static int of_overlay_apply_one(struct of_overlay *ov, ...@@ -149,6 +149,7 @@ static int of_overlay_apply_one(struct of_overlay *ov,
pr_err("%s: Failed to apply single node @%s/%s\n", pr_err("%s: Failed to apply single node @%s/%s\n",
__func__, target->full_name, __func__, target->full_name,
child->name); child->name);
of_node_put(child);
return ret; return ret;
} }
} }
...@@ -417,8 +418,10 @@ static int overlay_subtree_check(struct device_node *tree, ...@@ -417,8 +418,10 @@ static int overlay_subtree_check(struct device_node *tree,
return 1; return 1;
for_each_child_of_node(tree, child) { for_each_child_of_node(tree, child) {
if (overlay_subtree_check(child, dn)) if (overlay_subtree_check(child, dn)) {
of_node_put(child);
return 1; return 1;
}
} }
return 0; return 0;
......
...@@ -405,8 +405,10 @@ int of_platform_bus_probe(struct device_node *root, ...@@ -405,8 +405,10 @@ int of_platform_bus_probe(struct device_node *root,
if (!of_match_node(matches, child)) if (!of_match_node(matches, child))
continue; continue;
rc = of_platform_bus_create(child, matches, NULL, parent, false); rc = of_platform_bus_create(child, matches, NULL, parent, false);
if (rc) if (rc) {
of_node_put(child);
break; break;
}
} }
of_node_put(root); of_node_put(root);
...@@ -447,8 +449,10 @@ int of_platform_populate(struct device_node *root, ...@@ -447,8 +449,10 @@ int of_platform_populate(struct device_node *root,
for_each_child_of_node(root, child) { for_each_child_of_node(root, child) {
rc = of_platform_bus_create(child, matches, lookup, parent, true); rc = of_platform_bus_create(child, matches, lookup, parent, true);
if (rc) if (rc) {
of_node_put(child);
break; break;
}
} }
of_node_set_flag(root, OF_POPULATED_BUS); of_node_set_flag(root, OF_POPULATED_BUS);
......
...@@ -205,16 +205,20 @@ static int __init of_unittest_check_node_linkage(struct device_node *np) ...@@ -205,16 +205,20 @@ static int __init of_unittest_check_node_linkage(struct device_node *np)
if (child->parent != np) { if (child->parent != np) {
pr_err("Child node %s links to wrong parent %s\n", pr_err("Child node %s links to wrong parent %s\n",
child->name, np->name); child->name, np->name);
return -EINVAL; rc = -EINVAL;
goto put_child;
} }
rc = of_unittest_check_node_linkage(child); rc = of_unittest_check_node_linkage(child);
if (rc < 0) if (rc < 0)
return rc; goto put_child;
count += rc; count += rc;
} }
return count + 1; return count + 1;
put_child:
of_node_put(child);
return rc;
} }
static void __init of_unittest_check_tree_linkage(void) static void __init of_unittest_check_tree_linkage(void)
......
...@@ -51,6 +51,7 @@ extern struct irq_domain *of_msi_get_domain(struct device *dev, ...@@ -51,6 +51,7 @@ extern struct irq_domain *of_msi_get_domain(struct device *dev,
enum irq_domain_bus_token token); enum irq_domain_bus_token token);
extern struct irq_domain *of_msi_map_get_device_domain(struct device *dev, extern struct irq_domain *of_msi_map_get_device_domain(struct device *dev,
u32 rid); u32 rid);
extern void of_msi_configure(struct device *dev, struct device_node *np);
#else #else
static inline int of_irq_count(struct device_node *dev) static inline int of_irq_count(struct device_node *dev)
{ {
...@@ -80,31 +81,27 @@ static inline struct irq_domain *of_msi_map_get_device_domain(struct device *dev ...@@ -80,31 +81,27 @@ static inline struct irq_domain *of_msi_map_get_device_domain(struct device *dev
{ {
return NULL; return NULL;
} }
static inline void of_msi_configure(struct device *dev, struct device_node *np)
{
}
#endif #endif
#if defined(CONFIG_OF) #if defined(CONFIG_OF_IRQ) || defined(CONFIG_SPARC)
/* /*
* irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC * irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC
* implements it differently. However, the prototype is the same for all, * implements it differently. However, the prototype is the same for all,
* so declare it here regardless of the CONFIG_OF_IRQ setting. * so declare it here regardless of the CONFIG_OF_IRQ setting.
*/ */
extern unsigned int irq_of_parse_and_map(struct device_node *node, int index); extern unsigned int irq_of_parse_and_map(struct device_node *node, int index);
extern struct device_node *of_irq_find_parent(struct device_node *child);
extern void of_msi_configure(struct device *dev, struct device_node *np);
u32 of_msi_map_rid(struct device *dev, struct device_node *msi_np, u32 rid_in); u32 of_msi_map_rid(struct device *dev, struct device_node *msi_np, u32 rid_in);
#else /* !CONFIG_OF */ #else /* !CONFIG_OF && !CONFIG_SPARC */
static inline unsigned int irq_of_parse_and_map(struct device_node *dev, static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
int index) int index)
{ {
return 0; return 0;
} }
static inline void *of_irq_find_parent(struct device_node *child)
{
return NULL;
}
static inline u32 of_msi_map_rid(struct device *dev, static inline u32 of_msi_map_rid(struct device *dev,
struct device_node *msi_np, u32 rid_in) struct device_node *msi_np, u32 rid_in)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment