aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/00-INDEX2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget81
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-acm8
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-ecm16
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-eem14
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-ncm15
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-obex9
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-phonet8
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-rndis14
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-serial9
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-subset14
-rw-r--r--Documentation/ABI/testing/sysfs-bus-acpi58
-rw-r--r--Documentation/ABI/testing/sysfs-bus-event_source-devices-events32
-rw-r--r--Documentation/ABI/testing/sysfs-bus-event_source-devices-format6
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio90
-rw-r--r--Documentation/ABI/testing/sysfs-bus-pci5
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb27
-rw-r--r--Documentation/ABI/testing/sysfs-class-devfreq20
-rw-r--r--Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc19
-rw-r--r--Documentation/ABI/testing/sysfs-devices-online20
-rw-r--r--Documentation/ABI/testing/sysfs-devices-sun2
-rw-r--r--Documentation/ABI/testing/sysfs-devices-system-cpu15
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-acpi10
-rw-r--r--Documentation/CodingStyle3
-rw-r--r--Documentation/DocBook/device-drivers.tmpl4
-rw-r--r--Documentation/DocBook/genericirq.tmpl13
-rw-r--r--Documentation/DocBook/kernel-locking.tmpl7
-rw-r--r--Documentation/DocBook/media/v4l/dev-codec.xml35
-rw-r--r--Documentation/DocBook/media/v4l/v4l2.xml2
-rw-r--r--Documentation/HOWTO2
-rw-r--r--Documentation/RCU/checklist.txt6
-rw-r--r--Documentation/RCU/torture.txt6
-rw-r--r--Documentation/RCU/trace.txt100
-rw-r--r--Documentation/RCU/whatisRCU.txt22
-rw-r--r--Documentation/SubmitChecklist2
-rw-r--r--Documentation/accounting/getdelays.c4
-rw-r--r--Documentation/acpi/apei/einj.txt9
-rw-r--r--Documentation/acpi/namespace.txt395
-rw-r--r--Documentation/acpi/video_extension.txt106
-rw-r--r--Documentation/arm/sti/overview.txt33
-rw-r--r--Documentation/arm/sti/stih415-overview.txt12
-rw-r--r--Documentation/arm/sti/stih416-overview.txt12
-rw-r--r--Documentation/arm/sunxi/README23
-rw-r--r--Documentation/arm64/memory.txt7
-rw-r--r--Documentation/cgroups/cpusets.txt2
-rw-r--r--Documentation/cgroups/memory.txt7
-rw-r--r--Documentation/console/console.txt28
-rw-r--r--Documentation/cpu-freq/cpu-drivers.txt10
-rw-r--r--Documentation/cpu-hotplug.txt8
-rw-r--r--Documentation/crypto/async-tx-api.txt1
-rw-r--r--Documentation/devices.txt3
-rw-r--r--Documentation/devicetree/bindings/arm/cci.txt172
-rw-r--r--Documentation/devicetree/bindings/arm/keystone/keystone.txt10
-rw-r--r--Documentation/devicetree/bindings/arm/l2cc.txt3
-rw-r--r--Documentation/devicetree/bindings/arm/nspire.txt14
-rw-r--r--Documentation/devicetree/bindings/arm/omap/omap.txt3
-rw-r--r--Documentation/devicetree/bindings/arm/rtsm-dcscb.txt19
-rw-r--r--Documentation/devicetree/bindings/arm/ste-nomadik.txt5
-rw-r--r--Documentation/devicetree/bindings/arm/ste-u300.txt46
-rw-r--r--Documentation/devicetree/bindings/ata/ahci-platform.txt5
-rw-r--r--Documentation/devicetree/bindings/ata/atmel-at91_cf.txt19
-rw-r--r--Documentation/devicetree/bindings/bus/imx-weim.txt49
-rw-r--r--Documentation/devicetree/bindings/bus/ti-gpmc.txt1
-rw-r--r--Documentation/devicetree/bindings/clock/altr_socfpga.txt7
-rw-r--r--Documentation/devicetree/bindings/clock/clk-exynos-audss.txt64
-rw-r--r--Documentation/devicetree/bindings/clock/exynos4-clock.txt3
-rw-r--r--Documentation/devicetree/bindings/clock/exynos5420-clock.txt201
-rw-r--r--Documentation/devicetree/bindings/clock/imx5-clock.txt13
-rw-r--r--Documentation/devicetree/bindings/clock/imx6q-clock.txt1
-rw-r--r--Documentation/devicetree/bindings/clock/imx6sl-clock.txt10
-rw-r--r--Documentation/devicetree/bindings/clock/nspire-clock.txt24
-rw-r--r--Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt252
-rw-r--r--Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt154
-rw-r--r--Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt211
-rw-r--r--Documentation/devicetree/bindings/clock/rockchip.txt74
-rw-r--r--Documentation/devicetree/bindings/clock/silabs,si5351.txt5
-rw-r--r--Documentation/devicetree/bindings/clock/st,nomadik.txt104
-rw-r--r--Documentation/devicetree/bindings/clock/ste-u300-syscon-clock.txt80
-rw-r--r--Documentation/devicetree/bindings/clock/sunxi.txt117
-rw-r--r--Documentation/devicetree/bindings/clock/sunxi/sun4i-a10-gates.txt93
-rw-r--r--Documentation/devicetree/bindings/clock/sunxi/sun5i-a13-gates.txt58
-rw-r--r--Documentation/devicetree/bindings/clock/vf610-clock.txt26
-rw-r--r--Documentation/devicetree/bindings/clock/vt8500.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/zynq-7000.txt123
-rw-r--r--Documentation/devicetree/bindings/dma/ste-coh901318.txt32
-rw-r--r--Documentation/devicetree/bindings/dma/ste-dma40.txt66
-rw-r--r--Documentation/devicetree/bindings/dma/ti-edma.txt34
-rw-r--r--Documentation/devicetree/bindings/extcon/extcon-twl.txt15
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-clps711x.txt28
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-msm.txt26
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-samsung.txt43
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-stericsson-coh901.txt7
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-xilinx.txt48
-rw-r--r--Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt46
-rw-r--r--Documentation/devicetree/bindings/gpu/samsung-g2d.txt5
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-st-ddci2c.txt15
-rw-r--r--Documentation/devicetree/bindings/iio/dac/ad7303.txt23
-rw-r--r--Documentation/devicetree/bindings/iio/frequency/adf4350.txt86
-rw-r--r--Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt18
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/abilis,tb10x-ictl.txt38
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt87
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt48
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt16
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt89
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt55
-rw-r--r--Documentation/devicetree/bindings/leds/leds-lp55xx.txt147
-rw-r--r--Documentation/devicetree/bindings/media/exynos-fimc-lite.txt2
-rw-r--r--Documentation/devicetree/bindings/media/s5p-mfc.txt5
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt156
-rw-r--r--Documentation/devicetree/bindings/mfd/ab8500.txt2
-rw-r--r--Documentation/devicetree/bindings/mfd/arizona.txt62
-rw-r--r--Documentation/devicetree/bindings/mfd/max77693.txt55
-rw-r--r--Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt16
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-nand.txt8
-rw-r--r--Documentation/devicetree/bindings/pci/designware-pcie.txt73
-rw-r--r--Documentation/devicetree/bindings/pci/mvebu-pci.txt221
-rw-r--r--Documentation/devicetree/bindings/pci/pci.txt9
-rw-r--r--Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt15
-rw-r--r--Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/fsl,vf610-pinctrl.txt41
-rw-r--r--Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt127
-rw-r--r--Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt227
-rw-r--r--Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt49
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt48
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt3
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt110
-rw-r--r--Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt153
-rw-r--r--Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt97
-rw-r--r--Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt53
-rw-r--r--Documentation/devicetree/bindings/pinctrl/ste,abx500.txt352
-rw-r--r--Documentation/devicetree/bindings/pps/pps-gpio.txt20
-rw-r--r--Documentation/devicetree/bindings/regulator/lp872x.txt160
-rw-r--r--Documentation/devicetree/bindings/regulator/max8973-regulator.txt21
-rw-r--r--Documentation/devicetree/bindings/regulator/regulator.txt1
-rw-r--r--Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt128
-rw-r--r--Documentation/devicetree/bindings/rtc/dw-apb.txt19
-rw-r--r--Documentation/devicetree/bindings/sound/adi,adau1701.txt35
-rw-r--r--Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt46
-rw-r--r--Documentation/devicetree/bindings/sound/mxs-saif.txt17
-rw-r--r--Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt71
-rw-r--r--Documentation/devicetree/bindings/sound/rt5640.txt30
-rw-r--r--Documentation/devicetree/bindings/sound/samsung-i2s.txt46
-rw-r--r--Documentation/devicetree/bindings/sound/sgtl5000.txt3
-rw-r--r--Documentation/devicetree/bindings/sound/spdif-receiver.txt10
-rw-r--r--Documentation/devicetree/bindings/sound/spdif-transmitter.txt10
-rw-r--r--Documentation/devicetree/bindings/sound/ssm2518.txt20
-rw-r--r--Documentation/devicetree/bindings/sound/ti,tas5086.txt11
-rw-r--r--Documentation/devicetree/bindings/sound/wm8962.txt23
-rw-r--r--Documentation/devicetree/bindings/spi/omap-spi.txt27
-rw-r--r--Documentation/devicetree/bindings/staging/imx-drm/ldb.txt99
-rw-r--r--Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt18
-rw-r--r--Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt3
-rw-r--r--Documentation/devicetree/bindings/tty/serial/fsl-lpuart.txt14
-rw-r--r--Documentation/devicetree/bindings/usb/atmel-usb.txt82
-rw-r--r--Documentation/devicetree/bindings/usb/ci13xxx-imx.txt6
-rw-r--r--Documentation/devicetree/bindings/usb/exynos-usb.txt34
-rw-r--r--Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt27
-rw-r--r--Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt41
-rw-r--r--Documentation/devicetree/bindings/usb/usb3503.txt5
-rw-r--r--Documentation/devicetree/bindings/usb/ux500-usb.txt50
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt2
-rw-r--r--Documentation/devicetree/bindings/video/exynos_dp.txt6
-rw-r--r--Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt19
-rw-r--r--Documentation/filesystems/Locking43
-rw-r--r--Documentation/filesystems/f2fs.txt9
-rw-r--r--Documentation/filesystems/porting6
-rw-r--r--Documentation/filesystems/proc.txt7
-rw-r--r--Documentation/filesystems/vfs.txt73
-rw-r--r--Documentation/fmc/00-INDEX38
-rw-r--r--Documentation/fmc/API.txt47
-rw-r--r--Documentation/fmc/FMC-and-SDB.txt88
-rw-r--r--Documentation/fmc/carrier.txt311
-rw-r--r--Documentation/fmc/fmc-chardev.txt64
-rw-r--r--Documentation/fmc/fmc-fakedev.txt36
-rw-r--r--Documentation/fmc/fmc-trivial.txt17
-rw-r--r--Documentation/fmc/fmc-write-eeprom.txt125
-rw-r--r--Documentation/fmc/identifiers.txt168
-rw-r--r--Documentation/fmc/mezzanine.txt123
-rw-r--r--Documentation/fmc/parameters.txt56
-rw-r--r--Documentation/hwmon/submitting-patches3
-rw-r--r--Documentation/i2c/busses/i2c-piix42
-rw-r--r--Documentation/ioctl/ioctl-number.txt1
-rw-r--r--Documentation/kbuild/kconfig.txt2
-rw-r--r--Documentation/kdump/kdump.txt31
-rw-r--r--Documentation/kernel-parameters.txt38
-rw-r--r--Documentation/kernel-per-CPU-kthreads.txt47
-rw-r--r--Documentation/networking/ip-sysctl.txt4
-rw-r--r--Documentation/pinctrl.txt39
-rw-r--r--Documentation/power/pm_qos_interface.txt50
-rw-r--r--Documentation/power/runtime_pm.txt20
-rw-r--r--Documentation/power/video_extension.txt37
-rw-r--r--Documentation/rapidio/rapidio.txt98
-rw-r--r--Documentation/rapidio/sysfs.txt1
-rw-r--r--Documentation/rt-mutex-design.txt2
-rw-r--r--Documentation/rtc.txt7
-rw-r--r--Documentation/scheduler/sched-domains.txt4
-rw-r--r--Documentation/serial/00-INDEX2
-rw-r--r--Documentation/serial/stallion.txt392
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt45
-rw-r--r--Documentation/spinlocks.txt2
-rw-r--r--Documentation/sysctl/kernel.txt50
-rw-r--r--Documentation/timers/NO_HZ.txt79
-rw-r--r--Documentation/trace/events-nmi.txt43
-rw-r--r--Documentation/trace/events-power.txt31
-rw-r--r--Documentation/usb/gadget_configfs.txt384
-rw-r--r--Documentation/usb/hotplug.txt6
-rw-r--r--Documentation/virtual/kvm/api.txt66
-rw-r--r--Documentation/virtual/kvm/mmu.txt91
-rw-r--r--Documentation/virtual/uml/UserModeLinux-HOWTO.txt4
-rw-r--r--Documentation/vm/pagemap.txt3
-rw-r--r--Documentation/vm/soft-dirty.txt36
-rw-r--r--Documentation/w1/w1.generic4
-rw-r--r--Documentation/ww-mutex-design.txt344
-rw-r--r--Documentation/x86/early-microcode.txt11
214 files changed, 8622 insertions, 1854 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 45b3df936d2f..0c4cc688e89a 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -187,6 +187,8 @@ firmware_class/
187 - request_firmware() hotplug interface info. 187 - request_firmware() hotplug interface info.
188flexible-arrays.txt 188flexible-arrays.txt
189 - how to make use of flexible sized arrays in linux 189 - how to make use of flexible sized arrays in linux
190fmc/
191 - information about the FMC bus abstraction
190frv/ 192frv/
191 - Fujitsu FR-V Linux documentation. 193 - Fujitsu FR-V Linux documentation.
192futex-requeue-pi.txt 194futex-requeue-pi.txt
diff --git a/Documentation/ABI/testing/configfs-usb-gadget b/Documentation/ABI/testing/configfs-usb-gadget
new file mode 100644
index 000000000000..01e769d6984d
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget
@@ -0,0 +1,81 @@
1What: /config/usb-gadget
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 This group contains sub-groups corresponding to created
6 USB gadgets.
7
8What: /config/usb-gadget/gadget
9Date: Jun 2013
10KenelVersion: 3.11
11Description:
12
13 The attributes of a gadget:
14
15 UDC - bind a gadget to UDC/unbind a gadget;
16 write UDC's name found in /sys/class/udc/*
17 to bind a gadget, empty string "" to unbind.
18
19 bDeviceClass - USB device class code
20 bDeviceSubClass - USB device subclass code
21 bDeviceProtocol - USB device protocol code
22 bMaxPacketSize0 - maximum endpoint 0 packet size
23 bcdDevice - bcd device release number
24 bcdUSB - bcd USB specification version number
25 idProduct - product ID
26 idVendor - vendor ID
27
28What: /config/usb-gadget/gadget/configs
29Date: Jun 2013
30KenelVersion: 3.11
31Description:
32 This group contains a USB gadget's configurations
33
34What: /config/usb-gadget/gadget/configs/config
35Date: Jun 2013
36KernelVersion: 3.11
37Description:
38 The attributes of a configuration:
39
40 bmAttributes - configuration characteristics
41 MaxPower - maximum power consumption from the bus
42
43What: /config/usb-gadget/gadget/configs/config/strings
44Date: Jun 2013
45KernelVersion: 3.11
46Description:
47 This group contains subdirectories for language-specific
48 strings for this configuration.
49
50What: /config/usb-gadget/gadget/configs/config/strings/language
51Date: Jun 2013
52KernelVersion: 3.11
53Description:
54 The attributes:
55
56 configuration - configuration description
57
58
59What: /config/usb-gadget/gadget/functions
60Date: Jun 2013
61KenelVersion: 3.11
62Description:
63 This group contains functions available to this USB gadget.
64
65What: /config/usb-gadget/gadget/strings
66Date: Jun 2013
67KenelVersion: 3.11
68Description:
69 This group contains subdirectories for language-specific
70 strings for this gadget.
71
72What: /config/usb-gadget/gadget/strings/language
73Date: Jun 2013
74KenelVersion: 3.11
75Description:
76 The attributes:
77
78 serialnumber - gadget's serial number (string)
79 product - gadget's product description
80 manufacturer - gadget's manufacturer description
81
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-acm b/Documentation/ABI/testing/configfs-usb-gadget-acm
new file mode 100644
index 000000000000..5708a568b5f6
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-acm
@@ -0,0 +1,8 @@
1What: /config/usb-gadget/gadget/functions/acm.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5
6 This item contains just one readonly attribute: port_num.
7 It contains the port number of the /dev/ttyGS<n> device
8 associated with acm function's instance "name".
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-ecm b/Documentation/ABI/testing/configfs-usb-gadget-ecm
new file mode 100644
index 000000000000..6b9a582ce0b5
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-ecm
@@ -0,0 +1,16 @@
1What: /config/usb-gadget/gadget/functions/ecm.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 The attributes:
6
7 ifname - network device interface name associated with
8 this function instance
9 qmult - queue length multiplier for high and
10 super speed
11 host_addr - MAC address of host's end of this
12 Ethernet over USB link
13 dev_addr - MAC address of device's end of this
14 Ethernet over USB link
15
16
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-eem b/Documentation/ABI/testing/configfs-usb-gadget-eem
new file mode 100644
index 000000000000..dbddf36b48b3
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-eem
@@ -0,0 +1,14 @@
1What: /config/usb-gadget/gadget/functions/eem.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 The attributes:
6
7 ifname - network device interface name associated with
8 this function instance
9 qmult - queue length multiplier for high and
10 super speed
11 host_addr - MAC address of host's end of this
12 Ethernet over USB link
13 dev_addr - MAC address of device's end of this
14 Ethernet over USB link
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-ncm b/Documentation/ABI/testing/configfs-usb-gadget-ncm
new file mode 100644
index 000000000000..bc309f42357d
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-ncm
@@ -0,0 +1,15 @@
1What: /config/usb-gadget/gadget/functions/ncm.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 The attributes:
6
7 ifname - network device interface name associated with
8 this function instance
9 qmult - queue length multiplier for high and
10 super speed
11 host_addr - MAC address of host's end of this
12 Ethernet over USB link
13 dev_addr - MAC address of device's end of this
14 Ethernet over USB link
15
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-obex b/Documentation/ABI/testing/configfs-usb-gadget-obex
new file mode 100644
index 000000000000..aaa5c96fb7c6
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-obex
@@ -0,0 +1,9 @@
1What: /config/usb-gadget/gadget/functions/obex.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5
6 This item contains just one readonly attribute: port_num.
7 It contains the port number of the /dev/ttyGS<n> device
8 associated with obex function's instance "name".
9
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-phonet b/Documentation/ABI/testing/configfs-usb-gadget-phonet
new file mode 100644
index 000000000000..3e3b742cdfd7
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-phonet
@@ -0,0 +1,8 @@
1What: /config/usb-gadget/gadget/functions/phonet.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5
6 This item contains just one readonly attribute: ifname.
7 It contains the network interface name assigned during
8 network device registration.
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-rndis b/Documentation/ABI/testing/configfs-usb-gadget-rndis
new file mode 100644
index 000000000000..822e6dad8fc0
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-rndis
@@ -0,0 +1,14 @@
1What: /config/usb-gadget/gadget/functions/rndis.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 The attributes:
6
7 ifname - network device interface name associated with
8 this function instance
9 qmult - queue length multiplier for high and
10 super speed
11 host_addr - MAC address of host's end of this
12 Ethernet over USB link
13 dev_addr - MAC address of device's end of this
14 Ethernet over USB link
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-serial b/Documentation/ABI/testing/configfs-usb-gadget-serial
new file mode 100644
index 000000000000..16f130c1501f
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-serial
@@ -0,0 +1,9 @@
1What: /config/usb-gadget/gadget/functions/gser.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5
6 This item contains just one readonly attribute: port_num.
7 It contains the port number of the /dev/ttyGS<n> device
8 associated with gser function's instance "name".
9
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-subset b/Documentation/ABI/testing/configfs-usb-gadget-subset
new file mode 100644
index 000000000000..154ae597cd99
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-subset
@@ -0,0 +1,14 @@
1What: /config/usb-gadget/gadget/functions/geth.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 The attributes:
6
7 ifname - network device interface name associated with
8 this function instance
9 qmult - queue length multiplier for high and
10 super speed
11 host_addr - MAC address of host's end of this
12 Ethernet over USB link
13 dev_addr - MAC address of device's end of this
14 Ethernet over USB link
diff --git a/Documentation/ABI/testing/sysfs-bus-acpi b/Documentation/ABI/testing/sysfs-bus-acpi
new file mode 100644
index 000000000000..7fa9cbc75344
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-acpi
@@ -0,0 +1,58 @@
1What: /sys/bus/acpi/devices/.../path
2Date: December 2006
3Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
4Description:
5 This attribute indicates the full path of ACPI namespace
6 object associated with the device object. For example,
7 \_SB_.PCI0.
8 This file is not present for device objects representing
9 fixed ACPI hardware features (like power and sleep
10 buttons).
11
12What: /sys/bus/acpi/devices/.../modalias
13Date: July 2007
14Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
15Description:
16 This attribute indicates the PNP IDs of the device object.
17 That is acpi:HHHHHHHH:[CCCCCCC:]. Where each HHHHHHHH or
18 CCCCCCCC contains device object's PNPID (_HID or _CID).
19
20What: /sys/bus/acpi/devices/.../hid
21Date: April 2005
22Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
23Description:
24 This attribute indicates the hardware ID (_HID) of the
25 device object. For example, PNP0103.
26 This file is present for device objects having the _HID
27 control method.
28
29What: /sys/bus/acpi/devices/.../description
30Date: October 2012
31Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
32Description:
33 This attribute contains the output of the device object's
34 _STR control method, if present.
35
36What: /sys/bus/acpi/devices/.../adr
37Date: October 2012
38Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
39Description:
40 This attribute contains the output of the device object's
41 _ADR control method, which is present for ACPI device
42 objects representing devices having standard enumeration
43 algorithms, such as PCI.
44
45What: /sys/bus/acpi/devices/.../uid
46Date: October 2012
47Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
48Description:
49 This attribute contains the output of the device object's
50 _UID control method, if present.
51
52What: /sys/bus/acpi/devices/.../eject
53Date: December 2006
54Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
55Description:
56 Writing 1 to this attribute will trigger hot removal of
57 this device object. This file exists for every device
58 object that has _EJ0 method.
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
index 0adeb524c0d4..8b25ffb42562 100644
--- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
@@ -27,14 +27,36 @@ Description: Generic performance monitoring events
27 "basename". 27 "basename".
28 28
29 29
30What: /sys/devices/cpu/events/PM_LD_MISS_L1 30What: /sys/devices/cpu/events/PM_1PLUS_PPC_CMPL
31 /sys/devices/cpu/events/PM_LD_REF_L1
32 /sys/devices/cpu/events/PM_CYC
33 /sys/devices/cpu/events/PM_BRU_FIN 31 /sys/devices/cpu/events/PM_BRU_FIN
34 /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC
35 /sys/devices/cpu/events/PM_BRU_MPRED 32 /sys/devices/cpu/events/PM_BRU_MPRED
36 /sys/devices/cpu/events/PM_INST_CMPL
37 /sys/devices/cpu/events/PM_CMPLU_STALL 33 /sys/devices/cpu/events/PM_CMPLU_STALL
34 /sys/devices/cpu/events/PM_CMPLU_STALL_BRU
35 /sys/devices/cpu/events/PM_CMPLU_STALL_DCACHE_MISS
36 /sys/devices/cpu/events/PM_CMPLU_STALL_DFU
37 /sys/devices/cpu/events/PM_CMPLU_STALL_DIV
38 /sys/devices/cpu/events/PM_CMPLU_STALL_ERAT_MISS
39 /sys/devices/cpu/events/PM_CMPLU_STALL_FXU
40 /sys/devices/cpu/events/PM_CMPLU_STALL_IFU
41 /sys/devices/cpu/events/PM_CMPLU_STALL_LSU
42 /sys/devices/cpu/events/PM_CMPLU_STALL_REJECT
43 /sys/devices/cpu/events/PM_CMPLU_STALL_SCALAR
44 /sys/devices/cpu/events/PM_CMPLU_STALL_SCALAR_LONG
45 /sys/devices/cpu/events/PM_CMPLU_STALL_STORE
46 /sys/devices/cpu/events/PM_CMPLU_STALL_THRD
47 /sys/devices/cpu/events/PM_CMPLU_STALL_VECTOR
48 /sys/devices/cpu/events/PM_CMPLU_STALL_VECTOR_LONG
49 /sys/devices/cpu/events/PM_CYC
50 /sys/devices/cpu/events/PM_GCT_NOSLOT_BR_MPRED
51 /sys/devices/cpu/events/PM_GCT_NOSLOT_BR_MPRED_IC_MISS
52 /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC
53 /sys/devices/cpu/events/PM_GCT_NOSLOT_IC_MISS
54 /sys/devices/cpu/events/PM_GRP_CMPL
55 /sys/devices/cpu/events/PM_INST_CMPL
56 /sys/devices/cpu/events/PM_LD_MISS_L1
57 /sys/devices/cpu/events/PM_LD_REF_L1
58 /sys/devices/cpu/events/PM_RUN_CYC
59 /sys/devices/cpu/events/PM_RUN_INST_CMPL
38 60
39Date: 2013/01/08 61Date: 2013/01/08
40 62
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
index 079afc71363d..77f47ff5ee02 100644
--- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
@@ -9,6 +9,12 @@ Description:
9 we want to export, so that userspace can deal with sane 9 we want to export, so that userspace can deal with sane
10 name/value pairs. 10 name/value pairs.
11 11
12 Userspace must be prepared for the possibility that attributes
13 define overlapping bit ranges. For example:
14 attr1 = 'config:0-23'
15 attr2 = 'config:0-7'
16 attr3 = 'config:12-35'
17
12 Example: 'config1:1,6-10,44' 18 Example: 'config1:1,6-10,44'
13 Defines contents of attribute that occupies bits 1,6-10,44 of 19 Defines contents of attribute that occupies bits 1,6-10,44 of
14 perf_event_attr::config1. 20 perf_event_attr::config1.
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 2e33dc6b2346..dda81ffae5cf 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -690,45 +690,45 @@ Description:
690 Actually start the buffer capture up. Will start trigger 690 Actually start the buffer capture up. Will start trigger
691 if first device and appropriate. 691 if first device and appropriate.
692 692
693What: /sys/bus/iio/devices/iio:deviceX/buffer/scan_elements 693What: /sys/bus/iio/devices/iio:deviceX/scan_elements
694KernelVersion: 2.6.37 694KernelVersion: 2.6.37
695Contact: linux-iio@vger.kernel.org 695Contact: linux-iio@vger.kernel.org
696Description: 696Description:
697 Directory containing interfaces for elements that will be 697 Directory containing interfaces for elements that will be
698 captured for a single triggered sample set in the buffer. 698 captured for a single triggered sample set in the buffer.
699 699
700What: /sys/.../buffer/scan_elements/in_accel_x_en 700What: /sys/.../iio:deviceX/scan_elements/in_accel_x_en
701What: /sys/.../buffer/scan_elements/in_accel_y_en 701What: /sys/.../iio:deviceX/scan_elements/in_accel_y_en
702What: /sys/.../buffer/scan_elements/in_accel_z_en 702What: /sys/.../iio:deviceX/scan_elements/in_accel_z_en
703What: /sys/.../buffer/scan_elements/in_anglvel_x_en 703What: /sys/.../iio:deviceX/scan_elements/in_anglvel_x_en
704What: /sys/.../buffer/scan_elements/in_anglvel_y_en 704What: /sys/.../iio:deviceX/scan_elements/in_anglvel_y_en
705What: /sys/.../buffer/scan_elements/in_anglvel_z_en 705What: /sys/.../iio:deviceX/scan_elements/in_anglvel_z_en
706What: /sys/.../buffer/scan_elements/in_magn_x_en 706What: /sys/.../iio:deviceX/scan_elements/in_magn_x_en
707What: /sys/.../buffer/scan_elements/in_magn_y_en 707What: /sys/.../iio:deviceX/scan_elements/in_magn_y_en
708What: /sys/.../buffer/scan_elements/in_magn_z_en 708What: /sys/.../iio:deviceX/scan_elements/in_magn_z_en
709What: /sys/.../buffer/scan_elements/in_timestamp_en 709What: /sys/.../iio:deviceX/scan_elements/in_timestamp_en
710What: /sys/.../buffer/scan_elements/in_voltageY_supply_en 710What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_en
711What: /sys/.../buffer/scan_elements/in_voltageY_en 711What: /sys/.../iio:deviceX/scan_elements/in_voltageY_en
712What: /sys/.../buffer/scan_elements/in_voltageY-voltageZ_en 712What: /sys/.../iio:deviceX/scan_elements/in_voltageY-voltageZ_en
713What: /sys/.../buffer/scan_elements/in_incli_x_en 713What: /sys/.../iio:deviceX/scan_elements/in_incli_x_en
714What: /sys/.../buffer/scan_elements/in_incli_y_en 714What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en
715What: /sys/.../buffer/scan_elements/in_pressureY_en 715What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en
716What: /sys/.../buffer/scan_elements/in_pressure_en 716What: /sys/.../iio:deviceX/scan_elements/in_pressure_en
717KernelVersion: 2.6.37 717KernelVersion: 2.6.37
718Contact: linux-iio@vger.kernel.org 718Contact: linux-iio@vger.kernel.org
719Description: 719Description:
720 Scan element control for triggered data capture. 720 Scan element control for triggered data capture.
721 721
722What: /sys/.../buffer/scan_elements/in_accel_type 722What: /sys/.../iio:deviceX/scan_elements/in_accel_type
723What: /sys/.../buffer/scan_elements/in_anglvel_type 723What: /sys/.../iio:deviceX/scan_elements/in_anglvel_type
724What: /sys/.../buffer/scan_elements/in_magn_type 724What: /sys/.../iio:deviceX/scan_elements/in_magn_type
725What: /sys/.../buffer/scan_elements/in_incli_type 725What: /sys/.../iio:deviceX/scan_elements/in_incli_type
726What: /sys/.../buffer/scan_elements/in_voltageY_type 726What: /sys/.../iio:deviceX/scan_elements/in_voltageY_type
727What: /sys/.../buffer/scan_elements/in_voltage_type 727What: /sys/.../iio:deviceX/scan_elements/in_voltage_type
728What: /sys/.../buffer/scan_elements/in_voltageY_supply_type 728What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_type
729What: /sys/.../buffer/scan_elements/in_timestamp_type 729What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type
730What: /sys/.../buffer/scan_elements/in_pressureY_type 730What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type
731What: /sys/.../buffer/scan_elements/in_pressure_type 731What: /sys/.../iio:deviceX/scan_elements/in_pressure_type
732KernelVersion: 2.6.37 732KernelVersion: 2.6.37
733Contact: linux-iio@vger.kernel.org 733Contact: linux-iio@vger.kernel.org
734Description: 734Description:
@@ -752,29 +752,29 @@ Description:
752 For other storage combinations this attribute will be extended 752 For other storage combinations this attribute will be extended
753 appropriately. 753 appropriately.
754 754
755What: /sys/.../buffer/scan_elements/in_accel_type_available 755What: /sys/.../iio:deviceX/scan_elements/in_accel_type_available
756KernelVersion: 2.6.37 756KernelVersion: 2.6.37
757Contact: linux-iio@vger.kernel.org 757Contact: linux-iio@vger.kernel.org
758Description: 758Description:
759 If the type parameter can take one of a small set of values, 759 If the type parameter can take one of a small set of values,
760 this attribute lists them. 760 this attribute lists them.
761 761
762What: /sys/.../buffer/scan_elements/in_voltageY_index 762What: /sys/.../iio:deviceX/scan_elements/in_voltageY_index
763What: /sys/.../buffer/scan_elements/in_voltageY_supply_index 763What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_index
764What: /sys/.../buffer/scan_elements/in_accel_x_index 764What: /sys/.../iio:deviceX/scan_elements/in_accel_x_index
765What: /sys/.../buffer/scan_elements/in_accel_y_index 765What: /sys/.../iio:deviceX/scan_elements/in_accel_y_index
766What: /sys/.../buffer/scan_elements/in_accel_z_index 766What: /sys/.../iio:deviceX/scan_elements/in_accel_z_index
767What: /sys/.../buffer/scan_elements/in_anglvel_x_index 767What: /sys/.../iio:deviceX/scan_elements/in_anglvel_x_index
768What: /sys/.../buffer/scan_elements/in_anglvel_y_index 768What: /sys/.../iio:deviceX/scan_elements/in_anglvel_y_index
769What: /sys/.../buffer/scan_elements/in_anglvel_z_index 769What: /sys/.../iio:deviceX/scan_elements/in_anglvel_z_index
770What: /sys/.../buffer/scan_elements/in_magn_x_index 770What: /sys/.../iio:deviceX/scan_elements/in_magn_x_index
771What: /sys/.../buffer/scan_elements/in_magn_y_index 771What: /sys/.../iio:deviceX/scan_elements/in_magn_y_index
772What: /sys/.../buffer/scan_elements/in_magn_z_index 772What: /sys/.../iio:deviceX/scan_elements/in_magn_z_index
773What: /sys/.../buffer/scan_elements/in_incli_x_index 773What: /sys/.../iio:deviceX/scan_elements/in_incli_x_index
774What: /sys/.../buffer/scan_elements/in_incli_y_index 774What: /sys/.../iio:deviceX/scan_elements/in_incli_y_index
775What: /sys/.../buffer/scan_elements/in_timestamp_index 775What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index
776What: /sys/.../buffer/scan_elements/in_pressureY_index 776What: /sys/.../iio:deviceX/scan_elements/in_pressureY_index
777What: /sys/.../buffer/scan_elements/in_pressure_index 777What: /sys/.../iio:deviceX/scan_elements/in_pressure_index
778KernelVersion: 2.6.37 778KernelVersion: 2.6.37
779Contact: linux-iio@vger.kernel.org 779Contact: linux-iio@vger.kernel.org
780Description: 780Description:
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
index 1ce5ae329c04..5210a51c90fd 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -64,7 +64,6 @@ Description:
64 Writing a non-zero value to this attribute will 64 Writing a non-zero value to this attribute will
65 force a rescan of all PCI buses in the system, and 65 force a rescan of all PCI buses in the system, and
66 re-discover previously removed devices. 66 re-discover previously removed devices.
67 Depends on CONFIG_HOTPLUG.
68 67
69What: /sys/bus/pci/devices/.../msi_irqs/ 68What: /sys/bus/pci/devices/.../msi_irqs/
70Date: September, 2011 69Date: September, 2011
@@ -90,7 +89,6 @@ Contact: Linux PCI developers <linux-pci@vger.kernel.org>
90Description: 89Description:
91 Writing a non-zero value to this attribute will 90 Writing a non-zero value to this attribute will
92 hot-remove the PCI device and any of its children. 91 hot-remove the PCI device and any of its children.
93 Depends on CONFIG_HOTPLUG.
94 92
95What: /sys/bus/pci/devices/.../pci_bus/.../rescan 93What: /sys/bus/pci/devices/.../pci_bus/.../rescan
96Date: May 2011 94Date: May 2011
@@ -99,7 +97,7 @@ Description:
99 Writing a non-zero value to this attribute will 97 Writing a non-zero value to this attribute will
100 force a rescan of the bus and all child buses, 98 force a rescan of the bus and all child buses,
101 and re-discover devices removed earlier from this 99 and re-discover devices removed earlier from this
102 part of the device tree. Depends on CONFIG_HOTPLUG. 100 part of the device tree.
103 101
104What: /sys/bus/pci/devices/.../rescan 102What: /sys/bus/pci/devices/.../rescan
105Date: January 2009 103Date: January 2009
@@ -109,7 +107,6 @@ Description:
109 force a rescan of the device's parent bus and all 107 force a rescan of the device's parent bus and all
110 child buses, and re-discover devices removed earlier 108 child buses, and re-discover devices removed earlier
111 from this part of the device tree. 109 from this part of the device tree.
112 Depends on CONFIG_HOTPLUG.
113 110
114What: /sys/bus/pci/devices/.../reset 111What: /sys/bus/pci/devices/.../reset
115Date: July 2009 112Date: July 2009
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index f093e59cbe5f..9759b8c91332 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -236,3 +236,30 @@ Description:
236 This attribute is to expose these information to user space. 236 This attribute is to expose these information to user space.
237 The file will read "hotplug", "wired" and "not used" if the 237 The file will read "hotplug", "wired" and "not used" if the
238 information is available, and "unknown" otherwise. 238 information is available, and "unknown" otherwise.
239
240What: /sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout
241Date: May 2013
242Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
243Description:
244 USB 2.0 devices may support hardware link power management (LPM)
245 L1 sleep state. The usb2_lpm_l1_timeout attribute allows
246 tuning the timeout for L1 inactivity timer (LPM timer), e.g.
247 needed inactivity time before host requests the device to go to L1 sleep.
248 Useful for power management tuning.
249 Supported values are 0 - 65535 microseconds.
250
251What: /sys/bus/usb/devices/.../power/usb2_lpm_besl
252Date: May 2013
253Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
254Description:
255 USB 2.0 devices that support hardware link power management (LPM)
256 L1 sleep state now use a best effort service latency value (BESL) to
257 indicate the best effort to resumption of service to the device after the
258 initiation of the resume event.
259 If the device does not have a preferred besl value then the host can select
260 one instead. This usb2_lpm_besl attribute allows to tune the host selected besl
261 value in order to tune power saving and service latency.
262
263 Supported values are 0 - 15.
264 More information on how besl values map to microseconds can be found in
265 USB 2.0 ECN Errata for Link Power Management, section 4.10)
diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Documentation/ABI/testing/sysfs-class-devfreq
index 0ba6ea2f89d9..ee39acacf6f8 100644
--- a/Documentation/ABI/testing/sysfs-class-devfreq
+++ b/Documentation/ABI/testing/sysfs-class-devfreq
@@ -78,3 +78,23 @@ Contact: Nishanth Menon <nm@ti.com>
78Description: 78Description:
79 The /sys/class/devfreq/.../available_governors shows 79 The /sys/class/devfreq/.../available_governors shows
80 currently available governors in the system. 80 currently available governors in the system.
81
82What: /sys/class/devfreq/.../min_freq
83Date: January 2013
84Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
85Description:
86 The /sys/class/devfreq/.../min_freq shows and stores
87 the minimum frequency requested by users. It is 0 if
88 the user does not care. min_freq overrides the
89 frequency requested by governors.
90
91What: /sys/class/devfreq/.../max_freq
92Date: January 2013
93Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
94Description:
95 The /sys/class/devfreq/.../max_freq shows and stores
96 the maximum frequency requested by users. It is 0 if
97 the user does not care. max_freq overrides the
98 frequency requested by governors and min_freq.
99 The max_freq overrides min_freq because max_freq may be
100 used to throttle devices to avoid overheating.
diff --git a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc
index 25b1e751b777..5977e2875325 100644
--- a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc
+++ b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc
@@ -36,3 +36,22 @@ Description:
36 36
37 Refer to [ECMA-368] section 10.3.1.1 for the value to 37 Refer to [ECMA-368] section 10.3.1.1 for the value to
38 use. 38 use.
39
40What: /sys/class/uwb_rc/uwbN/wusbhc/wusb_dnts
41Date: June 2013
42KernelVersion: 3.11
43Contact: Thomas Pugliese <thomas.pugliese@gmail.com>
44Description:
45 The device notification time slot (DNTS) count and inverval in
46 milliseconds that the WUSB host should use. This controls how
47 often the devices will have the opportunity to send
48 notifications to the host.
49
50What: /sys/class/uwb_rc/uwbN/wusbhc/wusb_retry_count
51Date: June 2013
52KernelVersion: 3.11
53Contact: Thomas Pugliese <thomas.pugliese@gmail.com>
54Description:
55 The number of retries that the WUSB host should attempt
56 before reporting an error for a bus transaction. The range of
57 valid values is [0..15], where 0 indicates infinite retries.
diff --git a/Documentation/ABI/testing/sysfs-devices-online b/Documentation/ABI/testing/sysfs-devices-online
new file mode 100644
index 000000000000..f990026c0740
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-devices-online
@@ -0,0 +1,20 @@
1What: /sys/devices/.../online
2Date: April 2013
3Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
4Description:
5 The /sys/devices/.../online attribute is only present for
6 devices whose bus types provide .online() and .offline()
7 callbacks. The number read from it (0 or 1) reflects the value
8 of the device's 'offline' field. If that number is 1 and '0'
9 (or 'n', or 'N') is written to this file, the device bus type's
10 .offline() callback is executed for the device and (if
11 successful) its 'offline' field is updated accordingly. In
12 turn, if that number is 0 and '1' (or 'y', or 'Y') is written to
13 this file, the device bus type's .online() callback is executed
14 for the device and (if successful) its 'offline' field is
15 updated as appropriate.
16
17 After a successful execution of the bus type's .offline()
18 callback the device cannot be used for any purpose until either
19 it is removed (i.e. device_del() is called for it), or its bus
20 type's .online() is exeucted successfully.
diff --git a/Documentation/ABI/testing/sysfs-devices-sun b/Documentation/ABI/testing/sysfs-devices-sun
index 86be9848a77e..625ce4b63758 100644
--- a/Documentation/ABI/testing/sysfs-devices-sun
+++ b/Documentation/ABI/testing/sysfs-devices-sun
@@ -1,4 +1,4 @@
1Whatt: /sys/devices/.../sun 1What: /sys/devices/.../sun
2Date: October 2012 2Date: October 2012
3Contact: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> 3Contact: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
4Description: 4Description:
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 2447698aed41..468e4d48f884 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -144,6 +144,21 @@ Description: Discover and change clock speed of CPUs
144 to learn how to control the knobs. 144 to learn how to control the knobs.
145 145
146 146
147What: /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus
148Date: June 2013
149Contact: cpufreq@vger.kernel.org
150Description: Discover CPUs in the same CPU frequency coordination domain
151
152 freqdomain_cpus is the list of CPUs (online+offline) that share
153 the same clock/freq domain (possibly at the hardware level).
154 That information may be hidden from the cpufreq core and the
155 value of related_cpus may be different from freqdomain_cpus. This
156 attribute is useful for user space DVFS controllers to get better
157 power/performance results for platforms using acpi-cpufreq.
158
159 This file is only present if the acpi-cpufreq driver is in use.
160
161
147What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1} 162What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
148Date: August 2008 163Date: August 2008
149KernelVersion: 2.6.27 164KernelVersion: 2.6.27
diff --git a/Documentation/ABI/testing/sysfs-firmware-acpi b/Documentation/ABI/testing/sysfs-firmware-acpi
index ce9bee98b43b..b4436cca97a8 100644
--- a/Documentation/ABI/testing/sysfs-firmware-acpi
+++ b/Documentation/ABI/testing/sysfs-firmware-acpi
@@ -44,6 +44,16 @@ Description:
44 or 0 (unset). Attempts to write any other values to it will 44 or 0 (unset). Attempts to write any other values to it will
45 cause -EINVAL to be returned. 45 cause -EINVAL to be returned.
46 46
47What: /sys/firmware/acpi/hotplug/force_remove
48Date: May 2013
49Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
50Description:
51 The number in this file (0 or 1) determines whether (1) or not
52 (0) the ACPI subsystem will allow devices to be hot-removed even
53 if they cannot be put offline gracefully (from the kernel's
54 viewpoint). That number can be changed by writing a boolean
55 value to this file.
56
47What: /sys/firmware/acpi/interrupts/ 57What: /sys/firmware/acpi/interrupts/
48Date: February 2008 58Date: February 2008
49Contact: Len Brown <lenb@kernel.org> 59Contact: Len Brown <lenb@kernel.org>
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index e00b8f0dde52..7fe0546c504a 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -389,7 +389,8 @@ Albeit deprecated by some people, the equivalent of the goto statement is
389used frequently by compilers in form of the unconditional jump instruction. 389used frequently by compilers in form of the unconditional jump instruction.
390 390
391The goto statement comes in handy when a function exits from multiple 391The goto statement comes in handy when a function exits from multiple
392locations and some common work such as cleanup has to be done. 392locations and some common work such as cleanup has to be done. If there is no
393cleanup needed then just return directly.
393 394
394The rationale is: 395The rationale is:
395 396
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl
index c36892c072da..fca34192cf80 100644
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@ -297,10 +297,10 @@ KAO -->
297 </sect1> 297 </sect1>
298 <sect1><title>Frame Buffer Fonts</title> 298 <sect1><title>Frame Buffer Fonts</title>
299 <para> 299 <para>
300 Refer to the file drivers/video/console/fonts.c for more information. 300 Refer to the file lib/fonts/fonts.c for more information.
301 </para> 301 </para>
302<!-- FIXME: Removed for now since no structured comments in source 302<!-- FIXME: Removed for now since no structured comments in source
303X!Idrivers/video/console/fonts.c 303X!Ilib/fonts/fonts.c
304--> 304-->
305 </sect1> 305 </sect1>
306 </chapter> 306 </chapter>
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl
index b3422341d65c..d16d21b7a3b7 100644
--- a/Documentation/DocBook/genericirq.tmpl
+++ b/Documentation/DocBook/genericirq.tmpl
@@ -464,6 +464,19 @@ if (desc->irq_data.chip->irq_eoi)
464 protected via desc->lock, by the generic layer. 464 protected via desc->lock, by the generic layer.
465 </para> 465 </para>
466 </chapter> 466 </chapter>
467
468 <chapter id="genericchip">
469 <title>Generic interrupt chip</title>
470 <para>
471 To avoid copies of identical implementations of irq chips the
472 core provides a configurable generic interrupt chip
473 implementation. Developers should check carefuly whether the
474 generic chip fits their needs before implementing the same
475 functionality slightly different themself.
476 </para>
477!Ekernel/irq/generic-chip.c
478 </chapter>
479
467 <chapter id="structs"> 480 <chapter id="structs">
468 <title>Structures</title> 481 <title>Structures</title>
469 <para> 482 <para>
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
index 67e7ab41c0a6..09e884e5b9f5 100644
--- a/Documentation/DocBook/kernel-locking.tmpl
+++ b/Documentation/DocBook/kernel-locking.tmpl
@@ -1955,12 +1955,17 @@ machines due to caching.
1955 </sect1> 1955 </sect1>
1956 </chapter> 1956 </chapter>
1957 1957
1958 <chapter id="apiref"> 1958 <chapter id="apiref-mutex">
1959 <title>Mutex API reference</title> 1959 <title>Mutex API reference</title>
1960!Iinclude/linux/mutex.h 1960!Iinclude/linux/mutex.h
1961!Ekernel/mutex.c 1961!Ekernel/mutex.c
1962 </chapter> 1962 </chapter>
1963 1963
1964 <chapter id="apiref-futex">
1965 <title>Futex API reference</title>
1966!Ikernel/futex.c
1967 </chapter>
1968
1964 <chapter id="references"> 1969 <chapter id="references">
1965 <title>Further reading</title> 1970 <title>Further reading</title>
1966 1971
diff --git a/Documentation/DocBook/media/v4l/dev-codec.xml b/Documentation/DocBook/media/v4l/dev-codec.xml
index dca0ecd54dc6..ff44c16fc080 100644
--- a/Documentation/DocBook/media/v4l/dev-codec.xml
+++ b/Documentation/DocBook/media/v4l/dev-codec.xml
@@ -1,18 +1,27 @@
1 <title>Codec Interface</title> 1 <title>Codec Interface</title>
2 2
3 <note> 3 <para>A V4L2 codec can compress, decompress, transform, or otherwise
4 <title>Suspended</title> 4convert video data from one format into another format, in memory. Typically
5such devices are memory-to-memory devices (i.e. devices with the
6<constant>V4L2_CAP_VIDEO_M2M</constant> or <constant>V4L2_CAP_VIDEO_M2M_MPLANE</constant>
7capability set).
8</para>
5 9
6 <para>This interface has been be suspended from the V4L2 API 10 <para>A memory-to-memory video node acts just like a normal video node, but it
7implemented in Linux 2.6 until we have more experience with codec 11supports both output (sending frames from memory to the codec hardware) and
8device interfaces.</para> 12capture (receiving the processed frames from the codec hardware into memory)
9 </note> 13stream I/O. An application will have to setup the stream
14I/O for both sides and finally call &VIDIOC-STREAMON; for both capture and output
15to start the codec.</para>
10 16
11 <para>A V4L2 codec can compress, decompress, transform, or otherwise 17 <para>Video compression codecs use the MPEG controls to setup their codec parameters
12convert video data from one format into another format, in memory. 18(note that the MPEG controls actually support many more codecs than just MPEG).
13Applications send data to be converted to the driver through a 19See <xref linkend="mpeg-controls"></xref>.</para>
14&func-write; call, and receive the converted data through a
15&func-read; call. For efficiency a driver may also support streaming
16I/O.</para>
17 20
18 <para>[to do]</para> 21 <para>Memory-to-memory devices can often be used as a shared resource: you can
22open the video node multiple times, each application setting up their own codec properties
23that are local to the file handle, and each can use it independently from the others.
24The driver will arbitrate access to the codec and reprogram it whenever another file
25handler gets access. This is different from the usual video node behavior where the video properties
26are global to the device (i.e. changing something through one file handle is visible
27through another file handle).</para>
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index bfc93cdcf696..bfe823dd0f31 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -493,7 +493,7 @@ and discussions on the V4L mailing list.</revremark>
493</partinfo> 493</partinfo>
494 494
495<title>Video for Linux Two API Specification</title> 495<title>Video for Linux Two API Specification</title>
496 <subtitle>Revision 3.9</subtitle> 496 <subtitle>Revision 3.10</subtitle>
497 497
498 <chapter id="common"> 498 <chapter id="common">
499 &sub-common; 499 &sub-common;
diff --git a/Documentation/HOWTO b/Documentation/HOWTO
index a9f288ff54f9..27faae3e3846 100644
--- a/Documentation/HOWTO
+++ b/Documentation/HOWTO
@@ -112,7 +112,7 @@ required reading:
112 112
113 Other excellent descriptions of how to create patches properly are: 113 Other excellent descriptions of how to create patches properly are:
114 "The Perfect Patch" 114 "The Perfect Patch"
115 http://userweb.kernel.org/~akpm/stuff/tpp.txt 115 http://kerneltrap.org/node/3737
116 "Linux kernel patch submission format" 116 "Linux kernel patch submission format"
117 http://linux.yyz.us/patch-format.html 117 http://linux.yyz.us/patch-format.html
118 118
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt
index 79e789b8b8ea..7703ec73a9bb 100644
--- a/Documentation/RCU/checklist.txt
+++ b/Documentation/RCU/checklist.txt
@@ -354,12 +354,6 @@ over a rather long period of time, but improvements are always welcome!
354 using RCU rather than SRCU, because RCU is almost always faster 354 using RCU rather than SRCU, because RCU is almost always faster
355 and easier to use than is SRCU. 355 and easier to use than is SRCU.
356 356
357 If you need to enter your read-side critical section in a
358 hardirq or exception handler, and then exit that same read-side
359 critical section in the task that was interrupted, then you need
360 to srcu_read_lock_raw() and srcu_read_unlock_raw(), which avoid
361 the lockdep checking that would otherwise this practice illegal.
362
363 Also unlike other forms of RCU, explicit initialization 357 Also unlike other forms of RCU, explicit initialization
364 and cleanup is required via init_srcu_struct() and 358 and cleanup is required via init_srcu_struct() and
365 cleanup_srcu_struct(). These are passed a "struct srcu_struct" 359 cleanup_srcu_struct(). These are passed a "struct srcu_struct"
diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt
index 7dce8a17eac2..d8a502387397 100644
--- a/Documentation/RCU/torture.txt
+++ b/Documentation/RCU/torture.txt
@@ -182,12 +182,6 @@ torture_type The type of RCU to test, with string values as follows:
182 "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and 182 "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and
183 synchronize_srcu_expedited(). 183 synchronize_srcu_expedited().
184 184
185 "srcu_raw": srcu_read_lock_raw(), srcu_read_unlock_raw(),
186 and call_srcu().
187
188 "srcu_raw_sync": srcu_read_lock_raw(), srcu_read_unlock_raw(),
189 and synchronize_srcu().
190
191 "sched": preempt_disable(), preempt_enable(), and 185 "sched": preempt_disable(), preempt_enable(), and
192 call_rcu_sched(). 186 call_rcu_sched().
193 187
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index c776968f4463..f3778f8952da 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -530,113 +530,21 @@ o "nos" counts the number of times we balked for other
530 reasons, e.g., the grace period ended first. 530 reasons, e.g., the grace period ended first.
531 531
532 532
533CONFIG_TINY_RCU and CONFIG_TINY_PREEMPT_RCU debugfs Files and Formats 533CONFIG_TINY_RCU debugfs Files and Formats
534 534
535These implementations of RCU provides a single debugfs file under the 535These implementations of RCU provides a single debugfs file under the
536top-level directory RCU, namely rcu/rcudata, which displays fields in 536top-level directory RCU, namely rcu/rcudata, which displays fields in
537rcu_bh_ctrlblk, rcu_sched_ctrlblk and, for CONFIG_TINY_PREEMPT_RCU, 537rcu_bh_ctrlblk and rcu_sched_ctrlblk.
538rcu_preempt_ctrlblk.
539 538
540The output of "cat rcu/rcudata" is as follows: 539The output of "cat rcu/rcudata" is as follows:
541 540
542rcu_preempt: qlen=24 gp=1097669 g197/p197/c197 tasks=...
543 ttb=. btg=no ntb=184 neb=0 nnb=183 j=01f7 bt=0274
544 normal balk: nt=1097669 gt=0 bt=371 b=0 ny=25073378 nos=0
545 exp balk: bt=0 nos=0
546rcu_sched: qlen: 0 541rcu_sched: qlen: 0
547rcu_bh: qlen: 0 542rcu_bh: qlen: 0
548 543
549This is split into rcu_preempt, rcu_sched, and rcu_bh sections, with the 544This is split into rcu_sched and rcu_bh sections. The field is as
550rcu_preempt section appearing only in CONFIG_TINY_PREEMPT_RCU builds. 545follows:
551The last three lines of the rcu_preempt section appear only in
552CONFIG_RCU_BOOST kernel builds. The fields are as follows:
553 546
554o "qlen" is the number of RCU callbacks currently waiting either 547o "qlen" is the number of RCU callbacks currently waiting either
555 for an RCU grace period or waiting to be invoked. This is the 548 for an RCU grace period or waiting to be invoked. This is the
556 only field present for rcu_sched and rcu_bh, due to the 549 only field present for rcu_sched and rcu_bh, due to the
557 short-circuiting of grace period in those two cases. 550 short-circuiting of grace period in those two cases.
558
559o "gp" is the number of grace periods that have completed.
560
561o "g197/p197/c197" displays the grace-period state, with the
562 "g" number being the number of grace periods that have started
563 (mod 256), the "p" number being the number of grace periods
564 that the CPU has responded to (also mod 256), and the "c"
565 number being the number of grace periods that have completed
566 (once again mode 256).
567
568 Why have both "gp" and "g"? Because the data flowing into
569 "gp" is only present in a CONFIG_RCU_TRACE kernel.
570
571o "tasks" is a set of bits. The first bit is "T" if there are
572 currently tasks that have recently blocked within an RCU
573 read-side critical section, the second bit is "N" if any of the
574 aforementioned tasks are blocking the current RCU grace period,
575 and the third bit is "E" if any of the aforementioned tasks are
576 blocking the current expedited grace period. Each bit is "."
577 if the corresponding condition does not hold.
578
579o "ttb" is a single bit. It is "B" if any of the blocked tasks
580 need to be priority boosted and "." otherwise.
581
582o "btg" indicates whether boosting has been carried out during
583 the current grace period, with "exp" indicating that boosting
584 is in progress for an expedited grace period, "no" indicating
585 that boosting has not yet started for a normal grace period,
586 "begun" indicating that boosting has bebug for a normal grace
587 period, and "done" indicating that boosting has completed for
588 a normal grace period.
589
590o "ntb" is the total number of tasks subjected to RCU priority boosting
591 periods since boot.
592
593o "neb" is the number of expedited grace periods that have had
594 to resort to RCU priority boosting since boot.
595
596o "nnb" is the number of normal grace periods that have had
597 to resort to RCU priority boosting since boot.
598
599o "j" is the low-order 16 bits of the jiffies counter in hexadecimal.
600
601o "bt" is the low-order 16 bits of the value that the jiffies counter
602 will have at the next time that boosting is scheduled to begin.
603
604o In the line beginning with "normal balk", the fields are as follows:
605
606 o "nt" is the number of times that the system balked from
607 boosting because there were no blocked tasks to boost.
608 Note that the system will balk from boosting even if the
609 grace period is overdue when the currently running task
610 is looping within an RCU read-side critical section.
611 There is no point in boosting in this case, because
612 boosting a running task won't make it run any faster.
613
614 o "gt" is the number of times that the system balked
615 from boosting because, although there were blocked tasks,
616 none of them were preventing the current grace period
617 from completing.
618
619 o "bt" is the number of times that the system balked
620 from boosting because boosting was already in progress.
621
622 o "b" is the number of times that the system balked from
623 boosting because boosting had already completed for
624 the grace period in question.
625
626 o "ny" is the number of times that the system balked from
627 boosting because it was not yet time to start boosting
628 the grace period in question.
629
630 o "nos" is the number of times that the system balked from
631 boosting for inexplicable ("not otherwise specified")
632 reasons. This can actually happen due to races involving
633 increments of the jiffies counter.
634
635o In the line beginning with "exp balk", the fields are as follows:
636
637 o "bt" is the number of times that the system balked from
638 boosting because there were no blocked tasks to boost.
639
640 o "nos" is the number of times that the system balked from
641 boosting for inexplicable ("not otherwise specified")
642 reasons.
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index 10df0b82f459..0f0fb7c432c2 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -842,9 +842,7 @@ SRCU: Critical sections Grace period Barrier
842 842
843 srcu_read_lock synchronize_srcu srcu_barrier 843 srcu_read_lock synchronize_srcu srcu_barrier
844 srcu_read_unlock call_srcu 844 srcu_read_unlock call_srcu
845 srcu_read_lock_raw synchronize_srcu_expedited 845 srcu_dereference synchronize_srcu_expedited
846 srcu_read_unlock_raw
847 srcu_dereference
848 846
849SRCU: Initialization/cleanup 847SRCU: Initialization/cleanup
850 init_srcu_struct 848 init_srcu_struct
@@ -865,38 +863,32 @@ list can be helpful:
865 863
866a. Will readers need to block? If so, you need SRCU. 864a. Will readers need to block? If so, you need SRCU.
867 865
868b. Is it necessary to start a read-side critical section in a 866b. What about the -rt patchset? If readers would need to block
869 hardirq handler or exception handler, and then to complete
870 this read-side critical section in the task that was
871 interrupted? If so, you need SRCU's srcu_read_lock_raw() and
872 srcu_read_unlock_raw() primitives.
873
874c. What about the -rt patchset? If readers would need to block
875 in an non-rt kernel, you need SRCU. If readers would block 867 in an non-rt kernel, you need SRCU. If readers would block
876 in a -rt kernel, but not in a non-rt kernel, SRCU is not 868 in a -rt kernel, but not in a non-rt kernel, SRCU is not
877 necessary. 869 necessary.
878 870
879d. Do you need to treat NMI handlers, hardirq handlers, 871c. Do you need to treat NMI handlers, hardirq handlers,
880 and code segments with preemption disabled (whether 872 and code segments with preemption disabled (whether
881 via preempt_disable(), local_irq_save(), local_bh_disable(), 873 via preempt_disable(), local_irq_save(), local_bh_disable(),
882 or some other mechanism) as if they were explicit RCU readers? 874 or some other mechanism) as if they were explicit RCU readers?
883 If so, RCU-sched is the only choice that will work for you. 875 If so, RCU-sched is the only choice that will work for you.
884 876
885e. Do you need RCU grace periods to complete even in the face 877d. Do you need RCU grace periods to complete even in the face
886 of softirq monopolization of one or more of the CPUs? For 878 of softirq monopolization of one or more of the CPUs? For
887 example, is your code subject to network-based denial-of-service 879 example, is your code subject to network-based denial-of-service
888 attacks? If so, you need RCU-bh. 880 attacks? If so, you need RCU-bh.
889 881
890f. Is your workload too update-intensive for normal use of 882e. Is your workload too update-intensive for normal use of
891 RCU, but inappropriate for other synchronization mechanisms? 883 RCU, but inappropriate for other synchronization mechanisms?
892 If so, consider SLAB_DESTROY_BY_RCU. But please be careful! 884 If so, consider SLAB_DESTROY_BY_RCU. But please be careful!
893 885
894g. Do you need read-side critical sections that are respected 886f. Do you need read-side critical sections that are respected
895 even though they are in the middle of the idle loop, during 887 even though they are in the middle of the idle loop, during
896 user-mode execution, or on an offlined CPU? If so, SRCU is the 888 user-mode execution, or on an offlined CPU? If so, SRCU is the
897 only choice that will work for you. 889 only choice that will work for you.
898 890
899h. Otherwise, use RCU. 891g. Otherwise, use RCU.
900 892
901Of course, this all assumes that you have determined that RCU is in fact 893Of course, this all assumes that you have determined that RCU is in fact
902the right tool for your job. 894the right tool for your job.
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist
index dc0e33210d7e..2b7e32dfe00d 100644
--- a/Documentation/SubmitChecklist
+++ b/Documentation/SubmitChecklist
@@ -105,5 +105,5 @@ kernel patches.
105 same time, just various/random combinations of them]: 105 same time, just various/random combinations of them]:
106 106
107 CONFIG_SMP, CONFIG_SYSFS, CONFIG_PROC_FS, CONFIG_INPUT, CONFIG_PCI, 107 CONFIG_SMP, CONFIG_SYSFS, CONFIG_PROC_FS, CONFIG_INPUT, CONFIG_PCI,
108 CONFIG_BLOCK, CONFIG_PM, CONFIG_HOTPLUG, CONFIG_MAGIC_SYSRQ, 108 CONFIG_BLOCK, CONFIG_PM, CONFIG_MAGIC_SYSRQ,
109 CONFIG_NET, CONFIG_INET=n (but latter with CONFIG_NET=y) 109 CONFIG_NET, CONFIG_INET=n (but latter with CONFIG_NET=y)
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index f8ebcde43b17..c6a06b71594d 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -272,7 +272,7 @@ int main(int argc, char *argv[])
272 char *logfile = NULL; 272 char *logfile = NULL;
273 int loop = 0; 273 int loop = 0;
274 int containerset = 0; 274 int containerset = 0;
275 char containerpath[1024]; 275 char *containerpath = NULL;
276 int cfd = 0; 276 int cfd = 0;
277 int forking = 0; 277 int forking = 0;
278 sigset_t sigset; 278 sigset_t sigset;
@@ -299,7 +299,7 @@ int main(int argc, char *argv[])
299 break; 299 break;
300 case 'C': 300 case 'C':
301 containerset = 1; 301 containerset = 1;
302 strncpy(containerpath, optarg, strlen(optarg) + 1); 302 containerpath = optarg;
303 break; 303 break;
304 case 'w': 304 case 'w':
305 logfile = strdup(optarg); 305 logfile = strdup(optarg);
diff --git a/Documentation/acpi/apei/einj.txt b/Documentation/acpi/apei/einj.txt
index e20b6daaced4..a58b63da1a36 100644
--- a/Documentation/acpi/apei/einj.txt
+++ b/Documentation/acpi/apei/einj.txt
@@ -47,11 +47,16 @@ directory apei/einj. The following files are provided.
47 47
48- param1 48- param1
49 This file is used to set the first error parameter value. Effect of 49 This file is used to set the first error parameter value. Effect of
50 parameter depends on error_type specified. 50 parameter depends on error_type specified. For example, if error
51 type is memory related type, the param1 should be a valid physical
52 memory address.
51 53
52- param2 54- param2
53 This file is used to set the second error parameter value. Effect of 55 This file is used to set the second error parameter value. Effect of
54 parameter depends on error_type specified. 56 parameter depends on error_type specified. For example, if error
57 type is memory related type, the param2 should be a physical memory
58 address mask. Linux requires page or narrower granularity, say,
59 0xfffffffffffff000.
55 60
56- notrigger 61- notrigger
57 The EINJ mechanism is a two step process. First inject the error, then 62 The EINJ mechanism is a two step process. First inject the error, then
diff --git a/Documentation/acpi/namespace.txt b/Documentation/acpi/namespace.txt
new file mode 100644
index 000000000000..260f6a3661fa
--- /dev/null
+++ b/Documentation/acpi/namespace.txt
@@ -0,0 +1,395 @@
1ACPI Device Tree - Representation of ACPI Namespace
2
3Copyright (C) 2013, Intel Corporation
4Author: Lv Zheng <lv.zheng@intel.com>
5
6
7Abstract:
8
9The Linux ACPI subsystem converts ACPI namespace objects into a Linux
10device tree under the /sys/devices/LNXSYSTEM:00 and updates it upon
11receiving ACPI hotplug notification events. For each device object in this
12hierarchy there is a corresponding symbolic link in the
13/sys/bus/acpi/devices.
14This document illustrates the structure of the ACPI device tree.
15
16
17Credit:
18
19Thanks for the help from Zhang Rui <rui.zhang@intel.com> and Rafael J.
20Wysocki <rafael.j.wysocki@intel.com>.
21
22
231. ACPI Definition Blocks
24
25 The ACPI firmware sets up RSDP (Root System Description Pointer) in the
26 system memory address space pointing to the XSDT (Extended System
27 Description Table). The XSDT always points to the FADT (Fixed ACPI
28 Description Table) using its first entry, the data within the FADT
29 includes various fixed-length entries that describe fixed ACPI features
30 of the hardware. The FADT contains a pointer to the DSDT
31 (Differentiated System Descripition Table). The XSDT also contains
32 entries pointing to possibly multiple SSDTs (Secondary System
33 Description Table).
34
35 The DSDT and SSDT data is organized in data structures called definition
36 blocks that contain definitions of various objects, including ACPI
37 control methods, encoded in AML (ACPI Machine Language). The data block
38 of the DSDT along with the contents of SSDTs represents a hierarchical
39 data structure called the ACPI namespace whose topology reflects the
40 structure of the underlying hardware platform.
41
42 The relationships between ACPI System Definition Tables described above
43 are illustrated in the following diagram.
44
45 +---------+ +-------+ +--------+ +------------------------+
46 | RSDP | +->| XSDT | +->| FADT | | +-------------------+ |
47 +---------+ | +-------+ | +--------+ +-|->| DSDT | |
48 | Pointer | | | Entry |-+ | ...... | | | +-------------------+ |
49 +---------+ | +-------+ | X_DSDT |--+ | | Definition Blocks | |
50 | Pointer |-+ | ..... | | ...... | | +-------------------+ |
51 +---------+ +-------+ +--------+ | +-------------------+ |
52 | Entry |------------------|->| SSDT | |
53 +- - - -+ | +-------------------| |
54 | Entry | - - - - - - - -+ | | Definition Blocks | |
55 +- - - -+ | | +-------------------+ |
56 | | +- - - - - - - - - -+ |
57 +-|->| SSDT | |
58 | +-------------------+ |
59 | | Definition Blocks | |
60 | +- - - - - - - - - -+ |
61 +------------------------+
62 |
63 OSPM Loading |
64 \|/
65 +----------------+
66 | ACPI Namespace |
67 +----------------+
68
69 Figure 1. ACPI Definition Blocks
70
71 NOTE: RSDP can also contain a pointer to the RSDT (Root System
72 Description Table). Platforms provide RSDT to enable
73 compatibility with ACPI 1.0 operating systems. The OS is expected
74 to use XSDT, if present.
75
76
772. Example ACPI Namespace
78
79 All definition blocks are loaded into a single namespace. The namespace
80 is a hierarchy of objects identified by names and paths.
81 The following naming conventions apply to object names in the ACPI
82 namespace:
83 1. All names are 32 bits long.
84 2. The first byte of a name must be one of 'A' - 'Z', '_'.
85 3. Each of the remaining bytes of a name must be one of 'A' - 'Z', '0'
86 - '9', '_'.
87 4. Names starting with '_' are reserved by the ACPI specification.
88 5. The '\' symbol represents the root of the namespace (i.e. names
89 prepended with '\' are relative to the namespace root).
90 6. The '^' symbol represents the parent of the current namespace node
91 (i.e. names prepended with '^' are relative to the parent of the
92 current namespace node).
93
94 The figure below shows an example ACPI namespace.
95
96 +------+
97 | \ | Root
98 +------+
99 |
100 | +------+
101 +-| _PR | Scope(_PR): the processor namespace
102 | +------+
103 | |
104 | | +------+
105 | +-| CPU0 | Processor(CPU0): the first processor
106 | +------+
107 |
108 | +------+
109 +-| _SB | Scope(_SB): the system bus namespace
110 | +------+
111 | |
112 | | +------+
113 | +-| LID0 | Device(LID0); the lid device
114 | | +------+
115 | | |
116 | | | +------+
117 | | +-| _HID | Name(_HID, "PNP0C0D"): the hardware ID
118 | | | +------+
119 | | |
120 | | | +------+
121 | | +-| _STA | Method(_STA): the status control method
122 | | +------+
123 | |
124 | | +------+
125 | +-| PCI0 | Device(PCI0); the PCI root bridge
126 | +------+
127 | |
128 | | +------+
129 | +-| _HID | Name(_HID, "PNP0A08"): the hardware ID
130 | | +------+
131 | |
132 | | +------+
133 | +-| _CID | Name(_CID, "PNP0A03"): the compatible ID
134 | | +------+
135 | |
136 | | +------+
137 | +-| RP03 | Scope(RP03): the PCI0 power scope
138 | | +------+
139 | | |
140 | | | +------+
141 | | +-| PXP3 | PowerResource(PXP3): the PCI0 power resource
142 | | +------+
143 | |
144 | | +------+
145 | +-| GFX0 | Device(GFX0): the graphics adapter
146 | +------+
147 | |
148 | | +------+
149 | +-| _ADR | Name(_ADR, 0x00020000): the PCI bus address
150 | | +------+
151 | |
152 | | +------+
153 | +-| DD01 | Device(DD01): the LCD output device
154 | +------+
155 | |
156 | | +------+
157 | +-| _BCL | Method(_BCL): the backlight control method
158 | +------+
159 |
160 | +------+
161 +-| _TZ | Scope(_TZ): the thermal zone namespace
162 | +------+
163 | |
164 | | +------+
165 | +-| FN00 | PowerResource(FN00): the FAN0 power resource
166 | | +------+
167 | |
168 | | +------+
169 | +-| FAN0 | Device(FAN0): the FAN0 cooling device
170 | | +------+
171 | | |
172 | | | +------+
173 | | +-| _HID | Name(_HID, "PNP0A0B"): the hardware ID
174 | | +------+
175 | |
176 | | +------+
177 | +-| TZ00 | ThermalZone(TZ00); the FAN thermal zone
178 | +------+
179 |
180 | +------+
181 +-| _GPE | Scope(_GPE): the GPE namespace
182 +------+
183
184 Figure 2. Example ACPI Namespace
185
186
1873. Linux ACPI Device Objects
188
189 The Linux kernel's core ACPI subsystem creates struct acpi_device
190 objects for ACPI namespace objects representing devices, power resources
191 processors, thermal zones. Those objects are exported to user space via
192 sysfs as directories in the subtree under /sys/devices/LNXSYSTM:00. The
193 format of their names is <bus_id:instance>, where 'bus_id' refers to the
194 ACPI namespace representation of the given object and 'instance' is used
195 for distinguishing different object of the same 'bus_id' (it is
196 two-digit decimal representation of an unsigned integer).
197
198 The value of 'bus_id' depends on the type of the object whose name it is
199 part of as listed in the table below.
200
201 +---+-----------------+-------+----------+
202 | | Object/Feature | Table | bus_id |
203 +---+-----------------+-------+----------+
204 | N | Root | xSDT | LNXSYSTM |
205 +---+-----------------+-------+----------+
206 | N | Device | xSDT | _HID |
207 +---+-----------------+-------+----------+
208 | N | Processor | xSDT | LNXCPU |
209 +---+-----------------+-------+----------+
210 | N | ThermalZone | xSDT | LNXTHERM |
211 +---+-----------------+-------+----------+
212 | N | PowerResource | xSDT | LNXPOWER |
213 +---+-----------------+-------+----------+
214 | N | Other Devices | xSDT | device |
215 +---+-----------------+-------+----------+
216 | F | PWR_BUTTON | FADT | LNXPWRBN |
217 +---+-----------------+-------+----------+
218 | F | SLP_BUTTON | FADT | LNXSLPBN |
219 +---+-----------------+-------+----------+
220 | M | Video Extension | xSDT | LNXVIDEO |
221 +---+-----------------+-------+----------+
222 | M | ATA Controller | xSDT | LNXIOBAY |
223 +---+-----------------+-------+----------+
224 | M | Docking Station | xSDT | LNXDOCK |
225 +---+-----------------+-------+----------+
226
227 Table 1. ACPI Namespace Objects Mapping
228
229 The following rules apply when creating struct acpi_device objects on
230 the basis of the contents of ACPI System Description Tables (as
231 indicated by the letter in the first column and the notation in the
232 second column of the table above):
233 N:
234 The object's source is an ACPI namespace node (as indicated by the
235 named object's type in the second column). In that case the object's
236 directory in sysfs will contain the 'path' attribute whose value is
237 the full path to the node from the namespace root.
238 struct acpi_device objects are created for the ACPI namespace nodes
239 whose _STA control methods return PRESENT or FUNCTIONING. The power
240 resource nodes or nodes without _STA are assumed to be both PRESENT
241 and FUNCTIONING.
242 F:
243 The struct acpi_device object is created for a fixed hardware
244 feature (as indicated by the fixed feature flag's name in the second
245 column), so its sysfs directory will not contain the 'path'
246 attribute.
247 M:
248 The struct acpi_device object is created for an ACPI namespace node
249 with specific control methods (as indicated by the ACPI defined
250 device's type in the second column). The 'path' attribute containing
251 its namespace path will be present in its sysfs directory. For
252 example, if the _BCL method is present for an ACPI namespace node, a
253 struct acpi_device object with LNXVIDEO 'bus_id' will be created for
254 it.
255
256 The third column of the above table indicates which ACPI System
257 Description Tables contain information used for the creation of the
258 struct acpi_device objects represented by the given row (xSDT means DSDT
259 or SSDT).
260
261 The forth column of the above table indicates the 'bus_id' generation
262 rule of the struct acpi_device object:
263 _HID:
264 _HID in the last column of the table means that the object's bus_id
265 is derived from the _HID/_CID identification objects present under
266 the corresponding ACPI namespace node. The object's sysfs directory
267 will then contain the 'hid' and 'modalias' attributes that can be
268 used to retrieve the _HID and _CIDs of that object.
269 LNXxxxxx:
270 The 'modalias' attribute is also present for struct acpi_device
271 objects having bus_id of the "LNXxxxxx" form (pseudo devices), in
272 which cases it contains the bus_id string itself.
273 device:
274 'device' in the last column of the table indicates that the object's
275 bus_id cannot be determined from _HID/_CID of the corresponding
276 ACPI namespace node, although that object represents a device (for
277 example, it may be a PCI device with _ADR defined and without _HID
278 or _CID). In that case the string 'device' will be used as the
279 object's bus_id.
280
281
2824. Linux ACPI Physical Device Glue
283
284 ACPI device (i.e. struct acpi_device) objects may be linked to other
285 objects in the Linux' device hierarchy that represent "physical" devices
286 (for example, devices on the PCI bus). If that happens, it means that
287 the ACPI device object is a "companion" of a device otherwise
288 represented in a different way and is used (1) to provide configuration
289 information on that device which cannot be obtained by other means and
290 (2) to do specific things to the device with the help of its ACPI
291 control methods. One ACPI device object may be linked this way to
292 multiple "physical" devices.
293
294 If an ACPI device object is linked to a "physical" device, its sysfs
295 directory contains the "physical_node" symbolic link to the sysfs
296 directory of the target device object. In turn, the target device's
297 sysfs directory will then contain the "firmware_node" symbolic link to
298 the sysfs directory of the companion ACPI device object.
299 The linking mechanism relies on device identification provided by the
300 ACPI namespace. For example, if there's an ACPI namespace object
301 representing a PCI device (i.e. a device object under an ACPI namespace
302 object representing a PCI bridge) whose _ADR returns 0x00020000 and the
303 bus number of the parent PCI bridge is 0, the sysfs directory
304 representing the struct acpi_device object created for that ACPI
305 namespace object will contain the 'physical_node' symbolic link to the
306 /sys/devices/pci0000:00/0000:00:02:0/ sysfs directory of the
307 corresponding PCI device.
308
309 The linking mechanism is generally bus-specific. The core of its
310 implementation is located in the drivers/acpi/glue.c file, but there are
311 complementary parts depending on the bus types in question located
312 elsewhere. For example, the PCI-specific part of it is located in
313 drivers/pci/pci-acpi.c.
314
315
3165. Example Linux ACPI Device Tree
317
318 The sysfs hierarchy of struct acpi_device objects corresponding to the
319 example ACPI namespace illustrated in Figure 2 with the addition of
320 fixed PWR_BUTTON/SLP_BUTTON devices is shown below.
321
322 +--------------+---+-----------------+
323 | LNXSYSTEM:00 | \ | acpi:LNXSYSTEM: |
324 +--------------+---+-----------------+
325 |
326 | +-------------+-----+----------------+
327 +-| LNXPWRBN:00 | N/A | acpi:LNXPWRBN: |
328 | +-------------+-----+----------------+
329 |
330 | +-------------+-----+----------------+
331 +-| LNXSLPBN:00 | N/A | acpi:LNXSLPBN: |
332 | +-------------+-----+----------------+
333 |
334 | +-----------+------------+--------------+
335 +-| LNXCPU:00 | \_PR_.CPU0 | acpi:LNXCPU: |
336 | +-----------+------------+--------------+
337 |
338 | +-------------+-------+----------------+
339 +-| LNXSYBUS:00 | \_SB_ | acpi:LNXSYBUS: |
340 | +-------------+-------+----------------+
341 | |
342 | | +- - - - - - - +- - - - - - +- - - - - - - -+
343 | +-| * PNP0C0D:00 | \_SB_.LID0 | acpi:PNP0C0D: |
344 | | +- - - - - - - +- - - - - - +- - - - - - - -+
345 | |
346 | | +------------+------------+-----------------------+
347 | +-| PNP0A08:00 | \_SB_.PCI0 | acpi:PNP0A08:PNP0A03: |
348 | +------------+------------+-----------------------+
349 | |
350 | | +-----------+-----------------+-----+
351 | +-| device:00 | \_SB_.PCI0.RP03 | N/A |
352 | | +-----------+-----------------+-----+
353 | | |
354 | | | +-------------+----------------------+----------------+
355 | | +-| LNXPOWER:00 | \_SB_.PCI0.RP03.PXP3 | acpi:LNXPOWER: |
356 | | +-------------+----------------------+----------------+
357 | |
358 | | +-------------+-----------------+----------------+
359 | +-| LNXVIDEO:00 | \_SB_.PCI0.GFX0 | acpi:LNXVIDEO: |
360 | +-------------+-----------------+----------------+
361 | |
362 | | +-----------+-----------------+-----+
363 | +-| device:01 | \_SB_.PCI0.DD01 | N/A |
364 | +-----------+-----------------+-----+
365 |
366 | +-------------+-------+----------------+
367 +-| LNXSYBUS:01 | \_TZ_ | acpi:LNXSYBUS: |
368 +-------------+-------+----------------+
369 |
370 | +-------------+------------+----------------+
371 +-| LNXPOWER:0a | \_TZ_.FN00 | acpi:LNXPOWER: |
372 | +-------------+------------+----------------+
373 |
374 | +------------+------------+---------------+
375 +-| PNP0C0B:00 | \_TZ_.FAN0 | acpi:PNP0C0B: |
376 | +------------+------------+---------------+
377 |
378 | +-------------+------------+----------------+
379 +-| LNXTHERM:00 | \_TZ_.TZ00 | acpi:LNXTHERM: |
380 +-------------+------------+----------------+
381
382 Figure 3. Example Linux ACPI Device Tree
383
384 NOTE: Each node is represented as "object/path/modalias", where:
385 1. 'object' is the name of the object's directory in sysfs.
386 2. 'path' is the ACPI namespace path of the corresponding
387 ACPI namespace object, as returned by the object's 'path'
388 sysfs attribute.
389 3. 'modalias' is the value of the object's 'modalias' sysfs
390 attribute (as described earlier in this document).
391 NOTE: N/A indicates the device object does not have the 'path' or the
392 'modalias' attribute.
393 NOTE: The PNP0C0D device listed above is highlighted (marked by "*")
394 to indicate it will be created only when its _STA methods return
395 PRESENT or FUNCTIONING.
diff --git a/Documentation/acpi/video_extension.txt b/Documentation/acpi/video_extension.txt
new file mode 100644
index 000000000000..78b32ac02466
--- /dev/null
+++ b/Documentation/acpi/video_extension.txt
@@ -0,0 +1,106 @@
1ACPI video extensions
2~~~~~~~~~~~~~~~~~~~~~
3
4This driver implement the ACPI Extensions For Display Adapters for
5integrated graphics devices on motherboard, as specified in ACPI 2.0
6Specification, Appendix B, allowing to perform some basic control like
7defining the video POST device, retrieving EDID information or to
8setup a video output, etc. Note that this is an ref. implementation
9only. It may or may not work for your integrated video device.
10
11The ACPI video driver does 3 things regarding backlight control:
12
131 Export a sysfs interface for user space to control backlight level
14
15If the ACPI table has a video device, and acpi_backlight=vendor kernel
16command line is not present, the driver will register a backlight device
17and set the required backlight operation structure for it for the sysfs
18interface control. For every registered class device, there will be a
19directory named acpi_videoX under /sys/class/backlight.
20
21The backlight sysfs interface has a standard definition here:
22Documentation/ABI/stable/sysfs-class-backlight.
23
24And what ACPI video driver does is:
25actual_brightness: on read, control method _BQC will be evaluated to
26get the brightness level the firmware thinks it is at;
27bl_power: not implemented, will set the current brightness instead;
28brightness: on write, control method _BCM will run to set the requested
29brightness level;
30max_brightness: Derived from the _BCL package(see below);
31type: firmware
32
33Note that ACPI video backlight driver will always use index for
34brightness, actual_brightness and max_brightness. So if we have
35the following _BCL package:
36
37Method (_BCL, 0, NotSerialized)
38{
39 Return (Package (0x0C)
40 {
41 0x64,
42 0x32,
43 0x0A,
44 0x14,
45 0x1E,
46 0x28,
47 0x32,
48 0x3C,
49 0x46,
50 0x50,
51 0x5A,
52 0x64
53 })
54}
55
56The first two levels are for when laptop are on AC or on battery and are
57not used by Linux currently. The remaining 10 levels are supported levels
58that we can choose from. The applicable index values are from 0 (that
59corresponds to the 0x0A brightness value) to 9 (that corresponds to the
600x64 brightness value) inclusive. Each of those index values is regarded
61as a "brightness level" indicator. Thus from the user space perspective
62the range of available brightness levels is from 0 to 9 (max_brightness)
63inclusive.
64
652 Notify user space about hotkey event
66
67There are generally two cases for hotkey event reporting:
68i) For some laptops, when user presses the hotkey, a scancode will be
69 generated and sent to user space through the input device created by
70 the keyboard driver as a key type input event, with proper remap, the
71 following key code will appear to user space:
72
73 EV_KEY, KEY_BRIGHTNESSUP
74 EV_KEY, KEY_BRIGHTNESSDOWN
75 etc.
76
77For this case, ACPI video driver does not need to do anything(actually,
78it doesn't even know this happened).
79
80ii) For some laptops, the press of the hotkey will not generate the
81 scancode, instead, firmware will notify the video device ACPI node
82 about the event. The event value is defined in the ACPI spec. ACPI
83 video driver will generate an key type input event according to the
84 notify value it received and send the event to user space through the
85 input device it created:
86
87 event keycode
88 0x86 KEY_BRIGHTNESSUP
89 0x87 KEY_BRIGHTNESSDOWN
90 etc.
91
92so this would lead to the same effect as case i) now.
93
94Once user space tool receives this event, it can modify the backlight
95level through the sysfs interface.
96
973 Change backlight level in the kernel
98
99This works for machines covered by case ii) in Section 2. Once the driver
100received a notification, it will set the backlight level accordingly. This does
101not affect the sending of event to user space, they are always sent to user
102space regardless of whether or not the video module controls the backlight level
103directly. This behaviour can be controlled through the brightness_switch_enabled
104module parameter as documented in kernel-parameters.txt. It is recommended to
105disable this behaviour once a GUI environment starts up and wants to have full
106control of the backlight level.
diff --git a/Documentation/arm/sti/overview.txt b/Documentation/arm/sti/overview.txt
new file mode 100644
index 000000000000..1a4e93d6027f
--- /dev/null
+++ b/Documentation/arm/sti/overview.txt
@@ -0,0 +1,33 @@
1 STi ARM Linux Overview
2 ==========================
3
4Introduction
5------------
6
7 The ST Microelectronics Multimedia and Application Processors range of
8 CortexA9 System-on-Chip are supported by the 'STi' platform of
9 ARM Linux. Currently STiH415, STiH416 SOCs are supported with both
10 B2000 and B2020 Reference boards.
11
12
13 configuration
14 -------------
15
16 A generic configuration is provided for both STiH415/416, and can be used as the
17 default by
18 make stih41x_defconfig
19
20 Layout
21 ------
22 All the files for multiple machine families (STiH415, STiH416, and STiG125)
23 are located in the platform code contained in arch/arm/mach-sti
24
25 There is a generic board board-dt.c in the mach folder which support
26 Flattened Device Tree, which means, It works with any compatible board with
27 Device Trees.
28
29
30 Document Author
31 ---------------
32
33 Srinivas Kandagatla <srinivas.kandagatla@st.com>, (c) 2013 ST Microelectronics
diff --git a/Documentation/arm/sti/stih415-overview.txt b/Documentation/arm/sti/stih415-overview.txt
new file mode 100644
index 000000000000..1383e33f265d
--- /dev/null
+++ b/Documentation/arm/sti/stih415-overview.txt
@@ -0,0 +1,12 @@
1 STiH415 Overview
2 ================
3
4Introduction
5------------
6
7 The STiH415 is the next generation of HD, AVC set-top box processors
8 for satellite, cable, terrestrial and IP-STB markets.
9
10 Features
11 - ARM Cortex-A9 1.0 GHz, dual-core CPU
12 - SATA2x2,USB 2.0x3, PCIe, Gbit Ethernet MACx2
diff --git a/Documentation/arm/sti/stih416-overview.txt b/Documentation/arm/sti/stih416-overview.txt
new file mode 100644
index 000000000000..558444c201c6
--- /dev/null
+++ b/Documentation/arm/sti/stih416-overview.txt
@@ -0,0 +1,12 @@
1 STiH416 Overview
2 ================
3
4Introduction
5------------
6
7 The STiH416 is the next generation of HD, AVC set-top box processors
8 for satellite, cable, terrestrial and IP-STB markets.
9
10 Features
11 - ARM Cortex-A9 1.2 GHz dual core CPU
12 - SATA2x2,USB 2.0x3, PCIe, Gbit Ethernet MACx2
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README
index 87a1e8fb6242..e3f93fb9224e 100644
--- a/Documentation/arm/sunxi/README
+++ b/Documentation/arm/sunxi/README
@@ -3,17 +3,26 @@ ARM Allwinner SoCs
3 3
4This document lists all the ARM Allwinner SoCs that are currently 4This document lists all the ARM Allwinner SoCs that are currently
5supported in mainline by the Linux kernel. This document will also 5supported in mainline by the Linux kernel. This document will also
6provide links to documentation and or datasheet for these SoCs. 6provide links to documentation and/or datasheet for these SoCs.
7 7
8SunXi family 8SunXi family
9------------ 9------------
10 Linux kernel mach directory: arch/arm/mach-sunxi
10 11
11 Flavors: 12 Flavors:
12 Allwinner A10 (sun4i) 13 * ARM Cortex-A8 based SoCs
13 Datasheet : http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf 14 - Allwinner A10 (sun4i)
15 + Datasheet
16 http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf
17 + User Manual
18 http://dl.linux-sunxi.org/A10/A10%20User%20Manual%20-%20v1.20%20%282012-04-09%2c%20DECRYPTED%29.pdf
14 19
15 Allwinner A13 (sun5i) 20 - Allwinner A10s (sun5i)
16 Datasheet : http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf 21 + Datasheet
22 http://dl.linux-sunxi.org/A10s/A10s%20Datasheet%20-%20v1.20%20%282012-03-27%29.pdf
17 23
18 Core: Cortex A8 24 - Allwinner A13 (sun5i)
19 Linux kernel mach directory: arch/arm/mach-sunxi \ No newline at end of file 25 + Datasheet
26 http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf
27 + User Manual
28 http://dl.linux-sunxi.org/A13/A13%20User%20Manual%20-%20v1.2%20%282013-08-08%29.pdf
diff --git a/Documentation/arm64/memory.txt b/Documentation/arm64/memory.txt
index 5f583af0a6e1..78a377124ef0 100644
--- a/Documentation/arm64/memory.txt
+++ b/Documentation/arm64/memory.txt
@@ -73,3 +73,10 @@ Translation table lookup with 64KB pages:
73 | | +--------------------------> [41:29] L2 index (only 38:29 used) 73 | | +--------------------------> [41:29] L2 index (only 38:29 used)
74 | +-------------------------------> [47:42] L1 index (not used) 74 | +-------------------------------> [47:42] L1 index (not used)
75 +-------------------------------------------------> [63] TTBR0/1 75 +-------------------------------------------------> [63] TTBR0/1
76
77When using KVM, the hypervisor maps kernel pages in EL2, at a fixed
78offset from the kernel VA (top 24bits of the kernel VA set to zero):
79
80Start End Size Use
81-----------------------------------------------------------------------
820000004000000000 0000007fffffffff 256GB kernel objects mapped in HYP
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt
index 12e01d432bfe..7740038d82bc 100644
--- a/Documentation/cgroups/cpusets.txt
+++ b/Documentation/cgroups/cpusets.txt
@@ -373,7 +373,7 @@ can become very uneven.
3731.7 What is sched_load_balance ? 3731.7 What is sched_load_balance ?
374-------------------------------- 374--------------------------------
375 375
376The kernel scheduler (kernel/sched.c) automatically load balances 376The kernel scheduler (kernel/sched/core.c) automatically load balances
377tasks. If one CPU is underutilized, kernel code running on that 377tasks. If one CPU is underutilized, kernel code running on that
378CPU will look for tasks on other more overloaded CPUs and move those 378CPU will look for tasks on other more overloaded CPUs and move those
379tasks to itself, within the constraints of such placement mechanisms 379tasks to itself, within the constraints of such placement mechanisms
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index ddf4f93967a9..327acec6f90b 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -834,10 +834,9 @@ Test:
834 834
83512. TODO 83512. TODO
836 836
8371. Add support for accounting huge pages (as a separate controller) 8371. Make per-cgroup scanner reclaim not-shared pages first
8382. Make per-cgroup scanner reclaim not-shared pages first 8382. Teach controller to account for shared-pages
8393. Teach controller to account for shared-pages 8393. Start reclamation in the background when the limit is
8404. Start reclamation in the background when the limit is
841 not yet hit but the usage is getting closer 840 not yet hit but the usage is getting closer
842 841
843Summary 842Summary
diff --git a/Documentation/console/console.txt b/Documentation/console/console.txt
index 926cf1b5e63e..f93810d599ad 100644
--- a/Documentation/console/console.txt
+++ b/Documentation/console/console.txt
@@ -12,20 +12,20 @@ The second type has to be explicitly loaded and unloaded. This will be called
12any time with each driver sharing the console with other drivers including 12any time with each driver sharing the console with other drivers including
13the system driver. However, modular drivers cannot take over the console 13the system driver. However, modular drivers cannot take over the console
14that is currently occupied by another modular driver. (Exception: Drivers that 14that is currently occupied by another modular driver. (Exception: Drivers that
15call take_over_console() will succeed in the takeover regardless of the type 15call do_take_over_console() will succeed in the takeover regardless of the type
16of driver occupying the consoles.) They can only take over the console that is 16of driver occupying the consoles.) They can only take over the console that is
17occupied by the system driver. In the same token, if the modular driver is 17occupied by the system driver. In the same token, if the modular driver is
18released by the console, the system driver will take over. 18released by the console, the system driver will take over.
19 19
20Modular drivers, from the programmer's point of view, has to call: 20Modular drivers, from the programmer's point of view, has to call:
21 21
22 take_over_console() - load and bind driver to console layer 22 do_take_over_console() - load and bind driver to console layer
23 give_up_console() - unbind and unload driver 23 give_up_console() - unload driver, it will only work if driver is fully unbond
24 24
25In newer kernels, the following are also available: 25In newer kernels, the following are also available:
26 26
27 register_con_driver() 27 do_register_con_driver()
28 unregister_con_driver() 28 do_unregister_con_driver()
29 29
30If sysfs is enabled, the contents of /sys/class/vtconsole can be 30If sysfs is enabled, the contents of /sys/class/vtconsole can be
31examined. This shows the console backends currently registered by the 31examined. This shows the console backends currently registered by the
@@ -94,12 +94,12 @@ for more details).
94Notes for developers: 94Notes for developers:
95===================== 95=====================
96 96
97take_over_console() is now broken up into: 97do_take_over_console() is now broken up into:
98 98
99 register_con_driver() 99 do_register_con_driver()
100 bind_con_driver() - private function 100 do_bind_con_driver() - private function
101 101
102give_up_console() is a wrapper to unregister_con_driver(), and a driver must 102give_up_console() is a wrapper to do_unregister_con_driver(), and a driver must
103be fully unbound for this call to succeed. con_is_bound() will check if the 103be fully unbound for this call to succeed. con_is_bound() will check if the
104driver is bound or not. 104driver is bound or not.
105 105
@@ -109,10 +109,10 @@ Guidelines for console driver writers:
109In order for binding to and unbinding from the console to properly work, 109In order for binding to and unbinding from the console to properly work,
110console drivers must follow these guidelines: 110console drivers must follow these guidelines:
111 111
1121. All drivers, except system drivers, must call either register_con_driver() 1121. All drivers, except system drivers, must call either do_register_con_driver()
113 or take_over_console(). register_con_driver() will just add the driver to 113 or do_take_over_console(). do_register_con_driver() will just add the driver to
114 the console's internal list. It won't take over the 114 the console's internal list. It won't take over the
115 console. take_over_console(), as it name implies, will also take over (or 115 console. do_take_over_console(), as it name implies, will also take over (or
116 bind to) the console. 116 bind to) the console.
117 117
1182. All resources allocated during con->con_init() must be released in 1182. All resources allocated during con->con_init() must be released in
@@ -128,10 +128,10 @@ console drivers must follow these guidelines:
128 rebind the driver to the console arrives. 128 rebind the driver to the console arrives.
129 129
1304. Upon exit of the driver, ensure that the driver is totally unbound. If the 1304. Upon exit of the driver, ensure that the driver is totally unbound. If the
131 condition is satisfied, then the driver must call unregister_con_driver() 131 condition is satisfied, then the driver must call do_unregister_con_driver()
132 or give_up_console(). 132 or give_up_console().
133 133
1345. unregister_con_driver() can also be called on conditions which make it 1345. do_unregister_con_driver() can also be called on conditions which make it
135 impossible for the driver to service console requests. This can happen 135 impossible for the driver to service console requests. This can happen
136 with the framebuffer console that suddenly lost all of its drivers. 136 with the framebuffer console that suddenly lost all of its drivers.
137 137
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
index a3585eac83b6..19fa98e07bf7 100644
--- a/Documentation/cpu-freq/cpu-drivers.txt
+++ b/Documentation/cpu-freq/cpu-drivers.txt
@@ -186,7 +186,7 @@ As most cpufreq processors only allow for being set to a few specific
186frequencies, a "frequency table" with some functions might assist in 186frequencies, a "frequency table" with some functions might assist in
187some work of the processor driver. Such a "frequency table" consists 187some work of the processor driver. Such a "frequency table" consists
188of an array of struct cpufreq_frequency_table entries, with any value in 188of an array of struct cpufreq_frequency_table entries, with any value in
189"index" you want to use, and the corresponding frequency in 189"driver_data" you want to use, and the corresponding frequency in
190"frequency". At the end of the table, you need to add a 190"frequency". At the end of the table, you need to add a
191cpufreq_frequency_table entry with frequency set to CPUFREQ_TABLE_END. And 191cpufreq_frequency_table entry with frequency set to CPUFREQ_TABLE_END. And
192if you want to skip one entry in the table, set the frequency to 192if you want to skip one entry in the table, set the frequency to
@@ -214,10 +214,4 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
214is the corresponding frequency table helper for the ->target 214is the corresponding frequency table helper for the ->target
215stage. Just pass the values to this function, and the unsigned int 215stage. Just pass the values to this function, and the unsigned int
216index returns the number of the frequency table entry which contains 216index returns the number of the frequency table entry which contains
217the frequency the CPU shall be set to. PLEASE NOTE: This is not the 217the frequency the CPU shall be set to.
218"index" which is in this cpufreq_table_entry.index, but instead
219cpufreq_table[index]. So, the new frequency is
220cpufreq_table[index].frequency, and the value you stored into the
221frequency table "index" field is
222cpufreq_table[index].index.
223
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 9f401350f502..edd4b4df3932 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -128,7 +128,7 @@ A: When doing make defconfig, Enable CPU hotplug support
128 128
129 "Processor type and Features" -> Support for Hotpluggable CPUs 129 "Processor type and Features" -> Support for Hotpluggable CPUs
130 130
131Make sure that you have CONFIG_HOTPLUG, and CONFIG_SMP turned on as well. 131Make sure that you have CONFIG_SMP turned on as well.
132 132
133You would need to enable CONFIG_HOTPLUG_CPU for SMP suspend/resume support 133You would need to enable CONFIG_HOTPLUG_CPU for SMP suspend/resume support
134as well. 134as well.
@@ -370,8 +370,10 @@ A: There is no clear spec defined way from ACPI that can give us that
370 CPUs in MADT as hotpluggable CPUS. In the case there are no disabled CPUS 370 CPUs in MADT as hotpluggable CPUS. In the case there are no disabled CPUS
371 we assume 1/2 the number of CPUs currently present can be hotplugged. 371 we assume 1/2 the number of CPUs currently present can be hotplugged.
372 372
373 Caveat: Today's ACPI MADT can only provide 256 entries since the apicid field 373 Caveat: ACPI MADT can only provide 256 entries in systems with only ACPI 2.0c
374 in MADT is only 8 bits. 374 or earlier ACPI version supported, because the apicid field in MADT is only
375 8 bits. From ACPI 3.0, this limitation was removed since the apicid field
376 was extended to 32 bits with x2APIC introduced.
375 377
376User Space Notification 378User Space Notification
377 379
diff --git a/Documentation/crypto/async-tx-api.txt b/Documentation/crypto/async-tx-api.txt
index ba046b8fa92f..7bf1be20d93a 100644
--- a/Documentation/crypto/async-tx-api.txt
+++ b/Documentation/crypto/async-tx-api.txt
@@ -222,5 +222,4 @@ drivers/dma/: location for offload engine drivers
222include/linux/async_tx.h: core header file for the async_tx api 222include/linux/async_tx.h: core header file for the async_tx api
223crypto/async_tx/async_tx.c: async_tx interface to dmaengine and common code 223crypto/async_tx/async_tx.c: async_tx interface to dmaengine and common code
224crypto/async_tx/async_memcpy.c: copy offload 224crypto/async_tx/async_memcpy.c: copy offload
225crypto/async_tx/async_memset.c: memory fill offload
226crypto/async_tx/async_xor.c: xor and xor zero sum offload 225crypto/async_tx/async_xor.c: xor and xor zero sum offload
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index b9015912bca6..23721d3be3e6 100644
--- a/Documentation/devices.txt
+++ b/Documentation/devices.txt
@@ -100,8 +100,7 @@ Your cooperation is appreciated.
100 10 = /dev/aio Asynchronous I/O notification interface 100 10 = /dev/aio Asynchronous I/O notification interface
101 11 = /dev/kmsg Writes to this come out as printk's, reads 101 11 = /dev/kmsg Writes to this come out as printk's, reads
102 export the buffered printk records. 102 export the buffered printk records.
103 12 = /dev/oldmem Used by crashdump kernels to access 103 12 = /dev/oldmem OBSOLETE - replaced by /proc/vmcore
104 the memory of the kernel that crashed.
105 104
106 1 block RAM disk 105 1 block RAM disk
107 0 = /dev/ram0 First RAM disk 106 0 = /dev/ram0 First RAM disk
diff --git a/Documentation/devicetree/bindings/arm/cci.txt b/Documentation/devicetree/bindings/arm/cci.txt
new file mode 100644
index 000000000000..92d36e2aa877
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/cci.txt
@@ -0,0 +1,172 @@
1=======================================================
2ARM CCI cache coherent interconnect binding description
3=======================================================
4
5ARM multi-cluster systems maintain intra-cluster coherency through a
6cache coherent interconnect (CCI) that is capable of monitoring bus
7transactions and manage coherency, TLB invalidations and memory barriers.
8
9It allows snooping and distributed virtual memory message broadcast across
10clusters, through memory mapped interface, with a global control register
11space and multiple sets of interface control registers, one per slave
12interface.
13
14Bindings for the CCI node follow the ePAPR standard, available from:
15
16www.power.org/documentation/epapr-version-1-1/
17
18with the addition of the bindings described in this document which are
19specific to ARM.
20
21* CCI interconnect node
22
23 Description: Describes a CCI cache coherent Interconnect component
24
25 Node name must be "cci".
26 Node's parent must be the root node /, and the address space visible
27 through the CCI interconnect is the same as the one seen from the
28 root node (ie from CPUs perspective as per DT standard).
29 Every CCI node has to define the following properties:
30
31 - compatible
32 Usage: required
33 Value type: <string>
34 Definition: must be set to
35 "arm,cci-400"
36
37 - reg
38 Usage: required
39 Value type: <prop-encoded-array>
40 Definition: A standard property. Specifies base physical
41 address of CCI control registers common to all
42 interfaces.
43
44 - ranges:
45 Usage: required
46 Value type: <prop-encoded-array>
47 Definition: A standard property. Follow rules in the ePAPR for
48 hierarchical bus addressing. CCI interfaces
49 addresses refer to the parent node addressing
50 scheme to declare their register bases.
51
52 CCI interconnect node can define the following child nodes:
53
54 - CCI control interface nodes
55
56 Node name must be "slave-if".
57 Parent node must be CCI interconnect node.
58
59 A CCI control interface node must contain the following
60 properties:
61
62 - compatible
63 Usage: required
64 Value type: <string>
65 Definition: must be set to
66 "arm,cci-400-ctrl-if"
67
68 - interface-type:
69 Usage: required
70 Value type: <string>
71 Definition: must be set to one of {"ace", "ace-lite"}
72 depending on the interface type the node
73 represents.
74
75 - reg:
76 Usage: required
77 Value type: <prop-encoded-array>
78 Definition: the base address and size of the
79 corresponding interface programming
80 registers.
81
82* CCI interconnect bus masters
83
84 Description: masters in the device tree connected to a CCI port
85 (inclusive of CPUs and their cpu nodes).
86
87 A CCI interconnect bus master node must contain the following
88 properties:
89
90 - cci-control-port:
91 Usage: required
92 Value type: <phandle>
93 Definition: a phandle containing the CCI control interface node
94 the master is connected to.
95
96Example:
97
98 cpus {
99 #size-cells = <0>;
100 #address-cells = <1>;
101
102 CPU0: cpu@0 {
103 device_type = "cpu";
104 compatible = "arm,cortex-a15";
105 cci-control-port = <&cci_control1>;
106 reg = <0x0>;
107 };
108
109 CPU1: cpu@1 {
110 device_type = "cpu";
111 compatible = "arm,cortex-a15";
112 cci-control-port = <&cci_control1>;
113 reg = <0x1>;
114 };
115
116 CPU2: cpu@100 {
117 device_type = "cpu";
118 compatible = "arm,cortex-a7";
119 cci-control-port = <&cci_control2>;
120 reg = <0x100>;
121 };
122
123 CPU3: cpu@101 {
124 device_type = "cpu";
125 compatible = "arm,cortex-a7";
126 cci-control-port = <&cci_control2>;
127 reg = <0x101>;
128 };
129
130 };
131
132 dma0: dma@3000000 {
133 compatible = "arm,pl330", "arm,primecell";
134 cci-control-port = <&cci_control0>;
135 reg = <0x0 0x3000000 0x0 0x1000>;
136 interrupts = <10>;
137 #dma-cells = <1>;
138 #dma-channels = <8>;
139 #dma-requests = <32>;
140 };
141
142 cci@2c090000 {
143 compatible = "arm,cci-400";
144 #address-cells = <1>;
145 #size-cells = <1>;
146 reg = <0x0 0x2c090000 0 0x1000>;
147 ranges = <0x0 0x0 0x2c090000 0x6000>;
148
149 cci_control0: slave-if@1000 {
150 compatible = "arm,cci-400-ctrl-if";
151 interface-type = "ace-lite";
152 reg = <0x1000 0x1000>;
153 };
154
155 cci_control1: slave-if@4000 {
156 compatible = "arm,cci-400-ctrl-if";
157 interface-type = "ace";
158 reg = <0x4000 0x1000>;
159 };
160
161 cci_control2: slave-if@5000 {
162 compatible = "arm,cci-400-ctrl-if";
163 interface-type = "ace";
164 reg = <0x5000 0x1000>;
165 };
166 };
167
168This CCI node corresponds to a CCI component whose control registers sits
169at address 0x000000002c090000.
170CCI slave interface @0x000000002c091000 is connected to dma controller dma0.
171CCI slave interface @0x000000002c094000 is connected to CPUs {CPU0, CPU1};
172CCI slave interface @0x000000002c095000 is connected to CPUs {CPU2, CPU3};
diff --git a/Documentation/devicetree/bindings/arm/keystone/keystone.txt b/Documentation/devicetree/bindings/arm/keystone/keystone.txt
new file mode 100644
index 000000000000..63c0e6ae5cf7
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/keystone/keystone.txt
@@ -0,0 +1,10 @@
1TI Keystone Platforms Device Tree Bindings
2-----------------------------------------------
3
4Boards with Keystone2 based devices (TCI66xxK2H) SOC shall have the
5following properties.
6
7Required properties:
8 - compatible: All TI specific devices present in Keystone SOC should be in
9 the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550
10 type UART should use the specified compatible for those devices.
diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt
index cbef09b5c8a7..69ddf9fad2dc 100644
--- a/Documentation/devicetree/bindings/arm/l2cc.txt
+++ b/Documentation/devicetree/bindings/arm/l2cc.txt
@@ -16,6 +16,9 @@ Required properties:
16 performs the same operation). 16 performs the same operation).
17 "marvell,"aurora-outer-cache: Marvell Controller designed to be 17 "marvell,"aurora-outer-cache: Marvell Controller designed to be
18 compatible with the ARM one with outer cache mode. 18 compatible with the ARM one with outer cache mode.
19 "bcm,bcm11351-a2-pl310-cache": For Broadcom bcm11351 chipset where an
20 offset needs to be added to the address before passing down to the L2
21 cache controller
19- cache-unified : Specifies the cache is a unified cache. 22- cache-unified : Specifies the cache is a unified cache.
20- cache-level : Should be set to 2 for a level 2 cache. 23- cache-level : Should be set to 2 for a level 2 cache.
21- reg : Physical base address and size of cache controller's memory mapped 24- reg : Physical base address and size of cache controller's memory mapped
diff --git a/Documentation/devicetree/bindings/arm/nspire.txt b/Documentation/devicetree/bindings/arm/nspire.txt
new file mode 100644
index 000000000000..4d08518bd176
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/nspire.txt
@@ -0,0 +1,14 @@
1TI-NSPIRE calculators
2
3Required properties:
4- compatible: Compatible property value should contain "ti,nspire".
5 CX models should have "ti,nspire-cx"
6 Touchpad models should have "ti,nspire-tp"
7 Clickpad models should have "ti,nspire-clp"
8
9Example:
10
11/ {
12 model = "TI-NSPIRE CX";
13 compatible = "ti,nspire-cx";
14 ...
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index f8288ea1b530..6d498c758b45 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -56,3 +56,6 @@ Boards:
56 56
57- OMAP5 EVM : Evaluation Module 57- OMAP5 EVM : Evaluation Module
58 compatible = "ti,omap5-evm", "ti,omap5" 58 compatible = "ti,omap5-evm", "ti,omap5"
59
60- AM43x EPOS EVM
61 compatible = "ti,am43x-epos-evm", "ti,am4372", "ti,am43"
diff --git a/Documentation/devicetree/bindings/arm/rtsm-dcscb.txt b/Documentation/devicetree/bindings/arm/rtsm-dcscb.txt
new file mode 100644
index 000000000000..3b8fbf3c00c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/rtsm-dcscb.txt
@@ -0,0 +1,19 @@
1ARM Dual Cluster System Configuration Block
2-------------------------------------------
3
4The Dual Cluster System Configuration Block (DCSCB) provides basic
5functionality for controlling clocks, resets and configuration pins in
6the Dual Cluster System implemented by the Real-Time System Model (RTSM).
7
8Required properties:
9
10- compatible : should be "arm,rtsm,dcscb"
11
12- reg : physical base address and the size of the registers window
13
14Example:
15
16 dcscb@60000000 {
17 compatible = "arm,rtsm,dcscb";
18 reg = <0x60000000 0x1000>;
19 };
diff --git a/Documentation/devicetree/bindings/arm/ste-nomadik.txt b/Documentation/devicetree/bindings/arm/ste-nomadik.txt
index 19bca04b81c9..6256ec31666d 100644
--- a/Documentation/devicetree/bindings/arm/ste-nomadik.txt
+++ b/Documentation/devicetree/bindings/arm/ste-nomadik.txt
@@ -3,6 +3,11 @@ ST-Ericsson Nomadik Device Tree Bindings
3For various board the "board" node may contain specific properties 3For various board the "board" node may contain specific properties
4that pertain to this particular board, such as board-specific GPIOs. 4that pertain to this particular board, such as board-specific GPIOs.
5 5
6Required root node property: src
7- Nomadik System and reset controller used for basic chip control, clock
8 and reset line control.
9- compatible: must be "stericsson,nomadik,src"
10
6Boards with the Nomadik SoC include: 11Boards with the Nomadik SoC include:
7 12
8S8815 "MiniKit" manufactured by Calao Systems: 13S8815 "MiniKit" manufactured by Calao Systems:
diff --git a/Documentation/devicetree/bindings/arm/ste-u300.txt b/Documentation/devicetree/bindings/arm/ste-u300.txt
new file mode 100644
index 000000000000..69b5ab0b5f4b
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/ste-u300.txt
@@ -0,0 +1,46 @@
1ST-Ericsson U300 Device Tree Bindings
2
3For various board the "board" node may contain specific properties
4that pertain to this particular board, such as board-specific GPIOs
5or board power regulator supplies.
6
7Required root node property:
8
9compatible="stericsson,u300";
10
11Required node: syscon
12This contains the system controller.
13- compatible: must be "stericsson,u300-syscon".
14- reg: the base address and size of the system controller.
15
16Boards with the U300 SoC include:
17
18S365 "Small Board U365":
19
20Required node: s365
21This contains the board-specific information.
22- compatible: must be "stericsson,s365".
23- vana15-supply: the regulator supplying the 1.5V to drive the
24 board.
25- syscon: a pointer to the syscon node so we can acccess the
26 syscon registers to set the board as self-powered.
27
28Example:
29
30/ {
31 model = "ST-Ericsson U300";
32 compatible = "stericsson,u300";
33 #address-cells = <1>;
34 #size-cells = <1>;
35
36 s365 {
37 compatible = "stericsson,s365";
38 vana15-supply = <&ab3100_ldo_d_reg>;
39 syscon = <&syscon>;
40 };
41
42 syscon: syscon@c0011000 {
43 compatible = "stericsson,u300-syscon";
44 reg = <0xc0011000 0x1000>;
45 };
46};
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt
index b519f9b699c3..3ec0c5c4f0e9 100644
--- a/Documentation/devicetree/bindings/ata/ahci-platform.txt
+++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt
@@ -12,6 +12,11 @@ Optional properties:
12- calxeda,port-phys: phandle-combophy and lane assignment, which maps each 12- calxeda,port-phys: phandle-combophy and lane assignment, which maps each
13 SATA port to a combophy and a lane within that 13 SATA port to a combophy and a lane within that
14 combophy 14 combophy
15- calxeda,sgpio-gpio: phandle-gpio bank, bit offset, and default on or off,
16 which indicates that the driver supports SGPIO
17 indicator lights using the indicated GPIOs
18- calxeda,led-order : a u32 array that map port numbers to offsets within the
19 SGPIO bitstream.
15- dma-coherent : Present if dma operations are coherent 20- dma-coherent : Present if dma operations are coherent
16 21
17Example: 22Example:
diff --git a/Documentation/devicetree/bindings/ata/atmel-at91_cf.txt b/Documentation/devicetree/bindings/ata/atmel-at91_cf.txt
new file mode 100644
index 000000000000..c1d22b3ae134
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/atmel-at91_cf.txt
@@ -0,0 +1,19 @@
1Atmel AT91RM9200 CompactFlash
2
3Required properties:
4- compatible : "atmel,at91rm9200-cf".
5- reg : should specify localbus address and size used.
6- gpios : specifies the gpio pins to control the CF device. Detect
7 and reset gpio's are mandatory while irq and vcc gpio's are
8 optional and may be set to 0 if not present.
9
10Example:
11compact-flash@50000000 {
12 compatible = "atmel,at91rm9200-cf";
13 reg = <0x50000000 0x30000000>;
14 gpios = <&pioC 13 0 /* irq */
15 &pioC 15 0 /* detect */
16 0 /* vcc */
17 &pioC 5 0 /* reset */
18 >;
19};
diff --git a/Documentation/devicetree/bindings/bus/imx-weim.txt b/Documentation/devicetree/bindings/bus/imx-weim.txt
new file mode 100644
index 000000000000..cedc2a9c4785
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/imx-weim.txt
@@ -0,0 +1,49 @@
1Device tree bindings for i.MX Wireless External Interface Module (WEIM)
2
3The term "wireless" does not imply that the WEIM is literally an interface
4without wires. It simply means that this module was originally designed for
5wireless and mobile applications that use low-power technology.
6
7The actual devices are instantiated from the child nodes of a WEIM node.
8
9Required properties:
10
11 - compatible: Should be set to "fsl,imx6q-weim"
12 - reg: A resource specifier for the register space
13 (see the example below)
14 - clocks: the clock, see the example below.
15 - #address-cells: Must be set to 2 to allow memory address translation
16 - #size-cells: Must be set to 1 to allow CS address passing
17 - ranges: Must be set up to reflect the memory layout with four
18 integer values for each chip-select line in use:
19
20 <cs-number> 0 <physical address of mapping> <size>
21
22Timing property for child nodes. It is mandatory, not optional.
23
24 - fsl,weim-cs-timing: The timing array, contains 6 timing values for the
25 child node. We can get the CS index from the child
26 node's "reg" property. This property contains the values
27 for the registers EIM_CSnGCR1, EIM_CSnGCR2, EIM_CSnRCR1,
28 EIM_CSnRCR2, EIM_CSnWCR1, EIM_CSnWCR2 in this order.
29
30Example for an imx6q-sabreauto board, the NOR flash connected to the WEIM:
31
32 weim: weim@021b8000 {
33 compatible = "fsl,imx6q-weim";
34 reg = <0x021b8000 0x4000>;
35 clocks = <&clks 196>;
36 #address-cells = <2>;
37 #size-cells = <1>;
38 ranges = <0 0 0x08000000 0x08000000>;
39
40 nor@0,0 {
41 compatible = "cfi-flash";
42 reg = <0 0 0x02000000>;
43 #address-cells = <1>;
44 #size-cells = <1>;
45 bank-width = <2>;
46 fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000
47 0x0000c000 0x1404a38e 0x00000000>;
48 };
49 };
diff --git a/Documentation/devicetree/bindings/bus/ti-gpmc.txt b/Documentation/devicetree/bindings/bus/ti-gpmc.txt
index 4b87ea1194e3..704be9306c9f 100644
--- a/Documentation/devicetree/bindings/bus/ti-gpmc.txt
+++ b/Documentation/devicetree/bindings/bus/ti-gpmc.txt
@@ -95,7 +95,6 @@ GPMC chip-select settings properties for child nodes. All are optional.
95- gpmc,burst-wrap Enables wrap bursting 95- gpmc,burst-wrap Enables wrap bursting
96- gpmc,burst-read Enables read page/burst mode 96- gpmc,burst-read Enables read page/burst mode
97- gpmc,burst-write Enables write page/burst mode 97- gpmc,burst-write Enables write page/burst mode
98- gpmc,device-nand Device is NAND
99- gpmc,device-width Total width of device(s) connected to a GPMC 98- gpmc,device-width Total width of device(s) connected to a GPMC
100 chip-select in bytes. The GPMC supports 8-bit 99 chip-select in bytes. The GPMC supports 8-bit
101 and 16-bit devices and so this property must be 100 and 16-bit devices and so this property must be
diff --git a/Documentation/devicetree/bindings/clock/altr_socfpga.txt b/Documentation/devicetree/bindings/clock/altr_socfpga.txt
index bd0c8416a5c8..0045433eae1f 100644
--- a/Documentation/devicetree/bindings/clock/altr_socfpga.txt
+++ b/Documentation/devicetree/bindings/clock/altr_socfpga.txt
@@ -9,6 +9,9 @@ Required properties:
9 "altr,socfpga-pll-clock" - for a PLL clock 9 "altr,socfpga-pll-clock" - for a PLL clock
10 "altr,socfpga-perip-clock" - The peripheral clock divided from the 10 "altr,socfpga-perip-clock" - The peripheral clock divided from the
11 PLL clock. 11 PLL clock.
12 "altr,socfpga-gate-clk" - Clocks that directly feed peripherals and
13 can get gated.
14
12- reg : shall be the control register offset from CLOCK_MANAGER's base for the clock. 15- reg : shall be the control register offset from CLOCK_MANAGER's base for the clock.
13- clocks : shall be the input parent clock phandle for the clock. This is 16- clocks : shall be the input parent clock phandle for the clock. This is
14 either an oscillator or a pll output. 17 either an oscillator or a pll output.
@@ -16,3 +19,7 @@ Required properties:
16 19
17Optional properties: 20Optional properties:
18- fixed-divider : If clocks have a fixed divider value, use this property. 21- fixed-divider : If clocks have a fixed divider value, use this property.
22- clk-gate : For "socfpga-gate-clk", clk-gate contains the gating register
23 and the bit index.
24- div-reg : For "socfpga-gate-clk", div-reg contains the divider register, bit shift,
25 and width.
diff --git a/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt b/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt
new file mode 100644
index 000000000000..a1201802f90d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt
@@ -0,0 +1,64 @@
1* Samsung Audio Subsystem Clock Controller
2
3The Samsung Audio Subsystem clock controller generates and supplies clocks
4to Audio Subsystem block available in the S5PV210 and Exynos SoCs. The clock
5binding described here is applicable to all SoC's in Exynos family.
6
7Required Properties:
8
9- compatible: should be one of the following:
10 - "samsung,exynos4210-audss-clock" - controller compatible with all Exynos4 SoCs.
11 - "samsung,exynos5250-audss-clock" - controller compatible with all Exynos5 SoCs.
12
13- reg: physical base address and length of the controller's register set.
14
15- #clock-cells: should be 1.
16
17The following is the list of clocks generated by the controller. Each clock is
18assigned an identifier and client nodes use this identifier to specify the
19clock which they consume. Some of the clocks are available only on a particular
20Exynos4 SoC and this is specified where applicable.
21
22Provided clocks:
23
24Clock ID SoC (if specific)
25-----------------------------------------------
26
27mout_audss 0
28mout_i2s 1
29dout_srp 2
30dout_aud_bus 3
31dout_i2s 4
32srp_clk 5
33i2s_bus 6
34sclk_i2s 7
35pcm_bus 8
36sclk_pcm 9
37
38Example 1: An example of a clock controller node is listed below.
39
40clock_audss: audss-clock-controller@3810000 {
41 compatible = "samsung,exynos5250-audss-clock";
42 reg = <0x03810000 0x0C>;
43 #clock-cells = <1>;
44};
45
46Example 2: I2S controller node that consumes the clock generated by the clock
47 controller. Refer to the standard clock bindings for information
48 about 'clocks' and 'clock-names' property.
49
50i2s0: i2s@03830000 {
51 compatible = "samsung,i2s-v5";
52 reg = <0x03830000 0x100>;
53 dmas = <&pdma0 10
54 &pdma0 9
55 &pdma0 8>;
56 dma-names = "tx", "rx", "tx-sec";
57 clocks = <&clock_audss EXYNOS_I2S_BUS>,
58 <&clock_audss EXYNOS_I2S_BUS>,
59 <&clock_audss EXYNOS_SCLK_I2S>,
60 <&clock_audss EXYNOS_MOUT_AUDSS>,
61 <&clock_audss EXYNOS_MOUT_I2S>;
62 clock-names = "iis", "i2s_opclk0", "i2s_opclk1",
63 "mout_audss", "mout_i2s";
64};
diff --git a/Documentation/devicetree/bindings/clock/exynos4-clock.txt b/Documentation/devicetree/bindings/clock/exynos4-clock.txt
index ea5e26f16aec..14d5c2af26f4 100644
--- a/Documentation/devicetree/bindings/clock/exynos4-clock.txt
+++ b/Documentation/devicetree/bindings/clock/exynos4-clock.txt
@@ -102,6 +102,7 @@ Exynos4 SoC and this is specified where applicable.
102 sclk_spi0_isp 174 Exynos4x12 102 sclk_spi0_isp 174 Exynos4x12
103 sclk_spi1_isp 175 Exynos4x12 103 sclk_spi1_isp 175 Exynos4x12
104 sclk_uart_isp 176 Exynos4x12 104 sclk_uart_isp 176 Exynos4x12
105 sclk_fimg2d 177
105 106
106 [Peripheral Clock Gates] 107 [Peripheral Clock Gates]
107 108
@@ -129,7 +130,7 @@ Exynos4 SoC and this is specified where applicable.
129 smmu_mfcl 274 130 smmu_mfcl 274
130 smmu_mfcr 275 131 smmu_mfcr 275
131 g3d 276 132 g3d 276
132 g2d 277 Exynos4210 133 g2d 277
133 rotator 278 Exynos4210 134 rotator 278 Exynos4210
134 mdma 279 Exynos4210 135 mdma 279 Exynos4210
135 smmu_g2d 280 Exynos4210 136 smmu_g2d 280 Exynos4210
diff --git a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt
new file mode 100644
index 000000000000..9bcc4b1bff51
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt
@@ -0,0 +1,201 @@
1* Samsung Exynos5420 Clock Controller
2
3The Exynos5420 clock controller generates and supplies clock to various
4controllers within the Exynos5420 SoC.
5
6Required Properties:
7
8- comptible: should be one of the following.
9 - "samsung,exynos5420-clock" - controller compatible with Exynos5420 SoC.
10
11- reg: physical base address of the controller and length of memory mapped
12 region.
13
14- #clock-cells: should be 1.
15
16The following is the list of clocks generated by the controller. Each clock is
17assigned an identifier and client nodes use this identifier to specify the
18clock which they consume.
19
20
21 [Core Clocks]
22
23 Clock ID
24 ----------------------------
25
26 fin_pll 1
27
28 [Clock Gate for Special Clocks]
29
30 Clock ID
31 ----------------------------
32 sclk_uart0 128
33 sclk_uart1 129
34 sclk_uart2 130
35 sclk_uart3 131
36 sclk_mmc0 132
37 sclk_mmc1 133
38 sclk_mmc2 134
39 sclk_spi0 135
40 sclk_spi1 136
41 sclk_spi2 137
42 sclk_i2s1 138
43 sclk_i2s2 139
44 sclk_pcm1 140
45 sclk_pcm2 141
46 sclk_spdif 142
47 sclk_hdmi 143
48 sclk_pixel 144
49 sclk_dp1 145
50 sclk_mipi1 146
51 sclk_fimd1 147
52 sclk_maudio0 148
53 sclk_maupcm0 149
54 sclk_usbd300 150
55 sclk_usbd301 151
56 sclk_usbphy300 152
57 sclk_usbphy301 153
58 sclk_unipro 154
59 sclk_pwm 155
60 sclk_gscl_wa 156
61 sclk_gscl_wb 157
62
63 [Peripheral Clock Gates]
64
65 Clock ID
66 ----------------------------
67
68 aclk66_peric 256
69 uart0 257
70 uart1 258
71 uart2 259
72 uart3 260
73 i2c0 261
74 i2c1 262
75 i2c2 263
76 i2c3 264
77 i2c4 265
78 i2c5 266
79 i2c6 267
80 i2c7 268
81 i2c_hdmi 269
82 tsadc 270
83 spi0 271
84 spi1 272
85 spi2 273
86 keyif 274
87 i2s1 275
88 i2s2 276
89 pcm1 277
90 pcm2 278
91 pwm 279
92 spdif 280
93 i2c8 281
94 i2c9 282
95 i2c10 283
96 aclk66_psgen 300
97 chipid 301
98 sysreg 302
99 tzpc0 303
100 tzpc1 304
101 tzpc2 305
102 tzpc3 306
103 tzpc4 307
104 tzpc5 308
105 tzpc6 309
106 tzpc7 310
107 tzpc8 311
108 tzpc9 312
109 hdmi_cec 313
110 seckey 314
111 mct 315
112 wdt 316
113 rtc 317
114 tmu 318
115 tmu_gpu 319
116 pclk66_gpio 330
117 aclk200_fsys2 350
118 mmc0 351
119 mmc1 352
120 mmc2 353
121 sromc 354
122 ufs 355
123 aclk200_fsys 360
124 tsi 361
125 pdma0 362
126 pdma1 363
127 rtic 364
128 usbh20 365
129 usbd300 366
130 usbd301 377
131 aclk400_mscl 380
132 mscl0 381
133 mscl1 382
134 mscl2 383
135 smmu_mscl0 384
136 smmu_mscl1 385
137 smmu_mscl2 386
138 aclk333 400
139 mfc 401
140 smmu_mfcl 402
141 smmu_mfcr 403
142 aclk200_disp1 410
143 dsim1 411
144 dp1 412
145 hdmi 413
146 aclk300_disp1 420
147 fimd1 421
148 smmu_fimd1 422
149 aclk166 430
150 mixer 431
151 aclk266 440
152 rotator 441
153 mdma1 442
154 smmu_rotator 443
155 smmu_mdma1 444
156 aclk300_jpeg 450
157 jpeg 451
158 jpeg2 452
159 smmu_jpeg 453
160 aclk300_gscl 460
161 smmu_gscl0 461
162 smmu_gscl1 462
163 gscl_wa 463
164 gscl_wb 464
165 gscl0 465
166 gscl1 466
167 clk_3aa 467
168 aclk266_g2d 470
169 sss 471
170 slim_sss 472
171 mdma0 473
172 aclk333_g2d 480
173 g2d 481
174 aclk333_432_gscl 490
175 smmu_3aa 491
176 smmu_fimcl0 492
177 smmu_fimcl1 493
178 smmu_fimcl3 494
179 fimc_lite3 495
180 aclk_g3d 500
181 g3d 501
182
183Example 1: An example of a clock controller node is listed below.
184
185 clock: clock-controller@0x10010000 {
186 compatible = "samsung,exynos5420-clock";
187 reg = <0x10010000 0x30000>;
188 #clock-cells = <1>;
189 };
190
191Example 2: UART controller node that consumes the clock generated by the clock
192 controller. Refer to the standard clock bindings for information
193 about 'clocks' and 'clock-names' property.
194
195 serial@13820000 {
196 compatible = "samsung,exynos4210-uart";
197 reg = <0x13820000 0x100>;
198 interrupts = <0 54 0>;
199 clocks = <&clock 259>, <&clock 130>;
200 clock-names = "uart", "clk_uart_baud0";
201 };
diff --git a/Documentation/devicetree/bindings/clock/imx5-clock.txt b/Documentation/devicetree/bindings/clock/imx5-clock.txt
index d71b4b2c077d..f46f5625d8ad 100644
--- a/Documentation/devicetree/bindings/clock/imx5-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx5-clock.txt
@@ -184,6 +184,19 @@ clocks and IDs.
184 cko2 170 184 cko2 170
185 srtc_gate 171 185 srtc_gate 171
186 pata_gate 172 186 pata_gate 172
187 sata_gate 173
188 spdif_xtal_sel 174
189 spdif0_sel 175
190 spdif1_sel 176
191 spdif0_pred 177
192 spdif0_podf 178
193 spdif1_pred 179
194 spdif1_podf 180
195 spdif0_com_sel 181
196 spdif1_com_sel 182
197 spdif0_gate 183
198 spdif1_gate 184
199 spdif_ipg_gate 185
187 200
188Examples (for mx53): 201Examples (for mx53):
189 202
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
index 6deb6fd1c7cd..a0e104f0527e 100644
--- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
@@ -208,6 +208,7 @@ clocks and IDs.
208 pll4_post_div 193 208 pll4_post_div 193
209 pll5_post_div 194 209 pll5_post_div 194
210 pll5_video_div 195 210 pll5_video_div 195
211 eim_slow 196
211 212
212Examples: 213Examples:
213 214
diff --git a/Documentation/devicetree/bindings/clock/imx6sl-clock.txt b/Documentation/devicetree/bindings/clock/imx6sl-clock.txt
new file mode 100644
index 000000000000..15e40bdf147d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/imx6sl-clock.txt
@@ -0,0 +1,10 @@
1* Clock bindings for Freescale i.MX6 SoloLite
2
3Required properties:
4- compatible: Should be "fsl,imx6sl-ccm"
5- reg: Address and length of the register set
6- #clock-cells: Should be <1>
7
8The clock consumer should specify the desired clock by having the clock
9ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6sl-clock.h
10for the full list of i.MX6 SoloLite clock IDs.
diff --git a/Documentation/devicetree/bindings/clock/nspire-clock.txt b/Documentation/devicetree/bindings/clock/nspire-clock.txt
new file mode 100644
index 000000000000..7c3bc8bb5b9f
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/nspire-clock.txt
@@ -0,0 +1,24 @@
1TI-NSPIRE Clocks
2
3Required properties:
4- compatible: Valid compatible properties include:
5 "lsi,nspire-cx-ahb-divider" for the AHB divider in the CX model
6 "lsi,nspire-classic-ahb-divider" for the AHB divider in the older model
7 "lsi,nspire-cx-clock" for the base clock in the CX model
8 "lsi,nspire-classic-clock" for the base clock in the older model
9
10- reg: Physical base address of the controller and length of memory mapped
11 region.
12
13Optional:
14- clocks: For the "nspire-*-ahb-divider" compatible clocks, this is the parent
15 clock where it divides the rate from.
16
17Example:
18
19ahb_clk {
20 #clock-cells = <0>;
21 compatible = "lsi,nspire-cx-clock";
22 reg = <0x900B0000 0x4>;
23 clocks = <&base_clk>;
24};
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt
index d6cb083b90a2..0c80c2677104 100644
--- a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt
@@ -12,253 +12,9 @@ Required properties :
12- clocks : Should contain phandle and clock specifiers for two clocks: 12- clocks : Should contain phandle and clock specifiers for two clocks:
13 the 32 KHz "32k_in", and the board-specific oscillator "osc". 13 the 32 KHz "32k_in", and the board-specific oscillator "osc".
14- #clock-cells : Should be 1. 14- #clock-cells : Should be 1.
15 In clock consumers, this cell represents the clock ID exposed by the CAR. 15 In clock consumers, this cell represents the clock ID exposed by the
16 16 CAR. The assignments may be found in header file
17 The first 160 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB 17 <dt-bindings/clock/tegra114-car.h>.
18 registers. These IDs often match those in the CAR's RST_DEVICES registers,
19 but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
20 this case, those clocks are assigned IDs above 160 in order to highlight
21 this issue. Implementations that interpret these clock IDs as bit values
22 within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
23 explicitly handle these special cases.
24
25 The balance of the clocks controlled by the CAR are assigned IDs of 160 and
26 above.
27
28 0 unassigned
29 1 unassigned
30 2 unassigned
31 3 unassigned
32 4 rtc
33 5 timer
34 6 uarta
35 7 unassigned (register bit affects uartb and vfir)
36 8 unassigned
37 9 sdmmc2
38 10 unassigned (register bit affects spdif_in and spdif_out)
39 11 i2s1
40 12 i2c1
41 13 ndflash
42 14 sdmmc1
43 15 sdmmc4
44 16 unassigned
45 17 pwm
46 18 i2s2
47 19 epp
48 20 unassigned (register bit affects vi and vi_sensor)
49 21 2d
50 22 usbd
51 23 isp
52 24 3d
53 25 unassigned
54 26 disp2
55 27 disp1
56 28 host1x
57 29 vcp
58 30 i2s0
59 31 unassigned
60
61 32 unassigned
62 33 unassigned
63 34 apbdma
64 35 unassigned
65 36 kbc
66 37 unassigned
67 38 unassigned
68 39 unassigned (register bit affects fuse and fuse_burn)
69 40 kfuse
70 41 sbc1
71 42 nor
72 43 unassigned
73 44 sbc2
74 45 unassigned
75 46 sbc3
76 47 i2c5
77 48 dsia
78 49 unassigned
79 50 mipi
80 51 hdmi
81 52 csi
82 53 unassigned
83 54 i2c2
84 55 uartc
85 56 mipi-cal
86 57 emc
87 58 usb2
88 59 usb3
89 60 msenc
90 61 vde
91 62 bsea
92 63 bsev
93
94 64 unassigned
95 65 uartd
96 66 unassigned
97 67 i2c3
98 68 sbc4
99 69 sdmmc3
100 70 unassigned
101 71 owr
102 72 afi
103 73 csite
104 74 unassigned
105 75 unassigned
106 76 la
107 77 trace
108 78 soc_therm
109 79 dtv
110 80 ndspeed
111 81 i2cslow
112 82 dsib
113 83 tsec
114 84 unassigned
115 85 unassigned
116 86 unassigned
117 87 unassigned
118 88 unassigned
119 89 xusb_host
120 90 unassigned
121 91 msenc
122 92 csus
123 93 unassigned
124 94 unassigned
125 95 unassigned (bit affects xusb_dev and xusb_dev_src)
126
127 96 unassigned
128 97 unassigned
129 98 unassigned
130 99 mselect
131 100 tsensor
132 101 i2s3
133 102 i2s4
134 103 i2c4
135 104 sbc5
136 105 sbc6
137 106 d_audio
138 107 apbif
139 108 dam0
140 109 dam1
141 110 dam2
142 111 hda2codec_2x
143 112 unassigned
144 113 audio0_2x
145 114 audio1_2x
146 115 audio2_2x
147 116 audio3_2x
148 117 audio4_2x
149 118 spdif_2x
150 119 actmon
151 120 extern1
152 121 extern2
153 122 extern3
154 123 unassigned
155 124 unassigned
156 125 hda
157 126 unassigned
158 127 se
159
160 128 hda2hdmi
161 129 unassigned
162 130 unassigned
163 131 unassigned
164 132 unassigned
165 133 unassigned
166 134 unassigned
167 135 unassigned
168 136 unassigned
169 137 unassigned
170 138 unassigned
171 139 unassigned
172 140 unassigned
173 141 unassigned
174 142 unassigned
175 143 unassigned (bit affects xusb_falcon_src, xusb_fs_src,
176 xusb_host_src and xusb_ss_src)
177 144 cilab
178 145 cilcd
179 146 cile
180 147 dsialp
181 148 dsiblp
182 149 unassigned
183 150 dds
184 151 unassigned
185 152 dp2
186 153 amx
187 154 adx
188 155 unassigned (bit affects dfll_ref and dfll_soc)
189 156 xusb_ss
190
191 192 uartb
192 193 vfir
193 194 spdif_in
194 195 spdif_out
195 196 vi
196 197 vi_sensor
197 198 fuse
198 199 fuse_burn
199 200 clk_32k
200 201 clk_m
201 202 clk_m_div2
202 203 clk_m_div4
203 204 pll_ref
204 205 pll_c
205 206 pll_c_out1
206 207 pll_c2
207 208 pll_c3
208 209 pll_m
209 210 pll_m_out1
210 211 pll_p
211 212 pll_p_out1
212 213 pll_p_out2
213 214 pll_p_out3
214 215 pll_p_out4
215 216 pll_a
216 217 pll_a_out0
217 218 pll_d
218 219 pll_d_out0
219 220 pll_d2
220 221 pll_d2_out0
221 222 pll_u
222 223 pll_u_480M
223 224 pll_u_60M
224 225 pll_u_48M
225 226 pll_u_12M
226 227 pll_x
227 228 pll_x_out0
228 229 pll_re_vco
229 230 pll_re_out
230 231 pll_e_out0
231 232 spdif_in_sync
232 233 i2s0_sync
233 234 i2s1_sync
234 235 i2s2_sync
235 236 i2s3_sync
236 237 i2s4_sync
237 238 vimclk_sync
238 239 audio0
239 240 audio1
240 241 audio2
241 242 audio3
242 243 audio4
243 244 spdif
244 245 clk_out_1
245 246 clk_out_2
246 247 clk_out_3
247 248 blink
248 252 xusb_host_src
249 253 xusb_falcon_src
250 254 xusb_fs_src
251 255 xusb_ss_src
252 256 xusb_dev_src
253 257 xusb_dev
254 258 xusb_hs_src
255 259 sclk
256 260 hclk
257 261 pclk
258 262 cclk_g
259 263 cclk_lp
260 264 dfll_ref
261 265 dfll_soc
262 18
263Example SoC include file: 19Example SoC include file:
264 20
@@ -270,7 +26,7 @@ Example SoC include file:
270 }; 26 };
271 27
272 usb@c5004000 { 28 usb@c5004000 {
273 clocks = <&tegra_car 58>; /* usb2 */ 29 clocks = <&tegra_car TEGRA114_CLK_USB2>;
274 }; 30 };
275}; 31};
276 32
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
index e885680f6b45..fcfed5bf73fb 100644
--- a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
@@ -12,155 +12,9 @@ Required properties :
12- clocks : Should contain phandle and clock specifiers for two clocks: 12- clocks : Should contain phandle and clock specifiers for two clocks:
13 the 32 KHz "32k_in", and the board-specific oscillator "osc". 13 the 32 KHz "32k_in", and the board-specific oscillator "osc".
14- #clock-cells : Should be 1. 14- #clock-cells : Should be 1.
15 In clock consumers, this cell represents the clock ID exposed by the CAR. 15 In clock consumers, this cell represents the clock ID exposed by the
16 16 CAR. The assignments may be found in header file
17 The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB 17 <dt-bindings/clock/tegra20-car.h>.
18 registers. These IDs often match those in the CAR's RST_DEVICES registers,
19 but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
20 this case, those clocks are assigned IDs above 95 in order to highlight
21 this issue. Implementations that interpret these clock IDs as bit values
22 within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
23 explicitly handle these special cases.
24
25 The balance of the clocks controlled by the CAR are assigned IDs of 96 and
26 above.
27
28 0 cpu
29 1 unassigned
30 2 unassigned
31 3 ac97
32 4 rtc
33 5 tmr
34 6 uart1
35 7 unassigned (register bit affects uart2 and vfir)
36 8 gpio
37 9 sdmmc2
38 10 unassigned (register bit affects spdif_in and spdif_out)
39 11 i2s1
40 12 i2c1
41 13 ndflash
42 14 sdmmc1
43 15 sdmmc4
44 16 twc
45 17 pwm
46 18 i2s2
47 19 epp
48 20 unassigned (register bit affects vi and vi_sensor)
49 21 2d
50 22 usbd
51 23 isp
52 24 3d
53 25 ide
54 26 disp2
55 27 disp1
56 28 host1x
57 29 vcp
58 30 unassigned
59 31 cache2
60
61 32 mem
62 33 ahbdma
63 34 apbdma
64 35 unassigned
65 36 kbc
66 37 stat_mon
67 38 pmc
68 39 fuse
69 40 kfuse
70 41 sbc1
71 42 snor
72 43 spi1
73 44 sbc2
74 45 xio
75 46 sbc3
76 47 dvc
77 48 dsi
78 49 unassigned (register bit affects tvo and cve)
79 50 mipi
80 51 hdmi
81 52 csi
82 53 tvdac
83 54 i2c2
84 55 uart3
85 56 unassigned
86 57 emc
87 58 usb2
88 59 usb3
89 60 mpe
90 61 vde
91 62 bsea
92 63 bsev
93
94 64 speedo
95 65 uart4
96 66 uart5
97 67 i2c3
98 68 sbc4
99 69 sdmmc3
100 70 pcie
101 71 owr
102 72 afi
103 73 csite
104 74 unassigned
105 75 avpucq
106 76 la
107 77 unassigned
108 78 unassigned
109 79 unassigned
110 80 unassigned
111 81 unassigned
112 82 unassigned
113 83 unassigned
114 84 irama
115 85 iramb
116 86 iramc
117 87 iramd
118 88 cram2
119 89 audio_2x a/k/a audio_2x_sync_clk
120 90 clk_d
121 91 unassigned
122 92 sus
123 93 cdev2
124 94 cdev1
125 95 unassigned
126
127 96 uart2
128 97 vfir
129 98 spdif_in
130 99 spdif_out
131 100 vi
132 101 vi_sensor
133 102 tvo
134 103 cve
135 104 osc
136 105 clk_32k a/k/a clk_s
137 106 clk_m
138 107 sclk
139 108 cclk
140 109 hclk
141 110 pclk
142 111 blink
143 112 pll_a
144 113 pll_a_out0
145 114 pll_c
146 115 pll_c_out1
147 116 pll_d
148 117 pll_d_out0
149 118 pll_e
150 119 pll_m
151 120 pll_m_out1
152 121 pll_p
153 122 pll_p_out1
154 123 pll_p_out2
155 124 pll_p_out3
156 125 pll_p_out4
157 126 pll_s
158 127 pll_u
159 128 pll_x
160 129 cop a/k/a avp
161 130 audio a/k/a audio_sync_clk
162 131 pll_ref
163 132 twd
164 18
165Example SoC include file: 19Example SoC include file:
166 20
@@ -172,7 +26,7 @@ Example SoC include file:
172 }; 26 };
173 27
174 usb@c5004000 { 28 usb@c5004000 {
175 clocks = <&tegra_car 58>; /* usb2 */ 29 clocks = <&tegra_car TEGRA20_CLK_USB2>;
176 }; 30 };
177}; 31};
178 32
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
index f3da3be5fcad..0f714081e986 100644
--- a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
@@ -12,212 +12,9 @@ Required properties :
12- clocks : Should contain phandle and clock specifiers for two clocks: 12- clocks : Should contain phandle and clock specifiers for two clocks:
13 the 32 KHz "32k_in", and the board-specific oscillator "osc". 13 the 32 KHz "32k_in", and the board-specific oscillator "osc".
14- #clock-cells : Should be 1. 14- #clock-cells : Should be 1.
15 In clock consumers, this cell represents the clock ID exposed by the CAR. 15 In clock consumers, this cell represents the clock ID exposed by the
16 16 CAR. The assignments may be found in header file
17 The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB 17 <dt-bindings/clock/tegra30-car.h>.
18 registers. These IDs often match those in the CAR's RST_DEVICES registers,
19 but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
20 this case, those clocks are assigned IDs above 160 in order to highlight
21 this issue. Implementations that interpret these clock IDs as bit values
22 within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
23 explicitly handle these special cases.
24
25 The balance of the clocks controlled by the CAR are assigned IDs of 160 and
26 above.
27
28 0 cpu
29 1 unassigned
30 2 unassigned
31 3 unassigned
32 4 rtc
33 5 timer
34 6 uarta
35 7 unassigned (register bit affects uartb and vfir)
36 8 gpio
37 9 sdmmc2
38 10 unassigned (register bit affects spdif_in and spdif_out)
39 11 i2s1
40 12 i2c1
41 13 ndflash
42 14 sdmmc1
43 15 sdmmc4
44 16 unassigned
45 17 pwm
46 18 i2s2
47 19 epp
48 20 unassigned (register bit affects vi and vi_sensor)
49 21 2d
50 22 usbd
51 23 isp
52 24 3d
53 25 unassigned
54 26 disp2
55 27 disp1
56 28 host1x
57 29 vcp
58 30 i2s0
59 31 cop_cache
60
61 32 mc
62 33 ahbdma
63 34 apbdma
64 35 unassigned
65 36 kbc
66 37 statmon
67 38 pmc
68 39 unassigned (register bit affects fuse and fuse_burn)
69 40 kfuse
70 41 sbc1
71 42 nor
72 43 unassigned
73 44 sbc2
74 45 unassigned
75 46 sbc3
76 47 i2c5
77 48 dsia
78 49 unassigned (register bit affects cve and tvo)
79 50 mipi
80 51 hdmi
81 52 csi
82 53 tvdac
83 54 i2c2
84 55 uartc
85 56 unassigned
86 57 emc
87 58 usb2
88 59 usb3
89 60 mpe
90 61 vde
91 62 bsea
92 63 bsev
93
94 64 speedo
95 65 uartd
96 66 uarte
97 67 i2c3
98 68 sbc4
99 69 sdmmc3
100 70 pcie
101 71 owr
102 72 afi
103 73 csite
104 74 pciex
105 75 avpucq
106 76 la
107 77 unassigned
108 78 unassigned
109 79 dtv
110 80 ndspeed
111 81 i2cslow
112 82 dsib
113 83 unassigned
114 84 irama
115 85 iramb
116 86 iramc
117 87 iramd
118 88 cram2
119 89 unassigned
120 90 audio_2x a/k/a audio_2x_sync_clk
121 91 unassigned
122 92 csus
123 93 cdev2
124 94 cdev1
125 95 unassigned
126
127 96 cpu_g
128 97 cpu_lp
129 98 3d2
130 99 mselect
131 100 tsensor
132 101 i2s3
133 102 i2s4
134 103 i2c4
135 104 sbc5
136 105 sbc6
137 106 d_audio
138 107 apbif
139 108 dam0
140 109 dam1
141 110 dam2
142 111 hda2codec_2x
143 112 atomics
144 113 audio0_2x
145 114 audio1_2x
146 115 audio2_2x
147 116 audio3_2x
148 117 audio4_2x
149 118 audio5_2x
150 119 actmon
151 120 extern1
152 121 extern2
153 122 extern3
154 123 sata_oob
155 124 sata
156 125 hda
157 127 se
158 128 hda2hdmi
159 129 sata_cold
160
161 160 uartb
162 161 vfir
163 162 spdif_in
164 163 spdif_out
165 164 vi
166 165 vi_sensor
167 166 fuse
168 167 fuse_burn
169 168 cve
170 169 tvo
171
172 170 clk_32k
173 171 clk_m
174 172 clk_m_div2
175 173 clk_m_div4
176 174 pll_ref
177 175 pll_c
178 176 pll_c_out1
179 177 pll_m
180 178 pll_m_out1
181 179 pll_p
182 180 pll_p_out1
183 181 pll_p_out2
184 182 pll_p_out3
185 183 pll_p_out4
186 184 pll_a
187 185 pll_a_out0
188 186 pll_d
189 187 pll_d_out0
190 188 pll_d2
191 189 pll_d2_out0
192 190 pll_u
193 191 pll_x
194 192 pll_x_out0
195 193 pll_e
196 194 spdif_in_sync
197 195 i2s0_sync
198 196 i2s1_sync
199 197 i2s2_sync
200 198 i2s3_sync
201 199 i2s4_sync
202 200 vimclk
203 201 audio0
204 202 audio1
205 203 audio2
206 204 audio3
207 205 audio4
208 206 audio5
209 207 clk_out_1 (extern1)
210 208 clk_out_2 (extern2)
211 209 clk_out_3 (extern3)
212 210 sclk
213 211 blink
214 212 cclk_g
215 213 cclk_lp
216 214 twd
217 215 cml0
218 216 cml1
219 217 hclk
220 218 pclk
221 18
222Example SoC include file: 19Example SoC include file:
223 20
@@ -229,7 +26,7 @@ Example SoC include file:
229 }; 26 };
230 27
231 usb@c5004000 { 28 usb@c5004000 {
232 clocks = <&tegra_car 58>; /* usb2 */ 29 clocks = <&tegra_car TEGRA30_CLK_USB2>;
233 }; 30 };
234}; 31};
235 32
diff --git a/Documentation/devicetree/bindings/clock/rockchip.txt b/Documentation/devicetree/bindings/clock/rockchip.txt
new file mode 100644
index 000000000000..a891c823ed44
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/rockchip.txt
@@ -0,0 +1,74 @@
1Device Tree Clock bindings for arch-rockchip
2
3This binding uses the common clock binding[1].
4
5[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
6
7== Gate clocks ==
8
9The gate registers form a continuos block which makes the dt node
10structure a matter of taste, as either all gates can be put into
11one gate clock spanning all registers or they can be divided into
12the 10 individual gates containing 16 clocks each.
13The code supports both approaches.
14
15Required properties:
16- compatible : "rockchip,rk2928-gate-clk"
17- reg : shall be the control register address(es) for the clock.
18- #clock-cells : from common clock binding; shall be set to 1
19- clock-output-names : the corresponding gate names that the clock controls
20- clocks : should contain the parent clock for each individual gate,
21 therefore the number of clocks elements should match the number of
22 clock-output-names
23
24Example using multiple gate clocks:
25
26 clk_gates0: gate-clk@200000d0 {
27 compatible = "rockchip,rk2928-gate-clk";
28 reg = <0x200000d0 0x4>;
29 clocks = <&dummy>, <&dummy>,
30 <&dummy>, <&dummy>,
31 <&dummy>, <&dummy>,
32 <&dummy>, <&dummy>,
33 <&dummy>, <&dummy>,
34 <&dummy>, <&dummy>,
35 <&dummy>, <&dummy>,
36 <&dummy>, <&dummy>;
37
38 clock-output-names =
39 "gate_core_periph", "gate_cpu_gpll",
40 "gate_ddrphy", "gate_aclk_cpu",
41 "gate_hclk_cpu", "gate_pclk_cpu",
42 "gate_atclk_cpu", "gate_i2s0",
43 "gate_i2s0_frac", "gate_i2s1",
44 "gate_i2s1_frac", "gate_i2s2",
45 "gate_i2s2_frac", "gate_spdif",
46 "gate_spdif_frac", "gate_testclk";
47
48 #clock-cells = <1>;
49 };
50
51 clk_gates1: gate-clk@200000d4 {
52 compatible = "rockchip,rk2928-gate-clk";
53 reg = <0x200000d4 0x4>;
54 clocks = <&xin24m>, <&xin24m>,
55 <&xin24m>, <&dummy>,
56 <&dummy>, <&xin24m>,
57 <&xin24m>, <&dummy>,
58 <&xin24m>, <&dummy>,
59 <&xin24m>, <&dummy>,
60 <&xin24m>, <&dummy>,
61 <&xin24m>, <&dummy>;
62
63 clock-output-names =
64 "gate_timer0", "gate_timer1",
65 "gate_timer2", "gate_jtag",
66 "gate_aclk_lcdc1_src", "gate_otgphy0",
67 "gate_otgphy1", "gate_ddr_gpll",
68 "gate_uart0", "gate_frac_uart0",
69 "gate_uart1", "gate_frac_uart1",
70 "gate_uart2", "gate_frac_uart2",
71 "gate_uart3", "gate_frac_uart3";
72
73 #clock-cells = <1>;
74 };
diff --git a/Documentation/devicetree/bindings/clock/silabs,si5351.txt b/Documentation/devicetree/bindings/clock/silabs,si5351.txt
index cc374651662c..66c75b2d6158 100644
--- a/Documentation/devicetree/bindings/clock/silabs,si5351.txt
+++ b/Documentation/devicetree/bindings/clock/silabs,si5351.txt
@@ -44,6 +44,11 @@ Optional child node properties:
44- silabs,multisynth-source: source pll A(0) or B(1) of corresponding multisynth 44- silabs,multisynth-source: source pll A(0) or B(1) of corresponding multisynth
45 divider. 45 divider.
46- silabs,pll-master: boolean, multisynth can change pll frequency. 46- silabs,pll-master: boolean, multisynth can change pll frequency.
47- silabs,disable-state : clock output disable state, shall be
48 0 = clock output is driven LOW when disabled
49 1 = clock output is driven HIGH when disabled
50 2 = clock output is FLOATING (HIGH-Z) when disabled
51 3 = clock output is NEVER disabled
47 52
48==Example== 53==Example==
49 54
diff --git a/Documentation/devicetree/bindings/clock/st,nomadik.txt b/Documentation/devicetree/bindings/clock/st,nomadik.txt
new file mode 100644
index 000000000000..7fc09773de46
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/st,nomadik.txt
@@ -0,0 +1,104 @@
1ST Microelectronics Nomadik SRC System Reset and Control
2
3This binding uses the common clock binding:
4Documentation/devicetree/bindings/clock/clock-bindings.txt
5
6The Nomadik SRC controller is responsible of controlling chrystals,
7PLLs and clock gates.
8
9Required properties for the SRC node:
10- compatible: must be "stericsson,nomadik-src"
11- reg: must contain the SRC register base and size
12
13Optional properties for the SRC node:
14- disable-sxtalo: if present this will disable the SXTALO
15 i.e. the driver output for the slow 32kHz chrystal, if the
16 board has its own circuitry for providing this oscillator
17- disable-mxtal: if present this will disable the MXTALO,
18 i.e. the driver output for the main (~19.2 MHz) chrystal,
19 if the board has its own circuitry for providing this
20 osciallator
21
22
23PLL nodes: these nodes represent the two PLLs on the system,
24which should both have the main chrystal, represented as a
25fixed frequency clock, as parent.
26
27Required properties for the two PLL nodes:
28- compatible: must be "st,nomadik-pll-clock"
29- clock-cells: must be 0
30- clock-id: must be 1 or 2 for PLL1 and PLL2 respectively
31- clocks: this clock will have main chrystal as parent
32
33
34HCLK nodes: these represent the clock gates on individual
35lines from the HCLK clock tree and the gate for individual
36lines from the PCLK clock tree.
37
38Requires properties for the HCLK nodes:
39- compatible: must be "st,nomadik-hclk-clock"
40- clock-cells: must be 0
41- clock-id: must be the clock ID from 0 to 63 according to
42 this table:
43
44 0: HCLKDMA0
45 1: HCLKSMC
46 2: HCLKSDRAM
47 3: HCLKDMA1
48 4: HCLKCLCD
49 5: PCLKIRDA
50 6: PCLKSSP
51 7: PCLKUART0
52 8: PCLKSDI
53 9: PCLKI2C0
54 10: PCLKI2C1
55 11: PCLKUART1
56 12: PCLMSP0
57 13: HCLKUSB
58 14: HCLKDIF
59 15: HCLKSAA
60 16: HCLKSVA
61 17: PCLKHSI
62 18: PCLKXTI
63 19: PCLKUART2
64 20: PCLKMSP1
65 21: PCLKMSP2
66 22: PCLKOWM
67 23: HCLKHPI
68 24: PCLKSKE
69 25: PCLKHSEM
70 26: HCLK3D
71 27: HCLKHASH
72 28: HCLKCRYP
73 29: PCLKMSHC
74 30: HCLKUSBM
75 31: HCLKRNG
76 (32, 33, 34, 35 RESERVED)
77 36: CLDCLK
78 37: IRDACLK
79 38: SSPICLK
80 39: UART0CLK
81 40: SDICLK
82 41: I2C0CLK
83 42: I2C1CLK
84 43: UART1CLK
85 44: MSPCLK0
86 45: USBCLK
87 46: DIFCLK
88 47: IPI2CCLK
89 48: IPBMCCLK
90 49: HSICLKRX
91 50: HSICLKTX
92 51: UART2CLK
93 52: MSPCLK1
94 53: MSPCLK2
95 54: OWMCLK
96 (55 RESERVED)
97 56: SKECLK
98 (57 RESERVED)
99 58: 3DCLK
100 59: PCLKMSP3
101 60: MSPCLK3
102 61: MSHCCLK
103 62: USBMCLK
104 63: RNGCCLK
diff --git a/Documentation/devicetree/bindings/clock/ste-u300-syscon-clock.txt b/Documentation/devicetree/bindings/clock/ste-u300-syscon-clock.txt
new file mode 100644
index 000000000000..7cafcb98ead7
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/ste-u300-syscon-clock.txt
@@ -0,0 +1,80 @@
1Clock bindings for ST-Ericsson U300 System Controller Clocks
2
3Bindings for the gated system controller clocks:
4
5Required properties:
6- compatible: must be "stericsson,u300-syscon-clk"
7- #clock-cells: must be <0>
8- clock-type: specifies the type of clock:
9 0 = slow clock
10 1 = fast clock
11 2 = rest/remaining clock
12- clock-id: specifies the clock in the type range
13
14Optional properties:
15- clocks: parent clock(s)
16
17The available clocks per type are as follows:
18
19Type: ID: Clock:
20-------------------
210 0 Slow peripheral bridge clock
220 1 UART0 clock
230 4 GPIO clock
240 6 RTC clock
250 7 Application timer clock
260 8 Access timer clock
27
281 0 Fast peripheral bridge clock
291 1 I2C bus 0 clock
301 2 I2C bus 1 clock
311 5 MMC interface peripheral (silicon) clock
321 6 SPI clock
33
342 3 CPU clock
352 4 DMA controller clock
362 5 External Memory Interface (EMIF) clock
372 6 NAND flask interface clock
382 8 XGAM graphics engine clock
392 9 Shared External Memory Interface (SEMI) clock
402 10 AHB Subsystem Bridge clock
412 12 Interrupt controller clock
42
43Example:
44
45gpio_clk: gpio_clk@13M {
46 #clock-cells = <0>;
47 compatible = "stericsson,u300-syscon-clk";
48 clock-type = <0>; /* Slow */
49 clock-id = <4>;
50 clocks = <&slow_clk>;
51};
52
53gpio: gpio@c0016000 {
54 compatible = "stericsson,gpio-coh901";
55 (...)
56 clocks = <&gpio_clk>;
57};
58
59
60Bindings for the MMC/SD card clock:
61
62Required properties:
63- compatible: must be "stericsson,u300-syscon-mclk"
64- #clock-cells: must be <0>
65
66Optional properties:
67- clocks: parent clock(s)
68
69mmc_mclk: mmc_mclk {
70 #clock-cells = <0>;
71 compatible = "stericsson,u300-syscon-mclk";
72 clocks = <&mmc_pclk>;
73};
74
75mmcsd: mmcsd@c0001000 {
76 compatible = "arm,pl18x", "arm,primecell";
77 clocks = <&mmc_pclk>, <&mmc_mclk>;
78 clock-names = "apb_pclk", "mclk";
79 (...)
80};
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
index 729f52426fe1..d495521a79d2 100644
--- a/Documentation/devicetree/bindings/clock/sunxi.txt
+++ b/Documentation/devicetree/bindings/clock/sunxi.txt
@@ -12,22 +12,30 @@ Required properties:
12 "allwinner,sun4i-axi-clk" - for the AXI clock 12 "allwinner,sun4i-axi-clk" - for the AXI clock
13 "allwinner,sun4i-axi-gates-clk" - for the AXI gates 13 "allwinner,sun4i-axi-gates-clk" - for the AXI gates
14 "allwinner,sun4i-ahb-clk" - for the AHB clock 14 "allwinner,sun4i-ahb-clk" - for the AHB clock
15 "allwinner,sun4i-ahb-gates-clk" - for the AHB gates 15 "allwinner,sun4i-ahb-gates-clk" - for the AHB gates on A10
16 "allwinner,sun5i-a13-ahb-gates-clk" - for the AHB gates on A13
16 "allwinner,sun4i-apb0-clk" - for the APB0 clock 17 "allwinner,sun4i-apb0-clk" - for the APB0 clock
17 "allwinner,sun4i-apb0-gates-clk" - for the APB0 gates 18 "allwinner,sun4i-apb0-gates-clk" - for the APB0 gates on A10
19 "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13
18 "allwinner,sun4i-apb1-clk" - for the APB1 clock 20 "allwinner,sun4i-apb1-clk" - for the APB1 clock
19 "allwinner,sun4i-apb1-mux-clk" - for the APB1 clock muxing 21 "allwinner,sun4i-apb1-mux-clk" - for the APB1 clock muxing
20 "allwinner,sun4i-apb1-gates-clk" - for the APB1 gates 22 "allwinner,sun4i-apb1-gates-clk" - for the APB1 gates on A10
23 "allwinner,sun5i-a13-apb1-gates-clk" - for the APB1 gates on A13
21 24
22Required properties for all clocks: 25Required properties for all clocks:
23- reg : shall be the control register address for the clock. 26- reg : shall be the control register address for the clock.
24- clocks : shall be the input parent clock(s) phandle for the clock 27- clocks : shall be the input parent clock(s) phandle for the clock
25- #clock-cells : from common clock binding; shall be set to 0 except for 28- #clock-cells : from common clock binding; shall be set to 0 except for
26 "allwinner,sun4i-*-gates-clk" where it shall be set to 1 29 "allwinner,*-gates-clk" where it shall be set to 1
27 30
28Additionally, "allwinner,sun4i-*-gates-clk" clocks require: 31Additionally, "allwinner,*-gates-clk" clocks require:
29- clock-output-names : the corresponding gate names that the clock controls 32- clock-output-names : the corresponding gate names that the clock controls
30 33
34Clock consumers should specify the desired clocks they use with a
35"clocks" phandle cell. Consumers that are using a gated clock should
36provide an additional ID in their clock property. The values of this
37ID are documented in sunxi/<soc>-gates.txt.
38
31For example: 39For example:
32 40
33osc24M: osc24M@01c20050 { 41osc24M: osc24M@01c20050 {
@@ -50,102 +58,3 @@ cpu: cpu@01c20054 {
50 reg = <0x01c20054 0x4>; 58 reg = <0x01c20054 0x4>;
51 clocks = <&osc32k>, <&osc24M>, <&pll1>; 59 clocks = <&osc32k>, <&osc24M>, <&pll1>;
52}; 60};
53
54
55
56Gate clock outputs
57
58The "allwinner,sun4i-*-gates-clk" clocks provide several gatable outputs;
59their corresponding offsets as present on sun4i are listed below. Note that
60some of these gates are not present on sun5i.
61
62 * AXI gates ("allwinner,sun4i-axi-gates-clk")
63
64 DRAM 0
65
66 * AHB gates ("allwinner,sun4i-ahb-gates-clk")
67
68 USB0 0
69 EHCI0 1
70 OHCI0 2*
71 EHCI1 3
72 OHCI1 4*
73 SS 5
74 DMA 6
75 BIST 7
76 MMC0 8
77 MMC1 9
78 MMC2 10
79 MMC3 11
80 MS 12**
81 NAND 13
82 SDRAM 14
83
84 ACE 16
85 EMAC 17
86 TS 18
87
88 SPI0 20
89 SPI1 21
90 SPI2 22
91 SPI3 23
92 PATA 24
93 SATA 25**
94 GPS 26*
95
96 VE 32
97 TVD 33
98 TVE0 34
99 TVE1 35
100 LCD0 36
101 LCD1 37
102
103 CSI0 40
104 CSI1 41
105
106 HDMI 43
107 DE_BE0 44
108 DE_BE1 45
109 DE_FE0 46
110 DE_FE1 47
111
112 MP 50
113
114 MALI400 52
115
116 * APB0 gates ("allwinner,sun4i-apb0-gates-clk")
117
118 CODEC 0
119 SPDIF 1*
120 AC97 2
121 IIS 3
122
123 PIO 5
124 IR0 6
125 IR1 7
126
127 KEYPAD 10
128
129 * APB1 gates ("allwinner,sun4i-apb1-gates-clk")
130
131 I2C0 0
132 I2C1 1
133 I2C2 2
134
135 CAN 4
136 SCR 5
137 PS20 6
138 PS21 7
139
140 UART0 16
141 UART1 17
142 UART2 18
143 UART3 19
144 UART4 20
145 UART5 21
146 UART6 22
147 UART7 23
148
149Notation:
150 [*]: The datasheet didn't mention these, but they are present on AW code
151 [**]: The datasheet had this marked as "NC" but they are used on AW code
diff --git a/Documentation/devicetree/bindings/clock/sunxi/sun4i-a10-gates.txt b/Documentation/devicetree/bindings/clock/sunxi/sun4i-a10-gates.txt
new file mode 100644
index 000000000000..6a03475bbfe2
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/sunxi/sun4i-a10-gates.txt
@@ -0,0 +1,93 @@
1Gate clock outputs
2------------------
3
4 * AXI gates ("allwinner,sun4i-axi-gates-clk")
5
6 DRAM 0
7
8 * AHB gates ("allwinner,sun4i-ahb-gates-clk")
9
10 USB0 0
11 EHCI0 1
12 OHCI0 2*
13 EHCI1 3
14 OHCI1 4*
15 SS 5
16 DMA 6
17 BIST 7
18 MMC0 8
19 MMC1 9
20 MMC2 10
21 MMC3 11
22 MS 12**
23 NAND 13
24 SDRAM 14
25
26 ACE 16
27 EMAC 17
28 TS 18
29
30 SPI0 20
31 SPI1 21
32 SPI2 22
33 SPI3 23
34 PATA 24
35 SATA 25**
36 GPS 26*
37
38 VE 32
39 TVD 33
40 TVE0 34
41 TVE1 35
42 LCD0 36
43 LCD1 37
44
45 CSI0 40
46 CSI1 41
47
48 HDMI 43
49 DE_BE0 44
50 DE_BE1 45
51 DE_FE1 46
52 DE_FE1 47
53
54 MP 50
55
56 MALI400 52
57
58 * APB0 gates ("allwinner,sun4i-apb0-gates-clk")
59
60 CODEC 0
61 SPDIF 1*
62 AC97 2
63 IIS 3
64
65 PIO 5
66 IR0 6
67 IR1 7
68
69 KEYPAD 10
70
71 * APB1 gates ("allwinner,sun4i-apb1-gates-clk")
72
73 I2C0 0
74 I2C1 1
75 I2C2 2
76
77 CAN 4
78 SCR 5
79 PS20 6
80 PS21 7
81
82 UART0 16
83 UART1 17
84 UART2 18
85 UART3 19
86 UART4 20
87 UART5 21
88 UART6 22
89 UART7 23
90
91Notation:
92 [*]: The datasheet didn't mention these, but they are present on AW code
93 [**]: The datasheet had this marked as "NC" but they are used on AW code
diff --git a/Documentation/devicetree/bindings/clock/sunxi/sun5i-a13-gates.txt b/Documentation/devicetree/bindings/clock/sunxi/sun5i-a13-gates.txt
new file mode 100644
index 000000000000..006b6dfc4703
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/sunxi/sun5i-a13-gates.txt
@@ -0,0 +1,58 @@
1Gate clock outputs
2------------------
3
4 * AXI gates ("allwinner,sun4i-axi-gates-clk")
5
6 DRAM 0
7
8 * AHB gates ("allwinner,sun5i-a13-ahb-gates-clk")
9
10 USBOTG 0
11 EHCI 1
12 OHCI 2
13
14 SS 5
15 DMA 6
16 BIST 7
17 MMC0 8
18 MMC1 9
19 MMC2 10
20
21 NAND 13
22 SDRAM 14
23
24 SPI0 20
25 SPI1 21
26 SPI2 22
27
28 STIMER 28
29
30 VE 32
31
32 LCD 36
33
34 CSI 40
35
36 DE_BE 44
37
38 DE_FE 46
39
40 IEP 51
41 MALI400 52
42
43 * APB0 gates ("allwinner,sun5i-a13-apb0-gates-clk")
44
45 CODEC 0
46
47 PIO 5
48 IR 6
49
50 * APB1 gates ("allwinner,sun5i-a13-apb1-gates-clk")
51
52 I2C0 0
53 I2C1 1
54 I2C2 2
55
56 UART1 17
57
58 UART3 19
diff --git a/Documentation/devicetree/bindings/clock/vf610-clock.txt b/Documentation/devicetree/bindings/clock/vf610-clock.txt
new file mode 100644
index 000000000000..c80863d344ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/vf610-clock.txt
@@ -0,0 +1,26 @@
1* Clock bindings for Freescale Vybrid VF610 SOC
2
3Required properties:
4- compatible: Should be "fsl,vf610-ccm"
5- reg: Address and length of the register set
6- #clock-cells: Should be <1>
7
8The clock consumer should specify the desired clock by having the clock
9ID in its "clocks" phandle cell. See include/dt-bindings/clock/vf610-clock.h
10for the full list of VF610 clock IDs.
11
12Examples:
13
14clks: ccm@4006b000 {
15 compatible = "fsl,vf610-ccm";
16 reg = <0x4006b000 0x1000>;
17 #clock-cells = <1>;
18};
19
20uart1: serial@40028000 {
21 compatible = "fsl,vf610-uart";
22 reg = <0x40028000 0x1000>;
23 interrupts = <0 62 0x04>;
24 clocks = <&clks VF610_CLK_UART1>;
25 clock-names = "ipg";
26};
diff --git a/Documentation/devicetree/bindings/clock/vt8500.txt b/Documentation/devicetree/bindings/clock/vt8500.txt
index a880c70d0047..91d71cc0314a 100644
--- a/Documentation/devicetree/bindings/clock/vt8500.txt
+++ b/Documentation/devicetree/bindings/clock/vt8500.txt
@@ -8,6 +8,8 @@ Required properties:
8- compatible : shall be one of the following: 8- compatible : shall be one of the following:
9 "via,vt8500-pll-clock" - for a VT8500/WM8505 PLL clock 9 "via,vt8500-pll-clock" - for a VT8500/WM8505 PLL clock
10 "wm,wm8650-pll-clock" - for a WM8650 PLL clock 10 "wm,wm8650-pll-clock" - for a WM8650 PLL clock
11 "wm,wm8750-pll-clock" - for a WM8750 PLL clock
12 "wm,wm8850-pll-clock" - for a WM8850 PLL clock
11 "via,vt8500-device-clock" - for a VT/WM device clock 13 "via,vt8500-device-clock" - for a VT/WM device clock
12 14
13Required properties for PLL clocks: 15Required properties for PLL clocks:
diff --git a/Documentation/devicetree/bindings/clock/zynq-7000.txt b/Documentation/devicetree/bindings/clock/zynq-7000.txt
index 23ae1db1bc13..d99af878f5d7 100644
--- a/Documentation/devicetree/bindings/clock/zynq-7000.txt
+++ b/Documentation/devicetree/bindings/clock/zynq-7000.txt
@@ -6,50 +6,99 @@ The purpose of this document is to document their usage.
6See clock_bindings.txt for more information on the generic clock bindings. 6See clock_bindings.txt for more information on the generic clock bindings.
7See Chapter 25 of Zynq TRM for more information about Zynq clocks. 7See Chapter 25 of Zynq TRM for more information about Zynq clocks.
8 8
9== PLLs == 9== Clock Controller ==
10 10The clock controller is a logical abstraction of Zynq's clock tree. It reads
11Used to describe the ARM_PLL, DDR_PLL, and IO_PLL. 11required input clock frequencies from the devicetree and acts as clock provider
12for all clock consumers of PS clocks.
12 13
13Required properties: 14Required properties:
14- #clock-cells : shall be 0 (only one clock is output from this node) 15 - #clock-cells : Must be 1
15- compatible : "xlnx,zynq-pll" 16 - compatible : "xlnx,ps7-clkc"
16- reg : pair of u32 values, which are the address offsets within the SLCR 17 - ps-clk-frequency : Frequency of the oscillator providing ps_clk in HZ
17 of the relevant PLL_CTRL register and PLL_CFG register respectively 18 (usually 33 MHz oscillators are used for Zynq platforms)
18- clocks : phandle for parent clock. should be the phandle for ps_clk 19 - clock-output-names : List of strings used to name the clock outputs. Shall be
20 a list of the outputs given below.
19 21
20Optional properties: 22Optional properties:
21- clock-output-names : name of the output clock 23 - clocks : as described in the clock bindings
22 24 - clock-names : as described in the clock bindings
23Example:
24 armpll: armpll {
25 #clock-cells = <0>;
26 compatible = "xlnx,zynq-pll";
27 clocks = <&ps_clk>;
28 reg = <0x100 0x110>;
29 clock-output-names = "armpll";
30 };
31
32== Peripheral clocks ==
33 25
34Describes clock node for the SDIO, SMC, SPI, QSPI, and UART clocks. 26Clock inputs:
27The following strings are optional parameters to the 'clock-names' property in
28order to provide an optional (E)MIO clock source.
29 - swdt_ext_clk
30 - gem0_emio_clk
31 - gem1_emio_clk
32 - mio_clk_XX # with XX = 00..53
33...
35 34
36Required properties: 35Clock outputs:
37- #clock-cells : shall be 1 36 0: armpll
38- compatible : "xlnx,zynq-periph-clock" 37 1: ddrpll
39- reg : a single u32 value, describing the offset within the SLCR where 38 2: iopll
40 the CLK_CTRL register is found for this peripheral 39 3: cpu_6or4x
41- clocks : phandle for parent clocks. should hold phandles for 40 4: cpu_3or2x
42 the IO_PLL, ARM_PLL, and DDR_PLL in order 41 5: cpu_2x
43- clock-output-names : names of the output clock(s). For peripherals that have 42 6: cpu_1x
44 two output clocks (for example, the UART), two clocks 43 7: ddr2x
45 should be listed. 44 8: ddr3x
45 9: dci
46 10: lqspi
47 11: smc
48 12: pcap
49 13: gem0
50 14: gem1
51 15: fclk0
52 16: fclk1
53 17: fclk2
54 18: fclk3
55 19: can0
56 20: can1
57 21: sdio0
58 22: sdio1
59 23: uart0
60 24: uart1
61 25: spi0
62 26: spi1
63 27: dma
64 28: usb0_aper
65 29: usb1_aper
66 30: gem0_aper
67 31: gem1_aper
68 32: sdio0_aper
69 33: sdio1_aper
70 34: spi0_aper
71 35: spi1_aper
72 36: can0_aper
73 37: can1_aper
74 38: i2c0_aper
75 39: i2c1_aper
76 40: uart0_aper
77 41: uart1_aper
78 42: gpio_aper
79 43: lqspi_aper
80 44: smc_aper
81 45: swdt
82 46: dbg_trc
83 47: dbg_apb
46 84
47Example: 85Example:
48 uart_clk: uart_clk { 86 clkc: clkc {
49 #clock-cells = <1>; 87 #clock-cells = <1>;
50 compatible = "xlnx,zynq-periph-clock"; 88 compatible = "xlnx,ps7-clkc";
51 clocks = <&iopll &armpll &ddrpll>; 89 ps-clk-frequency = <33333333>;
52 reg = <0x154>; 90 clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x",
53 clock-output-names = "uart0_ref_clk", 91 "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x",
54 "uart1_ref_clk"; 92 "dci", "lqspi", "smc", "pcap", "gem0", "gem1",
93 "fclk0", "fclk1", "fclk2", "fclk3", "can0", "can1",
94 "sdio0", "sdio1", "uart0", "uart1", "spi0", "spi1",
95 "dma", "usb0_aper", "usb1_aper", "gem0_aper",
96 "gem1_aper", "sdio0_aper", "sdio1_aper",
97 "spi0_aper", "spi1_aper", "can0_aper", "can1_aper",
98 "i2c0_aper", "i2c1_aper", "uart0_aper", "uart1_aper",
99 "gpio_aper", "lqspi_aper", "smc_aper", "swdt",
100 "dbg_trc", "dbg_apb";
101 # optional props
102 clocks = <&clkc 16>, <&clk_foo>;
103 clock-names = "gem1_emio_clk", "can_mio_clk_23";
55 }; 104 };
diff --git a/Documentation/devicetree/bindings/dma/ste-coh901318.txt b/Documentation/devicetree/bindings/dma/ste-coh901318.txt
new file mode 100644
index 000000000000..091ad057e9cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/ste-coh901318.txt
@@ -0,0 +1,32 @@
1ST-Ericsson COH 901 318 DMA Controller
2
3This is a DMA controller which has begun as a fork of the
4ARM PL08x PrimeCell VHDL code.
5
6Required properties:
7- compatible: should be "stericsson,coh901318"
8- reg: register locations and length
9- interrupts: the single DMA IRQ
10- #dma-cells: must be set to <1>, as the channels on the
11 COH 901 318 are simple and identified by a single number
12- dma-channels: the number of DMA channels handled
13
14Example:
15
16dmac: dma-controller@c00020000 {
17 compatible = "stericsson,coh901318";
18 reg = <0xc0020000 0x1000>;
19 interrupt-parent = <&vica>;
20 interrupts = <2>;
21 #dma-cells = <1>;
22 dma-channels = <40>;
23};
24
25Consumers example:
26
27uart0: serial@c0013000 {
28 compatible = "...";
29 (...)
30 dmas = <&dmac 17 &dmac 18>;
31 dma-names = "tx", "rx";
32};
diff --git a/Documentation/devicetree/bindings/dma/ste-dma40.txt b/Documentation/devicetree/bindings/dma/ste-dma40.txt
new file mode 100644
index 000000000000..bea5b73a7390
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/ste-dma40.txt
@@ -0,0 +1,66 @@
1* DMA40 DMA Controller
2
3Required properties:
4- compatible: "stericsson,dma40"
5- reg: Address range of the DMAC registers
6- reg-names: Names of the above areas to use during resource look-up
7- interrupt: Should contain the DMAC interrupt number
8- #dma-cells: must be <3>
9- memcpy-channels: Channels to be used for memcpy
10
11Optional properties:
12- dma-channels: Number of channels supported by hardware - if not present
13 the driver will attempt to obtain the information from H/W
14- disabled-channels: Channels which can not be used
15
16Example:
17
18 dma: dma-controller@801C0000 {
19 compatible = "stericsson,db8500-dma40", "stericsson,dma40";
20 reg = <0x801C0000 0x1000 0x40010000 0x800>;
21 reg-names = "base", "lcpa";
22 interrupt-parent = <&intc>;
23 interrupts = <0 25 0x4>;
24
25 #dma-cells = <2>;
26 memcpy-channels = <56 57 58 59 60>;
27 disabled-channels = <12>;
28 dma-channels = <8>;
29 };
30
31Clients
32Required properties:
33- dmas: Comma separated list of dma channel requests
34- dma-names: Names of the aforementioned requested channels
35
36Each dmas request consists of 4 cells:
37 1. A phandle pointing to the DMA controller
38 2. Device Type
39 3. The DMA request line number (only when 'use fixed channel' is set)
40 4. A 32bit mask specifying; mode, direction and endianess [NB: This list will grow]
41 0x00000001: Mode:
42 Logical channel when unset
43 Physical channel when set
44 0x00000002: Direction:
45 Memory to Device when unset
46 Device to Memory when set
47 0x00000004: Endianess:
48 Little endian when unset
49 Big endian when set
50 0x00000008: Use fixed channel:
51 Use automatic channel selection when unset
52 Use DMA request line number when set
53
54Example:
55
56 uart@80120000 {
57 compatible = "arm,pl011", "arm,primecell";
58 reg = <0x80120000 0x1000>;
59 interrupts = <0 11 0x4>;
60
61 dmas = <&dma 13 0 0x2>, /* Logical - DevToMem */
62 <&dma 13 0 0x0>; /* Logical - MemToDev */
63 dma-names = "rx", "rx";
64
65 status = "disabled";
66 };
diff --git a/Documentation/devicetree/bindings/dma/ti-edma.txt b/Documentation/devicetree/bindings/dma/ti-edma.txt
new file mode 100644
index 000000000000..9fbbdb783a72
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/ti-edma.txt
@@ -0,0 +1,34 @@
1TI EDMA
2
3Required properties:
4- compatible : "ti,edma3"
5- ti,edma-regions: Number of regions
6- ti,edma-slots: Number of slots
7- #dma-cells: Should be set to <1>
8 Clients should use a single channel number per DMA request.
9- dma-channels: Specify total DMA channels per CC
10- reg: Memory map for accessing module
11- interrupt-parent: Interrupt controller the interrupt is routed through
12- interrupts: Exactly 3 interrupts need to be specified in the order:
13 1. Transfer completion interrupt.
14 2. Memory protection interrupt.
15 3. Error interrupt.
16Optional properties:
17- ti,hwmods: Name of the hwmods associated to the EDMA
18- ti,edma-xbar-event-map: Crossbar event to channel map
19
20Example:
21
22edma: edma@49000000 {
23 reg = <0x49000000 0x10000>;
24 interrupt-parent = <&intc>;
25 interrupts = <12 13 14>;
26 compatible = "ti,edma3";
27 ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
28 #dma-cells = <1>;
29 dma-channels = <64>;
30 ti,edma-regions = <4>;
31 ti,edma-slots = <256>;
32 ti,edma-xbar-event-map = <1 12
33 2 13>;
34};
diff --git a/Documentation/devicetree/bindings/extcon/extcon-twl.txt b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
new file mode 100644
index 000000000000..58f531ab4df3
--- /dev/null
+++ b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
@@ -0,0 +1,15 @@
1EXTCON FOR TWL CHIPS
2
3PALMAS USB COMPARATOR
4Required Properties:
5 - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb"
6 - vbus-supply : phandle to the regulator device tree node.
7
8Optional Properties:
9 - ti,wakeup : To enable the wakeup comparator in probe
10
11palmas-usb {
12 compatible = "ti,twl6035-usb", "ti,palmas-usb";
13 vbus-supply = <&smps10_reg>;
14 ti,wakeup;
15};
diff --git a/Documentation/devicetree/bindings/gpio/gpio-clps711x.txt b/Documentation/devicetree/bindings/gpio/gpio-clps711x.txt
new file mode 100644
index 000000000000..e0d0446a6b78
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-clps711x.txt
@@ -0,0 +1,28 @@
1Cirrus Logic CLPS711X GPIO controller
2
3Required properties:
4- compatible: Should be "cirrus,clps711x-gpio"
5- reg: Physical base GPIO controller registers location and length.
6 There should be two registers, first is DATA register, the second
7 is DIRECTION.
8- gpio-controller: Marks the device node as a gpio controller.
9- #gpio-cells: Should be two. The first cell is the pin number and
10 the second cell is used to specify the gpio polarity:
11 0 = active high
12 1 = active low
13
14Note: Each GPIO port should have an alias correctly numbered in "aliases"
15node.
16
17Example:
18
19aliases {
20 gpio0 = &porta;
21};
22
23porta: gpio@80000000 {
24 compatible = "cirrus,clps711x-gpio";
25 reg = <0x80000000 0x1>, <0x80000040 0x1>;
26 gpio-controller;
27 #gpio-cells = <2>;
28};
diff --git a/Documentation/devicetree/bindings/gpio/gpio-msm.txt b/Documentation/devicetree/bindings/gpio/gpio-msm.txt
new file mode 100644
index 000000000000..ac20e68a004e
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-msm.txt
@@ -0,0 +1,26 @@
1MSM GPIO controller bindings
2
3Required properties:
4- compatible:
5 - "qcom,msm-gpio" for MSM controllers
6- #gpio-cells : Should be two.
7 - first cell is the pin number
8 - second cell is used to specify optional parameters (unused)
9- gpio-controller : Marks the device node as a GPIO controller.
10- #interrupt-cells : Should be 2.
11- interrupt-controller: Mark the device node as an interrupt controller
12- interrupts : Specify the TLMM summary interrupt number
13- ngpio : Specify the number of MSM GPIOs
14
15Example:
16
17 msmgpio: gpio@fd510000 {
18 compatible = "qcom,msm-gpio";
19 gpio-controller;
20 #gpio-cells = <2>;
21 interrupt-controller;
22 #interrupt-cells = <2>;
23 reg = <0xfd510000 0x4000>;
24 interrupts = <0 208 0>;
25 ngpio = <150>;
26 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt
index f1e5dfecf55d..5375625e8cd2 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt
@@ -39,46 +39,3 @@ Example:
39 #gpio-cells = <4>; 39 #gpio-cells = <4>;
40 gpio-controller; 40 gpio-controller;
41 }; 41 };
42
43
44Samsung S3C24XX GPIO Controller
45
46Required properties:
47- compatible: Compatible property value should be "samsung,s3c24xx-gpio".
48
49- reg: Physical base address of the controller and length of memory mapped
50 region.
51
52- #gpio-cells: Should be 3. The syntax of the gpio specifier used by client nodes
53 should be the following with values derived from the SoC user manual.
54 <[phandle of the gpio controller node]
55 [pin number within the gpio controller]
56 [mux function]
57 [flags and pull up/down]
58
59 Values for gpio specifier:
60 - Pin number: depending on the controller a number from 0 up to 15.
61 - Mux function: Depending on the SoC and the gpio bank the gpio can be set
62 as input, output or a special function
63 - Flags and Pull Up/Down: the values to use differ for the individual SoCs
64 example S3C2416/S3C2450:
65 0 - Pull Up/Down Disabled.
66 1 - Pull Down Enabled.
67 2 - Pull Up Enabled.
68 Bit 16 (0x00010000) - Input is active low.
69 Consult the user manual for the correct values of Mux and Pull Up/Down.
70
71- gpio-controller: Specifies that the node is a gpio controller.
72- #address-cells: should be 1.
73- #size-cells: should be 1.
74
75Example:
76
77 gpa: gpio-controller@56000000 {
78 #address-cells = <1>;
79 #size-cells = <1>;
80 compatible = "samsung,s3c24xx-gpio";
81 reg = <0x56000000 0x10>;
82 #gpio-cells = <3>;
83 gpio-controller;
84 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-stericsson-coh901.txt b/Documentation/devicetree/bindings/gpio/gpio-stericsson-coh901.txt
new file mode 100644
index 000000000000..fd665b44d767
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-stericsson-coh901.txt
@@ -0,0 +1,7 @@
1ST-Ericsson COH 901 571/3 GPIO controller
2
3Required properties:
4- compatible: Compatible property value should be "stericsson,gpio-coh901"
5- reg: Physical base address of the controller and length of memory mapped
6 region.
7- interrupts: the 0...n interrupts assigned to the different GPIO ports/banks.
diff --git a/Documentation/devicetree/bindings/gpio/gpio-xilinx.txt b/Documentation/devicetree/bindings/gpio/gpio-xilinx.txt
new file mode 100644
index 000000000000..63bf4becd5f0
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-xilinx.txt
@@ -0,0 +1,48 @@
1Xilinx plb/axi GPIO controller
2
3Dual channel GPIO controller with configurable number of pins
4(from 1 to 32 per channel). Every pin can be configured as
5input/output/tristate. Both channels share the same global IRQ but
6local interrupts can be enabled on channel basis.
7
8Required properties:
9- compatible : Should be "xlnx,xps-gpio-1.00.a"
10- reg : Address and length of the register set for the device
11- #gpio-cells : Should be two. The first cell is the pin number and the
12 second cell is used to specify optional parameters (currently unused).
13- gpio-controller : Marks the device node as a GPIO controller.
14
15Optional properties:
16- interrupts : Interrupt mapping for GPIO IRQ.
17- interrupt-parent : Phandle for the interrupt controller that
18 services interrupts for this device.
19- xlnx,all-inputs : if n-th bit is setup, GPIO-n is input
20- xlnx,dout-default : if n-th bit is 1, GPIO-n default value is 1
21- xlnx,gpio-width : gpio width
22- xlnx,tri-default : if n-th bit is 1, GPIO-n is in tristate mode
23- xlnx,is-dual : if 1, controller also uses the second channel
24- xlnx,all-inputs-2 : as above but for the second channel
25- xlnx,dout-default-2 : as above but the second channel
26- xlnx,gpio2-width : as above but for the second channel
27- xlnx,tri-default-2 : as above but for the second channel
28
29
30Example:
31gpio: gpio@40000000 {
32 #gpio-cells = <2>;
33 compatible = "xlnx,xps-gpio-1.00.a";
34 gpio-controller ;
35 interrupt-parent = <&microblaze_0_intc>;
36 interrupts = < 6 2 >;
37 reg = < 0x40000000 0x10000 >;
38 xlnx,all-inputs = <0x0>;
39 xlnx,all-inputs-2 = <0x0>;
40 xlnx,dout-default = <0x0>;
41 xlnx,dout-default-2 = <0x0>;
42 xlnx,gpio-width = <0x2>;
43 xlnx,gpio2-width = <0x2>;
44 xlnx,interrupt-present = <0x1>;
45 xlnx,is-dual = <0x1>;
46 xlnx,tri-default = <0xffffffff>;
47 xlnx,tri-default-2 = <0xffffffff>;
48} ;
diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
new file mode 100644
index 000000000000..cb3dc7bcd8e6
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
@@ -0,0 +1,46 @@
1* Renesas R-Car GPIO Controller
2
3Required Properties:
4
5 - compatible: should be one of the following.
6 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller.
7 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller.
8 - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller.
9 - "renesas,gpio-rcar": for generic R-Car GPIO controller.
10
11 - reg: Base address and length of each memory resource used by the GPIO
12 controller hardware module.
13
14 - interrupt-parent: phandle of the parent interrupt controller.
15 - interrupts: Interrupt specifier for the controllers interrupt.
16
17 - gpio-controller: Marks the device node as a gpio controller.
18 - #gpio-cells: Should be 2. The first cell is the GPIO number and the second
19 cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the
20 GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
21 - gpio-ranges: Range of pins managed by the GPIO controller.
22
23Please refer to gpio.txt in this directory for details of gpio-ranges property
24and the common GPIO bindings used by client devices.
25
26Example: R8A7779 (R-Car H1) GPIO controller nodes
27
28 gpio0: gpio@ffc40000 {
29 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
30 reg = <0xffc40000 0x2c>;
31 interrupt-parent = <&gic>;
32 interrupts = <0 141 0x4>;
33 #gpio-cells = <2>;
34 gpio-controller;
35 gpio-ranges = <&pfc 0 0 32>;
36 };
37 ...
38 gpio6: gpio@ffc46000 {
39 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
40 reg = <0xffc46000 0x2c>;
41 interrupt-parent = <&gic>;
42 interrupts = <0 147 0x4>;
43 #gpio-cells = <2>;
44 gpio-controller;
45 gpio-ranges = <&pfc 0 192 9>;
46 };
diff --git a/Documentation/devicetree/bindings/gpu/samsung-g2d.txt b/Documentation/devicetree/bindings/gpu/samsung-g2d.txt
index 2b14a940eb75..3f454ffc654a 100644
--- a/Documentation/devicetree/bindings/gpu/samsung-g2d.txt
+++ b/Documentation/devicetree/bindings/gpu/samsung-g2d.txt
@@ -10,11 +10,16 @@ Required properties:
10 mapped region. 10 mapped region.
11 11
12 - interrupts : G2D interrupt number to the CPU. 12 - interrupts : G2D interrupt number to the CPU.
13 - clocks : from common clock binding: handle to G2D clocks.
14 - clock-names : from common clock binding: must contain "sclk_fimg2d" and
15 "fimg2d", corresponding to entries in the clocks property.
13 16
14Example: 17Example:
15 g2d@12800000 { 18 g2d@12800000 {
16 compatible = "samsung,s5pv210-g2d"; 19 compatible = "samsung,s5pv210-g2d";
17 reg = <0x12800000 0x1000>; 20 reg = <0x12800000 0x1000>;
18 interrupts = <0 89 0>; 21 interrupts = <0 89 0>;
22 clocks = <&clock 177>, <&clock 277>;
23 clock-names = "sclk_fimg2d", "fimg2d";
19 status = "disabled"; 24 status = "disabled";
20 }; 25 };
diff --git a/Documentation/devicetree/bindings/i2c/i2c-st-ddci2c.txt b/Documentation/devicetree/bindings/i2c/i2c-st-ddci2c.txt
new file mode 100644
index 000000000000..bd81a482634f
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-st-ddci2c.txt
@@ -0,0 +1,15 @@
1ST Microelectronics DDC I2C
2
3Required properties :
4- compatible : Must be "st,ddci2c"
5- reg: physical base address of the controller and length of memory mapped
6 region.
7- interrupts: interrupt number to the cpu.
8- #address-cells = <1>;
9- #size-cells = <0>;
10
11Optional properties:
12- Child nodes conforming to i2c bus binding
13
14Examples :
15
diff --git a/Documentation/devicetree/bindings/iio/dac/ad7303.txt b/Documentation/devicetree/bindings/iio/dac/ad7303.txt
new file mode 100644
index 000000000000..914610f0556e
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/ad7303.txt
@@ -0,0 +1,23 @@
1Analog Devices AD7303 DAC device driver
2
3Required properties:
4 - compatible: Must be "adi,ad7303"
5 - reg: SPI chip select number for the device
6 - spi-max-frequency: Max SPI frequency to use (< 30000000)
7 - Vdd-supply: Phandle to the Vdd power supply
8
9Optional properties:
10 - REF-supply: Phandle to the external reference voltage supply. This should
11 only be set if there is an external reference voltage connected to the REF
12 pin. If the property is not set Vdd/2 is used as the reference voltage.
13
14Example:
15
16 ad7303@4 {
17 compatible = "adi,ad7303";
18 reg = <4>;
19 spi-max-frequency = <10000000>;
20 Vdd-supply = <&vdd_supply>;
21 adi,use-external-reference;
22 REF-supply = <&vref_supply>;
23 };
diff --git a/Documentation/devicetree/bindings/iio/frequency/adf4350.txt b/Documentation/devicetree/bindings/iio/frequency/adf4350.txt
new file mode 100644
index 000000000000..f8c181d81d2d
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/frequency/adf4350.txt
@@ -0,0 +1,86 @@
1Analog Devices ADF4350/ADF4351 device driver
2
3Required properties:
4 - compatible: Should be one of
5 * "adi,adf4350": When using the ADF4350 device
6 * "adi,adf4351": When using the ADF4351 device
7 - reg: SPI chip select numbert for the device
8 - spi-max-frequency: Max SPI frequency to use (< 20000000)
9 - clocks: From common clock binding. Clock is phandle to clock for
10 ADF435x Reference Clock (CLKIN).
11
12Optional properties:
13 - gpios: GPIO Lock detect - If set with a valid phandle and GPIO number,
14 pll lock state is tested upon read.
15 - adi,channel-spacing: Channel spacing in Hz (influences MODULUS).
16 - adi,power-up-frequency: If set in Hz the PLL tunes to
17 the desired frequency on probe.
18 - adi,reference-div-factor: If set the driver skips dynamic calculation
19 and uses this default value instead.
20 - adi,reference-doubler-enable: Enables reference doubler.
21 - adi,reference-div2-enable: Enables reference divider.
22 - adi,phase-detector-polarity-positive-enable: Enables positive phase
23 detector polarity. Default = negative.
24 - adi,lock-detect-precision-6ns-enable: Enables 6ns lock detect precision.
25 Default = 10ns.
26 - adi,lock-detect-function-integer-n-enable: Enables lock detect
27 for integer-N mode. Default = factional-N mode.
28 - adi,charge-pump-current: Charge pump current in mA.
29 Default = 2500mA.
30 - adi,muxout-select: On chip multiplexer output selection.
31 Valid values for the multiplexer output are:
32 0: Three-State Output (default)
33 1: DVDD
34 2: DGND
35 3: R-Counter output
36 4: N-Divider output
37 5: Analog lock detect
38 6: Digital lock detect
39 - adi,low-spur-mode-enable: Enables low spur mode.
40 Default = Low noise mode.
41 - adi,cycle-slip-reduction-enable: Enables cycle slip reduction.
42 - adi,charge-cancellation-enable: Enabled charge pump
43 charge cancellation for integer-N modes.
44 - adi,anti-backlash-3ns-enable: Enables 3ns antibacklash pulse width
45 for integer-N modes.
46 - adi,band-select-clock-mode-high-enable: Enables faster band
47 selection logic.
48 - adi,12bit-clk-divider: Clock divider value used when
49 adi,12bit-clkdiv-mode != 0
50 - adi,clk-divider-mode:
51 Valid values for the clkdiv mode are:
52 0: Clock divider off (default)
53 1: Fast lock enable
54 2: Phase resync enable
55 - adi,aux-output-enable: Enables auxiliary RF output.
56 - adi,aux-output-fundamental-enable: Selects fundamental VCO output on
57 the auxiliary RF output. Default = Output of RF dividers.
58 - adi,mute-till-lock-enable: Enables Mute-Till-Lock-Detect function.
59 - adi,output-power: Output power selection.
60 Valid values for the power mode are:
61 0: -4dBm (default)
62 1: -1dBm
63 2: +2dBm
64 3: +5dBm
65 - adi,aux-output-power: Auxiliary output power selection.
66 Valid values for the power mode are:
67 0: -4dBm (default)
68 1: -1dBm
69 2: +2dBm
70 3: +5dBm
71
72
73Example:
74 lo_pll0_rx_adf4351: adf4351-rx-lpc@4 {
75 compatible = "adi,adf4351";
76 reg = <4>;
77 spi-max-frequency = <10000000>;
78 clocks = <&clk0_ad9523 9>;
79 clock-names = "clkin";
80 adi,channel-spacing = <10000>;
81 adi,power-up-frequency = <2400000000>;
82 adi,phase-detector-polarity-positive-enable;
83 adi,charge-pump-current = <2500>;
84 adi,output-power = <3>;
85 adi,mute-till-lock-enable;
86 };
diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt
new file mode 100644
index 000000000000..011679f1a425
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt
@@ -0,0 +1,18 @@
1* AsahiKASEI AK8975 magnetometer sensor
2
3Required properties:
4
5 - compatible : should be "asahi-kasei,ak8975"
6 - reg : the I2C address of the magnetometer
7
8Optional properties:
9
10 - gpios : should be device tree identifier of the magnetometer DRDY pin
11
12Example:
13
14ak8975@0c {
15 compatible = "asahi-kasei,ak8975";
16 reg = <0x0c>;
17 gpios = <&gpj0 7 0>;
18};
diff --git a/Documentation/devicetree/bindings/interrupt-controller/abilis,tb10x-ictl.txt b/Documentation/devicetree/bindings/interrupt-controller/abilis,tb10x-ictl.txt
new file mode 100644
index 000000000000..9d52d5afe3e9
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/abilis,tb10x-ictl.txt
@@ -0,0 +1,38 @@
1TB10x Top Level Interrupt Controller
2====================================
3
4The Abilis TB10x SOC contains a custom interrupt controller. It performs
5one-to-one mapping of external interrupt sources to CPU interrupts and
6provides support for reconfigurable trigger modes.
7
8Required properties
9-------------------
10
11- compatible: Should be "abilis,tb10x-ictl"
12- reg: specifies physical base address and size of register range.
13- interrupt-congroller: Identifies the node as an interrupt controller.
14- #interrupt cells: Specifies the number of cells used to encode an interrupt
15 source connected to this controller. The value shall be 2.
16- interrupt-parent: Specifies the parent interrupt controller.
17- interrupts: Specifies the list of interrupt lines which are handled by
18 the interrupt controller in the parent controller's notation. Interrupts
19 are mapped one-to-one to parent interrupts.
20
21Example
22-------
23
24intc: interrupt-controller { /* Parent interrupt controller */
25 interrupt-controller;
26 #interrupt-cells = <1>; /* For example below */
27 /* ... */
28};
29
30tb10x_ictl: pic@2000 { /* TB10x interrupt controller */
31 compatible = "abilis,tb10x-ictl";
32 reg = <0x2000 0x20>;
33 interrupt-controller;
34 #interrupt-cells = <2>;
35 interrupt-parent = <&intc>;
36 interrupts = <5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
37 20 21 22 23 24 25 26 27 28 29 30 31>;
38};
diff --git a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt
index e7f4dc14eff2..57edb30dbbca 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt
@@ -8,91 +8,8 @@ Required properties:
8- #interrupt-cells : Specifies the number of cells needed to encode an 8- #interrupt-cells : Specifies the number of cells needed to encode an
9 interrupt source. The value shall be 1. 9 interrupt source. The value shall be 1.
10 10
11The interrupt sources are as follows: 11For the valid interrupt sources for your SoC, see the documentation in
12 12sunxi/<soc>.txt
130: ENMI
141: UART0
152: UART1
163: UART2
174: UART3
185: IR0
196: IR1
207: I2C0
218: I2C1
229: I2C2
2310: SPI0
2411: SPI1
2512: SPI2
2613: SPDIF
2714: AC97
2815: TS
2916: I2S
3017: UART4
3118: UART5
3219: UART6
3320: UART7
3421: KEYPAD
3522: TIMER0
3623: TIMER1
3724: TIMER2
3825: TIMER3
3926: CAN
4027: DMA
4128: PIO
4229: TOUCH_PANEL
4330: AUDIO_CODEC
4431: LRADC
4532: SDMC0
4633: SDMC1
4734: SDMC2
4835: SDMC3
4936: MEMSTICK
5037: NAND
5138: USB0
5239: USB1
5340: USB2
5441: SCR
5542: CSI0
5643: CSI1
5744: LCDCTRL0
5845: LCDCTRL1
5946: MP
6047: DEFEBE0
6148: DEFEBE1
6249: PMU
6350: SPI3
6451: TZASC
6552: PATA
6653: VE
6754: SS
6855: EMAC
6956: SATA
7057: GPS
7158: HDMI
7259: TVE
7360: ACE
7461: TVD
7562: PS2_0
7663: PS2_1
7764: USB3
7865: USB4
7966: PLE_PFM
8067: TIMER4
8168: TIMER5
8269: GPU_GP
8370: GPU_GPMMU
8471: GPU_PP0
8572: GPU_PPMMU0
8673: GPU_PMU
8774: GPU_RSV0
8875: GPU_RSV1
8976: GPU_RSV2
9077: GPU_RSV3
9178: GPU_RSV4
9279: GPU_RSV5
9380: GPU_RSV6
9482: SYNC_TIMER0
9583: SYNC_TIMER1
96 13
97Example: 14Example:
98 15
diff --git a/Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt
new file mode 100644
index 000000000000..2c11ac76fac9
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt
@@ -0,0 +1,48 @@
1Marvell Orion SoC interrupt controllers
2
3* Main interrupt controller
4
5Required properties:
6- compatible: shall be "marvell,orion-intc"
7- reg: base address(es) of interrupt registers starting with CAUSE register
8- interrupt-controller: identifies the node as an interrupt controller
9- #interrupt-cells: number of cells to encode an interrupt source, shall be 1
10
11The interrupt sources map to the corresponding bits in the interrupt
12registers, i.e.
13- 0 maps to bit 0 of first base address,
14- 1 maps to bit 1 of first base address,
15- 32 maps to bit 0 of second base address, and so on.
16
17Example:
18 intc: interrupt-controller {
19 compatible = "marvell,orion-intc";
20 interrupt-controller;
21 #interrupt-cells = <1>;
22 /* Dove has 64 first level interrupts */
23 reg = <0x20200 0x10>, <0x20210 0x10>;
24 };
25
26* Bridge interrupt controller
27
28Required properties:
29- compatible: shall be "marvell,orion-bridge-intc"
30- reg: base address of bridge interrupt registers starting with CAUSE register
31- interrupts: bridge interrupt of the main interrupt controller
32- interrupt-controller: identifies the node as an interrupt controller
33- #interrupt-cells: number of cells to encode an interrupt source, shall be 1
34
35Optional properties:
36- marvell,#interrupts: number of interrupts provided by bridge interrupt
37 controller, defaults to 32 if not set
38
39Example:
40 bridge_intc: interrupt-controller {
41 compatible = "marvell,orion-bridge-intc";
42 interrupt-controller;
43 #interrupt-cells = <1>;
44 reg = <0x20110 0x8>;
45 interrupts = <0>;
46 /* Dove bridge provides 5 interrupts */
47 marvell,#interrupts = <5>;
48 };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt
new file mode 100644
index 000000000000..1f8b0c507c26
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt
@@ -0,0 +1,16 @@
1DT bindings for the R-/SH-Mobile irqpin controller
2
3Required properties:
4
5- compatible: has to be "renesas,intc-irqpin"
6- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in
7 interrupts.txt in this directory
8
9Optional properties:
10
11- any properties, listed in interrupts.txt, and any standard resource allocation
12 properties
13- sense-bitfield-width: width of a single sense bitfield in the SENSE register,
14 if different from the default 4 bits
15- control-parent: disable and enable interrupts on the parent interrupt
16 controller, needed for some broken implementations
diff --git a/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt
new file mode 100644
index 000000000000..76b98c834499
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt
@@ -0,0 +1,89 @@
1Allwinner A10 (sun4i) interrupt sources
2---------------------------------------
3
4The interrupt sources available for the Allwinner A10 SoC are the
5following one:
6
70: ENMI
81: UART0
92: UART1
103: UART2
114: UART3
125: IR0
136: IR1
147: I2C0
158: I2C1
169: I2C2
1710: SPI0
1811: SPI1
1912: SPI2
2013: SPDIF
2114: AC97
2215: TS
2316: I2S
2417: UART4
2518: UART5
2619: UART6
2720: UART7
2821: KEYPAD
2922: TIMER0
3023: TIMER1
3124: TIMER2
3225: TIMER3
3326: CAN
3427: DMA
3528: PIO
3629: TOUCH_PANEL
3730: AUDIO_CODEC
3831: LRADC
3932: MMC0
4033: MMC1
4134: MMC2
4235: MMC3
4336: MEMSTICK
4437: NAND
4538: USB0
4639: USB1
4740: USB2
4841: SCR
4942: CSI0
5043: CSI1
5144: LCDCTRL0
5245: LCDCTRL1
5346: MP
5447: DEFEBE0
5548: DEFEBE1
5649: PMU
5750: SPI3
5851: TZASC
5952: PATA
6053: VE
6154: SS
6255: EMAC
6356: SATA
6457: GPS
6558: HDMI
6659: TVE
6760: ACE
6861: TVD
6962: PS2_0
7063: PS2_1
7164: USB3
7265: USB4
7366: PLE_PFM
7467: TIMER4
7568: TIMER5
7669: GPU_GP
7770: GPU_GPMMU
7871: GPU_PP0
7972: GPU_PPMMU0
8073: GPU_PMU
8174: GPU_RSV0
8275: GPU_RSV1
8376: GPU_RSV2
8477: GPU_RSV3
8578: GPU_RSV4
8679: GPU_RSV5
8780: GPU_RSV6
8882: SYNC_TIMER0
8983: SYNC_TIMER1
diff --git a/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt
new file mode 100644
index 000000000000..2ec3b5ce1a0b
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt
@@ -0,0 +1,55 @@
1Allwinner A13 (sun5i) interrupt sources
2---------------------------------------
3
4The interrupt sources available for the Allwinner A13 SoC are the
5following one:
6
70: ENMI
82: UART1
94: UART3
105: IR
117: I2C0
128: I2C1
139: I2C2
1410: SPI0
1511: SPI1
1612: SPI2
1722: TIMER0
1823: TIMER1
1924: TIMER2
2025: TIMER3
2127: DMA
2228: PIO
2329: TOUCH_PANEL
2430: AUDIO_CODEC
2531: LRADC
2632: MMC0
2733: MMC1
2834: MMC2
2937: NAND
3038: USB OTG
3139: USB EHCI
3240: USB OHCI
3342: CSI
3444: LCDCTRL
3547: DEFEBE
3649: PMU
3753: VE
3854: SS
3966: PLE_PFM
4067: TIMER4
4168: TIMER5
4269: GPU_GP
4370: GPU_GPMMU
4471: GPU_PP0
4572: GPU_PPMMU0
4673: GPU_PMU
4774: GPU_RSV0
4875: GPU_RSV1
4976: GPU_RSV2
5077: GPU_RSV3
5178: GPU_RSV4
5279: GPU_RSV5
5380: GPU_RSV6
5482: SYNC_TIMER0
5583: SYNC_TIMER1
diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
new file mode 100644
index 000000000000..d5176882d8b9
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
@@ -0,0 +1,147 @@
1Binding for TI/National Semiconductor LP55xx Led Drivers
2
3Required properties:
4- compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562"
5- reg: I2C slave address
6- clock-mode: Input clock mode, (0: automode, 1: internal, 2: external)
7
8Each child has own specific current settings
9- led-cur: Current setting at each led channel (mA x10, 0 if led is not connected)
10- max-cur: Maximun current at each led channel.
11
12Optional properties:
13- label: Used for naming LEDs
14
15Alternatively, each child can have specific channel name
16- chan-name: Name of each channel name
17
18example 1) LP5521
193 LED channels, external clock used. Channel names are 'lp5521_pri:channel0',
20'lp5521_pri:channel1' and 'lp5521_pri:channel2'
21
22lp5521@32 {
23 compatible = "national,lp5521";
24 reg = <0x32>;
25 label = "lp5521_pri";
26 clock-mode = /bits/ 8 <2>;
27
28 chan0 {
29 led-cur = /bits/ 8 <0x2f>;
30 max-cur = /bits/ 8 <0x5f>;
31 };
32
33 chan1 {
34 led-cur = /bits/ 8 <0x2f>;
35 max-cur = /bits/ 8 <0x5f>;
36 };
37
38 chan2 {
39 led-cur = /bits/ 8 <0x2f>;
40 max-cur = /bits/ 8 <0x5f>;
41 };
42};
43
44example 2) LP5523
459 LED channels with specific name. Internal clock used.
46The I2C slave address is configurable with ASEL1 and ASEL0 pins.
47Available addresses are 32/33/34/35h.
48
49ASEL1 ASEL0 Address
50-------------------------
51 GND GND 32h
52 GND VEN 33h
53 VEN GND 34h
54 VEN VEN 35h
55
56lp5523@32 {
57 compatible = "national,lp5523";
58 reg = <0x32>;
59 clock-mode = /bits/ 8 <1>;
60
61 chan0 {
62 chan-name = "d1";
63 led-cur = /bits/ 8 <0x14>;
64 max-cur = /bits/ 8 <0x20>;
65 };
66
67 chan1 {
68 chan-name = "d2";
69 led-cur = /bits/ 8 <0x14>;
70 max-cur = /bits/ 8 <0x20>;
71 };
72
73 chan2 {
74 chan-name = "d3";
75 led-cur = /bits/ 8 <0x14>;
76 max-cur = /bits/ 8 <0x20>;
77 };
78
79 chan3 {
80 chan-name = "d4";
81 led-cur = /bits/ 8 <0x14>;
82 max-cur = /bits/ 8 <0x20>;
83 };
84
85 chan4 {
86 chan-name = "d5";
87 led-cur = /bits/ 8 <0x14>;
88 max-cur = /bits/ 8 <0x20>;
89 };
90
91 chan5 {
92 chan-name = "d6";
93 led-cur = /bits/ 8 <0x14>;
94 max-cur = /bits/ 8 <0x20>;
95 };
96
97 chan6 {
98 chan-name = "d7";
99 led-cur = /bits/ 8 <0x14>;
100 max-cur = /bits/ 8 <0x20>;
101 };
102
103 chan7 {
104 chan-name = "d8";
105 led-cur = /bits/ 8 <0x14>;
106 max-cur = /bits/ 8 <0x20>;
107 };
108
109 chan8 {
110 chan-name = "d9";
111 led-cur = /bits/ 8 <0x14>;
112 max-cur = /bits/ 8 <0x20>;
113 };
114};
115
116example 3) LP5562
1174 channels are defined.
118
119lp5562@30 {
120 compatible = "ti,lp5562";
121 reg = <0x30>;
122 clock-mode = /bits/8 <2>;
123
124 chan0 {
125 chan-name = "R";
126 led-cur = /bits/ 8 <0x20>;
127 max-cur = /bits/ 8 <0x60>;
128 };
129
130 chan1 {
131 chan-name = "G";
132 led-cur = /bits/ 8 <0x20>;
133 max-cur = /bits/ 8 <0x60>;
134 };
135
136 chan2 {
137 chan-name = "B";
138 led-cur = /bits/ 8 <0x20>;
139 max-cur = /bits/ 8 <0x60>;
140 };
141
142 chan3 {
143 chan-name = "W";
144 led-cur = /bits/ 8 <0x20>;
145 max-cur = /bits/ 8 <0x60>;
146 };
147};
diff --git a/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt b/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt
index 3f62adfb3e0b..de9f6b78ee51 100644
--- a/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt
+++ b/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt
@@ -2,7 +2,7 @@ Exynos4x12/Exynos5 SoC series camera host interface (FIMC-LITE)
2 2
3Required properties: 3Required properties:
4 4
5- compatible : should be "samsung,exynos4212-fimc" for Exynos4212 and 5- compatible : should be "samsung,exynos4212-fimc-lite" for Exynos4212 and
6 Exynos4412 SoCs; 6 Exynos4412 SoCs;
7- reg : physical base address and size of the device memory mapped 7- reg : physical base address and size of the device memory mapped
8 registers; 8 registers;
diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt
index bf0182d8da25..df37b0230c75 100644
--- a/Documentation/devicetree/bindings/media/s5p-mfc.txt
+++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt
@@ -15,6 +15,9 @@ Required properties:
15 mapped region. 15 mapped region.
16 16
17 - interrupts : MFC interrupt number to the CPU. 17 - interrupts : MFC interrupt number to the CPU.
18 - clocks : from common clock binding: handle to mfc clocks.
19 - clock-names : from common clock binding: must contain "sclk_mfc" and "mfc",
20 corresponding to entries in the clocks property.
18 21
19 - samsung,mfc-r : Base address of the first memory bank used by MFC 22 - samsung,mfc-r : Base address of the first memory bank used by MFC
20 for DMA contiguous memory allocation and its size. 23 for DMA contiguous memory allocation and its size.
@@ -34,6 +37,8 @@ mfc: codec@13400000 {
34 reg = <0x13400000 0x10000>; 37 reg = <0x13400000 0x10000>;
35 interrupts = <0 94 0>; 38 interrupts = <0 94 0>;
36 samsung,power-domain = <&pd_mfc>; 39 samsung,power-domain = <&pd_mfc>;
40 clocks = <&clock 170>, <&clock 273>;
41 clock-names = "sclk_mfc", "mfc";
37}; 42};
38 43
39Board specific DT entry: 44Board specific DT entry:
diff --git a/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt b/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt
new file mode 100644
index 000000000000..653c90c34a71
--- /dev/null
+++ b/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt
@@ -0,0 +1,156 @@
1Device tree bindings for MVEBU Device Bus controllers
2
3The Device Bus controller available in some Marvell's SoC allows to control
4different types of standard memory and I/O devices such as NOR, NAND, and FPGA.
5The actual devices are instantiated from the child nodes of a Device Bus node.
6
7Required properties:
8
9 - compatible: Currently only Armada 370/XP SoC are supported,
10 with this compatible string:
11
12 marvell,mvebu-devbus
13
14 - reg: A resource specifier for the register space.
15 This is the base address of a chip select within
16 the controller's register space.
17 (see the example below)
18
19 - #address-cells: Must be set to 1
20 - #size-cells: Must be set to 1
21 - ranges: Must be set up to reflect the memory layout with four
22 integer values for each chip-select line in use:
23 0 <physical address of mapping> <size>
24
25Mandatory timing properties for child nodes:
26
27Read parameters:
28
29 - devbus,turn-off-ps: Defines the time during which the controller does not
30 drive the AD bus after the completion of a device read.
31 This prevents contentions on the Device Bus after a read
32 cycle from a slow device.
33
34 - devbus,bus-width: Defines the bus width (e.g. <16>)
35
36 - devbus,badr-skew-ps: Defines the time delay from from A[2:0] toggle,
37 to read data sample. This parameter is useful for
38 synchronous pipelined devices, where the address
39 precedes the read data by one or two cycles.
40
41 - devbus,acc-first-ps: Defines the time delay from the negation of
42 ALE[0] to the cycle that the first read data is sampled
43 by the controller.
44
45 - devbus,acc-next-ps: Defines the time delay between the cycle that
46 samples data N and the cycle that samples data N+1
47 (in burst accesses).
48
49 - devbus,rd-setup-ps: Defines the time delay between DEV_CSn assertion to
50 DEV_OEn assertion. If set to 0 (default),
51 DEV_OEn and DEV_CSn are asserted at the same cycle.
52 This parameter has no affect on <acc-first-ps> parameter
53 (no affect on first data sample). Set <rd-setup-ps>
54 to a value smaller than <acc-first-ps>.
55
56 - devbus,rd-hold-ps: Defines the time between the last data sample to the
57 de-assertion of DEV_CSn. If set to 0 (default),
58 DEV_OEn and DEV_CSn are de-asserted at the same cycle
59 (the cycle of the last data sample).
60 This parameter has no affect on DEV_OEn de-assertion.
61 DEV_OEn is always de-asserted the next cycle after
62 last data sampled. Also this parameter has no
63 affect on <turn-off-ps> parameter.
64 Set <rd-hold-ps> to a value smaller than <turn-off-ps>.
65
66Write parameters:
67
68 - devbus,ale-wr-ps: Defines the time delay from the ALE[0] negation cycle
69 to the DEV_WEn assertion.
70
71 - devbus,wr-low-ps: Defines the time during which DEV_WEn is active.
72 A[2:0] and Data are kept valid as long as DEV_WEn
73 is active. This parameter defines the setup time of
74 address and data to DEV_WEn rise.
75
76 - devbus,wr-high-ps: Defines the time during which DEV_WEn is kept
77 inactive (high) between data beats of a burst write.
78 DEV_A[2:0] and Data are kept valid (do not toggle) for
79 <wr-high-ps> - <tick> ps.
80 This parameter defines the hold time of address and
81 data after DEV_WEn rise.
82
83 - devbus,sync-enable: Synchronous device enable.
84 1: True
85 0: False
86
87An example for an Armada XP GP board, with a 16 MiB NOR device as child
88is showed below. Note that the Device Bus driver is in charge of allocating
89the mbus address decoding window for each of its child devices.
90The window is created using the chip select specified in the child
91device node together with the base address and size specified in the ranges
92property. For instance, in the example below the allocated decoding window
93will start at base address 0xf0000000, with a size 0x1000000 (16 MiB)
94for chip select 0 (a.k.a DEV_BOOTCS).
95
96This address window handling is done in this mvebu-devbus only as a temporary
97solution. It will be removed when the support for mbus device tree binding is
98added.
99
100The reg property implicitly specifies the chip select as this:
101
102 0x10400: DEV_BOOTCS
103 0x10408: DEV_CS0
104 0x10410: DEV_CS1
105 0x10418: DEV_CS2
106 0x10420: DEV_CS3
107
108Example:
109
110 devbus-bootcs@d0010400 {
111 status = "okay";
112 ranges = <0 0xf0000000 0x1000000>; /* @addr 0xf0000000, size 0x1000000 */
113 #address-cells = <1>;
114 #size-cells = <1>;
115
116 /* Device Bus parameters are required */
117
118 /* Read parameters */
119 devbus,bus-width = <8>;
120 devbus,turn-off-ps = <60000>;
121 devbus,badr-skew-ps = <0>;
122 devbus,acc-first-ps = <124000>;
123 devbus,acc-next-ps = <248000>;
124 devbus,rd-setup-ps = <0>;
125 devbus,rd-hold-ps = <0>;
126
127 /* Write parameters */
128 devbus,sync-enable = <0>;
129 devbus,wr-high-ps = <60000>;
130 devbus,wr-low-ps = <60000>;
131 devbus,ale-wr-ps = <60000>;
132
133 flash@0 {
134 compatible = "cfi-flash";
135
136 /* 16 MiB */
137 reg = <0 0x1000000>;
138 bank-width = <2>;
139 #address-cells = <1>;
140 #size-cells = <1>;
141
142 /*
143 * We split the 16 MiB in two partitions,
144 * just as an example.
145 */
146 partition@0 {
147 label = "First";
148 reg = <0 0x800000>;
149 };
150
151 partition@800000 {
152 label = "Second";
153 reg = <0x800000 0x800000>;
154 };
155 };
156 };
diff --git a/Documentation/devicetree/bindings/mfd/ab8500.txt b/Documentation/devicetree/bindings/mfd/ab8500.txt
index c3a14e0ad0ad..cd9e90c5d171 100644
--- a/Documentation/devicetree/bindings/mfd/ab8500.txt
+++ b/Documentation/devicetree/bindings/mfd/ab8500.txt
@@ -120,7 +120,7 @@ ab8500 {
120 "USB_LINK_STATUS", 120 "USB_LINK_STATUS",
121 "USB_ADP_PROBE_PLUG", 121 "USB_ADP_PROBE_PLUG",
122 "USB_ADP_PROBE_UNPLUG"; 122 "USB_ADP_PROBE_UNPLUG";
123 vddulpivio18-supply = <&ab8500_ldo_initcore_reg>; 123 vddulpivio18-supply = <&ab8500_ldo_intcore_reg>;
124 v-ape-supply = <&db8500_vape_reg>; 124 v-ape-supply = <&db8500_vape_reg>;
125 musb_1v8-supply = <&db8500_vsmps2_reg>; 125 musb_1v8-supply = <&db8500_vsmps2_reg>;
126 }; 126 };
diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt
new file mode 100644
index 000000000000..0e295c9d8937
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/arizona.txt
@@ -0,0 +1,62 @@
1Wolfson Arizona class audio SoCs
2
3These devices are audio SoCs with extensive digital capabilites and a range
4of analogue I/O.
5
6Required properties:
7
8 - compatible : one of the following chip-specific strings:
9 "wlf,wm5102"
10 "wlf,wm5110"
11 - reg : I2C slave address when connected using I2C, chip select number when
12 using SPI.
13
14 - interrupts : The interrupt line the /IRQ signal for the device is
15 connected to.
16 - interrupt-controller : Arizona class devices contain interrupt controllers
17 and may provide interrupt services to other devices.
18 - interrupt-parent : The parent interrupt controller.
19 - #interrupt-cells: the number of cells to describe an IRQ, this should be 2.
20 The first cell is the IRQ number.
21 The second cell is the flags, encoded as the trigger masks from
22 Documentation/devicetree/bindings/interrupts.txt
23
24 - gpio-controller : Indicates this device is a GPIO controller.
25 - #gpio-cells : Must be 2. The first cell is the pin number and the
26 second cell is used to specify optional parameters (currently unused).
27
28 - AVDD1-supply, DBVDD1-supply, DBVDD2-supply, DBVDD3-supply, CPVDD-supply,
29 SPKVDDL-supply, SPKVDDR-supply : power supplies for the device, as covered
30 in Documentation/devicetree/bindings/regulator/regulator.txt
31
32Optional properties:
33
34 - wlf,reset : GPIO specifier for the GPIO controlling /RESET
35 - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA
36
37 - wlf,gpio-defaults : A list of GPIO configuration register values. If
38 absent, no configuration of these registers is performed. If any
39 entry has a value that is out of range for a 16 bit register then
40 the chip default will be used. If present exactly five values must
41 be specified.
42
43Example:
44
45codec: wm5102@1a {
46 compatible = "wlf,wm5102";
47 reg = <0x1a>;
48 interrupts = <347>;
49 #interrupt-cells = <2>;
50 interrupt-parent = <&gic>;
51
52 gpio-controller;
53 #gpio-cells = <2>;
54
55 wlf,gpio-defaults = <
56 0x00000000, /* AIF1TXLRCLK */
57 0xffffffff,
58 0xffffffff,
59 0xffffffff,
60 0xffffffff,
61 >;
62};
diff --git a/Documentation/devicetree/bindings/mfd/max77693.txt b/Documentation/devicetree/bindings/mfd/max77693.txt
new file mode 100644
index 000000000000..11921cc417bf
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/max77693.txt
@@ -0,0 +1,55 @@
1Maxim MAX77693 multi-function device
2
3MAX77693 is a Multifunction device with the following submodules:
4- PMIC,
5- CHARGER,
6- LED,
7- MUIC,
8- HAPTIC
9
10It is interfaced to host controller using i2c.
11This document describes the bindings for the mfd device.
12
13Required properties:
14- compatible : Must be "maxim,max77693".
15- reg : Specifies the i2c slave address of PMIC block.
16- interrupts : This i2c device has an IRQ line connected to the main SoC.
17- interrupt-parent : The parent interrupt controller.
18
19Optional properties:
20- regulators : The regulators of max77693 have to be instantiated under subnod
21 named "regulators" using the following format.
22
23 regulators {
24 regualtor-compatible = ESAFEOUT1/ESAFEOUT2/CHARGER
25 standard regulator constratints[*].
26 };
27
28 [*] refer Documentation/devicetree/bindings/regulator/regulator.txt
29
30Example:
31 max77693@66 {
32 compatible = "maxim,max77693";
33 reg = <0x66>;
34 interrupt-parent = <&gpx1>;
35 interrupts = <5 2>;
36
37 regulators {
38 esafeout@1 {
39 regulator-compatible = "ESAFEOUT1";
40 regulator-name = "ESAFEOUT1";
41 regulator-boot-on;
42 };
43 esafeout@2 {
44 regulator-compatible = "ESAFEOUT2";
45 regulator-name = "ESAFEOUT2";
46 };
47 charger@0 {
48 regulator-compatible = "CHARGER";
49 regulator-name = "CHARGER";
50 regulator-min-microamp = <60000>;
51 regulator-max-microamp = <2580000>;
52 regulator-boot-on;
53 };
54 };
55 };
diff --git a/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt b/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt
new file mode 100644
index 000000000000..094ae010f2fb
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt
@@ -0,0 +1,16 @@
1Broadcom BCM281xx SDHCI
2
3This file documents differences between the core properties in mmc.txt
4and the properties present in the bcm281xx SDHCI
5
6Required properties:
7- compatible : Should be "bcm,kona-sdhci"
8
9Example:
10
11sdio2: sdio@0x3f1a0000 {
12 compatible = "bcm,kona-sdhci";
13 reg = <0x3f1a0000 0x10000>;
14 interrupts = <0x0 74 0x4>;
15};
16
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
index 6a983c1d87cd..df338cb5059c 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -29,6 +29,13 @@ Optional properties:
29 "bch4" 4-bit BCH ecc code 29 "bch4" 4-bit BCH ecc code
30 "bch8" 8-bit BCH ecc code 30 "bch8" 8-bit BCH ecc code
31 31
32 - ti,nand-xfer-type: A string setting the data transfer type. One of:
33
34 "prefetch-polled" Prefetch polled mode (default)
35 "polled" Polled mode, without prefetch
36 "prefetch-dma" Prefetch enabled sDMA mode
37 "prefetch-irq" Prefetch enabled irq mode
38
32 - elm_id: Specifies elm device node. This is required to support BCH 39 - elm_id: Specifies elm device node. This is required to support BCH
33 error correction using ELM module. 40 error correction using ELM module.
34 41
@@ -55,6 +62,7 @@ Example for an AM33xx board:
55 reg = <0 0 0>; /* CS0, offset 0 */ 62 reg = <0 0 0>; /* CS0, offset 0 */
56 nand-bus-width = <16>; 63 nand-bus-width = <16>;
57 ti,nand-ecc-opt = "bch8"; 64 ti,nand-ecc-opt = "bch8";
65 ti,nand-xfer-type = "polled";
58 66
59 gpmc,sync-clk-ps = <0>; 67 gpmc,sync-clk-ps = <0>;
60 gpmc,cs-on-ns = <0>; 68 gpmc,cs-on-ns = <0>;
diff --git a/Documentation/devicetree/bindings/pci/designware-pcie.txt b/Documentation/devicetree/bindings/pci/designware-pcie.txt
new file mode 100644
index 000000000000..e2371f5cdebe
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/designware-pcie.txt
@@ -0,0 +1,73 @@
1* Synopsis Designware PCIe interface
2
3Required properties:
4- compatible: should contain "snps,dw-pcie" to identify the
5 core, plus an identifier for the specific instance, such
6 as "samsung,exynos5440-pcie".
7- reg: base addresses and lengths of the pcie controller,
8 the phy controller, additional register for the phy controller.
9- interrupts: interrupt values for level interrupt,
10 pulse interrupt, special interrupt.
11- clocks: from common clock binding: handle to pci clock.
12- clock-names: from common clock binding: should be "pcie" and "pcie_bus".
13- #address-cells: set to <3>
14- #size-cells: set to <2>
15- device_type: set to "pci"
16- ranges: ranges for the PCI memory and I/O regions
17- #interrupt-cells: set to <1>
18- interrupt-map-mask and interrupt-map: standard PCI properties
19 to define the mapping of the PCIe interface to interrupt
20 numbers.
21- reset-gpio: gpio pin number of power good signal
22
23Example:
24
25SoC specific DT Entry:
26
27 pcie@290000 {
28 compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
29 reg = <0x290000 0x1000
30 0x270000 0x1000
31 0x271000 0x40>;
32 interrupts = <0 20 0>, <0 21 0>, <0 22 0>;
33 clocks = <&clock 28>, <&clock 27>;
34 clock-names = "pcie", "pcie_bus";
35 #address-cells = <3>;
36 #size-cells = <2>;
37 device_type = "pci";
38 ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */
39 0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */
40 0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
41 #interrupt-cells = <1>;
42 interrupt-map-mask = <0 0 0 0>;
43 interrupt-map = <0x0 0 &gic 53>;
44 };
45
46 pcie@2a0000 {
47 compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
48 reg = <0x2a0000 0x1000
49 0x272000 0x1000
50 0x271040 0x40>;
51 interrupts = <0 23 0>, <0 24 0>, <0 25 0>;
52 clocks = <&clock 29>, <&clock 27>;
53 clock-names = "pcie", "pcie_bus";
54 #address-cells = <3>;
55 #size-cells = <2>;
56 device_type = "pci";
57 ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */
58 0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */
59 0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
60 #interrupt-cells = <1>;
61 interrupt-map-mask = <0 0 0 0>;
62 interrupt-map = <0x0 0 &gic 56>;
63 };
64
65Board specific DT Entry:
66
67 pcie@290000 {
68 reset-gpio = <&pin_ctrl 5 0>;
69 };
70
71 pcie@2a0000 {
72 reset-gpio = <&pin_ctrl 22 0>;
73 };
diff --git a/Documentation/devicetree/bindings/pci/mvebu-pci.txt b/Documentation/devicetree/bindings/pci/mvebu-pci.txt
new file mode 100644
index 000000000000..f8d405897a94
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/mvebu-pci.txt
@@ -0,0 +1,221 @@
1* Marvell EBU PCIe interfaces
2
3Mandatory properties:
4- compatible: one of the following values:
5 marvell,armada-370-pcie
6 marvell,armada-xp-pcie
7 marvell,kirkwood-pcie
8- #address-cells, set to <3>
9- #size-cells, set to <2>
10- #interrupt-cells, set to <1>
11- bus-range: PCI bus numbers covered
12- device_type, set to "pci"
13- ranges: ranges for the PCI memory and I/O regions, as well as the
14 MMIO registers to control the PCIe interfaces.
15
16In addition, the Device Tree node must have sub-nodes describing each
17PCIe interface, having the following mandatory properties:
18- reg: used only for interrupt mapping, so only the first four bytes
19 are used to refer to the correct bus number and device number.
20- assigned-addresses: reference to the MMIO registers used to control
21 this PCIe interface.
22- clocks: the clock associated to this PCIe interface
23- marvell,pcie-port: the physical PCIe port number
24- status: either "disabled" or "okay"
25- device_type, set to "pci"
26- #address-cells, set to <3>
27- #size-cells, set to <2>
28- #interrupt-cells, set to <1>
29- ranges, empty property.
30- interrupt-map-mask and interrupt-map, standard PCI properties to
31 define the mapping of the PCIe interface to interrupt numbers.
32
33and the following optional properties:
34- marvell,pcie-lane: the physical PCIe lane number, for ports having
35 multiple lanes. If this property is not found, we assume that the
36 value is 0.
37
38Example:
39
40pcie-controller {
41 compatible = "marvell,armada-xp-pcie";
42 status = "disabled";
43 device_type = "pci";
44
45 #address-cells = <3>;
46 #size-cells = <2>;
47
48 bus-range = <0x00 0xff>;
49
50 ranges = <0x82000000 0 0xd0040000 0xd0040000 0 0x00002000 /* Port 0.0 registers */
51 0x82000000 0 0xd0042000 0xd0042000 0 0x00002000 /* Port 2.0 registers */
52 0x82000000 0 0xd0044000 0xd0044000 0 0x00002000 /* Port 0.1 registers */
53 0x82000000 0 0xd0048000 0xd0048000 0 0x00002000 /* Port 0.2 registers */
54 0x82000000 0 0xd004c000 0xd004c000 0 0x00002000 /* Port 0.3 registers */
55 0x82000000 0 0xd0080000 0xd0080000 0 0x00002000 /* Port 1.0 registers */
56 0x82000000 0 0xd0082000 0xd0082000 0 0x00002000 /* Port 3.0 registers */
57 0x82000000 0 0xd0084000 0xd0084000 0 0x00002000 /* Port 1.1 registers */
58 0x82000000 0 0xd0088000 0xd0088000 0 0x00002000 /* Port 1.2 registers */
59 0x82000000 0 0xd008c000 0xd008c000 0 0x00002000 /* Port 1.3 registers */
60 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */
61 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */
62
63 pcie@1,0 {
64 device_type = "pci";
65 assigned-addresses = <0x82000800 0 0xd0040000 0 0x2000>;
66 reg = <0x0800 0 0 0 0>;
67 #address-cells = <3>;
68 #size-cells = <2>;
69 #interrupt-cells = <1>;
70 ranges;
71 interrupt-map-mask = <0 0 0 0>;
72 interrupt-map = <0 0 0 0 &mpic 58>;
73 marvell,pcie-port = <0>;
74 marvell,pcie-lane = <0>;
75 clocks = <&gateclk 5>;
76 status = "disabled";
77 };
78
79 pcie@2,0 {
80 device_type = "pci";
81 assigned-addresses = <0x82001000 0 0xd0044000 0 0x2000>;
82 reg = <0x1000 0 0 0 0>;
83 #address-cells = <3>;
84 #size-cells = <2>;
85 #interrupt-cells = <1>;
86 ranges;
87 interrupt-map-mask = <0 0 0 0>;
88 interrupt-map = <0 0 0 0 &mpic 59>;
89 marvell,pcie-port = <0>;
90 marvell,pcie-lane = <1>;
91 clocks = <&gateclk 6>;
92 status = "disabled";
93 };
94
95 pcie@3,0 {
96 device_type = "pci";
97 assigned-addresses = <0x82001800 0 0xd0048000 0 0x2000>;
98 reg = <0x1800 0 0 0 0>;
99 #address-cells = <3>;
100 #size-cells = <2>;
101 #interrupt-cells = <1>;
102 ranges;
103 interrupt-map-mask = <0 0 0 0>;
104 interrupt-map = <0 0 0 0 &mpic 60>;
105 marvell,pcie-port = <0>;
106 marvell,pcie-lane = <2>;
107 clocks = <&gateclk 7>;
108 status = "disabled";
109 };
110
111 pcie@4,0 {
112 device_type = "pci";
113 assigned-addresses = <0x82002000 0 0xd004c000 0 0x2000>;
114 reg = <0x2000 0 0 0 0>;
115 #address-cells = <3>;
116 #size-cells = <2>;
117 #interrupt-cells = <1>;
118 ranges;
119 interrupt-map-mask = <0 0 0 0>;
120 interrupt-map = <0 0 0 0 &mpic 61>;
121 marvell,pcie-port = <0>;
122 marvell,pcie-lane = <3>;
123 clocks = <&gateclk 8>;
124 status = "disabled";
125 };
126
127 pcie@5,0 {
128 device_type = "pci";
129 assigned-addresses = <0x82002800 0 0xd0080000 0 0x2000>;
130 reg = <0x2800 0 0 0 0>;
131 #address-cells = <3>;
132 #size-cells = <2>;
133 #interrupt-cells = <1>;
134 ranges;
135 interrupt-map-mask = <0 0 0 0>;
136 interrupt-map = <0 0 0 0 &mpic 62>;
137 marvell,pcie-port = <1>;
138 marvell,pcie-lane = <0>;
139 clocks = <&gateclk 9>;
140 status = "disabled";
141 };
142
143 pcie@6,0 {
144 device_type = "pci";
145 assigned-addresses = <0x82003000 0 0xd0084000 0 0x2000>;
146 reg = <0x3000 0 0 0 0>;
147 #address-cells = <3>;
148 #size-cells = <2>;
149 #interrupt-cells = <1>;
150 ranges;
151 interrupt-map-mask = <0 0 0 0>;
152 interrupt-map = <0 0 0 0 &mpic 63>;
153 marvell,pcie-port = <1>;
154 marvell,pcie-lane = <1>;
155 clocks = <&gateclk 10>;
156 status = "disabled";
157 };
158
159 pcie@7,0 {
160 device_type = "pci";
161 assigned-addresses = <0x82003800 0 0xd0088000 0 0x2000>;
162 reg = <0x3800 0 0 0 0>;
163 #address-cells = <3>;
164 #size-cells = <2>;
165 #interrupt-cells = <1>;
166 ranges;
167 interrupt-map-mask = <0 0 0 0>;
168 interrupt-map = <0 0 0 0 &mpic 64>;
169 marvell,pcie-port = <1>;
170 marvell,pcie-lane = <2>;
171 clocks = <&gateclk 11>;
172 status = "disabled";
173 };
174
175 pcie@8,0 {
176 device_type = "pci";
177 assigned-addresses = <0x82004000 0 0xd008c000 0 0x2000>;
178 reg = <0x4000 0 0 0 0>;
179 #address-cells = <3>;
180 #size-cells = <2>;
181 #interrupt-cells = <1>;
182 ranges;
183 interrupt-map-mask = <0 0 0 0>;
184 interrupt-map = <0 0 0 0 &mpic 65>;
185 marvell,pcie-port = <1>;
186 marvell,pcie-lane = <3>;
187 clocks = <&gateclk 12>;
188 status = "disabled";
189 };
190 pcie@9,0 {
191 device_type = "pci";
192 assigned-addresses = <0x82004800 0 0xd0042000 0 0x2000>;
193 reg = <0x4800 0 0 0 0>;
194 #address-cells = <3>;
195 #size-cells = <2>;
196 #interrupt-cells = <1>;
197 ranges;
198 interrupt-map-mask = <0 0 0 0>;
199 interrupt-map = <0 0 0 0 &mpic 99>;
200 marvell,pcie-port = <2>;
201 marvell,pcie-lane = <0>;
202 clocks = <&gateclk 26>;
203 status = "disabled";
204 };
205
206 pcie@10,0 {
207 device_type = "pci";
208 assigned-addresses = <0x82005000 0 0xd0082000 0 0x2000>;
209 reg = <0x5000 0 0 0 0>;
210 #address-cells = <3>;
211 #size-cells = <2>;
212 #interrupt-cells = <1>;
213 ranges;
214 interrupt-map-mask = <0 0 0 0>;
215 interrupt-map = <0 0 0 0 &mpic 103>;
216 marvell,pcie-port = <3>;
217 marvell,pcie-lane = <0>;
218 clocks = <&gateclk 27>;
219 status = "disabled";
220 };
221};
diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt
new file mode 100644
index 000000000000..41aeed38926d
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/pci.txt
@@ -0,0 +1,9 @@
1PCI bus bridges have standardized Device Tree bindings:
2
3PCI Bus Binding to: IEEE Std 1275-1994
4http://www.openfirmware.org/ofwg/bindings/pci/pci2_1.pdf
5
6And for the interrupt mapping part:
7
8Open Firmware Recommended Practice: Interrupt Mapping
9http://www.openfirmware.org/1275/practice/imap/imap0_9d.pdf
diff --git a/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt b/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt
new file mode 100644
index 000000000000..30b364e504ba
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt
@@ -0,0 +1,15 @@
1V3 Semiconductor V360 EPC PCI bridge
2
3This bridge is found in the ARM Integrator/AP (Application Platform)
4
5Integrator-specific notes:
6
7- syscon: should contain a link to the syscon device node (since
8 on the Integrator, some registers in the syscon are required to
9 operate the V3).
10
11V360 EPC specific notes:
12
13- reg: should contain the base address of the V3 adapter.
14- interrupts: should contain a reference to the V3 error interrupt
15 as routed on the system.
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt
index bcfdab5d442e..3a7caf7a744a 100644
--- a/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt
@@ -58,7 +58,7 @@ Some requirements for using fsl,imx-pinctrl binding:
58 58
59Examples: 59Examples:
60usdhc@0219c000 { /* uSDHC4 */ 60usdhc@0219c000 { /* uSDHC4 */
61 fsl,card-wired; 61 non-removable;
62 vmmc-supply = <&reg_3p3v>; 62 vmmc-supply = <&reg_3p3v>;
63 status = "okay"; 63 status = "okay";
64 pinctrl-names = "default"; 64 pinctrl-names = "default";
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,vf610-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,vf610-pinctrl.txt
new file mode 100644
index 000000000000..ddcdeb697c29
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/fsl,vf610-pinctrl.txt
@@ -0,0 +1,41 @@
1Freescale Vybrid VF610 IOMUX Controller
2
3Please refer to fsl,imx-pinctrl.txt in this directory for common binding part
4and usage.
5
6Required properties:
7- compatible: "fsl,vf610-iomuxc"
8- fsl,pins: two integers array, represents a group of pins mux and config
9 setting. The format is fsl,pins = <PIN_FUNC_ID CONFIG>, PIN_FUNC_ID is
10 a pin working on a specific function, CONFIG is the pad setting value
11 such as pull-up, speed, ode for this pin. Please refer to Vybrid VF610
12 datasheet for the valid pad config settings.
13
14CONFIG bits definition:
15PAD_CTL_SPEED_LOW (1 << 12)
16PAD_CTL_SPEED_MED (2 << 12)
17PAD_CTL_SPEED_HIGH (3 << 12)
18PAD_CTL_SRE_FAST (1 << 11)
19PAD_CTL_SRE_SLOW (0 << 11)
20PAD_CTL_ODE (1 << 10)
21PAD_CTL_HYS (1 << 9)
22PAD_CTL_DSE_DISABLE (0 << 6)
23PAD_CTL_DSE_150ohm (1 << 6)
24PAD_CTL_DSE_75ohm (2 << 6)
25PAD_CTL_DSE_50ohm (3 << 6)
26PAD_CTL_DSE_37ohm (4 << 6)
27PAD_CTL_DSE_30ohm (5 << 6)
28PAD_CTL_DSE_25ohm (6 << 6)
29PAD_CTL_DSE_20ohm (7 << 6)
30PAD_CTL_PUS_100K_DOWN (0 << 4)
31PAD_CTL_PUS_47K_UP (1 << 4)
32PAD_CTL_PUS_100K_UP (2 << 4)
33PAD_CTL_PUS_22K_UP (3 << 4)
34PAD_CTL_PKE (1 << 3)
35PAD_CTL_PUE (1 << 2)
36PAD_CTL_OBE_ENABLE (1 << 1)
37PAD_CTL_IBE_ENABLE (1 << 0)
38PAD_CTL_OBE_IBE_ENABLE (3 << 0)
39
40Please refer to vf610-pinfunc.h in device tree source folder
41for all available PIN_FUNC_ID for Vybrid VF610.
diff --git a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt
new file mode 100644
index 000000000000..a186181c402b
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt
@@ -0,0 +1,127 @@
1ImgTec TZ1090 PDC pin controller
2
3Required properties:
4- compatible: "img,tz1090-pdc-pinctrl"
5- reg: Should contain the register physical address and length of the
6 SOC_GPIO_CONTROL registers in the PDC register region.
7
8Please refer to pinctrl-bindings.txt in this directory for details of the
9common pinctrl bindings used by client devices, including the meaning of the
10phrase "pin configuration node".
11
12TZ1090-PDC's pin configuration nodes act as a container for an abitrary number
13of subnodes. Each of these subnodes represents some desired configuration for a
14pin, a group, or a list of pins or groups. This configuration can include the
15mux function to select on those pin(s)/group(s), and various pin configuration
16parameters, such as pull-up, drive strength, etc.
17
18The name of each subnode is not important; all subnodes should be enumerated
19and processed purely based on their content.
20
21Each subnode only affects those parameters that are explicitly listed. In
22other words, a subnode that lists a mux function but no pin configuration
23parameters implies no information about any pin configuration parameters.
24Similarly, a pin subnode that describes a pullup parameter implies no
25information about e.g. the mux function. For this reason, even seemingly boolean
26values are actually tristates in this binding: unspecified, off, or on.
27Unspecified is represented as an absent property, and off/on are represented as
28integer values 0 and 1.
29
30Required subnode-properties:
31- tz1090,pins : An array of strings. Each string contains the name of a pin or
32 group. Valid values for these names are listed below.
33
34Optional subnode-properties:
35- tz1090,function: A string containing the name of the function to mux to the
36 pin or group. Valid values for function names are listed below, including
37 which pingroups can be muxed to them.
38- supported generic pinconfig properties (for further details see
39 Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt):
40 - bias-disable
41 - bias-high-impedance
42 - bias-bus-hold
43 - bias-pull-up
44 - bias-pull-down
45 - input-schmitt-enable
46 - input-schmitt-disable
47 - drive-strength: Integer, control drive strength of pins in mA.
48 2: 2mA
49 4: 4mA
50 8: 8mA
51 12: 12mA
52 - low-power-enable: Flag, power-on-start weak pull-down for invalid power.
53 - low-power-disable: Flag, power-on-start weak pull-down disabled.
54
55Note that many of these properties are only valid for certain specific pins
56or groups. See the TZ1090 TRM for complete details regarding which groups
57support which functionality. The Linux pinctrl driver may also be a useful
58reference.
59
60Valid values for pin and group names are:
61
62 pins:
63
64 These all support bias-high-impediance, bias-pull-up, bias-pull-down, and
65 bias-bus-hold (which can also be provided to any of the groups below to set
66 it for all gpio pins in that group).
67
68 gpio0, gpio1, sys_wake0, sys_wake1, sys_wake2, ir_data, ext_power.
69
70 mux groups:
71
72 These all support function.
73
74 gpio0
75 pins: gpio0.
76 function: ir_mod_stable_out.
77 gpio1
78 pins: gpio1.
79 function: ir_mod_power_out.
80
81 drive groups:
82
83 These support input-schmitt-enable, input-schmitt-disable,
84 drive-strength, low-power-enable, and low-power-disable.
85
86 pdc
87 pins: gpio0, gpio1, sys_wake0, sys_wake1, sys_wake2, ir_data,
88 ext_power.
89
90Example:
91
92 pinctrl_pdc: pinctrl@02006500 {
93 #gpio-range-cells = <3>;
94 compatible = "img,tz1090-pdc-pinctrl";
95 reg = <0x02006500 0x100>;
96 };
97
98Example board file extracts:
99
100 &pinctrl_pdc {
101 pinctrl-names = "default";
102 pinctrl-0 = <&syswake_default>;
103
104 syswake_default: syswakes {
105 syswake_cfg {
106 tz1090,pins = "sys_wake0",
107 "sys_wake1",
108 "sys_wake2";
109 pull-up;
110 };
111 };
112 irmod_default: irmod {
113 gpio0_cfg {
114 tz1090,pins = "gpio0";
115 tz1090,function = "ir_mod_stable_out";
116 };
117 gpio1_cfg {
118 tz1090,pins = "gpio1";
119 tz1090,function = "ir_mod_power_out";
120 };
121 };
122 };
123
124 ir: ir@02006200 {
125 pinctrl-names = "default";
126 pinctrl-0 = <&irmod_default>;
127 };
diff --git a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt
new file mode 100644
index 000000000000..4b27c99f7f9d
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt
@@ -0,0 +1,227 @@
1ImgTec TZ1090 pin controller
2
3Required properties:
4- compatible: "img,tz1090-pinctrl"
5- reg: Should contain the register physical address and length of the pad
6 configuration registers (CR_PADS_* and CR_IF_CTL0).
7
8Please refer to pinctrl-bindings.txt in this directory for details of the
9common pinctrl bindings used by client devices, including the meaning of the
10phrase "pin configuration node".
11
12TZ1090's pin configuration nodes act as a container for an abitrary number of
13subnodes. Each of these subnodes represents some desired configuration for a
14pin, a group, or a list of pins or groups. This configuration can include the
15mux function to select on those pin(s)/group(s), and various pin configuration
16parameters, such as pull-up, drive strength, etc.
17
18The name of each subnode is not important; all subnodes should be enumerated
19and processed purely based on their content.
20
21Each subnode only affects those parameters that are explicitly listed. In
22other words, a subnode that lists a mux function but no pin configuration
23parameters implies no information about any pin configuration parameters.
24Similarly, a pin subnode that describes a pullup parameter implies no
25information about e.g. the mux function. For this reason, even seemingly boolean
26values are actually tristates in this binding: unspecified, off, or on.
27Unspecified is represented as an absent property, and off/on are represented as
28integer values 0 and 1.
29
30Required subnode-properties:
31- tz1090,pins : An array of strings. Each string contains the name of a pin or
32 group. Valid values for these names are listed below.
33
34Optional subnode-properties:
35- tz1090,function: A string containing the name of the function to mux to the
36 pin or group. Valid values for function names are listed below, including
37 which pingroups can be muxed to them.
38- supported generic pinconfig properties (for further details see
39 Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt):
40 - bias-disable
41 - bias-high-impedance
42 - bias-bus-hold
43 - bias-pull-up
44 - bias-pull-down
45 - input-schmitt-enable
46 - input-schmitt-disable
47 - drive-strength: Integer, control drive strength of pins in mA.
48 2: 2mA
49 4: 4mA
50 8: 8mA
51 12: 12mA
52
53
54Note that many of these properties are only valid for certain specific pins
55or groups. See the TZ1090 TRM for complete details regarding which groups
56support which functionality. The Linux pinctrl driver may also be a useful
57reference.
58
59Valid values for pin and group names are:
60
61 gpio pins:
62
63 These all support bias-high-impediance, bias-pull-up, bias-pull-down, and
64 bias-bus-hold (which can also be provided to any of the groups below to set
65 it for all pins in that group).
66
67 They also all support the some form of muxing. Any pins which are contained
68 in one of the mux groups (see below) can be muxed only to the functions
69 supported by the mux group. All other pins can be muxed to the "perip"
70 function which which enables them with their intended peripheral.
71
72 Different pins in the same mux group cannot be muxed to different functions,
73 however it is possible to mux only a subset of the pins in a mux group to a
74 particular function and leave the remaining pins unmuxed. This is useful if
75 the board connects certain pins in a group to other devices to be controlled
76 by GPIO, and you don't want the usual peripheral to have any control of the
77 pin.
78
79 ant_sel0, ant_sel1, gain0, gain1, gain2, gain3, gain4, gain5, gain6, gain7,
80 i2s_bclk_out, i2s_din, i2s_dout0, i2s_dout1, i2s_dout2, i2s_lrclk_out,
81 i2s_mclk, pa_on, pdm_a, pdm_b, pdm_c, pdm_d, pll_on, rx_hp, rx_on,
82 scb0_sclk, scb0_sdat, scb1_sclk, scb1_sdat, scb2_sclk, scb2_sdat, sdh_cd,
83 sdh_clk_in, sdh_wp, sdio_clk, sdio_cmd, sdio_d0, sdio_d1, sdio_d2, sdio_d3,
84 spi0_cs0, spi0_cs1, spi0_cs2, spi0_din, spi0_dout, spi0_mclk, spi1_cs0,
85 spi1_cs1, spi1_cs2, spi1_din, spi1_dout, spi1_mclk, tft_blank_ls, tft_blue0,
86 tft_blue1, tft_blue2, tft_blue3, tft_blue4, tft_blue5, tft_blue6, tft_blue7,
87 tft_green0, tft_green1, tft_green2, tft_green3, tft_green4, tft_green5,
88 tft_green6, tft_green7, tft_hsync_nr, tft_panelclk, tft_pwrsave, tft_red0,
89 tft_red1, tft_red2, tft_red3, tft_red4, tft_red5, tft_red6, tft_red7,
90 tft_vd12acb, tft_vdden_gd, tft_vsync_ns, tx_on, uart0_cts, uart0_rts,
91 uart0_rxd, uart0_txd, uart1_rxd, uart1_txd.
92
93 bias-high-impediance: supported.
94 bias-pull-up: supported.
95 bias-pull-down: supported.
96 bias-bus-hold: supported.
97 function: perip or those supported by pin's mux group.
98
99 other pins:
100
101 These other pins are part of various pin groups below, but can't be
102 controlled as GPIOs. They do however support bias-high-impediance,
103 bias-pull-up, bias-pull-down, and bias-bus-hold (which can also be provided
104 to any of the groups below to set it for all pins in that group).
105
106 clk_out0, clk_out1, tck, tdi, tdo, tms, trst.
107
108 bias-high-impediance: supported.
109 bias-pull-up: supported.
110 bias-pull-down: supported.
111 bias-bus-hold: supported.
112
113 mux groups:
114
115 These all support function, and some support drive configs.
116
117 afe
118 pins: tx_on, rx_on, pll_on, pa_on, rx_hp, ant_sel0,
119 ant_sel1, gain0, gain1, gain2, gain3, gain4,
120 gain5, gain6, gain7.
121 function: afe, ts_out_0.
122 input-schmitt-enable: supported.
123 input-schmitt-disable: supported.
124 drive-strength: supported.
125 pdm_d
126 pins: pdm_d.
127 function: pdm_dac, usb_vbus.
128 sdh
129 pins: sdh_cd, sdh_wp, sdh_clk_in.
130 function: sdh, sdio.
131 sdio
132 pins: sdio_clk, sdio_cmd, sdio_d0, sdio_d1, sdio_d2,
133 sdio_d3.
134 function: sdio, sdh.
135 spi1_cs2
136 pins: spi1_cs2.
137 function: spi1_cs2, usb_vbus.
138 tft
139 pins: tft_red0, tft_red1, tft_red2, tft_red3,
140 tft_red4, tft_red5, tft_red6, tft_red7,
141 tft_green0, tft_green1, tft_green2, tft_green3,
142 tft_green4, tft_green5, tft_green6, tft_green7,
143 tft_blue0, tft_blue1, tft_blue2, tft_blue3,
144 tft_blue4, tft_blue5, tft_blue6, tft_blue7,
145 tft_vdden_gd, tft_panelclk, tft_blank_ls,
146 tft_vsync_ns, tft_hsync_nr, tft_vd12acb,
147 tft_pwrsave.
148 function: tft, ext_dac, not_iqadc_stb, iqdac_stb, ts_out_1,
149 lcd_trace, phy_ringosc.
150 input-schmitt-enable: supported.
151 input-schmitt-disable: supported.
152 drive-strength: supported.
153
154 drive groups:
155
156 These all support input-schmitt-enable, input-schmitt-disable,
157 and drive-strength.
158
159 jtag
160 pins: tck, trst, tdi, tdo, tms.
161 scb1
162 pins: scb1_sdat, scb1_sclk.
163 scb2
164 pins: scb2_sdat, scb2_sclk.
165 spi0
166 pins: spi0_mclk, spi0_cs0, spi0_cs1, spi0_cs2, spi0_dout, spi0_din.
167 spi1
168 pins: spi1_mclk, spi1_cs0, spi1_cs1, spi1_cs2, spi1_dout, spi1_din.
169 uart
170 pins: uart0_txd, uart0_rxd, uart0_rts, uart0_cts,
171 uart1_txd, uart1_rxd.
172 drive_i2s
173 pins: clk_out1, i2s_din, i2s_dout0, i2s_dout1, i2s_dout2,
174 i2s_lrclk_out, i2s_bclk_out, i2s_mclk.
175 drive_pdm
176 pins: clk_out0, pdm_b, pdm_a.
177 drive_scb0
178 pins: scb0_sclk, scb0_sdat, pdm_d, pdm_c.
179 drive_sdio
180 pins: sdio_clk, sdio_cmd, sdio_d0, sdio_d1, sdio_d2, sdio_d3,
181 sdh_wp, sdh_cd, sdh_clk_in.
182
183 convenience groups:
184
185 These are just convenient groupings of pins and don't support any drive
186 configs.
187
188 uart0
189 pins: uart0_cts, uart0_rts, uart0_rxd, uart0_txd.
190 uart1
191 pins: uart1_rxd, uart1_txd.
192 scb0
193 pins: scb0_sclk, scb0_sdat.
194 i2s
195 pins: i2s_bclk_out, i2s_din, i2s_dout0, i2s_dout1, i2s_dout2,
196 i2s_lrclk_out, i2s_mclk.
197
198Example:
199
200 pinctrl: pinctrl@02005800 {
201 #gpio-range-cells = <3>;
202 compatible = "img,tz1090-pinctrl";
203 reg = <0x02005800 0xe4>;
204 };
205
206Example board file extract:
207
208 &pinctrl {
209 uart0_default: uart0 {
210 uart0_cfg {
211 tz1090,pins = "uart0_rxd",
212 "uart0_txd";
213 tz1090,function = "perip";
214 };
215 };
216 tft_default: tft {
217 tft_cfg {
218 tz1090,pins = "tft";
219 tz1090,function = "tft";
220 };
221 };
222 };
223
224 uart@02004b00 {
225 pinctrl-names = "default";
226 pinctrl-0 = <&uart0_default>;
227 };
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt
index a648aaad6110..50ec3512a292 100644
--- a/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt
@@ -10,29 +10,31 @@ Required properties:
10Available mpp pins/groups and functions: 10Available mpp pins/groups and functions:
11Note: brackets (x) are not part of the mpp name for marvell,function and given 11Note: brackets (x) are not part of the mpp name for marvell,function and given
12only for more detailed description in this document. 12only for more detailed description in this document.
13Note: pmu* also allows for Power Management functions listed below
13 14
14name pins functions 15name pins functions
15================================================================================ 16================================================================================
16mpp0 0 gpio, pmu, uart2(rts), sdio0(cd), lcd0(pwm) 17mpp0 0 gpio, pmu, uart2(rts), sdio0(cd), lcd0(pwm), pmu*
17mpp1 1 gpio, pmu, uart2(cts), sdio0(wp), lcd1(pwm) 18mpp1 1 gpio, pmu, uart2(cts), sdio0(wp), lcd1(pwm), pmu*
18mpp2 2 gpio, pmu, uart2(txd), sdio0(buspwr), sata(prsnt), 19mpp2 2 gpio, pmu, uart2(txd), sdio0(buspwr), sata(prsnt),
19 uart1(rts) 20 uart1(rts), pmu*
20mpp3 3 gpio, pmu, uart2(rxd), sdio0(ledctrl), sata(act), 21mpp3 3 gpio, pmu, uart2(rxd), sdio0(ledctrl), sata(act),
21 uart1(cts), lcd-spi(cs1) 22 uart1(cts), lcd-spi(cs1), pmu*
22mpp4 4 gpio, pmu, uart3(rts), sdio1(cd), spi1(miso) 23mpp4 4 gpio, pmu, uart3(rts), sdio1(cd), spi1(miso), pmu*
23mpp5 5 gpio, pmu, uart3(cts), sdio1(wp), spi1(cs) 24mpp5 5 gpio, pmu, uart3(cts), sdio1(wp), spi1(cs), pmu*
24mpp6 6 gpio, pmu, uart3(txd), sdio1(buspwr), spi1(mosi) 25mpp6 6 gpio, pmu, uart3(txd), sdio1(buspwr), spi1(mosi), pmu*
25mpp7 7 gpio, pmu, uart3(rxd), sdio1(ledctrl), spi1(sck) 26mpp7 7 gpio, pmu, uart3(rxd), sdio1(ledctrl), spi1(sck), pmu*
26mpp8 8 gpio, pmu, watchdog(rstout) 27mpp8 8 gpio, pmu, watchdog(rstout), pmu*
27mpp9 9 gpio, pmu, pex1(clkreq) 28mpp9 9 gpio, pmu, pex1(clkreq), pmu*
28mpp10 10 gpio, pmu, ssp(sclk) 29mpp10 10 gpio, pmu, ssp(sclk), pmu*
29mpp11 11 gpio, pmu, sata(prsnt), sata-1(act), sdio0(ledctrl), 30mpp11 11 gpio, pmu, sata(prsnt), sata-1(act), sdio0(ledctrl),
30 sdio1(ledctrl), pex0(clkreq) 31 sdio1(ledctrl), pex0(clkreq), pmu*
31mpp12 12 gpio, pmu, uart2(rts), audio0(extclk), sdio1(cd), sata(act) 32mpp12 12 gpio, pmu, uart2(rts), audio0(extclk), sdio1(cd),
33 sata(act), pmu*
32mpp13 13 gpio, pmu, uart2(cts), audio1(extclk), sdio1(wp), 34mpp13 13 gpio, pmu, uart2(cts), audio1(extclk), sdio1(wp),
33 ssp(extclk) 35 ssp(extclk), pmu*
34mpp14 14 gpio, pmu, uart2(txd), sdio1(buspwr), ssp(rxd) 36mpp14 14 gpio, pmu, uart2(txd), sdio1(buspwr), ssp(rxd), pmu*
35mpp15 15 gpio, pmu, uart2(rxd), sdio1(ledctrl), ssp(sfrm) 37mpp15 15 gpio, pmu, uart2(rxd), sdio1(ledctrl), ssp(sfrm), pmu*
36mpp16 16 gpio, uart3(rts), sdio0(cd), ac97(sdi1), lcd-spi(cs1) 38mpp16 16 gpio, uart3(rts), sdio0(cd), ac97(sdi1), lcd-spi(cs1)
37mpp17 17 gpio, uart3(cts), sdio0(wp), ac97(sdi2), twsi(sda), 39mpp17 17 gpio, uart3(cts), sdio0(wp), ac97(sdi2), twsi(sda),
38 ac97-1(sysclko) 40 ac97-1(sysclko)
@@ -57,6 +59,21 @@ mpp_nand 64-71 gpo, nand
57audio0 - i2s, ac97 59audio0 - i2s, ac97
58twsi - none, opt1, opt2, opt3 60twsi - none, opt1, opt2, opt3
59 61
62Power Management functions (pmu*):
63pmu-nc Pin not driven by any PM function
64pmu-low Pin driven low (0)
65pmu-high Pin driven high (1)
66pmic(sdi) Pin is used for PMIC SDI
67cpu-pwr-down Pin is used for CPU_PWRDWN
68standby-pwr-down Pin is used for STBY_PWRDWN
69core-pwr-good Pin is used for CORE_PWR_GOOD (Pins 0-7 only)
70cpu-pwr-good Pin is used for CPU_PWR_GOOD (Pins 8-15 only)
71bat-fault Pin is used for BATTERY_FAULT
72ext0-wakeup Pin is used for EXT0_WU
73ext1-wakeup Pin is used for EXT0_WU
74ext2-wakeup Pin is used for EXT0_WU
75pmu-blink Pin is used for blink function
76
60Notes: 77Notes:
61* group "mpp_audio1" allows the following functions and gpio pins: 78* group "mpp_audio1" allows the following functions and gpio pins:
62 - gpio : gpio on pins 52-57 79 - gpio : gpio on pins 52-57
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
index c95ea8278f87..aeb3c995cc04 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
@@ -126,3 +126,51 @@ device; they may be grandchildren, for example. Whether this is legal, and
126whether there is any interaction between the child and intermediate parent 126whether there is any interaction between the child and intermediate parent
127nodes, is again defined entirely by the binding for the individual pin 127nodes, is again defined entirely by the binding for the individual pin
128controller device. 128controller device.
129
130== Using generic pinconfig options ==
131
132Generic pinconfig parameters can be used by defining a separate node containing
133the applicable parameters (and optional values), like:
134
135pcfg_pull_up: pcfg_pull_up {
136 bias-pull-up;
137 drive-strength = <20>;
138};
139
140This node should then be referenced in the appropriate pinctrl node as a phandle
141and parsed in the driver using the pinconf_generic_parse_dt_config function.
142
143Supported configuration parameters are:
144
145bias-disable - disable any pin bias
146bias-high-impedance - high impedance mode ("third-state", "floating")
147bias-bus-hold - latch weakly
148bias-pull-up - pull up the pin
149bias-pull-down - pull down the pin
150bias-pull-pin-default - use pin-default pull state
151drive-push-pull - drive actively high and low
152drive-open-drain - drive with open drain
153drive-open-source - drive with open source
154drive-strength - sink or source at most X mA
155input-schmitt-enable - enable schmitt-trigger mode
156input-schmitt-disable - disable schmitt-trigger mode
157input-debounce - debounce mode with debound time X
158low-power-enable - enable low power mode
159low-power-disable - disable low power mode
160output-low - set the pin to output mode with low level
161output-high - set the pin to output mode with high level
162
163Arguments for parameters:
164
165- bias-pull-up, -down and -pin-default take as optional argument on hardware
166 supporting it the pull strength in Ohm. bias-disable will disable the pull.
167
168- drive-strength takes as argument the target strength in mA.
169
170- input-debounce takes the debounce time in usec as argument
171 or 0 to disable debouncing
172
173All parameters not listed here, do not take an argument.
174
175More in-depth documentation on these parameters can be found in
176<include/linux/pinctrl/pinconfig-generic.h>
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
index 08f0c3d01575..5a02e30dd262 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
@@ -18,7 +18,8 @@ Optional properties:
18 pin functions is ignored 18 pin functions is ignored
19 19
20- pinctrl-single,bit-per-mux : boolean to indicate that one register controls 20- pinctrl-single,bit-per-mux : boolean to indicate that one register controls
21 more than one pin 21 more than one pin, for which "pinctrl-single,function-mask" property specifies
22 position mask of pin.
22 23
23- pinctrl-single,drive-strength : array of value that are used to configure 24- pinctrl-single,drive-strength : array of value that are used to configure
24 drive strength in the pinmux register. They're value of drive strength 25 drive strength in the pinmux register. They're value of drive strength
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt
new file mode 100644
index 000000000000..05bf82a07dfd
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt
@@ -0,0 +1,110 @@
1*ST pin controller.
2
3Each multi-function pin is controlled, driven and routed through the
4PIO multiplexing block. Each pin supports GPIO functionality (ALT0)
5and multiple alternate functions(ALT1 - ALTx) that directly connect
6the pin to different hardware blocks.
7
8When a pin is in GPIO mode, Output Enable (OE), Open Drain(OD), and
9Pull Up (PU) are driven by the related PIO block.
10
11ST pinctrl driver controls PIO multiplexing block and also interacts with
12gpio driver to configure a pin.
13
14Required properties: (PIO multiplexing block)
15- compatible : should be "st,<SOC>-<pio-block>-pinctrl"
16 like st,stih415-sbc-pinctrl, st,stih415-front-pinctrl and so on.
17- gpio-controller : Indicates this device is a GPIO controller
18- #gpio-cells : Should be one. The first cell is the pin number.
19- st,retime-pin-mask : Should be mask to specify which pins can be retimed.
20 If the property is not present, it is assumed that all the pins in the
21 bank are capable of retiming. Retiming is mainly used to improve the
22 IO timing margins of external synchronous interfaces.
23- st,bank-name : Should be a name string for this bank as
24 specified in datasheet.
25- st,syscfg : Should be a phandle of the syscfg node.
26
27Example:
28 pin-controller-sbc {
29 #address-cells = <1>;
30 #size-cells = <1>;
31 compatible = "st,stih415-sbc-pinctrl";
32 st,syscfg = <&syscfg_sbc>;
33 ranges = <0 0xfe610000 0x5000>;
34 PIO0: gpio@fe610000 {
35 gpio-controller;
36 #gpio-cells = <1>;
37 reg = <0 0x100>;
38 st,bank-name = "PIO0";
39 };
40 ...
41 pin-functions nodes follow...
42 };
43
44
45Contents of function subnode node:
46----------------------
47Required properties for pin configuration node:
48- st,pins : Child node with list of pins with configuration.
49
50Below is the format of how each pin conf should look like.
51
52<bank offset mux mode rt_type rt_delay rt_clk>
53
54Every PIO is represented with 4-7 parameters depending on retime configuration.
55Each parameter is explained as below.
56
57-bank : Should be bank phandle to which this PIO belongs.
58-offset : Offset in the PIO bank.
59-mux : Should be alternate function number associated this pin.
60 Use same numbers from datasheet.
61-mode :pin configuration is selected from one of the below values.
62 IN
63 IN_PU
64 OUT
65 BIDIR
66 BIDIR_PU
67
68-rt_type Retiming Configuration for the pin.
69 Possible retime configuration are:
70
71 ------- -------------
72 value args
73 ------- -------------
74 NICLK <delay> <clk>
75 ICLK_IO <delay> <clk>
76 BYPASS <delay>
77 DE_IO <delay> <clk>
78 SE_ICLK_IO <delay> <clk>
79 SE_NICLK_IO <delay> <clk>
80
81- delay is retime delay in pico seconds as mentioned in data sheet.
82
83- rt_clk :clk to be use for retime.
84 Possible values are:
85 CLK_A
86 CLK_B
87 CLK_C
88 CLK_D
89
90Example of mmcclk pin which is a bi-direction pull pu with retime config
91as non inverted clock retimed with CLK_B and delay of 0 pico seconds:
92
93pin-controller {
94 ...
95 mmc0 {
96 pinctrl_mmc: mmc {
97 st,pins {
98 mmcclk = <&PIO13 4 ALT4 BIDIR_PU NICLK 0 CLK_B>;
99 ...
100 };
101 };
102 ...
103 };
104};
105
106sdhci0:sdhci@fe810000{
107 ...
108 pinctrl-names = "default";
109 pinctrl-0 = <&pinctrl_mmc>;
110};
diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
new file mode 100644
index 000000000000..d5dac7b843a9
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
@@ -0,0 +1,153 @@
1* Renesas Pin Function Controller (GPIO and Pin Mux/Config)
2
3The Pin Function Controller (PFC) is a Pin Mux/Config controller. On SH7372,
4SH73A0, R8A73A4 and R8A7740 it also acts as a GPIO controller.
5
6
7Pin Control
8-----------
9
10Required Properties:
11
12 - compatible: should be one of the following.
13 - "renesas,pfc-r8a73a4": for R8A73A4 (R-Mobile APE6) compatible pin-controller.
14 - "renesas,pfc-r8a7740": for R8A7740 (R-Mobile A1) compatible pin-controller.
15 - "renesas,pfc-r8a7778": for R8A7778 (R-Mobile M1) compatible pin-controller.
16 - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller.
17 - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller.
18 - "renesas,pfc-sh7372": for SH7372 (SH-Mobile AP4) compatible pin-controller.
19 - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller.
20
21 - reg: Base address and length of each memory resource used by the pin
22 controller hardware module.
23
24Optional properties:
25
26 - #gpio-range-cells: Mandatory when the PFC doesn't handle GPIO, forbidden
27 otherwise. Should be 3.
28
29The PFC node also acts as a container for pin configuration nodes. Please refer
30to pinctrl-bindings.txt in this directory for the definition of the term "pin
31configuration node" and for the common pinctrl bindings used by client devices.
32
33Each pin configuration node represents a desired configuration for a pin, a
34pin group, or a list of pins or pin groups. The configuration can include the
35function to select on those pin(s) and pin configuration parameters (such as
36pull-up and pull-down).
37
38Pin configuration nodes contain pin configuration properties, either directly
39or grouped in child subnodes. Both pin muxing and configuration parameters can
40be grouped in that way and referenced as a single pin configuration node by
41client devices.
42
43A configuration node or subnode must reference at least one pin (through the
44pins or pin groups properties) and contain at least a function or one
45configuration parameter. When the function is present only pin groups can be
46used to reference pins.
47
48All pin configuration nodes and subnodes names are ignored. All of those nodes
49are parsed through phandles and processed purely based on their content.
50
51Pin Configuration Node Properties:
52
53- renesas,pins : An array of strings, each string containing the name of a pin.
54- renesas,groups : An array of strings, each string containing the name of a pin
55 group.
56
57- renesas,function: A string containing the name of the function to mux to the
58 pin group(s) specified by the renesas,groups property
59
60 Valid values for pin, group and function names can be found in the group and
61 function arrays of the PFC data file corresponding to the SoC
62 (drivers/pinctrl/sh-pfc/pfc-*.c)
63
64The pin configuration parameters use the generic pinconf bindings defined in
65pinctrl-bindings.txt in this directory. The supported parameters are
66bias-disable, bias-pull-up and bias-pull-down.
67
68
69GPIO
70----
71
72On SH7372, SH73A0, R8A73A4 and R8A7740 the PFC node is also a GPIO controller
73node.
74
75Required Properties:
76
77 - gpio-controller: Marks the device node as a gpio controller.
78
79 - #gpio-cells: Should be 2. The first cell is the GPIO number and the second
80 cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the
81 GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
82
83The syntax of the gpio specifier used by client nodes should be the following
84with values derived from the SoC user manual.
85
86 <[phandle of the gpio controller node]
87 [pin number within the gpio controller]
88 [flags]>
89
90On other mach-shmobile platforms GPIO is handled by the gpio-rcar driver.
91Please refer to Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
92for documentation of the GPIO device tree bindings on those platforms.
93
94
95Examples
96--------
97
98Example 1: SH73A0 (SH-Mobile AG5) pin controller node
99
100 pfc: pfc@e6050000 {
101 compatible = "renesas,pfc-sh73a0";
102 reg = <0xe6050000 0x8000>,
103 <0xe605801c 0x1c>;
104 gpio-controller;
105 #gpio-cells = <2>;
106 };
107
108Example 2: A GPIO LED node that references a GPIO
109
110 #include <dt-bindings/gpio/gpio.h>
111
112 leds {
113 compatible = "gpio-leds";
114 led1 {
115 gpios = <&pfc 20 GPIO_ACTIVE_LOW>;
116 };
117 };
118
119Example 3: KZM-A9-GT (SH-Mobile AG5) default pin state hog and pin control maps
120 for the MMCIF and SCIFA4 devices
121
122 &pfc {
123 pinctrl-0 = <&scifa4_pins>;
124 pinctrl-names = "default";
125
126 mmcif_pins: mmcif {
127 mux {
128 renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0";
129 renesas,function = "mmc0";
130 };
131 cfg {
132 renesas,groups = "mmc0_data8_0";
133 renesas,pins = "PORT279";
134 bias-pull-up;
135 };
136 };
137
138 scifa4_pins: scifa4 {
139 renesas,groups = "scifa4_data", "scifa4_ctrl";
140 renesas,function = "scifa4";
141 };
142 };
143
144Example 4: KZM-A9-GT (SH-Mobile AG5) default pin state for the MMCIF device
145
146 &mmcif {
147 pinctrl-0 = <&mmcif_pins>;
148 pinctrl-names = "default";
149
150 bus-width = <8>;
151 vmmc-supply = <&reg_1p8v>;
152 status = "okay";
153 };
diff --git a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
new file mode 100644
index 000000000000..b0fb1018d7ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
@@ -0,0 +1,97 @@
1* Rockchip Pinmux Controller
2
3The Rockchip Pinmux Controller, enables the IC
4to share one PAD to several functional blocks. The sharing is done by
5multiplexing the PAD input/output signals. For each PAD there are up to
64 muxing options with option 0 being the use as a GPIO.
7
8Please refer to pinctrl-bindings.txt in this directory for details of the
9common pinctrl bindings used by client devices, including the meaning of the
10phrase "pin configuration node".
11
12The Rockchip pin configuration node is a node of a group of pins which can be
13used for a specific device or function. This node represents both mux and
14config of the pins in that group. The 'pins' selects the function mode(also
15named pin mode) this pin can work on and the 'config' configures various pad
16settings such as pull-up, etc.
17
18The pins are grouped into up to 5 individual pin banks which need to be
19defined as gpio sub-nodes of the pinmux controller.
20
21Required properties for iomux controller:
22 - compatible: one of "rockchip,rk2928-pinctrl", "rockchip,rk3066a-pinctrl"
23 "rockchip,rk3066b-pinctrl", "rockchip,rk3188-pinctrl"
24
25Required properties for gpio sub nodes:
26 - compatible: "rockchip,gpio-bank"
27 - reg: register of the gpio bank (different than the iomux registerset)
28 - interrupts: base interrupt of the gpio bank in the interrupt controller
29 - clocks: clock that drives this bank
30 - gpio-controller: identifies the node as a gpio controller and pin bank.
31 - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO
32 binding is used, the amount of cells must be specified as 2. See generic
33 GPIO binding documentation for description of particular cells.
34 - interrupt-controller: identifies the controller node as interrupt-parent.
35 - #interrupt-cells: the value of this property should be 2 and the interrupt
36 cells should use the standard two-cell scheme described in
37 bindings/interrupt-controller/interrupts.txt
38
39Required properties for pin configuration node:
40 - rockchip,pins: 3 integers array, represents a group of pins mux and config
41 setting. The format is rockchip,pins = <PIN_BANK PIN_BANK_IDX MUX &phandle>.
42 The MUX 0 means gpio and MUX 1 to 3 mean the specific device function.
43 The phandle of a node containing the generic pinconfig options
44 to use, as described in pinctrl-bindings.txt in this directory.
45
46Examples:
47
48#include <dt-bindings/pinctrl/rockchip.h>
49
50...
51
52pinctrl@20008000 {
53 compatible = "rockchip,rk3066a-pinctrl";
54 reg = <0x20008000 0x150>;
55 #address-cells = <1>;
56 #size-cells = <1>;
57 ranges;
58
59 gpio0: gpio0@20034000 {
60 compatible = "rockchip,gpio-bank";
61 reg = <0x20034000 0x100>;
62 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
63 clocks = <&clk_gates8 9>;
64
65 gpio-controller;
66 #gpio-cells = <2>;
67
68 interrupt-controller;
69 #interrupt-cells = <2>;
70 };
71
72 ...
73
74 pcfg_pull_default: pcfg_pull_default {
75 bias-pull-pin-default
76 };
77
78 uart2 {
79 uart2_xfer: uart2-xfer {
80 rockchip,pins = <RK_GPIO1 8 1 &pcfg_pull_default>,
81 <RK_GPIO1 9 1 &pcfg_pull_default>;
82 };
83 };
84};
85
86uart2: serial@20064000 {
87 compatible = "snps,dw-apb-uart";
88 reg = <0x20064000 0x400>;
89 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
90 reg-shift = <2>;
91 reg-io-width = <1>;
92 clocks = <&mux_uart2>;
93 status = "okay";
94
95 pinctrl-names = "default";
96 pinctrl-0 = <&uart2_xfer>;
97};
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
index c70fca146e91..36281e7a2a46 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
@@ -7,10 +7,15 @@ on-chip controllers onto these pads.
7 7
8Required Properties: 8Required Properties:
9- compatible: should be one of the following. 9- compatible: should be one of the following.
10 - "samsung,s3c2412-pinctrl": for S3C2412-compatible pin-controller,
11 - "samsung,s3c2416-pinctrl": for S3C2416-compatible pin-controller,
12 - "samsung,s3c2440-pinctrl": for S3C2440-compatible pin-controller,
13 - "samsung,s3c2450-pinctrl": for S3C2450-compatible pin-controller,
10 - "samsung,s3c64xx-pinctrl": for S3C64xx-compatible pin-controller, 14 - "samsung,s3c64xx-pinctrl": for S3C64xx-compatible pin-controller,
11 - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller. 15 - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller.
12 - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller. 16 - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller.
13 - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller. 17 - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller.
18 - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller.
14 19
15- reg: Base address of the pin controller hardware module and length of 20- reg: Base address of the pin controller hardware module and length of
16 the address space it occupies. 21 the address space it occupies.
@@ -21,8 +26,18 @@ Required Properties:
21 26
22 - gpio-controller: identifies the node as a gpio controller and pin bank. 27 - gpio-controller: identifies the node as a gpio controller and pin bank.
23 - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO 28 - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO
24 binding is used, the amount of cells must be specified as 2. See generic 29 binding is used, the amount of cells must be specified as 2. See the below
25 GPIO binding documentation for description of particular cells. 30 mentioned gpio binding representation for description of particular cells.
31
32 Eg: <&gpx2 6 0>
33 <[phandle of the gpio controller node]
34 [pin number within the gpio controller]
35 [flags]>
36
37 Values for gpio specifier:
38 - Pin number: is a value between 0 to 7.
39 - Flags: 0 - Active High
40 1 - Active Low
26 41
27- Pin mux/config groups as child nodes: The pin mux (selecting pin function 42- Pin mux/config groups as child nodes: The pin mux (selecting pin function
28 mode) and pin config (pull up/down, driver strength) settings are represented 43 mode) and pin config (pull up/down, driver strength) settings are represented
@@ -106,6 +121,10 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a
106 121
107 - compatible: identifies the type of the external wakeup interrupt controller 122 - compatible: identifies the type of the external wakeup interrupt controller
108 The possible values are: 123 The possible values are:
124 - samsung,s3c2410-wakeup-eint: represents wakeup interrupt controller
125 found on Samsung S3C24xx SoCs except S3C2412 and S3C2413,
126 - samsung,s3c2412-wakeup-eint: represents wakeup interrupt controller
127 found on Samsung S3C2412 and S3C2413 SoCs,
109 - samsung,s3c64xx-wakeup-eint: represents wakeup interrupt controller 128 - samsung,s3c64xx-wakeup-eint: represents wakeup interrupt controller
110 found on Samsung S3C64xx SoCs, 129 found on Samsung S3C64xx SoCs,
111 - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller 130 - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller
@@ -266,3 +285,33 @@ Example 4: Set up the default pin state for uart controller.
266 285
267 pinctrl = devm_pinctrl_get_select_default(&pdev->dev); 286 pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
268 } 287 }
288
289Example 5: A display port client node that supports 'default' pinctrl state
290 and gpio binding.
291
292 display-port-controller {
293 /* ... */
294
295 samsung,hpd-gpio = <&gpx2 6 0>;
296 pinctrl-names = "default";
297 pinctrl-0 = <&dp_hpd>;
298 };
299
300Example 6: Request the gpio for display port controller
301
302 static int exynos_dp_probe(struct platform_device *pdev)
303 {
304 int hpd_gpio, ret;
305 struct device *dev = &pdev->dev;
306 struct device_node *dp_node = dev->of_node;
307
308 /* ... */
309
310 hpd_gpio = of_get_named_gpio(dp_node, "samsung,hpd-gpio", 0);
311
312 /* ... */
313
314 ret = devm_gpio_request_one(&pdev->dev, hpd_gpio, GPIOF_IN,
315 "hpd_gpio");
316 /* ... */
317 }
diff --git a/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt b/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt
new file mode 100644
index 000000000000..e3865e136067
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt
@@ -0,0 +1,352 @@
1ST Ericsson abx500 pinmux controller
2
3Required properties:
4- compatible: "stericsson,ab8500-gpio", "stericsson,ab8540-gpio",
5 "stericsson,ab8505-gpio", "stericsson,ab9540-gpio",
6
7Please refer to pinctrl-bindings.txt in this directory for details of the
8common pinctrl bindings used by client devices, including the meaning of the
9phrase "pin configuration node".
10
11ST Ericsson's pin configuration nodes act as a container for an arbitrary number of
12subnodes. Each of these subnodes represents some desired configuration for a
13pin, a group, or a list of pins or groups. This configuration can include the
14mux function to select on those pin(s)/group(s), and various pin configuration
15parameters, such as input, output, pull up, pull down...
16
17The name of each subnode is not important; all subnodes should be enumerated
18and processed purely based on their content.
19
20Required subnode-properties:
21- ste,pins : An array of strings. Each string contains the name of a pin or
22 group.
23
24Optional subnode-properties:
25- ste,function: A string containing the name of the function to mux to the
26 pin or group.
27
28- generic pin configuration option to use. Example :
29
30 default_cfg {
31 ste,pins = "GPIO1";
32 bias-disable;
33 };
34
35- ste,config: Handle of pin configuration node containing the generic
36 pinconfig options to use, as described in pinctrl-bindings.txt in
37 this directory. Example :
38
39 pcfg_bias_disable: pcfg_bias_disable {
40 bias-disable;
41 };
42
43 default_cfg {
44 ste,pins = "GPIO1";
45 ste.config = <&pcfg_bias_disable>;
46 };
47
48Example board file extract:
49
50&pinctrl_abx500 {
51 pinctrl-names = "default";
52 pinctrl-0 = <&sysclkreq2_default_mode>, <&sysclkreq3_default_mode>, <&gpio3_default_mode>, <&sysclkreq6_default_mode>, <&pwmout1_default_mode>, <&pwmout2_default_mode>, <&pwmout3_default_mode>, <&adi1_default_mode>, <&dmic12_default_mode>, <&dmic34_default_mode>, <&dmic56_default_mode>, <&sysclkreq5_default_mode>, <&batremn_default_mode>, <&service_default_mode>, <&pwrctrl0_default_mode>, <&pwrctrl1_default_mode>, <&pwmextvibra1_default_mode>, <&pwmextvibra2_default_mode>, <&gpio51_default_mode>, <&gpio52_default_mode>, <&gpio53_default_mode>, <&gpio54_default_mode>, <&pdmclkdat_default_mode>;
53
54 sysclkreq2 {
55 sysclkreq2_default_mode: sysclkreq2_default {
56 default_mux {
57 ste,function = "sysclkreq";
58 ste,pins = "sysclkreq2_d_1";
59 };
60 default_cfg {
61 ste,pins = "GPIO1";
62 bias-disable;
63 };
64 };
65 };
66 sysclkreq3 {
67 sysclkreq3_default_mode: sysclkreq3_default {
68 default_mux {
69 ste,function = "sysclkreq";
70 ste,pins = "sysclkreq3_d_1";
71 };
72 default_cfg {
73 ste,pins = "GPIO2";
74 output-low;
75 };
76 };
77 };
78 gpio3 {
79 gpio3_default_mode: gpio3_default {
80 default_mux {
81 ste,function = "gpio";
82 ste,pins = "gpio3_a_1";
83 };
84 default_cfg {
85 ste,pins = "GPIO3";
86 output-low;
87 };
88 };
89 };
90 sysclkreq6 {
91 sysclkreq6_default_mode: sysclkreq6_default {
92 default_mux {
93 ste,function = "sysclkreq";
94 ste,pins = "sysclkreq6_d_1";
95 };
96 default_cfg {
97 ste,pins = "GPIO4";
98 bias-disable;
99 };
100 };
101 };
102 pwmout1 {
103 pwmout1_default_mode: pwmout1_default {
104 default_mux {
105 ste,function = "pwmout";
106 ste,pins = "pwmout1_d_1";
107 };
108 default_cfg {
109 ste,pins = "GPIO14";
110 output-low;
111 };
112 };
113 };
114 pwmout2 {
115 pwmout2_default_mode: pwmout2_default {
116 pwmout2_default_mux {
117 ste,function = "pwmout";
118 ste,pins = "pwmout2_d_1";
119 };
120 pwmout2_default_cfg {
121 ste,pins = "GPIO15";
122 output-low;
123 };
124 };
125 };
126 pwmout3 {
127 pwmout3_default_mode: pwmout3_default {
128 pwmout3_default_mux {
129 ste,function = "pwmout";
130 ste,pins = "pwmout3_d_1";
131 };
132 pwmout3_default_cfg {
133 ste,pins = "GPIO16";
134 output-low;
135 };
136 };
137 };
138 adi1 {
139
140 adi1_default_mode: adi1_default {
141 adi1_default_mux {
142 ste,function = "adi1";
143 ste,pins = "adi1_d_1";
144 };
145 adi1_default_cfg1 {
146 ste,pins = "GPIO17","GPIO19","GPIO20";
147 bias-disable;
148 };
149 adi1_default_cfg2 {
150 ste,pins = "GPIO18";
151 output-low;
152 };
153 };
154 };
155 dmic12 {
156 dmic12_default_mode: dmic12_default {
157 dmic12_default_mux {
158 ste,function = "dmic";
159 ste,pins = "dmic12_d_1";
160 };
161 dmic12_default_cfg1 {
162 ste,pins = "GPIO27";
163 output-low;
164 };
165 dmic12_default_cfg2 {
166 ste,pins = "GPIO28";
167 bias-disable;
168 };
169 };
170 };
171 dmic34 {
172 dmic34_default_mode: dmic34_default {
173 dmic34_default_mux {
174 ste,function = "dmic";
175 ste,pins = "dmic34_d_1";
176 };
177 dmic34_default_cfg1 {
178 ste,pins = "GPIO29";
179 output-low;
180 };
181 dmic34_default_cfg2 {
182 ste,pins = "GPIO30";
183 bias-disable;{
184
185 };
186 };
187 };
188 dmic56 {
189 dmic56_default_mode: dmic56_default {
190 dmic56_default_mux {
191 ste,function = "dmic";
192 ste,pins = "dmic56_d_1";
193 };
194 dmic56_default_cfg1 {
195 ste,pins = "GPIO31";
196 output-low;
197 };
198 dmic56_default_cfg2 {
199 ste,pins = "GPIO32";
200 bias-disable;
201 };
202 };
203 };
204 sysclkreq5 {
205 sysclkreq5_default_mode: sysclkreq5_default {
206 sysclkreq5_default_mux {
207 ste,function = "sysclkreq";
208 ste,pins = "sysclkreq5_d_1";
209 };
210 sysclkreq5_default_cfg {
211 ste,pins = "GPIO42";
212 output-low;
213 };
214 };
215 };
216 batremn {
217 batremn_default_mode: batremn_default {
218 batremn_default_mux {
219 ste,function = "batremn";
220 ste,pins = "batremn_d_1";
221 };
222 batremn_default_cfg {
223 ste,pins = "GPIO43";
224 bias-disable;
225 };
226 };
227 };
228 service {
229 service_default_mode: service_default {
230 service_default_mux {
231 ste,function = "service";
232 ste,pins = "service_d_1";
233 };
234 service_default_cfg {
235 ste,pins = "GPIO44";
236 bias-disable;
237 };
238 };
239 };
240 pwrctrl0 {
241 pwrctrl0_default_mux: pwrctrl0_mux {
242 pwrctrl0_default_mux {
243 ste,function = "pwrctrl";
244 ste,pins = "pwrctrl0_d_1";
245 };
246 };
247 pwrctrl0_default_mode: pwrctrl0_default {
248 pwrctrl0_default_cfg {
249 ste,pins = "GPIO45";
250 bias-disable;
251 };
252 };
253 };
254 pwrctrl1 {
255 pwrctrl1_default_mux: pwrctrl1_mux {
256 pwrctrl1_default_mux {
257 ste,function = "pwrctrl";
258 ste,pins = "pwrctrl1_d_1";
259 };
260 };
261 pwrctrl1_default_mode: pwrctrl1_default {
262 pwrctrl1_default_cfg {
263 ste,pins = "GPIO46";
264 bias-disable;
265 };
266 };
267 };
268 pwmextvibra1 {
269 pwmextvibra1_default_mode: pwmextvibra1_default {
270 pwmextvibra1_default_mux {
271 ste,function = "pwmextvibra";
272 ste,pins = "pwmextvibra1_d_1";
273 };
274 pwmextvibra1_default_cfg {
275 ste,pins = "GPIO47";
276 bias-disable;
277 };
278 };
279 };
280 pwmextvibra2 {
281 pwmextvibra2_default_mode: pwmextvibra2_default {
282 pwmextvibra2_default_mux {
283 ste,function = "pwmextvibra";
284 ste,pins = "pwmextvibra2_d_1";
285 };
286 pwmextvibra1_default_cfg {
287 ste,pins = "GPIO48";
288 bias-disable;
289 };
290 };
291 };
292 gpio51 {
293 gpio51_default_mode: gpio51_default {
294 gpio51_default_mux {
295 ste,function = "gpio";
296 ste,pins = "gpio51_a_1";
297 };
298 gpio51_default_cfg {
299 ste,pins = "GPIO51";
300 output-low;
301 };
302 };
303 };
304 gpio52 {
305 gpio52_default_mode: gpio52_default {
306 gpio52_default_mux {
307 ste,function = "gpio";
308 ste,pins = "gpio52_a_1";
309 };
310 gpio52_default_cfg {
311 ste,pins = "GPIO52";
312 bias-pull-down;
313 };
314 };
315 };
316 gpio53 {
317 gpio53_default_mode: gpio53_default {
318 gpio53_default_mux {
319 ste,function = "gpio";
320 ste,pins = "gpio53_a_1";
321 };
322 gpio53_default_cfg {
323 ste,pins = "GPIO53";
324 bias-pull-down;
325 };
326 };
327 };
328 gpio54 {
329 gpio54_default_mode: gpio54_default {
330 gpio54_default_mux {
331 ste,function = "gpio";
332 ste,pins = "gpio54_a_1";
333 };
334 gpio54_default_cfg {
335 ste,pins = "GPIO54";
336 output-low;
337 };
338 };
339 };
340 pdmclkdat {
341 pdmclkdat_default_mode: pdmclkdat_default {
342 pdmclkdat_default_mux {
343 ste,function = "pdm";
344 ste,pins = "pdmclkdat_d_1";
345 };
346 pdmclkdat_default_cfg {
347 ste,pins = "GPIO55", "GPIO56";
348 bias-disable;
349 };
350 };
351 };
352};
diff --git a/Documentation/devicetree/bindings/pps/pps-gpio.txt b/Documentation/devicetree/bindings/pps/pps-gpio.txt
new file mode 100644
index 000000000000..40bf9c3564a5
--- /dev/null
+++ b/Documentation/devicetree/bindings/pps/pps-gpio.txt
@@ -0,0 +1,20 @@
1Device-Tree Bindings for a PPS Signal on GPIO
2
3These properties describe a PPS (pulse-per-second) signal connected to
4a GPIO pin.
5
6Required properties:
7- compatible: should be "pps-gpio"
8- gpios: one PPS GPIO in the format described by ../gpio/gpio.txt
9
10Optional properties:
11- assert-falling-edge: when present, assert is indicated by a falling edge
12 (instead of by a rising edge)
13
14Example:
15 pps {
16 compatible = "pps-gpio";
17 gpios = <&gpio2 6 0>;
18
19 assert-falling-edge;
20 };
diff --git a/Documentation/devicetree/bindings/regulator/lp872x.txt b/Documentation/devicetree/bindings/regulator/lp872x.txt
new file mode 100644
index 000000000000..78183182dad9
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/lp872x.txt
@@ -0,0 +1,160 @@
1Binding for TI/National Semiconductor LP872x Driver
2
3Required properties:
4 - compatible: "ti,lp8720" or "ti,lp8725"
5 - reg: I2C slave address. 0x7d = LP8720, 0x7a = LP8725
6
7Optional properties:
8 - ti,general-config: the value of LP872X_GENERAL_CFG register (u8)
9 (LP8720)
10 bit[2]: BUCK output voltage control by external DVS pin or register
11 1 = external pin, 0 = bit7 of register 08h
12 bit[1]: sleep control by external DVS pin or register
13 1 = external pin, 0 = bit6 of register 08h
14 bit[0]: time step unit(usec). 1 = 25, 0 = 50
15
16 (LP8725)
17 bit[7:6]: time step unit(usec). 00 = 32, 01 = 64, 10 = 128, 11 = 256
18 bit[4]: BUCK2 enable control. 1 = enable, 0 = disable
19 bit[3]: BUCK2 output voltage register address. 1 = 0Ah, 0 = 0Bh
20 bit[2]: BUCK1 output voltage control by external DVS pin or register
21 1 = register 08h, 0 = DVS
22 bit[1]: LDO sleep control. 1 = sleep mode, 0 = normal
23 bit[0]: BUCK1 enable control, 1 = enable, 0 = disable
24
25 For more details, please see the datasheet.
26
27 - ti,update-config: define it when LP872X_GENERAL_CFG register should be set
28 - ti,dvs-gpio: GPIO specifier for external DVS pin control of LP872x devices.
29 - ti,dvs-vsel: DVS selector. 0 = SEL_V1, 1 = SEL_V2.
30 - ti,dvs-state: initial DVS pin state. 0 = DVS_LOW, 1 = DVS_HIGH.
31
32 Sub nodes for regulator_init_data
33 LP8720 has maximum 6 nodes. (child name: ldo1 ~ 5 and buck)
34 LP8725 has maximum 9 nodes. (child name: ldo1 ~ 5, lilo1,2 and buck1,2)
35 For more details, please see the following binding document.
36 (Documentation/devicetree/bindings/regulator/regulator.txt)
37
38Datasheet
39 - LP8720: http://www.ti.com/lit/ds/symlink/lp8720.pdf
40 - LP8725: http://www.ti.com/lit/ds/symlink/lp8725.pdf
41
42Example 1) LP8720
43
44lp8720@7d {
45 compatible = "ti,lp8720";
46 reg = <0x7d>;
47
48 /* external DVS pin used, timestep is 25usec */
49 ti,general-config = /bits/ 8 <0x03>;
50 ti,update-config;
51
52 /*
53 * The dvs-gpio depends on the processor environment.
54 * For example, following GPIO specifier means GPIO134 in OMAP4.
55 */
56 ti,dvs-gpio = <&gpio5 6 0>;
57 ti,dvs-vsel = /bits/ 8 <1>; /* SEL_V2 */
58 ti,dvs-state = /bits/ 8 <1>; /* DVS_HIGH */
59
60 vaf: ldo1 {
61 regulator-min-microvolt = <1200000>;
62 regulator-max-microvolt = <3300000>;
63 };
64
65 vmmc: ldo2 {
66 regulator-min-microvolt = <1200000>;
67 regulator-max-microvolt = <3300000>;
68 };
69
70 vcam_io: ldo3 {
71 regulator-min-microvolt = <1200000>;
72 regulator-max-microvolt = <3300000>;
73 regulator-boot-on;
74 };
75
76 vcam_core: ldo4 {
77 regulator-min-microvolt = <800000>;
78 regulator-max-microvolt = <2850000>;
79 regulator-boot-on;
80 };
81
82 vcam: ldo5 {
83 regulator-min-microvolt = <1200000>;
84 regulator-max-microvolt = <3300000>;
85 };
86
87 vcc: buck {
88 regulator-name = "VBUCK";
89 regulator-min-microvolt = <800000>;
90 regulator-max-microvolt = <2300000>;
91 };
92};
93
94Example 2) LP8725
95
96lp8725@7a {
97 compatible = "ti,lp8725";
98 reg = <0x7a>;
99
100 /* Enable BUCK1,2, no DVS, normal LDO mode, timestep is 256usec */
101 ti,general-config = /bits/ 8 <0xdd>;
102 ti,update-config;
103
104 vcam_io: ldo1 {
105 regulator-min-microvolt = <1200000>;
106 regulator-max-microvolt = <3300000>;
107 };
108
109 vcam_core: ldo2 {
110 regulator-min-microvolt = <1200000>;
111 regulator-max-microvolt = <3300000>;
112 };
113
114 vcam: ldo3 {
115 regulator-min-microvolt = <1200000>;
116 regulator-max-microvolt = <3300000>;
117 };
118
119 vcmmb_io: ldo4 {
120 regulator-min-microvolt = <1200000>;
121 regulator-max-microvolt = <3300000>;
122 regulator-boot-on;
123 };
124
125 vcmmb_core: ldo5 {
126 regulator-min-microvolt = <1200000>;
127 regulator-max-microvolt = <3300000>;
128 regulator-boot-on;
129 };
130
131 vaux1: lilo1 {
132 regulator-name = "VAUX1";
133 regulator-min-microvolt = <800000>;
134 regulator-max-microvolt = <3300000>;
135 };
136
137 vaux2: lilo2 {
138 regulator-name = "VAUX2";
139 regulator-min-microvolt = <800000>;
140 regulator-max-microvolt = <3300000>;
141 };
142
143 vcc1: buck1 {
144 regulator-name = "VBUCK1";
145 regulator-min-microvolt = <800000>;
146 regulator-max-microvolt = <3000000>;
147 regulator-min-microamp = <460000>;
148 regulator-max-microamp = <1370000>;
149 regulator-boot-on;
150 };
151
152 vcc2: buck2 {
153 regulator-name = "VBUCK2";
154 regulator-min-microvolt = <800000>;
155 regulator-max-microvolt = <3000000>;
156 regulator-min-microamp = <460000>;
157 regulator-max-microamp = <1370000>;
158 regulator-boot-on;
159 };
160};
diff --git a/Documentation/devicetree/bindings/regulator/max8973-regulator.txt b/Documentation/devicetree/bindings/regulator/max8973-regulator.txt
new file mode 100644
index 000000000000..4f15d8a1bfd0
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/max8973-regulator.txt
@@ -0,0 +1,21 @@
1* Maxim MAX8973 Voltage Regulator
2
3Required properties:
4
5- compatible: must be "maxim,max8973"
6- reg: the i2c slave address of the regulator. It should be 0x1b.
7
8Any standard regulator properties can be used to configure the single max8973
9DCDC.
10
11Example:
12
13 max8973@1b {
14 compatible = "maxim,max8973";
15 reg = <0x1b>;
16
17 regulator-min-microvolt = <935000>;
18 regulator-max-microvolt = <1200000>;
19 regulator-boot-on;
20 regulator-always-on;
21 };
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt
index ecfc6ccd67ef..48a3b8e5d6bd 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/regulator.txt
@@ -9,6 +9,7 @@ Optional properties:
9- regulator-max-microamp: largest current consumers may set 9- regulator-max-microamp: largest current consumers may set
10- regulator-always-on: boolean, regulator should never be disabled 10- regulator-always-on: boolean, regulator should never be disabled
11- regulator-boot-on: bootloader/firmware enabled regulator 11- regulator-boot-on: bootloader/firmware enabled regulator
12- regulator-allow-bypass: allow the regulator to go into bypass mode
12- <name>-supply: phandle to the parent supply/regulator node 13- <name>-supply: phandle to the parent supply/regulator node
13- regulator-ramp-delay: ramp delay for regulator(in uV/uS) 14- regulator-ramp-delay: ramp delay for regulator(in uV/uS)
14 15
diff --git a/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt b/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt
new file mode 100644
index 000000000000..2e57a33e9029
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt
@@ -0,0 +1,128 @@
1Adaptive Body Bias(ABB) SoC internal LDO regulator for Texas Instruments SoCs
2
3Required Properties:
4- compatible: Should be one of:
5 - "ti,abb-v1" for older SoCs like OMAP3
6 - "ti,abb-v2" for newer SoCs like OMAP4, OMAP5
7- reg: Address and length of the register set for the device. It contains
8 the information of registers in the same order as described by reg-names
9- reg-names: Should contain the reg names
10 - "base-address" - contains base address of ABB module
11 - "int-address" - contains address of interrupt register for ABB module
12 (also see Optional properties)
13- #address-cell: should be 0
14- #size-cell: should be 0
15- clocks: should point to the clock node used by ABB module
16- ti,settling-time: Settling time in uSecs from SoC documentation for ABB module
17 to settle down(target time for SR2_WTCNT_VALUE).
18- ti,clock-cycles: SoC specific data about count of system ti,clock-cycles used for
19 computing settling time from SoC Documentation for ABB module(clock
20 cycles for SR2_WTCNT_VALUE).
21- ti,tranxdone-status-mask: Mask to the int-register to write-to-clear mask
22 indicating LDO tranxdone (operation complete).
23- ti,abb_info: An array of 6-tuples u32 items providing information about ABB
24 configuration needed per operational voltage of the device.
25 Each item consists of the following in the same order:
26 volt: voltage in uV - Only used to index ABB information.
27 ABB mode: one of the following:
28 0-bypass
29 1-Forward Body Bias(FBB)
30 3-Reverse Body Bias(RBB)
31 efuse: (see Optional properties)
32 RBB enable efuse Mask: (See Optional properties)
33 FBB enable efuse Mask: (See Optional properties)
34 Vset value efuse Mask: (See Optional properties)
35
36 NOTE: If more than 1 entry is present, then regulator is setup to change
37 voltage, allowing for various modes to be selected indexed off
38 the regulator. Further, ABB LDOs are considered always-on by
39 default.
40
41Optional Properties:
42- reg-names: In addition to the required properties, the following are optional
43 - "efuse-address" - Contains efuse base address used to pick up ABB info.
44 - "ldo-address" - Contains address of ABB LDO overide register address.
45 "efuse-address" is required for this.
46- ti,ldovbb-vset-mask - Required if ldo-address is set, mask for LDO override
47 register to provide override vset value.
48- ti,ldovbb-override-mask - Required if ldo-address is set, mask for LDO
49 override register to enable override vset value.
50- ti,abb_opp_sel: Addendum to the description in required properties
51 efuse: Mandatory if 'efuse-address' register is defined. Provides offset
52 from efuse-address to pick up ABB characteristics. Set to 0 if
53 'efuse-address' is not defined.
54 RBB enable efuse Mask: Optional if 'efuse-address' register is defined.
55 'ABB mode' is force set to RBB mode if value at "efuse-address"
56 + efuse maps to RBB mask. Set to 0 to ignore this.
57 FBB enable efuse Mask: Optional if 'efuse-address' register is defined.
58 'ABB mode' is force set to FBB mode if value at "efuse-address"
59 + efuse maps to FBB mask (valid only if RBB mask does not match)
60 Set to 0 to ignore this.
61 Vset value efuse Mask: Mandatory if ldo-address is set. Picks up from
62 efuse the value to set in 'ti,ldovbb-vset-mask' at ldo-address.
63
64Example #1: Simplest configuration (no efuse data, hard coded ABB table):
65abb_x: regulator-abb-x {
66 compatible = "ti,abb-v1";
67 regulator-name = "abb_x";
68 #address-cell = <0>;
69 #size-cells = <0>;
70 reg = <0x483072f0 0x8>, <0x48306818 0x4>;
71 reg-names = "base-address", "int-address";
72 ti,tranxdone-status-mask = <0x4000000>;
73 clocks = <&sysclk>;
74 ti,settling-time = <30>;
75 ti,clock-cycles = <8>;
76 ti,abb_info = <
77 /* uV ABB efuse rbb_m fbb_m vset_m */
78 1012500 0 0 0 0 0 /* Bypass */
79 1200000 3 0 0 0 0 /* RBB mandatory */
80 1320000 1 0 0 0 0 /* FBB mandatory */
81 >;
82};
83
84Example #2: Efuse bits contain ABB mode setting (no LDO override capability)
85abb_y: regulator-abb-y {
86 compatible = "ti,abb-v2";
87 regulator-name = "abb_y";
88 #address-cell = <0>;
89 #size-cells = <0>;
90 reg = <0x4a307bd0 0x8>, <0x4a306014 0x4>, <0x4A002268 0x8>;
91 reg-names = "base-address", "int-address", "efuse-address";
92 ti,tranxdone-status-mask = <0x4000000>;
93 clocks = <&sysclk>;
94 ti,settling-time = <50>;
95 ti,clock-cycles = <16>;
96 ti,abb_info = <
97 /* uV ABB efuse rbb_m fbb_m vset_m */
98 975000 0 0 0 0 0 /* Bypass */
99 1012500 0 0 0x40000 0 0 /* RBB optional */
100 1200000 0 0x4 0 0x40000 0 /* FBB optional */
101 1320000 1 0 0 0 0 /* FBB mandatory */
102 >;
103};
104
105Example #3: Efuse bits contain ABB mode setting and LDO override capability
106abb_z: regulator-abb-z {
107 compatible = "ti,abb-v2";
108 regulator-name = "abb_z";
109 #address-cell = <0>;
110 #size-cells = <0>;
111 reg = <0x4ae07ce4 0x8>, <0x4ae06010 0x4>,
112 <0x4a002194 0x8>, <0x4ae0C314 0x4>;
113 reg-names = "base-address", "int-address",
114 "efuse-address", "ldo-address";
115 ti,tranxdone-status-mask = <0x8000000>;
116 /* LDOVBBMM_MUX_CTRL */
117 ti,ldovbb-override-mask = <0x400>;
118 /* LDOVBBMM_VSET_OUT */
119 ti,ldovbb-vset-mask = <0x1F>;
120 clocks = <&sysclk>;
121 ti,settling-time = <50>;
122 ti,clock-cycles = <16>;
123 ti,abb_info = <
124 /* uV ABB efuse rbb_m fbb_m vset_m */
125 975000 0 0 0 0 0 /* Bypass */
126 1200000 0 0x4 0 0x40000 0x1f00 /* FBB optional, vset */
127 >;
128};
diff --git a/Documentation/devicetree/bindings/rtc/dw-apb.txt b/Documentation/devicetree/bindings/rtc/dw-apb.txt
index 93e2b0f048e6..eb2327b2bdb3 100644
--- a/Documentation/devicetree/bindings/rtc/dw-apb.txt
+++ b/Documentation/devicetree/bindings/rtc/dw-apb.txt
@@ -5,9 +5,20 @@ Required properties:
5- reg: physical base address of the controller and length of memory mapped 5- reg: physical base address of the controller and length of memory mapped
6 region. 6 region.
7- interrupts: IRQ line for the timer. 7- interrupts: IRQ line for the timer.
8- either clocks+clock-names or clock-frequency properties
9
10Optional properties:
11- clocks : list of clock specifiers, corresponding to entries in
12 the clock-names property;
13- clock-names : should contain "timer" and "pclk" entries, matching entries
14 in the clocks property.
8- clock-frequency: The frequency in HZ of the timer. 15- clock-frequency: The frequency in HZ of the timer.
9- clock-freq: For backwards compatibility with picoxcell 16- clock-freq: For backwards compatibility with picoxcell
10 17
18If using the clock specifiers, the pclk clock is optional, as not all
19systems may use one.
20
21
11Example: 22Example:
12 23
13 timer1: timer@ffc09000 { 24 timer1: timer@ffc09000 {
@@ -23,3 +34,11 @@ Example:
23 clock-frequency = <200000000>; 34 clock-frequency = <200000000>;
24 reg = <0xffd00000 0x1000>; 35 reg = <0xffd00000 0x1000>;
25 }; 36 };
37
38 timer3: timer@ffe00000 {
39 compatible = "snps,dw-apb-timer-osc";
40 interrupts = <0 170 4>;
41 reg = <0xffe00000 0x1000>;
42 clocks = <&timer_clk>, <&timer_pclk>;
43 clock-names = "timer", "pclk";
44 };
diff --git a/Documentation/devicetree/bindings/sound/adi,adau1701.txt b/Documentation/devicetree/bindings/sound/adi,adau1701.txt
new file mode 100644
index 000000000000..547a49b56a62
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/adi,adau1701.txt
@@ -0,0 +1,35 @@
1Analog Devices ADAU1701
2
3Required properties:
4
5 - compatible: Should contain "adi,adau1701"
6 - reg: The i2c address. Value depends on the state of ADDR0
7 and ADDR1, as wired in hardware.
8
9Optional properties:
10
11 - reset-gpio: A GPIO spec to define which pin is connected to the
12 chip's !RESET pin. If specified, the driver will
13 assert a hardware reset at probe time.
14 - adi,pll-mode-gpios: An array of two GPIO specs to describe the GPIOs
15 the ADAU's PLL config pins are connected to.
16 The state of the pins are set according to the
17 configured clock divider on ASoC side before the
18 firmware is loaded.
19 - adi,pin-config: An array of 12 numerical values selecting one of the
20 pin configurations as described in the datasheet,
21 table 53. Note that the value of this property has
22 to be prefixed with '/bits/ 8'.
23
24Examples:
25
26 i2c_bus {
27 adau1701@34 {
28 compatible = "adi,adau1701";
29 reg = <0x34>;
30 reset-gpio = <&gpio 23 0>;
31 adi,pll-mode-gpios = <&gpio 24 0 &gpio 25 0>;
32 adi,pin-config = /bits/ 8 <0x4 0x7 0x5 0x5 0x4 0x4
33 0x4 0x4 0x4 0x4 0x4 0x4>;
34 };
35 };
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt b/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt
new file mode 100644
index 000000000000..f49450a87890
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt
@@ -0,0 +1,46 @@
1Freescale i.MX audio complex with WM8962 codec
2
3Required properties:
4- compatible : "fsl,imx-audio-wm8962"
5- model : The user-visible name of this sound complex
6- ssi-controller : The phandle of the i.MX SSI controller
7- audio-codec : The phandle of the WM8962 audio codec
8- audio-routing : A list of the connections between audio components.
9 Each entry is a pair of strings, the first being the connection's sink,
10 the second being the connection's source. Valid names could be power
11 supplies, WM8962 pins, and the jacks on the board:
12
13 Power supplies:
14 * Mic Bias
15
16 Board connectors:
17 * Mic Jack
18 * Headphone Jack
19 * Ext Spk
20
21- mux-int-port : The internal port of the i.MX audio muxer (AUDMUX)
22- mux-ext-port : The external port of the i.MX audio muxer
23
24Note: The AUDMUX port numbering should start at 1, which is consistent with
25hardware manual.
26
27Example:
28
29sound {
30 compatible = "fsl,imx6q-sabresd-wm8962",
31 "fsl,imx-audio-wm8962";
32 model = "wm8962-audio";
33 ssi-controller = <&ssi2>;
34 audio-codec = <&codec>;
35 audio-routing =
36 "Headphone Jack", "HPOUTL",
37 "Headphone Jack", "HPOUTR",
38 "Ext Spk", "SPKOUTL",
39 "Ext Spk", "SPKOUTR",
40 "MICBIAS", "AMIC",
41 "IN3R", "MICBIAS",
42 "DMIC", "MICBIAS",
43 "DMICDAT", "DMIC";
44 mux-int-port = <2>;
45 mux-ext-port = <3>;
46};
diff --git a/Documentation/devicetree/bindings/sound/mxs-saif.txt b/Documentation/devicetree/bindings/sound/mxs-saif.txt
index c37ba6143d9b..7ba07a118e37 100644
--- a/Documentation/devicetree/bindings/sound/mxs-saif.txt
+++ b/Documentation/devicetree/bindings/sound/mxs-saif.txt
@@ -3,8 +3,11 @@
3Required properties: 3Required properties:
4- compatible: Should be "fsl,<chip>-saif" 4- compatible: Should be "fsl,<chip>-saif"
5- reg: Should contain registers location and length 5- reg: Should contain registers location and length
6- interrupts: Should contain ERROR and DMA interrupts 6- interrupts: Should contain ERROR interrupt number
7- fsl,saif-dma-channel: APBX DMA channel for the SAIF 7- dmas: DMA specifier, consisting of a phandle to DMA controller node
8 and SAIF DMA channel ID.
9 Refer to dma.txt and fsl-mxs-dma.txt for details.
10- dma-names: Must be "rx-tx".
8 11
9Optional properties: 12Optional properties:
10- fsl,saif-master: phandle to the master SAIF. It's only required for 13- fsl,saif-master: phandle to the master SAIF. It's only required for
@@ -23,14 +26,16 @@ aliases {
23saif0: saif@80042000 { 26saif0: saif@80042000 {
24 compatible = "fsl,imx28-saif"; 27 compatible = "fsl,imx28-saif";
25 reg = <0x80042000 2000>; 28 reg = <0x80042000 2000>;
26 interrupts = <59 80>; 29 interrupts = <59>;
27 fsl,saif-dma-channel = <4>; 30 dmas = <&dma_apbx 4>;
31 dma-names = "rx-tx";
28}; 32};
29 33
30saif1: saif@80046000 { 34saif1: saif@80046000 {
31 compatible = "fsl,imx28-saif"; 35 compatible = "fsl,imx28-saif";
32 reg = <0x80046000 2000>; 36 reg = <0x80046000 2000>;
33 interrupts = <58 81>; 37 interrupts = <58>;
34 fsl,saif-dma-channel = <5>; 38 dmas = <&dma_apbx 5>;
39 dma-names = "rx-tx";
35 fsl,saif-master = <&saif0>; 40 fsl,saif-master = <&saif0>;
36}; 41};
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt
new file mode 100644
index 000000000000..d130818700b2
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt
@@ -0,0 +1,71 @@
1NVIDIA Tegra audio complex, with RT5640 CODEC
2
3Required properties:
4- compatible : "nvidia,tegra-audio-rt5640"
5- clocks : Must contain an entry for each entry in clock-names.
6- clock-names : Must include the following entries:
7 "pll_a" (The Tegra clock of that name),
8 "pll_a_out0" (The Tegra clock of that name),
9 "mclk" (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk)
10- nvidia,model : The user-visible name of this sound complex.
11- nvidia,audio-routing : A list of the connections between audio components.
12 Each entry is a pair of strings, the first being the connection's sink,
13 the second being the connection's source. Valid names for sources and
14 sinks are the RT5640's pins, and the jacks on the board:
15
16 RT5640 pins:
17
18 * DMIC1
19 * DMIC2
20 * MICBIAS1
21 * IN1P
22 * IN1R
23 * IN2P
24 * IN2R
25 * HPOL
26 * HPOR
27 * LOUTL
28 * LOUTR
29 * MONOP
30 * MONON
31 * SPOLP
32 * SPOLN
33 * SPORP
34 * SPORN
35
36 Board connectors:
37
38 * Headphones
39 * Speakers
40
41- nvidia,i2s-controller : The phandle of the Tegra I2S controller that's
42 connected to the CODEC.
43- nvidia,audio-codec : The phandle of the RT5640 audio codec. This binding
44 assumes that AIF1 on the CODEC is connected to Tegra.
45
46Optional properties:
47- nvidia,hp-det-gpios : The GPIO that detects headphones are plugged in
48
49Example:
50
51sound {
52 compatible = "nvidia,tegra-audio-rt5640-dalmore",
53 "nvidia,tegra-audio-rt5640";
54 nvidia,model = "NVIDIA Tegra Dalmore";
55
56 nvidia,audio-routing =
57 "Headphones", "HPOR",
58 "Headphones", "HPOL",
59 "Speakers", "SPORP",
60 "Speakers", "SPORN",
61 "Speakers", "SPOLP",
62 "Speakers", "SPOLN";
63
64 nvidia,i2s-controller = <&tegra_i2s1>;
65 nvidia,audio-codec = <&rt5640>;
66
67 nvidia,hp-det-gpios = <&gpio 143 0>; /* GPIO PR7 */
68
69 clocks = <&tegra_car 216>, <&tegra_car 217>, <&tegra_car 120>;
70 clock-names = "pll_a", "pll_a_out0", "mclk";
71};
diff --git a/Documentation/devicetree/bindings/sound/rt5640.txt b/Documentation/devicetree/bindings/sound/rt5640.txt
new file mode 100644
index 000000000000..005bcb24d72d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rt5640.txt
@@ -0,0 +1,30 @@
1RT5640 audio CODEC
2
3This device supports I2C only.
4
5Required properties:
6
7- compatible : "realtek,rt5640".
8
9- reg : The I2C address of the device.
10
11- interrupts : The CODEC's interrupt output.
12
13Optional properties:
14
15- realtek,in1-differential
16- realtek,in2-differential
17 Boolean. Indicate MIC1/2 input are differential, rather than single-ended.
18
19- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
20
21Example:
22
23rt5640 {
24 compatible = "realtek,rt5640";
25 reg = <0x1c>;
26 interrupt-parent = <&gpio>;
27 interrupts = <TEGRA_GPIO(W, 3) GPIO_ACTIVE_HIGH>;
28 realtek,ldo1-en-gpios =
29 <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
30};
diff --git a/Documentation/devicetree/bindings/sound/samsung-i2s.txt b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
index 3070046da2e5..025e66b85a43 100644
--- a/Documentation/devicetree/bindings/sound/samsung-i2s.txt
+++ b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
@@ -8,6 +8,16 @@ Required SoC Specific Properties:
8- dmas: list of DMA controller phandle and DMA request line ordered pairs. 8- dmas: list of DMA controller phandle and DMA request line ordered pairs.
9- dma-names: identifier string for each DMA request line in the dmas property. 9- dma-names: identifier string for each DMA request line in the dmas property.
10 These strings correspond 1:1 with the ordered pairs in dmas. 10 These strings correspond 1:1 with the ordered pairs in dmas.
11- clocks: Handle to iis clock and RCLK source clk.
12- clock-names:
13 i2s0 uses some base clks from CMU and some are from audio subsystem internal
14 clock controller. The clock names for i2s0 should be "iis", "i2s_opclk0" and
15 "i2s_opclk1" as shown in the example below.
16 i2s1 and i2s2 uses clocks from CMU. The clock names for i2s1 and i2s2 should
17 be "iis" and "i2s_opclk0".
18 "iis" is the i2s bus clock and i2s_opclk0, i2s_opclk1 are sources of the root
19 clk. i2s0 has internal mux to select the source of root clk and i2s1 and i2s2
20 doesn't have any such mux.
11 21
12Optional SoC Specific Properties: 22Optional SoC Specific Properties:
13 23
@@ -20,44 +30,26 @@ Optional SoC Specific Properties:
20 then this flag is enabled. 30 then this flag is enabled.
21- samsung,idma-addr: Internal DMA register base address of the audio 31- samsung,idma-addr: Internal DMA register base address of the audio
22 sub system(used in secondary sound source). 32 sub system(used in secondary sound source).
23 33- pinctrl-0: Should specify pin control groups used for this controller.
24Required Board Specific Properties: 34- pinctrl-names: Should contain only one value - "default".
25
26- gpios: The gpio specifier for data out,data in, LRCLK, CDCLK and SCLK
27 interface lines. The format of the gpio specifier depends on the gpio
28 controller.
29 The syntax of samsung gpio specifier is
30 <[phandle of the gpio controller node]
31 [pin number within the gpio controller]
32 [mux function]
33 [flags and pull up/down]
34 [drive strength]>
35 35
36Example: 36Example:
37 37
38- SoC Specific Portion: 38i2s0: i2s@03830000 {
39
40i2s@03830000 {
41 compatible = "samsung,i2s-v5"; 39 compatible = "samsung,i2s-v5";
42 reg = <0x03830000 0x100>; 40 reg = <0x03830000 0x100>;
43 dmas = <&pdma0 10 41 dmas = <&pdma0 10
44 &pdma0 9 42 &pdma0 9
45 &pdma0 8>; 43 &pdma0 8>;
46 dma-names = "tx", "rx", "tx-sec"; 44 dma-names = "tx", "rx", "tx-sec";
45 clocks = <&clock_audss EXYNOS_I2S_BUS>,
46 <&clock_audss EXYNOS_I2S_BUS>,
47 <&clock_audss EXYNOS_SCLK_I2S>;
48 clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
47 samsung,supports-6ch; 49 samsung,supports-6ch;
48 samsung,supports-rstclr; 50 samsung,supports-rstclr;
49 samsung,supports-secdai; 51 samsung,supports-secdai;
50 samsung,idma-addr = <0x03000000>; 52 samsung,idma-addr = <0x03000000>;
51}; 53 pinctrl-names = "default";
52 54 pinctrl-0 = <&i2s0_bus>;
53- Board Specific Portion:
54
55i2s@03830000 {
56 gpios = <&gpz 0 2 0 0>, /* I2S_0_SCLK */
57 <&gpz 1 2 0 0>, /* I2S_0_CDCLK */
58 <&gpz 2 2 0 0>, /* I2S_0_LRCK */
59 <&gpz 3 2 0 0>, /* I2S_0_SDI */
60 <&gpz 4 2 0 0>, /* I2S_0_SDO[1] */
61 <&gpz 5 2 0 0>, /* I2S_0_SDO[2] */
62 <&gpz 6 2 0 0>; /* I2S_0_SDO[3] */
63}; 55};
diff --git a/Documentation/devicetree/bindings/sound/sgtl5000.txt b/Documentation/devicetree/bindings/sound/sgtl5000.txt
index 9cc44449508d..955df60a118c 100644
--- a/Documentation/devicetree/bindings/sound/sgtl5000.txt
+++ b/Documentation/devicetree/bindings/sound/sgtl5000.txt
@@ -5,9 +5,12 @@ Required properties:
5 5
6- reg : the I2C address of the device 6- reg : the I2C address of the device
7 7
8- clocks : the clock provider of SYS_MCLK
9
8Example: 10Example:
9 11
10codec: sgtl5000@0a { 12codec: sgtl5000@0a {
11 compatible = "fsl,sgtl5000"; 13 compatible = "fsl,sgtl5000";
12 reg = <0x0a>; 14 reg = <0x0a>;
15 clocks = <&clks 150>;
13}; 16};
diff --git a/Documentation/devicetree/bindings/sound/spdif-receiver.txt b/Documentation/devicetree/bindings/sound/spdif-receiver.txt
new file mode 100644
index 000000000000..80f807bf8a1d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/spdif-receiver.txt
@@ -0,0 +1,10 @@
1Device-Tree bindings for dummy spdif receiver
2
3Required properties:
4 - compatible: should be "linux,spdif-dir".
5
6Example node:
7
8 codec: spdif-receiver {
9 compatible = "linux,spdif-dir";
10 };
diff --git a/Documentation/devicetree/bindings/sound/spdif-transmitter.txt b/Documentation/devicetree/bindings/sound/spdif-transmitter.txt
new file mode 100644
index 000000000000..55a85841dd85
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/spdif-transmitter.txt
@@ -0,0 +1,10 @@
1Device-Tree bindings for dummy spdif transmitter
2
3Required properties:
4 - compatible: should be "linux,spdif-dit".
5
6Example node:
7
8 codec: spdif-transmitter {
9 compatible = "linux,spdif-dit";
10 };
diff --git a/Documentation/devicetree/bindings/sound/ssm2518.txt b/Documentation/devicetree/bindings/sound/ssm2518.txt
new file mode 100644
index 000000000000..59381a778c79
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ssm2518.txt
@@ -0,0 +1,20 @@
1SSM2518 audio amplifier
2
3This device supports I2C only.
4
5Required properties:
6 - compatible : Must be "adi,ssm2518"
7 - reg : the I2C address of the device. This will either be 0x34 (ADDR pin low)
8 or 0x35 (ADDR pin high)
9
10Optional properties:
11 - gpios : GPIO connected to the nSD pin. If the property is not present it is
12 assumed that the nSD pin is hardwired to always on.
13
14Example:
15
16 ssm2518: ssm2518@34 {
17 compatible = "adi,ssm2518";
18 reg = <0x34>;
19 gpios = <&gpio 5 0>;
20 };
diff --git a/Documentation/devicetree/bindings/sound/ti,tas5086.txt b/Documentation/devicetree/bindings/sound/ti,tas5086.txt
index 8ea4f5b4818d..d2866a0d6a26 100644
--- a/Documentation/devicetree/bindings/sound/ti,tas5086.txt
+++ b/Documentation/devicetree/bindings/sound/ti,tas5086.txt
@@ -20,6 +20,17 @@ Optional properties:
20 When not specified, the hardware default of 1300ms 20 When not specified, the hardware default of 1300ms
21 is retained. 21 is retained.
22 22
23 - ti,mid-z-channel-X: Boolean properties, X being a number from 1 to 6.
24 If given, channel X will start with the Mid-Z start
25 sequence, otherwise the default Low-Z scheme is used.
26
27 The correct configuration depends on how the power
28 stages connected to the PWM output pins work. Not all
29 power stages are compatible to Mid-Z - please refer
30 to the datasheets for more details.
31
32 Most systems should not set any of these properties.
33
23Examples: 34Examples:
24 35
25 i2c_bus { 36 i2c_bus {
diff --git a/Documentation/devicetree/bindings/sound/wm8962.txt b/Documentation/devicetree/bindings/sound/wm8962.txt
index dceb3b1c2bb7..7f82b59ec8f9 100644
--- a/Documentation/devicetree/bindings/sound/wm8962.txt
+++ b/Documentation/devicetree/bindings/sound/wm8962.txt
@@ -8,9 +8,32 @@ Required properties:
8 8
9 - reg : the I2C address of the device. 9 - reg : the I2C address of the device.
10 10
11Optional properties:
12 - spk-mono: This is a boolean property. If present, the SPK_MONO bit
13 of R51 (Class D Control 2) gets set, indicating that the speaker is
14 in mono mode.
15
16 - mic-cfg : Default register value for R48 (Additional Control 4).
17 If absent, the default should be the register default.
18
19 - gpio-cfg : A list of GPIO configuration register values. The list must
20 be 6 entries long. If absent, no configuration of these registers is
21 performed. And note that only the value within [0x0, 0xffff] is valid.
22 Any other value is regarded as setting the GPIO register by its reset
23 value 0x0.
24
11Example: 25Example:
12 26
13codec: wm8962@1a { 27codec: wm8962@1a {
14 compatible = "wlf,wm8962"; 28 compatible = "wlf,wm8962";
15 reg = <0x1a>; 29 reg = <0x1a>;
30
31 gpio-cfg = <
32 0x0000 /* 0:Default */
33 0x0000 /* 1:Default */
34 0x0013 /* 2:FN_DMICCLK */
35 0x0000 /* 3:Default */
36 0x8014 /* 4:FN_DMICCDAT */
37 0x0000 /* 5:Default */
38 >;
16}; 39};
diff --git a/Documentation/devicetree/bindings/spi/omap-spi.txt b/Documentation/devicetree/bindings/spi/omap-spi.txt
index 938809c6829b..4c85c4c69584 100644
--- a/Documentation/devicetree/bindings/spi/omap-spi.txt
+++ b/Documentation/devicetree/bindings/spi/omap-spi.txt
@@ -10,7 +10,18 @@ Required properties:
10 input. The default is D0 as input and 10 input. The default is D0 as input and
11 D1 as output. 11 D1 as output.
12 12
13Example: 13Optional properties:
14- dmas: List of DMA specifiers with the controller specific format
15 as described in the generic DMA client binding. A tx and rx
16 specifier is required for each chip select.
17- dma-names: List of DMA request names. These strings correspond
18 1:1 with the DMA specifiers listed in dmas. The string naming
19 is to be "rxN" and "txN" for RX and TX requests,
20 respectively, where N equals the chip select number.
21
22Examples:
23
24[hwmod populated DMA resources]
14 25
15mcspi1: mcspi@1 { 26mcspi1: mcspi@1 {
16 #address-cells = <1>; 27 #address-cells = <1>;
@@ -20,3 +31,17 @@ mcspi1: mcspi@1 {
20 ti,spi-num-cs = <4>; 31 ti,spi-num-cs = <4>;
21}; 32};
22 33
34[generic DMA request binding]
35
36mcspi1: mcspi@1 {
37 #address-cells = <1>;
38 #size-cells = <0>;
39 compatible = "ti,omap4-mcspi";
40 ti,hwmods = "mcspi1";
41 ti,spi-num-cs = <2>;
42 dmas = <&edma 42
43 &edma 43
44 &edma 44
45 &edma 45>;
46 dma-names = "tx0", "rx0", "tx1", "rx1";
47};
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt b/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt
new file mode 100644
index 000000000000..ed9377811ee2
--- /dev/null
+++ b/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt
@@ -0,0 +1,99 @@
1Device-Tree bindings for LVDS Display Bridge (ldb)
2
3LVDS Display Bridge
4===================
5
6The LVDS Display Bridge device tree node contains up to two lvds-channel
7nodes describing each of the two LVDS encoder channels of the bridge.
8
9Required properties:
10 - #address-cells : should be <1>
11 - #size-cells : should be <0>
12 - compatible : should be "fsl,imx53-ldb" or "fsl,imx6q-ldb".
13 Both LDB versions are similar, but i.MX6 has an additional
14 multiplexer in the front to select any of the four IPU display
15 interfaces as input for each LVDS channel.
16 - gpr : should be <&gpr> on i.MX53 and i.MX6q.
17 The phandle points to the iomuxc-gpr region containing the LVDS
18 control register.
19- clocks, clock-names : phandles to the LDB divider and selector clocks and to
20 the display interface selector clocks, as described in
21 Documentation/devicetree/bindings/clock/clock-bindings.txt
22 The following clocks are expected on i.MX53:
23 "di0_pll" - LDB LVDS channel 0 mux
24 "di1_pll" - LDB LVDS channel 1 mux
25 "di0" - LDB LVDS channel 0 gate
26 "di1" - LDB LVDS channel 1 gate
27 "di0_sel" - IPU1 DI0 mux
28 "di1_sel" - IPU1 DI1 mux
29 On i.MX6q the following additional clocks are needed:
30 "di2_sel" - IPU2 DI0 mux
31 "di3_sel" - IPU2 DI1 mux
32 The needed clock numbers for each are documented in
33 Documentation/devicetree/bindings/clock/imx5-clock.txt, and in
34 Documentation/devicetree/bindings/clock/imx6q-clock.txt.
35
36Optional properties:
37 - pinctrl-names : should be "default" on i.MX53, not used on i.MX6q
38 - pinctrl-0 : a phandle pointing to LVDS pin settings on i.MX53,
39 not used on i.MX6q
40 - fsl,dual-channel : boolean. if it exists, only LVDS channel 0 should
41 be configured - one input will be distributed on both outputs in dual
42 channel mode
43
44LVDS Channel
45============
46
47Each LVDS Channel has to contain a display-timings node that describes the
48video timings for the connected LVDS display. For detailed information, also
49have a look at Documentation/devicetree/bindings/video/display-timing.txt.
50
51Required properties:
52 - reg : should be <0> or <1>
53 - crtcs : a list of phandles with index pointing to the IPU display interfaces
54 that can be used as video source for this channel.
55 - fsl,data-mapping : should be "spwg" or "jeida"
56 This describes how the color bits are laid out in the
57 serialized LVDS signal.
58 - fsl,data-width : should be <18> or <24>
59
60example:
61
62gpr: iomuxc-gpr@53fa8000 {
63 /* ... */
64};
65
66ldb: ldb@53fa8008 {
67 #address-cells = <1>;
68 #size-cells = <0>;
69 compatible = "fsl,imx53-ldb";
70 gpr = <&gpr>;
71 clocks = <&clks 122>, <&clks 120>,
72 <&clks 115>, <&clks 116>,
73 <&clks 123>, <&clks 85>;
74 clock-names = "di0_pll", "di1_pll",
75 "di0_sel", "di1_sel",
76 "di0", "di1";
77
78 lvds-channel@0 {
79 reg = <0>;
80 crtcs = <&ipu 0>;
81 fsl,data-mapping = "spwg";
82 fsl,data-width = <24>;
83
84 display-timings {
85 /* ... */
86 };
87 };
88
89 lvds-channel@1 {
90 reg = <1>;
91 crtcs = <&ipu 1>;
92 fsl,data-mapping = "spwg";
93 fsl,data-width = <24>;
94
95 display-timings {
96 /* ... */
97 };
98 };
99};
diff --git a/Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt b/Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt
new file mode 100644
index 000000000000..9499bc8ee9e3
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt
@@ -0,0 +1,18 @@
1ST-Ericsson U300 apptimer
2
3Required properties:
4
5- compatible : should be "stericsson,u300-apptimer"
6- reg : Specifies base physical address and size of the registers.
7- interrupts : A list of 4 interrupts; one for each subtimer. These
8 are, in order: OS (operating system), DD (device driver) both
9 adopted for EPOC/Symbian with two specific IRQs for these tasks,
10 then GP1 and GP2, which are general-purpose timers.
11
12Example:
13
14timer {
15 compatible = "stericsson,u300-apptimer";
16 reg = <0xc0014000 0x1000>;
17 interrupts = <24 25 26 27>;
18};
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt
index b462d0c54823..c662eb36be29 100644
--- a/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt
+++ b/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt
@@ -8,6 +8,8 @@ Required properties:
8Optional properties: 8Optional properties:
9- fsl,uart-has-rtscts : Indicate the uart has rts and cts 9- fsl,uart-has-rtscts : Indicate the uart has rts and cts
10- fsl,irda-mode : Indicate the uart supports irda mode 10- fsl,irda-mode : Indicate the uart supports irda mode
11- fsl,dte-mode : Indicate the uart works in DTE mode. The uart works
12 is DCE mode by default.
11 13
12Example: 14Example:
13 15
@@ -16,4 +18,5 @@ serial@73fbc000 {
16 reg = <0x73fbc000 0x4000>; 18 reg = <0x73fbc000 0x4000>;
17 interrupts = <31>; 19 interrupts = <31>;
18 fsl,uart-has-rtscts; 20 fsl,uart-has-rtscts;
21 fsl,dte-mode;
19}; 22};
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-lpuart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-lpuart.txt
new file mode 100644
index 000000000000..6fd1dd1638dd
--- /dev/null
+++ b/Documentation/devicetree/bindings/tty/serial/fsl-lpuart.txt
@@ -0,0 +1,14 @@
1* Freescale low power universal asynchronous receiver/transmitter (lpuart)
2
3Required properties:
4- compatible : Should be "fsl,<soc>-lpuart"
5- reg : Address and length of the register set for the device
6- interrupts : Should contain uart interrupt
7
8Example:
9
10uart0: serial@40027000 {
11 compatible = "fsl,vf610-lpuart";
12 reg = <0x40027000 0x1000>;
13 interrupts = <0 61 0x00>;
14 };
diff --git a/Documentation/devicetree/bindings/usb/atmel-usb.txt b/Documentation/devicetree/bindings/usb/atmel-usb.txt
index 60bd2150a3e6..55f51af08bc7 100644
--- a/Documentation/devicetree/bindings/usb/atmel-usb.txt
+++ b/Documentation/devicetree/bindings/usb/atmel-usb.txt
@@ -47,3 +47,85 @@ usb1: gadget@fffa4000 {
47 interrupts = <10 4>; 47 interrupts = <10 4>;
48 atmel,vbus-gpio = <&pioC 5 0>; 48 atmel,vbus-gpio = <&pioC 5 0>;
49}; 49};
50
51Atmel High-Speed USB device controller
52
53Required properties:
54 - compatible: Should be "atmel,at91sam9rl-udc"
55 - reg: Address and length of the register set for the device
56 - interrupts: Should contain usba interrupt
57 - ep childnode: To specify the number of endpoints and their properties.
58
59Optional properties:
60 - atmel,vbus-gpio: If present, specifies a gpio that needs to be
61 activated for the bus to be powered.
62
63Required child node properties:
64 - name: Name of the endpoint.
65 - reg: Num of the endpoint.
66 - atmel,fifo-size: Size of the fifo.
67 - atmel,nb-banks: Number of banks.
68 - atmel,can-dma: Boolean to specify if the endpoint support DMA.
69 - atmel,can-isoc: Boolean to specify if the endpoint support ISOC.
70
71usb2: gadget@fff78000 {
72 #address-cells = <1>;
73 #size-cells = <0>;
74 compatible = "atmel,at91sam9rl-udc";
75 reg = <0x00600000 0x80000
76 0xfff78000 0x400>;
77 interrupts = <27 4 0>;
78 atmel,vbus-gpio = <&pioB 19 0>;
79
80 ep0 {
81 reg = <0>;
82 atmel,fifo-size = <64>;
83 atmel,nb-banks = <1>;
84 };
85
86 ep1 {
87 reg = <1>;
88 atmel,fifo-size = <1024>;
89 atmel,nb-banks = <2>;
90 atmel,can-dma;
91 atmel,can-isoc;
92 };
93
94 ep2 {
95 reg = <2>;
96 atmel,fifo-size = <1024>;
97 atmel,nb-banks = <2>;
98 atmel,can-dma;
99 atmel,can-isoc;
100 };
101
102 ep3 {
103 reg = <3>;
104 atmel,fifo-size = <1024>;
105 atmel,nb-banks = <3>;
106 atmel,can-dma;
107 };
108
109 ep4 {
110 reg = <4>;
111 atmel,fifo-size = <1024>;
112 atmel,nb-banks = <3>;
113 atmel,can-dma;
114 };
115
116 ep5 {
117 reg = <5>;
118 atmel,fifo-size = <1024>;
119 atmel,nb-banks = <3>;
120 atmel,can-dma;
121 atmel,can-isoc;
122 };
123
124 ep6 {
125 reg = <6>;
126 atmel,fifo-size = <1024>;
127 atmel,nb-banks = <3>;
128 atmel,can-dma;
129 atmel,can-isoc;
130 };
131};
diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
index 1c04a4c9515f..b4b5b7906c88 100644
--- a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
+++ b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
@@ -5,6 +5,12 @@ Required properties:
5- reg: Should contain registers location and length 5- reg: Should contain registers location and length
6- interrupts: Should contain controller interrupt 6- interrupts: Should contain controller interrupt
7 7
8Recommended properies:
9- phy_type: the type of the phy connected to the core. Should be one
10 of "utmi", "utmi_wide", "ulpi", "serial" or "hsic". Without this
11 property the PORTSC register won't be touched
12- dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
13
8Optional properties: 14Optional properties:
9- fsl,usbphy: phandler of usb phy that connects to the only one port 15- fsl,usbphy: phandler of usb phy that connects to the only one port
10- fsl,usbmisc: phandler of non-core register device, with one argument 16- fsl,usbmisc: phandler of non-core register device, with one argument
diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt
index b3abde736017..d967ba16de60 100644
--- a/Documentation/devicetree/bindings/usb/exynos-usb.txt
+++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt
@@ -48,3 +48,37 @@ Example:
48 clocks = <&clock 285>; 48 clocks = <&clock 285>;
49 clock-names = "usbhost"; 49 clock-names = "usbhost";
50 }; 50 };
51
52DWC3
53Required properties:
54 - compatible: should be "samsung,exynos5250-dwusb3" for USB 3.0 DWC3
55 controller.
56 - #address-cells, #size-cells : should be '1' if the device has sub-nodes
57 with 'reg' property.
58 - ranges: allows valid 1:1 translation between child's address space and
59 parent's address space
60 - clocks: Clock IDs array as required by the controller.
61 - clock-names: names of clocks correseponding to IDs in the clock property
62
63Sub-nodes:
64The dwc3 core should be added as subnode to Exynos dwc3 glue.
65- dwc3 :
66 The binding details of dwc3 can be found in:
67 Documentation/devicetree/bindings/usb/dwc3.txt
68
69Example:
70 usb@12000000 {
71 compatible = "samsung,exynos5250-dwusb3";
72 clocks = <&clock 286>;
73 clock-names = "usbdrd30";
74 #address-cells = <1>;
75 #size-cells = <1>;
76 ranges;
77
78 dwc3 {
79 compatible = "synopsys,dwc3";
80 reg = <0x12000000 0x10000>;
81 interrupts = <0 72 0>;
82 usb-phy = <&usb2_phy &usb3_phy>;
83 };
84 };
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
index 34c952883276..df0933043a5b 100644
--- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
+++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
@@ -6,27 +6,10 @@ Practice : Universal Serial Bus" with the following modifications
6and additions : 6and additions :
7 7
8Required properties : 8Required properties :
9 - compatible : Should be "nvidia,tegra20-ehci" for USB controllers 9 - compatible : Should be "nvidia,tegra20-ehci".
10 used in host mode. 10 - nvidia,phy : phandle of the PHY that the controller is connected to.
11 - phy_type : Should be one of "ulpi" or "utmi". 11 - clocks : Contains a single entry which defines the USB controller's clock.
12 - nvidia,vbus-gpio : If present, specifies a gpio that needs to be
13 activated for the bus to be powered.
14 - nvidia,phy : phandle of the PHY instance, the controller is connected to.
15
16Required properties for phy_type == ulpi:
17 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY.
18 12
19Optional properties: 13Optional properties:
20 - dr_mode : dual role mode. Indicates the working mode for 14 - nvidia,needs-double-reset : boolean is to be set for some of the Tegra20
21 nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral", 15 USB ports, which need reset twice due to hardware issues.
22 or "otg". Default to "host" if not defined for backward compatibility.
23 host means this is a host controller
24 peripheral means it is device controller
25 otg means it can operate as either ("on the go")
26 - nvidia,has-legacy-mode : boolean indicates whether this controller can
27 operate in legacy mode (as APX 2500 / 2600). In legacy mode some
28 registers are accessed through the APB_MISC base address instead of
29 the USB controller. Since this is a legacy issue it probably does not
30 warrant a compatible string of its own.
31 - nvidia,needs-double-reset : boolean is to be set for some of the Tegra2
32 USB ports, which need reset twice due to hardware issues.
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
index 6bdaba2f0aa1..c4c9e9e664aa 100644
--- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
+++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
@@ -4,14 +4,49 @@ The device node for Tegra SOC USB PHY:
4 4
5Required properties : 5Required properties :
6 - compatible : Should be "nvidia,tegra20-usb-phy". 6 - compatible : Should be "nvidia,tegra20-usb-phy".
7 - reg : Address and length of the register set for the USB PHY interface. 7 - reg : Defines the following set of registers, in the order listed:
8 - phy_type : Should be one of "ulpi" or "utmi". 8 - The PHY's own register set.
9 Always present.
10 - The register set of the PHY containing the UTMI pad control registers.
11 Present if-and-only-if phy_type == utmi.
12 - phy_type : Should be one of "utmi", "ulpi" or "hsic".
13 - clocks : Defines the clocks listed in the clock-names property.
14 - clock-names : The following clock names must be present:
15 - reg: The clock needed to access the PHY's own registers. This is the
16 associated EHCI controller's clock. Always present.
17 - pll_u: PLL_U. Always present.
18 - timer: The timeout clock (clk_m). Present if phy_type == utmi.
19 - utmi-pads: The clock needed to access the UTMI pad control registers.
20 Present if phy_type == utmi.
21 - ulpi-link: The clock Tegra provides to the ULPI PHY (cdev2).
22 Present if phy_type == ulpi, and ULPI link mode is in use.
9 23
10Required properties for phy_type == ulpi: 24Required properties for phy_type == ulpi:
11 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY. 25 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY.
12 26
27Required PHY timing params for utmi phy:
28 - nvidia,hssync-start-delay : Number of 480 Mhz clock cycles to wait before
29 start of sync launches RxActive
30 - nvidia,elastic-limit : Variable FIFO Depth of elastic input store
31 - nvidia,idle-wait-delay : Number of 480 Mhz clock cycles of idle to wait
32 before declare IDLE.
33 - nvidia,term-range-adj : Range adjusment on terminations
34 - nvidia,xcvr-setup : HS driver output control
35 - nvidia,xcvr-lsfslew : LS falling slew rate control.
36 - nvidia,xcvr-lsrslew : LS rising slew rate control.
37
13Optional properties: 38Optional properties:
14 - nvidia,has-legacy-mode : boolean indicates whether this controller can 39 - nvidia,has-legacy-mode : boolean indicates whether this controller can
15 operate in legacy mode (as APX 2500 / 2600). In legacy mode some 40 operate in legacy mode (as APX 2500 / 2600). In legacy mode some
16 registers are accessed through the APB_MISC base address instead of 41 registers are accessed through the APB_MISC base address instead of
17 the USB controller. \ No newline at end of file 42 the USB controller.
43 - nvidia,is-wired : boolean. Indicates whether we can do certain kind of power
44 optimizations for the devices that are always connected. e.g. modem.
45 - dr_mode : dual role mode. Indicates the working mode for the PHY. Can be
46 "host", "peripheral", or "otg". Defaults to "host" if not defined.
47 host means this is a host controller
48 peripheral means it is device controller
49 otg means it can operate as either ("on the go")
50
51Required properties for dr_mode == otg:
52 - vbus-supply: regulator for VBUS
diff --git a/Documentation/devicetree/bindings/usb/usb3503.txt b/Documentation/devicetree/bindings/usb/usb3503.txt
index 6813a715fc7d..8c5be48b43c8 100644
--- a/Documentation/devicetree/bindings/usb/usb3503.txt
+++ b/Documentation/devicetree/bindings/usb/usb3503.txt
@@ -4,6 +4,10 @@ Required properties:
4- compatible: Should be "smsc,usb3503". 4- compatible: Should be "smsc,usb3503".
5- reg: Specifies the i2c slave address, it should be 0x08. 5- reg: Specifies the i2c slave address, it should be 0x08.
6- connect-gpios: Should specify GPIO for connect. 6- connect-gpios: Should specify GPIO for connect.
7- disabled-ports: Should specify the ports unused.
8 '1' or '2' or '3' are availe for this property to describe the port
9 number. 1~3 property values are possible to be desribed.
10 Do not describe this property if all ports have to be enabled.
7- intn-gpios: Should specify GPIO for interrupt. 11- intn-gpios: Should specify GPIO for interrupt.
8- reset-gpios: Should specify GPIO for reset. 12- reset-gpios: Should specify GPIO for reset.
9- initial-mode: Should specify initial mode. 13- initial-mode: Should specify initial mode.
@@ -14,6 +18,7 @@ Examples:
14 compatible = "smsc,usb3503"; 18 compatible = "smsc,usb3503";
15 reg = <0x08>; 19 reg = <0x08>;
16 connect-gpios = <&gpx3 0 1>; 20 connect-gpios = <&gpx3 0 1>;
21 disabled-ports = <2 3>;
17 intn-gpios = <&gpx3 4 1>; 22 intn-gpios = <&gpx3 4 1>;
18 reset-gpios = <&gpx3 5 1>; 23 reset-gpios = <&gpx3 5 1>;
19 initial-mode = <1>; 24 initial-mode = <1>;
diff --git a/Documentation/devicetree/bindings/usb/ux500-usb.txt b/Documentation/devicetree/bindings/usb/ux500-usb.txt
new file mode 100644
index 000000000000..330d6ec15401
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ux500-usb.txt
@@ -0,0 +1,50 @@
1Ux500 MUSB
2
3Required properties:
4 - compatible : Should be "stericsson,db8500-musb"
5 - reg : Offset and length of registers
6 - interrupts : Interrupt; mode, number and trigger
7 - dr_mode : Dual-role; either host mode "host", peripheral mode "peripheral"
8 or both "otg"
9
10Optional properties:
11 - dmas : A list of dma channels;
12 dma-controller, event-line, fixed-channel, flags
13 - dma-names : An ordered list of channel names affiliated to the above
14
15Example:
16
17usb_per5@a03e0000 {
18 compatible = "stericsson,db8500-musb", "mentor,musb";
19 reg = <0xa03e0000 0x10000>;
20 interrupts = <0 23 0x4>;
21 interrupt-names = "mc";
22
23 dr_mode = "otg";
24
25 dmas = <&dma 38 0 0x2>, /* Logical - DevToMem */
26 <&dma 38 0 0x0>, /* Logical - MemToDev */
27 <&dma 37 0 0x2>, /* Logical - DevToMem */
28 <&dma 37 0 0x0>, /* Logical - MemToDev */
29 <&dma 36 0 0x2>, /* Logical - DevToMem */
30 <&dma 36 0 0x0>, /* Logical - MemToDev */
31 <&dma 19 0 0x2>, /* Logical - DevToMem */
32 <&dma 19 0 0x0>, /* Logical - MemToDev */
33 <&dma 18 0 0x2>, /* Logical - DevToMem */
34 <&dma 18 0 0x0>, /* Logical - MemToDev */
35 <&dma 17 0 0x2>, /* Logical - DevToMem */
36 <&dma 17 0 0x0>, /* Logical - MemToDev */
37 <&dma 16 0 0x2>, /* Logical - DevToMem */
38 <&dma 16 0 0x0>, /* Logical - MemToDev */
39 <&dma 39 0 0x2>, /* Logical - DevToMem */
40 <&dma 39 0 0x0>; /* Logical - MemToDev */
41
42 dma-names = "iep_1_9", "oep_1_9",
43 "iep_2_10", "oep_2_10",
44 "iep_3_11", "oep_3_11",
45 "iep_4_12", "oep_4_12",
46 "iep_5_13", "oep_5_13",
47 "iep_6_14", "oep_6_14",
48 "iep_7_15", "oep_7_15",
49 "iep_8", "oep_8";
50};
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 6931c4348d24..db0457d61682 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -31,6 +31,7 @@ idt Integrated Device Technologies, Inc.
31img Imagination Technologies Ltd. 31img Imagination Technologies Ltd.
32intercontrol Inter Control Group 32intercontrol Inter Control Group
33linux Linux-specific binding 33linux Linux-specific binding
34lsi LSI Corp. (LSI Logic)
34marvell Marvell Technology Group Ltd. 35marvell Marvell Technology Group Ltd.
35maxim Maxim Integrated Products 36maxim Maxim Integrated Products
36mosaixtech Mosaix Technologies, Inc. 37mosaixtech Mosaix Technologies, Inc.
@@ -59,6 +60,7 @@ ste ST-Ericsson
59stericsson ST-Ericsson 60stericsson ST-Ericsson
60ti Texas Instruments 61ti Texas Instruments
61toshiba Toshiba Corporation 62toshiba Toshiba Corporation
63v3 V3 Semiconductor
62via VIA Technologies, Inc. 64via VIA Technologies, Inc.
63wlf Wolfson Microelectronics 65wlf Wolfson Microelectronics
64wm Wondermedia Technologies, Inc. 66wm Wondermedia Technologies, Inc.
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt
index c60da67a5d76..84f10c16cb38 100644
--- a/Documentation/devicetree/bindings/video/exynos_dp.txt
+++ b/Documentation/devicetree/bindings/video/exynos_dp.txt
@@ -21,6 +21,10 @@ Required properties for dp-controller:
21 of memory mapped region. 21 of memory mapped region.
22 -interrupts: 22 -interrupts:
23 interrupt combiner values. 23 interrupt combiner values.
24 -clocks:
25 from common clock binding: handle to dp clock.
26 -clock-names:
27 from common clock binding: Shall be "dp".
24 -interrupt-parent: 28 -interrupt-parent:
25 phandle to Interrupt combiner node. 29 phandle to Interrupt combiner node.
26 -samsung,color-space: 30 -samsung,color-space:
@@ -61,6 +65,8 @@ SOC specific portion:
61 reg = <0x145b0000 0x10000>; 65 reg = <0x145b0000 0x10000>;
62 interrupts = <10 3>; 66 interrupts = <10 3>;
63 interrupt-parent = <&combiner>; 67 interrupt-parent = <&combiner>;
68 clocks = <&clock 342>;
69 clock-names = "dp";
64 70
65 dptx-phy { 71 dptx-phy {
66 reg = <0x10040720>; 72 reg = <0x10040720>;
diff --git a/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt b/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt
new file mode 100644
index 000000000000..8ffb88e39e76
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt
@@ -0,0 +1,19 @@
1ST-Ericsson COH 901 327 Watchdog timer
2
3Required properties:
4- compatible: must be "stericsson,coh901327".
5- reg: physical base address of the controller and length of memory mapped
6 region.
7- interrupts: the interrupt used for the watchdog timeout warning.
8
9Optional properties:
10- timeout-sec: contains the watchdog timeout in seconds.
11
12Example:
13
14watchdog: watchdog@c0012000 {
15 compatible = "stericsson,coh901327";
16 reg = <0xc0012000 0x1000>;
17 interrupts = <3>;
18 timeout-sec = <60>;
19};
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 0706d32a61e6..fe7afe225381 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -11,10 +11,8 @@ be able to use diff(1).
11prototypes: 11prototypes:
12 int (*d_revalidate)(struct dentry *, unsigned int); 12 int (*d_revalidate)(struct dentry *, unsigned int);
13 int (*d_weak_revalidate)(struct dentry *, unsigned int); 13 int (*d_weak_revalidate)(struct dentry *, unsigned int);
14 int (*d_hash)(const struct dentry *, const struct inode *, 14 int (*d_hash)(const struct dentry *, struct qstr *);
15 struct qstr *); 15 int (*d_compare)(const struct dentry *, const struct dentry *,
16 int (*d_compare)(const struct dentry *, const struct inode *,
17 const struct dentry *, const struct inode *,
18 unsigned int, const char *, const struct qstr *); 16 unsigned int, const char *, const struct qstr *);
19 int (*d_delete)(struct dentry *); 17 int (*d_delete)(struct dentry *);
20 void (*d_release)(struct dentry *); 18 void (*d_release)(struct dentry *);
@@ -66,6 +64,7 @@ prototypes:
66 int (*atomic_open)(struct inode *, struct dentry *, 64 int (*atomic_open)(struct inode *, struct dentry *,
67 struct file *, unsigned open_flag, 65 struct file *, unsigned open_flag,
68 umode_t create_mode, int *opened); 66 umode_t create_mode, int *opened);
67 int (*tmpfile) (struct inode *, struct dentry *, umode_t);
69 68
70locking rules: 69locking rules:
71 all may block 70 all may block
@@ -93,6 +92,7 @@ removexattr: yes
93fiemap: no 92fiemap: no
94update_time: no 93update_time: no
95atomic_open: yes 94atomic_open: yes
95tmpfile: no
96 96
97 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on 97 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
98victim. 98victim.
@@ -189,7 +189,7 @@ prototypes:
189 loff_t pos, unsigned len, unsigned copied, 189 loff_t pos, unsigned len, unsigned copied,
190 struct page *page, void *fsdata); 190 struct page *page, void *fsdata);
191 sector_t (*bmap)(struct address_space *, sector_t); 191 sector_t (*bmap)(struct address_space *, sector_t);
192 int (*invalidatepage) (struct page *, unsigned long); 192 void (*invalidatepage) (struct page *, unsigned int, unsigned int);
193 int (*releasepage) (struct page *, int); 193 int (*releasepage) (struct page *, int);
194 void (*freepage)(struct page *); 194 void (*freepage)(struct page *);
195 int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, 195 int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
@@ -310,8 +310,8 @@ filesystems and by the swapper. The latter will eventually go away. Please,
310keep it that way and don't breed new callers. 310keep it that way and don't breed new callers.
311 311
312 ->invalidatepage() is called when the filesystem must attempt to drop 312 ->invalidatepage() is called when the filesystem must attempt to drop
313some or all of the buffers from the page when it is being truncated. It 313some or all of the buffers from the page when it is being truncated. It
314returns zero on success. If ->invalidatepage is zero, the kernel uses 314returns zero on success. If ->invalidatepage is zero, the kernel uses
315block_invalidatepage() instead. 315block_invalidatepage() instead.
316 316
317 ->releasepage() is called when the kernel is about to try to drop the 317 ->releasepage() is called when the kernel is about to try to drop the
@@ -344,25 +344,38 @@ prototypes:
344 344
345 345
346locking rules: 346locking rules:
347 file_lock_lock may block 347 inode->i_lock may block
348fl_copy_lock: yes no 348fl_copy_lock: yes no
349fl_release_private: maybe no 349fl_release_private: maybe no
350 350
351----------------------- lock_manager_operations --------------------------- 351----------------------- lock_manager_operations ---------------------------
352prototypes: 352prototypes:
353 int (*lm_compare_owner)(struct file_lock *, struct file_lock *); 353 int (*lm_compare_owner)(struct file_lock *, struct file_lock *);
354 unsigned long (*lm_owner_key)(struct file_lock *);
354 void (*lm_notify)(struct file_lock *); /* unblock callback */ 355 void (*lm_notify)(struct file_lock *); /* unblock callback */
355 int (*lm_grant)(struct file_lock *, struct file_lock *, int); 356 int (*lm_grant)(struct file_lock *, struct file_lock *, int);
356 void (*lm_break)(struct file_lock *); /* break_lease callback */ 357 void (*lm_break)(struct file_lock *); /* break_lease callback */
357 int (*lm_change)(struct file_lock **, int); 358 int (*lm_change)(struct file_lock **, int);
358 359
359locking rules: 360locking rules:
360 file_lock_lock may block 361
361lm_compare_owner: yes no 362 inode->i_lock blocked_lock_lock may block
362lm_notify: yes no 363lm_compare_owner: yes[1] maybe no
363lm_grant: no no 364lm_owner_key yes[1] yes no
364lm_break: yes no 365lm_notify: yes yes no
365lm_change yes no 366lm_grant: no no no
367lm_break: yes no no
368lm_change yes no no
369
370[1]: ->lm_compare_owner and ->lm_owner_key are generally called with
371*an* inode->i_lock held. It may not be the i_lock of the inode
372associated with either file_lock argument! This is the case with deadlock
373detection, since the code has to chase down the owners of locks that may
374be entirely unrelated to the one on which the lock is being acquired.
375For deadlock detection however, the blocked_lock_lock is also held. The
376fact that these locks are held ensures that the file_locks do not
377disappear out from under you while doing the comparison or generating an
378owner key.
366 379
367--------------------------- buffer_head ----------------------------------- 380--------------------------- buffer_head -----------------------------------
368prototypes: 381prototypes:
@@ -414,7 +427,7 @@ prototypes:
414 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); 427 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
415 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 428 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
416 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 429 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
417 int (*readdir) (struct file *, void *, filldir_t); 430 int (*iterate) (struct file *, struct dir_context *);
418 unsigned int (*poll) (struct file *, struct poll_table_struct *); 431 unsigned int (*poll) (struct file *, struct poll_table_struct *);
419 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 432 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
420 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 433 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt
index bd3c56c67380..b91e2f26b672 100644
--- a/Documentation/filesystems/f2fs.txt
+++ b/Documentation/filesystems/f2fs.txt
@@ -98,8 +98,13 @@ Cleaning Overhead
98MOUNT OPTIONS 98MOUNT OPTIONS
99================================================================================ 99================================================================================
100 100
101background_gc_off Turn off cleaning operations, namely garbage collection, 101background_gc=%s Turn on/off cleaning operations, namely garbage
102 triggered in background when I/O subsystem is idle. 102 collection, triggered in background when I/O subsystem is
103 idle. If background_gc=on, it will turn on the garbage
104 collection and if background_gc=off, garbage collection
105 will be truned off.
106 Default value for this option is on. So garbage
107 collection is on by default.
103disable_roll_forward Disable the roll-forward recovery routine 108disable_roll_forward Disable the roll-forward recovery routine
104discard Issue discard/TRIM commands when a segment is cleaned. 109discard Issue discard/TRIM commands when a segment is cleaned.
105no_heap Disable heap-style segment allocation which finds free 110no_heap Disable heap-style segment allocation which finds free
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 4db22f6491e0..206a1bdc7321 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -445,3 +445,9 @@ object doesn't exist. It's remote/distributed ones that might care...
445[mandatory] 445[mandatory]
446 FS_REVAL_DOT is gone; if you used to have it, add ->d_weak_revalidate() 446 FS_REVAL_DOT is gone; if you used to have it, add ->d_weak_revalidate()
447in your dentry operations instead. 447in your dentry operations instead.
448--
449[mandatory]
450 vfs_readdir() is gone; switch to iterate_dir() instead
451--
452[mandatory]
453 ->readdir() is gone now; switch to ->iterate()
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index fd8d0d594fc7..fcc22c982a25 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -473,7 +473,8 @@ This file is only present if the CONFIG_MMU kernel configuration option is
473enabled. 473enabled.
474 474
475The /proc/PID/clear_refs is used to reset the PG_Referenced and ACCESSED/YOUNG 475The /proc/PID/clear_refs is used to reset the PG_Referenced and ACCESSED/YOUNG
476bits on both physical and virtual pages associated with a process. 476bits on both physical and virtual pages associated with a process, and the
477soft-dirty bit on pte (see Documentation/vm/soft-dirty.txt for details).
477To clear the bits for all the pages associated with the process 478To clear the bits for all the pages associated with the process
478 > echo 1 > /proc/PID/clear_refs 479 > echo 1 > /proc/PID/clear_refs
479 480
@@ -482,6 +483,10 @@ To clear the bits for the anonymous pages associated with the process
482 483
483To clear the bits for the file mapped pages associated with the process 484To clear the bits for the file mapped pages associated with the process
484 > echo 3 > /proc/PID/clear_refs 485 > echo 3 > /proc/PID/clear_refs
486
487To clear the soft-dirty bit
488 > echo 4 > /proc/PID/clear_refs
489
485Any other value written to /proc/PID/clear_refs will have no effect. 490Any other value written to /proc/PID/clear_refs will have no effect.
486 491
487The /proc/pid/pagemap gives the PFN, which can be used to find the pageflags 492The /proc/pid/pagemap gives the PFN, which can be used to find the pageflags
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index bc4b06b3160a..f93a88250a44 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -360,6 +360,8 @@ struct inode_operations {
360 int (*removexattr) (struct dentry *, const char *); 360 int (*removexattr) (struct dentry *, const char *);
361 void (*update_time)(struct inode *, struct timespec *, int); 361 void (*update_time)(struct inode *, struct timespec *, int);
362 int (*atomic_open)(struct inode *, struct dentry *, 362 int (*atomic_open)(struct inode *, struct dentry *,
363 int (*tmpfile) (struct inode *, struct dentry *, umode_t);
364} ____cacheline_aligned;
363 struct file *, unsigned open_flag, 365 struct file *, unsigned open_flag,
364 umode_t create_mode, int *opened); 366 umode_t create_mode, int *opened);
365}; 367};
@@ -472,6 +474,9 @@ otherwise noted.
472 component is negative or needs lookup. Cached positive dentries are 474 component is negative or needs lookup. Cached positive dentries are
473 still handled by f_op->open(). 475 still handled by f_op->open().
474 476
477 tmpfile: called in the end of O_TMPFILE open(). Optional, equivalent to
478 atomically creating, opening and unlinking a file in given directory.
479
475The Address Space Object 480The Address Space Object
476======================== 481========================
477 482
@@ -549,12 +554,11 @@ struct address_space_operations
549------------------------------- 554-------------------------------
550 555
551This describes how the VFS can manipulate mapping of a file to page cache in 556This describes how the VFS can manipulate mapping of a file to page cache in
552your filesystem. As of kernel 2.6.22, the following members are defined: 557your filesystem. The following members are defined:
553 558
554struct address_space_operations { 559struct address_space_operations {
555 int (*writepage)(struct page *page, struct writeback_control *wbc); 560 int (*writepage)(struct page *page, struct writeback_control *wbc);
556 int (*readpage)(struct file *, struct page *); 561 int (*readpage)(struct file *, struct page *);
557 int (*sync_page)(struct page *);
558 int (*writepages)(struct address_space *, struct writeback_control *); 562 int (*writepages)(struct address_space *, struct writeback_control *);
559 int (*set_page_dirty)(struct page *page); 563 int (*set_page_dirty)(struct page *page);
560 int (*readpages)(struct file *filp, struct address_space *mapping, 564 int (*readpages)(struct file *filp, struct address_space *mapping,
@@ -566,7 +570,7 @@ struct address_space_operations {
566 loff_t pos, unsigned len, unsigned copied, 570 loff_t pos, unsigned len, unsigned copied,
567 struct page *page, void *fsdata); 571 struct page *page, void *fsdata);
568 sector_t (*bmap)(struct address_space *, sector_t); 572 sector_t (*bmap)(struct address_space *, sector_t);
569 int (*invalidatepage) (struct page *, unsigned long); 573 void (*invalidatepage) (struct page *, unsigned int, unsigned int);
570 int (*releasepage) (struct page *, int); 574 int (*releasepage) (struct page *, int);
571 void (*freepage)(struct page *); 575 void (*freepage)(struct page *);
572 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, 576 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
@@ -576,6 +580,9 @@ struct address_space_operations {
576 /* migrate the contents of a page to the specified target */ 580 /* migrate the contents of a page to the specified target */
577 int (*migratepage) (struct page *, struct page *); 581 int (*migratepage) (struct page *, struct page *);
578 int (*launder_page) (struct page *); 582 int (*launder_page) (struct page *);
583 int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
584 unsigned long);
585 void (*is_dirty_writeback) (struct page *, bool *, bool *);
579 int (*error_remove_page) (struct mapping *mapping, struct page *page); 586 int (*error_remove_page) (struct mapping *mapping, struct page *page);
580 int (*swap_activate)(struct file *); 587 int (*swap_activate)(struct file *);
581 int (*swap_deactivate)(struct file *); 588 int (*swap_deactivate)(struct file *);
@@ -607,13 +614,6 @@ struct address_space_operations {
607 In this case, the page will be relocated, relocked and if 614 In this case, the page will be relocated, relocked and if
608 that all succeeds, ->readpage will be called again. 615 that all succeeds, ->readpage will be called again.
609 616
610 sync_page: called by the VM to notify the backing store to perform all
611 queued I/O operations for a page. I/O operations for other pages
612 associated with this address_space object may also be performed.
613
614 This function is optional and is called only for pages with
615 PG_Writeback set while waiting for the writeback to complete.
616
617 writepages: called by the VM to write out pages associated with the 617 writepages: called by the VM to write out pages associated with the
618 address_space object. If wbc->sync_mode is WBC_SYNC_ALL, then 618 address_space object. If wbc->sync_mode is WBC_SYNC_ALL, then
619 the writeback_control will specify a range of pages that must be 619 the writeback_control will specify a range of pages that must be
@@ -685,14 +685,14 @@ struct address_space_operations {
685 invalidatepage: If a page has PagePrivate set, then invalidatepage 685 invalidatepage: If a page has PagePrivate set, then invalidatepage
686 will be called when part or all of the page is to be removed 686 will be called when part or all of the page is to be removed
687 from the address space. This generally corresponds to either a 687 from the address space. This generally corresponds to either a
688 truncation or a complete invalidation of the address space 688 truncation, punch hole or a complete invalidation of the address
689 (in the latter case 'offset' will always be 0). 689 space (in the latter case 'offset' will always be 0 and 'length'
690 Any private data associated with the page should be updated 690 will be PAGE_CACHE_SIZE). Any private data associated with the page
691 to reflect this truncation. If offset is 0, then 691 should be updated to reflect this truncation. If offset is 0 and
692 the private data should be released, because the page 692 length is PAGE_CACHE_SIZE, then the private data should be released,
693 must be able to be completely discarded. This may be done by 693 because the page must be able to be completely discarded. This may
694 calling the ->releasepage function, but in this case the 694 be done by calling the ->releasepage function, but in this case the
695 release MUST succeed. 695 release MUST succeed.
696 696
697 releasepage: releasepage is called on PagePrivate pages to indicate 697 releasepage: releasepage is called on PagePrivate pages to indicate
698 that the page should be freed if possible. ->releasepage 698 that the page should be freed if possible. ->releasepage
@@ -742,6 +742,20 @@ struct address_space_operations {
742 prevent redirtying the page, it is kept locked during the whole 742 prevent redirtying the page, it is kept locked during the whole
743 operation. 743 operation.
744 744
745 is_partially_uptodate: Called by the VM when reading a file through the
746 pagecache when the underlying blocksize != pagesize. If the required
747 block is up to date then the read can complete without needing the IO
748 to bring the whole page up to date.
749
750 is_dirty_writeback: Called by the VM when attempting to reclaim a page.
751 The VM uses dirty and writeback information to determine if it needs
752 to stall to allow flushers a chance to complete some IO. Ordinarily
753 it can use PageDirty and PageWriteback but some filesystems have
754 more complex state (unstable pages in NFS prevent reclaim) or
755 do not set those flags due to locking problems (jbd). This callback
756 allows a filesystem to indicate to the VM if a page should be
757 treated as dirty or writeback for the purposes of stalling.
758
745 error_remove_page: normally set to generic_error_remove_page if truncation 759 error_remove_page: normally set to generic_error_remove_page if truncation
746 is ok for this address space. Used for memory failure handling. 760 is ok for this address space. Used for memory failure handling.
747 Setting this implies you deal with pages going away under you, 761 Setting this implies you deal with pages going away under you,
@@ -777,7 +791,7 @@ struct file_operations {
777 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); 791 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
778 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 792 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
779 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 793 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
780 int (*readdir) (struct file *, void *, filldir_t); 794 int (*iterate) (struct file *, struct dir_context *);
781 unsigned int (*poll) (struct file *, struct poll_table_struct *); 795 unsigned int (*poll) (struct file *, struct poll_table_struct *);
782 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 796 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
783 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 797 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
@@ -815,7 +829,7 @@ otherwise noted.
815 829
816 aio_write: called by io_submit(2) and other asynchronous I/O operations 830 aio_write: called by io_submit(2) and other asynchronous I/O operations
817 831
818 readdir: called when the VFS needs to read the directory contents 832 iterate: called when the VFS needs to read the directory contents
819 833
820 poll: called by the VFS when a process wants to check if there is 834 poll: called by the VFS when a process wants to check if there is
821 activity on this file and (optionally) go to sleep until there 835 activity on this file and (optionally) go to sleep until there
@@ -901,10 +915,8 @@ defined:
901struct dentry_operations { 915struct dentry_operations {
902 int (*d_revalidate)(struct dentry *, unsigned int); 916 int (*d_revalidate)(struct dentry *, unsigned int);
903 int (*d_weak_revalidate)(struct dentry *, unsigned int); 917 int (*d_weak_revalidate)(struct dentry *, unsigned int);
904 int (*d_hash)(const struct dentry *, const struct inode *, 918 int (*d_hash)(const struct dentry *, struct qstr *);
905 struct qstr *); 919 int (*d_compare)(const struct dentry *, const struct dentry *,
906 int (*d_compare)(const struct dentry *, const struct inode *,
907 const struct dentry *, const struct inode *,
908 unsigned int, const char *, const struct qstr *); 920 unsigned int, const char *, const struct qstr *);
909 int (*d_delete)(const struct dentry *); 921 int (*d_delete)(const struct dentry *);
910 void (*d_release)(struct dentry *); 922 void (*d_release)(struct dentry *);
@@ -949,25 +961,24 @@ struct dentry_operations {
949 961
950 d_hash: called when the VFS adds a dentry to the hash table. The first 962 d_hash: called when the VFS adds a dentry to the hash table. The first
951 dentry passed to d_hash is the parent directory that the name is 963 dentry passed to d_hash is the parent directory that the name is
952 to be hashed into. The inode is the dentry's inode. 964 to be hashed into.
953 965
954 Same locking and synchronisation rules as d_compare regarding 966 Same locking and synchronisation rules as d_compare regarding
955 what is safe to dereference etc. 967 what is safe to dereference etc.
956 968
957 d_compare: called to compare a dentry name with a given name. The first 969 d_compare: called to compare a dentry name with a given name. The first
958 dentry is the parent of the dentry to be compared, the second is 970 dentry is the parent of the dentry to be compared, the second is
959 the parent's inode, then the dentry and inode (may be NULL) of the 971 the child dentry. len and name string are properties of the dentry
960 child dentry. len and name string are properties of the dentry to be 972 to be compared. qstr is the name to compare it with.
961 compared. qstr is the name to compare it with.
962 973
963 Must be constant and idempotent, and should not take locks if 974 Must be constant and idempotent, and should not take locks if
964 possible, and should not or store into the dentry or inodes. 975 possible, and should not or store into the dentry.
965 Should not dereference pointers outside the dentry or inodes without 976 Should not dereference pointers outside the dentry without
966 lots of care (eg. d_parent, d_inode, d_name should not be used). 977 lots of care (eg. d_parent, d_inode, d_name should not be used).
967 978
968 However, our vfsmount is pinned, and RCU held, so the dentries and 979 However, our vfsmount is pinned, and RCU held, so the dentries and
969 inodes won't disappear, neither will our sb or filesystem module. 980 inodes won't disappear, neither will our sb or filesystem module.
970 ->i_sb and ->d_sb may be used. 981 ->d_sb may be used.
971 982
972 It is a tricky calling convention because it needs to be called under 983 It is a tricky calling convention because it needs to be called under
973 "rcu-walk", ie. without any locks or references on things. 984 "rcu-walk", ie. without any locks or references on things.
diff --git a/Documentation/fmc/00-INDEX b/Documentation/fmc/00-INDEX
new file mode 100644
index 000000000000..431c69570f43
--- /dev/null
+++ b/Documentation/fmc/00-INDEX
@@ -0,0 +1,38 @@
1
2Documentation in this directory comes from sections of the manual we
3wrote for the externally-developed fmc-bus package. The complete
4manual as of today (2013-02) is available in PDF format at
5http://www.ohwr.org/projects/fmc-bus/files
6
700-INDEX
8 - this file.
9
10FMC-and-SDB.txt
11 - What are FMC and SDB, basic concepts for this framework
12
13API.txt
14 - The functions that are exported by the bus driver
15
16parameters.txt
17 - The module parameters
18
19carrier.txt
20 - writing a carrier (a device)
21
22mezzanine.txt
23 - writing code for your mezzanine (a driver)
24
25identifiers.txt
26 - how identification and matching works
27
28fmc-fakedev.txt
29 - about drivers/fmc/fmc-fakedev.ko
30
31fmc-trivial.txt
32 - about drivers/fmc/fmc-trivial.ko
33
34fmc-write-eeprom.txt
35 - about drivers/fmc/fmc-write-eeprom.ko
36
37fmc-chardev.txt
38 - about drivers/fmc/fmc-chardev.ko
diff --git a/Documentation/fmc/API.txt b/Documentation/fmc/API.txt
new file mode 100644
index 000000000000..06b06b92c794
--- /dev/null
+++ b/Documentation/fmc/API.txt
@@ -0,0 +1,47 @@
1Functions Exported by fmc.ko
2****************************
3
4The FMC core exports the usual 4 functions that are needed for a bus to
5work, and a few more:
6
7 int fmc_driver_register(struct fmc_driver *drv);
8 void fmc_driver_unregister(struct fmc_driver *drv);
9 int fmc_device_register(struct fmc_device *fmc);
10 void fmc_device_unregister(struct fmc_device *fmc);
11
12 int fmc_device_register_n(struct fmc_device **fmc, int n);
13 void fmc_device_unregister_n(struct fmc_device **fmc, int n);
14
15 uint32_t fmc_readl(struct fmc_device *fmc, int offset);
16 void fmc_writel(struct fmc_device *fmc, uint32_t val, int off);
17 void *fmc_get_drvdata(struct fmc_device *fmc);
18 void fmc_set_drvdata(struct fmc_device *fmc, void *data);
19
20 int fmc_reprogram(struct fmc_device *f, struct fmc_driver *d, char *gw,
21 int sdb_entry);
22
23The data structure that describe a device is detailed in *note FMC
24Device::, the one that describes a driver is detailed in *note FMC
25Driver::. Please note that structures of type fmc_device must be
26allocated by the caller, but must not be released after unregistering.
27The fmc-bus itself takes care of releasing the structure when their use
28count reaches zero - actually, the device model does that in lieu of us.
29
30The functions to register and unregister n devices are meant to be used
31by carriers that host more than one mezzanine. The devices must all be
32registered at the same time because if the FPGA is reprogrammed, all
33devices in the array are affected. Usually, the driver matching the
34first device will reprogram the FPGA, so other devices must know they
35are already driven by a reprogrammed FPGA.
36
37If a carrier hosts slots that are driven by different FPGA devices, it
38should register as a group only mezzanines that are driven by the same
39FPGA, for the reason outlined above.
40
41Finally, the fmc_reprogram function calls the reprogram method (see
42*note The API Offered by Carriers:: and also scans the memory area for
43an SDB tree. You can pass -1 as sdb_entry to disable such scan.
44Otherwise, the function fails if no tree is found at the specified
45entry point. The function is meant to factorize common code, and by
46the time you read this it is already used by the spec-sw and fine-delay
47modules.
diff --git a/Documentation/fmc/FMC-and-SDB.txt b/Documentation/fmc/FMC-and-SDB.txt
new file mode 100644
index 000000000000..fa14e0b24521
--- /dev/null
+++ b/Documentation/fmc/FMC-and-SDB.txt
@@ -0,0 +1,88 @@
1
2FMC (FPGA Mezzanine Card) is the standard we use for our I/O devices,
3in the context of White Rabbit and related hardware.
4
5In our I/O environments we need to write drivers for each mezzanine
6card, and such drivers must work regardless of the carrier being used.
7To achieve this, we abstract the FMC interface.
8
9We have a carrier for PCI-E called SPEC and one for VME called SVEC,
10but more are planned. Also, we support stand-alone devices (usually
11plugged on a SPEC card), controlled through Etherbone, developed by GSI.
12
13Code and documentation for the FMC bus was born as part of the spec-sw
14project, but now it lives in its own project. Other projects, i.e.
15software support for the various carriers, should include this as a
16submodule.
17
18The most up to date version of code and documentation is always
19available from the repository you can clone from:
20
21 git://ohwr.org/fmc-projects/fmc-bus.git (read-only)
22 git@ohwr.org:fmc-projects/fmc-bus.git (read-write for developers)
23
24Selected versions of the documentation, as well as complete tar
25archives for selected revisions are placed to the Files section of the
26project: `http://www.ohwr.org/projects/fmc-bus/files'
27
28
29What is FMC
30***********
31
32FMC, as said, stands for "FPGA Mezzanine Card". It is a standard
33developed by the VME consortium called VITA (VMEbus International Trade
34Association and ratified by ANSI, the American National Standard
35Institute. The official documentation is called "ANSI-VITA 57.1".
36
37The FMC card is an almost square PCB, around 70x75 millimeters, that is
38called mezzanine in this document. It usually lives plugged into
39another PCB for power supply and control; such bigger circuit board is
40called carrier from now on, and a single carrier may host more than one
41mezzanine.
42
43In the typical application the mezzanine is mostly analog while the
44carrier is mostly digital, and hosts an FPGA that must be configured to
45match the specific mezzanine and the desired application. Thus, you may
46need to load different FPGA images to drive different instances of the
47same mezzanine.
48
49FMC, as such, is not a bus in the usual meaning of the term, because
50most carriers have only one connector, and carriers with several
51connectors have completely separate electrical connections to them.
52This package, however, implements a bus as a software abstraction.
53
54
55What is SDB
56***********
57
58SDB (Self Describing Bus) is a set of data structures that we use for
59enumerating the internal structure of an FPGA image. We also use it as
60a filesystem inside the FMC EEPROM.
61
62SDB is not mandatory for use of this FMC kernel bus, but if you have SDB
63this package can make good use of it. SDB itself is developed in the
64fpga-config-space OHWR project. The link to the repository is
65`git://ohwr.org/hdl-core-lib/fpga-config-space.git' and what is used in
66this project lives in the sdbfs subdirectory in there.
67
68SDB support for FMC is described in *note FMC Identification:: and
69*note SDB Support::
70
71
72SDB Support
73***********
74
75The fmc.ko bus driver exports a few functions to help drivers taking
76advantage of the SDB information that may be present in your own FPGA
77memory image.
78
79The module exports the following functions, in the special header
80<linux/fmc-sdb.h>. The linux/ prefix in the name is there because we
81plan to submit it upstream in the future, and don't want to force
82changes on our drivers if that happens.
83
84 int fmc_scan_sdb_tree(struct fmc_device *fmc, unsigned long address);
85 void fmc_show_sdb_tree(struct fmc_device *fmc);
86 signed long fmc_find_sdb_device(struct sdb_array *tree, uint64_t vendor,
87 uint32_t device, unsigned long *sz);
88 int fmc_free_sdb_tree(struct fmc_device *fmc);
diff --git a/Documentation/fmc/carrier.txt b/Documentation/fmc/carrier.txt
new file mode 100644
index 000000000000..173f6d65c88d
--- /dev/null
+++ b/Documentation/fmc/carrier.txt
@@ -0,0 +1,311 @@
1FMC Device
2**********
3
4Within the Linux bus framework, the FMC device is created and
5registered by the carrier driver. For example, the PCI driver for the
6SPEC card fills a data structure for each SPEC that it drives, and
7registers an associated FMC device for each card. The SVEC driver can
8do exactly the same for the VME carrier (actually, it should do it
9twice, because the SVEC carries two FMC mezzanines). Similarly, an
10Etherbone driver will be able to register its own FMC devices, offering
11communication primitives through frame exchange.
12
13The contents of the EEPROM within the FMC are used for identification
14purposes, i.e. for matching the device with its own driver. For this
15reason the device structure includes a complete copy of the EEPROM
16(actually, the carrier driver may choose whether or not to return it -
17for example we most likely won't have the whole EEPROM available for
18Etherbone devices.
19
20The following listing shows the current structure defining a device.
21Please note that all the machinery is in place but some details may
22still change in the future. For this reason, there is a version field
23at the beginning of the structure. As usual, the minor number will
24change for compatible changes (like a new flag) and the major number
25will increase when an incompatible change happens (for example, a
26change in layout of some fmc data structures). Device writers should
27just set it to the value FMC_VERSION, and be ready to get back -EINVAL
28at registration time.
29
30 struct fmc_device {
31 unsigned long version;
32 unsigned long flags;
33 struct module *owner; /* char device must pin it */
34 struct fmc_fru_id id; /* for EEPROM-based match */
35 struct fmc_operations *op; /* carrier-provided */
36 int irq; /* according to host bus. 0 == none */
37 int eeprom_len; /* Usually 8kB, may be less */
38 int eeprom_addr; /* 0x50, 0x52 etc */
39 uint8_t *eeprom; /* Full contents or leading part */
40 char *carrier_name; /* "SPEC" or similar, for special use */
41 void *carrier_data; /* "struct spec *" or equivalent */
42 __iomem void *fpga_base; /* May be NULL (Etherbone) */
43 __iomem void *slot_base; /* Set by the driver */
44 struct fmc_device **devarray; /* Allocated by the bus */
45 int slot_id; /* Index in the slot array */
46 int nr_slots; /* Number of slots in this carrier */
47 unsigned long memlen; /* Used for the char device */
48 struct device dev; /* For Linux use */
49 struct device *hwdev; /* The underlying hardware device */
50 unsigned long sdbfs_entry;
51 struct sdb_array *sdb;
52 uint32_t device_id; /* Filled by the device */
53 char *mezzanine_name; /* Defaults to ``fmc'' */
54 void *mezzanine_data;
55 };
56
57The meaning of most fields is summarized in the code comment above.
58
59The following fields must be filled by the carrier driver before
60registration:
61
62 * version: must be set to FMC_VERSION.
63
64 * owner: set to MODULE_OWNER.
65
66 * op: the operations to act on the device.
67
68 * irq: number for the mezzanine; may be zero.
69
70 * eeprom_len: length of the following array.
71
72 * eeprom_addr: 0x50 for first mezzanine and so on.
73
74 * eeprom: the full content of the I2C EEPROM.
75
76 * carrier_name.
77
78 * carrier_data: a unique pointer for the carrier.
79
80 * fpga_base: the I/O memory address (may be NULL).
81
82 * slot_id: the index of this slot (starting from zero).
83
84 * memlen: if fpga_base is valid, the length of I/O memory.
85
86 * hwdev: to be used in some dev_err() calls.
87
88 * device_id: a slot-specific unique integer number.
89
90
91Please note that the carrier should read its own EEPROM memory before
92registering the device, as well as fill all other fields listed above.
93
94The following fields should not be assigned, because they are filled
95later by either the bus or the device driver:
96
97 * flags.
98
99 * fru_id: filled by the bus, parsing the eeprom.
100
101 * slot_base: filled and used by the driver, if useful to it.
102
103 * devarray: an array og all mezzanines driven by a singe FPGA.
104
105 * nr_slots: set by the core at registration time.
106
107 * dev: used by Linux.
108
109 * sdb: FPGA contents, scanned according to driver's directions.
110
111 * sdbfs_entry: SDB entry point in EEPROM: autodetected.
112
113 * mezzanine_data: available for the driver.
114
115 * mezzanine_name: filled by fmc-bus during identification.
116
117
118Note: mezzanine_data may be redundant, because Linux offers the drvdata
119approach, so the field may be removed in later versions of this bus
120implementation.
121
122As I write this, she SPEC carrier is already completely functional in
123the fmc-bus environment, and is a good reference to look at.
124
125
126The API Offered by Carriers
127===========================
128
129The carrier provides a number of methods by means of the
130`fmc_operations' structure, which currently is defined like this
131(again, it is a moving target, please refer to the header rather than
132this document):
133
134 struct fmc_operations {
135 uint32_t (*readl)(struct fmc_device *fmc, int offset);
136 void (*writel)(struct fmc_device *fmc, uint32_t value, int offset);
137 int (*reprogram)(struct fmc_device *f, struct fmc_driver *d, char *gw);
138 int (*validate)(struct fmc_device *fmc, struct fmc_driver *drv);
139 int (*irq_request)(struct fmc_device *fmc, irq_handler_t h,
140 char *name, int flags);
141 void (*irq_ack)(struct fmc_device *fmc);
142 int (*irq_free)(struct fmc_device *fmc);
143 int (*gpio_config)(struct fmc_device *fmc, struct fmc_gpio *gpio,
144 int ngpio);
145 int (*read_ee)(struct fmc_device *fmc, int pos, void *d, int l);
146 int (*write_ee)(struct fmc_device *fmc, int pos, const void *d, int l);
147 };
148
149The individual methods perform the following tasks:
150
151`readl'
152`writel'
153 These functions access FPGA registers by whatever means the
154 carrier offers. They are not expected to fail, and most of the time
155 they will just make a memory access to the host bus. If the
156 carrier provides a fpga_base pointer, the driver may use direct
157 access through that pointer. For this reason the header offers the
158 inline functions fmc_readl and fmc_writel that access fpga_base if
159 the respective method is NULL. A driver that wants to be portable
160 and efficient should use fmc_readl and fmc_writel. For Etherbone,
161 or other non-local carriers, error-management is still to be
162 defined.
163
164`validate'
165 Module parameters are used to manage different applications for
166 two or more boards of the same kind. Validation is based on the
167 busid module parameter, if provided, and returns the matching
168 index in the associated array. See *note Module Parameters:: in in
169 doubt. If no match is found, `-ENOENT' is returned; if the user
170 didn't pass `busid=', all devices will pass validation. The value
171 returned by the validate method can be used as index into other
172 parameters (for example, some drivers use the `lm32=' parameter in
173 this way). Such "generic parameters" are documented in *note
174 Module Parameters::, below. The validate method is used by
175 `fmc-trivial.ko', described in *note fmc-trivial::.
176
177`reprogram'
178 The carrier enumerates FMC devices by loading a standard (or
179 golden) FPGA binary that allows EEPROM access. Each driver, then,
180 will need to reprogram the FPGA by calling this function. If the
181 name argument is NULL, the carrier should reprogram the golden
182 binary. If the gateware name has been overridden through module
183 parameters (in a carrier-specific way) the file loaded will match
184 the parameters. Per-device gateware names can be specified using
185 the `gateware=' parameter, see *note Module Parameters::. Note:
186 Clients should call rhe new helper, fmc_reprogram, which both
187 calls this method and parse the SDB tree of the FPGA.
188
189`irq_request'
190`irq_ack'
191`irq_free'
192 Interrupt management is carrier-specific, so it is abstracted as
193 operations. The interrupt number is listed in the device
194 structure, and for the mezzanine driver the number is only
195 informative. The handler will receive the fmc pointer as dev_id;
196 the flags argument is passed to the Linux request_irq function,
197 but fmc-specific flags may be added in the future. You'll most
198 likely want to pass the `IRQF_SHARED' flag.
199
200`gpio_config'
201 The method allows to configure a GPIO pin in the carrier, and read
202 its current value if it is configured as input. See *note The GPIO
203 Abstraction:: for details.
204
205`read_ee'
206`write_ee'
207 Read or write the EEPROM. The functions are expected to be only
208 called before reprogramming and the carrier should refuse them
209 with `ENODEV' after reprogramming. The offset is expected to be
210 within 8kB (the current size), but addresses up to 1MB are
211 reserved to fit bigger I2C devices in the future. Carriers may
212 offer access to other internal flash memories using these same
213 methods: for example the SPEC driver may define that its carrier
214 I2C memory is seen at offset 1M and the internal SPI flash is seen
215 at offset 16M. This multiplexing of several flash memories in the
216 same address space is is carrier-specific and should only be used
217 by a driver that has verified the `carrier_name' field.
218
219
220
221The GPIO Abstraction
222====================
223
224Support for GPIO pins in the fmc-bus environment is not very
225straightforward and deserves special discussion.
226
227While the general idea of a carrier-independent driver seems to fly,
228configuration of specific signals within the carrier needs at least
229some knowledge of the carrier itself. For this reason, the specific
230driver can request to configure carrier-specific GPIO pins, numbered
231from 0 to at most 4095. Configuration is performed by passing a
232pointer to an array of struct fmc_gpio items, as well as the length of
233the array. This is the data structure:
234
235 struct fmc_gpio {
236 char *carrier_name;
237 int gpio;
238 int _gpio; /* internal use by the carrier */
239 int mode; /* GPIOF_DIR_OUT etc, from <linux/gpio.h> */
240 int irqmode; /* IRQF_TRIGGER_LOW and so on */
241 };
242
243By specifying a carrier_name for each pin, the driver may access
244different pins in different carriers. The gpio_config method is
245expected to return the number of pins successfully configured, ignoring
246requests for other carriers. However, if no pin is configured (because
247no structure at all refers to the current carrier_name), the operation
248returns an error so the caller will know that it is running under a
249yet-unsupported carrier.
250
251So, for example, a driver that has been developed and tested on both
252the SPEC and the SVEC may request configuration of two different GPIO
253pins, and expect one such configuration to succeed - if none succeeds
254it most likely means that the current carrier is a still-unknown one.
255
256If, however, your GPIO pin has a specific known role, you can pass a
257special number in the gpio field, using one of the following macros:
258
259 #define FMC_GPIO_RAW(x) (x) /* 4096 of them */
260 #define FMC_GPIO_IRQ(x) ((x) + 0x1000) /* 256 of them */
261 #define FMC_GPIO_LED(x) ((x) + 0x1100) /* 256 of them */
262 #define FMC_GPIO_KEY(x) ((x) + 0x1200) /* 256 of them */
263 #define FMC_GPIO_TP(x) ((x) + 0x1300) /* 256 of them */
264 #define FMC_GPIO_USER(x) ((x) + 0x1400) /* 256 of them */
265
266Use of virtual GPIO numbers (anything but FMC_GPIO_RAW) is allowed
267provided the carrier_name field in the data structure is left
268unspecified (NULL). Each carrier is responsible for providing a mapping
269between virtual and physical GPIO numbers. The carrier may then use the
270_gpio field to cache the result of this mapping.
271
272All carriers must map their I/O lines to the sets above starting from
273zero. The SPEC, for example, maps interrupt pins 0 and 1, and test
274points 0 through 3 (even if the test points on the PCB are called
2755,6,7,8).
276
277If, for example, a driver requires a free LED and a test point (for a
278scope probe to be plugged at some point during development) it may ask
279for FMC_GPIO_LED(0) and FMC_GPIO_TP(0). Each carrier will provide
280suitable GPIO pins. Clearly, the person running the drivers will know
281the order used by the specific carrier driver in assigning leds and
282testpoints, so to make a carrier-dependent use of the diagnostic tools.
283
284In theory, some form of autodetection should be possible: a driver like
285the wr-nic (which uses IRQ(1) on the SPEC card) should configure
286IRQ(0), make a test with software-generated interrupts and configure
287IRQ(1) if the test fails. This probing step should be used because even
288if the wr-nic gateware is known to use IRQ1 on the SPEC, the driver
289should be carrier-independent and thus use IRQ(0) as a first bet -
290actually, the knowledge that IRQ0 may fail is carrier-dependent
291information, but using it doesn't make the driver unsuitable for other
292carriers.
293
294The return value of gpio_config is defined as follows:
295
296 * If no pin in the array can be used by the carrier, `-ENODEV'.
297
298 * If at least one virtual GPIO number cannot be mapped, `-ENOENT'.
299
300 * On success, 0 or positive. The value returned is the number of
301 high input bits (if no input is configured, the value for success
302 is 0).
303
304While I admit the procedure is not completely straightforward, it
305allows configuration, input and output with a single carrier operation.
306Given the typical use case of FMC devices, GPIO operations are not
307expected to ever by in hot paths, and GPIO access so fare has only been
308used to configure the interrupt pin, mode and polarity. Especially
309reading inputs is not expected to be common. If your device has GPIO
310capabilities in the hot path, you should consider using the kernel's
311GPIO mechanisms.
diff --git a/Documentation/fmc/fmc-chardev.txt b/Documentation/fmc/fmc-chardev.txt
new file mode 100644
index 000000000000..d9ccb278e597
--- /dev/null
+++ b/Documentation/fmc/fmc-chardev.txt
@@ -0,0 +1,64 @@
1fmc-chardev
2===========
3
4This is a simple generic driver, that allows user access by means of a
5character device (actually, one for each mezzanine it takes hold of).
6
7The char device is created as a misc device. Its name in /dev (as
8created by udev) is the same name as the underlying FMC device. Thus,
9the name can be a silly fmc-0000 look-alike if the device has no
10identifiers nor bus_id, a more specific fmc-0400 if the device has a
11bus-specific address but no associated name, or something like
12fdelay-0400 if the FMC core can rely on both a mezzanine name and a bus
13address.
14
15Currently the driver only supports read and write: you can lseek to the
16desired address and read or write a register.
17
18The driver assumes all registers are 32-bit in size, and only accepts a
19single read or write per system call. However, as a result of Unix read
20and write semantics, users can simply fread or fwrite bigger areas in
21order to dump or store bigger memory areas.
22
23There is currently no support for mmap, user-space interrupt management
24and DMA buffers. They may be added in later versions, if the need
25arises.
26
27The example below shows raw access to a SPEC card programmed with its
28golden FPGA file, that features an SDB structure at offset 256 - i.e.
2964 words. The mezzanine's EEPROM in this case is not programmed, so the
30default name is fmc-<bus><devfn>, and there are two cards in the system:
31
32 spusa.root# insmod fmc-chardev.ko
33 [ 1073.339332] spec 0000:02:00.0: Driver has no ID: matches all
34 [ 1073.345051] spec 0000:02:00.0: Created misc device "fmc-0200"
35 [ 1073.350821] spec 0000:04:00.0: Driver has no ID: matches all
36 [ 1073.356525] spec 0000:04:00.0: Created misc device "fmc-0400"
37 spusa.root# ls -l /dev/fmc*
38 crw------- 1 root root 10, 58 Nov 20 19:23 /dev/fmc-0200
39 crw------- 1 root root 10, 57 Nov 20 19:23 /dev/fmc-0400
40 spusa.root# dd bs=4 skip=64 count=1 if=/dev/fmc-0200 2> /dev/null | od -t x1z
41 0000000 2d 42 44 53 >-BDS<
42 0000004
43
44The simple program tools/fmc-mem in this package can access an FMC char
45device and read or write a word or a whole area. Actually, the program
46is not specific to FMC at all, it just uses lseek, read and write.
47
48Its first argument is the device name, the second the offset, the third
49(if any) the value to write and the optional last argument that must
50begin with "+" is the number of bytes to read or write. In case of
51repeated reading data is written to stdout; repeated writes read from
52stdin and the value argument is ignored.
53
54The following examples show reading the SDB magic number and the first
55SDB record from a SPEC device programmed with its golden image:
56
57 spusa.root# ./fmc-mem /dev/fmc-0200 100
58 5344422d
59 spusa.root# ./fmc-mem /dev/fmc-0200 100 +40 | od -Ax -t x1z
60 000000 2d 42 44 53 00 01 02 00 00 00 00 00 00 00 00 00 >-BDS............<
61 000010 00 00 00 00 ff 01 00 00 00 00 00 00 51 06 00 00 >............Q...<
62 000020 c9 42 a5 e6 02 00 00 00 11 05 12 20 2d 34 42 57 >.B......... -4BW<
63 000030 73 6f 72 43 72 61 62 73 49 53 47 2d 00 20 20 20 >sorCrabsISG-. <
64 000040
diff --git a/Documentation/fmc/fmc-fakedev.txt b/Documentation/fmc/fmc-fakedev.txt
new file mode 100644
index 000000000000..e85b74a4ae30
--- /dev/null
+++ b/Documentation/fmc/fmc-fakedev.txt
@@ -0,0 +1,36 @@
1fmc-fakedev
2===========
3
4This package includes a software-only device, called fmc-fakedev, which
5is able to register up to 4 mezzanines (by default it registers one).
6Unlike the SPEC driver, which creates an FMC device for each PCI cards
7it manages, this module creates a single instance of its set of
8mezzanines.
9
10It is meant as the simplest possible example of how a driver should be
11written, and it includes a fake EEPROM image (built using the tools
12described in *note FMC Identification::),, which by default is
13replicated for each fake mezzanine.
14
15You can also use this device to verify the match algorithms, by asking
16it to test your own EEPROM image. You can provide the image by means of
17the eeprom= module parameter: the new EEPROM image is loaded, as usual,
18by means of the firmware loader. This example shows the defaults and a
19custom EEPROM image:
20
21 spusa.root# insmod fmc-fakedev.ko
22 [ 99.971247] fake-fmc-carrier: mezzanine 0
23 [ 99.975393] Manufacturer: fake-vendor
24 [ 99.979624] Product name: fake-design-for-testing
25 spusa.root# rmmod fmc-fakedev
26 spusa.root# insmod fmc-fakedev.ko eeprom=fdelay-eeprom.bin
27 [ 121.447464] fake-fmc-carrier: Mezzanine 0: eeprom "fdelay-eeprom.bin"
28 [ 121.462725] fake-fmc-carrier: mezzanine 0
29 [ 121.466858] Manufacturer: CERN
30 [ 121.470477] Product name: FmcDelay1ns4cha
31 spusa.root# rmmod fmc-fakedev
32
33After loading the device, you can use the write_ee method do modify its
34own internal fake EEPROM: whenever the image is overwritten starting at
35offset 0, the module will unregister and register again the FMC device.
36This is shown in fmc-write-eeprom.txt
diff --git a/Documentation/fmc/fmc-trivial.txt b/Documentation/fmc/fmc-trivial.txt
new file mode 100644
index 000000000000..d1910bc67159
--- /dev/null
+++ b/Documentation/fmc/fmc-trivial.txt
@@ -0,0 +1,17 @@
1fmc-trivial
2===========
3
4The simple module fmc-trivial is just a simple client that registers an
5interrupt handler. I used it to verify the basic mechanism of the FMC
6bus and how interrupts worked.
7
8The module implements the generic FMC parameters, so it can program a
9different gateware file in each card. The whole list of parameters it
10accepts are:
11
12`busid='
13`gateware='
14 Generic parameters. See mezzanine.txt
15
16
17This driver is worth reading, in my opinion.
diff --git a/Documentation/fmc/fmc-write-eeprom.txt b/Documentation/fmc/fmc-write-eeprom.txt
new file mode 100644
index 000000000000..44a3bc678bf0
--- /dev/null
+++ b/Documentation/fmc/fmc-write-eeprom.txt
@@ -0,0 +1,125 @@
1fmc-write-eeprom
2================
3
4This module is designed to load a binary file from /lib/firmware and to
5write it to the internal EEPROM of the mezzanine card. This driver uses
6the `busid' generic parameter.
7
8Overwriting the EEPROM is not something you should do daily, and it is
9expected to only happen during manufacturing. For this reason, the
10module makes it unlikely for the random user to change a working EEPROM.
11
12The module takes the following measures:
13
14 * It accepts a `file=' argument (within /lib/firmware) and if no
15 such argument is received, it doesn't write anything to EEPROM
16 (i.e. there is no default file name).
17
18 * If the file name ends with `.bin' it is written verbatim starting
19 at offset 0.
20
21 * If the file name ends with `.tlv' it is interpreted as
22 type-length-value (i.e., it allows writev(2)-like operation).
23
24 * If the file name doesn't match any of the patterns above, it is
25 ignored and no write is performed.
26
27 * Only cards listed with `busid=' are written to. If no busid is
28 specified, no programming is done (and the probe function of the
29 driver will fail).
30
31
32Each TLV tuple is formatted in this way: the header is 5 bytes,
33followed by data. The first byte is `w' for write, the next two bytes
34represent the address, in little-endian byte order, and the next two
35represent the data length, in little-endian order. The length does not
36include the header (it is the actual number of bytes to be written).
37
38This is a real example: that writes 5 bytes at position 0x110:
39
40 spusa.root# od -t x1 -Ax /lib/firmware/try.tlv
41 000000 77 10 01 05 00 30 31 32 33 34
42 00000a
43 spusa.root# insmod /tmp/fmc-write-eeprom.ko busid=0x0200 file=try.tlv
44 [19983.391498] spec 0000:03:00.0: write 5 bytes at 0x0110
45 [19983.414615] spec 0000:03:00.0: write_eeprom: success
46
47Please note that you'll most likely want to use SDBFS to build your
48EEPROM image, at least if your mezzanines are being used in the White
49Rabbit environment. For this reason the TLV format is not expected to
50be used much and is not expected to be developed further.
51
52If you want to try reflashing fake EEPROM devices, you can use the
53fmc-fakedev.ko module (see *note fmc-fakedev::). Whenever you change
54the image starting at offset 0, it will deregister and register again
55after two seconds. Please note, however, that if fmc-write-eeprom is
56still loaded, the system will associate it to the new device, which
57will be reprogrammed and thus will be unloaded after two seconds. The
58following example removes the module after it reflashed fakedev the
59first time.
60
61 spusa.root# insmod fmc-fakedev.ko
62 [ 72.984733] fake-fmc: Manufacturer: fake-vendor
63 [ 72.989434] fake-fmc: Product name: fake-design-for-testing
64 spusa.root# insmod fmc-write-eeprom.ko busid=0 file=fdelay-eeprom.bin; \
65 rmmod fmc-write-eeprom
66 [ 130.874098] fake-fmc: Matching a generic driver (no ID)
67 [ 130.887845] fake-fmc: programming 6155 bytes
68 [ 130.894567] fake-fmc: write_eeprom: success
69 [ 132.895794] fake-fmc: Manufacturer: CERN
70 [ 132.899872] fake-fmc: Product name: FmcDelay1ns4cha
71
72
73Writing to the EEPROM
74=====================
75
76Once you have created a binary file for your EEPROM, you can write it
77to the storage medium using the fmc-write-eeprom (See *note
78fmc-write-eeprom::, while relying on a carrier driver. The procedure
79here shown here uses the SPEC driver
80(`http://www.ohwr.org/projects/spec-sw').
81
82The example assumes no driver is already loaded (actually, I unloaded
83them by hand as everything loads automatically at boot time after you
84installed the modules), and shows kernel messages together with
85commands. Here the prompt is spusa.root# and two SPEC cards are plugged
86in the system.
87
88 spusa.root# insmod fmc.ko
89 spusa.root# insmod spec.ko
90 [13972.382818] spec 0000:02:00.0: probe for device 0002:0000
91 [13972.392773] spec 0000:02:00.0: got file "fmc/spec-init.bin", 1484404 (0x16a674) bytes
92 [13972.591388] spec 0000:02:00.0: FPGA programming successful
93 [13972.883011] spec 0000:02:00.0: EEPROM has no FRU information
94 [13972.888719] spec 0000:02:00.0: No device_id filled, using index
95 [13972.894676] spec 0000:02:00.0: No mezzanine_name found
96 [13972.899863] /home/rubini/wip/spec-sw/kernel/spec-gpio.c - spec_gpio_init
97 [13972.906578] spec 0000:04:00.0: probe for device 0004:0000
98 [13972.916509] spec 0000:04:00.0: got file "fmc/spec-init.bin", 1484404 (0x16a674) bytes
99 [13973.115096] spec 0000:04:00.0: FPGA programming successful
100 [13973.401798] spec 0000:04:00.0: EEPROM has no FRU information
101 [13973.407474] spec 0000:04:00.0: No device_id filled, using index
102 [13973.413417] spec 0000:04:00.0: No mezzanine_name found
103 [13973.418600] /home/rubini/wip/spec-sw/kernel/spec-gpio.c - spec_gpio_init
104 spusa.root# ls /sys/bus/fmc/devices
105 fmc-0000 fmc-0001
106 spusa.root# insmod fmc-write-eeprom.ko busid=0x0200 file=fdelay-eeprom.bin
107 [14103.966259] spec 0000:02:00.0: Matching an generic driver (no ID)
108 [14103.975519] spec 0000:02:00.0: programming 6155 bytes
109 [14126.373762] spec 0000:02:00.0: write_eeprom: success
110 [14126.378770] spec 0000:04:00.0: Matching an generic driver (no ID)
111 [14126.384903] spec 0000:04:00.0: fmc_write_eeprom: no filename given: not programming
112 [14126.392600] fmc_write_eeprom: probe of fmc-0001 failed with error -2
113
114Reading back the EEPROM
115=======================
116
117In order to read back the binary content of the EEPROM of your
118mezzanine device, the bus creates a read-only sysfs file called eeprom
119for each mezzanine it knows about:
120
121 spusa.root# cd /sys/bus/fmc/devices; ls -l */eeprom
122 -r--r--r-- 1 root root 8192 Apr 9 16:53 FmcDelay1ns4cha-f001/eeprom
123 -r--r--r-- 1 root root 8192 Apr 9 17:19 fake-design-for-testing-f002/eeprom
124 -r--r--r-- 1 root root 8192 Apr 9 17:19 fake-design-for-testing-f003/eeprom
125 -r--r--r-- 1 root root 8192 Apr 9 17:19 fmc-f004/eeprom
diff --git a/Documentation/fmc/identifiers.txt b/Documentation/fmc/identifiers.txt
new file mode 100644
index 000000000000..3bb577ff0d52
--- /dev/null
+++ b/Documentation/fmc/identifiers.txt
@@ -0,0 +1,168 @@
1FMC Identification
2******************
3
4The FMC standard requires every compliant mezzanine to carry
5identification information in an I2C EEPROM. The information must be
6laid out according to the "IPMI Platform Management FRU Information",
7where IPMI is a lie I'd better not expand, and FRU means "Field
8Replaceable Unit".
9
10The FRU information is an intricate unreadable binary blob that must
11live at offset 0 of the EEPROM, and typically extends for a few hundred
12bytes. The standard allows the application to use all the remaining
13storage area of the EEPROM as it wants.
14
15This chapter explains how to create your own EEPROM image and how to
16write it in your mezzanine, as well as how devices and drivers are
17paired at run time. EEPROM programming uses tools that are part of this
18package and SDB (part of the fpga-config-space package).
19
20The first sections are only interesting for manufacturers who need to
21write the EEPROM. If you are just a software developer writing an FMC
22device or driver, you may jump straight to *note SDB Support::.
23
24
25Building the FRU Structure
26==========================
27
28If you want to know the internals of the FRU structure and despair, you
29can retrieve the document from
30`http://download.intel.com/design/servers/ipmi/FRU1011.pdf' . The
31standard is awful and difficult without reason, so we only support the
32minimum mandatory subset - we create a simple structure and parse it
33back at run time, but we are not able to either generate or parse more
34arcane features like non-english languages and 6-bit text. If you need
35more items of the FRU standard for your boards, please submit patches.
36
37This package includes the Python script that Matthieu Cattin wrote to
38generate the FRU binary blob, based on an helper libipmi by Manohar
39Vanga and Matthieu himself. I changed the test script to receive
40parameters from the command line or from the environment (the command
41line takes precedence)
42
43To make a long story short, in order to build a standard-compliant
44binary file to be burned in your EEPROM, you need the following items:
45
46 Environment Opt Official Name Default
47---------------------------------------------------------------------
48 FRU_VENDOR -v "Board Manufacturer" fmc-example
49 FRU_NAME -n "Board Product Name" mezzanine
50 FRU_SERIAL -s `Board Serial Number" 0001
51 FRU_PART -p "Board Part Number" sample-part
52 FRU_OUTPUT -o not applicable /dev/stdout
53
54The "Official Name" above is what you find in the FRU official
55documentation, chapter 11, page 7 ("Board Info Area Format"). The
56output option is used to save the generated binary to a specific file
57name instead of stdout.
58
59You can pass the items to the FRU generator either in the environment
60or on the command line. This package has currently no support for
61specifying power consumption or such stuff, but I plan to add it as
62soon as I find some time for that.
63
64FIXME: consumption etc for FRU are here or in PTS?
65
66The following example creates a binary image for a specific board:
67
68 ./tools/fru-generator -v CERN -n FmcAdc100m14b4cha \
69 -s HCCFFIA___-CR000003 -p EDA-02063-V5-0 > eeprom.bin
70
71The following example shows a script that builds several binary EEPROM
72images for a series of boards, changing the serial number for each of
73them. The script uses a mix of environment variables and command line
74options, and uses the same string patterns shown above.
75
76 #!/bin/sh
77
78 export FRU_VENDOR="CERN"
79 export FRU_NAME="FmcAdc100m14b4cha"
80 export FRU_PART="EDA-02063-V5-0"
81
82 serial="HCCFFIA___-CR"
83
84 for number in $(seq 1 50); do
85 # build number-string "ns"
86 ns="$(printf %06d $number)"
87 ./fru-generator -s "${serial}${ns}" > eeprom-${ns}.bin
88 done
89
90
91Using SDB-FS in the EEPROM
92==========================
93
94If you want to use SDB as a filesystem in the EEPROM device within the
95mezzanine, you should create one such filesystem using gensdbfs, from
96the fpga-config-space package on OHWR.
97
98By using an SBD filesystem you can cluster several files in a single
99EEPROM, so both the host system and a soft-core running in the FPGA (if
100any) can access extra production-time information.
101
102We chose to use SDB as a storage filesystem because the format is very
103simple, and both the host system and the soft-core will likely already
104include support code for such format. The SDB library offered by the
105fpga-config-space is less than 1kB under LM32, so it proves quite up to
106the task.
107
108The SDB entry point (which acts as a directory listing) cannot live at
109offset zero in the flash device, because the FRU information must live
110there. To avoid wasting precious storage space while still allowing
111for more-than-minimal FRU structures, the fmc.ko will look for the SDB
112record at address 256, 512 and 1024.
113
114In order to generate the complete EEPROM image you'll need a
115configuration file for gensdbfs: you tell the program where to place
116the sdb entry point, and you must force the FRU data file to be placed
117at the beginning of the storage device. If needed, you can also place
118other files at a special offset (we sometimes do it for backward
119compatibility with drivers we wrote before implementing SDB for flash
120memory).
121
122The directory tools/sdbfs of this package includes a well-commented
123example that you may want to use as a starting point (the comments are
124in the file called -SDB-CONFIG-). Reading documentation for gensdbfs
125is a suggested first step anyways.
126
127This package (generic FMC bus support) only accesses two files in the
128EEPROM: the FRU information, at offset zero, with a suggested filename
129of IPMI-FRU and the short name for the mezzanine, in a file called
130name. The IPMI-FRU name is not mandatory, but a strongly suggested
131choice; the name filename is mandatory, because this is the preferred
132short name used by the FMC core. For example, a name of "fdelay" may
133supplement a Product Name like "FmcDelay1ns4cha" - exactly as
134demonstrated in `tools/sdbfs'.
135
136Note: SDB access to flash memory is not yet supported, so the short
137name currently in use is just the "Product Name" FRU string.
138
139The example in tools/sdbfs includes an extra file, that is needed by
140the fine-delay driver, and must live at a known address of 0x1800. By
141running gensdbfs on that directory you can output your binary EEPROM
142image (here below spusa$ is the shell prompt):
143
144 spusa$ ../fru-generator -v CERN -n FmcDelay1ns4cha -s proto-0 \
145 -p EDA-02267-V3 > IPMI-FRU
146 spusa$ ls -l
147 total 16
148 -rw-rw-r-- 1 rubini staff 975 Nov 19 18:08 --SDB-CONFIG--
149 -rw-rw-r-- 1 rubini staff 216 Nov 19 18:13 IPMI-FRU
150 -rw-rw-r-- 1 rubini staff 11 Nov 19 18:04 fd-calib
151 -rw-rw-r-- 1 rubini staff 7 Nov 19 18:04 name
152 spusa$ sudo gensdbfs . /lib/firmware/fdelay-eeprom.bin
153 spusa$ sdb-read -l -e 0x100 /lib/firmware/fdelay-eeprom.bin
154 /home/rubini/wip/sdbfs/userspace/sdb-read: listing format is to be defined
155 46696c6544617461:2e202020 00000100-000018ff .
156 46696c6544617461:6e616d65 00000200-00000206 name
157 46696c6544617461:66642d63 00001800-000018ff fd-calib
158 46696c6544617461:49504d49 00000000-000000d7 IPMI-FRU
159 spusa$ ../fru-dump /lib/firmware/fdelay-eeprom.bin
160 /lib/firmware/fdelay-eeprom.bin: manufacturer: CERN
161 /lib/firmware/fdelay-eeprom.bin: product-name: FmcDelay1ns4cha
162 /lib/firmware/fdelay-eeprom.bin: serial-number: proto-0
163 /lib/firmware/fdelay-eeprom.bin: part-number: EDA-02267-V3
164
165As expected, the output file is both a proper sdbfs object and an IPMI
166FRU information blob. The fd-calib file lives at offset 0x1800 and is
167over-allocated to 256 bytes, according to the configuration file for
168gensdbfs.
diff --git a/Documentation/fmc/mezzanine.txt b/Documentation/fmc/mezzanine.txt
new file mode 100644
index 000000000000..87910dbfc91e
--- /dev/null
+++ b/Documentation/fmc/mezzanine.txt
@@ -0,0 +1,123 @@
1FMC Driver
2**********
3
4An FMC driver is concerned with the specific mezzanine and associated
5gateware. As such, it is expected to be independent of the carrier
6being used: it will perform I/O accesses only by means of
7carrier-provided functions.
8
9The matching between device and driver is based on the content of the
10EEPROM (as mandated by the FMC standard) or by the actual cores
11configured in the FPGA; the latter technique is used when the FPGA is
12already programmed when the device is registered to the bus core.
13
14In some special cases it is possible for a driver to directly access
15FPGA registers, by means of the `fpga_base' field of the device
16structure. This may be needed for high-bandwidth peripherals like fast
17ADC cards. If the device module registered a remote device (for example
18by means of Etherbone), the `fpga_base' pointer will be NULL.
19Therefore, drivers must be ready to deal with NULL base pointers, and
20fail gracefully. Most driver, however, are not expected to access the
21pointer directly but run fmc_readl and fmc_writel instead, which will
22work in any case.
23
24In even more special cases, the driver may access carrier-specific
25functionality: the `carrier_name' string allows the driver to check
26which is the current carrier and make use of the `carrier_data'
27pointer. We chose to use carrier names rather than numeric identifiers
28for greater flexibility, but also to avoid a central registry within
29the `fmc.h' file - we hope other users will exploit our framework with
30their own carriers. An example use of carrier names is in GPIO setup
31(see *note The GPIO Abstraction::), although the name match is not
32expected to be performed by the driver. If you depend on specific
33carriers, please check the carrier name and fail gracefully if your
34driver finds it is running in a yet-unknown-to-it environment.
35
36
37ID Table
38========
39
40Like most other Linux drivers, and FMC driver must list all the devices
41which it is able to drive. This is usually done by means of a device
42table, but in FMC we can match hardware based either on the contents of
43their EEPROM or on the actual FPGA cores that can be enumerated.
44Therefore, we have two tables of identifiers.
45
46Matching of FRU information depends on two names, the manufacturer (or
47vendor) and the device (see *note FMC Identification::); for
48flexibility during production (i.e. before writing to the EEPROM) the
49bus supports a catch-all driver that specifies NULL strings. For this
50reason, the table is specified as pointer-and-length, not a a
51null-terminated array - the entry with NULL names can be a valid entry.
52
53Matching on FPGA cores depends on two numeric fields: the 64-bit vendor
54number and the 32-bit device number. Support for matching based on
55class is not yet implemented. Each device is expected to be uniquely
56identified by an array of cores (it matches if all of the cores are
57instantiated), and for consistency the list is passed as
58pointer-and-length. Several similar devices can be driven by the same
59driver, and thus the driver specifies and array of such arrays.
60
61The complete set of involved data structures is thus the following:
62
63 struct fmc_fru_id { char *manufacturer; char *product_name; };
64 struct fmc_sdb_one_id { uint64_t vendor; uint32_t device; };
65 struct fmc_sdb_id { struct fmc_sdb_one_id *cores; int cores_nr; };
66
67 struct fmc_device_id {
68 struct fmc_fru_id *fru_id; int fru_id_nr;
69 struct fmc_sdb_id *sdb_id; int sdb_id_nr;
70 };
71
72A better reference, with full explanation, is the <linux/fmc.h> header.
73
74
75Module Parameters
76=================
77
78Most of the FMC drivers need the same set of kernel parameters. This
79package includes support to implement common parameters by means of
80fields in the `fmc_driver' structure and simple macro definitions.
81
82The parameters are carrier-specific, in that they rely on the busid
83concept, that varies among carriers. For the SPEC, the identifier is a
84PCI bus and devfn number, 16 bits wide in total; drivers for other
85carriers will most likely offer something similar but not identical,
86and some code duplication is unavoidable.
87
88This is the list of parameters that are common to several modules to
89see how they are actually used, please look at spec-trivial.c.
90
91`busid='
92 This is an array of integers, listing carrier-specific
93 identification numbers. For PIC, for example, `0x0400' represents
94 bus 4, slot 0. If any such ID is specified, the driver will only
95 accept to drive cards that appear in the list (even if the FMC ID
96 matches). This is accomplished by the validate carrier method.
97
98`gateware='
99 The argument is an array of strings. If no busid= is specified,
100 the first string of gateware= is used for all cards; otherwise the
101 identifiers and gateware names are paired one by one, in the order
102 specified.
103
104`show_sdb='
105 For modules supporting it, this parameter asks to show the SDB
106 internal structure by means of kernel messages. It is disabled by
107 default because those lines tend to hide more important messages,
108 if you look at the system console while loading the drivers.
109 Note: the parameter is being obsoleted, because fmc.ko itself now
110 supports dump_sdb= that applies to every client driver.
111
112
113For example, if you are using the trivial driver to load two different
114gateware files to two different cards, you can use the following
115parameters to load different binaries to the cards, after looking up
116the PCI identifiers. This has been tested with a SPEC carrier.
117
118 insmod fmc-trivial.ko \
119 busid=0x0200,0x0400 \
120 gateware=fmc/fine-delay.bin,fmc/simple-dio.bin
121
122Please note that not all sub-modules support all of those parameters.
123You can use modinfo to check what is supported by each module.
diff --git a/Documentation/fmc/parameters.txt b/Documentation/fmc/parameters.txt
new file mode 100644
index 000000000000..59edf088e3a4
--- /dev/null
+++ b/Documentation/fmc/parameters.txt
@@ -0,0 +1,56 @@
1Module Parameters in fmc.ko
2***************************
3
4The core driver receives two module parameters, meant to help debugging
5client modules. Both parameters can be modified by writing to
6/sys/module/fmc/parameters/, because they are used when client drivers
7are devices are registered, not when fmc.ko is loaded.
8
9`dump_eeprom='
10 If not zero, the parameter asks the bus controller to dump the
11 EEPROM of any device that is registered, using printk.
12
13`dump_sdb='
14 If not zero, the parameter prints the SDB tree of every FPGA it is
15 loaded by fmc_reprogram(). If greater than one, it asks to dump
16 the binary content of SDB records. This currently only dumps the
17 top-level SDB array, though.
18
19
20EEPROM dumping avoids repeating lines, since most of the contents is
21usually empty and all bits are one or zero. This is an example of the
22output:
23
24 [ 6625.850480] spec 0000:02:00.0: FPGA programming successful
25 [ 6626.139949] spec 0000:02:00.0: Manufacturer: CERN
26 [ 6626.144666] spec 0000:02:00.0: Product name: FmcDelay1ns4cha
27 [ 6626.150370] FMC: mezzanine 0: 0000:02:00.0 on SPEC
28 [ 6626.155179] FMC: dumping eeprom 0x2000 (8192) bytes
29 [ 6626.160087] 0000: 01 00 00 01 00 0b 00 f3 01 0a 00 a5 85 87 c4 43
30 [ 6626.167069] 0010: 45 52 4e cf 46 6d 63 44 65 6c 61 79 31 6e 73 34
31 [ 6626.174019] 0020: 63 68 61 c7 70 72 6f 74 6f 2d 30 cc 45 44 41 2d
32 [ 6626.180975] 0030: 30 32 32 36 37 2d 56 33 da 32 30 31 32 2d 31 31
33 [...]
34 [ 6626.371366] 0200: 66 64 65 6c 61 79 0a 00 00 00 00 00 00 00 00 00
35 [ 6626.378359] 0210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
36 [ 6626.385361] [...]
37 [ 6626.387308] 1800: 70 6c 61 63 65 68 6f 6c 64 65 72 ff ff ff ff ff
38 [ 6626.394259] 1810: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
39 [ 6626.401250] [...]
40
41The dump of SDB looks like the following; the example shows the simple
42golden gateware for the SPEC card, removing the leading timestamps to
43fit the page:
44
45 spec 0000:02:00.0: SDB: 00000651:e6a542c9 WB4-Crossbar-GSI
46 spec 0000:02:00.0: SDB: 0000ce42:ff07fc47 WR-Periph-Syscon (00000000-000000ff)
47 FMC: mezzanine 0: 0000:02:00.0 on SPEC
48 FMC: poor dump of sdb first level:
49 0000: 53 44 42 2d 00 02 01 00 00 00 00 00 00 00 00 00
50 0010: 00 00 00 00 00 00 01 ff 00 00 00 00 00 00 06 51
51 0020: e6 a5 42 c9 00 00 00 02 20 12 05 11 57 42 34 2d
52 0030: 43 72 6f 73 73 62 61 72 2d 47 53 49 20 20 20 00
53 0040: 00 00 01 01 00 00 00 07 00 00 00 00 00 00 00 00
54 0050: 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 ce 42
55 0060: ff 07 fc 47 00 00 00 01 20 12 03 05 57 52 2d 50
56 0070: 65 72 69 70 68 2d 53 79 73 63 6f 6e 20 20 20 01
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches
index 843751c41fea..46286460462b 100644
--- a/Documentation/hwmon/submitting-patches
+++ b/Documentation/hwmon/submitting-patches
@@ -27,8 +27,7 @@ increase the chances of your change being accepted.
27 explicitly below the patch header. 27 explicitly below the patch header.
28 28
29* If your patch (or the driver) is affected by configuration options such as 29* If your patch (or the driver) is affected by configuration options such as
30 CONFIG_SMP or CONFIG_HOTPLUG, make sure it compiles for all configuration 30 CONFIG_SMP, make sure it compiles for all configuration variants.
31 variants.
32 31
33 32
342. Adding functionality to existing drivers 332. Adding functionality to existing drivers
diff --git a/Documentation/i2c/busses/i2c-piix4 b/Documentation/i2c/busses/i2c-piix4
index 1e6634f54c50..a370b2047cf3 100644
--- a/Documentation/i2c/busses/i2c-piix4
+++ b/Documentation/i2c/busses/i2c-piix4
@@ -13,7 +13,7 @@ Supported adapters:
13 * AMD SP5100 (SB700 derivative found on some server mainboards) 13 * AMD SP5100 (SB700 derivative found on some server mainboards)
14 Datasheet: Publicly available at the AMD website 14 Datasheet: Publicly available at the AMD website
15 http://support.amd.com/us/Embedded_TechDocs/44413.pdf 15 http://support.amd.com/us/Embedded_TechDocs/44413.pdf
16 * AMD Hudson-2 16 * AMD Hudson-2, CZ
17 Datasheet: Not publicly available 17 Datasheet: Not publicly available
18 * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge 18 * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge
19 Datasheet: Publicly available at the SMSC website http://www.smsc.com 19 Datasheet: Publicly available at the SMSC website http://www.smsc.com
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 237acab169dd..2a5f0e14efa3 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -72,6 +72,7 @@ Code Seq#(hex) Include File Comments
720x06 all linux/lp.h 720x06 all linux/lp.h
730x09 all linux/raid/md_u.h 730x09 all linux/raid/md_u.h
740x10 00-0F drivers/char/s390/vmcp.h 740x10 00-0F drivers/char/s390/vmcp.h
750x10 10-1F arch/s390/include/uapi/sclp_ctl.h
750x12 all linux/fs.h 760x12 all linux/fs.h
76 linux/blkpg.h 77 linux/blkpg.h
770x1b all InfiniBand Subsystem <http://infiniband.sourceforge.net/> 780x1b all InfiniBand Subsystem <http://infiniband.sourceforge.net/>
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index 3f429ed8b3b8..213859e69e88 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -165,7 +165,7 @@ Searching in menuconfig:
165 Example: 165 Example:
166 /hotplug 166 /hotplug
167 This lists all config symbols that contain "hotplug", 167 This lists all config symbols that contain "hotplug",
168 e.g., HOTPLUG, HOTPLUG_CPU, MEMORY_HOTPLUG. 168 e.g., HOTPLUG_CPU, MEMORY_HOTPLUG.
169 169
170 For search help, enter / followed TAB-TAB-TAB (to highlight 170 For search help, enter / followed TAB-TAB-TAB (to highlight
171 <Help>) and Enter. This will tell you that you can also use 171 <Help>) and Enter. This will tell you that you can also use
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index 9c7fd988e299..bec123e466ae 100644
--- a/Documentation/kdump/kdump.txt
+++ b/Documentation/kdump/kdump.txt
@@ -47,19 +47,12 @@ parameter. Optionally the size of the ELF header can also be passed
47when using the elfcorehdr=[size[KMG]@]offset[KMG] syntax. 47when using the elfcorehdr=[size[KMG]@]offset[KMG] syntax.
48 48
49 49
50With the dump-capture kernel, you can access the memory image, or "old 50With the dump-capture kernel, you can access the memory image through
51memory," in two ways: 51/proc/vmcore. This exports the dump as an ELF-format file that you can
52 52write out using file copy commands such as cp or scp. Further, you can
53- Through a /dev/oldmem device interface. A capture utility can read the 53use analysis tools such as the GNU Debugger (GDB) and the Crash tool to
54 device file and write out the memory in raw format. This is a raw dump 54debug the dump file. This method ensures that the dump pages are correctly
55 of memory. Analysis and capture tools must be intelligent enough to 55ordered.
56 determine where to look for the right information.
57
58- Through /proc/vmcore. This exports the dump as an ELF-format file that
59 you can write out using file copy commands such as cp or scp. Further,
60 you can use analysis tools such as the GNU Debugger (GDB) and the Crash
61 tool to debug the dump file. This method ensures that the dump pages are
62 correctly ordered.
63 56
64 57
65Setup and Installation 58Setup and Installation
@@ -423,18 +416,6 @@ the following command:
423 416
424 cp /proc/vmcore <dump-file> 417 cp /proc/vmcore <dump-file>
425 418
426You can also access dumped memory as a /dev/oldmem device for a linear
427and raw view. To create the device, use the following command:
428
429 mknod /dev/oldmem c 1 12
430
431Use the dd command with suitable options for count, bs, and skip to
432access specific portions of the dump.
433
434To see the entire memory, use the following command:
435
436 dd if=/dev/oldmem of=oldmem.001
437
438 419
439Analysis 420Analysis
440======== 421========
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 2fe6e767b3d6..25dc4a0e7e48 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1129,11 +1129,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1129 The builtin appraise policy appraises all files 1129 The builtin appraise policy appraises all files
1130 owned by uid=0. 1130 owned by uid=0.
1131 1131
1132 ima_audit= [IMA]
1133 Format: { "0" | "1" }
1134 0 -- integrity auditing messages. (Default)
1135 1 -- enable informational integrity auditing messages.
1136
1137 ima_hash= [IMA] 1132 ima_hash= [IMA]
1138 Format: { "sha1" | "md5" } 1133 Format: { "sha1" | "md5" }
1139 default: "sha1" 1134 default: "sha1"
@@ -1158,6 +1153,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1158 inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver 1153 inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver
1159 Format: <irq> 1154 Format: <irq>
1160 1155
1156 int_pln_enable [x86] Enable power limit notification interrupt
1157
1158 integrity_audit=[IMA]
1159 Format: { "0" | "1" }
1160 0 -- basic integrity auditing messages. (Default)
1161 1 -- additional integrity auditing messages.
1162
1161 intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option 1163 intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option
1162 on 1164 on
1163 Enable intel iommu driver. 1165 Enable intel iommu driver.
@@ -1456,6 +1458,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1456 1458
1457 * dump_id: dump IDENTIFY data. 1459 * dump_id: dump IDENTIFY data.
1458 1460
1461 * atapi_dmadir: Enable ATAPI DMADIR bridge support
1462
1459 If there are multiple matching configurations changing 1463 If there are multiple matching configurations changing
1460 the same attribute, the last one is used. 1464 the same attribute, the last one is used.
1461 1465
@@ -3229,6 +3233,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3229 video= [FB] Frame buffer configuration 3233 video= [FB] Frame buffer configuration
3230 See Documentation/fb/modedb.txt. 3234 See Documentation/fb/modedb.txt.
3231 3235
3236 video.brightness_switch_enabled= [0,1]
3237 If set to 1, on receiving an ACPI notify event
3238 generated by hotkey, video driver will adjust brightness
3239 level and then send out the event to user space through
3240 the allocated input device; If set to 0, video driver
3241 will only send out the event without touching backlight
3242 brightness level.
3243 default: 1
3244
3232 virtio_mmio.device= 3245 virtio_mmio.device=
3233 [VMMIO] Memory mapped virtio (platform) device. 3246 [VMMIO] Memory mapped virtio (platform) device.
3234 3247
@@ -3341,6 +3354,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3341 that this also can be controlled per-workqueue for 3354 that this also can be controlled per-workqueue for
3342 workqueues visible under /sys/bus/workqueue/. 3355 workqueues visible under /sys/bus/workqueue/.
3343 3356
3357 workqueue.power_efficient
3358 Per-cpu workqueues are generally preferred because
3359 they show better performance thanks to cache
3360 locality; unfortunately, per-cpu workqueues tend to
3361 be more power hungry than unbound workqueues.
3362
3363 Enabling this makes the per-cpu workqueues which
3364 were observed to contribute significantly to power
3365 consumption unbound, leading to measurably lower
3366 power usage at the cost of small performance
3367 overhead.
3368
3369 The default value of this parameter is determined by
3370 the config option CONFIG_WQ_POWER_EFFICIENT_DEFAULT.
3371
3344 x2apic_phys [X86-64,APIC] Use x2apic physical mode instead of 3372 x2apic_phys [X86-64,APIC] Use x2apic physical mode instead of
3345 default x2apic cluster mode on platforms 3373 default x2apic cluster mode on platforms
3346 supporting x2apic. 3374 supporting x2apic.
diff --git a/Documentation/kernel-per-CPU-kthreads.txt b/Documentation/kernel-per-CPU-kthreads.txt
index cbf7ae412da4..5f39ef55c6f6 100644
--- a/Documentation/kernel-per-CPU-kthreads.txt
+++ b/Documentation/kernel-per-CPU-kthreads.txt
@@ -157,6 +157,53 @@ RCU_SOFTIRQ: Do at least one of the following:
157 calls and by forcing both kernel threads and interrupts 157 calls and by forcing both kernel threads and interrupts
158 to execute elsewhere. 158 to execute elsewhere.
159 159
160Name: kworker/%u:%d%s (cpu, id, priority)
161Purpose: Execute workqueue requests
162To reduce its OS jitter, do any of the following:
1631. Run your workload at a real-time priority, which will allow
164 preempting the kworker daemons.
1652. Do any of the following needed to avoid jitter that your
166 application cannot tolerate:
167 a. Build your kernel with CONFIG_SLUB=y rather than
168 CONFIG_SLAB=y, thus avoiding the slab allocator's periodic
169 use of each CPU's workqueues to run its cache_reap()
170 function.
171 b. Avoid using oprofile, thus avoiding OS jitter from
172 wq_sync_buffer().
173 c. Limit your CPU frequency so that a CPU-frequency
174 governor is not required, possibly enlisting the aid of
175 special heatsinks or other cooling technologies. If done
176 correctly, and if you CPU architecture permits, you should
177 be able to build your kernel with CONFIG_CPU_FREQ=n to
178 avoid the CPU-frequency governor periodically running
179 on each CPU, including cs_dbs_timer() and od_dbs_timer().
180 WARNING: Please check your CPU specifications to
181 make sure that this is safe on your particular system.
182 d. It is not possible to entirely get rid of OS jitter
183 from vmstat_update() on CONFIG_SMP=y systems, but you
184 can decrease its frequency by writing a large value to
185 /proc/sys/vm/stat_interval. The default value is HZ,
186 for an interval of one second. Of course, larger values
187 will make your virtual-memory statistics update more
188 slowly. Of course, you can also run your workload at
189 a real-time priority, thus preempting vmstat_update().
190 e. If running on high-end powerpc servers, build with
191 CONFIG_PPC_RTAS_DAEMON=n. This prevents the RTAS
192 daemon from running on each CPU every second or so.
193 (This will require editing Kconfig files and will defeat
194 this platform's RAS functionality.) This avoids jitter
195 due to the rtas_event_scan() function.
196 WARNING: Please check your CPU specifications to
197 make sure that this is safe on your particular system.
198 f. If running on Cell Processor, build your kernel with
199 CBE_CPUFREQ_SPU_GOVERNOR=n to avoid OS jitter from
200 spu_gov_work().
201 WARNING: Please check your CPU specifications to
202 make sure that this is safe on your particular system.
203 g. If running on PowerMAC, build your kernel with
204 CONFIG_PMAC_RACKMETER=n to disable the CPU-meter,
205 avoiding OS jitter from rackmeter_do_timer().
206
160Name: rcuc/%u 207Name: rcuc/%u
161Purpose: Execute RCU callbacks in CONFIG_RCU_BOOST=y kernels. 208Purpose: Execute RCU callbacks in CONFIG_RCU_BOOST=y kernels.
162To reduce its OS jitter, do at least one of the following: 209To reduce its OS jitter, do at least one of the following:
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index f98ca633b528..3458d6343e01 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -420,10 +420,10 @@ tcp_synack_retries - INTEGER
420 for a passive TCP connection will happen after 63seconds. 420 for a passive TCP connection will happen after 63seconds.
421 421
422tcp_syncookies - BOOLEAN 422tcp_syncookies - BOOLEAN
423 Only valid when the kernel was compiled with CONFIG_SYNCOOKIES 423 Only valid when the kernel was compiled with CONFIG_SYN_COOKIES
424 Send out syncookies when the syn backlog queue of a socket 424 Send out syncookies when the syn backlog queue of a socket
425 overflows. This is to prevent against the common 'SYN flood attack' 425 overflows. This is to prevent against the common 'SYN flood attack'
426 Default: FALSE 426 Default: 1
427 427
428 Note, that syncookies is fallback facility. 428 Note, that syncookies is fallback facility.
429 It MUST NOT be used to help highly loaded servers to stand 429 It MUST NOT be used to help highly loaded servers to stand
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt
index 447fd4cd54ec..c5948c7d662a 100644
--- a/Documentation/pinctrl.txt
+++ b/Documentation/pinctrl.txt
@@ -203,15 +203,8 @@ using a certain resistor value - pull up and pull down - so that the pin has a
203stable value when nothing is driving the rail it is connected to, or when it's 203stable value when nothing is driving the rail it is connected to, or when it's
204unconnected. 204unconnected.
205 205
206Pin configuration can be programmed either using the explicit APIs described 206Pin configuration can be programmed by adding configuration entries into the
207immediately below, or by adding configuration entries into the mapping table; 207mapping table; see section "Board/machine configuration" below.
208see section "Board/machine configuration" below.
209
210For example, a platform may do the following to pull up a pin to VDD:
211
212#include <linux/pinctrl/consumer.h>
213
214ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP);
215 208
216The format and meaning of the configuration parameter, PLATFORM_X_PULL_UP 209The format and meaning of the configuration parameter, PLATFORM_X_PULL_UP
217above, is entirely defined by the pin controller driver. 210above, is entirely defined by the pin controller driver.
@@ -350,6 +343,23 @@ chip b:
350 - GPIO range : [48 .. 55] 343 - GPIO range : [48 .. 55]
351 - pin range : [64 .. 71] 344 - pin range : [64 .. 71]
352 345
346The above examples assume the mapping between the GPIOs and pins is
347linear. If the mapping is sparse or haphazard, an array of arbitrary pin
348numbers can be encoded in the range like this:
349
350static const unsigned range_pins[] = { 14, 1, 22, 17, 10, 8, 6, 2 };
351
352static struct pinctrl_gpio_range gpio_range = {
353 .name = "chip",
354 .id = 0,
355 .base = 32,
356 .pins = &range_pins,
357 .npins = ARRAY_SIZE(range_pins),
358 .gc = &chip;
359};
360
361In this case the pin_base property will be ignored.
362
353When GPIO-specific functions in the pin control subsystem are called, these 363When GPIO-specific functions in the pin control subsystem are called, these
354ranges will be used to look up the appropriate pin controller by inspecting 364ranges will be used to look up the appropriate pin controller by inspecting
355and matching the pin to the pin ranges across all controllers. When a 365and matching the pin to the pin ranges across all controllers. When a
@@ -357,9 +367,9 @@ pin controller handling the matching range is found, GPIO-specific functions
357will be called on that specific pin controller. 367will be called on that specific pin controller.
358 368
359For all functionalities dealing with pin biasing, pin muxing etc, the pin 369For all functionalities dealing with pin biasing, pin muxing etc, the pin
360controller subsystem will subtract the range's .base offset from the passed 370controller subsystem will look up the corresponding pin number from the passed
361in gpio number, and add the ranges's .pin_base offset to retrive a pin number. 371in gpio number, and use the range's internals to retrive a pin number. After
362After that, the subsystem passes it on to the pin control driver, so the driver 372that, the subsystem passes it on to the pin control driver, so the driver
363will get an pin number into its handled number range. Further it is also passed 373will get an pin number into its handled number range. Further it is also passed
364the range ID value, so that the pin controller knows which range it should 374the range ID value, so that the pin controller knows which range it should
365deal with. 375deal with.
@@ -368,6 +378,7 @@ Calling pinctrl_add_gpio_range from pinctrl driver is DEPRECATED. Please see
368section 2.1 of Documentation/devicetree/bindings/gpio/gpio.txt on how to bind 378section 2.1 of Documentation/devicetree/bindings/gpio/gpio.txt on how to bind
369pinctrl and gpio drivers. 379pinctrl and gpio drivers.
370 380
381
371PINMUX interfaces 382PINMUX interfaces
372================= 383=================
373 384
@@ -1226,8 +1237,8 @@ setting up the config and muxing for the pins right before the device is
1226probing, nevertheless orthogonal to the GPIO subsystem. 1237probing, nevertheless orthogonal to the GPIO subsystem.
1227 1238
1228But there are also situations where it makes sense for the GPIO subsystem 1239But there are also situations where it makes sense for the GPIO subsystem
1229to communicate directly with with the pinctrl subsystem, using the latter 1240to communicate directly with the pinctrl subsystem, using the latter as a
1230as a back-end. This is when the GPIO driver may call out to the functions 1241back-end. This is when the GPIO driver may call out to the functions
1231described in the section "Pin control interaction with the GPIO subsystem" 1242described in the section "Pin control interaction with the GPIO subsystem"
1232above. This only involves per-pin multiplexing, and will be completely 1243above. This only involves per-pin multiplexing, and will be completely
1233hidden behind the gpio_*() function namespace. In this case, the driver 1244hidden behind the gpio_*() function namespace. In this case, the driver
diff --git a/Documentation/power/pm_qos_interface.txt b/Documentation/power/pm_qos_interface.txt
index 79a2a58425ee..483632087788 100644
--- a/Documentation/power/pm_qos_interface.txt
+++ b/Documentation/power/pm_qos_interface.txt
@@ -7,7 +7,7 @@ one of the parameters.
7Two different PM QoS frameworks are available: 7Two different PM QoS frameworks are available:
81. PM QoS classes for cpu_dma_latency, network_latency, network_throughput. 81. PM QoS classes for cpu_dma_latency, network_latency, network_throughput.
92. the per-device PM QoS framework provides the API to manage the per-device latency 92. the per-device PM QoS framework provides the API to manage the per-device latency
10constraints. 10constraints and PM QoS flags.
11 11
12Each parameters have defined units: 12Each parameters have defined units:
13 * latency: usec 13 * latency: usec
@@ -86,13 +86,17 @@ To remove the user mode request for a target value simply close the device
86node. 86node.
87 87
88 88
892. PM QoS per-device latency framework 892. PM QoS per-device latency and flags framework
90
91For each device, there are two lists of PM QoS requests. One is maintained
92along with the aggregated target of latency value and the other is for PM QoS
93flags. Values are updated in response to changes of the request list.
94
95Target latency value is simply the minimum of the request values held in the
96parameter list elements. The PM QoS flags aggregate value is a gather (bitwise
97OR) of all list elements' values. Two device PM QoS flags are defined currently:
98PM_QOS_FLAG_NO_POWER_OFF and PM_QOS_FLAG_REMOTE_WAKEUP.
90 99
91For each device a list of performance requests is maintained along with
92an aggregated target value. The aggregated target value is updated with
93changes to the request list or elements of the list. Typically the
94aggregated target value is simply the max or min of the request values held
95in the parameter list elements.
96Note: the aggregated target value is implemented as an atomic variable so that 100Note: the aggregated target value is implemented as an atomic variable so that
97reading the aggregated value does not require any locking mechanism. 101reading the aggregated value does not require any locking mechanism.
98 102
@@ -119,6 +123,38 @@ the request.
119s32 dev_pm_qos_read_value(device): 123s32 dev_pm_qos_read_value(device):
120Returns the aggregated value for a given device's constraints list. 124Returns the aggregated value for a given device's constraints list.
121 125
126enum pm_qos_flags_status dev_pm_qos_flags(device, mask)
127Check PM QoS flags of the given device against the given mask of flags.
128The meaning of the return values is as follows:
129 PM_QOS_FLAGS_ALL: All flags from the mask are set
130 PM_QOS_FLAGS_SOME: Some flags from the mask are set
131 PM_QOS_FLAGS_NONE: No flags from the mask are set
132 PM_QOS_FLAGS_UNDEFINED: The device's PM QoS structure has not been
133 initialized or the list of requests is empty.
134
135int dev_pm_qos_add_ancestor_request(dev, handle, value)
136Add a PM QoS request for the first direct ancestor of the given device whose
137power.ignore_children flag is unset.
138
139int dev_pm_qos_expose_latency_limit(device, value)
140Add a request to the device's PM QoS list of latency constraints and create
141a sysfs attribute pm_qos_resume_latency_us under the device's power directory
142allowing user space to manipulate that request.
143
144void dev_pm_qos_hide_latency_limit(device)
145Drop the request added by dev_pm_qos_expose_latency_limit() from the device's
146PM QoS list of latency constraints and remove sysfs attribute pm_qos_resume_latency_us
147from the device's power directory.
148
149int dev_pm_qos_expose_flags(device, value)
150Add a request to the device's PM QoS list of flags and create sysfs attributes
151pm_qos_no_power_off and pm_qos_remote_wakeup under the device's power directory
152allowing user space to change these flags' value.
153
154void dev_pm_qos_hide_flags(device)
155Drop the request added by dev_pm_qos_expose_flags() from the device's PM QoS list
156of flags and remove sysfs attributes pm_qos_no_power_off and pm_qos_remote_wakeup
157under the device's power directory.
122 158
123Notification mechanisms: 159Notification mechanisms:
124The per-device PM QoS framework has 2 different and distinct notification trees: 160The per-device PM QoS framework has 2 different and distinct notification trees:
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 6c9f5d9aa115..71d8fe4e75d3 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -144,8 +144,12 @@ The action performed by the idle callback is totally dependent on the subsystem
144(or driver) in question, but the expected and recommended action is to check 144(or driver) in question, but the expected and recommended action is to check
145if the device can be suspended (i.e. if all of the conditions necessary for 145if the device can be suspended (i.e. if all of the conditions necessary for
146suspending the device are satisfied) and to queue up a suspend request for the 146suspending the device are satisfied) and to queue up a suspend request for the
147device in that case. The value returned by this callback is ignored by the PM 147device in that case. If there is no idle callback, or if the callback returns
148core. 1480, then the PM core will attempt to carry out a runtime suspend of the device;
149in essence, it will call pm_runtime_suspend() directly. To prevent this (for
150example, if the callback routine has started a delayed suspend), the routine
151should return a non-zero value. Negative error return codes are ignored by the
152PM core.
149 153
150The helper functions provided by the PM core, described in Section 4, guarantee 154The helper functions provided by the PM core, described in Section 4, guarantee
151that the following constraints are met with respect to runtime PM callbacks for 155that the following constraints are met with respect to runtime PM callbacks for
@@ -301,9 +305,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
301 removing the device from device hierarchy 305 removing the device from device hierarchy
302 306
303 int pm_runtime_idle(struct device *dev); 307 int pm_runtime_idle(struct device *dev);
304 - execute the subsystem-level idle callback for the device; returns 0 on 308 - execute the subsystem-level idle callback for the device; returns an
305 success or error code on failure, where -EINPROGRESS means that 309 error code on failure, where -EINPROGRESS means that ->runtime_idle() is
306 ->runtime_idle() is already being executed 310 already being executed; if there is no callback or the callback returns 0
311 then run pm_runtime_suspend(dev) and return its result
307 312
308 int pm_runtime_suspend(struct device *dev); 313 int pm_runtime_suspend(struct device *dev);
309 - execute the subsystem-level suspend callback for the device; returns 0 on 314 - execute the subsystem-level suspend callback for the device; returns 0 on
@@ -660,11 +665,6 @@ Subsystems may wish to conserve code space by using the set of generic power
660management callbacks provided by the PM core, defined in 665management callbacks provided by the PM core, defined in
661driver/base/power/generic_ops.c: 666driver/base/power/generic_ops.c:
662 667
663 int pm_generic_runtime_idle(struct device *dev);
664 - invoke the ->runtime_idle() callback provided by the driver of this
665 device, if defined, and call pm_runtime_suspend() for this device if the
666 return value is 0 or the callback is not defined
667
668 int pm_generic_runtime_suspend(struct device *dev); 668 int pm_generic_runtime_suspend(struct device *dev);
669 - invoke the ->runtime_suspend() callback provided by the driver of this 669 - invoke the ->runtime_suspend() callback provided by the driver of this
670 device and return its result, or return -EINVAL if not defined 670 device and return its result, or return -EINVAL if not defined
diff --git a/Documentation/power/video_extension.txt b/Documentation/power/video_extension.txt
deleted file mode 100644
index b2f9b1598ac2..000000000000
--- a/Documentation/power/video_extension.txt
+++ /dev/null
@@ -1,37 +0,0 @@
1ACPI video extensions
2~~~~~~~~~~~~~~~~~~~~~
3
4This driver implement the ACPI Extensions For Display Adapters for
5integrated graphics devices on motherboard, as specified in ACPI 2.0
6Specification, Appendix B, allowing to perform some basic control like
7defining the video POST device, retrieving EDID information or to
8setup a video output, etc. Note that this is an ref. implementation
9only. It may or may not work for your integrated video device.
10
11Interfaces exposed to userland through /proc/acpi/video:
12
13VGA/info : display the supported video bus device capability like Video ROM, CRT/LCD/TV.
14VGA/ROM : Used to get a copy of the display devices' ROM data (up to 4k).
15VGA/POST_info : Used to determine what options are implemented.
16VGA/POST : Used to get/set POST device.
17VGA/DOS : Used to get/set ownership of output switching:
18 Please refer ACPI spec B.4.1 _DOS
19VGA/CRT : CRT output
20VGA/LCD : LCD output
21VGA/TVO : TV output
22VGA/*/brightness : Used to get/set brightness of output device
23
24Notify event through /proc/acpi/event:
25
26#define ACPI_VIDEO_NOTIFY_SWITCH 0x80
27#define ACPI_VIDEO_NOTIFY_PROBE 0x81
28#define ACPI_VIDEO_NOTIFY_CYCLE 0x82
29#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83
30#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84
31
32#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x82
33#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x83
34#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x84
35#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x85
36#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x86
37
diff --git a/Documentation/rapidio/rapidio.txt b/Documentation/rapidio/rapidio.txt
index a9c16c979da2..717f5aa388b1 100644
--- a/Documentation/rapidio/rapidio.txt
+++ b/Documentation/rapidio/rapidio.txt
@@ -73,28 +73,44 @@ data structure. This structure includes lists of all devices and local master
73ports that form the same network. It also contains a pointer to the default 73ports that form the same network. It also contains a pointer to the default
74master port that is used to communicate with devices within the network. 74master port that is used to communicate with devices within the network.
75 75
762.5 Device Drivers
77
78RapidIO device-specific drivers follow Linux Kernel Driver Model and are
79intended to support specific RapidIO devices attached to the RapidIO network.
80
812.6 Subsystem Interfaces
82
83RapidIO interconnect specification defines features that may be used to provide
84one or more common service layers for all participating RapidIO devices. These
85common services may act separately from device-specific drivers or be used by
86device-specific drivers. Example of such service provider is the RIONET driver
87which implements Ethernet-over-RapidIO interface. Because only one driver can be
88registered for a device, all common RapidIO services have to be registered as
89subsystem interfaces. This allows to have multiple common services attached to
90the same device without blocking attachment of a device-specific driver.
91
763. Subsystem Initialization 923. Subsystem Initialization
77--------------------------- 93---------------------------
78 94
79In order to initialize the RapidIO subsystem, a platform must initialize and 95In order to initialize the RapidIO subsystem, a platform must initialize and
80register at least one master port within the RapidIO network. To register mport 96register at least one master port within the RapidIO network. To register mport
81within the subsystem controller driver initialization code calls function 97within the subsystem controller driver's initialization code calls function
82rio_register_mport() for each available master port. 98rio_register_mport() for each available master port.
83 99
84RapidIO subsystem uses subsys_initcall() or device_initcall() to perform
85controller initialization (depending on controller device type).
86
87After all active master ports are registered with a RapidIO subsystem, 100After all active master ports are registered with a RapidIO subsystem,
88an enumeration and/or discovery routine may be called automatically or 101an enumeration and/or discovery routine may be called automatically or
89by user-space command. 102by user-space command.
90 103
104RapidIO subsystem can be configured to be built as a statically linked or
105modular component of the kernel (see details below).
106
914. Enumeration and Discovery 1074. Enumeration and Discovery
92---------------------------- 108----------------------------
93 109
944.1 Overview 1104.1 Overview
95------------ 111------------
96 112
97RapidIO subsystem configuration options allow users to specify enumeration and 113RapidIO subsystem configuration options allow users to build enumeration and
98discovery methods as statically linked components or loadable modules. 114discovery methods as statically linked components or loadable modules.
99An enumeration/discovery method implementation and available input parameters 115An enumeration/discovery method implementation and available input parameters
100define how any given method can be attached to available RapidIO mports: 116define how any given method can be attached to available RapidIO mports:
@@ -115,8 +131,8 @@ several methods to initiate an enumeration and/or discovery process:
115 endpoint waits for enumeration to be completed. If the specified timeout 131 endpoint waits for enumeration to be completed. If the specified timeout
116 expires the discovery process is terminated without obtaining RapidIO network 132 expires the discovery process is terminated without obtaining RapidIO network
117 information. NOTE: a timed out discovery process may be restarted later using 133 information. NOTE: a timed out discovery process may be restarted later using
118 a user-space command as it is described later if the given endpoint was 134 a user-space command as it is described below (if the given endpoint was
119 enumerated successfully. 135 enumerated successfully).
120 136
121 (b) Statically linked enumeration and discovery process can be started by 137 (b) Statically linked enumeration and discovery process can be started by
122 a command from user space. This initiation method provides more flexibility 138 a command from user space. This initiation method provides more flexibility
@@ -138,15 +154,42 @@ When a network scan process is started it calls an enumeration or discovery
138routine depending on the configured role of a master port: host or agent. 154routine depending on the configured role of a master port: host or agent.
139 155
140Enumeration is performed by a master port if it is configured as a host port by 156Enumeration is performed by a master port if it is configured as a host port by
141assigning a host device ID greater than or equal to zero. A host device ID is 157assigning a host destination ID greater than or equal to zero. The host
142assigned to a master port through the kernel command line parameter "riohdid=", 158destination ID can be assigned to a master port using various methods depending
143or can be configured in a platform-specific manner. If the host device ID for 159on RapidIO subsystem build configuration:
144a specific master port is set to -1, the discovery process will be performed 160
145for it. 161 (a) For a statically linked RapidIO subsystem core use command line parameter
162 "rapidio.hdid=" with a list of destination ID assignments in order of mport
163 device registration. For example, in a system with two RapidIO controllers
164 the command line parameter "rapidio.hdid=-1,7" will result in assignment of
165 the host destination ID=7 to the second RapidIO controller, while the first
166 one will be assigned destination ID=-1.
167
168 (b) If the RapidIO subsystem core is built as a loadable module, in addition
169 to the method shown above, the host destination ID(s) can be specified using
170 traditional methods of passing module parameter "hdid=" during its loading:
171 - from command line: "modprobe rapidio hdid=-1,7", or
172 - from modprobe configuration file using configuration command "options",
173 like in this example: "options rapidio hdid=-1,7". An example of modprobe
174 configuration file is provided in the section below.
175
176 NOTES:
177 (i) if "hdid=" parameter is omitted all available mport will be assigned
178 destination ID = -1;
179 (ii) the "hdid=" parameter in systems with multiple mports can have
180 destination ID assignments omitted from the end of list (default = -1).
181
182If the host device ID for a specific master port is set to -1, the discovery
183process will be performed for it.
146 184
147The enumeration and discovery routines use RapidIO maintenance transactions 185The enumeration and discovery routines use RapidIO maintenance transactions
148to access the configuration space of devices. 186to access the configuration space of devices.
149 187
188NOTE: If RapidIO switch-specific device drivers are built as loadable modules
189they must be loaded before enumeration/discovery process starts.
190This requirement is cased by the fact that enumeration/discovery methods invoke
191vendor-specific callbacks on early stages.
192
1504.2 Automatic Start of Enumeration and Discovery 1934.2 Automatic Start of Enumeration and Discovery
151------------------------------------------------ 194------------------------------------------------
152 195
@@ -266,7 +309,36 @@ method's module initialization routine calls rio_register_scan() to attach
266an enumerator to a specified mport device (or devices). The basic enumerator 309an enumerator to a specified mport device (or devices). The basic enumerator
267implementation demonstrates this process. 310implementation demonstrates this process.
268 311
2695. References 3124.6 Using Loadable RapidIO Switch Drivers
313-----------------------------------------
314
315In the case when RapidIO switch drivers are built as loadable modules a user
316must ensure that they are loaded before the enumeration/discovery starts.
317This process can be automated by specifying pre- or post- dependencies in the
318RapidIO-specific modprobe configuration file as shown in the example below.
319
320 File /etc/modprobe.d/rapidio.conf:
321 ----------------------------------
322
323 # Configure RapidIO subsystem modules
324
325 # Set enumerator host destination ID (overrides kernel command line option)
326 options rapidio hdid=-1,2
327
328 # Load RapidIO switch drivers immediately after rapidio core module was loaded
329 softdep rapidio post: idt_gen2 idtcps tsi57x
330
331 # OR :
332
333 # Load RapidIO switch drivers just before rio-scan enumerator module is loaded
334 softdep rio-scan pre: idt_gen2 idtcps tsi57x
335
336 --------------------------
337
338NOTE: In the example above, one of "softdep" commands must be removed or
339commented out to keep required module loading sequence.
340
341A. References
270------------- 342-------------
271 343
272[1] RapidIO Trade Association. RapidIO Interconnect Specifications. 344[1] RapidIO Trade Association. RapidIO Interconnect Specifications.
diff --git a/Documentation/rapidio/sysfs.txt b/Documentation/rapidio/sysfs.txt
index 19878179da4c..271438c0617f 100644
--- a/Documentation/rapidio/sysfs.txt
+++ b/Documentation/rapidio/sysfs.txt
@@ -40,6 +40,7 @@ device_rev - returns the device revision level
40 (see 4.1 for switch specific details) 40 (see 4.1 for switch specific details)
41 lprev - returns name of previous device (switch) on the path to the device 41 lprev - returns name of previous device (switch) on the path to the device
42 that that owns this attribute 42 that that owns this attribute
43 modalias - returns the device modalias
43 44
44In addition to the files listed above, each device has a binary attribute file 45In addition to the files listed above, each device has a binary attribute file
45that allows read/write access to the device configuration registers using 46that allows read/write access to the device configuration registers using
diff --git a/Documentation/rt-mutex-design.txt b/Documentation/rt-mutex-design.txt
index 33ed8007a845..a5bcd7f5c33f 100644
--- a/Documentation/rt-mutex-design.txt
+++ b/Documentation/rt-mutex-design.txt
@@ -384,7 +384,7 @@ priority back.
384__rt_mutex_adjust_prio examines the result of rt_mutex_getprio, and if the 384__rt_mutex_adjust_prio examines the result of rt_mutex_getprio, and if the
385result does not equal the task's current priority, then rt_mutex_setprio 385result does not equal the task's current priority, then rt_mutex_setprio
386is called to adjust the priority of the task to the new priority. 386is called to adjust the priority of the task to the new priority.
387Note that rt_mutex_setprio is defined in kernel/sched.c to implement the 387Note that rt_mutex_setprio is defined in kernel/sched/core.c to implement the
388actual change in priority. 388actual change in priority.
389 389
390It is interesting to note that __rt_mutex_adjust_prio can either increase 390It is interesting to note that __rt_mutex_adjust_prio can either increase
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt
index 32aa4002de4a..596b60c08b74 100644
--- a/Documentation/rtc.txt
+++ b/Documentation/rtc.txt
@@ -153,9 +153,10 @@ since_epoch: The number of seconds since the epoch according to the RTC
153time: RTC-provided time 153time: RTC-provided time
154wakealarm: The time at which the clock will generate a system wakeup 154wakealarm: The time at which the clock will generate a system wakeup
155 event. This is a one shot wakeup event, so must be reset 155 event. This is a one shot wakeup event, so must be reset
156 after wake if a daily wakeup is required. Format is either 156 after wake if a daily wakeup is required. Format is seconds since
157 seconds since the epoch or, if there's a leading +, seconds 157 the epoch by default, or if there's a leading +, seconds in the
158 in the future. 158 future, or if there is a leading +=, seconds ahead of the current
159 alarm.
159 160
160IOCTL INTERFACE 161IOCTL INTERFACE
161--------------- 162---------------
diff --git a/Documentation/scheduler/sched-domains.txt b/Documentation/scheduler/sched-domains.txt
index 443f0c76bab4..4af80b1c05aa 100644
--- a/Documentation/scheduler/sched-domains.txt
+++ b/Documentation/scheduler/sched-domains.txt
@@ -25,7 +25,7 @@ is treated as one entity. The load of a group is defined as the sum of the
25load of each of its member CPUs, and only when the load of a group becomes 25load of each of its member CPUs, and only when the load of a group becomes
26out of balance are tasks moved between groups. 26out of balance are tasks moved between groups.
27 27
28In kernel/sched.c, trigger_load_balance() is run periodically on each CPU 28In kernel/sched/core.c, trigger_load_balance() is run periodically on each CPU
29through scheduler_tick(). It raises a softirq after the next regularly scheduled 29through scheduler_tick(). It raises a softirq after the next regularly scheduled
30rebalancing event for the current runqueue has arrived. The actual load 30rebalancing event for the current runqueue has arrived. The actual load
31balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run 31balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run
@@ -62,7 +62,7 @@ struct sched_domain fields, SD_FLAG_*, SD_*_INIT to get an idea of
62the specifics and what to tune. 62the specifics and what to tune.
63 63
64Architectures may retain the regular override the default SD_*_INIT flags 64Architectures may retain the regular override the default SD_*_INIT flags
65while using the generic domain builder in kernel/sched.c if they wish to 65while using the generic domain builder in kernel/sched/core.c if they wish to
66retain the traditional SMT->SMP->NUMA topology (or some subset of that). This 66retain the traditional SMT->SMP->NUMA topology (or some subset of that). This
67can be done by #define'ing ARCH_HASH_SCHED_TUNE. 67can be done by #define'ing ARCH_HASH_SCHED_TUNE.
68 68
diff --git a/Documentation/serial/00-INDEX b/Documentation/serial/00-INDEX
index f7b0c7dc25ef..1f1b22fbd739 100644
--- a/Documentation/serial/00-INDEX
+++ b/Documentation/serial/00-INDEX
@@ -16,8 +16,6 @@ serial-rs485.txt
16 - info about RS485 structures and support in the kernel. 16 - info about RS485 structures and support in the kernel.
17specialix.txt 17specialix.txt
18 - info on hardware/driver for specialix IO8+ multiport serial card. 18 - info on hardware/driver for specialix IO8+ multiport serial card.
19stallion.txt
20 - info on using the Stallion multiport serial driver.
21sx.txt 19sx.txt
22 - info on the Specialix SX/SI multiport serial driver. 20 - info on the Specialix SX/SI multiport serial driver.
23tty.txt 21tty.txt
diff --git a/Documentation/serial/stallion.txt b/Documentation/serial/stallion.txt
deleted file mode 100644
index 4d798c0cb5cb..000000000000
--- a/Documentation/serial/stallion.txt
+++ /dev/null
@@ -1,392 +0,0 @@
1* NOTE - This is an unmaintained driver. Lantronix, which bought Stallion
2technologies, is not active in driver maintenance, and they have no information
3on when or if they will have a 2.6 driver.
4
5James Nelson <james4765@gmail.com> - 12-12-2004
6
7Stallion Multiport Serial Driver Readme
8---------------------------------------
9
10Copyright (C) 1994-1999, Stallion Technologies.
11
12Version: 5.5.1
13Date: 28MAR99
14
15
16
171. INTRODUCTION
18
19There are two drivers that work with the different families of Stallion
20multiport serial boards. One is for the Stallion smart boards - that is
21EasyIO, EasyConnection 8/32 and EasyConnection 8/64-PCI, the other for
22the true Stallion intelligent multiport boards - EasyConnection 8/64
23(ISA, EISA), EasyConnection/RA-PCI, ONboard and Brumby.
24
25If you are using any of the Stallion intelligent multiport boards (Brumby,
26ONboard, EasyConnection 8/64 (ISA, EISA), EasyConnection/RA-PCI) with
27Linux you will need to get the driver utility package. This contains a
28firmware loader and the firmware images necessary to make the devices operate.
29
30The Stallion Technologies ftp site, ftp.stallion.com, will always have
31the latest version of the driver utility package.
32
33ftp://ftp.stallion.com/drivers/ata5/Linux/ata-linux-550.tar.gz
34
35As of the printing of this document the latest version of the driver
36utility package is 5.5.0. If a later version is now available then you
37should use the latest version.
38
39If you are using the EasyIO, EasyConnection 8/32 or EasyConnection 8/64-PCI
40boards then you don't need this package, although it does have a serial stats
41display program.
42
43If you require DIP switch settings, or EISA configuration files, or any
44other information related to Stallion boards then have a look at Stallion's
45web pages at http://www.stallion.com.
46
47
48
492. INSTALLATION
50
51The drivers can be used as loadable modules or compiled into the kernel.
52You can choose which when doing a "config" on the kernel.
53
54All ISA, and EISA boards that you want to use need to be configured into
55the driver(s). All PCI boards will be automatically detected when you load
56the driver - so they do not need to be entered into the driver(s)
57configuration structure. Note that kernel PCI support is required to use PCI
58boards.
59
60There are two methods of configuring ISA and EISA boards into the drivers.
61If using the driver as a loadable module then the simplest method is to pass
62the driver configuration as module arguments. The other method is to modify
63the driver source to add configuration lines for each board in use.
64
65If you have pre-built Stallion driver modules then the module argument
66configuration method should be used. A lot of Linux distributions come with
67pre-built driver modules in /lib/modules/X.Y.Z/misc for the kernel in use.
68That makes things pretty simple to get going.
69
70
712.1 MODULE DRIVER CONFIGURATION:
72
73The simplest configuration for modules is to use the module load arguments
74to configure any ISA or EISA boards. PCI boards are automatically
75detected, so do not need any additional configuration at all.
76
77If using EasyIO, EasyConnection 8/32 ISA, or EasyConnection 8/63-PCI
78boards then use the "stallion" driver module, Otherwise if you are using
79an EasyConnection 8/64 ISA or EISA, EasyConnection/RA-PCI, ONboard,
80Brumby or original Stallion board then use the "istallion" driver module.
81
82Typically to load up the smart board driver use:
83
84 modprobe stallion
85
86This will load the EasyIO and EasyConnection 8/32 driver. It will output a
87message to say that it loaded and print the driver version number. It will
88also print out whether it found the configured boards or not. These messages
89may not appear on the console, but typically are always logged to
90/var/adm/messages or /var/log/syslog files - depending on how the klogd and
91syslogd daemons are setup on your system.
92
93To load the intelligent board driver use:
94
95 modprobe istallion
96
97It will output similar messages to the smart board driver.
98
99If not using an auto-detectable board type (that is a PCI board) then you
100will also need to supply command line arguments to the modprobe command
101when loading the driver. The general form of the configuration argument is
102
103 board?=<name>[,<ioaddr>[,<addr>][,<irq>]]
104
105where:
106
107 board? -- specifies the arbitrary board number of this board,
108 can be in the range 0 to 3.
109
110 name -- textual name of this board. The board name is the common
111 board name, or any "shortened" version of that. The board
112 type number may also be used here.
113
114 ioaddr -- specifies the I/O address of this board. This argument is
115 optional, but should generally be specified.
116
117 addr -- optional second address argument. Some board types require
118 a second I/O address, some require a memory address. The
119 exact meaning of this argument depends on the board type.
120
121 irq -- optional IRQ line used by this board.
122
123Up to 4 board configuration arguments can be specified on the load line.
124Here is some examples:
125
126 modprobe stallion board0=easyio,0x2a0,5
127
128This configures an EasyIO board as board 0 at I/O address 0x2a0 and IRQ 5.
129
130 modprobe istallion board3=ec8/64,0x2c0,0xcc000
131
132This configures an EasyConnection 8/64 ISA as board 3 at I/O address 0x2c0 at
133memory address 0xcc000.
134
135 modprobe stallion board1=ec8/32-at,0x2a0,0x280,10
136
137This configures an EasyConnection 8/32 ISA board at primary I/O address 0x2a0,
138secondary address 0x280 and IRQ 10.
139
140You will probably want to enter this module load and configuration information
141into your system startup scripts so that the drivers are loaded and configured
142on each system boot. Typically configuration files are put in the
143/etc/modprobe.d/ directory.
144
145
1462.2 STATIC DRIVER CONFIGURATION:
147
148For static driver configuration you need to modify the driver source code.
149Entering ISA and EISA boards into the driver(s) configuration structure
150involves editing the driver(s) source file. It's pretty easy if you follow
151the instructions below. Both drivers can support up to 4 boards. The smart
152card driver (the stallion.c driver) supports any combination of EasyIO and
153EasyConnection 8/32 boards (up to a total of 4). The intelligent driver
154supports any combination of ONboards, Brumbys, Stallions and EasyConnection
1558/64 (ISA and EISA) boards (up to a total of 4).
156
157To set up the driver(s) for the boards that you want to use you need to
158edit the appropriate driver file and add configuration entries.
159
160If using EasyIO or EasyConnection 8/32 ISA boards,
161 In drivers/char/stallion.c:
162 - find the definition of the stl_brdconf array (of structures)
163 near the top of the file
164 - modify this to match the boards you are going to install
165 (the comments before this structure should help)
166 - save and exit
167
168If using ONboard, Brumby, Stallion or EasyConnection 8/64 (ISA or EISA)
169boards,
170 In drivers/char/istallion.c:
171 - find the definition of the stli_brdconf array (of structures)
172 near the top of the file
173 - modify this to match the boards you are going to install
174 (the comments before this structure should help)
175 - save and exit
176
177Once you have set up the board configurations then you are ready to build
178the kernel or modules.
179
180When the new kernel is booted, or the loadable module loaded then the
181driver will emit some kernel trace messages about whether the configured
182boards were detected or not. Depending on how your system logger is set
183up these may come out on the console, or just be logged to
184/var/adm/messages or /var/log/syslog. You should check the messages to
185confirm that all is well.
186
187
1882.3 SHARING INTERRUPTS
189
190It is possible to share interrupts between multiple EasyIO and
191EasyConnection 8/32 boards in an EISA system. To do this you must be using
192static driver configuration, modifying the driver source code to add driver
193configuration. Then a couple of extra things are required:
194
1951. When entering the board resources into the stallion.c file you need to
196 mark the boards as using level triggered interrupts. Do this by replacing
197 the "0" entry at field position 6 (the last field) in the board
198 configuration structure with a "1". (This is the structure that defines
199 the board type, I/O locations, etc. for each board). All boards that are
200 sharing an interrupt must be set this way, and each board should have the
201 same interrupt number specified here as well. Now build the module or
202 kernel as you would normally.
203
2042. When physically installing the boards into the system you must enter
205 the system EISA configuration utility. You will need to install the EISA
206 configuration files for *all* the EasyIO and EasyConnection 8/32 boards
207 that are sharing interrupts. The Stallion EasyIO and EasyConnection 8/32
208 EISA configuration files required are supplied by Stallion Technologies
209 on the EASY Utilities floppy diskette (usually supplied in the box with
210 the board when purchased. If not, you can pick it up from Stallion's FTP
211 site, ftp.stallion.com). You will need to edit the board resources to
212 choose level triggered interrupts, and make sure to set each board's
213 interrupt to the same IRQ number.
214
215You must complete both the above steps for this to work. When you reboot
216or load the driver your EasyIO and EasyConnection 8/32 boards will be
217sharing interrupts.
218
219
2202.4 USING HIGH SHARED MEMORY
221
222The EasyConnection 8/64-EI, ONboard and Stallion boards are capable of
223using shared memory addresses above the usual 640K - 1Mb range. The ONboard
224ISA and the Stallion boards can be programmed to use memory addresses up to
22516Mb (the ISA bus addressing limit), and the EasyConnection 8/64-EI and
226ONboard/E can be programmed for memory addresses up to 4Gb (the EISA bus
227addressing limit).
228
229The higher than 1Mb memory addresses are fully supported by this driver.
230Just enter the address as you normally would for a lower than 1Mb address
231(in the driver's board configuration structure).
232
233
234
2352.5 TROUBLE SHOOTING
236
237If a board is not found by the driver but is actually in the system then the
238most likely problem is that the I/O address is wrong. Change the module load
239argument for the loadable module form. Or change it in the driver stallion.c
240or istallion.c configuration structure and rebuild the kernel or modules, or
241change it on the board.
242
243On EasyIO and EasyConnection 8/32 boards the IRQ is software programmable, so
244if there is a conflict you may need to change the IRQ used for a board. There
245are no interrupts to worry about for ONboard, Brumby or EasyConnection 8/64
246(ISA and EISA) boards. The memory region on EasyConnection 8/64 and
247ONboard boards is software programmable, but not on the Brumby boards.
248
249
250
2513. USING THE DRIVERS
252
2533.1 INTELLIGENT DRIVER OPERATION
254
255The intelligent boards also need to have their "firmware" code downloaded
256to them. This is done via a user level application supplied in the driver
257utility package called "stlload". Compile this program wherever you dropped
258the package files, by typing "make". In its simplest form you can then type
259
260 ./stlload -i cdk.sys
261
262in this directory and that will download board 0 (assuming board 0 is an
263EasyConnection 8/64 or EasyConnection/RA board). To download to an
264ONboard, Brumby or Stallion do:
265
266 ./stlload -i 2681.sys
267
268Normally you would want all boards to be downloaded as part of the standard
269system startup. To achieve this, add one of the lines above into the
270/etc/rc.d/rc.S or /etc/rc.d/rc.serial file. To download each board just add
271the "-b <brd-number>" option to the line. You will need to download code for
272every board. You should probably move the stlload program into a system
273directory, such as /usr/sbin. Also, the default location of the cdk.sys image
274file in the stlload down-loader is /usr/lib/stallion. Create that directory
275and put the cdk.sys and 2681.sys files in it. (It's a convenient place to put
276them anyway). As an example your /etc/rc.d/rc.S file might have the
277following lines added to it (if you had 3 boards):
278
279 /usr/sbin/stlload -b 0 -i /usr/lib/stallion/cdk.sys
280 /usr/sbin/stlload -b 1 -i /usr/lib/stallion/2681.sys
281 /usr/sbin/stlload -b 2 -i /usr/lib/stallion/2681.sys
282
283The image files cdk.sys and 2681.sys are specific to the board types. The
284cdk.sys will only function correctly on an EasyConnection 8/64 board. Similarly
285the 2681.sys image fill only operate on ONboard, Brumby and Stallion boards.
286If you load the wrong image file into a board it will fail to start up, and
287of course the ports will not be operational!
288
289If you are using the modularized version of the driver you might want to put
290the modprobe calls in the startup script as well (before the download lines
291obviously).
292
293
2943.2 USING THE SERIAL PORTS
295
296Once the driver is installed you will need to setup some device nodes to
297access the serial ports. The simplest method is to use the /dev/MAKEDEV program.
298It will automatically create device entries for Stallion boards. This will
299create the normal serial port devices as /dev/ttyE# where# is the port number
300starting from 0. A bank of 64 minor device numbers is allocated to each board,
301so the first port on the second board is port 64,etc. A set of callout type
302devices may also be created. They are created as the devices /dev/cue# where #
303is the same as for the ttyE devices.
304
305For the most part the Stallion driver tries to emulate the standard PC system
306COM ports and the standard Linux serial driver. The idea is that you should
307be able to use Stallion board ports and COM ports interchangeably without
308modifying anything but the device name. Anything that doesn't work like that
309should be considered a bug in this driver!
310
311If you look at the driver code you will notice that it is fairly closely
312based on the Linux serial driver (linux/drivers/char/serial.c). This is
313intentional, obviously this is the easiest way to emulate its behavior!
314
315Since this driver tries to emulate the standard serial ports as much as
316possible, most system utilities should work as they do for the standard
317COM ports. Most importantly "stty" works as expected and "setserial" can
318also be used (excepting the ability to auto-configure the I/O and IRQ
319addresses of boards). Higher baud rates are supported in the usual fashion
320through setserial or using the CBAUDEX extensions. Note that the EasyIO and
321EasyConnection (all types) support at least 57600 and 115200 baud. The newer
322EasyConnection XP modules and new EasyIO boards support 230400 and 460800
323baud as well. The older boards including ONboard and Brumby support a
324maximum baud rate of 38400.
325
326If you are unfamiliar with how to use serial ports, then get the Serial-HOWTO
327by Greg Hankins. It will explain everything you need to know!
328
329
330
3314. NOTES
332
333You can use both drivers at once if you have a mix of board types installed
334in a system. However to do this you will need to change the major numbers
335used by one of the drivers. Currently both drivers use major numbers 24, 25
336and 28 for their devices. Change one driver to use some other major numbers,
337and then modify the mkdevnods script to make device nodes based on those new
338major numbers. For example, you could change the istallion.c driver to use
339major numbers 60, 61 and 62. You will also need to create device nodes with
340different names for the ports, for example ttyF# and cuf#.
341
342The original Stallion board is no longer supported by Stallion Technologies.
343Although it is known to work with the istallion driver.
344
345Finding a free physical memory address range can be a problem. The older
346boards like the Stallion and ONboard need large areas (64K or even 128K), so
347they can be very difficult to get into a system. If you have 16 Mb of RAM
348then you have no choice but to put them somewhere in the 640K -> 1Mb range.
349ONboards require 64K, so typically 0xd0000 is good, or 0xe0000 on some
350systems. If you have an original Stallion board, "V4.0" or Rev.O, then you
351need a 64K memory address space, so again 0xd0000 and 0xe0000 are good.
352Older Stallion boards are a much bigger problem. They need 128K of address
353space and must be on a 128K boundary. If you don't have a VGA card then
3540xc0000 might be usable - there is really no other place you can put them
355below 1Mb.
356
357Both the ONboard and old Stallion boards can use higher memory addresses as
358well, but you must have less than 16Mb of RAM to be able to use them. Usual
359high memory addresses used include 0xec0000 and 0xf00000.
360
361The Brumby boards only require 16Kb of address space, so you can usually
362squeeze them in somewhere. Common addresses are 0xc8000, 0xcc000, or in
363the 0xd0000 range. EasyConnection 8/64 boards are even better, they only
364require 4Kb of address space, again usually 0xc8000, 0xcc000 or 0xd0000
365are good.
366
367If you are using an EasyConnection 8/64-EI or ONboard/E then usually the
3680xd0000 or 0xe0000 ranges are the best options below 1Mb. If neither of
369them can be used then the high memory support to use the really high address
370ranges is the best option. Typically the 2Gb range is convenient for them,
371and gets them well out of the way.
372
373The ports of the EasyIO-8M board do not have DCD or DTR signals. So these
374ports cannot be used as real modem devices. Generally, when using these
375ports you should only use the cueX devices.
376
377The driver utility package contains a couple of very useful programs. One
378is a serial port statistics collection and display program - very handy
379for solving serial port problems. The other is an extended option setting
380program that works with the intelligent boards.
381
382
383
3845. DISCLAIMER
385
386The information contained in this document is believed to be accurate and
387reliable. However, no responsibility is assumed by Stallion Technologies
388Pty. Ltd. for its use, nor any infringements of patents or other rights
389of third parties resulting from its use. Stallion Technologies reserves
390the right to modify the design of its products and will endeavour to change
391the information in manuals and accompanying documentation accordingly.
392
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index bb8b0dc532b8..809d72b8eff1 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -21,38 +21,41 @@ ALC267/268
21========== 21==========
22 inv-dmic Inverted internal mic workaround 22 inv-dmic Inverted internal mic workaround
23 23
24ALC269/270/275/276/280/282 24ALC269/270/275/276/28x/29x
25====== 25======
26 laptop-amic Laptops with analog-mic input 26 laptop-amic Laptops with analog-mic input
27 laptop-dmic Laptops with digital-mic input 27 laptop-dmic Laptops with digital-mic input
28 alc269-dmic Enable ALC269(VA) digital mic workaround 28 alc269-dmic Enable ALC269(VA) digital mic workaround
29 alc271-dmic Enable ALC271X digital mic workaround 29 alc271-dmic Enable ALC271X digital mic workaround
30 inv-dmic Inverted internal mic workaround 30 inv-dmic Inverted internal mic workaround
31 lenovo-dock Enables docking station I/O for some Lenovos 31 lenovo-dock Enables docking station I/O for some Lenovos
32 32 dell-headset-multi Headset jack, which can also be used as mic-in
33ALC662/663/272 33 dell-headset-dock Headset jack (without mic-in), and also dock I/O
34
35ALC66x/67x/892
34============== 36==============
35 mario Chromebook mario model fixup 37 mario Chromebook mario model fixup
36 asus-mode1 ASUS 38 asus-mode1 ASUS
37 asus-mode2 ASUS 39 asus-mode2 ASUS
38 asus-mode3 ASUS 40 asus-mode3 ASUS
39 asus-mode4 ASUS 41 asus-mode4 ASUS
40 asus-mode5 ASUS 42 asus-mode5 ASUS
41 asus-mode6 ASUS 43 asus-mode6 ASUS
42 asus-mode7 ASUS 44 asus-mode7 ASUS
43 asus-mode8 ASUS 45 asus-mode8 ASUS
44 inv-dmic Inverted internal mic workaround 46 inv-dmic Inverted internal mic workaround
47 dell-headset-multi Headset jack, which can also be used as mic-in
45 48
46ALC680 49ALC680
47====== 50======
48 N/A 51 N/A
49 52
50ALC882/883/885/888/889 53ALC88x/898/1150
51====================== 54======================
52 acer-aspire-4930g Acer Aspire 4930G/5930G/6530G/6930G/7730G 55 acer-aspire-4930g Acer Aspire 4930G/5930G/6530G/6930G/7730G
53 acer-aspire-8930g Acer Aspire 8330G/6935G 56 acer-aspire-8930g Acer Aspire 8330G/6935G
54 acer-aspire Acer Aspire others 57 acer-aspire Acer Aspire others
55 inv-dmic Inverted internal mic workaround 58 inv-dmic Inverted internal mic workaround
56 no-primary-hp VAIO Z/VGC-LN51JGB workaround (for fixed speaker DAC) 59 no-primary-hp VAIO Z/VGC-LN51JGB workaround (for fixed speaker DAC)
57 60
58ALC861/660 61ALC861/660
diff --git a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt
index 9dbe885ecd8d..97eaf5727178 100644
--- a/Documentation/spinlocks.txt
+++ b/Documentation/spinlocks.txt
@@ -137,7 +137,7 @@ don't block on each other (and thus there is no dead-lock wrt interrupts.
137But when you do the write-lock, you have to use the irq-safe version. 137But when you do the write-lock, you have to use the irq-safe version.
138 138
139For an example of being clever with rw-locks, see the "waitqueue_lock" 139For an example of being clever with rw-locks, see the "waitqueue_lock"
140handling in kernel/sched.c - nothing ever _changes_ a wait-queue from 140handling in kernel/sched/core.c - nothing ever _changes_ a wait-queue from
141within an interrupt, they only read the queue in order to know whom to 141within an interrupt, they only read the queue in order to know whom to
142wake up. So read-locks are safe (which is good: they are very common 142wake up. So read-locks are safe (which is good: they are very common
143indeed), while write-locks need to protect themselves against interrupts. 143indeed), while write-locks need to protect themselves against interrupts.
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index ccd42589e124..ab7d16efa96b 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -70,12 +70,12 @@ show up in /proc/sys/kernel:
70- shmall 70- shmall
71- shmmax [ sysv ipc ] 71- shmmax [ sysv ipc ]
72- shmmni 72- shmmni
73- softlockup_thresh
74- stop-a [ SPARC only ] 73- stop-a [ SPARC only ]
75- sysrq ==> Documentation/sysrq.txt 74- sysrq ==> Documentation/sysrq.txt
76- tainted 75- tainted
77- threads-max 76- threads-max
78- unknown_nmi_panic 77- unknown_nmi_panic
78- watchdog_thresh
79- version 79- version
80 80
81============================================================== 81==============================================================
@@ -427,6 +427,32 @@ This file shows up if CONFIG_DEBUG_STACKOVERFLOW is enabled.
427 427
428============================================================== 428==============================================================
429 429
430perf_cpu_time_max_percent:
431
432Hints to the kernel how much CPU time it should be allowed to
433use to handle perf sampling events. If the perf subsystem
434is informed that its samples are exceeding this limit, it
435will drop its sampling frequency to attempt to reduce its CPU
436usage.
437
438Some perf sampling happens in NMIs. If these samples
439unexpectedly take too long to execute, the NMIs can become
440stacked up next to each other so much that nothing else is
441allowed to execute.
442
4430: disable the mechanism. Do not monitor or correct perf's
444 sampling rate no matter how CPU time it takes.
445
4461-100: attempt to throttle perf's sample rate to this
447 percentage of CPU. Note: the kernel calculates an
448 "expected" length of each sample event. 100 here means
449 100% of that expected length. Even if this is set to
450 100, you may still see sample throttling if this
451 length is exceeded. Set to 0 if you truly do not care
452 how much CPU is consumed.
453
454==============================================================
455
430 456
431pid_max: 457pid_max:
432 458
@@ -604,15 +630,6 @@ without users and with a dead originative process will be destroyed.
604 630
605============================================================== 631==============================================================
606 632
607softlockup_thresh:
608
609This value can be used to lower the softlockup tolerance threshold. The
610default threshold is 60 seconds. If a cpu is locked up for 60 seconds,
611the kernel complains. Valid values are 1-60 seconds. Setting this
612tunable to zero will disable the softlockup detection altogether.
613
614==============================================================
615
616tainted: 633tainted:
617 634
618Non-zero if the kernel has been tainted. Numeric values, which 635Non-zero if the kernel has been tainted. Numeric values, which
@@ -648,3 +665,16 @@ that time, kernel debugging information is displayed on console.
648 665
649NMI switch that most IA32 servers have fires unknown NMI up, for 666NMI switch that most IA32 servers have fires unknown NMI up, for
650example. If a system hangs up, try pressing the NMI switch. 667example. If a system hangs up, try pressing the NMI switch.
668
669==============================================================
670
671watchdog_thresh:
672
673This value can be used to control the frequency of hrtimer and NMI
674events and the soft and hard lockup thresholds. The default threshold
675is 10 seconds.
676
677The softlockup threshold is (2 * watchdog_thresh). Setting this
678tunable to zero will disable lockup detection altogether.
679
680==============================================================
diff --git a/Documentation/timers/NO_HZ.txt b/Documentation/timers/NO_HZ.txt
index 5b5322024067..88697584242b 100644
--- a/Documentation/timers/NO_HZ.txt
+++ b/Documentation/timers/NO_HZ.txt
@@ -7,21 +7,59 @@ efficiency and reducing OS jitter. Reducing OS jitter is important for
7some types of computationally intensive high-performance computing (HPC) 7some types of computationally intensive high-performance computing (HPC)
8applications and for real-time applications. 8applications and for real-time applications.
9 9
10There are two main contexts in which the number of scheduling-clock 10There are three main ways of managing scheduling-clock interrupts
11interrupts can be reduced compared to the old-school approach of sending 11(also known as "scheduling-clock ticks" or simply "ticks"):
12a scheduling-clock interrupt to all CPUs every jiffy whether they need
13it or not (CONFIG_HZ_PERIODIC=y or CONFIG_NO_HZ=n for older kernels):
14 12
151. Idle CPUs (CONFIG_NO_HZ_IDLE=y or CONFIG_NO_HZ=y for older kernels). 131. Never omit scheduling-clock ticks (CONFIG_HZ_PERIODIC=y or
14 CONFIG_NO_HZ=n for older kernels). You normally will -not-
15 want to choose this option.
16 16
172. CPUs having only one runnable task (CONFIG_NO_HZ_FULL=y). 172. Omit scheduling-clock ticks on idle CPUs (CONFIG_NO_HZ_IDLE=y or
18 CONFIG_NO_HZ=y for older kernels). This is the most common
19 approach, and should be the default.
18 20
19These two cases are described in the following two sections, followed 213. Omit scheduling-clock ticks on CPUs that are either idle or that
22 have only one runnable task (CONFIG_NO_HZ_FULL=y). Unless you
23 are running realtime applications or certain types of HPC
24 workloads, you will normally -not- want this option.
25
26These three cases are described in the following three sections, followed
20by a third section on RCU-specific considerations and a fourth and final 27by a third section on RCU-specific considerations and a fourth and final
21section listing known issues. 28section listing known issues.
22 29
23 30
24IDLE CPUs 31NEVER OMIT SCHEDULING-CLOCK TICKS
32
33Very old versions of Linux from the 1990s and the very early 2000s
34are incapable of omitting scheduling-clock ticks. It turns out that
35there are some situations where this old-school approach is still the
36right approach, for example, in heavy workloads with lots of tasks
37that use short bursts of CPU, where there are very frequent idle
38periods, but where these idle periods are also quite short (tens or
39hundreds of microseconds). For these types of workloads, scheduling
40clock interrupts will normally be delivered any way because there
41will frequently be multiple runnable tasks per CPU. In these cases,
42attempting to turn off the scheduling clock interrupt will have no effect
43other than increasing the overhead of switching to and from idle and
44transitioning between user and kernel execution.
45
46This mode of operation can be selected using CONFIG_HZ_PERIODIC=y (or
47CONFIG_NO_HZ=n for older kernels).
48
49However, if you are instead running a light workload with long idle
50periods, failing to omit scheduling-clock interrupts will result in
51excessive power consumption. This is especially bad on battery-powered
52devices, where it results in extremely short battery lifetimes. If you
53are running light workloads, you should therefore read the following
54section.
55
56In addition, if you are running either a real-time workload or an HPC
57workload with short iterations, the scheduling-clock interrupts can
58degrade your applications performance. If this describes your workload,
59you should read the following two sections.
60
61
62OMIT SCHEDULING-CLOCK TICKS FOR IDLE CPUs
25 63
26If a CPU is idle, there is little point in sending it a scheduling-clock 64If a CPU is idle, there is little point in sending it a scheduling-clock
27interrupt. After all, the primary purpose of a scheduling-clock interrupt 65interrupt. After all, the primary purpose of a scheduling-clock interrupt
@@ -59,10 +97,12 @@ By default, CONFIG_NO_HZ_IDLE=y kernels boot with "nohz=on", enabling
59dyntick-idle mode. 97dyntick-idle mode.
60 98
61 99
62CPUs WITH ONLY ONE RUNNABLE TASK 100OMIT SCHEDULING-CLOCK TICKS FOR CPUs WITH ONLY ONE RUNNABLE TASK
63 101
64If a CPU has only one runnable task, there is little point in sending it 102If a CPU has only one runnable task, there is little point in sending it
65a scheduling-clock interrupt because there is no other task to switch to. 103a scheduling-clock interrupt because there is no other task to switch to.
104Note that omitting scheduling-clock ticks for CPUs with only one runnable
105task implies also omitting them for idle CPUs.
66 106
67The CONFIG_NO_HZ_FULL=y Kconfig option causes the kernel to avoid 107The CONFIG_NO_HZ_FULL=y Kconfig option causes the kernel to avoid
68sending scheduling-clock interrupts to CPUs with a single runnable task, 108sending scheduling-clock interrupts to CPUs with a single runnable task,
@@ -238,6 +278,11 @@ o Adaptive-ticks does not do anything unless there is only one
238 single runnable SCHED_FIFO task and multiple runnable SCHED_OTHER 278 single runnable SCHED_FIFO task and multiple runnable SCHED_OTHER
239 tasks, even though these interrupts are unnecessary. 279 tasks, even though these interrupts are unnecessary.
240 280
281 And even when there are multiple runnable tasks on a given CPU,
282 there is little point in interrupting that CPU until the current
283 running task's timeslice expires, which is almost always way
284 longer than the time of the next scheduling-clock interrupt.
285
241 Better handling of these sorts of situations is future work. 286 Better handling of these sorts of situations is future work.
242 287
243o A reboot is required to reconfigure both adaptive idle and RCU 288o A reboot is required to reconfigure both adaptive idle and RCU
@@ -268,6 +313,16 @@ o Unless all CPUs are idle, at least one CPU must keep the
268 scheduling-clock interrupt going in order to support accurate 313 scheduling-clock interrupt going in order to support accurate
269 timekeeping. 314 timekeeping.
270 315
271o If there are adaptive-ticks CPUs, there will be at least one 316o If there might potentially be some adaptive-ticks CPUs, there
272 CPU keeping the scheduling-clock interrupt going, even if all 317 will be at least one CPU keeping the scheduling-clock interrupt
273 CPUs are otherwise idle. 318 going, even if all CPUs are otherwise idle.
319
320 Better handling of this situation is ongoing work.
321
322o Some process-handling operations still require the occasional
323 scheduling-clock tick. These operations include calculating CPU
324 load, maintaining sched average, computing CFS entity vruntime,
325 computing avenrun, and carrying out load balancing. They are
326 currently accommodated by scheduling-clock tick every second
327 or so. On-going work will eliminate the need even for these
328 infrequent scheduling-clock ticks.
diff --git a/Documentation/trace/events-nmi.txt b/Documentation/trace/events-nmi.txt
new file mode 100644
index 000000000000..c03c8c89f08d
--- /dev/null
+++ b/Documentation/trace/events-nmi.txt
@@ -0,0 +1,43 @@
1NMI Trace Events
2
3These events normally show up here:
4
5 /sys/kernel/debug/tracing/events/nmi
6
7--
8
9nmi_handler:
10
11You might want to use this tracepoint if you suspect that your
12NMI handlers are hogging large amounts of CPU time. The kernel
13will warn if it sees long-running handlers:
14
15 INFO: NMI handler took too long to run: 9.207 msecs
16
17and this tracepoint will allow you to drill down and get some
18more details.
19
20Let's say you suspect that perf_event_nmi_handler() is causing
21you some problems and you only want to trace that handler
22specifically. You need to find its address:
23
24 $ grep perf_event_nmi_handler /proc/kallsyms
25 ffffffff81625600 t perf_event_nmi_handler
26
27Let's also say you are only interested in when that function is
28really hogging a lot of CPU time, like a millisecond at a time.
29Note that the kernel's output is in milliseconds, but the input
30to the filter is in nanoseconds! You can filter on 'delta_ns':
31
32cd /sys/kernel/debug/tracing/events/nmi/nmi_handler
33echo 'handler==0xffffffff81625600 && delta_ns>1000000' > filter
34echo 1 > enable
35
36Your output would then look like:
37
38$ cat /sys/kernel/debug/tracing/trace_pipe
39<idle>-0 [000] d.h3 505.397558: nmi_handler: perf_event_nmi_handler() delta_ns: 3236765 handled: 1
40<idle>-0 [000] d.h3 505.805893: nmi_handler: perf_event_nmi_handler() delta_ns: 3174234 handled: 1
41<idle>-0 [000] d.h3 506.158206: nmi_handler: perf_event_nmi_handler() delta_ns: 3084642 handled: 1
42<idle>-0 [000] d.h3 506.334346: nmi_handler: perf_event_nmi_handler() delta_ns: 3080351 handled: 1
43
diff --git a/Documentation/trace/events-power.txt b/Documentation/trace/events-power.txt
index e1498ff8cf94..3bd33b8dc7c4 100644
--- a/Documentation/trace/events-power.txt
+++ b/Documentation/trace/events-power.txt
@@ -63,3 +63,34 @@ power_domain_target "%s state=%lu cpu_id=%lu"
63The first parameter gives the power domain name (e.g. "mpu_pwrdm"). 63The first parameter gives the power domain name (e.g. "mpu_pwrdm").
64The second parameter is the power domain target state. 64The second parameter is the power domain target state.
65 65
664. PM QoS events
67================
68The PM QoS events are used for QoS add/update/remove request and for
69target/flags update.
70
71pm_qos_add_request "pm_qos_class=%s value=%d"
72pm_qos_update_request "pm_qos_class=%s value=%d"
73pm_qos_remove_request "pm_qos_class=%s value=%d"
74pm_qos_update_request_timeout "pm_qos_class=%s value=%d, timeout_us=%ld"
75
76The first parameter gives the QoS class name (e.g. "CPU_DMA_LATENCY").
77The second parameter is value to be added/updated/removed.
78The third parameter is timeout value in usec.
79
80pm_qos_update_target "action=%s prev_value=%d curr_value=%d"
81pm_qos_update_flags "action=%s prev_value=0x%x curr_value=0x%x"
82
83The first parameter gives the QoS action name (e.g. "ADD_REQ").
84The second parameter is the previous QoS value.
85The third parameter is the current QoS value to update.
86
87And, there are also events used for device PM QoS add/update/remove request.
88
89dev_pm_qos_add_request "device=%s type=%s new_value=%d"
90dev_pm_qos_update_request "device=%s type=%s new_value=%d"
91dev_pm_qos_remove_request "device=%s type=%s new_value=%d"
92
93The first parameter gives the device name which tries to add/update/remove
94QoS requests.
95The second parameter gives the request type (e.g. "DEV_PM_QOS_LATENCY").
96The third parameter is value to be added/updated/removed.
diff --git a/Documentation/usb/gadget_configfs.txt b/Documentation/usb/gadget_configfs.txt
new file mode 100644
index 000000000000..8ec2a67c39b7
--- /dev/null
+++ b/Documentation/usb/gadget_configfs.txt
@@ -0,0 +1,384 @@
1
2
3
4
5 Linux USB gadget configured through configfs
6
7
8 25th April 2013
9
10
11
12
13Overview
14========
15
16A USB Linux Gadget is a device which has a UDC (USB Device Controller) and can
17be connected to a USB Host to extend it with additional functions like a serial
18port or a mass storage capability.
19
20A gadget is seen by its host as a set of configurations, each of which contains
21a number of interfaces which, from the gadget's perspective, are known as
22functions, each function representing e.g. a serial connection or a SCSI disk.
23
24Linux provides a number of functions for gadgets to use.
25
26Creating a gadget means deciding what configurations there will be
27and which functions each configuration will provide.
28
29Configfs (please see Documentation/filesystems/configfs/*) lends itslef nicely
30for the purpose of telling the kernel about the above mentioned decision.
31This document is about how to do it.
32
33It also describes how configfs integration into gadget is designed.
34
35
36
37
38Requirements
39============
40
41In order for this to work configfs must be available, so CONFIGFS_FS must be
42'y' or 'm' in .config. As of this writing USB_LIBCOMPOSITE selects CONFIGFS_FS.
43
44
45
46
47Usage
48=====
49
50(The original post describing the first function
51made available through configfs can be seen here:
52http://www.spinics.net/lists/linux-usb/msg76388.html)
53
54$ modprobe libcomposite
55$ mount none $CONFIGFS_HOME -t configfs
56
57where CONFIGFS_HOME is the mount point for configfs
58
591. Creating the gadgets
60-----------------------
61
62For each gadget to be created its corresponding directory must be created:
63
64$ mkdir $CONFIGFS_HOME/usb_gadget/<gadget name>
65
66e.g.:
67
68$ mkdir $CONFIGFS_HOME/usb_gadget/g1
69
70...
71...
72...
73
74$ cd $CONFIGFS_HOME/usb_gadget/g1
75
76Each gadget needs to have its vendor id <VID> and product id <PID> specified:
77
78$ echo <VID> > idVendor
79$ echo <PID> > idProduct
80
81A gadget also needs its serial number, manufacturer and product strings.
82In order to have a place to store them, a strings subdirectory must be created
83for each language, e.g.:
84
85$ mkdir strings/0x409
86
87Then the strings can be specified:
88
89$ echo <serial number> > strings/0x409/serialnumber
90$ echo <manufacturer> > strings/0x409/manufacturer
91$ echo <product> > strings/0x409/product
92
932. Creating the configurations
94------------------------------
95
96Each gadget will consist of a number of configurations, their corresponding
97directories must be created:
98
99$ mkdir configs/<name>.<number>
100
101where <name> can be any string which is legal in a filesystem and the
102<numebr> is the configuration's number, e.g.:
103
104$ mkdir configs/c.1
105
106...
107...
108...
109
110Each configuration also needs its strings, so a subdirectory must be created
111for each language, e.g.:
112
113$ mkdir configs/c.1/strings/0x409
114
115Then the configuration string can be specified:
116
117$ echo <configuration> > configs/c.1/strings/0x409/configuration
118
119Some attributes can also be set for a configuration, e.g.:
120
121$ echo 120 > configs/c.1/MaxPower
122
1233. Creating the functions
124-------------------------
125
126The gadget will provide some functions, for each function its corresponding
127directory must be created:
128
129$ mkdir functions/<name>.<instance name>
130
131where <name> corresponds to one of allowed function names and instance name
132is an arbitrary string allowed in a filesystem, e.g.:
133
134$ mkdir functions/ncm.usb0 # usb_f_ncm.ko gets loaded with request_module()
135
136...
137...
138...
139
140Each function provides its specific set of attributes, with either read-only
141or read-write access. Where applicable they need to be written to as
142appropriate.
143Please refer to Documentation/ABI/*/configfs-usb-gadget* for more information.
144
1454. Associating the functions with their configurations
146------------------------------------------------------
147
148At this moment a number of gadgets is created, each of which has a number of
149configurations specified and a number of functions available. What remains
150is specifying which function is available in which configuration (the same
151function can be used in multiple configurations). This is achieved with
152creating symbolic links:
153
154$ ln -s functions/<name>.<instance name> configs/<name>.<number>
155
156e.g.:
157
158$ ln -s functions/ncm.usb0 configs/c.1
159
160...
161...
162...
163
1645. Enabling the gadget
165----------------------
166
167All the above steps serve the purpose of composing the gadget of
168configurations and functions.
169
170An example directory structure might look like this:
171
172.
173./strings
174./strings/0x409
175./strings/0x409/serialnumber
176./strings/0x409/product
177./strings/0x409/manufacturer
178./configs
179./configs/c.1
180./configs/c.1/ncm.usb0 -> ../../../../usb_gadget/g1/functions/ncm.usb0
181./configs/c.1/strings
182./configs/c.1/strings/0x409
183./configs/c.1/strings/0x409/configuration
184./configs/c.1/bmAttributes
185./configs/c.1/MaxPower
186./functions
187./functions/ncm.usb0
188./functions/ncm.usb0/ifname
189./functions/ncm.usb0/qmult
190./functions/ncm.usb0/host_addr
191./functions/ncm.usb0/dev_addr
192./UDC
193./bcdUSB
194./bcdDevice
195./idProduct
196./idVendor
197./bMaxPacketSize0
198./bDeviceProtocol
199./bDeviceSubClass
200./bDeviceClass
201
202
203Such a gadget must be finally enabled so that the USB host can enumerate it.
204In order to enable the gadget it must be bound to a UDC (USB Device Controller).
205
206$ echo <udc name> > UDC
207
208where <udc name> is one of those found in /sys/class/udc/*
209e.g.:
210
211$ echo s3c-hsotg > UDC
212
213
2146. Disabling the gadget
215-----------------------
216
217$ echo "" > UDC
218
2197. Cleaning up
220--------------
221
222Remove functions from configurations:
223
224$ rm configs/<config name>.<number>/<function>
225
226where <config name>.<number> specify the configuration and <function> is
227a symlink to a function being removed from the configuration, e.g.:
228
229$ rm configfs/c.1/ncm.usb0
230
231...
232...
233...
234
235Remove strings directories in configurations
236
237$ rmdir configs/<config name>.<number>/strings/<lang>
238
239e.g.:
240
241$ rmdir configs/c.1/strings/0x409
242
243...
244...
245...
246
247and remove the configurations
248
249$ rmdir configs/<config name>.<number>
250
251e.g.:
252
253rmdir configs/c.1
254
255...
256...
257...
258
259Remove functions (function modules are not unloaded, though)
260
261$ rmdir functions/<name>.<instance name>
262
263e.g.:
264
265$ rmdir functions/ncm.usb0
266
267...
268...
269...
270
271Remove strings directories in the gadget
272
273$ rmdir strings/<lang>
274
275e.g.:
276
277$ rmdir strings/0x409
278
279and finally remove the gadget:
280
281$ cd ..
282$ rmdir <gadget name>
283
284e.g.:
285
286$ rmdir g1
287
288
289
290
291Implementation design
292=====================
293
294Below the idea of how configfs works is presented.
295In configfs there are items and groups, both represented as directories.
296The difference between an item and a group is that a group can contain
297other groups. In the picture below only an item is shown.
298Both items and groups can have attributes, which are represented as files.
299The user can create and remove directories, but cannot remove files,
300which can be read-only or read-write, depending on what they represent.
301
302The filesystem part of configfs operates on config_items/groups and
303configfs_attributes which are generic and of the same type for all
304configured elements. However, they are embedded in usage-specific
305larger structures. In the picture below there is a "cs" which contains
306a config_item and an "sa" which contains a configfs_attribute.
307
308The filesystem view would be like this:
309
310./
311./cs (directory)
312 |
313 +--sa (file)
314 |
315 .
316 .
317 .
318
319Whenever a user reads/writes the "sa" file, a function is called
320which accepts a struct config_item and a struct configfs_attribute.
321In the said function the "cs" and "sa" are retrieved using the well
322known container_of technique and an appropriate sa's function (show or
323store) is called and passed the "cs" and a character buffer. The "show"
324is for displaying the file's contents (copy data from the cs to the
325buffer), while the "store" is for modifying the file's contents (copy data
326from the buffer to the cs), but it is up to the implementer of the
327two functions to decide what they actually do.
328
329typedef struct configured_structure cs;
330typedef struc specific_attribute sa;
331
332 sa
333 +----------------------------------+
334 cs | (*show)(cs *, buffer); |
335+-----------------+ | (*store)(cs *, buffer, length); |
336| | | |
337| +-------------+ | | +------------------+ |
338| | struct |-|----|------>|struct | |
339| | config_item | | | |configfs_attribute| |
340| +-------------+ | | +------------------+ |
341| | +----------------------------------+
342| data to be set | .
343| | .
344+-----------------+ .
345
346The file names are decided by the config item/group designer, while
347the directories in general can be named at will. A group can have
348a number of its default sub-groups created automatically.
349
350For more information on configfs please see
351Documentation/filesystems/configfs/*.
352
353The concepts described above translate to USB gadgets like this:
354
3551. A gadget has its config group, which has some attributes (idVendor,
356idProduct etc) and default sub-groups (configs, functions, strings).
357Writing to the attributes causes the information to be stored in
358appropriate locations. In the configs, functions and strings sub-groups
359a user can create their sub-groups to represent configurations, functions,
360and groups of strings in a given language.
361
3622. The user creates configurations and functions, in the configurations
363creates symbolic links to functions. This information is used when the
364gadget's UDC attribute is written to, which means binding the gadget
365to the UDC. The code in drivers/usb/gadget/configfs.c iterates over
366all configurations, and in each configuration it iterates over all
367functions and binds them. This way the whole gadget is bound.
368
3693. The file drivers/usb/gadget/configfs.c contains code for
370
371 - gadget's config_group
372 - gadget's default groups (configs, functions, strings)
373 - associating functions with configurations (symlinks)
374
3754. Each USB function naturally has its own view of what it wants
376configured, so config_groups for particular functions are defined
377in the functions implementation files drivers/usb/gadget/f_*.c.
378
3795. Funciton's code is written in such a way that it uses
380
381usb_get_function_instance(), which, in turn, calls request_module.
382So, provided that modprobe works, modules for particular functions
383are loaded automatically. Please note that the converse is not true:
384after a gadget is disabled and torn down, the modules remain loaded.
diff --git a/Documentation/usb/hotplug.txt b/Documentation/usb/hotplug.txt
index 4c945716a660..6424b130485c 100644
--- a/Documentation/usb/hotplug.txt
+++ b/Documentation/usb/hotplug.txt
@@ -33,9 +33,9 @@ you get the best hotplugging when you configure a highly modular system.
33 33
34KERNEL HOTPLUG HELPER (/sbin/hotplug) 34KERNEL HOTPLUG HELPER (/sbin/hotplug)
35 35
36When you compile with CONFIG_HOTPLUG, you get a new kernel parameter: 36There is a kernel parameter: /proc/sys/kernel/hotplug, which normally
37/proc/sys/kernel/hotplug, which normally holds the pathname "/sbin/hotplug". 37holds the pathname "/sbin/hotplug". That parameter names a program
38That parameter names a program which the kernel may invoke at various times. 38which the kernel may invoke at various times.
39 39
40The /sbin/hotplug program can be invoked by any subsystem as part of its 40The /sbin/hotplug program can be invoked by any subsystem as part of its
41reaction to a configuration change, from a thread in that subsystem. 41reaction to a configuration change, from a thread in that subsystem.
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 5f91eda91647..66dd2aa53ba4 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -280,7 +280,7 @@ kvm_run' (see below).
2804.11 KVM_GET_REGS 2804.11 KVM_GET_REGS
281 281
282Capability: basic 282Capability: basic
283Architectures: all except ARM 283Architectures: all except ARM, arm64
284Type: vcpu ioctl 284Type: vcpu ioctl
285Parameters: struct kvm_regs (out) 285Parameters: struct kvm_regs (out)
286Returns: 0 on success, -1 on error 286Returns: 0 on success, -1 on error
@@ -301,7 +301,7 @@ struct kvm_regs {
3014.12 KVM_SET_REGS 3014.12 KVM_SET_REGS
302 302
303Capability: basic 303Capability: basic
304Architectures: all except ARM 304Architectures: all except ARM, arm64
305Type: vcpu ioctl 305Type: vcpu ioctl
306Parameters: struct kvm_regs (in) 306Parameters: struct kvm_regs (in)
307Returns: 0 on success, -1 on error 307Returns: 0 on success, -1 on error
@@ -587,7 +587,7 @@ struct kvm_fpu {
5874.24 KVM_CREATE_IRQCHIP 5874.24 KVM_CREATE_IRQCHIP
588 588
589Capability: KVM_CAP_IRQCHIP 589Capability: KVM_CAP_IRQCHIP
590Architectures: x86, ia64, ARM 590Architectures: x86, ia64, ARM, arm64
591Type: vm ioctl 591Type: vm ioctl
592Parameters: none 592Parameters: none
593Returns: 0 on success, -1 on error 593Returns: 0 on success, -1 on error
@@ -595,14 +595,14 @@ Returns: 0 on success, -1 on error
595Creates an interrupt controller model in the kernel. On x86, creates a virtual 595Creates an interrupt controller model in the kernel. On x86, creates a virtual
596ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a 596ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a
597local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 597local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23
598only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM, a GIC is 598only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM/arm64, a GIC is
599created. 599created.
600 600
601 601
6024.25 KVM_IRQ_LINE 6024.25 KVM_IRQ_LINE
603 603
604Capability: KVM_CAP_IRQCHIP 604Capability: KVM_CAP_IRQCHIP
605Architectures: x86, ia64, arm 605Architectures: x86, ia64, arm, arm64
606Type: vm ioctl 606Type: vm ioctl
607Parameters: struct kvm_irq_level 607Parameters: struct kvm_irq_level
608Returns: 0 on success, -1 on error 608Returns: 0 on success, -1 on error
@@ -612,9 +612,10 @@ On some architectures it is required that an interrupt controller model has
612been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered 612been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered
613interrupts require the level to be set to 1 and then back to 0. 613interrupts require the level to be set to 1 and then back to 0.
614 614
615ARM can signal an interrupt either at the CPU level, or at the in-kernel irqchip 615ARM/arm64 can signal an interrupt either at the CPU level, or at the
616(GIC), and for in-kernel irqchip can tell the GIC to use PPIs designated for 616in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to
617specific cpus. The irq field is interpreted like this: 617use PPIs designated for specific cpus. The irq field is interpreted
618like this:
618 619
619  bits: | 31 ... 24 | 23 ... 16 | 15 ... 0 | 620  bits: | 31 ... 24 | 23 ... 16 | 15 ... 0 |
620 field: | irq_type | vcpu_index | irq_id | 621 field: | irq_type | vcpu_index | irq_id |
@@ -1831,6 +1832,22 @@ ARM 32-bit VFP control registers have the following id bit patterns:
1831ARM 64-bit FP registers have the following id bit patterns: 1832ARM 64-bit FP registers have the following id bit patterns:
1832 0x4030 0000 0012 0 <regno:12> 1833 0x4030 0000 0012 0 <regno:12>
1833 1834
1835
1836arm64 registers are mapped using the lower 32 bits. The upper 16 of
1837that is the register group type, or coprocessor number:
1838
1839arm64 core/FP-SIMD registers have the following id bit patterns. Note
1840that the size of the access is variable, as the kvm_regs structure
1841contains elements ranging from 32 to 128 bits. The index is a 32bit
1842value in the kvm_regs structure seen as a 32bit array.
1843 0x60x0 0000 0010 <index into the kvm_regs struct:16>
1844
1845arm64 CCSIDR registers are demultiplexed by CSSELR value:
1846 0x6020 0000 0011 00 <csselr:8>
1847
1848arm64 system registers have the following id bit patterns:
1849 0x6030 0000 0013 <op0:2> <op1:3> <crn:4> <crm:4> <op2:3>
1850
18344.69 KVM_GET_ONE_REG 18514.69 KVM_GET_ONE_REG
1835 1852
1836Capability: KVM_CAP_ONE_REG 1853Capability: KVM_CAP_ONE_REG
@@ -2261,10 +2278,10 @@ return indicates the attribute is implemented. It does not necessarily
2261indicate that the attribute can be read or written in the device's 2278indicate that the attribute can be read or written in the device's
2262current state. "addr" is ignored. 2279current state. "addr" is ignored.
2263 2280
22644.77 KVM_ARM_VCPU_INIT 22814.82 KVM_ARM_VCPU_INIT
2265 2282
2266Capability: basic 2283Capability: basic
2267Architectures: arm 2284Architectures: arm, arm64
2268Type: vcpu ioctl 2285Type: vcpu ioctl
2269Parameters: struct struct kvm_vcpu_init (in) 2286Parameters: struct struct kvm_vcpu_init (in)
2270Returns: 0 on success; -1 on error 2287Returns: 0 on success; -1 on error
@@ -2283,12 +2300,14 @@ should be created before this ioctl is invoked.
2283Possible features: 2300Possible features:
2284 - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state. 2301 - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state.
2285 Depends on KVM_CAP_ARM_PSCI. 2302 Depends on KVM_CAP_ARM_PSCI.
2303 - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode.
2304 Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only).
2286 2305
2287 2306
22884.78 KVM_GET_REG_LIST 23074.83 KVM_GET_REG_LIST
2289 2308
2290Capability: basic 2309Capability: basic
2291Architectures: arm 2310Architectures: arm, arm64
2292Type: vcpu ioctl 2311Type: vcpu ioctl
2293Parameters: struct kvm_reg_list (in/out) 2312Parameters: struct kvm_reg_list (in/out)
2294Returns: 0 on success; -1 on error 2313Returns: 0 on success; -1 on error
@@ -2305,10 +2324,10 @@ This ioctl returns the guest registers that are supported for the
2305KVM_GET_ONE_REG/KVM_SET_ONE_REG calls. 2324KVM_GET_ONE_REG/KVM_SET_ONE_REG calls.
2306 2325
2307 2326
23084.80 KVM_ARM_SET_DEVICE_ADDR 23274.84 KVM_ARM_SET_DEVICE_ADDR
2309 2328
2310Capability: KVM_CAP_ARM_SET_DEVICE_ADDR 2329Capability: KVM_CAP_ARM_SET_DEVICE_ADDR
2311Architectures: arm 2330Architectures: arm, arm64
2312Type: vm ioctl 2331Type: vm ioctl
2313Parameters: struct kvm_arm_device_address (in) 2332Parameters: struct kvm_arm_device_address (in)
2314Returns: 0 on success, -1 on error 2333Returns: 0 on success, -1 on error
@@ -2329,20 +2348,21 @@ can access emulated or directly exposed devices, which the host kernel needs
2329to know about. The id field is an architecture specific identifier for a 2348to know about. The id field is an architecture specific identifier for a
2330specific device. 2349specific device.
2331 2350
2332ARM divides the id field into two parts, a device id and an address type id 2351ARM/arm64 divides the id field into two parts, a device id and an
2333specific to the individual device. 2352address type id specific to the individual device.
2334 2353
2335  bits: | 63 ... 32 | 31 ... 16 | 15 ... 0 | 2354  bits: | 63 ... 32 | 31 ... 16 | 15 ... 0 |
2336 field: | 0x00000000 | device id | addr type id | 2355 field: | 0x00000000 | device id | addr type id |
2337 2356
2338ARM currently only require this when using the in-kernel GIC support for the 2357ARM/arm64 currently only require this when using the in-kernel GIC
2339hardware VGIC features, using KVM_ARM_DEVICE_VGIC_V2 as the device id. When 2358support for the hardware VGIC features, using KVM_ARM_DEVICE_VGIC_V2
2340setting the base address for the guest's mapping of the VGIC virtual CPU 2359as the device id. When setting the base address for the guest's
2341and distributor interface, the ioctl must be called after calling 2360mapping of the VGIC virtual CPU and distributor interface, the ioctl
2342KVM_CREATE_IRQCHIP, but before calling KVM_RUN on any of the VCPUs. Calling 2361must be called after calling KVM_CREATE_IRQCHIP, but before calling
2343this ioctl twice for any of the base addresses will return -EEXIST. 2362KVM_RUN on any of the VCPUs. Calling this ioctl twice for any of the
2363base addresses will return -EEXIST.
2344 2364
23454.82 KVM_PPC_RTAS_DEFINE_TOKEN 23654.85 KVM_PPC_RTAS_DEFINE_TOKEN
2346 2366
2347Capability: KVM_CAP_PPC_RTAS 2367Capability: KVM_CAP_PPC_RTAS
2348Architectures: ppc 2368Architectures: ppc
diff --git a/Documentation/virtual/kvm/mmu.txt b/Documentation/virtual/kvm/mmu.txt
index 43fcb761ed16..290894176142 100644
--- a/Documentation/virtual/kvm/mmu.txt
+++ b/Documentation/virtual/kvm/mmu.txt
@@ -191,12 +191,12 @@ Shadow pages contain the following information:
191 A counter keeping track of how many hardware registers (guest cr3 or 191 A counter keeping track of how many hardware registers (guest cr3 or
192 pdptrs) are now pointing at the page. While this counter is nonzero, the 192 pdptrs) are now pointing at the page. While this counter is nonzero, the
193 page cannot be destroyed. See role.invalid. 193 page cannot be destroyed. See role.invalid.
194 multimapped: 194 parent_ptes:
195 Whether there exist multiple sptes pointing at this page. 195 The reverse mapping for the pte/ptes pointing at this page's spt. If
196 parent_pte/parent_ptes: 196 parent_ptes bit 0 is zero, only one spte points at this pages and
197 If multimapped is zero, parent_pte points at the single spte that points at 197 parent_ptes points at this single spte, otherwise, there exists multiple
198 this page's spt. Otherwise, parent_ptes points at a data structure 198 sptes pointing at this page and (parent_ptes & ~0x1) points at a data
199 with a list of parent_ptes. 199 structure with a list of parent_ptes.
200 unsync: 200 unsync:
201 If true, then the translations in this page may not match the guest's 201 If true, then the translations in this page may not match the guest's
202 translation. This is equivalent to the state of the tlb when a pte is 202 translation. This is equivalent to the state of the tlb when a pte is
@@ -210,6 +210,24 @@ Shadow pages contain the following information:
210 A bitmap indicating which sptes in spt point (directly or indirectly) at 210 A bitmap indicating which sptes in spt point (directly or indirectly) at
211 pages that may be unsynchronized. Used to quickly locate all unsychronized 211 pages that may be unsynchronized. Used to quickly locate all unsychronized
212 pages reachable from a given page. 212 pages reachable from a given page.
213 mmu_valid_gen:
214 Generation number of the page. It is compared with kvm->arch.mmu_valid_gen
215 during hash table lookup, and used to skip invalidated shadow pages (see
216 "Zapping all pages" below.)
217 clear_spte_count:
218 Only present on 32-bit hosts, where a 64-bit spte cannot be written
219 atomically. The reader uses this while running out of the MMU lock
220 to detect in-progress updates and retry them until the writer has
221 finished the write.
222 write_flooding_count:
223 A guest may write to a page table many times, causing a lot of
224 emulations if the page needs to be write-protected (see "Synchronized
225 and unsynchronized pages" below). Leaf pages can be unsynchronized
226 so that they do not trigger frequent emulation, but this is not
227 possible for non-leafs. This field counts the number of emulations
228 since the last time the page table was actually used; if emulation
229 is triggered too frequently on this page, KVM will unmap the page
230 to avoid emulation in the future.
213 231
214Reverse map 232Reverse map
215=========== 233===========
@@ -258,14 +276,26 @@ This is the most complicated event. The cause of a page fault can be:
258 276
259Handling a page fault is performed as follows: 277Handling a page fault is performed as follows:
260 278
279 - if the RSV bit of the error code is set, the page fault is caused by guest
280 accessing MMIO and cached MMIO information is available.
281 - walk shadow page table
282 - check for valid generation number in the spte (see "Fast invalidation of
283 MMIO sptes" below)
284 - cache the information to vcpu->arch.mmio_gva, vcpu->arch.access and
285 vcpu->arch.mmio_gfn, and call the emulator
286 - If both P bit and R/W bit of error code are set, this could possibly
287 be handled as a "fast page fault" (fixed without taking the MMU lock). See
288 the description in Documentation/virtual/kvm/locking.txt.
261 - if needed, walk the guest page tables to determine the guest translation 289 - if needed, walk the guest page tables to determine the guest translation
262 (gva->gpa or ngpa->gpa) 290 (gva->gpa or ngpa->gpa)
263 - if permissions are insufficient, reflect the fault back to the guest 291 - if permissions are insufficient, reflect the fault back to the guest
264 - determine the host page 292 - determine the host page
265 - if this is an mmio request, there is no host page; call the emulator 293 - if this is an mmio request, there is no host page; cache the info to
266 to emulate the instruction instead 294 vcpu->arch.mmio_gva, vcpu->arch.access and vcpu->arch.mmio_gfn
267 - walk the shadow page table to find the spte for the translation, 295 - walk the shadow page table to find the spte for the translation,
268 instantiating missing intermediate page tables as necessary 296 instantiating missing intermediate page tables as necessary
297 - If this is an mmio request, cache the mmio info to the spte and set some
298 reserved bit on the spte (see callers of kvm_mmu_set_mmio_spte_mask)
269 - try to unsynchronize the page 299 - try to unsynchronize the page
270 - if successful, we can let the guest continue and modify the gpte 300 - if successful, we can let the guest continue and modify the gpte
271 - emulate the instruction 301 - emulate the instruction
@@ -351,6 +381,51 @@ causes its write_count to be incremented, thus preventing instantiation of
351a large spte. The frames at the end of an unaligned memory slot have 381a large spte. The frames at the end of an unaligned memory slot have
352artificially inflated ->write_counts so they can never be instantiated. 382artificially inflated ->write_counts so they can never be instantiated.
353 383
384Zapping all pages (page generation count)
385=========================================
386
387For the large memory guests, walking and zapping all pages is really slow
388(because there are a lot of pages), and also blocks memory accesses of
389all VCPUs because it needs to hold the MMU lock.
390
391To make it be more scalable, kvm maintains a global generation number
392which is stored in kvm->arch.mmu_valid_gen. Every shadow page stores
393the current global generation-number into sp->mmu_valid_gen when it
394is created. Pages with a mismatching generation number are "obsolete".
395
396When KVM need zap all shadow pages sptes, it just simply increases the global
397generation-number then reload root shadow pages on all vcpus. As the VCPUs
398create new shadow page tables, the old pages are not used because of the
399mismatching generation number.
400
401KVM then walks through all pages and zaps obsolete pages. While the zap
402operation needs to take the MMU lock, the lock can be released periodically
403so that the VCPUs can make progress.
404
405Fast invalidation of MMIO sptes
406===============================
407
408As mentioned in "Reaction to events" above, kvm will cache MMIO
409information in leaf sptes. When a new memslot is added or an existing
410memslot is changed, this information may become stale and needs to be
411invalidated. This also needs to hold the MMU lock while walking all
412shadow pages, and is made more scalable with a similar technique.
413
414MMIO sptes have a few spare bits, which are used to store a
415generation number. The global generation number is stored in
416kvm_memslots(kvm)->generation, and increased whenever guest memory info
417changes. This generation number is distinct from the one described in
418the previous section.
419
420When KVM finds an MMIO spte, it checks the generation number of the spte.
421If the generation number of the spte does not equal the global generation
422number, it will ignore the cached MMIO information and handle the page
423fault through the slow path.
424
425Since only 19 bits are used to store generation-number on mmio spte, all
426pages are zapped when there is an overflow.
427
428
354Further reading 429Further reading
355=============== 430===============
356 431
diff --git a/Documentation/virtual/uml/UserModeLinux-HOWTO.txt b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
index a5f8436753e7..f4099ca6b483 100644
--- a/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
+++ b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
@@ -3127,7 +3127,7 @@
3127 at process_kern.c:156 3127 at process_kern.c:156
3128 #3 0x1006a052 in switch_to (prev=0x50072000, next=0x507e8000, last=0x50072000) 3128 #3 0x1006a052 in switch_to (prev=0x50072000, next=0x507e8000, last=0x50072000)
3129 at process_kern.c:161 3129 at process_kern.c:161
3130 #4 0x10001d12 in schedule () at sched.c:777 3130 #4 0x10001d12 in schedule () at core.c:777
3131 #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71 3131 #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71
3132 #6 0x1006aa10 in __down_failed () at semaphore.c:157 3132 #6 0x1006aa10 in __down_failed () at semaphore.c:157
3133 #7 0x1006c5d8 in segv_handler (sc=0x5006e940) at trap_user.c:174 3133 #7 0x1006c5d8 in segv_handler (sc=0x5006e940) at trap_user.c:174
@@ -3191,7 +3191,7 @@
3191 at process_kern.c:161 3191 at process_kern.c:161
3192 161 _switch_to(prev, next); 3192 161 _switch_to(prev, next);
3193 (gdb) 3193 (gdb)
3194 #4 0x10001d12 in schedule () at sched.c:777 3194 #4 0x10001d12 in schedule () at core.c:777
3195 777 switch_to(prev, next, prev); 3195 777 switch_to(prev, next, prev);
3196 (gdb) 3196 (gdb)
3197 #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71 3197 #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt
index 7587493c67f1..fd7c3cfddd8e 100644
--- a/Documentation/vm/pagemap.txt
+++ b/Documentation/vm/pagemap.txt
@@ -15,7 +15,8 @@ There are three components to pagemap:
15 * Bits 0-54 page frame number (PFN) if present 15 * Bits 0-54 page frame number (PFN) if present
16 * Bits 0-4 swap type if swapped 16 * Bits 0-4 swap type if swapped
17 * Bits 5-54 swap offset if swapped 17 * Bits 5-54 swap offset if swapped
18 * Bits 55-60 page shift (page size = 1<<page shift) 18 * Bit 55 pte is soft-dirty (see Documentation/vm/soft-dirty.txt)
19 * Bits 56-60 zero
19 * Bit 61 page is file-page or shared-anon 20 * Bit 61 page is file-page or shared-anon
20 * Bit 62 page swapped 21 * Bit 62 page swapped
21 * Bit 63 page present 22 * Bit 63 page present
diff --git a/Documentation/vm/soft-dirty.txt b/Documentation/vm/soft-dirty.txt
new file mode 100644
index 000000000000..9a12a5956bc0
--- /dev/null
+++ b/Documentation/vm/soft-dirty.txt
@@ -0,0 +1,36 @@
1 SOFT-DIRTY PTEs
2
3 The soft-dirty is a bit on a PTE which helps to track which pages a task
4writes to. In order to do this tracking one should
5
6 1. Clear soft-dirty bits from the task's PTEs.
7
8 This is done by writing "4" into the /proc/PID/clear_refs file of the
9 task in question.
10
11 2. Wait some time.
12
13 3. Read soft-dirty bits from the PTEs.
14
15 This is done by reading from the /proc/PID/pagemap. The bit 55 of the
16 64-bit qword is the soft-dirty one. If set, the respective PTE was
17 written to since step 1.
18
19
20 Internally, to do this tracking, the writable bit is cleared from PTEs
21when the soft-dirty bit is cleared. So, after this, when the task tries to
22modify a page at some virtual address the #PF occurs and the kernel sets
23the soft-dirty bit on the respective PTE.
24
25 Note, that although all the task's address space is marked as r/o after the
26soft-dirty bits clear, the #PF-s that occur after that are processed fast.
27This is so, since the pages are still mapped to physical memory, and thus all
28the kernel does is finds this fact out and puts both writable and soft-dirty
29bits on the PTE.
30
31
32 This feature is actively used by the checkpoint-restore project. You
33can find more details about it on http://criu.org
34
35
36-- Pavel Emelyanov, Apr 9, 2013
diff --git a/Documentation/w1/w1.generic b/Documentation/w1/w1.generic
index 212f4ac31c01..a31c5a242973 100644
--- a/Documentation/w1/w1.generic
+++ b/Documentation/w1/w1.generic
@@ -25,8 +25,8 @@ When a w1 master driver registers with the w1 subsystem, the following occurs:
25 - sysfs entries for that w1 master are created 25 - sysfs entries for that w1 master are created
26 - the w1 bus is periodically searched for new slave devices 26 - the w1 bus is periodically searched for new slave devices
27 27
28When a device is found on the bus, w1 core checks if driver for its family is 28When a device is found on the bus, w1 core tries to load the driver for its family
29loaded. If so, the family driver is attached to the slave. 29and check if it is loaded. If so, the family driver is attached to the slave.
30If there is no driver for the family, default one is assigned, which allows to perform 30If there is no driver for the family, default one is assigned, which allows to perform
31almost any kind of operations. Each logical operation is a transaction 31almost any kind of operations. Each logical operation is a transaction
32in nature, which can contain several (two or one) low-level operations. 32in nature, which can contain several (two or one) low-level operations.
diff --git a/Documentation/ww-mutex-design.txt b/Documentation/ww-mutex-design.txt
new file mode 100644
index 000000000000..8a112dc304c3
--- /dev/null
+++ b/Documentation/ww-mutex-design.txt
@@ -0,0 +1,344 @@
1Wait/Wound Deadlock-Proof Mutex Design
2======================================
3
4Please read mutex-design.txt first, as it applies to wait/wound mutexes too.
5
6Motivation for WW-Mutexes
7-------------------------
8
9GPU's do operations that commonly involve many buffers. Those buffers
10can be shared across contexts/processes, exist in different memory
11domains (for example VRAM vs system memory), and so on. And with
12PRIME / dmabuf, they can even be shared across devices. So there are
13a handful of situations where the driver needs to wait for buffers to
14become ready. If you think about this in terms of waiting on a buffer
15mutex for it to become available, this presents a problem because
16there is no way to guarantee that buffers appear in a execbuf/batch in
17the same order in all contexts. That is directly under control of
18userspace, and a result of the sequence of GL calls that an application
19makes. Which results in the potential for deadlock. The problem gets
20more complex when you consider that the kernel may need to migrate the
21buffer(s) into VRAM before the GPU operates on the buffer(s), which
22may in turn require evicting some other buffers (and you don't want to
23evict other buffers which are already queued up to the GPU), but for a
24simplified understanding of the problem you can ignore this.
25
26The algorithm that the TTM graphics subsystem came up with for dealing with
27this problem is quite simple. For each group of buffers (execbuf) that need
28to be locked, the caller would be assigned a unique reservation id/ticket,
29from a global counter. In case of deadlock while locking all the buffers
30associated with a execbuf, the one with the lowest reservation ticket (i.e.
31the oldest task) wins, and the one with the higher reservation id (i.e. the
32younger task) unlocks all of the buffers that it has already locked, and then
33tries again.
34
35In the RDBMS literature this deadlock handling approach is called wait/wound:
36The older tasks waits until it can acquire the contended lock. The younger tasks
37needs to back off and drop all the locks it is currently holding, i.e. the
38younger task is wounded.
39
40Concepts
41--------
42
43Compared to normal mutexes two additional concepts/objects show up in the lock
44interface for w/w mutexes:
45
46Acquire context: To ensure eventual forward progress it is important the a task
47trying to acquire locks doesn't grab a new reservation id, but keeps the one it
48acquired when starting the lock acquisition. This ticket is stored in the
49acquire context. Furthermore the acquire context keeps track of debugging state
50to catch w/w mutex interface abuse.
51
52W/w class: In contrast to normal mutexes the lock class needs to be explicit for
53w/w mutexes, since it is required to initialize the acquire context.
54
55Furthermore there are three different class of w/w lock acquire functions:
56
57* Normal lock acquisition with a context, using ww_mutex_lock.
58
59* Slowpath lock acquisition on the contending lock, used by the wounded task
60 after having dropped all already acquired locks. These functions have the
61 _slow postfix.
62
63 From a simple semantics point-of-view the _slow functions are not strictly
64 required, since simply calling the normal ww_mutex_lock functions on the
65 contending lock (after having dropped all other already acquired locks) will
66 work correctly. After all if no other ww mutex has been acquired yet there's
67 no deadlock potential and hence the ww_mutex_lock call will block and not
68 prematurely return -EDEADLK. The advantage of the _slow functions is in
69 interface safety:
70 - ww_mutex_lock has a __must_check int return type, whereas ww_mutex_lock_slow
71 has a void return type. Note that since ww mutex code needs loops/retries
72 anyway the __must_check doesn't result in spurious warnings, even though the
73 very first lock operation can never fail.
74 - When full debugging is enabled ww_mutex_lock_slow checks that all acquired
75 ww mutex have been released (preventing deadlocks) and makes sure that we
76 block on the contending lock (preventing spinning through the -EDEADLK
77 slowpath until the contended lock can be acquired).
78
79* Functions to only acquire a single w/w mutex, which results in the exact same
80 semantics as a normal mutex. This is done by calling ww_mutex_lock with a NULL
81 context.
82
83 Again this is not strictly required. But often you only want to acquire a
84 single lock in which case it's pointless to set up an acquire context (and so
85 better to avoid grabbing a deadlock avoidance ticket).
86
87Of course, all the usual variants for handling wake-ups due to signals are also
88provided.
89
90Usage
91-----
92
93Three different ways to acquire locks within the same w/w class. Common
94definitions for methods #1 and #2:
95
96static DEFINE_WW_CLASS(ww_class);
97
98struct obj {
99 struct ww_mutex lock;
100 /* obj data */
101};
102
103struct obj_entry {
104 struct list_head head;
105 struct obj *obj;
106};
107
108Method 1, using a list in execbuf->buffers that's not allowed to be reordered.
109This is useful if a list of required objects is already tracked somewhere.
110Furthermore the lock helper can use propagate the -EALREADY return code back to
111the caller as a signal that an object is twice on the list. This is useful if
112the list is constructed from userspace input and the ABI requires userspace to
113not have duplicate entries (e.g. for a gpu commandbuffer submission ioctl).
114
115int lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx)
116{
117 struct obj *res_obj = NULL;
118 struct obj_entry *contended_entry = NULL;
119 struct obj_entry *entry;
120
121 ww_acquire_init(ctx, &ww_class);
122
123retry:
124 list_for_each_entry (entry, list, head) {
125 if (entry->obj == res_obj) {
126 res_obj = NULL;
127 continue;
128 }
129 ret = ww_mutex_lock(&entry->obj->lock, ctx);
130 if (ret < 0) {
131 contended_entry = entry;
132 goto err;
133 }
134 }
135
136 ww_acquire_done(ctx);
137 return 0;
138
139err:
140 list_for_each_entry_continue_reverse (entry, list, head)
141 ww_mutex_unlock(&entry->obj->lock);
142
143 if (res_obj)
144 ww_mutex_unlock(&res_obj->lock);
145
146 if (ret == -EDEADLK) {
147 /* we lost out in a seqno race, lock and retry.. */
148 ww_mutex_lock_slow(&contended_entry->obj->lock, ctx);
149 res_obj = contended_entry->obj;
150 goto retry;
151 }
152 ww_acquire_fini(ctx);
153
154 return ret;
155}
156
157Method 2, using a list in execbuf->buffers that can be reordered. Same semantics
158of duplicate entry detection using -EALREADY as method 1 above. But the
159list-reordering allows for a bit more idiomatic code.
160
161int lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx)
162{
163 struct obj_entry *entry, *entry2;
164
165 ww_acquire_init(ctx, &ww_class);
166
167 list_for_each_entry (entry, list, head) {
168 ret = ww_mutex_lock(&entry->obj->lock, ctx);
169 if (ret < 0) {
170 entry2 = entry;
171
172 list_for_each_entry_continue_reverse (entry2, list, head)
173 ww_mutex_unlock(&entry2->obj->lock);
174
175 if (ret != -EDEADLK) {
176 ww_acquire_fini(ctx);
177 return ret;
178 }
179
180 /* we lost out in a seqno race, lock and retry.. */
181 ww_mutex_lock_slow(&entry->obj->lock, ctx);
182
183 /*
184 * Move buf to head of the list, this will point
185 * buf->next to the first unlocked entry,
186 * restarting the for loop.
187 */
188 list_del(&entry->head);
189 list_add(&entry->head, list);
190 }
191 }
192
193 ww_acquire_done(ctx);
194 return 0;
195}
196
197Unlocking works the same way for both methods #1 and #2:
198
199void unlock_objs(struct list_head *list, struct ww_acquire_ctx *ctx)
200{
201 struct obj_entry *entry;
202
203 list_for_each_entry (entry, list, head)
204 ww_mutex_unlock(&entry->obj->lock);
205
206 ww_acquire_fini(ctx);
207}
208
209Method 3 is useful if the list of objects is constructed ad-hoc and not upfront,
210e.g. when adjusting edges in a graph where each node has its own ww_mutex lock,
211and edges can only be changed when holding the locks of all involved nodes. w/w
212mutexes are a natural fit for such a case for two reasons:
213- They can handle lock-acquisition in any order which allows us to start walking
214 a graph from a starting point and then iteratively discovering new edges and
215 locking down the nodes those edges connect to.
216- Due to the -EALREADY return code signalling that a given objects is already
217 held there's no need for additional book-keeping to break cycles in the graph
218 or keep track off which looks are already held (when using more than one node
219 as a starting point).
220
221Note that this approach differs in two important ways from the above methods:
222- Since the list of objects is dynamically constructed (and might very well be
223 different when retrying due to hitting the -EDEADLK wound condition) there's
224 no need to keep any object on a persistent list when it's not locked. We can
225 therefore move the list_head into the object itself.
226- On the other hand the dynamic object list construction also means that the -EALREADY return
227 code can't be propagated.
228
229Note also that methods #1 and #2 and method #3 can be combined, e.g. to first lock a
230list of starting nodes (passed in from userspace) using one of the above
231methods. And then lock any additional objects affected by the operations using
232method #3 below. The backoff/retry procedure will be a bit more involved, since
233when the dynamic locking step hits -EDEADLK we also need to unlock all the
234objects acquired with the fixed list. But the w/w mutex debug checks will catch
235any interface misuse for these cases.
236
237Also, method 3 can't fail the lock acquisition step since it doesn't return
238-EALREADY. Of course this would be different when using the _interruptible
239variants, but that's outside of the scope of these examples here.
240
241struct obj {
242 struct ww_mutex ww_mutex;
243 struct list_head locked_list;
244};
245
246static DEFINE_WW_CLASS(ww_class);
247
248void __unlock_objs(struct list_head *list)
249{
250 struct obj *entry, *temp;
251
252 list_for_each_entry_safe (entry, temp, list, locked_list) {
253 /* need to do that before unlocking, since only the current lock holder is
254 allowed to use object */
255 list_del(&entry->locked_list);
256 ww_mutex_unlock(entry->ww_mutex)
257 }
258}
259
260void lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx)
261{
262 struct obj *obj;
263
264 ww_acquire_init(ctx, &ww_class);
265
266retry:
267 /* re-init loop start state */
268 loop {
269 /* magic code which walks over a graph and decides which objects
270 * to lock */
271
272 ret = ww_mutex_lock(obj->ww_mutex, ctx);
273 if (ret == -EALREADY) {
274 /* we have that one already, get to the next object */
275 continue;
276 }
277 if (ret == -EDEADLK) {
278 __unlock_objs(list);
279
280 ww_mutex_lock_slow(obj, ctx);
281 list_add(&entry->locked_list, list);
282 goto retry;
283 }
284
285 /* locked a new object, add it to the list */
286 list_add_tail(&entry->locked_list, list);
287 }
288
289 ww_acquire_done(ctx);
290 return 0;
291}
292
293void unlock_objs(struct list_head *list, struct ww_acquire_ctx *ctx)
294{
295 __unlock_objs(list);
296 ww_acquire_fini(ctx);
297}
298
299Method 4: Only lock one single objects. In that case deadlock detection and
300prevention is obviously overkill, since with grabbing just one lock you can't
301produce a deadlock within just one class. To simplify this case the w/w mutex
302api can be used with a NULL context.
303
304Implementation Details
305----------------------
306
307Design:
308 ww_mutex currently encapsulates a struct mutex, this means no extra overhead for
309 normal mutex locks, which are far more common. As such there is only a small
310 increase in code size if wait/wound mutexes are not used.
311
312 In general, not much contention is expected. The locks are typically used to
313 serialize access to resources for devices. The only way to make wakeups
314 smarter would be at the cost of adding a field to struct mutex_waiter. This
315 would add overhead to all cases where normal mutexes are used, and
316 ww_mutexes are generally less performance sensitive.
317
318Lockdep:
319 Special care has been taken to warn for as many cases of api abuse
320 as possible. Some common api abuses will be caught with
321 CONFIG_DEBUG_MUTEXES, but CONFIG_PROVE_LOCKING is recommended.
322
323 Some of the errors which will be warned about:
324 - Forgetting to call ww_acquire_fini or ww_acquire_init.
325 - Attempting to lock more mutexes after ww_acquire_done.
326 - Attempting to lock the wrong mutex after -EDEADLK and
327 unlocking all mutexes.
328 - Attempting to lock the right mutex after -EDEADLK,
329 before unlocking all mutexes.
330
331 - Calling ww_mutex_lock_slow before -EDEADLK was returned.
332
333 - Unlocking mutexes with the wrong unlock function.
334 - Calling one of the ww_acquire_* twice on the same context.
335 - Using a different ww_class for the mutex than for the ww_acquire_ctx.
336 - Normal lockdep errors that can result in deadlocks.
337
338 Some of the lockdep errors that can result in deadlocks:
339 - Calling ww_acquire_init to initialize a second ww_acquire_ctx before
340 having called ww_acquire_fini on the first.
341 - 'normal' deadlocks that can occur.
342
343FIXME: Update this section once we have the TASK_DEADLOCK task state flag magic
344implemented.
diff --git a/Documentation/x86/early-microcode.txt b/Documentation/x86/early-microcode.txt
index 4aaf0dfb0cb8..d62bea6796da 100644
--- a/Documentation/x86/early-microcode.txt
+++ b/Documentation/x86/early-microcode.txt
@@ -11,7 +11,8 @@ file and loaded to CPUs during boot time.
11The format of the combined initrd image is microcode in cpio format followed by 11The format of the combined initrd image is microcode in cpio format followed by
12the initrd image (maybe compressed). Kernel parses the combined initrd image 12the initrd image (maybe compressed). Kernel parses the combined initrd image
13during boot time. The microcode file in cpio name space is: 13during boot time. The microcode file in cpio name space is:
14kernel/x86/microcode/GenuineIntel.bin 14on Intel: kernel/x86/microcode/GenuineIntel.bin
15on AMD : kernel/x86/microcode/AuthenticAMD.bin
15 16
16During BSP boot (before SMP starts), if the kernel finds the microcode file in 17During BSP boot (before SMP starts), if the kernel finds the microcode file in
17the initrd file, it parses the microcode and saves matching microcode in memory. 18the initrd file, it parses the microcode and saves matching microcode in memory.
@@ -34,10 +35,8 @@ original initrd image /boot/initrd-3.5.0.img.
34 35
35mkdir initrd 36mkdir initrd
36cd initrd 37cd initrd
37mkdir kernel 38mkdir -p kernel/x86/microcode
38mkdir kernel/x86 39cp ../microcode.bin kernel/x86/microcode/GenuineIntel.bin (or AuthenticAMD.bin)
39mkdir kernel/x86/microcode 40find . | cpio -o -H newc >../ucode.cpio
40cp ../microcode.bin kernel/x86/microcode/GenuineIntel.bin
41find .|cpio -oc >../ucode.cpio
42cd .. 41cd ..
43cat ucode.cpio /boot/initrd-3.5.0.img >/boot/initrd-3.5.0.ucode.img 42cat ucode.cpio /boot/initrd-3.5.0.img >/boot/initrd-3.5.0.ucode.img