aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/stable/sysfs-bus-usb14
-rw-r--r--Documentation/ABI/stable/sysfs-class-udc93
-rw-r--r--Documentation/ABI/stable/sysfs-driver-ib_srp25
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-hid11
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-midi12
-rw-r--r--Documentation/ABI/testing/sysfs-bus-coresight-devices-etb1024
-rw-r--r--Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x253
-rw-r--r--Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel12
-rw-r--r--Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc8
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio23
-rw-r--r--Documentation/ABI/testing/sysfs-bus-pci13
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb19
-rw-r--r--Documentation/ABI/testing/sysfs-class-net8
-rw-r--r--Documentation/ABI/testing/sysfs-devices-system-cpu47
-rw-r--r--Documentation/ABI/testing/sysfs-platform-dell-laptop60
-rw-r--r--Documentation/Changes2
-rw-r--r--Documentation/CodingStyle70
-rw-r--r--Documentation/DocBook/Makefile2
-rw-r--r--Documentation/DocBook/alsa-driver-api.tmpl31
-rw-r--r--Documentation/DocBook/crypto-API.tmpl1253
-rw-r--r--Documentation/DocBook/drm.tmpl434
-rw-r--r--Documentation/DocBook/media/dvb/dvbproperty.xml4
-rw-r--r--Documentation/DocBook/media/v4l/biblio.xml85
-rw-r--r--Documentation/DocBook/media/v4l/compat.xml12
-rw-r--r--Documentation/DocBook/media/v4l/dev-subdev.xml109
-rw-r--r--Documentation/DocBook/media/v4l/io.xml5
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt.xml1310
-rw-r--r--Documentation/DocBook/media/v4l/selections-common.xml16
-rw-r--r--Documentation/DocBook/media/v4l/subdev-formats.xml326
-rw-r--r--Documentation/DocBook/media/v4l/v4l2.xml11
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-enuminput.xml8
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-enumoutput.xml8
-rw-r--r--Documentation/DocBook/uio-howto.tmpl2
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl23
-rw-r--r--Documentation/IPMI.txt74
-rw-r--r--Documentation/IRQ-domain.txt71
-rw-r--r--Documentation/RCU/rcu.txt4
-rw-r--r--Documentation/RCU/stallwarn.txt14
-rw-r--r--Documentation/RCU/trace.txt4
-rw-r--r--Documentation/RCU/whatisRCU.txt2
-rw-r--r--Documentation/acpi/gpio-properties.txt96
-rw-r--r--Documentation/arm/firmware.txt28
-rw-r--r--Documentation/arm/memory.txt2
-rw-r--r--Documentation/arm/sunxi/README16
-rw-r--r--Documentation/arm64/legacy_instructions.txt45
-rw-r--r--Documentation/atomic_ops.txt12
-rw-r--r--Documentation/block/biodoc.txt10
-rw-r--r--Documentation/cgroups/cgroups.txt4
-rw-r--r--Documentation/cgroups/cpusets.txt6
-rw-r--r--Documentation/cgroups/hugetlb.txt2
-rw-r--r--Documentation/cgroups/memory.txt34
-rw-r--r--Documentation/cgroups/resource_counter.txt197
-rw-r--r--Documentation/cpu-freq/intel-pstate.txt37
-rw-r--r--Documentation/crypto/crypto-API-userspace.txt205
-rw-r--r--Documentation/device-mapper/cache-policies.txt24
-rw-r--r--Documentation/devicetree/bindings/arm/amlogic.txt8
-rw-r--r--Documentation/devicetree/bindings/arm/arch_timer.txt8
-rw-r--r--Documentation/devicetree/bindings/arm/arm-boards65
-rw-r--r--Documentation/devicetree/bindings/arm/bcm/cygnus.txt31
-rw-r--r--Documentation/devicetree/bindings/arm/coresight.txt204
-rw-r--r--Documentation/devicetree/bindings/arm/cpus.txt9
-rw-r--r--Documentation/devicetree/bindings/arm/fsl.txt38
-rw-r--r--Documentation/devicetree/bindings/arm/gic-v3.txt39
-rw-r--r--Documentation/devicetree/bindings/arm/gic.txt54
-rw-r--r--Documentation/devicetree/bindings/arm/idle-states.txt20
-rw-r--r--Documentation/devicetree/bindings/arm/marvell,berlin.txt10
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek.txt19
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt28
-rw-r--r--Documentation/devicetree/bindings/arm/omap/omap.txt3
-rw-r--r--Documentation/devicetree/bindings/arm/rockchip.txt4
-rw-r--r--Documentation/devicetree/bindings/arm/samsung-boards.txt19
-rw-r--r--Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt11
-rw-r--r--Documentation/devicetree/bindings/arm/ste-nomadik.txt6
-rw-r--r--Documentation/devicetree/bindings/arm/sunxi.txt12
-rw-r--r--Documentation/devicetree/bindings/arm/ux500/power_domain.txt35
-rw-r--r--Documentation/devicetree/bindings/ata/marvell.txt6
-rw-r--r--Documentation/devicetree/bindings/ata/sata_rcar.txt17
-rw-r--r--Documentation/devicetree/bindings/btmrvl.txt29
-rw-r--r--Documentation/devicetree/bindings/bus/bcma.txt21
-rw-r--r--Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt6
-rw-r--r--Documentation/devicetree/bindings/bus/mvebu-mbus.txt17
-rw-r--r--Documentation/devicetree/bindings/chosen.txt46
-rw-r--r--Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt34
-rw-r--r--Documentation/devicetree/bindings/clock/qoriq-clock.txt14
-rw-r--r--Documentation/devicetree/bindings/clock/st/st,flexgen.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/vf610-clock.txt15
-rw-r--r--Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt2
-rw-r--r--Documentation/devicetree/bindings/dma/atmel-xdma.txt54
-rw-r--r--Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt1
-rw-r--r--Documentation/devicetree/bindings/dma/qcom_bam_dma.txt4
-rw-r--r--Documentation/devicetree/bindings/dma/sun6i-dma.txt2
-rw-r--r--Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt2
-rw-r--r--Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt (renamed from Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt)0
-rw-r--r--Documentation/devicetree/bindings/drm/imx/hdmi.txt (renamed from Documentation/devicetree/bindings/staging/imx-drm/hdmi.txt)0
-rw-r--r--Documentation/devicetree/bindings/drm/imx/ldb.txt (renamed from Documentation/devicetree/bindings/staging/imx-drm/ldb.txt)0
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt30
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt2
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-vf610.txt55
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio.txt40
-rw-r--r--Documentation/devicetree/bindings/gpio/pl061-gpio.txt2
-rw-r--r--Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt4
-rw-r--r--Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt2
-rw-r--r--Documentation/devicetree/bindings/gpu/st,stih4xx.txt29
-rw-r--r--Documentation/devicetree/bindings/hwmon/ltc2978.txt39
-rw-r--r--Documentation/devicetree/bindings/hwrng/atmel-trng.txt16
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-designware.txt4
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-img-scb.txt26
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-imx.txt11
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-meson.txt24
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-opal.txt37
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt1
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt14
-rw-r--r--Documentation/devicetree/bindings/i2c/trivial-devices.txt10
-rw-r--r--Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.txt46
-rw-r--r--Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt2
-rw-r--r--Documentation/devicetree/bindings/input/cap11xx.txt (renamed from Documentation/devicetree/bindings/input/cap1106.txt)26
-rw-r--r--Documentation/devicetree/bindings/input/elan_i2c.txt34
-rw-r--r--Documentation/devicetree/bindings/input/elants_i2c.txt33
-rw-r--r--Documentation/devicetree/bindings/input/gpio-keys.txt10
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt26
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/interrupts.txt4
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt55
-rw-r--r--Documentation/devicetree/bindings/iommu/rockchip,iommu.txt26
-rw-r--r--Documentation/devicetree/bindings/leds/leds-lp8860.txt29
-rw-r--r--Documentation/devicetree/bindings/mailbox/omap-mailbox.txt23
-rw-r--r--Documentation/devicetree/bindings/media/meson-ir.txt14
-rw-r--r--Documentation/devicetree/bindings/media/rcar_vin.txt2
-rw-r--r--Documentation/devicetree/bindings/media/si4713.txt30
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/mvebu-sdram-controller.txt21
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt36
-rw-r--r--Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt51
-rw-r--r--Documentation/devicetree/bindings/mfd/max77686.txt6
-rw-r--r--Documentation/devicetree/bindings/mfd/max77693.txt21
-rw-r--r--Documentation/devicetree/bindings/mfd/s2mps11.txt22
-rw-r--r--Documentation/devicetree/bindings/mips/brcm/bcm3384-intc.txt37
-rw-r--r--Documentation/devicetree/bindings/mips/brcm/bmips.txt8
-rw-r--r--Documentation/devicetree/bindings/mips/brcm/cm-dsl.txt11
-rw-r--r--Documentation/devicetree/bindings/mips/brcm/usb.txt11
-rw-r--r--Documentation/devicetree/bindings/mips/cpu_irq.txt4
-rw-r--r--Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt4
-rw-r--r--Documentation/devicetree/bindings/mmc/img-dw-mshc.txt29
-rw-r--r--Documentation/devicetree/bindings/mmc/sdhci-pxa.txt7
-rw-r--r--Documentation/devicetree/bindings/mtd/atmel-nand.txt6
-rw-r--r--Documentation/devicetree/bindings/mtd/diskonchip.txt15
-rw-r--r--Documentation/devicetree/bindings/mtd/gpio-control-nand.txt14
-rw-r--r--Documentation/devicetree/bindings/mtd/sunxi-nand.txt45
-rw-r--r--Documentation/devicetree/bindings/net/amd-xgbe.txt12
-rw-r--r--Documentation/devicetree/bindings/net/can/c_can.txt5
-rw-r--r--Documentation/devicetree/bindings/net/dsa/dsa.txt9
-rw-r--r--Documentation/devicetree/bindings/net/micrel.txt35
-rw-r--r--Documentation/devicetree/bindings/net/phy.txt3
-rw-r--r--Documentation/devicetree/bindings/net/sh_eth.txt1
-rw-r--r--Documentation/devicetree/bindings/nios2/nios2.txt62
-rw-r--r--Documentation/devicetree/bindings/nios2/timer.txt19
-rw-r--r--Documentation/devicetree/bindings/panel/auo,b116xw03.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt49
-rw-r--r--Documentation/devicetree/bindings/pci/layerscape-pci.txt42
-rw-r--r--Documentation/devicetree/bindings/pci/pci.txt11
-rw-r--r--Documentation/devicetree/bindings/phy/berlin-sata-phy.txt4
-rw-r--r--Documentation/devicetree/bindings/phy/berlin-usb-phy.txt16
-rw-r--r--Documentation/devicetree/bindings/phy/phy-miphy28lp.txt128
-rw-r--r--Documentation/devicetree/bindings/phy/phy-mvebu.txt43
-rw-r--r--Documentation/devicetree/bindings/phy/samsung-phy.txt6
-rw-r--r--Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt4
-rw-r--r--Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt96
-rw-r--r--Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,apq8084-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt215
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt162
-rw-r--r--Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt3
-rw-r--r--Documentation/devicetree/bindings/pinctrl/ste,abx500.txt184
-rw-r--r--Documentation/devicetree/bindings/power/power-controller.txt18
-rw-r--r--Documentation/devicetree/bindings/power_supply/gpio-charger.txt27
-rw-r--r--Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt23
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/fman.txt534
-rw-r--r--Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt29
-rw-r--r--Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt30
-rw-r--r--Documentation/devicetree/bindings/regulator/act8865-regulator.txt4
-rw-r--r--Documentation/devicetree/bindings/regulator/max77802.txt35
-rw-r--r--Documentation/devicetree/bindings/regulator/regulator.txt22
-rw-r--r--Documentation/devicetree/bindings/regulator/sky81452-regulator.txt10
-rw-r--r--Documentation/devicetree/bindings/reset/st,sti-picophyreset.txt42
-rw-r--r--Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt23
-rw-r--r--Documentation/devicetree/bindings/rtc/rtc-omap.txt9
-rw-r--r--Documentation/devicetree/bindings/rtc/rtc-opal.txt16
-rw-r--r--Documentation/devicetree/bindings/serial/bcm63xx-uart.txt30
-rw-r--r--Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt10
-rw-r--r--Documentation/devicetree/bindings/serial/of-serial.txt1
-rw-r--r--Documentation/devicetree/bindings/serial/pl011.txt42
-rw-r--r--Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt69
-rw-r--r--Documentation/devicetree/bindings/serial/renesas,sci-serial.txt9
-rw-r--r--Documentation/devicetree/bindings/serial/sirf-uart.txt16
-rw-r--r--Documentation/devicetree/bindings/soc/fsl/bman-portals.txt56
-rw-r--r--Documentation/devicetree/bindings/soc/fsl/bman.txt125
-rw-r--r--Documentation/devicetree/bindings/soc/fsl/qman-portals.txt154
-rw-r--r--Documentation/devicetree/bindings/soc/fsl/qman.txt165
-rw-r--r--Documentation/devicetree/bindings/sound/arndale.txt24
-rw-r--r--Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/eukrea-tlv320.txt15
-rw-r--r--Documentation/devicetree/bindings/sound/fsl,esai.txt44
-rw-r--r--Documentation/devicetree/bindings/sound/fsl,spdif.txt37
-rw-r--r--Documentation/devicetree/bindings/sound/fsl-sai.txt66
-rw-r--r--Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt61
-rw-r--r--Documentation/devicetree/bindings/sound/imx-audio-spdif.txt22
-rw-r--r--Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt45
-rw-r--r--Documentation/devicetree/bindings/sound/imx-audmux.txt22
-rw-r--r--Documentation/devicetree/bindings/sound/max98090.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,fsi.txt9
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,rsnd.txt10
-rw-r--r--Documentation/devicetree/bindings/sound/rt5631.txt48
-rw-r--r--Documentation/devicetree/bindings/sound/rt5677.txt17
-rw-r--r--Documentation/devicetree/bindings/sound/samsung-i2s.txt15
-rw-r--r--Documentation/devicetree/bindings/sound/sgtl5000.txt13
-rw-r--r--Documentation/devicetree/bindings/sound/ts3a227e.txt26
-rw-r--r--Documentation/devicetree/bindings/sound/wm8960.txt31
-rw-r--r--Documentation/devicetree/bindings/spi/spi-gpio.txt6
-rw-r--r--Documentation/devicetree/bindings/spi/spi-img-spfi.txt37
-rw-r--r--Documentation/devicetree/bindings/spi/spi-meson.txt22
-rw-r--r--Documentation/devicetree/bindings/spi/spi-samsung.txt2
-rw-r--r--Documentation/devicetree/bindings/thermal/armada-thermal.txt8
-rw-r--r--Documentation/devicetree/bindings/thermal/rockchip-thermal.txt68
-rw-r--r--Documentation/devicetree/bindings/thermal/tegra-soctherm.txt53
-rw-r--r--Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt9
-rw-r--r--Documentation/devicetree/bindings/timer/renesas,mtu2.txt2
-rw-r--r--Documentation/devicetree/bindings/timer/renesas,tmu.txt4
-rw-r--r--Documentation/devicetree/bindings/unittest.txt14
-rw-r--r--Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt24
-rw-r--r--Documentation/devicetree/bindings/usb/dwc3.txt23
-rw-r--r--Documentation/devicetree/bindings/usb/exynos-usb.txt6
-rw-r--r--Documentation/devicetree/bindings/usb/pxa-usb.txt22
-rw-r--r--Documentation/devicetree/bindings/usb/usb-ohci.txt2
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt14
-rw-r--r--Documentation/devicetree/bindings/video/adi,adv7511.txt88
-rw-r--r--Documentation/devicetree/bindings/video/backlight/lp855x.txt2
-rw-r--r--Documentation/devicetree/bindings/video/exynos_dsim.txt1
-rw-r--r--Documentation/devicetree/bindings/video/rockchip-drm.txt19
-rw-r--r--Documentation/devicetree/bindings/video/rockchip-vop.txt58
-rw-r--r--Documentation/devicetree/bindings/video/samsung-fimd.txt1
-rw-r--r--Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt33
-rw-r--r--Documentation/devicetree/bindings/video/simple-framebuffer.txt68
-rw-r--r--Documentation/devicetree/bindings/w1/omap-hdq.txt17
-rw-r--r--Documentation/devicetree/bindings/watchdog/marvel.txt13
-rw-r--r--Documentation/devicetree/of_selftest.txt20
-rw-r--r--Documentation/devicetree/overlay-notes.txt133
-rw-r--r--Documentation/devicetree/todo.txt1
-rw-r--r--Documentation/dmaengine/client.txt (renamed from Documentation/dmaengine.txt)0
-rw-r--r--Documentation/dmaengine/dmatest.txt (renamed from Documentation/dmatest.txt)0
-rw-r--r--Documentation/dmaengine/provider.txt366
-rw-r--r--Documentation/email-clients.txt11
-rw-r--r--Documentation/filesystems/debugfs.txt2
-rw-r--r--Documentation/filesystems/f2fs.txt7
-rw-r--r--Documentation/filesystems/nfs/Exporting23
-rw-r--r--Documentation/filesystems/overlayfs.txt2
-rw-r--r--Documentation/filesystems/porting8
-rw-r--r--Documentation/filesystems/proc.txt2
-rw-r--r--Documentation/filesystems/seq_file.txt22
-rw-r--r--Documentation/filesystems/squashfs.txt8
-rw-r--r--Documentation/filesystems/vfs.txt2
-rw-r--r--Documentation/gpio/consumer.txt45
-rw-r--r--Documentation/gpio/driver.txt4
-rw-r--r--Documentation/hwmon/lm755
-rw-r--r--Documentation/hwmon/lm9523415
-rw-r--r--Documentation/hwmon/lm9524514
-rw-r--r--Documentation/hwmon/nct677514
-rw-r--r--Documentation/hwmon/nct780232
-rw-r--r--Documentation/hwmon/tmp4018
-rw-r--r--Documentation/i2c/busses/i2c-i8011
-rw-r--r--Documentation/i2c/upgrading-clients6
-rw-r--r--Documentation/i2c/writing-clients8
-rw-r--r--Documentation/ia64/kvm.txt83
-rw-r--r--Documentation/input/elantech.txt81
-rw-r--r--Documentation/input/xpad.txt123
-rw-r--r--Documentation/kdump/kdump.txt7
-rw-r--r--Documentation/kernel-parameters.txt81
-rw-r--r--Documentation/kobject.txt2
-rw-r--r--Documentation/kselftest.txt69
-rw-r--r--Documentation/local_ops.txt13
-rw-r--r--Documentation/locking/lglock.txt166
-rw-r--r--Documentation/mailbox.txt2
-rw-r--r--Documentation/memory-barriers.txt93
-rw-r--r--Documentation/mic/mpssd/Makefile2
-rw-r--r--Documentation/networking/bonding.txt7
-rw-r--r--Documentation/networking/fib_trie.txt4
-rw-r--r--Documentation/networking/ip-sysctl.txt37
-rw-r--r--Documentation/networking/ipvlan.txt107
-rw-r--r--Documentation/networking/ixgbe.txt2
-rw-r--r--Documentation/networking/stmmac.txt132
-rw-r--r--Documentation/networking/switchdev.txt59
-rw-r--r--Documentation/networking/timestamping.txt35
-rw-r--r--Documentation/networking/timestamping/txtimestamp.c90
-rw-r--r--Documentation/nios2/README23
-rw-r--r--Documentation/phy.txt60
-rw-r--r--Documentation/power/runtime_pm.txt10
-rw-r--r--Documentation/power/suspend-and-interrupts.txt2
-rw-r--r--Documentation/power/userland-swsusp.txt2
-rw-r--r--Documentation/ramoops.txt13
-rw-r--r--Documentation/s390/Debugging390.txt462
-rw-r--r--Documentation/scsi/libsas.txt82
-rw-r--r--Documentation/scsi/scsi_eh.txt4
-rw-r--r--Documentation/scsi/scsi_mid_low_api.txt66
-rw-r--r--Documentation/scsi/st.txt8
-rw-r--r--Documentation/scsi/wd719x.txt21
-rw-r--r--Documentation/security/IMA-templates.txt29
-rw-r--r--Documentation/serial/driver6
-rw-r--r--Documentation/sound/alsa/ControlNames.txt32
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt8
-rw-r--r--Documentation/sound/alsa/Procfile.txt17
-rw-r--r--Documentation/sysctl/kernel.txt50
-rw-r--r--Documentation/sysctl/net.txt34
-rw-r--r--Documentation/trace/coresight.txt299
-rw-r--r--Documentation/trace/ftrace.txt15
-rw-r--r--Documentation/usb/gadget_configfs.txt2
-rw-r--r--Documentation/usb/gadget_hid.txt7
-rw-r--r--Documentation/usb/power-management.txt17
-rw-r--r--Documentation/usb/usb-serial.txt2
-rw-r--r--Documentation/video4linux/CARDLIST.cx238852
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx1
-rw-r--r--Documentation/video4linux/CARDLIST.saa71341
-rw-r--r--Documentation/video4linux/soc-camera.txt2
-rw-r--r--Documentation/video4linux/vivid.txt15
-rw-r--r--Documentation/virtual/kvm/api.txt102
-rw-r--r--Documentation/virtual/kvm/devices/vm.txt10
-rw-r--r--Documentation/virtual/kvm/msr.txt2
-rw-r--r--Documentation/vm/hugetlbpage.txt4
-rw-r--r--Documentation/vm/page_owner.txt81
-rw-r--r--Documentation/x86/entry_64.txt7
339 files changed, 11952 insertions, 2454 deletions
diff --git a/Documentation/ABI/stable/sysfs-bus-usb b/Documentation/ABI/stable/sysfs-bus-usb
index e2bc700a6f9c..831f15d9672f 100644
--- a/Documentation/ABI/stable/sysfs-bus-usb
+++ b/Documentation/ABI/stable/sysfs-bus-usb
@@ -32,10 +32,9 @@ Date: January 2008
32KernelVersion: 2.6.25 32KernelVersion: 2.6.25
33Contact: Sarah Sharp <sarah.a.sharp@intel.com> 33Contact: Sarah Sharp <sarah.a.sharp@intel.com>
34Description: 34Description:
35 If CONFIG_PM_RUNTIME is enabled then this file 35 If CONFIG_PM is enabled, then this file is present. When read,
36 is present. When read, it returns the total time (in msec) 36 it returns the total time (in msec) that the USB device has been
37 that the USB device has been connected to the machine. This 37 connected to the machine. This file is read-only.
38 file is read-only.
39Users: 38Users:
40 PowerTOP <powertop@lists.01.org> 39 PowerTOP <powertop@lists.01.org>
41 https://01.org/powertop/ 40 https://01.org/powertop/
@@ -45,10 +44,9 @@ Date: January 2008
45KernelVersion: 2.6.25 44KernelVersion: 2.6.25
46Contact: Sarah Sharp <sarah.a.sharp@intel.com> 45Contact: Sarah Sharp <sarah.a.sharp@intel.com>
47Description: 46Description:
48 If CONFIG_PM_RUNTIME is enabled then this file 47 If CONFIG_PM is enabled, then this file is present. When read,
49 is present. When read, it returns the total time (in msec) 48 it returns the total time (in msec) that the USB device has been
50 that the USB device has been active, i.e. not in a suspended 49 active, i.e. not in a suspended state. This file is read-only.
51 state. This file is read-only.
52 50
53 Tools can use this file and the connected_duration file to 51 Tools can use this file and the connected_duration file to
54 compute the percentage of time that a device has been active. 52 compute the percentage of time that a device has been active.
diff --git a/Documentation/ABI/stable/sysfs-class-udc b/Documentation/ABI/stable/sysfs-class-udc
new file mode 100644
index 000000000000..85d3dac2e204
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-class-udc
@@ -0,0 +1,93 @@
1What: /sys/class/udc/<udc>/a_alt_hnp_support
2Date: June 2011
3KernelVersion: 3.1
4Contact: Felipe Balbi <balbi@kernel.org>
5Description:
6 Indicates if an OTG A-Host supports HNP at an alternate port.
7Users:
8
9What: /sys/class/udc/<udc>/a_hnp_support
10Date: June 2011
11KernelVersion: 3.1
12Contact: Felipe Balbi <balbi@kernel.org>
13Description:
14 Indicates if an OTG A-Host supports HNP at this port.
15Users:
16
17What: /sys/class/udc/<udc>/b_hnp_enable
18Date: June 2011
19KernelVersion: 3.1
20Contact: Felipe Balbi <balbi@kernel.org>
21Description:
22 Indicates if an OTG A-Host enabled HNP support.
23Users:
24
25What: /sys/class/udc/<udc>/current_speed
26Date: June 2011
27KernelVersion: 3.1
28Contact: Felipe Balbi <balbi@kernel.org>
29Description:
30 Indicates the current negotiated speed at this port.
31Users:
32
33What: /sys/class/udc/<udc>/is_a_peripheral
34Date: June 2011
35KernelVersion: 3.1
36Contact: Felipe Balbi <balbi@kernel.org>
37Description:
38 Indicates that this port is the default Host on an OTG session
39 but HNP was used to switch roles.
40Users:
41
42What: /sys/class/udc/<udc>/is_otg
43Date: June 2011
44KernelVersion: 3.1
45Contact: Felipe Balbi <balbi@kernel.org>
46Description:
47 Indicates that this port support OTG.
48Users:
49
50What: /sys/class/udc/<udc>/maximum_speed
51Date: June 2011
52KernelVersion: 3.1
53Contact: Felipe Balbi <balbi@kernel.org>
54Description:
55 Indicates the maximum USB speed supported by this port.
56Users:
57
58What: /sys/class/udc/<udc>/maximum_speed
59Date: June 2011
60KernelVersion: 3.1
61Contact: Felipe Balbi <balbi@kernel.org>
62Description:
63 Indicates the maximum USB speed supported by this port.
64Users:
65
66What: /sys/class/udc/<udc>/soft_connect
67Date: June 2011
68KernelVersion: 3.1
69Contact: Felipe Balbi <balbi@kernel.org>
70Description:
71 Allows users to disconnect data pullup resistors thus causing a
72 logical disconnection from the USB Host.
73Users:
74
75What: /sys/class/udc/<udc>/srp
76Date: June 2011
77KernelVersion: 3.1
78Contact: Felipe Balbi <balbi@kernel.org>
79Description:
80 Allows users to manually start Session Request Protocol.
81Users:
82
83What: /sys/class/udc/<udc>/state
84Date: June 2011
85KernelVersion: 3.1
86Contact: Felipe Balbi <balbi@kernel.org>
87Description:
88 Indicates current state of the USB Device Controller. Valid
89 states are: 'not-attached', 'attached', 'powered',
90 'reconnecting', 'unauthenticated', 'default', 'addressed',
91 'configured', and 'suspended'; however not all USB Device
92 Controllers support reporting all states.
93Users:
diff --git a/Documentation/ABI/stable/sysfs-driver-ib_srp b/Documentation/ABI/stable/sysfs-driver-ib_srp
index b9688de8455b..7049a2b50359 100644
--- a/Documentation/ABI/stable/sysfs-driver-ib_srp
+++ b/Documentation/ABI/stable/sysfs-driver-ib_srp
@@ -55,12 +55,12 @@ Description: Interface for making ib_srp connect to a new target.
55 only safe with partial memory descriptor list support enabled 55 only safe with partial memory descriptor list support enabled
56 (allow_ext_sg=1). 56 (allow_ext_sg=1).
57 * comp_vector, a number in the range 0..n-1 specifying the 57 * comp_vector, a number in the range 0..n-1 specifying the
58 MSI-X completion vector. Some HCA's allocate multiple (n) 58 MSI-X completion vector of the first RDMA channel. Some
59 MSI-X vectors per HCA port. If the IRQ affinity masks of 59 HCA's allocate multiple (n) MSI-X vectors per HCA port. If
60 these interrupts have been configured such that each MSI-X 60 the IRQ affinity masks of these interrupts have been
61 interrupt is handled by a different CPU then the comp_vector 61 configured such that each MSI-X interrupt is handled by a
62 parameter can be used to spread the SRP completion workload 62 different CPU then the comp_vector parameter can be used to
63 over multiple CPU's. 63 spread the SRP completion workload over multiple CPU's.
64 * tl_retry_count, a number in the range 2..7 specifying the 64 * tl_retry_count, a number in the range 2..7 specifying the
65 IB RC retry count. 65 IB RC retry count.
66 * queue_size, the maximum number of commands that the 66 * queue_size, the maximum number of commands that the
@@ -88,6 +88,13 @@ Description: Whether ib_srp is allowed to include a partial memory
88 descriptor list in an SRP_CMD when communicating with an SRP 88 descriptor list in an SRP_CMD when communicating with an SRP
89 target. 89 target.
90 90
91What: /sys/class/scsi_host/host<n>/ch_count
92Date: April 1, 2015
93KernelVersion: 3.19
94Contact: linux-rdma@vger.kernel.org
95Description: Number of RDMA channels used for communication with the SRP
96 target.
97
91What: /sys/class/scsi_host/host<n>/cmd_sg_entries 98What: /sys/class/scsi_host/host<n>/cmd_sg_entries
92Date: May 19, 2011 99Date: May 19, 2011
93KernelVersion: 2.6.39 100KernelVersion: 2.6.39
@@ -95,6 +102,12 @@ Contact: linux-rdma@vger.kernel.org
95Description: Maximum number of data buffer descriptors that may be sent to 102Description: Maximum number of data buffer descriptors that may be sent to
96 the target in a single SRP_CMD request. 103 the target in a single SRP_CMD request.
97 104
105What: /sys/class/scsi_host/host<n>/comp_vector
106Date: September 2, 2013
107KernelVersion: 3.11
108Contact: linux-rdma@vger.kernel.org
109Description: Completion vector used for the first RDMA channel.
110
98What: /sys/class/scsi_host/host<n>/dgid 111What: /sys/class/scsi_host/host<n>/dgid
99Date: June 17, 2006 112Date: June 17, 2006
100KernelVersion: 2.6.17 113KernelVersion: 2.6.17
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-hid b/Documentation/ABI/testing/configfs-usb-gadget-hid
new file mode 100644
index 000000000000..f12e00e6baa3
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-hid
@@ -0,0 +1,11 @@
1What: /config/usb-gadget/gadget/functions/hid.name
2Date: Nov 2014
3KernelVersion: 3.19
4Description:
5 The attributes:
6
7 protocol - HID protocol to use
8 report_desc - blob corresponding to HID report descriptors
9 except the data passed through /dev/hidg<N>
10 report_length - HID report length
11 subclass - HID device subclass to use
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-midi b/Documentation/ABI/testing/configfs-usb-gadget-midi
new file mode 100644
index 000000000000..6b341df7249c
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-midi
@@ -0,0 +1,12 @@
1What: /config/usb-gadget/gadget/functions/midi.name
2Date: Nov 2014
3KernelVersion: 3.19
4Description:
5 The attributes:
6
7 index - index value for the USB MIDI adapter
8 id - ID string for the USB MIDI adapter
9 buflen - MIDI buffer length
10 qlen - USB read request queue length
11 in_ports - number of MIDI input ports
12 out_ports - number of MIDI output ports
diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etb10 b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etb10
new file mode 100644
index 000000000000..4b8d6ec92e2b
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etb10
@@ -0,0 +1,24 @@
1What: /sys/bus/coresight/devices/<memory_map>.etb/enable_sink
2Date: November 2014
3KernelVersion: 3.19
4Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
5Description: (RW) Add/remove a sink from a trace path. There can be multiple
6 source for a single sink.
7 ex: echo 1 > /sys/bus/coresight/devices/20010000.etb/enable_sink
8
9What: /sys/bus/coresight/devices/<memory_map>.etb/status
10Date: November 2014
11KernelVersion: 3.19
12Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
13Description: (R) List various control and status registers. The specific
14 layout and content is driver specific.
15
16What: /sys/bus/coresight/devices/<memory_map>.etb/trigger_cntr
17Date: November 2014
18KernelVersion: 3.19
19Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
20Description: (RW) Disables write access to the Trace RAM by stopping the
21 formatter after a defined number of words have been stored
22 following the trigger event. The number of 32-bit words written
23 into the Trace RAM following the trigger event is equal to the
24 value stored in this register+1 (from ARM ETB-TRM).
diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x
new file mode 100644
index 000000000000..b4d0b99afffb
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x
@@ -0,0 +1,253 @@
1What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/enable_source
2Date: November 2014
3KernelVersion: 3.19
4Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
5Description: (RW) Enable/disable tracing on this specific trace entiry.
6 Enabling a source implies the source has been configured
7 properly and a sink has been identidifed for it. The path
8 of coresight components linking the source to the sink is
9 configured and managed automatically by the coresight framework.
10
11What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/status
12Date: November 2014
13KernelVersion: 3.19
14Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
15Description: (R) List various control and status registers. The specific
16 layout and content is driver specific.
17
18What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_idx
19Date: November 2014
20KernelVersion: 3.19
21Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
22Description: Select which address comparator or pair (of comparators) to
23 work with.
24
25What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_acctype
26Date: November 2014
27KernelVersion: 3.19
28Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
29Description: (RW) Used in conjunction with @addr_idx. Specifies
30 characteristics about the address comparator being configure,
31 for example the access type, the kind of instruction to trace,
32 processor contect ID to trigger on, etc. Individual fields in
33 the access type register may vary on the version of the trace
34 entity.
35
36What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_range
37Date: November 2014
38KernelVersion: 3.19
39Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
40Description: (RW) Used in conjunction with @addr_idx. Specifies the range of
41 addresses to trigger on. Inclusion or exclusion is specificed
42 in the corresponding access type register.
43
44What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_single
45Date: November 2014
46KernelVersion: 3.19
47Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
48Description: (RW) Used in conjunction with @addr_idx. Specifies the single
49 address to trigger on, highly influenced by the configuration
50 options of the corresponding access type register.
51
52What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_start
53Date: November 2014
54KernelVersion: 3.19
55Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
56Description: (RW) Used in conjunction with @addr_idx. Specifies the single
57 address to start tracing on, highly influenced by the
58 configuration options of the corresponding access type register.
59
60What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_stop
61Date: November 2014
62KernelVersion: 3.19
63Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
64Description: (RW) Used in conjunction with @addr_idx. Specifies the single
65 address to stop tracing on, highly influenced by the
66 configuration options of the corresponding access type register.
67
68What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cntr_idx
69Date: November 2014
70KernelVersion: 3.19
71Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
72Description: (RW) Specifies the counter to work on.
73
74What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cntr_event
75Date: November 2014
76KernelVersion: 3.19
77Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
78Description: (RW) Used in conjunction with cntr_idx, give access to the
79 counter event register.
80
81What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cntr_val
82Date: November 2014
83KernelVersion: 3.19
84Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
85Description: (RW) Used in conjunction with cntr_idx, give access to the
86 counter value register.
87
88What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cntr_rld_val
89Date: November 2014
90KernelVersion: 3.19
91Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
92Description: (RW) Used in conjunction with cntr_idx, give access to the
93 counter reload value register.
94
95What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cntr_rld_event
96Date: November 2014
97KernelVersion: 3.19
98Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
99Description: (RW) Used in conjunction with cntr_idx, give access to the
100 counter reload event register.
101
102What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/ctxid_idx
103Date: November 2014
104KernelVersion: 3.19
105Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
106Description: (RW) Specifies the index of the context ID register to be
107 selected.
108
109What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/ctxid_mask
110Date: November 2014
111KernelVersion: 3.19
112Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
113Description: (RW) Mask to apply to all the context ID comparator.
114
115What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/ctxid_val
116Date: November 2014
117KernelVersion: 3.19
118Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
119Description: (RW) Used with the ctxid_idx, specify with context ID to trigger
120 on.
121
122What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/enable_event
123Date: November 2014
124KernelVersion: 3.19
125Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
126Description: (RW) Defines which event triggers a trace.
127
128What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/etmsr
129Date: November 2014
130KernelVersion: 3.19
131Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
132Description: (RW) Gives access to the ETM status register, which holds
133 programming information and status on certains events.
134
135What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/fifofull_level
136Date: November 2014
137KernelVersion: 3.19
138Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
139Description: (RW) Number of byte left in the fifo before considering it full.
140 Depending on the tracer's version, can also hold threshold for
141 data suppression.
142
143What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mode
144Date: November 2014
145KernelVersion: 3.19
146Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
147Description: (RW) Interface with the driver's 'mode' field, controlling
148 various aspect of the trace entity such as time stamping,
149 context ID size and cycle accurate tracing. Driver specific
150 and bound to change depending on the driver.
151
152What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/nr_addr_cmp
153Date: November 2014
154KernelVersion: 3.19
155Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
156Description: (R) Provides the number of address comparators pairs accessible
157 on a trace unit, as specified by bit 3:0 of register ETMCCR.
158
159What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/nr_cntr
160Date: November 2014
161KernelVersion: 3.19
162Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
163Description: (R) Provides the number of counters accessible on a trace unit,
164 as specified by bit 15:13 of register ETMCCR.
165
166What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/nr_ctxid_cmp
167Date: November 2014
168KernelVersion: 3.19
169Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
170Description: (R) Provides the number of context ID comparator available on a
171 trace unit, as specified by bit 25:24 of register ETMCCR.
172
173What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/reset
174Date: November 2014
175KernelVersion: 3.19
176Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
177Description: (W) Cancels all configuration on a trace unit and set it back
178 to its boot configuration.
179
180What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_12_event
181Date: November 2014
182KernelVersion: 3.19
183Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
184Description: (RW) Defines the event that causes the sequencer to transition
185 from state 1 to state 2.
186
187What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_13_event
188Date: November 2014
189KernelVersion: 3.19
190Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
191Description: (RW) Defines the event that causes the sequencer to transition
192 from state 1 to state 3.
193
194What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_21_event
195Date: November 2014
196KernelVersion: 3.19
197Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
198Description: (RW) Defines the event that causes the sequencer to transition
199 from state 2 to state 1.
200
201What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_23_event
202Date: November 2014
203KernelVersion: 3.19
204Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
205Description: (RW) Defines the event that causes the sequencer to transition
206 from state 2 to state 3.
207
208What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_31_event
209Date: November 2014
210KernelVersion: 3.19
211Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
212Description: (RW) Defines the event that causes the sequencer to transition
213 from state 3 to state 1.
214
215What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_32_event
216Date: November 2014
217KernelVersion: 3.19
218Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
219Description: (RW) Defines the event that causes the sequencer to transition
220 from state 3 to state 2.
221
222What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/curr_seq_state
223Date: November 2014
224KernelVersion: 3.19
225Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
226Description: (R) Holds the current state of the sequencer.
227
228What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/sync_freq
229Date: November 2014
230KernelVersion: 3.19
231Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
232Description: (RW) Holds the trace synchronization frequency value - must be
233 programmed with the various implementation behavior in mind.
234
235What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/timestamp_event
236Date: November 2014
237KernelVersion: 3.19
238Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
239Description: (RW) Defines an event that requests the insertion of a timestamp
240 into the trace stream.
241
242What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/traceid
243Date: November 2014
244KernelVersion: 3.19
245Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
246Description: (RW) Holds the trace ID that will appear in the trace stream
247 coming from this trace entity.
248
249What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/trigger_event
250Date: November 2014
251KernelVersion: 3.19
252Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
253Description: (RW) Define the event that controls the trigger.
diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel b/Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel
new file mode 100644
index 000000000000..d75acda5e1b3
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel
@@ -0,0 +1,12 @@
1What: /sys/bus/coresight/devices/<memory_map>.funnel/funnel_ctrl
2Date: November 2014
3KernelVersion: 3.19
4Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
5Description: (RW) Enables the slave ports and defines the hold time of the
6 slave ports.
7
8What: /sys/bus/coresight/devices/<memory_map>.funnel/priority
9Date: November 2014
10KernelVersion: 3.19
11Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
12Description: (RW) Defines input port priority order.
diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc
new file mode 100644
index 000000000000..f38cded5fa22
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc
@@ -0,0 +1,8 @@
1What: /sys/bus/coresight/devices/<memory_map>.tmc/trigger_cntr
2Date: November 2014
3KernelVersion: 3.19
4Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
5Description: (RW) Disables write access to the Trace RAM by stopping the
6 formatter after a defined number of words have been stored
7 following the trigger event. Additional interface for this
8 driver are expected to be added as it matures.
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index d760b0224ef7..117521dbf2b3 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -200,6 +200,13 @@ Description:
200 Raw pressure measurement from channel Y. Units after 200 Raw pressure measurement from channel Y. Units after
201 application of scale and offset are kilopascal. 201 application of scale and offset are kilopascal.
202 202
203What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_input
204What: /sys/bus/iio/devices/iio:deviceX/in_pressure_input
205KernelVersion: 3.8
206Contact: linux-iio@vger.kernel.org
207Description:
208 Scaled pressure measurement from channel Y, in kilopascal.
209
203What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_raw 210What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_raw
204KernelVersion: 3.14 211KernelVersion: 3.14
205Contact: linux-iio@vger.kernel.org 212Contact: linux-iio@vger.kernel.org
@@ -231,6 +238,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_tempY_offset
231What: /sys/bus/iio/devices/iio:deviceX/in_temp_offset 238What: /sys/bus/iio/devices/iio:deviceX/in_temp_offset
232What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_offset 239What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_offset
233What: /sys/bus/iio/devices/iio:deviceX/in_pressure_offset 240What: /sys/bus/iio/devices/iio:deviceX/in_pressure_offset
241What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_offset
234KernelVersion: 2.6.35 242KernelVersion: 2.6.35
235Contact: linux-iio@vger.kernel.org 243Contact: linux-iio@vger.kernel.org
236Description: 244Description:
@@ -251,6 +259,7 @@ Description:
251What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_scale 259What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_scale
252What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_scale 260What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_scale
253What: /sys/bus/iio/devices/iio:deviceX/in_voltage_scale 261What: /sys/bus/iio/devices/iio:deviceX/in_voltage_scale
262What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_scale
254What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_scale 263What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_scale
255What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_scale 264What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_scale
256What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale 265What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale
@@ -266,6 +275,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_magnetic_tilt_comp_sca
266What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_true_tilt_comp_scale 275What: /sys/bus/iio/devices/iio:deviceX/in_rot_from_north_true_tilt_comp_scale
267What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_scale 276What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_scale
268What: /sys/bus/iio/devices/iio:deviceX/in_pressure_scale 277What: /sys/bus/iio/devices/iio:deviceX/in_pressure_scale
278What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_scale
269KernelVersion: 2.6.35 279KernelVersion: 2.6.35
270Contact: linux-iio@vger.kernel.org 280Contact: linux-iio@vger.kernel.org
271Description: 281Description:
@@ -328,6 +338,10 @@ Description:
328 are listed in this attribute. 338 are listed in this attribute.
329 339
330What /sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain 340What /sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain
341What: /sys/bus/iio/devices/iio:deviceX/in_intensity_red_hardwaregain
342What: /sys/bus/iio/devices/iio:deviceX/in_intensity_green_hardwaregain
343What: /sys/bus/iio/devices/iio:deviceX/in_intensity_blue_hardwaregain
344What: /sys/bus/iio/devices/iio:deviceX/in_intensity_clear_hardwaregain
331KernelVersion: 2.6.35 345KernelVersion: 2.6.35
332Contact: linux-iio@vger.kernel.org 346Contact: linux-iio@vger.kernel.org
333Description: 347Description:
@@ -1028,3 +1042,12 @@ Contact: linux-iio@vger.kernel.org
1028Description: 1042Description:
1029 Raw value of rotation from true/magnetic north measured with 1043 Raw value of rotation from true/magnetic north measured with
1030 or without compensation from tilt sensors. 1044 or without compensation from tilt sensors.
1045
1046What: /sys/bus/iio/devices/iio:deviceX/in_currentX_raw
1047KernelVersion: 3.18
1048Contact: linux-iio@vger.kernel.org
1049Description:
1050 Raw current measurement from channel X. Units are in milliamps
1051 after application of scale and offset. If no offset or scale is
1052 present, output should be considered as processed with the
1053 unit in milliamps.
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
index ee6c04036492..b3bc50f650ee 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -281,3 +281,16 @@ Description:
281 opt-out of driver binding using a driver_override name such as 281 opt-out of driver binding using a driver_override name such as
282 "none". Only a single driver may be specified in the override, 282 "none". Only a single driver may be specified in the override,
283 there is no support for parsing delimiters. 283 there is no support for parsing delimiters.
284
285What: /sys/bus/pci/devices/.../numa_node
286Date: Oct 2014
287Contact: Prarit Bhargava <prarit@redhat.com>
288Description:
289 This file contains the NUMA node to which the PCI device is
290 attached, or -1 if the node is unknown. The initial value
291 comes from an ACPI _PXM method or a similar firmware
292 source. If that is missing or incorrect, this file can be
293 written to override the node. In that case, please report
294 a firmware bug to the system vendor. Writing to this file
295 taints the kernel with TAINT_FIRMWARE_WORKAROUND, which
296 reduces the supportability of your system.
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index 614d451cee41..e5cc7633d013 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -104,16 +104,15 @@ What: /sys/bus/usb/devices/.../power/usb2_hardware_lpm
104Date: September 2011 104Date: September 2011
105Contact: Andiry Xu <andiry.xu@amd.com> 105Contact: Andiry Xu <andiry.xu@amd.com>
106Description: 106Description:
107 If CONFIG_PM_RUNTIME is set and a USB 2.0 lpm-capable device 107 If CONFIG_PM is set and a USB 2.0 lpm-capable device is plugged
108 is plugged in to a xHCI host which support link PM, it will 108 in to a xHCI host which support link PM, it will perform a LPM
109 perform a LPM test; if the test is passed and host supports 109 test; if the test is passed and host supports USB2 hardware LPM
110 USB2 hardware LPM (xHCI 1.0 feature), USB2 hardware LPM will 110 (xHCI 1.0 feature), USB2 hardware LPM will be enabled for the
111 be enabled for the device and the USB device directory will 111 device and the USB device directory will contain a file named
112 contain a file named power/usb2_hardware_lpm. The file holds 112 power/usb2_hardware_lpm. The file holds a string value (enable
113 a string value (enable or disable) indicating whether or not 113 or disable) indicating whether or not USB2 hardware LPM is
114 USB2 hardware LPM is enabled for the device. Developer can 114 enabled for the device. Developer can write y/Y/1 or n/N/0 to
115 write y/Y/1 or n/N/0 to the file to enable/disable the 115 the file to enable/disable the feature.
116 feature.
117 116
118What: /sys/bus/usb/devices/.../removable 117What: /sys/bus/usb/devices/.../removable
119Date: February 2012 118Date: February 2012
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net
index e1b2e785bba8..beb8ec4dabbc 100644
--- a/Documentation/ABI/testing/sysfs-class-net
+++ b/Documentation/ABI/testing/sysfs-class-net
@@ -216,3 +216,11 @@ Contact: netdev@vger.kernel.org
216Description: 216Description:
217 Indicates the interface protocol type as a decimal value. See 217 Indicates the interface protocol type as a decimal value. See
218 include/uapi/linux/if_arp.h for all possible values. 218 include/uapi/linux/if_arp.h for all possible values.
219
220What: /sys/class/net/<iface>/phys_switch_id
221Date: November 2014
222KernelVersion: 3.19
223Contact: netdev@vger.kernel.org
224Description:
225 Indicates the unique physical switch identifier of a switch this
226 port belongs to, as a string.
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index acb9bfc89b48..99983e67c13c 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -224,3 +224,50 @@ Description: Parameters for the Intel P-state driver
224 frequency range. 224 frequency range.
225 225
226 More details can be found in Documentation/cpu-freq/intel-pstate.txt 226 More details can be found in Documentation/cpu-freq/intel-pstate.txt
227
228What: /sys/devices/system/cpu/cpu*/cache/index*/<set_of_attributes_mentioned_below>
229Date: July 2014(documented, existed before August 2008)
230Contact: Sudeep Holla <sudeep.holla@arm.com>
231 Linux kernel mailing list <linux-kernel@vger.kernel.org>
232Description: Parameters for the CPU cache attributes
233
234 allocation_policy:
235 - WriteAllocate: allocate a memory location to a cache line
236 on a cache miss because of a write
237 - ReadAllocate: allocate a memory location to a cache line
238 on a cache miss because of a read
239 - ReadWriteAllocate: both writeallocate and readallocate
240
241 attributes: LEGACY used only on IA64 and is same as write_policy
242
243 coherency_line_size: the minimum amount of data in bytes that gets
244 transferred from memory to cache
245
246 level: the cache hierarcy in the multi-level cache configuration
247
248 number_of_sets: total number of sets in the cache, a set is a
249 collection of cache lines with the same cache index
250
251 physical_line_partition: number of physical cache line per cache tag
252
253 shared_cpu_list: the list of logical cpus sharing the cache
254
255 shared_cpu_map: logical cpu mask containing the list of cpus sharing
256 the cache
257
258 size: the total cache size in kB
259
260 type:
261 - Instruction: cache that only holds instructions
262 - Data: cache that only caches data
263 - Unified: cache that holds both data and instructions
264
265 ways_of_associativity: degree of freedom in placing a particular block
266 of memory in the cache
267
268 write_policy:
269 - WriteThrough: data is written to both the cache line
270 and to the block in the lower-level memory
271 - WriteBack: data is written only to the cache line and
272 the modified cache line is written to main
273 memory only when it is replaced
diff --git a/Documentation/ABI/testing/sysfs-platform-dell-laptop b/Documentation/ABI/testing/sysfs-platform-dell-laptop
new file mode 100644
index 000000000000..7969443ef0ef
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-dell-laptop
@@ -0,0 +1,60 @@
1What: /sys/class/leds/dell::kbd_backlight/als_setting
2Date: December 2014
3KernelVersion: 3.19
4Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
5 Pali Rohár <pali.rohar@gmail.com>
6Description:
7 This file allows to control the automatic keyboard
8 illumination mode on some systems that have an ambient
9 light sensor. Write 1 to this file to enable the auto
10 mode, 0 to disable it.
11
12What: /sys/class/leds/dell::kbd_backlight/start_triggers
13Date: December 2014
14KernelVersion: 3.19
15Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
16 Pali Rohár <pali.rohar@gmail.com>
17Description:
18 This file allows to control the input triggers that
19 turn on the keyboard backlight illumination that is
20 disabled because of inactivity.
21 Read the file to see the triggers available. The ones
22 enabled are preceded by '+', those disabled by '-'.
23
24 To enable a trigger, write its name preceded by '+' to
25 this file. To disable a trigger, write its name preceded
26 by '-' instead.
27
28 For example, to enable the keyboard as trigger run:
29 echo +keyboard > /sys/class/leds/dell::kbd_backlight/start_triggers
30 To disable it:
31 echo -keyboard > /sys/class/leds/dell::kbd_backlight/start_triggers
32
33 Note that not all the available triggers can be configured.
34
35What: /sys/class/leds/dell::kbd_backlight/stop_timeout
36Date: December 2014
37KernelVersion: 3.19
38Contact: Gabriele Mazzotta <gabriele.mzt@gmail.com>,
39 Pali Rohár <pali.rohar@gmail.com>
40Description:
41 This file allows to specify the interval after which the
42 keyboard illumination is disabled because of inactivity.
43 The timeouts are expressed in seconds, minutes, hours and
44 days, for which the symbols are 's', 'm', 'h' and 'd'
45 respectively.
46
47 To configure the timeout, write to this file a value along
48 with any the above units. If no unit is specified, the value
49 is assumed to be expressed in seconds.
50
51 For example, to set the timeout to 10 minutes run:
52 echo 10m > /sys/class/leds/dell::kbd_backlight/stop_timeout
53
54 Note that when this file is read, the returned value might be
55 expressed in a different unit than the one used when the timeout
56 was set.
57
58 Also note that only some timeouts are supported and that
59 some systems might fall back to a specific timeout in case
60 an invalid timeout is written to this file.
diff --git a/Documentation/Changes b/Documentation/Changes
index 1de131bb49fb..74bdda9272a4 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -383,7 +383,7 @@ o <http://www.iptables.org/downloads.html>
383 383
384Ip-route2 384Ip-route2
385--------- 385---------
386o <ftp://ftp.tux.org/pub/net/ip-routing/iproute2-2.2.4-now-ss991023.tar.gz> 386o <https://www.kernel.org/pub/linux/utils/net/iproute2/>
387 387
388OProfile 388OProfile
389-------- 389--------
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 3171822c22a5..618a33c940df 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -392,7 +392,12 @@ The goto statement comes in handy when a function exits from multiple
392locations and some common work such as cleanup has to be done. If there is no 392locations and some common work such as cleanup has to be done. If there is no
393cleanup needed then just return directly. 393cleanup needed then just return directly.
394 394
395The rationale is: 395Choose label names which say what the goto does or why the goto exists. An
396example of a good name could be "out_buffer:" if the goto frees "buffer". Avoid
397using GW-BASIC names like "err1:" and "err2:". Also don't name them after the
398goto location like "err_kmalloc_failed:"
399
400The rationale for using gotos is:
396 401
397- unconditional statements are easier to understand and follow 402- unconditional statements are easier to understand and follow
398- nesting is reduced 403- nesting is reduced
@@ -403,9 +408,10 @@ The rationale is:
403int fun(int a) 408int fun(int a)
404{ 409{
405 int result = 0; 410 int result = 0;
406 char *buffer = kmalloc(SIZE); 411 char *buffer;
407 412
408 if (buffer == NULL) 413 buffer = kmalloc(SIZE, GFP_KERNEL);
414 if (!buffer)
409 return -ENOMEM; 415 return -ENOMEM;
410 416
411 if (condition1) { 417 if (condition1) {
@@ -413,14 +419,25 @@ int fun(int a)
413 ... 419 ...
414 } 420 }
415 result = 1; 421 result = 1;
416 goto out; 422 goto out_buffer;
417 } 423 }
418 ... 424 ...
419out: 425out_buffer:
420 kfree(buffer); 426 kfree(buffer);
421 return result; 427 return result;
422} 428}
423 429
430A common type of bug to be aware of it "one err bugs" which look like this:
431
432err:
433 kfree(foo->bar);
434 kfree(foo);
435 return ret;
436
437The bug in this code is that on some exit paths "foo" is NULL. Normally the
438fix for this is to split it up into two error labels "err_bar:" and "err_foo:".
439
440
424 Chapter 8: Commenting 441 Chapter 8: Commenting
425 442
426Comments are good, but there is also a danger of over-commenting. NEVER 443Comments are good, but there is also a danger of over-commenting. NEVER
@@ -845,6 +862,49 @@ next instruction in the assembly output:
845 : /* outputs */ : /* inputs */ : /* clobbers */); 862 : /* outputs */ : /* inputs */ : /* clobbers */);
846 863
847 864
865 Chapter 20: Conditional Compilation
866
867Wherever possible, don't use preprocessor conditionals (#if, #ifdef) in .c
868files; doing so makes code harder to read and logic harder to follow. Instead,
869use such conditionals in a header file defining functions for use in those .c
870files, providing no-op stub versions in the #else case, and then call those
871functions unconditionally from .c files. The compiler will avoid generating
872any code for the stub calls, producing identical results, but the logic will
873remain easy to follow.
874
875Prefer to compile out entire functions, rather than portions of functions or
876portions of expressions. Rather than putting an ifdef in an expression, factor
877out part or all of the expression into a separate helper function and apply the
878conditional to that function.
879
880If you have a function or variable which may potentially go unused in a
881particular configuration, and the compiler would warn about its definition
882going unused, mark the definition as __maybe_unused rather than wrapping it in
883a preprocessor conditional. (However, if a function or variable *always* goes
884unused, delete it.)
885
886Within code, where possible, use the IS_ENABLED macro to convert a Kconfig
887symbol into a C boolean expression, and use it in a normal C conditional:
888
889 if (IS_ENABLED(CONFIG_SOMETHING)) {
890 ...
891 }
892
893The compiler will constant-fold the conditional away, and include or exclude
894the block of code just as with an #ifdef, so this will not add any runtime
895overhead. However, this approach still allows the C compiler to see the code
896inside the block, and check it for correctness (syntax, types, symbol
897references, etc). Thus, you still have to use an #ifdef if the code inside the
898block references symbols that will not exist if the condition is not met.
899
900At the end of any non-trivial #if or #ifdef block (more than a few lines),
901place a comment after the #endif on the same line, noting the conditional
902expression used. For instance:
903
904#ifdef CONFIG_SOMETHING
905...
906#endif /* CONFIG_SOMETHING */
907
848 908
849 Appendix I: References 909 Appendix I: References
850 910
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index bec06659e0eb..9c7d92d03f62 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -15,7 +15,7 @@ DOCBOOKS := z8530book.xml device-drivers.xml \
15 80211.xml debugobjects.xml sh.xml regulator.xml \ 15 80211.xml debugobjects.xml sh.xml regulator.xml \
16 alsa-driver-api.xml writing-an-alsa-driver.xml \ 16 alsa-driver-api.xml writing-an-alsa-driver.xml \
17 tracepoint.xml drm.xml media_api.xml w1.xml \ 17 tracepoint.xml drm.xml media_api.xml w1.xml \
18 writing_musb_glue_layer.xml 18 writing_musb_glue_layer.xml crypto-API.xml
19 19
20include Documentation/DocBook/media/Makefile 20include Documentation/DocBook/media/Makefile
21 21
diff --git a/Documentation/DocBook/alsa-driver-api.tmpl b/Documentation/DocBook/alsa-driver-api.tmpl
index 0230a96f0564..71f9246127ec 100644
--- a/Documentation/DocBook/alsa-driver-api.tmpl
+++ b/Documentation/DocBook/alsa-driver-api.tmpl
@@ -57,6 +57,7 @@
57!Esound/core/pcm.c 57!Esound/core/pcm.c
58!Esound/core/pcm_lib.c 58!Esound/core/pcm_lib.c
59!Esound/core/pcm_native.c 59!Esound/core/pcm_native.c
60!Iinclude/sound/pcm.h
60 </sect1> 61 </sect1>
61 <sect1><title>PCM Format Helpers</title> 62 <sect1><title>PCM Format Helpers</title>
62!Esound/core/pcm_misc.c 63!Esound/core/pcm_misc.c
@@ -64,6 +65,10 @@
64 <sect1><title>PCM Memory Management</title> 65 <sect1><title>PCM Memory Management</title>
65!Esound/core/pcm_memory.c 66!Esound/core/pcm_memory.c
66 </sect1> 67 </sect1>
68 <sect1><title>PCM DMA Engine API</title>
69!Esound/core/pcm_dmaengine.c
70!Iinclude/sound/dmaengine_pcm.h
71 </sect1>
67 </chapter> 72 </chapter>
68 <chapter><title>Control/Mixer API</title> 73 <chapter><title>Control/Mixer API</title>
69 <sect1><title>General Control Interface</title> 74 <sect1><title>General Control Interface</title>
@@ -91,12 +96,38 @@
91!Esound/core/info.c 96!Esound/core/info.c
92 </sect1> 97 </sect1>
93 </chapter> 98 </chapter>
99 <chapter><title>Compress Offload</title>
100 <sect1><title>Compress Offload API</title>
101!Esound/core/compress_offload.c
102!Iinclude/uapi/sound/compress_offload.h
103!Iinclude/uapi/sound/compress_params.h
104!Iinclude/sound/compress_driver.h
105 </sect1>
106 </chapter>
107 <chapter><title>ASoC</title>
108 <sect1><title>ASoC Core API</title>
109!Iinclude/sound/soc.h
110!Esound/soc/soc-core.c
111!Esound/soc/soc-cache.c
112!Esound/soc/soc-devres.c
113!Esound/soc/soc-io.c
114!Esound/soc/soc-pcm.c
115 </sect1>
116 <sect1><title>ASoC DAPM API</title>
117!Esound/soc/soc-dapm.c
118 </sect1>
119 <sect1><title>ASoC DMA Engine API</title>
120!Esound/soc/soc-generic-dmaengine-pcm.c
121 </sect1>
122 </chapter>
94 <chapter><title>Miscellaneous Functions</title> 123 <chapter><title>Miscellaneous Functions</title>
95 <sect1><title>Hardware-Dependent Devices API</title> 124 <sect1><title>Hardware-Dependent Devices API</title>
96!Esound/core/hwdep.c 125!Esound/core/hwdep.c
97 </sect1> 126 </sect1>
98 <sect1><title>Jack Abstraction Layer API</title> 127 <sect1><title>Jack Abstraction Layer API</title>
128!Iinclude/sound/jack.h
99!Esound/core/jack.c 129!Esound/core/jack.c
130!Esound/soc/soc-jack.c
100 </sect1> 131 </sect1>
101 <sect1><title>ISA DMA Helpers</title> 132 <sect1><title>ISA DMA Helpers</title>
102!Esound/core/isadma.c 133!Esound/core/isadma.c
diff --git a/Documentation/DocBook/crypto-API.tmpl b/Documentation/DocBook/crypto-API.tmpl
new file mode 100644
index 000000000000..c763d30f4893
--- /dev/null
+++ b/Documentation/DocBook/crypto-API.tmpl
@@ -0,0 +1,1253 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
4
5<book id="KernelCryptoAPI">
6 <bookinfo>
7 <title>Linux Kernel Crypto API</title>
8
9 <authorgroup>
10 <author>
11 <firstname>Stephan</firstname>
12 <surname>Mueller</surname>
13 <affiliation>
14 <address>
15 <email>smueller@chronox.de</email>
16 </address>
17 </affiliation>
18 </author>
19 <author>
20 <firstname>Marek</firstname>
21 <surname>Vasut</surname>
22 <affiliation>
23 <address>
24 <email>marek@denx.de</email>
25 </address>
26 </affiliation>
27 </author>
28 </authorgroup>
29
30 <copyright>
31 <year>2014</year>
32 <holder>Stephan Mueller</holder>
33 </copyright>
34
35
36 <legalnotice>
37 <para>
38 This documentation is free software; you can redistribute
39 it and/or modify it under the terms of the GNU General Public
40 License as published by the Free Software Foundation; either
41 version 2 of the License, or (at your option) any later
42 version.
43 </para>
44
45 <para>
46 This program is distributed in the hope that it will be
47 useful, but WITHOUT ANY WARRANTY; without even the implied
48 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
49 See the GNU General Public License for more details.
50 </para>
51
52 <para>
53 You should have received a copy of the GNU General Public
54 License along with this program; if not, write to the Free
55 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
56 MA 02111-1307 USA
57 </para>
58
59 <para>
60 For more details see the file COPYING in the source
61 distribution of Linux.
62 </para>
63 </legalnotice>
64 </bookinfo>
65
66 <toc></toc>
67
68 <chapter id="Intro">
69 <title>Kernel Crypto API Interface Specification</title>
70
71 <sect1><title>Introduction</title>
72
73 <para>
74 The kernel crypto API offers a rich set of cryptographic ciphers as
75 well as other data transformation mechanisms and methods to invoke
76 these. This document contains a description of the API and provides
77 example code.
78 </para>
79
80 <para>
81 To understand and properly use the kernel crypto API a brief
82 explanation of its structure is given. Based on the architecture,
83 the API can be separated into different components. Following the
84 architecture specification, hints to developers of ciphers are
85 provided. Pointers to the API function call documentation are
86 given at the end.
87 </para>
88
89 <para>
90 The kernel crypto API refers to all algorithms as "transformations".
91 Therefore, a cipher handle variable usually has the name "tfm".
92 Besides cryptographic operations, the kernel crypto API also knows
93 compression transformations and handles them the same way as ciphers.
94 </para>
95
96 <para>
97 The kernel crypto API serves the following entity types:
98
99 <itemizedlist>
100 <listitem>
101 <para>consumers requesting cryptographic services</para>
102 </listitem>
103 <listitem>
104 <para>data transformation implementations (typically ciphers)
105 that can be called by consumers using the kernel crypto
106 API</para>
107 </listitem>
108 </itemizedlist>
109 </para>
110
111 <para>
112 This specification is intended for consumers of the kernel crypto
113 API as well as for developers implementing ciphers. This API
114 specification, however, does not discusses all API calls available
115 to data transformation implementations (i.e. implementations of
116 ciphers and other transformations (such as CRC or even compression
117 algorithms) that can register with the kernel crypto API).
118 </para>
119
120 <para>
121 Note: The terms "transformation" and cipher algorithm are used
122 interchangably.
123 </para>
124 </sect1>
125
126 <sect1><title>Terminology</title>
127 <para>
128 The transformation implementation is an actual code or interface
129 to hardware which implements a certain transformation with precisely
130 defined behavior.
131 </para>
132
133 <para>
134 The transformation object (TFM) is an instance of a transformation
135 implementation. There can be multiple transformation objects
136 associated with a single transformation implementation. Each of
137 those transformation objects is held by a crypto API consumer or
138 another transformation. Transformation object is allocated when a
139 crypto API consumer requests a transformation implementation.
140 The consumer is then provided with a structure, which contains
141 a transformation object (TFM).
142 </para>
143
144 <para>
145 The structure that contains transformation objects may also be
146 referred to as a "cipher handle". Such a cipher handle is always
147 subject to the following phases that are reflected in the API calls
148 applicable to such a cipher handle:
149 </para>
150
151 <orderedlist>
152 <listitem>
153 <para>Initialization of a cipher handle.</para>
154 </listitem>
155 <listitem>
156 <para>Execution of all intended cipher operations applicable
157 for the handle where the cipher handle must be furnished to
158 every API call.</para>
159 </listitem>
160 <listitem>
161 <para>Destruction of a cipher handle.</para>
162 </listitem>
163 </orderedlist>
164
165 <para>
166 When using the initialization API calls, a cipher handle is
167 created and returned to the consumer. Therefore, please refer
168 to all initialization API calls that refer to the data
169 structure type a consumer is expected to receive and subsequently
170 to use. The initialization API calls have all the same naming
171 conventions of crypto_alloc_*.
172 </para>
173
174 <para>
175 The transformation context is private data associated with
176 the transformation object.
177 </para>
178 </sect1>
179 </chapter>
180
181 <chapter id="Architecture"><title>Kernel Crypto API Architecture</title>
182 <sect1><title>Cipher algorithm types</title>
183 <para>
184 The kernel crypto API provides different API calls for the
185 following cipher types:
186
187 <itemizedlist>
188 <listitem><para>Symmetric ciphers</para></listitem>
189 <listitem><para>AEAD ciphers</para></listitem>
190 <listitem><para>Message digest, including keyed message digest</para></listitem>
191 <listitem><para>Random number generation</para></listitem>
192 <listitem><para>User space interface</para></listitem>
193 </itemizedlist>
194 </para>
195 </sect1>
196
197 <sect1><title>Ciphers And Templates</title>
198 <para>
199 The kernel crypto API provides implementations of single block
200 ciphers and message digests. In addition, the kernel crypto API
201 provides numerous "templates" that can be used in conjunction
202 with the single block ciphers and message digests. Templates
203 include all types of block chaining mode, the HMAC mechanism, etc.
204 </para>
205
206 <para>
207 Single block ciphers and message digests can either be directly
208 used by a caller or invoked together with a template to form
209 multi-block ciphers or keyed message digests.
210 </para>
211
212 <para>
213 A single block cipher may even be called with multiple templates.
214 However, templates cannot be used without a single cipher.
215 </para>
216
217 <para>
218 See /proc/crypto and search for "name". For example:
219
220 <itemizedlist>
221 <listitem><para>aes</para></listitem>
222 <listitem><para>ecb(aes)</para></listitem>
223 <listitem><para>cmac(aes)</para></listitem>
224 <listitem><para>ccm(aes)</para></listitem>
225 <listitem><para>rfc4106(gcm(aes))</para></listitem>
226 <listitem><para>sha1</para></listitem>
227 <listitem><para>hmac(sha1)</para></listitem>
228 <listitem><para>authenc(hmac(sha1),cbc(aes))</para></listitem>
229 </itemizedlist>
230 </para>
231
232 <para>
233 In these examples, "aes" and "sha1" are the ciphers and all
234 others are the templates.
235 </para>
236 </sect1>
237
238 <sect1><title>Synchronous And Asynchronous Operation</title>
239 <para>
240 The kernel crypto API provides synchronous and asynchronous
241 API operations.
242 </para>
243
244 <para>
245 When using the synchronous API operation, the caller invokes
246 a cipher operation which is performed synchronously by the
247 kernel crypto API. That means, the caller waits until the
248 cipher operation completes. Therefore, the kernel crypto API
249 calls work like regular function calls. For synchronous
250 operation, the set of API calls is small and conceptually
251 similar to any other crypto library.
252 </para>
253
254 <para>
255 Asynchronous operation is provided by the kernel crypto API
256 which implies that the invocation of a cipher operation will
257 complete almost instantly. That invocation triggers the
258 cipher operation but it does not signal its completion. Before
259 invoking a cipher operation, the caller must provide a callback
260 function the kernel crypto API can invoke to signal the
261 completion of the cipher operation. Furthermore, the caller
262 must ensure it can handle such asynchronous events by applying
263 appropriate locking around its data. The kernel crypto API
264 does not perform any special serialization operation to protect
265 the caller's data integrity.
266 </para>
267 </sect1>
268
269 <sect1><title>Crypto API Cipher References And Priority</title>
270 <para>
271 A cipher is referenced by the caller with a string. That string
272 has the following semantics:
273
274 <programlisting>
275 template(single block cipher)
276 </programlisting>
277
278 where "template" and "single block cipher" is the aforementioned
279 template and single block cipher, respectively. If applicable,
280 additional templates may enclose other templates, such as
281
282 <programlisting>
283 template1(template2(single block cipher)))
284 </programlisting>
285 </para>
286
287 <para>
288 The kernel crypto API may provide multiple implementations of a
289 template or a single block cipher. For example, AES on newer
290 Intel hardware has the following implementations: AES-NI,
291 assembler implementation, or straight C. Now, when using the
292 string "aes" with the kernel crypto API, which cipher
293 implementation is used? The answer to that question is the
294 priority number assigned to each cipher implementation by the
295 kernel crypto API. When a caller uses the string to refer to a
296 cipher during initialization of a cipher handle, the kernel
297 crypto API looks up all implementations providing an
298 implementation with that name and selects the implementation
299 with the highest priority.
300 </para>
301
302 <para>
303 Now, a caller may have the need to refer to a specific cipher
304 implementation and thus does not want to rely on the
305 priority-based selection. To accommodate this scenario, the
306 kernel crypto API allows the cipher implementation to register
307 a unique name in addition to common names. When using that
308 unique name, a caller is therefore always sure to refer to
309 the intended cipher implementation.
310 </para>
311
312 <para>
313 The list of available ciphers is given in /proc/crypto. However,
314 that list does not specify all possible permutations of
315 templates and ciphers. Each block listed in /proc/crypto may
316 contain the following information -- if one of the components
317 listed as follows are not applicable to a cipher, it is not
318 displayed:
319 </para>
320
321 <itemizedlist>
322 <listitem>
323 <para>name: the generic name of the cipher that is subject
324 to the priority-based selection -- this name can be used by
325 the cipher allocation API calls (all names listed above are
326 examples for such generic names)</para>
327 </listitem>
328 <listitem>
329 <para>driver: the unique name of the cipher -- this name can
330 be used by the cipher allocation API calls</para>
331 </listitem>
332 <listitem>
333 <para>module: the kernel module providing the cipher
334 implementation (or "kernel" for statically linked ciphers)</para>
335 </listitem>
336 <listitem>
337 <para>priority: the priority value of the cipher implementation</para>
338 </listitem>
339 <listitem>
340 <para>refcnt: the reference count of the respective cipher
341 (i.e. the number of current consumers of this cipher)</para>
342 </listitem>
343 <listitem>
344 <para>selftest: specification whether the self test for the
345 cipher passed</para>
346 </listitem>
347 <listitem>
348 <para>type:
349 <itemizedlist>
350 <listitem>
351 <para>blkcipher for synchronous block ciphers</para>
352 </listitem>
353 <listitem>
354 <para>ablkcipher for asynchronous block ciphers</para>
355 </listitem>
356 <listitem>
357 <para>cipher for single block ciphers that may be used with
358 an additional template</para>
359 </listitem>
360 <listitem>
361 <para>shash for synchronous message digest</para>
362 </listitem>
363 <listitem>
364 <para>ahash for asynchronous message digest</para>
365 </listitem>
366 <listitem>
367 <para>aead for AEAD cipher type</para>
368 </listitem>
369 <listitem>
370 <para>compression for compression type transformations</para>
371 </listitem>
372 <listitem>
373 <para>rng for random number generator</para>
374 </listitem>
375 <listitem>
376 <para>givcipher for cipher with associated IV generator
377 (see the geniv entry below for the specification of the
378 IV generator type used by the cipher implementation)</para>
379 </listitem>
380 </itemizedlist>
381 </para>
382 </listitem>
383 <listitem>
384 <para>blocksize: blocksize of cipher in bytes</para>
385 </listitem>
386 <listitem>
387 <para>keysize: key size in bytes</para>
388 </listitem>
389 <listitem>
390 <para>ivsize: IV size in bytes</para>
391 </listitem>
392 <listitem>
393 <para>seedsize: required size of seed data for random number
394 generator</para>
395 </listitem>
396 <listitem>
397 <para>digestsize: output size of the message digest</para>
398 </listitem>
399 <listitem>
400 <para>geniv: IV generation type:
401 <itemizedlist>
402 <listitem>
403 <para>eseqiv for encrypted sequence number based IV
404 generation</para>
405 </listitem>
406 <listitem>
407 <para>seqiv for sequence number based IV generation</para>
408 </listitem>
409 <listitem>
410 <para>chainiv for chain iv generation</para>
411 </listitem>
412 <listitem>
413 <para>&lt;builtin&gt; is a marker that the cipher implements
414 IV generation and handling as it is specific to the given
415 cipher</para>
416 </listitem>
417 </itemizedlist>
418 </para>
419 </listitem>
420 </itemizedlist>
421 </sect1>
422
423 <sect1><title>Key Sizes</title>
424 <para>
425 When allocating a cipher handle, the caller only specifies the
426 cipher type. Symmetric ciphers, however, typically support
427 multiple key sizes (e.g. AES-128 vs. AES-192 vs. AES-256).
428 These key sizes are determined with the length of the provided
429 key. Thus, the kernel crypto API does not provide a separate
430 way to select the particular symmetric cipher key size.
431 </para>
432 </sect1>
433
434 <sect1><title>Cipher Allocation Type And Masks</title>
435 <para>
436 The different cipher handle allocation functions allow the
437 specification of a type and mask flag. Both parameters have
438 the following meaning (and are therefore not covered in the
439 subsequent sections).
440 </para>
441
442 <para>
443 The type flag specifies the type of the cipher algorithm.
444 The caller usually provides a 0 when the caller wants the
445 default handling. Otherwise, the caller may provide the
446 following selections which match the the aforementioned
447 cipher types:
448 </para>
449
450 <itemizedlist>
451 <listitem>
452 <para>CRYPTO_ALG_TYPE_CIPHER Single block cipher</para>
453 </listitem>
454 <listitem>
455 <para>CRYPTO_ALG_TYPE_COMPRESS Compression</para>
456 </listitem>
457 <listitem>
458 <para>CRYPTO_ALG_TYPE_AEAD Authenticated Encryption with
459 Associated Data (MAC)</para>
460 </listitem>
461 <listitem>
462 <para>CRYPTO_ALG_TYPE_BLKCIPHER Synchronous multi-block cipher</para>
463 </listitem>
464 <listitem>
465 <para>CRYPTO_ALG_TYPE_ABLKCIPHER Asynchronous multi-block cipher</para>
466 </listitem>
467 <listitem>
468 <para>CRYPTO_ALG_TYPE_GIVCIPHER Asynchronous multi-block
469 cipher packed together with an IV generator (see geniv field
470 in the /proc/crypto listing for the known IV generators)</para>
471 </listitem>
472 <listitem>
473 <para>CRYPTO_ALG_TYPE_DIGEST Raw message digest</para>
474 </listitem>
475 <listitem>
476 <para>CRYPTO_ALG_TYPE_HASH Alias for CRYPTO_ALG_TYPE_DIGEST</para>
477 </listitem>
478 <listitem>
479 <para>CRYPTO_ALG_TYPE_SHASH Synchronous multi-block hash</para>
480 </listitem>
481 <listitem>
482 <para>CRYPTO_ALG_TYPE_AHASH Asynchronous multi-block hash</para>
483 </listitem>
484 <listitem>
485 <para>CRYPTO_ALG_TYPE_RNG Random Number Generation</para>
486 </listitem>
487 <listitem>
488 <para>CRYPTO_ALG_TYPE_PCOMPRESS Enhanced version of
489 CRYPTO_ALG_TYPE_COMPRESS allowing for segmented compression /
490 decompression instead of performing the operation on one
491 segment only. CRYPTO_ALG_TYPE_PCOMPRESS is intended to replace
492 CRYPTO_ALG_TYPE_COMPRESS once existing consumers are converted.</para>
493 </listitem>
494 </itemizedlist>
495
496 <para>
497 The mask flag restricts the type of cipher. The only allowed
498 flag is CRYPTO_ALG_ASYNC to restrict the cipher lookup function
499 to asynchronous ciphers. Usually, a caller provides a 0 for the
500 mask flag.
501 </para>
502
503 <para>
504 When the caller provides a mask and type specification, the
505 caller limits the search the kernel crypto API can perform for
506 a suitable cipher implementation for the given cipher name.
507 That means, even when a caller uses a cipher name that exists
508 during its initialization call, the kernel crypto API may not
509 select it due to the used type and mask field.
510 </para>
511 </sect1>
512 </chapter>
513
514 <chapter id="Development"><title>Developing Cipher Algorithms</title>
515 <sect1><title>Registering And Unregistering Transformation</title>
516 <para>
517 There are three distinct types of registration functions in
518 the Crypto API. One is used to register a generic cryptographic
519 transformation, while the other two are specific to HASH
520 transformations and COMPRESSion. We will discuss the latter
521 two in a separate chapter, here we will only look at the
522 generic ones.
523 </para>
524
525 <para>
526 Before discussing the register functions, the data structure
527 to be filled with each, struct crypto_alg, must be considered
528 -- see below for a description of this data structure.
529 </para>
530
531 <para>
532 The generic registration functions can be found in
533 include/linux/crypto.h and their definition can be seen below.
534 The former function registers a single transformation, while
535 the latter works on an array of transformation descriptions.
536 The latter is useful when registering transformations in bulk.
537 </para>
538
539 <programlisting>
540 int crypto_register_alg(struct crypto_alg *alg);
541 int crypto_register_algs(struct crypto_alg *algs, int count);
542 </programlisting>
543
544 <para>
545 The counterparts to those functions are listed below.
546 </para>
547
548 <programlisting>
549 int crypto_unregister_alg(struct crypto_alg *alg);
550 int crypto_unregister_algs(struct crypto_alg *algs, int count);
551 </programlisting>
552
553 <para>
554 Notice that both registration and unregistration functions
555 do return a value, so make sure to handle errors. A return
556 code of zero implies success. Any return code &lt; 0 implies
557 an error.
558 </para>
559
560 <para>
561 The bulk registration / unregistration functions require
562 that struct crypto_alg is an array of count size. These
563 functions simply loop over that array and register /
564 unregister each individual algorithm. If an error occurs,
565 the loop is terminated at the offending algorithm definition.
566 That means, the algorithms prior to the offending algorithm
567 are successfully registered. Note, the caller has no way of
568 knowing which cipher implementations have successfully
569 registered. If this is important to know, the caller should
570 loop through the different implementations using the single
571 instance *_alg functions for each individual implementation.
572 </para>
573 </sect1>
574
575 <sect1><title>Single-Block Symmetric Ciphers [CIPHER]</title>
576 <para>
577 Example of transformations: aes, arc4, ...
578 </para>
579
580 <para>
581 This section describes the simplest of all transformation
582 implementations, that being the CIPHER type used for symmetric
583 ciphers. The CIPHER type is used for transformations which
584 operate on exactly one block at a time and there are no
585 dependencies between blocks at all.
586 </para>
587
588 <sect2><title>Registration specifics</title>
589 <para>
590 The registration of [CIPHER] algorithm is specific in that
591 struct crypto_alg field .cra_type is empty. The .cra_u.cipher
592 has to be filled in with proper callbacks to implement this
593 transformation.
594 </para>
595
596 <para>
597 See struct cipher_alg below.
598 </para>
599 </sect2>
600
601 <sect2><title>Cipher Definition With struct cipher_alg</title>
602 <para>
603 Struct cipher_alg defines a single block cipher.
604 </para>
605
606 <para>
607 Here are schematics of how these functions are called when
608 operated from other part of the kernel. Note that the
609 .cia_setkey() call might happen before or after any of these
610 schematics happen, but must not happen during any of these
611 are in-flight.
612 </para>
613
614 <para>
615 <programlisting>
616 KEY ---. PLAINTEXT ---.
617 v v
618 .cia_setkey() -&gt; .cia_encrypt()
619 |
620 '-----&gt; CIPHERTEXT
621 </programlisting>
622 </para>
623
624 <para>
625 Please note that a pattern where .cia_setkey() is called
626 multiple times is also valid:
627 </para>
628
629 <para>
630 <programlisting>
631
632 KEY1 --. PLAINTEXT1 --. KEY2 --. PLAINTEXT2 --.
633 v v v v
634 .cia_setkey() -&gt; .cia_encrypt() -&gt; .cia_setkey() -&gt; .cia_encrypt()
635 | |
636 '---&gt; CIPHERTEXT1 '---&gt; CIPHERTEXT2
637 </programlisting>
638 </para>
639
640 </sect2>
641 </sect1>
642
643 <sect1><title>Multi-Block Ciphers [BLKCIPHER] [ABLKCIPHER]</title>
644 <para>
645 Example of transformations: cbc(aes), ecb(arc4), ...
646 </para>
647
648 <para>
649 This section describes the multi-block cipher transformation
650 implementations for both synchronous [BLKCIPHER] and
651 asynchronous [ABLKCIPHER] case. The multi-block ciphers are
652 used for transformations which operate on scatterlists of
653 data supplied to the transformation functions. They output
654 the result into a scatterlist of data as well.
655 </para>
656
657 <sect2><title>Registration Specifics</title>
658
659 <para>
660 The registration of [BLKCIPHER] or [ABLKCIPHER] algorithms
661 is one of the most standard procedures throughout the crypto API.
662 </para>
663
664 <para>
665 Note, if a cipher implementation requires a proper alignment
666 of data, the caller should use the functions of
667 crypto_blkcipher_alignmask() or crypto_ablkcipher_alignmask()
668 respectively to identify a memory alignment mask. The kernel
669 crypto API is able to process requests that are unaligned.
670 This implies, however, additional overhead as the kernel
671 crypto API needs to perform the realignment of the data which
672 may imply moving of data.
673 </para>
674 </sect2>
675
676 <sect2><title>Cipher Definition With struct blkcipher_alg and ablkcipher_alg</title>
677 <para>
678 Struct blkcipher_alg defines a synchronous block cipher whereas
679 struct ablkcipher_alg defines an asynchronous block cipher.
680 </para>
681
682 <para>
683 Please refer to the single block cipher description for schematics
684 of the block cipher usage. The usage patterns are exactly the same
685 for [ABLKCIPHER] and [BLKCIPHER] as they are for plain [CIPHER].
686 </para>
687 </sect2>
688
689 <sect2><title>Specifics Of Asynchronous Multi-Block Cipher</title>
690 <para>
691 There are a couple of specifics to the [ABLKCIPHER] interface.
692 </para>
693
694 <para>
695 First of all, some of the drivers will want to use the
696 Generic ScatterWalk in case the hardware needs to be fed
697 separate chunks of the scatterlist which contains the
698 plaintext and will contain the ciphertext. Please refer
699 to the ScatterWalk interface offered by the Linux kernel
700 scatter / gather list implementation.
701 </para>
702 </sect2>
703 </sect1>
704
705 <sect1><title>Hashing [HASH]</title>
706
707 <para>
708 Example of transformations: crc32, md5, sha1, sha256,...
709 </para>
710
711 <sect2><title>Registering And Unregistering The Transformation</title>
712
713 <para>
714 There are multiple ways to register a HASH transformation,
715 depending on whether the transformation is synchronous [SHASH]
716 or asynchronous [AHASH] and the amount of HASH transformations
717 we are registering. You can find the prototypes defined in
718 include/crypto/internal/hash.h:
719 </para>
720
721 <programlisting>
722 int crypto_register_ahash(struct ahash_alg *alg);
723
724 int crypto_register_shash(struct shash_alg *alg);
725 int crypto_register_shashes(struct shash_alg *algs, int count);
726 </programlisting>
727
728 <para>
729 The respective counterparts for unregistering the HASH
730 transformation are as follows:
731 </para>
732
733 <programlisting>
734 int crypto_unregister_ahash(struct ahash_alg *alg);
735
736 int crypto_unregister_shash(struct shash_alg *alg);
737 int crypto_unregister_shashes(struct shash_alg *algs, int count);
738 </programlisting>
739 </sect2>
740
741 <sect2><title>Cipher Definition With struct shash_alg and ahash_alg</title>
742 <para>
743 Here are schematics of how these functions are called when
744 operated from other part of the kernel. Note that the .setkey()
745 call might happen before or after any of these schematics happen,
746 but must not happen during any of these are in-flight. Please note
747 that calling .init() followed immediately by .finish() is also a
748 perfectly valid transformation.
749 </para>
750
751 <programlisting>
752 I) DATA -----------.
753 v
754 .init() -&gt; .update() -&gt; .final() ! .update() might not be called
755 ^ | | at all in this scenario.
756 '----' '---&gt; HASH
757
758 II) DATA -----------.-----------.
759 v v
760 .init() -&gt; .update() -&gt; .finup() ! .update() may not be called
761 ^ | | at all in this scenario.
762 '----' '---&gt; HASH
763
764 III) DATA -----------.
765 v
766 .digest() ! The entire process is handled
767 | by the .digest() call.
768 '---------------&gt; HASH
769 </programlisting>
770
771 <para>
772 Here is a schematic of how the .export()/.import() functions are
773 called when used from another part of the kernel.
774 </para>
775
776 <programlisting>
777 KEY--. DATA--.
778 v v ! .update() may not be called
779 .setkey() -&gt; .init() -&gt; .update() -&gt; .export() at all in this scenario.
780 ^ | |
781 '-----' '--&gt; PARTIAL_HASH
782
783 ----------- other transformations happen here -----------
784
785 PARTIAL_HASH--. DATA1--.
786 v v
787 .import -&gt; .update() -&gt; .final() ! .update() may not be called
788 ^ | | at all in this scenario.
789 '----' '--&gt; HASH1
790
791 PARTIAL_HASH--. DATA2-.
792 v v
793 .import -&gt; .finup()
794 |
795 '---------------&gt; HASH2
796 </programlisting>
797 </sect2>
798
799 <sect2><title>Specifics Of Asynchronous HASH Transformation</title>
800 <para>
801 Some of the drivers will want to use the Generic ScatterWalk
802 in case the implementation needs to be fed separate chunks of the
803 scatterlist which contains the input data. The buffer containing
804 the resulting hash will always be properly aligned to
805 .cra_alignmask so there is no need to worry about this.
806 </para>
807 </sect2>
808 </sect1>
809 </chapter>
810
811 <chapter id="API"><title>Programming Interface</title>
812 <sect1><title>Block Cipher Context Data Structures</title>
813!Pinclude/linux/crypto.h Block Cipher Context Data Structures
814!Finclude/linux/crypto.h aead_request
815 </sect1>
816 <sect1><title>Block Cipher Algorithm Definitions</title>
817!Pinclude/linux/crypto.h Block Cipher Algorithm Definitions
818!Finclude/linux/crypto.h crypto_alg
819!Finclude/linux/crypto.h ablkcipher_alg
820!Finclude/linux/crypto.h aead_alg
821!Finclude/linux/crypto.h blkcipher_alg
822!Finclude/linux/crypto.h cipher_alg
823!Finclude/linux/crypto.h rng_alg
824 </sect1>
825 <sect1><title>Asynchronous Block Cipher API</title>
826!Pinclude/linux/crypto.h Asynchronous Block Cipher API
827!Finclude/linux/crypto.h crypto_alloc_ablkcipher
828!Finclude/linux/crypto.h crypto_free_ablkcipher
829!Finclude/linux/crypto.h crypto_has_ablkcipher
830!Finclude/linux/crypto.h crypto_ablkcipher_ivsize
831!Finclude/linux/crypto.h crypto_ablkcipher_blocksize
832!Finclude/linux/crypto.h crypto_ablkcipher_setkey
833!Finclude/linux/crypto.h crypto_ablkcipher_reqtfm
834!Finclude/linux/crypto.h crypto_ablkcipher_encrypt
835!Finclude/linux/crypto.h crypto_ablkcipher_decrypt
836 </sect1>
837 <sect1><title>Asynchronous Cipher Request Handle</title>
838!Pinclude/linux/crypto.h Asynchronous Cipher Request Handle
839!Finclude/linux/crypto.h crypto_ablkcipher_reqsize
840!Finclude/linux/crypto.h ablkcipher_request_set_tfm
841!Finclude/linux/crypto.h ablkcipher_request_alloc
842!Finclude/linux/crypto.h ablkcipher_request_free
843!Finclude/linux/crypto.h ablkcipher_request_set_callback
844!Finclude/linux/crypto.h ablkcipher_request_set_crypt
845 </sect1>
846 <sect1><title>Authenticated Encryption With Associated Data (AEAD) Cipher API</title>
847!Pinclude/linux/crypto.h Authenticated Encryption With Associated Data (AEAD) Cipher API
848!Finclude/linux/crypto.h crypto_alloc_aead
849!Finclude/linux/crypto.h crypto_free_aead
850!Finclude/linux/crypto.h crypto_aead_ivsize
851!Finclude/linux/crypto.h crypto_aead_authsize
852!Finclude/linux/crypto.h crypto_aead_blocksize
853!Finclude/linux/crypto.h crypto_aead_setkey
854!Finclude/linux/crypto.h crypto_aead_setauthsize
855!Finclude/linux/crypto.h crypto_aead_encrypt
856!Finclude/linux/crypto.h crypto_aead_decrypt
857 </sect1>
858 <sect1><title>Asynchronous AEAD Request Handle</title>
859!Pinclude/linux/crypto.h Asynchronous AEAD Request Handle
860!Finclude/linux/crypto.h crypto_aead_reqsize
861!Finclude/linux/crypto.h aead_request_set_tfm
862!Finclude/linux/crypto.h aead_request_alloc
863!Finclude/linux/crypto.h aead_request_free
864!Finclude/linux/crypto.h aead_request_set_callback
865!Finclude/linux/crypto.h aead_request_set_crypt
866!Finclude/linux/crypto.h aead_request_set_assoc
867 </sect1>
868 <sect1><title>Synchronous Block Cipher API</title>
869!Pinclude/linux/crypto.h Synchronous Block Cipher API
870!Finclude/linux/crypto.h crypto_alloc_blkcipher
871!Finclude/linux/crypto.h crypto_free_blkcipher
872!Finclude/linux/crypto.h crypto_has_blkcipher
873!Finclude/linux/crypto.h crypto_blkcipher_name
874!Finclude/linux/crypto.h crypto_blkcipher_ivsize
875!Finclude/linux/crypto.h crypto_blkcipher_blocksize
876!Finclude/linux/crypto.h crypto_blkcipher_setkey
877!Finclude/linux/crypto.h crypto_blkcipher_encrypt
878!Finclude/linux/crypto.h crypto_blkcipher_encrypt_iv
879!Finclude/linux/crypto.h crypto_blkcipher_decrypt
880!Finclude/linux/crypto.h crypto_blkcipher_decrypt_iv
881!Finclude/linux/crypto.h crypto_blkcipher_set_iv
882!Finclude/linux/crypto.h crypto_blkcipher_get_iv
883 </sect1>
884 <sect1><title>Single Block Cipher API</title>
885!Pinclude/linux/crypto.h Single Block Cipher API
886!Finclude/linux/crypto.h crypto_alloc_cipher
887!Finclude/linux/crypto.h crypto_free_cipher
888!Finclude/linux/crypto.h crypto_has_cipher
889!Finclude/linux/crypto.h crypto_cipher_blocksize
890!Finclude/linux/crypto.h crypto_cipher_setkey
891!Finclude/linux/crypto.h crypto_cipher_encrypt_one
892!Finclude/linux/crypto.h crypto_cipher_decrypt_one
893 </sect1>
894 <sect1><title>Synchronous Message Digest API</title>
895!Pinclude/linux/crypto.h Synchronous Message Digest API
896!Finclude/linux/crypto.h crypto_alloc_hash
897!Finclude/linux/crypto.h crypto_free_hash
898!Finclude/linux/crypto.h crypto_has_hash
899!Finclude/linux/crypto.h crypto_hash_blocksize
900!Finclude/linux/crypto.h crypto_hash_digestsize
901!Finclude/linux/crypto.h crypto_hash_init
902!Finclude/linux/crypto.h crypto_hash_update
903!Finclude/linux/crypto.h crypto_hash_final
904!Finclude/linux/crypto.h crypto_hash_digest
905!Finclude/linux/crypto.h crypto_hash_setkey
906 </sect1>
907 <sect1><title>Message Digest Algorithm Definitions</title>
908!Pinclude/crypto/hash.h Message Digest Algorithm Definitions
909!Finclude/crypto/hash.h hash_alg_common
910!Finclude/crypto/hash.h ahash_alg
911!Finclude/crypto/hash.h shash_alg
912 </sect1>
913 <sect1><title>Asynchronous Message Digest API</title>
914!Pinclude/crypto/hash.h Asynchronous Message Digest API
915!Finclude/crypto/hash.h crypto_alloc_ahash
916!Finclude/crypto/hash.h crypto_free_ahash
917!Finclude/crypto/hash.h crypto_ahash_init
918!Finclude/crypto/hash.h crypto_ahash_digestsize
919!Finclude/crypto/hash.h crypto_ahash_reqtfm
920!Finclude/crypto/hash.h crypto_ahash_reqsize
921!Finclude/crypto/hash.h crypto_ahash_setkey
922!Finclude/crypto/hash.h crypto_ahash_finup
923!Finclude/crypto/hash.h crypto_ahash_final
924!Finclude/crypto/hash.h crypto_ahash_digest
925!Finclude/crypto/hash.h crypto_ahash_export
926!Finclude/crypto/hash.h crypto_ahash_import
927 </sect1>
928 <sect1><title>Asynchronous Hash Request Handle</title>
929!Pinclude/crypto/hash.h Asynchronous Hash Request Handle
930!Finclude/crypto/hash.h ahash_request_set_tfm
931!Finclude/crypto/hash.h ahash_request_alloc
932!Finclude/crypto/hash.h ahash_request_free
933!Finclude/crypto/hash.h ahash_request_set_callback
934!Finclude/crypto/hash.h ahash_request_set_crypt
935 </sect1>
936 <sect1><title>Synchronous Message Digest API</title>
937!Pinclude/crypto/hash.h Synchronous Message Digest API
938!Finclude/crypto/hash.h crypto_alloc_shash
939!Finclude/crypto/hash.h crypto_free_shash
940!Finclude/crypto/hash.h crypto_shash_blocksize
941!Finclude/crypto/hash.h crypto_shash_digestsize
942!Finclude/crypto/hash.h crypto_shash_descsize
943!Finclude/crypto/hash.h crypto_shash_setkey
944!Finclude/crypto/hash.h crypto_shash_digest
945!Finclude/crypto/hash.h crypto_shash_export
946!Finclude/crypto/hash.h crypto_shash_import
947!Finclude/crypto/hash.h crypto_shash_init
948!Finclude/crypto/hash.h crypto_shash_update
949!Finclude/crypto/hash.h crypto_shash_final
950!Finclude/crypto/hash.h crypto_shash_finup
951 </sect1>
952 <sect1><title>Crypto API Random Number API</title>
953!Pinclude/crypto/rng.h Random number generator API
954!Finclude/crypto/rng.h crypto_alloc_rng
955!Finclude/crypto/rng.h crypto_rng_alg
956!Finclude/crypto/rng.h crypto_free_rng
957!Finclude/crypto/rng.h crypto_rng_get_bytes
958!Finclude/crypto/rng.h crypto_rng_reset
959!Finclude/crypto/rng.h crypto_rng_seedsize
960!Cinclude/crypto/rng.h
961 </sect1>
962 </chapter>
963
964 <chapter id="Code"><title>Code Examples</title>
965 <sect1><title>Code Example For Asynchronous Block Cipher Operation</title>
966 <programlisting>
967
968struct tcrypt_result {
969 struct completion completion;
970 int err;
971};
972
973/* tie all data structures together */
974struct ablkcipher_def {
975 struct scatterlist sg;
976 struct crypto_ablkcipher *tfm;
977 struct ablkcipher_request *req;
978 struct tcrypt_result result;
979};
980
981/* Callback function */
982static void test_ablkcipher_cb(struct crypto_async_request *req, int error)
983{
984 struct tcrypt_result *result = req-&gt;data;
985
986 if (error == -EINPROGRESS)
987 return;
988 result-&gt;err = error;
989 complete(&amp;result-&gt;completion);
990 pr_info("Encryption finished successfully\n");
991}
992
993/* Perform cipher operation */
994static unsigned int test_ablkcipher_encdec(struct ablkcipher_def *ablk,
995 int enc)
996{
997 int rc = 0;
998
999 if (enc)
1000 rc = crypto_ablkcipher_encrypt(ablk-&gt;req);
1001 else
1002 rc = crypto_ablkcipher_decrypt(ablk-&gt;req);
1003
1004 switch (rc) {
1005 case 0:
1006 break;
1007 case -EINPROGRESS:
1008 case -EBUSY:
1009 rc = wait_for_completion_interruptible(
1010 &amp;ablk-&gt;result.completion);
1011 if (!rc &amp;&amp; !ablk-&gt;result.err) {
1012 reinit_completion(&amp;ablk-&gt;result.completion);
1013 break;
1014 }
1015 default:
1016 pr_info("ablkcipher encrypt returned with %d result %d\n",
1017 rc, ablk-&gt;result.err);
1018 break;
1019 }
1020 init_completion(&amp;ablk-&gt;result.completion);
1021
1022 return rc;
1023}
1024
1025/* Initialize and trigger cipher operation */
1026static int test_ablkcipher(void)
1027{
1028 struct ablkcipher_def ablk;
1029 struct crypto_ablkcipher *ablkcipher = NULL;
1030 struct ablkcipher_request *req = NULL;
1031 char *scratchpad = NULL;
1032 char *ivdata = NULL;
1033 unsigned char key[32];
1034 int ret = -EFAULT;
1035
1036 ablkcipher = crypto_alloc_ablkcipher("cbc-aes-aesni", 0, 0);
1037 if (IS_ERR(ablkcipher)) {
1038 pr_info("could not allocate ablkcipher handle\n");
1039 return PTR_ERR(ablkcipher);
1040 }
1041
1042 req = ablkcipher_request_alloc(ablkcipher, GFP_KERNEL);
1043 if (IS_ERR(req)) {
1044 pr_info("could not allocate request queue\n");
1045 ret = PTR_ERR(req);
1046 goto out;
1047 }
1048
1049 ablkcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
1050 test_ablkcipher_cb,
1051 &amp;ablk.result);
1052
1053 /* AES 256 with random key */
1054 get_random_bytes(&amp;key, 32);
1055 if (crypto_ablkcipher_setkey(ablkcipher, key, 32)) {
1056 pr_info("key could not be set\n");
1057 ret = -EAGAIN;
1058 goto out;
1059 }
1060
1061 /* IV will be random */
1062 ivdata = kmalloc(16, GFP_KERNEL);
1063 if (!ivdata) {
1064 pr_info("could not allocate ivdata\n");
1065 goto out;
1066 }
1067 get_random_bytes(ivdata, 16);
1068
1069 /* Input data will be random */
1070 scratchpad = kmalloc(16, GFP_KERNEL);
1071 if (!scratchpad) {
1072 pr_info("could not allocate scratchpad\n");
1073 goto out;
1074 }
1075 get_random_bytes(scratchpad, 16);
1076
1077 ablk.tfm = ablkcipher;
1078 ablk.req = req;
1079
1080 /* We encrypt one block */
1081 sg_init_one(&amp;ablk.sg, scratchpad, 16);
1082 ablkcipher_request_set_crypt(req, &amp;ablk.sg, &amp;ablk.sg, 16, ivdata);
1083 init_completion(&amp;ablk.result.completion);
1084
1085 /* encrypt data */
1086 ret = test_ablkcipher_encdec(&amp;ablk, 1);
1087 if (ret)
1088 goto out;
1089
1090 pr_info("Encryption triggered successfully\n");
1091
1092out:
1093 if (ablkcipher)
1094 crypto_free_ablkcipher(ablkcipher);
1095 if (req)
1096 ablkcipher_request_free(req);
1097 if (ivdata)
1098 kfree(ivdata);
1099 if (scratchpad)
1100 kfree(scratchpad);
1101 return ret;
1102}
1103 </programlisting>
1104 </sect1>
1105
1106 <sect1><title>Code Example For Synchronous Block Cipher Operation</title>
1107 <programlisting>
1108
1109static int test_blkcipher(void)
1110{
1111 struct crypto_blkcipher *blkcipher = NULL;
1112 char *cipher = "cbc(aes)";
1113 // AES 128
1114 charkey =
1115"\x12\x34\x56\x78\x90\xab\xcd\xef\x12\x34\x56\x78\x90\xab\xcd\xef";
1116 chariv =
1117"\x12\x34\x56\x78\x90\xab\xcd\xef\x12\x34\x56\x78\x90\xab\xcd\xef";
1118 unsigned int ivsize = 0;
1119 char *scratchpad = NULL; // holds plaintext and ciphertext
1120 struct scatterlist sg;
1121 struct blkcipher_desc desc;
1122 int ret = -EFAULT;
1123
1124 blkcipher = crypto_alloc_blkcipher(cipher, 0, 0);
1125 if (IS_ERR(blkcipher)) {
1126 printk("could not allocate blkcipher handle for %s\n", cipher);
1127 return -PTR_ERR(blkcipher);
1128 }
1129
1130 if (crypto_blkcipher_setkey(blkcipher, key, strlen(key))) {
1131 printk("key could not be set\n");
1132 ret = -EAGAIN;
1133 goto out;
1134 }
1135
1136 ivsize = crypto_blkcipher_ivsize(blkcipher);
1137 if (ivsize) {
1138 if (ivsize != strlen(iv))
1139 printk("IV length differs from expected length\n");
1140 crypto_blkcipher_set_iv(blkcipher, iv, ivsize);
1141 }
1142
1143 scratchpad = kmalloc(crypto_blkcipher_blocksize(blkcipher), GFP_KERNEL);
1144 if (!scratchpad) {
1145 printk("could not allocate scratchpad for %s\n", cipher);
1146 goto out;
1147 }
1148 /* get some random data that we want to encrypt */
1149 get_random_bytes(scratchpad, crypto_blkcipher_blocksize(blkcipher));
1150
1151 desc.flags = 0;
1152 desc.tfm = blkcipher;
1153 sg_init_one(&amp;sg, scratchpad, crypto_blkcipher_blocksize(blkcipher));
1154
1155 /* encrypt data in place */
1156 crypto_blkcipher_encrypt(&amp;desc, &amp;sg, &amp;sg,
1157 crypto_blkcipher_blocksize(blkcipher));
1158
1159 /* decrypt data in place
1160 * crypto_blkcipher_decrypt(&amp;desc, &amp;sg, &amp;sg,
1161 */ crypto_blkcipher_blocksize(blkcipher));
1162
1163
1164 printk("Cipher operation completed\n");
1165 return 0;
1166
1167out:
1168 if (blkcipher)
1169 crypto_free_blkcipher(blkcipher);
1170 if (scratchpad)
1171 kzfree(scratchpad);
1172 return ret;
1173}
1174 </programlisting>
1175 </sect1>
1176
1177 <sect1><title>Code Example For Use of Operational State Memory With SHASH</title>
1178 <programlisting>
1179
1180struct sdesc {
1181 struct shash_desc shash;
1182 char ctx[];
1183};
1184
1185static struct sdescinit_sdesc(struct crypto_shash *alg)
1186{
1187 struct sdescsdesc;
1188 int size;
1189
1190 size = sizeof(struct shash_desc) + crypto_shash_descsize(alg);
1191 sdesc = kmalloc(size, GFP_KERNEL);
1192 if (!sdesc)
1193 return ERR_PTR(-ENOMEM);
1194 sdesc-&gt;shash.tfm = alg;
1195 sdesc-&gt;shash.flags = 0x0;
1196 return sdesc;
1197}
1198
1199static int calc_hash(struct crypto_shashalg,
1200 const unsigned chardata, unsigned int datalen,
1201 unsigned chardigest) {
1202 struct sdescsdesc;
1203 int ret;
1204
1205 sdesc = init_sdesc(alg);
1206 if (IS_ERR(sdesc)) {
1207 pr_info("trusted_key: can't alloc %s\n", hash_alg);
1208 return PTR_ERR(sdesc);
1209 }
1210
1211 ret = crypto_shash_digest(&amp;sdesc-&gt;shash, data, datalen, digest);
1212 kfree(sdesc);
1213 return ret;
1214}
1215 </programlisting>
1216 </sect1>
1217
1218 <sect1><title>Code Example For Random Number Generator Usage</title>
1219 <programlisting>
1220
1221static int get_random_numbers(u8 *buf, unsigned int len)
1222{
1223 struct crypto_rngrng = NULL;
1224 chardrbg = "drbg_nopr_sha256"; /* Hash DRBG with SHA-256, no PR */
1225 int ret;
1226
1227 if (!buf || !len) {
1228 pr_debug("No output buffer provided\n");
1229 return -EINVAL;
1230 }
1231
1232 rng = crypto_alloc_rng(drbg, 0, 0);
1233 if (IS_ERR(rng)) {
1234 pr_debug("could not allocate RNG handle for %s\n", drbg);
1235 return -PTR_ERR(rng);
1236 }
1237
1238 ret = crypto_rng_get_bytes(rng, buf, len);
1239 if (ret &lt; 0)
1240 pr_debug("generation of random numbers failed\n");
1241 else if (ret == 0)
1242 pr_debug("RNG returned no data");
1243 else
1244 pr_debug("RNG returned %d bytes of data\n", ret);
1245
1246out:
1247 crypto_free_rng(rng);
1248 return ret;
1249}
1250 </programlisting>
1251 </sect1>
1252 </chapter>
1253 </book>
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index be35bc328b77..4b592ffbafee 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -492,10 +492,10 @@ char *date;</synopsis>
492 <sect2> 492 <sect2>
493 <title>The Translation Table Manager (TTM)</title> 493 <title>The Translation Table Manager (TTM)</title>
494 <para> 494 <para>
495 TTM design background and information belongs here. 495 TTM design background and information belongs here.
496 </para> 496 </para>
497 <sect3> 497 <sect3>
498 <title>TTM initialization</title> 498 <title>TTM initialization</title>
499 <warning><para>This section is outdated.</para></warning> 499 <warning><para>This section is outdated.</para></warning>
500 <para> 500 <para>
501 Drivers wishing to support TTM must fill out a drm_bo_driver 501 Drivers wishing to support TTM must fill out a drm_bo_driver
@@ -503,42 +503,42 @@ char *date;</synopsis>
503 pointers for initializing the TTM, allocating and freeing memory, 503 pointers for initializing the TTM, allocating and freeing memory,
504 waiting for command completion and fence synchronization, and memory 504 waiting for command completion and fence synchronization, and memory
505 migration. See the radeon_ttm.c file for an example of usage. 505 migration. See the radeon_ttm.c file for an example of usage.
506 </para> 506 </para>
507 <para> 507 <para>
508 The ttm_global_reference structure is made up of several fields: 508 The ttm_global_reference structure is made up of several fields:
509 </para> 509 </para>
510 <programlisting> 510 <programlisting>
511 struct ttm_global_reference { 511 struct ttm_global_reference {
512 enum ttm_global_types global_type; 512 enum ttm_global_types global_type;
513 size_t size; 513 size_t size;
514 void *object; 514 void *object;
515 int (*init) (struct ttm_global_reference *); 515 int (*init) (struct ttm_global_reference *);
516 void (*release) (struct ttm_global_reference *); 516 void (*release) (struct ttm_global_reference *);
517 }; 517 };
518 </programlisting> 518 </programlisting>
519 <para> 519 <para>
520 There should be one global reference structure for your memory 520 There should be one global reference structure for your memory
521 manager as a whole, and there will be others for each object 521 manager as a whole, and there will be others for each object
522 created by the memory manager at runtime. Your global TTM should 522 created by the memory manager at runtime. Your global TTM should
523 have a type of TTM_GLOBAL_TTM_MEM. The size field for the global 523 have a type of TTM_GLOBAL_TTM_MEM. The size field for the global
524 object should be sizeof(struct ttm_mem_global), and the init and 524 object should be sizeof(struct ttm_mem_global), and the init and
525 release hooks should point at your driver-specific init and 525 release hooks should point at your driver-specific init and
526 release routines, which probably eventually call 526 release routines, which probably eventually call
527 ttm_mem_global_init and ttm_mem_global_release, respectively. 527 ttm_mem_global_init and ttm_mem_global_release, respectively.
528 </para> 528 </para>
529 <para> 529 <para>
530 Once your global TTM accounting structure is set up and initialized 530 Once your global TTM accounting structure is set up and initialized
531 by calling ttm_global_item_ref() on it, 531 by calling ttm_global_item_ref() on it,
532 you need to create a buffer object TTM to 532 you need to create a buffer object TTM to
533 provide a pool for buffer object allocation by clients and the 533 provide a pool for buffer object allocation by clients and the
534 kernel itself. The type of this object should be TTM_GLOBAL_TTM_BO, 534 kernel itself. The type of this object should be TTM_GLOBAL_TTM_BO,
535 and its size should be sizeof(struct ttm_bo_global). Again, 535 and its size should be sizeof(struct ttm_bo_global). Again,
536 driver-specific init and release functions may be provided, 536 driver-specific init and release functions may be provided,
537 likely eventually calling ttm_bo_global_init() and 537 likely eventually calling ttm_bo_global_init() and
538 ttm_bo_global_release(), respectively. Also, like the previous 538 ttm_bo_global_release(), respectively. Also, like the previous
539 object, ttm_global_item_ref() is used to create an initial reference 539 object, ttm_global_item_ref() is used to create an initial reference
540 count for the TTM, which will call your initialization function. 540 count for the TTM, which will call your initialization function.
541 </para> 541 </para>
542 </sect3> 542 </sect3>
543 </sect2> 543 </sect2>
544 <sect2 id="drm-gem"> 544 <sect2 id="drm-gem">
@@ -566,19 +566,19 @@ char *date;</synopsis>
566 using driver-specific ioctls. 566 using driver-specific ioctls.
567 </para> 567 </para>
568 <para> 568 <para>
569 On a fundamental level, GEM involves several operations: 569 On a fundamental level, GEM involves several operations:
570 <itemizedlist> 570 <itemizedlist>
571 <listitem>Memory allocation and freeing</listitem> 571 <listitem>Memory allocation and freeing</listitem>
572 <listitem>Command execution</listitem> 572 <listitem>Command execution</listitem>
573 <listitem>Aperture management at command execution time</listitem> 573 <listitem>Aperture management at command execution time</listitem>
574 </itemizedlist> 574 </itemizedlist>
575 Buffer object allocation is relatively straightforward and largely 575 Buffer object allocation is relatively straightforward and largely
576 provided by Linux's shmem layer, which provides memory to back each 576 provided by Linux's shmem layer, which provides memory to back each
577 object. 577 object.
578 </para> 578 </para>
579 <para> 579 <para>
580 Device-specific operations, such as command execution, pinning, buffer 580 Device-specific operations, such as command execution, pinning, buffer
581 read &amp; write, mapping, and domain ownership transfers are left to 581 read &amp; write, mapping, and domain ownership transfers are left to
582 driver-specific ioctls. 582 driver-specific ioctls.
583 </para> 583 </para>
584 <sect3> 584 <sect3>
@@ -738,16 +738,16 @@ char *date;</synopsis>
738 respectively. The conversion is handled by the DRM core without any 738 respectively. The conversion is handled by the DRM core without any
739 driver-specific support. 739 driver-specific support.
740 </para> 740 </para>
741 <para> 741 <para>
742 GEM also supports buffer sharing with dma-buf file descriptors through 742 GEM also supports buffer sharing with dma-buf file descriptors through
743 PRIME. GEM-based drivers must use the provided helpers functions to 743 PRIME. GEM-based drivers must use the provided helpers functions to
744 implement the exporting and importing correctly. See <xref linkend="drm-prime-support" />. 744 implement the exporting and importing correctly. See <xref linkend="drm-prime-support" />.
745 Since sharing file descriptors is inherently more secure than the 745 Since sharing file descriptors is inherently more secure than the
746 easily guessable and global GEM names it is the preferred buffer 746 easily guessable and global GEM names it is the preferred buffer
747 sharing mechanism. Sharing buffers through GEM names is only supported 747 sharing mechanism. Sharing buffers through GEM names is only supported
748 for legacy userspace. Furthermore PRIME also allows cross-device 748 for legacy userspace. Furthermore PRIME also allows cross-device
749 buffer sharing since it is based on dma-bufs. 749 buffer sharing since it is based on dma-bufs.
750 </para> 750 </para>
751 </sect3> 751 </sect3>
752 <sect3 id="drm-gem-objects-mapping"> 752 <sect3 id="drm-gem-objects-mapping">
753 <title>GEM Objects Mapping</title> 753 <title>GEM Objects Mapping</title>
@@ -852,7 +852,7 @@ char *date;</synopsis>
852 <sect3> 852 <sect3>
853 <title>Command Execution</title> 853 <title>Command Execution</title>
854 <para> 854 <para>
855 Perhaps the most important GEM function for GPU devices is providing a 855 Perhaps the most important GEM function for GPU devices is providing a
856 command execution interface to clients. Client programs construct 856 command execution interface to clients. Client programs construct
857 command buffers containing references to previously allocated memory 857 command buffers containing references to previously allocated memory
858 objects, and then submit them to GEM. At that point, GEM takes care to 858 objects, and then submit them to GEM. At that point, GEM takes care to
@@ -874,95 +874,101 @@ char *date;</synopsis>
874 <title>GEM Function Reference</title> 874 <title>GEM Function Reference</title>
875!Edrivers/gpu/drm/drm_gem.c 875!Edrivers/gpu/drm/drm_gem.c
876 </sect3> 876 </sect3>
877 </sect2> 877 </sect2>
878 <sect2> 878 <sect2>
879 <title>VMA Offset Manager</title> 879 <title>VMA Offset Manager</title>
880!Pdrivers/gpu/drm/drm_vma_manager.c vma offset manager 880!Pdrivers/gpu/drm/drm_vma_manager.c vma offset manager
881!Edrivers/gpu/drm/drm_vma_manager.c 881!Edrivers/gpu/drm/drm_vma_manager.c
882!Iinclude/drm/drm_vma_manager.h 882!Iinclude/drm/drm_vma_manager.h
883 </sect2> 883 </sect2>
884 <sect2 id="drm-prime-support"> 884 <sect2 id="drm-prime-support">
885 <title>PRIME Buffer Sharing</title> 885 <title>PRIME Buffer Sharing</title>
886 <para> 886 <para>
887 PRIME is the cross device buffer sharing framework in drm, originally 887 PRIME is the cross device buffer sharing framework in drm, originally
888 created for the OPTIMUS range of multi-gpu platforms. To userspace 888 created for the OPTIMUS range of multi-gpu platforms. To userspace
889 PRIME buffers are dma-buf based file descriptors. 889 PRIME buffers are dma-buf based file descriptors.
890 </para> 890 </para>
891 <sect3> 891 <sect3>
892 <title>Overview and Driver Interface</title> 892 <title>Overview and Driver Interface</title>
893 <para> 893 <para>
894 Similar to GEM global names, PRIME file descriptors are 894 Similar to GEM global names, PRIME file descriptors are
895 also used to share buffer objects across processes. They offer 895 also used to share buffer objects across processes. They offer
896 additional security: as file descriptors must be explicitly sent over 896 additional security: as file descriptors must be explicitly sent over
897 UNIX domain sockets to be shared between applications, they can't be 897 UNIX domain sockets to be shared between applications, they can't be
898 guessed like the globally unique GEM names. 898 guessed like the globally unique GEM names.
899 </para> 899 </para>
900 <para> 900 <para>
901 Drivers that support the PRIME 901 Drivers that support the PRIME
902 API must set the DRIVER_PRIME bit in the struct 902 API must set the DRIVER_PRIME bit in the struct
903 <structname>drm_driver</structname> 903 <structname>drm_driver</structname>
904 <structfield>driver_features</structfield> field, and implement the 904 <structfield>driver_features</structfield> field, and implement the
905 <methodname>prime_handle_to_fd</methodname> and 905 <methodname>prime_handle_to_fd</methodname> and
906 <methodname>prime_fd_to_handle</methodname> operations. 906 <methodname>prime_fd_to_handle</methodname> operations.
907 </para> 907 </para>
908 <para> 908 <para>
909 <synopsis>int (*prime_handle_to_fd)(struct drm_device *dev, 909 <synopsis>int (*prime_handle_to_fd)(struct drm_device *dev,
910 struct drm_file *file_priv, uint32_t handle, 910 struct drm_file *file_priv, uint32_t handle,
911 uint32_t flags, int *prime_fd); 911 uint32_t flags, int *prime_fd);
912int (*prime_fd_to_handle)(struct drm_device *dev, 912int (*prime_fd_to_handle)(struct drm_device *dev,
913 struct drm_file *file_priv, int prime_fd, 913 struct drm_file *file_priv, int prime_fd,
914 uint32_t *handle);</synopsis> 914 uint32_t *handle);</synopsis>
915 Those two operations convert a handle to a PRIME file descriptor and 915 Those two operations convert a handle to a PRIME file descriptor and
916 vice versa. Drivers must use the kernel dma-buf buffer sharing framework 916 vice versa. Drivers must use the kernel dma-buf buffer sharing framework
917 to manage the PRIME file descriptors. Similar to the mode setting 917 to manage the PRIME file descriptors. Similar to the mode setting
918 API PRIME is agnostic to the underlying buffer object manager, as 918 API PRIME is agnostic to the underlying buffer object manager, as
919 long as handles are 32bit unsigned integers. 919 long as handles are 32bit unsigned integers.
920 </para> 920 </para>
921 <para> 921 <para>
922 While non-GEM drivers must implement the operations themselves, GEM 922 While non-GEM drivers must implement the operations themselves, GEM
923 drivers must use the <function>drm_gem_prime_handle_to_fd</function> 923 drivers must use the <function>drm_gem_prime_handle_to_fd</function>
924 and <function>drm_gem_prime_fd_to_handle</function> helper functions. 924 and <function>drm_gem_prime_fd_to_handle</function> helper functions.
925 Those helpers rely on the driver 925 Those helpers rely on the driver
926 <methodname>gem_prime_export</methodname> and 926 <methodname>gem_prime_export</methodname> and
927 <methodname>gem_prime_import</methodname> operations to create a dma-buf 927 <methodname>gem_prime_import</methodname> operations to create a dma-buf
928 instance from a GEM object (dma-buf exporter role) and to create a GEM 928 instance from a GEM object (dma-buf exporter role) and to create a GEM
929 object from a dma-buf instance (dma-buf importer role). 929 object from a dma-buf instance (dma-buf importer role).
930 </para> 930 </para>
931 <para> 931 <para>
932 <synopsis>struct dma_buf * (*gem_prime_export)(struct drm_device *dev, 932 <synopsis>struct dma_buf * (*gem_prime_export)(struct drm_device *dev,
933 struct drm_gem_object *obj, 933 struct drm_gem_object *obj,
934 int flags); 934 int flags);
935struct drm_gem_object * (*gem_prime_import)(struct drm_device *dev, 935struct drm_gem_object * (*gem_prime_import)(struct drm_device *dev,
936 struct dma_buf *dma_buf);</synopsis> 936 struct dma_buf *dma_buf);</synopsis>
937 These two operations are mandatory for GEM drivers that support 937 These two operations are mandatory for GEM drivers that support
938 PRIME. 938 PRIME.
939 </para> 939 </para>
940 </sect3>
941 <sect3>
942 <title>PRIME Helper Functions</title>
943!Pdrivers/gpu/drm/drm_prime.c PRIME Helpers
944 </sect3> 940 </sect3>
945 </sect2> 941 <sect3>
946 <sect2> 942 <title>PRIME Helper Functions</title>
947 <title>PRIME Function References</title> 943!Pdrivers/gpu/drm/drm_prime.c PRIME Helpers
944 </sect3>
945 </sect2>
946 <sect2>
947 <title>PRIME Function References</title>
948!Edrivers/gpu/drm/drm_prime.c 948!Edrivers/gpu/drm/drm_prime.c
949 </sect2> 949 </sect2>
950 <sect2> 950 <sect2>
951 <title>DRM MM Range Allocator</title> 951 <title>DRM MM Range Allocator</title>
952 <sect3> 952 <sect3>
953 <title>Overview</title> 953 <title>Overview</title>
954!Pdrivers/gpu/drm/drm_mm.c Overview 954!Pdrivers/gpu/drm/drm_mm.c Overview
955 </sect3> 955 </sect3>
956 <sect3> 956 <sect3>
957 <title>LRU Scan/Eviction Support</title> 957 <title>LRU Scan/Eviction Support</title>
958!Pdrivers/gpu/drm/drm_mm.c lru scan roaster 958!Pdrivers/gpu/drm/drm_mm.c lru scan roaster
959 </sect3> 959 </sect3>
960 </sect2> 960 </sect2>
961 <sect2> 961 <sect2>
962 <title>DRM MM Range Allocator Function References</title> 962 <title>DRM MM Range Allocator Function References</title>
963!Edrivers/gpu/drm/drm_mm.c 963!Edrivers/gpu/drm/drm_mm.c
964!Iinclude/drm/drm_mm.h 964!Iinclude/drm/drm_mm.h
965 </sect2> 965 </sect2>
966 <sect2>
967 <title>CMA Helper Functions Reference</title>
968!Pdrivers/gpu/drm/drm_gem_cma_helper.c cma helpers
969!Edrivers/gpu/drm/drm_gem_cma_helper.c
970!Iinclude/drm/drm_gem_cma_helper.h
971 </sect2>
966 </sect1> 972 </sect1>
967 973
968 <!-- Internals: mode setting --> 974 <!-- Internals: mode setting -->
@@ -996,6 +1002,10 @@ int max_width, max_height;</synopsis>
996!Edrivers/gpu/drm/drm_modes.c 1002!Edrivers/gpu/drm/drm_modes.c
997 </sect2> 1003 </sect2>
998 <sect2> 1004 <sect2>
1005 <title>Atomic Mode Setting Function Reference</title>
1006!Edrivers/gpu/drm/drm_atomic.c
1007 </sect2>
1008 <sect2>
999 <title>Frame Buffer Creation</title> 1009 <title>Frame Buffer Creation</title>
1000 <synopsis>struct drm_framebuffer *(*fb_create)(struct drm_device *dev, 1010 <synopsis>struct drm_framebuffer *(*fb_create)(struct drm_device *dev,
1001 struct drm_file *file_priv, 1011 struct drm_file *file_priv,
@@ -1827,6 +1837,10 @@ void intel_crt_init(struct drm_device *dev)
1827!Edrivers/gpu/drm/drm_crtc.c 1837!Edrivers/gpu/drm/drm_crtc.c
1828 </sect2> 1838 </sect2>
1829 <sect2> 1839 <sect2>
1840 <title>KMS Data Structures</title>
1841!Iinclude/drm/drm_crtc.h
1842 </sect2>
1843 <sect2>
1830 <title>KMS Locking</title> 1844 <title>KMS Locking</title>
1831!Pdrivers/gpu/drm/drm_modeset_lock.c kms locking 1845!Pdrivers/gpu/drm/drm_modeset_lock.c kms locking
1832!Iinclude/drm/drm_modeset_lock.h 1846!Iinclude/drm/drm_modeset_lock.h
@@ -1933,10 +1947,16 @@ void intel_crt_init(struct drm_device *dev)
1933 and then retrieves a list of modes by calling the connector 1947 and then retrieves a list of modes by calling the connector
1934 <methodname>get_modes</methodname> helper operation. 1948 <methodname>get_modes</methodname> helper operation.
1935 </para> 1949 </para>
1950 <para>
1951 If the helper operation returns no mode, and if the connector status
1952 is connector_status_connected, standard VESA DMT modes up to
1953 1024x768 are automatically added to the modes list by a call to
1954 <function>drm_add_modes_noedid</function>.
1955 </para>
1936 <para> 1956 <para>
1937 The function filters out modes larger than 1957 The function then filters out modes larger than
1938 <parameter>max_width</parameter> and <parameter>max_height</parameter> 1958 <parameter>max_width</parameter> and <parameter>max_height</parameter>
1939 if specified. It then calls the optional connector 1959 if specified. It finally calls the optional connector
1940 <methodname>mode_valid</methodname> helper operation for each mode in 1960 <methodname>mode_valid</methodname> helper operation for each mode in
1941 the probed list to check whether the mode is valid for the connector. 1961 the probed list to check whether the mode is valid for the connector.
1942 </para> 1962 </para>
@@ -2076,12 +2096,20 @@ void intel_crt_init(struct drm_device *dev)
2076 <synopsis>int (*get_modes)(struct drm_connector *connector);</synopsis> 2096 <synopsis>int (*get_modes)(struct drm_connector *connector);</synopsis>
2077 <para> 2097 <para>
2078 Fill the connector's <structfield>probed_modes</structfield> list 2098 Fill the connector's <structfield>probed_modes</structfield> list
2079 by parsing EDID data with <function>drm_add_edid_modes</function> or 2099 by parsing EDID data with <function>drm_add_edid_modes</function>,
2080 calling <function>drm_mode_probed_add</function> directly for every 2100 adding standard VESA DMT modes with <function>drm_add_modes_noedid</function>,
2101 or calling <function>drm_mode_probed_add</function> directly for every
2081 supported mode and return the number of modes it has detected. This 2102 supported mode and return the number of modes it has detected. This
2082 operation is mandatory. 2103 operation is mandatory.
2083 </para> 2104 </para>
2084 <para> 2105 <para>
2106 Note that the caller function will automatically add standard VESA
2107 DMT modes up to 1024x768 if the <methodname>get_modes</methodname>
2108 helper operation returns no mode and if the connector status is
2109 connector_status_connected. There is no need to call
2110 <function>drm_add_edid_modes</function> manually in that case.
2111 </para>
2112 <para>
2085 When adding modes manually the driver creates each mode with a call to 2113 When adding modes manually the driver creates each mode with a call to
2086 <function>drm_mode_create</function> and must fill the following fields. 2114 <function>drm_mode_create</function> and must fill the following fields.
2087 <itemizedlist> 2115 <itemizedlist>
@@ -2278,7 +2306,7 @@ void intel_crt_init(struct drm_device *dev)
2278 <function>drm_helper_probe_single_connector_modes</function>. 2306 <function>drm_helper_probe_single_connector_modes</function>.
2279 </para> 2307 </para>
2280 <para> 2308 <para>
2281 When parsing EDID data, <function>drm_add_edid_modes</function> fill the 2309 When parsing EDID data, <function>drm_add_edid_modes</function> fills the
2282 connector <structfield>display_info</structfield> 2310 connector <structfield>display_info</structfield>
2283 <structfield>width_mm</structfield> and 2311 <structfield>width_mm</structfield> and
2284 <structfield>height_mm</structfield> fields. When creating modes 2312 <structfield>height_mm</structfield> fields. When creating modes
@@ -2316,8 +2344,26 @@ void intel_crt_init(struct drm_device *dev)
2316 </itemizedlist> 2344 </itemizedlist>
2317 </sect2> 2345 </sect2>
2318 <sect2> 2346 <sect2>
2347 <title>Atomic Modeset Helper Functions Reference</title>
2348 <sect3>
2349 <title>Overview</title>
2350!Pdrivers/gpu/drm/drm_atomic_helper.c overview
2351 </sect3>
2352 <sect3>
2353 <title>Implementing Asynchronous Atomic Commit</title>
2354!Pdrivers/gpu/drm/drm_atomic_helper.c implementing async commit
2355 </sect3>
2356 <sect3>
2357 <title>Atomic State Reset and Initialization</title>
2358!Pdrivers/gpu/drm/drm_atomic_helper.c atomic state reset and initialization
2359 </sect3>
2360!Iinclude/drm/drm_atomic_helper.h
2361!Edrivers/gpu/drm/drm_atomic_helper.c
2362 </sect2>
2363 <sect2>
2319 <title>Modeset Helper Functions Reference</title> 2364 <title>Modeset Helper Functions Reference</title>
2320!Edrivers/gpu/drm/drm_crtc_helper.c 2365!Edrivers/gpu/drm/drm_crtc_helper.c
2366!Pdrivers/gpu/drm/drm_crtc_helper.c overview
2321 </sect2> 2367 </sect2>
2322 <sect2> 2368 <sect2>
2323 <title>Output Probing Helper Functions Reference</title> 2369 <title>Output Probing Helper Functions Reference</title>
@@ -2343,6 +2389,12 @@ void intel_crt_init(struct drm_device *dev)
2343!Edrivers/gpu/drm/drm_dp_mst_topology.c 2389!Edrivers/gpu/drm/drm_dp_mst_topology.c
2344 </sect2> 2390 </sect2>
2345 <sect2> 2391 <sect2>
2392 <title>MIPI DSI Helper Functions Reference</title>
2393!Pdrivers/gpu/drm/drm_mipi_dsi.c dsi helpers
2394!Iinclude/drm/drm_mipi_dsi.h
2395!Edrivers/gpu/drm/drm_mipi_dsi.c
2396 </sect2>
2397 <sect2>
2346 <title>EDID Helper Functions Reference</title> 2398 <title>EDID Helper Functions Reference</title>
2347!Edrivers/gpu/drm/drm_edid.c 2399!Edrivers/gpu/drm/drm_edid.c
2348 </sect2> 2400 </sect2>
@@ -2371,7 +2423,12 @@ void intel_crt_init(struct drm_device *dev)
2371 </sect2> 2423 </sect2>
2372 <sect2> 2424 <sect2>
2373 <title id="drm-kms-planehelpers">Plane Helper Reference</title> 2425 <title id="drm-kms-planehelpers">Plane Helper Reference</title>
2374!Edrivers/gpu/drm/drm_plane_helper.c Plane Helpers 2426!Edrivers/gpu/drm/drm_plane_helper.c
2427!Pdrivers/gpu/drm/drm_plane_helper.c overview
2428 </sect2>
2429 <sect2>
2430 <title>Tile group</title>
2431!Pdrivers/gpu/drm/drm_crtc.c Tile group
2375 </sect2> 2432 </sect2>
2376 </sect1> 2433 </sect1>
2377 2434
@@ -2507,8 +2564,8 @@ void intel_crt_init(struct drm_device *dev)
2507 <td valign="top" >Description/Restrictions</td> 2564 <td valign="top" >Description/Restrictions</td>
2508 </tr> 2565 </tr>
2509 <tr> 2566 <tr>
2510 <td rowspan="21" valign="top" >DRM</td> 2567 <td rowspan="25" valign="top" >DRM</td>
2511 <td rowspan="2" valign="top" >Generic</td> 2568 <td rowspan="4" valign="top" >Generic</td>
2512 <td valign="top" >“EDID”</td> 2569 <td valign="top" >“EDID”</td>
2513 <td valign="top" >BLOB | IMMUTABLE</td> 2570 <td valign="top" >BLOB | IMMUTABLE</td>
2514 <td valign="top" >0</td> 2571 <td valign="top" >0</td>
@@ -2523,6 +2580,20 @@ void intel_crt_init(struct drm_device *dev)
2523 <td valign="top" >Contains DPMS operation mode value.</td> 2580 <td valign="top" >Contains DPMS operation mode value.</td>
2524 </tr> 2581 </tr>
2525 <tr> 2582 <tr>
2583 <td valign="top" >“PATH”</td>
2584 <td valign="top" >BLOB | IMMUTABLE</td>
2585 <td valign="top" >0</td>
2586 <td valign="top" >Connector</td>
2587 <td valign="top" >Contains topology path to a connector.</td>
2588 </tr>
2589 <tr>
2590 <td valign="top" >“TILE”</td>
2591 <td valign="top" >BLOB | IMMUTABLE</td>
2592 <td valign="top" >0</td>
2593 <td valign="top" >Connector</td>
2594 <td valign="top" >Contains tiling information for a connector.</td>
2595 </tr>
2596 <tr>
2526 <td rowspan="1" valign="top" >Plane</td> 2597 <td rowspan="1" valign="top" >Plane</td>
2527 <td valign="top" >“type”</td> 2598 <td valign="top" >“type”</td>
2528 <td valign="top" >ENUM | IMMUTABLE</td> 2599 <td valign="top" >ENUM | IMMUTABLE</td>
@@ -2638,6 +2709,21 @@ void intel_crt_init(struct drm_device *dev)
2638 <td valign="top" >TBD</td> 2709 <td valign="top" >TBD</td>
2639 </tr> 2710 </tr>
2640 <tr> 2711 <tr>
2712 <td rowspan="2" valign="top" >Virtual GPU</td>
2713 <td valign="top" >“suggested X”</td>
2714 <td valign="top" >RANGE</td>
2715 <td valign="top" >Min=0, Max=0xffffffff</td>
2716 <td valign="top" >Connector</td>
2717 <td valign="top" >property to suggest an X offset for a connector</td>
2718 </tr>
2719 <tr>
2720 <td valign="top" >“suggested Y”</td>
2721 <td valign="top" >RANGE</td>
2722 <td valign="top" >Min=0, Max=0xffffffff</td>
2723 <td valign="top" >Connector</td>
2724 <td valign="top" >property to suggest an Y offset for a connector</td>
2725 </tr>
2726 <tr>
2641 <td rowspan="3" valign="top" >Optional</td> 2727 <td rowspan="3" valign="top" >Optional</td>
2642 <td valign="top" >“scaling mode”</td> 2728 <td valign="top" >“scaling mode”</td>
2643 <td valign="top" >ENUM</td> 2729 <td valign="top" >ENUM</td>
@@ -3788,6 +3874,26 @@ int num_ioctls;</synopsis>
3788 those have basic support through the gma500 drm driver. 3874 those have basic support through the gma500 drm driver.
3789 </para> 3875 </para>
3790 <sect1> 3876 <sect1>
3877 <title>Core Driver Infrastructure</title>
3878 <para>
3879 This section covers core driver infrastructure used by both the display
3880 and the GEM parts of the driver.
3881 </para>
3882 <sect2>
3883 <title>Runtime Power Management</title>
3884!Pdrivers/gpu/drm/i915/intel_runtime_pm.c runtime pm
3885!Idrivers/gpu/drm/i915/intel_runtime_pm.c
3886 </sect2>
3887 <sect2>
3888 <title>Interrupt Handling</title>
3889!Pdrivers/gpu/drm/i915/i915_irq.c interrupt handling
3890!Fdrivers/gpu/drm/i915/i915_irq.c intel_irq_init intel_irq_init_hw intel_hpd_init
3891!Fdrivers/gpu/drm/i915/i915_irq.c intel_irq_fini
3892!Fdrivers/gpu/drm/i915/i915_irq.c intel_runtime_pm_disable_interrupts
3893!Fdrivers/gpu/drm/i915/i915_irq.c intel_runtime_pm_enable_interrupts
3894 </sect2>
3895 </sect1>
3896 <sect1>
3791 <title>Display Hardware Handling</title> 3897 <title>Display Hardware Handling</title>
3792 <para> 3898 <para>
3793 This section covers everything related to the display hardware including 3899 This section covers everything related to the display hardware including
@@ -3804,6 +3910,18 @@ int num_ioctls;</synopsis>
3804 </para> 3910 </para>
3805 </sect2> 3911 </sect2>
3806 <sect2> 3912 <sect2>
3913 <title>Frontbuffer Tracking</title>
3914!Pdrivers/gpu/drm/i915/intel_frontbuffer.c frontbuffer tracking
3915!Idrivers/gpu/drm/i915/intel_frontbuffer.c
3916!Fdrivers/gpu/drm/i915/intel_drv.h intel_frontbuffer_flip
3917!Fdrivers/gpu/drm/i915/i915_gem.c i915_gem_track_fb
3918 </sect2>
3919 <sect2>
3920 <title>Display FIFO Underrun Reporting</title>
3921!Pdrivers/gpu/drm/i915/intel_fifo_underrun.c fifo underrun handling
3922!Idrivers/gpu/drm/i915/intel_fifo_underrun.c
3923 </sect2>
3924 <sect2>
3807 <title>Plane Configuration</title> 3925 <title>Plane Configuration</title>
3808 <para> 3926 <para>
3809 This section covers plane configuration and composition with the 3927 This section covers plane configuration and composition with the
@@ -3823,6 +3941,16 @@ int num_ioctls;</synopsis>
3823 </para> 3941 </para>
3824 </sect2> 3942 </sect2>
3825 <sect2> 3943 <sect2>
3944 <title>High Definition Audio</title>
3945!Pdrivers/gpu/drm/i915/intel_audio.c High Definition Audio over HDMI and Display Port
3946!Idrivers/gpu/drm/i915/intel_audio.c
3947 </sect2>
3948 <sect2>
3949 <title>Panel Self Refresh PSR (PSR/SRD)</title>
3950!Pdrivers/gpu/drm/i915/intel_psr.c Panel Self Refresh (PSR/SRD)
3951!Idrivers/gpu/drm/i915/intel_psr.c
3952 </sect2>
3953 <sect2>
3826 <title>DPIO</title> 3954 <title>DPIO</title>
3827!Pdrivers/gpu/drm/i915/i915_reg.h DPIO 3955!Pdrivers/gpu/drm/i915/i915_reg.h DPIO
3828 <table id="dpiox2"> 3956 <table id="dpiox2">
@@ -3931,6 +4059,28 @@ int num_ioctls;</synopsis>
3931!Idrivers/gpu/drm/i915/intel_lrc.c 4059!Idrivers/gpu/drm/i915/intel_lrc.c
3932 </sect2> 4060 </sect2>
3933 </sect1> 4061 </sect1>
4062
4063 <sect1>
4064 <title> Tracing </title>
4065 <para>
4066 This sections covers all things related to the tracepoints implemented in
4067 the i915 driver.
4068 </para>
4069 <sect2>
4070 <title> i915_ppgtt_create and i915_ppgtt_release </title>
4071!Pdrivers/gpu/drm/i915/i915_trace.h i915_ppgtt_create and i915_ppgtt_release tracepoints
4072 </sect2>
4073 <sect2>
4074 <title> i915_context_create and i915_context_free </title>
4075!Pdrivers/gpu/drm/i915/i915_trace.h i915_context_create and i915_context_free tracepoints
4076 </sect2>
4077 <sect2>
4078 <title> switch_mm </title>
4079!Pdrivers/gpu/drm/i915/i915_trace.h switch_mm tracepoint
4080 </sect2>
4081 </sect1>
4082
3934 </chapter> 4083 </chapter>
4084!Cdrivers/gpu/drm/i915/i915_irq.c
3935</part> 4085</part>
3936</book> 4086</book>
diff --git a/Documentation/DocBook/media/dvb/dvbproperty.xml b/Documentation/DocBook/media/dvb/dvbproperty.xml
index 948ddaab592e..3018564ddfd9 100644
--- a/Documentation/DocBook/media/dvb/dvbproperty.xml
+++ b/Documentation/DocBook/media/dvb/dvbproperty.xml
@@ -120,8 +120,8 @@ struct dtv_properties {
120</para> 120</para>
121<informaltable><tgroup cols="1"><tbody><row><entry 121<informaltable><tgroup cols="1"><tbody><row><entry
122 align="char"> 122 align="char">
123<para>This ioctl call sets one or more frontend properties. This call only 123<para>This ioctl call sets one or more frontend properties. This call
124 requires read-only access to the device.</para> 124 requires read/write access to the device.</para>
125</entry> 125</entry>
126 </row></tbody></tgroup></informaltable> 126 </row></tbody></tgroup></informaltable>
127<para>SYNOPSIS 127<para>SYNOPSIS
diff --git a/Documentation/DocBook/media/v4l/biblio.xml b/Documentation/DocBook/media/v4l/biblio.xml
index d2eb79e41a01..7ff01a23c2fe 100644
--- a/Documentation/DocBook/media/v4l/biblio.xml
+++ b/Documentation/DocBook/media/v4l/biblio.xml
@@ -178,6 +178,75 @@ Signal - NTSC for Studio Applications"</title>
1781125-Line High-Definition Production"</title> 1781125-Line High-Definition Production"</title>
179 </biblioentry> 179 </biblioentry>
180 180
181 <biblioentry id="srgb">
182 <abbrev>sRGB</abbrev>
183 <authorgroup>
184 <corpauthor>International Electrotechnical Commission
185(<ulink url="http://www.iec.ch">http://www.iec.ch</ulink>)</corpauthor>
186 </authorgroup>
187 <title>IEC 61966-2-1 ed1.0 "Multimedia systems and equipment - Colour measurement
188and management - Part 2-1: Colour management - Default RGB colour space - sRGB"</title>
189 </biblioentry>
190
191 <biblioentry id="sycc">
192 <abbrev>sYCC</abbrev>
193 <authorgroup>
194 <corpauthor>International Electrotechnical Commission
195(<ulink url="http://www.iec.ch">http://www.iec.ch</ulink>)</corpauthor>
196 </authorgroup>
197 <title>IEC 61966-2-1-am1 ed1.0 "Amendment 1 - Multimedia systems and equipment - Colour measurement
198and management - Part 2-1: Colour management - Default RGB colour space - sRGB"</title>
199 </biblioentry>
200
201 <biblioentry id="xvycc">
202 <abbrev>xvYCC</abbrev>
203 <authorgroup>
204 <corpauthor>International Electrotechnical Commission
205(<ulink url="http://www.iec.ch">http://www.iec.ch</ulink>)</corpauthor>
206 </authorgroup>
207 <title>IEC 61966-2-4 ed1.0 "Multimedia systems and equipment - Colour measurement
208and management - Part 2-4: Colour management - Extended-gamut YCC colour space for video
209applications - xvYCC"</title>
210 </biblioentry>
211
212 <biblioentry id="adobergb">
213 <abbrev>AdobeRGB</abbrev>
214 <authorgroup>
215 <corpauthor>Adobe Systems Incorporated (<ulink url="http://www.adobe.com">http://www.adobe.com</ulink>)</corpauthor>
216 </authorgroup>
217 <title>Adobe&copy; RGB (1998) Color Image Encoding Version 2005-05</title>
218 </biblioentry>
219
220 <biblioentry id="oprgb">
221 <abbrev>opRGB</abbrev>
222 <authorgroup>
223 <corpauthor>International Electrotechnical Commission
224(<ulink url="http://www.iec.ch">http://www.iec.ch</ulink>)</corpauthor>
225 </authorgroup>
226 <title>IEC 61966-2-5 "Multimedia systems and equipment - Colour measurement
227and management - Part 2-5: Colour management - Optional RGB colour space - opRGB"</title>
228 </biblioentry>
229
230 <biblioentry id="itu2020">
231 <abbrev>ITU&nbsp;BT.2020</abbrev>
232 <authorgroup>
233 <corpauthor>International Telecommunication Union (<ulink
234url="http://www.itu.ch">http://www.itu.ch</ulink>)</corpauthor>
235 </authorgroup>
236 <title>ITU-R Recommendation BT.2020 (08/2012) "Parameter values for ultra-high
237definition television systems for production and international programme exchange"
238</title>
239 </biblioentry>
240
241 <biblioentry id="tech3213">
242 <abbrev>EBU&nbsp;Tech&nbsp;3213</abbrev>
243 <authorgroup>
244 <corpauthor>European Broadcast Union (<ulink
245url="http://www.ebu.ch">http://www.ebu.ch</ulink>)</corpauthor>
246 </authorgroup>
247 <title>E.B.U. Standard for Chromaticity Tolerances for Studio Monitors"</title>
248 </biblioentry>
249
181 <biblioentry id="iec62106"> 250 <biblioentry id="iec62106">
182 <abbrev>IEC&nbsp;62106</abbrev> 251 <abbrev>IEC&nbsp;62106</abbrev>
183 <authorgroup> 252 <authorgroup>
@@ -266,4 +335,20 @@ in the frequency range from 87,5 to 108,0 MHz</title>
266 <subtitle>Version 1, Revision 2</subtitle> 335 <subtitle>Version 1, Revision 2</subtitle>
267 </biblioentry> 336 </biblioentry>
268 337
338 <biblioentry id="poynton">
339 <abbrev>poynton</abbrev>
340 <authorgroup>
341 <corpauthor>Charles Poynton</corpauthor>
342 </authorgroup>
343 <title>Digital Video and HDTV, Algorithms and Interfaces</title>
344 </biblioentry>
345
346 <biblioentry id="colimg">
347 <abbrev>colimg</abbrev>
348 <authorgroup>
349 <corpauthor>Erik Reinhard et al.</corpauthor>
350 </authorgroup>
351 <title>Color Imaging: Fundamentals and Applications</title>
352 </biblioentry>
353
269 </bibliography> 354 </bibliography>
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml
index 0a2debfa68f6..350dfb3d71ea 100644
--- a/Documentation/DocBook/media/v4l/compat.xml
+++ b/Documentation/DocBook/media/v4l/compat.xml
@@ -2579,6 +2579,18 @@ fields changed from _s32 to _u32.
2579 </orderedlist> 2579 </orderedlist>
2580 </section> 2580 </section>
2581 2581
2582 <section>
2583 <title>V4L2 in Linux 3.19</title>
2584 <orderedlist>
2585 <listitem>
2586 <para>Rewrote Colorspace chapter, added new &v4l2-ycbcr-encoding;
2587and &v4l2-quantization; fields to &v4l2-pix-format;, &v4l2-pix-format-mplane;
2588and &v4l2-mbus-framefmt;.
2589 </para>
2590 </listitem>
2591 </orderedlist>
2592 </section>
2593
2582 <section id="other"> 2594 <section id="other">
2583 <title>Relation of V4L2 to other Linux multimedia APIs</title> 2595 <title>Relation of V4L2 to other Linux multimedia APIs</title>
2584 2596
diff --git a/Documentation/DocBook/media/v4l/dev-subdev.xml b/Documentation/DocBook/media/v4l/dev-subdev.xml
index d15aaf83f56f..4f0ba58c9bd9 100644
--- a/Documentation/DocBook/media/v4l/dev-subdev.xml
+++ b/Documentation/DocBook/media/v4l/dev-subdev.xml
@@ -195,53 +195,59 @@
195 <title>Sample Pipeline Configuration</title> 195 <title>Sample Pipeline Configuration</title>
196 <tgroup cols="3"> 196 <tgroup cols="3">
197 <colspec colname="what"/> 197 <colspec colname="what"/>
198 <colspec colname="sensor-0" /> 198 <colspec colname="sensor-0 format" />
199 <colspec colname="frontend-0" /> 199 <colspec colname="frontend-0 format" />
200 <colspec colname="frontend-1" /> 200 <colspec colname="frontend-1 format" />
201 <colspec colname="scaler-0" /> 201 <colspec colname="scaler-0 format" />
202 <colspec colname="scaler-1" /> 202 <colspec colname="scaler-0 compose" />
203 <colspec colname="scaler-1 format" />
203 <thead> 204 <thead>
204 <row> 205 <row>
205 <entry></entry> 206 <entry></entry>
206 <entry>Sensor/0</entry> 207 <entry>Sensor/0 format</entry>
207 <entry>Frontend/0</entry> 208 <entry>Frontend/0 format</entry>
208 <entry>Frontend/1</entry> 209 <entry>Frontend/1 format</entry>
209 <entry>Scaler/0</entry> 210 <entry>Scaler/0 format</entry>
210 <entry>Scaler/1</entry> 211 <entry>Scaler/0 compose selection rectangle</entry>
212 <entry>Scaler/1 format</entry>
211 </row> 213 </row>
212 </thead> 214 </thead>
213 <tbody valign="top"> 215 <tbody valign="top">
214 <row> 216 <row>
215 <entry>Initial state</entry> 217 <entry>Initial state</entry>
216 <entry>2048x1536</entry> 218 <entry>2048x1536/SGRBG8_1X8</entry>
217 <entry>-</entry> 219 <entry>(default)</entry>
218 <entry>-</entry> 220 <entry>(default)</entry>
219 <entry>-</entry> 221 <entry>(default)</entry>
220 <entry>-</entry> 222 <entry>(default)</entry>
223 <entry>(default)</entry>
221 </row> 224 </row>
222 <row> 225 <row>
223 <entry>Configure frontend input</entry> 226 <entry>Configure frontend sink format</entry>
224 <entry>2048x1536</entry> 227 <entry>2048x1536/SGRBG8_1X8</entry>
225 <entry><emphasis>2048x1536</emphasis></entry> 228 <entry><emphasis>2048x1536/SGRBG8_1X8</emphasis></entry>
226 <entry><emphasis>2046x1534</emphasis></entry> 229 <entry><emphasis>2046x1534/SGRBG8_1X8</emphasis></entry>
227 <entry>-</entry> 230 <entry>(default)</entry>
228 <entry>-</entry> 231 <entry>(default)</entry>
232 <entry>(default)</entry>
229 </row> 233 </row>
230 <row> 234 <row>
231 <entry>Configure scaler input</entry> 235 <entry>Configure scaler sink format</entry>
232 <entry>2048x1536</entry> 236 <entry>2048x1536/SGRBG8_1X8</entry>
233 <entry>2048x1536</entry> 237 <entry>2048x1536/SGRBG8_1X8</entry>
234 <entry>2046x1534</entry> 238 <entry>2046x1534/SGRBG8_1X8</entry>
235 <entry><emphasis>2046x1534</emphasis></entry> 239 <entry><emphasis>2046x1534/SGRBG8_1X8</emphasis></entry>
236 <entry><emphasis>2046x1534</emphasis></entry> 240 <entry><emphasis>0,0/2046x1534</emphasis></entry>
241 <entry><emphasis>2046x1534/SGRBG8_1X8</emphasis></entry>
237 </row> 242 </row>
238 <row> 243 <row>
239 <entry>Configure scaler output</entry> 244 <entry>Configure scaler sink compose selection</entry>
240 <entry>2048x1536</entry> 245 <entry>2048x1536/SGRBG8_1X8</entry>
241 <entry>2048x1536</entry> 246 <entry>2048x1536/SGRBG8_1X8</entry>
242 <entry>2046x1534</entry> 247 <entry>2046x1534/SGRBG8_1X8</entry>
243 <entry>2046x1534</entry> 248 <entry>2046x1534/SGRBG8_1X8</entry>
244 <entry><emphasis>1280x960</emphasis></entry> 249 <entry><emphasis>0,0/1280x960</emphasis></entry>
250 <entry><emphasis>1280x960/SGRBG8_1X8</emphasis></entry>
245 </row> 251 </row>
246 </tbody> 252 </tbody>
247 </tgroup> 253 </tgroup>
@@ -249,19 +255,30 @@
249 255
250 <para> 256 <para>
251 <orderedlist> 257 <orderedlist>
252 <listitem><para>Initial state. The sensor output is set to its native 3MP 258 <listitem><para>Initial state. The sensor source pad format is
253 resolution. Resolutions on the host frontend and scaler input and output 259 set to its native 3MP size and V4L2_MBUS_FMT_SGRBG8_1X8
254 pads are undefined.</para></listitem> 260 media bus code. Formats on the host frontend and scaler sink
255 <listitem><para>The application configures the frontend input pad resolution to 261 and source pads have the default values, as well as the
256 2048x1536. The driver propagates the format to the frontend output pad. 262 compose rectangle on the scaler's sink pad.</para></listitem>
257 Note that the propagated output format can be different, as in this case, 263
258 than the input format, as the hardware might need to crop pixels (for 264 <listitem><para>The application configures the frontend sink
259 instance when converting a Bayer filter pattern to RGB or YUV).</para></listitem> 265 pad format's size to 2048x1536 and its media bus code to
260 <listitem><para>The application configures the scaler input pad resolution to 266 V4L2_MBUS_FMT_SGRBG_1X8. The driver propagates the format to
261 2046x1534 to match the frontend output resolution. The driver propagates 267 the frontend source pad.</para></listitem>
262 the format to the scaler output pad.</para></listitem> 268
263 <listitem><para>The application configures the scaler output pad resolution to 269 <listitem><para>The application configures the scaler sink pad
264 1280x960.</para></listitem> 270 format's size to 2046x1534 and the media bus code to
271 V4L2_MBUS_FMT_SGRBG_1X8 to match the frontend source size and
272 media bus code. The media bus code on the sink pad is set to
273 V4L2_MBUS_FMT_SGRBG_1X8. The driver propagates the size to the
274 compose selection rectangle on the scaler's sink pad, and the
275 format to the scaler source pad.</para></listitem>
276
277 <listitem><para>The application configures the size of the compose
278 selection rectangle of the scaler's sink pad 1280x960. The driver
279 propagates the size to the scaler's source pad
280 format.</para></listitem>
281
265 </orderedlist> 282 </orderedlist>
266 </para> 283 </para>
267 284
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml
index e5e8325aa3d7..1c17f802b471 100644
--- a/Documentation/DocBook/media/v4l/io.xml
+++ b/Documentation/DocBook/media/v4l/io.xml
@@ -1422,7 +1422,10 @@ one of the <constant>V4L2_FIELD_NONE</constant>,
1422<constant>V4L2_FIELD_BOTTOM</constant>, or 1422<constant>V4L2_FIELD_BOTTOM</constant>, or
1423<constant>V4L2_FIELD_INTERLACED</constant> formats is acceptable. 1423<constant>V4L2_FIELD_INTERLACED</constant> formats is acceptable.
1424Drivers choose depending on hardware capabilities or e.&nbsp;g. the 1424Drivers choose depending on hardware capabilities or e.&nbsp;g. the
1425requested image size, and return the actual field order. &v4l2-buffer; 1425requested image size, and return the actual field order. Drivers must
1426never return <constant>V4L2_FIELD_ANY</constant>. If multiple
1427field orders are possible the driver must choose one of the possible
1428field orders during &VIDIOC-S-FMT; or &VIDIOC-TRY-FMT;. &v4l2-buffer;
1426<structfield>field</structfield> can never be 1429<structfield>field</structfield> can never be
1427<constant>V4L2_FIELD_ANY</constant>.</entry> 1430<constant>V4L2_FIELD_ANY</constant>.</entry>
1428 </row> 1431 </row>
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
index df5b23d46552..d5eca4b8f74b 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -138,9 +138,25 @@ applicable values.</para></entry>
138 <row> 138 <row>
139 <entry>__u32</entry> 139 <entry>__u32</entry>
140 <entry><structfield>flags</structfield></entry> 140 <entry><structfield>flags</structfield></entry>
141 <entry>Flags set by the application or driver, see <xref 141 <entry>Flags set by the application or driver, see <xref
142linkend="format-flags" />.</entry> 142linkend="format-flags" />.</entry>
143 </row> 143 </row>
144 <row>
145 <entry>&v4l2-ycbcr-encoding;</entry>
146 <entry><structfield>ycbcr_enc</structfield></entry>
147 <entry>This information supplements the
148<structfield>colorspace</structfield> and must be set by the driver for
149capture streams and by the application for output streams,
150see <xref linkend="colorspaces" />.</entry>
151 </row>
152 <row>
153 <entry>&v4l2-quantization;</entry>
154 <entry><structfield>quantization</structfield></entry>
155 <entry>This information supplements the
156<structfield>colorspace</structfield> and must be set by the driver for
157capture streams and by the application for output streams,
158see <xref linkend="colorspaces" />.</entry>
159 </row>
144 </tbody> 160 </tbody>
145 </tgroup> 161 </tgroup>
146 </table> 162 </table>
@@ -232,9 +248,25 @@ codes can be used.</entry>
232 <entry>Flags set by the application or driver, see <xref 248 <entry>Flags set by the application or driver, see <xref
233linkend="format-flags" />.</entry> 249linkend="format-flags" />.</entry>
234 </row> 250 </row>
251 <row>
252 <entry>&v4l2-ycbcr-encoding;</entry>
253 <entry><structfield>ycbcr_enc</structfield></entry>
254 <entry>This information supplements the
255<structfield>colorspace</structfield> and must be set by the driver for
256capture streams and by the application for output streams,
257see <xref linkend="colorspaces" />.</entry>
258 </row>
259 <row>
260 <entry>&v4l2-quantization;</entry>
261 <entry><structfield>quantization</structfield></entry>
262 <entry>This information supplements the
263<structfield>colorspace</structfield> and must be set by the driver for
264capture streams and by the application for output streams,
265see <xref linkend="colorspaces" />.</entry>
266 </row>
235 <row> 267 <row>
236 <entry>__u8</entry> 268 <entry>__u8</entry>
237 <entry><structfield>reserved[10]</structfield></entry> 269 <entry><structfield>reserved[8]</structfield></entry>
238 <entry>Reserved for future extensions. Should be zeroed by the 270 <entry>Reserved for future extensions. Should be zeroed by the
239 application.</entry> 271 application.</entry>
240 </row> 272 </row>
@@ -296,345 +328,1005 @@ in the 2-planar version or with each component in its own buffer in the
296 <section id="colorspaces"> 328 <section id="colorspaces">
297 <title>Colorspaces</title> 329 <title>Colorspaces</title>
298 330
299 <para>[intro]</para> 331 <para>'Color' is a very complex concept and depends on physics, chemistry and
332biology. Just because you have three numbers that describe the 'red', 'green'
333and 'blue' components of the color of a pixel does not mean that you can accurately
334display that color. A colorspace defines what it actually <emphasis>means</emphasis>
335to have an RGB value of e.g. (255,&nbsp;0,&nbsp;0). That is, which color should be
336reproduced on the screen in a perfectly calibrated environment.</para>
300 337
301 <!-- See proposal by Billy Biggs, video4linux-list@redhat.com 338 <para>In order to do that we first need to have a good definition of
302on 11 Oct 2002, subject: "Re: [V4L] Re: v4l2 api", and 339color, i.e. some way to uniquely and unambiguously define a color so that someone
303http://vektor.theorem.ca/graphics/ycbcr/ and 340else can reproduce it. Human color vision is trichromatic since the human eye has
304http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html --> 341color receptors that are sensitive to three different wavelengths of light. Hence
342the need to use three numbers to describe color. Be glad you are not a mantis shrimp
343as those are sensitive to 12 different wavelengths, so instead of RGB we would be
344using the ABCDEFGHIJKL colorspace...</para>
305 345
306 <para> 346 <para>Color exists only in the eye and brain and is the result of how strongly
307 <variablelist> 347color receptors are stimulated. This is based on the Spectral
308 <varlistentry> 348Power Distribution (SPD) which is a graph showing the intensity (radiant power)
309 <term>Gamma Correction</term> 349of the light at wavelengths covering the visible spectrum as it enters the eye.
310 <listitem> 350The science of colorimetry is about the relationship between the SPD and color as
311 <para>[to do]</para> 351perceived by the human brain.</para>
312 <para>E'<subscript>R</subscript> = f(R)</para> 352
313 <para>E'<subscript>G</subscript> = f(G)</para> 353 <para>Since the human eye has only three color receptors it is perfectly
314 <para>E'<subscript>B</subscript> = f(B)</para> 354possible that different SPDs will result in the same stimulation of those receptors
315 </listitem> 355and are perceived as the same color, even though the SPD of the light is
316 </varlistentry> 356different.</para>
317 <varlistentry> 357
318 <term>Construction of luminance and color-difference 358 <para>In the 1920s experiments were devised to determine the relationship
319signals</term> 359between SPDs and the perceived color and that resulted in the CIE 1931 standard
320 <listitem> 360that defines spectral weighting functions that model the perception of color.
321 <para>[to do]</para> 361Specifically that standard defines functions that can take an SPD and calculate
322 <para>E'<subscript>Y</subscript> = 362the stimulus for each color receptor. After some further mathematical transforms
323Coeff<subscript>R</subscript> E'<subscript>R</subscript> 363these stimuli are known as the <emphasis>CIE XYZ tristimulus</emphasis> values
324+ Coeff<subscript>G</subscript> E'<subscript>G</subscript> 364and these X, Y and Z values describe a color as perceived by a human unambiguously.
325+ Coeff<subscript>B</subscript> E'<subscript>B</subscript></para> 365These X, Y and Z values are all in the range [0&hellip;1].</para>
326 <para>(E'<subscript>R</subscript> - E'<subscript>Y</subscript>) = E'<subscript>R</subscript> 366
327- Coeff<subscript>R</subscript> E'<subscript>R</subscript> 367 <para>The Y value in the CIE XYZ colorspace corresponds to luminance. Often
328- Coeff<subscript>G</subscript> E'<subscript>G</subscript> 368the CIE XYZ colorspace is transformed to the normalized CIE xyY colorspace:</para>
329- Coeff<subscript>B</subscript> E'<subscript>B</subscript></para> 369
330 <para>(E'<subscript>B</subscript> - E'<subscript>Y</subscript>) = E'<subscript>B</subscript> 370 <para>x = X / (X + Y + Z)</para>
331- Coeff<subscript>R</subscript> E'<subscript>R</subscript> 371 <para>y = Y / (X + Y + Z)</para>
332- Coeff<subscript>G</subscript> E'<subscript>G</subscript> 372
333- Coeff<subscript>B</subscript> E'<subscript>B</subscript></para> 373 <para>The x and y values are the chromaticity coordinates and can be used to
334 </listitem> 374define a color without the luminance component Y. It is very confusing to
335 </varlistentry> 375have such similar names for these colorspaces. Just be aware that if colors
336 <varlistentry> 376are specified with lower case 'x' and 'y', then the CIE xyY colorspace is
337 <term>Re-normalized color-difference signals</term> 377used. Upper case 'X' and 'Y' refer to the CIE XYZ colorspace. Also, y has nothing
338 <listitem> 378to do with luminance. Together x and y specify a color, and Y the luminance.
339 <para>The color-difference signals are scaled back to unity 379That is really all you need to remember from a practical point of view. At
340range [-0.5;+0.5]:</para> 380the end of this section you will find reading resources that go into much more
341 <para>K<subscript>B</subscript> = 0.5 / (1 - Coeff<subscript>B</subscript>)</para> 381detail if you are interested.
342 <para>K<subscript>R</subscript> = 0.5 / (1 - Coeff<subscript>R</subscript>)</para> 382</para>
343 <para>P<subscript>B</subscript> = 383
344K<subscript>B</subscript> (E'<subscript>B</subscript> - E'<subscript>Y</subscript>) = 384 <para>A monitor or TV will reproduce colors by emitting light at three
345 0.5 (Coeff<subscript>R</subscript> / Coeff<subscript>B</subscript>) E'<subscript>R</subscript> 385different wavelengths, the combination of which will stimulate the color receptors
346+ 0.5 (Coeff<subscript>G</subscript> / Coeff<subscript>B</subscript>) E'<subscript>G</subscript> 386in the eye and thus cause the perception of color. Historically these wavelengths
347+ 0.5 E'<subscript>B</subscript></para> 387were defined by the red, green and blue phosphors used in the displays. These
348 <para>P<subscript>R</subscript> = 388<emphasis>color primaries</emphasis> are part of what defines a colorspace.</para>
349K<subscript>R</subscript> (E'<subscript>R</subscript> - E'<subscript>Y</subscript>) = 389
350 0.5 E'<subscript>R</subscript> 390 <para>Different display devices will have different primaries and some
351+ 0.5 (Coeff<subscript>G</subscript> / Coeff<subscript>R</subscript>) E'<subscript>G</subscript> 391primaries are more suitable for some display technologies than others. This has
352+ 0.5 (Coeff<subscript>B</subscript> / Coeff<subscript>R</subscript>) E'<subscript>B</subscript></para> 392resulted in a variety of colorspaces that are used for different display
353 </listitem> 393technologies or uses. To define a colorspace you need to define the three
354 </varlistentry> 394color primaries (these are typically defined as x,&nbsp;y chromaticity coordinates
355 <varlistentry> 395from the CIE xyY colorspace) but also the white reference: that is the color obtained
356 <term>Quantization</term> 396when all three primaries are at maximum power. This determines the relative power
357 <listitem> 397or energy of the primaries. This is usually chosen to be close to daylight which has
358 <para>[to do]</para> 398been defined as the CIE D65 Illuminant.</para>
359 <para>Y' = (Lum. Levels - 1) &middot; E'<subscript>Y</subscript> + Lum. Offset</para> 399
360 <para>C<subscript>B</subscript> = (Chrom. Levels - 1) 400 <para>To recapitulate: the CIE XYZ colorspace uniquely identifies colors.
361&middot; P<subscript>B</subscript> + Chrom. Offset</para> 401Other colorspaces are defined by three chromaticity coordinates defined in the
362 <para>C<subscript>R</subscript> = (Chrom. Levels - 1) 402CIE xyY colorspace. Based on those a 3x3 matrix can be constructed that
363&middot; P<subscript>R</subscript> + Chrom. Offset</para> 403transforms CIE XYZ colors to colors in the new colorspace.
364 <para>Rounding to the nearest integer and clamping to the range 404</para>
365[0;255] finally yields the digital color components Y'CbCr 405
366stored in YUV images.</para> 406 <para>Both the CIE XYZ and the RGB colorspace that are derived from the
367 </listitem> 407specific chromaticity primaries are linear colorspaces. But neither the eye,
368 </varlistentry> 408nor display technology is linear. Doubling the values of all components in
369 </variablelist> 409the linear colorspace will not be perceived as twice the intensity of the color.
370 </para> 410So each colorspace also defines a transfer function that takes a linear color
371 411component value and transforms it to the non-linear component value, which is a
372 <example> 412closer match to the non-linear performance of both the eye and displays. Linear
373 <title>ITU-R Rec. BT.601 color conversion</title> 413component values are denoted RGB, non-linear are denoted as R'G'B'. In general
374 414colors used in graphics are all R'G'B', except in openGL which uses linear RGB.
375 <para>Forward Transformation</para> 415Special care should be taken when dealing with openGL to provide linear RGB colors
376 416or to use the built-in openGL support to apply the inverse transfer function.</para>
377 <programlisting> 417
378int ER, EG, EB; /* gamma corrected RGB input [0;255] */ 418 <para>The final piece that defines a colorspace is a function that
379int Y1, Cb, Cr; /* output [0;255] */ 419transforms non-linear R'G'B' to non-linear Y'CbCr. This function is determined
380 420by the so-called luma coefficients. There may be multiple possible Y'CbCr
381double r, g, b; /* temporaries */ 421encodings allowed for the same colorspace. Many encodings of color
382double y1, pb, pr; 422prefer to use luma (Y') and chroma (CbCr) instead of R'G'B'. Since the human
383 423eye is more sensitive to differences in luminance than in color this encoding
384int 424allows one to reduce the amount of color information compared to the luma
385clamp (double x) 425data. Note that the luma (Y') is unrelated to the Y in the CIE XYZ colorspace.
386{ 426Also note that Y'CbCr is often called YCbCr or YUV even though these are
387 int r = x; /* round to nearest */ 427strictly speaking wrong.</para>
388 428
389 if (r &lt; 0) return 0; 429 <para>Sometimes people confuse Y'CbCr as being a colorspace. This is not
390 else if (r &gt; 255) return 255; 430correct, it is just an encoding of an R'G'B' color into luma and chroma
391 else return r; 431values. The underlying colorspace that is associated with the R'G'B' color
392} 432is also associated with the Y'CbCr color.</para>
393 433
394r = ER / 255.0; 434 <para>The final step is how the RGB, R'G'B' or Y'CbCr values are
395g = EG / 255.0; 435quantized. The CIE XYZ colorspace where X, Y and Z are in the range
396b = EB / 255.0; 436[0&hellip;1] describes all colors that humans can perceive, but the transform to
397 437another colorspace will produce colors that are outside the [0&hellip;1] range.
398y1 = 0.299 * r + 0.587 * g + 0.114 * b; 438Once clamped to the [0&hellip;1] range those colors can no longer be reproduced
399pb = -0.169 * r - 0.331 * g + 0.5 * b; 439in that colorspace. This clamping is what reduces the extent or gamut of the
400pr = 0.5 * r - 0.419 * g - 0.081 * b; 440colorspace. How the range of [0&hellip;1] is translated to integer values in the
401 441range of [0&hellip;255] (or higher, depending on the color depth) is called the
402Y1 = clamp (219 * y1 + 16); 442quantization. This is <emphasis>not</emphasis> part of the colorspace
403Cb = clamp (224 * pb + 128); 443definition. In practice RGB or R'G'B' values are full range, i.e. they
404Cr = clamp (224 * pr + 128); 444use the full [0&hellip;255] range. Y'CbCr values on the other hand are limited
405 445range with Y' using [16&hellip;235] and Cb and Cr using [16&hellip;240].</para>
406/* or shorter */ 446
407 447 <para>Unfortunately, in some cases limited range RGB is also used
408y1 = 0.299 * ER + 0.587 * EG + 0.114 * EB; 448where the components use the range [16&hellip;235]. And full range Y'CbCr also exists
409 449using the [0&hellip;255] range.</para>
410Y1 = clamp ( (219 / 255.0) * y1 + 16); 450
411Cb = clamp (((224 / 255.0) / (2 - 2 * 0.114)) * (EB - y1) + 128); 451 <para>In order to correctly interpret a color you need to know the
412Cr = clamp (((224 / 255.0) / (2 - 2 * 0.299)) * (ER - y1) + 128); 452quantization range, whether it is R'G'B' or Y'CbCr, the used Y'CbCr encoding
413 </programlisting> 453and the colorspace.
414 454From that information you can calculate the corresponding CIE XYZ color
415 <para>Inverse Transformation</para> 455and map that again to whatever colorspace your display device uses.</para>
416 456
417 <programlisting> 457 <para>The colorspace definition itself consists of the three
418int Y1, Cb, Cr; /* gamma pre-corrected input [0;255] */ 458chromaticity primaries, the white reference chromaticity, a transfer
419int ER, EG, EB; /* output [0;255] */ 459function and the luma coefficients needed to transform R'G'B' to Y'CbCr. While
420 460some colorspace standards correctly define all four, quite often the colorspace
421double r, g, b; /* temporaries */ 461standard only defines some, and you have to rely on other standards for
422double y1, pb, pr; 462the missing pieces. The fact that colorspaces are often a mix of different
423 463standards also led to very confusing naming conventions where the name of
424int 464a standard was used to name a colorspace when in fact that standard was
425clamp (double x) 465part of various other colorspaces as well.</para>
426{ 466
427 int r = x; /* round to nearest */ 467 <para>If you want to read more about colors and colorspaces, then the
428 468following resources are useful: <xref linkend="poynton" /> is a good practical
429 if (r &lt; 0) return 0; 469book for video engineers, <xref linkend="colimg" /> has a much broader scope and
430 else if (r &gt; 255) return 255; 470describes many more aspects of color (physics, chemistry, biology, etc.).
431 else return r; 471The <ulink url="http://www.brucelindbloom.com">http://www.brucelindbloom.com</ulink>
432} 472website is an excellent resource, especially with respect to the mathematics behind
433 473colorspace conversions. The wikipedia <ulink url="http://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space">CIE 1931 colorspace</ulink> article
434y1 = (Y1 - 16) / 219.0; 474is also very useful.</para>
435pb = (Cb - 128) / 224.0; 475 </section>
436pr = (Cr - 128) / 224.0; 476
437 477 <section>
438r = 1.0 * y1 + 0 * pb + 1.402 * pr; 478 <title>Defining Colorspaces in V4L2</title>
439g = 1.0 * y1 - 0.344 * pb - 0.714 * pr; 479 <para>In V4L2 colorspaces are defined by three values. The first is the colorspace
440b = 1.0 * y1 + 1.772 * pb + 0 * pr; 480identifier (&v4l2-colorspace;) which defines the chromaticities, the transfer
441 481function, the default Y'CbCr encoding and the default quantization method. The second
442ER = clamp (r * 255); /* [ok? one should prob. limit y1,pb,pr] */ 482is the Y'CbCr encoding identifier (&v4l2-ycbcr-encoding;) to specify non-standard
443EG = clamp (g * 255); 483Y'CbCr encodings and the third is the quantization identifier (&v4l2-quantization;)
444EB = clamp (b * 255); 484to specify non-standard quantization methods. Most of the time only the colorspace
445 </programlisting> 485field of &v4l2-pix-format; or &v4l2-pix-format-mplane; needs to be filled in. Note
446 </example> 486that the default R'G'B' quantization is always full range for all colorspaces,
447 487so this won't be mentioned explicitly for each colorspace description.</para>
448 <table pgwide="1" id="v4l2-colorspace" orient="land"> 488
449 <title>enum v4l2_colorspace</title> 489 <table pgwide="1" frame="none" id="v4l2-colorspace">
450 <tgroup cols="11" align="center"> 490 <title>V4L2 Colorspaces</title>
451 <colspec align="left" /> 491 <tgroup cols="2" align="left">
452 <colspec align="center" /> 492 &cs-def;
453 <colspec align="left" />
454 <colspec colname="cr" />
455 <colspec colname="cg" />
456 <colspec colname="cb" />
457 <colspec colname="wp" />
458 <colspec colname="gc" />
459 <colspec colname="lum" />
460 <colspec colname="qy" />
461 <colspec colname="qc" />
462 <spanspec namest="cr" nameend="cb" spanname="chrom" />
463 <spanspec namest="qy" nameend="qc" spanname="quant" />
464 <spanspec namest="lum" nameend="qc" spanname="spam" />
465 <thead> 493 <thead>
466 <row> 494 <row>
467 <entry morerows="1">Identifier</entry> 495 <entry>Identifier</entry>
468 <entry morerows="1">Value</entry> 496 <entry>Details</entry>
469 <entry morerows="1">Description</entry>
470 <entry spanname="chrom">Chromaticities<footnote>
471 <para>The coordinates of the color primaries are
472given in the CIE system (1931)</para>
473 </footnote></entry>
474 <entry morerows="1">White Point</entry>
475 <entry morerows="1">Gamma Correction</entry>
476 <entry morerows="1">Luminance E'<subscript>Y</subscript></entry>
477 <entry spanname="quant">Quantization</entry>
478 </row>
479 <row>
480 <entry>Red</entry>
481 <entry>Green</entry>
482 <entry>Blue</entry>
483 <entry>Y'</entry>
484 <entry>Cb, Cr</entry>
485 </row> 497 </row>
486 </thead> 498 </thead>
487 <tbody valign="top"> 499 <tbody valign="top">
488 <row> 500 <row>
489 <entry><constant>V4L2_COLORSPACE_SMPTE170M</constant></entry> 501 <entry><constant>V4L2_COLORSPACE_SMPTE170M</constant></entry>
490 <entry>1</entry> 502 <entry>See <xref linkend="col-smpte-170m" />.</entry>
491 <entry>NTSC/PAL according to <xref linkend="smpte170m" />,
492<xref linkend="itu601" /></entry>
493 <entry>x&nbsp;=&nbsp;0.630, y&nbsp;=&nbsp;0.340</entry>
494 <entry>x&nbsp;=&nbsp;0.310, y&nbsp;=&nbsp;0.595</entry>
495 <entry>x&nbsp;=&nbsp;0.155, y&nbsp;=&nbsp;0.070</entry>
496 <entry>x&nbsp;=&nbsp;0.3127, y&nbsp;=&nbsp;0.3290,
497 Illuminant D<subscript>65</subscript></entry>
498 <entry>E' = 4.5&nbsp;I&nbsp;for&nbsp;I&nbsp;&le;0.018,
4991.099&nbsp;I<superscript>0.45</superscript>&nbsp;-&nbsp;0.099&nbsp;for&nbsp;0.018&nbsp;&lt;&nbsp;I</entry>
500 <entry>0.299&nbsp;E'<subscript>R</subscript>
501+&nbsp;0.587&nbsp;E'<subscript>G</subscript>
502+&nbsp;0.114&nbsp;E'<subscript>B</subscript></entry>
503 <entry>219&nbsp;E'<subscript>Y</subscript>&nbsp;+&nbsp;16</entry>
504 <entry>224&nbsp;P<subscript>B,R</subscript>&nbsp;+&nbsp;128</entry>
505 </row> 503 </row>
506 <row> 504 <row>
507 <entry><constant>V4L2_COLORSPACE_SMPTE240M</constant></entry> 505 <entry><constant>V4L2_COLORSPACE_REC709</constant></entry>
508 <entry>2</entry> 506 <entry>See <xref linkend="col-rec709" />.</entry>
509 <entry>1125-Line (US) HDTV, see <xref
510linkend="smpte240m" /></entry>
511 <entry>x&nbsp;=&nbsp;0.630, y&nbsp;=&nbsp;0.340</entry>
512 <entry>x&nbsp;=&nbsp;0.310, y&nbsp;=&nbsp;0.595</entry>
513 <entry>x&nbsp;=&nbsp;0.155, y&nbsp;=&nbsp;0.070</entry>
514 <entry>x&nbsp;=&nbsp;0.3127, y&nbsp;=&nbsp;0.3290,
515 Illuminant D<subscript>65</subscript></entry>
516 <entry>E' = 4&nbsp;I&nbsp;for&nbsp;I&nbsp;&le;0.0228,
5171.1115&nbsp;I<superscript>0.45</superscript>&nbsp;-&nbsp;0.1115&nbsp;for&nbsp;0.0228&nbsp;&lt;&nbsp;I</entry>
518 <entry>0.212&nbsp;E'<subscript>R</subscript>
519+&nbsp;0.701&nbsp;E'<subscript>G</subscript>
520+&nbsp;0.087&nbsp;E'<subscript>B</subscript></entry>
521 <entry>219&nbsp;E'<subscript>Y</subscript>&nbsp;+&nbsp;16</entry>
522 <entry>224&nbsp;P<subscript>B,R</subscript>&nbsp;+&nbsp;128</entry>
523 </row> 507 </row>
524 <row> 508 <row>
525 <entry><constant>V4L2_COLORSPACE_REC709</constant></entry> 509 <entry><constant>V4L2_COLORSPACE_SRGB</constant></entry>
526 <entry>3</entry> 510 <entry>See <xref linkend="col-srgb" />.</entry>
527 <entry>HDTV and modern devices, see <xref
528linkend="itu709" /></entry>
529 <entry>x&nbsp;=&nbsp;0.640, y&nbsp;=&nbsp;0.330</entry>
530 <entry>x&nbsp;=&nbsp;0.300, y&nbsp;=&nbsp;0.600</entry>
531 <entry>x&nbsp;=&nbsp;0.150, y&nbsp;=&nbsp;0.060</entry>
532 <entry>x&nbsp;=&nbsp;0.3127, y&nbsp;=&nbsp;0.3290,
533 Illuminant D<subscript>65</subscript></entry>
534 <entry>E' = 4.5&nbsp;I&nbsp;for&nbsp;I&nbsp;&le;0.018,
5351.099&nbsp;I<superscript>0.45</superscript>&nbsp;-&nbsp;0.099&nbsp;for&nbsp;0.018&nbsp;&lt;&nbsp;I</entry>
536 <entry>0.2125&nbsp;E'<subscript>R</subscript>
537+&nbsp;0.7154&nbsp;E'<subscript>G</subscript>
538+&nbsp;0.0721&nbsp;E'<subscript>B</subscript></entry>
539 <entry>219&nbsp;E'<subscript>Y</subscript>&nbsp;+&nbsp;16</entry>
540 <entry>224&nbsp;P<subscript>B,R</subscript>&nbsp;+&nbsp;128</entry>
541 </row> 511 </row>
542 <row> 512 <row>
543 <entry><constant>V4L2_COLORSPACE_BT878</constant></entry> 513 <entry><constant>V4L2_COLORSPACE_ADOBERGB</constant></entry>
544 <entry>4</entry> 514 <entry>See <xref linkend="col-adobergb" />.</entry>
545 <entry>Broken Bt878 extents<footnote> 515 </row>
546 <para>The ubiquitous Bt878 video capture chip 516 <row>
547quantizes E'<subscript>Y</subscript> to 238 levels, yielding a range 517 <entry><constant>V4L2_COLORSPACE_BT2020</constant></entry>
548of Y' = 16 &hellip; 253, unlike Rec. 601 Y' = 16 &hellip; 518 <entry>See <xref linkend="col-bt2020" />.</entry>
549235. This is not a typo in the Bt878 documentation, it has been 519 </row>
550implemented in silicon. The chroma extents are unclear.</para> 520 <row>
551 </footnote>, <xref linkend="itu601" /></entry> 521 <entry><constant>V4L2_COLORSPACE_SMPTE240M</constant></entry>
552 <entry>?</entry> 522 <entry>See <xref linkend="col-smpte-240m" />.</entry>
553 <entry>?</entry>
554 <entry>?</entry>
555 <entry>?</entry>
556 <entry>?</entry>
557 <entry>0.299&nbsp;E'<subscript>R</subscript>
558+&nbsp;0.587&nbsp;E'<subscript>G</subscript>
559+&nbsp;0.114&nbsp;E'<subscript>B</subscript></entry>
560 <entry><emphasis>237</emphasis>&nbsp;E'<subscript>Y</subscript>&nbsp;+&nbsp;16</entry>
561 <entry>224&nbsp;P<subscript>B,R</subscript>&nbsp;+&nbsp;128 (probably)</entry>
562 </row> 523 </row>
563 <row> 524 <row>
564 <entry><constant>V4L2_COLORSPACE_470_SYSTEM_M</constant></entry> 525 <entry><constant>V4L2_COLORSPACE_470_SYSTEM_M</constant></entry>
565 <entry>5</entry> 526 <entry>See <xref linkend="col-sysm" />.</entry>
566 <entry>M/NTSC<footnote>
567 <para>No identifier exists for M/PAL which uses
568the chromaticities of M/NTSC, the remaining parameters are equal to B and
569G/PAL.</para>
570 </footnote> according to <xref linkend="itu470" />, <xref
571 linkend="itu601" /></entry>
572 <entry>x&nbsp;=&nbsp;0.67, y&nbsp;=&nbsp;0.33</entry>
573 <entry>x&nbsp;=&nbsp;0.21, y&nbsp;=&nbsp;0.71</entry>
574 <entry>x&nbsp;=&nbsp;0.14, y&nbsp;=&nbsp;0.08</entry>
575 <entry>x&nbsp;=&nbsp;0.310, y&nbsp;=&nbsp;0.316, Illuminant C</entry>
576 <entry>?</entry>
577 <entry>0.299&nbsp;E'<subscript>R</subscript>
578+&nbsp;0.587&nbsp;E'<subscript>G</subscript>
579+&nbsp;0.114&nbsp;E'<subscript>B</subscript></entry>
580 <entry>219&nbsp;E'<subscript>Y</subscript>&nbsp;+&nbsp;16</entry>
581 <entry>224&nbsp;P<subscript>B,R</subscript>&nbsp;+&nbsp;128</entry>
582 </row> 527 </row>
583 <row> 528 <row>
584 <entry><constant>V4L2_COLORSPACE_470_SYSTEM_BG</constant></entry> 529 <entry><constant>V4L2_COLORSPACE_470_SYSTEM_BG</constant></entry>
585 <entry>6</entry> 530 <entry>See <xref linkend="col-sysbg" />.</entry>
586 <entry>625-line PAL and SECAM systems according to <xref
587linkend="itu470" />, <xref linkend="itu601" /></entry>
588 <entry>x&nbsp;=&nbsp;0.64, y&nbsp;=&nbsp;0.33</entry>
589 <entry>x&nbsp;=&nbsp;0.29, y&nbsp;=&nbsp;0.60</entry>
590 <entry>x&nbsp;=&nbsp;0.15, y&nbsp;=&nbsp;0.06</entry>
591 <entry>x&nbsp;=&nbsp;0.313, y&nbsp;=&nbsp;0.329,
592Illuminant D<subscript>65</subscript></entry>
593 <entry>?</entry>
594 <entry>0.299&nbsp;E'<subscript>R</subscript>
595+&nbsp;0.587&nbsp;E'<subscript>G</subscript>
596+&nbsp;0.114&nbsp;E'<subscript>B</subscript></entry>
597 <entry>219&nbsp;E'<subscript>Y</subscript>&nbsp;+&nbsp;16</entry>
598 <entry>224&nbsp;P<subscript>B,R</subscript>&nbsp;+&nbsp;128</entry>
599 </row> 531 </row>
600 <row> 532 <row>
601 <entry><constant>V4L2_COLORSPACE_JPEG</constant></entry> 533 <entry><constant>V4L2_COLORSPACE_JPEG</constant></entry>
602 <entry>7</entry> 534 <entry>See <xref linkend="col-jpeg" />.</entry>
603 <entry>JPEG Y'CbCr, see <xref linkend="jfif" />, <xref linkend="itu601" /></entry>
604 <entry>?</entry>
605 <entry>?</entry>
606 <entry>?</entry>
607 <entry>?</entry>
608 <entry>?</entry>
609 <entry>0.299&nbsp;E'<subscript>R</subscript>
610+&nbsp;0.587&nbsp;E'<subscript>G</subscript>
611+&nbsp;0.114&nbsp;E'<subscript>B</subscript></entry>
612 <entry>256&nbsp;E'<subscript>Y</subscript>&nbsp;+&nbsp;16<footnote>
613 <para>Note JFIF quantizes
614Y'P<subscript>B</subscript>P<subscript>R</subscript> in range [0;+1] and
615[-0.5;+0.5] to <emphasis>257</emphasis> levels, however Y'CbCr signals
616are still clamped to [0;255].</para>
617 </footnote></entry>
618 <entry>256&nbsp;P<subscript>B,R</subscript>&nbsp;+&nbsp;128</entry>
619 </row> 535 </row>
536 </tbody>
537 </tgroup>
538 </table>
539
540 <table pgwide="1" frame="none" id="v4l2-ycbcr-encoding">
541 <title>V4L2 Y'CbCr Encodings</title>
542 <tgroup cols="2" align="left">
543 &cs-def;
544 <thead>
620 <row> 545 <row>
621 <entry><constant>V4L2_COLORSPACE_SRGB</constant></entry> 546 <entry>Identifier</entry>
622 <entry>8</entry> 547 <entry>Details</entry>
623 <entry>[?]</entry> 548 </row>
624 <entry>x&nbsp;=&nbsp;0.640, y&nbsp;=&nbsp;0.330</entry> 549 </thead>
625 <entry>x&nbsp;=&nbsp;0.300, y&nbsp;=&nbsp;0.600</entry> 550 <tbody valign="top">
626 <entry>x&nbsp;=&nbsp;0.150, y&nbsp;=&nbsp;0.060</entry> 551 <row>
627 <entry>x&nbsp;=&nbsp;0.3127, y&nbsp;=&nbsp;0.3290, 552 <entry><constant>V4L2_YCBCR_ENC_DEFAULT</constant></entry>
628 Illuminant D<subscript>65</subscript></entry> 553 <entry>Use the default Y'CbCr encoding as defined by the colorspace.</entry>
629 <entry>E' = 4.5&nbsp;I&nbsp;for&nbsp;I&nbsp;&le;0.018, 554 </row>
6301.099&nbsp;I<superscript>0.45</superscript>&nbsp;-&nbsp;0.099&nbsp;for&nbsp;0.018&nbsp;&lt;&nbsp;I</entry> 555 <row>
631 <entry spanname="spam">n/a</entry> 556 <entry><constant>V4L2_YCBCR_ENC_601</constant></entry>
557 <entry>Use the BT.601 Y'CbCr encoding.</entry>
558 </row>
559 <row>
560 <entry><constant>V4L2_YCBCR_ENC_709</constant></entry>
561 <entry>Use the Rec. 709 Y'CbCr encoding.</entry>
562 </row>
563 <row>
564 <entry><constant>V4L2_YCBCR_ENC_XV601</constant></entry>
565 <entry>Use the extended gamut xvYCC BT.601 encoding.</entry>
566 </row>
567 <row>
568 <entry><constant>V4L2_YCBCR_ENC_XV709</constant></entry>
569 <entry>Use the extended gamut xvYCC Rec. 709 encoding.</entry>
570 </row>
571 <row>
572 <entry><constant>V4L2_YCBCR_ENC_SYCC</constant></entry>
573 <entry>Use the extended gamut sYCC encoding.</entry>
574 </row>
575 <row>
576 <entry><constant>V4L2_YCBCR_ENC_BT2020</constant></entry>
577 <entry>Use the default non-constant luminance BT.2020 Y'CbCr encoding.</entry>
578 </row>
579 <row>
580 <entry><constant>V4L2_YCBCR_ENC_BT2020_CONST_LUM</constant></entry>
581 <entry>Use the constant luminance BT.2020 Yc'CbcCrc encoding.</entry>
582 </row>
583 </tbody>
584 </tgroup>
585 </table>
586
587 <table pgwide="1" frame="none" id="v4l2-quantization">
588 <title>V4L2 Quantization Methods</title>
589 <tgroup cols="2" align="left">
590 &cs-def;
591 <thead>
592 <row>
593 <entry>Identifier</entry>
594 <entry>Details</entry>
595 </row>
596 </thead>
597 <tbody valign="top">
598 <row>
599 <entry><constant>V4L2_QUANTIZATION_DEFAULT</constant></entry>
600 <entry>Use the default quantization encoding as defined by the colorspace.
601This is always full range for R'G'B' and usually limited range for Y'CbCr.</entry>
602 </row>
603 <row>
604 <entry><constant>V4L2_QUANTIZATION_FULL_RANGE</constant></entry>
605 <entry>Use the full range quantization encoding. I.e. the range [0&hellip;1]
606is mapped to [0&hellip;255] (with possible clipping to [1&hellip;254] to avoid the
6070x00 and 0xff values). Cb and Cr are mapped from [-0.5&hellip;0.5] to [0&hellip;255]
608(with possible clipping to [1&hellip;254] to avoid the 0x00 and 0xff values).</entry>
609 </row>
610 <row>
611 <entry><constant>V4L2_QUANTIZATION_LIM_RANGE</constant></entry>
612 <entry>Use the limited range quantization encoding. I.e. the range [0&hellip;1]
613is mapped to [16&hellip;235]. Cb and Cr are mapped from [-0.5&hellip;0.5] to [16&hellip;240].
614</entry>
632 </row> 615 </row>
633 </tbody> 616 </tbody>
634 </tgroup> 617 </tgroup>
635 </table> 618 </table>
636 </section> 619 </section>
637 620
621 <section>
622 <title>Detailed Colorspace Descriptions</title>
623 <section>
624 <title id="col-smpte-170m">Colorspace SMPTE 170M (<constant>V4L2_COLORSPACE_SMPTE170M</constant>)</title>
625 <para>The <xref linkend="smpte170m" /> standard defines the colorspace used by NTSC and PAL and by SDTV
626in general. The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_601</constant>.
627The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and
628the white reference are:</para>
629 <table frame="none">
630 <title>SMPTE 170M Chromaticities</title>
631 <tgroup cols="3" align="left">
632 &cs-str;
633 <thead>
634 <row>
635 <entry>Color</entry>
636 <entry>x</entry>
637 <entry>y</entry>
638 </row>
639 </thead>
640 <tbody valign="top">
641 <row>
642 <entry>Red</entry>
643 <entry>0.630</entry>
644 <entry>0.340</entry>
645 </row>
646 <row>
647 <entry>Green</entry>
648 <entry>0.310</entry>
649 <entry>0.595</entry>
650 </row>
651 <row>
652 <entry>Blue</entry>
653 <entry>0.155</entry>
654 <entry>0.070</entry>
655 </row>
656 <row>
657 <entry>White Reference (D65)</entry>
658 <entry>0.3127</entry>
659 <entry>0.3290</entry>
660 </row>
661 </tbody>
662 </tgroup>
663 </table>
664 <para>The red, green and blue chromaticities are also often referred to
665as the SMPTE C set, so this colorspace is sometimes called SMPTE C as well.</para>
666 <variablelist>
667 <varlistentry>
668 <term>The transfer function defined for SMPTE 170M is the same as the
669one defined in Rec. 709. Normally L is in the range [0&hellip;1], but for the extended
670gamut xvYCC encoding values outside that range are allowed.</term>
671 <listitem>
672 <para>L' = -1.099(-L)<superscript>0.45</superscript>&nbsp;+&nbsp;0.099&nbsp;for&nbsp;L&nbsp;&le;&nbsp;-0.018</para>
673 <para>L' = 4.5L&nbsp;for&nbsp;-0.018&nbsp;&lt;&nbsp;L&nbsp;&lt;&nbsp;0.018</para>
674 <para>L' = 1.099L<superscript>0.45</superscript>&nbsp;-&nbsp;0.099&nbsp;for&nbsp;L&nbsp;&ge;&nbsp;0.018</para>
675 </listitem>
676 </varlistentry>
677 </variablelist>
678 <variablelist>
679 <varlistentry>
680 <term>Inverse Transfer function:</term>
681 <listitem>
682 <para>L = -((L'&nbsp;-&nbsp;0.099)&nbsp;/&nbsp;-1.099)<superscript>1/0.45</superscript>&nbsp;for&nbsp;L'&nbsp;&le;&nbsp;-0.081</para>
683 <para>L = L'&nbsp;/&nbsp;4.5&nbsp;for&nbsp;-0.081&nbsp;&lt;&nbsp;L'&nbsp;&lt;&nbsp;0.081</para>
684 <para>L = ((L'&nbsp;+&nbsp;0.099)&nbsp;/&nbsp;1.099)<superscript>1/0.45</superscript>&nbsp;for&nbsp;L'&nbsp;&ge;&nbsp;0.081</para>
685 </listitem>
686 </varlistentry>
687 </variablelist>
688 <variablelist>
689 <varlistentry>
690 <term>The luminance (Y') and color difference (Cb and Cr) are obtained with
691the following <constant>V4L2_YCBCR_ENC_601</constant> encoding:</term>
692 <listitem>
693 <para>Y'&nbsp;=&nbsp;0.299R'&nbsp;+&nbsp;0.587G'&nbsp;+&nbsp;0.114B'</para>
694 <para>Cb&nbsp;=&nbsp;-0.169R'&nbsp;-&nbsp;0.331G'&nbsp;+&nbsp;0.5B'</para>
695 <para>Cr&nbsp;=&nbsp;0.5R'&nbsp;-&nbsp;0.419G'&nbsp;-&nbsp;0.081B'</para>
696 </listitem>
697 </varlistentry>
698 </variablelist>
699 <para>Y' is clamped to the range [0&hellip;1] and Cb and Cr are
700clamped to the range [-0.5&hellip;0.5]. This conversion to Y'CbCr is identical to the one
701defined in the <xref linkend="itu601" /> standard and this colorspace is sometimes called BT.601 as well, even
702though BT.601 does not mention any color primaries.</para>
703 <para>The default quantization is limited range, but full range is possible although
704rarely seen.</para>
705 <para>The <constant>V4L2_YCBCR_ENC_601</constant> encoding as described above is the
706default for this colorspace, but it can be overridden with <constant>V4L2_YCBCR_ENC_709</constant>,
707in which case the Rec. 709 Y'CbCr encoding is used.</para>
708 <variablelist>
709 <varlistentry>
710 <term>The xvYCC 601 encoding (<constant>V4L2_YCBCR_ENC_XV601</constant>, <xref linkend="xvycc" />) is similar
711to the BT.601 encoding, but it allows for R', G' and B' values that are outside the range
712[0&hellip;1]. The resulting Y', Cb and Cr values are scaled and offset:</term>
713 <listitem>
714 <para>Y'&nbsp;=&nbsp;(219&nbsp;/&nbsp;255)&nbsp;*&nbsp;(0.299R'&nbsp;+&nbsp;0.587G'&nbsp;+&nbsp;0.114B')&nbsp;+&nbsp;(16&nbsp;/&nbsp;255)</para>
715 <para>Cb&nbsp;=&nbsp;(224&nbsp;/&nbsp;255)&nbsp;*&nbsp;(-0.169R'&nbsp;-&nbsp;0.331G'&nbsp;+&nbsp;0.5B')</para>
716 <para>Cr&nbsp;=&nbsp;(224&nbsp;/&nbsp;255)&nbsp;*&nbsp;(0.5R'&nbsp;-&nbsp;0.419G'&nbsp;-&nbsp;0.081B')</para>
717 </listitem>
718 </varlistentry>
719 </variablelist>
720 <para>Y' is clamped to the range [0&hellip;1] and Cb and Cr are clamped
721to the range [-0.5&hellip;0.5]. The non-standard xvYCC 709 encoding can also be used by selecting
722<constant>V4L2_YCBCR_ENC_XV709</constant>. The xvYCC encodings always use full range
723quantization.</para>
724 </section>
725
726 <section>
727 <title id="col-rec709">Colorspace Rec. 709 (<constant>V4L2_COLORSPACE_REC709</constant>)</title>
728 <para>The <xref linkend="itu709" /> standard defines the colorspace used by HDTV in general. The default
729Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_709</constant>. The default Y'CbCr quantization is
730limited range. The chromaticities of the primary colors and the white reference are:</para>
731 <table frame="none">
732 <title>Rec. 709 Chromaticities</title>
733 <tgroup cols="3" align="left">
734 &cs-str;
735 <thead>
736 <row>
737 <entry>Color</entry>
738 <entry>x</entry>
739 <entry>y</entry>
740 </row>
741 </thead>
742 <tbody valign="top">
743 <row>
744 <entry>Red</entry>
745 <entry>0.640</entry>
746 <entry>0.330</entry>
747 </row>
748 <row>
749 <entry>Green</entry>
750 <entry>0.300</entry>
751 <entry>0.600</entry>
752 </row>
753 <row>
754 <entry>Blue</entry>
755 <entry>0.150</entry>
756 <entry>0.060</entry>
757 </row>
758 <row>
759 <entry>White Reference (D65)</entry>
760 <entry>0.3127</entry>
761 <entry>0.3290</entry>
762 </row>
763 </tbody>
764 </tgroup>
765 </table>
766 <para>The full name of this standard is Rec. ITU-R BT.709-5.</para>
767 <variablelist>
768 <varlistentry>
769 <term>Transfer function. Normally L is in the range [0&hellip;1], but for the extended
770gamut xvYCC encoding values outside that range are allowed.</term>
771 <listitem>
772 <para>L' = -1.099(-L)<superscript>0.45</superscript>&nbsp;+&nbsp;0.099&nbsp;for&nbsp;L&nbsp;&le;&nbsp;-0.018</para>
773 <para>L' = 4.5L&nbsp;for&nbsp;-0.018&nbsp;&lt;&nbsp;L&nbsp;&lt;&nbsp;0.018</para>
774 <para>L' = 1.099L<superscript>0.45</superscript>&nbsp;-&nbsp;0.099&nbsp;for&nbsp;L&nbsp;&ge;&nbsp;0.018</para>
775 </listitem>
776 </varlistentry>
777 </variablelist>
778 <variablelist>
779 <varlistentry>
780 <term>Inverse Transfer function:</term>
781 <listitem>
782 <para>L = -((L'&nbsp;-&nbsp;0.099)&nbsp;/&nbsp;-1.099)<superscript>1/0.45</superscript>&nbsp;for&nbsp;L'&nbsp;&le;&nbsp;-0.081</para>
783 <para>L = L'&nbsp;/&nbsp;4.5&nbsp;for&nbsp;-0.081&nbsp;&lt;&nbsp;L'&nbsp;&lt;&nbsp;0.081</para>
784 <para>L = ((L'&nbsp;+&nbsp;0.099)&nbsp;/&nbsp;1.099)<superscript>1/0.45</superscript>&nbsp;for&nbsp;L'&nbsp;&ge;&nbsp;0.081</para>
785 </listitem>
786 </varlistentry>
787 </variablelist>
788 <variablelist>
789 <varlistentry>
790 <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the following
791<constant>V4L2_YCBCR_ENC_709</constant> encoding:</term>
792 <listitem>
793 <para>Y'&nbsp;=&nbsp;0.2126R'&nbsp;+&nbsp;0.7152G'&nbsp;+&nbsp;0.0722B'</para>
794 <para>Cb&nbsp;=&nbsp;-0.1146R'&nbsp;-&nbsp;0.3854G'&nbsp;+&nbsp;0.5B'</para>
795 <para>Cr&nbsp;=&nbsp;0.5R'&nbsp;-&nbsp;0.4542G'&nbsp;-&nbsp;0.0458B'</para>
796 </listitem>
797 </varlistentry>
798 </variablelist>
799 <para>Y' is clamped to the range [0&hellip;1] and Cb and Cr are
800clamped to the range [-0.5&hellip;0.5].</para>
801 <para>The default quantization is limited range, but full range is possible although
802rarely seen.</para>
803 <para>The <constant>V4L2_YCBCR_ENC_709</constant> encoding described above is the default
804for this colorspace, but it can be overridden with <constant>V4L2_YCBCR_ENC_601</constant>, in which
805case the BT.601 Y'CbCr encoding is used.</para>
806 <variablelist>
807 <varlistentry>
808 <term>The xvYCC 709 encoding (<constant>V4L2_YCBCR_ENC_XV709</constant>, <xref linkend="xvycc" />)
809is similar to the Rec. 709 encoding, but it allows for R', G' and B' values that are outside the range
810[0&hellip;1]. The resulting Y', Cb and Cr values are scaled and offset:</term>
811 <listitem>
812 <para>Y'&nbsp;=&nbsp;(219&nbsp;/&nbsp;255)&nbsp;*&nbsp;(0.2126R'&nbsp;+&nbsp;0.7152G'&nbsp;+&nbsp;0.0722B')&nbsp;+&nbsp;(16&nbsp;/&nbsp;255)</para>
813 <para>Cb&nbsp;=&nbsp;(224&nbsp;/&nbsp;255)&nbsp;*&nbsp;(-0.1146R'&nbsp;-&nbsp;0.3854G'&nbsp;+&nbsp;0.5B')</para>
814 <para>Cr&nbsp;=&nbsp;(224&nbsp;/&nbsp;255)&nbsp;*&nbsp;(0.5R'&nbsp;-&nbsp;0.4542G'&nbsp;-&nbsp;0.0458B')</para>
815 </listitem>
816 </varlistentry>
817 </variablelist>
818 <para>Y' is clamped to the range [0&hellip;1] and Cb and Cr are clamped
819to the range [-0.5&hellip;0.5]. The non-standard xvYCC 601 encoding can also be used by
820selecting <constant>V4L2_YCBCR_ENC_XV601</constant>. The xvYCC encodings always use full
821range quantization.</para>
822 </section>
823
824 <section>
825 <title id="col-srgb">Colorspace sRGB (<constant>V4L2_COLORSPACE_SRGB</constant>)</title>
826 <para>The <xref linkend="srgb" /> standard defines the colorspace used by most webcams and computer graphics. The
827default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_SYCC</constant>. The default Y'CbCr quantization
828is full range. The chromaticities of the primary colors and the white reference are:</para>
829 <table frame="none">
830 <title>sRGB Chromaticities</title>
831 <tgroup cols="3" align="left">
832 &cs-str;
833 <thead>
834 <row>
835 <entry>Color</entry>
836 <entry>x</entry>
837 <entry>y</entry>
838 </row>
839 </thead>
840 <tbody valign="top">
841 <row>
842 <entry>Red</entry>
843 <entry>0.640</entry>
844 <entry>0.330</entry>
845 </row>
846 <row>
847 <entry>Green</entry>
848 <entry>0.300</entry>
849 <entry>0.600</entry>
850 </row>
851 <row>
852 <entry>Blue</entry>
853 <entry>0.150</entry>
854 <entry>0.060</entry>
855 </row>
856 <row>
857 <entry>White Reference (D65)</entry>
858 <entry>0.3127</entry>
859 <entry>0.3290</entry>
860 </row>
861 </tbody>
862 </tgroup>
863 </table>
864 <para>These chromaticities are identical to the Rec. 709 colorspace.</para>
865 <variablelist>
866 <varlistentry>
867 <term>Transfer function. Note that negative values for L are only used by the Y'CbCr conversion.</term>
868 <listitem>
869 <para>L' = -1.055(-L)<superscript>1/2.4</superscript>&nbsp;+&nbsp;0.055&nbsp;for&nbsp;L&nbsp;&lt;&nbsp;-0.0031308</para>
870 <para>L' = 12.92L&nbsp;for&nbsp;-0.0031308&nbsp;&le;&nbsp;L&nbsp;&le;&nbsp;0.0031308</para>
871 <para>L' = 1.055L<superscript>1/2.4</superscript>&nbsp;-&nbsp;0.055&nbsp;for&nbsp;0.0031308&nbsp;&lt;&nbsp;L&nbsp;&le;&nbsp;1</para>
872 </listitem>
873 </varlistentry>
874 <varlistentry>
875 <term>Inverse Transfer function:</term>
876 <listitem>
877 <para>L = -((-L'&nbsp;+&nbsp;0.055)&nbsp;/&nbsp;1.055)<superscript>2.4</superscript>&nbsp;for&nbsp;L'&nbsp;&lt;&nbsp;-0.04045</para>
878 <para>L = L'&nbsp;/&nbsp;12.92&nbsp;for&nbsp;-0.04045&nbsp;&le;&nbsp;L'&nbsp;&le;&nbsp;0.04045</para>
879 <para>L = ((L'&nbsp;+&nbsp;0.055)&nbsp;/&nbsp;1.055)<superscript>2.4</superscript>&nbsp;for&nbsp;L'&nbsp;&gt;&nbsp;0.04045</para>
880 </listitem>
881 </varlistentry>
882 </variablelist>
883 <variablelist>
884 <varlistentry>
885 <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the following
886<constant>V4L2_YCBCR_ENC_SYCC</constant> encoding as defined by <xref linkend="sycc" />:</term>
887 <listitem>
888 <para>Y'&nbsp;=&nbsp;0.2990R'&nbsp;+&nbsp;0.5870G'&nbsp;+&nbsp;0.1140B'</para>
889 <para>Cb&nbsp;=&nbsp;-0.1687R'&nbsp;-&nbsp;0.3313G'&nbsp;+&nbsp;0.5B'</para>
890 <para>Cr&nbsp;=&nbsp;0.5R'&nbsp;-&nbsp;0.4187G'&nbsp;-&nbsp;0.0813B'</para>
891 </listitem>
892 </varlistentry>
893 </variablelist>
894 <para>Y' is clamped to the range [0&hellip;1] and Cb and Cr are clamped
895to the range [-0.5&hellip;0.5]. The <constant>V4L2_YCBCR_ENC_SYCC</constant> quantization is always
896full range. Although this Y'CbCr encoding looks very similar to the <constant>V4L2_YCBCR_ENC_XV601</constant>
897encoding, it is not. The <constant>V4L2_YCBCR_ENC_XV601</constant> scales and offsets the Y'CbCr
898values before quantization, but this encoding does not do that.</para>
899 </section>
900
901 <section>
902 <title id="col-adobergb">Colorspace Adobe RGB (<constant>V4L2_COLORSPACE_ADOBERGB</constant>)</title>
903 <para>The <xref linkend="adobergb" /> standard defines the colorspace used by computer graphics
904that use the AdobeRGB colorspace. This is also known as the <xref linkend="oprgb" /> standard.
905The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_601</constant>. The default Y'CbCr
906quantization is limited range. The chromaticities of the primary colors and the white reference
907are:</para>
908 <table frame="none">
909 <title>Adobe RGB Chromaticities</title>
910 <tgroup cols="3" align="left">
911 &cs-str;
912 <thead>
913 <row>
914 <entry>Color</entry>
915 <entry>x</entry>
916 <entry>y</entry>
917 </row>
918 </thead>
919 <tbody valign="top">
920 <row>
921 <entry>Red</entry>
922 <entry>0.6400</entry>
923 <entry>0.3300</entry>
924 </row>
925 <row>
926 <entry>Green</entry>
927 <entry>0.2100</entry>
928 <entry>0.7100</entry>
929 </row>
930 <row>
931 <entry>Blue</entry>
932 <entry>0.1500</entry>
933 <entry>0.0600</entry>
934 </row>
935 <row>
936 <entry>White Reference (D65)</entry>
937 <entry>0.3127</entry>
938 <entry>0.3290</entry>
939 </row>
940 </tbody>
941 </tgroup>
942 </table>
943 <variablelist>
944 <varlistentry>
945 <term>Transfer function:</term>
946 <listitem>
947 <para>L' = L<superscript>1/2.19921875</superscript></para>
948 </listitem>
949 </varlistentry>
950 <varlistentry>
951 <term>Inverse Transfer function:</term>
952 <listitem>
953 <para>L = L'<superscript>2.19921875</superscript></para>
954 </listitem>
955 </varlistentry>
956 </variablelist>
957 <variablelist>
958 <varlistentry>
959 <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the
960following <constant>V4L2_YCBCR_ENC_601</constant> encoding:</term>
961 <listitem>
962 <para>Y'&nbsp;=&nbsp;0.299R'&nbsp;+&nbsp;0.587G'&nbsp;+&nbsp;0.114B'</para>
963 <para>Cb&nbsp;=&nbsp;-0.169R'&nbsp;-&nbsp;0.331G'&nbsp;+&nbsp;0.5B'</para>
964 <para>Cr&nbsp;=&nbsp;0.5R'&nbsp;-&nbsp;0.419G'&nbsp;-&nbsp;0.081B'</para>
965 </listitem>
966 </varlistentry>
967 </variablelist>
968 <para>Y' is clamped to the range [0&hellip;1] and Cb and Cr are
969clamped to the range [-0.5&hellip;0.5]. This transform is identical to one defined in
970SMPTE 170M/BT.601. The Y'CbCr quantization is limited range.</para>
971 </section>
972
973 <section>
974 <title id="col-bt2020">Colorspace BT.2020 (<constant>V4L2_COLORSPACE_BT2020</constant>)</title>
975 <para>The <xref linkend="itu2020" /> standard defines the colorspace used by Ultra-high definition
976television (UHDTV). The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_BT2020</constant>.
977The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and
978the white reference are:</para>
979 <table frame="none">
980 <title>BT.2020 Chromaticities</title>
981 <tgroup cols="3" align="left">
982 &cs-str;
983 <thead>
984 <row>
985 <entry>Color</entry>
986 <entry>x</entry>
987 <entry>y</entry>
988 </row>
989 </thead>
990 <tbody valign="top">
991 <row>
992 <entry>Red</entry>
993 <entry>0.708</entry>
994 <entry>0.292</entry>
995 </row>
996 <row>
997 <entry>Green</entry>
998 <entry>0.170</entry>
999 <entry>0.797</entry>
1000 </row>
1001 <row>
1002 <entry>Blue</entry>
1003 <entry>0.131</entry>
1004 <entry>0.046</entry>
1005 </row>
1006 <row>
1007 <entry>White Reference (D65)</entry>
1008 <entry>0.3127</entry>
1009 <entry>0.3290</entry>
1010 </row>
1011 </tbody>
1012 </tgroup>
1013 </table>
1014 <variablelist>
1015 <varlistentry>
1016 <term>Transfer function (same as Rec. 709):</term>
1017 <listitem>
1018 <para>L' = 4.5L&nbsp;for&nbsp;0&nbsp;&le;&nbsp;L&nbsp;&lt;&nbsp;0.018</para>
1019 <para>L' = 1.099L<superscript>0.45</superscript>&nbsp;-&nbsp;0.099&nbsp;for&nbsp;0.018&nbsp;&le;&nbsp;L&nbsp;&le;&nbsp;1</para>
1020 </listitem>
1021 </varlistentry>
1022 <varlistentry>
1023 <term>Inverse Transfer function:</term>
1024 <listitem>
1025 <para>L = L'&nbsp;/&nbsp;4.5&nbsp;for&nbsp;L'&nbsp;&lt;&nbsp;0.081</para>
1026 <para>L = ((L'&nbsp;+&nbsp;0.099)&nbsp;/&nbsp;1.099)<superscript>1/0.45</superscript>&nbsp;for&nbsp;L'&nbsp;&ge;&nbsp;0.081</para>
1027 </listitem>
1028 </varlistentry>
1029 </variablelist>
1030 <variablelist>
1031 <varlistentry>
1032 <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the
1033following <constant>V4L2_YCBCR_ENC_BT2020</constant> encoding:</term>
1034 <listitem>
1035 <para>Y'&nbsp;=&nbsp;0.2627R'&nbsp;+&nbsp;0.6789G'&nbsp;+&nbsp;0.0593B'</para>
1036 <para>Cb&nbsp;=&nbsp;-0.1396R'&nbsp;-&nbsp;0.3604G'&nbsp;+&nbsp;0.5B'</para>
1037 <para>Cr&nbsp;=&nbsp;0.5R'&nbsp;-&nbsp;0.4598G'&nbsp;-&nbsp;0.0402B'</para>
1038 </listitem>
1039 </varlistentry>
1040 </variablelist>
1041 <para>Y' is clamped to the range [0&hellip;1] and Cb and Cr are
1042clamped to the range [-0.5&hellip;0.5]. The Y'CbCr quantization is limited range.</para>
1043 <para>There is also an alternate constant luminance R'G'B' to Yc'CbcCrc
1044(<constant>V4L2_YCBCR_ENC_BT2020_CONST_LUM</constant>) encoding:</para>
1045 <variablelist>
1046 <varlistentry>
1047 <term>Luma:</term>
1048 <listitem>
1049 <para>Yc'&nbsp;=&nbsp;(0.2627R&nbsp;+&nbsp;0.6789G&nbsp;+&nbsp;0.0593B)'</para>
1050 </listitem>
1051 </varlistentry>
1052 </variablelist>
1053 <variablelist>
1054 <varlistentry>
1055 <term>B'&nbsp;-&nbsp;Yc'&nbsp;&le;&nbsp;0:</term>
1056 <listitem>
1057 <para>Cbc&nbsp;=&nbsp;(B'&nbsp;-&nbsp;Y')&nbsp;/&nbsp;1.9404</para>
1058 </listitem>
1059 </varlistentry>
1060 </variablelist>
1061 <variablelist>
1062 <varlistentry>
1063 <term>B'&nbsp;-&nbsp;Yc'&nbsp;&gt;&nbsp;0:</term>
1064 <listitem>
1065 <para>Cbc&nbsp;=&nbsp;(B'&nbsp;-&nbsp;Y')&nbsp;/&nbsp;1.5816</para>
1066 </listitem>
1067 </varlistentry>
1068 </variablelist>
1069 <variablelist>
1070 <varlistentry>
1071 <term>R'&nbsp;-&nbsp;Yc'&nbsp;&le;&nbsp;0:</term>
1072 <listitem>
1073 <para>Crc&nbsp;=&nbsp;(R'&nbsp;-&nbsp;Y')&nbsp;/&nbsp;1.7184</para>
1074 </listitem>
1075 </varlistentry>
1076 </variablelist>
1077 <variablelist>
1078 <varlistentry>
1079 <term>R'&nbsp;-&nbsp;Yc'&nbsp;&gt;&nbsp;0:</term>
1080 <listitem>
1081 <para>Crc&nbsp;=&nbsp;(R'&nbsp;-&nbsp;Y')&nbsp;/&nbsp;0.9936</para>
1082 </listitem>
1083 </varlistentry>
1084 </variablelist>
1085 <para>Yc' is clamped to the range [0&hellip;1] and Cbc and Crc are
1086clamped to the range [-0.5&hellip;0.5]. The Yc'CbcCrc quantization is limited range.</para>
1087 </section>
1088
1089 <section>
1090 <title id="col-smpte-240m">Colorspace SMPTE 240M (<constant>V4L2_COLORSPACE_SMPTE240M</constant>)</title>
1091 <para>The <xref linkend="smpte240m" /> standard was an interim standard used during the early days of HDTV (1988-1998).
1092It has been superseded by Rec. 709. The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_SMPTE240M</constant>.
1093The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and the
1094white reference are:</para>
1095 <table frame="none">
1096 <title>SMPTE 240M Chromaticities</title>
1097 <tgroup cols="3" align="left">
1098 &cs-str;
1099 <thead>
1100 <row>
1101 <entry>Color</entry>
1102 <entry>x</entry>
1103 <entry>y</entry>
1104 </row>
1105 </thead>
1106 <tbody valign="top">
1107 <row>
1108 <entry>Red</entry>
1109 <entry>0.630</entry>
1110 <entry>0.340</entry>
1111 </row>
1112 <row>
1113 <entry>Green</entry>
1114 <entry>0.310</entry>
1115 <entry>0.595</entry>
1116 </row>
1117 <row>
1118 <entry>Blue</entry>
1119 <entry>0.155</entry>
1120 <entry>0.070</entry>
1121 </row>
1122 <row>
1123 <entry>White Reference (D65)</entry>
1124 <entry>0.3127</entry>
1125 <entry>0.3290</entry>
1126 </row>
1127 </tbody>
1128 </tgroup>
1129 </table>
1130 <para>These chromaticities are identical to the SMPTE 170M colorspace.</para>
1131 <variablelist>
1132 <varlistentry>
1133 <term>Transfer function:</term>
1134 <listitem>
1135 <para>L' = 4L&nbsp;for&nbsp;0&nbsp;&le;&nbsp;L&nbsp;&lt;&nbsp;0.0228</para>
1136 <para>L' = 1.1115L<superscript>0.45</superscript>&nbsp;-&nbsp;0.1115&nbsp;for&nbsp;0.0228&nbsp;&le;&nbsp;L&nbsp;&le;&nbsp;1</para>
1137 </listitem>
1138 </varlistentry>
1139 <varlistentry>
1140 <term>Inverse Transfer function:</term>
1141 <listitem>
1142 <para>L = L'&nbsp;/&nbsp;4&nbsp;for&nbsp;0&nbsp;&le;&nbsp;L'&nbsp;&lt;&nbsp;0.0913</para>
1143 <para>L = ((L'&nbsp;+&nbsp;0.1115)&nbsp;/&nbsp;1.1115)<superscript>1/0.45</superscript>&nbsp;for&nbsp;L'&nbsp;&ge;&nbsp;0.0913</para>
1144 </listitem>
1145 </varlistentry>
1146 </variablelist>
1147 <variablelist>
1148 <varlistentry>
1149 <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the
1150following <constant>V4L2_YCBCR_ENC_SMPTE240M</constant> encoding:</term>
1151 <listitem>
1152 <para>Y'&nbsp;=&nbsp;0.2122R'&nbsp;+&nbsp;0.7013G'&nbsp;+&nbsp;0.0865B'</para>
1153 <para>Cb&nbsp;=&nbsp;-0.1161R'&nbsp;-&nbsp;0.3839G'&nbsp;+&nbsp;0.5B'</para>
1154 <para>Cr&nbsp;=&nbsp;0.5R'&nbsp;-&nbsp;0.4451G'&nbsp;-&nbsp;0.0549B'</para>
1155 </listitem>
1156 </varlistentry>
1157 </variablelist>
1158 <para>Yc' is clamped to the range [0&hellip;1] and Cbc and Crc are
1159clamped to the range [-0.5&hellip;0.5]. The Y'CbCr quantization is limited range.</para>
1160 </section>
1161
1162 <section>
1163 <title id="col-sysm">Colorspace NTSC 1953 (<constant>V4L2_COLORSPACE_470_SYSTEM_M</constant>)</title>
1164 <para>This standard defines the colorspace used by NTSC in 1953. In practice this
1165colorspace is obsolete and SMPTE 170M should be used instead. The default Y'CbCr encoding
1166is <constant>V4L2_YCBCR_ENC_601</constant>. The default Y'CbCr quantization is limited range.
1167The chromaticities of the primary colors and the white reference are:</para>
1168 <table frame="none">
1169 <title>NTSC 1953 Chromaticities</title>
1170 <tgroup cols="3" align="left">
1171 &cs-str;
1172 <thead>
1173 <row>
1174 <entry>Color</entry>
1175 <entry>x</entry>
1176 <entry>y</entry>
1177 </row>
1178 </thead>
1179 <tbody valign="top">
1180 <row>
1181 <entry>Red</entry>
1182 <entry>0.67</entry>
1183 <entry>0.33</entry>
1184 </row>
1185 <row>
1186 <entry>Green</entry>
1187 <entry>0.21</entry>
1188 <entry>0.71</entry>
1189 </row>
1190 <row>
1191 <entry>Blue</entry>
1192 <entry>0.14</entry>
1193 <entry>0.08</entry>
1194 </row>
1195 <row>
1196 <entry>White Reference (C)</entry>
1197 <entry>0.310</entry>
1198 <entry>0.316</entry>
1199 </row>
1200 </tbody>
1201 </tgroup>
1202 </table>
1203 <para>Note that this colorspace uses Illuminant C instead of D65 as the
1204white reference. To correctly convert an image in this colorspace to another
1205that uses D65 you need to apply a chromatic adaptation algorithm such as the
1206Bradford method.</para>
1207 <variablelist>
1208 <varlistentry>
1209 <term>The transfer function was never properly defined for NTSC 1953. The
1210Rec. 709 transfer function is recommended in the literature:</term>
1211 <listitem>
1212 <para>L' = 4.5L&nbsp;for&nbsp;0&nbsp;&le;&nbsp;L&nbsp;&lt;&nbsp;0.018</para>
1213 <para>L' = 1.099L<superscript>0.45</superscript>&nbsp;-&nbsp;0.099&nbsp;for&nbsp;0.018&nbsp;&le;&nbsp;L&nbsp;&le;&nbsp;1</para>
1214 </listitem>
1215 </varlistentry>
1216 <varlistentry>
1217 <term>Inverse Transfer function:</term>
1218 <listitem>
1219 <para>L = L'&nbsp;/&nbsp;4.5&nbsp;for&nbsp;L'&nbsp;&lt;&nbsp;0.081</para>
1220 <para>L = ((L'&nbsp;+&nbsp;0.099)&nbsp;/&nbsp;1.099)<superscript>1/0.45</superscript>&nbsp;for&nbsp;L'&nbsp;&ge;&nbsp;0.081</para>
1221 </listitem>
1222 </varlistentry>
1223 </variablelist>
1224 <variablelist>
1225 <varlistentry>
1226 <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the
1227following <constant>V4L2_YCBCR_ENC_601</constant> encoding:</term>
1228 <listitem>
1229 <para>Y'&nbsp;=&nbsp;0.299R'&nbsp;+&nbsp;0.587G'&nbsp;+&nbsp;0.114B'</para>
1230 <para>Cb&nbsp;=&nbsp;-0.169R'&nbsp;-&nbsp;0.331G'&nbsp;+&nbsp;0.5B'</para>
1231 <para>Cr&nbsp;=&nbsp;0.5R'&nbsp;-&nbsp;0.419G'&nbsp;-&nbsp;0.081B'</para>
1232 </listitem>
1233 </varlistentry>
1234 </variablelist>
1235 <para>Y' is clamped to the range [0&hellip;1] and Cb and Cr are
1236clamped to the range [-0.5&hellip;0.5]. The Y'CbCr quantization is limited range.
1237This transform is identical to one defined in SMPTE 170M/BT.601.</para>
1238 </section>
1239
1240 <section>
1241 <title id="col-sysbg">Colorspace EBU Tech. 3213 (<constant>V4L2_COLORSPACE_470_SYSTEM_BG</constant>)</title>
1242 <para>The <xref linkend="tech3213" /> standard defines the colorspace used by PAL/SECAM in 1975. In practice this
1243colorspace is obsolete and SMPTE 170M should be used instead. The default Y'CbCr encoding
1244is <constant>V4L2_YCBCR_ENC_601</constant>. The default Y'CbCr quantization is limited range.
1245The chromaticities of the primary colors and the white reference are:</para>
1246 <table frame="none">
1247 <title>EBU Tech. 3213 Chromaticities</title>
1248 <tgroup cols="3" align="left">
1249 &cs-str;
1250 <thead>
1251 <row>
1252 <entry>Color</entry>
1253 <entry>x</entry>
1254 <entry>y</entry>
1255 </row>
1256 </thead>
1257 <tbody valign="top">
1258 <row>
1259 <entry>Red</entry>
1260 <entry>0.64</entry>
1261 <entry>0.33</entry>
1262 </row>
1263 <row>
1264 <entry>Green</entry>
1265 <entry>0.29</entry>
1266 <entry>0.60</entry>
1267 </row>
1268 <row>
1269 <entry>Blue</entry>
1270 <entry>0.15</entry>
1271 <entry>0.06</entry>
1272 </row>
1273 <row>
1274 <entry>White Reference (D65)</entry>
1275 <entry>0.3127</entry>
1276 <entry>0.3290</entry>
1277 </row>
1278 </tbody>
1279 </tgroup>
1280 </table>
1281 <variablelist>
1282 <varlistentry>
1283 <term>The transfer function was never properly defined for this colorspace.
1284The Rec. 709 transfer function is recommended in the literature:</term>
1285 <listitem>
1286 <para>L' = 4.5L&nbsp;for&nbsp;0&nbsp;&le;&nbsp;L&nbsp;&lt;&nbsp;0.018</para>
1287 <para>L' = 1.099L<superscript>0.45</superscript>&nbsp;-&nbsp;0.099&nbsp;for&nbsp;0.018&nbsp;&le;&nbsp;L&nbsp;&le;&nbsp;1</para>
1288 </listitem>
1289 </varlistentry>
1290 <varlistentry>
1291 <term>Inverse Transfer function:</term>
1292 <listitem>
1293 <para>L = L'&nbsp;/&nbsp;4.5&nbsp;for&nbsp;L'&nbsp;&lt;&nbsp;0.081</para>
1294 <para>L = ((L'&nbsp;+&nbsp;0.099)&nbsp;/&nbsp;1.099)<superscript>1/0.45</superscript>&nbsp;for&nbsp;L'&nbsp;&ge;&nbsp;0.081</para>
1295 </listitem>
1296 </varlistentry>
1297 </variablelist>
1298 <variablelist>
1299 <varlistentry>
1300 <term>The luminance (Y') and color difference (Cb and Cr) are obtained with the
1301following <constant>V4L2_YCBCR_ENC_601</constant> encoding:</term>
1302 <listitem>
1303 <para>Y'&nbsp;=&nbsp;0.299R'&nbsp;+&nbsp;0.587G'&nbsp;+&nbsp;0.114B'</para>
1304 <para>Cb&nbsp;=&nbsp;-0.169R'&nbsp;-&nbsp;0.331G'&nbsp;+&nbsp;0.5B'</para>
1305 <para>Cr&nbsp;=&nbsp;0.5R'&nbsp;-&nbsp;0.419G'&nbsp;-&nbsp;0.081B'</para>
1306 </listitem>
1307 </varlistentry>
1308 </variablelist>
1309 <para>Y' is clamped to the range [0&hellip;1] and Cb and Cr are
1310clamped to the range [-0.5&hellip;0.5]. The Y'CbCr quantization is limited range.
1311This transform is identical to one defined in SMPTE 170M/BT.601.</para>
1312 </section>
1313
1314 <section>
1315 <title id="col-jpeg">Colorspace JPEG (<constant>V4L2_COLORSPACE_JPEG</constant>)</title>
1316 <para>This colorspace defines the colorspace used by most (Motion-)JPEG formats. The chromaticities
1317of the primary colors and the white reference are identical to sRGB. The Y'CbCr encoding is
1318<constant>V4L2_YCBCR_ENC_601</constant> with full range quantization where
1319Y' is scaled to [0&hellip;255] and Cb/Cr are scaled to [-128&hellip;128] and
1320then clipped to [-128&hellip;127].</para>
1321 <para>Note that the JPEG standard does not actually store colorspace information.
1322So if something other than sRGB is used, then the driver will have to set that information
1323explicitly. Effectively <constant>V4L2_COLORSPACE_JPEG</constant> can be considered to be
1324an abbreviation for <constant>V4L2_COLORSPACE_SRGB</constant>, <constant>V4L2_YCBCR_ENC_601</constant>
1325and <constant>V4L2_QUANTIZATION_FULL_RANGE</constant>.</para>
1326 </section>
1327
1328 </section>
1329
638 <section id="pixfmt-indexed"> 1330 <section id="pixfmt-indexed">
639 <title>Indexed Format</title> 1331 <title>Indexed Format</title>
640 1332
diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml
index 7502f784b8cc..d6d56fb6f9c0 100644
--- a/Documentation/DocBook/media/v4l/selections-common.xml
+++ b/Documentation/DocBook/media/v4l/selections-common.xml
@@ -63,6 +63,22 @@
63 <entry>Yes</entry> 63 <entry>Yes</entry>
64 </row> 64 </row>
65 <row> 65 <row>
66 <entry><constant>V4L2_SEL_TGT_NATIVE_SIZE</constant></entry>
67 <entry>0x0003</entry>
68 <entry>The native size of the device, e.g. a sensor's
69 pixel array. <structfield>left</structfield> and
70 <structfield>top</structfield> fields are zero for this
71 target. Setting the native size will generally only make
72 sense for memory to memory devices where the software can
73 create a canvas of a given size in which for example a
74 video frame can be composed. In that case
75 V4L2_SEL_TGT_NATIVE_SIZE can be used to configure the size
76 of that canvas.
77 </entry>
78 <entry>Yes</entry>
79 <entry>Yes</entry>
80 </row>
81 <row>
66 <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry> 82 <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry>
67 <entry>0x0100</entry> 83 <entry>0x0100</entry>
68 <entry>Compose rectangle. Used to configure scaling 84 <entry>Compose rectangle. Used to configure scaling
diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml
index b2d5a0363cba..c5ea868e3909 100644
--- a/Documentation/DocBook/media/v4l/subdev-formats.xml
+++ b/Documentation/DocBook/media/v4l/subdev-formats.xml
@@ -34,8 +34,24 @@
34 <xref linkend="colorspaces" /> for details.</entry> 34 <xref linkend="colorspaces" /> for details.</entry>
35 </row> 35 </row>
36 <row> 36 <row>
37 <entry>&v4l2-ycbcr-encoding;</entry>
38 <entry><structfield>ycbcr_enc</structfield></entry>
39 <entry>This information supplements the
40<structfield>colorspace</structfield> and must be set by the driver for
41capture streams and by the application for output streams,
42see <xref linkend="colorspaces" />.</entry>
43 </row>
44 <row>
45 <entry>&v4l2-quantization;</entry>
46 <entry><structfield>quantization</structfield></entry>
47 <entry>This information supplements the
48<structfield>colorspace</structfield> and must be set by the driver for
49capture streams and by the application for output streams,
50see <xref linkend="colorspaces" />.</entry>
51 </row>
52 <row>
37 <entry>__u32</entry> 53 <entry>__u32</entry>
38 <entry><structfield>reserved</structfield>[7]</entry> 54 <entry><structfield>reserved</structfield>[6]</entry>
39 <entry>Reserved for future extensions. Applications and drivers must 55 <entry>Reserved for future extensions. Applications and drivers must
40 set the array to zero.</entry> 56 set the array to zero.</entry>
41 </row> 57 </row>
@@ -86,7 +102,7 @@
86 green and 5-bit blue values padded on the high bit, transferred as 2 8-bit 102 green and 5-bit blue values padded on the high bit, transferred as 2 8-bit
87 samples per pixel with the most significant bits (padding, red and half of 103 samples per pixel with the most significant bits (padding, red and half of
88 the green value) transferred first will be named 104 the green value) transferred first will be named
89 <constant>V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE</constant>. 105 <constant>MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE</constant>.
90 </para> 106 </para>
91 107
92 <para>The following tables list existing packed RGB formats.</para> 108 <para>The following tables list existing packed RGB formats.</para>
@@ -176,8 +192,8 @@
176 </row> 192 </row>
177 </thead> 193 </thead>
178 <tbody valign="top"> 194 <tbody valign="top">
179 <row id="V4L2-MBUS-FMT-RGB444-2X8-PADHI-BE"> 195 <row id="MEDIA-BUS-FMT-RGB444-2X8-PADHI-BE">
180 <entry>V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE</entry> 196 <entry>MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE</entry>
181 <entry>0x1001</entry> 197 <entry>0x1001</entry>
182 <entry></entry> 198 <entry></entry>
183 &dash-ent-24; 199 &dash-ent-24;
@@ -204,8 +220,8 @@
204 <entry>b<subscript>1</subscript></entry> 220 <entry>b<subscript>1</subscript></entry>
205 <entry>b<subscript>0</subscript></entry> 221 <entry>b<subscript>0</subscript></entry>
206 </row> 222 </row>
207 <row id="V4L2-MBUS-FMT-RGB444-2X8-PADHI-LE"> 223 <row id="MEDIA-BUS-FMT-RGB444-2X8-PADHI-LE">
208 <entry>V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE</entry> 224 <entry>MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE</entry>
209 <entry>0x1002</entry> 225 <entry>0x1002</entry>
210 <entry></entry> 226 <entry></entry>
211 &dash-ent-24; 227 &dash-ent-24;
@@ -232,8 +248,8 @@
232 <entry>r<subscript>1</subscript></entry> 248 <entry>r<subscript>1</subscript></entry>
233 <entry>r<subscript>0</subscript></entry> 249 <entry>r<subscript>0</subscript></entry>
234 </row> 250 </row>
235 <row id="V4L2-MBUS-FMT-RGB555-2X8-PADHI-BE"> 251 <row id="MEDIA-BUS-FMT-RGB555-2X8-PADHI-BE">
236 <entry>V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE</entry> 252 <entry>MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE</entry>
237 <entry>0x1003</entry> 253 <entry>0x1003</entry>
238 <entry></entry> 254 <entry></entry>
239 &dash-ent-24; 255 &dash-ent-24;
@@ -260,8 +276,8 @@
260 <entry>b<subscript>1</subscript></entry> 276 <entry>b<subscript>1</subscript></entry>
261 <entry>b<subscript>0</subscript></entry> 277 <entry>b<subscript>0</subscript></entry>
262 </row> 278 </row>
263 <row id="V4L2-MBUS-FMT-RGB555-2X8-PADHI-LE"> 279 <row id="MEDIA-BUS-FMT-RGB555-2X8-PADHI-LE">
264 <entry>V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE</entry> 280 <entry>MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE</entry>
265 <entry>0x1004</entry> 281 <entry>0x1004</entry>
266 <entry></entry> 282 <entry></entry>
267 &dash-ent-24; 283 &dash-ent-24;
@@ -288,8 +304,8 @@
288 <entry>g<subscript>4</subscript></entry> 304 <entry>g<subscript>4</subscript></entry>
289 <entry>g<subscript>3</subscript></entry> 305 <entry>g<subscript>3</subscript></entry>
290 </row> 306 </row>
291 <row id="V4L2-MBUS-FMT-BGR565-2X8-BE"> 307 <row id="MEDIA-BUS-FMT-BGR565-2X8-BE">
292 <entry>V4L2_MBUS_FMT_BGR565_2X8_BE</entry> 308 <entry>MEDIA_BUS_FMT_BGR565_2X8_BE</entry>
293 <entry>0x1005</entry> 309 <entry>0x1005</entry>
294 <entry></entry> 310 <entry></entry>
295 &dash-ent-24; 311 &dash-ent-24;
@@ -316,8 +332,8 @@
316 <entry>r<subscript>1</subscript></entry> 332 <entry>r<subscript>1</subscript></entry>
317 <entry>r<subscript>0</subscript></entry> 333 <entry>r<subscript>0</subscript></entry>
318 </row> 334 </row>
319 <row id="V4L2-MBUS-FMT-BGR565-2X8-LE"> 335 <row id="MEDIA-BUS-FMT-BGR565-2X8-LE">
320 <entry>V4L2_MBUS_FMT_BGR565_2X8_LE</entry> 336 <entry>MEDIA_BUS_FMT_BGR565_2X8_LE</entry>
321 <entry>0x1006</entry> 337 <entry>0x1006</entry>
322 <entry></entry> 338 <entry></entry>
323 &dash-ent-24; 339 &dash-ent-24;
@@ -344,8 +360,8 @@
344 <entry>g<subscript>4</subscript></entry> 360 <entry>g<subscript>4</subscript></entry>
345 <entry>g<subscript>3</subscript></entry> 361 <entry>g<subscript>3</subscript></entry>
346 </row> 362 </row>
347 <row id="V4L2-MBUS-FMT-RGB565-2X8-BE"> 363 <row id="MEDIA-BUS-FMT-RGB565-2X8-BE">
348 <entry>V4L2_MBUS_FMT_RGB565_2X8_BE</entry> 364 <entry>MEDIA_BUS_FMT_RGB565_2X8_BE</entry>
349 <entry>0x1007</entry> 365 <entry>0x1007</entry>
350 <entry></entry> 366 <entry></entry>
351 &dash-ent-24; 367 &dash-ent-24;
@@ -372,8 +388,8 @@
372 <entry>b<subscript>1</subscript></entry> 388 <entry>b<subscript>1</subscript></entry>
373 <entry>b<subscript>0</subscript></entry> 389 <entry>b<subscript>0</subscript></entry>
374 </row> 390 </row>
375 <row id="V4L2-MBUS-FMT-RGB565-2X8-LE"> 391 <row id="MEDIA-BUS-FMT-RGB565-2X8-LE">
376 <entry>V4L2_MBUS_FMT_RGB565_2X8_LE</entry> 392 <entry>MEDIA_BUS_FMT_RGB565_2X8_LE</entry>
377 <entry>0x1008</entry> 393 <entry>0x1008</entry>
378 <entry></entry> 394 <entry></entry>
379 &dash-ent-24; 395 &dash-ent-24;
@@ -400,8 +416,8 @@
400 <entry>g<subscript>4</subscript></entry> 416 <entry>g<subscript>4</subscript></entry>
401 <entry>g<subscript>3</subscript></entry> 417 <entry>g<subscript>3</subscript></entry>
402 </row> 418 </row>
403 <row id="V4L2-MBUS-FMT-RGB666-1X18"> 419 <row id="MEDIA-BUS-FMT-RGB666-1X18">
404 <entry>V4L2_MBUS_FMT_RGB666_1X18</entry> 420 <entry>MEDIA_BUS_FMT_RGB666_1X18</entry>
405 <entry>0x1009</entry> 421 <entry>0x1009</entry>
406 <entry></entry> 422 <entry></entry>
407 &dash-ent-14; 423 &dash-ent-14;
@@ -424,8 +440,8 @@
424 <entry>b<subscript>1</subscript></entry> 440 <entry>b<subscript>1</subscript></entry>
425 <entry>b<subscript>0</subscript></entry> 441 <entry>b<subscript>0</subscript></entry>
426 </row> 442 </row>
427 <row id="V4L2-MBUS-FMT-RGB888-1X24"> 443 <row id="MEDIA-BUS-FMT-RGB888-1X24">
428 <entry>V4L2_MBUS_FMT_RGB888_1X24</entry> 444 <entry>MEDIA_BUS_FMT_RGB888_1X24</entry>
429 <entry>0x100a</entry> 445 <entry>0x100a</entry>
430 <entry></entry> 446 <entry></entry>
431 &dash-ent-8; 447 &dash-ent-8;
@@ -454,8 +470,8 @@
454 <entry>b<subscript>1</subscript></entry> 470 <entry>b<subscript>1</subscript></entry>
455 <entry>b<subscript>0</subscript></entry> 471 <entry>b<subscript>0</subscript></entry>
456 </row> 472 </row>
457 <row id="V4L2-MBUS-FMT-RGB888-2X12-BE"> 473 <row id="MEDIA-BUS-FMT-RGB888-2X12-BE">
458 <entry>V4L2_MBUS_FMT_RGB888_2X12_BE</entry> 474 <entry>MEDIA_BUS_FMT_RGB888_2X12_BE</entry>
459 <entry>0x100b</entry> 475 <entry>0x100b</entry>
460 <entry></entry> 476 <entry></entry>
461 &dash-ent-20; 477 &dash-ent-20;
@@ -490,8 +506,8 @@
490 <entry>b<subscript>1</subscript></entry> 506 <entry>b<subscript>1</subscript></entry>
491 <entry>b<subscript>0</subscript></entry> 507 <entry>b<subscript>0</subscript></entry>
492 </row> 508 </row>
493 <row id="V4L2-MBUS-FMT-RGB888-2X12-LE"> 509 <row id="MEDIA-BUS-FMT-RGB888-2X12-LE">
494 <entry>V4L2_MBUS_FMT_RGB888_2X12_LE</entry> 510 <entry>MEDIA_BUS_FMT_RGB888_2X12_LE</entry>
495 <entry>0x100c</entry> 511 <entry>0x100c</entry>
496 <entry></entry> 512 <entry></entry>
497 &dash-ent-20; 513 &dash-ent-20;
@@ -526,8 +542,8 @@
526 <entry>g<subscript>5</subscript></entry> 542 <entry>g<subscript>5</subscript></entry>
527 <entry>g<subscript>4</subscript></entry> 543 <entry>g<subscript>4</subscript></entry>
528 </row> 544 </row>
529 <row id="V4L2-MBUS-FMT-ARGB888-1X32"> 545 <row id="MEDIA-BUS-FMT-ARGB888-1X32">
530 <entry>V4L2_MBUS_FMT_ARGB888_1X32</entry> 546 <entry>MEDIA_BUS_FMT_ARGB888_1X32</entry>
531 <entry>0x100d</entry> 547 <entry>0x100d</entry>
532 <entry></entry> 548 <entry></entry>
533 <entry>a<subscript>7</subscript></entry> 549 <entry>a<subscript>7</subscript></entry>
@@ -600,7 +616,7 @@
600 <para>For instance, a format with uncompressed 10-bit Bayer components 616 <para>For instance, a format with uncompressed 10-bit Bayer components
601 arranged in a red, green, green, blue pattern transferred as 2 8-bit 617 arranged in a red, green, green, blue pattern transferred as 2 8-bit
602 samples per pixel with the least significant bits transferred first will 618 samples per pixel with the least significant bits transferred first will
603 be named <constant>V4L2_MBUS_FMT_SRGGB10_2X8_PADHI_LE</constant>. 619 be named <constant>MEDIA_BUS_FMT_SRGGB10_2X8_PADHI_LE</constant>.
604 </para> 620 </para>
605 621
606 <figure id="bayer-patterns"> 622 <figure id="bayer-patterns">
@@ -663,8 +679,8 @@
663 </row> 679 </row>
664 </thead> 680 </thead>
665 <tbody valign="top"> 681 <tbody valign="top">
666 <row id="V4L2-MBUS-FMT-SBGGR8-1X8"> 682 <row id="MEDIA-BUS-FMT-SBGGR8-1X8">
667 <entry>V4L2_MBUS_FMT_SBGGR8_1X8</entry> 683 <entry>MEDIA_BUS_FMT_SBGGR8_1X8</entry>
668 <entry>0x3001</entry> 684 <entry>0x3001</entry>
669 <entry></entry> 685 <entry></entry>
670 <entry>-</entry> 686 <entry>-</entry>
@@ -680,8 +696,8 @@
680 <entry>b<subscript>1</subscript></entry> 696 <entry>b<subscript>1</subscript></entry>
681 <entry>b<subscript>0</subscript></entry> 697 <entry>b<subscript>0</subscript></entry>
682 </row> 698 </row>
683 <row id="V4L2-MBUS-FMT-SGBRG8-1X8"> 699 <row id="MEDIA-BUS-FMT-SGBRG8-1X8">
684 <entry>V4L2_MBUS_FMT_SGBRG8_1X8</entry> 700 <entry>MEDIA_BUS_FMT_SGBRG8_1X8</entry>
685 <entry>0x3013</entry> 701 <entry>0x3013</entry>
686 <entry></entry> 702 <entry></entry>
687 <entry>-</entry> 703 <entry>-</entry>
@@ -697,8 +713,8 @@
697 <entry>g<subscript>1</subscript></entry> 713 <entry>g<subscript>1</subscript></entry>
698 <entry>g<subscript>0</subscript></entry> 714 <entry>g<subscript>0</subscript></entry>
699 </row> 715 </row>
700 <row id="V4L2-MBUS-FMT-SGRBG8-1X8"> 716 <row id="MEDIA-BUS-FMT-SGRBG8-1X8">
701 <entry>V4L2_MBUS_FMT_SGRBG8_1X8</entry> 717 <entry>MEDIA_BUS_FMT_SGRBG8_1X8</entry>
702 <entry>0x3002</entry> 718 <entry>0x3002</entry>
703 <entry></entry> 719 <entry></entry>
704 <entry>-</entry> 720 <entry>-</entry>
@@ -714,8 +730,8 @@
714 <entry>g<subscript>1</subscript></entry> 730 <entry>g<subscript>1</subscript></entry>
715 <entry>g<subscript>0</subscript></entry> 731 <entry>g<subscript>0</subscript></entry>
716 </row> 732 </row>
717 <row id="V4L2-MBUS-FMT-SRGGB8-1X8"> 733 <row id="MEDIA-BUS-FMT-SRGGB8-1X8">
718 <entry>V4L2_MBUS_FMT_SRGGB8_1X8</entry> 734 <entry>MEDIA_BUS_FMT_SRGGB8_1X8</entry>
719 <entry>0x3014</entry> 735 <entry>0x3014</entry>
720 <entry></entry> 736 <entry></entry>
721 <entry>-</entry> 737 <entry>-</entry>
@@ -731,8 +747,8 @@
731 <entry>r<subscript>1</subscript></entry> 747 <entry>r<subscript>1</subscript></entry>
732 <entry>r<subscript>0</subscript></entry> 748 <entry>r<subscript>0</subscript></entry>
733 </row> 749 </row>
734 <row id="V4L2-MBUS-FMT-SBGGR10-ALAW8-1X8"> 750 <row id="MEDIA-BUS-FMT-SBGGR10-ALAW8-1X8">
735 <entry>V4L2_MBUS_FMT_SBGGR10_ALAW8_1X8</entry> 751 <entry>MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8</entry>
736 <entry>0x3015</entry> 752 <entry>0x3015</entry>
737 <entry></entry> 753 <entry></entry>
738 <entry>-</entry> 754 <entry>-</entry>
@@ -748,8 +764,8 @@
748 <entry>b<subscript>1</subscript></entry> 764 <entry>b<subscript>1</subscript></entry>
749 <entry>b<subscript>0</subscript></entry> 765 <entry>b<subscript>0</subscript></entry>
750 </row> 766 </row>
751 <row id="V4L2-MBUS-FMT-SGBRG10-ALAW8-1X8"> 767 <row id="MEDIA-BUS-FMT-SGBRG10-ALAW8-1X8">
752 <entry>V4L2_MBUS_FMT_SGBRG10_ALAW8_1X8</entry> 768 <entry>MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8</entry>
753 <entry>0x3016</entry> 769 <entry>0x3016</entry>
754 <entry></entry> 770 <entry></entry>
755 <entry>-</entry> 771 <entry>-</entry>
@@ -765,8 +781,8 @@
765 <entry>g<subscript>1</subscript></entry> 781 <entry>g<subscript>1</subscript></entry>
766 <entry>g<subscript>0</subscript></entry> 782 <entry>g<subscript>0</subscript></entry>
767 </row> 783 </row>
768 <row id="V4L2-MBUS-FMT-SGRBG10-ALAW8-1X8"> 784 <row id="MEDIA-BUS-FMT-SGRBG10-ALAW8-1X8">
769 <entry>V4L2_MBUS_FMT_SGRBG10_ALAW8_1X8</entry> 785 <entry>MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8</entry>
770 <entry>0x3017</entry> 786 <entry>0x3017</entry>
771 <entry></entry> 787 <entry></entry>
772 <entry>-</entry> 788 <entry>-</entry>
@@ -782,8 +798,8 @@
782 <entry>g<subscript>1</subscript></entry> 798 <entry>g<subscript>1</subscript></entry>
783 <entry>g<subscript>0</subscript></entry> 799 <entry>g<subscript>0</subscript></entry>
784 </row> 800 </row>
785 <row id="V4L2-MBUS-FMT-SRGGB10-ALAW8-1X8"> 801 <row id="MEDIA-BUS-FMT-SRGGB10-ALAW8-1X8">
786 <entry>V4L2_MBUS_FMT_SRGGB10_ALAW8_1X8</entry> 802 <entry>MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8</entry>
787 <entry>0x3018</entry> 803 <entry>0x3018</entry>
788 <entry></entry> 804 <entry></entry>
789 <entry>-</entry> 805 <entry>-</entry>
@@ -799,8 +815,8 @@
799 <entry>r<subscript>1</subscript></entry> 815 <entry>r<subscript>1</subscript></entry>
800 <entry>r<subscript>0</subscript></entry> 816 <entry>r<subscript>0</subscript></entry>
801 </row> 817 </row>
802 <row id="V4L2-MBUS-FMT-SBGGR10-DPCM8-1X8"> 818 <row id="MEDIA-BUS-FMT-SBGGR10-DPCM8-1X8">
803 <entry>V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8</entry> 819 <entry>MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8</entry>
804 <entry>0x300b</entry> 820 <entry>0x300b</entry>
805 <entry></entry> 821 <entry></entry>
806 <entry>-</entry> 822 <entry>-</entry>
@@ -816,8 +832,8 @@
816 <entry>b<subscript>1</subscript></entry> 832 <entry>b<subscript>1</subscript></entry>
817 <entry>b<subscript>0</subscript></entry> 833 <entry>b<subscript>0</subscript></entry>
818 </row> 834 </row>
819 <row id="V4L2-MBUS-FMT-SGBRG10-DPCM8-1X8"> 835 <row id="MEDIA-BUS-FMT-SGBRG10-DPCM8-1X8">
820 <entry>V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8</entry> 836 <entry>MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8</entry>
821 <entry>0x300c</entry> 837 <entry>0x300c</entry>
822 <entry></entry> 838 <entry></entry>
823 <entry>-</entry> 839 <entry>-</entry>
@@ -833,8 +849,8 @@
833 <entry>g<subscript>1</subscript></entry> 849 <entry>g<subscript>1</subscript></entry>
834 <entry>g<subscript>0</subscript></entry> 850 <entry>g<subscript>0</subscript></entry>
835 </row> 851 </row>
836 <row id="V4L2-MBUS-FMT-SGRBG10-DPCM8-1X8"> 852 <row id="MEDIA-BUS-FMT-SGRBG10-DPCM8-1X8">
837 <entry>V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8</entry> 853 <entry>MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8</entry>
838 <entry>0x3009</entry> 854 <entry>0x3009</entry>
839 <entry></entry> 855 <entry></entry>
840 <entry>-</entry> 856 <entry>-</entry>
@@ -850,8 +866,8 @@
850 <entry>g<subscript>1</subscript></entry> 866 <entry>g<subscript>1</subscript></entry>
851 <entry>g<subscript>0</subscript></entry> 867 <entry>g<subscript>0</subscript></entry>
852 </row> 868 </row>
853 <row id="V4L2-MBUS-FMT-SRGGB10-DPCM8-1X8"> 869 <row id="MEDIA-BUS-FMT-SRGGB10-DPCM8-1X8">
854 <entry>V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8</entry> 870 <entry>MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8</entry>
855 <entry>0x300d</entry> 871 <entry>0x300d</entry>
856 <entry></entry> 872 <entry></entry>
857 <entry>-</entry> 873 <entry>-</entry>
@@ -867,8 +883,8 @@
867 <entry>r<subscript>1</subscript></entry> 883 <entry>r<subscript>1</subscript></entry>
868 <entry>r<subscript>0</subscript></entry> 884 <entry>r<subscript>0</subscript></entry>
869 </row> 885 </row>
870 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADHI-BE"> 886 <row id="MEDIA-BUS-FMT-SBGGR10-2X8-PADHI-BE">
871 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE</entry> 887 <entry>MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE</entry>
872 <entry>0x3003</entry> 888 <entry>0x3003</entry>
873 <entry></entry> 889 <entry></entry>
874 <entry>-</entry> 890 <entry>-</entry>
@@ -901,8 +917,8 @@
901 <entry>b<subscript>1</subscript></entry> 917 <entry>b<subscript>1</subscript></entry>
902 <entry>b<subscript>0</subscript></entry> 918 <entry>b<subscript>0</subscript></entry>
903 </row> 919 </row>
904 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADHI-LE"> 920 <row id="MEDIA-BUS-FMT-SBGGR10-2X8-PADHI-LE">
905 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE</entry> 921 <entry>MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE</entry>
906 <entry>0x3004</entry> 922 <entry>0x3004</entry>
907 <entry></entry> 923 <entry></entry>
908 <entry>-</entry> 924 <entry>-</entry>
@@ -935,8 +951,8 @@
935 <entry>b<subscript>9</subscript></entry> 951 <entry>b<subscript>9</subscript></entry>
936 <entry>b<subscript>8</subscript></entry> 952 <entry>b<subscript>8</subscript></entry>
937 </row> 953 </row>
938 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADLO-BE"> 954 <row id="MEDIA-BUS-FMT-SBGGR10-2X8-PADLO-BE">
939 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE</entry> 955 <entry>MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE</entry>
940 <entry>0x3005</entry> 956 <entry>0x3005</entry>
941 <entry></entry> 957 <entry></entry>
942 <entry>-</entry> 958 <entry>-</entry>
@@ -969,8 +985,8 @@
969 <entry>0</entry> 985 <entry>0</entry>
970 <entry>0</entry> 986 <entry>0</entry>
971 </row> 987 </row>
972 <row id="V4L2-MBUS-FMT-SBGGR10-2X8-PADLO-LE"> 988 <row id="MEDIA-BUS-FMT-SBGGR10-2X8-PADLO-LE">
973 <entry>V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE</entry> 989 <entry>MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE</entry>
974 <entry>0x3006</entry> 990 <entry>0x3006</entry>
975 <entry></entry> 991 <entry></entry>
976 <entry>-</entry> 992 <entry>-</entry>
@@ -1003,8 +1019,8 @@
1003 <entry>b<subscript>3</subscript></entry> 1019 <entry>b<subscript>3</subscript></entry>
1004 <entry>b<subscript>2</subscript></entry> 1020 <entry>b<subscript>2</subscript></entry>
1005 </row> 1021 </row>
1006 <row id="V4L2-MBUS-FMT-SBGGR10-1X10"> 1022 <row id="MEDIA-BUS-FMT-SBGGR10-1X10">
1007 <entry>V4L2_MBUS_FMT_SBGGR10_1X10</entry> 1023 <entry>MEDIA_BUS_FMT_SBGGR10_1X10</entry>
1008 <entry>0x3007</entry> 1024 <entry>0x3007</entry>
1009 <entry></entry> 1025 <entry></entry>
1010 <entry>-</entry> 1026 <entry>-</entry>
@@ -1020,8 +1036,8 @@
1020 <entry>b<subscript>1</subscript></entry> 1036 <entry>b<subscript>1</subscript></entry>
1021 <entry>b<subscript>0</subscript></entry> 1037 <entry>b<subscript>0</subscript></entry>
1022 </row> 1038 </row>
1023 <row id="V4L2-MBUS-FMT-SGBRG10-1X10"> 1039 <row id="MEDIA-BUS-FMT-SGBRG10-1X10">
1024 <entry>V4L2_MBUS_FMT_SGBRG10_1X10</entry> 1040 <entry>MEDIA_BUS_FMT_SGBRG10_1X10</entry>
1025 <entry>0x300e</entry> 1041 <entry>0x300e</entry>
1026 <entry></entry> 1042 <entry></entry>
1027 <entry>-</entry> 1043 <entry>-</entry>
@@ -1037,8 +1053,8 @@
1037 <entry>g<subscript>1</subscript></entry> 1053 <entry>g<subscript>1</subscript></entry>
1038 <entry>g<subscript>0</subscript></entry> 1054 <entry>g<subscript>0</subscript></entry>
1039 </row> 1055 </row>
1040 <row id="V4L2-MBUS-FMT-SGRBG10-1X10"> 1056 <row id="MEDIA-BUS-FMT-SGRBG10-1X10">
1041 <entry>V4L2_MBUS_FMT_SGRBG10_1X10</entry> 1057 <entry>MEDIA_BUS_FMT_SGRBG10_1X10</entry>
1042 <entry>0x300a</entry> 1058 <entry>0x300a</entry>
1043 <entry></entry> 1059 <entry></entry>
1044 <entry>-</entry> 1060 <entry>-</entry>
@@ -1054,8 +1070,8 @@
1054 <entry>g<subscript>1</subscript></entry> 1070 <entry>g<subscript>1</subscript></entry>
1055 <entry>g<subscript>0</subscript></entry> 1071 <entry>g<subscript>0</subscript></entry>
1056 </row> 1072 </row>
1057 <row id="V4L2-MBUS-FMT-SRGGB10-1X10"> 1073 <row id="MEDIA-BUS-FMT-SRGGB10-1X10">
1058 <entry>V4L2_MBUS_FMT_SRGGB10_1X10</entry> 1074 <entry>MEDIA_BUS_FMT_SRGGB10_1X10</entry>
1059 <entry>0x300f</entry> 1075 <entry>0x300f</entry>
1060 <entry></entry> 1076 <entry></entry>
1061 <entry>-</entry> 1077 <entry>-</entry>
@@ -1071,8 +1087,8 @@
1071 <entry>r<subscript>1</subscript></entry> 1087 <entry>r<subscript>1</subscript></entry>
1072 <entry>r<subscript>0</subscript></entry> 1088 <entry>r<subscript>0</subscript></entry>
1073 </row> 1089 </row>
1074 <row id="V4L2-MBUS-FMT-SBGGR12-1X12"> 1090 <row id="MEDIA-BUS-FMT-SBGGR12-1X12">
1075 <entry>V4L2_MBUS_FMT_SBGGR12_1X12</entry> 1091 <entry>MEDIA_BUS_FMT_SBGGR12_1X12</entry>
1076 <entry>0x3008</entry> 1092 <entry>0x3008</entry>
1077 <entry></entry> 1093 <entry></entry>
1078 <entry>b<subscript>11</subscript></entry> 1094 <entry>b<subscript>11</subscript></entry>
@@ -1088,8 +1104,8 @@
1088 <entry>b<subscript>1</subscript></entry> 1104 <entry>b<subscript>1</subscript></entry>
1089 <entry>b<subscript>0</subscript></entry> 1105 <entry>b<subscript>0</subscript></entry>
1090 </row> 1106 </row>
1091 <row id="V4L2-MBUS-FMT-SGBRG12-1X12"> 1107 <row id="MEDIA-BUS-FMT-SGBRG12-1X12">
1092 <entry>V4L2_MBUS_FMT_SGBRG12_1X12</entry> 1108 <entry>MEDIA_BUS_FMT_SGBRG12_1X12</entry>
1093 <entry>0x3010</entry> 1109 <entry>0x3010</entry>
1094 <entry></entry> 1110 <entry></entry>
1095 <entry>g<subscript>11</subscript></entry> 1111 <entry>g<subscript>11</subscript></entry>
@@ -1105,8 +1121,8 @@
1105 <entry>g<subscript>1</subscript></entry> 1121 <entry>g<subscript>1</subscript></entry>
1106 <entry>g<subscript>0</subscript></entry> 1122 <entry>g<subscript>0</subscript></entry>
1107 </row> 1123 </row>
1108 <row id="V4L2-MBUS-FMT-SGRBG12-1X12"> 1124 <row id="MEDIA-BUS-FMT-SGRBG12-1X12">
1109 <entry>V4L2_MBUS_FMT_SGRBG12_1X12</entry> 1125 <entry>MEDIA_BUS_FMT_SGRBG12_1X12</entry>
1110 <entry>0x3011</entry> 1126 <entry>0x3011</entry>
1111 <entry></entry> 1127 <entry></entry>
1112 <entry>g<subscript>11</subscript></entry> 1128 <entry>g<subscript>11</subscript></entry>
@@ -1122,8 +1138,8 @@
1122 <entry>g<subscript>1</subscript></entry> 1138 <entry>g<subscript>1</subscript></entry>
1123 <entry>g<subscript>0</subscript></entry> 1139 <entry>g<subscript>0</subscript></entry>
1124 </row> 1140 </row>
1125 <row id="V4L2-MBUS-FMT-SRGGB12-1X12"> 1141 <row id="MEDIA-BUS-FMT-SRGGB12-1X12">
1126 <entry>V4L2_MBUS_FMT_SRGGB12_1X12</entry> 1142 <entry>MEDIA_BUS_FMT_SRGGB12_1X12</entry>
1127 <entry>0x3012</entry> 1143 <entry>0x3012</entry>
1128 <entry></entry> 1144 <entry></entry>
1129 <entry>r<subscript>11</subscript></entry> 1145 <entry>r<subscript>11</subscript></entry>
@@ -1175,7 +1191,7 @@
1175 1191
1176 <para>For instance, a format where pixels are encoded as 8-bit YUV values 1192 <para>For instance, a format where pixels are encoded as 8-bit YUV values
1177 downsampled to 4:2:2 and transferred as 2 8-bit bus samples per pixel in the 1193 downsampled to 4:2:2 and transferred as 2 8-bit bus samples per pixel in the
1178 U, Y, V, Y order will be named <constant>V4L2_MBUS_FMT_UYVY8_2X8</constant>. 1194 U, Y, V, Y order will be named <constant>MEDIA_BUS_FMT_UYVY8_2X8</constant>.
1179 </para> 1195 </para>
1180 1196
1181 <para><xref linkend="v4l2-mbus-pixelcode-yuv8"/> lists existing packed YUV 1197 <para><xref linkend="v4l2-mbus-pixelcode-yuv8"/> lists existing packed YUV
@@ -1280,8 +1296,8 @@
1280 </row> 1296 </row>
1281 </thead> 1297 </thead>
1282 <tbody valign="top"> 1298 <tbody valign="top">
1283 <row id="V4L2-MBUS-FMT-Y8-1X8"> 1299 <row id="MEDIA-BUS-FMT-Y8-1X8">
1284 <entry>V4L2_MBUS_FMT_Y8_1X8</entry> 1300 <entry>MEDIA_BUS_FMT_Y8_1X8</entry>
1285 <entry>0x2001</entry> 1301 <entry>0x2001</entry>
1286 <entry></entry> 1302 <entry></entry>
1287 &dash-ent-24; 1303 &dash-ent-24;
@@ -1294,8 +1310,8 @@
1294 <entry>y<subscript>1</subscript></entry> 1310 <entry>y<subscript>1</subscript></entry>
1295 <entry>y<subscript>0</subscript></entry> 1311 <entry>y<subscript>0</subscript></entry>
1296 </row> 1312 </row>
1297 <row id="V4L2-MBUS-FMT-UV8-1X8"> 1313 <row id="MEDIA-BUS-FMT-UV8-1X8">
1298 <entry>V4L2_MBUS_FMT_UV8_1X8</entry> 1314 <entry>MEDIA_BUS_FMT_UV8_1X8</entry>
1299 <entry>0x2015</entry> 1315 <entry>0x2015</entry>
1300 <entry></entry> 1316 <entry></entry>
1301 &dash-ent-24; 1317 &dash-ent-24;
@@ -1322,8 +1338,8 @@
1322 <entry>v<subscript>1</subscript></entry> 1338 <entry>v<subscript>1</subscript></entry>
1323 <entry>v<subscript>0</subscript></entry> 1339 <entry>v<subscript>0</subscript></entry>
1324 </row> 1340 </row>
1325 <row id="V4L2-MBUS-FMT-UYVY8-1_5X8"> 1341 <row id="MEDIA-BUS-FMT-UYVY8-1_5X8">
1326 <entry>V4L2_MBUS_FMT_UYVY8_1_5X8</entry> 1342 <entry>MEDIA_BUS_FMT_UYVY8_1_5X8</entry>
1327 <entry>0x2002</entry> 1343 <entry>0x2002</entry>
1328 <entry></entry> 1344 <entry></entry>
1329 &dash-ent-24; 1345 &dash-ent-24;
@@ -1406,8 +1422,8 @@
1406 <entry>y<subscript>1</subscript></entry> 1422 <entry>y<subscript>1</subscript></entry>
1407 <entry>y<subscript>0</subscript></entry> 1423 <entry>y<subscript>0</subscript></entry>
1408 </row> 1424 </row>
1409 <row id="V4L2-MBUS-FMT-VYUY8-1_5X8"> 1425 <row id="MEDIA-BUS-FMT-VYUY8-1_5X8">
1410 <entry>V4L2_MBUS_FMT_VYUY8_1_5X8</entry> 1426 <entry>MEDIA_BUS_FMT_VYUY8_1_5X8</entry>
1411 <entry>0x2003</entry> 1427 <entry>0x2003</entry>
1412 <entry></entry> 1428 <entry></entry>
1413 &dash-ent-24; 1429 &dash-ent-24;
@@ -1490,8 +1506,8 @@
1490 <entry>y<subscript>1</subscript></entry> 1506 <entry>y<subscript>1</subscript></entry>
1491 <entry>y<subscript>0</subscript></entry> 1507 <entry>y<subscript>0</subscript></entry>
1492 </row> 1508 </row>
1493 <row id="V4L2-MBUS-FMT-YUYV8-1_5X8"> 1509 <row id="MEDIA-BUS-FMT-YUYV8-1_5X8">
1494 <entry>V4L2_MBUS_FMT_YUYV8_1_5X8</entry> 1510 <entry>MEDIA_BUS_FMT_YUYV8_1_5X8</entry>
1495 <entry>0x2004</entry> 1511 <entry>0x2004</entry>
1496 <entry></entry> 1512 <entry></entry>
1497 &dash-ent-24; 1513 &dash-ent-24;
@@ -1574,8 +1590,8 @@
1574 <entry>v<subscript>1</subscript></entry> 1590 <entry>v<subscript>1</subscript></entry>
1575 <entry>v<subscript>0</subscript></entry> 1591 <entry>v<subscript>0</subscript></entry>
1576 </row> 1592 </row>
1577 <row id="V4L2-MBUS-FMT-YVYU8-1_5X8"> 1593 <row id="MEDIA-BUS-FMT-YVYU8-1_5X8">
1578 <entry>V4L2_MBUS_FMT_YVYU8_1_5X8</entry> 1594 <entry>MEDIA_BUS_FMT_YVYU8_1_5X8</entry>
1579 <entry>0x2005</entry> 1595 <entry>0x2005</entry>
1580 <entry></entry> 1596 <entry></entry>
1581 &dash-ent-24; 1597 &dash-ent-24;
@@ -1658,8 +1674,8 @@
1658 <entry>u<subscript>1</subscript></entry> 1674 <entry>u<subscript>1</subscript></entry>
1659 <entry>u<subscript>0</subscript></entry> 1675 <entry>u<subscript>0</subscript></entry>
1660 </row> 1676 </row>
1661 <row id="V4L2-MBUS-FMT-UYVY8-2X8"> 1677 <row id="MEDIA-BUS-FMT-UYVY8-2X8">
1662 <entry>V4L2_MBUS_FMT_UYVY8_2X8</entry> 1678 <entry>MEDIA_BUS_FMT_UYVY8_2X8</entry>
1663 <entry>0x2006</entry> 1679 <entry>0x2006</entry>
1664 <entry></entry> 1680 <entry></entry>
1665 &dash-ent-24; 1681 &dash-ent-24;
@@ -1714,8 +1730,8 @@
1714 <entry>y<subscript>1</subscript></entry> 1730 <entry>y<subscript>1</subscript></entry>
1715 <entry>y<subscript>0</subscript></entry> 1731 <entry>y<subscript>0</subscript></entry>
1716 </row> 1732 </row>
1717 <row id="V4L2-MBUS-FMT-VYUY8-2X8"> 1733 <row id="MEDIA-BUS-FMT-VYUY8-2X8">
1718 <entry>V4L2_MBUS_FMT_VYUY8_2X8</entry> 1734 <entry>MEDIA_BUS_FMT_VYUY8_2X8</entry>
1719 <entry>0x2007</entry> 1735 <entry>0x2007</entry>
1720 <entry></entry> 1736 <entry></entry>
1721 &dash-ent-24; 1737 &dash-ent-24;
@@ -1770,8 +1786,8 @@
1770 <entry>y<subscript>1</subscript></entry> 1786 <entry>y<subscript>1</subscript></entry>
1771 <entry>y<subscript>0</subscript></entry> 1787 <entry>y<subscript>0</subscript></entry>
1772 </row> 1788 </row>
1773 <row id="V4L2-MBUS-FMT-YUYV8-2X8"> 1789 <row id="MEDIA-BUS-FMT-YUYV8-2X8">
1774 <entry>V4L2_MBUS_FMT_YUYV8_2X8</entry> 1790 <entry>MEDIA_BUS_FMT_YUYV8_2X8</entry>
1775 <entry>0x2008</entry> 1791 <entry>0x2008</entry>
1776 <entry></entry> 1792 <entry></entry>
1777 &dash-ent-24; 1793 &dash-ent-24;
@@ -1826,8 +1842,8 @@
1826 <entry>v<subscript>1</subscript></entry> 1842 <entry>v<subscript>1</subscript></entry>
1827 <entry>v<subscript>0</subscript></entry> 1843 <entry>v<subscript>0</subscript></entry>
1828 </row> 1844 </row>
1829 <row id="V4L2-MBUS-FMT-YVYU8-2X8"> 1845 <row id="MEDIA-BUS-FMT-YVYU8-2X8">
1830 <entry>V4L2_MBUS_FMT_YVYU8_2X8</entry> 1846 <entry>MEDIA_BUS_FMT_YVYU8_2X8</entry>
1831 <entry>0x2009</entry> 1847 <entry>0x2009</entry>
1832 <entry></entry> 1848 <entry></entry>
1833 &dash-ent-24; 1849 &dash-ent-24;
@@ -1882,8 +1898,8 @@
1882 <entry>u<subscript>1</subscript></entry> 1898 <entry>u<subscript>1</subscript></entry>
1883 <entry>u<subscript>0</subscript></entry> 1899 <entry>u<subscript>0</subscript></entry>
1884 </row> 1900 </row>
1885 <row id="V4L2-MBUS-FMT-Y10-1X10"> 1901 <row id="MEDIA-BUS-FMT-Y10-1X10">
1886 <entry>V4L2_MBUS_FMT_Y10_1X10</entry> 1902 <entry>MEDIA_BUS_FMT_Y10_1X10</entry>
1887 <entry>0x200a</entry> 1903 <entry>0x200a</entry>
1888 <entry></entry> 1904 <entry></entry>
1889 &dash-ent-22; 1905 &dash-ent-22;
@@ -1898,8 +1914,8 @@
1898 <entry>y<subscript>1</subscript></entry> 1914 <entry>y<subscript>1</subscript></entry>
1899 <entry>y<subscript>0</subscript></entry> 1915 <entry>y<subscript>0</subscript></entry>
1900 </row> 1916 </row>
1901 <row id="V4L2-MBUS-FMT-UYVY10-2X10"> 1917 <row id="MEDIA-BUS-FMT-UYVY10-2X10">
1902 <entry>V4L2_MBUS_FMT_UYVY10_2X10</entry> 1918 <entry>MEDIA_BUS_FMT_UYVY10_2X10</entry>
1903 <entry>0x2018</entry> 1919 <entry>0x2018</entry>
1904 <entry></entry> 1920 <entry></entry>
1905 &dash-ent-22; 1921 &dash-ent-22;
@@ -1962,8 +1978,8 @@
1962 <entry>y<subscript>1</subscript></entry> 1978 <entry>y<subscript>1</subscript></entry>
1963 <entry>y<subscript>0</subscript></entry> 1979 <entry>y<subscript>0</subscript></entry>
1964 </row> 1980 </row>
1965 <row id="V4L2-MBUS-FMT-VYUY10-2X10"> 1981 <row id="MEDIA-BUS-FMT-VYUY10-2X10">
1966 <entry>V4L2_MBUS_FMT_VYUY10_2X10</entry> 1982 <entry>MEDIA_BUS_FMT_VYUY10_2X10</entry>
1967 <entry>0x2019</entry> 1983 <entry>0x2019</entry>
1968 <entry></entry> 1984 <entry></entry>
1969 &dash-ent-22; 1985 &dash-ent-22;
@@ -2026,8 +2042,8 @@
2026 <entry>y<subscript>1</subscript></entry> 2042 <entry>y<subscript>1</subscript></entry>
2027 <entry>y<subscript>0</subscript></entry> 2043 <entry>y<subscript>0</subscript></entry>
2028 </row> 2044 </row>
2029 <row id="V4L2-MBUS-FMT-YUYV10-2X10"> 2045 <row id="MEDIA-BUS-FMT-YUYV10-2X10">
2030 <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry> 2046 <entry>MEDIA_BUS_FMT_YUYV10_2X10</entry>
2031 <entry>0x200b</entry> 2047 <entry>0x200b</entry>
2032 <entry></entry> 2048 <entry></entry>
2033 &dash-ent-22; 2049 &dash-ent-22;
@@ -2090,8 +2106,8 @@
2090 <entry>v<subscript>1</subscript></entry> 2106 <entry>v<subscript>1</subscript></entry>
2091 <entry>v<subscript>0</subscript></entry> 2107 <entry>v<subscript>0</subscript></entry>
2092 </row> 2108 </row>
2093 <row id="V4L2-MBUS-FMT-YVYU10-2X10"> 2109 <row id="MEDIA-BUS-FMT-YVYU10-2X10">
2094 <entry>V4L2_MBUS_FMT_YVYU10_2X10</entry> 2110 <entry>MEDIA_BUS_FMT_YVYU10_2X10</entry>
2095 <entry>0x200c</entry> 2111 <entry>0x200c</entry>
2096 <entry></entry> 2112 <entry></entry>
2097 &dash-ent-22; 2113 &dash-ent-22;
@@ -2154,8 +2170,8 @@
2154 <entry>u<subscript>1</subscript></entry> 2170 <entry>u<subscript>1</subscript></entry>
2155 <entry>u<subscript>0</subscript></entry> 2171 <entry>u<subscript>0</subscript></entry>
2156 </row> 2172 </row>
2157 <row id="V4L2-MBUS-FMT-Y12-1X12"> 2173 <row id="MEDIA-BUS-FMT-Y12-1X12">
2158 <entry>V4L2_MBUS_FMT_Y12_1X12</entry> 2174 <entry>MEDIA_BUS_FMT_Y12_1X12</entry>
2159 <entry>0x2013</entry> 2175 <entry>0x2013</entry>
2160 <entry></entry> 2176 <entry></entry>
2161 &dash-ent-20; 2177 &dash-ent-20;
@@ -2172,8 +2188,8 @@
2172 <entry>y<subscript>1</subscript></entry> 2188 <entry>y<subscript>1</subscript></entry>
2173 <entry>y<subscript>0</subscript></entry> 2189 <entry>y<subscript>0</subscript></entry>
2174 </row> 2190 </row>
2175 <row id="V4L2-MBUS-FMT-UYVY8-1X16"> 2191 <row id="MEDIA-BUS-FMT-UYVY8-1X16">
2176 <entry>V4L2_MBUS_FMT_UYVY8_1X16</entry> 2192 <entry>MEDIA_BUS_FMT_UYVY8_1X16</entry>
2177 <entry>0x200f</entry> 2193 <entry>0x200f</entry>
2178 <entry></entry> 2194 <entry></entry>
2179 &dash-ent-16; 2195 &dash-ent-16;
@@ -2216,8 +2232,8 @@
2216 <entry>y<subscript>1</subscript></entry> 2232 <entry>y<subscript>1</subscript></entry>
2217 <entry>y<subscript>0</subscript></entry> 2233 <entry>y<subscript>0</subscript></entry>
2218 </row> 2234 </row>
2219 <row id="V4L2-MBUS-FMT-VYUY8-1X16"> 2235 <row id="MEDIA-BUS-FMT-VYUY8-1X16">
2220 <entry>V4L2_MBUS_FMT_VYUY8_1X16</entry> 2236 <entry>MEDIA_BUS_FMT_VYUY8_1X16</entry>
2221 <entry>0x2010</entry> 2237 <entry>0x2010</entry>
2222 <entry></entry> 2238 <entry></entry>
2223 &dash-ent-16; 2239 &dash-ent-16;
@@ -2260,8 +2276,8 @@
2260 <entry>y<subscript>1</subscript></entry> 2276 <entry>y<subscript>1</subscript></entry>
2261 <entry>y<subscript>0</subscript></entry> 2277 <entry>y<subscript>0</subscript></entry>
2262 </row> 2278 </row>
2263 <row id="V4L2-MBUS-FMT-YUYV8-1X16"> 2279 <row id="MEDIA-BUS-FMT-YUYV8-1X16">
2264 <entry>V4L2_MBUS_FMT_YUYV8_1X16</entry> 2280 <entry>MEDIA_BUS_FMT_YUYV8_1X16</entry>
2265 <entry>0x2011</entry> 2281 <entry>0x2011</entry>
2266 <entry></entry> 2282 <entry></entry>
2267 &dash-ent-16; 2283 &dash-ent-16;
@@ -2304,8 +2320,8 @@
2304 <entry>v<subscript>1</subscript></entry> 2320 <entry>v<subscript>1</subscript></entry>
2305 <entry>v<subscript>0</subscript></entry> 2321 <entry>v<subscript>0</subscript></entry>
2306 </row> 2322 </row>
2307 <row id="V4L2-MBUS-FMT-YVYU8-1X16"> 2323 <row id="MEDIA-BUS-FMT-YVYU8-1X16">
2308 <entry>V4L2_MBUS_FMT_YVYU8_1X16</entry> 2324 <entry>MEDIA_BUS_FMT_YVYU8_1X16</entry>
2309 <entry>0x2012</entry> 2325 <entry>0x2012</entry>
2310 <entry></entry> 2326 <entry></entry>
2311 &dash-ent-16; 2327 &dash-ent-16;
@@ -2348,8 +2364,8 @@
2348 <entry>u<subscript>1</subscript></entry> 2364 <entry>u<subscript>1</subscript></entry>
2349 <entry>u<subscript>0</subscript></entry> 2365 <entry>u<subscript>0</subscript></entry>
2350 </row> 2366 </row>
2351 <row id="V4L2-MBUS-FMT-YDYUYDYV8-1X16"> 2367 <row id="MEDIA-BUS-FMT-YDYUYDYV8-1X16">
2352 <entry>V4L2_MBUS_FMT_YDYUYDYV8_1X16</entry> 2368 <entry>MEDIA_BUS_FMT_YDYUYDYV8_1X16</entry>
2353 <entry>0x2014</entry> 2369 <entry>0x2014</entry>
2354 <entry></entry> 2370 <entry></entry>
2355 &dash-ent-16; 2371 &dash-ent-16;
@@ -2436,8 +2452,8 @@
2436 <entry>v<subscript>1</subscript></entry> 2452 <entry>v<subscript>1</subscript></entry>
2437 <entry>v<subscript>0</subscript></entry> 2453 <entry>v<subscript>0</subscript></entry>
2438 </row> 2454 </row>
2439 <row id="V4L2-MBUS-FMT-UYVY10-1X20"> 2455 <row id="MEDIA-BUS-FMT-UYVY10-1X20">
2440 <entry>V4L2_MBUS_FMT_UYVY10_1X20</entry> 2456 <entry>MEDIA_BUS_FMT_UYVY10_1X20</entry>
2441 <entry>0x201a</entry> 2457 <entry>0x201a</entry>
2442 <entry></entry> 2458 <entry></entry>
2443 &dash-ent-12; 2459 &dash-ent-12;
@@ -2488,8 +2504,8 @@
2488 <entry>y<subscript>1</subscript></entry> 2504 <entry>y<subscript>1</subscript></entry>
2489 <entry>y<subscript>0</subscript></entry> 2505 <entry>y<subscript>0</subscript></entry>
2490 </row> 2506 </row>
2491 <row id="V4L2-MBUS-FMT-VYUY10-1X20"> 2507 <row id="MEDIA-BUS-FMT-VYUY10-1X20">
2492 <entry>V4L2_MBUS_FMT_VYUY10_1X20</entry> 2508 <entry>MEDIA_BUS_FMT_VYUY10_1X20</entry>
2493 <entry>0x201b</entry> 2509 <entry>0x201b</entry>
2494 <entry></entry> 2510 <entry></entry>
2495 &dash-ent-12; 2511 &dash-ent-12;
@@ -2540,8 +2556,8 @@
2540 <entry>y<subscript>1</subscript></entry> 2556 <entry>y<subscript>1</subscript></entry>
2541 <entry>y<subscript>0</subscript></entry> 2557 <entry>y<subscript>0</subscript></entry>
2542 </row> 2558 </row>
2543 <row id="V4L2-MBUS-FMT-YUYV10-1X20"> 2559 <row id="MEDIA-BUS-FMT-YUYV10-1X20">
2544 <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry> 2560 <entry>MEDIA_BUS_FMT_YUYV10_1X20</entry>
2545 <entry>0x200d</entry> 2561 <entry>0x200d</entry>
2546 <entry></entry> 2562 <entry></entry>
2547 &dash-ent-12; 2563 &dash-ent-12;
@@ -2592,8 +2608,8 @@
2592 <entry>v<subscript>1</subscript></entry> 2608 <entry>v<subscript>1</subscript></entry>
2593 <entry>v<subscript>0</subscript></entry> 2609 <entry>v<subscript>0</subscript></entry>
2594 </row> 2610 </row>
2595 <row id="V4L2-MBUS-FMT-YVYU10-1X20"> 2611 <row id="MEDIA-BUS-FMT-YVYU10-1X20">
2596 <entry>V4L2_MBUS_FMT_YVYU10_1X20</entry> 2612 <entry>MEDIA_BUS_FMT_YVYU10_1X20</entry>
2597 <entry>0x200e</entry> 2613 <entry>0x200e</entry>
2598 <entry></entry> 2614 <entry></entry>
2599 &dash-ent-12; 2615 &dash-ent-12;
@@ -2644,8 +2660,8 @@
2644 <entry>u<subscript>1</subscript></entry> 2660 <entry>u<subscript>1</subscript></entry>
2645 <entry>u<subscript>0</subscript></entry> 2661 <entry>u<subscript>0</subscript></entry>
2646 </row> 2662 </row>
2647 <row id="V4L2-MBUS-FMT-YUV10-1X30"> 2663 <row id="MEDIA-BUS-FMT-YUV10-1X30">
2648 <entry>V4L2_MBUS_FMT_YUV10_1X30</entry> 2664 <entry>MEDIA_BUS_FMT_YUV10_1X30</entry>
2649 <entry>0x2016</entry> 2665 <entry>0x2016</entry>
2650 <entry></entry> 2666 <entry></entry>
2651 <entry>-</entry> 2667 <entry>-</entry>
@@ -2681,8 +2697,8 @@
2681 <entry>v<subscript>1</subscript></entry> 2697 <entry>v<subscript>1</subscript></entry>
2682 <entry>v<subscript>0</subscript></entry> 2698 <entry>v<subscript>0</subscript></entry>
2683 </row> 2699 </row>
2684 <row id="V4L2-MBUS-FMT-AYUV8-1X32"> 2700 <row id="MEDIA-BUS-FMT-AYUV8-1X32">
2685 <entry>V4L2_MBUS_FMT_AYUV8_1X32</entry> 2701 <entry>MEDIA_BUS_FMT_AYUV8_1X32</entry>
2686 <entry>0x2017</entry> 2702 <entry>0x2017</entry>
2687 <entry></entry> 2703 <entry></entry>
2688 <entry>a<subscript>7</subscript></entry> 2704 <entry>a<subscript>7</subscript></entry>
@@ -2718,8 +2734,8 @@
2718 <entry>v<subscript>1</subscript></entry> 2734 <entry>v<subscript>1</subscript></entry>
2719 <entry>v<subscript>0</subscript></entry> 2735 <entry>v<subscript>0</subscript></entry>
2720 </row> 2736 </row>
2721 <row id="V4L2-MBUS-FMT-UYVY12-2X12"> 2737 <row id="MEDIA-BUS-FMT-UYVY12-2X12">
2722 <entry>V4L2_MBUS_FMT_UYVY12_2X12</entry> 2738 <entry>MEDIA_BUS_FMT_UYVY12_2X12</entry>
2723 <entry>0x201c</entry> 2739 <entry>0x201c</entry>
2724 <entry></entry> 2740 <entry></entry>
2725 &dash-ent-20; 2741 &dash-ent-20;
@@ -2790,8 +2806,8 @@
2790 <entry>y<subscript>1</subscript></entry> 2806 <entry>y<subscript>1</subscript></entry>
2791 <entry>y<subscript>0</subscript></entry> 2807 <entry>y<subscript>0</subscript></entry>
2792 </row> 2808 </row>
2793 <row id="V4L2-MBUS-FMT-VYUY12-2X12"> 2809 <row id="MEDIA-BUS-FMT-VYUY12-2X12">
2794 <entry>V4L2_MBUS_FMT_VYUY12_2X12</entry> 2810 <entry>MEDIA_BUS_FMT_VYUY12_2X12</entry>
2795 <entry>0x201d</entry> 2811 <entry>0x201d</entry>
2796 <entry></entry> 2812 <entry></entry>
2797 &dash-ent-20; 2813 &dash-ent-20;
@@ -2862,8 +2878,8 @@
2862 <entry>y<subscript>1</subscript></entry> 2878 <entry>y<subscript>1</subscript></entry>
2863 <entry>y<subscript>0</subscript></entry> 2879 <entry>y<subscript>0</subscript></entry>
2864 </row> 2880 </row>
2865 <row id="V4L2-MBUS-FMT-YUYV12-2X12"> 2881 <row id="MEDIA-BUS-FMT-YUYV12-2X12">
2866 <entry>V4L2_MBUS_FMT_YUYV12_2X12</entry> 2882 <entry>MEDIA_BUS_FMT_YUYV12_2X12</entry>
2867 <entry>0x201e</entry> 2883 <entry>0x201e</entry>
2868 <entry></entry> 2884 <entry></entry>
2869 &dash-ent-20; 2885 &dash-ent-20;
@@ -2934,8 +2950,8 @@
2934 <entry>v<subscript>1</subscript></entry> 2950 <entry>v<subscript>1</subscript></entry>
2935 <entry>v<subscript>0</subscript></entry> 2951 <entry>v<subscript>0</subscript></entry>
2936 </row> 2952 </row>
2937 <row id="V4L2-MBUS-FMT-YVYU12-2X12"> 2953 <row id="MEDIA-BUS-FMT-YVYU12-2X12">
2938 <entry>V4L2_MBUS_FMT_YVYU12_2X12</entry> 2954 <entry>MEDIA_BUS_FMT_YVYU12_2X12</entry>
2939 <entry>0x201f</entry> 2955 <entry>0x201f</entry>
2940 <entry></entry> 2956 <entry></entry>
2941 &dash-ent-20; 2957 &dash-ent-20;
@@ -3006,8 +3022,8 @@
3006 <entry>u<subscript>1</subscript></entry> 3022 <entry>u<subscript>1</subscript></entry>
3007 <entry>u<subscript>0</subscript></entry> 3023 <entry>u<subscript>0</subscript></entry>
3008 </row> 3024 </row>
3009 <row id="V4L2-MBUS-FMT-UYVY12-1X24"> 3025 <row id="MEDIA-BUS-FMT-UYVY12-1X24">
3010 <entry>V4L2_MBUS_FMT_UYVY12_1X24</entry> 3026 <entry>MEDIA_BUS_FMT_UYVY12_1X24</entry>
3011 <entry>0x2020</entry> 3027 <entry>0x2020</entry>
3012 <entry></entry> 3028 <entry></entry>
3013 &dash-ent-8; 3029 &dash-ent-8;
@@ -3066,8 +3082,8 @@
3066 <entry>y<subscript>1</subscript></entry> 3082 <entry>y<subscript>1</subscript></entry>
3067 <entry>y<subscript>0</subscript></entry> 3083 <entry>y<subscript>0</subscript></entry>
3068 </row> 3084 </row>
3069 <row id="V4L2-MBUS-FMT-VYUY12-1X24"> 3085 <row id="MEDIA-BUS-FMT-VYUY12-1X24">
3070 <entry>V4L2_MBUS_FMT_VYUY12_1X24</entry> 3086 <entry>MEDIA_BUS_FMT_VYUY12_1X24</entry>
3071 <entry>0x2021</entry> 3087 <entry>0x2021</entry>
3072 <entry></entry> 3088 <entry></entry>
3073 &dash-ent-8; 3089 &dash-ent-8;
@@ -3126,8 +3142,8 @@
3126 <entry>y<subscript>1</subscript></entry> 3142 <entry>y<subscript>1</subscript></entry>
3127 <entry>y<subscript>0</subscript></entry> 3143 <entry>y<subscript>0</subscript></entry>
3128 </row> 3144 </row>
3129 <row id="V4L2-MBUS-FMT-YUYV12-1X24"> 3145 <row id="MEDIA-BUS-FMT-YUYV12-1X24">
3130 <entry>V4L2_MBUS_FMT_YUYV12_1X24</entry> 3146 <entry>MEDIA_BUS_FMT_YUYV12_1X24</entry>
3131 <entry>0x2022</entry> 3147 <entry>0x2022</entry>
3132 <entry></entry> 3148 <entry></entry>
3133 &dash-ent-8; 3149 &dash-ent-8;
@@ -3186,8 +3202,8 @@
3186 <entry>v<subscript>1</subscript></entry> 3202 <entry>v<subscript>1</subscript></entry>
3187 <entry>v<subscript>0</subscript></entry> 3203 <entry>v<subscript>0</subscript></entry>
3188 </row> 3204 </row>
3189 <row id="V4L2-MBUS-FMT-YVYU12-1X24"> 3205 <row id="MEDIA-BUS-FMT-YVYU12-1X24">
3190 <entry>V4L2_MBUS_FMT_YVYU12_1X24</entry> 3206 <entry>MEDIA_BUS_FMT_YVYU12_1X24</entry>
3191 <entry>0x2023</entry> 3207 <entry>0x2023</entry>
3192 <entry></entry> 3208 <entry></entry>
3193 &dash-ent-8; 3209 &dash-ent-8;
@@ -3366,8 +3382,8 @@
3366 </row> 3382 </row>
3367 </thead> 3383 </thead>
3368 <tbody valign="top"> 3384 <tbody valign="top">
3369 <row id="V4L2-MBUS-FMT-AHSV8888-1X32"> 3385 <row id="MEDIA-BUS-FMT-AHSV8888-1X32">
3370 <entry>V4L2_MBUS_FMT_AHSV8888_1X32</entry> 3386 <entry>MEDIA_BUS_FMT_AHSV8888_1X32</entry>
3371 <entry>0x6001</entry> 3387 <entry>0x6001</entry>
3372 <entry></entry> 3388 <entry></entry>
3373 <entry>a<subscript>7</subscript></entry> 3389 <entry>a<subscript>7</subscript></entry>
@@ -3422,7 +3438,7 @@
3422 </para> 3438 </para>
3423 3439
3424 <para>For instance, for a JPEG baseline process and an 8-bit bus width 3440 <para>For instance, for a JPEG baseline process and an 8-bit bus width
3425 the format will be named <constant>V4L2_MBUS_FMT_JPEG_1X8</constant>. 3441 the format will be named <constant>MEDIA_BUS_FMT_JPEG_1X8</constant>.
3426 </para> 3442 </para>
3427 3443
3428 <para>The following table lists existing JPEG compressed formats.</para> 3444 <para>The following table lists existing JPEG compressed formats.</para>
@@ -3441,8 +3457,8 @@
3441 </row> 3457 </row>
3442 </thead> 3458 </thead>
3443 <tbody valign="top"> 3459 <tbody valign="top">
3444 <row id="V4L2-MBUS-FMT-JPEG-1X8"> 3460 <row id="MEDIA-BUS-FMT-JPEG-1X8">
3445 <entry>V4L2_MBUS_FMT_JPEG_1X8</entry> 3461 <entry>MEDIA_BUS_FMT_JPEG_1X8</entry>
3446 <entry>0x4001</entry> 3462 <entry>0x4001</entry>
3447 <entry>Besides of its usage for the parallel bus this format is 3463 <entry>Besides of its usage for the parallel bus this format is
3448 recommended for transmission of JPEG data over MIPI CSI bus 3464 recommended for transmission of JPEG data over MIPI CSI bus
@@ -3484,8 +3500,8 @@ interface and may change in the future.</para>
3484 </row> 3500 </row>
3485 </thead> 3501 </thead>
3486 <tbody valign="top"> 3502 <tbody valign="top">
3487 <row id="V4L2-MBUS-FMT-S5C-UYVY-JPEG-1X8"> 3503 <row id="MEDIA-BUS-FMT-S5C-UYVY-JPEG-1X8">
3488 <entry>V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8</entry> 3504 <entry>MEDIA_BUS_FMT_S5C_UYVY_JPEG_1X8</entry>
3489 <entry>0x5001</entry> 3505 <entry>0x5001</entry>
3490 <entry> 3506 <entry>
3491 Interleaved raw UYVY and JPEG image format with embedded 3507 Interleaved raw UYVY and JPEG image format with embedded
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index 7cfe618f754d..ac0f8d9d2a49 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -152,6 +152,15 @@ structs, ioctls) must be noted in more detail in the history chapter
152applications. --> 152applications. -->
153 153
154 <revision> 154 <revision>
155 <revnumber>3.19</revnumber>
156 <date>2014-12-05</date>
157 <authorinitials>hv</authorinitials>
158 <revremark>Rewrote Colorspace chapter, added new &v4l2-ycbcr-encoding; and &v4l2-quantization; fields
159to &v4l2-pix-format;, &v4l2-pix-format-mplane; and &v4l2-mbus-framefmt;.
160 </revremark>
161 </revision>
162
163 <revision>
155 <revnumber>3.17</revnumber> 164 <revnumber>3.17</revnumber>
156 <date>2014-08-04</date> 165 <date>2014-08-04</date>
157 <authorinitials>lp, hv</authorinitials> 166 <authorinitials>lp, hv</authorinitials>
@@ -539,7 +548,7 @@ and discussions on the V4L mailing list.</revremark>
539</partinfo> 548</partinfo>
540 549
541<title>Video for Linux Two API Specification</title> 550<title>Video for Linux Two API Specification</title>
542 <subtitle>Revision 3.17</subtitle> 551 <subtitle>Revision 3.19</subtitle>
543 552
544 <chapter id="common"> 553 <chapter id="common">
545 &sub-common; 554 &sub-common;
diff --git a/Documentation/DocBook/media/v4l/vidioc-enuminput.xml b/Documentation/DocBook/media/v4l/vidioc-enuminput.xml
index 493a39a8ef21..603fecef9083 100644
--- a/Documentation/DocBook/media/v4l/vidioc-enuminput.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-enuminput.xml
@@ -287,6 +287,14 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
287 <entry>0x00000004</entry> 287 <entry>0x00000004</entry>
288 <entry>This input supports setting the TV standard by using VIDIOC_S_STD.</entry> 288 <entry>This input supports setting the TV standard by using VIDIOC_S_STD.</entry>
289 </row> 289 </row>
290 <row>
291 <entry><constant>V4L2_IN_CAP_NATIVE_SIZE</constant></entry>
292 <entry>0x00000008</entry>
293 <entry>This input supports setting the native size using
294 the <constant>V4L2_SEL_TGT_NATIVE_SIZE</constant>
295 selection target, see <xref
296 linkend="v4l2-selections-common"/>.</entry>
297 </row>
290 </tbody> 298 </tbody>
291 </tgroup> 299 </tgroup>
292 </table> 300 </table>
diff --git a/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml b/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml
index 2654e097df39..773fb1258c24 100644
--- a/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml
@@ -172,6 +172,14 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
172 <entry>0x00000004</entry> 172 <entry>0x00000004</entry>
173 <entry>This output supports setting the TV standard by using VIDIOC_S_STD.</entry> 173 <entry>This output supports setting the TV standard by using VIDIOC_S_STD.</entry>
174 </row> 174 </row>
175 <row>
176 <entry><constant>V4L2_OUT_CAP_NATIVE_SIZE</constant></entry>
177 <entry>0x00000008</entry>
178 <entry>This output supports setting the native size using
179 the <constant>V4L2_SEL_TGT_NATIVE_SIZE</constant>
180 selection target, see <xref
181 linkend="v4l2-selections-common"/>.</entry>
182 </row>
175 </tbody> 183 </tbody>
176 </tgroup> 184 </tgroup>
177 </table> 185 </table>
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index bbe9c1fd5cef..1fdc246e4256 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -540,7 +540,7 @@ appears in sysfs.
540</para></listitem> 540</para></listitem>
541 541
542<listitem><para> 542<listitem><para>
543<varname>unsigned long size</varname>: Fill in the size of the 543<varname>resource_size_t size</varname>: Fill in the size of the
544memory block that <varname>addr</varname> points to. If <varname>size</varname> 544memory block that <varname>addr</varname> points to. If <varname>size</varname>
545is zero, the mapping is considered unused. Note that you 545is zero, the mapping is considered unused. Note that you
546<emphasis>must</emphasis> initialize <varname>size</varname> with zero for 546<emphasis>must</emphasis> initialize <varname>size</varname> with zero for
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index 784793df81ed..84ef6a90131c 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -3658,6 +3658,29 @@ struct _snd_pcm_runtime {
3658 </para> 3658 </para>
3659 3659
3660 <para> 3660 <para>
3661 The above callback can be simplified with a helper function,
3662 <function>snd_ctl_enum_info</function>. The final code
3663 looks like below.
3664 (You can pass ARRAY_SIZE(texts) instead of 4 in the third
3665 argument; it's a matter of taste.)
3666
3667 <informalexample>
3668 <programlisting>
3669<![CDATA[
3670 static int snd_myctl_enum_info(struct snd_kcontrol *kcontrol,
3671 struct snd_ctl_elem_info *uinfo)
3672 {
3673 static char *texts[4] = {
3674 "First", "Second", "Third", "Fourth"
3675 };
3676 return snd_ctl_enum_info(uinfo, 1, 4, texts);
3677 }
3678]]>
3679 </programlisting>
3680 </informalexample>
3681 </para>
3682
3683 <para>
3661 Some common info callbacks are available for your convenience: 3684 Some common info callbacks are available for your convenience:
3662 <function>snd_ctl_boolean_mono_info()</function> and 3685 <function>snd_ctl_boolean_mono_info()</function> and
3663 <function>snd_ctl_boolean_stereo_info()</function>. 3686 <function>snd_ctl_boolean_stereo_info()</function>.
diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt
index f13c9132e9f2..653d5d739d7f 100644
--- a/Documentation/IPMI.txt
+++ b/Documentation/IPMI.txt
@@ -42,7 +42,13 @@ The driver interface depends on your hardware. If your system
42properly provides the SMBIOS info for IPMI, the driver will detect it 42properly provides the SMBIOS info for IPMI, the driver will detect it
43and just work. If you have a board with a standard interface (These 43and just work. If you have a board with a standard interface (These
44will generally be either "KCS", "SMIC", or "BT", consult your hardware 44will generally be either "KCS", "SMIC", or "BT", consult your hardware
45manual), choose the 'IPMI SI handler' option. 45manual), choose the 'IPMI SI handler' option. A driver also exists
46for direct I2C access to the IPMI management controller. Some boards
47support this, but it is unknown if it will work on every board. For
48this, choose 'IPMI SMBus handler', but be ready to try to do some
49figuring to see if it will work on your system if the SMBIOS/APCI
50information is wrong or not present. It is fairly safe to have both
51these enabled and let the drivers auto-detect what is present.
46 52
47You should generally enable ACPI on your system, as systems with IPMI 53You should generally enable ACPI on your system, as systems with IPMI
48can have ACPI tables describing them. 54can have ACPI tables describing them.
@@ -52,7 +58,8 @@ their job correctly, the IPMI controller should be automatically
52detected (via ACPI or SMBIOS tables) and should just work. Sadly, 58detected (via ACPI or SMBIOS tables) and should just work. Sadly,
53many boards do not have this information. The driver attempts 59many boards do not have this information. The driver attempts
54standard defaults, but they may not work. If you fall into this 60standard defaults, but they may not work. If you fall into this
55situation, you need to read the section below named 'The SI Driver'. 61situation, you need to read the section below named 'The SI Driver' or
62"The SMBus Driver" on how to hand-configure your system.
56 63
57IPMI defines a standard watchdog timer. You can enable this with the 64IPMI defines a standard watchdog timer. You can enable this with the
58'IPMI Watchdog Timer' config option. If you compile the driver into 65'IPMI Watchdog Timer' config option. If you compile the driver into
@@ -97,7 +104,12 @@ driver, each open file for this device ties in to the message handler
97as an IPMI user. 104as an IPMI user.
98 105
99ipmi_si - A driver for various system interfaces. This supports KCS, 106ipmi_si - A driver for various system interfaces. This supports KCS,
100SMIC, and BT interfaces. 107SMIC, and BT interfaces. Unless you have an SMBus interface or your
108own custom interface, you probably need to use this.
109
110ipmi_ssif - A driver for accessing BMCs on the SMBus. It uses the
111I2C kernel driver's SMBus interfaces to send and receive IPMI messages
112over the SMBus.
101 113
102ipmi_watchdog - IPMI requires systems to have a very capable watchdog 114ipmi_watchdog - IPMI requires systems to have a very capable watchdog
103timer. This driver implements the standard Linux watchdog timer 115timer. This driver implements the standard Linux watchdog timer
@@ -476,6 +488,62 @@ for specifying an interface. Note that when removing an interface,
476only the first three parameters (si type, address type, and address) 488only the first three parameters (si type, address type, and address)
477are used for the comparison. Any options are ignored for removing. 489are used for the comparison. Any options are ignored for removing.
478 490
491The SMBus Driver (SSIF)
492-----------------------
493
494The SMBus driver allows up to 4 SMBus devices to be configured in the
495system. By default, the driver will only register with something it
496finds in DMI or ACPI tables. You can change this
497at module load time (for a module) with:
498
499 modprobe ipmi_ssif.o
500 addr=<i2caddr1>[,<i2caddr2>[,...]]
501 adapter=<adapter1>[,<adapter2>[...]]
502 dbg=<flags1>,<flags2>...
503 slave_addrs=<addr1>,<addr2>,...
504 [dbg_probe=1]
505
506The addresses are normal I2C addresses. The adapter is the string
507name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name.
508It is *NOT* i2c-<n> itself.
509
510The debug flags are bit flags for each BMC found, they are:
511IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8
512
513Setting dbg_probe to 1 will enable debugging of the probing and
514detection process for BMCs on the SMBusses.
515
516The slave_addrs specifies the IPMI address of the local BMC. This is
517usually 0x20 and the driver defaults to that, but in case it's not, it
518can be specified when the driver starts up.
519
520Discovering the IPMI compliant BMC on the SMBus can cause devices on
521the I2C bus to fail. The SMBus driver writes a "Get Device ID" IPMI
522message as a block write to the I2C bus and waits for a response.
523This action can be detrimental to some I2C devices. It is highly
524recommended that the known I2C address be given to the SMBus driver in
525the smb_addr parameter unless you have DMI or ACPI data to tell the
526driver what to use.
527
528When compiled into the kernel, the addresses can be specified on the
529kernel command line as:
530
531 ipmb_ssif.addr=<i2caddr1>[,<i2caddr2>[...]]
532 ipmi_ssif.adapter=<adapter1>[,<adapter2>[...]]
533 ipmi_ssif.dbg=<flags1>[,<flags2>[...]]
534 ipmi_ssif.dbg_probe=1
535 ipmi_ssif.slave_addrs=<addr1>[,<addr2>[...]]
536
537These are the same options as on the module command line.
538
539The I2C driver does not support non-blocking access or polling, so
540this driver cannod to IPMI panic events, extend the watchdog at panic
541time, or other panic-related IPMI functions without special kernel
542patches and driver modifications. You can get those at the openipmi
543web page.
544
545The driver supports a hot add and remove of interfaces through the I2C
546sysfs interface.
479 547
480Other Pieces 548Other Pieces
481------------ 549------------
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt
index 8a8b82c9ca53..39cfa72732ff 100644
--- a/Documentation/IRQ-domain.txt
+++ b/Documentation/IRQ-domain.txt
@@ -151,3 +151,74 @@ used and no descriptor gets allocated it is very important to make sure
151that the driver using the simple domain call irq_create_mapping() 151that the driver using the simple domain call irq_create_mapping()
152before any irq_find_mapping() since the latter will actually work 152before any irq_find_mapping() since the latter will actually work
153for the static IRQ assignment case. 153for the static IRQ assignment case.
154
155==== Hierarchy IRQ domain ====
156On some architectures, there may be multiple interrupt controllers
157involved in delivering an interrupt from the device to the target CPU.
158Let's look at a typical interrupt delivering path on x86 platforms:
159
160Device --> IOAPIC -> Interrupt remapping Controller -> Local APIC -> CPU
161
162There are three interrupt controllers involved:
1631) IOAPIC controller
1642) Interrupt remapping controller
1653) Local APIC controller
166
167To support such a hardware topology and make software architecture match
168hardware architecture, an irq_domain data structure is built for each
169interrupt controller and those irq_domains are organized into hierarchy.
170When building irq_domain hierarchy, the irq_domain near to the device is
171child and the irq_domain near to CPU is parent. So a hierarchy structure
172as below will be built for the example above.
173 CPU Vector irq_domain (root irq_domain to manage CPU vectors)
174 ^
175 |
176 Interrupt Remapping irq_domain (manage irq_remapping entries)
177 ^
178 |
179 IOAPIC irq_domain (manage IOAPIC delivery entries/pins)
180
181There are four major interfaces to use hierarchy irq_domain:
1821) irq_domain_alloc_irqs(): allocate IRQ descriptors and interrupt
183 controller related resources to deliver these interrupts.
1842) irq_domain_free_irqs(): free IRQ descriptors and interrupt controller
185 related resources associated with these interrupts.
1863) irq_domain_activate_irq(): activate interrupt controller hardware to
187 deliver the interrupt.
1883) irq_domain_deactivate_irq(): deactivate interrupt controller hardware
189 to stop delivering the interrupt.
190
191Following changes are needed to support hierarchy irq_domain.
1921) a new field 'parent' is added to struct irq_domain; it's used to
193 maintain irq_domain hierarchy information.
1942) a new field 'parent_data' is added to struct irq_data; it's used to
195 build hierarchy irq_data to match hierarchy irq_domains. The irq_data
196 is used to store irq_domain pointer and hardware irq number.
1973) new callbacks are added to struct irq_domain_ops to support hierarchy
198 irq_domain operations.
199
200With support of hierarchy irq_domain and hierarchy irq_data ready, an
201irq_domain structure is built for each interrupt controller, and an
202irq_data structure is allocated for each irq_domain associated with an
203IRQ. Now we could go one step further to support stacked(hierarchy)
204irq_chip. That is, an irq_chip is associated with each irq_data along
205the hierarchy. A child irq_chip may implement a required action by
206itself or by cooperating with its parent irq_chip.
207
208With stacked irq_chip, interrupt controller driver only needs to deal
209with the hardware managed by itself and may ask for services from its
210parent irq_chip when needed. So we could achieve a much cleaner
211software architecture.
212
213For an interrupt controller driver to support hierarchy irq_domain, it
214needs to:
2151) Implement irq_domain_ops.alloc and irq_domain_ops.free
2162) Optionally implement irq_domain_ops.activate and
217 irq_domain_ops.deactivate.
2183) Optionally implement an irq_chip to manage the interrupt controller
219 hardware.
2204) No need to implement irq_domain_ops.map and irq_domain_ops.unmap,
221 they are unused with hierarchy irq_domain.
222
223Hierarchy irq_domain may also be used to support other architectures,
224such as ARM, ARM64 etc.
diff --git a/Documentation/RCU/rcu.txt b/Documentation/RCU/rcu.txt
index bf778332a28f..745f429fda79 100644
--- a/Documentation/RCU/rcu.txt
+++ b/Documentation/RCU/rcu.txt
@@ -36,7 +36,7 @@ o How can the updater tell when a grace period has completed
36 executed in user mode, or executed in the idle loop, we can 36 executed in user mode, or executed in the idle loop, we can
37 safely free up that item. 37 safely free up that item.
38 38
39 Preemptible variants of RCU (CONFIG_TREE_PREEMPT_RCU) get the 39 Preemptible variants of RCU (CONFIG_PREEMPT_RCU) get the
40 same effect, but require that the readers manipulate CPU-local 40 same effect, but require that the readers manipulate CPU-local
41 counters. These counters allow limited types of blocking within 41 counters. These counters allow limited types of blocking within
42 RCU read-side critical sections. SRCU also uses CPU-local 42 RCU read-side critical sections. SRCU also uses CPU-local
@@ -81,7 +81,7 @@ o I hear that RCU is patented? What is with that?
81o I hear that RCU needs work in order to support realtime kernels? 81o I hear that RCU needs work in order to support realtime kernels?
82 82
83 This work is largely completed. Realtime-friendly RCU can be 83 This work is largely completed. Realtime-friendly RCU can be
84 enabled via the CONFIG_TREE_PREEMPT_RCU kernel configuration 84 enabled via the CONFIG_PREEMPT_RCU kernel configuration
85 parameter. However, work is in progress for enabling priority 85 parameter. However, work is in progress for enabling priority
86 boosting of preempted RCU read-side critical sections. This is 86 boosting of preempted RCU read-side critical sections. This is
87 needed if you have CPU-bound realtime threads. 87 needed if you have CPU-bound realtime threads.
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
index ef5a2fd4ff70..ed186a902d31 100644
--- a/Documentation/RCU/stallwarn.txt
+++ b/Documentation/RCU/stallwarn.txt
@@ -26,12 +26,6 @@ CONFIG_RCU_CPU_STALL_TIMEOUT
26 Stall-warning messages may be enabled and disabled completely via 26 Stall-warning messages may be enabled and disabled completely via
27 /sys/module/rcupdate/parameters/rcu_cpu_stall_suppress. 27 /sys/module/rcupdate/parameters/rcu_cpu_stall_suppress.
28 28
29CONFIG_RCU_CPU_STALL_VERBOSE
30
31 This kernel configuration parameter causes the stall warning to
32 also dump the stacks of any tasks that are blocking the current
33 RCU-preempt grace period.
34
35CONFIG_RCU_CPU_STALL_INFO 29CONFIG_RCU_CPU_STALL_INFO
36 30
37 This kernel configuration parameter causes the stall warning to 31 This kernel configuration parameter causes the stall warning to
@@ -77,7 +71,7 @@ This message indicates that CPU 5 detected that it was causing a stall,
77and that the stall was affecting RCU-sched. This message will normally be 71and that the stall was affecting RCU-sched. This message will normally be
78followed by a stack dump of the offending CPU. On TREE_RCU kernel builds, 72followed by a stack dump of the offending CPU. On TREE_RCU kernel builds,
79RCU and RCU-sched are implemented by the same underlying mechanism, 73RCU and RCU-sched are implemented by the same underlying mechanism,
80while on TREE_PREEMPT_RCU kernel builds, RCU is instead implemented 74while on PREEMPT_RCU kernel builds, RCU is instead implemented
81by rcu_preempt_state. 75by rcu_preempt_state.
82 76
83On the other hand, if the offending CPU fails to print out a stall-warning 77On the other hand, if the offending CPU fails to print out a stall-warning
@@ -89,7 +83,7 @@ INFO: rcu_bh_state detected stalls on CPUs/tasks: { 3 5 } (detected by 2, 2502 j
89This message indicates that CPU 2 detected that CPUs 3 and 5 were both 83This message indicates that CPU 2 detected that CPUs 3 and 5 were both
90causing stalls, and that the stall was affecting RCU-bh. This message 84causing stalls, and that the stall was affecting RCU-bh. This message
91will normally be followed by stack dumps for each CPU. Please note that 85will normally be followed by stack dumps for each CPU. Please note that
92TREE_PREEMPT_RCU builds can be stalled by tasks as well as by CPUs, 86PREEMPT_RCU builds can be stalled by tasks as well as by CPUs,
93and that the tasks will be indicated by PID, for example, "P3421". 87and that the tasks will be indicated by PID, for example, "P3421".
94It is even possible for a rcu_preempt_state stall to be caused by both 88It is even possible for a rcu_preempt_state stall to be caused by both
95CPUs -and- tasks, in which case the offending CPUs and tasks will all 89CPUs -and- tasks, in which case the offending CPUs and tasks will all
@@ -205,10 +199,10 @@ o A CPU-bound real-time task in a CONFIG_PREEMPT kernel, which might
205o A CPU-bound real-time task in a CONFIG_PREEMPT_RT kernel that 199o A CPU-bound real-time task in a CONFIG_PREEMPT_RT kernel that
206 is running at a higher priority than the RCU softirq threads. 200 is running at a higher priority than the RCU softirq threads.
207 This will prevent RCU callbacks from ever being invoked, 201 This will prevent RCU callbacks from ever being invoked,
208 and in a CONFIG_TREE_PREEMPT_RCU kernel will further prevent 202 and in a CONFIG_PREEMPT_RCU kernel will further prevent
209 RCU grace periods from ever completing. Either way, the 203 RCU grace periods from ever completing. Either way, the
210 system will eventually run out of memory and hang. In the 204 system will eventually run out of memory and hang. In the
211 CONFIG_TREE_PREEMPT_RCU case, you might see stall-warning 205 CONFIG_PREEMPT_RCU case, you might see stall-warning
212 messages. 206 messages.
213 207
214o A hardware or software issue shuts off the scheduler-clock 208o A hardware or software issue shuts off the scheduler-clock
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index 910870b15acd..b63b9bb3bc0c 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -8,7 +8,7 @@ The following sections describe the debugfs files and formats, first
8for rcutree and next for rcutiny. 8for rcutree and next for rcutiny.
9 9
10 10
11CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats 11CONFIG_TREE_RCU and CONFIG_PREEMPT_RCU debugfs Files and Formats
12 12
13These implementations of RCU provide several debugfs directories under the 13These implementations of RCU provide several debugfs directories under the
14top-level directory "rcu": 14top-level directory "rcu":
@@ -18,7 +18,7 @@ rcu/rcu_preempt
18rcu/rcu_sched 18rcu/rcu_sched
19 19
20Each directory contains files for the corresponding flavor of RCU. 20Each directory contains files for the corresponding flavor of RCU.
21Note that rcu/rcu_preempt is only present for CONFIG_TREE_PREEMPT_RCU. 21Note that rcu/rcu_preempt is only present for CONFIG_PREEMPT_RCU.
22For CONFIG_TREE_RCU, the RCU flavor maps onto the RCU-sched flavor, 22For CONFIG_TREE_RCU, the RCU flavor maps onto the RCU-sched flavor,
23so that activity for both appears in rcu/rcu_sched. 23so that activity for both appears in rcu/rcu_sched.
24 24
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index e48c57f1943b..88dfce182f66 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -137,7 +137,7 @@ rcu_read_lock()
137 Used by a reader to inform the reclaimer that the reader is 137 Used by a reader to inform the reclaimer that the reader is
138 entering an RCU read-side critical section. It is illegal 138 entering an RCU read-side critical section. It is illegal
139 to block while in an RCU read-side critical section, though 139 to block while in an RCU read-side critical section, though
140 kernels built with CONFIG_TREE_PREEMPT_RCU can preempt RCU 140 kernels built with CONFIG_PREEMPT_RCU can preempt RCU
141 read-side critical sections. Any RCU-protected data structure 141 read-side critical sections. Any RCU-protected data structure
142 accessed during an RCU read-side critical section is guaranteed to 142 accessed during an RCU read-side critical section is guaranteed to
143 remain unreclaimed for the full duration of that critical section. 143 remain unreclaimed for the full duration of that critical section.
diff --git a/Documentation/acpi/gpio-properties.txt b/Documentation/acpi/gpio-properties.txt
new file mode 100644
index 000000000000..ae36fcf86dc7
--- /dev/null
+++ b/Documentation/acpi/gpio-properties.txt
@@ -0,0 +1,96 @@
1_DSD Device Properties Related to GPIO
2--------------------------------------
3
4With the release of ACPI 5.1 and the _DSD configuration objecte names
5can finally be given to GPIOs (and other things as well) returned by
6_CRS. Previously, we were only able to use an integer index to find
7the corresponding GPIO, which is pretty error prone (it depends on
8the _CRS output ordering, for example).
9
10With _DSD we can now query GPIOs using a name instead of an integer
11index, like the ASL example below shows:
12
13 // Bluetooth device with reset and shutdown GPIOs
14 Device (BTH)
15 {
16 Name (_HID, ...)
17
18 Name (_CRS, ResourceTemplate ()
19 {
20 GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly,
21 "\\_SB.GPO0", 0, ResourceConsumer) {15}
22 GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly,
23 "\\_SB.GPO0", 0, ResourceConsumer) {27, 31}
24 })
25
26 Name (_DSD, Package ()
27 {
28 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
29 Package ()
30 {
31 Package () {"reset-gpio", Package() {^BTH, 1, 1, 0 }},
32 Package () {"shutdown-gpio", Package() {^BTH, 0, 0, 0 }},
33 }
34 })
35 }
36
37The format of the supported GPIO property is:
38
39 Package () { "name", Package () { ref, index, pin, active_low }}
40
41 ref - The device that has _CRS containing GpioIo()/GpioInt() resources,
42 typically this is the device itself (BTH in our case).
43 index - Index of the GpioIo()/GpioInt() resource in _CRS starting from zero.
44 pin - Pin in the GpioIo()/GpioInt() resource. Typically this is zero.
45 active_low - If 1 the GPIO is marked as active_low.
46
47Since ACPI GpioIo() resource does not have a field saying whether it is
48active low or high, the "active_low" argument can be used here. Setting
49it to 1 marks the GPIO as active low.
50
51In our Bluetooth example the "reset-gpio" refers to the second GpioIo()
52resource, second pin in that resource with the GPIO number of 31.
53
54ACPI GPIO Mappings Provided by Drivers
55--------------------------------------
56
57There are systems in which the ACPI tables do not contain _DSD but provide _CRS
58with GpioIo()/GpioInt() resources and device drivers still need to work with
59them.
60
61In those cases ACPI device identification objects, _HID, _CID, _CLS, _SUB, _HRV,
62available to the driver can be used to identify the device and that is supposed
63to be sufficient to determine the meaning and purpose of all of the GPIO lines
64listed by the GpioIo()/GpioInt() resources returned by _CRS. In other words,
65the driver is supposed to know what to use the GpioIo()/GpioInt() resources for
66once it has identified the device. Having done that, it can simply assign names
67to the GPIO lines it is going to use and provide the GPIO subsystem with a
68mapping between those names and the ACPI GPIO resources corresponding to them.
69
70To do that, the driver needs to define a mapping table as a NULL-terminated
71array of struct acpi_gpio_mapping objects that each contain a name, a pointer
72to an array of line data (struct acpi_gpio_params) objects and the size of that
73array. Each struct acpi_gpio_params object consists of three fields,
74crs_entry_index, line_index, active_low, representing the index of the target
75GpioIo()/GpioInt() resource in _CRS starting from zero, the index of the target
76line in that resource starting from zero, and the active-low flag for that line,
77respectively, in analogy with the _DSD GPIO property format specified above.
78
79For the example Bluetooth device discussed previously the data structures in
80question would look like this:
81
82static const struct acpi_gpio_params reset_gpio = { 1, 1, false };
83static const struct acpi_gpio_params shutdown_gpio = { 0, 0, false };
84
85static const struct acpi_gpio_mapping bluetooth_acpi_gpios[] = {
86 { "reset-gpio", &reset_gpio, 1 },
87 { "shutdown-gpio", &shutdown_gpio, 1 },
88 { },
89};
90
91Next, the mapping table needs to be passed as the second argument to
92acpi_dev_add_driver_gpios() that will register it with the ACPI device object
93pointed to by its first argument. That should be done in the driver's .probe()
94routine. On removal, the driver should unregister its GPIO mapping table by
95calling acpi_dev_remove_driver_gpios() on the ACPI device object where that
96table was previously registered.
diff --git a/Documentation/arm/firmware.txt b/Documentation/arm/firmware.txt
index c2e468fe7b0b..da6713adac8a 100644
--- a/Documentation/arm/firmware.txt
+++ b/Documentation/arm/firmware.txt
@@ -7,32 +7,14 @@ world, which changes the way some things have to be initialized. This makes
7a need to provide an interface for such platforms to specify available firmware 7a need to provide an interface for such platforms to specify available firmware
8operations and call them when needed. 8operations and call them when needed.
9 9
10Firmware operations can be specified using struct firmware_ops 10Firmware operations can be specified by filling in a struct firmware_ops
11 11with appropriate callbacks and then registering it with register_firmware_ops()
12 struct firmware_ops { 12function.
13 /*
14 * Enters CPU idle mode
15 */
16 int (*do_idle)(void);
17 /*
18 * Sets boot address of specified physical CPU
19 */
20 int (*set_cpu_boot_addr)(int cpu, unsigned long boot_addr);
21 /*
22 * Boots specified physical CPU
23 */
24 int (*cpu_boot)(int cpu);
25 /*
26 * Initializes L2 cache
27 */
28 int (*l2x0_init)(void);
29 };
30
31and then registered with register_firmware_ops function
32 13
33 void register_firmware_ops(const struct firmware_ops *ops) 14 void register_firmware_ops(const struct firmware_ops *ops)
34 15
35the ops pointer must be non-NULL. 16The ops pointer must be non-NULL. More information about struct firmware_ops
17and its members can be found in arch/arm/include/asm/firmware.h header.
36 18
37There is a default, empty set of operations provided, so there is no need to 19There is a default, empty set of operations provided, so there is no need to
38set anything if platform does not require firmware operations. 20set anything if platform does not require firmware operations.
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt
index 38dc06d0a791..4178ebda6e66 100644
--- a/Documentation/arm/memory.txt
+++ b/Documentation/arm/memory.txt
@@ -41,7 +41,7 @@ fffe8000 fffeffff DTCM mapping area for platforms with
41fffe0000 fffe7fff ITCM mapping area for platforms with 41fffe0000 fffe7fff ITCM mapping area for platforms with
42 ITCM mounted inside the CPU. 42 ITCM mounted inside the CPU.
43 43
44ffc00000 ffdfffff Fixmap mapping region. Addresses provided 44ffc00000 ffefffff Fixmap mapping region. Addresses provided
45 by fix_to_virt() will be located here. 45 by fix_to_virt() will be located here.
46 46
47fee00000 feffffff Mapping of PCI I/O space. This is a static 47fee00000 feffffff Mapping of PCI I/O space. This is a static
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README
index 7945238453ed..e68d163df33d 100644
--- a/Documentation/arm/sunxi/README
+++ b/Documentation/arm/sunxi/README
@@ -37,16 +37,26 @@ SunXi family
37 http://dl.linux-sunxi.org/A20/A20%20User%20Manual%202013-03-22.pdf 37 http://dl.linux-sunxi.org/A20/A20%20User%20Manual%202013-03-22.pdf
38 38
39 - Allwinner A23 39 - Allwinner A23
40 + Not Supported 40 + Datasheet
41 http://dl.linux-sunxi.org/A23/A23%20Datasheet%20V1.0%2020130830.pdf
42 + User Manual
43 http://dl.linux-sunxi.org/A23/A23%20User%20Manual%20V1.0%2020130830.pdf
41 44
42 * Quad ARM Cortex-A7 based SoCs 45 * Quad ARM Cortex-A7 based SoCs
43 - Allwinner A31 (sun6i) 46 - Allwinner A31 (sun6i)
44 + Datasheet 47 + Datasheet
45 http://dl.linux-sunxi.org/A31/A31%20Datasheet%20-%20v1.00%20(2012-12-24).pdf 48 http://dl.linux-sunxi.org/A31/A3x_release_document/A31/IC/A31%20datasheet%20V1.3%2020131106.pdf
49 + User Manual
50 http://dl.linux-sunxi.org/A31/A3x_release_document/A31/IC/A31%20user%20manual%20V1.1%2020130630.pdf
46 51
47 - Allwinner A31s (sun6i) 52 - Allwinner A31s (sun6i)
48 + Not Supported 53 + Not Supported
54 + Datasheet
55 http://dl.linux-sunxi.org/A31/A3x_release_document/A31s/IC/A31s%20datasheet%20V1.3%2020131106.pdf
56 + User Manual
57 http://dl.linux-sunxi.org/A31/A3x_release_document/A31s/IC/A31s%20User%20Manual%20%20V1.0%2020130322.pdf
49 58
50 * Quad ARM Cortex-A15, Quad ARM Cortex-A7 based SoCs 59 * Quad ARM Cortex-A15, Quad ARM Cortex-A7 based SoCs
51 - Allwinner A80 60 - Allwinner A80
52 + Not Supported \ No newline at end of file 61 + Datasheet
62 http://dl.linux-sunxi.org/A80/A80_Datasheet_Revision_1.0_0404.pdf
diff --git a/Documentation/arm64/legacy_instructions.txt b/Documentation/arm64/legacy_instructions.txt
new file mode 100644
index 000000000000..a3b3da2ec6ed
--- /dev/null
+++ b/Documentation/arm64/legacy_instructions.txt
@@ -0,0 +1,45 @@
1The arm64 port of the Linux kernel provides infrastructure to support
2emulation of instructions which have been deprecated, or obsoleted in
3the architecture. The infrastructure code uses undefined instruction
4hooks to support emulation. Where available it also allows turning on
5the instruction execution in hardware.
6
7The emulation mode can be controlled by writing to sysctl nodes
8(/proc/sys/abi). The following explains the different execution
9behaviours and the corresponding values of the sysctl nodes -
10
11* Undef
12 Value: 0
13 Generates undefined instruction abort. Default for instructions that
14 have been obsoleted in the architecture, e.g., SWP
15
16* Emulate
17 Value: 1
18 Uses software emulation. To aid migration of software, in this mode
19 usage of emulated instruction is traced as well as rate limited
20 warnings are issued. This is the default for deprecated
21 instructions, .e.g., CP15 barriers
22
23* Hardware Execution
24 Value: 2
25 Although marked as deprecated, some implementations may support the
26 enabling/disabling of hardware support for the execution of these
27 instructions. Using hardware execution generally provides better
28 performance, but at the loss of ability to gather runtime statistics
29 about the use of the deprecated instructions.
30
31The default mode depends on the status of the instruction in the
32architecture. Deprecated instructions should default to emulation
33while obsolete instructions must be undefined by default.
34
35Supported legacy instructions
36-----------------------------
37* SWP{B}
38Node: /proc/sys/abi/swp
39Status: Obsolete
40Default: Undef (0)
41
42* CP15 Barriers
43Node: /proc/sys/abi/cp15_barrier
44Status: Deprecated
45Default: Emulate (1)
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt
index 68542fe13b85..183e41bdcb69 100644
--- a/Documentation/atomic_ops.txt
+++ b/Documentation/atomic_ops.txt
@@ -7,12 +7,13 @@
7maintainers on how to implement atomic counter, bitops, and spinlock 7maintainers on how to implement atomic counter, bitops, and spinlock
8interfaces properly. 8interfaces properly.
9 9
10 The atomic_t type should be defined as a signed integer. 10 The atomic_t type should be defined as a signed integer and
11Also, it should be made opaque such that any kind of cast to a normal 11the atomic_long_t type as a signed long integer. Also, they should
12C integer type will fail. Something like the following should 12be made opaque such that any kind of cast to a normal C integer type
13suffice: 13will fail. Something like the following should suffice:
14 14
15 typedef struct { int counter; } atomic_t; 15 typedef struct { int counter; } atomic_t;
16 typedef struct { long counter; } atomic_long_t;
16 17
17Historically, counter has been declared volatile. This is now discouraged. 18Historically, counter has been declared volatile. This is now discouraged.
18See Documentation/volatile-considered-harmful.txt for the complete rationale. 19See Documentation/volatile-considered-harmful.txt for the complete rationale.
@@ -37,6 +38,9 @@ initializer is used before runtime. If the initializer is used at runtime, a
37proper implicit or explicit read memory barrier is needed before reading the 38proper implicit or explicit read memory barrier is needed before reading the
38value with atomic_read from another thread. 39value with atomic_read from another thread.
39 40
41As with all of the atomic_ interfaces, replace the leading "atomic_"
42with "atomic_long_" to operate on atomic_long_t.
43
40The second interface can be used at runtime, as in: 44The second interface can be used at runtime, as in:
41 45
42 struct foo { atomic_t counter; }; 46 struct foo { atomic_t counter; };
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 2101e718670d..5aabc08de811 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -827,10 +827,6 @@ but in the event of any barrier requests in the tag queue we need to ensure
827that requests are restarted in the order they were queue. This may happen 827that requests are restarted in the order they were queue. This may happen
828if the driver needs to use blk_queue_invalidate_tags(). 828if the driver needs to use blk_queue_invalidate_tags().
829 829
830Tagging also defines a new request flag, REQ_QUEUED. This is set whenever
831a request is currently tagged. You should not use this flag directly,
832blk_rq_tagged(rq) is the portable way to do so.
833
8343.3 I/O Submission 8303.3 I/O Submission
835 831
836The routine submit_bio() is used to submit a single io. Higher level i/o 832The routine submit_bio() is used to submit a single io. Higher level i/o
@@ -946,7 +942,11 @@ elevator_allow_merge_fn called whenever the block layer determines
946 request safely. The io scheduler may still 942 request safely. The io scheduler may still
947 want to stop a merge at this point if it 943 want to stop a merge at this point if it
948 results in some sort of conflict internally, 944 results in some sort of conflict internally,
949 this hook allows it to do that. 945 this hook allows it to do that. Note however
946 that two *requests* can still be merged at later
947 time. Currently the io scheduler has no way to
948 prevent that. It can only learn about the fact
949 from elevator_merge_req_fn callback.
950 950
951elevator_dispatch_fn* fills the dispatch queue with ready requests. 951elevator_dispatch_fn* fills the dispatch queue with ready requests.
952 I/O schedulers are free to postpone requests by 952 I/O schedulers are free to postpone requests by
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index 10c949b293e4..f935fac1e73b 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -312,10 +312,10 @@ the "cpuset" cgroup subsystem, the steps are something like:
312 2) mkdir /sys/fs/cgroup/cpuset 312 2) mkdir /sys/fs/cgroup/cpuset
313 3) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset 313 3) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset
314 4) Create the new cgroup by doing mkdir's and write's (or echo's) in 314 4) Create the new cgroup by doing mkdir's and write's (or echo's) in
315 the /sys/fs/cgroup virtual file system. 315 the /sys/fs/cgroup/cpuset virtual file system.
316 5) Start a task that will be the "founding father" of the new job. 316 5) Start a task that will be the "founding father" of the new job.
317 6) Attach that task to the new cgroup by writing its PID to the 317 6) Attach that task to the new cgroup by writing its PID to the
318 /sys/fs/cgroup/cpuset/tasks file for that cgroup. 318 /sys/fs/cgroup/cpuset tasks file for that cgroup.
319 7) fork, exec or clone the job tasks from this founding father task. 319 7) fork, exec or clone the job tasks from this founding father task.
320 320
321For example, the following sequence of commands will setup a cgroup 321For example, the following sequence of commands will setup a cgroup
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt
index 3c94ff3f9693..f2235a162529 100644
--- a/Documentation/cgroups/cpusets.txt
+++ b/Documentation/cgroups/cpusets.txt
@@ -445,7 +445,7 @@ across partially overlapping sets of CPUs would risk unstable dynamics
445that would be beyond our understanding. So if each of two partially 445that would be beyond our understanding. So if each of two partially
446overlapping cpusets enables the flag 'cpuset.sched_load_balance', then we 446overlapping cpusets enables the flag 'cpuset.sched_load_balance', then we
447form a single sched domain that is a superset of both. We won't move 447form a single sched domain that is a superset of both. We won't move
448a task to a CPU outside it cpuset, but the scheduler load balancing 448a task to a CPU outside its cpuset, but the scheduler load balancing
449code might waste some compute cycles considering that possibility. 449code might waste some compute cycles considering that possibility.
450 450
451This mismatch is why there is not a simple one-to-one relation 451This mismatch is why there is not a simple one-to-one relation
@@ -552,8 +552,8 @@ otherwise initial value -1 that indicates the cpuset has no request.
552 1 : search siblings (hyperthreads in a core). 552 1 : search siblings (hyperthreads in a core).
553 2 : search cores in a package. 553 2 : search cores in a package.
554 3 : search cpus in a node [= system wide on non-NUMA system] 554 3 : search cpus in a node [= system wide on non-NUMA system]
555 ( 4 : search nodes in a chunk of node [on NUMA system] ) 555 4 : search nodes in a chunk of node [on NUMA system]
556 ( 5 : search system wide [on NUMA system] ) 556 5 : search system wide [on NUMA system]
557 557
558The system default is architecture dependent. The system default 558The system default is architecture dependent. The system default
559can be changed using the relax_domain_level= boot parameter. 559can be changed using the relax_domain_level= boot parameter.
diff --git a/Documentation/cgroups/hugetlb.txt b/Documentation/cgroups/hugetlb.txt
index a9faaca1f029..106245c3aecc 100644
--- a/Documentation/cgroups/hugetlb.txt
+++ b/Documentation/cgroups/hugetlb.txt
@@ -29,7 +29,7 @@ Brief summary of control files
29 29
30 hugetlb.<hugepagesize>.limit_in_bytes # set/show limit of "hugepagesize" hugetlb usage 30 hugetlb.<hugepagesize>.limit_in_bytes # set/show limit of "hugepagesize" hugetlb usage
31 hugetlb.<hugepagesize>.max_usage_in_bytes # show max "hugepagesize" hugetlb usage recorded 31 hugetlb.<hugepagesize>.max_usage_in_bytes # show max "hugepagesize" hugetlb usage recorded
32 hugetlb.<hugepagesize>.usage_in_bytes # show current res_counter usage for "hugepagesize" hugetlb 32 hugetlb.<hugepagesize>.usage_in_bytes # show current usage for "hugepagesize" hugetlb
33 hugetlb.<hugepagesize>.failcnt # show the number of allocation failure due to HugeTLB limit 33 hugetlb.<hugepagesize>.failcnt # show the number of allocation failure due to HugeTLB limit
34 34
35For a system supporting two hugepage size (16M and 16G) the control 35For a system supporting two hugepage size (16M and 16G) the control
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index 02ab997a1ed2..a22df3ad35ff 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -1,5 +1,10 @@
1Memory Resource Controller 1Memory Resource Controller
2 2
3NOTE: This document is hopelessly outdated and it asks for a complete
4 rewrite. It still contains a useful information so we are keeping it
5 here but make sure to check the current code if you need a deeper
6 understanding.
7
3NOTE: The Memory Resource Controller has generically been referred to as the 8NOTE: The Memory Resource Controller has generically been referred to as the
4 memory controller in this document. Do not confuse memory controller 9 memory controller in this document. Do not confuse memory controller
5 used here with the memory controller that is used in hardware. 10 used here with the memory controller that is used in hardware.
@@ -52,9 +57,9 @@ Brief summary of control files.
52 tasks # attach a task(thread) and show list of threads 57 tasks # attach a task(thread) and show list of threads
53 cgroup.procs # show list of processes 58 cgroup.procs # show list of processes
54 cgroup.event_control # an interface for event_fd() 59 cgroup.event_control # an interface for event_fd()
55 memory.usage_in_bytes # show current res_counter usage for memory 60 memory.usage_in_bytes # show current usage for memory
56 (See 5.5 for details) 61 (See 5.5 for details)
57 memory.memsw.usage_in_bytes # show current res_counter usage for memory+Swap 62 memory.memsw.usage_in_bytes # show current usage for memory+Swap
58 (See 5.5 for details) 63 (See 5.5 for details)
59 memory.limit_in_bytes # set/show limit of memory usage 64 memory.limit_in_bytes # set/show limit of memory usage
60 memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage 65 memory.memsw.limit_in_bytes # set/show limit of memory+Swap usage
@@ -116,16 +121,16 @@ The memory controller is the first controller developed.
116 121
1172.1. Design 1222.1. Design
118 123
119The core of the design is a counter called the res_counter. The res_counter 124The core of the design is a counter called the page_counter. The
120tracks the current memory usage and limit of the group of processes associated 125page_counter tracks the current memory usage and limit of the group of
121with the controller. Each cgroup has a memory controller specific data 126processes associated with the controller. Each cgroup has a memory controller
122structure (mem_cgroup) associated with it. 127specific data structure (mem_cgroup) associated with it.
123 128
1242.2. Accounting 1292.2. Accounting
125 130
126 +--------------------+ 131 +--------------------+
127 | mem_cgroup | 132 | mem_cgroup |
128 | (res_counter) | 133 | (page_counter) |
129 +--------------------+ 134 +--------------------+
130 / ^ \ 135 / ^ \
131 / | \ 136 / | \
@@ -321,7 +326,7 @@ per cgroup, instead of globally.
321 326
322* tcp memory pressure: sockets memory pressure for the tcp protocol. 327* tcp memory pressure: sockets memory pressure for the tcp protocol.
323 328
3242.7.3 Common use cases 3292.7.2 Common use cases
325 330
326Because the "kmem" counter is fed to the main user counter, kernel memory can 331Because the "kmem" counter is fed to the main user counter, kernel memory can
327never be limited completely independently of user memory. Say "U" is the user 332never be limited completely independently of user memory. Say "U" is the user
@@ -349,20 +354,19 @@ set:
349 354
3503. User Interface 3553. User Interface
351 356
3520. Configuration 3573.0. Configuration
353 358
354a. Enable CONFIG_CGROUPS 359a. Enable CONFIG_CGROUPS
355b. Enable CONFIG_RESOURCE_COUNTERS 360b. Enable CONFIG_MEMCG
356c. Enable CONFIG_MEMCG 361c. Enable CONFIG_MEMCG_SWAP (to use swap extension)
357d. Enable CONFIG_MEMCG_SWAP (to use swap extension)
358d. Enable CONFIG_MEMCG_KMEM (to use kmem extension) 362d. Enable CONFIG_MEMCG_KMEM (to use kmem extension)
359 363
3601. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) 3643.1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)
361# mount -t tmpfs none /sys/fs/cgroup 365# mount -t tmpfs none /sys/fs/cgroup
362# mkdir /sys/fs/cgroup/memory 366# mkdir /sys/fs/cgroup/memory
363# mount -t cgroup none /sys/fs/cgroup/memory -o memory 367# mount -t cgroup none /sys/fs/cgroup/memory -o memory
364 368
3652. Make the new group and move bash into it 3693.2. Make the new group and move bash into it
366# mkdir /sys/fs/cgroup/memory/0 370# mkdir /sys/fs/cgroup/memory/0
367# echo $$ > /sys/fs/cgroup/memory/0/tasks 371# echo $$ > /sys/fs/cgroup/memory/0/tasks
368 372
diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt
deleted file mode 100644
index 762ca54eb929..000000000000
--- a/Documentation/cgroups/resource_counter.txt
+++ /dev/null
@@ -1,197 +0,0 @@
1
2 The Resource Counter
3
4The resource counter, declared at include/linux/res_counter.h,
5is supposed to facilitate the resource management by controllers
6by providing common stuff for accounting.
7
8This "stuff" includes the res_counter structure and routines
9to work with it.
10
11
12
131. Crucial parts of the res_counter structure
14
15 a. unsigned long long usage
16
17 The usage value shows the amount of a resource that is consumed
18 by a group at a given time. The units of measurement should be
19 determined by the controller that uses this counter. E.g. it can
20 be bytes, items or any other unit the controller operates on.
21
22 b. unsigned long long max_usage
23
24 The maximal value of the usage over time.
25
26 This value is useful when gathering statistical information about
27 the particular group, as it shows the actual resource requirements
28 for a particular group, not just some usage snapshot.
29
30 c. unsigned long long limit
31
32 The maximal allowed amount of resource to consume by the group. In
33 case the group requests for more resources, so that the usage value
34 would exceed the limit, the resource allocation is rejected (see
35 the next section).
36
37 d. unsigned long long failcnt
38
39 The failcnt stands for "failures counter". This is the number of
40 resource allocation attempts that failed.
41
42 c. spinlock_t lock
43
44 Protects changes of the above values.
45
46
47
482. Basic accounting routines
49
50 a. void res_counter_init(struct res_counter *rc,
51 struct res_counter *rc_parent)
52
53 Initializes the resource counter. As usual, should be the first
54 routine called for a new counter.
55
56 The struct res_counter *parent can be used to define a hierarchical
57 child -> parent relationship directly in the res_counter structure,
58 NULL can be used to define no relationship.
59
60 c. int res_counter_charge(struct res_counter *rc, unsigned long val,
61 struct res_counter **limit_fail_at)
62
63 When a resource is about to be allocated it has to be accounted
64 with the appropriate resource counter (controller should determine
65 which one to use on its own). This operation is called "charging".
66
67 This is not very important which operation - resource allocation
68 or charging - is performed first, but
69 * if the allocation is performed first, this may create a
70 temporary resource over-usage by the time resource counter is
71 charged;
72 * if the charging is performed first, then it should be uncharged
73 on error path (if the one is called).
74
75 If the charging fails and a hierarchical dependency exists, the
76 limit_fail_at parameter is set to the particular res_counter element
77 where the charging failed.
78
79 d. u64 res_counter_uncharge(struct res_counter *rc, unsigned long val)
80
81 When a resource is released (freed) it should be de-accounted
82 from the resource counter it was accounted to. This is called
83 "uncharging". The return value of this function indicate the amount
84 of charges still present in the counter.
85
86 The _locked routines imply that the res_counter->lock is taken.
87
88 e. u64 res_counter_uncharge_until
89 (struct res_counter *rc, struct res_counter *top,
90 unsigned long val)
91
92 Almost same as res_counter_uncharge() but propagation of uncharge
93 stops when rc == top. This is useful when kill a res_counter in
94 child cgroup.
95
96 2.1 Other accounting routines
97
98 There are more routines that may help you with common needs, like
99 checking whether the limit is reached or resetting the max_usage
100 value. They are all declared in include/linux/res_counter.h.
101
102
103
1043. Analyzing the resource counter registrations
105
106 a. If the failcnt value constantly grows, this means that the counter's
107 limit is too tight. Either the group is misbehaving and consumes too
108 many resources, or the configuration is not suitable for the group
109 and the limit should be increased.
110
111 b. The max_usage value can be used to quickly tune the group. One may
112 set the limits to maximal values and either load the container with
113 a common pattern or leave one for a while. After this the max_usage
114 value shows the amount of memory the container would require during
115 its common activity.
116
117 Setting the limit a bit above this value gives a pretty good
118 configuration that works in most of the cases.
119
120 c. If the max_usage is much less than the limit, but the failcnt value
121 is growing, then the group tries to allocate a big chunk of resource
122 at once.
123
124 d. If the max_usage is much less than the limit, but the failcnt value
125 is 0, then this group is given too high limit, that it does not
126 require. It is better to lower the limit a bit leaving more resource
127 for other groups.
128
129
130
1314. Communication with the control groups subsystem (cgroups)
132
133All the resource controllers that are using cgroups and resource counters
134should provide files (in the cgroup filesystem) to work with the resource
135counter fields. They are recommended to adhere to the following rules:
136
137 a. File names
138
139 Field name File name
140 ---------------------------------------------------
141 usage usage_in_<unit_of_measurement>
142 max_usage max_usage_in_<unit_of_measurement>
143 limit limit_in_<unit_of_measurement>
144 failcnt failcnt
145 lock no file :)
146
147 b. Reading from file should show the corresponding field value in the
148 appropriate format.
149
150 c. Writing to file
151
152 Field Expected behavior
153 ----------------------------------
154 usage prohibited
155 max_usage reset to usage
156 limit set the limit
157 failcnt reset to zero
158
159
160
1615. Usage example
162
163 a. Declare a task group (take a look at cgroups subsystem for this) and
164 fold a res_counter into it
165
166 struct my_group {
167 struct res_counter res;
168
169 <other fields>
170 }
171
172 b. Put hooks in resource allocation/release paths
173
174 int alloc_something(...)
175 {
176 if (res_counter_charge(res_counter_ptr, amount) < 0)
177 return -ENOMEM;
178
179 <allocate the resource and return to the caller>
180 }
181
182 void release_something(...)
183 {
184 res_counter_uncharge(res_counter_ptr, amount);
185
186 <release the resource>
187 }
188
189 In order to keep the usage value self-consistent, both the
190 "res_counter_ptr" and the "amount" in release_something() should be
191 the same as they were in the alloc_something() when the releasing
192 resource was allocated.
193
194 c. Provide the way to read res_counter values and set them (the cgroups
195 still can help with it).
196
197 c. Compile and run :)
diff --git a/Documentation/cpu-freq/intel-pstate.txt b/Documentation/cpu-freq/intel-pstate.txt
index a69ffe1d54d5..765d7fc0e692 100644
--- a/Documentation/cpu-freq/intel-pstate.txt
+++ b/Documentation/cpu-freq/intel-pstate.txt
@@ -1,17 +1,28 @@
1Intel P-state driver 1Intel P-state driver
2-------------------- 2--------------------
3 3
4This driver implements a scaling driver with an internal governor for 4This driver provides an interface to control the P state selection for
5Intel Core processors. The driver follows the same model as the 5SandyBridge+ Intel processors. The driver can operate two different
6Transmeta scaling driver (longrun.c) and implements the setpolicy() 6modes based on the processor model legacy and Hardware P state (HWP)
7instead of target(). Scaling drivers that implement setpolicy() are 7mode.
8assumed to implement internal governors by the cpufreq core. All the 8
9logic for selecting the current P state is contained within the 9In legacy mode the driver implements a scaling driver with an internal
10driver; no external governor is used by the cpufreq core. 10governor for Intel Core processors. The driver follows the same model
11 11as the Transmeta scaling driver (longrun.c) and implements the
12Intel SandyBridge+ processors are supported. 12setpolicy() instead of target(). Scaling drivers that implement
13 13setpolicy() are assumed to implement internal governors by the cpufreq
14New sysfs files for controlling P state selection have been added to 14core. All the logic for selecting the current P state is contained
15within the driver; no external governor is used by the cpufreq core.
16
17In HWP mode P state selection is implemented in the processor
18itself. The driver provides the interfaces between the cpufreq core and
19the processor to control P state selection based on user preferences
20and reporting frequency to the cpufreq core. In this mode the
21internal governor code is disabled.
22
23In addtion to the interfaces provided by the cpufreq core for
24controlling frequency the driver provides sysfs files for
25controlling P state selection. These files have been added to
15/sys/devices/system/cpu/intel_pstate/ 26/sys/devices/system/cpu/intel_pstate/
16 27
17 max_perf_pct: limits the maximum P state that will be requested by 28 max_perf_pct: limits the maximum P state that will be requested by
@@ -33,7 +44,9 @@ frequency is fiction for Intel Core processors. Even if the scaling
33driver selects a single P state the actual frequency the processor 44driver selects a single P state the actual frequency the processor
34will run at is selected by the processor itself. 45will run at is selected by the processor itself.
35 46
36New debugfs files have also been added to /sys/kernel/debug/pstate_snb/ 47For legacy mode debugfs files have also been added to allow tuning of
48the internal governor algorythm. These files are located at
49/sys/kernel/debug/pstate_snb/ These files are NOT present in HWP mode.
37 50
38 deadband 51 deadband
39 d_gain_pct 52 d_gain_pct
diff --git a/Documentation/crypto/crypto-API-userspace.txt b/Documentation/crypto/crypto-API-userspace.txt
new file mode 100644
index 000000000000..ac619cd90300
--- /dev/null
+++ b/Documentation/crypto/crypto-API-userspace.txt
@@ -0,0 +1,205 @@
1Introduction
2============
3
4The concepts of the kernel crypto API visible to kernel space is fully
5applicable to the user space interface as well. Therefore, the kernel crypto API
6high level discussion for the in-kernel use cases applies here as well.
7
8The major difference, however, is that user space can only act as a consumer
9and never as a provider of a transformation or cipher algorithm.
10
11The following covers the user space interface exported by the kernel crypto
12API. A working example of this description is libkcapi that can be obtained from
13[1]. That library can be used by user space applications that require
14cryptographic services from the kernel.
15
16Some details of the in-kernel kernel crypto API aspects do not
17apply to user space, however. This includes the difference between synchronous
18and asynchronous invocations. The user space API call is fully synchronous.
19In addition, only a subset of all cipher types are available as documented
20below.
21
22
23User space API general remarks
24==============================
25
26The kernel crypto API is accessible from user space. Currently, the following
27ciphers are accessible:
28
29 * Message digest including keyed message digest (HMAC, CMAC)
30
31 * Symmetric ciphers
32
33Note, AEAD ciphers are currently not supported via the symmetric cipher
34interface.
35
36The interface is provided via Netlink using the type AF_ALG. In addition, the
37setsockopt option type is SOL_ALG. In case the user space header files do not
38export these flags yet, use the following macros:
39
40#ifndef AF_ALG
41#define AF_ALG 38
42#endif
43#ifndef SOL_ALG
44#define SOL_ALG 279
45#endif
46
47A cipher is accessed with the same name as done for the in-kernel API calls.
48This includes the generic vs. unique naming schema for ciphers as well as the
49enforcement of priorities for generic names.
50
51To interact with the kernel crypto API, a Netlink socket must be created by
52the user space application. User space invokes the cipher operation with the
53send/write system call family. The result of the cipher operation is obtained
54with the read/recv system call family.
55
56The following API calls assume that the Netlink socket descriptor is already
57opened by the user space application and discusses only the kernel crypto API
58specific invocations.
59
60To initialize a Netlink interface, the following sequence has to be performed
61by the consumer:
62
63 1. Create a socket of type AF_ALG with the struct sockaddr_alg parameter
64 specified below for the different cipher types.
65
66 2. Invoke bind with the socket descriptor
67
68 3. Invoke accept with the socket descriptor. The accept system call
69 returns a new file descriptor that is to be used to interact with
70 the particular cipher instance. When invoking send/write or recv/read
71 system calls to send data to the kernel or obtain data from the
72 kernel, the file descriptor returned by accept must be used.
73
74In-place cipher operation
75=========================
76
77Just like the in-kernel operation of the kernel crypto API, the user space
78interface allows the cipher operation in-place. That means that the input buffer
79used for the send/write system call and the output buffer used by the read/recv
80system call may be one and the same. This is of particular interest for
81symmetric cipher operations where a copying of the output data to its final
82destination can be avoided.
83
84If a consumer on the other hand wants to maintain the plaintext and the
85ciphertext in different memory locations, all a consumer needs to do is to
86provide different memory pointers for the encryption and decryption operation.
87
88Message digest API
89==================
90
91The message digest type to be used for the cipher operation is selected when
92invoking the bind syscall. bind requires the caller to provide a filled
93struct sockaddr data structure. This data structure must be filled as follows:
94
95struct sockaddr_alg sa = {
96 .salg_family = AF_ALG,
97 .salg_type = "hash", /* this selects the hash logic in the kernel */
98 .salg_name = "sha1" /* this is the cipher name */
99};
100
101The salg_type value "hash" applies to message digests and keyed message digests.
102Though, a keyed message digest is referenced by the appropriate salg_name.
103Please see below for the setsockopt interface that explains how the key can be
104set for a keyed message digest.
105
106Using the send() system call, the application provides the data that should be
107processed with the message digest. The send system call allows the following
108flags to be specified:
109
110 * MSG_MORE: If this flag is set, the send system call acts like a
111 message digest update function where the final hash is not
112 yet calculated. If the flag is not set, the send system call
113 calculates the final message digest immediately.
114
115With the recv() system call, the application can read the message digest from
116the kernel crypto API. If the buffer is too small for the message digest, the
117flag MSG_TRUNC is set by the kernel.
118
119In order to set a message digest key, the calling application must use the
120setsockopt() option of ALG_SET_KEY. If the key is not set the HMAC operation is
121performed without the initial HMAC state change caused by the key.
122
123
124Symmetric cipher API
125====================
126
127The operation is very similar to the message digest discussion. During
128initialization, the struct sockaddr data structure must be filled as follows:
129
130struct sockaddr_alg sa = {
131 .salg_family = AF_ALG,
132 .salg_type = "skcipher", /* this selects the symmetric cipher */
133 .salg_name = "cbc(aes)" /* this is the cipher name */
134};
135
136Before data can be sent to the kernel using the write/send system call family,
137the consumer must set the key. The key setting is described with the setsockopt
138invocation below.
139
140Using the sendmsg() system call, the application provides the data that should
141be processed for encryption or decryption. In addition, the IV is specified
142with the data structure provided by the sendmsg() system call.
143
144The sendmsg system call parameter of struct msghdr is embedded into the
145struct cmsghdr data structure. See recv(2) and cmsg(3) for more information
146on how the cmsghdr data structure is used together with the send/recv system
147call family. That cmsghdr data structure holds the following information
148specified with a separate header instances:
149
150 * specification of the cipher operation type with one of these flags:
151 ALG_OP_ENCRYPT - encryption of data
152 ALG_OP_DECRYPT - decryption of data
153
154 * specification of the IV information marked with the flag ALG_SET_IV
155
156The send system call family allows the following flag to be specified:
157
158 * MSG_MORE: If this flag is set, the send system call acts like a
159 cipher update function where more input data is expected
160 with a subsequent invocation of the send system call.
161
162Note: The kernel reports -EINVAL for any unexpected data. The caller must
163make sure that all data matches the constraints given in /proc/crypto for the
164selected cipher.
165
166With the recv() system call, the application can read the result of the
167cipher operation from the kernel crypto API. The output buffer must be at least
168as large as to hold all blocks of the encrypted or decrypted data. If the output
169data size is smaller, only as many blocks are returned that fit into that
170output buffer size.
171
172Setsockopt interface
173====================
174
175In addition to the read/recv and send/write system call handling to send and
176retrieve data subject to the cipher operation, a consumer also needs to set
177the additional information for the cipher operation. This additional information
178is set using the setsockopt system call that must be invoked with the file
179descriptor of the open cipher (i.e. the file descriptor returned by the
180accept system call).
181
182Each setsockopt invocation must use the level SOL_ALG.
183
184The setsockopt interface allows setting the following data using the mentioned
185optname:
186
187 * ALG_SET_KEY -- Setting the key. Key setting is applicable to:
188
189 - the skcipher cipher type (symmetric ciphers)
190
191 - the hash cipher type (keyed message digests)
192
193User space API example
194======================
195
196Please see [1] for libkcapi which provides an easy-to-use wrapper around the
197aforementioned Netlink kernel interface. [1] also contains a test application
198that invokes all libkcapi API calls.
199
200[1] http://www.chronox.de/libkcapi.html
201
202Author
203======
204
205Stephan Mueller <smueller@chronox.de>
diff --git a/Documentation/device-mapper/cache-policies.txt b/Documentation/device-mapper/cache-policies.txt
index 66c2774c0c64..0d124a971801 100644
--- a/Documentation/device-mapper/cache-policies.txt
+++ b/Documentation/device-mapper/cache-policies.txt
@@ -47,20 +47,26 @@ Message and constructor argument pairs are:
47 'discard_promote_adjustment <value>' 47 'discard_promote_adjustment <value>'
48 48
49The sequential threshold indicates the number of contiguous I/Os 49The sequential threshold indicates the number of contiguous I/Os
50required before a stream is treated as sequential. The random threshold 50required before a stream is treated as sequential. Once a stream is
51considered sequential it will bypass the cache. The random threshold
51is the number of intervening non-contiguous I/Os that must be seen 52is the number of intervening non-contiguous I/Os that must be seen
52before the stream is treated as random again. 53before the stream is treated as random again.
53 54
54The sequential and random thresholds default to 512 and 4 respectively. 55The sequential and random thresholds default to 512 and 4 respectively.
55 56
56Large, sequential ios are probably better left on the origin device 57Large, sequential I/Os are probably better left on the origin device
57since spindles tend to have good bandwidth. The io_tracker counts 58since spindles tend to have good sequential I/O bandwidth. The
58contiguous I/Os to try to spot when the io is in one of these sequential 59io_tracker counts contiguous I/Os to try to spot when the I/O is in one
59modes. 60of these sequential modes. But there are use-cases for wanting to
60 61promote sequential blocks to the cache (e.g. fast application startup).
61Internally the mq policy maintains a promotion threshold variable. If 62If sequential threshold is set to 0 the sequential I/O detection is
62the hit count of a block not in the cache goes above this threshold it 63disabled and sequential I/O will no longer implicitly bypass the cache.
63gets promoted to the cache. The read, write and discard promote adjustment 64Setting the random threshold to 0 does _not_ disable the random I/O
65stream detection.
66
67Internally the mq policy determines a promotion threshold. If the hit
68count of a block not in the cache goes above this threshold it gets
69promoted to the cache. The read, write and discard promote adjustment
64tunables allow you to tweak the promotion threshold by adding a small 70tunables allow you to tweak the promotion threshold by adding a small
65value based on the io type. They default to 4, 8 and 1 respectively. 71value based on the io type. They default to 4, 8 and 1 respectively.
66If you're trying to quickly warm a new cache device you may wish to 72If you're trying to quickly warm a new cache device you may wish to
diff --git a/Documentation/devicetree/bindings/arm/amlogic.txt b/Documentation/devicetree/bindings/arm/amlogic.txt
index 7eece72b1a35..8fe815046140 100644
--- a/Documentation/devicetree/bindings/arm/amlogic.txt
+++ b/Documentation/devicetree/bindings/arm/amlogic.txt
@@ -2,7 +2,9 @@ Amlogic MesonX device tree bindings
2------------------------------------------- 2-------------------------------------------
3 3
4Boards with the Amlogic Meson6 SoC shall have the following properties: 4Boards with the Amlogic Meson6 SoC shall have the following properties:
5 Required root node property:
6 compatible: "amlogic,meson6"
5 7
6Required root node property: 8Boards with the Amlogic Meson8 SoC shall have the following properties:
7 9 Required root node property:
8compatible = "amlogic,meson6"; 10 compatible: "amlogic,meson8";
diff --git a/Documentation/devicetree/bindings/arm/arch_timer.txt b/Documentation/devicetree/bindings/arm/arch_timer.txt
index 37b2cafa4e52..256b4d8bab7b 100644
--- a/Documentation/devicetree/bindings/arm/arch_timer.txt
+++ b/Documentation/devicetree/bindings/arm/arch_timer.txt
@@ -22,6 +22,14 @@ to deliver its interrupts via SPIs.
22- always-on : a boolean property. If present, the timer is powered through an 22- always-on : a boolean property. If present, the timer is powered through an
23 always-on power domain, therefore it never loses context. 23 always-on power domain, therefore it never loses context.
24 24
25** Optional properties:
26
27- arm,cpu-registers-not-fw-configured : Firmware does not initialize
28 any of the generic timer CPU registers, which contain their
29 architecturally-defined reset values. Only supported for 32-bit
30 systems which follow the ARMv7 architected reset values.
31
32
25Example: 33Example:
26 34
27 timer { 35 timer {
diff --git a/Documentation/devicetree/bindings/arm/arm-boards b/Documentation/devicetree/bindings/arm/arm-boards
index c554ed3d44fb..556c8665fdbf 100644
--- a/Documentation/devicetree/bindings/arm/arm-boards
+++ b/Documentation/devicetree/bindings/arm/arm-boards
@@ -92,3 +92,68 @@ Required nodes:
92- core-module: the root node to the Versatile platforms must have 92- core-module: the root node to the Versatile platforms must have
93 a core-module with regs and the compatible strings 93 a core-module with regs and the compatible strings
94 "arm,core-module-versatile", "syscon" 94 "arm,core-module-versatile", "syscon"
95
96ARM RealView Boards
97-------------------
98The RealView boards cover tailored evaluation boards that are used to explore
99the ARM11 and Cortex A-8 and Cortex A-9 processors.
100
101Required properties (in root node):
102 /* RealView Emulation Baseboard */
103 compatible = "arm,realview-eb";
104 /* RealView Platform Baseboard for ARM1176JZF-S */
105 compatible = "arm,realview-pb1176";
106 /* RealView Platform Baseboard for ARM11 MPCore */
107 compatible = "arm,realview-pb11mp";
108 /* RealView Platform Baseboard for Cortex A-8 */
109 compatible = "arm,realview-pba8";
110 /* RealView Platform Baseboard Explore for Cortex A-9 */
111 compatible = "arm,realview-pbx";
112
113Required nodes:
114
115- soc: some node of the RealView platforms must be the SoC
116 node that contain the SoC-specific devices, withe the compatible
117 string set to one of these tuples:
118 "arm,realview-eb-soc", "simple-bus"
119 "arm,realview-pb1176-soc", "simple-bus"
120 "arm,realview-pb11mp-soc", "simple-bus"
121 "arm,realview-pba8-soc", "simple-bus"
122 "arm,realview-pbx-soc", "simple-bus"
123
124- syscon: some subnode of the RealView SoC node must be a
125 system controller node pointing to the control registers,
126 with the compatible string set to one of these tuples:
127 "arm,realview-eb-syscon", "syscon"
128 "arm,realview-pb1176-syscon", "syscon"
129 "arm,realview-pb11mp-syscon", "syscon"
130 "arm,realview-pba8-syscon", "syscon"
131 "arm,realview-pbx-syscon", "syscon"
132
133 Required properties for the system controller:
134 - regs: the location and size of the system controller registers,
135 one range of 0x1000 bytes.
136
137Example:
138
139/dts-v1/;
140#include <dt-bindings/interrupt-controller/irq.h>
141#include "skeleton.dtsi"
142
143/ {
144 model = "ARM RealView PB1176 with device tree";
145 compatible = "arm,realview-pb1176";
146
147 soc {
148 #address-cells = <1>;
149 #size-cells = <1>;
150 compatible = "arm,realview-pb1176-soc", "simple-bus";
151 ranges;
152
153 syscon: syscon@10000000 {
154 compatible = "arm,realview-syscon", "syscon";
155 reg = <0x10000000 0x1000>;
156 };
157
158 };
159};
diff --git a/Documentation/devicetree/bindings/arm/bcm/cygnus.txt b/Documentation/devicetree/bindings/arm/bcm/cygnus.txt
new file mode 100644
index 000000000000..4c77169bb534
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/bcm/cygnus.txt
@@ -0,0 +1,31 @@
1Broadcom Cygnus device tree bindings
2------------------------------------
3
4
5Boards with Cygnus SoCs shall have the following properties:
6
7Required root node property:
8
9BCM11300
10compatible = "brcm,bcm11300", "brcm,cygnus";
11
12BCM11320
13compatible = "brcm,bcm11320", "brcm,cygnus";
14
15BCM11350
16compatible = "brcm,bcm11350", "brcm,cygnus";
17
18BCM11360
19compatible = "brcm,bcm11360", "brcm,cygnus";
20
21BCM58300
22compatible = "brcm,bcm58300", "brcm,cygnus";
23
24BCM58302
25compatible = "brcm,bcm58302", "brcm,cygnus";
26
27BCM58303
28compatible = "brcm,bcm58303", "brcm,cygnus";
29
30BCM58305
31compatible = "brcm,bcm58305", "brcm,cygnus";
diff --git a/Documentation/devicetree/bindings/arm/coresight.txt b/Documentation/devicetree/bindings/arm/coresight.txt
new file mode 100644
index 000000000000..d790f49066f3
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/coresight.txt
@@ -0,0 +1,204 @@
1* CoreSight Components:
2
3CoreSight components are compliant with the ARM CoreSight architecture
4specification and can be connected in various topologies to suit a particular
5SoCs tracing needs. These trace components can generally be classified as
6sinks, links and sources. Trace data produced by one or more sources flows
7through the intermediate links connecting the source to the currently selected
8sink. Each CoreSight component device should use these properties to describe
9its hardware characteristcs.
10
11* Required properties for all components *except* non-configurable replicators:
12
13 * compatible: These have to be supplemented with "arm,primecell" as
14 drivers are using the AMBA bus interface. Possible values include:
15 - "arm,coresight-etb10", "arm,primecell";
16 - "arm,coresight-tpiu", "arm,primecell";
17 - "arm,coresight-tmc", "arm,primecell";
18 - "arm,coresight-funnel", "arm,primecell";
19 - "arm,coresight-etm3x", "arm,primecell";
20
21 * reg: physical base address and length of the register
22 set(s) of the component.
23
24 * clocks: the clock associated to this component.
25
26 * clock-names: the name of the clock as referenced by the code.
27 Since we are using the AMBA framework, the name should be
28 "apb_pclk".
29
30 * port or ports: The representation of the component's port
31 layout using the generic DT graph presentation found in
32 "bindings/graph.txt".
33
34* Required properties for devices that don't show up on the AMBA bus, such as
35 non-configurable replicators:
36
37 * compatible: Currently supported value is (note the absence of the
38 AMBA markee):
39 - "arm,coresight-replicator"
40
41 * id: a unique number that will identify this replicator.
42
43 * port or ports: same as above.
44
45* Optional properties for ETM/PTMs:
46
47 * arm,cp14: must be present if the system accesses ETM/PTM management
48 registers via co-processor 14.
49
50 * cpu: the cpu phandle this ETM/PTM is affined to. When omitted the
51 source is considered to belong to CPU0.
52
53* Optional property for TMC:
54
55 * arm,buffer-size: size of contiguous buffer space for TMC ETR
56 (embedded trace router)
57
58
59Example:
60
611. Sinks
62 etb@20010000 {
63 compatible = "arm,coresight-etb10", "arm,primecell";
64 reg = <0 0x20010000 0 0x1000>;
65
66 coresight-default-sink;
67 clocks = <&oscclk6a>;
68 clock-names = "apb_pclk";
69 port {
70 etb_in_port: endpoint@0 {
71 slave-mode;
72 remote-endpoint = <&replicator_out_port0>;
73 };
74 };
75 };
76
77 tpiu@20030000 {
78 compatible = "arm,coresight-tpiu", "arm,primecell";
79 reg = <0 0x20030000 0 0x1000>;
80
81 clocks = <&oscclk6a>;
82 clock-names = "apb_pclk";
83 port {
84 tpiu_in_port: endpoint@0 {
85 slave-mode;
86 remote-endpoint = <&replicator_out_port1>;
87 };
88 };
89 };
90
912. Links
92 replicator {
93 /* non-configurable replicators don't show up on the
94 * AMBA bus. As such no need to add "arm,primecell".
95 */
96 compatible = "arm,coresight-replicator";
97 /* this will show up in debugfs as "0.replicator" */
98 id = <0>;
99
100 ports {
101 #address-cells = <1>;
102 #size-cells = <0>;
103
104 /* replicator output ports */
105 port@0 {
106 reg = <0>;
107 replicator_out_port0: endpoint {
108 remote-endpoint = <&etb_in_port>;
109 };
110 };
111
112 port@1 {
113 reg = <1>;
114 replicator_out_port1: endpoint {
115 remote-endpoint = <&tpiu_in_port>;
116 };
117 };
118
119 /* replicator input port */
120 port@2 {
121 reg = <0>;
122 replicator_in_port0: endpoint {
123 slave-mode;
124 remote-endpoint = <&funnel_out_port0>;
125 };
126 };
127 };
128 };
129
130 funnel@20040000 {
131 compatible = "arm,coresight-funnel", "arm,primecell";
132 reg = <0 0x20040000 0 0x1000>;
133
134 clocks = <&oscclk6a>;
135 clock-names = "apb_pclk";
136 ports {
137 #address-cells = <1>;
138 #size-cells = <0>;
139
140 /* funnel output port */
141 port@0 {
142 reg = <0>;
143 funnel_out_port0: endpoint {
144 remote-endpoint =
145 <&replicator_in_port0>;
146 };
147 };
148
149 /* funnel input ports */
150 port@1 {
151 reg = <0>;
152 funnel_in_port0: endpoint {
153 slave-mode;
154 remote-endpoint = <&ptm0_out_port>;
155 };
156 };
157
158 port@2 {
159 reg = <1>;
160 funnel_in_port1: endpoint {
161 slave-mode;
162 remote-endpoint = <&ptm1_out_port>;
163 };
164 };
165
166 port@3 {
167 reg = <2>;
168 funnel_in_port2: endpoint {
169 slave-mode;
170 remote-endpoint = <&etm0_out_port>;
171 };
172 };
173
174 };
175 };
176
1773. Sources
178 ptm@2201c000 {
179 compatible = "arm,coresight-etm3x", "arm,primecell";
180 reg = <0 0x2201c000 0 0x1000>;
181
182 cpu = <&cpu0>;
183 clocks = <&oscclk6a>;
184 clock-names = "apb_pclk";
185 port {
186 ptm0_out_port: endpoint {
187 remote-endpoint = <&funnel_in_port0>;
188 };
189 };
190 };
191
192 ptm@2201d000 {
193 compatible = "arm,coresight-etm3x", "arm,primecell";
194 reg = <0 0x2201d000 0 0x1000>;
195
196 cpu = <&cpu1>;
197 clocks = <&oscclk6a>;
198 clock-names = "apb_pclk";
199 port {
200 ptm1_out_port: endpoint {
201 remote-endpoint = <&funnel_in_port1>;
202 };
203 };
204 };
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
index fc446347ab6d..b2aacbe16ed9 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -227,6 +227,15 @@ nodes to be present and contain the properties described below.
227 # List of phandles to idle state nodes supported 227 # List of phandles to idle state nodes supported
228 by this cpu [3]. 228 by this cpu [3].
229 229
230 - rockchip,pmu
231 Usage: optional for systems that have an "enable-method"
232 property value of "rockchip,rk3066-smp"
233 While optional, it is the preferred way to get access to
234 the cpu-core power-domains.
235 Value type: <phandle>
236 Definition: Specifies the syscon node controlling the cpu core
237 power domains.
238
230Example 1 (dual-cluster big.LITTLE system 32-bit): 239Example 1 (dual-cluster big.LITTLE system 32-bit):
231 240
232 cpus { 241 cpus {
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt
index e935d7d4ac43..4e8b7df7fc62 100644
--- a/Documentation/devicetree/bindings/arm/fsl.txt
+++ b/Documentation/devicetree/bindings/arm/fsl.txt
@@ -74,3 +74,41 @@ Required root node properties:
74i.MX6q generic board 74i.MX6q generic board
75Required root node properties: 75Required root node properties:
76 - compatible = "fsl,imx6q"; 76 - compatible = "fsl,imx6q";
77
78
79Freescale LS1021A Platform Device Tree Bindings
80------------------------------------------------
81
82Required root node compatible properties:
83 - compatible = "fsl,ls1021a";
84
85Freescale LS1021A SoC-specific Device Tree Bindings
86-------------------------------------------
87
88Freescale SCFG
89 SCFG is the supplemental configuration unit, that provides SoC specific
90configuration and status registers for the chip. Such as getting PEX port
91status.
92 Required properties:
93 - compatible: should be "fsl,ls1021a-scfg"
94 - reg: should contain base address and length of SCFG memory-mapped registers
95
96Example:
97 scfg: scfg@1570000 {
98 compatible = "fsl,ls1021a-scfg";
99 reg = <0x0 0x1570000 0x0 0x10000>;
100 };
101
102Freescale DCFG
103 DCFG is the device configuration unit, that provides general purpose
104configuration and status for the device. Such as setting the secondary
105core start address and release the secondary core from holdoff and startup.
106 Required properties:
107 - compatible: should be "fsl,ls1021a-dcfg"
108 - reg : should contain base address and length of DCFG memory-mapped registers
109
110Example:
111 dcfg: dcfg@1ee0000 {
112 compatible = "fsl,ls1021a-dcfg";
113 reg = <0x0 0x1ee0000 0x0 0x10000>;
114 };
diff --git a/Documentation/devicetree/bindings/arm/gic-v3.txt b/Documentation/devicetree/bindings/arm/gic-v3.txt
index 33cd05e6c125..ddfade40ac59 100644
--- a/Documentation/devicetree/bindings/arm/gic-v3.txt
+++ b/Documentation/devicetree/bindings/arm/gic-v3.txt
@@ -49,11 +49,29 @@ Optional
49 occupied by the redistributors. Required if more than one such 49 occupied by the redistributors. Required if more than one such
50 region is present. 50 region is present.
51 51
52Sub-nodes:
53
54GICv3 has one or more Interrupt Translation Services (ITS) that are
55used to route Message Signalled Interrupts (MSI) to the CPUs.
56
57These nodes must have the following properties:
58- compatible : Should at least contain "arm,gic-v3-its".
59- msi-controller : Boolean property. Identifies the node as an MSI controller
60- reg: Specifies the base physical address and size of the ITS
61 registers.
62
63The main GIC node must contain the appropriate #address-cells,
64#size-cells and ranges properties for the reg property of all ITS
65nodes.
66
52Examples: 67Examples:
53 68
54 gic: interrupt-controller@2cf00000 { 69 gic: interrupt-controller@2cf00000 {
55 compatible = "arm,gic-v3"; 70 compatible = "arm,gic-v3";
56 #interrupt-cells = <3>; 71 #interrupt-cells = <3>;
72 #address-cells = <2>;
73 #size-cells = <2>;
74 ranges;
57 interrupt-controller; 75 interrupt-controller;
58 reg = <0x0 0x2f000000 0 0x10000>, // GICD 76 reg = <0x0 0x2f000000 0 0x10000>, // GICD
59 <0x0 0x2f100000 0 0x200000>, // GICR 77 <0x0 0x2f100000 0 0x200000>, // GICR
@@ -61,11 +79,20 @@ Examples:
61 <0x0 0x2c010000 0 0x2000>, // GICH 79 <0x0 0x2c010000 0 0x2000>, // GICH
62 <0x0 0x2c020000 0 0x2000>; // GICV 80 <0x0 0x2c020000 0 0x2000>; // GICV
63 interrupts = <1 9 4>; 81 interrupts = <1 9 4>;
82
83 gic-its@2c200000 {
84 compatible = "arm,gic-v3-its";
85 msi-controller;
86 reg = <0x0 0x2c200000 0 0x200000>;
87 };
64 }; 88 };
65 89
66 gic: interrupt-controller@2c010000 { 90 gic: interrupt-controller@2c010000 {
67 compatible = "arm,gic-v3"; 91 compatible = "arm,gic-v3";
68 #interrupt-cells = <3>; 92 #interrupt-cells = <3>;
93 #address-cells = <2>;
94 #size-cells = <2>;
95 ranges;
69 interrupt-controller; 96 interrupt-controller;
70 redistributor-stride = <0x0 0x40000>; // 256kB stride 97 redistributor-stride = <0x0 0x40000>; // 256kB stride
71 #redistributor-regions = <2>; 98 #redistributor-regions = <2>;
@@ -76,4 +103,16 @@ Examples:
76 <0x0 0x2c060000 0 0x2000>, // GICH 103 <0x0 0x2c060000 0 0x2000>, // GICH
77 <0x0 0x2c080000 0 0x2000>; // GICV 104 <0x0 0x2c080000 0 0x2000>; // GICV
78 interrupts = <1 9 4>; 105 interrupts = <1 9 4>;
106
107 gic-its@2c200000 {
108 compatible = "arm,gic-v3-its";
109 msi-controller;
110 reg = <0x0 0x2c200000 0 0x200000>;
111 };
112
113 gic-its@2c400000 {
114 compatible = "arm,gic-v3-its";
115 msi-controller;
116 reg = <0x0 0x2c400000 0 0x200000>;
117 };
79 }; 118 };
diff --git a/Documentation/devicetree/bindings/arm/gic.txt b/Documentation/devicetree/bindings/arm/gic.txt
index c7d2fa156678..8112d0c3675a 100644
--- a/Documentation/devicetree/bindings/arm/gic.txt
+++ b/Documentation/devicetree/bindings/arm/gic.txt
@@ -17,6 +17,7 @@ Main node required properties:
17 "arm,cortex-a7-gic" 17 "arm,cortex-a7-gic"
18 "arm,arm11mp-gic" 18 "arm,arm11mp-gic"
19 "brcm,brahma-b15-gic" 19 "brcm,brahma-b15-gic"
20 "arm,arm1176jzf-devchip-gic"
20- interrupt-controller : Identifies the node as an interrupt controller 21- interrupt-controller : Identifies the node as an interrupt controller
21- #interrupt-cells : Specifies the number of cells needed to encode an 22- #interrupt-cells : Specifies the number of cells needed to encode an
22 interrupt source. The type shall be a <u32> and the value shall be 3. 23 interrupt source. The type shall be a <u32> and the value shall be 3.
@@ -96,3 +97,56 @@ Example:
96 <0x2c006000 0x2000>; 97 <0x2c006000 0x2000>;
97 interrupts = <1 9 0xf04>; 98 interrupts = <1 9 0xf04>;
98 }; 99 };
100
101
102* GICv2m extension for MSI/MSI-x support (Optional)
103
104Certain revisions of GIC-400 supports MSI/MSI-x via V2M register frame(s).
105This is enabled by specifying v2m sub-node(s).
106
107Required properties:
108
109- compatible : The value here should contain "arm,gic-v2m-frame".
110
111- msi-controller : Identifies the node as an MSI controller.
112
113- reg : GICv2m MSI interface register base and size
114
115Optional properties:
116
117- arm,msi-base-spi : When the MSI_TYPER register contains an incorrect
118 value, this property should contain the SPI base of
119 the MSI frame, overriding the HW value.
120
121- arm,msi-num-spis : When the MSI_TYPER register contains an incorrect
122 value, this property should contain the number of
123 SPIs assigned to the frame, overriding the HW value.
124
125Example:
126
127 interrupt-controller@e1101000 {
128 compatible = "arm,gic-400";
129 #interrupt-cells = <3>;
130 #address-cells = <2>;
131 #size-cells = <2>;
132 interrupt-controller;
133 interrupts = <1 8 0xf04>;
134 ranges = <0 0 0 0xe1100000 0 0x100000>;
135 reg = <0x0 0xe1110000 0 0x01000>,
136 <0x0 0xe112f000 0 0x02000>,
137 <0x0 0xe1140000 0 0x10000>,
138 <0x0 0xe1160000 0 0x10000>;
139 v2m0: v2m@0x8000 {
140 compatible = "arm,gic-v2m-frame";
141 msi-controller;
142 reg = <0x0 0x80000 0 0x1000>;
143 };
144
145 ....
146
147 v2mN: v2m@0x9000 {
148 compatible = "arm,gic-v2m-frame";
149 msi-controller;
150 reg = <0x0 0x90000 0 0x1000>;
151 };
152 };
diff --git a/Documentation/devicetree/bindings/arm/idle-states.txt b/Documentation/devicetree/bindings/arm/idle-states.txt
index 37375c7f3ccc..a8274eabae2e 100644
--- a/Documentation/devicetree/bindings/arm/idle-states.txt
+++ b/Documentation/devicetree/bindings/arm/idle-states.txt
@@ -317,6 +317,26 @@ follows:
317 In such systems entry-latency-us + exit-latency-us 317 In such systems entry-latency-us + exit-latency-us
318 will exceed wakeup-latency-us by this duration. 318 will exceed wakeup-latency-us by this duration.
319 319
320 - status:
321 Usage: Optional
322 Value type: <string>
323 Definition: A standard device tree property [5] that indicates
324 the operational status of an idle-state.
325 If present, it shall be:
326 "okay": to indicate that the idle state is
327 operational.
328 "disabled": to indicate that the idle state has
329 been disabled in firmware so it is not
330 operational.
331 If the property is not present the idle-state must
332 be considered operational.
333
334 - idle-state-name:
335 Usage: Optional
336 Value type: <string>
337 Definition: A string used as a descriptive name for the idle
338 state.
339
320 In addition to the properties listed above, a state node may require 340 In addition to the properties listed above, a state node may require
321 additional properties specifics to the entry-method defined in the 341 additional properties specifics to the entry-method defined in the
322 idle-states node, please refer to the entry-method bindings 342 idle-states node, please refer to the entry-method bindings
diff --git a/Documentation/devicetree/bindings/arm/marvell,berlin.txt b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
index 904de5781f44..a99eb9eb14c0 100644
--- a/Documentation/devicetree/bindings/arm/marvell,berlin.txt
+++ b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
@@ -106,11 +106,21 @@ Required subnode-properties:
106- groups: a list of strings describing the group names. 106- groups: a list of strings describing the group names.
107- function: a string describing the function used to mux the groups. 107- function: a string describing the function used to mux the groups.
108 108
109* Reset controller binding
110
111A reset controller is part of the chip control registers set. The chip control
112node also provides the reset. The register set is not at the same offset between
113Berlin SoCs.
114
115Required property:
116- #reset-cells: must be set to 2
117
109Example: 118Example:
110 119
111chip: chip-control@ea0000 { 120chip: chip-control@ea0000 {
112 compatible = "marvell,berlin2-chip-ctrl"; 121 compatible = "marvell,berlin2-chip-ctrl";
113 #clock-cells = <1>; 122 #clock-cells = <1>;
123 #reset-cells = <2>;
114 reg = <0xea0000 0x400>; 124 reg = <0xea0000 0x400>;
115 clocks = <&refclk>, <&externaldev 0>; 125 clocks = <&refclk>, <&externaldev 0>;
116 clock-names = "refclk", "video_ext0"; 126 clock-names = "refclk", "video_ext0";
diff --git a/Documentation/devicetree/bindings/arm/mediatek.txt b/Documentation/devicetree/bindings/arm/mediatek.txt
index fa252261dfaf..3be40139cfbb 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek.txt
@@ -1,10 +1,14 @@
1Mediatek MT6589 Platforms Device Tree Bindings 1MediaTek mt65xx & mt81xx Platforms Device Tree Bindings
2 2
3Boards with a SoC of the Mediatek MT6589 shall have the following property: 3Boards with a MediaTek mt65xx/mt81xx SoC shall have the following property:
4 4
5Required root node property: 5Required root node property:
6 6
7compatible: must contain "mediatek,mt6589" 7compatible: Must contain one of
8 "mediatek,mt6589"
9 "mediatek,mt6592"
10 "mediatek,mt8127"
11 "mediatek,mt8135"
8 12
9 13
10Supported boards: 14Supported boards:
@@ -12,3 +16,12 @@ Supported boards:
12- bq Aquaris5 smart phone: 16- bq Aquaris5 smart phone:
13 Required root node properties: 17 Required root node properties:
14 - compatible = "mundoreader,bq-aquaris5", "mediatek,mt6589"; 18 - compatible = "mundoreader,bq-aquaris5", "mediatek,mt6589";
19- Evaluation board for MT6592:
20 Required root node properties:
21 - compatible = "mediatek,mt6592-evb", "mediatek,mt6592";
22- MTK mt8127 tablet moose EVB:
23 Required root node properties:
24 - compatible = "mediatek,mt8127-moose", "mediatek,mt8127";
25- MTK mt8135 tablet EVB:
26 Required root node properties:
27 - compatible = "mediatek,mt8135-evbp1", "mediatek,mt8135";
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt
new file mode 100644
index 000000000000..d680b07ec6e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sysirq.txt
@@ -0,0 +1,28 @@
1Mediatek 65xx/81xx sysirq
2
3Mediatek SOCs sysirq support controllable irq inverter for each GIC SPI
4interrupt.
5
6Required properties:
7- compatible: should be one of:
8 "mediatek,mt8135-sysirq"
9 "mediatek,mt8127-sysirq"
10 "mediatek,mt6589-sysirq"
11 "mediatek,mt6582-sysirq"
12 "mediatek,mt6577-sysirq"
13- interrupt-controller : Identifies the node as an interrupt controller
14- #interrupt-cells : Use the same format as specified by GIC in
15 Documentation/devicetree/bindings/arm/gic.txt
16- interrupt-parent: phandle of irq parent for sysirq. The parent must
17 use the same interrupt-cells format as GIC.
18- reg: Physical base address of the intpol registers and length of memory
19 mapped region.
20
21Example:
22 sysirq: interrupt-controller@10200100 {
23 compatible = "mediatek,mt6589-sysirq", "mediatek,mt6577-sysirq";
24 interrupt-controller;
25 #interrupt-cells = <3>;
26 interrupt-parent = <&gic>;
27 reg = <0 0x10200100 0 0x1c>;
28 };
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index ddd9bcdf889c..4f6a82cef1d1 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -132,6 +132,9 @@ Boards:
132- AM335X Bone : Low cost community board 132- AM335X Bone : Low cost community board
133 compatible = "ti,am335x-bone", "ti,am33xx", "ti,omap3" 133 compatible = "ti,am335x-bone", "ti,am33xx", "ti,omap3"
134 134
135- AM335X OrionLXm : Substation Automation Platform
136 compatible = "novatech,am335x-lxm", "ti,am33xx"
137
135- OMAP5 EVM : Evaluation Module 138- OMAP5 EVM : Evaluation Module
136 compatible = "ti,omap5-evm", "ti,omap5" 139 compatible = "ti,omap5-evm", "ti,omap5"
137 140
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
index 857f12636eb2..eaa3d1a0eb05 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
@@ -1,6 +1,10 @@
1Rockchip platforms device tree bindings 1Rockchip platforms device tree bindings
2--------------------------------------- 2---------------------------------------
3 3
4- MarsBoard RK3066 board:
5 Required root node properties:
6 - compatible = "haoyu,marsboard-rk3066", "rockchip,rk3066a";
7
4- bq Curie 2 tablet: 8- bq Curie 2 tablet:
5 Required root node properties: 9 Required root node properties:
6 - compatible = "mundoreader,bq-curie2", "rockchip,rk3066a"; 10 - compatible = "mundoreader,bq-curie2", "rockchip,rk3066a";
diff --git a/Documentation/devicetree/bindings/arm/samsung-boards.txt b/Documentation/devicetree/bindings/arm/samsung-boards.txt
index 2168ed31e1b0..43589d2466a7 100644
--- a/Documentation/devicetree/bindings/arm/samsung-boards.txt
+++ b/Documentation/devicetree/bindings/arm/samsung-boards.txt
@@ -1,11 +1,20 @@
1* Samsung's Exynos4210 based SMDKV310 evaluation board 1* Samsung's Exynos SoC based boards
2
3SMDKV310 evaluation board is based on Samsung's Exynos4210 SoC.
4 2
5Required root node properties: 3Required root node properties:
6 - compatible = should be one or more of the following. 4 - compatible = should be one or more of the following.
7 (a) "samsung,smdkv310" - for Samsung's SMDKV310 eval board. 5 - "samsung,monk" - for Exynos3250-based Samsung Simband board.
8 (b) "samsung,exynos4210" - for boards based on Exynos4210 SoC. 6 - "samsung,rinato" - for Exynos3250-based Samsung Gear2 board.
7 - "samsung,smdkv310" - for Exynos4210-based Samsung SMDKV310 eval board.
8 - "samsung,trats" - for Exynos4210-based Tizen Reference board.
9 - "samsung,universal_c210" - for Exynos4210-based Samsung board.
10 - "samsung,smdk4412", - for Exynos4412-based Samsung SMDK4412 eval board.
11 - "samsung,trats2" - for Exynos4412-based Tizen Reference board.
12 - "samsung,smdk5250" - for Exynos5250-based Samsung SMDK5250 eval board.
13 - "samsung,xyref5260" - for Exynos5260-based Samsung board.
14 - "samsung,smdk5410" - for Exynos5410-based Samsung SMDK5410 eval board.
15 - "samsung,smdk5420" - for Exynos5420-based Samsung SMDK5420 eval board.
16 - "samsung,sd5v1" - for Exynos5440-based Samsung board.
17 - "samsung,ssdk5440" - for Exynos5440-based Samsung board.
9 18
10Optional: 19Optional:
11 - firmware node, specifying presence and type of secure firmware: 20 - firmware node, specifying presence and type of secure firmware:
diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
index 709efaa30841..f46ca9a316a2 100644
--- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
+++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
@@ -16,6 +16,8 @@ Required properties:
16 future controllers. 16 future controllers.
17 Must be "samsung,exynos3250-adc" for 17 Must be "samsung,exynos3250-adc" for
18 controllers compatible with ADC of Exynos3250. 18 controllers compatible with ADC of Exynos3250.
19 Must be "samsung,exynos7-adc" for
20 the ADC in Exynos7 and compatibles
19 Must be "samsung,s3c2410-adc" for 21 Must be "samsung,s3c2410-adc" for
20 the ADC in s3c2410 and compatibles 22 the ADC in s3c2410 and compatibles
21 Must be "samsung,s3c2416-adc" for 23 Must be "samsung,s3c2416-adc" for
@@ -43,13 +45,16 @@ Required properties:
43 compatible ADC block) 45 compatible ADC block)
44- vdd-supply VDD input supply. 46- vdd-supply VDD input supply.
45 47
48- samsung,syscon-phandle Contains the PMU system controller node
49 (To access the ADC_PHY register on Exynos5250/5420/5800/3250)
50
46Note: child nodes can be added for auto probing from device tree. 51Note: child nodes can be added for auto probing from device tree.
47 52
48Example: adding device info in dtsi file 53Example: adding device info in dtsi file
49 54
50adc: adc@12D10000 { 55adc: adc@12D10000 {
51 compatible = "samsung,exynos-adc-v1"; 56 compatible = "samsung,exynos-adc-v1";
52 reg = <0x12D10000 0x100>, <0x10040718 0x4>; 57 reg = <0x12D10000 0x100>;
53 interrupts = <0 106 0>; 58 interrupts = <0 106 0>;
54 #io-channel-cells = <1>; 59 #io-channel-cells = <1>;
55 io-channel-ranges; 60 io-channel-ranges;
@@ -58,13 +63,14 @@ adc: adc@12D10000 {
58 clock-names = "adc"; 63 clock-names = "adc";
59 64
60 vdd-supply = <&buck5_reg>; 65 vdd-supply = <&buck5_reg>;
66 samsung,syscon-phandle = <&pmu_system_controller>;
61}; 67};
62 68
63Example: adding device info in dtsi file for Exynos3250 with additional sclk 69Example: adding device info in dtsi file for Exynos3250 with additional sclk
64 70
65adc: adc@126C0000 { 71adc: adc@126C0000 {
66 compatible = "samsung,exynos3250-adc", "samsung,exynos-adc-v2; 72 compatible = "samsung,exynos3250-adc", "samsung,exynos-adc-v2;
67 reg = <0x126C0000 0x100>, <0x10020718 0x4>; 73 reg = <0x126C0000 0x100>;
68 interrupts = <0 137 0>; 74 interrupts = <0 137 0>;
69 #io-channel-cells = <1>; 75 #io-channel-cells = <1>;
70 io-channel-ranges; 76 io-channel-ranges;
@@ -73,6 +79,7 @@ adc: adc@126C0000 {
73 clock-names = "adc", "sclk"; 79 clock-names = "adc", "sclk";
74 80
75 vdd-supply = <&buck5_reg>; 81 vdd-supply = <&buck5_reg>;
82 samsung,syscon-phandle = <&pmu_system_controller>;
76}; 83};
77 84
78Example: Adding child nodes in dts file 85Example: Adding child nodes in dts file
diff --git a/Documentation/devicetree/bindings/arm/ste-nomadik.txt b/Documentation/devicetree/bindings/arm/ste-nomadik.txt
index 6256ec31666d..2fdff5a806cf 100644
--- a/Documentation/devicetree/bindings/arm/ste-nomadik.txt
+++ b/Documentation/devicetree/bindings/arm/ste-nomadik.txt
@@ -10,6 +10,12 @@ Required root node property: src
10 10
11Boards with the Nomadik SoC include: 11Boards with the Nomadik SoC include:
12 12
13Nomadik NHK-15 board manufactured by ST Microelectronics:
14
15Required root node property:
16
17compatible="st,nomadik-nhk-15";
18
13S8815 "MiniKit" manufactured by Calao Systems: 19S8815 "MiniKit" manufactured by Calao Systems:
14 20
15Required root node property: 21Required root node property:
diff --git a/Documentation/devicetree/bindings/arm/sunxi.txt b/Documentation/devicetree/bindings/arm/sunxi.txt
new file mode 100644
index 000000000000..42941fdefb11
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/sunxi.txt
@@ -0,0 +1,12 @@
1Allwinner sunXi Platforms Device Tree Bindings
2
3Each device tree must specify which Allwinner SoC it uses,
4using one of the following compatible strings:
5
6 allwinner,sun4i-a10
7 allwinner,sun5i-a10s
8 allwinner,sun5i-a13
9 allwinner,sun6i-a31
10 allwinner,sun7i-a20
11 allwinner,sun8i-a23
12 allwinner,sun9i-a80
diff --git a/Documentation/devicetree/bindings/arm/ux500/power_domain.txt b/Documentation/devicetree/bindings/arm/ux500/power_domain.txt
new file mode 100644
index 000000000000..5679d1742d3e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/ux500/power_domain.txt
@@ -0,0 +1,35 @@
1* ST-Ericsson UX500 PM Domains
2
3UX500 supports multiple PM domains which are used to gate power to one or
4more peripherals on the SOC.
5
6The implementation of PM domains for UX500 are based upon the generic PM domain
7and use the corresponding DT bindings.
8
9==PM domain providers==
10
11Required properties:
12 - compatible: Must be "stericsson,ux500-pm-domains".
13 - #power-domain-cells : Number of cells in a power domain specifier, must be 1.
14
15Example:
16 pm_domains: pm_domains0 {
17 compatible = "stericsson,ux500-pm-domains";
18 #power-domain-cells = <1>;
19 };
20
21==PM domain consumers==
22
23Required properties:
24 - power-domains: A phandle and PM domain specifier. Below are the list of
25 valid specifiers:
26
27 Index Specifier
28 ----- ---------
29 0 DOMAIN_VAPE
30
31Example:
32 sdi0_per1@80126000 {
33 compatible = "arm,pl18x", "arm,primecell";
34 power-domains = <&pm_domains DOMAIN_VAPE>
35 };
diff --git a/Documentation/devicetree/bindings/ata/marvell.txt b/Documentation/devicetree/bindings/ata/marvell.txt
index 1c8351604d38..b460edd12766 100644
--- a/Documentation/devicetree/bindings/ata/marvell.txt
+++ b/Documentation/devicetree/bindings/ata/marvell.txt
@@ -6,11 +6,17 @@ Required Properties:
6- interrupts : Interrupt controller is using 6- interrupts : Interrupt controller is using
7- nr-ports : Number of SATA ports in use. 7- nr-ports : Number of SATA ports in use.
8 8
9Optional Properties:
10- phys : List of phandles to sata phys
11- phy-names : Should be "0", "1", etc, one number per phandle
12
9Example: 13Example:
10 14
11 sata@80000 { 15 sata@80000 {
12 compatible = "marvell,orion-sata"; 16 compatible = "marvell,orion-sata";
13 reg = <0x80000 0x5000>; 17 reg = <0x80000 0x5000>;
14 interrupts = <21>; 18 interrupts = <21>;
19 phys = <&sata_phy0>, <&sata_phy1>;
20 phy-names = "0", "1";
15 nr-ports = <2>; 21 nr-ports = <2>;
16 } 22 }
diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt b/Documentation/devicetree/bindings/ata/sata_rcar.txt
index 1e6111333fa8..2493a5a31655 100644
--- a/Documentation/devicetree/bindings/ata/sata_rcar.txt
+++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
@@ -3,16 +3,21 @@
3Required properties: 3Required properties:
4- compatible : should contain one of the following: 4- compatible : should contain one of the following:
5 - "renesas,sata-r8a7779" for R-Car H1 5 - "renesas,sata-r8a7779" for R-Car H1
6 - "renesas,sata-r8a7790" for R-Car H2 6 ("renesas,rcar-sata" is deprecated)
7 - "renesas,sata-r8a7791" for R-Car M2 7 - "renesas,sata-r8a7790-es1" for R-Car H2 ES1
8 - "renesas,sata-r8a7790" for R-Car H2 other than ES1
9 - "renesas,sata-r8a7791" for R-Car M2-W
10 - "renesas,sata-r8a7793" for R-Car M2-N
8- reg : address and length of the SATA registers; 11- reg : address and length of the SATA registers;
9- interrupts : must consist of one interrupt specifier. 12- interrupts : must consist of one interrupt specifier.
13- clocks : must contain a reference to the functional clock.
10 14
11Example: 15Example:
12 16
13sata: sata@fc600000 { 17sata0: sata@ee300000 {
14 compatible = "renesas,sata-r8a7779"; 18 compatible = "renesas,sata-r8a7791";
15 reg = <0xfc600000 0x2000>; 19 reg = <0 0xee300000 0 0x2000>;
16 interrupt-parent = <&gic>; 20 interrupt-parent = <&gic>;
17 interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>; 21 interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
22 clocks = <&mstp8_clks R8A7791_CLK_SATA0>;
18}; 23};
diff --git a/Documentation/devicetree/bindings/btmrvl.txt b/Documentation/devicetree/bindings/btmrvl.txt
new file mode 100644
index 000000000000..58f964bb0a52
--- /dev/null
+++ b/Documentation/devicetree/bindings/btmrvl.txt
@@ -0,0 +1,29 @@
1btmrvl
2------
3
4Required properties:
5
6 - compatible : must be "btmrvl,cfgdata"
7
8Optional properties:
9
10 - btmrvl,cal-data : Calibration data downloaded to the device during
11 initialization. This is an array of 28 values(u8).
12
13 - btmrvl,gpio-gap : gpio and gap (in msecs) combination to be
14 configured.
15
16Example:
17
18GPIO pin 13 is configured as a wakeup source and GAP is set to 100 msecs
19in below example.
20
21btmrvl {
22 compatible = "btmrvl,cfgdata";
23
24 btmrvl,cal-data = /bits/ 8 <
25 0x37 0x01 0x1c 0x00 0xff 0xff 0xff 0xff 0x01 0x7f 0x04 0x02
26 0x00 0x00 0xba 0xce 0xc0 0xc6 0x2d 0x00 0x00 0x00 0x00 0x00
27 0x00 0x00 0xf0 0x00>;
28 btmrvl,gpio-gap = <0x0d64>;
29};
diff --git a/Documentation/devicetree/bindings/bus/bcma.txt b/Documentation/devicetree/bindings/bus/bcma.txt
index 62a48348ac15..edd44d802139 100644
--- a/Documentation/devicetree/bindings/bus/bcma.txt
+++ b/Documentation/devicetree/bindings/bus/bcma.txt
@@ -8,6 +8,11 @@ Required properties:
8 8
9The cores on the AXI bus are automatically detected by bcma with the 9The cores on the AXI bus are automatically detected by bcma with the
10memory ranges they are using and they get registered afterwards. 10memory ranges they are using and they get registered afterwards.
11Automatic detection of the IRQ number is not working on
12BCM47xx/BCM53xx ARM SoCs. To assign IRQ numbers to the cores, provide
13them manually through device tree. Use an interrupt-map to specify the
14IRQ used by the devices on the bus. The first address is just an index,
15because we do not have any special register.
11 16
12The top-level axi bus may contain children representing attached cores 17The top-level axi bus may contain children representing attached cores
13(devices). This is needed since some hardware details can't be auto 18(devices). This is needed since some hardware details can't be auto
@@ -22,6 +27,22 @@ Example:
22 ranges = <0x00000000 0x18000000 0x00100000>; 27 ranges = <0x00000000 0x18000000 0x00100000>;
23 #address-cells = <1>; 28 #address-cells = <1>;
24 #size-cells = <1>; 29 #size-cells = <1>;
30 #interrupt-cells = <1>;
31 interrupt-map-mask = <0x000fffff 0xffff>;
32 interrupt-map =
33 /* Ethernet Controller 0 */
34 <0x00024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
35
36 /* Ethernet Controller 1 */
37 <0x00025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
38
39 /* PCIe Controller 0 */
40 <0x00012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
41 <0x00012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
42 <0x00012000 2 &gic GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
43 <0x00012000 3 &gic GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
44 <0x00012000 4 &gic GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
45 <0x00012000 5 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
25 46
26 chipcommon { 47 chipcommon {
27 reg = <0x00000000 0x1000>; 48 reg = <0x00000000 0x1000>;
diff --git a/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt b/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt
index e2d501d20c9a..1eceefb20f01 100644
--- a/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt
+++ b/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt
@@ -2,7 +2,11 @@ Broadcom GISB bus Arbiter controller
2 2
3Required properties: 3Required properties:
4 4
5- compatible: should be "brcm,gisb-arb" 5- compatible:
6 "brcm,gisb-arb" or "brcm,bcm7445-gisb-arb" for 28nm chips
7 "brcm,bcm7435-gisb-arb" for newer 40nm chips
8 "brcm,bcm7400-gisb-arb" for older 40nm chips and all 65nm chips
9 "brcm,bcm7038-gisb-arb" for 130nm chips
6- reg: specifies the base physical address and size of the registers 10- reg: specifies the base physical address and size of the registers
7- interrupt-parent: specifies the phandle to the parent interrupt controller 11- interrupt-parent: specifies the phandle to the parent interrupt controller
8 this arbiter gets interrupt line from 12 this arbiter gets interrupt line from
diff --git a/Documentation/devicetree/bindings/bus/mvebu-mbus.txt b/Documentation/devicetree/bindings/bus/mvebu-mbus.txt
index 5fa44f52a0b8..5e16c3ccb061 100644
--- a/Documentation/devicetree/bindings/bus/mvebu-mbus.txt
+++ b/Documentation/devicetree/bindings/bus/mvebu-mbus.txt
@@ -48,9 +48,12 @@ Required properties:
48- compatible: Should be set to "marvell,mbus-controller". 48- compatible: Should be set to "marvell,mbus-controller".
49 49
50- reg: Device's register space. 50- reg: Device's register space.
51 Two entries are expected (see the examples below): 51 Two or three entries are expected (see the examples below):
52 the first one controls the devices decoding window and 52 the first one controls the devices decoding window,
53 the second one controls the SDRAM decoding window. 53 the second one controls the SDRAM decoding window and
54 the third controls the MBus bridge (only with the
55 marvell,armada370-mbus and marvell,armadaxp-mbus
56 compatible strings)
54 57
55Example: 58Example:
56 59
@@ -67,7 +70,7 @@ Example:
67 70
68 mbusc: mbus-controller@20000 { 71 mbusc: mbus-controller@20000 {
69 compatible = "marvell,mbus-controller"; 72 compatible = "marvell,mbus-controller";
70 reg = <0x20000 0x100>, <0x20180 0x20>; 73 reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
71 }; 74 };
72 75
73 /* more children ...*/ 76 /* more children ...*/
@@ -126,7 +129,7 @@ are skipped.
126 129
127 mbusc: mbus-controller@20000 { 130 mbusc: mbus-controller@20000 {
128 compatible = "marvell,mbus-controller"; 131 compatible = "marvell,mbus-controller";
129 reg = <0x20000 0x100>, <0x20180 0x20>; 132 reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
130 }; 133 };
131 134
132 /* more children ...*/ 135 /* more children ...*/
@@ -170,7 +173,7 @@ Using this macro, the above example would be:
170 173
171 mbusc: mbus-controller@20000 { 174 mbusc: mbus-controller@20000 {
172 compatible = "marvell,mbus-controller"; 175 compatible = "marvell,mbus-controller";
173 reg = <0x20000 0x100>, <0x20180 0x20>; 176 reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
174 }; 177 };
175 178
176 /* other children */ 179 /* other children */
@@ -266,7 +269,7 @@ See the example below, where a more complete device tree is shown:
266 ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>; 269 ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
267 270
268 mbusc: mbus-controller@20000 { 271 mbusc: mbus-controller@20000 {
269 reg = <0x20000 0x100>, <0x20180 0x20>; 272 reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
270 }; 273 };
271 274
272 interrupt-controller@20000 { 275 interrupt-controller@20000 {
diff --git a/Documentation/devicetree/bindings/chosen.txt b/Documentation/devicetree/bindings/chosen.txt
new file mode 100644
index 000000000000..ed838f453f7a
--- /dev/null
+++ b/Documentation/devicetree/bindings/chosen.txt
@@ -0,0 +1,46 @@
1The chosen node
2---------------
3
4The chosen node does not represent a real device, but serves as a place
5for passing data between firmware and the operating system, like boot
6arguments. Data in the chosen node does not represent the hardware.
7
8
9stdout-path property
10--------------------
11
12Device trees may specify the device to be used for boot console output
13with a stdout-path property under /chosen, as described in ePAPR, e.g.
14
15/ {
16 chosen {
17 stdout-path = "/serial@f00:115200";
18 };
19
20 serial@f00 {
21 compatible = "vendor,some-uart";
22 reg = <0xf00 0x10>;
23 };
24};
25
26If the character ":" is present in the value, this terminates the path.
27The meaning of any characters following the ":" is device-specific, and
28must be specified in the relevant binding documentation.
29
30For UART devices, the preferred binding is a string in the form:
31
32 <baud>{<parity>{<bits>{<flow>}}}
33
34where
35
36 baud - baud rate in decimal
37 parity - 'n' (none), 'o', (odd) or 'e' (even)
38 bits - number of data bits
39 flow - 'r' (rts)
40
41For example: 115200n8r
42
43Implementation note: Linux will look for the property "linux,stdout-path" or
44on PowerPC "stdout" if "stdout-path" is not found. However, the
45"linux,stdout-path" and "stdout" properties are deprecated. New platforms
46should only use the "stdout-path" property.
diff --git a/Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt b/Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
new file mode 100644
index 000000000000..00d26edec8bc
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
@@ -0,0 +1,34 @@
1Broadcom Cygnus Clocks
2
3This binding uses the common clock binding:
4Documentation/devicetree/bindings/clock/clock-bindings.txt
5
6Currently various "fixed" clocks are declared for peripheral drivers that use
7the common clock framework to reference their core clocks. Proper support of
8these clocks will be added later
9
10Device tree example:
11
12 clocks {
13 #address-cells = <1>;
14 #size-cells = <1>;
15 ranges;
16
17 osc: oscillator {
18 compatible = "fixed-clock";
19 #clock-cells = <1>;
20 clock-frequency = <25000000>;
21 };
22
23 apb_clk: apb_clk {
24 compatible = "fixed-clock";
25 #clock-cells = <0>;
26 clock-frequency = <1000000000>;
27 };
28
29 periph_clk: periph_clk {
30 compatible = "fixed-clock";
31 #clock-cells = <0>;
32 clock-frequency = <500000000>;
33 };
34 };
diff --git a/Documentation/devicetree/bindings/clock/qoriq-clock.txt b/Documentation/devicetree/bindings/clock/qoriq-clock.txt
index 5666812fc42b..266ff9d23229 100644
--- a/Documentation/devicetree/bindings/clock/qoriq-clock.txt
+++ b/Documentation/devicetree/bindings/clock/qoriq-clock.txt
@@ -62,6 +62,8 @@ Required properties:
62 It takes parent's clock-frequency as its clock. 62 It takes parent's clock-frequency as its clock.
63 * "fsl,qoriq-sysclk-2.0": for input system clock (v2.0). 63 * "fsl,qoriq-sysclk-2.0": for input system clock (v2.0).
64 It takes parent's clock-frequency as its clock. 64 It takes parent's clock-frequency as its clock.
65 * "fsl,qoriq-platform-pll-1.0" for the platform PLL clock (v1.0)
66 * "fsl,qoriq-platform-pll-2.0" for the platform PLL clock (v2.0)
65- #clock-cells: From common clock binding. The number of cells in a 67- #clock-cells: From common clock binding. The number of cells in a
66 clock-specifier. Should be <0> for "fsl,qoriq-sysclk-[1,2].0" 68 clock-specifier. Should be <0> for "fsl,qoriq-sysclk-[1,2].0"
67 clocks, or <1> for "fsl,qoriq-core-pll-[1,2].0" clocks. 69 clocks, or <1> for "fsl,qoriq-core-pll-[1,2].0" clocks.
@@ -128,8 +130,16 @@ Example for clock block and clock provider:
128 clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; 130 clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
129 clock-output-names = "cmux1"; 131 clock-output-names = "cmux1";
130 }; 132 };
133
134 platform-pll: platform-pll@c00 {
135 #clock-cells = <1>;
136 reg = <0xc00 0x4>;
137 compatible = "fsl,qoriq-platform-pll-1.0";
138 clocks = <&sysclk>;
139 clock-output-names = "platform-pll", "platform-pll-div2";
140 };
131 }; 141 };
132 } 142};
133 143
134Example for clock consumer: 144Example for clock consumer:
135 145
@@ -139,4 +149,4 @@ Example for clock consumer:
139 clocks = <&mux0>; 149 clocks = <&mux0>;
140 ... 150 ...
141 }; 151 };
142 } 152};
diff --git a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
index 1d3ace088172..b7ee5c7e0f75 100644
--- a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
@@ -11,7 +11,7 @@ Please find an example below:
11 11
12 Clockgen block diagram 12 Clockgen block diagram
13 ------------------------------------------------------------------- 13 -------------------------------------------------------------------
14 | Flexgen stucture | 14 | Flexgen structure |
15 | --------------------------------------------- | 15 | --------------------------------------------- |
16 | | ------- -------- -------- | | 16 | | ------- -------- -------- | |
17clk_sysin | | | | | | | | | 17clk_sysin | | | | | | | | |
diff --git a/Documentation/devicetree/bindings/clock/vf610-clock.txt b/Documentation/devicetree/bindings/clock/vf610-clock.txt
index c80863d344ac..63f9f1ac3439 100644
--- a/Documentation/devicetree/bindings/clock/vf610-clock.txt
+++ b/Documentation/devicetree/bindings/clock/vf610-clock.txt
@@ -5,6 +5,19 @@ Required properties:
5- reg: Address and length of the register set 5- reg: Address and length of the register set
6- #clock-cells: Should be <1> 6- #clock-cells: Should be <1>
7 7
8Optional properties:
9- clocks: list of clock identifiers which are external input clocks to the
10 given clock controller. Please refer the next section to find
11 the input clocks for a given controller.
12- clock-names: list of names of clocks which are exteral input clocks to the
13 given clock controller.
14
15Input clocks for top clock controller:
16 - sxosc (external crystal oscillator 32KHz, recommended)
17 - fxosc (external crystal oscillator 24MHz, recommended)
18 - audio_ext
19 - enet_ext
20
8The clock consumer should specify the desired clock by having the clock 21The 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 22ID in its "clocks" phandle cell. See include/dt-bindings/clock/vf610-clock.h
10for the full list of VF610 clock IDs. 23for the full list of VF610 clock IDs.
@@ -15,6 +28,8 @@ clks: ccm@4006b000 {
15 compatible = "fsl,vf610-ccm"; 28 compatible = "fsl,vf610-ccm";
16 reg = <0x4006b000 0x1000>; 29 reg = <0x4006b000 0x1000>;
17 #clock-cells = <1>; 30 #clock-cells = <1>;
31 clocks = <&sxosc>, <&fxosc>;
32 clock-names = "sxosc", "fxosc";
18}; 33};
19 34
20uart1: serial@40028000 { 35uart1: serial@40028000 {
diff --git a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt
index 5c65eccd0e56..e8a35c71e947 100644
--- a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt
+++ b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt
@@ -1,5 +1,5 @@
1Freescale SAHARA Cryptographic Accelerator included in some i.MX chips. 1Freescale SAHARA Cryptographic Accelerator included in some i.MX chips.
2Currently only i.MX27 is supported. 2Currently only i.MX27 and i.MX53 are supported.
3 3
4Required properties: 4Required properties:
5- compatible : Should be "fsl,<soc>-sahara" 5- compatible : Should be "fsl,<soc>-sahara"
diff --git a/Documentation/devicetree/bindings/dma/atmel-xdma.txt b/Documentation/devicetree/bindings/dma/atmel-xdma.txt
new file mode 100644
index 000000000000..0eb2b3207e08
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/atmel-xdma.txt
@@ -0,0 +1,54 @@
1* Atmel Extensible Direct Memory Access Controller (XDMAC)
2
3* XDMA Controller
4Required properties:
5- compatible: Should be "atmel,<chip>-dma".
6 <chip> compatible description:
7 - sama5d4: first SoC adding the XDMAC
8- reg: Should contain DMA registers location and length.
9- interrupts: Should contain DMA interrupt.
10- #dma-cells: Must be <1>, used to represent the number of integer cells in
11the dmas property of client devices.
12 - The 1st cell specifies the channel configuration register:
13 - bit 13: SIF, source interface identifier, used to get the memory
14 interface identifier,
15 - bit 14: DIF, destination interface identifier, used to get the peripheral
16 interface identifier,
17 - bit 30-24: PERID, peripheral identifier.
18
19Example:
20
21dma1: dma-controller@f0004000 {
22 compatible = "atmel,sama5d4-dma";
23 reg = <0xf0004000 0x200>;
24 interrupts = <50 4 0>;
25 #dma-cells = <1>;
26};
27
28
29* DMA clients
30DMA clients connected to the Atmel XDMA controller must use the format
31described in the dma.txt file, using a one-cell specifier for each channel.
32The two cells in order are:
331. A phandle pointing to the DMA controller.
342. Channel configuration register. Configurable fields are:
35 - bit 13: SIF, source interface identifier, used to get the memory
36 interface identifier,
37 - bit 14: DIF, destination interface identifier, used to get the peripheral
38 interface identifier,
39 - bit 30-24: PERID, peripheral identifier.
40
41Example:
42
43i2c2: i2c@f8024000 {
44 compatible = "atmel,at91sam9x5-i2c";
45 reg = <0xf8024000 0x4000>;
46 interrupts = <34 4 6>;
47 dmas = <&dma1
48 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
49 | AT91_XDMAC_DT_PERID(6))>,
50 <&dma1
51 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
52 | AT91_XDMAC_DT_PERID(7))>;
53 dma-names = "tx", "rx";
54};
diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
index 4659fd952301..dc8d3aac1aa9 100644
--- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
+++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
@@ -48,6 +48,7 @@ The full ID of peripheral types can be found below.
48 21 ESAI 48 21 ESAI
49 22 SSI Dual FIFO (needs firmware ver >= 2) 49 22 SSI Dual FIFO (needs firmware ver >= 2)
50 23 Shared ASRC 50 23 Shared ASRC
51 24 SAI
51 52
52The third cell specifies the transfer priority as below. 53The third cell specifies the transfer priority as below.
53 54
diff --git a/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt b/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt
index d75a9d767022..f8c3311b7153 100644
--- a/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt
+++ b/Documentation/devicetree/bindings/dma/qcom_bam_dma.txt
@@ -1,7 +1,9 @@
1QCOM BAM DMA controller 1QCOM BAM DMA controller
2 2
3Required properties: 3Required properties:
4- compatible: must contain "qcom,bam-v1.4.0" for MSM8974 4- compatible: must be one of the following:
5 * "qcom,bam-v1.4.0" for MSM8974, APQ8074 and APQ8084
6 * "qcom,bam-v1.3.0" for APQ8064, IPQ8064 and MSM8960
5- reg: Address range for DMA registers 7- reg: Address range for DMA registers
6- interrupts: Should contain the one interrupt shared by all channels 8- interrupts: Should contain the one interrupt shared by all channels
7- #dma-cells: must be <1>, the cell in the dmas property of the client device 9- #dma-cells: must be <1>, the cell in the dmas property of the client device
diff --git a/Documentation/devicetree/bindings/dma/sun6i-dma.txt b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
index 3e145c1675b1..9cdcba24d7c3 100644
--- a/Documentation/devicetree/bindings/dma/sun6i-dma.txt
+++ b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
@@ -4,7 +4,7 @@ This driver follows the generic DMA bindings defined in dma.txt.
4 4
5Required properties: 5Required properties:
6 6
7- compatible: Must be "allwinner,sun6i-a31-dma" 7- compatible: Must be "allwinner,sun6i-a31-dma" or "allwinner,sun8i-a23-dma"
8- reg: Should contain the registers base address and length 8- reg: Should contain the registers base address and length
9- interrupts: Should contain a reference to the interrupt used by this device 9- interrupts: Should contain a reference to the interrupt used by this device
10- clocks: Should contain a reference to the parent AHB clock 10- clocks: Should contain a reference to the parent AHB clock
diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt
index 1405ed071bb4..e4c4d47f8137 100644
--- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt
+++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt
@@ -25,7 +25,7 @@ Required child node properties:
25- compatible: It should be either "xlnx,axi-vdma-mm2s-channel" or 25- compatible: It should be either "xlnx,axi-vdma-mm2s-channel" or
26 "xlnx,axi-vdma-s2mm-channel". 26 "xlnx,axi-vdma-s2mm-channel".
27- interrupts: Should contain per channel VDMA interrupts. 27- interrupts: Should contain per channel VDMA interrupts.
28- xlnx,data-width: Should contain the stream data width, take values 28- xlnx,datawidth: Should contain the stream data width, take values
29 {32,64...1024}. 29 {32,64...1024}.
30 30
31Optional child node properties: 31Optional child node properties:
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt
index e75f0e549fff..e75f0e549fff 100644
--- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
+++ b/Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/hdmi.txt b/Documentation/devicetree/bindings/drm/imx/hdmi.txt
index 1b756cf9afb0..1b756cf9afb0 100644
--- a/Documentation/devicetree/bindings/staging/imx-drm/hdmi.txt
+++ b/Documentation/devicetree/bindings/drm/imx/hdmi.txt
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt b/Documentation/devicetree/bindings/drm/imx/ldb.txt
index 443bcb6134d5..443bcb6134d5 100644
--- a/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt
+++ b/Documentation/devicetree/bindings/drm/imx/ldb.txt
diff --git a/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt b/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt
new file mode 100644
index 000000000000..7bb1a9d60133
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt
@@ -0,0 +1,30 @@
1* 74XX MMIO GPIO driver
2
3Required properties:
4- compatible: Should contain one of the following:
5 "ti,741g125": for 741G125 (1-bit Input),
6 "ti,741g174": for 741G74 (1-bit Output),
7 "ti,742g125": for 742G125 (2-bit Input),
8 "ti,7474" : for 7474 (2-bit Output),
9 "ti,74125" : for 74125 (4-bit Input),
10 "ti,74175" : for 74175 (4-bit Output),
11 "ti,74365" : for 74365 (6-bit Input),
12 "ti,74174" : for 74174 (6-bit Output),
13 "ti,74244" : for 74244 (8-bit Input),
14 "ti,74273" : for 74273 (8-bit Output),
15 "ti,741624" : for 741624 (16-bit Input),
16 "ti,7416374": for 7416374 (16-bit Output).
17- reg: Physical base address and length where IC resides.
18- gpio-controller: Marks the device node as a gpio controller.
19- #gpio-cells: Should be two. The first cell is the pin number and
20 the second cell is used to specify the GPIO polarity:
21 0 = Active High,
22 1 = Active Low.
23
24Example:
25 ctrl: gpio@30008004 {
26 compatible = "ti,74174";
27 reg = <0x30008004 0x1>;
28 gpio-controller;
29 #gpio-cells = <2>;
30 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt b/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt
index c306a2d0f2b1..f3332b9a8ed4 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt
@@ -57,6 +57,8 @@ Optional device specific properties:
57 occurred on. If it is not set, the interrupt are only generated for the 57 occurred on. If it is not set, the interrupt are only generated for the
58 bank they belong to. 58 bank they belong to.
59 On devices with only one interrupt output this property is useless. 59 On devices with only one interrupt output this property is useless.
60- microchip,irq-active-high: Sets the INTPOL flag in the IOCON register. This
61 configures the IRQ output polarity as active high.
60 62
61Example I2C (with interrupt): 63Example I2C (with interrupt):
62gpiom1: gpio@20 { 64gpiom1: gpio@20 {
diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.txt b/Documentation/devicetree/bindings/gpio/gpio-vf610.txt
new file mode 100644
index 000000000000..436cc99c6598
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.txt
@@ -0,0 +1,55 @@
1* Freescale VF610 PORT/GPIO module
2
3The Freescale PORT/GPIO modules are two adjacent modules providing GPIO
4functionality. Each pair serves 32 GPIOs. The VF610 has 5 instances of
5each, and each PORT module has its own interrupt.
6
7Required properties for GPIO node:
8- compatible : Should be "fsl,<soc>-gpio", currently "fsl,vf610-gpio"
9- reg : The first reg tuple represents the PORT module, the second tuple
10 the GPIO module.
11- interrupts : Should be the port interrupt shared by all 32 pins.
12- gpio-controller : Marks the device node as a gpio controller.
13- #gpio-cells : Should be two. The first cell is the pin number and
14 the second cell is used to specify the gpio polarity:
15 0 = active high
16 1 = active low
17- interrupt-controller: Marks the device node as an interrupt controller.
18- #interrupt-cells : Should be 2. The first cell is the GPIO number.
19 The second cell bits[3:0] is used to specify trigger type and level flags:
20 1 = low-to-high edge triggered.
21 2 = high-to-low edge triggered.
22 4 = active high level-sensitive.
23 8 = active low level-sensitive.
24
25Note: Each GPIO port should have an alias correctly numbered in "aliases"
26node.
27
28Examples:
29
30aliases {
31 gpio0 = &gpio1;
32 gpio1 = &gpio2;
33};
34
35gpio1: gpio@40049000 {
36 compatible = "fsl,vf610-gpio";
37 reg = <0x40049000 0x1000 0x400ff000 0x40>;
38 interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
39 gpio-controller;
40 #gpio-cells = <2>;
41 interrupt-controller;
42 #interrupt-cells = <2>;
43 gpio-ranges = <&iomuxc 0 0 32>;
44};
45
46gpio2: gpio@4004a000 {
47 compatible = "fsl,vf610-gpio";
48 reg = <0x4004a000 0x1000 0x400ff040 0x40>;
49 interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
50 gpio-controller;
51 #gpio-cells = <2>;
52 interrupt-controller;
53 #interrupt-cells = <2>;
54 gpio-ranges = <&iomuxc 0 32 32>;
55};
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index 3fb8f53071b8..b9bd1d64cfa6 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -13,13 +13,22 @@ properties, each containing a 'gpio-list':
13 gpio-specifier : Array of #gpio-cells specifying specific gpio 13 gpio-specifier : Array of #gpio-cells specifying specific gpio
14 (controller specific) 14 (controller specific)
15 15
16GPIO properties should be named "[<name>-]gpios". The exact 16GPIO properties should be named "[<name>-]gpios", with <name> being the purpose
17meaning of each gpios property must be documented in the device tree 17of this GPIO for the device. While a non-existent <name> is considered valid
18binding for each device. 18for compatibility reasons (resolving to the "gpios" property), it is not allowed
19for new bindings.
19 20
20For example, the following could be used to describe GPIO pins used 21GPIO properties can contain one or more GPIO phandles, but only in exceptional
21as chip select lines; with chip selects 0, 1 and 3 populated, and chip 22cases should they contain more than one. If your device uses several GPIOs with
22select 2 left empty: 23distinct functions, reference each of them under its own property, giving it a
24meaningful name. The only case where an array of GPIOs is accepted is when
25several GPIOs serve the same function (e.g. a parallel data line).
26
27The exact purpose of each gpios property must be documented in the device tree
28binding of the device.
29
30The following example could be used to describe GPIO pins used as device enable
31and bit-banged data signals:
23 32
24 gpio1: gpio1 { 33 gpio1: gpio1 {
25 gpio-controller 34 gpio-controller
@@ -30,10 +39,12 @@ select 2 left empty:
30 #gpio-cells = <1>; 39 #gpio-cells = <1>;
31 }; 40 };
32 [...] 41 [...]
33 chipsel-gpios = <&gpio1 12 0>, 42
34 <&gpio1 13 0>, 43 enable-gpios = <&gpio2 2>;
35 <0>, /* holes are permitted, means no GPIO 2 */ 44 data-gpios = <&gpio1 12 0>,
36 <&gpio2 2>; 45 <&gpio1 13 0>,
46 <&gpio1 14 0>,
47 <&gpio1 15 0>;
37 48
38Note that gpio-specifier length is controller dependent. In the 49Note that gpio-specifier length is controller dependent. In the
39above example, &gpio1 uses 2 cells to specify a gpio, while &gpio2 50above example, &gpio1 uses 2 cells to specify a gpio, while &gpio2
@@ -42,16 +53,17 @@ only uses one.
42gpio-specifier may encode: bank, pin position inside the bank, 53gpio-specifier may encode: bank, pin position inside the bank,
43whether pin is open-drain and whether pin is logically inverted. 54whether pin is open-drain and whether pin is logically inverted.
44Exact meaning of each specifier cell is controller specific, and must 55Exact meaning of each specifier cell is controller specific, and must
45be documented in the device tree binding for the device. 56be documented in the device tree binding for the device. Use the macros
57defined in include/dt-bindings/gpio/gpio.h whenever possible:
46 58
47Example of a node using GPIOs: 59Example of a node using GPIOs:
48 60
49 node { 61 node {
50 gpios = <&qe_pio_e 18 0>; 62 enable-gpios = <&qe_pio_e 18 GPIO_ACTIVE_HIGH>;
51 }; 63 };
52 64
53In this example gpio-specifier is "18 0" and encodes GPIO pin number, 65GPIO_ACTIVE_HIGH is 0, so in this example gpio-specifier is "18 0" and encodes
54and GPIO flags as accepted by the "qe_pio_e" gpio-controller. 66GPIO pin number, and GPIO flags as accepted by the "qe_pio_e" gpio-controller.
55 67
561.1) GPIO specifier best practices 681.1) GPIO specifier best practices
57---------------------------------- 69----------------------------------
diff --git a/Documentation/devicetree/bindings/gpio/pl061-gpio.txt b/Documentation/devicetree/bindings/gpio/pl061-gpio.txt
index a2c416bcbccc..89058d375b7c 100644
--- a/Documentation/devicetree/bindings/gpio/pl061-gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/pl061-gpio.txt
@@ -7,4 +7,4 @@ Required properties:
7 - bit 0 specifies polarity (0 for normal, 1 for inverted) 7 - bit 0 specifies polarity (0 for normal, 1 for inverted)
8- gpio-controller : Marks the device node as a GPIO controller. 8- gpio-controller : Marks the device node as a GPIO controller.
9- interrupts : Interrupt mapping for GPIO IRQ. 9- interrupts : Interrupt mapping for GPIO IRQ.
10 10- gpio-ranges : Interaction with the PINCTRL subsystem.
diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
index 941a26aa4322..38fb86f28ba2 100644
--- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
@@ -6,7 +6,9 @@ Required Properties:
6 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller. 6 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller.
7 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) 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. 8 - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller.
9 - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO controller. 9 - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO controller.
10 - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO controller.
11 - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller.
10 - "renesas,gpio-rcar": for generic R-Car GPIO controller. 12 - "renesas,gpio-rcar": for generic R-Car GPIO controller.
11 13
12 - reg: Base address and length of each memory resource used by the GPIO 14 - reg: Base address and length of each memory resource used by the GPIO
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
index b48f4ef31d93..4c32ef0b7db8 100644
--- a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
+++ b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
@@ -191,6 +191,8 @@ of the following host1x client modules:
191 - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection 191 - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection
192 - nvidia,edid: supplies a binary EDID blob 192 - nvidia,edid: supplies a binary EDID blob
193 - nvidia,panel: phandle of a display panel 193 - nvidia,panel: phandle of a display panel
194 - nvidia,ganged-mode: contains a phandle to a second DSI controller to gang
195 up with in order to support up to 8 data lanes
194 196
195- sor: serial output resource 197- sor: serial output resource
196 198
diff --git a/Documentation/devicetree/bindings/gpu/st,stih4xx.txt b/Documentation/devicetree/bindings/gpu/st,stih4xx.txt
index 2d150c311a05..c99eb34e640b 100644
--- a/Documentation/devicetree/bindings/gpu/st,stih4xx.txt
+++ b/Documentation/devicetree/bindings/gpu/st,stih4xx.txt
@@ -68,7 +68,7 @@ STMicroelectronics stih4xx platforms
68 number of clocks may depend of the SoC type. 68 number of clocks may depend of the SoC type.
69 - clock-names: names of the clocks listed in clocks property in the same 69 - clock-names: names of the clocks listed in clocks property in the same
70 order. 70 order.
71 - hdmi,hpd-gpio: gpio id to detect if an hdmi cable is plugged or not. 71 - ddc: phandle of an I2C controller used for DDC EDID probing
72 72
73sti-hda: 73sti-hda:
74 Required properties: 74 Required properties:
@@ -83,6 +83,22 @@ sti-hda:
83 - clock-names: names of the clocks listed in clocks property in the same 83 - clock-names: names of the clocks listed in clocks property in the same
84 order. 84 order.
85 85
86sti-hqvdp:
87 must be a child of sti-display-subsystem
88 Required properties:
89 - compatible: "st,stih<chip>-hqvdp"
90 - reg: Physical base address of the IP registers and length of memory mapped region.
91 - clocks: from common clock binding: handle hardware IP needed clocks, the
92 number of clocks may depend of the SoC type.
93 See ../clocks/clock-bindings.txt for details.
94 - clock-names: names of the clocks listed in clocks property in the same
95 order.
96 - resets: resets to be used by the device
97 See ../reset/reset.txt for details.
98 - reset-names: names of the resets listed in resets property in the same
99 order.
100 - st,vtg: phandle on vtg main device node.
101
86Example: 102Example:
87 103
88/ { 104/ {
@@ -173,7 +189,6 @@ Example:
173 interrupt-names = "irq"; 189 interrupt-names = "irq";
174 clock-names = "pix", "tmds", "phy", "audio"; 190 clock-names = "pix", "tmds", "phy", "audio";
175 clocks = <&clockgen_c_vcc CLK_S_PIX_HDMI>, <&clockgen_c_vcc CLK_S_TMDS_HDMI>, <&clockgen_c_vcc CLK_S_HDMI_REJECT_PLL>, <&clockgen_b1 CLK_S_PCM_0>; 191 clocks = <&clockgen_c_vcc CLK_S_PIX_HDMI>, <&clockgen_c_vcc CLK_S_TMDS_HDMI>, <&clockgen_c_vcc CLK_S_HDMI_REJECT_PLL>, <&clockgen_b1 CLK_S_PCM_0>;
176 hdmi,hpd-gpio = <&PIO2 5>;
177 }; 192 };
178 193
179 sti-hda@fe85a000 { 194 sti-hda@fe85a000 {
@@ -184,6 +199,16 @@ Example:
184 clocks = <&clockgen_c_vcc CLK_S_PIX_HD>, <&clockgen_c_vcc CLK_S_HDDAC>; 199 clocks = <&clockgen_c_vcc CLK_S_PIX_HD>, <&clockgen_c_vcc CLK_S_HDDAC>;
185 }; 200 };
186 }; 201 };
202
203 sti-hqvdp@9c000000 {
204 compatible = "st,stih407-hqvdp";
205 reg = <0x9C00000 0x100000>;
206 clock-names = "hqvdp", "pix_main";
207 clocks = <&clk_s_c0_flexgen CLK_MAIN_DISP>, <&clk_s_d2_flexgen CLK_PIX_MAIN_DISP>;
208 reset-names = "hqvdp";
209 resets = <&softreset STIH407_HDQVDP_SOFTRESET>;
210 st,vtg = <&vtg_main>;
211 };
187 }; 212 };
188 ... 213 ...
189}; 214};
diff --git a/Documentation/devicetree/bindings/hwmon/ltc2978.txt b/Documentation/devicetree/bindings/hwmon/ltc2978.txt
new file mode 100644
index 000000000000..ed2f09dc2483
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/ltc2978.txt
@@ -0,0 +1,39 @@
1ltc2978
2
3Required properties:
4- compatible: should contain one of:
5 * "lltc,ltc2974"
6 * "lltc,ltc2977"
7 * "lltc,ltc2978"
8 * "lltc,ltc3880"
9 * "lltc,ltc3883"
10 * "lltc,ltm4676"
11- reg: I2C slave address
12
13Optional properties:
14- regulators: A node that houses a sub-node for each regulator controlled by
15 the device. Each sub-node is identified using the node's name, with valid
16 values listed below. The content of each sub-node is defined by the
17 standard binding for regulators; see regulator.txt.
18
19Valid names of regulators depend on number of supplies supported per device:
20 * ltc2974 : vout0 - vout3
21 * ltc2977 : vout0 - vout7
22 * ltc2978 : vout0 - vout7
23 * ltc3880 : vout0 - vout1
24 * ltc3883 : vout0
25 * ltm4676 : vout0 - vout1
26
27Example:
28ltc2978@5e {
29 compatible = "lltc,ltc2978";
30 reg = <0x5e>;
31 regulators {
32 vout0 {
33 regulator-name = "FPGA-2.5V";
34 };
35 vout2 {
36 regulator-name = "FPGA-1.5V";
37 };
38 };
39};
diff --git a/Documentation/devicetree/bindings/hwrng/atmel-trng.txt b/Documentation/devicetree/bindings/hwrng/atmel-trng.txt
new file mode 100644
index 000000000000..4ac5aaa2d024
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwrng/atmel-trng.txt
@@ -0,0 +1,16 @@
1Atmel TRNG (True Random Number Generator) block
2
3Required properties:
4- compatible : Should be "atmel,at91sam9g45-trng"
5- reg : Offset and length of the register set of this block
6- interrupts : the interrupt number for the TRNG block
7- clocks: should contain the TRNG clk source
8
9Example:
10
11trng@fffcc000 {
12 compatible = "atmel,at91sam9g45-trng";
13 reg = <0xfffcc000 0x4000>;
14 interrupts = <6 IRQ_TYPE_LEVEL_HIGH 0>;
15 clocks = <&trng_clk>;
16};
diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
index 5199b0c8cf7a..fee26dc3e858 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
@@ -14,10 +14,10 @@ Optional properties :
14 - i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds. 14 - i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds.
15 This option is only supported in hardware blocks version 1.11a or newer. 15 This option is only supported in hardware blocks version 1.11a or newer.
16 16
17 - i2c-scl-falling-time : should contain the SCL falling time in nanoseconds. 17 - i2c-scl-falling-time-ns : should contain the SCL falling time in nanoseconds.
18 This value which is by default 300ns is used to compute the tLOW period. 18 This value which is by default 300ns is used to compute the tLOW period.
19 19
20 - i2c-sda-falling-time : should contain the SDA falling time in nanoseconds. 20 - i2c-sda-falling-time-ns : should contain the SDA falling time in nanoseconds.
21 This value which is by default 300ns is used to compute the tHIGH period. 21 This value which is by default 300ns is used to compute the tHIGH period.
22 22
23Example : 23Example :
diff --git a/Documentation/devicetree/bindings/i2c/i2c-img-scb.txt b/Documentation/devicetree/bindings/i2c/i2c-img-scb.txt
new file mode 100644
index 000000000000..b6461602dca5
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-img-scb.txt
@@ -0,0 +1,26 @@
1IMG Serial Control Bus (SCB) I2C Controller
2
3Required Properties:
4- compatible: "img,scb-i2c"
5- reg: Physical base address and length of controller registers
6- interrupts: Interrupt number used by the controller
7- clocks : Should contain a clock specifier for each entry in clock-names
8- clock-names : Should contain the following entries:
9 "scb", for the SCB core clock.
10 "sys", for the system clock.
11- clock-frequency: The I2C bus frequency in Hz
12- #address-cells: Should be <1>
13- #size-cells: Should be <0>
14
15Example:
16
17i2c@18100000 {
18 compatible = "img,scb-i2c";
19 reg = <0x18100000 0x200>;
20 interrupts = <GIC_SHARED 2 IRQ_TYPE_LEVEL_HIGH>;
21 clocks = <&i2c0_clk>, <&system_clk>;
22 clock-names = "scb", "sys";
23 clock-frequency = <400000>;
24 #address-cells = <1>;
25 #size-cells = <0>;
26};
diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.txt b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
index 4a8513e44740..52d37fd8d3e5 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-imx.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
@@ -11,6 +11,8 @@ Required properties:
11Optional properties: 11Optional properties:
12- clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz. 12- clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz.
13 The absence of the propoerty indicates the default frequency 100 kHz. 13 The absence of the propoerty indicates the default frequency 100 kHz.
14- dmas: A list of two dma specifiers, one for each entry in dma-names.
15- dma-names: should contain "tx" and "rx".
14 16
15Examples: 17Examples:
16 18
@@ -26,3 +28,12 @@ i2c@70038000 { /* HS-I2C on i.MX51 */
26 interrupts = <64>; 28 interrupts = <64>;
27 clock-frequency = <400000>; 29 clock-frequency = <400000>;
28}; 30};
31
32i2c0: i2c@40066000 { /* i2c0 on vf610 */
33 compatible = "fsl,vf610-i2c";
34 reg = <0x40066000 0x1000>;
35 interrupts =<0 71 0x04>;
36 dmas = <&edma0 0 50>,
37 <&edma0 0 51>;
38 dma-names = "rx","tx";
39};
diff --git a/Documentation/devicetree/bindings/i2c/i2c-meson.txt b/Documentation/devicetree/bindings/i2c/i2c-meson.txt
new file mode 100644
index 000000000000..682f9a6f766e
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-meson.txt
@@ -0,0 +1,24 @@
1Amlogic Meson I2C controller
2
3Required properties:
4 - compatible: must be "amlogic,meson6-i2c"
5 - reg: physical address and length of the device registers
6 - interrupts: a single interrupt specifier
7 - clocks: clock for the device
8 - #address-cells: should be <1>
9 - #size-cells: should be <0>
10
11Optional properties:
12- clock-frequency: the desired I2C bus clock frequency in Hz; in
13 absence of this property the default value is used (100 kHz).
14
15Examples:
16
17 i2c@c8100500 {
18 compatible = "amlogic,meson6-i2c";
19 reg = <0xc8100500 0x20>;
20 interrupts = <0 92 1>;
21 clocks = <&clk81>;
22 #address-cells = <1>;
23 #size-cells = <0>;
24 };
diff --git a/Documentation/devicetree/bindings/i2c/i2c-opal.txt b/Documentation/devicetree/bindings/i2c/i2c-opal.txt
new file mode 100644
index 000000000000..12bc61465ee5
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-opal.txt
@@ -0,0 +1,37 @@
1Device-tree bindings for I2C OPAL driver
2----------------------------------------
3
4Most of the device node and properties layout is specific to the firmware and
5used by the firmware itself for configuring the port. From the linux
6perspective, the properties of use are "ibm,port-name" and "ibm,opal-id".
7
8Required properties:
9
10- reg: Port-id within a given master
11- compatible: must be "ibm,opal-i2c"
12- ibm,opal-id: Refers to a specific bus and used to identify it when calling
13 the relevant OPAL functions.
14- bus-frequency: Operating frequency of the i2c bus (in HZ). Informational for
15 linux, used by the FW though.
16
17Optional properties:
18- ibm,port-name: Firmware provides this name that uniquely identifies the i2c
19 port.
20
21The node contains a number of other properties that are used by the FW itself
22and depend on the specific hardware implementation. The example below depicts
23a P8 on-chip bus.
24
25Example:
26
27i2c-bus@0 {
28 reg = <0x0>;
29 bus-frequency = <0x61a80>;
30 compatible = "ibm,power8-i2c-port", "ibm,opal-i2c";
31 ibm,opal-id = <0x1>;
32 ibm,port-name = "p8_00000000_e1p0";
33 #address-cells = <0x1>;
34 phandle = <0x10000006>;
35 #size-cells = <0x0>;
36 linux,phandle = <0x10000006>;
37};
diff --git a/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt
index 278de8e64bbf..89b3250f049b 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt
@@ -32,6 +32,7 @@ Optional properties:
32 specified, default value is 0. 32 specified, default value is 0.
33 - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not 33 - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not
34 specified, the default value in Hz is 100000. 34 specified, the default value in Hz is 100000.
35 - samsung,sysreg-phandle - handle to syscon used to control the system registers
35 36
36Example: 37Example:
37 38
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
index d2153ce36fa8..2bfc6e7ed094 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
@@ -2,6 +2,15 @@ Device tree configuration for Renesas IIC (sh_mobile) driver
2 2
3Required properties: 3Required properties:
4- compatible : "renesas,iic-<soctype>". "renesas,rmobile-iic" as fallback 4- compatible : "renesas,iic-<soctype>". "renesas,rmobile-iic" as fallback
5 Examples with soctypes are:
6 - "renesas,iic-r8a73a4" (R-Mobile APE6)
7 - "renesas,iic-r8a7740" (R-Mobile A1)
8 - "renesas,iic-r8a7790" (R-Car H2)
9 - "renesas,iic-r8a7791" (R-Car M2-W)
10 - "renesas,iic-r8a7792" (R-Car V2H)
11 - "renesas,iic-r8a7793" (R-Car M2-N)
12 - "renesas,iic-r8a7794" (R-Car E2)
13 - "renesas,iic-sh73a0" (SH-Mobile AG5)
5- reg : address start and address range size of device 14- reg : address start and address range size of device
6- interrupts : interrupt of device 15- interrupts : interrupt of device
7- clocks : clock for device 16- clocks : clock for device
@@ -10,6 +19,11 @@ Required properties:
10 19
11Optional properties: 20Optional properties:
12- clock-frequency : frequency of bus clock in Hz. Default 100kHz if unset. 21- clock-frequency : frequency of bus clock in Hz. Default 100kHz if unset.
22- dmas : Must contain a list of two references to DMA
23 specifiers, one for transmission, and one for
24 reception.
25- dma-names : Must contain a list of two DMA names, "tx" and "rx".
26
13 27
14Pinctrl properties might be needed, too. See there. 28Pinctrl properties might be needed, too. See there.
15 29
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
index fbde415078e6..9f4e3824e71e 100644
--- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
@@ -17,6 +17,9 @@ adi,adt7473 +/-1C TDM Extended Temp Range I.C
17adi,adt7475 +/-1C TDM Extended Temp Range I.C 17adi,adt7475 +/-1C TDM Extended Temp Range I.C
18adi,adt7476 +/-1C TDM Extended Temp Range I.C 18adi,adt7476 +/-1C TDM Extended Temp Range I.C
19adi,adt7490 +/-1C TDM Extended Temp Range I.C 19adi,adt7490 +/-1C TDM Extended Temp Range I.C
20adi,adxl345 Three-Axis Digital Accelerometer
21adi,adxl346 Three-Axis Digital Accelerometer
22adi,adxl34x Three-Axis Digital Accelerometer
20at,24c08 i2c serial eeprom (24cxx) 23at,24c08 i2c serial eeprom (24cxx)
21atmel,24c00 i2c serial eeprom (24cxx) 24atmel,24c00 i2c serial eeprom (24cxx)
22atmel,24c01 i2c serial eeprom (24cxx) 25atmel,24c01 i2c serial eeprom (24cxx)
@@ -56,6 +59,8 @@ gmt,g751 G751: Digital Temperature Sensor and Thermal Watchdog with Two-Wire In
56infineon,slb9635tt Infineon SLB9635 (Soft-) I2C TPM (old protocol, max 100khz) 59infineon,slb9635tt Infineon SLB9635 (Soft-) I2C TPM (old protocol, max 100khz)
57infineon,slb9645tt Infineon SLB9645 I2C TPM (new protocol, max 400khz) 60infineon,slb9645tt Infineon SLB9645 I2C TPM (new protocol, max 400khz)
58isl,isl12057 Intersil ISL12057 I2C RTC Chip 61isl,isl12057 Intersil ISL12057 I2C RTC Chip
62isil,isl29028 (deprecated, use isl)
63isl,isl29028 Intersil ISL29028 Ambient Light and Proximity Sensor
59maxim,ds1050 5 Bit Programmable, Pulse-Width Modulator 64maxim,ds1050 5 Bit Programmable, Pulse-Width Modulator
60maxim,max1237 Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs 65maxim,max1237 Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs
61maxim,max6625 9-Bit/12-Bit Temperature Sensors with I²C-Compatible Serial Interface 66maxim,max6625 9-Bit/12-Bit Temperature Sensors with I²C-Compatible Serial Interface
@@ -74,7 +79,12 @@ ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI an
74pericom,pt7c4338 Real-time Clock Module 79pericom,pt7c4338 Real-time Clock Module
75plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch 80plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch
76ramtron,24c64 i2c serial eeprom (24cxx) 81ramtron,24c64 i2c serial eeprom (24cxx)
82ricoh,r2025sd I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
83ricoh,r2221tl I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
77ricoh,rs5c372a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC 84ricoh,rs5c372a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
85ricoh,rs5c372b I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
86ricoh,rv5c386 I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
87ricoh,rv5c387a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
78samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power) 88samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power)
79sii,s35390a 2-wire CMOS real-time clock 89sii,s35390a 2-wire CMOS real-time clock
80st-micro,24c256 i2c serial eeprom (24cxx) 90st-micro,24c256 i2c serial eeprom (24cxx)
diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.txt b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.txt
new file mode 100644
index 000000000000..4e36d6e2f7b6
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.txt
@@ -0,0 +1,46 @@
1Qualcomm's SPMI PMIC current ADC
2
3QPNP PMIC current ADC (IADC) provides interface to clients to read current.
4A 16 bit ADC is used for current measurements. IADC can measure the current
5through an external resistor (channel 1) or internal (built-in) resistor
6(channel 0). When using an external resistor it is to be described by
7qcom,external-resistor-micro-ohms property.
8
9IADC node:
10
11- compatible:
12 Usage: required
13 Value type: <string>
14 Definition: Should contain "qcom,spmi-iadc".
15
16- reg:
17 Usage: required
18 Value type: <prop-encoded-array>
19 Definition: IADC base address and length in the SPMI PMIC register map
20
21- interrupts:
22 Usage: optional
23 Value type: <prop-encoded-array>
24 Definition: End of ADC conversion.
25
26- qcom,external-resistor-micro-ohms:
27 Usage: optional
28 Value type: <u32>
29 Definition: Sense resister value in micro Ohm.
30 If not defined value of 10000 micro Ohms will be used.
31
32Example:
33 /* IADC node */
34 pmic_iadc: iadc@3600 {
35 compatible = "qcom,spmi-iadc";
36 reg = <0x3600 0x100>;
37 interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
38 qcom,external-resistor-micro-ohms = <10000>;
39 #io-channel-cells = <1>;
40 };
41
42 /* IIO client node */
43 bat {
44 io-channels = <&pmic_iadc 0>;
45 io-channel-names = "iadc";
46 };
diff --git a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
index 5d3ec1df226d..a9a5fe19ff2a 100644
--- a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
+++ b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
@@ -1,7 +1,7 @@
1Rockchip Successive Approximation Register (SAR) A/D Converter bindings 1Rockchip Successive Approximation Register (SAR) A/D Converter bindings
2 2
3Required properties: 3Required properties:
4- compatible: Should be "rockchip,saradc" 4- compatible: Should be "rockchip,saradc" or "rockchip,rk3066-tsadc"
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: The interrupt number to the cpu. The interrupt specifier format 7- interrupts: The interrupt number to the cpu. The interrupt specifier format
diff --git a/Documentation/devicetree/bindings/input/cap1106.txt b/Documentation/devicetree/bindings/input/cap11xx.txt
index 4b463904cba0..7d0a3009771b 100644
--- a/Documentation/devicetree/bindings/input/cap1106.txt
+++ b/Documentation/devicetree/bindings/input/cap11xx.txt
@@ -1,14 +1,16 @@
1Device tree bindings for Microchip CAP1106, 6 channel capacitive touch sensor 1Device tree bindings for Microchip CAP11xx based capacitive touch sensors
2 2
3The node for this driver must be a child of a I2C controller node, as the 3The node for this device must be a child of a I2C controller node, as the
4device communication via I2C only. 4device communication via I2C only.
5 5
6Required properties: 6Required properties:
7 7
8 compatible: Must be "microchip,cap1106" 8 compatible: Must contain one of:
9 "microchip,cap1106"
10 "microchip,cap1126"
11 "microchip,cap1188"
9 12
10 reg: The I2C slave address of the device. 13 reg: The I2C slave address of the device.
11 Only 0x28 is valid.
12 14
13 interrupts: Property describing the interrupt line the 15 interrupts: Property describing the interrupt line the
14 device's ALERT#/CM_IRQ# pin is connected to. 16 device's ALERT#/CM_IRQ# pin is connected to.
@@ -26,6 +28,10 @@ Optional properties:
26 Valid values are 1, 2, 4, and 8. 28 Valid values are 1, 2, 4, and 8.
27 By default, a gain of 1 is set. 29 By default, a gain of 1 is set.
28 30
31 microchip,irq-active-high: By default the interrupt pin is active low
32 open drain. This property allows using the active
33 high push-pull output.
34
29 linux,keycodes: Specifies an array of numeric keycode values to 35 linux,keycodes: Specifies an array of numeric keycode values to
30 be used for the channels. If this property is 36 be used for the channels. If this property is
31 omitted, KEY_A, KEY_B, etc are used as 37 omitted, KEY_A, KEY_B, etc are used as
@@ -43,11 +49,11 @@ i2c_controller {
43 autorepeat; 49 autorepeat;
44 microchip,sensor-gain = <2>; 50 microchip,sensor-gain = <2>;
45 51
46 linux,keycodes = <103 /* KEY_UP */ 52 linux,keycodes = <103>, /* KEY_UP */
47 106 /* KEY_RIGHT */ 53 <106>, /* KEY_RIGHT */
48 108 /* KEY_DOWN */ 54 <108>, /* KEY_DOWN */
49 105 /* KEY_LEFT */ 55 <105>, /* KEY_LEFT */
50 109 /* KEY_PAGEDOWN */ 56 <109>, /* KEY_PAGEDOWN */
51 104>; /* KEY_PAGEUP */ 57 <104>; /* KEY_PAGEUP */
52 }; 58 };
53} 59}
diff --git a/Documentation/devicetree/bindings/input/elan_i2c.txt b/Documentation/devicetree/bindings/input/elan_i2c.txt
new file mode 100644
index 000000000000..ee3242c4ba67
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/elan_i2c.txt
@@ -0,0 +1,34 @@
1Elantech I2C Touchpad
2
3Required properties:
4- compatible: must be "elan,ekth3000".
5- reg: I2C address of the chip.
6- interrupt-parent: a phandle for the interrupt controller (see interrupt
7 binding[0]).
8- interrupts: interrupt to which the chip is connected (see interrupt
9 binding[0]).
10
11Optional properties:
12- wakeup-source: touchpad can be used as a wakeup source.
13- pinctrl-names: should be "default" (see pinctrl binding [1]).
14- pinctrl-0: a phandle pointing to the pin settings for the device (see
15 pinctrl binding [1]).
16- vcc-supply: a phandle for the regulator supplying 3.3V power.
17
18[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
19[1]: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
20
21Example:
22 &i2c1 {
23 /* ... */
24
25 touchpad@15 {
26 compatible = "elan,ekth3000";
27 reg = <0x15>;
28 interrupt-parent = <&gpio4>;
29 interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>;
30 wakeup-source;
31 };
32
33 /* ... */
34 };
diff --git a/Documentation/devicetree/bindings/input/elants_i2c.txt b/Documentation/devicetree/bindings/input/elants_i2c.txt
new file mode 100644
index 000000000000..a765232e6446
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/elants_i2c.txt
@@ -0,0 +1,33 @@
1Elantech I2C Touchscreen
2
3Required properties:
4- compatible: must be "elan,ekth3500".
5- reg: I2C address of the chip.
6- interrupt-parent: a phandle for the interrupt controller (see interrupt
7 binding[0]).
8- interrupts: interrupt to which the chip is connected (see interrupt
9 binding[0]).
10
11Optional properties:
12- wakeup-source: touchscreen can be used as a wakeup source.
13- pinctrl-names: should be "default" (see pinctrl binding [1]).
14- pinctrl-0: a phandle pointing to the pin settings for the device (see
15 pinctrl binding [1]).
16
17[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
18[1]: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
19
20Example:
21 &i2c1 {
22 /* ... */
23
24 touchscreen@10 {
25 compatible = "elan,ekth3500";
26 reg = <0x10>;
27 interrupt-parent = <&gpio4>;
28 interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>;
29 wakeup-source;
30 };
31
32 /* ... */
33 };
diff --git a/Documentation/devicetree/bindings/input/gpio-keys.txt b/Documentation/devicetree/bindings/input/gpio-keys.txt
index 5c2c02140a62..a4a38fcf2ed6 100644
--- a/Documentation/devicetree/bindings/input/gpio-keys.txt
+++ b/Documentation/devicetree/bindings/input/gpio-keys.txt
@@ -10,10 +10,13 @@ Optional properties:
10Each button (key) is represented as a sub-node of "gpio-keys": 10Each button (key) is represented as a sub-node of "gpio-keys":
11Subnode properties: 11Subnode properties:
12 12
13 - gpios: OF device-tree gpio specification.
14 - label: Descriptive name of the key. 13 - label: Descriptive name of the key.
15 - linux,code: Keycode to emit. 14 - linux,code: Keycode to emit.
16 15
16Required mutual exclusive subnode-properties:
17 - gpios: OF device-tree gpio specification.
18 - interrupts: the interrupt line for that input
19
17Optional subnode-properties: 20Optional subnode-properties:
18 - linux,input-type: Specify event type this button/key generates. 21 - linux,input-type: Specify event type this button/key generates.
19 If not specified defaults to <1> == EV_KEY. 22 If not specified defaults to <1> == EV_KEY.
@@ -33,4 +36,9 @@ Example nodes:
33 linux,code = <103>; 36 linux,code = <103>;
34 gpios = <&gpio1 0 1>; 37 gpios = <&gpio1 0 1>;
35 }; 38 };
39 button@22 {
40 label = "GPIO Key DOWN";
41 linux,code = <108>;
42 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
43 };
36 ... 44 ...
diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt
index ff812a8a82bc..bae1f2187226 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt
@@ -13,7 +13,12 @@ Such an interrupt controller has the following hardware design:
13 or if they will output an interrupt signal at this 2nd level interrupt 13 or if they will output an interrupt signal at this 2nd level interrupt
14 controller, in particular for UARTs 14 controller, in particular for UARTs
15 15
16- not all 32-bits within the interrupt controller actually map to an interrupt 16- typically has one 32-bit enable word and one 32-bit status word, but on
17 some hardware may have more than one enable/status pair
18
19- no atomic set/clear operations
20
21- not all bits within the interrupt controller actually map to an interrupt
17 22
18The typical hardware layout for this controller is represented below: 23The typical hardware layout for this controller is represented below:
19 24
@@ -48,7 +53,9 @@ The typical hardware layout for this controller is represented below:
48Required properties: 53Required properties:
49 54
50- compatible: should be "brcm,bcm7120-l2-intc" 55- compatible: should be "brcm,bcm7120-l2-intc"
51- reg: specifies the base physical address and size of the registers 56- reg: specifies the base physical address and size of the registers;
57 multiple pairs may be specified, with the first pair handling IRQ offsets
58 0..31 and the second pair handling 32..63
52- interrupt-controller: identifies the node as an interrupt controller 59- interrupt-controller: identifies the node as an interrupt controller
53- #interrupt-cells: specifies the number of cells needed to encode an interrupt 60- #interrupt-cells: specifies the number of cells needed to encode an interrupt
54 source, should be 1. 61 source, should be 1.
@@ -59,18 +66,21 @@ Required properties:
59- brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts 66- brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts
60 are wired to this 2nd level interrupt controller, and how they match their 67 are wired to this 2nd level interrupt controller, and how they match their
61 respective interrupt parents. Should match exactly the number of interrupts 68 respective interrupt parents. Should match exactly the number of interrupts
62 specified in the 'interrupts' property. 69 specified in the 'interrupts' property, multiplied by the number of
70 enable/status register pairs implemented by this controller. For
71 multiple parent IRQs with multiple enable/status words, this looks like:
72 <irq0_w0 irq0_w1 irq1_w0 irq1_w1 ...>
63 73
64Optional properties: 74Optional properties:
65 75
66- brcm,irq-can-wake: if present, this means the L2 controller can be used as a 76- brcm,irq-can-wake: if present, this means the L2 controller can be used as a
67 wakeup source for system suspend/resume. 77 wakeup source for system suspend/resume.
68 78
69- brcm,int-fwd-mask: if present, a 32-bits bit mask to configure for the 79- brcm,int-fwd-mask: if present, a bit mask to configure the interrupts which
70 interrupts which have a mux gate, typically UARTs. Setting these bits will 80 have a mux gate, typically UARTs. Setting these bits will make their
71 make their respective interrupts outputs bypass this 2nd level interrupt 81 respective interrupt outputs bypass this 2nd level interrupt controller
72 controller completely, it completely transparent for the interrupt controller 82 completely; it is completely transparent for the interrupt controller
73 parent 83 parent. This should have one 32-bit word per enable/status pair.
74 84
75Example: 85Example:
76 86
diff --git a/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt b/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
index ce6a1a072028..8a3c40829899 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
@@ -30,10 +30,6 @@ should only be used when a device has multiple interrupt parents.
30 Example: 30 Example:
31 interrupts-extended = <&intc1 5 1>, <&intc2 1 0>; 31 interrupts-extended = <&intc1 5 1>, <&intc2 1 0>;
32 32
33A device node may contain either "interrupts" or "interrupts-extended", but not
34both. If both properties are present, then the operating system should log an
35error and use only the data in "interrupts".
36
372) Interrupt controller nodes 332) Interrupt controller nodes
38----------------------------- 34-----------------------------
39 35
diff --git a/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt b/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt
new file mode 100644
index 000000000000..5a65478e5d40
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt
@@ -0,0 +1,55 @@
1MIPS Global Interrupt Controller (GIC)
2
3The MIPS GIC routes external interrupts to individual VPEs and IRQ pins.
4It also supports local (per-processor) interrupts and software-generated
5interrupts which can be used as IPIs. The GIC also includes a free-running
6global timer, per-CPU count/compare timers, and a watchdog.
7
8Required properties:
9- compatible : Should be "mti,gic".
10- interrupt-controller : Identifies the node as an interrupt controller
11- #interrupt-cells : Specifies the number of cells needed to encode an
12 interrupt specifier. Should be 3.
13 - The first cell is the type of interrupt, local or shared.
14 See <include/dt-bindings/interrupt-controller/mips-gic.h>.
15 - The second cell is the GIC interrupt number.
16 - The third cell encodes the interrupt flags.
17 See <include/dt-bindings/interrupt-controller/irq.h> for a list of valid
18 flags.
19
20Optional properties:
21- reg : Base address and length of the GIC registers. If not present,
22 the base address reported by the hardware GCR_GIC_BASE will be used.
23- mti,reserved-cpu-vectors : Specifies the list of CPU interrupt vectors
24 to which the GIC may not route interrupts. Valid values are 2 - 7.
25 This property is ignored if the CPU is started in EIC mode.
26
27Required properties for timer sub-node:
28- compatible : Should be "mti,gic-timer".
29- interrupts : Interrupt for the GIC local timer.
30- clock-frequency : Clock frequency at which the GIC timers operate.
31
32Example:
33
34 gic: interrupt-controller@1bdc0000 {
35 compatible = "mti,gic";
36 reg = <0x1bdc0000 0x20000>;
37
38 interrupt-controller;
39 #interrupt-cells = <3>;
40
41 mti,reserved-cpu-vectors = <7>;
42
43 timer {
44 compatible = "mti,gic-timer";
45 interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
46 clock-frequency = <50000000>;
47 };
48 };
49
50 uart@18101400 {
51 ...
52 interrupt-parent = <&gic>;
53 interrupts = <GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>;
54 ...
55 };
diff --git a/Documentation/devicetree/bindings/iommu/rockchip,iommu.txt b/Documentation/devicetree/bindings/iommu/rockchip,iommu.txt
new file mode 100644
index 000000000000..9a55ac3735e5
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/rockchip,iommu.txt
@@ -0,0 +1,26 @@
1Rockchip IOMMU
2==============
3
4A Rockchip DRM iommu translates io virtual addresses to physical addresses for
5its master device. Each slave device is bound to a single master device, and
6shares its clocks, power domain and irq.
7
8Required properties:
9- compatible : Should be "rockchip,iommu"
10- reg : Address space for the configuration registers
11- interrupts : Interrupt specifier for the IOMMU instance
12- interrupt-names : Interrupt name for the IOMMU instance
13- #iommu-cells : Should be <0>. This indicates the iommu is a
14 "single-master" device, and needs no additional information
15 to associate with its master device. See:
16 Documentation/devicetree/bindings/iommu/iommu.txt
17
18Example:
19
20 vopl_mmu: iommu@ff940300 {
21 compatible = "rockchip,iommu";
22 reg = <0xff940300 0x100>;
23 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
24 interrupt-names = "vopl_mmu";
25 #iommu-cells = <0>;
26 };
diff --git a/Documentation/devicetree/bindings/leds/leds-lp8860.txt b/Documentation/devicetree/bindings/leds/leds-lp8860.txt
new file mode 100644
index 000000000000..aad38dd94d4b
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-lp8860.txt
@@ -0,0 +1,29 @@
1* Texas Instruments - lp8860 4-Channel LED Driver
2
3The LP8860-Q1 is an high-efficiency LED
4driver with boost controller. It has 4 high-precision
5current sinks that can be controlled by a PWM input
6signal, a SPI/I2C master, or both.
7
8Required properties:
9 - compatible:
10 "ti,lp8860"
11 - reg - I2C slave address
12 - label - Used for naming LEDs
13
14Optional properties:
15 - enable-gpio - gpio pin to enable/disable the device.
16 - supply - "vled" - LED supply
17
18Example:
19
20leds: leds@6 {
21 compatible = "ti,lp8860";
22 reg = <0x2d>;
23 label = "display_cluster";
24 enable-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
25 vled-supply = <&vbatt>;
26}
27
28For more product information please see the link below:
29http://www.ti.com/product/lp8860-q1
diff --git a/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt b/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt
index 48edc4b92afb..d1a043339c11 100644
--- a/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt
+++ b/Documentation/devicetree/bindings/mailbox/omap-mailbox.txt
@@ -43,6 +43,9 @@ Required properties:
43 device. The format is dependent on which interrupt 43 device. The format is dependent on which interrupt
44 controller the OMAP device uses 44 controller the OMAP device uses
45- ti,hwmods: Name of the hwmod associated with the mailbox 45- ti,hwmods: Name of the hwmod associated with the mailbox
46- #mbox-cells: Common mailbox binding property to identify the number
47 of cells required for the mailbox specifier. Should be
48 1
46- ti,mbox-num-users: Number of targets (processor devices) that the mailbox 49- ti,mbox-num-users: Number of targets (processor devices) that the mailbox
47 device can interrupt 50 device can interrupt
48- ti,mbox-num-fifos: Number of h/w fifo queues within the mailbox IP block 51- ti,mbox-num-fifos: Number of h/w fifo queues within the mailbox IP block
@@ -72,6 +75,18 @@ data that represent the following:
72 Cell #3 (usr_id) - mailbox user id for identifying the interrupt line 75 Cell #3 (usr_id) - mailbox user id for identifying the interrupt line
73 associated with generating a tx/rx fifo interrupt. 76 associated with generating a tx/rx fifo interrupt.
74 77
78Mailbox Users:
79==============
80A device needing to communicate with a target processor device should specify
81them using the common mailbox binding properties, "mboxes" and the optional
82"mbox-names" (please see Documentation/devicetree/bindings/mailbox/mailbox.txt
83for details). Each value of the mboxes property should contain a phandle to the
84mailbox controller device node and an args specifier that will be the phandle to
85the intended sub-mailbox child node to be used for communication. The equivalent
86"mbox-names" property value can be used to give a name to the communication channel
87to be used by the client user.
88
89
75Example: 90Example:
76-------- 91--------
77 92
@@ -81,6 +96,7 @@ mailbox: mailbox@4a0f4000 {
81 reg = <0x4a0f4000 0x200>; 96 reg = <0x4a0f4000 0x200>;
82 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; 97 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
83 ti,hwmods = "mailbox"; 98 ti,hwmods = "mailbox";
99 #mbox-cells = <1>;
84 ti,mbox-num-users = <3>; 100 ti,mbox-num-users = <3>;
85 ti,mbox-num-fifos = <8>; 101 ti,mbox-num-fifos = <8>;
86 mbox_ipu: mbox_ipu { 102 mbox_ipu: mbox_ipu {
@@ -93,12 +109,19 @@ mailbox: mailbox@4a0f4000 {
93 }; 109 };
94}; 110};
95 111
112dsp {
113 ...
114 mboxes = <&mailbox &mbox_dsp>;
115 ...
116};
117
96/* AM33xx */ 118/* AM33xx */
97mailbox: mailbox@480C8000 { 119mailbox: mailbox@480C8000 {
98 compatible = "ti,omap4-mailbox"; 120 compatible = "ti,omap4-mailbox";
99 reg = <0x480C8000 0x200>; 121 reg = <0x480C8000 0x200>;
100 interrupts = <77>; 122 interrupts = <77>;
101 ti,hwmods = "mailbox"; 123 ti,hwmods = "mailbox";
124 #mbox-cells = <1>;
102 ti,mbox-num-users = <4>; 125 ti,mbox-num-users = <4>;
103 ti,mbox-num-fifos = <8>; 126 ti,mbox-num-fifos = <8>;
104 mbox_wkupm3: wkup_m3 { 127 mbox_wkupm3: wkup_m3 {
diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
new file mode 100644
index 000000000000..407848e85f31
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -0,0 +1,14 @@
1* Amlogic Meson IR remote control receiver
2
3Required properties:
4 - compatible : should be "amlogic,meson6-ir"
5 - reg : physical base address and length of the device registers
6 - interrupts : a single specifier for the interrupt from the device
7
8Example:
9
10 ir-receiver@c8100480 {
11 compatible= "amlogic,meson6-ir";
12 reg = <0xc8100480 0x20>;
13 interrupts = <0 15 1>;
14 };
diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt
index ba61782c2af9..9dafe6b06cd2 100644
--- a/Documentation/devicetree/bindings/media/rcar_vin.txt
+++ b/Documentation/devicetree/bindings/media/rcar_vin.txt
@@ -6,6 +6,8 @@ family of devices. The current blocks are always slaves and suppot one input
6channel which can be either RGB, YUYV or BT656. 6channel which can be either RGB, YUYV or BT656.
7 7
8 - compatible: Must be one of the following 8 - compatible: Must be one of the following
9 - "renesas,vin-r8a7794" for the R8A7794 device
10 - "renesas,vin-r8a7793" for the R8A7793 device
9 - "renesas,vin-r8a7791" for the R8A7791 device 11 - "renesas,vin-r8a7791" for the R8A7791 device
10 - "renesas,vin-r8a7790" for the R8A7790 device 12 - "renesas,vin-r8a7790" for the R8A7790 device
11 - "renesas,vin-r8a7779" for the R8A7779 device 13 - "renesas,vin-r8a7779" for the R8A7779 device
diff --git a/Documentation/devicetree/bindings/media/si4713.txt b/Documentation/devicetree/bindings/media/si4713.txt
new file mode 100644
index 000000000000..5ee5552d3465
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/si4713.txt
@@ -0,0 +1,30 @@
1* Silicon Labs FM Radio transmitter
2
3The Silicon Labs Si4713 is an FM radio transmitter with receive power scan
4supporting 76-108 MHz. It includes an RDS encoder and has both, a stereo-analog
5and a digital interface, which supports I2S, left-justified and a custom
6DSP-mode format. It is programmable through an I2C interface.
7
8Required Properties:
9- compatible: Should contain "silabs,si4713"
10- reg: the I2C address of the device
11
12Optional Properties:
13- interrupts-extended: Interrupt specifier for the chips interrupt
14- reset-gpios: GPIO specifier for the chips reset line
15- vdd-supply: phandle for Vdd regulator
16- vio-supply: phandle for Vio regulator
17
18Example:
19
20&i2c2 {
21 fmtx: si4713@63 {
22 compatible = "silabs,si4713";
23 reg = <0x63>;
24
25 interrupts-extended = <&gpio2 21 IRQ_TYPE_EDGE_FALLING>; /* 53 */
26 reset-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>; /* 163 */
27 vio-supply = <&vio>;
28 vdd-supply = <&vaux1>;
29 };
30};
diff --git a/Documentation/devicetree/bindings/memory-controllers/mvebu-sdram-controller.txt b/Documentation/devicetree/bindings/memory-controllers/mvebu-sdram-controller.txt
new file mode 100644
index 000000000000..89657d1d4cd4
--- /dev/null
+++ b/Documentation/devicetree/bindings/memory-controllers/mvebu-sdram-controller.txt
@@ -0,0 +1,21 @@
1Device Tree bindings for MVEBU SDRAM controllers
2
3The Marvell EBU SoCs all have a SDRAM controller. The SDRAM controller
4differs from one SoC variant to another, but they also share a number
5of commonalities.
6
7For now, this Device Tree binding documentation only documents the
8Armada XP SDRAM controller.
9
10Required properties:
11
12 - compatible: for Armada XP, "marvell,armada-xp-sdram-controller"
13 - reg: a resource specifier for the register space, which should
14 include all SDRAM controller registers as per the datasheet.
15
16Example:
17
18sdramc@1400 {
19 compatible = "marvell,armada-xp-sdram-controller";
20 reg = <0x1400 0x500>;
21};
diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt
new file mode 100644
index 000000000000..f3db93c85eea
--- /dev/null
+++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt
@@ -0,0 +1,36 @@
1NVIDIA Tegra Memory Controller device tree bindings
2===================================================
3
4Required properties:
5- compatible: Should be "nvidia,tegra<chip>-mc"
6- reg: Physical base address and length of the controller's registers.
7- clocks: Must contain an entry for each entry in clock-names.
8 See ../clocks/clock-bindings.txt for details.
9- clock-names: Must include the following entries:
10 - mc: the module's clock input
11- interrupts: The interrupt outputs from the controller.
12- #iommu-cells: Should be 1. The single cell of the IOMMU specifier defines
13 the SWGROUP of the master.
14
15This device implements an IOMMU that complies with the generic IOMMU binding.
16See ../iommu/iommu.txt for details.
17
18Example:
19--------
20
21 mc: memory-controller@0,70019000 {
22 compatible = "nvidia,tegra124-mc";
23 reg = <0x0 0x70019000 0x0 0x1000>;
24 clocks = <&tegra_car TEGRA124_CLK_MC>;
25 clock-names = "mc";
26
27 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
28
29 #iommu-cells = <1>;
30 };
31
32 sdhci@0,700b0000 {
33 compatible = "nvidia,tegra124-sdhci";
34 ...
35 iommus = <&mc TEGRA_SWGROUP_SDMMC1A>;
36 };
diff --git a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt
new file mode 100644
index 000000000000..f64de95a8e8b
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt
@@ -0,0 +1,51 @@
1Device-Tree bindings for Atmel's HLCDC (High LCD Controller) MFD driver
2
3Required properties:
4 - compatible: value should be one of the following:
5 "atmel,sama5d3-hlcdc"
6 - reg: base address and size of the HLCDC device registers.
7 - clock-names: the name of the 3 clocks requested by the HLCDC device.
8 Should contain "periph_clk", "sys_clk" and "slow_clk".
9 - clocks: should contain the 3 clocks requested by the HLCDC device.
10 - interrupts: should contain the description of the HLCDC interrupt line
11
12The HLCDC IP exposes two subdevices:
13 - a PWM chip: see ../pwm/atmel-hlcdc-pwm.txt
14 - a Display Controller: see ../drm/atmel-hlcdc-dc.txt
15
16Example:
17
18 hlcdc: hlcdc@f0030000 {
19 compatible = "atmel,sama5d3-hlcdc";
20 reg = <0xf0030000 0x2000>;
21 clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>;
22 clock-names = "periph_clk","sys_clk", "slow_clk";
23 interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
24 status = "disabled";
25
26 hlcdc-display-controller {
27 compatible = "atmel,hlcdc-display-controller";
28 pinctrl-names = "default";
29 pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 port@0 {
34 #address-cells = <1>;
35 #size-cells = <0>;
36 reg = <0>;
37
38 hlcdc_panel_output: endpoint@0 {
39 reg = <0>;
40 remote-endpoint = <&panel_input>;
41 };
42 };
43 };
44
45 hlcdc_pwm: hlcdc-pwm {
46 compatible = "atmel,hlcdc-pwm";
47 pinctrl-names = "default";
48 pinctrl-0 = <&pinctrl_lcd_pwm>;
49 #pwm-cells = <3>;
50 };
51 };
diff --git a/Documentation/devicetree/bindings/mfd/max77686.txt b/Documentation/devicetree/bindings/mfd/max77686.txt
index 678f3cf0b8f0..75fdfaf41831 100644
--- a/Documentation/devicetree/bindings/mfd/max77686.txt
+++ b/Documentation/devicetree/bindings/mfd/max77686.txt
@@ -34,6 +34,12 @@ to get matched with their hardware counterparts as follow:
34 -BUCKn : for BUCKs, where n can lie in range 1 to 9. 34 -BUCKn : for BUCKs, where n can lie in range 1 to 9.
35 example: BUCK1, BUCK5, BUCK9. 35 example: BUCK1, BUCK5, BUCK9.
36 36
37 Regulators which can be turned off during system suspend:
38 -LDOn : 2, 6-8, 10-12, 14-16,
39 -BUCKn : 1-4.
40 Use standard regulator bindings for it ('regulator-off-in-suspend').
41
42
37Example: 43Example:
38 44
39 max77686@09 { 45 max77686@09 {
diff --git a/Documentation/devicetree/bindings/mfd/max77693.txt b/Documentation/devicetree/bindings/mfd/max77693.txt
index 11921cc417bf..01e9f30fe678 100644
--- a/Documentation/devicetree/bindings/mfd/max77693.txt
+++ b/Documentation/devicetree/bindings/mfd/max77693.txt
@@ -27,6 +27,20 @@ Optional properties:
27 27
28 [*] refer Documentation/devicetree/bindings/regulator/regulator.txt 28 [*] refer Documentation/devicetree/bindings/regulator/regulator.txt
29 29
30- haptic : The MAX77693 haptic device utilises a PWM controlled motor to provide
31 users with tactile feedback. PWM period and duty-cycle are varied in
32 order to provide the approprite level of feedback.
33
34 Required properties:
35 - compatible : Must be "maxim,max77693-hpatic"
36 - haptic-supply : power supply for the haptic motor
37 [*] refer Documentation/devicetree/bindings/regulator/regulator.txt
38 - pwms : phandle to the physical PWM(Pulse Width Modulation) device.
39 PWM properties should be named "pwms". And number of cell is different
40 for each pwm device.
41 To get more informations, please refer to documentaion.
42 [*] refer Documentation/devicetree/bindings/pwm/pwm.txt
43
30Example: 44Example:
31 max77693@66 { 45 max77693@66 {
32 compatible = "maxim,max77693"; 46 compatible = "maxim,max77693";
@@ -52,4 +66,11 @@ Example:
52 regulator-boot-on; 66 regulator-boot-on;
53 }; 67 };
54 }; 68 };
69
70 haptic {
71 compatible = "maxim,max77693-haptic";
72 haptic-supply = <&haptic_supply>;
73 pwms = <&pwm 0 40000 0>;
74 pwm-names = "haptic";
75 };
55 }; 76 };
diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt
index 0e4026a6cbbf..57a045016fca 100644
--- a/Documentation/devicetree/bindings/mfd/s2mps11.txt
+++ b/Documentation/devicetree/bindings/mfd/s2mps11.txt
@@ -1,5 +1,5 @@
1 1
2* Samsung S2MPS11, S2MPS14 and S2MPU02 Voltage and Current Regulator 2* Samsung S2MPS11, S2MPS13, S2MPS14 and S2MPU02 Voltage and Current Regulator
3 3
4The Samsung S2MPS11 is a multi-function device which includes voltage and 4The Samsung S2MPS11 is a multi-function device which includes voltage and
5current regulators, RTC, charger controller and other sub-blocks. It is 5current regulators, RTC, charger controller and other sub-blocks. It is
@@ -7,8 +7,8 @@ interfaced to the host controller using an I2C interface. Each sub-block is
7addressed by the host system using different I2C slave addresses. 7addressed by the host system using different I2C slave addresses.
8 8
9Required properties: 9Required properties:
10- compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps14-pmic" 10- compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps13-pmic"
11 or "samsung,s2mpu02-pmic". 11 or "samsung,s2mps14-pmic" or "samsung,s2mpu02-pmic".
12- reg: Specifies the I2C slave address of the pmic block. It should be 0x66. 12- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
13 13
14Optional properties: 14Optional properties:
@@ -17,8 +17,8 @@ Optional properties:
17- interrupts: Interrupt specifiers for interrupt sources. 17- interrupts: Interrupt specifiers for interrupt sources.
18 18
19Optional nodes: 19Optional nodes:
20- clocks: s2mps11 and s5m8767 provide three(AP/CP/BT) buffered 32.768 KHz 20- clocks: s2mps11, s2mps13 and s5m8767 provide three(AP/CP/BT) buffered 32.768
21 outputs, so to register these as clocks with common clock framework 21 KHz outputs, so to register these as clocks with common clock framework
22 instantiate a sub-node named "clocks". It uses the common clock binding 22 instantiate a sub-node named "clocks". It uses the common clock binding
23 documented in : 23 documented in :
24 [Documentation/devicetree/bindings/clock/clock-bindings.txt] 24 [Documentation/devicetree/bindings/clock/clock-bindings.txt]
@@ -30,12 +30,12 @@ Optional nodes:
30 the clock which they consume. 30 the clock which they consume.
31 Clock ID Devices 31 Clock ID Devices
32 ---------------------------------------------------------- 32 ----------------------------------------------------------
33 32KhzAP 0 S2MPS11, S2MPS14, S5M8767 33 32KhzAP 0 S2MPS11, S2MPS13, S2MPS14, S5M8767
34 32KhzCP 1 S2MPS11, S5M8767 34 32KhzCP 1 S2MPS11, S2MPS13, S5M8767
35 32KhzBT 2 S2MPS11, S2MPS14, S5M8767 35 32KhzBT 2 S2MPS11, S2MPS13, S2MPS14, S5M8767
36 36
37 - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps14-clk", 37 - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
38 "samsung,s5m8767-clk" 38 "samsung,s2mps14-clk", "samsung,s5m8767-clk"
39 39
40- regulators: The regulators of s2mps11 that have to be instantiated should be 40- regulators: The regulators of s2mps11 that have to be instantiated should be
41included in a sub-node named 'regulators'. Regulator nodes included in this 41included in a sub-node named 'regulators'. Regulator nodes included in this
@@ -81,12 +81,14 @@ as per the datasheet of s2mps11.
81 - LDOn 81 - LDOn
82 - valid values for n are: 82 - valid values for n are:
83 - S2MPS11: 1 to 38 83 - S2MPS11: 1 to 38
84 - S2MPS13: 1 to 40
84 - S2MPS14: 1 to 25 85 - S2MPS14: 1 to 25
85 - S2MPU02: 1 to 28 86 - S2MPU02: 1 to 28
86 - Example: LDO1, LDO2, LDO28 87 - Example: LDO1, LDO2, LDO28
87 - BUCKn 88 - BUCKn
88 - valid values for n are: 89 - valid values for n are:
89 - S2MPS11: 1 to 10 90 - S2MPS11: 1 to 10
91 - S2MPS13: 1 to 10
90 - S2MPS14: 1 to 5 92 - S2MPS14: 1 to 5
91 - S2MPU02: 1 to 7 93 - S2MPU02: 1 to 7
92 - Example: BUCK1, BUCK2, BUCK9 94 - Example: BUCK1, BUCK2, BUCK9
diff --git a/Documentation/devicetree/bindings/mips/brcm/bcm3384-intc.txt b/Documentation/devicetree/bindings/mips/brcm/bcm3384-intc.txt
new file mode 100644
index 000000000000..d4e0141d3620
--- /dev/null
+++ b/Documentation/devicetree/bindings/mips/brcm/bcm3384-intc.txt
@@ -0,0 +1,37 @@
1* Interrupt Controller
2
3Properties:
4- compatible: "brcm,bcm3384-intc"
5
6 Compatibility with BCM3384 and possibly other BCM33xx/BCM63xx SoCs.
7
8- reg: Address/length pairs for each mask/status register set. Length must
9 be 8. If multiple register sets are specified, the first set will
10 handle IRQ offsets 0..31, the second set 32..63, and so on.
11
12- interrupt-controller: This is an interrupt controller.
13
14- #interrupt-cells: Must be <1>. Just a simple IRQ offset; no level/edge
15 or polarity configuration is possible with this controller.
16
17- interrupt-parent: This controller is cascaded from a MIPS CPU HW IRQ, or
18 from another INTC.
19
20- interrupts: The IRQ on the parent controller.
21
22Example:
23 periph_intc: periph_intc@14e00038 {
24 compatible = "brcm,bcm3384-intc";
25
26 /*
27 * IRQs 0..31: mask reg 0x14e00038, status reg 0x14e0003c
28 * IRQs 32..63: mask reg 0x14e00340, status reg 0x14e00344
29 */
30 reg = <0x14e00038 0x8 0x14e00340 0x8>;
31
32 interrupt-controller;
33 #interrupt-cells = <1>;
34
35 interrupt-parent = <&cpu_intc>;
36 interrupts = <4>;
37 };
diff --git a/Documentation/devicetree/bindings/mips/brcm/bmips.txt b/Documentation/devicetree/bindings/mips/brcm/bmips.txt
new file mode 100644
index 000000000000..8ef71b4085ca
--- /dev/null
+++ b/Documentation/devicetree/bindings/mips/brcm/bmips.txt
@@ -0,0 +1,8 @@
1* Broadcom MIPS (BMIPS) CPUs
2
3Required properties:
4- compatible: "brcm,bmips3300", "brcm,bmips4350", "brcm,bmips4380",
5 "brcm,bmips5000"
6
7- mips-hpt-frequency: This is common to all CPUs in the system so it lives
8 under the "cpus" node.
diff --git a/Documentation/devicetree/bindings/mips/brcm/cm-dsl.txt b/Documentation/devicetree/bindings/mips/brcm/cm-dsl.txt
new file mode 100644
index 000000000000..8a139cb3c0b5
--- /dev/null
+++ b/Documentation/devicetree/bindings/mips/brcm/cm-dsl.txt
@@ -0,0 +1,11 @@
1* Broadcom cable/DSL platforms
2
3SoCs:
4
5Required properties:
6- compatible: "brcm,bcm3384", "brcm,bcm33843"
7
8Boards:
9
10Required properties:
11- compatible: "brcm,bcm93384wvg"
diff --git a/Documentation/devicetree/bindings/mips/brcm/usb.txt b/Documentation/devicetree/bindings/mips/brcm/usb.txt
new file mode 100644
index 000000000000..452c45c7bf29
--- /dev/null
+++ b/Documentation/devicetree/bindings/mips/brcm/usb.txt
@@ -0,0 +1,11 @@
1* Broadcom USB controllers
2
3Required properties:
4- compatible: "brcm,bcm3384-ohci", "brcm,bcm3384-ehci"
5
6 These currently use the generic-ohci and generic-ehci drivers. On some
7 systems, special handling may be needed in the following cases:
8
9 - Restoring state after systemwide power save modes
10 - Sharing PHYs with the USBD (UDC) hardware
11 - Figuring out which controllers are disabled on ASIC bondout variants
diff --git a/Documentation/devicetree/bindings/mips/cpu_irq.txt b/Documentation/devicetree/bindings/mips/cpu_irq.txt
index 13aa4b62c62a..fc149f326dae 100644
--- a/Documentation/devicetree/bindings/mips/cpu_irq.txt
+++ b/Documentation/devicetree/bindings/mips/cpu_irq.txt
@@ -1,6 +1,6 @@
1MIPS CPU interrupt controller 1MIPS CPU interrupt controller
2 2
3On MIPS the mips_cpu_intc_init() helper can be used to initialize the 8 CPU 3On MIPS the mips_cpu_irq_of_init() helper can be used to initialize the 8 CPU
4IRQs from a devicetree file and create a irq_domain for IRQ controller. 4IRQs from a devicetree file and create a irq_domain for IRQ controller.
5 5
6With the irq_domain in place we can describe how the 8 IRQs are wired to the 6With the irq_domain in place we can describe how the 8 IRQs are wired to the
@@ -36,7 +36,7 @@ Example devicetree:
36 36
37Example platform irq.c: 37Example platform irq.c:
38static struct of_device_id __initdata of_irq_ids[] = { 38static struct of_device_id __initdata of_irq_ids[] = {
39 { .compatible = "mti,cpu-interrupt-controller", .data = mips_cpu_intc_init }, 39 { .compatible = "mti,cpu-interrupt-controller", .data = mips_cpu_irq_of_init },
40 { .compatible = "ralink,rt2880-intc", .data = intc_of_init }, 40 { .compatible = "ralink,rt2880-intc", .data = intc_of_init },
41 {}, 41 {},
42}; 42};
diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
index 6cd3525d0e09..ee4fc0576c7d 100644
--- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
@@ -18,6 +18,10 @@ Required Properties:
18 specific extensions. 18 specific extensions.
19 - "samsung,exynos5420-dw-mshc": for controllers with Samsung Exynos5420 19 - "samsung,exynos5420-dw-mshc": for controllers with Samsung Exynos5420
20 specific extensions. 20 specific extensions.
21 - "samsung,exynos7-dw-mshc": for controllers with Samsung Exynos7
22 specific extensions.
23 - "samsung,exynos7-dw-mshc-smu": for controllers with Samsung Exynos7
24 specific extensions having an SMU.
21 25
22* samsung,dw-mshc-ciu-div: Specifies the divider value for the card interface 26* samsung,dw-mshc-ciu-div: Specifies the divider value for the card interface
23 unit (ciu) clock. This property is applicable only for Exynos5 SoC's and 27 unit (ciu) clock. This property is applicable only for Exynos5 SoC's and
diff --git a/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt
new file mode 100644
index 000000000000..85de99fcaa2f
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt
@@ -0,0 +1,29 @@
1* Imagination specific extensions to the Synopsys Designware Mobile Storage
2 Host Controller
3
4The Synopsys designware mobile storage host controller is used to interface
5a SoC with storage medium such as eMMC or SD/MMC cards. This file documents
6differences between the core Synopsys dw mshc controller properties described
7by synopsys-dw-mshc.txt and the properties used by the Imagination specific
8extensions to the Synopsys Designware Mobile Storage Host Controller.
9
10Required Properties:
11
12* compatible: should be
13 - "img,pistachio-dw-mshc": for Pistachio SoCs
14
15Example:
16
17 mmc@18142000 {
18 compatible = "img,pistachio-dw-mshc";
19 reg = <0x18142000 0x400>;
20 interrupts = <GIC_SHARED 39 IRQ_TYPE_LEVEL_HIGH>;
21
22 clocks = <&system_clk>, <&sdhost_clk>;
23 clock-names = "biu", "ciu";
24
25 fifo-depth = <0x20>;
26 bus-width = <4>;
27 num-slots = <1>;
28 disable-wp;
29 };
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt b/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt
index 86223c3eda90..4dd6deb90719 100644
--- a/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt
+++ b/Documentation/devicetree/bindings/mmc/sdhci-pxa.txt
@@ -12,6 +12,10 @@ Required properties:
12 * for "marvell,armada-380-sdhci", two register areas. The first one 12 * for "marvell,armada-380-sdhci", two register areas. The first one
13 for the SDHCI registers themselves, and the second one for the 13 for the SDHCI registers themselves, and the second one for the
14 AXI/Mbus bridge registers of the SDHCI unit. 14 AXI/Mbus bridge registers of the SDHCI unit.
15- clocks: Array of clocks required for SDHCI; requires at least one for
16 I/O clock.
17- clock-names: Array of names corresponding to clocks property; shall be
18 "io" for I/O clock and "core" for optional core clock.
15 19
16Optional properties: 20Optional properties:
17- mrvl,clk-delay-cycles: Specify a number of cycles to delay for tuning. 21- mrvl,clk-delay-cycles: Specify a number of cycles to delay for tuning.
@@ -23,6 +27,8 @@ sdhci@d4280800 {
23 reg = <0xd4280800 0x800>; 27 reg = <0xd4280800 0x800>;
24 bus-width = <8>; 28 bus-width = <8>;
25 interrupts = <27>; 29 interrupts = <27>;
30 clocks = <&chip CLKID_SDIO1XIN>, <&chip CLKID_SDIO1>;
31 clock-names = "io", "core";
26 non-removable; 32 non-removable;
27 mrvl,clk-delay-cycles = <31>; 33 mrvl,clk-delay-cycles = <31>;
28}; 34};
@@ -32,5 +38,6 @@ sdhci@d8000 {
32 reg = <0xd8000 0x1000>, <0xdc000 0x100>; 38 reg = <0xd8000 0x1000>, <0xdc000 0x100>;
33 interrupts = <0 25 0x4>; 39 interrupts = <0 25 0x4>;
34 clocks = <&gateclk 17>; 40 clocks = <&gateclk 17>;
41 clock-names = "io";
35 mrvl,clk-delay-cycles = <0x1F>; 42 mrvl,clk-delay-cycles = <0x1F>;
36}; 43};
diff --git a/Documentation/devicetree/bindings/mtd/atmel-nand.txt b/Documentation/devicetree/bindings/mtd/atmel-nand.txt
index 6edc3b616e98..1fe6dde98499 100644
--- a/Documentation/devicetree/bindings/mtd/atmel-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/atmel-nand.txt
@@ -5,7 +5,9 @@ Required properties:
5- reg : should specify localbus address and size used for the chip, 5- reg : should specify localbus address and size used for the chip,
6 and hardware ECC controller if available. 6 and hardware ECC controller if available.
7 If the hardware ECC is PMECC, it should contain address and size for 7 If the hardware ECC is PMECC, it should contain address and size for
8 PMECC, PMECC Error Location controller and ROM which has lookup tables. 8 PMECC and PMECC Error Location controller.
9 The PMECC lookup table address and size in ROM is optional. If not
10 specified, driver will build it in runtime.
9- atmel,nand-addr-offset : offset for the address latch. 11- atmel,nand-addr-offset : offset for the address latch.
10- atmel,nand-cmd-offset : offset for the command latch. 12- atmel,nand-cmd-offset : offset for the command latch.
11- #address-cells, #size-cells : Must be present if the device has sub-nodes 13- #address-cells, #size-cells : Must be present if the device has sub-nodes
@@ -27,7 +29,7 @@ Optional properties:
27 are: 512, 1024. 29 are: 512, 1024.
28- atmel,pmecc-lookup-table-offset : includes two offsets of lookup table in ROM 30- atmel,pmecc-lookup-table-offset : includes two offsets of lookup table in ROM
29 for different sector size. First one is for sector size 512, the next is for 31 for different sector size. First one is for sector size 512, the next is for
30 sector size 1024. 32 sector size 1024. If not specified, driver will build the table in runtime.
31- nand-bus-width : 8 or 16 bus width if not present 8 33- nand-bus-width : 8 or 16 bus width if not present 8
32- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false 34- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
33- Nand Flash Controller(NFC) is a slave driver under Atmel nand flash 35- Nand Flash Controller(NFC) is a slave driver under Atmel nand flash
diff --git a/Documentation/devicetree/bindings/mtd/diskonchip.txt b/Documentation/devicetree/bindings/mtd/diskonchip.txt
new file mode 100644
index 000000000000..3e13bfdbea5b
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/diskonchip.txt
@@ -0,0 +1,15 @@
1M-Systems and Sandisk DiskOnChip devices
2
3M-System DiskOnChip G3
4======================
5The Sandisk (formerly M-Systems) docg3 is a nand device of 64M to 256MB.
6
7Required properties:
8 - compatible: should be "m-systems,diskonchip-g3"
9 - reg: register base and size
10
11Example:
12 docg3: flash@0 {
13 compatible = "m-systems,diskonchip-g3";
14 reg = <0x0 0x2000>;
15 };
diff --git a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt
index 36ef07d3c90f..af8915b41ccf 100644
--- a/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt
@@ -11,8 +11,8 @@ Required properties:
11 are made in native endianness. 11 are made in native endianness.
12- #address-cells, #size-cells : Must be present if the device has sub-nodes 12- #address-cells, #size-cells : Must be present if the device has sub-nodes
13 representing partitions. 13 representing partitions.
14- gpios : specifies the gpio pins to control the NAND device. nwp is an 14- gpios : Specifies the GPIO pins to control the NAND device. The order of
15 optional gpio and may be set to 0 if not present. 15 GPIO references is: RDY, nCE, ALE, CLE, and an optional nWP.
16 16
17Optional properties: 17Optional properties:
18- bank-width : Width (in bytes) of the device. If not present, the width 18- bank-width : Width (in bytes) of the device. If not present, the width
@@ -35,11 +35,11 @@ gpio-nand@1,0 {
35 reg = <1 0x0000 0x2>; 35 reg = <1 0x0000 0x2>;
36 #address-cells = <1>; 36 #address-cells = <1>;
37 #size-cells = <1>; 37 #size-cells = <1>;
38 gpios = <&banka 1 0 /* rdy */ 38 gpios = <&banka 1 0>, /* RDY */
39 &banka 2 0 /* nce */ 39 <&banka 2 0>, /* nCE */
40 &banka 3 0 /* ale */ 40 <&banka 3 0>, /* ALE */
41 &banka 4 0 /* cle */ 41 <&banka 4 0>, /* CLE */
42 0 /* nwp */>; 42 <0>; /* nWP */
43 43
44 partition@0 { 44 partition@0 {
45 ... 45 ...
diff --git a/Documentation/devicetree/bindings/mtd/sunxi-nand.txt b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
new file mode 100644
index 000000000000..0273adb8638c
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/sunxi-nand.txt
@@ -0,0 +1,45 @@
1Allwinner NAND Flash Controller (NFC)
2
3Required properties:
4- compatible : "allwinner,sun4i-a10-nand".
5- reg : shall contain registers location and length for data and reg.
6- interrupts : shall define the nand controller interrupt.
7- #address-cells: shall be set to 1. Encode the nand CS.
8- #size-cells : shall be set to 0.
9- clocks : shall reference nand controller clocks.
10- clock-names : nand controller internal clock names. Shall contain :
11 * "ahb" : AHB gating clock
12 * "mod" : nand controller clock
13
14Optional children nodes:
15Children nodes represent the available nand chips.
16
17Optional properties:
18- allwinner,rb : shall contain the native Ready/Busy ids.
19 or
20- rb-gpios : shall contain the gpios used as R/B pins.
21- nand-ecc-mode : one of the supported ECC modes ("hw", "hw_syndrome", "soft",
22 "soft_bch" or "none")
23
24see Documentation/devicetree/mtd/nand.txt for generic bindings.
25
26
27Examples:
28nfc: nand@01c03000 {
29 compatible = "allwinner,sun4i-a10-nand";
30 reg = <0x01c03000 0x1000>;
31 interrupts = <0 37 1>;
32 clocks = <&ahb_gates 13>, <&nand_clk>;
33 clock-names = "ahb", "mod";
34 #address-cells = <1>;
35 #size-cells = <0>;
36 pinctrl-names = "default";
37 pinctrl-0 = <&nand_pins_a &nand_cs0_pins_a &nand_rb0_pins_a>;
38 status = "okay";
39
40 nand@0 {
41 reg = <0>;
42 allwinner,rb = <0>;
43 nand-ecc-mode = "soft_bch";
44 };
45};
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe.txt b/Documentation/devicetree/bindings/net/amd-xgbe.txt
index 41354f730beb..26efd526d16c 100644
--- a/Documentation/devicetree/bindings/net/amd-xgbe.txt
+++ b/Documentation/devicetree/bindings/net/amd-xgbe.txt
@@ -7,7 +7,10 @@ Required properties:
7 - PCS registers 7 - PCS registers
8- interrupt-parent: Should be the phandle for the interrupt controller 8- interrupt-parent: Should be the phandle for the interrupt controller
9 that services interrupts for this device 9 that services interrupts for this device
10- interrupts: Should contain the amd-xgbe interrupt 10- interrupts: Should contain the amd-xgbe interrupt(s). The first interrupt
11 listed is required and is the general device interrupt. If the optional
12 amd,per-channel-interrupt property is specified, then one additional
13 interrupt for each DMA channel supported by the device should be specified
11- clocks: 14- clocks:
12 - DMA clock for the amd-xgbe device (used for calculating the 15 - DMA clock for the amd-xgbe device (used for calculating the
13 correct Rx interrupt watchdog timer value on a DMA channel 16 correct Rx interrupt watchdog timer value on a DMA channel
@@ -23,6 +26,9 @@ Optional properties:
23- mac-address: mac address to be assigned to the device. Can be overridden 26- mac-address: mac address to be assigned to the device. Can be overridden
24 by UEFI. 27 by UEFI.
25- dma-coherent: Present if dma operations are coherent 28- dma-coherent: Present if dma operations are coherent
29- amd,per-channel-interrupt: Indicates that Rx and Tx complete will generate
30 a unique interrupt for each DMA channel - this requires an additional
31 interrupt be configured for each DMA channel
26 32
27Example: 33Example:
28 xgbe@e0700000 { 34 xgbe@e0700000 {
@@ -30,7 +36,9 @@ Example:
30 reg = <0 0xe0700000 0 0x80000>, 36 reg = <0 0xe0700000 0 0x80000>,
31 <0 0xe0780000 0 0x80000>; 37 <0 0xe0780000 0 0x80000>;
32 interrupt-parent = <&gic>; 38 interrupt-parent = <&gic>;
33 interrupts = <0 325 4>; 39 interrupts = <0 325 4>,
40 <0 326 1>, <0 327 1>, <0 328 1>, <0 329 1>;
41 amd,per-channel-interrupt;
34 clocks = <&xgbe_dma_clk>, <&xgbe_ptp_clk>; 42 clocks = <&xgbe_dma_clk>, <&xgbe_ptp_clk>;
35 clock-names = "dma_clk", "ptp_clk"; 43 clock-names = "dma_clk", "ptp_clk";
36 phy-handle = <&phy>; 44 phy-handle = <&phy>;
diff --git a/Documentation/devicetree/bindings/net/can/c_can.txt b/Documentation/devicetree/bindings/net/can/c_can.txt
index 8f1ae81228e3..5a1d8b0c39e9 100644
--- a/Documentation/devicetree/bindings/net/can/c_can.txt
+++ b/Documentation/devicetree/bindings/net/can/c_can.txt
@@ -4,6 +4,8 @@ Bosch C_CAN/D_CAN controller Device Tree Bindings
4Required properties: 4Required properties:
5- compatible : Should be "bosch,c_can" for C_CAN controllers and 5- compatible : Should be "bosch,c_can" for C_CAN controllers and
6 "bosch,d_can" for D_CAN controllers. 6 "bosch,d_can" for D_CAN controllers.
7 Can be "ti,dra7-d_can", "ti,am3352-d_can" or
8 "ti,am4372-d_can".
7- reg : physical base address and size of the C_CAN/D_CAN 9- reg : physical base address and size of the C_CAN/D_CAN
8 registers map 10 registers map
9- interrupts : property with a value describing the interrupt 11- interrupts : property with a value describing the interrupt
@@ -12,6 +14,9 @@ Required properties:
12Optional properties: 14Optional properties:
13- ti,hwmods : Must be "d_can<n>" or "c_can<n>", n being the 15- ti,hwmods : Must be "d_can<n>" or "c_can<n>", n being the
14 instance number 16 instance number
17- syscon-raminit : Handle to system control region that contains the
18 RAMINIT register, register offset to the RAMINIT
19 register and the CAN instance number (0 offset).
15 20
16Note: "ti,hwmods" field is used to fetch the base address and irq 21Note: "ti,hwmods" field is used to fetch the base address and irq
17resources from TI, omap hwmod data base during device registration. 22resources from TI, omap hwmod data base during device registration.
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.txt b/Documentation/devicetree/bindings/net/dsa/dsa.txt
index a62c889aafca..e124847443f8 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.txt
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.txt
@@ -10,7 +10,7 @@ Required properties:
10- dsa,ethernet : Should be a phandle to a valid Ethernet device node 10- dsa,ethernet : Should be a phandle to a valid Ethernet device node
11- dsa,mii-bus : Should be a phandle to a valid MDIO bus device node 11- dsa,mii-bus : Should be a phandle to a valid MDIO bus device node
12 12
13Optionnal properties: 13Optional properties:
14- interrupts : property with a value describing the switch 14- interrupts : property with a value describing the switch
15 interrupt number (not supported by the driver) 15 interrupt number (not supported by the driver)
16 16
@@ -23,6 +23,13 @@ Each of these switch child nodes should have the following required properties:
23- #address-cells : Must be 1 23- #address-cells : Must be 1
24- #size-cells : Must be 0 24- #size-cells : Must be 0
25 25
26A switch child node has the following optional property:
27
28- eeprom-length : Set to the length of an EEPROM connected to the
29 switch. Must be set if the switch can not detect
30 the presence and/or size of a connected EEPROM,
31 otherwise optional.
32
26A switch may have multiple "port" children nodes 33A switch may have multiple "port" children nodes
27 34
28Each port children node must have the following mandatory properties: 35Each port children node must have the following mandatory properties:
diff --git a/Documentation/devicetree/bindings/net/micrel.txt b/Documentation/devicetree/bindings/net/micrel.txt
index e1d99b95c4ec..87496a8c64ab 100644
--- a/Documentation/devicetree/bindings/net/micrel.txt
+++ b/Documentation/devicetree/bindings/net/micrel.txt
@@ -6,19 +6,32 @@ Optional properties:
6 6
7 - micrel,led-mode : LED mode value to set for PHYs with configurable LEDs. 7 - micrel,led-mode : LED mode value to set for PHYs with configurable LEDs.
8 8
9 Configure the LED mode with single value. The list of PHYs and 9 Configure the LED mode with single value. The list of PHYs and the
10 the bits that are currently supported: 10 bits that are currently supported:
11 11
12 KSZ8001: register 0x1e, bits 15..14 12 KSZ8001: register 0x1e, bits 15..14
13 KSZ8041: register 0x1e, bits 15..14 13 KSZ8041: register 0x1e, bits 15..14
14 KSZ8021: register 0x1f, bits 5..4 14 KSZ8021: register 0x1f, bits 5..4
15 KSZ8031: register 0x1f, bits 5..4 15 KSZ8031: register 0x1f, bits 5..4
16 KSZ8051: register 0x1f, bits 5..4 16 KSZ8051: register 0x1f, bits 5..4
17 KSZ8081: register 0x1f, bits 5..4
18 KSZ8091: register 0x1f, bits 5..4
17 19
18 See the respective PHY datasheet for the mode values. 20 See the respective PHY datasheet for the mode values.
21
22 - micrel,rmii-reference-clock-select-25-mhz: RMII Reference Clock Select
23 bit selects 25 MHz mode
24
25 Setting the RMII Reference Clock Select bit enables 25 MHz rather
26 than 50 MHz clock mode.
27
28 Note that this option in only needed for certain PHY revisions with a
29 non-standard, inverted function of this configuration bit.
30 Specifically, a clock reference ("rmii-ref" below) is always needed to
31 actually select a mode.
19 32
20 - clocks, clock-names: contains clocks according to the common clock bindings. 33 - clocks, clock-names: contains clocks according to the common clock bindings.
21 34
22 supported clocks: 35 supported clocks:
23 - KSZ8021, KSZ8031: "rmii-ref": The RMII refence input clock. Used 36 - KSZ8021, KSZ8031, KSZ8081, KSZ8091: "rmii-ref": The RMII reference
24 to determine the XI input clock. 37 input clock. Used to determine the XI input clock.
diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt
index 5b8c58903077..40831fbaff72 100644
--- a/Documentation/devicetree/bindings/net/phy.txt
+++ b/Documentation/devicetree/bindings/net/phy.txt
@@ -19,7 +19,6 @@ Optional Properties:
19 specifications. If neither of these are specified, the default is to 19 specifications. If neither of these are specified, the default is to
20 assume clause 22. The compatible list may also contain other 20 assume clause 22. The compatible list may also contain other
21 elements. 21 elements.
22- max-speed: Maximum PHY supported speed (10, 100, 1000...)
23 22
24 If the phy's identifier is known then the list may contain an entry 23 If the phy's identifier is known then the list may contain an entry
25 of the form: "ethernet-phy-idAAAA.BBBB" where 24 of the form: "ethernet-phy-idAAAA.BBBB" where
@@ -29,6 +28,8 @@ Optional Properties:
29 4 hex digits. This is the chip vendor OUI bits 19:24, 28 4 hex digits. This is the chip vendor OUI bits 19:24,
30 followed by 10 bits of a vendor specific ID. 29 followed by 10 bits of a vendor specific ID.
31 30
31- max-speed: Maximum PHY supported speed (10, 100, 1000...)
32
32Example: 33Example:
33 34
34ethernet-phy@0 { 35ethernet-phy@0 {
diff --git a/Documentation/devicetree/bindings/net/sh_eth.txt b/Documentation/devicetree/bindings/net/sh_eth.txt
index 34d4db1a4e25..2f6ec85fda8e 100644
--- a/Documentation/devicetree/bindings/net/sh_eth.txt
+++ b/Documentation/devicetree/bindings/net/sh_eth.txt
@@ -9,6 +9,7 @@ Required properties:
9 "renesas,ether-r8a7779" if the device is a part of R8A7779 SoC. 9 "renesas,ether-r8a7779" if the device is a part of R8A7779 SoC.
10 "renesas,ether-r8a7790" if the device is a part of R8A7790 SoC. 10 "renesas,ether-r8a7790" if the device is a part of R8A7790 SoC.
11 "renesas,ether-r8a7791" if the device is a part of R8A7791 SoC. 11 "renesas,ether-r8a7791" if the device is a part of R8A7791 SoC.
12 "renesas,ether-r8a7793" if the device is a part of R8A7793 SoC.
12 "renesas,ether-r8a7794" if the device is a part of R8A7794 SoC. 13 "renesas,ether-r8a7794" if the device is a part of R8A7794 SoC.
13 "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC. 14 "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC.
14- reg: offset and length of (1) the E-DMAC/feLic register block (required), 15- reg: offset and length of (1) the E-DMAC/feLic register block (required),
diff --git a/Documentation/devicetree/bindings/nios2/nios2.txt b/Documentation/devicetree/bindings/nios2/nios2.txt
new file mode 100644
index 000000000000..d6d0a94cb3bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/nios2/nios2.txt
@@ -0,0 +1,62 @@
1* Nios II Processor Binding
2
3This binding specifies what properties available in the device tree
4representation of a Nios II Processor Core.
5
6Users can use sopc2dts tool for generating device tree sources (dts) from a
7Qsys system. See more detail in: http://www.alterawiki.com/wiki/Sopc2dts
8
9Required properties:
10
11- compatible: Compatible property value should be "altr,nios2-1.0".
12- reg: Contains CPU index.
13- interrupt-controller: Specifies that the node is an interrupt controller
14- #interrupt-cells: Specifies the number of cells needed to encode an
15 interrupt source, should be 1.
16- clock-frequency: Contains the clock frequency for CPU, in Hz.
17- dcache-line-size: Contains data cache line size.
18- icache-line-size: Contains instruction line size.
19- dcache-size: Contains data cache size.
20- icache-size: Contains instruction cache size.
21- altr,pid-num-bits: Specifies the number of bits to use to represent the process
22 identifier (PID).
23- altr,tlb-num-ways: Specifies the number of set-associativity ways in the TLB.
24- altr,tlb-num-entries: Specifies the number of entries in the TLB.
25- altr,tlb-ptr-sz: Specifies size of TLB pointer.
26- altr,has-mul: Specifies CPU hardware multipy support, should be 1.
27- altr,has-mmu: Specifies CPU support MMU support, should be 1.
28- altr,has-initda: Specifies CPU support initda instruction, should be 1.
29- altr,reset-addr: Specifies CPU reset address
30- altr,fast-tlb-miss-addr: Specifies CPU fast TLB miss exception address
31- altr,exception-addr: Specifies CPU exception address
32
33Optional properties:
34- altr,has-div: Specifies CPU hardware divide support
35- altr,implementation: Nios II core implementation, this should be "fast";
36
37Example:
38
39cpu@0x0 {
40 device_type = "cpu";
41 compatible = "altr,nios2-1.0";
42 reg = <0>;
43 interrupt-controller;
44 #interrupt-cells = <1>;
45 clock-frequency = <125000000>;
46 dcache-line-size = <32>;
47 icache-line-size = <32>;
48 dcache-size = <32768>;
49 icache-size = <32768>;
50 altr,implementation = "fast";
51 altr,pid-num-bits = <8>;
52 altr,tlb-num-ways = <16>;
53 altr,tlb-num-entries = <128>;
54 altr,tlb-ptr-sz = <7>;
55 altr,has-div = <1>;
56 altr,has-mul = <1>;
57 altr,reset-addr = <0xc2800000>;
58 altr,fast-tlb-miss-addr = <0xc7fff400>;
59 altr,exception-addr = <0xd0000020>;
60 altr,has-initda = <1>;
61 altr,has-mmu = <1>;
62};
diff --git a/Documentation/devicetree/bindings/nios2/timer.txt b/Documentation/devicetree/bindings/nios2/timer.txt
new file mode 100644
index 000000000000..904a5846d7ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/nios2/timer.txt
@@ -0,0 +1,19 @@
1Altera Timer
2
3Required properties:
4
5- compatible : should be "altr,timer-1.0"
6- reg : Specifies base physical address and size of the registers.
7- interrupt-parent: phandle of the interrupt controller
8- interrupts : Should contain the timer interrupt number
9- clock-frequency : The frequency of the clock that drives the counter, in Hz.
10
11Example:
12
13timer {
14 compatible = "altr,timer-1.0";
15 reg = <0x00400000 0x00000020>;
16 interrupt-parent = <&cpu>;
17 interrupts = <11>;
18 clock-frequency = <125000000>;
19};
diff --git a/Documentation/devicetree/bindings/panel/auo,b116xw03.txt b/Documentation/devicetree/bindings/panel/auo,b116xw03.txt
new file mode 100644
index 000000000000..690d0a568ef3
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/auo,b116xw03.txt
@@ -0,0 +1,7 @@
1AU Optronics Corporation 11.6" HD (1366x768) color TFT-LCD panel
2
3Required properties:
4- compatible: should be "auo,b116xw03"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt b/Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt
new file mode 100644
index 000000000000..7da1d5c038ff
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/hannstar,hsd070pww1.txt
@@ -0,0 +1,7 @@
1HannStar Display Corp. HSD070PWW1 7.0" WXGA TFT LCD panel
2
3Required properties:
4- compatible: should be "hannstar,hsd070pww1"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt b/Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt
new file mode 100644
index 000000000000..04caaae19af6
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/hit,tx23d38vm0caa.txt
@@ -0,0 +1,7 @@
1Hitachi Ltd. Corporation 9" WVGA (800x480) TFT LCD panel
2
3Required properties:
4- compatible: should be "hit,tx23d38vm0caa"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt b/Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt
new file mode 100644
index 000000000000..2743b07cd2f2
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/innolux,g121i1-l01.txt
@@ -0,0 +1,7 @@
1Innolux Corporation 12.1" WXGA (1280x800) TFT LCD panel
2
3Required properties:
4- compatible: should be "innolux,g121i1-l01"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt b/Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt
new file mode 100644
index 000000000000..f522bb8e47e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/sharp,lq101r1sx01.txt
@@ -0,0 +1,49 @@
1Sharp Microelectronics 10.1" WQXGA TFT LCD panel
2
3This panel requires a dual-channel DSI host to operate. It supports two modes:
4- left-right: each channel drives the left or right half of the screen
5- even-odd: each channel drives the even or odd lines of the screen
6
7Each of the DSI channels controls a separate DSI peripheral. The peripheral
8driven by the first link (DSI-LINK1), left or even, is considered the primary
9peripheral and controls the device. The 'link2' property contains a phandle
10to the peripheral driven by the second link (DSI-LINK2, right or odd).
11
12Note that in video mode the DSI-LINK1 interface always provides the left/even
13pixels and DSI-LINK2 always provides the right/odd pixels. In command mode it
14is possible to program either link to drive the left/even or right/odd pixels
15but for the sake of consistency this binding assumes that the same assignment
16is chosen as for video mode.
17
18Required properties:
19- compatible: should be "sharp,lq101r1sx01"
20- reg: DSI virtual channel of the peripheral
21
22Required properties (for DSI-LINK1 only):
23- link2: phandle to the DSI peripheral on the secondary link. Note that the
24 presence of this property marks the containing node as DSI-LINK1.
25- power-supply: phandle of the regulator that provides the supply voltage
26
27Optional properties (for DSI-LINK1 only):
28- backlight: phandle of the backlight device attached to the panel
29
30Example:
31
32 dsi@54300000 {
33 panel: panel@0 {
34 compatible = "sharp,lq101r1sx01";
35 reg = <0>;
36
37 link2 = <&secondary>;
38
39 power-supply = <...>;
40 backlight = <...>;
41 };
42 };
43
44 dsi@54400000 {
45 secondary: panel@0 {
46 compatible = "sharp,lq101r1sx01";
47 reg = <0>;
48 };
49 };
diff --git a/Documentation/devicetree/bindings/pci/layerscape-pci.txt b/Documentation/devicetree/bindings/pci/layerscape-pci.txt
new file mode 100644
index 000000000000..6286f049bf18
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/layerscape-pci.txt
@@ -0,0 +1,42 @@
1Freescale Layerscape PCIe controller
2
3This PCIe host controller is based on the Synopsis Designware PCIe IP
4and thus inherits all the common properties defined in designware-pcie.txt.
5
6Required properties:
7- compatible: should contain the platform identifier such as "fsl,ls1021a-pcie"
8- reg: base addresses and lengths of the PCIe controller
9- interrupts: A list of interrupt outputs of the controller. Must contain an
10 entry for each entry in the interrupt-names property.
11- interrupt-names: Must include the following entries:
12 "intr": The interrupt that is asserted for controller interrupts
13- fsl,pcie-scfg: Must include two entries.
14 The first entry must be a link to the SCFG device node
15 The second entry must be '0' or '1' based on physical PCIe controller index.
16 This is used to get SCFG PEXN registers
17
18Example:
19
20 pcie@3400000 {
21 compatible = "fsl,ls1021a-pcie", "snps,dw-pcie";
22 reg = <0x00 0x03400000 0x0 0x00010000 /* controller registers */
23 0x40 0x00000000 0x0 0x00002000>; /* configuration space */
24 reg-names = "regs", "config";
25 interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */
26 interrupt-names = "intr";
27 fsl,pcie-scfg = <&scfg 0>;
28 #address-cells = <3>;
29 #size-cells = <2>;
30 device_type = "pci";
31 num-lanes = <4>;
32 bus-range = <0x0 0xff>;
33 ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */
34 0xc2000000 0x0 0x20000000 0x40 0x20000000 0x0 0x20000000 /* prefetchable memory */
35 0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
36 #interrupt-cells = <1>;
37 interrupt-map-mask = <0 0 0 7>;
38 interrupt-map = <0000 0 0 1 &gic GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>,
39 <0000 0 0 2 &gic GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
40 <0000 0 0 3 &gic GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
41 <0000 0 0 4 &gic GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
42 };
diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt
index 41aeed38926d..f8fbe9af7b2f 100644
--- a/Documentation/devicetree/bindings/pci/pci.txt
+++ b/Documentation/devicetree/bindings/pci/pci.txt
@@ -7,3 +7,14 @@ And for the interrupt mapping part:
7 7
8Open Firmware Recommended Practice: Interrupt Mapping 8Open Firmware Recommended Practice: Interrupt Mapping
9http://www.openfirmware.org/1275/practice/imap/imap0_9d.pdf 9http://www.openfirmware.org/1275/practice/imap/imap0_9d.pdf
10
11Additionally to the properties specified in the above standards a host bridge
12driver implementation may support the following properties:
13
14- linux,pci-domain:
15 If present this property assigns a fixed PCI domain number to a host bridge,
16 otherwise an unstable (across boots) unique number will be assigned.
17 It is required to either not set this property at all or set it for all
18 host bridges in the system, otherwise potentially conflicting domain numbers
19 may be assigned to root buses behind different host bridges. The domain
20 number for each host bridge in the system must be unique.
diff --git a/Documentation/devicetree/bindings/phy/berlin-sata-phy.txt b/Documentation/devicetree/bindings/phy/berlin-sata-phy.txt
index 88f8c23384c0..c0155f842f62 100644
--- a/Documentation/devicetree/bindings/phy/berlin-sata-phy.txt
+++ b/Documentation/devicetree/bindings/phy/berlin-sata-phy.txt
@@ -2,7 +2,9 @@ Berlin SATA PHY
2--------------- 2---------------
3 3
4Required properties: 4Required properties:
5- compatible: should be "marvell,berlin2q-sata-phy" 5- compatible: should be one of
6 "marvell,berlin2-sata-phy"
7 "marvell,berlin2q-sata-phy"
6- address-cells: should be 1 8- address-cells: should be 1
7- size-cells: should be 0 9- size-cells: should be 0
8- phy-cells: from the generic PHY bindings, must be 1 10- phy-cells: from the generic PHY bindings, must be 1
diff --git a/Documentation/devicetree/bindings/phy/berlin-usb-phy.txt b/Documentation/devicetree/bindings/phy/berlin-usb-phy.txt
new file mode 100644
index 000000000000..be33780f668e
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/berlin-usb-phy.txt
@@ -0,0 +1,16 @@
1* Marvell Berlin USB PHY
2
3Required properties:
4- compatible: "marvell,berlin2-usb-phy" or "marvell,berlin2cd-usb-phy"
5- reg: base address and length of the registers
6- #phys-cells: should be 0
7- resets: reference to the reset controller
8
9Example:
10
11 usb-phy@f774000 {
12 compatible = "marvell,berlin2-usb-phy";
13 reg = <0xf774000 0x128>;
14 #phy-cells = <0>;
15 resets = <&chip 0x104 14>;
16 };
diff --git a/Documentation/devicetree/bindings/phy/phy-miphy28lp.txt b/Documentation/devicetree/bindings/phy/phy-miphy28lp.txt
new file mode 100644
index 000000000000..46a135dae6b3
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/phy-miphy28lp.txt
@@ -0,0 +1,128 @@
1STMicroelectronics STi MIPHY28LP PHY binding
2============================================
3
4This binding describes a miphy device that is used to control PHY hardware
5for SATA, PCIe or USB3.
6
7Required properties (controller (parent) node):
8- compatible : Should be "st,miphy28lp-phy".
9- st,syscfg : Should be a phandle of the system configuration register group
10 which contain the SATA, PCIe or USB3 mode setting bits.
11
12Required nodes : A sub-node is required for each channel the controller
13 provides. Address range information including the usual
14 'reg' and 'reg-names' properties are used inside these
15 nodes to describe the controller's topology. These nodes
16 are translated by the driver's .xlate() function.
17
18Required properties (port (child) node):
19- #phy-cells : Should be 1 (See second example)
20 Cell after port phandle is device type from:
21 - PHY_TYPE_SATA
22 - PHY_TYPE_PCI
23 - PHY_TYPE_USB3
24- reg : Address and length of the register set for the device.
25- reg-names : The names of the register addresses corresponding to the registers
26 filled in "reg". It can also contain the offset of the system configuration
27 registers used as glue-logic to setup the device for SATA/PCIe or USB3
28 devices.
29- resets : phandle to the parent reset controller.
30- reset-names : Associated name must be "miphy-sw-rst".
31
32Optional properties (port (child) node):
33- st,osc-rdy : to check the MIPHY0_OSC_RDY status in the glue-logic. This
34 is not available in all the MiPHY. For example, for STiH407, only the
35 MiPHY0 has this bit.
36- st,osc-force-ext : to select the external oscillator. This can change from
37 different MiPHY inside the same SoC.
38- st,sata_gen : to select which SATA_SPDMODE has to be set in the SATA system config
39 register.
40- st,px_rx_pol_inv : to invert polarity of RXn/RXp (respectively negative line and positive
41 line).
42- st,scc-on : enable ssc to reduce effects of EMI (only for sata or PCIe).
43- st,tx-impedance-comp : to compensate tx impedance avoiding out of range values.
44
45example:
46
47 miphy28lp_phy: miphy28lp@9b22000 {
48 compatible = "st,miphy28lp-phy";
49 st,syscfg = <&syscfg_core>;
50 #address-cells = <1>;
51 #size-cells = <1>;
52 ranges;
53
54 phy_port0: port@9b22000 {
55 reg = <0x9b22000 0xff>,
56 <0x9b09000 0xff>,
57 <0x9b04000 0xff>,
58 <0x114 0x4>, /* sysctrl MiPHY cntrl */
59 <0x818 0x4>, /* sysctrl MiPHY status*/
60 <0xe0 0x4>, /* sysctrl PCIe */
61 <0xec 0x4>; /* sysctrl SATA */
62 reg-names = "sata-up",
63 "pcie-up",
64 "pipew",
65 "miphy-ctrl-glue",
66 "miphy-status-glue",
67 "pcie-glue",
68 "sata-glue";
69 #phy-cells = <1>;
70 st,osc-rdy;
71 reset-names = "miphy-sw-rst";
72 resets = <&softreset STIH407_MIPHY0_SOFTRESET>;
73 };
74
75 phy_port1: port@9b2a000 {
76 reg = <0x9b2a000 0xff>,
77 <0x9b19000 0xff>,
78 <0x9b14000 0xff>,
79 <0x118 0x4>,
80 <0x81c 0x4>,
81 <0xe4 0x4>,
82 <0xf0 0x4>;
83 reg-names = "sata-up",
84 "pcie-up",
85 "pipew",
86 "miphy-ctrl-glue",
87 "miphy-status-glue",
88 "pcie-glue",
89 "sata-glue";
90 #phy-cells = <1>;
91 st,osc-force-ext;
92 reset-names = "miphy-sw-rst";
93 resets = <&softreset STIH407_MIPHY1_SOFTRESET>;
94 };
95
96 phy_port2: port@8f95000 {
97 reg = <0x8f95000 0xff>,
98 <0x8f90000 0xff>,
99 <0x11c 0x4>,
100 <0x820 0x4>;
101 reg-names = "pipew",
102 "usb3-up",
103 "miphy-ctrl-glue",
104 "miphy-status-glue";
105 #phy-cells = <1>;
106 reset-names = "miphy-sw-rst";
107 resets = <&softreset STIH407_MIPHY2_SOFTRESET>;
108 };
109 };
110
111
112Specifying phy control of devices
113=================================
114
115Device nodes should specify the configuration required in their "phys"
116property, containing a phandle to the miphy device node and an index
117specifying which configuration to use, as described in phy-bindings.txt.
118
119example:
120 sata0: sata@9b20000 {
121 ...
122 phys = <&phy_port0 PHY_TYPE_SATA>;
123 ...
124 };
125
126Macro definitions for the supported miphy configuration can be found in:
127
128include/dt-bindings/phy/phy-miphy28lp.h
diff --git a/Documentation/devicetree/bindings/phy/phy-mvebu.txt b/Documentation/devicetree/bindings/phy/phy-mvebu.txt
new file mode 100644
index 000000000000..f95b6260a3b3
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/phy-mvebu.txt
@@ -0,0 +1,43 @@
1* Marvell MVEBU SATA PHY
2
3Power control for the SATA phy found on Marvell MVEBU SoCs.
4
5This document extends the binding described in phy-bindings.txt
6
7Required properties :
8
9 - reg : Offset and length of the register set for the SATA device
10 - compatible : Should be "marvell,mvebu-sata-phy"
11 - clocks : phandle of clock and specifier that supplies the device
12 - clock-names : Should be "sata"
13
14Example:
15 sata-phy@84000 {
16 compatible = "marvell,mvebu-sata-phy";
17 reg = <0x84000 0x0334>;
18 clocks = <&gate_clk 15>;
19 clock-names = "sata";
20 #phy-cells = <0>;
21 status = "ok";
22 };
23
24Armada 375 USB cluster
25----------------------
26
27Armada 375 comes with an USB2 host and device controller and an USB3
28controller. The USB cluster control register allows to manage common
29features of both USB controllers.
30
31Required properties:
32
33- compatible: "marvell,armada-375-usb-cluster"
34- reg: Should contain usb cluster register location and length.
35- #phy-cells : from the generic phy bindings, must be 1. Possible
36values are 1 (USB2), 2 (USB3).
37
38Example:
39 usbcluster: usb-cluster@18400 {
40 compatible = "marvell,armada-375-usb-cluster";
41 reg = <0x18400 0x4>;
42 #phy-cells = <1>
43 };
diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt
index 15e0f2c7130f..d5bad920827f 100644
--- a/Documentation/devicetree/bindings/phy/samsung-phy.txt
+++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt
@@ -128,6 +128,7 @@ Required properties:
128- compatible : Should be set to one of the following supported values: 128- compatible : Should be set to one of the following supported values:
129 - "samsung,exynos5250-usbdrd-phy" - for exynos5250 SoC, 129 - "samsung,exynos5250-usbdrd-phy" - for exynos5250 SoC,
130 - "samsung,exynos5420-usbdrd-phy" - for exynos5420 SoC. 130 - "samsung,exynos5420-usbdrd-phy" - for exynos5420 SoC.
131 - "samsung,exynos7-usbdrd-phy" - for exynos7 SoC.
131- reg : Register offset and length of USB DRD PHY register set; 132- reg : Register offset and length of USB DRD PHY register set;
132- clocks: Clock IDs array as required by the controller 133- clocks: Clock IDs array as required by the controller
133- clock-names: names of clocks correseponding to IDs in the clock property; 134- clock-names: names of clocks correseponding to IDs in the clock property;
@@ -138,6 +139,11 @@ Required properties:
138 PHY operations, associated by phy name. It is used to 139 PHY operations, associated by phy name. It is used to
139 determine bit values for clock settings register. 140 determine bit values for clock settings register.
140 For Exynos5420 this is given as 'sclk_usbphy30' in CMU. 141 For Exynos5420 this is given as 'sclk_usbphy30' in CMU.
142 - optional clocks: Exynos7 SoC has now following additional
143 gate clocks available:
144 - phy_pipe: for PIPE3 phy
145 - phy_utmi: for UTMI+ phy
146 - itp: for ITP generation
141- samsung,pmu-syscon: phandle for PMU system controller interface, used to 147- samsung,pmu-syscon: phandle for PMU system controller interface, used to
142 control pmu registers for power isolation. 148 control pmu registers for power isolation.
143- #phy-cells : from the generic PHY bindings, must be 1; 149- #phy-cells : from the generic PHY bindings, must be 1;
diff --git a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt
index a186181c402b..51b943cc9770 100644
--- a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt
@@ -9,7 +9,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the
9common pinctrl bindings used by client devices, including the meaning of the 9common pinctrl bindings used by client devices, including the meaning of the
10phrase "pin configuration node". 10phrase "pin configuration node".
11 11
12TZ1090-PDC's pin configuration nodes act as a container for an abitrary number 12TZ1090-PDC's pin configuration nodes act as a container for an arbitrary number
13of subnodes. Each of these subnodes represents some desired configuration for a 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 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 15mux function to select on those pin(s)/group(s), and various pin configuration
diff --git a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt
index 4b27c99f7f9d..509faa87ad0e 100644
--- a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt
@@ -9,7 +9,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the
9common pinctrl bindings used by client devices, including the meaning of the 9common pinctrl bindings used by client devices, including the meaning of the
10phrase "pin configuration node". 10phrase "pin configuration node".
11 11
12TZ1090's pin configuration nodes act as a container for an abitrary number of 12TZ1090's pin configuration nodes act as a container for an arbitrary number of
13subnodes. Each of these subnodes represents some desired configuration for a 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 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 15mux function to select on those pin(s)/group(s), and various pin configuration
@@ -67,7 +67,7 @@ Valid values for pin and group names are:
67 They also all support the some form of muxing. Any pins which are contained 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 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" 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. 70 function which enables them with their intended peripheral.
71 71
72 Different pins in the same mux group cannot be muxed to different functions, 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 73 however it is possible to mux only a subset of the pins in a mux group to a
diff --git a/Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt b/Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt
index daa768956069..ac4da9fe07bd 100644
--- a/Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt
+++ b/Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt
@@ -9,7 +9,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the
9common pinctrl bindings used by client devices, including the meaning of the 9common pinctrl bindings used by client devices, including the meaning of the
10phrase "pin configuration node". 10phrase "pin configuration node".
11 11
12Lantiq's pin configuration nodes act as a container for an abitrary number of 12Lantiq's pin configuration nodes act as a container for an arbitrary number of
13subnodes. Each of these subnodes represents some desired configuration for a 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 14pin, a group, or a list of pins or groups. This configuration can include the
15mux function to select on those group(s), and two pin configuration parameters: 15mux function to select on those group(s), and two pin configuration parameters:
diff --git a/Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt b/Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt
index b5469db1d7ad..e89b4677567d 100644
--- a/Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt
+++ b/Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt
@@ -9,7 +9,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the
9common pinctrl bindings used by client devices, including the meaning of the 9common pinctrl bindings used by client devices, including the meaning of the
10phrase "pin configuration node". 10phrase "pin configuration node".
11 11
12Lantiq's pin configuration nodes act as a container for an abitrary number of 12Lantiq's pin configuration nodes act as a container for an arbitrary number of
13subnodes. Each of these subnodes represents some desired configuration for a 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 14pin, a group, or a list of pins or groups. This configuration can include the
15mux function to select on those group(s), and two pin configuration parameters: 15mux function to select on those group(s), and two pin configuration parameters:
diff --git a/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
new file mode 100644
index 000000000000..17e7240c6998
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
@@ -0,0 +1,96 @@
1== Amlogic Meson pinmux controller ==
2
3Required properties for the root node:
4 - compatible: "amlogic,meson8-pinctrl"
5 - reg: address and size of registers controlling irq functionality
6
7=== GPIO sub-nodes ===
8
9The 2 power domains of the controller (regular and always-on) are
10represented as sub-nodes and each of them acts as a GPIO controller.
11
12Required properties for sub-nodes are:
13 - reg: should contain address and size for mux, pull-enable, pull and
14 gpio register sets
15 - reg-names: an array of strings describing the "reg" entries. Must
16 contain "mux", "pull" and "gpio". "pull-enable" is optional and
17 when it is missing the "pull" registers are used instead
18 - gpio-controller: identifies the node as a gpio controller
19 - #gpio-cells: must be 2
20
21Valid sub-node names are:
22 - "banks" for the regular domain
23 - "ao-bank" for the always-on domain
24
25=== Other sub-nodes ===
26
27Child nodes without the "gpio-controller" represent some desired
28configuration for a pin or a group. Those nodes can be pinmux nodes or
29configuration nodes.
30
31Required properties for pinmux nodes are:
32 - groups: a list of pinmux groups. The list of all available groups
33 depends on the SoC and can be found in driver sources.
34 - function: the name of a function to activate for the specified set
35 of groups. The list of all available functions depends on the SoC
36 and can be found in driver sources.
37
38Required properties for configuration nodes:
39 - pins: a list of pin names
40
41Configuration nodes support the generic properties "bias-disable",
42"bias-pull-up" and "bias-pull-down", described in file
43pinctrl-bindings.txt
44
45=== Example ===
46
47 pinctrl: pinctrl@c1109880 {
48 compatible = "amlogic,meson8-pinctrl";
49 reg = <0xc1109880 0x10>;
50 #address-cells = <1>;
51 #size-cells = <1>;
52 ranges;
53
54 gpio: banks@c11080b0 {
55 reg = <0xc11080b0 0x28>,
56 <0xc11080e8 0x18>,
57 <0xc1108120 0x18>,
58 <0xc1108030 0x30>;
59 reg-names = "mux", "pull", "pull-enable", "gpio";
60 gpio-controller;
61 #gpio-cells = <2>;
62 };
63
64 gpio_ao: ao-bank@c1108030 {
65 reg = <0xc8100014 0x4>,
66 <0xc810002c 0x4>,
67 <0xc8100024 0x8>;
68 reg-names = "mux", "pull", "gpio";
69 gpio-controller;
70 #gpio-cells = <2>;
71 };
72
73 nand {
74 mux {
75 groups = "nand_io", "nand_io_ce0", "nand_io_ce1",
76 "nand_io_rb0", "nand_ale", "nand_cle",
77 "nand_wen_clk", "nand_ren_clk", "nand_dqs",
78 "nand_ce2", "nand_ce3";
79 function = "nand";
80 };
81 };
82
83 uart_ao_a {
84 mux {
85 groups = "uart_tx_ao_a", "uart_rx_ao_a",
86 "uart_cts_ao_a", "uart_rts_ao_a";
87 function = "uart_ao";
88 };
89
90 conf {
91 pins = "GPIOAO_0", "GPIOAO_1",
92 "GPIOAO_2", "GPIOAO_3";
93 bias-disable;
94 };
95 };
96 };
diff --git a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt
index 61e73cde9ae9..3c8ce28baad6 100644
--- a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt
+++ b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt
@@ -9,7 +9,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the
9common pinctrl bindings used by client devices, including the meaning of the 9common pinctrl bindings used by client devices, including the meaning of the
10phrase "pin configuration node". 10phrase "pin configuration node".
11 11
12Tegra's pin configuration nodes act as a container for an abitrary number of 12Tegra's pin configuration nodes act as a container for an arbitrary number of
13subnodes. Each of these subnodes represents some desired configuration for a 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 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 15mux function to select on those pin(s)/group(s), and various pin configuration
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
index 98eb94d91a1c..47d84b6ee91b 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
@@ -216,4 +216,4 @@ arguments are described below.
216 or 0 to disable debouncing 216 or 0 to disable debouncing
217 217
218More in-depth documentation on these parameters can be found in 218More in-depth documentation on these parameters can be found in
219<include/linux/pinctrl/pinconfig-generic.h> 219<include/linux/pinctrl/pinconf-generic.h>
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
index c596a6ad3285..5f55be59d914 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
@@ -13,7 +13,7 @@ Optional properties:
13Please refer to pinctrl-bindings.txt in this directory for details of the common 13Please refer to pinctrl-bindings.txt in this directory for details of the common
14pinctrl bindings used by client devices. 14pinctrl bindings used by client devices.
15 15
16SiRFprimaII's pinmux nodes act as a container for an abitrary number of subnodes. 16SiRFprimaII's pinmux nodes act as a container for an arbitrary number of subnodes.
17Each of these subnodes represents some desired configuration for a group of pins. 17Each of these subnodes represents some desired configuration for a group of pins.
18 18
19Required subnode-properties: 19Required subnode-properties:
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt
index b4480d5c3aca..458615596946 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt
@@ -32,7 +32,7 @@ Required properties:
32Please refer to pinctrl-bindings.txt in this directory for details of the common 32Please refer to pinctrl-bindings.txt in this directory for details of the common
33pinctrl bindings used by client devices. 33pinctrl bindings used by client devices.
34 34
35SPEAr's pinmux nodes act as a container for an abitrary number of subnodes. Each 35SPEAr's pinmux nodes act as a container for an arbitrary number of subnodes. Each
36of these subnodes represents muxing for a pin, a group, or a list of pins or 36of these subnodes represents muxing for a pin, a group, or a list of pins or
37groups. 37groups.
38 38
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt
index 2fb90b37aa09..a7bde64798c7 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt
@@ -18,7 +18,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the
18common pinctrl bindings used by client devices, including the meaning of the 18common pinctrl bindings used by client devices, including the meaning of the
19phrase "pin configuration node". 19phrase "pin configuration node".
20 20
21Qualcomm's pin configuration nodes act as a container for an abitrary number of 21Qualcomm's pin configuration nodes act as a container for an arbitrary number of
22subnodes. Each of these subnodes represents some desired configuration for a 22subnodes. Each of these subnodes represents some desired configuration for a
23pin, a group, or a list of pins or groups. This configuration can include the 23pin, a group, or a list of pins or groups. This configuration can include the
24mux function to select on those pin(s)/group(s), and various pin configuration 24mux function to select on those pin(s)/group(s), and various pin configuration
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,apq8084-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,apq8084-pinctrl.txt
index ffafa1990a30..c4ea61ac56f2 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,apq8084-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,apq8084-pinctrl.txt
@@ -47,7 +47,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the
47common pinctrl bindings used by client devices, including the meaning of the 47common pinctrl bindings used by client devices, including the meaning of the
48phrase "pin configuration node". 48phrase "pin configuration node".
49 49
50The pin configuration nodes act as a container for an abitrary number of 50The pin configuration nodes act as a container for an arbitrary number of
51subnodes. Each of these subnodes represents some desired configuration for a 51subnodes. Each of these subnodes represents some desired configuration for a
52pin, a group, or a list of pins or groups. This configuration can include the 52pin, a group, or a list of pins or groups. This configuration can include the
53mux function to select on those pin(s)/group(s), and various pin configuration 53mux function to select on those pin(s)/group(s), and various pin configuration
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt
index e33e4dcdce79..6e88e91feb11 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt
@@ -18,7 +18,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the
18common pinctrl bindings used by client devices, including the meaning of the 18common pinctrl bindings used by client devices, including the meaning of the
19phrase "pin configuration node". 19phrase "pin configuration node".
20 20
21Qualcomm's pin configuration nodes act as a container for an abitrary number of 21Qualcomm's pin configuration nodes act as a container for an arbitrary number of
22subnodes. Each of these subnodes represents some desired configuration for a 22subnodes. Each of these subnodes represents some desired configuration for a
23pin, a group, or a list of pins or groups. This configuration can include the 23pin, a group, or a list of pins or groups. This configuration can include the
24mux function to select on those pin(s)/group(s), and various pin configuration 24mux function to select on those pin(s)/group(s), and various pin configuration
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt
index 93b7de91b9f6..eb8d8aa41f20 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt
@@ -47,7 +47,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the
47common pinctrl bindings used by client devices, including the meaning of the 47common pinctrl bindings used by client devices, including the meaning of the
48phrase "pin configuration node". 48phrase "pin configuration node".
49 49
50The pin configuration nodes act as a container for an abitrary number of 50The pin configuration nodes act as a container for an arbitrary number of
51subnodes. Each of these subnodes represents some desired configuration for a 51subnodes. Each of these subnodes represents some desired configuration for a
52pin, a group, or a list of pins or groups. This configuration can include the 52pin, a group, or a list of pins or groups. This configuration can include the
53mux function to select on those pin(s)/group(s), and various pin configuration 53mux function to select on those pin(s)/group(s), and various pin configuration
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt
index d2ea80dc43eb..e4d6a9d20f7d 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt
@@ -18,7 +18,7 @@ Please refer to pinctrl-bindings.txt in this directory for details of the
18common pinctrl bindings used by client devices, including the meaning of the 18common pinctrl bindings used by client devices, including the meaning of the
19phrase "pin configuration node". 19phrase "pin configuration node".
20 20
21Qualcomm's pin configuration nodes act as a container for an abitrary number of 21Qualcomm's pin configuration nodes act as a container for an arbitrary number of
22subnodes. Each of these subnodes represents some desired configuration for a 22subnodes. Each of these subnodes represents some desired configuration for a
23pin, a group, or a list of pins or groups. This configuration can include the 23pin, a group, or a list of pins or groups. This configuration can include the
24mux function to select on those pin(s)/group(s), and various pin configuration 24mux function to select on those pin(s)/group(s), and various pin configuration
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
new file mode 100644
index 000000000000..7ed08048516a
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
@@ -0,0 +1,215 @@
1Qualcomm PMIC GPIO block
2
3This binding describes the GPIO block(s) found in the 8xxx series of
4PMIC's from Qualcomm.
5
6- compatible:
7 Usage: required
8 Value type: <string>
9 Definition: must be one of:
10 "qcom,pm8018-gpio"
11 "qcom,pm8038-gpio"
12 "qcom,pm8058-gpio"
13 "qcom,pm8917-gpio"
14 "qcom,pm8921-gpio"
15 "qcom,pm8941-gpio"
16 "qcom,pma8084-gpio"
17
18- reg:
19 Usage: required
20 Value type: <prop-encoded-array>
21 Definition: Register base of the GPIO block and length.
22
23- interrupts:
24 Usage: required
25 Value type: <prop-encoded-array>
26 Definition: Must contain an array of encoded interrupt specifiers for
27 each available GPIO
28
29- gpio-controller:
30 Usage: required
31 Value type: <none>
32 Definition: Mark the device node as a GPIO controller
33
34- #gpio-cells:
35 Usage: required
36 Value type: <u32>
37 Definition: Must be 2;
38 the first cell will be used to define gpio number and the
39 second denotes the flags for this gpio
40
41Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
42a general description of GPIO and interrupt bindings.
43
44Please refer to pinctrl-bindings.txt in this directory for details of the
45common pinctrl bindings used by client devices, including the meaning of the
46phrase "pin configuration node".
47
48The pin configuration nodes act as a container for an arbitrary number of
49subnodes. Each of these subnodes represents some desired configuration for a
50pin or a list of pins. This configuration can include the
51mux function to select on those pin(s), and various pin configuration
52parameters, as listed below.
53
54
55SUBNODES:
56
57The name of each subnode is not important; all subnodes should be enumerated
58and processed purely based on their content.
59
60Each subnode only affects those parameters that are explicitly listed. In
61other words, a subnode that lists a mux function but no pin configuration
62parameters implies no information about any pin configuration parameters.
63Similarly, a pin subnode that describes a pullup parameter implies no
64information about e.g. the mux function.
65
66The following generic properties as defined in pinctrl-bindings.txt are valid
67to specify in a pin configuration subnode:
68
69- pins:
70 Usage: required
71 Value type: <string-array>
72 Definition: List of gpio pins affected by the properties specified in
73 this subnode. Valid pins are:
74 gpio1-gpio6 for pm8018
75 gpio1-gpio12 for pm8038
76 gpio1-gpio40 for pm8058
77 gpio1-gpio38 for pm8917
78 gpio1-gpio44 for pm8921
79 gpio1-gpio36 for pm8941
80 gpio1-gpio22 for pma8084
81
82- function:
83 Usage: required
84 Value type: <string>
85 Definition: Specify the alternative function to be configured for the
86 specified pins. Valid values are:
87 "normal",
88 "paired",
89 "func1",
90 "func2",
91 "dtest1",
92 "dtest2",
93 "dtest3",
94 "dtest4"
95
96- bias-disable:
97 Usage: optional
98 Value type: <none>
99 Definition: The specified pins should be configured as no pull.
100
101- bias-pull-down:
102 Usage: optional
103 Value type: <none>
104 Definition: The specified pins should be configured as pull down.
105
106- bias-pull-up:
107 Usage: optional
108 Value type: <empty>
109 Definition: The specified pins should be configured as pull up.
110
111- qcom,pull-up-strength:
112 Usage: optional
113 Value type: <u32>
114 Definition: Specifies the strength to use for pull up, if selected.
115 Valid values are; as defined in
116 <dt-bindings/pinctrl/qcom,pmic-gpio.h>:
117 1: 30uA (PMIC_GPIO_PULL_UP_30)
118 2: 1.5uA (PMIC_GPIO_PULL_UP_1P5)
119 3: 31.5uA (PMIC_GPIO_PULL_UP_31P5)
120 4: 1.5uA + 30uA boost (PMIC_GPIO_PULL_UP_1P5_30)
121 If this property is ommited 30uA strength will be used if
122 pull up is selected
123
124- bias-high-impedance:
125 Usage: optional
126 Value type: <none>
127 Definition: The specified pins will put in high-Z mode and disabled.
128
129- input-enable:
130 Usage: optional
131 Value type: <none>
132 Definition: The specified pins are put in input mode.
133
134- output-high:
135 Usage: optional
136 Value type: <none>
137 Definition: The specified pins are configured in output mode, driven
138 high.
139
140- output-low:
141 Usage: optional
142 Value type: <none>
143 Definition: The specified pins are configured in output mode, driven
144 low.
145
146- power-source:
147 Usage: optional
148 Value type: <u32>
149 Definition: Selects the power source for the specified pins. Valid
150 power sources are defined per chip in
151 <dt-bindings/pinctrl/qcom,pmic-gpio.h>
152
153- qcom,drive-strength:
154 Usage: optional
155 Value type: <u32>
156 Definition: Selects the drive strength for the specified pins. Value
157 drive strengths are:
158 0: no (PMIC_GPIO_STRENGTH_NO)
159 1: high (PMIC_GPIO_STRENGTH_HIGH) 0.9mA @ 1.8V - 1.9mA @ 2.6V
160 2: medium (PMIC_GPIO_STRENGTH_MED) 0.6mA @ 1.8V - 1.25mA @ 2.6V
161 3: low (PMIC_GPIO_STRENGTH_LOW) 0.15mA @ 1.8V - 0.3mA @ 2.6V
162 as defined in <dt-bindings/pinctrl/qcom,pmic-gpio.h>
163
164- drive-push-pull:
165 Usage: optional
166 Value type: <none>
167 Definition: The specified pins are configured in push-pull mode.
168
169- drive-open-drain:
170 Usage: optional
171 Value type: <none>
172 Definition: The specified pins are configured in open-drain mode.
173
174- drive-open-source:
175 Usage: optional
176 Value type: <none>
177 Definition: The specified pins are configured in open-source mode.
178
179Example:
180
181 pm8921_gpio: gpio@150 {
182 compatible = "qcom,pm8921-gpio";
183 reg = <0x150 0x160>;
184 interrupts = <192 1>, <193 1>, <194 1>,
185 <195 1>, <196 1>, <197 1>,
186 <198 1>, <199 1>, <200 1>,
187 <201 1>, <202 1>, <203 1>,
188 <204 1>, <205 1>, <206 1>,
189 <207 1>, <208 1>, <209 1>,
190 <210 1>, <211 1>, <212 1>,
191 <213 1>, <214 1>, <215 1>,
192 <216 1>, <217 1>, <218 1>,
193 <219 1>, <220 1>, <221 1>,
194 <222 1>, <223 1>, <224 1>,
195 <225 1>, <226 1>, <227 1>,
196 <228 1>, <229 1>, <230 1>,
197 <231 1>, <232 1>, <233 1>,
198 <234 1>, <235 1>;
199
200 gpio-controller;
201 #gpio-cells = <2>;
202
203 pm8921_gpio_keys: gpio-keys {
204 volume-keys {
205 pins = "gpio20", "gpio21";
206 function = "normal";
207
208 input-enable;
209 bias-pull-up;
210 drive-push-pull;
211 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
212 power-source = <PM8921_GPIO_S4>;
213 };
214 };
215 };
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt
new file mode 100644
index 000000000000..854774b194ed
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt
@@ -0,0 +1,162 @@
1Qualcomm PMIC Multi-Purpose Pin (MPP) block
2
3This binding describes the MPP block(s) found in the 8xxx series
4of PMIC's from Qualcomm.
5
6- compatible:
7 Usage: required
8 Value type: <string>
9 Definition: Should contain one of:
10 "qcom,pm8841-mpp",
11 "qcom,pm8941-mpp",
12 "qcom,pma8084-mpp",
13
14- reg:
15 Usage: required
16 Value type: <prop-encoded-array>
17 Definition: Register base of the MPP block and length.
18
19- interrupts:
20 Usage: required
21 Value type: <prop-encoded-array>
22 Definition: Must contain an array of encoded interrupt specifiers for
23 each available MPP
24
25- gpio-controller:
26 Usage: required
27 Value type: <none>
28 Definition: Mark the device node as a GPIO controller
29
30- #gpio-cells:
31 Usage: required
32 Value type: <u32>
33 Definition: Must be 2;
34 the first cell will be used to define MPP number and the
35 second denotes the flags for this MPP
36
37Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
38a general description of GPIO and interrupt bindings.
39
40Please refer to pinctrl-bindings.txt in this directory for details of the
41common pinctrl bindings used by client devices, including the meaning of the
42phrase "pin configuration node".
43
44The pin configuration nodes act as a container for an arbitrary number of
45subnodes. Each of these subnodes represents some desired configuration for a
46pin or a list of pins. This configuration can include the
47mux function to select on those pin(s), and various pin configuration
48parameters, as listed below.
49
50SUBNODES:
51
52The name of each subnode is not important; all subnodes should be enumerated
53and processed purely based on their content.
54
55Each subnode only affects those parameters that are explicitly listed. In
56other words, a subnode that lists a mux function but no pin configuration
57parameters implies no information about any pin configuration parameters.
58Similarly, a pin subnode that describes a pullup parameter implies no
59information about e.g. the mux function.
60
61The following generic properties as defined in pinctrl-bindings.txt are valid
62to specify in a pin configuration subnode:
63
64- pins:
65 Usage: required
66 Value type: <string-array>
67 Definition: List of MPP pins affected by the properties specified in
68 this subnode. Valid pins are:
69 mpp1-mpp4 for pm8841
70 mpp1-mpp8 for pm8941
71 mpp1-mpp4 for pma8084
72
73- function:
74 Usage: required
75 Value type: <string>
76 Definition: Specify the alternative function to be configured for the
77 specified pins. Valid values are:
78 "normal",
79 "paired",
80 "dtest1",
81 "dtest2",
82 "dtest3",
83 "dtest4"
84
85- bias-disable:
86 Usage: optional
87 Value type: <none>
88 Definition: The specified pins should be configured as no pull.
89
90- bias-pull-up:
91 Usage: optional
92 Value type: <u32>
93 Definition: The specified pins should be configured as pull up.
94 Valid values are 600, 10000 and 30000 in bidirectional mode
95 only, i.e. when operating in qcom,analog-mode and input and
96 outputs are enabled. The hardware ignores the configuration
97 when operating in other modes.
98
99- bias-high-impedance:
100 Usage: optional
101 Value type: <none>
102 Definition: The specified pins will put in high-Z mode and disabled.
103
104- input-enable:
105 Usage: optional
106 Value type: <none>
107 Definition: The specified pins are put in input mode, i.e. their input
108 buffer is enabled
109
110- output-high:
111 Usage: optional
112 Value type: <none>
113 Definition: The specified pins are configured in output mode, driven
114 high.
115
116- output-low:
117 Usage: optional
118 Value type: <none>
119 Definition: The specified pins are configured in output mode, driven
120 low.
121
122- power-source:
123 Usage: optional
124 Value type: <u32>
125 Definition: Selects the power source for the specified pins. Valid power
126 sources are defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h>
127
128- qcom,analog-mode:
129 Usage: optional
130 Value type: <none>
131 Definition: Selects Analog mode of operation: combined with input-enable
132 and/or output-high, output-low MPP could operate as
133 Bidirectional Logic, Analog Input, Analog Output.
134
135- qcom,amux-route:
136 Usage: optional
137 Value type: <u32>
138 Definition: Selects the source for analog input. Valid values are
139 defined in <dt-bindings/pinctrl/qcom,pmic-mpp.h>
140 PMIC_MPP_AMUX_ROUTE_CH5, PMIC_MPP_AMUX_ROUTE_CH6...
141
142Example:
143
144 mpps@a000 {
145 compatible = "qcom,pm8841-mpp";
146 reg = <0xa000>;
147 gpio-controller;
148 #gpio-cells = <2>;
149 interrupts = <4 0xa0 0 0>, <4 0xa1 0 0>, <4 0xa2 0 0>, <4 0xa3 0 0>;
150
151 pinctrl-names = "default";
152 pinctrl-0 = <&pm8841_default>;
153
154 pm8841_default: default {
155 gpio {
156 pins = "mpp1", "mpp2", "mpp3", "mpp4";
157 function = "normal";
158 input-enable;
159 power-source = <PM8841_MPP_S3>;
160 };
161 };
162 };
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
index e82aaf492517..8425838a6dff 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
@@ -18,6 +18,7 @@ Required Properties:
18 - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller. 18 - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller.
19 - "samsung,exynos5260-pinctrl": for Exynos5260 compatible pin-controller. 19 - "samsung,exynos5260-pinctrl": for Exynos5260 compatible pin-controller.
20 - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller. 20 - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller.
21 - "samsung,exynos7-pinctrl": for Exynos7 compatible pin-controller.
21 22
22- reg: Base address of the pin controller hardware module and length of 23- reg: Base address of the pin controller hardware module and length of
23 the address space it occupies. 24 the address space it occupies.
@@ -136,6 +137,8 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a
136 found on Samsung S3C64xx SoCs, 137 found on Samsung S3C64xx SoCs,
137 - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller 138 - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller
138 found on Samsung Exynos4210 and S5PC110/S5PV210 SoCs. 139 found on Samsung Exynos4210 and S5PC110/S5PV210 SoCs.
140 - samsung,exynos7-wakeup-eint: represents wakeup interrupt controller
141 found on Samsung Exynos7 SoC.
139 - interrupt-parent: phandle of the interrupt parent to which the external 142 - interrupt-parent: phandle of the interrupt parent to which the external
140 wakeup interrupts are forwarded to. 143 wakeup interrupts are forwarded to.
141 - interrupts: interrupt used by multiplexed wakeup interrupts. 144 - interrupts: interrupt used by multiplexed wakeup interrupts.
diff --git a/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt b/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt
index e3865e136067..87697420439e 100644
--- a/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt
+++ b/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt
@@ -8,42 +8,8 @@ Please refer to pinctrl-bindings.txt in this directory for details of the
8common pinctrl bindings used by client devices, including the meaning of the 8common pinctrl bindings used by client devices, including the meaning of the
9phrase "pin configuration node". 9phrase "pin configuration node".
10 10
11ST Ericsson's pin configuration nodes act as a container for an arbitrary number of 11ST Ericsson's pin configuration nodes use the generic pin multiplexing
12subnodes. Each of these subnodes represents some desired configuration for a 12and pin configuration bindings, see pinctrl-bindings.txt
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 13
48Example board file extract: 14Example board file extract:
49 15
@@ -54,11 +20,11 @@ Example board file extract:
54 sysclkreq2 { 20 sysclkreq2 {
55 sysclkreq2_default_mode: sysclkreq2_default { 21 sysclkreq2_default_mode: sysclkreq2_default {
56 default_mux { 22 default_mux {
57 ste,function = "sysclkreq"; 23 function = "sysclkreq";
58 ste,pins = "sysclkreq2_d_1"; 24 groups = "sysclkreq2_d_1";
59 }; 25 };
60 default_cfg { 26 default_cfg {
61 ste,pins = "GPIO1"; 27 pins = "GPIO1";
62 bias-disable; 28 bias-disable;
63 }; 29 };
64 }; 30 };
@@ -66,11 +32,11 @@ Example board file extract:
66 sysclkreq3 { 32 sysclkreq3 {
67 sysclkreq3_default_mode: sysclkreq3_default { 33 sysclkreq3_default_mode: sysclkreq3_default {
68 default_mux { 34 default_mux {
69 ste,function = "sysclkreq"; 35 function = "sysclkreq";
70 ste,pins = "sysclkreq3_d_1"; 36 groups = "sysclkreq3_d_1";
71 }; 37 };
72 default_cfg { 38 default_cfg {
73 ste,pins = "GPIO2"; 39 pins = "GPIO2";
74 output-low; 40 output-low;
75 }; 41 };
76 }; 42 };
@@ -78,11 +44,11 @@ Example board file extract:
78 gpio3 { 44 gpio3 {
79 gpio3_default_mode: gpio3_default { 45 gpio3_default_mode: gpio3_default {
80 default_mux { 46 default_mux {
81 ste,function = "gpio"; 47 function = "gpio";
82 ste,pins = "gpio3_a_1"; 48 groups = "gpio3_a_1";
83 }; 49 };
84 default_cfg { 50 default_cfg {
85 ste,pins = "GPIO3"; 51 pins = "GPIO3";
86 output-low; 52 output-low;
87 }; 53 };
88 }; 54 };
@@ -90,11 +56,11 @@ Example board file extract:
90 sysclkreq6 { 56 sysclkreq6 {
91 sysclkreq6_default_mode: sysclkreq6_default { 57 sysclkreq6_default_mode: sysclkreq6_default {
92 default_mux { 58 default_mux {
93 ste,function = "sysclkreq"; 59 function = "sysclkreq";
94 ste,pins = "sysclkreq6_d_1"; 60 groups = "sysclkreq6_d_1";
95 }; 61 };
96 default_cfg { 62 default_cfg {
97 ste,pins = "GPIO4"; 63 pins = "GPIO4";
98 bias-disable; 64 bias-disable;
99 }; 65 };
100 }; 66 };
@@ -102,11 +68,11 @@ Example board file extract:
102 pwmout1 { 68 pwmout1 {
103 pwmout1_default_mode: pwmout1_default { 69 pwmout1_default_mode: pwmout1_default {
104 default_mux { 70 default_mux {
105 ste,function = "pwmout"; 71 function = "pwmout";
106 ste,pins = "pwmout1_d_1"; 72 groups = "pwmout1_d_1";
107 }; 73 };
108 default_cfg { 74 default_cfg {
109 ste,pins = "GPIO14"; 75 pins = "GPIO14";
110 output-low; 76 output-low;
111 }; 77 };
112 }; 78 };
@@ -114,11 +80,11 @@ Example board file extract:
114 pwmout2 { 80 pwmout2 {
115 pwmout2_default_mode: pwmout2_default { 81 pwmout2_default_mode: pwmout2_default {
116 pwmout2_default_mux { 82 pwmout2_default_mux {
117 ste,function = "pwmout"; 83 function = "pwmout";
118 ste,pins = "pwmout2_d_1"; 84 groups = "pwmout2_d_1";
119 }; 85 };
120 pwmout2_default_cfg { 86 pwmout2_default_cfg {
121 ste,pins = "GPIO15"; 87 pins = "GPIO15";
122 output-low; 88 output-low;
123 }; 89 };
124 }; 90 };
@@ -126,11 +92,11 @@ Example board file extract:
126 pwmout3 { 92 pwmout3 {
127 pwmout3_default_mode: pwmout3_default { 93 pwmout3_default_mode: pwmout3_default {
128 pwmout3_default_mux { 94 pwmout3_default_mux {
129 ste,function = "pwmout"; 95 function = "pwmout";
130 ste,pins = "pwmout3_d_1"; 96 groups = "pwmout3_d_1";
131 }; 97 };
132 pwmout3_default_cfg { 98 pwmout3_default_cfg {
133 ste,pins = "GPIO16"; 99 pins = "GPIO16";
134 output-low; 100 output-low;
135 }; 101 };
136 }; 102 };
@@ -139,15 +105,15 @@ Example board file extract:
139 105
140 adi1_default_mode: adi1_default { 106 adi1_default_mode: adi1_default {
141 adi1_default_mux { 107 adi1_default_mux {
142 ste,function = "adi1"; 108 function = "adi1";
143 ste,pins = "adi1_d_1"; 109 groups = "adi1_d_1";
144 }; 110 };
145 adi1_default_cfg1 { 111 adi1_default_cfg1 {
146 ste,pins = "GPIO17","GPIO19","GPIO20"; 112 pins = "GPIO17","GPIO19","GPIO20";
147 bias-disable; 113 bias-disable;
148 }; 114 };
149 adi1_default_cfg2 { 115 adi1_default_cfg2 {
150 ste,pins = "GPIO18"; 116 pins = "GPIO18";
151 output-low; 117 output-low;
152 }; 118 };
153 }; 119 };
@@ -155,15 +121,15 @@ Example board file extract:
155 dmic12 { 121 dmic12 {
156 dmic12_default_mode: dmic12_default { 122 dmic12_default_mode: dmic12_default {
157 dmic12_default_mux { 123 dmic12_default_mux {
158 ste,function = "dmic"; 124 function = "dmic";
159 ste,pins = "dmic12_d_1"; 125 groups = "dmic12_d_1";
160 }; 126 };
161 dmic12_default_cfg1 { 127 dmic12_default_cfg1 {
162 ste,pins = "GPIO27"; 128 pins = "GPIO27";
163 output-low; 129 output-low;
164 }; 130 };
165 dmic12_default_cfg2 { 131 dmic12_default_cfg2 {
166 ste,pins = "GPIO28"; 132 pins = "GPIO28";
167 bias-disable; 133 bias-disable;
168 }; 134 };
169 }; 135 };
@@ -171,15 +137,15 @@ Example board file extract:
171 dmic34 { 137 dmic34 {
172 dmic34_default_mode: dmic34_default { 138 dmic34_default_mode: dmic34_default {
173 dmic34_default_mux { 139 dmic34_default_mux {
174 ste,function = "dmic"; 140 function = "dmic";
175 ste,pins = "dmic34_d_1"; 141 groups = "dmic34_d_1";
176 }; 142 };
177 dmic34_default_cfg1 { 143 dmic34_default_cfg1 {
178 ste,pins = "GPIO29"; 144 pins = "GPIO29";
179 output-low; 145 output-low;
180 }; 146 };
181 dmic34_default_cfg2 { 147 dmic34_default_cfg2 {
182 ste,pins = "GPIO30"; 148 pins = "GPIO30";
183 bias-disable;{ 149 bias-disable;{
184 150
185 }; 151 };
@@ -188,15 +154,15 @@ Example board file extract:
188 dmic56 { 154 dmic56 {
189 dmic56_default_mode: dmic56_default { 155 dmic56_default_mode: dmic56_default {
190 dmic56_default_mux { 156 dmic56_default_mux {
191 ste,function = "dmic"; 157 function = "dmic";
192 ste,pins = "dmic56_d_1"; 158 groups = "dmic56_d_1";
193 }; 159 };
194 dmic56_default_cfg1 { 160 dmic56_default_cfg1 {
195 ste,pins = "GPIO31"; 161 pins = "GPIO31";
196 output-low; 162 output-low;
197 }; 163 };
198 dmic56_default_cfg2 { 164 dmic56_default_cfg2 {
199 ste,pins = "GPIO32"; 165 pins = "GPIO32";
200 bias-disable; 166 bias-disable;
201 }; 167 };
202 }; 168 };
@@ -204,11 +170,11 @@ Example board file extract:
204 sysclkreq5 { 170 sysclkreq5 {
205 sysclkreq5_default_mode: sysclkreq5_default { 171 sysclkreq5_default_mode: sysclkreq5_default {
206 sysclkreq5_default_mux { 172 sysclkreq5_default_mux {
207 ste,function = "sysclkreq"; 173 function = "sysclkreq";
208 ste,pins = "sysclkreq5_d_1"; 174 groups = "sysclkreq5_d_1";
209 }; 175 };
210 sysclkreq5_default_cfg { 176 sysclkreq5_default_cfg {
211 ste,pins = "GPIO42"; 177 pins = "GPIO42";
212 output-low; 178 output-low;
213 }; 179 };
214 }; 180 };
@@ -216,11 +182,11 @@ Example board file extract:
216 batremn { 182 batremn {
217 batremn_default_mode: batremn_default { 183 batremn_default_mode: batremn_default {
218 batremn_default_mux { 184 batremn_default_mux {
219 ste,function = "batremn"; 185 function = "batremn";
220 ste,pins = "batremn_d_1"; 186 groups = "batremn_d_1";
221 }; 187 };
222 batremn_default_cfg { 188 batremn_default_cfg {
223 ste,pins = "GPIO43"; 189 pins = "GPIO43";
224 bias-disable; 190 bias-disable;
225 }; 191 };
226 }; 192 };
@@ -228,11 +194,11 @@ Example board file extract:
228 service { 194 service {
229 service_default_mode: service_default { 195 service_default_mode: service_default {
230 service_default_mux { 196 service_default_mux {
231 ste,function = "service"; 197 function = "service";
232 ste,pins = "service_d_1"; 198 groups = "service_d_1";
233 }; 199 };
234 service_default_cfg { 200 service_default_cfg {
235 ste,pins = "GPIO44"; 201 pins = "GPIO44";
236 bias-disable; 202 bias-disable;
237 }; 203 };
238 }; 204 };
@@ -240,13 +206,13 @@ Example board file extract:
240 pwrctrl0 { 206 pwrctrl0 {
241 pwrctrl0_default_mux: pwrctrl0_mux { 207 pwrctrl0_default_mux: pwrctrl0_mux {
242 pwrctrl0_default_mux { 208 pwrctrl0_default_mux {
243 ste,function = "pwrctrl"; 209 function = "pwrctrl";
244 ste,pins = "pwrctrl0_d_1"; 210 groups = "pwrctrl0_d_1";
245 }; 211 };
246 }; 212 };
247 pwrctrl0_default_mode: pwrctrl0_default { 213 pwrctrl0_default_mode: pwrctrl0_default {
248 pwrctrl0_default_cfg { 214 pwrctrl0_default_cfg {
249 ste,pins = "GPIO45"; 215 pins = "GPIO45";
250 bias-disable; 216 bias-disable;
251 }; 217 };
252 }; 218 };
@@ -254,13 +220,13 @@ Example board file extract:
254 pwrctrl1 { 220 pwrctrl1 {
255 pwrctrl1_default_mux: pwrctrl1_mux { 221 pwrctrl1_default_mux: pwrctrl1_mux {
256 pwrctrl1_default_mux { 222 pwrctrl1_default_mux {
257 ste,function = "pwrctrl"; 223 function = "pwrctrl";
258 ste,pins = "pwrctrl1_d_1"; 224 groups = "pwrctrl1_d_1";
259 }; 225 };
260 }; 226 };
261 pwrctrl1_default_mode: pwrctrl1_default { 227 pwrctrl1_default_mode: pwrctrl1_default {
262 pwrctrl1_default_cfg { 228 pwrctrl1_default_cfg {
263 ste,pins = "GPIO46"; 229 pins = "GPIO46";
264 bias-disable; 230 bias-disable;
265 }; 231 };
266 }; 232 };
@@ -268,11 +234,11 @@ Example board file extract:
268 pwmextvibra1 { 234 pwmextvibra1 {
269 pwmextvibra1_default_mode: pwmextvibra1_default { 235 pwmextvibra1_default_mode: pwmextvibra1_default {
270 pwmextvibra1_default_mux { 236 pwmextvibra1_default_mux {
271 ste,function = "pwmextvibra"; 237 function = "pwmextvibra";
272 ste,pins = "pwmextvibra1_d_1"; 238 groups = "pwmextvibra1_d_1";
273 }; 239 };
274 pwmextvibra1_default_cfg { 240 pwmextvibra1_default_cfg {
275 ste,pins = "GPIO47"; 241 pins = "GPIO47";
276 bias-disable; 242 bias-disable;
277 }; 243 };
278 }; 244 };
@@ -280,11 +246,11 @@ Example board file extract:
280 pwmextvibra2 { 246 pwmextvibra2 {
281 pwmextvibra2_default_mode: pwmextvibra2_default { 247 pwmextvibra2_default_mode: pwmextvibra2_default {
282 pwmextvibra2_default_mux { 248 pwmextvibra2_default_mux {
283 ste,function = "pwmextvibra"; 249 function = "pwmextvibra";
284 ste,pins = "pwmextvibra2_d_1"; 250 groups = "pwmextvibra2_d_1";
285 }; 251 };
286 pwmextvibra1_default_cfg { 252 pwmextvibra1_default_cfg {
287 ste,pins = "GPIO48"; 253 pins = "GPIO48";
288 bias-disable; 254 bias-disable;
289 }; 255 };
290 }; 256 };
@@ -292,11 +258,11 @@ Example board file extract:
292 gpio51 { 258 gpio51 {
293 gpio51_default_mode: gpio51_default { 259 gpio51_default_mode: gpio51_default {
294 gpio51_default_mux { 260 gpio51_default_mux {
295 ste,function = "gpio"; 261 function = "gpio";
296 ste,pins = "gpio51_a_1"; 262 groups = "gpio51_a_1";
297 }; 263 };
298 gpio51_default_cfg { 264 gpio51_default_cfg {
299 ste,pins = "GPIO51"; 265 pins = "GPIO51";
300 output-low; 266 output-low;
301 }; 267 };
302 }; 268 };
@@ -304,11 +270,11 @@ Example board file extract:
304 gpio52 { 270 gpio52 {
305 gpio52_default_mode: gpio52_default { 271 gpio52_default_mode: gpio52_default {
306 gpio52_default_mux { 272 gpio52_default_mux {
307 ste,function = "gpio"; 273 function = "gpio";
308 ste,pins = "gpio52_a_1"; 274 groups = "gpio52_a_1";
309 }; 275 };
310 gpio52_default_cfg { 276 gpio52_default_cfg {
311 ste,pins = "GPIO52"; 277 pins = "GPIO52";
312 bias-pull-down; 278 bias-pull-down;
313 }; 279 };
314 }; 280 };
@@ -316,11 +282,11 @@ Example board file extract:
316 gpio53 { 282 gpio53 {
317 gpio53_default_mode: gpio53_default { 283 gpio53_default_mode: gpio53_default {
318 gpio53_default_mux { 284 gpio53_default_mux {
319 ste,function = "gpio"; 285 function = "gpio";
320 ste,pins = "gpio53_a_1"; 286 groups = "gpio53_a_1";
321 }; 287 };
322 gpio53_default_cfg { 288 gpio53_default_cfg {
323 ste,pins = "GPIO53"; 289 pins = "GPIO53";
324 bias-pull-down; 290 bias-pull-down;
325 }; 291 };
326 }; 292 };
@@ -328,11 +294,11 @@ Example board file extract:
328 gpio54 { 294 gpio54 {
329 gpio54_default_mode: gpio54_default { 295 gpio54_default_mode: gpio54_default {
330 gpio54_default_mux { 296 gpio54_default_mux {
331 ste,function = "gpio"; 297 function = "gpio";
332 ste,pins = "gpio54_a_1"; 298 groups = "gpio54_a_1";
333 }; 299 };
334 gpio54_default_cfg { 300 gpio54_default_cfg {
335 ste,pins = "GPIO54"; 301 pins = "GPIO54";
336 output-low; 302 output-low;
337 }; 303 };
338 }; 304 };
@@ -340,11 +306,11 @@ Example board file extract:
340 pdmclkdat { 306 pdmclkdat {
341 pdmclkdat_default_mode: pdmclkdat_default { 307 pdmclkdat_default_mode: pdmclkdat_default {
342 pdmclkdat_default_mux { 308 pdmclkdat_default_mux {
343 ste,function = "pdm"; 309 function = "pdm";
344 ste,pins = "pdmclkdat_d_1"; 310 groups = "pdmclkdat_d_1";
345 }; 311 };
346 pdmclkdat_default_cfg { 312 pdmclkdat_default_cfg {
347 ste,pins = "GPIO55", "GPIO56"; 313 pins = "GPIO55", "GPIO56";
348 bias-disable; 314 bias-disable;
349 }; 315 };
350 }; 316 };
diff --git a/Documentation/devicetree/bindings/power/power-controller.txt b/Documentation/devicetree/bindings/power/power-controller.txt
new file mode 100644
index 000000000000..4f7a3bc9c407
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/power-controller.txt
@@ -0,0 +1,18 @@
1* Generic system power control capability
2
3Power-management integrated circuits or miscellaneous hardware components are
4sometimes able to control the system power. The device driver associated with these
5components might need to define this capability, which tells the kernel that
6it can be used to switch off the system. The corresponding device must have the
7standard property "system-power-controller" in its device node. This property
8marks the device as able to control the system power. In order to test if this
9property is found programmatically, use the helper function
10"of_device_is_system_power_controller" from of.h .
11
12Example:
13
14act8846: act8846@5 {
15 compatible = "active-semi,act8846";
16 status = "okay";
17 system-power-controller;
18}
diff --git a/Documentation/devicetree/bindings/power_supply/gpio-charger.txt b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
new file mode 100644
index 000000000000..adbb5dc5b6e9
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
@@ -0,0 +1,27 @@
1gpio-charger
2
3Required properties :
4 - compatible : "gpio-charger"
5 - gpios : GPIO indicating the charger presence.
6 See GPIO binding in bindings/gpio/gpio.txt .
7 - charger-type : power supply type, one of
8 unknown
9 battery
10 ups
11 mains
12 usb-sdp (USB standard downstream port)
13 usb-dcp (USB dedicated charging port)
14 usb-cdp (USB charging downstream port)
15 usb-aca (USB accessory charger adapter)
16
17Example:
18
19 usb_charger: charger {
20 compatible = "gpio-charger";
21 charger-type = "usb-sdp";
22 gpios = <&gpf0 2 0 0 0>;
23 }
24
25 battery {
26 power-supplies = <&usb_charger>;
27 };
diff --git a/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt
new file mode 100644
index 000000000000..dc7c9bad63ea
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt
@@ -0,0 +1,23 @@
1i.mx6 Poweroff Driver
2
3SNVS_LPCR in SNVS module can power off the whole system by pull
4PMIC_ON_REQ low if PMIC_ON_REQ is connected with external PMIC.
5If you don't want to use PMIC_ON_REQ as power on/off control,
6please set status='disabled' to disable this driver.
7
8Required Properties:
9-compatible: "fsl,sec-v4.0-poweroff"
10-reg: Specifies the physical address of the SNVS_LPCR register
11
12Example:
13 snvs@020cc000 {
14 compatible = "fsl,sec-v4.0-mon", "simple-bus";
15 #address-cells = <1>;
16 #size-cells = <1>;
17 ranges = <0 0x020cc000 0x4000>;
18 .....
19 snvs_poweroff: snvs-poweroff@38 {
20 compatible = "fsl,sec-v4.0-poweroff";
21 reg = <0x38 0x4>;
22 };
23 }
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
new file mode 100644
index 000000000000..edeea160ca39
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
@@ -0,0 +1,534 @@
1=============================================================================
2Freescale Frame Manager Device Bindings
3
4CONTENTS
5 - FMan Node
6 - FMan Port Node
7 - FMan MURAM Node
8 - FMan dTSEC/XGEC/mEMAC Node
9 - FMan IEEE 1588 Node
10 - Example
11
12=============================================================================
13FMan Node
14
15DESCRIPTION
16
17Due to the fact that the FMan is an aggregation of sub-engines (ports, MACs,
18etc.) the FMan node will have child nodes for each of them.
19
20PROPERTIES
21
22- compatible
23 Usage: required
24 Value type: <stringlist>
25 Definition: Must include "fsl,fman"
26 FMan version can be determined via FM_IP_REV_1 register in the
27 FMan block. The offset is 0xc4 from the beginning of the
28 Frame Processing Manager memory map (0xc3000 from the
29 beginning of the FMan node).
30
31- cell-index
32 Usage: required
33 Value type: <u32>
34 Definition: Specifies the index of the FMan unit.
35
36 The cell-index value may be used by the SoC, to identify the
37 FMan unit in the SoC memory map. In the table bellow,
38 there's a description of the cell-index use in each SoC:
39
40 - P1023:
41 register[bit] FMan unit cell-index
42 ============================================================
43 DEVDISR[1] 1 0
44
45 - P2041, P3041, P4080 P5020, P5040:
46 register[bit] FMan unit cell-index
47 ============================================================
48 DCFG_DEVDISR2[6] 1 0
49 DCFG_DEVDISR2[14] 2 1
50 (Second FM available only in P4080 and P5040)
51
52 - B4860, T1040, T2080, T4240:
53 register[bit] FMan unit cell-index
54 ============================================================
55 DCFG_CCSR_DEVDISR2[24] 1 0
56 DCFG_CCSR_DEVDISR2[25] 2 1
57 (Second FM available only in T4240)
58
59 DEVDISR, DCFG_DEVDISR2 and DCFG_CCSR_DEVDISR2 are located in
60 the specific SoC "Device Configuration/Pin Control" Memory
61 Map.
62
63- reg
64 Usage: required
65 Value type: <prop-encoded-array>
66 Definition: A standard property. Specifies the offset of the
67 following configuration registers:
68 - BMI configuration registers.
69 - QMI configuration registers.
70 - DMA configuration registers.
71 - FPM configuration registers.
72 - FMan controller configuration registers.
73
74- ranges
75 Usage: required
76 Value type: <prop-encoded-array>
77 Definition: A standard property.
78
79- clocks
80 Usage: required
81 Value type: <prop-encoded-array>
82 Definition: phandle for the fman input clock.
83
84- clock-names
85 usage: required
86 Value type: <stringlist>
87 Definition: "fmanclk" for the fman input clock.
88
89- interrupts
90 Usage: required
91 Value type: <prop-encoded-array>
92 Definition: A pair of IRQs are specified in this property.
93 The first element is associated with the event interrupts and
94 the second element is associated with the error interrupts.
95
96- fsl,qman-channel-range
97 Usage: required
98 Value type: <prop-encoded-array>
99 Definition: Specifies the range of the available dedicated
100 channels in the FMan. The first cell specifies the beginning
101 of the range and the second cell specifies the number of
102 channels.
103 Further information available at:
104 "Work Queue (WQ) Channel Assignments in the QMan" section
105 in DPAA Reference Manual.
106
107- fsl,qman
108- fsl,bman
109 Usage: required
110 Definition: See soc/fsl/qman.txt and soc/fsl/bman.txt
111
112=============================================================================
113FMan MURAM Node
114
115DESCRIPTION
116
117FMan Internal memory - shared between all the FMan modules.
118It contains data structures that are common and written to or read by
119the modules.
120FMan internal memory is split into the following parts:
121 Packet buffering (Tx/Rx FIFOs)
122 Frames internal context
123
124PROPERTIES
125
126- compatible
127 Usage: required
128 Value type: <stringlist>
129 Definition: Must include "fsl,fman-muram"
130
131- ranges
132 Usage: required
133 Value type: <prop-encoded-array>
134 Definition: A standard property.
135 Specifies the multi-user memory offset and the size within
136 the FMan.
137
138EXAMPLE
139
140muram@0 {
141 compatible = "fsl,fman-muram";
142 ranges = <0 0x000000 0x28000>;
143};
144
145=============================================================================
146FMan Port Node
147
148DESCRIPTION
149
150The Frame Manager (FMan) supports several types of hardware ports:
151 Ethernet receiver (RX)
152 Ethernet transmitter (TX)
153 Offline/Host command (O/H)
154
155PROPERTIES
156
157- compatible
158 Usage: required
159 Value type: <stringlist>
160 Definition: A standard property.
161 Must include one of the following:
162 - "fsl,fman-v2-port-oh" for FManV2 OH ports
163 - "fsl,fman-v2-port-rx" for FManV2 RX ports
164 - "fsl,fman-v2-port-tx" for FManV2 TX ports
165 - "fsl,fman-v3-port-oh" for FManV3 OH ports
166 - "fsl,fman-v3-port-rx" for FManV3 RX ports
167 - "fsl,fman-v3-port-tx" for FManV3 TX ports
168
169- cell-index
170 Usage: required
171 Value type: <u32>
172 Definition: Specifies the hardware port id.
173 Each hardware port on the FMan has its own hardware PortID.
174 Super set of all hardware Port IDs available at FMan Reference
175 Manual under "FMan Hardware Ports in Freescale Devices" table.
176
177 Each hardware port is assigned a 4KB, port-specific page in
178 the FMan hardware port memory region (which is part of the
179 FMan memory map). The first 4 KB in the FMan hardware ports
180 memory region is used for what are called common registers.
181 The subsequent 63 4KB pages are allocated to the hardware
182 ports.
183 The page of a specific port is determined by the cell-index.
184
185- reg
186 Usage: required
187 Value type: <prop-encoded-array>
188 Definition: There is one reg region describing the port
189 configuration registers.
190
191EXAMPLE
192
193port@a8000 {
194 cell-index = <0x28>;
195 compatible = "fsl,fman-v2-port-tx";
196 reg = <0xa8000 0x1000>;
197};
198
199port@88000 {
200 cell-index = <0x8>;
201 compatible = "fsl,fman-v2-port-rx";
202 reg = <0x88000 0x1000>;
203};
204
205port@81000 {
206 cell-index = <0x1>;
207 compatible = "fsl,fman-v2-port-oh";
208 reg = <0x81000 0x1000>;
209};
210
211=============================================================================
212FMan dTSEC/XGEC/mEMAC Node
213
214DESCRIPTION
215
216mEMAC/dTSEC/XGEC are the Ethernet network interfaces
217
218PROPERTIES
219
220- compatible
221 Usage: required
222 Value type: <stringlist>
223 Definition: A standard property.
224 Must include one of the following:
225 - "fsl,fman-dtsec" for dTSEC MAC
226 - "fsl,fman-xgec" for XGEC MAC
227 - "fsl,fman-memac for mEMAC MAC
228
229- cell-index
230 Usage: required
231 Value type: <u32>
232 Definition: Specifies the MAC id.
233
234 The cell-index value may be used by the FMan or the SoC, to
235 identify the MAC unit in the FMan (or SoC) memory map.
236 In the tables bellow there's a description of the cell-index
237 use, there are two tables, one describes the use of cell-index
238 by the FMan, the second describes the use by the SoC:
239
240 1. FMan Registers
241
242 FManV2:
243 register[bit] MAC cell-index
244 ============================================================
245 FM_EPI[16] XGEC 8
246 FM_EPI[16+n] dTSECn n-1
247 FM_NPI[11+n] dTSECn n-1
248 n = 1,..,5
249
250 FManV3:
251 register[bit] MAC cell-index
252 ============================================================
253 FM_EPI[16+n] mEMACn n-1
254 FM_EPI[25] mEMAC10 9
255
256 FM_NPI[11+n] mEMACn n-1
257 FM_NPI[10] mEMAC10 9
258 FM_NPI[11] mEMAC9 8
259 n = 1,..8
260
261 FM_EPI and FM_NPI are located in the FMan memory map.
262
263 2. SoC registers:
264
265 - P2041, P3041, P4080 P5020, P5040:
266 register[bit] FMan MAC cell
267 Unit index
268 ============================================================
269 DCFG_DEVDISR2[7] 1 XGEC 8
270 DCFG_DEVDISR2[7+n] 1 dTSECn n-1
271 DCFG_DEVDISR2[15] 2 XGEC 8
272 DCFG_DEVDISR2[15+n] 2 dTSECn n-1
273 n = 1,..5
274
275 - T1040, T2080, T4240, B4860:
276 register[bit] FMan MAC cell
277 Unit index
278 ============================================================
279 DCFG_CCSR_DEVDISR2[n-1] 1 mEMACn n-1
280 DCFG_CCSR_DEVDISR2[11+n] 2 mEMACn n-1
281 n = 1,..6,9,10
282
283 EVDISR, DCFG_DEVDISR2 and DCFG_CCSR_DEVDISR2 are located in
284 the specific SoC "Device Configuration/Pin Control" Memory
285 Map.
286
287- reg
288 Usage: required
289 Value type: <prop-encoded-array>
290 Definition: A standard property.
291
292- fsl,fman-ports
293 Usage: required
294 Value type: <prop-encoded-array>
295 Definition: An array of two phandles - the first references is
296 the FMan RX port and the second is the TX port used by this
297 MAC.
298
299- ptp-timer
300 Usage required
301 Value type: <phandle>
302 Definition: A phandle for 1EEE1588 timer.
303
304EXAMPLE
305
306fman1_tx28: port@a8000 {
307 cell-index = <0x28>;
308 compatible = "fsl,fman-v2-port-tx";
309 reg = <0xa8000 0x1000>;
310};
311
312fman1_rx8: port@88000 {
313 cell-index = <0x8>;
314 compatible = "fsl,fman-v2-port-rx";
315 reg = <0x88000 0x1000>;
316};
317
318ptp-timer: ptp_timer@fe000 {
319 compatible = "fsl,fman-ptp-timer";
320 reg = <0xfe000 0x1000>;
321};
322
323ethernet@e0000 {
324 compatible = "fsl,fman-dtsec";
325 cell-index = <0>;
326 reg = <0xe0000 0x1000>;
327 fsl,fman-ports = <&fman1_rx8 &fman1_tx28>;
328 ptp-timer = <&ptp-timer>;
329};
330
331============================================================================
332FMan IEEE 1588 Node
333
334DESCRIPTION
335
336The FMan interface to support IEEE 1588
337
338
339PROPERTIES
340
341- compatible
342 Usage: required
343 Value type: <stringlist>
344 Definition: A standard property.
345 Must include "fsl,fman-ptp-timer".
346
347- reg
348 Usage: required
349 Value type: <prop-encoded-array>
350 Definition: A standard property.
351
352EXAMPLE
353
354ptp-timer@fe000 {
355 compatible = "fsl,fman-ptp-timer";
356 reg = <0xfe000 0x1000>;
357};
358
359=============================================================================
360Example
361
362fman@400000 {
363 #address-cells = <1>;
364 #size-cells = <1>;
365 cell-index = <1>;
366 compatible = "fsl,fman"
367 ranges = <0 0x400000 0x100000>;
368 reg = <0x400000 0x100000>;
369 clocks = <&fman_clk>;
370 clock-names = "fmanclk";
371 interrupts = <
372 96 2 0 0
373 16 2 1 1>;
374 fsl,qman-channel-range = <0x40 0xc>;
375
376 muram@0 {
377 compatible = "fsl,fman-muram";
378 reg = <0x0 0x28000>;
379 };
380
381 port@81000 {
382 cell-index = <1>;
383 compatible = "fsl,fman-v2-port-oh";
384 reg = <0x81000 0x1000>;
385 };
386
387 port@82000 {
388 cell-index = <2>;
389 compatible = "fsl,fman-v2-port-oh";
390 reg = <0x82000 0x1000>;
391 };
392
393 port@83000 {
394 cell-index = <3>;
395 compatible = "fsl,fman-v2-port-oh";
396 reg = <0x83000 0x1000>;
397 };
398
399 port@84000 {
400 cell-index = <4>;
401 compatible = "fsl,fman-v2-port-oh";
402 reg = <0x84000 0x1000>;
403 };
404
405 port@85000 {
406 cell-index = <5>;
407 compatible = "fsl,fman-v2-port-oh";
408 reg = <0x85000 0x1000>;
409 };
410
411 port@86000 {
412 cell-index = <6>;
413 compatible = "fsl,fman-v2-port-oh";
414 reg = <0x86000 0x1000>;
415 };
416
417 fman1_rx_0x8: port@88000 {
418 cell-index = <0x8>;
419 compatible = "fsl,fman-v2-port-rx";
420 reg = <0x88000 0x1000>;
421 };
422
423 fman1_rx_0x9: port@89000 {
424 cell-index = <0x9>;
425 compatible = "fsl,fman-v2-port-rx";
426 reg = <0x89000 0x1000>;
427 };
428
429 fman1_rx_0xa: port@8a000 {
430 cell-index = <0xa>;
431 compatible = "fsl,fman-v2-port-rx";
432 reg = <0x8a000 0x1000>;
433 };
434
435 fman1_rx_0xb: port@8b000 {
436 cell-index = <0xb>;
437 compatible = "fsl,fman-v2-port-rx";
438 reg = <0x8b000 0x1000>;
439 };
440
441 fman1_rx_0xc: port@8c000 {
442 cell-index = <0xc>;
443 compatible = "fsl,fman-v2-port-rx";
444 reg = <0x8c000 0x1000>;
445 };
446
447 fman1_rx_0x10: port@90000 {
448 cell-index = <0x10>;
449 compatible = "fsl,fman-v2-port-rx";
450 reg = <0x90000 0x1000>;
451 };
452
453 fman1_tx_0x28: port@a8000 {
454 cell-index = <0x28>;
455 compatible = "fsl,fman-v2-port-tx";
456 reg = <0xa8000 0x1000>;
457 };
458
459 fman1_tx_0x29: port@a9000 {
460 cell-index = <0x29>;
461 compatible = "fsl,fman-v2-port-tx";
462 reg = <0xa9000 0x1000>;
463 };
464
465 fman1_tx_0x2a: port@aa000 {
466 cell-index = <0x2a>;
467 compatible = "fsl,fman-v2-port-tx";
468 reg = <0xaa000 0x1000>;
469 };
470
471 fman1_tx_0x2b: port@ab000 {
472 cell-index = <0x2b>;
473 compatible = "fsl,fman-v2-port-tx";
474 reg = <0xab000 0x1000>;
475 };
476
477 fman1_tx_0x2c: port@ac0000 {
478 cell-index = <0x2c>;
479 compatible = "fsl,fman-v2-port-tx";
480 reg = <0xac000 0x1000>;
481 };
482
483 fman1_tx_0x30: port@b0000 {
484 cell-index = <0x30>;
485 compatible = "fsl,fman-v2-port-tx";
486 reg = <0xb0000 0x1000>;
487 };
488
489 ethernet@e0000 {
490 compatible = "fsl,fman-dtsec";
491 cell-index = <0>;
492 reg = <0xe0000 0x1000>;
493 fsl,fman-ports = <&fman1_rx_0x8 &fman1_tx_0x28>;
494 };
495
496 ethernet@e2000 {
497 compatible = "fsl,fman-dtsec";
498 cell-index = <1>;
499 reg = <0xe2000 0x1000>;
500 fsl,fman-ports = <&fman1_rx_0x9 &fman1_tx_0x29>;
501 };
502
503 ethernet@e4000 {
504 compatible = "fsl,fman-dtsec";
505 cell-index = <2>;
506 reg = <0xe4000 0x1000>;
507 fsl,fman-ports = <&fman1_rx_0xa &fman1_tx_0x2a>;
508 };
509
510 ethernet@e6000 {
511 compatible = "fsl,fman-dtsec";
512 cell-index = <3>;
513 reg = <0xe6000 0x1000>;
514 fsl,fman-ports = <&fman1_rx_0xb &fman1_tx_0x2b>;
515 };
516
517 ethernet@e8000 {
518 compatible = "fsl,fman-dtsec";
519 cell-index = <4>;
520 reg = <0xf0000 0x1000>;
521 fsl,fman-ports = <&fman1_rx_0xc &fman1_tx_0x2c>;
522
523 ethernet@f0000 {
524 cell-index = <8>;
525 compatible = "fsl,fman-xgec";
526 reg = <0xf0000 0x1000>;
527 fsl,fman-ports = <&fman1_rx_0x10 &fman1_tx_0x30>;
528 };
529
530 ptp-timer@fe000 {
531 compatible = "fsl,fman-ptp-timer";
532 reg = <0xfe000 0x1000>;
533 };
534};
diff --git a/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
new file mode 100644
index 000000000000..cfda0d57d302
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
@@ -0,0 +1,29 @@
1Device-Tree bindings for Atmel's HLCDC (High-end LCD Controller) PWM driver
2
3The Atmel HLCDC PWM is subdevice of the HLCDC MFD device.
4See ../mfd/atmel-hlcdc.txt for more details.
5
6Required properties:
7 - compatible: value should be one of the following:
8 "atmel,hlcdc-pwm"
9 - pinctr-names: the pin control state names. Should contain "default".
10 - pinctrl-0: should contain the pinctrl states described by pinctrl
11 default.
12 - #pwm-cells: should be set to 3. This PWM chip use the default 3 cells
13 bindings defined in pwm.txt in this directory.
14
15Example:
16
17 hlcdc: hlcdc@f0030000 {
18 compatible = "atmel,sama5d3-hlcdc";
19 reg = <0xf0030000 0x2000>;
20 clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>;
21 clock-names = "periph_clk","sys_clk", "slow_clk";
22
23 hlcdc_pwm: hlcdc-pwm {
24 compatible = "atmel,hlcdc-pwm";
25 pinctrl-names = "default";
26 pinctrl-0 = <&pinctrl_lcd_pwm>;
27 #pwm-cells = <3>;
28 };
29 };
diff --git a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
new file mode 100644
index 000000000000..fb6fb31bc4c4
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
@@ -0,0 +1,30 @@
1BCM2835 PWM controller (Raspberry Pi controller)
2
3Required properties:
4- compatible: should be "brcm,bcm2835-pwm"
5- reg: physical base address and length of the controller's registers
6- clock: This clock defines the base clock frequency of the PWM hardware
7 system, the period and the duty_cycle of the PWM signal is a multiple of
8 the base period.
9- #pwm-cells: Should be 2. See pwm.txt in this directory for a description of
10 the cells format.
11
12Examples:
13
14pwm@2020c000 {
15 compatible = "brcm,bcm2835-pwm";
16 reg = <0x2020c000 0x28>;
17 clocks = <&clk_pwm>;
18 #pwm-cells = <2>;
19};
20
21clocks {
22 ....
23 clk_pwm: pwm {
24 compatible = "fixed-clock";
25 reg = <3>;
26 #clock-cells = <0>;
27 clock-frequency = <9200000>;
28 };
29 ....
30};
diff --git a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
index 865614b34d6f..dad6358074ac 100644
--- a/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/act8865-regulator.txt
@@ -5,6 +5,10 @@ Required properties:
5- compatible: "active-semi,act8846" or "active-semi,act8865" 5- compatible: "active-semi,act8846" or "active-semi,act8865"
6- reg: I2C slave address 6- reg: I2C slave address
7 7
8Optional properties:
9- system-power-controller: Telling whether or not this pmic is controlling
10 the system power. See Documentation/devicetree/bindings/power/power-controller.txt .
11
8Any standard regulator properties can be used to configure the single regulator. 12Any standard regulator properties can be used to configure the single regulator.
9 13
10The valid names for regulators are: 14The valid names for regulators are:
diff --git a/Documentation/devicetree/bindings/regulator/max77802.txt b/Documentation/devicetree/bindings/regulator/max77802.txt
index 5aeaffc0f1f0..79e5476444f7 100644
--- a/Documentation/devicetree/bindings/regulator/max77802.txt
+++ b/Documentation/devicetree/bindings/regulator/max77802.txt
@@ -25,6 +25,29 @@ with their hardware counterparts as follow. The valid names are:
25 example: LDO1, LDO2, LDO35. 25 example: LDO1, LDO2, LDO35.
26 -BUCKn : for BUCKs, where n can lie in range 1 to 10. 26 -BUCKn : for BUCKs, where n can lie in range 1 to 10.
27 example: BUCK1, BUCK5, BUCK10. 27 example: BUCK1, BUCK5, BUCK10.
28
29The max77802 regulator supports two different operating modes: Normal and Low
30Power Mode. Some regulators support the modes to be changed at startup or by
31the consumers during normal operation while others only support to change the
32mode during system suspend. The standard regulator suspend states binding can
33be used to configure the regulator operating mode.
34
35The regulators that support the standard "regulator-initial-mode" property,
36changing their mode during normal operation are: LDOs 1, 3, 20 and 21.
37
38The possible values for "regulator-initial-mode" and "regulator-mode" are:
39 1: Normal regulator voltage output mode.
40 3: Low Power which reduces the quiescent current down to only 1uA
41
42The list of valid modes are defined in the dt-bindings/clock/maxim,max77802.h
43header and can be included by device tree source files.
44
45The standard "regulator-mode" property can only be used for regulators that
46support changing their mode to Low Power Mode during suspend. These regulators
47are: BUCKs 2-4 and LDOs 1-35. Also, it only takes effect if the regulator has
48been enabled for the given suspend state using "regulator-on-in-suspend" and
49has not been disabled for that state using "regulator-off-in-suspend".
50
28Example: 51Example:
29 52
30 max77802@09 { 53 max77802@09 {
@@ -36,11 +59,23 @@ Example:
36 #size-cells = <0>; 59 #size-cells = <0>;
37 60
38 regulators { 61 regulators {
62 ldo1_reg: LDO1 {
63 regulator-name = "vdd_1v0";
64 regulator-min-microvolt = <1000000>;
65 regulator-max-microvolt = <1000000>;
66 regulator-always-on;
67 regulator-initial-mode = <MAX77802_OPMODE_LP>;
68 };
69
39 ldo11_reg: LDO11 { 70 ldo11_reg: LDO11 {
40 regulator-name = "vdd_ldo11"; 71 regulator-name = "vdd_ldo11";
41 regulator-min-microvolt = <1900000>; 72 regulator-min-microvolt = <1900000>;
42 regulator-max-microvolt = <1900000>; 73 regulator-max-microvolt = <1900000>;
43 regulator-always-on; 74 regulator-always-on;
75 regulator-state-mem {
76 regulator-on-in-suspend;
77 regulator-mode = <MAX77802_OPMODE_LP>;
78 };
44 }; 79 };
45 80
46 buck1_reg: BUCK1 { 81 buck1_reg: BUCK1 {
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt
index 86074334e342..abb26b58c83e 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/regulator.txt
@@ -19,6 +19,24 @@ Optional properties:
19 design requires. This property describes the total system ramp time 19 design requires. This property describes the total system ramp time
20 required due to the combination of internal ramping of the regulator itself, 20 required due to the combination of internal ramping of the regulator itself,
21 and board design issues such as trace capacitance and load on the supply. 21 and board design issues such as trace capacitance and load on the supply.
22- regulator-state-mem sub-root node for Suspend-to-RAM mode
23 : suspend to memory, the device goes to sleep, but all data stored in memory,
24 only some external interrupt can wake the device.
25- regulator-state-disk sub-root node for Suspend-to-DISK mode
26 : suspend to disk, this state operates similarly to Suspend-to-RAM,
27 but includes a final step of writing memory contents to disk.
28- regulator-state-[mem/disk] node has following common properties:
29 - regulator-on-in-suspend: regulator should be on in suspend state.
30 - regulator-off-in-suspend: regulator should be off in suspend state.
31 - regulator-suspend-microvolt: regulator should be set to this voltage
32 in suspend.
33 - regulator-mode: operating mode in the given suspend state.
34 The set of possible operating modes depends on the capabilities of
35 every hardware so the valid modes are documented on each regulator
36 device tree binding document.
37- regulator-initial-mode: initial operating mode. The set of possible operating
38 modes depends on the capabilities of every hardware so each device binding
39 documentation explains which values the regulator supports.
22 40
23Deprecated properties: 41Deprecated properties:
24- regulator-compatible: If a regulator chip contains multiple 42- regulator-compatible: If a regulator chip contains multiple
@@ -34,6 +52,10 @@ Example:
34 regulator-max-microvolt = <2500000>; 52 regulator-max-microvolt = <2500000>;
35 regulator-always-on; 53 regulator-always-on;
36 vin-supply = <&vin>; 54 vin-supply = <&vin>;
55
56 regulator-state-mem {
57 regulator-on-in-suspend;
58 };
37 }; 59 };
38 60
39Regulator Consumers: 61Regulator Consumers:
diff --git a/Documentation/devicetree/bindings/regulator/sky81452-regulator.txt b/Documentation/devicetree/bindings/regulator/sky81452-regulator.txt
index 882455e9b36d..f9acbc1f3c6b 100644
--- a/Documentation/devicetree/bindings/regulator/sky81452-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/sky81452-regulator.txt
@@ -1,6 +1,7 @@
1SKY81452 voltage regulator 1SKY81452 voltage regulator
2 2
3Required properties: 3Required properties:
4- regulator node named lout.
4- any required generic properties defined in regulator.txt 5- any required generic properties defined in regulator.txt
5 6
6Optional properties: 7Optional properties:
@@ -9,8 +10,9 @@ Optional properties:
9Example: 10Example:
10 11
11 regulator { 12 regulator {
12 /* generic regulator properties */ 13 lout {
13 regulator-name = "touch_en"; 14 regulator-name = "sky81452-lout";
14 regulator-min-microvolt = <4500000>; 15 regulator-min-microvolt = <4500000>;
15 regulator-max-microvolt = <8000000>; 16 regulator-max-microvolt = <8000000>;
17 };
16 }; 18 };
diff --git a/Documentation/devicetree/bindings/reset/st,sti-picophyreset.txt b/Documentation/devicetree/bindings/reset/st,sti-picophyreset.txt
new file mode 100644
index 000000000000..54ae9f747e45
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/st,sti-picophyreset.txt
@@ -0,0 +1,42 @@
1STMicroelectronics STi family Sysconfig Picophy SoftReset Controller
2=============================================================================
3
4This binding describes a reset controller device that is used to enable and
5disable on-chip PicoPHY USB2 phy(s) using "softreset" control bits found in
6the STi family SoC system configuration registers.
7
8The actual action taken when softreset is asserted is hardware dependent.
9However, when asserted it may not be possible to access the hardware's
10registers and after an assert/deassert sequence the hardware's previous state
11may no longer be valid.
12
13Please refer to Documentation/devicetree/bindings/reset/reset.txt
14for common reset controller binding usage.
15
16Required properties:
17- compatible: Should be "st,stih407-picophyreset"
18- #reset-cells: 1, see below
19
20Example:
21
22 picophyreset: picophyreset-controller {
23 compatible = "st,stih407-picophyreset";
24 #reset-cells = <1>;
25 };
26
27Specifying picophyreset control of devices
28=======================================
29
30Device nodes should specify the reset channel required in their "resets"
31property, containing a phandle to the picophyreset device node and an
32index specifying which channel to use, as described in
33Documentation/devicetree/bindings/reset/reset.txt.
34
35Example:
36
37 usb2_picophy0: usbpicophy@0 {
38 resets = <&picophyreset STIH407_PICOPHY0_RESET>;
39 };
40
41Macro definitions for the supported reset channels can be found in:
42include/dt-bindings/reset-controller/stih407-resets.h
diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
new file mode 100644
index 000000000000..6ae79d1843f3
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
@@ -0,0 +1,23 @@
1Atmel AT91SAM9260 Real Time Timer
2
3Required properties:
4- compatible: should be: "atmel,at91sam9260-rtt"
5- reg: should encode the memory region of the RTT controller
6- interrupts: rtt alarm/event interrupt
7- clocks: should contain the 32 KHz slow clk that will drive the RTT block.
8- atmel,rtt-rtc-time-reg: should encode the GPBR register used to store
9 the time base when the RTT is used as an RTC.
10 The first cell should point to the GPBR node and the second one
11 encode the offset within the GPBR block (or in other words, the
12 GPBR register used to store the time base).
13
14
15Example:
16
17rtt@fffffd20 {
18 compatible = "atmel,at91sam9260-rtt";
19 reg = <0xfffffd20 0x10>;
20 interrupts = <1 4 7>;
21 clocks = <&clk32k>;
22 atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
23};
diff --git a/Documentation/devicetree/bindings/rtc/rtc-omap.txt b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
index 5a0f02d34d95..4ba4dbd34289 100644
--- a/Documentation/devicetree/bindings/rtc/rtc-omap.txt
+++ b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
@@ -5,11 +5,17 @@ Required properties:
5 - "ti,da830-rtc" - for RTC IP used similar to that on DA8xx SoC family. 5 - "ti,da830-rtc" - for RTC IP used similar to that on DA8xx SoC family.
6 - "ti,am3352-rtc" - for RTC IP used similar to that on AM335x SoC family. 6 - "ti,am3352-rtc" - for RTC IP used similar to that on AM335x SoC family.
7 This RTC IP has special WAKE-EN Register to enable 7 This RTC IP has special WAKE-EN Register to enable
8 Wakeup generation for event Alarm. 8 Wakeup generation for event Alarm. It can also be
9 used to control an external PMIC via the
10 pmic_power_en pin.
9- reg: Address range of rtc register set 11- reg: Address range of rtc register set
10- interrupts: rtc timer, alarm interrupts in order 12- interrupts: rtc timer, alarm interrupts in order
11- interrupt-parent: phandle for the interrupt controller 13- interrupt-parent: phandle for the interrupt controller
12 14
15Optional properties:
16- system-power-controller: whether the rtc is controlling the system power
17 through pmic_power_en
18
13Example: 19Example:
14 20
15rtc@1c23000 { 21rtc@1c23000 {
@@ -18,4 +24,5 @@ rtc@1c23000 {
18 interrupts = <19 24 interrupts = <19
19 19>; 25 19>;
20 interrupt-parent = <&intc>; 26 interrupt-parent = <&intc>;
27 system-power-controller;
21}; 28};
diff --git a/Documentation/devicetree/bindings/rtc/rtc-opal.txt b/Documentation/devicetree/bindings/rtc/rtc-opal.txt
new file mode 100644
index 000000000000..af87e5ecac54
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-opal.txt
@@ -0,0 +1,16 @@
1IBM OPAL real-time clock
2------------------------
3
4Required properties:
5- comapatible: Should be "ibm,opal-rtc"
6
7Optional properties:
8- has-tpo: Decides if the wakeup is supported or not.
9
10Example:
11 rtc {
12 compatible = "ibm,opal-rtc";
13 has-tpo;
14 phandle = <0x10000029>;
15 linux,phandle = <0x10000029>;
16 };
diff --git a/Documentation/devicetree/bindings/serial/bcm63xx-uart.txt b/Documentation/devicetree/bindings/serial/bcm63xx-uart.txt
new file mode 100644
index 000000000000..5c52e5eef16d
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/bcm63xx-uart.txt
@@ -0,0 +1,30 @@
1* BCM63xx UART
2
3Required properties:
4
5- compatible: "brcm,bcm6345-uart"
6
7- reg: The base address of the UART register bank.
8
9- interrupts: A single interrupt specifier.
10
11- clocks: Clock driving the hardware; used to figure out the baud rate
12 divisor.
13
14Example:
15
16 uart0: serial@14e00520 {
17 compatible = "brcm,bcm6345-uart";
18 reg = <0x14e00520 0x18>;
19 interrupt-parent = <&periph_intc>;
20 interrupts = <2>;
21 clocks = <&periph_clk>;
22 };
23
24 clocks {
25 periph_clk: periph_clk@0 {
26 compatible = "fixed-clock";
27 #clock-cells = <0>;
28 clock-frequency = <54000000>;
29 };
30 };
diff --git a/Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt b/Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt
index 59a40f18d551..7c408c87e613 100644
--- a/Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt
+++ b/Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt
@@ -11,8 +11,13 @@ Required properties:
11- dma-names: "rx" for RX channel, "tx" for TX channel. 11- dma-names: "rx" for RX channel, "tx" for TX channel.
12 12
13Optional properties: 13Optional properties:
14- fsl,uart-has-rtscts : Indicate the UART has RTS and CTS lines, 14- fsl,uart-has-rtscts : Indicate the UART has RTS and CTS lines
15 for hardware flow control,
15 it also means you enable the DMA support for this UART. 16 it also means you enable the DMA support for this UART.
17- {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD
18 line respectively. It will use specified PIO instead of the peripheral
19 function pin for the USART feature.
20 If unsure, don't specify this property.
16 21
17Example: 22Example:
18auart0: serial@8006a000 { 23auart0: serial@8006a000 {
@@ -21,6 +26,9 @@ auart0: serial@8006a000 {
21 interrupts = <112>; 26 interrupts = <112>;
22 dmas = <&dma_apbx 8>, <&dma_apbx 9>; 27 dmas = <&dma_apbx 8>, <&dma_apbx 9>;
23 dma-names = "rx", "tx"; 28 dma-names = "rx", "tx";
29 cts-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
30 dsr-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
31 dcd-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
24}; 32};
25 33
26Note: Each auart port should have an alias correctly numbered in "aliases" 34Note: Each auart port should have an alias correctly numbered in "aliases"
diff --git a/Documentation/devicetree/bindings/serial/of-serial.txt b/Documentation/devicetree/bindings/serial/of-serial.txt
index 8c4fd0332028..b52b98234b9b 100644
--- a/Documentation/devicetree/bindings/serial/of-serial.txt
+++ b/Documentation/devicetree/bindings/serial/of-serial.txt
@@ -10,6 +10,7 @@ Required properties:
10 - "ns16850" 10 - "ns16850"
11 - "nvidia,tegra20-uart" 11 - "nvidia,tegra20-uart"
12 - "nxp,lpc3220-uart" 12 - "nxp,lpc3220-uart"
13 - "ralink,rt2880-uart"
13 - "ibm,qpace-nwp-serial" 14 - "ibm,qpace-nwp-serial"
14 - "altr,16550-FIFO32" 15 - "altr,16550-FIFO32"
15 - "altr,16550-FIFO64" 16 - "altr,16550-FIFO64"
diff --git a/Documentation/devicetree/bindings/serial/pl011.txt b/Documentation/devicetree/bindings/serial/pl011.txt
index 5d2e840ae65c..ba3ecb8cb5a1 100644
--- a/Documentation/devicetree/bindings/serial/pl011.txt
+++ b/Documentation/devicetree/bindings/serial/pl011.txt
@@ -6,12 +6,46 @@ Required properties:
6- interrupts: exactly one interrupt specifier 6- interrupts: exactly one interrupt specifier
7 7
8Optional properties: 8Optional properties:
9- pinctrl: When present, must have one state named "sleep" 9- pinctrl:
10 and one state named "default" 10 When present, must have one state named "default",
11- clocks: When present, must refer to exactly one clock named 11 and may contain a second name named "sleep". The former
12 state sets up pins for ordinary operation whereas
13 the latter state will put the associated pins to sleep
14 when the UART is unused
15- clocks:
16 When present, the first clock listed must correspond to
17 the clock named UARTCLK on the IP block, i.e. the clock
18 to the external serial line, whereas the second clock
19 must correspond to the PCLK clocking the internal logic
20 of the block. Just listing one clock (the first one) is
21 deprecated.
22- clocks-names:
23 When present, the first clock listed must be named
24 "uartclk" and the second clock listed must be named
12 "apb_pclk" 25 "apb_pclk"
13- dmas: When present, may have one or two dma channels. 26- dmas:
27 When present, may have one or two dma channels.
14 The first one must be named "rx", the second one 28 The first one must be named "rx", the second one
15 must be named "tx". 29 must be named "tx".
30- auto-poll:
31 Enables polling when using RX DMA.
32- poll-rate-ms:
33 Rate at which poll occurs when auto-poll is set,
34 default 100ms.
35- poll-timeout-ms:
36 Poll timeout when auto-poll is set, default
37 3000ms.
16 38
17See also bindings/arm/primecell.txt 39See also bindings/arm/primecell.txt
40
41Example:
42
43uart@80120000 {
44 compatible = "arm,pl011", "arm,primecell";
45 reg = <0x80120000 0x1000>;
46 interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>;
47 dmas = <&dma 13 0 0x2>, <&dma 13 0 0x0>;
48 dma-names = "rx", "tx";
49 clocks = <&foo_clk>, <&bar_clk>;
50 clock-names = "uartclk", "apb_pclk";
51};
diff --git a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
index ffa5b784c66e..a2114c217376 100644
--- a/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
+++ b/Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
@@ -27,27 +27,52 @@ Optional properties:
27- dmas: Should contain dma specifiers for transmit and receive channels 27- dmas: Should contain dma specifiers for transmit and receive channels
28- dma-names: Should contain "tx" for transmit and "rx" for receive channels 28- dma-names: Should contain "tx" for transmit and "rx" for receive channels
29 29
30Note: Aliases may be defined to ensure the correct ordering of the UARTs.
31The alias serialN will result in the UART being assigned port N. If any
32serialN alias exists, then an alias must exist for each enabled UART. The
33serialN aliases should be in a .dts file instead of in a .dtsi file.
34
30Examples: 35Examples:
31 36
32A uartdm v1.4 device with dma capabilities. 37- A uartdm v1.4 device with dma capabilities.
33 38
34serial@f991e000 { 39 serial@f991e000 {
35 compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; 40 compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
36 reg = <0xf991e000 0x1000>; 41 reg = <0xf991e000 0x1000>;
37 interrupts = <0 108 0x0>; 42 interrupts = <0 108 0x0>;
38 clocks = <&blsp1_uart2_apps_cxc>, <&blsp1_ahb_cxc>; 43 clocks = <&blsp1_uart2_apps_cxc>, <&blsp1_ahb_cxc>;
39 clock-names = "core", "iface"; 44 clock-names = "core", "iface";
40 dmas = <&dma0 0>, <&dma0 1>; 45 dmas = <&dma0 0>, <&dma0 1>;
41 dma-names = "tx", "rx"; 46 dma-names = "tx", "rx";
42}; 47 };
43 48
44A uartdm v1.3 device without dma capabilities and part of a GSBI complex. 49- A uartdm v1.3 device without dma capabilities and part of a GSBI complex.
45 50
46serial@19c40000 { 51 serial@19c40000 {
47 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 52 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
48 reg = <0x19c40000 0x1000>, 53 reg = <0x19c40000 0x1000>,
49 <0x19c00000 0x1000>; 54 <0x19c00000 0x1000>;
50 interrupts = <0 195 0x0>; 55 interrupts = <0 195 0x0>;
51 clocks = <&gsbi5_uart_cxc>, <&gsbi5_ahb_cxc>; 56 clocks = <&gsbi5_uart_cxc>, <&gsbi5_ahb_cxc>;
52 clock-names = "core", "iface"; 57 clock-names = "core", "iface";
53}; 58 };
59
60- serialN alias.
61
62 aliases {
63 serial0 = &uarta;
64 serial1 = &uartc;
65 serial2 = &uartb;
66 };
67
68 uarta: serial@12490000 {
69 status = "ok";
70 };
71
72 uartb: serial@16340000 {
73 status = "ok";
74 };
75
76 uartc: serial@1a240000 {
77 status = "ok";
78 };
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index b3556609a06f..ae73bb0e9ad9 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -4,8 +4,7 @@ Required properties:
4 4
5 - compatible: Must contain one of the following: 5 - compatible: Must contain one of the following:
6 6
7 - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART. 7 - "renesas,scif-r7s72100" for R7S72100 (RZ/A1H) SCIF compatible UART.
8 - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
9 - "renesas,scifa-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFA compatible UART. 8 - "renesas,scifa-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFA compatible UART.
10 - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART. 9 - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART.
11 - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART. 10 - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART.
@@ -20,6 +19,12 @@ Required properties:
20 - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART. 19 - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
21 - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART. 20 - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART.
22 - "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART. 21 - "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART.
22 - "renesas,scif-r8a7794" for R8A7794 (R-Car E2) SCIF compatible UART.
23 - "renesas,scifa-r8a7794" for R8A7794 (R-Car E2) SCIFA compatible UART.
24 - "renesas,scifb-r8a7794" for R8A7794 (R-Car E2) SCIFB compatible UART.
25 - "renesas,hscif-r8a7794" for R8A7794 (R-Car E2) HSCIF compatible UART.
26 - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
27 - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
23 - "renesas,scif" for generic SCIF compatible UART. 28 - "renesas,scif" for generic SCIF compatible UART.
24 - "renesas,scifa" for generic SCIFA compatible UART. 29 - "renesas,scifa" for generic SCIFA compatible UART.
25 - "renesas,scifb" for generic SCIFB compatible UART. 30 - "renesas,scifb" for generic SCIFB compatible UART.
diff --git a/Documentation/devicetree/bindings/serial/sirf-uart.txt b/Documentation/devicetree/bindings/serial/sirf-uart.txt
index a2dfc6522a91..3acdd969edf1 100644
--- a/Documentation/devicetree/bindings/serial/sirf-uart.txt
+++ b/Documentation/devicetree/bindings/serial/sirf-uart.txt
@@ -1,7 +1,9 @@
1* CSR SiRFprimaII/atlasVI Universal Synchronous Asynchronous Receiver/Transmitter * 1* CSR SiRFprimaII/atlasVI Universal Synchronous Asynchronous Receiver/Transmitter *
2 2
3Required properties: 3Required properties:
4- compatible : Should be "sirf,prima2-uart" or "sirf, prima2-usp-uart" 4- compatible : Should be "sirf,prima2-uart", "sirf, prima2-usp-uart",
5 "sirf,marco-uart" or "sirf,marco-bt-uart" which means
6 uart located in BT module and used for BT.
5- reg : Offset and length of the register set for the device 7- reg : Offset and length of the register set for the device
6- interrupts : Should contain uart interrupt 8- interrupts : Should contain uart interrupt
7- fifosize : Should define hardware rx/tx fifo size 9- fifosize : Should define hardware rx/tx fifo size
@@ -31,3 +33,15 @@ usp@b0090000 {
31 rts-gpios = <&gpio 15 0>; 33 rts-gpios = <&gpio 15 0>;
32 cts-gpios = <&gpio 46 0>; 34 cts-gpios = <&gpio 46 0>;
33}; 35};
36
37for uart use in BT module,
38uart6: uart@11000000 {
39 cell-index = <6>;
40 compatible = "sirf,marco-bt-uart", "sirf,marco-uart";
41 reg = <0x11000000 0x1000>;
42 interrupts = <0 100 0>;
43 clocks = <&clks 138>, <&clks 140>, <&clks 141>;
44 clock-names = "uart", "general", "noc";
45 fifosize = <128>;
46 status = "disabled";
47}
diff --git a/Documentation/devicetree/bindings/soc/fsl/bman-portals.txt b/Documentation/devicetree/bindings/soc/fsl/bman-portals.txt
new file mode 100644
index 000000000000..2a00e14e11e0
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/fsl/bman-portals.txt
@@ -0,0 +1,56 @@
1QorIQ DPAA Buffer Manager Portals Device Tree Binding
2
3Copyright (C) 2008 - 2014 Freescale Semiconductor Inc.
4
5CONTENTS
6
7 - BMan Portal
8 - Example
9
10BMan Portal Node
11
12Portals are memory mapped interfaces to BMan that allow low-latency, lock-less
13interaction by software running on processor cores, accelerators and network
14interfaces with the BMan
15
16PROPERTIES
17
18- compatible
19 Usage: Required
20 Value type: <stringlist>
21 Definition: Must include "fsl,bman-portal-<hardware revision>"
22 May include "fsl,<SoC>-bman-portal" or "fsl,bman-portal"
23
24- reg
25 Usage: Required
26 Value type: <prop-encoded-array>
27 Definition: Two regions. The first is the cache-enabled region of
28 the portal. The second is the cache-inhibited region of
29 the portal
30
31- interrupts
32 Usage: Required
33 Value type: <prop-encoded-array>
34 Definition: Standard property
35
36EXAMPLE
37
38The example below shows a (P4080) BMan portals container/bus node with two portals
39
40 bman-portals@ff4000000 {
41 #address-cells = <1>;
42 #size-cells = <1>;
43 compatible = "simple-bus";
44 ranges = <0 0xf 0xf4000000 0x200000>;
45
46 bman-portal@0 {
47 compatible = "fsl,bman-portal-1.0.0", "fsl,bman-portal";
48 reg = <0x0 0x4000>, <0x100000 0x1000>;
49 interrupts = <105 2 0 0>;
50 };
51 bman-portal@4000 {
52 compatible = "fsl,bman-portal-1.0.0", "fsl,bman-portal";
53 reg = <0x4000 0x4000>, <0x101000 0x1000>;
54 interrupts = <107 2 0 0>;
55 };
56 };
diff --git a/Documentation/devicetree/bindings/soc/fsl/bman.txt b/Documentation/devicetree/bindings/soc/fsl/bman.txt
new file mode 100644
index 000000000000..9f80bf8709ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/fsl/bman.txt
@@ -0,0 +1,125 @@
1QorIQ DPAA Buffer Manager Device Tree Bindings
2
3Copyright (C) 2008 - 2014 Freescale Semiconductor Inc.
4
5CONTENTS
6
7 - BMan Node
8 - BMan Private Memory Node
9 - Example
10
11BMan Node
12
13The Buffer Manager is part of the Data-Path Acceleration Architecture (DPAA).
14BMan supports hardware allocation and deallocation of buffers belonging to pools
15originally created by software with configurable depletion thresholds. This
16binding covers the CCSR space programming model
17
18PROPERTIES
19
20- compatible
21 Usage: Required
22 Value type: <stringlist>
23 Definition: Must include "fsl,bman"
24 May include "fsl,<SoC>-bman"
25
26- reg
27 Usage: Required
28 Value type: <prop-encoded-array>
29 Definition: Registers region within the CCSR address space
30
31The BMan revision information is located in the BMAN_IP_REV_1/2 registers which
32are located at offsets 0xbf8 and 0xbfc
33
34- interrupts
35 Usage: Required
36 Value type: <prop-encoded-array>
37 Definition: Standard property. The error interrupt
38
39- fsl,liodn
40 Usage: See pamu.txt
41 Value type: <prop-encoded-array>
42 Definition: PAMU property used for static LIODN assignment
43
44- fsl,iommu-parent
45 Usage: See pamu.txt
46 Value type: <phandle>
47 Definition: PAMU property used for dynamic LIODN assignment
48
49 For additional details about the PAMU/LIODN binding(s) see pamu.txt
50
51Devices connected to a BMan instance via Direct Connect Portals (DCP) must link
52to the respective BMan instance
53
54- fsl,bman
55 Usage: Required
56 Value type: <prop-encoded-array>
57 Description: List of phandle and DCP index pairs, to the BMan instance
58 to which this device is connected via the DCP
59
60BMan Private Memory Node
61
62BMan requires a contiguous range of physical memory used for the backing store
63for BMan Free Buffer Proxy Records (FBPR). This memory is reserved/allocated as a
64node under the /reserved-memory node
65
66The BMan FBPR memory node must be named "bman-fbpr"
67
68PROPERTIES
69
70- compatible
71 Usage: required
72 Value type: <stringlist>
73 Definition: Must inclide "fsl,bman-fbpr"
74
75The following constraints are relevant to the FBPR private memory:
76 - The size must be 2^(size + 1), with size = 11..33. That is 4 KiB to
77 16 GiB
78 - The alignment must be a muliptle of the memory size
79
80The size of the FBPR must be chosen by observing the hardware features configured
81via the Reset Configuration Word (RCW) and that are relevant to a specific board
82(e.g. number of MAC(s) pinned-out, number of offline/host command FMan ports,
83etc.). The size configured in the DT must reflect the hardware capabilities and
84not the specific needs of an application
85
86For additional details about reserved memory regions see reserved-memory.txt
87
88EXAMPLE
89
90The example below shows a BMan FBPR dynamic allocation memory node
91
92 reserved-memory {
93 #address-cells = <2>;
94 #size-cells = <2>;
95 ranges;
96
97 bman_fbpr: bman-fbpr {
98 compatible = "fsl,bman-fbpr";
99 alloc-ranges = <0 0 0xf 0xffffffff>;
100 size = <0 0x1000000>;
101 alignment = <0 0x1000000>;
102 };
103 };
104
105The example below shows a (P4080) BMan CCSR-space node
106
107 crypto@300000 {
108 ...
109 fsl,bman = <&bman, 2>;
110 ...
111 };
112
113 bman: bman@31a000 {
114 compatible = "fsl,bman";
115 reg = <0x31a000 0x1000>;
116 interrupts = <16 2 1 2>;
117 fsl,liodn = <0x17>;
118 memory-region = <&bman_fbpr>;
119 };
120
121 fman@400000 {
122 ...
123 fsl,bman = <&bman, 0>;
124 ...
125 };
diff --git a/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
new file mode 100644
index 000000000000..48c4dae5d6f9
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
@@ -0,0 +1,154 @@
1QorIQ DPAA Queue Manager Portals Device Tree Binding
2
3Copyright (C) 2008 - 2014 Freescale Semiconductor Inc.
4
5CONTENTS
6
7 - QMan Portal
8 - QMan Pool Channel
9 - Example
10
11QMan Portal Node
12
13Portals are memory mapped interfaces to QMan that allow low-latency, lock-less
14interaction by software running on processor cores, accelerators and network
15interfaces with the QMan
16
17PROPERTIES
18
19- compatible
20 Usage: Required
21 Value type: <stringlist>
22 Definition: Must include "fsl,qman-portal-<hardware revision>"
23 May include "fsl,<SoC>-qman-portal" or "fsl,qman-portal"
24
25- reg
26 Usage: Required
27 Value type: <prop-encoded-array>
28 Definition: Two regions. The first is the cache-enabled region of
29 the portal. The second is the cache-inhibited region of
30 the portal
31
32- interrupts
33 Usage: Required
34 Value type: <prop-encoded-array>
35 Definition: Standard property
36
37- fsl,liodn
38 Usage: See pamu.txt
39 Value type: <prop-encoded-array>
40 Definition: Two LIODN(s). DQRR LIODN (DLIODN) and Frame LIODN
41 (FLIODN)
42
43- fsl,iommu-parent
44 Usage: See pamu.txt
45 Value type: <phandle>
46 Definition: PAMU property used for dynamic LIODN assignment
47
48 For additional details about the PAMU/LIODN binding(s) see pamu.txt
49
50- fsl,qman-channel-id
51 Usage: Required
52 Value type: <u32>
53 Definition: The hardware index of the channel. This can also be
54 determined by dividing any of the channel's 8 work queue
55 IDs by 8
56
57In addition to these properties the qman-portals should have sub-nodes to
58represent the HW devices/portals that are connected to the software portal
59described here
60
61The currently supported sub-nodes are:
62 * fman0
63 * fman1
64 * pme
65 * crypto
66
67These subnodes should have the following properties:
68
69- fsl,liodn
70 Usage: See pamu.txt
71 Value type: <prop-encoded-array>
72 Definition: PAMU property used for static LIODN assignment
73
74- fsl,iommu-parent
75 Usage: See pamu.txt
76 Value type: <phandle>
77 Definition: PAMU property used for dynamic LIODN assignment
78
79- dev-handle
80 Usage: Required
81 Value type: <phandle>
82 Definition: The phandle to the particular hardware device that this
83 portal is connected to.
84
85DPAA QMan Pool Channel Nodes
86
87Pool Channels are defined with the following properties.
88
89PROPERTIES
90
91- compatible
92 Usage: Required
93 Value type: <stringlist>
94 Definition: Must include "fsl,qman-pool-channel"
95 May include "fsl,<SoC>-qman-pool-channel"
96
97- fsl,qman-channel-id
98 Usage: Required
99 Value type: <u32>
100 Definition: The hardware index of the channel. This can also be
101 determined by dividing any of the channel's 8 work queue
102 IDs by 8
103
104EXAMPLE
105
106The example below shows a (P4080) QMan portals container/bus node with two portals
107
108 qman-portals@ff4200000 {
109 #address-cells = <1>;
110 #size-cells = <1>;
111 compatible = "simple-bus";
112 ranges = <0 0xf 0xf4200000 0x200000>;
113
114 qman-portal@0 {
115 compatible = "fsl,qman-portal-1.2.0", "fsl,qman-portal";
116 reg = <0 0x4000>, <0x100000 0x1000>;
117 interrupts = <104 2 0 0>;
118 fsl,liodn = <1 2>;
119 fsl,qman-channel-id = <0>;
120
121 fman0 {
122 fsl,liodn = <0x21>;
123 dev-handle = <&fman0>;
124 };
125 fman1 {
126 fsl,liodn = <0xa1>;
127 dev-handle = <&fman1>;
128 };
129 crypto {
130 fsl,liodn = <0x41 0x66>;
131 dev-handle = <&crypto>;
132 };
133 };
134 qman-portal@4000 {
135 compatible = "fsl,qman-portal-1.2.0", "fsl,qman-portal";
136 reg = <0x4000 0x4000>, <0x101000 0x1000>;
137 interrupts = <106 2 0 0>;
138 fsl,liodn = <3 4>;
139 fsl,qman-channel-id = <1>;
140
141 fman0 {
142 fsl,liodn = <0x22>;
143 dev-handle = <&fman0>;
144 };
145 fman1 {
146 fsl,liodn = <0xa2>;
147 dev-handle = <&fman1>;
148 };
149 crypto {
150 fsl,liodn = <0x42 0x67>;
151 dev-handle = <&crypto>;
152 };
153 };
154 };
diff --git a/Documentation/devicetree/bindings/soc/fsl/qman.txt b/Documentation/devicetree/bindings/soc/fsl/qman.txt
new file mode 100644
index 000000000000..063e3a0b9d04
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/fsl/qman.txt
@@ -0,0 +1,165 @@
1QorIQ DPAA Queue Manager Device Tree Binding
2
3Copyright (C) 2008 - 2014 Freescale Semiconductor Inc.
4
5CONTENTS
6
7 - QMan Node
8 - QMan Private Memory Nodes
9 - Example
10
11QMan Node
12
13The Queue Manager is part of the Data-Path Acceleration Architecture (DPAA). QMan
14supports queuing and QoS scheduling of frames to CPUs, network interfaces and
15DPAA logic modules, maintains packet ordering within flows. Besides providing
16flow-level queuing, is also responsible for congestion management functions such
17as RED/WRED, congestion notifications and tail discards. This binding covers the
18CCSR space programming model
19
20PROPERTIES
21
22- compatible
23 Usage: Required
24 Value type: <stringlist>
25 Definition: Must include "fsl,qman"
26 May include "fsl,<SoC>-qman"
27
28- reg
29 Usage: Required
30 Value type: <prop-encoded-array>
31 Definition: Registers region within the CCSR address space
32
33The QMan revision information is located in the QMAN_IP_REV_1/2 registers which
34are located at offsets 0xbf8 and 0xbfc
35
36- interrupts
37 Usage: Required
38 Value type: <prop-encoded-array>
39 Definition: Standard property. The error interrupt
40
41- fsl,liodn
42 Usage: See pamu.txt
43 Value type: <prop-encoded-array>
44 Definition: PAMU property used for static LIODN assignment
45
46- fsl,iommu-parent
47 Usage: See pamu.txt
48 Value type: <phandle>
49 Definition: PAMU property used for dynamic LIODN assignment
50
51 For additional details about the PAMU/LIODN binding(s) see pamu.txt
52
53- clocks
54 Usage: See clock-bindings.txt and qoriq-clock.txt
55 Value type: <prop-encoded-array>
56 Definition: Reference input clock. Its frequency is half of the
57 platform clock
58
59Devices connected to a QMan instance via Direct Connect Portals (DCP) must link
60to the respective QMan instance
61
62- fsl,qman
63 Usage: Required
64 Value type: <prop-encoded-array>
65 Description: List of phandle and DCP index pairs, to the QMan instance
66 to which this device is connected via the DCP
67
68QMan Private Memory Nodes
69
70QMan requires two contiguous range of physical memory used for the backing store
71for QMan Frame Queue Descriptor (FQD) and Packed Frame Descriptor Record (PFDR).
72This memory is reserved/allocated as a nodes under the /reserved-memory node
73
74The QMan FQD memory node must be named "qman-fqd"
75
76PROPERTIES
77
78- compatible
79 Usage: required
80 Value type: <stringlist>
81 Definition: Must inclide "fsl,qman-fqd"
82
83The QMan PFDR memory node must be named "qman-pfdr"
84
85PROPERTIES
86
87- compatible
88 Usage: required
89 Value type: <stringlist>
90 Definition: Must inclide "fsl,qman-pfdr"
91
92The following constraints are relevant to the FQD and PFDR private memory:
93 - The size must be 2^(size + 1), with size = 11..29. That is 4 KiB to
94 1 GiB
95 - The alignment must be a muliptle of the memory size
96
97The size of the FQD and PFDP must be chosen by observing the hardware features
98configured via the Reset Configuration Word (RCW) and that are relevant to a
99specific board (e.g. number of MAC(s) pinned-out, number of offline/host command
100FMan ports, etc.). The size configured in the DT must reflect the hardware
101capabilities and not the specific needs of an application
102
103For additional details about reserved memory regions see reserved-memory.txt
104
105EXAMPLE
106
107The example below shows a QMan FQD and a PFDR dynamic allocation memory nodes
108
109 reserved-memory {
110 #address-cells = <2>;
111 #size-cells = <2>;
112 ranges;
113
114 qman_fqd: qman-fqd {
115 compatible = "fsl,qman-fqd";
116 alloc-ranges = <0 0 0xf 0xffffffff>;
117 size = <0 0x400000>;
118 alignment = <0 0x400000>;
119 };
120 qman_pfdr: qman-pfdr {
121 compatible = "fsl,qman-pfdr";
122 alloc-ranges = <0 0 0xf 0xffffffff>;
123 size = <0 0x2000000>;
124 alignment = <0 0x2000000>;
125 };
126 };
127
128The example below shows a (P4080) QMan CCSR-space node
129
130 clockgen: global-utilities@e1000 {
131 ...
132 sysclk: sysclk {
133 ...
134 };
135 ...
136 platform_pll: platform-pll@c00 {
137 #clock-cells = <1>;
138 reg = <0xc00 0x4>;
139 compatible = "fsl,qoriq-platform-pll-1.0";
140 clocks = <&sysclk>;
141 clock-output-names = "platform-pll", "platform-pll-div2";
142 };
143 ...
144 };
145
146 crypto@300000 {
147 ...
148 fsl,qman = <&qman, 2>;
149 ...
150 };
151
152 qman: qman@318000 {
153 compatible = "fsl,qman";
154 reg = <0x318000 0x1000>;
155 interrupts = <16 2 1 3>
156 fsl,liodn = <0x16>;
157 memory-region = <&qman_fqd &qman_pfdr>;
158 clocks = <&platform_pll 1>;
159 };
160
161 fman@400000 {
162 ...
163 fsl,qman = <&qman, 0>;
164 ...
165 };
diff --git a/Documentation/devicetree/bindings/sound/arndale.txt b/Documentation/devicetree/bindings/sound/arndale.txt
new file mode 100644
index 000000000000..0e76946385ae
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/arndale.txt
@@ -0,0 +1,24 @@
1Audio Binding for Arndale boards
2
3Required properties:
4- compatible : Can be the following,
5 "samsung,arndale-rt5631"
6
7- samsung,audio-cpu: The phandle of the Samsung I2S controller
8- samsung,audio-codec: The phandle of the audio codec
9
10Optional:
11- samsung,model: The name of the sound-card
12
13Arndale Boards has many audio daughter cards, one of them is
14rt5631/alc5631. Below example shows audio bindings for rt5631/
15alc5631 based codec.
16
17Example:
18
19sound {
20 compatible = "samsung,arndale-rt5631";
21
22 samsung,audio-cpu = <&i2s0>
23 samsung,audio-codec = <&rt5631>;
24};
diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
index 60ca07996458..46bc9829c71a 100644
--- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
+++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
@@ -32,7 +32,7 @@ Optional properties:
32- rx-num-evt : FIFO levels. 32- rx-num-evt : FIFO levels.
33- sram-size-playback : size of sram to be allocated during playback 33- sram-size-playback : size of sram to be allocated during playback
34- sram-size-capture : size of sram to be allocated during capture 34- sram-size-capture : size of sram to be allocated during capture
35- interrupts : Interrupt numbers for McASP, currently not used by the driver 35- interrupts : Interrupt numbers for McASP
36- interrupt-names : Known interrupt names are "tx" and "rx" 36- interrupt-names : Known interrupt names are "tx" and "rx"
37- pinctrl-0: Should specify pin control group used for this controller. 37- pinctrl-0: Should specify pin control group used for this controller.
38- pinctrl-names: Should contain only one value - "default", for more details 38- pinctrl-names: Should contain only one value - "default", for more details
diff --git a/Documentation/devicetree/bindings/sound/eukrea-tlv320.txt b/Documentation/devicetree/bindings/sound/eukrea-tlv320.txt
index 0d7985c864af..6dfa88c4dc1e 100644
--- a/Documentation/devicetree/bindings/sound/eukrea-tlv320.txt
+++ b/Documentation/devicetree/bindings/sound/eukrea-tlv320.txt
@@ -1,11 +1,16 @@
1Audio complex for Eukrea boards with tlv320aic23 codec. 1Audio complex for Eukrea boards with tlv320aic23 codec.
2 2
3Required properties: 3Required properties:
4- compatible : "eukrea,asoc-tlv320" 4
5- eukrea,model : The user-visible name of this sound complex. 5 - compatible : "eukrea,asoc-tlv320"
6- ssi-controller : The phandle of the SSI controller. 6
7- fsl,mux-int-port : The internal port of the i.MX audio muxer (AUDMUX). 7 - eukrea,model : The user-visible name of this sound complex.
8- fsl,mux-ext-port : The external port of the i.MX audio muxer. 8
9 - ssi-controller : The phandle of the SSI controller.
10
11 - fsl,mux-int-port : The internal port of the i.MX audio muxer (AUDMUX).
12
13 - fsl,mux-ext-port : The external port of the i.MX audio muxer.
9 14
10Note: The AUDMUX port numbering should start at 1, which is consistent with 15Note: The AUDMUX port numbering should start at 1, which is consistent with
11hardware manual. 16hardware manual.
diff --git a/Documentation/devicetree/bindings/sound/fsl,esai.txt b/Documentation/devicetree/bindings/sound/fsl,esai.txt
index 52f5b6bf3e8e..d3b6b5f48010 100644
--- a/Documentation/devicetree/bindings/sound/fsl,esai.txt
+++ b/Documentation/devicetree/bindings/sound/fsl,esai.txt
@@ -7,37 +7,39 @@ other DSPs. It has up to six transmitters and four receivers.
7 7
8Required properties: 8Required properties:
9 9
10 - compatible : Compatible list, must contain "fsl,imx35-esai" or 10 - compatible : Compatible list, must contain "fsl,imx35-esai" or
11 "fsl,vf610-esai" 11 "fsl,vf610-esai"
12 12
13 - reg : Offset and length of the register set for the device. 13 - reg : Offset and length of the register set for the device.
14 14
15 - interrupts : Contains the spdif interrupt. 15 - interrupts : Contains the spdif interrupt.
16 16
17 - dmas : Generic dma devicetree binding as described in 17 - dmas : Generic dma devicetree binding as described in
18 Documentation/devicetree/bindings/dma/dma.txt. 18 Documentation/devicetree/bindings/dma/dma.txt.
19 19
20 - dma-names : Two dmas have to be defined, "tx" and "rx". 20 - dma-names : Two dmas have to be defined, "tx" and "rx".
21 21
22 - clocks: Contains an entry for each entry in clock-names. 22 - clocks : Contains an entry for each entry in clock-names.
23 23
24 - clock-names : Includes the following entries: 24 - clock-names : Includes the following entries:
25 "core" The core clock used to access registers 25 "core" The core clock used to access registers
26 "extal" The esai baud clock for esai controller used to derive 26 "extal" The esai baud clock for esai controller used to
27 HCK, SCK and FS. 27 derive HCK, SCK and FS.
28 "fsys" The system clock derived from ahb clock used to derive 28 "fsys" The system clock derived from ahb clock used to
29 HCK, SCK and FS. 29 derive HCK, SCK and FS.
30 30
31 - fsl,fifo-depth: The number of elements in the transmit and receive FIFOs. 31 - fsl,fifo-depth : The number of elements in the transmit and receive
32 This number is the maximum allowed value for TFCR[TFWM] or RFCR[RFWM]. 32 FIFOs. This number is the maximum allowed value for
33 TFCR[TFWM] or RFCR[RFWM].
33 34
34 - fsl,esai-synchronous: This is a boolean property. If present, indicating 35 - fsl,esai-synchronous: This is a boolean property. If present, indicating
35 that ESAI would work in the synchronous mode, which means all the settings 36 that ESAI would work in the synchronous mode, which
36 for Receiving would be duplicated from Transmition related registers. 37 means all the settings for Receiving would be
38 duplicated from Transmition related registers.
37 39
38 - big-endian : If this property is absent, the native endian mode will 40 - big-endian : If this property is absent, the native endian mode
39 be in use as default, or the big endian mode will be in use for all the 41 will be in use as default, or the big endian mode
40 device registers. 42 will be in use for all the device registers.
41 43
42Example: 44Example:
43 45
diff --git a/Documentation/devicetree/bindings/sound/fsl,spdif.txt b/Documentation/devicetree/bindings/sound/fsl,spdif.txt
index 3e9e82c8eab3..b5ee32ee3706 100644
--- a/Documentation/devicetree/bindings/sound/fsl,spdif.txt
+++ b/Documentation/devicetree/bindings/sound/fsl,spdif.txt
@@ -6,32 +6,31 @@ a fibre cable.
6 6
7Required properties: 7Required properties:
8 8
9 - compatible : Compatible list, must contain "fsl,imx35-spdif". 9 - compatible : Compatible list, must contain "fsl,imx35-spdif".
10 10
11 - reg : Offset and length of the register set for the device. 11 - reg : Offset and length of the register set for the device.
12 12
13 - interrupts : Contains the spdif interrupt. 13 - interrupts : Contains the spdif interrupt.
14 14
15 - dmas : Generic dma devicetree binding as described in 15 - dmas : Generic dma devicetree binding as described in
16 Documentation/devicetree/bindings/dma/dma.txt. 16 Documentation/devicetree/bindings/dma/dma.txt.
17 17
18 - dma-names : Two dmas have to be defined, "tx" and "rx". 18 - dma-names : Two dmas have to be defined, "tx" and "rx".
19 19
20 - clocks : Contains an entry for each entry in clock-names. 20 - clocks : Contains an entry for each entry in clock-names.
21 21
22 - clock-names : Includes the following entries: 22 - clock-names : Includes the following entries:
23 "core" The core clock of spdif controller 23 "core" The core clock of spdif controller.
24 "rxtx<0-7>" Clock source list for tx and rx clock. 24 "rxtx<0-7>" Clock source list for tx and rx clock.
25 This clock list should be identical to 25 This clock list should be identical to the source
26 the source list connecting to the spdif 26 list connecting to the spdif clock mux in "SPDIF
27 clock mux in "SPDIF Transceiver Clock 27 Transceiver Clock Diagram" of SoC reference manual.
28 Diagram" of SoC reference manual. It 28 It can also be referred to TxClk_Source bit of
29 can also be referred to TxClk_Source 29 register SPDIF_STC.
30 bit of register SPDIF_STC.
31 30
32 - big-endian : If this property is absent, the native endian mode will 31 - big-endian : If this property is absent, the native endian mode
33 be in use as default, or the big endian mode will be in use for all the 32 will be in use as default, or the big endian mode
34 device registers. 33 will be in use for all the device registers.
35 34
36Example: 35Example:
37 36
diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt
index 4956b14d4b06..044e5d76e2dd 100644
--- a/Documentation/devicetree/bindings/sound/fsl-sai.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt
@@ -5,32 +5,48 @@ which provides a synchronous audio interface that supports fullduplex
5serial interfaces with frame synchronization such as I2S, AC97, TDM, and 5serial interfaces with frame synchronization such as I2S, AC97, TDM, and
6codec/DSP interfaces. 6codec/DSP interfaces.
7 7
8
9Required properties: 8Required properties:
10- compatible: Compatible list, contains "fsl,vf610-sai" or "fsl,imx6sx-sai". 9
11- reg: Offset and length of the register set for the device. 10 - compatible : Compatible list, contains "fsl,vf610-sai" or
12- clocks: Must contain an entry for each entry in clock-names. 11 "fsl,imx6sx-sai".
13- clock-names : Must include the "bus" for register access and "mclk1" "mclk2" 12
14 "mclk3" for bit clock and frame clock providing. 13 - reg : Offset and length of the register set for the device.
15- dmas : Generic dma devicetree binding as described in 14
16 Documentation/devicetree/bindings/dma/dma.txt. 15 - clocks : Must contain an entry for each entry in clock-names.
17- dma-names : Two dmas have to be defined, "tx" and "rx". 16
18- pinctrl-names: Must contain a "default" entry. 17 - clock-names : Must include the "bus" for register access and
19- pinctrl-NNN: One property must exist for each entry in pinctrl-names. 18 "mclk1", "mclk2", "mclk3" for bit clock and frame
20 See ../pinctrl/pinctrl-bindings.txt for details of the property values. 19 clock providing.
21- big-endian: Boolean property, required if all the FTM_PWM registers 20 - dmas : Generic dma devicetree binding as described in
22 are big-endian rather than little-endian. 21 Documentation/devicetree/bindings/dma/dma.txt.
23- lsb-first: Configures whether the LSB or the MSB is transmitted first for 22
24 the fifo data. If this property is absent, the MSB is transmitted first as 23 - dma-names : Two dmas have to be defined, "tx" and "rx".
25 default, or the LSB is transmitted first. 24
26- fsl,sai-synchronous-rx: This is a boolean property. If present, indicating 25 - pinctrl-names : Must contain a "default" entry.
27 that SAI will work in the synchronous mode (sync Tx with Rx) which means 26
28 both the transimitter and receiver will send and receive data by following 27 - pinctrl-NNN : One property must exist for each entry in
29 receiver's bit clocks and frame sync clocks. 28 pinctrl-names. See ../pinctrl/pinctrl-bindings.txt
30- fsl,sai-asynchronous: This is a boolean property. If present, indicating 29 for details of the property values.
31 that SAI will work in the asynchronous mode, which means both transimitter 30
32 and receiver will send and receive data by following their own bit clocks 31 - big-endian : Boolean property, required if all the FTM_PWM
33 and frame sync clocks separately. 32 registers are big-endian rather than little-endian.
33
34 - lsb-first : Configures whether the LSB or the MSB is transmitted
35 first for the fifo data. If this property is absent,
36 the MSB is transmitted first as default, or the LSB
37 is transmitted first.
38
39 - fsl,sai-synchronous-rx: This is a boolean property. If present, indicating
40 that SAI will work in the synchronous mode (sync Tx
41 with Rx) which means both the transimitter and the
42 receiver will send and receive data by following
43 receiver's bit clocks and frame sync clocks.
44
45 - fsl,sai-asynchronous: This is a boolean property. If present, indicating
46 that SAI will work in the asynchronous mode, which
47 means both transimitter and receiver will send and
48 receive data by following their own bit clocks and
49 frame sync clocks separately.
34 50
35Note: 51Note:
36- If both fsl,sai-asynchronous and fsl,sai-synchronous-rx are absent, the 52- If both fsl,sai-asynchronous and fsl,sai-synchronous-rx are absent, the
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt b/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt
index e4acdd891e49..2f89db88fd57 100644
--- a/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt
+++ b/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt
@@ -1,33 +1,40 @@
1Freescale i.MX audio complex with SGTL5000 codec 1Freescale i.MX audio complex with SGTL5000 codec
2 2
3Required properties: 3Required properties:
4- compatible : "fsl,imx-audio-sgtl5000" 4
5- model : The user-visible name of this sound complex 5 - compatible : "fsl,imx-audio-sgtl5000"
6- ssi-controller : The phandle of the i.MX SSI controller 6
7- audio-codec : The phandle of the SGTL5000 audio codec 7 - model : The user-visible name of this sound complex
8- audio-routing : A list of the connections between audio components. 8
9 Each entry is a pair of strings, the first being the connection's sink, 9 - ssi-controller : The phandle of the i.MX SSI controller
10 the second being the connection's source. Valid names could be power 10
11 supplies, SGTL5000 pins, and the jacks on the board: 11 - audio-codec : The phandle of the SGTL5000 audio codec
12 12
13 Power supplies: 13 - audio-routing : A list of the connections between audio components.
14 * Mic Bias 14 Each entry is a pair of strings, the first being the
15 15 connection's sink, the second being the connection's
16 SGTL5000 pins: 16 source. Valid names could be power supplies, SGTL5000
17 * MIC_IN 17 pins, and the jacks on the board:
18 * LINE_IN 18
19 * HP_OUT 19 Power supplies:
20 * LINE_OUT 20 * Mic Bias
21 21
22 Board connectors: 22 SGTL5000 pins:
23 * Mic Jack 23 * MIC_IN
24 * Line In Jack 24 * LINE_IN
25 * Headphone Jack 25 * HP_OUT
26 * Line Out Jack 26 * LINE_OUT
27 * Ext Spk 27
28 28 Board connectors:
29- mux-int-port : The internal port of the i.MX audio muxer (AUDMUX) 29 * Mic Jack
30- mux-ext-port : The external port of the i.MX audio muxer 30 * Line In Jack
31 * Headphone Jack
32 * Line Out Jack
33 * Ext Spk
34
35 - mux-int-port : The internal port of the i.MX audio muxer (AUDMUX)
36
37 - mux-ext-port : The external port of the i.MX audio muxer
31 38
32Note: The AUDMUX port numbering should start at 1, which is consistent with 39Note: The AUDMUX port numbering should start at 1, which is consistent with
33hardware manual. 40hardware manual.
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt b/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt
index 7d13479f9c3c..da84a442ccea 100644
--- a/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt
+++ b/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt
@@ -2,23 +2,25 @@ Freescale i.MX audio complex with S/PDIF transceiver
2 2
3Required properties: 3Required properties:
4 4
5 - compatible : "fsl,imx-audio-spdif" 5 - compatible : "fsl,imx-audio-spdif"
6 6
7 - model : The user-visible name of this sound complex 7 - model : The user-visible name of this sound complex
8 8
9 - spdif-controller : The phandle of the i.MX S/PDIF controller 9 - spdif-controller : The phandle of the i.MX S/PDIF controller
10 10
11 11
12Optional properties: 12Optional properties:
13 13
14 - spdif-out : This is a boolean property. If present, the transmitting 14 - spdif-out : This is a boolean property. If present, the
15 function of S/PDIF will be enabled, indicating there's a physical 15 transmitting function of S/PDIF will be enabled,
16 S/PDIF out connector/jack on the board or it's connecting to some 16 indicating there's a physical S/PDIF out connector
17 other IP block, such as an HDMI encoder/display-controller. 17 or jack on the board or it's connecting to some
18 other IP block, such as an HDMI encoder or
19 display-controller.
18 20
19 - spdif-in : This is a boolean property. If present, the receiving 21 - spdif-in : This is a boolean property. If present, the receiving
20 function of S/PDIF will be enabled, indicating there's a physical 22 function of S/PDIF will be enabled, indicating there
21 S/PDIF in connector/jack on the board. 23 is a physical S/PDIF in connector/jack on the board.
22 24
23* Note: At least one of these two properties should be set in the DT binding. 25* Note: At least one of these two properties should be set in the DT binding.
24 26
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt b/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt
index f49450a87890..acea71bee34f 100644
--- a/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt
+++ b/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt
@@ -1,25 +1,32 @@
1Freescale i.MX audio complex with WM8962 codec 1Freescale i.MX audio complex with WM8962 codec
2 2
3Required properties: 3Required properties:
4- compatible : "fsl,imx-audio-wm8962" 4
5- model : The user-visible name of this sound complex 5 - compatible : "fsl,imx-audio-wm8962"
6- ssi-controller : The phandle of the i.MX SSI controller 6
7- audio-codec : The phandle of the WM8962 audio codec 7 - model : The user-visible name of this sound complex
8- audio-routing : A list of the connections between audio components. 8
9 Each entry is a pair of strings, the first being the connection's sink, 9 - ssi-controller : The phandle of the i.MX SSI controller
10 the second being the connection's source. Valid names could be power 10
11 supplies, WM8962 pins, and the jacks on the board: 11 - audio-codec : The phandle of the WM8962 audio codec
12 12
13 Power supplies: 13 - audio-routing : A list of the connections between audio components.
14 * Mic Bias 14 Each entry is a pair of strings, the first being the
15 15 connection's sink, the second being the connection's
16 Board connectors: 16 source. Valid names could be power supplies, WM8962
17 * Mic Jack 17 pins, and the jacks on the board:
18 * Headphone Jack 18
19 * Ext Spk 19 Power supplies:
20 20 * Mic Bias
21- mux-int-port : The internal port of the i.MX audio muxer (AUDMUX) 21
22- mux-ext-port : The external port of the i.MX audio muxer 22 Board connectors:
23 * Mic Jack
24 * Headphone Jack
25 * Ext Spk
26
27 - mux-int-port : The internal port of the i.MX audio muxer (AUDMUX)
28
29 - mux-ext-port : The external port of the i.MX audio muxer
23 30
24Note: The AUDMUX port numbering should start at 1, which is consistent with 31Note: The AUDMUX port numbering should start at 1, which is consistent with
25hardware manual. 32hardware manual.
diff --git a/Documentation/devicetree/bindings/sound/imx-audmux.txt b/Documentation/devicetree/bindings/sound/imx-audmux.txt
index f88a00e54c63..b30a737e209e 100644
--- a/Documentation/devicetree/bindings/sound/imx-audmux.txt
+++ b/Documentation/devicetree/bindings/sound/imx-audmux.txt
@@ -1,18 +1,24 @@
1Freescale Digital Audio Mux (AUDMUX) device 1Freescale Digital Audio Mux (AUDMUX) device
2 2
3Required properties: 3Required properties:
4- compatible : "fsl,imx21-audmux" for AUDMUX version firstly used on i.MX21, 4
5 or "fsl,imx31-audmux" for the version firstly used on i.MX31. 5 - compatible : "fsl,imx21-audmux" for AUDMUX version firstly used
6- reg : Should contain AUDMUX registers location and length 6 on i.MX21, or "fsl,imx31-audmux" for the version
7 firstly used on i.MX31.
8
9 - reg : Should contain AUDMUX registers location and length.
7 10
8An initial configuration can be setup using child nodes. 11An initial configuration can be setup using child nodes.
9 12
10Required properties of optional child nodes: 13Required properties of optional child nodes:
11- fsl,audmux-port : Integer of the audmux port that is configured by this 14
12 child node. 15 - fsl,audmux-port : Integer of the audmux port that is configured by this
13- fsl,port-config : List of configuration options for the specific port. For 16 child node.
14 imx31-audmux and above, it is a list of tuples <ptcr pdcr>. For 17
15 imx21-audmux it is a list of pcr values. 18 - fsl,port-config : List of configuration options for the specific port.
19 For imx31-audmux and above, it is a list of tuples
20 <ptcr pdcr>. For imx21-audmux it is a list of pcr
21 values.
16 22
17Example: 23Example:
18 24
diff --git a/Documentation/devicetree/bindings/sound/max98090.txt b/Documentation/devicetree/bindings/sound/max98090.txt
index c454e67f54bb..aa802a274520 100644
--- a/Documentation/devicetree/bindings/sound/max98090.txt
+++ b/Documentation/devicetree/bindings/sound/max98090.txt
@@ -16,6 +16,8 @@ Optional properties:
16 16
17- clock-names: Should be "mclk" 17- clock-names: Should be "mclk"
18 18
19- maxim,dmic-freq: Frequency at which to clock DMIC
20
19Pins on the device (for linking into audio routes): 21Pins on the device (for linking into audio routes):
20 22
21 * MIC1 23 * MIC1
diff --git a/Documentation/devicetree/bindings/sound/renesas,fsi.txt b/Documentation/devicetree/bindings/sound/renesas,fsi.txt
index c5be003f413e..0d0ab51105b0 100644
--- a/Documentation/devicetree/bindings/sound/renesas,fsi.txt
+++ b/Documentation/devicetree/bindings/sound/renesas,fsi.txt
@@ -1,11 +1,16 @@
1Renesas FSI 1Renesas FSI
2 2
3Required properties: 3Required properties:
4- compatible : "renesas,sh_fsi2" or "renesas,sh_fsi" 4- compatible : "renesas,fsi2-<soctype>",
5 "renesas,sh_fsi2" or "renesas,sh_fsi" as
6 fallback.
7 Examples with soctypes are:
8 - "renesas,fsi2-r8a7740" (R-Mobile A1)
9 - "renesas,fsi2-sh73a0" (SH-Mobile AG5)
5- reg : Should contain the register physical address and length 10- reg : Should contain the register physical address and length
6- interrupts : Should contain FSI interrupt 11- interrupts : Should contain FSI interrupt
7 12
8- fsia,spdif-connection : FSI is connected by S/PDFI 13- fsia,spdif-connection : FSI is connected by S/PDIF
9- fsia,stream-mode-support : FSI supports 16bit stream mode. 14- fsia,stream-mode-support : FSI supports 16bit stream mode.
10- fsia,use-internal-clock : FSI uses internal clock when master mode. 15- fsia,use-internal-clock : FSI uses internal clock when master mode.
11 16
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
index aa697abf337e..2dd690bc19cc 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
@@ -1,8 +1,12 @@
1Renesas R-Car sound 1Renesas R-Car sound
2 2
3Required properties: 3Required properties:
4- compatible : "renesas,rcar_sound-gen1" if generation1 4- compatible : "renesas,rcar_sound-<soctype>", fallbacks
5 "renesas,rcar_sound-gen1" if generation1, and
5 "renesas,rcar_sound-gen2" if generation2 6 "renesas,rcar_sound-gen2" if generation2
7 Examples with soctypes are:
8 - "renesas,rcar_sound-r8a7790" (R-Car H2)
9 - "renesas,rcar_sound-r8a7791" (R-Car M2-W)
6- reg : Should contain the register physical address. 10- reg : Should contain the register physical address.
7 required register is 11 required register is
8 SRU/ADG/SSI if generation1 12 SRU/ADG/SSI if generation1
@@ -35,9 +39,9 @@ DAI subnode properties:
35 39
36Example: 40Example:
37 41
38rcar_sound: rcar_sound@0xffd90000 { 42rcar_sound: rcar_sound@ec500000 {
39 #sound-dai-cells = <1>; 43 #sound-dai-cells = <1>;
40 compatible = "renesas,rcar_sound-gen2"; 44 compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2";
41 reg = <0 0xec500000 0 0x1000>, /* SCU */ 45 reg = <0 0xec500000 0 0x1000>, /* SCU */
42 <0 0xec5a0000 0 0x100>, /* ADG */ 46 <0 0xec5a0000 0 0x100>, /* ADG */
43 <0 0xec540000 0 0x1000>, /* SSIU */ 47 <0 0xec540000 0 0x1000>, /* SSIU */
diff --git a/Documentation/devicetree/bindings/sound/rt5631.txt b/Documentation/devicetree/bindings/sound/rt5631.txt
new file mode 100644
index 000000000000..92b986ca337b
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rt5631.txt
@@ -0,0 +1,48 @@
1ALC5631/RT5631 audio CODEC
2
3This device supports I2C only.
4
5Required properties:
6
7 - compatible : "realtek,alc5631" or "realtek,rt5631"
8
9 - reg : the I2C address of the device.
10
11Pins on the device (for linking into audio routes):
12
13 * SPK_OUT_R_P
14 * SPK_OUT_R_N
15 * SPK_OUT_L_P
16 * SPK_OUT_L_N
17 * HP_OUT_L
18 * HP_OUT_R
19 * AUX_OUT2_LP
20 * AUX_OUT2_RN
21 * AUX_OUT1_LP
22 * AUX_OUT1_RN
23 * AUX_IN_L_JD
24 * AUX_IN_R_JD
25 * MONO_IN_P
26 * MONO_IN_N
27 * MIC1_P
28 * MIC1_N
29 * MIC2_P
30 * MIC2_N
31 * MONO_OUT_P
32 * MONO_OUT_N
33 * MICBIAS1
34 * MICBIAS2
35
36Example:
37
38alc5631: alc5631@1a {
39 compatible = "realtek,alc5631";
40 reg = <0x1a>;
41};
42
43or
44
45rt5631: rt5631@1a {
46 compatible = "realtek,rt5631";
47 reg = <0x1a>;
48};
diff --git a/Documentation/devicetree/bindings/sound/rt5677.txt b/Documentation/devicetree/bindings/sound/rt5677.txt
index 0701b834fc73..740ff771aa8b 100644
--- a/Documentation/devicetree/bindings/sound/rt5677.txt
+++ b/Documentation/devicetree/bindings/sound/rt5677.txt
@@ -27,6 +27,21 @@ Optional properties:
27 Boolean. Indicate MIC1/2 input and LOUT1/2/3 outputs are differential, 27 Boolean. Indicate MIC1/2 input and LOUT1/2/3 outputs are differential,
28 rather than single-ended. 28 rather than single-ended.
29 29
30- realtek,gpio-config
31 Array of six 8bit elements that configures GPIO.
32 0 - floating (reset value)
33 1 - pull down
34 2 - pull up
35
36- realtek,jd1-gpio
37 Configures GPIO Mic Jack detection 1.
38 Select 0 ~ 3 as OFF, GPIO1, GPIO2 and GPIO3 respectively.
39
40- realtek,jd2-gpio
41- realtek,jd3-gpio
42 Configures GPIO Mic Jack detection 2 and 3.
43 Select 0 ~ 3 as OFF, GPIO4, GPIO5 and GPIO6 respectively.
44
30Pins on the device (for linking into audio routes): 45Pins on the device (for linking into audio routes):
31 46
32 * IN1P 47 * IN1P
@@ -56,4 +71,6 @@ rt5677 {
56 realtek,pow-ldo2-gpio = 71 realtek,pow-ldo2-gpio =
57 <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; 72 <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
58 realtek,in1-differential = "true"; 73 realtek,in1-differential = "true";
74 realtek,gpio-config = /bits/ 8 <0 0 0 0 0 2>; /* pull up GPIO6 */
75 realtek,jd2-gpio = <3>; /* Enables Jack detection for GPIO6 */
59}; 76};
diff --git a/Documentation/devicetree/bindings/sound/samsung-i2s.txt b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
index 7386d444ada1..d188296bb6ec 100644
--- a/Documentation/devicetree/bindings/sound/samsung-i2s.txt
+++ b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
@@ -6,10 +6,17 @@ Required SoC Specific Properties:
6 - samsung,s3c6410-i2s: for 8/16/24bit stereo I2S. 6 - samsung,s3c6410-i2s: for 8/16/24bit stereo I2S.
7 - samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with 7 - samsung,s5pv210-i2s: for 8/16/24bit multichannel(5.1) I2S with
8 secondary fifo, s/w reset control and internal mux for root clk src. 8 secondary fifo, s/w reset control and internal mux for root clk src.
9 - samsung,exynos5420-i2s: for 8/16/24bit multichannel(7.1) I2S with 9 - samsung,exynos5420-i2s: for 8/16/24bit multichannel(5.1) I2S for
10 secondary fifo, s/w reset control, internal mux for root clk src and 10 playback, sterio channel capture, secondary fifo using internal
11 TDM support. TDM (Time division multiplexing) is to allow transfer of 11 or external dma, s/w reset control, internal mux for root clk src
12 multiple channel audio data on single data line. 12 and 7.1 channel TDM support for playback. TDM (Time division multiplexing)
13 is to allow transfer of multiple channel audio data on single data line.
14 - samsung,exynos7-i2s: with all the available features of exynos5 i2s,
15 exynos7 I2S has 7.1 channel TDM support for capture, secondary fifo
16 with only external dma and more no.of root clk sampling frequencies.
17 - samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports
18 stereo channels. exynos7 i2s1 upgraded to 5.1 multichannel with
19 slightly modified bit offsets.
13 20
14- reg: physical base address of the controller and length of memory mapped 21- reg: physical base address of the controller and length of memory mapped
15 region. 22 region.
diff --git a/Documentation/devicetree/bindings/sound/sgtl5000.txt b/Documentation/devicetree/bindings/sound/sgtl5000.txt
index d556dcb8816b..0e5e4eb3ef1b 100644
--- a/Documentation/devicetree/bindings/sound/sgtl5000.txt
+++ b/Documentation/devicetree/bindings/sound/sgtl5000.txt
@@ -7,6 +7,17 @@ Required properties:
7 7
8- clocks : the clock provider of SYS_MCLK 8- clocks : the clock provider of SYS_MCLK
9 9
10- micbias-resistor-k-ohms : the bias resistor to be used in kOmhs
11 The resistor can take values of 2k, 4k or 8k.
12 If set to 0 it will be off.
13 If this node is not mentioned or if the value is unknown, then
14 micbias resistor is set to 4K.
15
16- micbias-voltage-m-volts : the bias voltage to be used in mVolts
17 The voltage can take values from 1.25V to 3V by 250mV steps
18 If this node is not mentionned or the value is unknown, then
19 the value is set to 1.25V.
20
10- VDDA-supply : the regulator provider of VDDA 21- VDDA-supply : the regulator provider of VDDA
11 22
12- VDDIO-supply: the regulator provider of VDDIO 23- VDDIO-supply: the regulator provider of VDDIO
@@ -21,6 +32,8 @@ codec: sgtl5000@0a {
21 compatible = "fsl,sgtl5000"; 32 compatible = "fsl,sgtl5000";
22 reg = <0x0a>; 33 reg = <0x0a>;
23 clocks = <&clks 150>; 34 clocks = <&clks 150>;
35 micbias-resistor-k-ohms = <2>;
36 micbias-voltage-m-volts = <2250>;
24 VDDA-supply = <&reg_3p3v>; 37 VDDA-supply = <&reg_3p3v>;
25 VDDIO-supply = <&reg_3p3v>; 38 VDDIO-supply = <&reg_3p3v>;
26}; 39};
diff --git a/Documentation/devicetree/bindings/sound/ts3a227e.txt b/Documentation/devicetree/bindings/sound/ts3a227e.txt
new file mode 100644
index 000000000000..e8bf23eb1803
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ts3a227e.txt
@@ -0,0 +1,26 @@
1Texas Instruments TS3A227E
2Autonomous Audio Accessory Detection and Configuration Switch
3
4The TS3A227E detect headsets of 3-ring and 4-ring standards and
5switches automatically to route the microphone correctly. It also
6handles key press detection in accordance with the Android audio
7headset specification v1.0.
8
9Required properties:
10
11 - compatible: Should contain "ti,ts3a227e".
12 - reg: The i2c address. Should contain <0x3b>.
13 - interrupt-parent: The parent interrupt controller
14 - interrupts: Interrupt number for /INT pin from the 227e
15
16
17Examples:
18
19 i2c {
20 ts3a227e@3b {
21 compatible = "ti,ts3a227e";
22 reg = <0x3b>;
23 interrupt-parent = <&gpio>;
24 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
25 };
26 };
diff --git a/Documentation/devicetree/bindings/sound/wm8960.txt b/Documentation/devicetree/bindings/sound/wm8960.txt
new file mode 100644
index 000000000000..2deb8a3da9c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/wm8960.txt
@@ -0,0 +1,31 @@
1WM8960 audio CODEC
2
3This device supports I2C only.
4
5Required properties:
6
7 - compatible : "wlf,wm8960"
8
9 - reg : the I2C address of the device.
10
11Optional properties:
12 - wlf,shared-lrclk: This is a boolean property. If present, the LRCM bit of
13 R24 (Additional control 2) gets set, indicating that ADCLRC and DACLRC pins
14 will be disabled only when ADC (Left and Right) and DAC (Left and Right)
15 are disabled.
16 When wm8960 works on synchronize mode and DACLRC pin is used to supply
17 frame clock, it will no frame clock for captrue unless enable DAC to enable
18 DACLRC pin. If shared-lrclk is present, no need to enable DAC for captrue.
19
20 - wlf,capless: This is a boolean property. If present, OUT3 pin will be
21 enabled and disabled together with HP_L and HP_R pins in response to jack
22 detect events.
23
24Example:
25
26codec: wm8960@1a {
27 compatible = "wlf,wm8960";
28 reg = <0x1a>;
29
30 wlf,shared-lrclk;
31};
diff --git a/Documentation/devicetree/bindings/spi/spi-gpio.txt b/Documentation/devicetree/bindings/spi/spi-gpio.txt
index 8a824be15754..a95603bcf6ff 100644
--- a/Documentation/devicetree/bindings/spi/spi-gpio.txt
+++ b/Documentation/devicetree/bindings/spi/spi-gpio.txt
@@ -8,8 +8,10 @@ Required properties:
8 - gpio-sck: GPIO spec for the SCK line to use 8 - gpio-sck: GPIO spec for the SCK line to use
9 - gpio-miso: GPIO spec for the MISO line to use 9 - gpio-miso: GPIO spec for the MISO line to use
10 - gpio-mosi: GPIO spec for the MOSI line to use 10 - gpio-mosi: GPIO spec for the MOSI line to use
11 - cs-gpios: GPIOs to use for chipselect lines 11 - cs-gpios: GPIOs to use for chipselect lines.
12 - num-chipselects: number of chipselect lines 12 Not needed if num-chipselects = <0>.
13 - num-chipselects: Number of chipselect lines. Should be <0> if a single device
14 with no chip select is connected.
13 15
14Example: 16Example:
15 17
diff --git a/Documentation/devicetree/bindings/spi/spi-img-spfi.txt b/Documentation/devicetree/bindings/spi/spi-img-spfi.txt
new file mode 100644
index 000000000000..c7dd50fb8eb2
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-img-spfi.txt
@@ -0,0 +1,37 @@
1IMG Synchronous Peripheral Flash Interface (SPFI) controller
2
3Required properties:
4- compatible: Must be "img,spfi".
5- reg: Must contain the base address and length of the SPFI registers.
6- interrupts: Must contain the SPFI interrupt.
7- clocks: Must contain an entry for each entry in clock-names.
8 See ../clock/clock-bindings.txt for details.
9- clock-names: Must include the following entries:
10 - spfi: SPI operating clock
11 - sys: SPI system interface clock
12- dmas: Must contain an entry for each entry in dma-names.
13 See ../dma/dma.txt for details.
14- dma-names: Must include the following entries:
15 - rx
16 - tx
17- #address-cells: Must be 1.
18- #size-cells: Must be 0.
19
20Optional properties:
21- img,supports-quad-mode: Should be set if the interface supports quad mode
22 SPI transfers.
23
24Example:
25
26spi@18100f00 {
27 compatible = "img,spfi";
28 reg = <0x18100f00 0x100>;
29 interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>;
30 clocks = <&spi_clk>, <&system_clk>;
31 clock-names = "spfi", "sys";
32 dmas = <&mdc 9 0xffffffff 0>, <&mdc 10 0xffffffff 0>;
33 dma-names = "rx", "tx";
34
35 #address-cells = <1>;
36 #size-cells = <0>;
37};
diff --git a/Documentation/devicetree/bindings/spi/spi-meson.txt b/Documentation/devicetree/bindings/spi/spi-meson.txt
new file mode 100644
index 000000000000..bb52a86f3365
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-meson.txt
@@ -0,0 +1,22 @@
1Amlogic Meson SPI controllers
2
3* SPIFC (SPI Flash Controller)
4
5The Meson SPIFC is a controller optimized for communication with SPI
6NOR memories, without DMA support and a 64-byte unified transmit /
7receive buffer.
8
9Required properties:
10 - compatible: should be "amlogic,meson6-spifc"
11 - reg: physical base address and length of the controller registers
12 - clocks: phandle of the input clock for the baud rate generator
13 - #address-cells: should be 1
14 - #size-cells: should be 0
15
16 spi@c1108c80 {
17 compatible = "amlogic,meson6-spifc";
18 reg = <0xc1108c80 0x80>;
19 clocks = <&clk81>;
20 #address-cells = <1>;
21 #size-cells = <0>;
22 };
diff --git a/Documentation/devicetree/bindings/spi/spi-samsung.txt b/Documentation/devicetree/bindings/spi/spi-samsung.txt
index 1e8a8578148f..6dbdeb3c361a 100644
--- a/Documentation/devicetree/bindings/spi/spi-samsung.txt
+++ b/Documentation/devicetree/bindings/spi/spi-samsung.txt
@@ -9,7 +9,7 @@ Required SoC Specific Properties:
9 - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms 9 - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms
10 - samsung,s3c6410-spi: for s3c6410 platforms 10 - samsung,s3c6410-spi: for s3c6410 platforms
11 - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms 11 - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms
12 - samsung,exynos4210-spi: for exynos4 and exynos5 platforms 12 - samsung,exynos7-spi: for exynos7 platforms
13 13
14- reg: physical base address of the controller and length of memory mapped 14- reg: physical base address of the controller and length of memory mapped
15 region. 15 region.
diff --git a/Documentation/devicetree/bindings/thermal/armada-thermal.txt b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
index 4cf024929a3f..4698e0edc205 100644
--- a/Documentation/devicetree/bindings/thermal/armada-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
@@ -5,17 +5,9 @@ Required properties:
5- compatible: Should be set to one of the following: 5- compatible: Should be set to one of the following:
6 marvell,armada370-thermal 6 marvell,armada370-thermal
7 marvell,armada375-thermal 7 marvell,armada375-thermal
8 marvell,armada375-z1-thermal
9 marvell,armada380-thermal 8 marvell,armada380-thermal
10 marvell,armadaxp-thermal 9 marvell,armadaxp-thermal
11 10
12 Note: As the name suggests, "marvell,armada375-z1-thermal"
13 applies for the SoC Z1 stepping only. On such stepping
14 some quirks need to be done and the register offset differs
15 from the one in the A0 stepping.
16 The operating system may auto-detect the SoC stepping and
17 update the compatible and register offsets at runtime.
18
19- reg: Device's register space. 11- reg: Device's register space.
20 Two entries are expected, see the examples below. 12 Two entries are expected, see the examples below.
21 The first one is required for the sensor register; 13 The first one is required for the sensor register;
diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
new file mode 100644
index 000000000000..ef802de4957a
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
@@ -0,0 +1,68 @@
1* Temperature Sensor ADC (TSADC) on rockchip SoCs
2
3Required properties:
4- compatible : "rockchip,rk3288-tsadc"
5- reg : physical base address of the controller and length of memory mapped
6 region.
7- interrupts : The interrupt number to the cpu. The interrupt specifier format
8 depends on the interrupt controller.
9- clocks : Must contain an entry for each entry in clock-names.
10- clock-names : Shall be "tsadc" for the converter-clock, and "apb_pclk" for
11 the peripheral clock.
12- resets : Must contain an entry for each entry in reset-names.
13 See ../reset/reset.txt for details.
14- reset-names : Must include the name "tsadc-apb".
15- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description.
16- rockchip,hw-tshut-temp : The hardware-controlled shutdown temperature value.
17- rockchip,hw-tshut-mode : The hardware-controlled shutdown mode 0:CRU 1:GPIO.
18- rockchip,hw-tshut-polarity : The hardware-controlled active polarity 0:LOW
19 1:HIGH.
20
21Exiample:
22tsadc: tsadc@ff280000 {
23 compatible = "rockchip,rk3288-tsadc";
24 reg = <0xff280000 0x100>;
25 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
26 clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
27 clock-names = "tsadc", "apb_pclk";
28 resets = <&cru SRST_TSADC>;
29 reset-names = "tsadc-apb";
30 pinctrl-names = "default";
31 pinctrl-0 = <&otp_out>;
32 #thermal-sensor-cells = <1>;
33 rockchip,hw-tshut-temp = <95000>;
34 rockchip,hw-tshut-mode = <0>;
35 rockchip,hw-tshut-polarity = <0>;
36};
37
38Example: referring to thermal sensors:
39thermal-zones {
40 cpu_thermal: cpu_thermal {
41 polling-delay-passive = <1000>; /* milliseconds */
42 polling-delay = <5000>; /* milliseconds */
43
44 /* sensor ID */
45 thermal-sensors = <&tsadc 1>;
46
47 trips {
48 cpu_alert0: cpu_alert {
49 temperature = <70000>; /* millicelsius */
50 hysteresis = <2000>; /* millicelsius */
51 type = "passive";
52 };
53 cpu_crit: cpu_crit {
54 temperature = <90000>; /* millicelsius */
55 hysteresis = <2000>; /* millicelsius */
56 type = "critical";
57 };
58 };
59
60 cooling-maps {
61 map0 {
62 trip = <&cpu_alert0>;
63 cooling-device =
64 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
65 };
66 };
67 };
68};
diff --git a/Documentation/devicetree/bindings/thermal/tegra-soctherm.txt b/Documentation/devicetree/bindings/thermal/tegra-soctherm.txt
new file mode 100644
index 000000000000..ecf3ed76cd46
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/tegra-soctherm.txt
@@ -0,0 +1,53 @@
1Tegra124 SOCTHERM thermal management system
2
3The SOCTHERM IP block contains thermal sensors, support for polled
4or interrupt-based thermal monitoring, CPU and GPU throttling based
5on temperature trip points, and handling external overcurrent
6notifications. It is also used to manage emergency shutdown in an
7overheating situation.
8
9Required properties :
10- compatible : "nvidia,tegra124-soctherm".
11- reg : Should contain 1 entry:
12 - SOCTHERM register set
13- interrupts : Defines the interrupt used by SOCTHERM
14- clocks : Must contain an entry for each entry in clock-names.
15 See ../clocks/clock-bindings.txt for details.
16- clock-names : Must include the following entries:
17 - tsensor
18 - soctherm
19- resets : Must contain an entry for each entry in reset-names.
20 See ../reset/reset.txt for details.
21- reset-names : Must include the following entries:
22 - soctherm
23- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description
24 of this property. See <dt-bindings/thermal/tegra124-soctherm.h> for a
25 list of valid values when referring to thermal sensors.
26
27
28Example :
29
30 soctherm@0,700e2000 {
31 compatible = "nvidia,tegra124-soctherm";
32 reg = <0x0 0x700e2000 0x0 0x1000>;
33 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
34 clocks = <&tegra_car TEGRA124_CLK_TSENSOR>,
35 <&tegra_car TEGRA124_CLK_SOC_THERM>;
36 clock-names = "tsensor", "soctherm";
37 resets = <&tegra_car 78>;
38 reset-names = "soctherm";
39
40 #thermal-sensor-cells = <1>;
41 };
42
43Example: referring to thermal sensors :
44
45 thermal-zones {
46 cpu {
47 polling-delay-passive = <1000>;
48 polling-delay = <1000>;
49
50 thermal-sensors =
51 <&soctherm TEGRA124_SOCTHERM_SENSOR_CPU>;
52 };
53 };
diff --git a/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt b/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt
index f455182b1086..e9c78ce880e6 100644
--- a/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt
+++ b/Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt
@@ -2,8 +2,10 @@ Marvell Armada 370 and Armada XP Timers
2--------------------------------------- 2---------------------------------------
3 3
4Required properties: 4Required properties:
5- compatible: Should be either "marvell,armada-370-timer" or 5- compatible: Should be one of the following
6 "marvell,armada-xp-timer" as appropriate. 6 "marvell,armada-370-timer",
7 "marvell,armada-375-timer",
8 "marvell,armada-xp-timer".
7- interrupts: Should contain the list of Global Timer interrupts and 9- interrupts: Should contain the list of Global Timer interrupts and
8 then local timer interrupts 10 then local timer interrupts
9- reg: Should contain location and length for timers register. First 11- reg: Should contain location and length for timers register. First
@@ -13,7 +15,8 @@ Required properties:
13Clocks required for compatible = "marvell,armada-370-timer": 15Clocks required for compatible = "marvell,armada-370-timer":
14- clocks : Must contain a single entry describing the clock input 16- clocks : Must contain a single entry describing the clock input
15 17
16Clocks required for compatible = "marvell,armada-xp-timer": 18Clocks required for compatibles = "marvell,armada-xp-timer",
19 "marvell,armada-375-timer":
17- clocks : Must contain an entry for each entry in clock-names. 20- clocks : Must contain an entry for each entry in clock-names.
18- clock-names : Must include the following entries: 21- clock-names : Must include the following entries:
19 "nbclk" (L2/coherency fabric clock), 22 "nbclk" (L2/coherency fabric clock),
diff --git a/Documentation/devicetree/bindings/timer/renesas,mtu2.txt b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt
index d9a8d5af1a21..ba0a34d97eb8 100644
--- a/Documentation/devicetree/bindings/timer/renesas,mtu2.txt
+++ b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt
@@ -1,4 +1,4 @@
1* Renesas R-Car Multi-Function Timer Pulse Unit 2 (MTU2) 1* Renesas Multi-Function Timer Pulse Unit 2 (MTU2)
2 2
3The MTU2 is a multi-purpose, multi-channel timer/counter with configurable 3The MTU2 is a multi-purpose, multi-channel timer/counter with configurable
4clock inputs and programmable compare match. 4clock inputs and programmable compare match.
diff --git a/Documentation/devicetree/bindings/timer/renesas,tmu.txt b/Documentation/devicetree/bindings/timer/renesas,tmu.txt
index 7db89fb25444..cd5f20bf2582 100644
--- a/Documentation/devicetree/bindings/timer/renesas,tmu.txt
+++ b/Documentation/devicetree/bindings/timer/renesas,tmu.txt
@@ -1,4 +1,4 @@
1* Renesas R-Car Timer Unit (TMU) 1* Renesas R-Mobile/R-Car Timer Unit (TMU)
2 2
3The TMU is a 32-bit timer/counter with configurable clock inputs and 3The TMU is a 32-bit timer/counter with configurable clock inputs and
4programmable compare match. 4programmable compare match.
@@ -9,6 +9,8 @@ are independent. The TMU hardware supports up to three channels.
9Required Properties: 9Required Properties:
10 10
11 - compatible: must contain one or more of the following: 11 - compatible: must contain one or more of the following:
12 - "renesas,tmu-r8a7740" for the r8a7740 TMU
13 - "renesas,tmu-r8a7778" for the r8a7778 TMU
12 - "renesas,tmu-r8a7779" for the r8a7779 TMU 14 - "renesas,tmu-r8a7779" for the r8a7779 TMU
13 - "renesas,tmu" for any TMU. 15 - "renesas,tmu" for any TMU.
14 This is a fallback for the above renesas,tmu-* entries 16 This is a fallback for the above renesas,tmu-* entries
diff --git a/Documentation/devicetree/bindings/unittest.txt b/Documentation/devicetree/bindings/unittest.txt
new file mode 100644
index 000000000000..0f92a22fddfa
--- /dev/null
+++ b/Documentation/devicetree/bindings/unittest.txt
@@ -0,0 +1,14 @@
1* OF selftest platform device
2
3** selftest
4
5Required properties:
6- compatible: must be "selftest"
7
8All other properties are optional.
9
10Example:
11 selftest {
12 compatible = "selftest";
13 status = "okay";
14 };
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
new file mode 100644
index 000000000000..27f8b1e5ee46
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
@@ -0,0 +1,24 @@
1* USB2 ChipIdea USB controller for ci13xxx
2
3Required properties:
4- compatible: should be "chipidea,usb2"
5- reg: base address and length of the registers
6- interrupts: interrupt for the USB controller
7
8Optional properties:
9- clocks: reference to the USB clock
10- phys: reference to the USB PHY
11- phy-names: should be "usb-phy"
12- vbus-supply: reference to the VBUS regulator
13
14Example:
15
16 usb@f7ed0000 {
17 compatible = "chipidea,usb2";
18 reg = <0xf7ed0000 0x10000>;
19 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
20 clocks = <&chip CLKID_USB0>;
21 phys = <&usb_phy0>;
22 phy-names = "usb-phy";
23 vbus-supply = <&reg_usb0_vbus>;
24 };
diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
index 471366d6a129..cd7f0454e13a 100644
--- a/Documentation/devicetree/bindings/usb/dwc3.txt
+++ b/Documentation/devicetree/bindings/usb/dwc3.txt
@@ -14,6 +14,29 @@ Optional properties:
14 - phys: from the *Generic PHY* bindings 14 - phys: from the *Generic PHY* bindings
15 - phy-names: from the *Generic PHY* bindings 15 - phy-names: from the *Generic PHY* bindings
16 - tx-fifo-resize: determines if the FIFO *has* to be reallocated. 16 - tx-fifo-resize: determines if the FIFO *has* to be reallocated.
17 - snps,disable_scramble_quirk: true when SW should disable data scrambling.
18 Only really useful for FPGA builds.
19 - snps,has-lpm-erratum: true when DWC3 was configured with LPM Erratum enabled
20 - snps,lpm-nyet-threshold: LPM NYET threshold
21 - snps,u2exit_lfps_quirk: set if we want to enable u2exit lfps quirk
22 - snps,u2ss_inp3_quirk: set if we enable P3 OK for U2/SS Inactive quirk
23 - snps,req_p1p2p3_quirk: when set, the core will always request for
24 P1/P2/P3 transition sequence.
25 - snps,del_p1p2p3_quirk: when set core will delay P1/P2/P3 until a certain
26 amount of 8B10B errors occur.
27 - snps,del_phy_power_chg_quirk: when set core will delay PHY power change
28 from P0 to P1/P2/P3.
29 - snps,lfps_filter_quirk: when set core will filter LFPS reception.
30 - snps,rx_detect_poll_quirk: when set core will disable a 400us delay to start
31 Polling LFPS after RX.Detect.
32 - snps,tx_de_emphasis_quirk: when set core will set Tx de-emphasis value.
33 - snps,tx_de_emphasis: the value driven to the PHY is controlled by the
34 LTSSM during USB3 Compliance mode.
35 - snps,dis_u3_susphy_quirk: when set core will disable USB3 suspend phy.
36 - snps,dis_u2_susphy_quirk: when set core will disable USB2 suspend phy.
37 - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal
38 utmi_l1_suspend_n, false when asserts utmi_sleep_n
39 - snps,hird-threshold: HIRD threshold
17 40
18This is usually a subnode to DWC3 glue to which it is connected. 41This is usually a subnode to DWC3 glue to which it is connected.
19 42
diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt
index a3b5990d0f2c..9b4dbe3b2acc 100644
--- a/Documentation/devicetree/bindings/usb/exynos-usb.txt
+++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt
@@ -82,8 +82,10 @@ Example:
82 82
83DWC3 83DWC3
84Required properties: 84Required properties:
85 - compatible: should be "samsung,exynos5250-dwusb3" for USB 3.0 DWC3 85 - compatible: should be one of the following -
86 controller. 86 "samsung,exynos5250-dwusb3": for USB 3.0 DWC3 controller on
87 Exynos5250/5420.
88 "samsung,exynos7-dwusb3": for USB 3.0 DWC3 controller on Exynos7.
87 - #address-cells, #size-cells : should be '1' if the device has sub-nodes 89 - #address-cells, #size-cells : should be '1' if the device has sub-nodes
88 with 'reg' property. 90 with 'reg' property.
89 - ranges: allows valid 1:1 translation between child's address space and 91 - ranges: allows valid 1:1 translation between child's address space and
diff --git a/Documentation/devicetree/bindings/usb/pxa-usb.txt b/Documentation/devicetree/bindings/usb/pxa-usb.txt
index 79729a948d5a..9c331799b87c 100644
--- a/Documentation/devicetree/bindings/usb/pxa-usb.txt
+++ b/Documentation/devicetree/bindings/usb/pxa-usb.txt
@@ -29,3 +29,25 @@ Example:
29 marvell,port-mode = <2>; /* PMM_GLOBAL_MODE */ 29 marvell,port-mode = <2>; /* PMM_GLOBAL_MODE */
30 }; 30 };
31 31
32UDC
33
34Required properties:
35 - compatible: Should be "marvell,pxa270-udc" for USB controllers
36 used in device mode.
37 - reg: usb device MMIO address space
38 - interrupts: single interrupt generated by the UDC IP
39 - clocks: input clock of the UDC IP (see clock-bindings.txt)
40
41Optional properties:
42 - gpios:
43 - gpio activated to control the USB D+ pullup (see gpio.txt)
44
45Example:
46
47 pxa27x_udc: udc@40600000 {
48 compatible = "marvell,pxa270-udc";
49 reg = <0x40600000 0x10000>;
50 interrupts = <11>;
51 clocks = <&pxa2xx_clks 11>;
52 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
53 };
diff --git a/Documentation/devicetree/bindings/usb/usb-ohci.txt b/Documentation/devicetree/bindings/usb/usb-ohci.txt
index b968a1aea995..19233b7365e1 100644
--- a/Documentation/devicetree/bindings/usb/usb-ohci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-ohci.txt
@@ -9,6 +9,8 @@ Optional properties:
9- big-endian-regs : boolean, set this for hcds with big-endian registers 9- big-endian-regs : boolean, set this for hcds with big-endian registers
10- big-endian-desc : boolean, set this for hcds with big-endian descriptors 10- big-endian-desc : boolean, set this for hcds with big-endian descriptors
11- big-endian : boolean, for hcds with big-endian-regs + big-endian-desc 11- big-endian : boolean, for hcds with big-endian-regs + big-endian-desc
12- no-big-frame-no : boolean, set if frame_no lives in bits [15:0] of HCCA
13- num-ports : u32, to override the detected port count
12- clocks : a list of phandle + clock specifier pairs 14- clocks : a list of phandle + clock specifier pairs
13- phys : phandle + phy specifier pair 15- phys : phandle + phy specifier pair
14- phy-names : "usb" 16- phy-names : "usb"
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 723999d73744..b1df0ad1306c 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -34,17 +34,20 @@ chipidea Chipidea, Inc
34chrp Common Hardware Reference Platform 34chrp Common Hardware Reference Platform
35chunghwa Chunghwa Picture Tubes Ltd. 35chunghwa Chunghwa Picture Tubes Ltd.
36cirrus Cirrus Logic, Inc. 36cirrus Cirrus Logic, Inc.
37cnm Chips&Media, Inc.
37cortina Cortina Systems, Inc. 38cortina Cortina Systems, Inc.
38crystalfontz Crystalfontz America, Inc. 39crystalfontz Crystalfontz America, Inc.
39dallas Maxim Integrated Products (formerly Dallas Semiconductor) 40dallas Maxim Integrated Products (formerly Dallas Semiconductor)
40davicom DAVICOM Semiconductor, Inc. 41davicom DAVICOM Semiconductor, Inc.
41denx Denx Software Engineering 42denx Denx Software Engineering
42digi Digi International Inc. 43digi Digi International Inc.
44digilent Diglent, Inc.
43dlg Dialog Semiconductor 45dlg Dialog Semiconductor
44dlink D-Link Corporation 46dlink D-Link Corporation
45dmo Data Modul AG 47dmo Data Modul AG
46ebv EBV Elektronik 48ebv EBV Elektronik
47edt Emerging Display Technologies 49edt Emerging Display Technologies
50elan Elan Microelectronic Corp.
48emmicro EM Microelectronic 51emmicro EM Microelectronic
49energymicro Silicon Laboratories (formerly Energy Micro AS) 52energymicro Silicon Laboratories (formerly Energy Micro AS)
50epcos EPCOS AG 53epcos EPCOS AG
@@ -64,8 +67,10 @@ gmt Global Mixed-mode Technology, Inc.
64google Google, Inc. 67google Google, Inc.
65gumstix Gumstix, Inc. 68gumstix Gumstix, Inc.
66gw Gateworks Corporation 69gw Gateworks Corporation
70hannstar HannStar Display Corporation
67haoyu Haoyu Microelectronic Co. Ltd. 71haoyu Haoyu Microelectronic Co. Ltd.
68hisilicon Hisilicon Limited. 72hisilicon Hisilicon Limited.
73hit Hitachi Ltd.
69honeywell Honeywell 74honeywell Honeywell
70hp Hewlett Packard 75hp Hewlett Packard
71i2se I2SE GmbH 76i2se I2SE GmbH
@@ -77,6 +82,7 @@ innolux Innolux Corporation
77intel Intel Corporation 82intel Intel Corporation
78intercontrol Inter Control Group 83intercontrol Inter Control Group
79isee ISEE 2007 S.L. 84isee ISEE 2007 S.L.
85isil Intersil (deprecated, use isl)
80isl Intersil 86isl Intersil
81karo Ka-Ro electronics GmbH 87karo Ka-Ro electronics GmbH
82keymile Keymile GmbH 88keymile Keymile GmbH
@@ -90,12 +96,15 @@ lltc Linear Technology Corporation
90marvell Marvell Technology Group Ltd. 96marvell Marvell Technology Group Ltd.
91maxim Maxim Integrated Products 97maxim Maxim Integrated Products
92mediatek MediaTek Inc. 98mediatek MediaTek Inc.
99merrii Merrii Technology Co., Ltd.
93micrel Micrel Inc. 100micrel Micrel Inc.
94microchip Microchip Technology Inc. 101microchip Microchip Technology Inc.
102micron Micron Technology Inc.
95mitsubishi Mitsubishi Electric Corporation 103mitsubishi Mitsubishi Electric Corporation
96mosaixtech Mosaix Technologies, Inc. 104mosaixtech Mosaix Technologies, Inc.
97moxa Moxa 105moxa Moxa
98mpl MPL AG 106mpl MPL AG
107mti Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
99mundoreader Mundo Reader S.L. 108mundoreader Mundo Reader S.L.
100murata Murata Manufacturing Co., Ltd. 109murata Murata Manufacturing Co., Ltd.
101mxicy Macronix International Co., Ltd. 110mxicy Macronix International Co., Ltd.
@@ -110,6 +119,7 @@ nxp NXP Semiconductors
110onnn ON Semiconductor Corp. 119onnn ON Semiconductor Corp.
111opencores OpenCores.org 120opencores OpenCores.org
112panasonic Panasonic Corporation 121panasonic Panasonic Corporation
122pericom Pericom Technology Inc.
113phytec PHYTEC Messtechnik GmbH 123phytec PHYTEC Messtechnik GmbH
114picochip Picochip Ltd 124picochip Picochip Ltd
115plathome Plat'Home Co., Ltd. 125plathome Plat'Home Co., Ltd.
@@ -127,6 +137,7 @@ renesas Renesas Electronics Corporation
127ricoh Ricoh Co. Ltd. 137ricoh Ricoh Co. Ltd.
128rockchip Fuzhou Rockchip Electronics Co., Ltd 138rockchip Fuzhou Rockchip Electronics Co., Ltd
129samsung Samsung Semiconductor 139samsung Samsung Semiconductor
140sandisk Sandisk Corporation
130sbs Smart Battery System 141sbs Smart Battery System
131schindler Schindler 142schindler Schindler
132seagate Seagate Technology PLC 143seagate Seagate Technology PLC
@@ -138,7 +149,7 @@ silergy Silergy Corp.
138sirf SiRF Technology, Inc. 149sirf SiRF Technology, Inc.
139sitronix Sitronix Technology Corporation 150sitronix Sitronix Technology Corporation
140smsc Standard Microsystems Corporation 151smsc Standard Microsystems Corporation
141snps Synopsys, Inc. 152snps Synopsys, Inc.
142solidrun SolidRun 153solidrun SolidRun
143sony Sony Corporation 154sony Sony Corporation
144spansion Spansion Inc. 155spansion Spansion Inc.
@@ -146,6 +157,7 @@ st STMicroelectronics
146ste ST-Ericsson 157ste ST-Ericsson
147stericsson ST-Ericsson 158stericsson ST-Ericsson
148synology Synology, Inc. 159synology Synology, Inc.
160tbs TBS Technologies
149thine THine Electronics, Inc. 161thine THine Electronics, Inc.
150ti Texas Instruments 162ti Texas Instruments
151tlm Trusted Logic Mobility 163tlm Trusted Logic Mobility
diff --git a/Documentation/devicetree/bindings/video/adi,adv7511.txt b/Documentation/devicetree/bindings/video/adi,adv7511.txt
new file mode 100644
index 000000000000..96c25ee01501
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/adi,adv7511.txt
@@ -0,0 +1,88 @@
1Analog Device ADV7511(W)/13 HDMI Encoders
2-----------------------------------------
3
4The ADV7511, ADV7511W and ADV7513 are HDMI audio and video transmitters
5compatible with HDMI 1.4 and DVI 1.0. They support color space conversion,
6S/PDIF, CEC and HDCP.
7
8Required properties:
9
10- compatible: Should be one of "adi,adv7511", "adi,adv7511w" or "adi,adv7513"
11- reg: I2C slave address
12
13The ADV7511 supports a large number of input data formats that differ by their
14color depth, color format, clock mode, bit justification and random
15arrangement of components on the data bus. The combination of the following
16properties describe the input and map directly to the video input tables of the
17ADV7511 datasheet that document all the supported combinations.
18
19- adi,input-depth: Number of bits per color component at the input (8, 10 or
20 12).
21- adi,input-colorspace: The input color space, one of "rgb", "yuv422" or
22 "yuv444".
23- adi,input-clock: The input clock type, one of "1x" (one clock cycle per
24 pixel), "2x" (two clock cycles per pixel), "ddr" (one clock cycle per pixel,
25 data driven on both edges).
26
27The following input format properties are required except in "rgb 1x" and
28"yuv444 1x" modes, in which case they must not be specified.
29
30- adi,input-style: The input components arrangement variant (1, 2 or 3), as
31 listed in the input format tables in the datasheet.
32- adi,input-justification: The input bit justification ("left", "evenly",
33 "right").
34
35Optional properties:
36
37- interrupts: Specifier for the ADV7511 interrupt
38- pd-gpios: Specifier for the GPIO connected to the power down signal
39
40- adi,clock-delay: Video data clock delay relative to the pixel clock, in ps
41 (-1200 ps .. 1600 ps). Defaults to no delay.
42- adi,embedded-sync: The input uses synchronization signals embedded in the
43 data stream (similar to BT.656). Defaults to separate H/V synchronization
44 signals.
45
46Required nodes:
47
48The ADV7511 has two video ports. Their connections are modelled using the OF
49graph bindings specified in Documentation/devicetree/bindings/graph.txt.
50
51- Video port 0 for the RGB or YUV input
52- Video port 1 for the HDMI output
53
54
55Example
56-------
57
58 adv7511w: hdmi@39 {
59 compatible = "adi,adv7511w";
60 reg = <39>;
61 interrupt-parent = <&gpio3>;
62 interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
63
64 adi,input-depth = <8>;
65 adi,input-colorspace = "rgb";
66 adi,input-clock = "1x";
67 adi,input-style = <1>;
68 adi,input-justification = "evenly";
69
70 ports {
71 #address-cells = <1>;
72 #size-cells = <0>;
73
74 port@0 {
75 reg = <0>;
76 adv7511w_in: endpoint {
77 remote-endpoint = <&dpi_out>;
78 };
79 };
80
81 port@1 {
82 reg = <1>;
83 adv7511_out: endpoint {
84 remote-endpoint = <&hdmi_connector_in>;
85 };
86 };
87 };
88 };
diff --git a/Documentation/devicetree/bindings/video/backlight/lp855x.txt b/Documentation/devicetree/bindings/video/backlight/lp855x.txt
index 96e83a56048e..0a3ecbc3a1b9 100644
--- a/Documentation/devicetree/bindings/video/backlight/lp855x.txt
+++ b/Documentation/devicetree/bindings/video/backlight/lp855x.txt
@@ -12,6 +12,7 @@ Optional properties:
12 - pwm-period: PWM period value. Set only PWM input mode used (u32) 12 - pwm-period: PWM period value. Set only PWM input mode used (u32)
13 - rom-addr: Register address of ROM area to be updated (u8) 13 - rom-addr: Register address of ROM area to be updated (u8)
14 - rom-val: Register value to be updated (u8) 14 - rom-val: Register value to be updated (u8)
15 - power-supply: Regulator which controls the 3V rail
15 16
16Example: 17Example:
17 18
@@ -56,6 +57,7 @@ Example:
56 backlight@2c { 57 backlight@2c {
57 compatible = "ti,lp8557"; 58 compatible = "ti,lp8557";
58 reg = <0x2c>; 59 reg = <0x2c>;
60 power-supply = <&backlight_vdd>;
59 61
60 dev-ctrl = /bits/ 8 <0x41>; 62 dev-ctrl = /bits/ 8 <0x41>;
61 init-brt = /bits/ 8 <0x0a>; 63 init-brt = /bits/ 8 <0x0a>;
diff --git a/Documentation/devicetree/bindings/video/exynos_dsim.txt b/Documentation/devicetree/bindings/video/exynos_dsim.txt
index e74243b4b317..ca2b4aacd9af 100644
--- a/Documentation/devicetree/bindings/video/exynos_dsim.txt
+++ b/Documentation/devicetree/bindings/video/exynos_dsim.txt
@@ -4,6 +4,7 @@ Required properties:
4 - compatible: value should be one of the following 4 - compatible: value should be one of the following
5 "samsung,exynos3250-mipi-dsi" /* for Exynos3250/3472 SoCs */ 5 "samsung,exynos3250-mipi-dsi" /* for Exynos3250/3472 SoCs */
6 "samsung,exynos4210-mipi-dsi" /* for Exynos4 SoCs */ 6 "samsung,exynos4210-mipi-dsi" /* for Exynos4 SoCs */
7 "samsung,exynos4415-mipi-dsi" /* for Exynos4415 SoC */
7 "samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */ 8 "samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */
8 - reg: physical base address and length of the registers set for the device 9 - reg: physical base address and length of the registers set for the device
9 - interrupts: should contain DSI interrupt 10 - interrupts: should contain DSI interrupt
diff --git a/Documentation/devicetree/bindings/video/rockchip-drm.txt b/Documentation/devicetree/bindings/video/rockchip-drm.txt
new file mode 100644
index 000000000000..7fff582495a2
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/rockchip-drm.txt
@@ -0,0 +1,19 @@
1Rockchip DRM master device
2================================
3
4The Rockchip DRM master device is a virtual device needed to list all
5vop devices or other display interface nodes that comprise the
6graphics subsystem.
7
8Required properties:
9- compatible: Should be "rockchip,display-subsystem"
10- ports: Should contain a list of phandles pointing to display interface port
11 of vop devices. vop definitions as defined in
12 Documentation/devicetree/bindings/video/rockchip-vop.txt
13
14example:
15
16display-subsystem {
17 compatible = "rockchip,display-subsystem";
18 ports = <&vopl_out>, <&vopb_out>;
19};
diff --git a/Documentation/devicetree/bindings/video/rockchip-vop.txt b/Documentation/devicetree/bindings/video/rockchip-vop.txt
new file mode 100644
index 000000000000..d15351f2313d
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/rockchip-vop.txt
@@ -0,0 +1,58 @@
1device-tree bindings for rockchip soc display controller (vop)
2
3VOP (Visual Output Processor) is the Display Controller for the Rockchip
4series of SoCs which transfers the image data from a video memory
5buffer to an external LCD interface.
6
7Required properties:
8- compatible: value should be one of the following
9 "rockchip,rk3288-vop";
10
11- interrupts: should contain a list of all VOP IP block interrupts in the
12 order: VSYNC, LCD_SYSTEM. The interrupt specifier
13 format depends on the interrupt controller used.
14
15- clocks: must include clock specifiers corresponding to entries in the
16 clock-names property.
17
18- clock-names: Must contain
19 aclk_vop: for ddr buffer transfer.
20 hclk_vop: for ahb bus to R/W the phy regs.
21 dclk_vop: pixel clock.
22
23- resets: Must contain an entry for each entry in reset-names.
24 See ../reset/reset.txt for details.
25- reset-names: Must include the following entries:
26 - axi
27 - ahb
28 - dclk
29
30- iommus: required a iommu node
31
32- port: A port node with endpoint definitions as defined in
33 Documentation/devicetree/bindings/media/video-interfaces.txt.
34
35Example:
36SoC specific DT entry:
37 vopb: vopb@ff930000 {
38 compatible = "rockchip,rk3288-vop";
39 reg = <0xff930000 0x19c>;
40 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
41 clocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>;
42 clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
43 resets = <&cru SRST_LCDC1_AXI>, <&cru SRST_LCDC1_AHB>, <&cru SRST_LCDC1_DCLK>;
44 reset-names = "axi", "ahb", "dclk";
45 iommus = <&vopb_mmu>;
46 vopb_out: port {
47 #address-cells = <1>;
48 #size-cells = <0>;
49 vopb_out_edp: endpoint@0 {
50 reg = <0>;
51 remote-endpoint=<&edp_in_vopb>;
52 };
53 vopb_out_hdmi: endpoint@1 {
54 reg = <1>;
55 remote-endpoint=<&hdmi_in_vopb>;
56 };
57 };
58 };
diff --git a/Documentation/devicetree/bindings/video/samsung-fimd.txt b/Documentation/devicetree/bindings/video/samsung-fimd.txt
index 4e6c77c85546..cf1af6371021 100644
--- a/Documentation/devicetree/bindings/video/samsung-fimd.txt
+++ b/Documentation/devicetree/bindings/video/samsung-fimd.txt
@@ -11,6 +11,7 @@ Required properties:
11 "samsung,s5pv210-fimd"; /* for S5PV210 SoC */ 11 "samsung,s5pv210-fimd"; /* for S5PV210 SoC */
12 "samsung,exynos3250-fimd"; /* for Exynos3250/3472 SoCs */ 12 "samsung,exynos3250-fimd"; /* for Exynos3250/3472 SoCs */
13 "samsung,exynos4210-fimd"; /* for Exynos4 SoCs */ 13 "samsung,exynos4210-fimd"; /* for Exynos4 SoCs */
14 "samsung,exynos4415-fimd"; /* for Exynos4415 SoC */
14 "samsung,exynos5250-fimd"; /* for Exynos5 SoCs */ 15 "samsung,exynos5250-fimd"; /* for Exynos5 SoCs */
15 16
16- reg: physical base address and length of the FIMD registers set. 17- reg: physical base address and length of the FIMD registers set.
diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt b/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt
new file mode 100644
index 000000000000..c46ba641a1df
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt
@@ -0,0 +1,33 @@
1Sunxi specific Simple Framebuffer bindings
2
3This binding documents sunxi specific extensions to the simple-framebuffer
4bindings. The sunxi simplefb u-boot code relies on the devicetree containing
5pre-populated simplefb nodes.
6
7These extensions are intended so that u-boot can select the right node based
8on which pipeline is being used. As such they are solely intended for
9firmware / bootloader use, and the OS should ignore them.
10
11Required properties:
12- compatible: "allwinner,simple-framebuffer"
13- allwinner,pipeline, one of:
14 "de_be0-lcd0"
15 "de_be1-lcd1"
16 "de_be0-lcd0-hdmi"
17 "de_be1-lcd1-hdmi"
18
19Example:
20
21chosen {
22 #address-cells = <1>;
23 #size-cells = <1>;
24 ranges;
25
26 framebuffer@0 {
27 compatible = "allwinner,simple-framebuffer", "simple-framebuffer";
28 allwinner,pipeline = "de_be0-lcd0-hdmi";
29 clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
30 <&ahb_gates 44>;
31 status = "disabled";
32 };
33};
diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
index 70c26f3a5b9a..4474ef6e0b95 100644
--- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
+++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
@@ -1,8 +1,40 @@
1Simple Framebuffer 1Simple Framebuffer
2 2
3A simple frame-buffer describes a raw memory region that may be rendered to, 3A simple frame-buffer describes a frame-buffer setup by firmware or
4with the assumption that the display hardware has already been set up to scan 4the bootloader, with the assumption that the display hardware has already
5out from that buffer. 5been set up to scan out from the memory pointed to by the reg property.
6
7Since simplefb nodes represent runtime information they must be sub-nodes of
8the chosen node (*). Simplefb nodes must be named "framebuffer@<address>".
9
10If the devicetree contains nodes for the display hardware used by a simplefb,
11then the simplefb node must contain a property called "display", which
12contains a phandle pointing to the primary display hw node, so that the OS
13knows which simplefb to disable when handing over control to a driver for the
14real hardware. The bindings for the hw nodes must specify which node is
15considered the primary node.
16
17It is advised to add display# aliases to help the OS determine how to number
18things. If display# aliases are used, then if the simplefb node contains a
19"display" property then the /aliases/display# path must point to the display
20hw node the "display" property points to, otherwise it must point directly
21to the simplefb node.
22
23If a simplefb node represents the preferred console for user interaction,
24then the chosen node's stdout-path property should point to it, or to the
25primary display hw node, as with display# aliases. If display aliases are
26used then it should be set to the alias instead.
27
28It is advised that devicetree files contain pre-filled, disabled framebuffer
29nodes, so that the firmware only needs to update the mode information and
30enable them. This way if e.g. later on support for more display clocks get
31added, the simplefb nodes will already contain this info and the firmware
32does not need to be updated.
33
34If pre-filled framebuffer nodes are used, the firmware may need extra
35information to find the right node. In that case an extra platform specific
36compatible and platform specific properties should be used and documented,
37see e.g. simple-framebuffer-sunxi.txt .
6 38
7Required properties: 39Required properties:
8- compatible: "simple-framebuffer" 40- compatible: "simple-framebuffer"
@@ -14,13 +46,41 @@ Required properties:
14 - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b). 46 - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
15 - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r). 47 - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
16 48
49Optional properties:
50- clocks : List of clocks used by the framebuffer. Clocks listed here
51 are expected to already be configured correctly. The OS must
52 ensure these clocks are not modified or disabled while the
53 simple framebuffer remains active.
54- display : phandle pointing to the primary display hardware node
55
17Example: 56Example:
18 57
19 framebuffer { 58aliases {
59 display0 = &lcdc0;
60}
61
62chosen {
63 framebuffer0: framebuffer@1d385000 {
20 compatible = "simple-framebuffer"; 64 compatible = "simple-framebuffer";
21 reg = <0x1d385000 (1600 * 1200 * 2)>; 65 reg = <0x1d385000 (1600 * 1200 * 2)>;
22 width = <1600>; 66 width = <1600>;
23 height = <1200>; 67 height = <1200>;
24 stride = <(1600 * 2)>; 68 stride = <(1600 * 2)>;
25 format = "r5g6b5"; 69 format = "r5g6b5";
70 clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>;
71 display = <&lcdc0>;
72 };
73 stdout-path = "display0";
74};
75
76soc@01c00000 {
77 lcdc0: lcdc@1c0c000 {
78 compatible = "allwinner,sun4i-a10-lcdc";
79 ...
26 }; 80 };
81};
82
83
84*) Older devicetree files may have a compatible = "simple-framebuffer" node
85in a different place, operating systems must first enumerate any compatible
86nodes found under chosen and then check for other compatible nodes.
diff --git a/Documentation/devicetree/bindings/w1/omap-hdq.txt b/Documentation/devicetree/bindings/w1/omap-hdq.txt
new file mode 100644
index 000000000000..fef794741bd1
--- /dev/null
+++ b/Documentation/devicetree/bindings/w1/omap-hdq.txt
@@ -0,0 +1,17 @@
1* OMAP HDQ One wire bus master controller
2
3Required properties:
4- compatible : should be "ti,omap3-1w"
5- reg : Address and length of the register set for the device
6- interrupts : interrupt line.
7- ti,hwmods : "hdq1w"
8
9Example:
10
11- From omap3.dtsi
12 hdqw1w: 1w@480b2000 {
13 compatible = "ti,omap3-1w";
14 reg = <0x480b2000 0x1000>;
15 interrupts = <58>;
16 ti,hwmods = "hdq1w";
17 };
diff --git a/Documentation/devicetree/bindings/watchdog/marvel.txt b/Documentation/devicetree/bindings/watchdog/marvel.txt
index 97223fddb7bd..858ed9221ac4 100644
--- a/Documentation/devicetree/bindings/watchdog/marvel.txt
+++ b/Documentation/devicetree/bindings/watchdog/marvel.txt
@@ -17,6 +17,18 @@ For "marvell,armada-375-wdt" and "marvell,armada-380-wdt":
17- reg : A third entry is mandatory and should contain the 17- reg : A third entry is mandatory and should contain the
18 shared mask/unmask RSTOUT address. 18 shared mask/unmask RSTOUT address.
19 19
20Clocks required for compatibles = "marvell,orion-wdt",
21 "marvell,armada-370-wdt":
22- clocks : Must contain a single entry describing the clock input
23
24Clocks required for compatibles = "marvell,armada-xp-wdt"
25 "marvell,armada-375-wdt"
26 "marvell,armada-380-wdt":
27- clocks : Must contain an entry for each entry in clock-names.
28- clock-names : Must include the following entries:
29 "nbclk" (L2/coherency fabric clock),
30 "fixed" (Reference 25 MHz fixed-clock).
31
20Optional properties: 32Optional properties:
21 33
22- interrupts : Contains the IRQ for watchdog expiration 34- interrupts : Contains the IRQ for watchdog expiration
@@ -30,4 +42,5 @@ Example:
30 interrupts = <3>; 42 interrupts = <3>;
31 timeout-sec = <10>; 43 timeout-sec = <10>;
32 status = "okay"; 44 status = "okay";
45 clocks = <&gate_clk 7>;
33 }; 46 };
diff --git a/Documentation/devicetree/of_selftest.txt b/Documentation/devicetree/of_selftest.txt
index 1e3d5c92b5e3..57a808b588bf 100644
--- a/Documentation/devicetree/of_selftest.txt
+++ b/Documentation/devicetree/of_selftest.txt
@@ -63,7 +63,6 @@ struct device_node {
63 struct device_node *parent; 63 struct device_node *parent;
64 struct device_node *child; 64 struct device_node *child;
65 struct device_node *sibling; 65 struct device_node *sibling;
66 struct device_node *allnext; /* next in list of all nodes */
67 ... 66 ...
68 }; 67 };
69 68
@@ -99,12 +98,6 @@ child11 -> sibling12 -> sibling13 -> sibling14 -> null
99Figure 1: Generic structure of un-flattened device tree 98Figure 1: Generic structure of un-flattened device tree
100 99
101 100
102*allnext: it is used to link all the nodes of DT into a list. So, for the
103 above tree the list would be as follows:
104
105root->child1->child11->sibling12->sibling13->child131->sibling14->sibling2->
106child21->sibling22->sibling23->sibling3->child31->sibling32->sibling4->null
107
108Before executing OF selftest, it is required to attach the test data to 101Before executing OF selftest, it is required to attach the test data to
109machine's device tree (if present). So, when selftest_data_add() is called, 102machine's device tree (if present). So, when selftest_data_add() is called,
110at first it reads the flattened device tree data linked into the kernel image 103at first it reads the flattened device tree data linked into the kernel image
@@ -131,11 +124,6 @@ root ('/')
131 test-child01 null null null 124 test-child01 null null null
132 125
133 126
134allnext list:
135
136root->testcase-data->test-child0->test-child01->test-sibling1->test-sibling2
137->test-sibling3->null
138
139Figure 2: Example test data tree to be attached to live tree. 127Figure 2: Example test data tree to be attached to live tree.
140 128
141According to the scenario above, the live tree is already present so it isn't 129According to the scenario above, the live tree is already present so it isn't
@@ -204,8 +192,6 @@ detached and then moving up the parent nodes are removed, and eventually the
204whole tree). selftest_data_remove() calls detach_node_and_children() that uses 192whole tree). selftest_data_remove() calls detach_node_and_children() that uses
205of_detach_node() to detach the nodes from the live device tree. 193of_detach_node() to detach the nodes from the live device tree.
206 194
207To detach a node, of_detach_node() first updates all_next linked list, by 195To detach a node, of_detach_node() either updates the child pointer of given
208attaching the previous node's allnext to current node's allnext pointer. And 196node's parent to its sibling or attaches the previous sibling to the given
209then, it either updates the child pointer of given node's parent to its 197node's sibling, as appropriate. That is it :)
210sibling or attaches the previous sibling to the given node's sibling, as
211appropriate. That is it :)
diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt
new file mode 100644
index 000000000000..30ae758e3eef
--- /dev/null
+++ b/Documentation/devicetree/overlay-notes.txt
@@ -0,0 +1,133 @@
1Device Tree Overlay Notes
2-------------------------
3
4This document describes the implementation of the in-kernel
5device tree overlay functionality residing in drivers/of/overlay.c and is a
6companion document to Documentation/devicetree/dt-object-internal.txt[1] &
7Documentation/devicetree/dynamic-resolution-notes.txt[2]
8
9How overlays work
10-----------------
11
12A Device Tree's overlay purpose is to modify the kernel's live tree, and
13have the modification affecting the state of the the kernel in a way that
14is reflecting the changes.
15Since the kernel mainly deals with devices, any new device node that result
16in an active device should have it created while if the device node is either
17disabled or removed all together, the affected device should be deregistered.
18
19Lets take an example where we have a foo board with the following base tree
20which is taken from [1].
21
22---- foo.dts -----------------------------------------------------------------
23 /* FOO platform */
24 / {
25 compatible = "corp,foo";
26
27 /* shared resources */
28 res: res {
29 };
30
31 /* On chip peripherals */
32 ocp: ocp {
33 /* peripherals that are always instantiated */
34 peripheral1 { ... };
35 }
36 };
37---- foo.dts -----------------------------------------------------------------
38
39The overlay bar.dts, when loaded (and resolved as described in [2]) should
40
41---- bar.dts -----------------------------------------------------------------
42/plugin/; /* allow undefined label references and record them */
43/ {
44 .... /* various properties for loader use; i.e. part id etc. */
45 fragment@0 {
46 target = <&ocp>;
47 __overlay__ {
48 /* bar peripheral */
49 bar {
50 compatible = "corp,bar";
51 ... /* various properties and child nodes */
52 }
53 };
54 };
55};
56---- bar.dts -----------------------------------------------------------------
57
58result in foo+bar.dts
59
60---- foo+bar.dts -------------------------------------------------------------
61 /* FOO platform + bar peripheral */
62 / {
63 compatible = "corp,foo";
64
65 /* shared resources */
66 res: res {
67 };
68
69 /* On chip peripherals */
70 ocp: ocp {
71 /* peripherals that are always instantiated */
72 peripheral1 { ... };
73
74 /* bar peripheral */
75 bar {
76 compatible = "corp,bar";
77 ... /* various properties and child nodes */
78 }
79 }
80 };
81---- foo+bar.dts -------------------------------------------------------------
82
83As a result of the the overlay, a new device node (bar) has been created
84so a bar platform device will be registered and if a matching device driver
85is loaded the device will be created as expected.
86
87Overlay in-kernel API
88--------------------------------
89
90The API is quite easy to use.
91
921. Call of_overlay_create() to create and apply an overlay. The return value
93is a cookie identifying this overlay.
94
952. Call of_overlay_destroy() to remove and cleanup the overlay previously
96created via the call to of_overlay_create(). Removal of an overlay that
97is stacked by another will not be permitted.
98
99Finally, if you need to remove all overlays in one-go, just call
100of_overlay_destroy_all() which will remove every single one in the correct
101order.
102
103Overlay DTS Format
104------------------
105
106The DTS of an overlay should have the following format:
107
108{
109 /* ignored properties by the overlay */
110
111 fragment@0 { /* first child node */
112
113 target=<phandle>; /* phandle target of the overlay */
114 or
115 target-path="/path"; /* target path of the overlay */
116
117 __overlay__ {
118 property-a; /* add property-a to the target */
119 node-a { /* add to an existing, or create a node-a */
120 ...
121 };
122 };
123 }
124 fragment@1 { /* second child node */
125 ...
126 };
127 /* more fragments follow */
128}
129
130Using the non-phandle based target method allows one to use a base DT which does
131not contain a __symbols__ node, i.e. it was not compiled with the -@ option.
132The __symbols__ node is only required for the target=<phandle> method, since it
133contains the information required to map from a phandle to a tree location.
diff --git a/Documentation/devicetree/todo.txt b/Documentation/devicetree/todo.txt
index c3cf0659bd19..b5139d1de811 100644
--- a/Documentation/devicetree/todo.txt
+++ b/Documentation/devicetree/todo.txt
@@ -2,7 +2,6 @@ Todo list for devicetree:
2 2
3=== General structure === 3=== General structure ===
4- Switch from custom lists to (h)list_head for nodes and properties structure 4- Switch from custom lists to (h)list_head for nodes and properties structure
5- Remove of_allnodes list and iterate using list of child nodes alone
6 5
7=== CONFIG_OF_DYNAMIC === 6=== CONFIG_OF_DYNAMIC ===
8- Switch to RCU for tree updates and get rid of global spinlock 7- Switch to RCU for tree updates and get rid of global spinlock
diff --git a/Documentation/dmaengine.txt b/Documentation/dmaengine/client.txt
index 11fb87ff6cd0..11fb87ff6cd0 100644
--- a/Documentation/dmaengine.txt
+++ b/Documentation/dmaengine/client.txt
diff --git a/Documentation/dmatest.txt b/Documentation/dmaengine/dmatest.txt
index dd77a81bdb80..dd77a81bdb80 100644
--- a/Documentation/dmatest.txt
+++ b/Documentation/dmaengine/dmatest.txt
diff --git a/Documentation/dmaengine/provider.txt b/Documentation/dmaengine/provider.txt
new file mode 100644
index 000000000000..766658ccf235
--- /dev/null
+++ b/Documentation/dmaengine/provider.txt
@@ -0,0 +1,366 @@
1DMAengine controller documentation
2==================================
3
4Hardware Introduction
5+++++++++++++++++++++
6
7Most of the Slave DMA controllers have the same general principles of
8operations.
9
10They have a given number of channels to use for the DMA transfers, and
11a given number of requests lines.
12
13Requests and channels are pretty much orthogonal. Channels can be used
14to serve several to any requests. To simplify, channels are the
15entities that will be doing the copy, and requests what endpoints are
16involved.
17
18The request lines actually correspond to physical lines going from the
19DMA-eligible devices to the controller itself. Whenever the device
20will want to start a transfer, it will assert a DMA request (DRQ) by
21asserting that request line.
22
23A very simple DMA controller would only take into account a single
24parameter: the transfer size. At each clock cycle, it would transfer a
25byte of data from one buffer to another, until the transfer size has
26been reached.
27
28That wouldn't work well in the real world, since slave devices might
29require a specific number of bits to be transferred in a single
30cycle. For example, we may want to transfer as much data as the
31physical bus allows to maximize performances when doing a simple
32memory copy operation, but our audio device could have a narrower FIFO
33that requires data to be written exactly 16 or 24 bits at a time. This
34is why most if not all of the DMA controllers can adjust this, using a
35parameter called the transfer width.
36
37Moreover, some DMA controllers, whenever the RAM is used as a source
38or destination, can group the reads or writes in memory into a buffer,
39so instead of having a lot of small memory accesses, which is not
40really efficient, you'll get several bigger transfers. This is done
41using a parameter called the burst size, that defines how many single
42reads/writes it's allowed to do without the controller splitting the
43transfer into smaller sub-transfers.
44
45Our theoretical DMA controller would then only be able to do transfers
46that involve a single contiguous block of data. However, some of the
47transfers we usually have are not, and want to copy data from
48non-contiguous buffers to a contiguous buffer, which is called
49scatter-gather.
50
51DMAEngine, at least for mem2dev transfers, require support for
52scatter-gather. So we're left with two cases here: either we have a
53quite simple DMA controller that doesn't support it, and we'll have to
54implement it in software, or we have a more advanced DMA controller,
55that implements in hardware scatter-gather.
56
57The latter are usually programmed using a collection of chunks to
58transfer, and whenever the transfer is started, the controller will go
59over that collection, doing whatever we programmed there.
60
61This collection is usually either a table or a linked list. You will
62then push either the address of the table and its number of elements,
63or the first item of the list to one channel of the DMA controller,
64and whenever a DRQ will be asserted, it will go through the collection
65to know where to fetch the data from.
66
67Either way, the format of this collection is completely dependent on
68your hardware. Each DMA controller will require a different structure,
69but all of them will require, for every chunk, at least the source and
70destination addresses, whether it should increment these addresses or
71not and the three parameters we saw earlier: the burst size, the
72transfer width and the transfer size.
73
74The one last thing is that usually, slave devices won't issue DRQ by
75default, and you have to enable this in your slave device driver first
76whenever you're willing to use DMA.
77
78These were just the general memory-to-memory (also called mem2mem) or
79memory-to-device (mem2dev) kind of transfers. Most devices often
80support other kind of transfers or memory operations that dmaengine
81support and will be detailed later in this document.
82
83DMA Support in Linux
84++++++++++++++++++++
85
86Historically, DMA controller drivers have been implemented using the
87async TX API, to offload operations such as memory copy, XOR,
88cryptography, etc., basically any memory to memory operation.
89
90Over time, the need for memory to device transfers arose, and
91dmaengine was extended. Nowadays, the async TX API is written as a
92layer on top of dmaengine, and acts as a client. Still, dmaengine
93accommodates that API in some cases, and made some design choices to
94ensure that it stayed compatible.
95
96For more information on the Async TX API, please look the relevant
97documentation file in Documentation/crypto/async-tx-api.txt.
98
99DMAEngine Registration
100++++++++++++++++++++++
101
102struct dma_device Initialization
103--------------------------------
104
105Just like any other kernel framework, the whole DMAEngine registration
106relies on the driver filling a structure and registering against the
107framework. In our case, that structure is dma_device.
108
109The first thing you need to do in your driver is to allocate this
110structure. Any of the usual memory allocators will do, but you'll also
111need to initialize a few fields in there:
112
113 * channels: should be initialized as a list using the
114 INIT_LIST_HEAD macro for example
115
116 * dev: should hold the pointer to the struct device associated
117 to your current driver instance.
118
119Supported transaction types
120---------------------------
121
122The next thing you need is to set which transaction types your device
123(and driver) supports.
124
125Our dma_device structure has a field called cap_mask that holds the
126various types of transaction supported, and you need to modify this
127mask using the dma_cap_set function, with various flags depending on
128transaction types you support as an argument.
129
130All those capabilities are defined in the dma_transaction_type enum,
131in include/linux/dmaengine.h
132
133Currently, the types available are:
134 * DMA_MEMCPY
135 - The device is able to do memory to memory copies
136
137 * DMA_XOR
138 - The device is able to perform XOR operations on memory areas
139 - Used to accelerate XOR intensive tasks, such as RAID5
140
141 * DMA_XOR_VAL
142 - The device is able to perform parity check using the XOR
143 algorithm against a memory buffer.
144
145 * DMA_PQ
146 - The device is able to perform RAID6 P+Q computations, P being a
147 simple XOR, and Q being a Reed-Solomon algorithm.
148
149 * DMA_PQ_VAL
150 - The device is able to perform parity check using RAID6 P+Q
151 algorithm against a memory buffer.
152
153 * DMA_INTERRUPT
154 - The device is able to trigger a dummy transfer that will
155 generate periodic interrupts
156 - Used by the client drivers to register a callback that will be
157 called on a regular basis through the DMA controller interrupt
158
159 * DMA_SG
160 - The device supports memory to memory scatter-gather
161 transfers.
162 - Even though a plain memcpy can look like a particular case of a
163 scatter-gather transfer, with a single chunk to transfer, it's a
164 distinct transaction type in the mem2mem transfers case
165
166 * DMA_PRIVATE
167 - The devices only supports slave transfers, and as such isn't
168 available for async transfers.
169
170 * DMA_ASYNC_TX
171 - Must not be set by the device, and will be set by the framework
172 if needed
173 - /* TODO: What is it about? */
174
175 * DMA_SLAVE
176 - The device can handle device to memory transfers, including
177 scatter-gather transfers.
178 - While in the mem2mem case we were having two distinct types to
179 deal with a single chunk to copy or a collection of them, here,
180 we just have a single transaction type that is supposed to
181 handle both.
182 - If you want to transfer a single contiguous memory buffer,
183 simply build a scatter list with only one item.
184
185 * DMA_CYCLIC
186 - The device can handle cyclic transfers.
187 - A cyclic transfer is a transfer where the chunk collection will
188 loop over itself, with the last item pointing to the first.
189 - It's usually used for audio transfers, where you want to operate
190 on a single ring buffer that you will fill with your audio data.
191
192 * DMA_INTERLEAVE
193 - The device supports interleaved transfer.
194 - These transfers can transfer data from a non-contiguous buffer
195 to a non-contiguous buffer, opposed to DMA_SLAVE that can
196 transfer data from a non-contiguous data set to a continuous
197 destination buffer.
198 - It's usually used for 2d content transfers, in which case you
199 want to transfer a portion of uncompressed data directly to the
200 display to print it
201
202These various types will also affect how the source and destination
203addresses change over time.
204
205Addresses pointing to RAM are typically incremented (or decremented)
206after each transfer. In case of a ring buffer, they may loop
207(DMA_CYCLIC). Addresses pointing to a device's register (e.g. a FIFO)
208are typically fixed.
209
210Device operations
211-----------------
212
213Our dma_device structure also requires a few function pointers in
214order to implement the actual logic, now that we described what
215operations we were able to perform.
216
217The functions that we have to fill in there, and hence have to
218implement, obviously depend on the transaction types you reported as
219supported.
220
221 * device_alloc_chan_resources
222 * device_free_chan_resources
223 - These functions will be called whenever a driver will call
224 dma_request_channel or dma_release_channel for the first/last
225 time on the channel associated to that driver.
226 - They are in charge of allocating/freeing all the needed
227 resources in order for that channel to be useful for your
228 driver.
229 - These functions can sleep.
230
231 * device_prep_dma_*
232 - These functions are matching the capabilities you registered
233 previously.
234 - These functions all take the buffer or the scatterlist relevant
235 for the transfer being prepared, and should create a hardware
236 descriptor or a list of hardware descriptors from it
237 - These functions can be called from an interrupt context
238 - Any allocation you might do should be using the GFP_NOWAIT
239 flag, in order not to potentially sleep, but without depleting
240 the emergency pool either.
241 - Drivers should try to pre-allocate any memory they might need
242 during the transfer setup at probe time to avoid putting to
243 much pressure on the nowait allocator.
244
245 - It should return a unique instance of the
246 dma_async_tx_descriptor structure, that further represents this
247 particular transfer.
248
249 - This structure can be initialized using the function
250 dma_async_tx_descriptor_init.
251 - You'll also need to set two fields in this structure:
252 + flags:
253 TODO: Can it be modified by the driver itself, or
254 should it be always the flags passed in the arguments
255
256 + tx_submit: A pointer to a function you have to implement,
257 that is supposed to push the current
258 transaction descriptor to a pending queue, waiting
259 for issue_pending to be called.
260
261 * device_issue_pending
262 - Takes the first transaction descriptor in the pending queue,
263 and starts the transfer. Whenever that transfer is done, it
264 should move to the next transaction in the list.
265 - This function can be called in an interrupt context
266
267 * device_tx_status
268 - Should report the bytes left to go over on the given channel
269 - Should only care about the transaction descriptor passed as
270 argument, not the currently active one on a given channel
271 - The tx_state argument might be NULL
272 - Should use dma_set_residue to report it
273 - In the case of a cyclic transfer, it should only take into
274 account the current period.
275 - This function can be called in an interrupt context.
276
277 * device_control
278 - Used by client drivers to control and configure the channel it
279 has a handle on.
280 - Called with a command and an argument
281 + The command is one of the values listed by the enum
282 dma_ctrl_cmd. The valid commands are:
283 + DMA_PAUSE
284 + Pauses a transfer on the channel
285 + This command should operate synchronously on the channel,
286 pausing right away the work of the given channel
287 + DMA_RESUME
288 + Restarts a transfer on the channel
289 + This command should operate synchronously on the channel,
290 resuming right away the work of the given channel
291 + DMA_TERMINATE_ALL
292 + Aborts all the pending and ongoing transfers on the
293 channel
294 + This command should operate synchronously on the channel,
295 terminating right away all the channels
296 + DMA_SLAVE_CONFIG
297 + Reconfigures the channel with passed configuration
298 + This command should NOT perform synchronously, or on any
299 currently queued transfers, but only on subsequent ones
300 + In this case, the function will receive a
301 dma_slave_config structure pointer as an argument, that
302 will detail which configuration to use.
303 + Even though that structure contains a direction field,
304 this field is deprecated in favor of the direction
305 argument given to the prep_* functions
306 + FSLDMA_EXTERNAL_START
307 + TODO: Why does that even exist?
308 + The argument is an opaque unsigned long. This actually is a
309 pointer to a struct dma_slave_config that should be used only
310 in the DMA_SLAVE_CONFIG.
311
312 * device_slave_caps
313 - Called through the framework by client drivers in order to have
314 an idea of what are the properties of the channel allocated to
315 them.
316 - Such properties are the buswidth, available directions, etc.
317 - Required for every generic layer doing DMA transfers, such as
318 ASoC.
319
320Misc notes (stuff that should be documented, but don't really know
321where to put them)
322------------------------------------------------------------------
323 * dma_run_dependencies
324 - Should be called at the end of an async TX transfer, and can be
325 ignored in the slave transfers case.
326 - Makes sure that dependent operations are run before marking it
327 as complete.
328
329 * dma_cookie_t
330 - it's a DMA transaction ID that will increment over time.
331 - Not really relevant any more since the introduction of virt-dma
332 that abstracts it away.
333
334 * DMA_CTRL_ACK
335 - Undocumented feature
336 - No one really has an idea of what it's about, besides being
337 related to reusing the DMA transaction descriptors or having
338 additional transactions added to it in the async-tx API
339 - Useless in the case of the slave API
340
341General Design Notes
342--------------------
343
344Most of the DMAEngine drivers you'll see are based on a similar design
345that handles the end of transfer interrupts in the handler, but defer
346most work to a tasklet, including the start of a new transfer whenever
347the previous transfer ended.
348
349This is a rather inefficient design though, because the inter-transfer
350latency will be not only the interrupt latency, but also the
351scheduling latency of the tasklet, which will leave the channel idle
352in between, which will slow down the global transfer rate.
353
354You should avoid this kind of practice, and instead of electing a new
355transfer in your tasklet, move that part to the interrupt handler in
356order to have a shorter idle window (that we can't really avoid
357anyway).
358
359Glossary
360--------
361
362Burst: A number of consecutive read or write operations
363 that can be queued to buffers before being flushed to
364 memory.
365Chunk: A contiguous collection of bursts
366Transfer: A collection of chunks (be it contiguous or not)
diff --git a/Documentation/email-clients.txt b/Documentation/email-clients.txt
index 9af538be3751..eede6088f978 100644
--- a/Documentation/email-clients.txt
+++ b/Documentation/email-clients.txt
@@ -77,6 +77,17 @@ should appear, and then pressing CTRL-R let you specify the patch file
77to insert into the message. 77to insert into the message.
78 78
79~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 79~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80Claws Mail (GUI)
81
82Works. Some people use this successfully for patches.
83
84To insert a patch use Message->Insert File (CTRL+i) or an external editor.
85
86If the inserted patch has to be edited in the Claws composition window
87"Auto wrapping" in Configuration->Preferences->Compose->Wrapping should be
88disabled.
89
90~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80Evolution (GUI) 91Evolution (GUI)
81 92
82Some people use this successfully for patches. 93Some people use this successfully for patches.
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt
index 3a863f692728..88ab81c79109 100644
--- a/Documentation/filesystems/debugfs.txt
+++ b/Documentation/filesystems/debugfs.txt
@@ -140,7 +140,7 @@ file.
140 struct dentry *parent, 140 struct dentry *parent,
141 struct debugfs_regset32 *regset); 141 struct debugfs_regset32 *regset);
142 142
143 int debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs, 143 void debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs,
144 int nregs, void __iomem *base, char *prefix); 144 int nregs, void __iomem *base, char *prefix);
145 145
146The "base" argument may be 0, but you may want to build the reg32 array 146The "base" argument may be 0, but you may want to build the reg32 array
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt
index 2cca5a25ef89..e0950c483c22 100644
--- a/Documentation/filesystems/f2fs.txt
+++ b/Documentation/filesystems/f2fs.txt
@@ -122,6 +122,10 @@ disable_ext_identify Disable the extension list configured by mkfs, so f2fs
122inline_xattr Enable the inline xattrs feature. 122inline_xattr Enable the inline xattrs feature.
123inline_data Enable the inline data feature: New created small(<~3.4k) 123inline_data Enable the inline data feature: New created small(<~3.4k)
124 files can be written into inode block. 124 files can be written into inode block.
125inline_dentry Enable the inline dir feature: data in new created
126 directory entries can be written into inode block. The
127 space of inode block which is used to store inline
128 dentries is limited to ~3.4k.
125flush_merge Merge concurrent cache_flush commands as much as possible 129flush_merge Merge concurrent cache_flush commands as much as possible
126 to eliminate redundant command issues. If the underlying 130 to eliminate redundant command issues. If the underlying
127 device handles the cache_flush command relatively slowly, 131 device handles the cache_flush command relatively slowly,
@@ -131,6 +135,9 @@ nobarrier This option can be used if underlying storage guarantees
131 If this option is set, no cache_flush commands are issued 135 If this option is set, no cache_flush commands are issued
132 but f2fs still guarantees the write ordering of all the 136 but f2fs still guarantees the write ordering of all the
133 data writes. 137 data writes.
138fastboot This option is used when a system wants to reduce mount
139 time as much as possible, even though normal performance
140 can be sacrificed.
134 141
135================================================================================ 142================================================================================
136DEBUGFS ENTRIES 143DEBUGFS ENTRIES
diff --git a/Documentation/filesystems/nfs/Exporting b/Documentation/filesystems/nfs/Exporting
index c8f036a9b13f..520a4becb75c 100644
--- a/Documentation/filesystems/nfs/Exporting
+++ b/Documentation/filesystems/nfs/Exporting
@@ -72,24 +72,11 @@ c/ Helper routines to allocate anonymous dentries, and to help attach
72 DCACHE_DISCONNECTED) dentry is allocated and attached. 72 DCACHE_DISCONNECTED) dentry is allocated and attached.
73 In the case of a directory, care is taken that only one dentry 73 In the case of a directory, care is taken that only one dentry
74 can ever be attached. 74 can ever be attached.
75 d_splice_alias(inode, dentry) or d_materialise_unique(dentry, inode) 75 d_splice_alias(inode, dentry) will introduce a new dentry into the tree;
76 will introduce a new dentry into the tree; either the passed-in 76 either the passed-in dentry or a preexisting alias for the given inode
77 dentry or a preexisting alias for the given inode (such as an 77 (such as an anonymous one created by d_obtain_alias), if appropriate.
78 anonymous one created by d_obtain_alias), if appropriate. The two 78 It returns NULL when the passed-in dentry is used, following the calling
79 functions differ in their handling of directories with preexisting 79 convention of ->lookup.
80 aliases:
81 d_splice_alias will use any existing IS_ROOT dentry, but it will
82 return -EIO rather than try to move a dentry with a different
83 parent. This is appropriate for local filesystems, which
84 should never see such an alias unless the filesystem is
85 corrupted somehow (for example, if two on-disk directory
86 entries refer to the same directory.)
87 d_materialise_unique will attempt to move any dentry. This is
88 appropriate for distributed filesystems, where finding a
89 directory other than where we last cached it may be a normal
90 consequence of concurrent operations on other hosts.
91 Both functions return NULL when the passed-in dentry is used,
92 following the calling convention of ->lookup.
93 80
94 81
95Filesystem Issues 82Filesystem Issues
diff --git a/Documentation/filesystems/overlayfs.txt b/Documentation/filesystems/overlayfs.txt
index 530850a72735..a27c950ece61 100644
--- a/Documentation/filesystems/overlayfs.txt
+++ b/Documentation/filesystems/overlayfs.txt
@@ -64,7 +64,7 @@ is formed.
64At mount time, the two directories given as mount options "lowerdir" and 64At mount time, the two directories given as mount options "lowerdir" and
65"upperdir" are combined into a merged directory: 65"upperdir" are combined into a merged directory:
66 66
67 mount -t overlayfs overlayfs -olowerdir=/lower,upperdir=/upper,\ 67 mount -t overlay overlay -olowerdir=/lower,upperdir=/upper,\
68workdir=/work /merged 68workdir=/work /merged
69 69
70The "workdir" needs to be an empty directory on the same filesystem 70The "workdir" needs to be an empty directory on the same filesystem
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 0f3a1390bf00..fa2db081505e 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -463,3 +463,11 @@ in your dentry operations instead.
463 of the in-tree instances did). inode_hash_lock is still held, 463 of the in-tree instances did). inode_hash_lock is still held,
464 of course, so they are still serialized wrt removal from inode hash, 464 of course, so they are still serialized wrt removal from inode hash,
465 as well as wrt set() callback of iget5_locked(). 465 as well as wrt set() callback of iget5_locked().
466--
467[mandatory]
468 d_materialise_unique() is gone; d_splice_alias() does everything you
469 need now. Remember that they have opposite orders of arguments ;-/
470--
471[mandatory]
472 f_dentry is gone; use f_path.dentry, or, better yet, see if you can avoid
473 it entirely.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index eb8a10e22f7c..aae9dd13c91f 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -1272,7 +1272,7 @@ softirq.
1272 1272
1273 1273
12741.9 Ext4 file system parameters 12741.9 Ext4 file system parameters
1275------------------------------ 1275-------------------------------
1276 1276
1277Information about mounted ext4 file systems can be found in 1277Information about mounted ext4 file systems can be found in
1278/proc/fs/ext4. Each mounted filesystem will have a directory in 1278/proc/fs/ext4. Each mounted filesystem will have a directory in
diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt
index 8ea3e90ace07..b797ed38de46 100644
--- a/Documentation/filesystems/seq_file.txt
+++ b/Documentation/filesystems/seq_file.txt
@@ -180,23 +180,19 @@ output must be passed to the seq_file code. Some utility functions have
180been defined which make this task easy. 180been defined which make this task easy.
181 181
182Most code will simply use seq_printf(), which works pretty much like 182Most code will simply use seq_printf(), which works pretty much like
183printk(), but which requires the seq_file pointer as an argument. It is 183printk(), but which requires the seq_file pointer as an argument.
184common to ignore the return value from seq_printf(), but a function
185producing complicated output may want to check that value and quit if
186something non-zero is returned; an error return means that the seq_file
187buffer has been filled and further output will be discarded.
188 184
189For straight character output, the following functions may be used: 185For straight character output, the following functions may be used:
190 186
191 int seq_putc(struct seq_file *m, char c); 187 seq_putc(struct seq_file *m, char c);
192 int seq_puts(struct seq_file *m, const char *s); 188 seq_puts(struct seq_file *m, const char *s);
193 int seq_escape(struct seq_file *m, const char *s, const char *esc); 189 seq_escape(struct seq_file *m, const char *s, const char *esc);
194 190
195The first two output a single character and a string, just like one would 191The first two output a single character and a string, just like one would
196expect. seq_escape() is like seq_puts(), except that any character in s 192expect. seq_escape() is like seq_puts(), except that any character in s
197which is in the string esc will be represented in octal form in the output. 193which is in the string esc will be represented in octal form in the output.
198 194
199There is also a pair of functions for printing filenames: 195There are also a pair of functions for printing filenames:
200 196
201 int seq_path(struct seq_file *m, struct path *path, char *esc); 197 int seq_path(struct seq_file *m, struct path *path, char *esc);
202 int seq_path_root(struct seq_file *m, struct path *path, 198 int seq_path_root(struct seq_file *m, struct path *path,
@@ -209,6 +205,14 @@ root is desired, it can be used with seq_path_root(). Note that, if it
209turns out that path cannot be reached from root, the value of root will be 205turns out that path cannot be reached from root, the value of root will be
210changed in seq_file_root() to a root which *does* work. 206changed in seq_file_root() to a root which *does* work.
211 207
208A function producing complicated output may want to check
209 bool seq_has_overflowed(struct seq_file *m);
210and avoid further seq_<output> calls if true is returned.
211
212A true return from seq_has_overflowed means that the seq_file buffer will
213be discarded and the seq_show function will attempt to allocate a larger
214buffer and retry printing.
215
212 216
213Making it all work 217Making it all work
214 218
diff --git a/Documentation/filesystems/squashfs.txt b/Documentation/filesystems/squashfs.txt
index 403c090aca39..e5274f84dc56 100644
--- a/Documentation/filesystems/squashfs.txt
+++ b/Documentation/filesystems/squashfs.txt
@@ -2,10 +2,10 @@ SQUASHFS 4.0 FILESYSTEM
2======================= 2=======================
3 3
4Squashfs is a compressed read-only filesystem for Linux. 4Squashfs is a compressed read-only filesystem for Linux.
5It uses zlib/lzo/xz compression to compress files, inodes and directories. 5It uses zlib, lz4, lzo, or xz compression to compress files, inodes and
6Inodes in the system are very small and all blocks are packed to minimise 6directories. Inodes in the system are very small and all blocks are packed to
7data overhead. Block sizes greater than 4K are supported up to a maximum 7minimise data overhead. Block sizes greater than 4K are supported up to a
8of 1Mbytes (default block size 128K). 8maximum of 1Mbytes (default block size 128K).
9 9
10Squashfs is intended for general read-only filesystem use, for archival 10Squashfs is intended for general read-only filesystem use, for archival
11use (i.e. in cases where a .tar.gz file may be used), and in constrained 11use (i.e. in cases where a .tar.gz file may be used), and in constrained
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 20bf204426ca..43ce0507ee25 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -835,7 +835,7 @@ struct file_operations {
835 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); 835 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int);
836 int (*setlease)(struct file *, long arg, struct file_lock **, void **); 836 int (*setlease)(struct file *, long arg, struct file_lock **, void **);
837 long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len); 837 long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len);
838 int (*show_fdinfo)(struct seq_file *m, struct file *f); 838 void (*show_fdinfo)(struct seq_file *m, struct file *f);
839}; 839};
840 840
841Again, all methods are called without any locks being held, unless 841Again, all methods are called without any locks being held, unless
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt
index 6ce544191ca6..d85fbae451ea 100644
--- a/Documentation/gpio/consumer.txt
+++ b/Documentation/gpio/consumer.txt
@@ -199,6 +199,33 @@ The active-low state of a GPIO can also be queried using the following call:
199Note that these functions should only be used with great moderation ; a driver 199Note that these functions should only be used with great moderation ; a driver
200should not have to care about the physical line level. 200should not have to care about the physical line level.
201 201
202
203Set multiple GPIO outputs with a single function call
204-----------------------------------------------------
205The following functions set the output values of an array of GPIOs:
206
207 void gpiod_set_array(unsigned int array_size,
208 struct gpio_desc **desc_array,
209 int *value_array)
210 void gpiod_set_raw_array(unsigned int array_size,
211 struct gpio_desc **desc_array,
212 int *value_array)
213 void gpiod_set_array_cansleep(unsigned int array_size,
214 struct gpio_desc **desc_array,
215 int *value_array)
216 void gpiod_set_raw_array_cansleep(unsigned int array_size,
217 struct gpio_desc **desc_array,
218 int *value_array)
219
220The array can be an arbitrary set of GPIOs. The functions will try to set
221GPIOs belonging to the same bank or chip simultaneously if supported by the
222corresponding chip driver. In that case a significantly improved performance
223can be expected. If simultaneous setting is not possible the GPIOs will be set
224sequentially.
225Note that for optimal performance GPIOs belonging to the same chip should be
226contiguous within the array of descriptors.
227
228
202GPIOs mapped to IRQs 229GPIOs mapped to IRQs
203-------------------- 230--------------------
204GPIO lines can quite often be used as IRQs. You can get the IRQ number 231GPIO lines can quite often be used as IRQs. You can get the IRQ number
@@ -219,6 +246,24 @@ part of the IRQ interface, e.g. IRQF_TRIGGER_FALLING, as are system wakeup
219capabilities. 246capabilities.
220 247
221 248
249GPIOs and ACPI
250==============
251
252On ACPI systems, GPIOs are described by GpioIo()/GpioInt() resources listed by
253the _CRS configuration objects of devices. Those resources do not provide
254connection IDs (names) for GPIOs, so it is necessary to use an additional
255mechanism for this purpose.
256
257Systems compliant with ACPI 5.1 or newer may provide a _DSD configuration object
258which, among other things, may be used to provide connection IDs for specific
259GPIOs described by the GpioIo()/GpioInt() resources in _CRS. If that is the
260case, it will be handled by the GPIO subsystem automatically. However, if the
261_DSD is not present, the mappings between GpioIo()/GpioInt() resources and GPIO
262connection IDs need to be provided by device drivers.
263
264For details refer to Documentation/acpi/gpio-properties.txt
265
266
222Interacting With the Legacy GPIO Subsystem 267Interacting With the Legacy GPIO Subsystem
223========================================== 268==========================================
224Many kernel subsystems still handle GPIOs using the legacy integer-based 269Many kernel subsystems still handle GPIOs using the legacy integer-based
diff --git a/Documentation/gpio/driver.txt b/Documentation/gpio/driver.txt
index 31e0b5db55d8..90d0f6aba7a6 100644
--- a/Documentation/gpio/driver.txt
+++ b/Documentation/gpio/driver.txt
@@ -158,12 +158,12 @@ Locking IRQ usage
158Input GPIOs can be used as IRQ signals. When this happens, a driver is requested 158Input GPIOs can be used as IRQ signals. When this happens, a driver is requested
159to mark the GPIO as being used as an IRQ: 159to mark the GPIO as being used as an IRQ:
160 160
161 int gpio_lock_as_irq(struct gpio_chip *chip, unsigned int offset) 161 int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset)
162 162
163This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock 163This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock
164is released: 164is released:
165 165
166 void gpio_unlock_as_irq(struct gpio_chip *chip, unsigned int offset) 166 void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset)
167 167
168When implementing an irqchip inside a GPIO driver, these two functions should 168When implementing an irqchip inside a GPIO driver, these two functions should
169typically be called in the .startup() and .shutdown() callbacks from the 169typically be called in the .startup() and .shutdown() callbacks from the
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75
index c6a5ff1b4641..67691a0aa41d 100644
--- a/Documentation/hwmon/lm75
+++ b/Documentation/hwmon/lm75
@@ -53,6 +53,11 @@ Supported chips:
53 http://www.ti.com/product/tmp75 53 http://www.ti.com/product/tmp75
54 http://www.ti.com/product/tmp175 54 http://www.ti.com/product/tmp175
55 http://www.ti.com/product/tmp275 55 http://www.ti.com/product/tmp275
56 * NXP LM75B
57 Prefix: 'lm75b'
58 Addresses scanned: none
59 Datasheet: Publicly available at the NXP website
60 http://www.nxp.com/documents/data_sheet/LM75B.pdf
56 61
57Author: Frodo Looijaard <frodol@dds.nl> 62Author: Frodo Looijaard <frodol@dds.nl>
58 63
diff --git a/Documentation/hwmon/lm95234 b/Documentation/hwmon/lm95234
index a0e95ddfd372..32b777ef224c 100644
--- a/Documentation/hwmon/lm95234
+++ b/Documentation/hwmon/lm95234
@@ -2,6 +2,10 @@ Kernel driver lm95234
2===================== 2=====================
3 3
4Supported chips: 4Supported chips:
5 * National Semiconductor / Texas Instruments LM95233
6 Addresses scanned: I2C 0x18, 0x2a, 0x2b
7 Datasheet: Publicly available at the Texas Instruments website
8 http://www.ti.com/product/lm95233
5 * National Semiconductor / Texas Instruments LM95234 9 * National Semiconductor / Texas Instruments LM95234
6 Addresses scanned: I2C 0x18, 0x4d, 0x4e 10 Addresses scanned: I2C 0x18, 0x4d, 0x4e
7 Datasheet: Publicly available at the Texas Instruments website 11 Datasheet: Publicly available at the Texas Instruments website
@@ -13,11 +17,12 @@ Author: Guenter Roeck <linux@roeck-us.net>
13Description 17Description
14----------- 18-----------
15 19
16LM95234 is an 11-bit digital temperature sensor with a 2-wire System Management 20LM95233 and LM95234 are 11-bit digital temperature sensors with a 2-wire
17Bus (SMBus) interface and TrueTherm technology that can very accurately monitor 21System Management Bus (SMBus) interface and TrueTherm technology
18the temperature of four remote diodes as well as its own temperature. 22that can very accurately monitor the temperature of two (LM95233)
19The four remote diodes can be external devices such as microprocessors, 23or four (LM95234) remote diodes as well as its own temperature.
20graphics processors or diode-connected 2N3904s. The LM95234's TruTherm 24The remote diodes can be external devices such as microprocessors,
25graphics processors or diode-connected 2N3904s. The chip's TruTherm
21beta compensation technology allows sensing of 90 nm or 65 nm process 26beta compensation technology allows sensing of 90 nm or 65 nm process
22thermal diodes accurately. 27thermal diodes accurately.
23 28
diff --git a/Documentation/hwmon/lm95245 b/Documentation/hwmon/lm95245
index 77eaf2812d25..d755901f58c4 100644
--- a/Documentation/hwmon/lm95245
+++ b/Documentation/hwmon/lm95245
@@ -2,10 +2,14 @@ Kernel driver lm95245
2================== 2==================
3 3
4Supported chips: 4Supported chips:
5 * National Semiconductor LM95245 5 * TI LM95235
6 Addresses scanned: I2C 0x18, 0x29, 0x4c
7 Datasheet: Publicly available at the TI website
8 http://www.ti.com/lit/ds/symlink/lm95235.pdf
9 * TI / National Semiconductor LM95245
6 Addresses scanned: I2C 0x18, 0x19, 0x29, 0x4c, 0x4d 10 Addresses scanned: I2C 0x18, 0x19, 0x29, 0x4c, 0x4d
7 Datasheet: Publicly available at the National Semiconductor website 11 Datasheet: Publicly available at the TI website
8 http://www.national.com/mpf/LM/LM95245.html 12 http://www.ti.com/lit/ds/symlink/lm95245.pdf
9 13
10 14
11Author: Alexander Stein <alexander.stein@systec-electronic.com> 15Author: Alexander Stein <alexander.stein@systec-electronic.com>
@@ -13,10 +17,10 @@ Author: Alexander Stein <alexander.stein@systec-electronic.com>
13Description 17Description
14----------- 18-----------
15 19
16The LM95245 is an 11-bit digital temperature sensor with a 2-wire System 20LM95235 and LM95245 are 11-bit digital temperature sensors with a 2-wire System
17Management Bus (SMBus) interface and TruTherm technology that can monitor 21Management Bus (SMBus) interface and TruTherm technology that can monitor
18the temperature of a remote diode as well as its own temperature. 22the temperature of a remote diode as well as its own temperature.
19The LM95245 can be used to very accurately monitor the temperature of 23The chips can be used to very accurately monitor the temperature of
20external devices such as microprocessors. 24external devices such as microprocessors.
21 25
22All temperature values are given in millidegrees Celsius. Local temperature 26All temperature values are given in millidegrees Celsius. Local temperature
diff --git a/Documentation/hwmon/nct6775 b/Documentation/hwmon/nct6775
index 4e9ef60e8c6c..f0dd3d2fec96 100644
--- a/Documentation/hwmon/nct6775
+++ b/Documentation/hwmon/nct6775
@@ -8,11 +8,15 @@ Kernel driver NCT6775
8===================== 8=====================
9 9
10Supported chips: 10Supported chips:
11 * Nuvoton NCT6102D/NCT6104D/NCT6106D
12 Prefix: 'nct6106'
13 Addresses scanned: ISA address retrieved from Super I/O registers
14 Datasheet: Available from the Nuvoton web site
11 * Nuvoton NCT5572D/NCT6771F/NCT6772F/NCT6775F/W83677HG-I 15 * Nuvoton NCT5572D/NCT6771F/NCT6772F/NCT6775F/W83677HG-I
12 Prefix: 'nct6775' 16 Prefix: 'nct6775'
13 Addresses scanned: ISA address retrieved from Super I/O registers 17 Addresses scanned: ISA address retrieved from Super I/O registers
14 Datasheet: Available from Nuvoton upon request 18 Datasheet: Available from Nuvoton upon request
15 * Nuvoton NCT5577D/NCT6776D/NCT6776F 19 * Nuvoton NCT5573D/NCT5577D/NCT6776D/NCT6776F
16 Prefix: 'nct6776' 20 Prefix: 'nct6776'
17 Addresses scanned: ISA address retrieved from Super I/O registers 21 Addresses scanned: ISA address retrieved from Super I/O registers
18 Datasheet: Available from Nuvoton upon request 22 Datasheet: Available from Nuvoton upon request
@@ -20,6 +24,14 @@ Supported chips:
20 Prefix: 'nct6779' 24 Prefix: 'nct6779'
21 Addresses scanned: ISA address retrieved from Super I/O registers 25 Addresses scanned: ISA address retrieved from Super I/O registers
22 Datasheet: Available from Nuvoton upon request 26 Datasheet: Available from Nuvoton upon request
27 * Nuvoton NCT6791D
28 Prefix: 'nct6791'
29 Addresses scanned: ISA address retrieved from Super I/O registers
30 Datasheet: Available from Nuvoton upon request
31 * Nuvoton NCT6792D
32 Prefix: 'nct6792'
33 Addresses scanned: ISA address retrieved from Super I/O registers
34 Datasheet: Available from Nuvoton upon request
23 35
24Authors: 36Authors:
25 Guenter Roeck <linux@roeck-us.net> 37 Guenter Roeck <linux@roeck-us.net>
diff --git a/Documentation/hwmon/nct7802 b/Documentation/hwmon/nct7802
new file mode 100644
index 000000000000..2e00f5e344bc
--- /dev/null
+++ b/Documentation/hwmon/nct7802
@@ -0,0 +1,32 @@
1Kernel driver nct7802
2=====================
3
4Supported chips:
5 * Nuvoton NCT7802Y
6 Prefix: 'nct7802'
7 Addresses scanned: I2C 0x28..0x2f
8 Datasheet: Available from Nuvoton web site
9
10Authors:
11 Guenter Roeck <linux@roeck-us.net>
12
13Description
14-----------
15
16This driver implements support for the Nuvoton NCT7802Y hardware monitoring
17chip. NCT7802Y supports 6 temperature sensors, 5 voltage sensors, and 3 fan
18speed sensors.
19
20The chip also supports intelligent fan speed control. This functionality is
21not currently supported by the driver.
22
23Tested Boards and BIOS Versions
24-------------------------------
25
26The driver has been reported to work with the following boards and
27BIOS versions.
28
29Board BIOS version
30---------------------------------------------------------------
31Kontron COMe-bSC2 CHR2E934.001.GGO
32Kontron COMe-bIP2 CCR2E212
diff --git a/Documentation/hwmon/tmp401 b/Documentation/hwmon/tmp401
index f91e3fa7e5ec..8eb88e974055 100644
--- a/Documentation/hwmon/tmp401
+++ b/Documentation/hwmon/tmp401
@@ -18,6 +18,10 @@ Supported chips:
18 Prefix: 'tmp432' 18 Prefix: 'tmp432'
19 Addresses scanned: I2C 0x4c, 0x4d 19 Addresses scanned: I2C 0x4c, 0x4d
20 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html 20 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html
21 * Texas Instruments TMP435
22 Prefix: 'tmp435'
23 Addresses scanned: I2C 0x37, 0x48 - 0x4f
24 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp435.html
21 25
22Authors: 26Authors:
23 Hans de Goede <hdegoede@redhat.com> 27 Hans de Goede <hdegoede@redhat.com>
@@ -27,8 +31,8 @@ Description
27----------- 31-----------
28 32
29This driver implements support for Texas Instruments TMP401, TMP411, 33This driver implements support for Texas Instruments TMP401, TMP411,
30TMP431, and TMP432 chips. These chips implement one or two remote and 34TMP431, TMP432 and TMP435 chips. These chips implement one or two remote
31one local temperature sensors. Temperature is measured in degrees 35and one local temperature sensors. Temperature is measured in degrees
32Celsius. Resolution of the remote sensor is 0.0625 degree. Local 36Celsius. Resolution of the remote sensor is 0.0625 degree. Local
33sensor resolution can be set to 0.5, 0.25, 0.125 or 0.0625 degree (not 37sensor resolution can be set to 0.5, 0.25, 0.125 or 0.0625 degree (not
34supported by the driver so far, so using the default resolution of 0.5 38supported by the driver so far, so using the default resolution of 0.5
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801
index 793c83dac738..82f48f774afb 100644
--- a/Documentation/i2c/busses/i2c-i801
+++ b/Documentation/i2c/busses/i2c-i801
@@ -29,6 +29,7 @@ Supported adapters:
29 * Intel Wildcat Point-LP (PCH) 29 * Intel Wildcat Point-LP (PCH)
30 * Intel BayTrail (SOC) 30 * Intel BayTrail (SOC)
31 * Intel Sunrise Point-H (PCH) 31 * Intel Sunrise Point-H (PCH)
32 * Intel Sunrise Point-LP (PCH)
32 Datasheets: Publicly available at the Intel website 33 Datasheets: Publicly available at the Intel website
33 34
34On Intel Patsburg and later chipsets, both the normal host SMBus controller 35On Intel Patsburg and later chipsets, both the normal host SMBus controller
diff --git a/Documentation/i2c/upgrading-clients b/Documentation/i2c/upgrading-clients
index 8e5fbd88c7d1..ccba3ffd6e80 100644
--- a/Documentation/i2c/upgrading-clients
+++ b/Documentation/i2c/upgrading-clients
@@ -79,11 +79,10 @@ static struct i2c_driver example_driver = {
79 .driver = { 79 .driver = {
80 .owner = THIS_MODULE, 80 .owner = THIS_MODULE,
81 .name = "example", 81 .name = "example",
82 .pm = &example_pm_ops,
82 }, 83 },
83 .attach_adapter = example_attach_adapter, 84 .attach_adapter = example_attach_adapter,
84 .detach_client = example_detach, 85 .detach_client = example_detach,
85 .suspend = example_suspend,
86 .resume = example_resume,
87}; 86};
88 87
89 88
@@ -272,10 +271,9 @@ static struct i2c_driver example_driver = {
272 .driver = { 271 .driver = {
273 .owner = THIS_MODULE, 272 .owner = THIS_MODULE,
274 .name = "example", 273 .name = "example",
274 .pm = &example_pm_ops,
275 }, 275 },
276 .id_table = example_idtable, 276 .id_table = example_idtable,
277 .probe = example_probe, 277 .probe = example_probe,
278 .remove = example_remove, 278 .remove = example_remove,
279 .suspend = example_suspend,
280 .resume = example_resume,
281}; 279};
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index 6b344b516bff..a755b141fa4a 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -36,6 +36,7 @@ MODULE_DEVICE_TABLE(i2c, foo_idtable);
36static struct i2c_driver foo_driver = { 36static struct i2c_driver foo_driver = {
37 .driver = { 37 .driver = {
38 .name = "foo", 38 .name = "foo",
39 .pm = &foo_pm_ops, /* optional */
39 }, 40 },
40 41
41 .id_table = foo_idtable, 42 .id_table = foo_idtable,
@@ -47,8 +48,6 @@ static struct i2c_driver foo_driver = {
47 .address_list = normal_i2c, 48 .address_list = normal_i2c,
48 49
49 .shutdown = foo_shutdown, /* optional */ 50 .shutdown = foo_shutdown, /* optional */
50 .suspend = foo_suspend, /* optional */
51 .resume = foo_resume, /* optional */
52 .command = foo_command, /* optional, deprecated */ 51 .command = foo_command, /* optional, deprecated */
53} 52}
54 53
@@ -279,8 +278,9 @@ Power Management
279 278
280If your I2C device needs special handling when entering a system low 279If your I2C device needs special handling when entering a system low
281power state -- like putting a transceiver into a low power mode, or 280power state -- like putting a transceiver into a low power mode, or
282activating a system wakeup mechanism -- do that in the suspend() method. 281activating a system wakeup mechanism -- do that by implementing the
283The resume() method should reverse what the suspend() method does. 282appropriate callbacks for the dev_pm_ops of the driver (like suspend
283and resume).
284 284
285These are standard driver model calls, and they work just like they 285These are standard driver model calls, and they work just like they
286would for any other driver stack. The calls can sleep, and can use 286would for any other driver stack. The calls can sleep, and can use
diff --git a/Documentation/ia64/kvm.txt b/Documentation/ia64/kvm.txt
deleted file mode 100644
index ffb5c80bec3e..000000000000
--- a/Documentation/ia64/kvm.txt
+++ /dev/null
@@ -1,83 +0,0 @@
1Currently, kvm module is in EXPERIMENTAL stage on IA64. This means that
2interfaces are not stable enough to use. So, please don't run critical
3applications in virtual machine.
4We will try our best to improve it in future versions!
5
6 Guide: How to boot up guests on kvm/ia64
7
8This guide is to describe how to enable kvm support for IA-64 systems.
9
101. Get the kvm source from git.kernel.org.
11 Userspace source:
12 git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-userspace.git
13 Kernel Source:
14 git clone git://git.kernel.org/pub/scm/linux/kernel/git/xiantao/kvm-ia64.git
15
162. Compile the source code.
17 2.1 Compile userspace code:
18 (1)cd ./kvm-userspace
19 (2)./configure
20 (3)cd kernel
21 (4)make sync LINUX= $kernel_dir (kernel_dir is the directory of kernel source.)
22 (5)cd ..
23 (6)make qemu
24 (7)cd qemu; make install
25
26 2.2 Compile kernel source code:
27 (1) cd ./$kernel_dir
28 (2) Make menuconfig
29 (3) Enter into virtualization option, and choose kvm.
30 (4) make
31 (5) Once (4) done, make modules_install
32 (6) Make initrd, and use new kernel to reboot up host machine.
33 (7) Once (6) done, cd $kernel_dir/arch/ia64/kvm
34 (8) insmod kvm.ko; insmod kvm-intel.ko
35
36Note: For step 2, please make sure that host page size == TARGET_PAGE_SIZE of qemu, otherwise, may fail.
37
383. Get Guest Firmware named as Flash.fd, and put it under right place:
39 (1) If you have the guest firmware (binary) released by Intel Corp for Xen, use it directly.
40
41 (2) If you have no firmware at hand, Please download its source from
42 hg clone http://xenbits.xensource.com/ext/efi-vfirmware.hg
43 you can get the firmware's binary in the directory of efi-vfirmware.hg/binaries.
44
45 (3) Rename the firmware you owned to Flash.fd, and copy it to /usr/local/share/qemu
46
474. Boot up Linux or Windows guests:
48 4.1 Create or install a image for guest boot. If you have xen experience, it should be easy.
49
50 4.2 Boot up guests use the following command.
51 /usr/local/bin/qemu-system-ia64 -smp xx -m 512 -hda $your_image
52 (xx is the number of virtual processors for the guest, now the maximum value is 4)
53
545. Known possible issue on some platforms with old Firmware.
55
56In the event of strange host crash issues, try to solve it through either of the following ways:
57
58(1): Upgrade your Firmware to the latest one.
59
60(2): Applying the below patch to kernel source.
61diff --git a/arch/ia64/kernel/pal.S b/arch/ia64/kernel/pal.S
62index 0b53344..f02b0f7 100644
63--- a/arch/ia64/kernel/pal.S
64+++ b/arch/ia64/kernel/pal.S
65@@ -84,7 +84,8 @@ GLOBAL_ENTRY(ia64_pal_call_static)
66 mov ar.pfs = loc1
67 mov rp = loc0
68 ;;
69- srlz.d // serialize restoration of psr.l
70+ srlz.i // serialize restoration of psr.l
71+ ;;
72 br.ret.sptk.many b0
73 END(ia64_pal_call_static)
74
756. Bug report:
76 If you found any issues when use kvm/ia64, Please post the bug info to kvm-ia64-devel mailing list.
77 https://lists.sourceforge.net/lists/listinfo/kvm-ia64-devel/
78
79Thanks for your interest! Let's work together, and make kvm/ia64 stronger and stronger!
80
81
82 Xiantao Zhang <xiantao.zhang@intel.com>
83 2008.3.10
diff --git a/Documentation/input/elantech.txt b/Documentation/input/elantech.txt
index e1ae127ed099..1ec0db7879d3 100644
--- a/Documentation/input/elantech.txt
+++ b/Documentation/input/elantech.txt
@@ -38,22 +38,38 @@ Contents
38 7.2.1 Status packet 38 7.2.1 Status packet
39 7.2.2 Head packet 39 7.2.2 Head packet
40 7.2.3 Motion packet 40 7.2.3 Motion packet
41 8. Trackpoint (for Hardware version 3 and 4)
42 8.1 Registers
43 8.2 Native relative mode 6 byte packet format
44 8.2.1 Status Packet
41 45
42 46
43 47
441. Introduction 481. Introduction
45 ~~~~~~~~~~~~ 49 ~~~~~~~~~~~~
46 50
47Currently the Linux Elantech touchpad driver is aware of two different 51Currently the Linux Elantech touchpad driver is aware of four different
48hardware versions unimaginatively called version 1 and version 2. Version 1 52hardware versions unimaginatively called version 1,version 2, version 3
49is found in "older" laptops and uses 4 bytes per packet. Version 2 seems to 53and version 4. Version 1 is found in "older" laptops and uses 4 bytes per
50be introduced with the EeePC and uses 6 bytes per packet, and provides 54packet. Version 2 seems to be introduced with the EeePC and uses 6 bytes
51additional features such as position of two fingers, and width of the touch. 55per packet, and provides additional features such as position of two fingers,
56and width of the touch. Hardware version 3 uses 6 bytes per packet (and
57for 2 fingers the concatenation of two 6 bytes packets) and allows tracking
58of up to 3 fingers. Hardware version 4 uses 6 bytes per packet, and can
59combine a status packet with multiple head or motion packets. Hardware version
604 allows tracking up to 5 fingers.
61
62Some Hardware version 3 and version 4 also have a trackpoint which uses a
63separate packet format. It is also 6 bytes per packet.
52 64
53The driver tries to support both hardware versions and should be compatible 65The driver tries to support both hardware versions and should be compatible
54with the Xorg Synaptics touchpad driver and its graphical configuration 66with the Xorg Synaptics touchpad driver and its graphical configuration
55utilities. 67utilities.
56 68
69Note that a mouse button is also associated with either the touchpad or the
70trackpoint when a trackpoint is available. Disabling the Touchpad in xorg
71(TouchPadOff=0) will also disable the buttons associated with the touchpad.
72
57Additionally the operation of the touchpad can be altered by adjusting the 73Additionally the operation of the touchpad can be altered by adjusting the
58contents of some of its internal registers. These registers are represented 74contents of some of its internal registers. These registers are represented
59by the driver as sysfs entries under /sys/bus/serio/drivers/psmouse/serio? 75by the driver as sysfs entries under /sys/bus/serio/drivers/psmouse/serio?
@@ -78,7 +94,7 @@ completeness sake.
782. Extra knobs 942. Extra knobs
79 ~~~~~~~~~~~ 95 ~~~~~~~~~~~
80 96
81Currently the Linux Elantech touchpad driver provides two extra knobs under 97Currently the Linux Elantech touchpad driver provides three extra knobs under
82/sys/bus/serio/drivers/psmouse/serio? for the user. 98/sys/bus/serio/drivers/psmouse/serio? for the user.
83 99
84* debug 100* debug
@@ -112,6 +128,20 @@ Currently the Linux Elantech touchpad driver provides two extra knobs under
112 data consistency checking can be done. For now checking is disabled by 128 data consistency checking can be done. For now checking is disabled by
113 default. Currently even turning it on will do nothing. 129 default. Currently even turning it on will do nothing.
114 130
131* crc_enabled
132
133 Sets crc_enabled to 0/1. The name "crc_enabled" is the official name of
134 this integrity check, even though it is not an actual cyclic redundancy
135 check.
136
137 Depending on the state of crc_enabled, certain basic data integrity
138 verification is done by the driver on hardware version 3 and 4. The
139 driver will reject any packet that appears corrupted. Using this knob,
140 The state of crc_enabled can be altered with this knob.
141
142 Reading the crc_enabled value will show the active value. Echoing
143 "0" or "1" to this file will set the state to "0" or "1".
144
115///////////////////////////////////////////////////////////////////////////// 145/////////////////////////////////////////////////////////////////////////////
116 146
1173. Differentiating hardware versions 1473. Differentiating hardware versions
@@ -746,3 +776,42 @@ byte 5:
746 776
747 byte 0 ~ 2 for one finger 777 byte 0 ~ 2 for one finger
748 byte 3 ~ 5 for another 778 byte 3 ~ 5 for another
779
780
7818. Trackpoint (for Hardware version 3 and 4)
782 =========================================
7838.1 Registers
784 ~~~~~~~~~
785No special registers have been identified.
786
7878.2 Native relative mode 6 byte packet format
788 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7898.2.1 Status Packet
790 ~~~~~~~~~~~~~
791
792byte 0:
793 bit 7 6 5 4 3 2 1 0
794 0 0 sx sy 0 M R L
795byte 1:
796 bit 7 6 5 4 3 2 1 0
797 ~sx 0 0 0 0 0 0 0
798byte 2:
799 bit 7 6 5 4 3 2 1 0
800 ~sy 0 0 0 0 0 0 0
801byte 3:
802 bit 7 6 5 4 3 2 1 0
803 0 0 ~sy ~sx 0 1 1 0
804byte 4:
805 bit 7 6 5 4 3 2 1 0
806 x7 x6 x5 x4 x3 x2 x1 x0
807byte 5:
808 bit 7 6 5 4 3 2 1 0
809 y7 y6 y5 y4 y3 y2 y1 y0
810
811
812 x and y are written in two's complement spread
813 over 9 bits with sx/sy the relative top bit and
814 x7..x0 and y7..y0 the lower bits.
815 ~sx is the inverse of sx, ~sy is the inverse of sy.
816 The sign of y is opposite to what the input driver
817 expects for a relative movement
diff --git a/Documentation/input/xpad.txt b/Documentation/input/xpad.txt
index 7cc9a436e6a1..d1b23f295db4 100644
--- a/Documentation/input/xpad.txt
+++ b/Documentation/input/xpad.txt
@@ -1,18 +1,22 @@
1xpad - Linux USB driver for X-Box gamepads 1xpad - Linux USB driver for Xbox compatible controllers
2 2
3This is the very first release of a driver for X-Box gamepads. 3This driver exposes all first-party and third-party Xbox compatible
4Basically, this was hacked away in just a few hours, so don't expect 4controllers. It has a long history and has enjoyed considerable usage
5miracles. 5as Window's xinput library caused most PC games to focus on Xbox
6controller compatibility.
6 7
7In particular, there is currently NO support for the rumble pack. 8Due to backwards compatibility all buttons are reported as digital.
8You won't find many ff-aware linux applications anyway. 9This only effects Original Xbox controllers. All later controller models
10have only digital face buttons.
11
12Rumble is supported on some models of Xbox 360 controllers but not of
13Original Xbox controllers nor on Xbox One controllers. As of writing
14the Xbox One's rumble protocol has not been reverse engineered but in
15the future could be supported.
9 16
10 17
110. Notes 180. Notes
12-------- 19--------
13
14Driver updated for kernel 2.6.17.11. (Based on a patch for 2.6.11.4.)
15
16The number of buttons/axes reported varies based on 3 things: 20The number of buttons/axes reported varies based on 3 things:
17- if you are using a known controller 21- if you are using a known controller
18- if you are using a known dance pad 22- if you are using a known dance pad
@@ -20,12 +24,16 @@ The number of buttons/axes reported varies based on 3 things:
20 module configuration for "Map D-PAD to buttons rather than axes for unknown 24 module configuration for "Map D-PAD to buttons rather than axes for unknown
21 pads" (module option dpad_to_buttons) 25 pads" (module option dpad_to_buttons)
22 26
23If you set dpad_to_buttons to 0 and you are using an unknown device (one 27If you set dpad_to_buttons to N and you are using an unknown device
24not listed below), the driver will map the directional pad to axes (X/Y), 28the driver will map the directional pad to axes (X/Y).
25if you said N it will map the d-pad to buttons, which is needed for dance 29If you said Y it will map the d-pad to buttons, which is needed for dance
26style games to function correctly. The default is Y. 30style games to function correctly. The default is Y.
31
32dpad_to_buttons has no effect for known pads. A erroneous commit message
33claimed dpad_to_buttons could be used to force behavior on known devices.
34This is not true. Both dpad_to_buttons and triggers_to_buttons only affect
35unknown controllers.
27 36
28dpad_to_buttons has no effect for known pads.
29 37
300.1 Normal Controllers 380.1 Normal Controllers
31---------------------- 39----------------------
@@ -80,17 +88,29 @@ to the list of supported devices, ensuring that it will work out of the
80box in the future. 88box in the future.
81 89
82 90
831. USB adapter 911. USB adapters
84-------------- 92--------------
93All generations of Xbox controllers speak USB over the wire.
94- Original Xbox controllers use a proprietary connector and require adapters.
95- Wireless Xbox 360 controllers require a 'Xbox 360 Wireless Gaming Receiver
96 for Windows'
97- Wired Xbox 360 controllers use standard USB connectors.
98- Xbox One controllers can be wireless but speak Wi-Fi Direct and are not
99 yet supported.
100- Xbox One controllers can be wired and use standard Micro-USB connectors.
101
85 102
86Before you can actually use the driver, you need to get yourself an 103
87adapter cable to connect the X-Box controller to your Linux-Box. You 1041.1 Original Xbox USB adapters
88can buy these online fairly cheap, or build your own. 105--------------
106Using this driver with an Original Xbox controller requires an
107adapter cable to break out the proprietary connector's pins to USB.
108You can buy these online fairly cheap, or build your own.
89 109
90Such a cable is pretty easy to build. The Controller itself is a USB 110Such a cable is pretty easy to build. The Controller itself is a USB
91compound device (a hub with three ports for two expansion slots and 111compound device (a hub with three ports for two expansion slots and
92the controller device) with the only difference in a nonstandard connector 112the controller device) with the only difference in a nonstandard connector
93(5 pins vs. 4 on standard USB connector). 113(5 pins vs. 4 on standard USB 1.0 connectors).
94 114
95You just need to solder a USB connector onto the cable and keep the 115You just need to solder a USB connector onto the cable and keep the
96yellow wire unconnected. The other pins have the same order on both 116yellow wire unconnected. The other pins have the same order on both
@@ -102,26 +122,41 @@ original one. You can buy an extension cable and cut that instead. That way,
102you can still use the controller with your X-Box, if you have one ;) 122you can still use the controller with your X-Box, if you have one ;)
103 123
104 124
125
1052. Driver Installation 1262. Driver Installation
106---------------------- 127----------------------
107 128
108Once you have the adapter cable and the controller is connected, you need 129Once you have the adapter cable, if needed, and the controller connected
109to load your USB subsystem and should cat /proc/bus/usb/devices. 130the xpad module should be auto loaded. To confirm you can cat
110There should be an entry like the one at the end [4]. 131/proc/bus/usb/devices. There should be an entry like the one at the end [4].
132
133
111 134
112Currently (as of version 0.0.6), the following devices are included: 1353. Supported Controllers
113 original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202 136------------------------
114 smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289 137For a full list of supported controllers and associated vendor and product
138IDs see the xpad_device[] array[6].
139
140As of the historic version 0.0.6 (2006-10-10) the following devices
141were supported:
142 original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202
143 smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289
115 original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285 144 original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285
116 InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a 145 InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a
117 RedOctane Xbox Dance Pad (US), vendor=0x0c12, product=0x8809 146 RedOctane Xbox Dance Pad (US), vendor=0x0c12, product=0x8809
147
148Unrecognized models of Xbox controllers should function as Generic
149Xbox controllers. Unrecognized Dance Pad controllers require setting
150the module option 'dpad_to_buttons'.
151
152If you have an unrecognized controller please see 0.3 - Unknown Controllers
118 153
119The driver should work with xbox pads not listed above as well, however
120you will need to do something extra for dance pads to work.
121 154
122If you have a controller not listed above, see 0.3 - Unknown Controllers 1554. Manual Testing
156-----------------
157To test this driver's functionality you may use 'jstest'.
123 158
124If you compiled and installed the driver, test the functionality: 159For example:
125> modprobe xpad 160> modprobe xpad
126> modprobe joydev 161> modprobe joydev
127> jstest /dev/js0 162> jstest /dev/js0
@@ -134,7 +169,8 @@ show 20 inputs (6 axes, 14 buttons).
134It works? Voila, you're done ;) 169It works? Voila, you're done ;)
135 170
136 171
1373. Thanks 172
1735. Thanks
138--------- 174---------
139 175
140I have to thank ITO Takayuki for the detailed info on his site 176I have to thank ITO Takayuki for the detailed info on his site
@@ -145,14 +181,14 @@ His useful info and both the usb-skeleton as well as the iforce input driver
145the basic functionality. 181the basic functionality.
146 182
147 183
1484. References
149-------------
150 184
1511. http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki) 1856. References
1522. http://xpad.xbox-scene.com/ 186-------------
1533. http://www.markosweb.com/www/xboxhackz.com/
154 187
1554. /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany): 188[1]: http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki)
189[2]: http://xpad.xbox-scene.com/
190[3]: http://www.markosweb.com/www/xboxhackz.com/
191[4]: /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany):
156 192
157T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0 193T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
158D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1 194D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1
@@ -162,7 +198,7 @@ I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none)
162E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms 198E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms
163E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms 199E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms
164 200
1655. /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US): 201[5]: /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US):
166 202
167T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0 203T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0
168D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 204D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
@@ -173,7 +209,12 @@ I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=xpad
173E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms 209E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms
174E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms 210E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms
175 211
176-- 212[6]: http://lxr.free-electrons.com/ident?i=xpad_device
213
214
215
2167. Historic Edits
217-----------------
177Marko Friedemann <mfr@bmx-chemnitz.de> 218Marko Friedemann <mfr@bmx-chemnitz.de>
1782002-07-16 2192002-07-16
179 - original doc 220 - original doc
@@ -181,3 +222,5 @@ Marko Friedemann <mfr@bmx-chemnitz.de>
181Dominic Cerquetti <binary1230@yahoo.com> 222Dominic Cerquetti <binary1230@yahoo.com>
1822005-03-19 2232005-03-19
183 - added stuff for dance pads, new d-pad->axes mappings 224 - added stuff for dance pads, new d-pad->axes mappings
225
226Later changes may be viewed with 'git log Documentation/input/xpad.txt'
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index 6c0b9f27e465..bc4bd5a44b88 100644
--- a/Documentation/kdump/kdump.txt
+++ b/Documentation/kdump/kdump.txt
@@ -471,6 +471,13 @@ format. Crash is available on Dave Anderson's site at the following URL:
471 471
472 http://people.redhat.com/~anderson/ 472 http://people.redhat.com/~anderson/
473 473
474Trigger Kdump on WARN()
475=======================
476
477The kernel parameter, panic_on_warn, calls panic() in all WARN() paths. This
478will cause a kdump to occur at the panic() call. In cases where a user wants
479to specify this during runtime, /proc/sys/kernel/panic_on_warn can be set to 1
480to achieve the same behaviour.
474 481
475Contact 482Contact
476======= 483=======
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 479f33204a37..4df73da11adc 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -829,6 +829,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
829 CONFIG_DEBUG_PAGEALLOC, hence this option will not help 829 CONFIG_DEBUG_PAGEALLOC, hence this option will not help
830 tracking down these problems. 830 tracking down these problems.
831 831
832 debug_pagealloc=
833 [KNL] When CONFIG_DEBUG_PAGEALLOC is set, this
834 parameter enables the feature at boot time. In
835 default, it is disabled. We can avoid allocating huge
836 chunk of memory for debug pagealloc if we don't enable
837 it at boot time and the system will work mostly same
838 with the kernel built without CONFIG_DEBUG_PAGEALLOC.
839 on: enable the feature
840
832 debugpat [X86] Enable PAT debugging 841 debugpat [X86] Enable PAT debugging
833 842
834 decnet.addr= [HW,NET] 843 decnet.addr= [HW,NET]
@@ -1228,9 +1237,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1228 multiple times interleaved with hugepages= to reserve 1237 multiple times interleaved with hugepages= to reserve
1229 huge pages of different sizes. Valid pages sizes on 1238 huge pages of different sizes. Valid pages sizes on
1230 x86-64 are 2M (when the CPU supports "pse") and 1G 1239 x86-64 are 2M (when the CPU supports "pse") and 1G
1231 (when the CPU supports the "pdpe1gb" cpuinfo flag) 1240 (when the CPU supports the "pdpe1gb" cpuinfo flag).
1232 Note that 1GB pages can only be allocated at boot time
1233 using hugepages= and not freed afterwards.
1234 1241
1235 hvc_iucv= [S390] Number of z/VM IUCV hypervisor console (HVC) 1242 hvc_iucv= [S390] Number of z/VM IUCV hypervisor console (HVC)
1236 terminal devices. Valid values: 0..8 1243 terminal devices. Valid values: 0..8
@@ -1369,6 +1376,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1369 Formats: { "ima" | "ima-ng" } 1376 Formats: { "ima" | "ima-ng" }
1370 Default: "ima-ng" 1377 Default: "ima-ng"
1371 1378
1379 ima_template_fmt=
1380 [IMA] Define a custom template format.
1381 Format: { "field1|...|fieldN" }
1382
1372 ima.ahash_minsize= [IMA] Minimum file size for asynchronous hash usage 1383 ima.ahash_minsize= [IMA] Minimum file size for asynchronous hash usage
1373 Format: <min_file_size> 1384 Format: <min_file_size>
1374 Set the minimal file size for using asynchronous hash. 1385 Set the minimal file size for using asynchronous hash.
@@ -1446,6 +1457,18 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1446 disable 1457 disable
1447 Do not enable intel_pstate as the default 1458 Do not enable intel_pstate as the default
1448 scaling driver for the supported processors 1459 scaling driver for the supported processors
1460 force
1461 Enable intel_pstate on systems that prohibit it by default
1462 in favor of acpi-cpufreq. Forcing the intel_pstate driver
1463 instead of acpi-cpufreq may disable platform features, such
1464 as thermal controls and power capping, that rely on ACPI
1465 P-States information being indicated to OSPM and therefore
1466 should be used with caution. This option does not work with
1467 processors that aren't supported by the intel_pstate driver
1468 or on platforms that use pcc-cpufreq instead of acpi-cpufreq.
1469 no_hwp
1470 Do not enable hardware P state control (HWP)
1471 if available.
1449 1472
1450 intremap= [X86-64, Intel-IOMMU] 1473 intremap= [X86-64, Intel-IOMMU]
1451 on enable Interrupt Remapping (default) 1474 on enable Interrupt Remapping (default)
@@ -2503,12 +2526,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2503 OSS [HW,OSS] 2526 OSS [HW,OSS]
2504 See Documentation/sound/oss/oss-parameters.txt 2527 See Documentation/sound/oss/oss-parameters.txt
2505 2528
2529 page_owner= [KNL] Boot-time page_owner enabling option.
2530 Storage of the information about who allocated
2531 each page is disabled in default. With this switch,
2532 we can turn it on.
2533 on: enable the feature
2534
2506 panic= [KNL] Kernel behaviour on panic: delay <timeout> 2535 panic= [KNL] Kernel behaviour on panic: delay <timeout>
2507 timeout > 0: seconds before rebooting 2536 timeout > 0: seconds before rebooting
2508 timeout = 0: wait forever 2537 timeout = 0: wait forever
2509 timeout < 0: reboot immediately 2538 timeout < 0: reboot immediately
2510 Format: <timeout> 2539 Format: <timeout>
2511 2540
2541 panic_on_warn panic() instead of WARN(). Useful to cause kdump
2542 on a WARN().
2543
2512 crash_kexec_post_notifiers 2544 crash_kexec_post_notifiers
2513 Run kdump after running panic-notifiers and dumping 2545 Run kdump after running panic-notifiers and dumping
2514 kmsg. This only for the users who doubt kdump always 2546 kmsg. This only for the users who doubt kdump always
@@ -2940,6 +2972,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2940 quiescent states. Units are jiffies, minimum 2972 quiescent states. Units are jiffies, minimum
2941 value is one, and maximum value is HZ. 2973 value is one, and maximum value is HZ.
2942 2974
2975 rcutree.kthread_prio= [KNL,BOOT]
2976 Set the SCHED_FIFO priority of the RCU
2977 per-CPU kthreads (rcuc/N). This value is also
2978 used for the priority of the RCU boost threads
2979 (rcub/N). Valid values are 1-99 and the default
2980 is 1 (the least-favored priority).
2981
2943 rcutree.rcu_nocb_leader_stride= [KNL] 2982 rcutree.rcu_nocb_leader_stride= [KNL]
2944 Set the number of NOCB kthread groups, which 2983 Set the number of NOCB kthread groups, which
2945 defaults to the square root of the number of 2984 defaults to the square root of the number of
@@ -3089,6 +3128,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3089 messages. Disable with a value less than or equal 3128 messages. Disable with a value less than or equal
3090 to zero. 3129 to zero.
3091 3130
3131 rcupdate.rcu_self_test= [KNL]
3132 Run the RCU early boot self tests
3133
3134 rcupdate.rcu_self_test_bh= [KNL]
3135 Run the RCU bh early boot self tests
3136
3137 rcupdate.rcu_self_test_sched= [KNL]
3138 Run the RCU sched early boot self tests
3139
3092 rdinit= [KNL] 3140 rdinit= [KNL]
3093 Format: <full_path> 3141 Format: <full_path>
3094 Run specified binary instead of /init from the ramdisk, 3142 Run specified binary instead of /init from the ramdisk,
@@ -3412,6 +3460,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3412 neutralize any effect of /proc/sys/kernel/sysrq. 3460 neutralize any effect of /proc/sys/kernel/sysrq.
3413 Useful for debugging. 3461 Useful for debugging.
3414 3462
3463 tcpmhash_entries= [KNL,NET]
3464 Set the number of tcp_metrics_hash slots.
3465 Default value is 8192 or 16384 depending on total
3466 ram pages. This is used to specify the TCP metrics
3467 cache size. See Documentation/networking/ip-sysctl.txt
3468 "tcp_no_metrics_save" section for more details.
3469
3415 tdfx= [HW,DRM] 3470 tdfx= [HW,DRM]
3416 3471
3417 test_suspend= [SUSPEND][,N] 3472 test_suspend= [SUSPEND][,N]
@@ -3501,7 +3556,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3501 are saved. 3556 are saved.
3502 3557
3503 trace_buf_size=nn[KMG] 3558 trace_buf_size=nn[KMG]
3504 [FTRACE] will set tracing buffer size. 3559 [FTRACE] will set tracing buffer size on each cpu.
3505 3560
3506 trace_event=[event-list] 3561 trace_event=[event-list]
3507 [FTRACE] Set and start specified trace events in order 3562 [FTRACE] Set and start specified trace events in order
@@ -3524,6 +3579,24 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3524 See also Documentation/trace/ftrace.txt "trace options" 3579 See also Documentation/trace/ftrace.txt "trace options"
3525 section. 3580 section.
3526 3581
3582 tp_printk[FTRACE]
3583 Have the tracepoints sent to printk as well as the
3584 tracing ring buffer. This is useful for early boot up
3585 where the system hangs or reboots and does not give the
3586 option for reading the tracing buffer or performing a
3587 ftrace_dump_on_oops.
3588
3589 To turn off having tracepoints sent to printk,
3590 echo 0 > /proc/sys/kernel/tracepoint_printk
3591 Note, echoing 1 into this file without the
3592 tracepoint_printk kernel cmdline option has no effect.
3593
3594 ** CAUTION **
3595
3596 Having tracepoints sent to printk() and activating high
3597 frequency tracepoints such as irq or sched, can cause
3598 the system to live lock.
3599
3527 traceoff_on_warning 3600 traceoff_on_warning
3528 [FTRACE] enable this option to disable tracing when a 3601 [FTRACE] enable this option to disable tracing when a
3529 warning is hit. This turns off "tracing_on". Tracing can 3602 warning is hit. This turns off "tracing_on". Tracing can
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt
index f87241dfed87..1be59a3a521c 100644
--- a/Documentation/kobject.txt
+++ b/Documentation/kobject.txt
@@ -173,7 +173,7 @@ This should be done only after any attributes or children of the kobject
173have been initialized properly, as userspace will instantly start to look 173have been initialized properly, as userspace will instantly start to look
174for them when this call happens. 174for them when this call happens.
175 175
176When the kobject is removed from the kernel (details on how to do that is 176When the kobject is removed from the kernel (details on how to do that are
177below), the uevent for KOBJ_REMOVE will be automatically created by the 177below), the uevent for KOBJ_REMOVE will be automatically created by the
178kobject core, so the caller does not have to worry about doing that by 178kobject core, so the caller does not have to worry about doing that by
179hand. 179hand.
diff --git a/Documentation/kselftest.txt b/Documentation/kselftest.txt
new file mode 100644
index 000000000000..a87d840bacfe
--- /dev/null
+++ b/Documentation/kselftest.txt
@@ -0,0 +1,69 @@
1Linux Kernel Selftests
2
3The kernel contains a set of "self tests" under the tools/testing/selftests/
4directory. These are intended to be small unit tests to exercise individual
5code paths in the kernel.
6
7On some systems, hot-plug tests could hang forever waiting for cpu and
8memory to be ready to be offlined. A special hot-plug target is created
9to run full range of hot-plug tests. In default mode, hot-plug tests run
10in safe mode with a limited scope. In limited mode, cpu-hotplug test is
11run on a single cpu as opposed to all hotplug capable cpus, and memory
12hotplug test is run on 2% of hotplug capable memory instead of 10%.
13
14Running the selftests (hotplug tests are run in limited mode)
15=============================================================
16
17To build the tests:
18 $ make -C tools/testing/selftests
19
20
21To run the tests:
22 $ make -C tools/testing/selftests run_tests
23
24To build and run the tests with a single command, use:
25 $ make kselftest
26
27- note that some tests will require root privileges.
28
29
30Running a subset of selftests
31========================================
32You can use the "TARGETS" variable on the make command line to specify
33single test to run, or a list of tests to run.
34
35To run only tests targeted for a single subsystem:
36 $ make -C tools/testing/selftests TARGETS=ptrace run_tests
37
38You can specify multiple tests to build and run:
39 $ make TARGETS="size timers" kselftest
40
41See the top-level tools/testing/selftests/Makefile for the list of all
42possible targets.
43
44
45Running the full range hotplug selftests
46========================================
47
48To build the hotplug tests:
49 $ make -C tools/testing/selftests hotplug
50
51To run the hotplug tests:
52 $ make -C tools/testing/selftests run_hotplug
53
54- note that some tests will require root privileges.
55
56
57Contributing new tests
58======================
59
60In general, the rules for for selftests are
61
62 * Do as much as you can if you're not root;
63
64 * Don't take too long;
65
66 * Don't break the build on any architecture, and
67
68 * Don't cause the top-level "make run_tests" to fail if your feature is
69 unconfigured.
diff --git a/Documentation/local_ops.txt b/Documentation/local_ops.txt
index 300da4bdfdbd..407576a23317 100644
--- a/Documentation/local_ops.txt
+++ b/Documentation/local_ops.txt
@@ -8,6 +8,11 @@ to implement them for any given architecture and shows how they can be used
8properly. It also stresses on the precautions that must be taken when reading 8properly. It also stresses on the precautions that must be taken when reading
9those local variables across CPUs when the order of memory writes matters. 9those local variables across CPUs when the order of memory writes matters.
10 10
11Note that local_t based operations are not recommended for general kernel use.
12Please use the this_cpu operations instead unless there is really a special purpose.
13Most uses of local_t in the kernel have been replaced by this_cpu operations.
14this_cpu operations combine the relocation with the local_t like semantics in
15a single instruction and yield more compact and faster executing code.
11 16
12 17
13* Purpose of local atomic operations 18* Purpose of local atomic operations
@@ -87,10 +92,10 @@ the per cpu variable. For instance :
87 local_inc(&get_cpu_var(counters)); 92 local_inc(&get_cpu_var(counters));
88 put_cpu_var(counters); 93 put_cpu_var(counters);
89 94
90If you are already in a preemption-safe context, you can directly use 95If you are already in a preemption-safe context, you can use
91__get_cpu_var() instead. 96this_cpu_ptr() instead.
92 97
93 local_inc(&__get_cpu_var(counters)); 98 local_inc(this_cpu_ptr(&counters));
94 99
95 100
96 101
@@ -134,7 +139,7 @@ static void test_each(void *info)
134{ 139{
135 /* Increment the counter from a non preemptible context */ 140 /* Increment the counter from a non preemptible context */
136 printk("Increment on cpu %d\n", smp_processor_id()); 141 printk("Increment on cpu %d\n", smp_processor_id());
137 local_inc(&__get_cpu_var(counters)); 142 local_inc(this_cpu_ptr(&counters));
138 143
139 /* This is what incrementing the variable would look like within a 144 /* This is what incrementing the variable would look like within a
140 * preemptible context (it disables preemption) : 145 * preemptible context (it disables preemption) :
diff --git a/Documentation/locking/lglock.txt b/Documentation/locking/lglock.txt
new file mode 100644
index 000000000000..a6971e34fabe
--- /dev/null
+++ b/Documentation/locking/lglock.txt
@@ -0,0 +1,166 @@
1lglock - local/global locks for mostly local access patterns
2------------------------------------------------------------
3
4Origin: Nick Piggin's VFS scalability series introduced during
5 2.6.35++ [1] [2]
6Location: kernel/locking/lglock.c
7 include/linux/lglock.h
8Users: currently only the VFS and stop_machine related code
9
10Design Goal:
11------------
12
13Improve scalability of globally used large data sets that are
14distributed over all CPUs as per_cpu elements.
15
16To manage global data structures that are partitioned over all CPUs
17as per_cpu elements but can be mostly handled by CPU local actions
18lglock will be used where the majority of accesses are cpu local
19reading and occasional cpu local writing with very infrequent
20global write access.
21
22
23* deal with things locally whenever possible
24 - very fast access to the local per_cpu data
25 - reasonably fast access to specific per_cpu data on a different
26 CPU
27* while making global action possible when needed
28 - by expensive access to all CPUs locks - effectively
29 resulting in a globally visible critical section.
30
31Design:
32-------
33
34Basically it is an array of per_cpu spinlocks with the
35lg_local_lock/unlock accessing the local CPUs lock object and the
36lg_local_lock_cpu/unlock_cpu accessing a remote CPUs lock object
37the lg_local_lock has to disable preemption as migration protection so
38that the reference to the local CPUs lock does not go out of scope.
39Due to the lg_local_lock/unlock only touching cpu-local resources it
40is fast. Taking the local lock on a different CPU will be more
41expensive but still relatively cheap.
42
43One can relax the migration constraints by acquiring the current
44CPUs lock with lg_local_lock_cpu, remember the cpu, and release that
45lock at the end of the critical section even if migrated. This should
46give most of the performance benefits without inhibiting migration
47though needs careful considerations for nesting of lglocks and
48consideration of deadlocks with lg_global_lock.
49
50The lg_global_lock/unlock locks all underlying spinlocks of all
51possible CPUs (including those off-line). The preemption disable/enable
52are needed in the non-RT kernels to prevent deadlocks like:
53
54 on cpu 1
55
56 task A task B
57 lg_global_lock
58 got cpu 0 lock
59 <<<< preempt <<<<
60 lg_local_lock_cpu for cpu 0
61 spin on cpu 0 lock
62
63On -RT this deadlock scenario is resolved by the arch_spin_locks in the
64lglocks being replaced by rt_mutexes which resolve the above deadlock
65by boosting the lock-holder.
66
67
68Implementation:
69---------------
70
71The initial lglock implementation from Nick Piggin used some complex
72macros to generate the lglock/brlock in lglock.h - they were later
73turned into a set of functions by Andi Kleen [7]. The change to functions
74was motivated by the presence of multiple lock users and also by them
75being easier to maintain than the generating macros. This change to
76functions is also the basis to eliminated the restriction of not
77being initializeable in kernel modules (the remaining problem is that
78locks are not explicitly initialized - see lockdep-design.txt)
79
80Declaration and initialization:
81-------------------------------
82
83 #include <linux/lglock.h>
84
85 DEFINE_LGLOCK(name)
86 or:
87 DEFINE_STATIC_LGLOCK(name);
88
89 lg_lock_init(&name, "lockdep_name_string");
90
91 on UP this is mapped to DEFINE_SPINLOCK(name) in both cases, note
92 also that as of 3.18-rc6 all declaration in use are of the _STATIC_
93 variant (and it seems that the non-static was never in use).
94 lg_lock_init is initializing the lockdep map only.
95
96Usage:
97------
98
99From the locking semantics it is a spinlock. It could be called a
100locality aware spinlock. lg_local_* behaves like a per_cpu
101spinlock and lg_global_* like a global spinlock.
102No surprises in the API.
103
104 lg_local_lock(*lglock);
105 access to protected per_cpu object on this CPU
106 lg_local_unlock(*lglock);
107
108 lg_local_lock_cpu(*lglock, cpu);
109 access to protected per_cpu object on other CPU cpu
110 lg_local_unlock_cpu(*lglock, cpu);
111
112 lg_global_lock(*lglock);
113 access all protected per_cpu objects on all CPUs
114 lg_global_unlock(*lglock);
115
116 There are no _trylock variants of the lglocks.
117
118Note that the lg_global_lock/unlock has to iterate over all possible
119CPUs rather than the actually present CPUs or a CPU could go off-line
120with a held lock [4] and that makes it very expensive. A discussion on
121these issues can be found at [5]
122
123Constraints:
124------------
125
126 * currently the declaration of lglocks in kernel modules is not
127 possible, though this should be doable with little change.
128 * lglocks are not recursive.
129 * suitable for code that can do most operations on the CPU local
130 data and will very rarely need the global lock
131 * lg_global_lock/unlock is *very* expensive and does not scale
132 * on UP systems all lg_* primitives are simply spinlocks
133 * in PREEMPT_RT the spinlock becomes an rt-mutex and can sleep but
134 does not change the tasks state while sleeping [6].
135 * in PREEMPT_RT the preempt_disable/enable in lg_local_lock/unlock
136 is downgraded to a migrate_disable/enable, the other
137 preempt_disable/enable are downgraded to barriers [6].
138 The deadlock noted for non-RT above is resolved due to rt_mutexes
139 boosting the lock-holder in this case which arch_spin_locks do
140 not do.
141
142lglocks were designed for very specific problems in the VFS and probably
143only are the right answer in these corner cases. Any new user that looks
144at lglocks probably wants to look at the seqlock and RCU alternatives as
145her first choice. There are also efforts to resolve the RCU issues that
146currently prevent using RCU in place of view remaining lglocks.
147
148Note on brlock history:
149-----------------------
150
151The 'Big Reader' read-write spinlocks were originally introduced by
152Ingo Molnar in 2000 (2.4/2.5 kernel series) and removed in 2003. They
153later were introduced by the VFS scalability patch set in 2.6 series
154again as the "big reader lock" brlock [2] variant of lglock which has
155been replaced by seqlock primitives or by RCU based primitives in the
1563.13 kernel series as was suggested in [3] in 2003. The brlock was
157entirely removed in the 3.13 kernel series.
158
159Link: 1 http://lkml.org/lkml/2010/8/2/81
160Link: 2 http://lwn.net/Articles/401738/
161Link: 3 http://lkml.org/lkml/2003/3/9/205
162Link: 4 https://lkml.org/lkml/2011/8/24/185
163Link: 5 http://lkml.org/lkml/2011/12/18/189
164Link: 6 https://www.kernel.org/pub/linux/kernel/projects/rt/
165 patch series - lglocks-rt.patch.patch
166Link: 7 http://lkml.org/lkml/2012/3/5/26
diff --git a/Documentation/mailbox.txt b/Documentation/mailbox.txt
index 60f43ff629aa..1092ad9578da 100644
--- a/Documentation/mailbox.txt
+++ b/Documentation/mailbox.txt
@@ -53,7 +53,7 @@ static void message_from_remote(struct mbox_client *cl, void *mssg)
53{ 53{
54 struct demo_client *dc = container_of(mbox_client, 54 struct demo_client *dc = container_of(mbox_client,
55 struct demo_client, cl); 55 struct demo_client, cl);
56 if (dc->aysnc) { 56 if (dc->async) {
57 if (is_an_ack(mssg)) { 57 if (is_an_ack(mssg)) {
58 /* An ACK to our last sample sent */ 58 /* An ACK to our last sample sent */
59 return; /* Or do something else here */ 59 return; /* Or do something else here */
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 22a969cdd476..70a09f8a0383 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -121,22 +121,22 @@ For example, consider the following sequence of events:
121The set of accesses as seen by the memory system in the middle can be arranged 121The set of accesses as seen by the memory system in the middle can be arranged
122in 24 different combinations: 122in 24 different combinations:
123 123
124 STORE A=3, STORE B=4, x=LOAD A->3, y=LOAD B->4 124 STORE A=3, STORE B=4, y=LOAD A->3, x=LOAD B->4
125 STORE A=3, STORE B=4, y=LOAD B->4, x=LOAD A->3 125 STORE A=3, STORE B=4, x=LOAD B->4, y=LOAD A->3
126 STORE A=3, x=LOAD A->3, STORE B=4, y=LOAD B->4 126 STORE A=3, y=LOAD A->3, STORE B=4, x=LOAD B->4
127 STORE A=3, x=LOAD A->3, y=LOAD B->2, STORE B=4 127 STORE A=3, y=LOAD A->3, x=LOAD B->2, STORE B=4
128 STORE A=3, y=LOAD B->2, STORE B=4, x=LOAD A->3 128 STORE A=3, x=LOAD B->2, STORE B=4, y=LOAD A->3
129 STORE A=3, y=LOAD B->2, x=LOAD A->3, STORE B=4 129 STORE A=3, x=LOAD B->2, y=LOAD A->3, STORE B=4
130 STORE B=4, STORE A=3, x=LOAD A->3, y=LOAD B->4 130 STORE B=4, STORE A=3, y=LOAD A->3, x=LOAD B->4
131 STORE B=4, ... 131 STORE B=4, ...
132 ... 132 ...
133 133
134and can thus result in four different combinations of values: 134and can thus result in four different combinations of values:
135 135
136 x == 1, y == 2 136 x == 2, y == 1
137 x == 1, y == 4 137 x == 2, y == 3
138 x == 3, y == 2 138 x == 4, y == 1
139 x == 3, y == 4 139 x == 4, y == 3
140 140
141 141
142Furthermore, the stores committed by a CPU to the memory system may not be 142Furthermore, the stores committed by a CPU to the memory system may not be
@@ -694,6 +694,24 @@ Please note once again that the stores to 'b' differ. If they were
694identical, as noted earlier, the compiler could pull this store outside 694identical, as noted earlier, the compiler could pull this store outside
695of the 'if' statement. 695of the 'if' statement.
696 696
697You must also be careful not to rely too much on boolean short-circuit
698evaluation. Consider this example:
699
700 q = ACCESS_ONCE(a);
701 if (a || 1 > 0)
702 ACCESS_ONCE(b) = 1;
703
704Because the second condition is always true, the compiler can transform
705this example as following, defeating control dependency:
706
707 q = ACCESS_ONCE(a);
708 ACCESS_ONCE(b) = 1;
709
710This example underscores the need to ensure that the compiler cannot
711out-guess your code. More generally, although ACCESS_ONCE() does force
712the compiler to actually emit code for a given load, it does not force
713the compiler to use the results.
714
697Finally, control dependencies do -not- provide transitivity. This is 715Finally, control dependencies do -not- provide transitivity. This is
698demonstrated by two related examples, with the initial values of 716demonstrated by two related examples, with the initial values of
699x and y both being zero: 717x and y both being zero:
@@ -1615,6 +1633,48 @@ There are some more advanced barrier functions:
1615 operations" subsection for information on where to use these. 1633 operations" subsection for information on where to use these.
1616 1634
1617 1635
1636 (*) dma_wmb();
1637 (*) dma_rmb();
1638
1639 These are for use with consistent memory to guarantee the ordering
1640 of writes or reads of shared memory accessible to both the CPU and a
1641 DMA capable device.
1642
1643 For example, consider a device driver that shares memory with a device
1644 and uses a descriptor status value to indicate if the descriptor belongs
1645 to the device or the CPU, and a doorbell to notify it when new
1646 descriptors are available:
1647
1648 if (desc->status != DEVICE_OWN) {
1649 /* do not read data until we own descriptor */
1650 dma_rmb();
1651
1652 /* read/modify data */
1653 read_data = desc->data;
1654 desc->data = write_data;
1655
1656 /* flush modifications before status update */
1657 dma_wmb();
1658
1659 /* assign ownership */
1660 desc->status = DEVICE_OWN;
1661
1662 /* force memory to sync before notifying device via MMIO */
1663 wmb();
1664
1665 /* notify device of new descriptors */
1666 writel(DESC_NOTIFY, doorbell);
1667 }
1668
1669 The dma_rmb() allows us guarantee the device has released ownership
1670 before we read the data from the descriptor, and he dma_wmb() allows
1671 us to guarantee the data is written to the descriptor before the device
1672 can see it now has ownership. The wmb() is needed to guarantee that the
1673 cache coherent memory writes have completed before attempting a write to
1674 the cache incoherent MMIO region.
1675
1676 See Documentation/DMA-API.txt for more information on consistent memory.
1677
1618MMIO WRITE BARRIER 1678MMIO WRITE BARRIER
1619------------------ 1679------------------
1620 1680
@@ -2465,10 +2525,15 @@ functions:
2465 Please refer to the PCI specification for more information on interactions 2525 Please refer to the PCI specification for more information on interactions
2466 between PCI transactions. 2526 between PCI transactions.
2467 2527
2468 (*) readX_relaxed() 2528 (*) readX_relaxed(), writeX_relaxed()
2469 2529
2470 These are similar to readX(), but are not guaranteed to be ordered in any 2530 These are similar to readX() and writeX(), but provide weaker memory
2471 way. Be aware that there is no I/O read barrier available. 2531 ordering guarantees. Specifically, they do not guarantee ordering with
2532 respect to normal memory accesses (e.g. DMA buffers) nor do they guarantee
2533 ordering with respect to LOCK or UNLOCK operations. If the latter is
2534 required, an mmiowb() barrier can be used. Note that relaxed accesses to
2535 the same peripheral are guaranteed to be ordered with respect to each
2536 other.
2472 2537
2473 (*) ioreadX(), iowriteX() 2538 (*) ioreadX(), iowriteX()
2474 2539
diff --git a/Documentation/mic/mpssd/Makefile b/Documentation/mic/mpssd/Makefile
index 0f3156888048..f47fe6ba7300 100644
--- a/Documentation/mic/mpssd/Makefile
+++ b/Documentation/mic/mpssd/Makefile
@@ -1,5 +1,5 @@
1# List of programs to build 1# List of programs to build
2hostprogs-y := mpssd 2hostprogs-$(CONFIG_X86_64) := mpssd
3 3
4mpssd-objs := mpssd.o sysfs.o 4mpssd-objs := mpssd.o sysfs.o
5 5
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index eeb5b2e97bed..83bf4986baea 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -2230,11 +2230,8 @@ balance-rr: This mode is the only mode that will permit a single
2230 2230
2231 It is possible to adjust TCP/IP's congestion limits by 2231 It is possible to adjust TCP/IP's congestion limits by
2232 altering the net.ipv4.tcp_reordering sysctl parameter. The 2232 altering the net.ipv4.tcp_reordering sysctl parameter. The
2233 usual default value is 3, and the maximum useful value is 127. 2233 usual default value is 3. But keep in mind TCP stack is able
2234 For a four interface balance-rr bond, expect that a single 2234 to automatically increase this when it detects reorders.
2235 TCP/IP stream will utilize no more than approximately 2.3
2236 interface's worth of throughput, even after adjusting
2237 tcp_reordering.
2238 2235
2239 Note that the fraction of packets that will be delivered out of 2236 Note that the fraction of packets that will be delivered out of
2240 order is highly variable, and is unlikely to be zero. The level 2237 order is highly variable, and is unlikely to be zero. The level
diff --git a/Documentation/networking/fib_trie.txt b/Documentation/networking/fib_trie.txt
index 0723db7f8495..fe719388518b 100644
--- a/Documentation/networking/fib_trie.txt
+++ b/Documentation/networking/fib_trie.txt
@@ -73,8 +73,8 @@ trie_leaf_remove()
73 73
74trie_rebalance() 74trie_rebalance()
75 The key function for the dynamic trie after any change in the trie 75 The key function for the dynamic trie after any change in the trie
76 it is run to optimize and reorganize. Tt will walk the trie upwards 76 it is run to optimize and reorganize. It will walk the trie upwards
77 towards the root from a given tnode, doing a resize() at each step 77 towards the root from a given tnode, doing a resize() at each step
78 to implement level compression. 78 to implement level compression.
79 79
80resize() 80resize()
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 0307e2875f21..9bffdfc648dc 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -56,6 +56,13 @@ ip_forward_use_pmtu - BOOLEAN
56 0 - disabled 56 0 - disabled
57 1 - enabled 57 1 - enabled
58 58
59fwmark_reflect - BOOLEAN
60 Controls the fwmark of kernel-generated IPv4 reply packets that are not
61 associated with a socket for example, TCP RSTs or ICMP echo replies).
62 If unset, these packets have a fwmark of zero. If set, they have the
63 fwmark of the packet they are replying to.
64 Default: 0
65
59route/max_size - INTEGER 66route/max_size - INTEGER
60 Maximum number of routes allowed in the kernel. Increase 67 Maximum number of routes allowed in the kernel. Increase
61 this when using large numbers of interfaces and/or routes. 68 this when using large numbers of interfaces and/or routes.
@@ -376,9 +383,17 @@ tcp_orphan_retries - INTEGER
376 may consume significant resources. Cf. tcp_max_orphans. 383 may consume significant resources. Cf. tcp_max_orphans.
377 384
378tcp_reordering - INTEGER 385tcp_reordering - INTEGER
379 Maximal reordering of packets in a TCP stream. 386 Initial reordering level of packets in a TCP stream.
387 TCP stack can then dynamically adjust flow reordering level
388 between this initial value and tcp_max_reordering
380 Default: 3 389 Default: 3
381 390
391tcp_max_reordering - INTEGER
392 Maximal reordering level of packets in a TCP stream.
393 300 is a fairly conservative value, but you might increase it
394 if paths are using per packet load balancing (like bonding rr mode)
395 Default: 300
396
382tcp_retrans_collapse - BOOLEAN 397tcp_retrans_collapse - BOOLEAN
383 Bug-to-bug compatibility with some broken printers. 398 Bug-to-bug compatibility with some broken printers.
384 On retransmit try to send bigger packets to work around bugs in 399 On retransmit try to send bigger packets to work around bugs in
@@ -1201,6 +1216,13 @@ conf/all/forwarding - BOOLEAN
1201proxy_ndp - BOOLEAN 1216proxy_ndp - BOOLEAN
1202 Do proxy ndp. 1217 Do proxy ndp.
1203 1218
1219fwmark_reflect - BOOLEAN
1220 Controls the fwmark of kernel-generated IPv6 reply packets that are not
1221 associated with a socket for example, TCP RSTs or ICMPv6 echo replies).
1222 If unset, these packets have a fwmark of zero. If set, they have the
1223 fwmark of the packet they are replying to.
1224 Default: 0
1225
1204conf/interface/*: 1226conf/interface/*:
1205 Change special settings per interface. 1227 Change special settings per interface.
1206 1228
@@ -1452,6 +1474,19 @@ suppress_frag_ndisc - INTEGER
1452 1 - (default) discard fragmented neighbor discovery packets 1474 1 - (default) discard fragmented neighbor discovery packets
1453 0 - allow fragmented neighbor discovery packets 1475 0 - allow fragmented neighbor discovery packets
1454 1476
1477optimistic_dad - BOOLEAN
1478 Whether to perform Optimistic Duplicate Address Detection (RFC 4429).
1479 0: disabled (default)
1480 1: enabled
1481
1482use_optimistic - BOOLEAN
1483 If enabled, do not classify optimistic addresses as deprecated during
1484 source address selection. Preferred addresses will still be chosen
1485 before optimistic addresses, subject to other ranking in the source
1486 address selection algorithm.
1487 0: disabled (default)
1488 1: enabled
1489
1455icmp/*: 1490icmp/*:
1456ratelimit - INTEGER 1491ratelimit - INTEGER
1457 Limit the maximal rates for sending ICMPv6 packets. 1492 Limit the maximal rates for sending ICMPv6 packets.
diff --git a/Documentation/networking/ipvlan.txt b/Documentation/networking/ipvlan.txt
new file mode 100644
index 000000000000..cf996394e466
--- /dev/null
+++ b/Documentation/networking/ipvlan.txt
@@ -0,0 +1,107 @@
1
2 IPVLAN Driver HOWTO
3
4Initial Release:
5 Mahesh Bandewar <maheshb AT google.com>
6
71. Introduction:
8 This is conceptually very similar to the macvlan driver with one major
9exception of using L3 for mux-ing /demux-ing among slaves. This property makes
10the master device share the L2 with it's slave devices. I have developed this
11driver in conjuntion with network namespaces and not sure if there is use case
12outside of it.
13
14
152. Building and Installation:
16 In order to build the driver, please select the config item CONFIG_IPVLAN.
17The driver can be built into the kernel (CONFIG_IPVLAN=y) or as a module
18(CONFIG_IPVLAN=m).
19
20
213. Configuration:
22 There are no module parameters for this driver and it can be configured
23using IProute2/ip utility.
24
25 ip link add link <master-dev> <slave-dev> type ipvlan mode { l2 | L3 }
26
27 e.g. ip link add link ipvl0 eth0 type ipvlan mode l2
28
29
304. Operating modes:
31 IPvlan has two modes of operation - L2 and L3. For a given master device,
32you can select one of these two modes and all slaves on that master will
33operate in the same (selected) mode. The RX mode is almost identical except
34that in L3 mode the slaves wont receive any multicast / broadcast traffic.
35L3 mode is more restrictive since routing is controlled from the other (mostly)
36default namespace.
37
384.1 L2 mode:
39 In this mode TX processing happens on the stack instance attached to the
40slave device and packets are switched and queued to the master device to send
41out. In this mode the slaves will RX/TX multicast and broadcast (if applicable)
42as well.
43
444.2 L3 mode:
45 In this mode TX processing upto L3 happens on the stack instance attached
46to the slave device and packets are switched to the stack instance of the
47master device for the L2 processing and routing from that instance will be
48used before packets are queued on the outbound device. In this mode the slaves
49will not receive nor can send multicast / broadcast traffic.
50
51
525. What to choose (macvlan vs. ipvlan)?
53 These two devices are very similar in many regards and the specific use
54case could very well define which device to choose. if one of the following
55situations defines your use case then you can choose to use ipvlan -
56 (a) The Linux host that is connected to the external switch / router has
57policy configured that allows only one mac per port.
58 (b) No of virtual devices created on a master exceed the mac capacity and
59puts the NIC in promiscous mode and degraded performance is a concern.
60 (c) If the slave device is to be put into the hostile / untrusted network
61namespace where L2 on the slave could be changed / misused.
62
63
646. Example configuration:
65
66 +=============================================================+
67 | Host: host1 |
68 | |
69 | +----------------------+ +----------------------+ |
70 | | NS:ns0 | | NS:ns1 | |
71 | | | | | |
72 | | | | | |
73 | | ipvl0 | | ipvl1 | |
74 | +----------#-----------+ +-----------#----------+ |
75 | # # |
76 | ################################ |
77 | # eth0 |
78 +==============================#==============================+
79
80
81 (a) Create two network namespaces - ns0, ns1
82 ip netns add ns0
83 ip netns add ns1
84
85 (b) Create two ipvlan slaves on eth0 (master device)
86 ip link add link eth0 ipvl0 type ipvlan mode l2
87 ip link add link eth0 ipvl1 type ipvlan mode l2
88
89 (c) Assign slaves to the respective network namespaces
90 ip link set dev ipvl0 netns ns0
91 ip link set dev ipvl1 netns ns1
92
93 (d) Now switch to the namespace (ns0 or ns1) to configure the slave devices
94 - For ns0
95 (1) ip netns exec ns0 bash
96 (2) ip link set dev ipvl0 up
97 (3) ip link set dev lo up
98 (4) ip -4 addr add 127.0.0.1 dev lo
99 (5) ip -4 addr add $IPADDR dev ipvl0
100 (6) ip -4 route add default via $ROUTER dev ipvl0
101 - For ns1
102 (1) ip netns exec ns1 bash
103 (2) ip link set dev ipvl1 up
104 (3) ip link set dev lo up
105 (4) ip -4 addr add 127.0.0.1 dev lo
106 (5) ip -4 addr add $IPADDR dev ipvl1
107 (6) ip -4 route add default via $ROUTER dev ipvl1
diff --git a/Documentation/networking/ixgbe.txt b/Documentation/networking/ixgbe.txt
index 96cccebb839b..0ace6e776ac8 100644
--- a/Documentation/networking/ixgbe.txt
+++ b/Documentation/networking/ixgbe.txt
@@ -138,7 +138,7 @@ Other ethtool Commands:
138To enable Flow Director 138To enable Flow Director
139 ethtool -K ethX ntuple on 139 ethtool -K ethX ntuple on
140To add a filter 140To add a filter
141 Use -U switch. e.g., ethtool -U ethX flow-type tcp4 src-ip 0x178000a 141 Use -U switch. e.g., ethtool -U ethX flow-type tcp4 src-ip 10.0.128.23
142 action 1 142 action 1
143To see the list of filters currently present: 143To see the list of filters currently present:
144 ethtool -u ethX 144 ethtool -u ethX
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt
index 2090895b08d4..e655e2453c98 100644
--- a/Documentation/networking/stmmac.txt
+++ b/Documentation/networking/stmmac.txt
@@ -1,12 +1,12 @@
1 STMicroelectronics 10/100/1000 Synopsys Ethernet driver 1 STMicroelectronics 10/100/1000 Synopsys Ethernet driver
2 2
3Copyright (C) 2007-2013 STMicroelectronics Ltd 3Copyright (C) 2007-2014 STMicroelectronics Ltd
4Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> 4Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
5 5
6This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers 6This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers
7(Synopsys IP blocks). 7(Synopsys IP blocks).
8 8
9Currently this network device driver is for all STM embedded MAC/GMAC 9Currently this network device driver is for all STi embedded MAC/GMAC
10(i.e. 7xxx/5xxx SoCs), SPEAr (arm), Loongson1B (mips) and XLINX XC2V3000 10(i.e. 7xxx/5xxx SoCs), SPEAr (arm), Loongson1B (mips) and XLINX XC2V3000
11FF1152AMT0221 D1215994A VIRTEX FPGA board. 11FF1152AMT0221 D1215994A VIRTEX FPGA board.
12 12
@@ -22,6 +22,9 @@ The kernel configuration option is STMMAC_ETH:
22 Device Drivers ---> Network device support ---> Ethernet (1000 Mbit) ---> 22 Device Drivers ---> Network device support ---> Ethernet (1000 Mbit) --->
23 STMicroelectronics 10/100/1000 Ethernet driver (STMMAC_ETH) 23 STMicroelectronics 10/100/1000 Ethernet driver (STMMAC_ETH)
24 24
25CONFIG_STMMAC_PLATFORM: is to enable the platform driver.
26CONFIG_STMMAC_PCI: is to enable the pci driver.
27
252) Driver parameters list: 282) Driver parameters list:
26 debug: message level (0: no output, 16: all); 29 debug: message level (0: no output, 16: all);
27 phyaddr: to manually provide the physical address to the PHY device; 30 phyaddr: to manually provide the physical address to the PHY device;
@@ -45,10 +48,11 @@ Driver parameters can be also passed in command line by using:
45The xmit method is invoked when the kernel needs to transmit a packet; it sets 48The xmit method is invoked when the kernel needs to transmit a packet; it sets
46the descriptors in the ring and informs the DMA engine that there is a packet 49the descriptors in the ring and informs the DMA engine that there is a packet
47ready to be transmitted. 50ready to be transmitted.
48Once the controller has finished transmitting the packet, an interrupt is
49triggered; So the driver will be able to release the socket buffers.
50By default, the driver sets the NETIF_F_SG bit in the features field of the 51By default, the driver sets the NETIF_F_SG bit in the features field of the
51net_device structure enabling the scatter/gather feature. 52net_device structure enabling the scatter-gather feature. This is true on
53chips and configurations where the checksum can be done in hardware.
54Once the controller has finished transmitting the packet, napi will be
55scheduled to release the transmit resources.
52 56
534.2) Receive process 574.2) Receive process
54When one or more packets are received, an interrupt happens. The interrupts 58When one or more packets are received, an interrupt happens. The interrupts
@@ -58,20 +62,12 @@ This is based on NAPI so the interrupt handler signals only if there is work
58to be done, and it exits. 62to be done, and it exits.
59Then the poll method will be scheduled at some future point. 63Then the poll method will be scheduled at some future point.
60The incoming packets are stored, by the DMA, in a list of pre-allocated socket 64The incoming packets are stored, by the DMA, in a list of pre-allocated socket
61buffers in order to avoid the memcpy (Zero-copy). 65buffers in order to avoid the memcpy (zero-copy).
62 66
634.3) Interrupt Mitigation 674.3) Interrupt Mitigation
64The driver is able to mitigate the number of its DMA interrupts 68The driver is able to mitigate the number of its DMA interrupts
65using NAPI for the reception on chips older than the 3.50. 69using NAPI for the reception on chips older than the 3.50.
66New chips have an HW RX-Watchdog used for this mitigation. 70New chips have an HW RX-Watchdog used for this mitigation.
67
68On Tx-side, the mitigation schema is based on a SW timer that calls the
69tx function (stmmac_tx) to reclaim the resource after transmitting the
70frames.
71Also there is another parameter (like a threshold) used to program
72the descriptors avoiding to set the interrupt on completion bit in
73when the frame is sent (xmit).
74
75Mitigation parameters can be tuned by ethtool. 71Mitigation parameters can be tuned by ethtool.
76 72
774.4) WOL 734.4) WOL
@@ -79,7 +75,7 @@ Wake up on Lan feature through Magic and Unicast frames are supported for the
79GMAC core. 75GMAC core.
80 76
814.5) DMA descriptors 774.5) DMA descriptors
82Driver handles both normal and enhanced descriptors. The latter has been only 78Driver handles both normal and alternate descriptors. The latter has been only
83tested on DWC Ether MAC 10/100/1000 Universal version 3.41a and later. 79tested on DWC Ether MAC 10/100/1000 Universal version 3.41a and later.
84 80
85STMMAC supports DMA descriptor to operate both in dual buffer (RING) 81STMMAC supports DMA descriptor to operate both in dual buffer (RING)
@@ -91,9 +87,20 @@ In CHAINED mode each descriptor will have pointer to next descriptor in
91the list, hence creating the explicit chaining in the descriptor itself, 87the list, hence creating the explicit chaining in the descriptor itself,
92whereas such explicit chaining is not possible in RING mode. 88whereas such explicit chaining is not possible in RING mode.
93 89
904.5.1) Extended descriptors
91 The extended descriptors give us information about the Ethernet payload
92 when it is carrying PTP packets or TCP/UDP/ICMP over IP.
93 These are not available on GMAC Synopsys chips older than the 3.50.
94 At probe time the driver will decide if these can be actually used.
95 This support also is mandatory for PTPv2 because the extra descriptors
96 are used for saving the hardware timestamps and Extended Status.
97
944.6) Ethtool support 984.6) Ethtool support
95Ethtool is supported. Driver statistics and internal errors can be taken using: 99Ethtool is supported.
96ethtool -S ethX command. It is possible to dump registers etc. 100
101For example, driver statistics (including RMON), internal errors can be taken
102using:
103 # ethtool -S ethX command
97 104
984.7) Jumbo and Segmentation Offloading 1054.7) Jumbo and Segmentation Offloading
99Jumbo frames are supported and tested for the GMAC. 106Jumbo frames are supported and tested for the GMAC.
@@ -101,12 +108,11 @@ The GSO has been also added but it's performed in software.
101LRO is not supported. 108LRO is not supported.
102 109
1034.8) Physical 1104.8) Physical
104The driver is compatible with PAL to work with PHY and GPHY devices. 111The driver is compatible with Physical Abstraction Layer to be connected with
112PHY and GPHY devices.
105 113
1064.9) Platform information 1144.9) Platform information
107Several driver's information can be passed through the platform 115Several information can be passed through the platform and device-tree.
108These are included in the include/linux/stmmac.h header file
109and detailed below as well:
110 116
111struct plat_stmmacenet_data { 117struct plat_stmmacenet_data {
112 char *phy_bus_name; 118 char *phy_bus_name;
@@ -125,15 +131,18 @@ struct plat_stmmacenet_data {
125 int force_sf_dma_mode; 131 int force_sf_dma_mode;
126 int force_thresh_dma_mode; 132 int force_thresh_dma_mode;
127 int riwt_off; 133 int riwt_off;
134 int max_speed;
135 int maxmtu;
128 void (*fix_mac_speed)(void *priv, unsigned int speed); 136 void (*fix_mac_speed)(void *priv, unsigned int speed);
129 void (*bus_setup)(void __iomem *ioaddr); 137 void (*bus_setup)(void __iomem *ioaddr);
130 void *(*setup)(struct platform_device *pdev); 138 void *(*setup)(struct platform_device *pdev);
139 void (*free)(struct platform_device *pdev, void *priv);
131 int (*init)(struct platform_device *pdev, void *priv); 140 int (*init)(struct platform_device *pdev, void *priv);
132 void (*exit)(struct platform_device *pdev, void *priv); 141 void (*exit)(struct platform_device *pdev, void *priv);
133 void *custom_cfg; 142 void *custom_cfg;
134 void *custom_data; 143 void *custom_data;
135 void *bsp_priv; 144 void *bsp_priv;
136 }; 145};
137 146
138Where: 147Where:
139 o phy_bus_name: phy bus name to attach to the stmmac. 148 o phy_bus_name: phy bus name to attach to the stmmac.
@@ -258,32 +267,43 @@ and the second one, with a real PHY device attached to the bus,
258by using the stmmac_mdio_bus_data structure (to provide the id, the 267by using the stmmac_mdio_bus_data structure (to provide the id, the
259reset procedure etc). 268reset procedure etc).
260 269
2614.10) List of source files: 270Note that, starting from new chips, where it is available the HW capability
262 o Kconfig 271register, many configurations are discovered at run-time for example to
263 o Makefile 272understand if EEE, HW csum, PTP, enhanced descriptor etc are actually
264 o stmmac_main.c: main network device driver; 273available. As strategy adopted in this driver, the information from the HW
265 o stmmac_mdio.c: mdio functions; 274capability register can replace what has been passed from the platform.
266 o stmmac_pci: PCI driver; 275
267 o stmmac_platform.c: platform driver 2764.10) Device-tree support.
268 o stmmac_ethtool.c: ethtool support; 277
269 o stmmac_timer.[ch]: timer code used for mitigating the driver dma interrupts 278Please see the following document:
270 (only tested on ST40 platforms based); 279 Documentation/devicetree/bindings/net/stmmac.txt
280
281and the stmmac_of_data structure inside the include/linux/stmmac.h header file.
282
2834.11) This is a summary of the content of some relevant files:
284 o stmmac_main.c: to implement the main network device driver;
285 o stmmac_mdio.c: to provide mdio functions;
286 o stmmac_pci: this the PCI driver;
287 o stmmac_platform.c: this the platform driver (OF supported)
288 o stmmac_ethtool.c: to implement the ethtool support;
271 o stmmac.h: private driver structure; 289 o stmmac.h: private driver structure;
272 o common.h: common definitions and VFTs; 290 o common.h: common definitions and VFTs;
273 o descs.h: descriptor structure definitions; 291 o descs.h: descriptor structure definitions;
274 o dwmac1000_core.c: GMAC core functions; 292 o dwmac1000_core.c: dwmac GiGa core functions;
275 o dwmac1000_dma.c: dma functions for the GMAC chip; 293 o dwmac1000_dma.c: dma functions for the GMAC chip;
276 o dwmac1000.h: specific header file for the GMAC; 294 o dwmac1000.h: specific header file for the dwmac GiGa;
277 o dwmac100_core: MAC 100 core and dma code; 295 o dwmac100_core: dwmac 100 core code;
278 o dwmac100_dma.c: dma functions for the MAC chip; 296 o dwmac100_dma.c: dma functions for the dwmac 100 chip;
279 o dwmac1000.h: specific header file for the MAC; 297 o dwmac1000.h: specific header file for the MAC;
280 o dwmac_lib.c: generic DMA functions shared among chips; 298 o dwmac_lib.c: generic DMA functions;
281 o enh_desc.c: functions for handling enhanced descriptors; 299 o enh_desc.c: functions for handling enhanced descriptors;
282 o norm_desc.c: functions for handling normal descriptors; 300 o norm_desc.c: functions for handling normal descriptors;
283 o chain_mode.c/ring_mode.c:: functions to manage RING/CHAINED modes; 301 o chain_mode.c/ring_mode.c:: functions to manage RING/CHAINED modes;
284 o mmc_core.c/mmc.h: Management MAC Counters; 302 o mmc_core.c/mmc.h: Management MAC Counters;
285 o stmmac_hwtstamp.c: HW timestamp support for PTP 303 o stmmac_hwtstamp.c: HW timestamp support for PTP;
286 o stmmac_ptp.c: PTP 1588 clock 304 o stmmac_ptp.c: PTP 1588 clock;
305 o dwmac-<XXX>.c: these are for the platform glue-logic file; e.g. dwmac-sti.c
306 for STMicroelectronics SoCs.
287 307
2885) Debug Information 3085) Debug Information
289 309
@@ -298,23 +318,14 @@ to get statistics: e.g. using: ethtool -S ethX
298(that shows the Management counters (MMC) if supported) 318(that shows the Management counters (MMC) if supported)
299or sees the MAC/DMA registers: e.g. using: ethtool -d ethX 319or sees the MAC/DMA registers: e.g. using: ethtool -d ethX
300 320
301Compiling the Kernel with CONFIG_DEBUG_FS and enabling the 321Compiling the Kernel with CONFIG_DEBUG_FS the driver will export the following
302STMMAC_DEBUG_FS option the driver will export the following
303debugfs entries: 322debugfs entries:
304 323
305/sys/kernel/debug/stmmaceth/descriptors_status 324/sys/kernel/debug/stmmaceth/descriptors_status
306 To show the DMA TX/RX descriptor rings 325 To show the DMA TX/RX descriptor rings
307 326
308Developer can also use the "debug" module parameter to get 327Developer can also use the "debug" module parameter to get further debug
309further debug information. 328information (please see: NETIF Msg Level).
310
311In the end, there are other macros (that cannot be enabled
312via menuconfig) to turn-on the RX/TX DMA debugging,
313specific MAC core debug printk etc. Others to enable the
314debug in the TX and RX processes.
315All these are only useful during the developing stage
316and should never enabled inside the code for general usage.
317In fact, these can generate an huge amount of debug messages.
318 329
3196) Energy Efficient Ethernet 3306) Energy Efficient Ethernet
320 331
@@ -337,15 +348,7 @@ To enter in Tx LPI mode the driver needs to have a software timer
337that enable and disable the LPI mode when there is nothing to be 348that enable and disable the LPI mode when there is nothing to be
338transmitted. 349transmitted.
339 350
3407) Extended descriptors 3517) Precision Time Protocol (PTP)
341The extended descriptors give us information about the receive Ethernet payload
342when it is carrying PTP packets or TCP/UDP/ICMP over IP.
343These are not available on GMAC Synopsys chips older than the 3.50.
344At probe time the driver will decide if these can be actually used.
345This support also is mandatory for PTPv2 because the extra descriptors 6 and 7
346are used for saving the hardware timestamps.
347
3488) Precision Time Protocol (PTP)
349The driver supports the IEEE 1588-2002, Precision Time Protocol (PTP), 352The driver supports the IEEE 1588-2002, Precision Time Protocol (PTP),
350which enables precise synchronization of clocks in measurement and 353which enables precise synchronization of clocks in measurement and
351control systems implemented with technologies such as network 354control systems implemented with technologies such as network
@@ -355,7 +358,7 @@ In addition to the basic timestamp features mentioned in IEEE 1588-2002
355Timestamps, new GMAC cores support the advanced timestamp features. 358Timestamps, new GMAC cores support the advanced timestamp features.
356IEEE 1588-2008 that can be enabled when configure the Kernel. 359IEEE 1588-2008 that can be enabled when configure the Kernel.
357 360
3589) SGMII/RGMII supports 3618) SGMII/RGMII supports
359New GMAC devices provide own way to manage RGMII/SGMII. 362New GMAC devices provide own way to manage RGMII/SGMII.
360This information is available at run-time by looking at the 363This information is available at run-time by looking at the
361HW capability register. This means that the stmmac can manage 364HW capability register. This means that the stmmac can manage
@@ -364,8 +367,3 @@ In fact, the HW provides a subset of extended registers to
364restart the ANE, verify Full/Half duplex mode and Speed. 367restart the ANE, verify Full/Half duplex mode and Speed.
365Also thanks to these registers it is possible to look at the 368Also thanks to these registers it is possible to look at the
366Auto-negotiated Link Parter Ability. 369Auto-negotiated Link Parter Ability.
367
36810) TODO:
369 o XGMAC is not supported.
370 o Complete the TBI & RTBI support.
371 o extend VLAN support for 3.70a SYNP GMAC.
diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
new file mode 100644
index 000000000000..f981a9295a39
--- /dev/null
+++ b/Documentation/networking/switchdev.txt
@@ -0,0 +1,59 @@
1Switch (and switch-ish) device drivers HOWTO
2===========================
3
4Please note that the word "switch" is here used in very generic meaning.
5This include devices supporting L2/L3 but also various flow offloading chips,
6including switches embedded into SR-IOV NICs.
7
8Lets describe a topology a bit. Imagine the following example:
9
10 +----------------------------+ +---------------+
11 | SOME switch chip | | CPU |
12 +----------------------------+ +---------------+
13 port1 port2 port3 port4 MNGMNT | PCI-E |
14 | | | | | +---------------+
15 PHY PHY | | | | NIC0 NIC1
16 | | | | | |
17 | | +- PCI-E -+ | |
18 | +------- MII -------+ |
19 +------------- MII ------------+
20
21In this example, there are two independent lines between the switch silicon
22and CPU. NIC0 and NIC1 drivers are not aware of a switch presence. They are
23separate from the switch driver. SOME switch chip is by managed by a driver
24via PCI-E device MNGMNT. Note that MNGMNT device, NIC0 and NIC1 may be
25connected to some other type of bus.
26
27Now, for the previous example show the representation in kernel:
28
29 +----------------------------+ +---------------+
30 | SOME switch chip | | CPU |
31 +----------------------------+ +---------------+
32 sw0p0 sw0p1 sw0p2 sw0p3 MNGMNT | PCI-E |
33 | | | | | +---------------+
34 PHY PHY | | | | eth0 eth1
35 | | | | | |
36 | | +- PCI-E -+ | |
37 | +------- MII -------+ |
38 +------------- MII ------------+
39
40Lets call the example switch driver for SOME switch chip "SOMEswitch". This
41driver takes care of PCI-E device MNGMNT. There is a netdevice instance sw0pX
42created for each port of a switch. These netdevices are instances
43of "SOMEswitch" driver. sw0pX netdevices serve as a "representation"
44of the switch chip. eth0 and eth1 are instances of some other existing driver.
45
46The only difference of the switch-port netdevice from the ordinary netdevice
47is that is implements couple more NDOs:
48
49 ndo_switch_parent_id_get - This returns the same ID for two port netdevices
50 of the same physical switch chip. This is
51 mandatory to be implemented by all switch drivers
52 and serves the caller for recognition of a port
53 netdevice.
54 ndo_switch_parent_* - Functions that serve for a manipulation of the switch
55 chip itself (it can be though of as a "parent" of the
56 port, therefore the name). They are not port-specific.
57 Caller might use arbitrary port netdevice of the same
58 switch and it will make no difference.
59 ndo_switch_port_* - Functions that serve for a port-specific manipulation.
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index 412f45ca2d73..a5c784c89312 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -122,7 +122,7 @@ SOF_TIMESTAMPING_RAW_HARDWARE:
122 122
1231.3.3 Timestamp Options 1231.3.3 Timestamp Options
124 124
125The interface supports one option 125The interface supports the options
126 126
127SOF_TIMESTAMPING_OPT_ID: 127SOF_TIMESTAMPING_OPT_ID:
128 128
@@ -130,19 +130,36 @@ SOF_TIMESTAMPING_OPT_ID:
130 have multiple concurrent timestamping requests outstanding. Packets 130 have multiple concurrent timestamping requests outstanding. Packets
131 can be reordered in the transmit path, for instance in the packet 131 can be reordered in the transmit path, for instance in the packet
132 scheduler. In that case timestamps will be queued onto the error 132 scheduler. In that case timestamps will be queued onto the error
133 queue out of order from the original send() calls. This option 133 queue out of order from the original send() calls. It is not always
134 embeds a counter that is incremented at send() time, to order 134 possible to uniquely match timestamps to the original send() calls
135 timestamps within a flow. 135 based on timestamp order or payload inspection alone, then.
136
137 This option associates each packet at send() with a unique
138 identifier and returns that along with the timestamp. The identifier
139 is derived from a per-socket u32 counter (that wraps). For datagram
140 sockets, the counter increments with each sent packet. For stream
141 sockets, it increments with every byte.
142
143 The counter starts at zero. It is initialized the first time that
144 the socket option is enabled. It is reset each time the option is
145 enabled after having been disabled. Resetting the counter does not
146 change the identifiers of existing packets in the system.
136 147
137 This option is implemented only for transmit timestamps. There, the 148 This option is implemented only for transmit timestamps. There, the
138 timestamp is always looped along with a struct sock_extended_err. 149 timestamp is always looped along with a struct sock_extended_err.
139 The option modifies field ee_info to pass an id that is unique 150 The option modifies field ee_data to pass an id that is unique
140 among all possibly concurrently outstanding timestamp requests for 151 among all possibly concurrently outstanding timestamp requests for
141 that socket. In practice, it is a monotonically increasing u32 152 that socket.
142 (that wraps). 153
154
155SOF_TIMESTAMPING_OPT_CMSG:
143 156
144 In datagram sockets, the counter increments on each send call. In 157 Support recv() cmsg for all timestamped packets. Control messages
145 stream sockets, it increments with every byte. 158 are already supported unconditionally on all packets with receive
159 timestamps and on IPv6 packets with transmit timestamp. This option
160 extends them to IPv4 packets with transmit timestamp. One use case
161 is to correlate packets with their egress device, by enabling socket
162 option IP_PKTINFO simultaneously.
146 163
147 164
1481.4 Bytestream Timestamps 1651.4 Bytestream Timestamps
diff --git a/Documentation/networking/timestamping/txtimestamp.c b/Documentation/networking/timestamping/txtimestamp.c
index b32fc2a07734..876f71c5625a 100644
--- a/Documentation/networking/timestamping/txtimestamp.c
+++ b/Documentation/networking/timestamping/txtimestamp.c
@@ -46,6 +46,7 @@
46#include <netpacket/packet.h> 46#include <netpacket/packet.h>
47#include <poll.h> 47#include <poll.h>
48#include <stdarg.h> 48#include <stdarg.h>
49#include <stdbool.h>
49#include <stdint.h> 50#include <stdint.h>
50#include <stdio.h> 51#include <stdio.h>
51#include <stdlib.h> 52#include <stdlib.h>
@@ -58,6 +59,14 @@
58#include <time.h> 59#include <time.h>
59#include <unistd.h> 60#include <unistd.h>
60 61
62/* ugly hack to work around netinet/in.h and linux/ipv6.h conflicts */
63#ifndef in6_pktinfo
64struct in6_pktinfo {
65 struct in6_addr ipi6_addr;
66 int ipi6_ifindex;
67};
68#endif
69
61/* command line parameters */ 70/* command line parameters */
62static int cfg_proto = SOCK_STREAM; 71static int cfg_proto = SOCK_STREAM;
63static int cfg_ipproto = IPPROTO_TCP; 72static int cfg_ipproto = IPPROTO_TCP;
@@ -65,6 +74,8 @@ static int cfg_num_pkts = 4;
65static int do_ipv4 = 1; 74static int do_ipv4 = 1;
66static int do_ipv6 = 1; 75static int do_ipv6 = 1;
67static int cfg_payload_len = 10; 76static int cfg_payload_len = 10;
77static bool cfg_show_payload;
78static bool cfg_do_pktinfo;
68static uint16_t dest_port = 9000; 79static uint16_t dest_port = 9000;
69 80
70static struct sockaddr_in daddr; 81static struct sockaddr_in daddr;
@@ -131,6 +142,30 @@ static void print_timestamp(struct scm_timestamping *tss, int tstype,
131 __print_timestamp(tsname, &tss->ts[0], tskey, payload_len); 142 __print_timestamp(tsname, &tss->ts[0], tskey, payload_len);
132} 143}
133 144
145/* TODO: convert to check_and_print payload once API is stable */
146static void print_payload(char *data, int len)
147{
148 int i;
149
150 if (len > 70)
151 len = 70;
152
153 fprintf(stderr, "payload: ");
154 for (i = 0; i < len; i++)
155 fprintf(stderr, "%02hhx ", data[i]);
156 fprintf(stderr, "\n");
157}
158
159static void print_pktinfo(int family, int ifindex, void *saddr, void *daddr)
160{
161 char sa[INET6_ADDRSTRLEN], da[INET6_ADDRSTRLEN];
162
163 fprintf(stderr, " pktinfo: ifindex=%u src=%s dst=%s\n",
164 ifindex,
165 saddr ? inet_ntop(family, saddr, sa, sizeof(sa)) : "unknown",
166 daddr ? inet_ntop(family, daddr, da, sizeof(da)) : "unknown");
167}
168
134static void __poll(int fd) 169static void __poll(int fd)
135{ 170{
136 struct pollfd pollfd; 171 struct pollfd pollfd;
@@ -156,10 +191,9 @@ static void __recv_errmsg_cmsg(struct msghdr *msg, int payload_len)
156 cm->cmsg_type == SCM_TIMESTAMPING) { 191 cm->cmsg_type == SCM_TIMESTAMPING) {
157 tss = (void *) CMSG_DATA(cm); 192 tss = (void *) CMSG_DATA(cm);
158 } else if ((cm->cmsg_level == SOL_IP && 193 } else if ((cm->cmsg_level == SOL_IP &&
159 cm->cmsg_type == IP_RECVERR) || 194 cm->cmsg_type == IP_RECVERR) ||
160 (cm->cmsg_level == SOL_IPV6 && 195 (cm->cmsg_level == SOL_IPV6 &&
161 cm->cmsg_type == IPV6_RECVERR)) { 196 cm->cmsg_type == IPV6_RECVERR)) {
162
163 serr = (void *) CMSG_DATA(cm); 197 serr = (void *) CMSG_DATA(cm);
164 if (serr->ee_errno != ENOMSG || 198 if (serr->ee_errno != ENOMSG ||
165 serr->ee_origin != SO_EE_ORIGIN_TIMESTAMPING) { 199 serr->ee_origin != SO_EE_ORIGIN_TIMESTAMPING) {
@@ -168,6 +202,16 @@ static void __recv_errmsg_cmsg(struct msghdr *msg, int payload_len)
168 serr->ee_origin); 202 serr->ee_origin);
169 serr = NULL; 203 serr = NULL;
170 } 204 }
205 } else if (cm->cmsg_level == SOL_IP &&
206 cm->cmsg_type == IP_PKTINFO) {
207 struct in_pktinfo *info = (void *) CMSG_DATA(cm);
208 print_pktinfo(AF_INET, info->ipi_ifindex,
209 &info->ipi_spec_dst, &info->ipi_addr);
210 } else if (cm->cmsg_level == SOL_IPV6 &&
211 cm->cmsg_type == IPV6_PKTINFO) {
212 struct in6_pktinfo *info6 = (void *) CMSG_DATA(cm);
213 print_pktinfo(AF_INET6, info6->ipi6_ifindex,
214 NULL, &info6->ipi6_addr);
171 } else 215 } else
172 fprintf(stderr, "unknown cmsg %d,%d\n", 216 fprintf(stderr, "unknown cmsg %d,%d\n",
173 cm->cmsg_level, cm->cmsg_type); 217 cm->cmsg_level, cm->cmsg_type);
@@ -206,7 +250,11 @@ static int recv_errmsg(int fd)
206 if (ret == -1 && errno != EAGAIN) 250 if (ret == -1 && errno != EAGAIN)
207 error(1, errno, "recvmsg"); 251 error(1, errno, "recvmsg");
208 252
209 __recv_errmsg_cmsg(&msg, ret); 253 if (ret > 0) {
254 __recv_errmsg_cmsg(&msg, ret);
255 if (cfg_show_payload)
256 print_payload(data, cfg_payload_len);
257 }
210 258
211 free(data); 259 free(data);
212 return ret == -1; 260 return ret == -1;
@@ -215,9 +263,9 @@ static int recv_errmsg(int fd)
215static void do_test(int family, unsigned int opt) 263static void do_test(int family, unsigned int opt)
216{ 264{
217 char *buf; 265 char *buf;
218 int fd, i, val, total_len; 266 int fd, i, val = 1, total_len;
219 267
220 if (family == IPPROTO_IPV6 && cfg_proto != SOCK_STREAM) { 268 if (family == AF_INET6 && cfg_proto != SOCK_STREAM) {
221 /* due to lack of checksum generation code */ 269 /* due to lack of checksum generation code */
222 fprintf(stderr, "test: skipping datagram over IPv6\n"); 270 fprintf(stderr, "test: skipping datagram over IPv6\n");
223 return; 271 return;
@@ -239,7 +287,6 @@ static void do_test(int family, unsigned int opt)
239 error(1, errno, "socket"); 287 error(1, errno, "socket");
240 288
241 if (cfg_proto == SOCK_STREAM) { 289 if (cfg_proto == SOCK_STREAM) {
242 val = 1;
243 if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, 290 if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY,
244 (char*) &val, sizeof(val))) 291 (char*) &val, sizeof(val)))
245 error(1, 0, "setsockopt no nagle"); 292 error(1, 0, "setsockopt no nagle");
@@ -253,7 +300,20 @@ static void do_test(int family, unsigned int opt)
253 } 300 }
254 } 301 }
255 302
303 if (cfg_do_pktinfo) {
304 if (family == AF_INET6) {
305 if (setsockopt(fd, SOL_IPV6, IPV6_RECVPKTINFO,
306 &val, sizeof(val)))
307 error(1, errno, "setsockopt pktinfo ipv6");
308 } else {
309 if (setsockopt(fd, SOL_IP, IP_PKTINFO,
310 &val, sizeof(val)))
311 error(1, errno, "setsockopt pktinfo ipv4");
312 }
313 }
314
256 opt |= SOF_TIMESTAMPING_SOFTWARE | 315 opt |= SOF_TIMESTAMPING_SOFTWARE |
316 SOF_TIMESTAMPING_OPT_CMSG |
257 SOF_TIMESTAMPING_OPT_ID; 317 SOF_TIMESTAMPING_OPT_ID;
258 if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPING, 318 if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPING,
259 (char *) &opt, sizeof(opt))) 319 (char *) &opt, sizeof(opt)))
@@ -262,8 +322,6 @@ static void do_test(int family, unsigned int opt)
262 for (i = 0; i < cfg_num_pkts; i++) { 322 for (i = 0; i < cfg_num_pkts; i++) {
263 memset(&ts_prev, 0, sizeof(ts_prev)); 323 memset(&ts_prev, 0, sizeof(ts_prev));
264 memset(buf, 'a' + i, total_len); 324 memset(buf, 'a' + i, total_len);
265 buf[total_len - 2] = '\n';
266 buf[total_len - 1] = '\0';
267 325
268 if (cfg_proto == SOCK_RAW) { 326 if (cfg_proto == SOCK_RAW) {
269 struct udphdr *udph; 327 struct udphdr *udph;
@@ -324,11 +382,13 @@ static void __attribute__((noreturn)) usage(const char *filepath)
324 " -4: only IPv4\n" 382 " -4: only IPv4\n"
325 " -6: only IPv6\n" 383 " -6: only IPv6\n"
326 " -h: show this message\n" 384 " -h: show this message\n"
385 " -I: request PKTINFO\n"
327 " -l N: send N bytes at a time\n" 386 " -l N: send N bytes at a time\n"
328 " -r: use raw\n" 387 " -r: use raw\n"
329 " -R: use raw (IP_HDRINCL)\n" 388 " -R: use raw (IP_HDRINCL)\n"
330 " -p N: connect to port N\n" 389 " -p N: connect to port N\n"
331 " -u: use udp\n", 390 " -u: use udp\n"
391 " -x: show payload (up to 70 bytes)\n",
332 filepath); 392 filepath);
333 exit(1); 393 exit(1);
334} 394}
@@ -338,7 +398,7 @@ static void parse_opt(int argc, char **argv)
338 int proto_count = 0; 398 int proto_count = 0;
339 char c; 399 char c;
340 400
341 while ((c = getopt(argc, argv, "46hl:p:rRu")) != -1) { 401 while ((c = getopt(argc, argv, "46hIl:p:rRux")) != -1) {
342 switch (c) { 402 switch (c) {
343 case '4': 403 case '4':
344 do_ipv6 = 0; 404 do_ipv6 = 0;
@@ -346,6 +406,9 @@ static void parse_opt(int argc, char **argv)
346 case '6': 406 case '6':
347 do_ipv4 = 0; 407 do_ipv4 = 0;
348 break; 408 break;
409 case 'I':
410 cfg_do_pktinfo = true;
411 break;
349 case 'r': 412 case 'r':
350 proto_count++; 413 proto_count++;
351 cfg_proto = SOCK_RAW; 414 cfg_proto = SOCK_RAW;
@@ -367,6 +430,9 @@ static void parse_opt(int argc, char **argv)
367 case 'p': 430 case 'p':
368 dest_port = strtoul(optarg, NULL, 10); 431 dest_port = strtoul(optarg, NULL, 10);
369 break; 432 break;
433 case 'x':
434 cfg_show_payload = true;
435 break;
370 case 'h': 436 case 'h':
371 default: 437 default:
372 usage(argv[0]); 438 usage(argv[0]);
diff --git a/Documentation/nios2/README b/Documentation/nios2/README
new file mode 100644
index 000000000000..054a67d55563
--- /dev/null
+++ b/Documentation/nios2/README
@@ -0,0 +1,23 @@
1Linux on the Nios II architecture
2=================================
3
4This is a port of Linux to Nios II (nios2) processor.
5
6In order to compile for Nios II, you need a version of GCC with support for the generic
7system call ABI. Please see this link for more information on how compiling and booting
8software for the Nios II platform:
9http://www.rocketboards.org/foswiki/Documentation/NiosIILinuxUserManual
10
11For reference, please see the following link:
12http://www.altera.com/literature/lit-nio2.jsp
13
14What is Nios II?
15================
16Nios II is a 32-bit embedded-processor architecture designed specifically for the
17Altera family of FPGAs. In order to support Linux, Nios II needs to be configured
18with MMU and hardware multiplier enabled.
19
20Nios II ABI
21===========
22Please refer to chapter "Application Binary Interface" in Nios II Processor Reference
23Handbook.
diff --git a/Documentation/phy.txt b/Documentation/phy.txt
index c6594af94d25..371361c69a4b 100644
--- a/Documentation/phy.txt
+++ b/Documentation/phy.txt
@@ -54,18 +54,14 @@ The PHY driver should create the PHY in order for other peripheral controllers
54to make use of it. The PHY framework provides 2 APIs to create the PHY. 54to make use of it. The PHY framework provides 2 APIs to create the PHY.
55 55
56struct phy *phy_create(struct device *dev, struct device_node *node, 56struct phy *phy_create(struct device *dev, struct device_node *node,
57 const struct phy_ops *ops, 57 const struct phy_ops *ops);
58 struct phy_init_data *init_data);
59struct phy *devm_phy_create(struct device *dev, struct device_node *node, 58struct phy *devm_phy_create(struct device *dev, struct device_node *node,
60 const struct phy_ops *ops, 59 const struct phy_ops *ops);
61 struct phy_init_data *init_data);
62 60
63The PHY drivers can use one of the above 2 APIs to create the PHY by passing 61The PHY drivers can use one of the above 2 APIs to create the PHY by passing
64the device pointer, phy ops and init_data. 62the device pointer and phy ops.
65phy_ops is a set of function pointers for performing PHY operations such as 63phy_ops is a set of function pointers for performing PHY operations such as
66init, exit, power_on and power_off. *init_data* is mandatory to get a reference 64init, exit, power_on and power_off.
67to the PHY in the case of non-dt boot. See section *Board File Initialization*
68on how init_data should be used.
69 65
70Inorder to dereference the private data (in phy_ops), the phy provider driver 66Inorder to dereference the private data (in phy_ops), the phy provider driver
71can use phy_set_drvdata() after creating the PHY and use phy_get_drvdata() in 67can use phy_set_drvdata() after creating the PHY and use phy_get_drvdata() in
@@ -137,42 +133,18 @@ There are exported APIs like phy_pm_runtime_get, phy_pm_runtime_get_sync,
137phy_pm_runtime_put, phy_pm_runtime_put_sync, phy_pm_runtime_allow and 133phy_pm_runtime_put, phy_pm_runtime_put_sync, phy_pm_runtime_allow and
138phy_pm_runtime_forbid for performing PM operations. 134phy_pm_runtime_forbid for performing PM operations.
139 135
1408. Board File Initialization 1368. PHY Mappings
141 137
142Certain board file initialization is necessary in order to get a reference 138In order to get reference to a PHY without help from DeviceTree, the framework
143to the PHY in the case of non-dt boot. 139offers lookups which can be compared to clkdev that allow clk structures to be
144Say we have a single device that implements 3 PHYs that of USB, SATA and PCIe, 140bound to devices. A lookup can be made be made during runtime when a handle to
145then in the board file the following initialization should be done. 141the struct phy already exists.
146 142
147struct phy_consumer consumers[] = { 143The framework offers the following API for registering and unregistering the
148 PHY_CONSUMER("dwc3.0", "usb"), 144lookups.
149 PHY_CONSUMER("pcie.0", "pcie"), 145
150 PHY_CONSUMER("sata.0", "sata"), 146int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id);
151}; 147void phy_remove_lookup(struct phy *phy, const char *con_id, const char *dev_id);
152PHY_CONSUMER takes 2 parameters, first is the device name of the controller
153(PHY consumer) and second is the port name.
154
155struct phy_init_data init_data = {
156 .consumers = consumers,
157 .num_consumers = ARRAY_SIZE(consumers),
158};
159
160static const struct platform_device pipe3_phy_dev = {
161 .name = "pipe3-phy",
162 .id = -1,
163 .dev = {
164 .platform_data = {
165 .init_data = &init_data,
166 },
167 },
168};
169
170then, while doing phy_create, the PHY driver should pass this init_data
171 phy_create(dev, ops, pdata->init_data);
172
173and the controller driver (phy consumer) should pass the port name along with
174the device to get a reference to the PHY
175 phy_get(dev, "pcie");
176 148
1779. DeviceTree Binding 1499. DeviceTree Binding
178 150
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index f32ce5419573..44fe1d28a163 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -229,13 +229,13 @@ defined in include/linux/pm.h:
229 - if set, the value of child_count is ignored (but still updated) 229 - if set, the value of child_count is ignored (but still updated)
230 230
231 unsigned int disable_depth; 231 unsigned int disable_depth;
232 - used for disabling the helper funcions (they work normally if this is 232 - used for disabling the helper functions (they work normally if this is
233 equal to zero); the initial value of it is 1 (i.e. runtime PM is 233 equal to zero); the initial value of it is 1 (i.e. runtime PM is
234 initially disabled for all devices) 234 initially disabled for all devices)
235 235
236 int runtime_error; 236 int runtime_error;
237 - if set, there was a fatal error (one of the callbacks returned error code 237 - if set, there was a fatal error (one of the callbacks returned error code
238 as described in Section 2), so the helper funtions will not work until 238 as described in Section 2), so the helper functions will not work until
239 this flag is cleared; this is the error code returned by the failing 239 this flag is cleared; this is the error code returned by the failing
240 callback 240 callback
241 241
@@ -468,6 +468,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
468 - set the power.irq_safe flag for the device, causing the runtime-PM 468 - set the power.irq_safe flag for the device, causing the runtime-PM
469 callbacks to be invoked with interrupts off 469 callbacks to be invoked with interrupts off
470 470
471 bool pm_runtime_is_irq_safe(struct device *dev);
472 - return true if power.irq_safe flag was set for the device, causing
473 the runtime-PM callbacks to be invoked with interrupts off
474
471 void pm_runtime_mark_last_busy(struct device *dev); 475 void pm_runtime_mark_last_busy(struct device *dev);
472 - set the power.last_busy field to the current time 476 - set the power.last_busy field to the current time
473 477
@@ -524,7 +528,7 @@ pm_runtime_put_sync_autosuspend()
5245. Runtime PM Initialization, Device Probing and Removal 5285. Runtime PM Initialization, Device Probing and Removal
525 529
526Initially, the runtime PM is disabled for all devices, which means that the 530Initially, the runtime PM is disabled for all devices, which means that the
527majority of the runtime PM helper funtions described in Section 4 will return 531majority of the runtime PM helper functions described in Section 4 will return
528-EAGAIN until pm_runtime_enable() is called for the device. 532-EAGAIN until pm_runtime_enable() is called for the device.
529 533
530In addition to that, the initial runtime PM status of all devices is 534In addition to that, the initial runtime PM status of all devices is
diff --git a/Documentation/power/suspend-and-interrupts.txt b/Documentation/power/suspend-and-interrupts.txt
index 69663640dea5..2f9c5a5fcb25 100644
--- a/Documentation/power/suspend-and-interrupts.txt
+++ b/Documentation/power/suspend-and-interrupts.txt
@@ -77,7 +77,7 @@ Calling enable_irq_wake() causes suspend_device_irqs() to treat the given IRQ
77in a special way. Namely, the IRQ remains enabled, by on the first interrupt 77in a special way. Namely, the IRQ remains enabled, by on the first interrupt
78it will be disabled, marked as pending and "suspended" so that it will be 78it will be disabled, marked as pending and "suspended" so that it will be
79re-enabled by resume_device_irqs() during the subsequent system resume. Also 79re-enabled by resume_device_irqs() during the subsequent system resume. Also
80the PM core is notified about the event which casues the system suspend in 80the PM core is notified about the event which causes the system suspend in
81progress to be aborted (that doesn't have to happen immediately, but at one 81progress to be aborted (that doesn't have to happen immediately, but at one
82of the points where the suspend thread looks for pending wakeup events). 82of the points where the suspend thread looks for pending wakeup events).
83 83
diff --git a/Documentation/power/userland-swsusp.txt b/Documentation/power/userland-swsusp.txt
index 0e870825c1b9..bbfcd1bbedc5 100644
--- a/Documentation/power/userland-swsusp.txt
+++ b/Documentation/power/userland-swsusp.txt
@@ -99,7 +99,7 @@ SNAPSHOT_S2RAM - suspend to RAM; using this call causes the kernel to
99The device's read() operation can be used to transfer the snapshot image from 99The device's read() operation can be used to transfer the snapshot image from
100the kernel. It has the following limitations: 100the kernel. It has the following limitations:
101- you cannot read() more than one virtual memory page at a time 101- you cannot read() more than one virtual memory page at a time
102- read()s across page boundaries are impossible (ie. if ypu read() 1/2 of 102- read()s across page boundaries are impossible (ie. if you read() 1/2 of
103 a page in the previous call, you will only be able to read() 103 a page in the previous call, you will only be able to read()
104 _at_ _most_ 1/2 of the page in the next call) 104 _at_ _most_ 1/2 of the page in the next call)
105 105
diff --git a/Documentation/ramoops.txt b/Documentation/ramoops.txt
index 69b3cac4749d..5d8675615e59 100644
--- a/Documentation/ramoops.txt
+++ b/Documentation/ramoops.txt
@@ -14,11 +14,19 @@ survive after a restart.
14 14
151. Ramoops concepts 151. Ramoops concepts
16 16
17Ramoops uses a predefined memory area to store the dump. The start and size of 17Ramoops uses a predefined memory area to store the dump. The start and size
18the memory area are set using two variables: 18and type of the memory area are set using three variables:
19 * "mem_address" for the start 19 * "mem_address" for the start
20 * "mem_size" for the size. The memory size will be rounded down to a 20 * "mem_size" for the size. The memory size will be rounded down to a
21 power of two. 21 power of two.
22 * "mem_type" to specifiy if the memory type (default is pgprot_writecombine).
23
24Typically the default value of mem_type=0 should be used as that sets the pstore
25mapping to pgprot_writecombine. Setting mem_type=1 attempts to use
26pgprot_noncached, which only works on some platforms. This is because pstore
27depends on atomic operations. At least on ARM, pgprot_noncached causes the
28memory to be mapped strongly ordered, and atomic operations on strongly ordered
29memory are implementation defined, and won't work on many ARMs such as omaps.
22 30
23The memory area is divided into "record_size" chunks (also rounded down to 31The memory area is divided into "record_size" chunks (also rounded down to
24power of two) and each oops/panic writes a "record_size" chunk of 32power of two) and each oops/panic writes a "record_size" chunk of
@@ -55,6 +63,7 @@ Setting the ramoops parameters can be done in 2 different manners:
55static struct ramoops_platform_data ramoops_data = { 63static struct ramoops_platform_data ramoops_data = {
56 .mem_size = <...>, 64 .mem_size = <...>,
57 .mem_address = <...>, 65 .mem_address = <...>,
66 .mem_type = <...>,
58 .record_size = <...>, 67 .record_size = <...>,
59 .dump_oops = <...>, 68 .dump_oops = <...>,
60 .ecc = <...>, 69 .ecc = <...>,
diff --git a/Documentation/s390/Debugging390.txt b/Documentation/s390/Debugging390.txt
index 462321c1aeea..08911b5c6b0e 100644
--- a/Documentation/s390/Debugging390.txt
+++ b/Documentation/s390/Debugging390.txt
@@ -26,11 +26,6 @@ The Linux for s/390 & z/Architecture Kernel Task Structure
26Register Usage & Stackframes on Linux for s/390 & z/Architecture 26Register Usage & Stackframes on Linux for s/390 & z/Architecture
27A sample program with comments 27A sample program with comments
28Compiling programs for debugging on Linux for s/390 & z/Architecture 28Compiling programs for debugging on Linux for s/390 & z/Architecture
29Figuring out gcc compile errors
30Debugging Tools
31objdump
32strace
33Performance Debugging
34Debugging under VM 29Debugging under VM
35s/390 & z/Architecture IO Overview 30s/390 & z/Architecture IO Overview
36Debugging IO on s/390 & z/Architecture under VM 31Debugging IO on s/390 & z/Architecture under VM
@@ -114,28 +109,25 @@ s/390 z/Architecture
114 109
11516-17 16-17 Address Space Control 11016-17 16-17 Address Space Control
116 111
117 00 Primary Space Mode when DAT on 112 00 Primary Space Mode:
118 The linux kernel currently runs in this mode, CR1 is affiliated with 113 The register CR1 contains the primary address-space control ele-
119 this mode & points to the primary segment table origin etc. 114 ment (PASCE), which points to the primary space region/segment
120 115 table origin.
121 01 Access register mode this mode is used in functions to 116
122 copy data between kernel & user space. 117 01 Access register mode
123 118
124 10 Secondary space mode not used in linux however CR7 the 119 10 Secondary Space Mode:
125 register affiliated with this mode is & this & normally 120 The register CR7 contains the secondary address-space control
126 CR13=CR7 to allow us to copy data between kernel & user space. 121 element (SASCE), which points to the secondary space region or
127 We do this as follows: 122 segment table origin.
128 We set ar2 to 0 to designate its 123
129 affiliated gpr ( gpr2 )to point to primary=kernel space. 124 11 Home Space Mode:
130 We set ar4 to 1 to designate its 125 The register CR13 contains the home space address-space control
131 affiliated gpr ( gpr4 ) to point to secondary=home=user space 126 element (HASCE), which points to the home space region/segment
132 & then essentially do a memcopy(gpr2,gpr4,size) to 127 table origin.
133 copy data between the address spaces, the reason we use home space for the 128
134 kernel & don't keep secondary space free is that code will not run in 129 See "Address Spaces on Linux for s/390 & z/Architecture" below
135 secondary space. 130 for more information about address space usage in Linux.
136
137 11 Home Space Mode all user programs run in this mode.
138 it is affiliated with CR13.
139 131
14018-19 18-19 Condition codes (CC) 13218-19 18-19 Condition codes (CC)
141 133
@@ -249,9 +241,9 @@ currently 4TB of physical memory currently on z/Architecture.
249Address Spaces on Linux for s/390 & z/Architecture 241Address Spaces on Linux for s/390 & z/Architecture
250================================================== 242==================================================
251 243
252Our addressing scheme is as follows 244Our addressing scheme is basically as follows:
253
254 245
246 Primary Space Home Space
255Himem 0x7fffffff 2GB on s/390 ***************** **************** 247Himem 0x7fffffff 2GB on s/390 ***************** ****************
256currently 0x3ffffffffff (2^42)-1 * User Stack * * * 248currently 0x3ffffffffff (2^42)-1 * User Stack * * *
257on z/Architecture. ***************** * * 249on z/Architecture. ***************** * *
@@ -264,9 +256,46 @@ on z/Architecture. ***************** * *
264 * Sections * * * 256 * Sections * * *
2650x00000000 ***************** **************** 2570x00000000 ***************** ****************
266 258
267This also means that we need to look at the PSW problem state bit 259This also means that we need to look at the PSW problem state bit and the
268or the addressing mode to decide whether we are looking at 260addressing mode to decide whether we are looking at user or kernel space.
269user or kernel space. 261
262User space runs in primary address mode (or access register mode within
263the vdso code).
264
265The kernel usually also runs in home space mode, however when accessing
266user space the kernel switches to primary or secondary address mode if
267the mvcos instruction is not available or if a compare-and-swap (futex)
268instruction on a user space address is performed.
269
270When also looking at the ASCE control registers, this means:
271
272User space:
273- runs in primary or access register mode
274- cr1 contains the user asce
275- cr7 contains the user asce
276- cr13 contains the kernel asce
277
278Kernel space:
279- runs in home space mode
280- cr1 contains the user or kernel asce
281 -> the kernel asce is loaded when a uaccess requires primary or
282 secondary address mode
283- cr7 contains the user or kernel asce, (changed with set_fs())
284- cr13 contains the kernel asce
285
286In case of uaccess the kernel changes to:
287- primary space mode in case of a uaccess (copy_to_user) and uses
288 e.g. the mvcp instruction to access user space. However the kernel
289 will stay in home space mode if the mvcos instruction is available
290- secondary space mode in case of futex atomic operations, so that the
291 instructions come from primary address space and data from secondary
292 space
293
294In case of KVM, the kernel runs in home space mode, but cr1 gets switched
295to contain the gmap asce before the SIE instruction gets executed. When
296the SIE instruction is finished, cr1 will be switched back to contain the
297user asce.
298
270 299
271Virtual Addresses on s/390 & z/Architecture 300Virtual Addresses on s/390 & z/Architecture
272=========================================== 301===========================================
@@ -706,376 +735,7 @@ Debugging with optimisation has since much improved after fixing
706some bugs, please make sure you are using gdb-5.0 or later developed 735some bugs, please make sure you are using gdb-5.0 or later developed
707after Nov'2000. 736after Nov'2000.
708 737
709Figuring out gcc compile errors
710===============================
711If you are getting a lot of syntax errors compiling a program & the problem
712isn't blatantly obvious from the source.
713It often helps to just preprocess the file, this is done with the -E
714option in gcc.
715What this does is that it runs through the very first phase of compilation
716( compilation in gcc is done in several stages & gcc calls many programs to
717achieve its end result ) with the -E option gcc just calls the gcc preprocessor (cpp).
718The c preprocessor does the following, it joins all the files #included together
719recursively ( #include files can #include other files ) & also the c file you wish to compile.
720It puts a fully qualified path of the #included files in a comment & it
721does macro expansion.
722This is useful for debugging because
7231) You can double check whether the files you expect to be included are the ones
724that are being included ( e.g. double check that you aren't going to the i386 asm directory ).
7252) Check that macro definitions aren't clashing with typedefs,
7263) Check that definitions aren't being used before they are being included.
7274) Helps put the line emitting the error under the microscope if it contains macros.
728
729For convenience the Linux kernel's makefile will do preprocessing automatically for you
730by suffixing the file you want built with .i ( instead of .o )
731
732e.g.
733from the linux directory type
734make arch/s390/kernel/signal.i
735this will build
736
737s390-gcc -D__KERNEL__ -I/home1/barrow/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
738-fno-strict-aliasing -D__SMP__ -pipe -fno-strength-reduce -E arch/s390/kernel/signal.c
739> arch/s390/kernel/signal.i
740
741Now look at signal.i you should see something like.
742
743
744# 1 "/home1/barrow/linux/include/asm/types.h" 1
745typedef unsigned short umode_t;
746typedef __signed__ char __s8;
747typedef unsigned char __u8;
748typedef __signed__ short __s16;
749typedef unsigned short __u16;
750
751If instead you are getting errors further down e.g.
752unknown instruction:2515 "move.l" or better still unknown instruction:2515
753"Fixme not implemented yet, call Martin" you are probably are attempting to compile some code
754meant for another architecture or code that is simply not implemented, with a fixme statement
755stuck into the inline assembly code so that the author of the file now knows he has work to do.
756To look at the assembly emitted by gcc just before it is about to call gas ( the gnu assembler )
757use the -S option.
758Again for your convenience the Linux kernel's Makefile will hold your hand &
759do all this donkey work for you also by building the file with the .s suffix.
760e.g.
761from the Linux directory type
762make arch/s390/kernel/signal.s
763
764s390-gcc -D__KERNEL__ -I/home1/barrow/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
765-fno-strict-aliasing -D__SMP__ -pipe -fno-strength-reduce -S arch/s390/kernel/signal.c
766-o arch/s390/kernel/signal.s
767
768
769This will output something like, ( please note the constant pool & the useful comments
770in the prologue to give you a hand at interpreting it ).
771
772.LC54:
773 .string "misaligned (__u16 *) in __xchg\n"
774.LC57:
775 .string "misaligned (__u32 *) in __xchg\n"
776.L$PG1: # Pool sys_sigsuspend
777.LC192:
778 .long -262401
779.LC193:
780 .long -1
781.LC194:
782 .long schedule-.L$PG1
783.LC195:
784 .long do_signal-.L$PG1
785 .align 4
786.globl sys_sigsuspend
787 .type sys_sigsuspend,@function
788sys_sigsuspend:
789# leaf function 0
790# automatics 16
791# outgoing args 0
792# need frame pointer 0
793# call alloca 0
794# has varargs 0
795# incoming args (stack) 0
796# function length 168
797 STM 8,15,32(15)
798 LR 0,15
799 AHI 15,-112
800 BASR 13,0
801.L$CO1: AHI 13,.L$PG1-.L$CO1
802 ST 0,0(15)
803 LR 8,2
804 N 5,.LC192-.L$PG1(13)
805
806Adding -g to the above output makes the output even more useful
807e.g. typing
808make CC:="s390-gcc -g" kernel/sched.s
809
810which compiles.
811s390-gcc -g -D__KERNEL__ -I/home/barrow/linux-2.3/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -S kernel/sched.c -o kernel/sched.s
812
813also outputs stabs ( debugger ) info, from this info you can find out the
814offsets & sizes of various elements in structures.
815e.g. the stab for the structure
816struct rlimit {
817 unsigned long rlim_cur;
818 unsigned long rlim_max;
819};
820is
821.stabs "rlimit:T(151,2)=s8rlim_cur:(0,5),0,32;rlim_max:(0,5),32,32;;",128,0,0,0
822from this stab you can see that
823rlimit_cur starts at bit offset 0 & is 32 bits in size
824rlimit_max starts at bit offset 32 & is 32 bits in size.
825
826
827Debugging Tools:
828================
829
830objdump
831=======
832This is a tool with many options the most useful being ( if compiled with -g).
833objdump --source <victim program or object file> > <victims debug listing >
834
835
836The whole kernel can be compiled like this ( Doing this will make a 17MB kernel
837& a 200 MB listing ) however you have to strip it before building the image
838using the strip command to make it a more reasonable size to boot it.
839
840A source/assembly mixed dump of the kernel can be done with the line
841objdump --source vmlinux > vmlinux.lst
842Also, if the file isn't compiled -g, this will output as much debugging information
843as it can (e.g. function names). This is very slow as it spends lots
844of time searching for debugging info. The following self explanatory line should be used
845instead if the code isn't compiled -g, as it is much faster:
846objdump --disassemble-all --syms vmlinux > vmlinux.lst
847
848As hard drive space is valuable most of us use the following approach.
8491) Look at the emitted psw on the console to find the crash address in the kernel.
8502) Look at the file System.map ( in the linux directory ) produced when building
851the kernel to find the closest address less than the current PSW to find the
852offending function.
8533) use grep or similar to search the source tree looking for the source file
854 with this function if you don't know where it is.
8554) rebuild this object file with -g on, as an example suppose the file was
856( /arch/s390/kernel/signal.o )
8575) Assuming the file with the erroneous function is signal.c Move to the base of the
858Linux source tree.
8596) rm /arch/s390/kernel/signal.o
8607) make /arch/s390/kernel/signal.o
8618) watch the gcc command line emitted
8629) type it in again or alternatively cut & paste it on the console adding the -g option.
86310) objdump --source arch/s390/kernel/signal.o > signal.lst
864This will output the source & the assembly intermixed, as the snippet below shows
865This will unfortunately output addresses which aren't the same
866as the kernel ones you should be able to get around the mental arithmetic
867by playing with the --adjust-vma parameter to objdump.
868
869
870
871
872static inline void spin_lock(spinlock_t *lp)
873{
874 a0: 18 34 lr %r3,%r4
875 a2: a7 3a 03 bc ahi %r3,956
876 __asm__ __volatile(" lhi 1,-1\n"
877 a6: a7 18 ff ff lhi %r1,-1
878 aa: 1f 00 slr %r0,%r0
879 ac: ba 01 30 00 cs %r0,%r1,0(%r3)
880 b0: a7 44 ff fd jm aa <sys_sigsuspend+0x2e>
881 saveset = current->blocked;
882 b4: d2 07 f0 68 mvc 104(8,%r15),972(%r4)
883 b8: 43 cc
884 return (set->sig[0] & mask) != 0;
885}
886
8876) If debugging under VM go down to that section in the document for more info.
888
889
890I now have a tool which takes the pain out of --adjust-vma
891& you are able to do something like
892make /arch/s390/kernel/traps.lst
893& it automatically generates the correctly relocated entries for
894the text segment in traps.lst.
895This tool is now standard in linux distro's in scripts/makelst
896
897strace:
898-------
899Q. What is it ?
900A. It is a tool for intercepting calls to the kernel & logging them
901to a file & on the screen.
902
903Q. What use is it ?
904A. You can use it to find out what files a particular program opens.
905
906
907 738
908Example 1
909---------
910If you wanted to know does ping work but didn't have the source
911strace ping -c 1 127.0.0.1
912& then look at the man pages for each of the syscalls below,
913( In fact this is sometimes easier than looking at some spaghetti
914source which conditionally compiles for several architectures ).
915Not everything that it throws out needs to make sense immediately.
916
917Just looking quickly you can see that it is making up a RAW socket
918for the ICMP protocol.
919Doing an alarm(10) for a 10 second timeout
920& doing a gettimeofday call before & after each read to see
921how long the replies took, & writing some text to stdout so the user
922has an idea what is going on.
923
924socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 3
925getuid() = 0
926setuid(0) = 0
927stat("/usr/share/locale/C/libc.cat", 0xbffff134) = -1 ENOENT (No such file or directory)
928stat("/usr/share/locale/libc/C", 0xbffff134) = -1 ENOENT (No such file or directory)
929stat("/usr/local/share/locale/C/libc.cat", 0xbffff134) = -1 ENOENT (No such file or directory)
930getpid() = 353
931setsockopt(3, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
932setsockopt(3, SOL_SOCKET, SO_RCVBUF, [49152], 4) = 0
933fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(3, 1), ...}) = 0
934mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40008000
935ioctl(1, TCGETS, {B9600 opost isig icanon echo ...}) = 0
936write(1, "PING 127.0.0.1 (127.0.0.1): 56 d"..., 42PING 127.0.0.1 (127.0.0.1): 56 data bytes
937) = 42
938sigaction(SIGINT, {0x8049ba0, [], SA_RESTART}, {SIG_DFL}) = 0
939sigaction(SIGALRM, {0x8049600, [], SA_RESTART}, {SIG_DFL}) = 0
940gettimeofday({948904719, 138951}, NULL) = 0
941sendto(3, "\10\0D\201a\1\0\0\17#\2178\307\36"..., 64, 0, {sin_family=AF_INET,
942sin_port=htons(0), sin_addr=inet_addr("127.0.0.1")}, 16) = 64
943sigaction(SIGALRM, {0x8049600, [], SA_RESTART}, {0x8049600, [], SA_RESTART}) = 0
944sigaction(SIGALRM, {0x8049ba0, [], SA_RESTART}, {0x8049600, [], SA_RESTART}) = 0
945alarm(10) = 0
946recvfrom(3, "E\0\0T\0005\0\0@\1|r\177\0\0\1\177"..., 192, 0,
947{sin_family=AF_INET, sin_port=htons(50882), sin_addr=inet_addr("127.0.0.1")}, [16]) = 84
948gettimeofday({948904719, 160224}, NULL) = 0
949recvfrom(3, "E\0\0T\0006\0\0\377\1\275p\177\0"..., 192, 0,
950{sin_family=AF_INET, sin_port=htons(50882), sin_addr=inet_addr("127.0.0.1")}, [16]) = 84
951gettimeofday({948904719, 166952}, NULL) = 0
952write(1, "64 bytes from 127.0.0.1: icmp_se"...,
9535764 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=28.0 ms
954
955Example 2
956---------
957strace passwd 2>&1 | grep open
958produces the following output
959open("/etc/ld.so.cache", O_RDONLY) = 3
960open("/opt/kde/lib/libc.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
961open("/lib/libc.so.5", O_RDONLY) = 3
962open("/dev", O_RDONLY) = 3
963open("/var/run/utmp", O_RDONLY) = 3
964open("/etc/passwd", O_RDONLY) = 3
965open("/etc/shadow", O_RDONLY) = 3
966open("/etc/login.defs", O_RDONLY) = 4
967open("/dev/tty", O_RDONLY) = 4
968
969The 2>&1 is done to redirect stderr to stdout & grep is then filtering this input
970through the pipe for each line containing the string open.
971
972
973Example 3
974---------
975Getting sophisticated
976telnetd crashes & I don't know why
977
978Steps
979-----
9801) Replace the following line in /etc/inetd.conf
981telnet stream tcp nowait root /usr/sbin/in.telnetd -h
982with
983telnet stream tcp nowait root /blah
984
9852) Create the file /blah with the following contents to start tracing telnetd
986#!/bin/bash
987/usr/bin/strace -o/t1 -f /usr/sbin/in.telnetd -h
9883) chmod 700 /blah to make it executable only to root
9894)
990killall -HUP inetd
991or ps aux | grep inetd
992get inetd's process id
993& kill -HUP inetd to restart it.
994
995Important options
996-----------------
997-o is used to tell strace to output to a file in our case t1 in the root directory
998-f is to follow children i.e.
999e.g in our case above telnetd will start the login process & subsequently a shell like bash.
1000You will be able to tell which is which from the process ID's listed on the left hand side
1001of the strace output.
1002-p<pid> will tell strace to attach to a running process, yup this can be done provided
1003 it isn't being traced or debugged already & you have enough privileges,
1004the reason 2 processes cannot trace or debug the same program is that strace
1005becomes the parent process of the one being debugged & processes ( unlike people )
1006can have only one parent.
1007
1008
1009However the file /t1 will get big quite quickly
1010to test it telnet 127.0.0.1
1011
1012now look at what files in.telnetd execve'd
1013413 execve("/usr/sbin/in.telnetd", ["/usr/sbin/in.telnetd", "-h"], [/* 17 vars */]) = 0
1014414 execve("/bin/login", ["/bin/login", "-h", "localhost", "-p"], [/* 2 vars */]) = 0
1015
1016Whey it worked!.
1017
1018
1019Other hints:
1020------------
1021If the program is not very interactive ( i.e. not much keyboard input )
1022& is crashing in one architecture but not in another you can do
1023an strace of both programs under as identical a scenario as you can
1024on both architectures outputting to a file then.
1025do a diff of the two traces using the diff program
1026i.e.
1027diff output1 output2
1028& maybe you'll be able to see where the call paths differed, this
1029is possibly near the cause of the crash.
1030
1031More info
1032---------
1033Look at man pages for strace & the various syscalls
1034e.g. man strace, man alarm, man socket.
1035
1036
1037Performance Debugging
1038=====================
1039gcc is capable of compiling in profiling code just add the -p option
1040to the CFLAGS, this obviously affects program size & performance.
1041This can be used by the gprof gnu profiling tool or the
1042gcov the gnu code coverage tool ( code coverage is a means of testing
1043code quality by checking if all the code in an executable in exercised by
1044a tester ).
1045
1046
1047Using top to find out where processes are sleeping in the kernel
1048----------------------------------------------------------------
1049To do this copy the System.map from the root directory where
1050the linux kernel was built to the /boot directory on your
1051linux machine.
1052Start top
1053Now type fU<return>
1054You should see a new field called WCHAN which
1055tells you where each process is sleeping here is a typical output.
1056
1057 6:59pm up 41 min, 1 user, load average: 0.00, 0.00, 0.00
105828 processes: 27 sleeping, 1 running, 0 zombie, 0 stopped
1059CPU states: 0.0% user, 0.1% system, 0.0% nice, 99.8% idle
1060Mem: 254900K av, 45976K used, 208924K free, 0K shrd, 28636K buff
1061Swap: 0K av, 0K used, 0K free 8620K cached
1062
1063 PID USER PRI NI SIZE RSS SHARE WCHAN STAT LIB %CPU %MEM TIME COMMAND
1064 750 root 12 0 848 848 700 do_select S 0 0.1 0.3 0:00 in.telnetd
1065 767 root 16 0 1140 1140 964 R 0 0.1 0.4 0:00 top
1066 1 root 8 0 212 212 180 do_select S 0 0.0 0.0 0:00 init
1067 2 root 9 0 0 0 0 down_inte SW 0 0.0 0.0 0:00 kmcheck
1068
1069The time command
1070----------------
1071Another related command is the time command which gives you an indication
1072of where a process is spending the majority of its time.
1073e.g.
1074time ping -c 5 nc
1075outputs
1076real 0m4.054s
1077user 0m0.010s
1078sys 0m0.010s
1079 739
1080Debugging under VM 740Debugging under VM
1081================== 741==================
diff --git a/Documentation/scsi/libsas.txt b/Documentation/scsi/libsas.txt
index 3cc9c7843e15..8cac6492aade 100644
--- a/Documentation/scsi/libsas.txt
+++ b/Documentation/scsi/libsas.txt
@@ -226,9 +226,6 @@ static int register_sas_ha(struct my_sas_ha *my_ha)
226 my_ha->sas_ha.lldd_dev_found = my_dev_found; 226 my_ha->sas_ha.lldd_dev_found = my_dev_found;
227 my_ha->sas_ha.lldd_dev_gone = my_dev_gone; 227 my_ha->sas_ha.lldd_dev_gone = my_dev_gone;
228 228
229 my_ha->sas_ha.lldd_max_execute_num = lldd_max_execute_num; (1)
230
231 my_ha->sas_ha.lldd_queue_size = ha_can_queue;
232 my_ha->sas_ha.lldd_execute_task = my_execute_task; 229 my_ha->sas_ha.lldd_execute_task = my_execute_task;
233 230
234 my_ha->sas_ha.lldd_abort_task = my_abort_task; 231 my_ha->sas_ha.lldd_abort_task = my_abort_task;
@@ -247,28 +244,6 @@ static int register_sas_ha(struct my_sas_ha *my_ha)
247 return sas_register_ha(&my_ha->sas_ha); 244 return sas_register_ha(&my_ha->sas_ha);
248} 245}
249 246
250(1) This is normally a LLDD parameter, something of the
251lines of a task collector. What it tells the SAS Layer is
252whether the SAS layer should run in Direct Mode (default:
253value 0 or 1) or Task Collector Mode (value greater than 1).
254
255In Direct Mode, the SAS Layer calls Execute Task as soon as
256it has a command to send to the SDS, _and_ this is a single
257command, i.e. not linked.
258
259Some hardware (e.g. aic94xx) has the capability to DMA more
260than one task at a time (interrupt) from host memory. Task
261Collector Mode is an optional feature for HAs which support
262this in their hardware. (Again, it is completely optional
263even if your hardware supports it.)
264
265In Task Collector Mode, the SAS Layer would do _natural_
266coalescing of tasks and at the appropriate moment it would
267call your driver to DMA more than one task in a single HA
268interrupt. DMBS may want to use this by insmod/modprobe
269setting the lldd_max_execute_num to something greater than
2701.
271
272(2) SAS 1.1 does not define I_T Nexus Reset TMF. 247(2) SAS 1.1 does not define I_T Nexus Reset TMF.
273 248
274Events 249Events
@@ -325,71 +300,22 @@ PHYE_SPINUP_HOLD -- SATA is present, COMWAKE not sent.
325 300
326The Execute Command SCSI RPC: 301The Execute Command SCSI RPC:
327 302
328 int (*lldd_execute_task)(struct sas_task *, int num, 303 int (*lldd_execute_task)(struct sas_task *, gfp_t gfp_flags);
329 unsigned long gfp_flags);
330 304
331Used to queue a task to the SAS LLDD. @task is the tasks to 305Used to queue a task to the SAS LLDD. @task is the task to be executed.
332be executed. @num should be the number of tasks being 306@gfp_mask is the gfp_mask defining the context of the caller.
333queued at this function call (they are linked listed via
334task::list), @gfp_mask should be the gfp_mask defining the
335context of the caller.
336 307
337This function should implement the Execute Command SCSI RPC, 308This function should implement the Execute Command SCSI RPC,
338or if you're sending a SCSI Task as linked commands, you
339should also use this function.
340 309
341That is, when lldd_execute_task() is called, the command(s) 310That is, when lldd_execute_task() is called, the command
342go out on the transport *immediately*. There is *no* 311go out on the transport *immediately*. There is *no*
343queuing of any sort and at any level in a SAS LLDD. 312queuing of any sort and at any level in a SAS LLDD.
344 313
345The use of task::list is two-fold, one for linked commands,
346the other discussed below.
347
348It is possible to queue up more than one task at a time, by
349initializing the list element of struct sas_task, and
350passing the number of tasks enlisted in this manner in num.
351
352Returns: -SAS_QUEUE_FULL, -ENOMEM, nothing was queued; 314Returns: -SAS_QUEUE_FULL, -ENOMEM, nothing was queued;
353 0, the task(s) were queued. 315 0, the task(s) were queued.
354 316
355If you want to pass num > 1, then either
356A) you're the only caller of this function and keep track
357 of what you've queued to the LLDD, or
358B) you know what you're doing and have a strategy of
359 retrying.
360
361As opposed to queuing one task at a time (function call),
362batch queuing of tasks, by having num > 1, greatly
363simplifies LLDD code, sequencer code, and _hardware design_,
364and has some performance advantages in certain situations
365(DBMS).
366
367The LLDD advertises if it can take more than one command at
368a time at lldd_execute_task(), by setting the
369lldd_max_execute_num parameter (controlled by "collector"
370module parameter in aic94xx SAS LLDD).
371
372You should leave this to the default 1, unless you know what
373you're doing.
374
375This is a function of the LLDD, to which the SAS layer can
376cater to.
377
378int lldd_queue_size
379 The host adapter's queue size. This is the maximum
380number of commands the lldd can have pending to domain
381devices on behalf of all upper layers submitting through
382lldd_execute_task().
383
384You really want to set this to something (much) larger than
3851.
386
387This _really_ has absolutely nothing to do with queuing.
388There is no queuing in SAS LLDDs.
389
390struct sas_task { 317struct sas_task {
391 dev -- the device this task is destined to 318 dev -- the device this task is destined to
392 list -- must be initialized (INIT_LIST_HEAD)
393 task_proto -- _one_ of enum sas_proto 319 task_proto -- _one_ of enum sas_proto
394 scatter -- pointer to scatter gather list array 320 scatter -- pointer to scatter gather list array
395 num_scatter -- number of elements in scatter 321 num_scatter -- number of elements in scatter
diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt
index a0c85110a07e..8638f61c8c9d 100644
--- a/Documentation/scsi/scsi_eh.txt
+++ b/Documentation/scsi/scsi_eh.txt
@@ -172,7 +172,7 @@ ways.
172 172
173 - eh_strategy_handler() callback 173 - eh_strategy_handler() callback
174 This is one big callback which should perform whole error 174 This is one big callback which should perform whole error
175 handling. As such, it should do all choirs SCSI midlayer 175 handling. As such, it should do all chores the SCSI midlayer
176 performs during recovery. This will be discussed in [2-2]. 176 performs during recovery. This will be discussed in [2-2].
177 177
178 Once recovery is complete, SCSI EH resumes normal operation by 178 Once recovery is complete, SCSI EH resumes normal operation by
@@ -428,7 +428,7 @@ scmd->allowed.
428scsi_unjam_host() and it is responsible for whole recovery process. 428scsi_unjam_host() and it is responsible for whole recovery process.
429On completion, the handler should have made lower layers forget about 429On completion, the handler should have made lower layers forget about
430all failed scmds and either ready for new commands or offline. Also, 430all failed scmds and either ready for new commands or offline. Also,
431it should perform SCSI EH maintenance choirs to maintain integrity of 431it should perform SCSI EH maintenance chores to maintain integrity of
432SCSI midlayer. IOW, of the steps described in [2-1-2], all steps 432SCSI midlayer. IOW, of the steps described in [2-1-2], all steps
433except for #1 must be implemented by eh_strategy_handler(). 433except for #1 must be implemented by eh_strategy_handler().
434 434
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
index d6a9bdeee7f2..731bc4f4c5e6 100644
--- a/Documentation/scsi/scsi_mid_low_api.txt
+++ b/Documentation/scsi/scsi_mid_low_api.txt
@@ -149,7 +149,7 @@ scsi_add_host() ---->
149scsi_scan_host() -------+ 149scsi_scan_host() -------+
150 | 150 |
151 slave_alloc() 151 slave_alloc()
152 slave_configure() --> scsi_adjust_queue_depth() 152 slave_configure() --> scsi_change_queue_depth()
153 | 153 |
154 slave_alloc() 154 slave_alloc()
155 slave_configure() 155 slave_configure()
@@ -159,7 +159,7 @@ scsi_scan_host() -------+
159------------------------------------------------------------ 159------------------------------------------------------------
160 160
161If the LLD wants to adjust the default queue settings, it can invoke 161If the LLD wants to adjust the default queue settings, it can invoke
162scsi_adjust_queue_depth() in its slave_configure() routine. 162scsi_change_queue_depth() in its slave_configure() routine.
163 163
164*** For scsi devices that the mid level tries to scan but do not 164*** For scsi devices that the mid level tries to scan but do not
165 respond, a slave_alloc(), slave_destroy() pair is called. 165 respond, a slave_alloc(), slave_destroy() pair is called.
@@ -203,7 +203,7 @@ LLD mid level LLD
203scsi_add_device() ------+ 203scsi_add_device() ------+
204 | 204 |
205 slave_alloc() 205 slave_alloc()
206 slave_configure() [--> scsi_adjust_queue_depth()] 206 slave_configure() [--> scsi_change_queue_depth()]
207------------------------------------------------------------ 207------------------------------------------------------------
208 208
209In a similar fashion, an LLD may become aware that a SCSI device has been 209In a similar fashion, an LLD may become aware that a SCSI device has been
@@ -261,7 +261,7 @@ init_this_scsi_driver() ----+
261 | scsi_register() 261 | scsi_register()
262 | 262 |
263 slave_alloc() 263 slave_alloc()
264 slave_configure() --> scsi_adjust_queue_depth() 264 slave_configure() --> scsi_change_queue_depth()
265 slave_alloc() *** 265 slave_alloc() ***
266 slave_destroy() *** 266 slave_destroy() ***
267 | 267 |
@@ -271,9 +271,9 @@ init_this_scsi_driver() ----+
271 slave_destroy() *** 271 slave_destroy() ***
272------------------------------------------------------------ 272------------------------------------------------------------
273 273
274The mid level invokes scsi_adjust_queue_depth() with tagged queuing off and 274The mid level invokes scsi_change_queue_depth() with "cmd_per_lun" for that
275"cmd_per_lun" for that host as the queue length. These settings can be 275host as the queue length. These settings can be overridden by a
276overridden by a slave_configure() supplied by the LLD. 276slave_configure() supplied by the LLD.
277 277
278*** For scsi devices that the mid level tries to scan but do not 278*** For scsi devices that the mid level tries to scan but do not
279 respond, a slave_alloc(), slave_destroy() pair is called. 279 respond, a slave_alloc(), slave_destroy() pair is called.
@@ -366,13 +366,11 @@ is initialized. The functions below are listed alphabetically and their
366names all start with "scsi_". 366names all start with "scsi_".
367 367
368Summary: 368Summary:
369 scsi_activate_tcq - turn on tag command queueing
370 scsi_add_device - creates new scsi device (lu) instance 369 scsi_add_device - creates new scsi device (lu) instance
371 scsi_add_host - perform sysfs registration and set up transport class 370 scsi_add_host - perform sysfs registration and set up transport class
372 scsi_adjust_queue_depth - change the queue depth on a SCSI device 371 scsi_change_queue_depth - change the queue depth on a SCSI device
373 scsi_bios_ptable - return copy of block device's partition table 372 scsi_bios_ptable - return copy of block device's partition table
374 scsi_block_requests - prevent further commands being queued to given host 373 scsi_block_requests - prevent further commands being queued to given host
375 scsi_deactivate_tcq - turn off tag command queueing
376 scsi_host_alloc - return a new scsi_host instance whose refcount==1 374 scsi_host_alloc - return a new scsi_host instance whose refcount==1
377 scsi_host_get - increments Scsi_Host instance's refcount 375 scsi_host_get - increments Scsi_Host instance's refcount
378 scsi_host_put - decrements Scsi_Host instance's refcount (free if 0) 376 scsi_host_put - decrements Scsi_Host instance's refcount (free if 0)
@@ -390,24 +388,6 @@ Summary:
390Details: 388Details:
391 389
392/** 390/**
393 * scsi_activate_tcq - turn on tag command queueing ("ordered" task attribute)
394 * @sdev: device to turn on TCQ for
395 * @depth: queue depth
396 *
397 * Returns nothing
398 *
399 * Might block: no
400 *
401 * Notes: Eventually, it is hoped depth would be the maximum depth
402 * the device could cope with and the real queue depth
403 * would be adjustable from 0 to depth.
404 *
405 * Defined (inline) in: include/scsi/scsi_tcq.h
406 **/
407void scsi_activate_tcq(struct scsi_device *sdev, int depth)
408
409
410/**
411 * scsi_add_device - creates new scsi device (lu) instance 391 * scsi_add_device - creates new scsi device (lu) instance
412 * @shost: pointer to scsi host instance 392 * @shost: pointer to scsi host instance
413 * @channel: channel number (rarely other than 0) 393 * @channel: channel number (rarely other than 0)
@@ -456,11 +436,8 @@ int scsi_add_host(struct Scsi_Host *shost, struct device * dev)
456 436
457 437
458/** 438/**
459 * scsi_adjust_queue_depth - allow LLD to change queue depth on a SCSI device 439 * scsi_change_queue_depth - allow LLD to change queue depth on a SCSI device
460 * @sdev: pointer to SCSI device to change queue depth on 440 * @sdev: pointer to SCSI device to change queue depth on
461 * @tagged: 0 - no tagged queuing
462 * MSG_SIMPLE_TAG - simple tagged queuing
463 * MSG_ORDERED_TAG - ordered tagged queuing
464 * @tags Number of tags allowed if tagged queuing enabled, 441 * @tags Number of tags allowed if tagged queuing enabled,
465 * or number of commands the LLD can queue up 442 * or number of commands the LLD can queue up
466 * in non-tagged mode (as per cmd_per_lun). 443 * in non-tagged mode (as per cmd_per_lun).
@@ -471,15 +448,12 @@ int scsi_add_host(struct Scsi_Host *shost, struct device * dev)
471 * 448 *
472 * Notes: Can be invoked any time on a SCSI device controlled by this 449 * Notes: Can be invoked any time on a SCSI device controlled by this
473 * LLD. [Specifically during and after slave_configure() and prior to 450 * LLD. [Specifically during and after slave_configure() and prior to
474 * slave_destroy().] Can safely be invoked from interrupt code. Actual 451 * slave_destroy().] Can safely be invoked from interrupt code.
475 * queue depth change may be delayed until the next command is being
476 * processed. See also scsi_activate_tcq() and scsi_deactivate_tcq().
477 * 452 *
478 * Defined in: drivers/scsi/scsi.c [see source code for more notes] 453 * Defined in: drivers/scsi/scsi.c [see source code for more notes]
479 * 454 *
480 **/ 455 **/
481void scsi_adjust_queue_depth(struct scsi_device * sdev, int tagged, 456int scsi_change_queue_depth(struct scsi_device *sdev, int tags)
482 int tags)
483 457
484 458
485/** 459/**
@@ -515,20 +489,6 @@ void scsi_block_requests(struct Scsi_Host * shost)
515 489
516 490
517/** 491/**
518 * scsi_deactivate_tcq - turn off tag command queueing
519 * @sdev: device to turn off TCQ for
520 * @depth: queue depth (stored in sdev)
521 *
522 * Returns nothing
523 *
524 * Might block: no
525 *
526 * Defined (inline) in: include/scsi/scsi_tcq.h
527 **/
528void scsi_deactivate_tcq(struct scsi_device *sdev, int depth)
529
530
531/**
532 * scsi_host_alloc - create a scsi host adapter instance and perform basic 492 * scsi_host_alloc - create a scsi host adapter instance and perform basic
533 * initialization. 493 * initialization.
534 * @sht: pointer to scsi host template 494 * @sht: pointer to scsi host template
@@ -1254,7 +1214,7 @@ of interest:
1254 for disk firmware uploads. 1214 for disk firmware uploads.
1255 cmd_per_lun - maximum number of commands that can be queued on devices 1215 cmd_per_lun - maximum number of commands that can be queued on devices
1256 controlled by the host. Overridden by LLD calls to 1216 controlled by the host. Overridden by LLD calls to
1257 scsi_adjust_queue_depth(). 1217 scsi_change_queue_depth().
1258 unchecked_isa_dma - 1=>only use bottom 16 MB of ram (ISA DMA addressing 1218 unchecked_isa_dma - 1=>only use bottom 16 MB of ram (ISA DMA addressing
1259 restriction), 0=>can use full 32 bit (or better) DMA 1219 restriction), 0=>can use full 32 bit (or better) DMA
1260 address space 1220 address space
@@ -1294,7 +1254,7 @@ struct scsi_cmnd
1294Instances of this structure convey SCSI commands to the LLD and responses 1254Instances of this structure convey SCSI commands to the LLD and responses
1295back to the mid level. The SCSI mid level will ensure that no more SCSI 1255back to the mid level. The SCSI mid level will ensure that no more SCSI
1296commands become queued against the LLD than are indicated by 1256commands become queued against the LLD than are indicated by
1297scsi_adjust_queue_depth() (or struct Scsi_Host::cmd_per_lun). There will 1257scsi_change_queue_depth() (or struct Scsi_Host::cmd_per_lun). There will
1298be at least one instance of struct scsi_cmnd available for each SCSI device. 1258be at least one instance of struct scsi_cmnd available for each SCSI device.
1299Members of interest: 1259Members of interest:
1300 cmnd - array containing SCSI command 1260 cmnd - array containing SCSI command
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt
index f346abbdd6ff..0d5bdb153d3b 100644
--- a/Documentation/scsi/st.txt
+++ b/Documentation/scsi/st.txt
@@ -506,9 +506,11 @@ user does not request data that far.)
506 506
507DEBUGGING HINTS 507DEBUGGING HINTS
508 508
509To enable debugging messages, edit st.c and #define DEBUG 1. As seen 509Debugging code is now compiled in by default but debugging is turned off
510above, debugging can be switched off with an ioctl if debugging is 510with the kernel module parameter debug_flag defaulting to 0. Debugging
511compiled into the driver. The debugging output is not voluminous. 511can still be switched on and off with an ioctl. To enable debug at
512module load time add debug_flag=1 to the module load options, the
513debugging output is not voluminous.
512 514
513If the tape seems to hang, I would be very interested to hear where 515If the tape seems to hang, I would be very interested to hear where
514the driver is waiting. With the command 'ps -l' you can see the state 516the driver is waiting. With the command 'ps -l' you can see the state
diff --git a/Documentation/scsi/wd719x.txt b/Documentation/scsi/wd719x.txt
new file mode 100644
index 000000000000..0816b0220238
--- /dev/null
+++ b/Documentation/scsi/wd719x.txt
@@ -0,0 +1,21 @@
1Driver for Western Digital WD7193, WD7197 and WD7296 SCSI cards
2---------------------------------------------------------------
3
4The card requires firmware that can be cut out of the Windows NT driver that
5can be downloaded from WD at:
6http://support.wdc.com/product/download.asp?groupid=801&sid=27&lang=en
7
8There is no license anywhere in the file or on the page - so the firmware
9probably cannot be added to linux-firmware.
10
11This script downloads and extracts the firmware, creating wd719x-risc.bin and
12d719x-wcs.bin files. Put them in /lib/firmware/.
13
14#!/bin/sh
15wget http://support.wdc.com/download/archive/pciscsi.exe
16lha xi pciscsi.exe pci-scsi.exe
17lha xi pci-scsi.exe nt/wd7296a.sys
18rm pci-scsi.exe
19dd if=wd7296a.sys of=wd719x-risc.bin bs=1 skip=5760 count=14336
20dd if=wd7296a.sys of=wd719x-wcs.bin bs=1 skip=20096 count=514
21rm wd7296a.sys
diff --git a/Documentation/security/IMA-templates.txt b/Documentation/security/IMA-templates.txt
index a4e102dddfea..839b5dad9226 100644
--- a/Documentation/security/IMA-templates.txt
+++ b/Documentation/security/IMA-templates.txt
@@ -27,25 +27,22 @@ Managing templates with these structures is very simple. To support
27a new data type, developers define the field identifier and implement 27a new data type, developers define the field identifier and implement
28two functions, init() and show(), respectively to generate and display 28two functions, init() and show(), respectively to generate and display
29measurement entries. Defining a new template descriptor requires 29measurement entries. Defining a new template descriptor requires
30specifying the template format, a string of field identifiers separated 30specifying the template format (a string of field identifiers separated
31by the '|' character. While in the current implementation it is possible 31by the '|' character) through the 'ima_template_fmt' kernel command line
32to define new template descriptors only by adding their definition in the 32parameter. At boot time, IMA initializes the chosen template descriptor
33template specific code (ima_template.c), in a future version it will be 33by translating the format into an array of template fields structures taken
34possible to register a new template on a running kernel by supplying to IMA 34from the set of the supported ones.
35the desired format string. In this version, IMA initializes at boot time
36all defined template descriptors by translating the format into an array
37of template fields structures taken from the set of the supported ones.
38 35
39After the initialization step, IMA will call ima_alloc_init_template() 36After the initialization step, IMA will call ima_alloc_init_template()
40(new function defined within the patches for the new template management 37(new function defined within the patches for the new template management
41mechanism) to generate a new measurement entry by using the template 38mechanism) to generate a new measurement entry by using the template
42descriptor chosen through the kernel configuration or through the newly 39descriptor chosen through the kernel configuration or through the newly
43introduced 'ima_template=' kernel command line parameter. It is during this 40introduced 'ima_template' and 'ima_template_fmt' kernel command line parameters.
44phase that the advantages of the new architecture are clearly shown: 41It is during this phase that the advantages of the new architecture are
45the latter function will not contain specific code to handle a given template 42clearly shown: the latter function will not contain specific code to handle
46but, instead, it simply calls the init() method of the template fields 43a given template but, instead, it simply calls the init() method of the template
47associated to the chosen template descriptor and store the result (pointer 44fields associated to the chosen template descriptor and store the result
48to allocated data and data length) in the measurement entry structure. 45(pointer to allocated data and data length) in the measurement entry structure.
49 46
50The same mechanism is employed to display measurements entries. 47The same mechanism is employed to display measurements entries.
51The functions ima[_ascii]_measurements_show() retrieve, for each entry, 48The functions ima[_ascii]_measurements_show() retrieve, for each entry,
@@ -86,4 +83,6 @@ currently the following methods are supported:
86 - select a template descriptor among those supported in the kernel 83 - select a template descriptor among those supported in the kernel
87 configuration ('ima-ng' is the default choice); 84 configuration ('ima-ng' is the default choice);
88 - specify a template descriptor name from the kernel command line through 85 - specify a template descriptor name from the kernel command line through
89 the 'ima_template=' parameter. 86 the 'ima_template=' parameter;
87 - register a new template descriptor with custom format through the kernel
88 command line parameter 'ima_template_fmt='.
diff --git a/Documentation/serial/driver b/Documentation/serial/driver
index ba64e4b892e9..c415b0ef4493 100644
--- a/Documentation/serial/driver
+++ b/Documentation/serial/driver
@@ -59,7 +59,9 @@ The core driver uses the info->tmpbuf_sem lock to prevent multi-threaded
59access to the info->tmpbuf bouncebuffer used for port writes. 59access to the info->tmpbuf bouncebuffer used for port writes.
60 60
61The port_sem semaphore is used to protect against ports being added/ 61The port_sem semaphore is used to protect against ports being added/
62removed or reconfigured at inappropriate times. 62removed or reconfigured at inappropriate times. Since v2.6.27, this
63semaphore has been the 'mutex' member of the tty_port struct, and
64commonly referred to as the port mutex (or port->mutex).
63 65
64 66
65uart_ops 67uart_ops
@@ -248,7 +250,7 @@ hardware.
248 Other flags may be used (eg, xon/xoff characters) if your 250 Other flags may be used (eg, xon/xoff characters) if your
249 hardware supports hardware "soft" flow control. 251 hardware supports hardware "soft" flow control.
250 252
251 Locking: none. 253 Locking: caller holds port->mutex
252 Interrupts: caller dependent. 254 Interrupts: caller dependent.
253 This call must not sleep 255 This call must not sleep
254 256
diff --git a/Documentation/sound/alsa/ControlNames.txt b/Documentation/sound/alsa/ControlNames.txt
index fea65bb6269e..79a6127863ca 100644
--- a/Documentation/sound/alsa/ControlNames.txt
+++ b/Documentation/sound/alsa/ControlNames.txt
@@ -1,6 +1,6 @@
1This document describes standard names of mixer controls. 1This document describes standard names of mixer controls.
2 2
3Syntax: SOURCE [DIRECTION] FUNCTION 3Syntax: [LOCATION] SOURCE [CHANNEL] [DIRECTION] FUNCTION
4 4
5DIRECTION: 5DIRECTION:
6 <nothing> (both directions) 6 <nothing> (both directions)
@@ -14,12 +14,29 @@ FUNCTION:
14 Volume 14 Volume
15 Route (route control, hardware specific) 15 Route (route control, hardware specific)
16 16
17CHANNEL:
18 <nothing> (channel independent, or applies to all channels)
19 Front
20 Surround (rear left/right in 4.0/5.1 surround)
21 CLFE
22 Center
23 LFE
24 Side (side left/right for 7.1 surround)
25
26LOCATION: (physical location of source)
27 Front
28 Rear
29 Dock (docking station)
30 Internal
31
17SOURCE: 32SOURCE:
18 Master 33 Master
19 Master Mono 34 Master Mono
20 Hardware Master 35 Hardware Master
21 Speaker (internal speaker) 36 Speaker (internal speaker)
37 Bass Speaker (internal LFE speaker)
22 Headphone 38 Headphone
39 Line Out
23 Beep (beep generator) 40 Beep (beep generator)
24 Phone 41 Phone
25 Phone Input 42 Phone Input
@@ -27,14 +44,14 @@ SOURCE:
27 Synth 44 Synth
28 FM 45 FM
29 Mic 46 Mic
30 Line 47 Headset Mic (mic part of combined headset jack - 4-pin headphone + mic)
48 Headphone Mic (mic part of either/or - 3-pin headphone or mic)
49 Line (input only, use "Line Out" for output)
31 CD 50 CD
32 Video 51 Video
33 Zoom Video 52 Zoom Video
34 Aux 53 Aux
35 PCM 54 PCM
36 PCM Front
37 PCM Rear
38 PCM Pan 55 PCM Pan
39 Loopback 56 Loopback
40 Analog Loopback (D/A -> A/D loopback) 57 Analog Loopback (D/A -> A/D loopback)
@@ -47,8 +64,13 @@ SOURCE:
47 Music 64 Music
48 I2S 65 I2S
49 IEC958 66 IEC958
67 HDMI
68 SPDIF (output only)
69 SPDIF In
70 Digital In
71 HDMI/DP (either HDMI or DisplayPort)
50 72
51Exceptions: 73Exceptions (deprecated):
52 [Digital] Capture Source 74 [Digital] Capture Source
53 [Digital] Capture Switch (aka input gain switch) 75 [Digital] Capture Switch (aka input gain switch)
54 [Digital] Capture Volume (aka input gain volume) 76 [Digital] Capture Volume (aka input gain volume)
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index a5e754714344..5a3163cac6c3 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -113,14 +113,10 @@ AD1984
113 113
114AD1986A 114AD1986A
115======= 115=======
116 6stack 6-jack, separate surrounds (default)
117 3stack 3-stack, shared surrounds 116 3stack 3-stack, shared surrounds
118 laptop 2-channel only (FSC V2060, Samsung M50) 117 laptop 2-channel only (FSC V2060, Samsung M50)
119 laptop-eapd 2-channel with EAPD (ASUS A6J) 118 laptop-imic 2-channel with built-in mic
120 laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100) 119 eapd Turn on EAPD constantly
121 ultra 2-channel with EAPD (Samsung Ultra tablet PC)
122 samsung 2-channel with EAPD (Samsung R65)
123 samsung-p50 2-channel with HP-automute (Samsung P50)
124 120
125AD1988/AD1988B/AD1989A/AD1989B 121AD1988/AD1988B/AD1989A/AD1989B
126============================== 122==============================
diff --git a/Documentation/sound/alsa/Procfile.txt b/Documentation/sound/alsa/Procfile.txt
index 7fcd1ad96fcc..7f8a0d325905 100644
--- a/Documentation/sound/alsa/Procfile.txt
+++ b/Documentation/sound/alsa/Procfile.txt
@@ -101,10 +101,6 @@ card*/pcm*/xrun_debug
101 bit 0 = Enable XRUN/jiffies debug messages 101 bit 0 = Enable XRUN/jiffies debug messages
102 bit 1 = Show stack trace at XRUN / jiffies check 102 bit 1 = Show stack trace at XRUN / jiffies check
103 bit 2 = Enable additional jiffies check 103 bit 2 = Enable additional jiffies check
104 bit 3 = Log hwptr update at each period interrupt
105 bit 4 = Log hwptr update at each snd_pcm_update_hw_ptr()
106 bit 5 = Show last 10 positions on error
107 bit 6 = Do above only once
108 104
109 When the bit 0 is set, the driver will show the messages to 105 When the bit 0 is set, the driver will show the messages to
110 kernel log when an xrun is detected. The debug message is 106 kernel log when an xrun is detected. The debug message is
@@ -121,15 +117,6 @@ card*/pcm*/xrun_debug
121 buggy) hardware that doesn't give smooth pointer updates. 117 buggy) hardware that doesn't give smooth pointer updates.
122 This feature is enabled via the bit 2. 118 This feature is enabled via the bit 2.
123 119
124 Bits 3 and 4 are for logging the hwptr records. Note that
125 these will give flood of kernel messages.
126
127 When bit 5 is set, the driver logs the last 10 xrun errors and
128 the proc file shows each jiffies, position, period_size,
129 buffer_size, old_hw_ptr, and hw_ptr_base values.
130
131 When bit 6 is set, the full xrun log is shown only once.
132
133card*/pcm*/sub*/info 120card*/pcm*/sub*/info
134 The general information of this PCM sub-stream. 121 The general information of this PCM sub-stream.
135 122
@@ -146,6 +133,10 @@ card*/pcm*/sub*/sw_params
146card*/pcm*/sub*/prealloc 133card*/pcm*/sub*/prealloc
147 The buffer pre-allocation information. 134 The buffer pre-allocation information.
148 135
136card*/pcm*/sub*/xrun_injection
137 Triggers an XRUN to the running stream when any value is
138 written to this proc file. Used for fault injection.
139 This entry is write-only.
149 140
150AC97 Codec Information 141AC97 Codec Information
151---------------------- 142----------------------
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 57baff5bdb80..75511efefc64 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -54,8 +54,9 @@ show up in /proc/sys/kernel:
54- overflowuid 54- overflowuid
55- panic 55- panic
56- panic_on_oops 56- panic_on_oops
57- panic_on_unrecovered_nmi
58- panic_on_stackoverflow 57- panic_on_stackoverflow
58- panic_on_unrecovered_nmi
59- panic_on_warn
59- pid_max 60- pid_max
60- powersave-nap [ PPC only ] 61- powersave-nap [ PPC only ]
61- printk 62- printk
@@ -115,10 +116,12 @@ set during run time.
115 116
116auto_msgmni: 117auto_msgmni:
117 118
118Enables/Disables automatic recomputing of msgmni upon memory add/remove 119This variable has no effect and may be removed in future kernel
119or upon ipc namespace creation/removal (see the msgmni description 120releases. Reading it always returns 0.
120above). Echoing "1" into this file enables msgmni automatic recomputing. 121Up to Linux 3.17, it enabled/disabled automatic recomputing of msgmni
121Echoing "0" turns it off. auto_msgmni default value is 1. 122upon memory add/remove or upon ipc namespace creation/removal.
123Echoing "1" into this file enabled msgmni automatic recomputing.
124Echoing "0" turned it off. auto_msgmni default value was 1.
122 125
123 126
124============================================================== 127==============================================================
@@ -527,19 +530,6 @@ the recommended setting is 60.
527 530
528============================================================== 531==============================================================
529 532
530panic_on_unrecovered_nmi:
531
532The default Linux behaviour on an NMI of either memory or unknown is
533to continue operation. For many environments such as scientific
534computing it is preferable that the box is taken out and the error
535dealt with than an uncorrected parity/ECC error get propagated.
536
537A small number of systems do generate NMI's for bizarre random reasons
538such as power management so the default is off. That sysctl works like
539the existing panic controls already in that directory.
540
541==============================================================
542
543panic_on_oops: 533panic_on_oops:
544 534
545Controls the kernel's behaviour when an oops or BUG is encountered. 535Controls the kernel's behaviour when an oops or BUG is encountered.
@@ -563,6 +553,30 @@ This file shows up if CONFIG_DEBUG_STACKOVERFLOW is enabled.
563 553
564============================================================== 554==============================================================
565 555
556panic_on_unrecovered_nmi:
557
558The default Linux behaviour on an NMI of either memory or unknown is
559to continue operation. For many environments such as scientific
560computing it is preferable that the box is taken out and the error
561dealt with than an uncorrected parity/ECC error get propagated.
562
563A small number of systems do generate NMI's for bizarre random reasons
564such as power management so the default is off. That sysctl works like
565the existing panic controls already in that directory.
566
567==============================================================
568
569panic_on_warn:
570
571Calls panic() in the WARN() path when set to 1. This is useful to avoid
572a kernel rebuild when attempting to kdump at the location of a WARN().
573
5740: only WARN(), default behaviour.
575
5761: call panic() after printing out WARN() location.
577
578==============================================================
579
566perf_cpu_time_max_percent: 580perf_cpu_time_max_percent:
567 581
568Hints to the kernel how much CPU time it should be allowed to 582Hints to the kernel how much CPU time it should be allowed to
diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
index 04892b821157..666594b43cff 100644
--- a/Documentation/sysctl/net.txt
+++ b/Documentation/sysctl/net.txt
@@ -120,10 +120,14 @@ seconds.
120warnings 120warnings
121-------- 121--------
122 122
123This controls console messages from the networking stack that can occur because 123This sysctl is now unused.
124of problems on the network like duplicate address or bad checksums. Normally, 124
125this should be enabled, but if the problem persists the messages can be 125This was used to control console messages from the networking stack that
126disabled. 126occur because of problems on the network like duplicate address or bad
127checksums.
128
129These messages are now emitted at KERN_DEBUG and can generally be enabled
130and controlled by the dynamic_debug facility.
127 131
128netdev_budget 132netdev_budget
129------------- 133-------------
@@ -138,6 +142,28 @@ netdev_max_backlog
138Maximum number of packets, queued on the INPUT side, when the interface 142Maximum number of packets, queued on the INPUT side, when the interface
139receives packets faster than kernel can process them. 143receives packets faster than kernel can process them.
140 144
145netdev_rss_key
146--------------
147
148RSS (Receive Side Scaling) enabled drivers use a 40 bytes host key that is
149randomly generated.
150Some user space might need to gather its content even if drivers do not
151provide ethtool -x support yet.
152
153myhost:~# cat /proc/sys/net/core/netdev_rss_key
15484:50:f4:00:a8:15:d1:a7:e9:7f:1d:60:35:c7:47:25:42:97:74:ca:56:bb:b6:a1:d8: ... (52 bytes total)
155
156File contains nul bytes if no driver ever called netdev_rss_key_fill() function.
157Note:
158/proc/sys/net/core/netdev_rss_key contains 52 bytes of key,
159but most drivers only use 40 bytes of it.
160
161myhost:~# ethtool -x eth0
162RX flow hash indirection table for eth0 with 8 RX ring(s):
163 0: 0 1 2 3 4 5 6 7
164RSS hash key:
16584:50:f4:00:a8:15:d1:a7:e9:7f:1d:60:35:c7:47:25:42:97:74:ca:56:bb:b6:a1:d8:43:e3:c9:0c:fd:17:55:c2:3a:4d:69:ed:f1:42:89
166
141netdev_tstamp_prequeue 167netdev_tstamp_prequeue
142---------------------- 168----------------------
143 169
diff --git a/Documentation/trace/coresight.txt b/Documentation/trace/coresight.txt
new file mode 100644
index 000000000000..bba7dbfc49ed
--- /dev/null
+++ b/Documentation/trace/coresight.txt
@@ -0,0 +1,299 @@
1 Coresight - HW Assisted Tracing on ARM
2 ======================================
3
4 Author: Mathieu Poirier <mathieu.poirier@linaro.org>
5 Date: September 11th, 2014
6
7Introduction
8------------
9
10Coresight is an umbrella of technologies allowing for the debugging of ARM
11based SoC. It includes solutions for JTAG and HW assisted tracing. This
12document is concerned with the latter.
13
14HW assisted tracing is becoming increasingly useful when dealing with systems
15that have many SoCs and other components like GPU and DMA engines. ARM has
16developed a HW assisted tracing solution by means of different components, each
17being added to a design at systhesis time to cater to specific tracing needs.
18Compoments are generally categorised as source, link and sinks and are
19(usually) discovered using the AMBA bus.
20
21"Sources" generate a compressed stream representing the processor instruction
22path based on tracing scenarios as configured by users. From there the stream
23flows through the coresight system (via ATB bus) using links that are connecting
24the emanating source to a sink(s). Sinks serve as endpoints to the coresight
25implementation, either storing the compressed stream in a memory buffer or
26creating an interface to the outside world where data can be transferred to a
27host without fear of filling up the onboard coresight memory buffer.
28
29At typical coresight system would look like this:
30
31 *****************************************************************
32 **************************** AMBA AXI ****************************===||
33 ***************************************************************** ||
34 ^ ^ | ||
35 | | * **
36 0000000 ::::: 0000000 ::::: ::::: @@@@@@@ ||||||||||||
37 0 CPU 0<-->: C : 0 CPU 0<-->: C : : C : @ STM @ || System ||
38 |->0000000 : T : |->0000000 : T : : T :<--->@@@@@ || Memory ||
39 | #######<-->: I : | #######<-->: I : : I : @@@<-| ||||||||||||
40 | # ETM # ::::: | # PTM # ::::: ::::: @ |
41 | ##### ^ ^ | ##### ^ ! ^ ! . | |||||||||
42 | |->### | ! | |->### | ! | ! . | || DAP ||
43 | | # | ! | | # | ! | ! . | |||||||||
44 | | . | ! | | . | ! | ! . | | |
45 | | . | ! | | . | ! | ! . | | *
46 | | . | ! | | . | ! | ! . | | SWD/
47 | | . | ! | | . | ! | ! . | | JTAG
48 *****************************************************************<-|
49 *************************** AMBA Debug ABP ************************
50 *****************************************************************
51 | . ! . ! ! . |
52 | . * . * * . |
53 *****************************************************************
54 ******************** Cross Trigger Matrix (CTM) *******************
55 *****************************************************************
56 | . ^ . . |
57 | * ! * * |
58 *****************************************************************
59 ****************** AMBA Advanced Trace Bus (ATB) ******************
60 *****************************************************************
61 | ! =============== |
62 | * ===== F =====<---------|
63 | ::::::::: ==== U ====
64 |-->:: CTI ::<!! === N ===
65 | ::::::::: ! == N ==
66 | ^ * == E ==
67 | ! &&&&&&&&& IIIIIII == L ==
68 |------>&& ETB &&<......II I =======
69 | ! &&&&&&&&& II I .
70 | ! I I .
71 | ! I REP I<..........
72 | ! I I
73 | !!>&&&&&&&&& II I *Source: ARM ltd.
74 |------>& TPIU &<......II I DAP = Debug Access Port
75 &&&&&&&&& IIIIIII ETM = Embedded Trace Macrocell
76 ; PTM = Program Trace Macrocell
77 ; CTI = Cross Trigger Interface
78 * ETB = Embedded Trace Buffer
79 To trace port TPIU= Trace Port Interface Unit
80 SWD = Serial Wire Debug
81
82While on target configuration of the components is done via the ABP bus,
83all trace data are carried out-of-band on the ATB bus. The CTM provides
84a way to aggregate and distribute signals between CoreSight components.
85
86The coresight framework provides a central point to represent, configure and
87manage coresight devices on a platform. This first implementation centers on
88the basic tracing functionality, enabling components such ETM/PTM, funnel,
89replicator, TMC, TPIU and ETB. Future work will enable more
90intricate IP blocks such as STM and CTI.
91
92
93Acronyms and Classification
94---------------------------
95
96Acronyms:
97
98PTM: Program Trace Macrocell
99ETM: Embedded Trace Macrocell
100STM: System trace Macrocell
101ETB: Embedded Trace Buffer
102ITM: Instrumentation Trace Macrocell
103TPIU: Trace Port Interface Unit
104TMC-ETR: Trace Memory Controller, configured as Embedded Trace Router
105TMC-ETF: Trace Memory Controller, configured as Embedded Trace FIFO
106CTI: Cross Trigger Interface
107
108Classification:
109
110Source:
111 ETMv3.x ETMv4, PTMv1.0, PTMv1.1, STM, STM500, ITM
112Link:
113 Funnel, replicator (intelligent or not), TMC-ETR
114Sinks:
115 ETBv1.0, ETB1.1, TPIU, TMC-ETF
116Misc:
117 CTI
118
119
120Device Tree Bindings
121----------------------
122
123See Documentation/devicetree/bindings/arm/coresight.txt for details.
124
125As of this writing drivers for ITM, STMs and CTIs are not provided but are
126expected to be added as the solution matures.
127
128
129Framework and implementation
130----------------------------
131
132The coresight framework provides a central point to represent, configure and
133manage coresight devices on a platform. Any coresight compliant device can
134register with the framework for as long as they use the right APIs:
135
136struct coresight_device *coresight_register(struct coresight_desc *desc);
137void coresight_unregister(struct coresight_device *csdev);
138
139The registering function is taking a "struct coresight_device *csdev" and
140register the device with the core framework. The unregister function takes
141a reference to a "strut coresight_device", obtained at registration time.
142
143If everything goes well during the registration process the new devices will
144show up under /sys/bus/coresight/devices, as showns here for a TC2 platform:
145
146root:~# ls /sys/bus/coresight/devices/
147replicator 20030000.tpiu 2201c000.ptm 2203c000.etm 2203e000.etm
14820010000.etb 20040000.funnel 2201d000.ptm 2203d000.etm
149root:~#
150
151The functions take a "struct coresight_device", which looks like this:
152
153struct coresight_desc {
154 enum coresight_dev_type type;
155 struct coresight_dev_subtype subtype;
156 const struct coresight_ops *ops;
157 struct coresight_platform_data *pdata;
158 struct device *dev;
159 const struct attribute_group **groups;
160};
161
162
163The "coresight_dev_type" identifies what the device is, i.e, source link or
164sink while the "coresight_dev_subtype" will characterise that type further.
165
166The "struct coresight_ops" is mandatory and will tell the framework how to
167perform base operations related to the components, each component having
168a different set of requirement. For that "struct coresight_ops_sink",
169"struct coresight_ops_link" and "struct coresight_ops_source" have been
170provided.
171
172The next field, "struct coresight_platform_data *pdata" is acquired by calling
173"of_get_coresight_platform_data()", as part of the driver's _probe routine and
174"struct device *dev" gets the device reference embedded in the "amba_device":
175
176static int etm_probe(struct amba_device *adev, const struct amba_id *id)
177{
178 ...
179 ...
180 drvdata->dev = &adev->dev;
181 ...
182}
183
184Specific class of device (source, link, or sink) have generic operations
185that can be performed on them (see "struct coresight_ops"). The
186"**groups" is a list of sysfs entries pertaining to operations
187specific to that component only. "Implementation defined" customisations are
188expected to be accessed and controlled using those entries.
189
190Last but not least, "struct module *owner" is expected to be set to reflect
191the information carried in "THIS_MODULE".
192
193How to use
194----------
195
196Before trace collection can start, a coresight sink needs to be identify.
197There is no limit on the amount of sinks (nor sources) that can be enabled at
198any given moment. As a generic operation, all device pertaining to the sink
199class will have an "active" entry in sysfs:
200
201root:/sys/bus/coresight/devices# ls
202replicator 20030000.tpiu 2201c000.ptm 2203c000.etm 2203e000.etm
20320010000.etb 20040000.funnel 2201d000.ptm 2203d000.etm
204root:/sys/bus/coresight/devices# ls 20010000.etb
205enable_sink status trigger_cntr
206root:/sys/bus/coresight/devices# echo 1 > 20010000.etb/enable_sink
207root:/sys/bus/coresight/devices# cat 20010000.etb/enable_sink
2081
209root:/sys/bus/coresight/devices#
210
211At boot time the current etm3x driver will configure the first address
212comparator with "_stext" and "_etext", essentially tracing any instruction
213that falls within that range. As such "enabling" a source will immediately
214trigger a trace capture:
215
216root:/sys/bus/coresight/devices# echo 1 > 2201c000.ptm/enable_source
217root:/sys/bus/coresight/devices# cat 2201c000.ptm/enable_source
2181
219root:/sys/bus/coresight/devices# cat 20010000.etb/status
220Depth: 0x2000
221Status: 0x1
222RAM read ptr: 0x0
223RAM wrt ptr: 0x19d3 <----- The write pointer is moving
224Trigger cnt: 0x0
225Control: 0x1
226Flush status: 0x0
227Flush ctrl: 0x2001
228root:/sys/bus/coresight/devices#
229
230Trace collection is stopped the same way:
231
232root:/sys/bus/coresight/devices# echo 0 > 2201c000.ptm/enable_source
233root:/sys/bus/coresight/devices#
234
235The content of the ETB buffer can be harvested directly from /dev:
236
237root:/sys/bus/coresight/devices# dd if=/dev/20010000.etb \
238of=~/cstrace.bin
239
24064+0 records in
24164+0 records out
24232768 bytes (33 kB) copied, 0.00125258 s, 26.2 MB/s
243root:/sys/bus/coresight/devices#
244
245The file cstrace.bin can be decompressed using "ptm2human", DS-5 or Trace32.
246
247Following is a DS-5 output of an experimental loop that increments a variable up
248to a certain value. The example is simple and yet provides a glimpse of the
249wealth of possibilities that coresight provides.
250
251Info Tracing enabled
252Instruction 106378866 0x8026B53C E52DE004 false PUSH {lr}
253Instruction 0 0x8026B540 E24DD00C false SUB sp,sp,#0xc
254Instruction 0 0x8026B544 E3A03000 false MOV r3,#0
255Instruction 0 0x8026B548 E58D3004 false STR r3,[sp,#4]
256Instruction 0 0x8026B54C E59D3004 false LDR r3,[sp,#4]
257Instruction 0 0x8026B550 E3530004 false CMP r3,#4
258Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1
259Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4]
260Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c
261Timestamp Timestamp: 17106715833
262Instruction 319 0x8026B54C E59D3004 false LDR r3,[sp,#4]
263Instruction 0 0x8026B550 E3530004 false CMP r3,#4
264Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1
265Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4]
266Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c
267Instruction 9 0x8026B54C E59D3004 false LDR r3,[sp,#4]
268Instruction 0 0x8026B550 E3530004 false CMP r3,#4
269Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1
270Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4]
271Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c
272Instruction 7 0x8026B54C E59D3004 false LDR r3,[sp,#4]
273Instruction 0 0x8026B550 E3530004 false CMP r3,#4
274Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1
275Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4]
276Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c
277Instruction 7 0x8026B54C E59D3004 false LDR r3,[sp,#4]
278Instruction 0 0x8026B550 E3530004 false CMP r3,#4
279Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1
280Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4]
281Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c
282Instruction 10 0x8026B54C E59D3004 false LDR r3,[sp,#4]
283Instruction 0 0x8026B550 E3530004 false CMP r3,#4
284Instruction 0 0x8026B554 E2833001 false ADD r3,r3,#1
285Instruction 0 0x8026B558 E58D3004 false STR r3,[sp,#4]
286Instruction 0 0x8026B55C DAFFFFFA true BLE {pc}-0x10 ; 0x8026b54c
287Instruction 6 0x8026B560 EE1D3F30 false MRC p15,#0x0,r3,c13,c0,#1
288Instruction 0 0x8026B564 E1A0100D false MOV r1,sp
289Instruction 0 0x8026B568 E3C12D7F false BIC r2,r1,#0x1fc0
290Instruction 0 0x8026B56C E3C2203F false BIC r2,r2,#0x3f
291Instruction 0 0x8026B570 E59D1004 false LDR r1,[sp,#4]
292Instruction 0 0x8026B574 E59F0010 false LDR r0,[pc,#16] ; [0x8026B58C] = 0x80550368
293Instruction 0 0x8026B578 E592200C false LDR r2,[r2,#0xc]
294Instruction 0 0x8026B57C E59221D0 false LDR r2,[r2,#0x1d0]
295Instruction 0 0x8026B580 EB07A4CF true BL {pc}+0x1e9344 ; 0x804548c4
296Info Tracing enabled
297Instruction 13570831 0x8026B584 E28DD00C false ADD sp,sp,#0xc
298Instruction 0 0x8026B588 E8BD8000 true LDM sp!,{pc}
299Timestamp Timestamp: 17107041535
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index 4da42616939f..8408e040f06f 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -234,6 +234,11 @@ of ftrace. Here is a list of some of the key files:
234 will be displayed on the same line as the function that 234 will be displayed on the same line as the function that
235 is returning registers. 235 is returning registers.
236 236
237 If the callback registered to be traced by a function with
238 the "ip modify" attribute (thus the regs->ip can be changed),
239 an 'I' will be displayed on the same line as the function that
240 can be overridden.
241
237 function_profile_enabled: 242 function_profile_enabled:
238 243
239 When set it will enable all functions with either the function 244 When set it will enable all functions with either the function
@@ -680,9 +685,11 @@ The above is mostly meaningful for kernel developers.
680 needs to be fixed to be only relative to the same CPU. 685 needs to be fixed to be only relative to the same CPU.
681 The marks are determined by the difference between this 686 The marks are determined by the difference between this
682 current trace and the next trace. 687 current trace and the next trace.
683 '!' - greater than preempt_mark_thresh (default 100) 688 '$' - greater than 1 second
684 '+' - greater than 1 microsecond 689 '#' - greater than 1000 microsecond
685 ' ' - less than or equal to 1 microsecond. 690 '!' - greater than 100 microsecond
691 '+' - greater than 10 microsecond
692 ' ' - less than or equal to 10 microsecond.
686 693
687 The rest is the same as the 'trace' file. 694 The rest is the same as the 'trace' file.
688 695
@@ -1951,6 +1958,8 @@ want, depending on your needs.
1951 1958
1952 + means that the function exceeded 10 usecs. 1959 + means that the function exceeded 10 usecs.
1953 ! means that the function exceeded 100 usecs. 1960 ! means that the function exceeded 100 usecs.
1961 # means that the function exceeded 1000 usecs.
1962 $ means that the function exceeded 1 sec.
1954 1963
1955 1964
1956- The task/pid field displays the thread cmdline and pid which 1965- The task/pid field displays the thread cmdline and pid which
diff --git a/Documentation/usb/gadget_configfs.txt b/Documentation/usb/gadget_configfs.txt
index 4cf53e406613..635e57493709 100644
--- a/Documentation/usb/gadget_configfs.txt
+++ b/Documentation/usb/gadget_configfs.txt
@@ -376,7 +376,7 @@ functions and binds them. This way the whole gadget is bound.
376configured, so config_groups for particular functions are defined 376configured, so config_groups for particular functions are defined
377in the functions implementation files drivers/usb/gadget/f_*.c. 377in the functions implementation files drivers/usb/gadget/f_*.c.
378 378
3795. Funciton's code is written in such a way that it uses 3795. Function's code is written in such a way that it uses
380 380
381usb_get_function_instance(), which, in turn, calls request_module. 381usb_get_function_instance(), which, in turn, calls request_module.
382So, provided that modprobe works, modules for particular functions 382So, provided that modprobe works, modules for particular functions
diff --git a/Documentation/usb/gadget_hid.txt b/Documentation/usb/gadget_hid.txt
index 12696c2e43fb..7a0fb8e16e27 100644
--- a/Documentation/usb/gadget_hid.txt
+++ b/Documentation/usb/gadget_hid.txt
@@ -74,6 +74,13 @@ static struct platform_device my_hid = {
74 You can add as many HID functions as you want, only limited by 74 You can add as many HID functions as you want, only limited by
75 the amount of interrupt endpoints your gadget driver supports. 75 the amount of interrupt endpoints your gadget driver supports.
76 76
77Configuration with configfs
78
79 Instead of adding fake platform devices and drivers in order to pass
80 some data to the kernel, if HID is a part of a gadget composed with
81 configfs the hidg_func_descriptor.report_desc is passed to the kernel
82 by writing the appropriate stream of bytes to a configfs attribute.
83
77Send and receive HID reports 84Send and receive HID reports
78 85
79 HID reports can be sent/received using read/write on the 86 HID reports can be sent/received using read/write on the
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt
index 7b90fe034c4b..b5f83911732a 100644
--- a/Documentation/usb/power-management.txt
+++ b/Documentation/usb/power-management.txt
@@ -47,14 +47,15 @@ dynamic PM is implemented in the USB subsystem, although system PM is
47covered to some extent (see Documentation/power/*.txt for more 47covered to some extent (see Documentation/power/*.txt for more
48information about system PM). 48information about system PM).
49 49
50Note: Dynamic PM support for USB is present only if the kernel was 50System PM support is present only if the kernel was built with CONFIG_SUSPEND
51built with CONFIG_USB_SUSPEND enabled (which depends on 51or CONFIG_HIBERNATION enabled. Dynamic PM support for USB is present whenever
52CONFIG_PM_RUNTIME). System PM support is present only if the kernel 52the kernel was built with CONFIG_PM enabled.
53was built with CONFIG_SUSPEND or CONFIG_HIBERNATION enabled. 53
54 54[Historically, dynamic PM support for USB was present only if the
55(Starting with the 3.10 kernel release, dynamic PM support for USB is 55kernel had been built with CONFIG_USB_SUSPEND enabled (which depended on
56present whenever the kernel was built with CONFIG_PM_RUNTIME enabled. 56CONFIG_PM_RUNTIME). Starting with the 3.10 kernel release, dynamic PM support
57The CONFIG_USB_SUSPEND option has been eliminated.) 57for USB was present whenever the kernel was built with CONFIG_PM_RUNTIME
58enabled. The CONFIG_USB_SUSPEND option had been eliminated.]
58 59
59 60
60 What is Remote Wakeup? 61 What is Remote Wakeup?
diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
index 5bd7926185e8..947fa62bccf2 100644
--- a/Documentation/usb/usb-serial.txt
+++ b/Documentation/usb/usb-serial.txt
@@ -145,7 +145,7 @@ Keyspan PDA Serial Adapter
145 Single port DB-9 serial adapter, pushed as a PDA adapter for iMacs (mostly 145 Single port DB-9 serial adapter, pushed as a PDA adapter for iMacs (mostly
146 sold in Macintosh catalogs, comes in a translucent white/green dongle). 146 sold in Macintosh catalogs, comes in a translucent white/green dongle).
147 Fairly simple device. Firmware is homebrew. 147 Fairly simple device. Firmware is homebrew.
148 This driver also works for the Xircom/Entrgra single port serial adapter. 148 This driver also works for the Xircom/Entrega single port serial adapter.
149 149
150 Current status: 150 Current status:
151 Things that work: 151 Things that work:
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885
index a74eeccfe700..4c84ec853265 100644
--- a/Documentation/video4linux/CARDLIST.cx23885
+++ b/Documentation/video4linux/CARDLIST.cx23885
@@ -43,3 +43,5 @@
43 42 -> Leadtek Winfast PxPVR2200 [107d:6f21] 43 42 -> Leadtek Winfast PxPVR2200 [107d:6f21]
44 43 -> Hauppauge ImpactVCB-e [0070:7133] 44 43 -> Hauppauge ImpactVCB-e [0070:7133]
45 44 -> DViCO FusionHDTV DVB-T Dual Express2 [18ac:db98] 45 44 -> DViCO FusionHDTV DVB-T Dual Express2 [18ac:db98]
46 45 -> DVBSky T9580 [4254:9580]
47 46 -> DVBSky T980C [4254:980c]
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index bc3351bb48b4..3700edb81db2 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -93,3 +93,4 @@
93 92 -> PCTV DVB-S2 Stick (461e) (em28178) 93 92 -> PCTV DVB-S2 Stick (461e) (em28178)
94 93 -> KWorld USB ATSC TV Stick UB435-Q V3 (em2874) [1b80:e34c] 94 93 -> KWorld USB ATSC TV Stick UB435-Q V3 (em2874) [1b80:e34c]
95 94 -> PCTV tripleStick (292e) (em28178) 95 94 -> PCTV tripleStick (292e) (em28178)
96 95 -> Leadtek VC100 (em2861) [0413:6f07]
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index 8df17d063499..a93d86455233 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -191,3 +191,4 @@
191190 -> Asus My Cinema PS3-100 [1043:48cd] 191190 -> Asus My Cinema PS3-100 [1043:48cd]
192191 -> Hawell HW-9004V1 192191 -> Hawell HW-9004V1
193192 -> AverMedia AverTV Satellite Hybrid+FM A706 [1461:2055] 193192 -> AverMedia AverTV Satellite Hybrid+FM A706 [1461:2055]
194193 -> WIS Voyager or compatible [1905:7007]
diff --git a/Documentation/video4linux/soc-camera.txt b/Documentation/video4linux/soc-camera.txt
index daa9e2ac162c..84f41cf1f3e8 100644
--- a/Documentation/video4linux/soc-camera.txt
+++ b/Documentation/video4linux/soc-camera.txt
@@ -151,7 +151,7 @@ they are transferred over a media bus. Soc-camera provides support to
151conveniently manage these formats. A table of standard transformations is 151conveniently manage these formats. A table of standard transformations is
152maintained by soc-camera core, which describes, what FOURCC pixel format will 152maintained by soc-camera core, which describes, what FOURCC pixel format will
153be obtained, if a media-bus pixel format is stored in memory according to 153be obtained, if a media-bus pixel format is stored in memory according to
154certain rules. E.g. if V4L2_MBUS_FMT_YUYV8_2X8 data is sampled with 8 bits per 154certain rules. E.g. if MEDIA_BUS_FMT_YUYV8_2X8 data is sampled with 8 bits per
155sample and stored in memory in the little-endian order with no gaps between 155sample and stored in memory in the little-endian order with no gaps between
156bytes, data in memory will represent the V4L2_PIX_FMT_YUYV FOURCC format. These 156bytes, data in memory will represent the V4L2_PIX_FMT_YUYV FOURCC format. These
157standard transformations will be used by soc-camera or by camera host drivers to 157standard transformations will be used by soc-camera or by camera host drivers to
diff --git a/Documentation/video4linux/vivid.txt b/Documentation/video4linux/vivid.txt
index e5a940e3d304..6cfc8541a362 100644
--- a/Documentation/video4linux/vivid.txt
+++ b/Documentation/video4linux/vivid.txt
@@ -640,6 +640,21 @@ Colorspace: selects which colorspace should be used when generating the image.
640 Changing the colorspace will result in the V4L2_EVENT_SOURCE_CHANGE 640 Changing the colorspace will result in the V4L2_EVENT_SOURCE_CHANGE
641 to be sent since it emulates a detected colorspace change. 641 to be sent since it emulates a detected colorspace change.
642 642
643Y'CbCr Encoding: selects which Y'CbCr encoding should be used when generating
644 a Y'CbCr image. This only applies if the CSC Colorbar test pattern is
645 selected, and if the format is set to a Y'CbCr format as opposed to an
646 RGB format.
647
648 Changing the Y'CbCr encoding will result in the V4L2_EVENT_SOURCE_CHANGE
649 to be sent since it emulates a detected colorspace change.
650
651Quantization: selects which quantization should be used for the RGB or Y'CbCr
652 encoding when generating the test pattern. This only applies if the CSC
653 Colorbar test pattern is selected.
654
655 Changing the quantization will result in the V4L2_EVENT_SOURCE_CHANGE
656 to be sent since it emulates a detected colorspace change.
657
643Limited RGB Range (16-235): selects if the RGB range of the HDMI source should 658Limited RGB Range (16-235): selects if the RGB range of the HDMI source should
644 be limited or full range. This combines with the Digital Video 'Rx RGB 659 be limited or full range. This combines with the Digital Video 'Rx RGB
645 Quantization Range' control and can be used to test what happens if 660 Quantization Range' control and can be used to test what happens if
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 7610eaa4d491..0007fef4ed81 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -68,9 +68,12 @@ description:
68 68
69 Capability: which KVM extension provides this ioctl. Can be 'basic', 69 Capability: which KVM extension provides this ioctl. Can be 'basic',
70 which means that is will be provided by any kernel that supports 70 which means that is will be provided by any kernel that supports
71 API version 12 (see section 4.1), or a KVM_CAP_xyz constant, which 71 API version 12 (see section 4.1), a KVM_CAP_xyz constant, which
72 means availability needs to be checked with KVM_CHECK_EXTENSION 72 means availability needs to be checked with KVM_CHECK_EXTENSION
73 (see section 4.4). 73 (see section 4.4), or 'none' which means that while not all kernels
74 support this ioctl, there's no capability bit to check its
75 availability: for kernels that don't support the ioctl,
76 the ioctl returns -ENOTTY.
74 77
75 Architectures: which instruction set architectures provide this ioctl. 78 Architectures: which instruction set architectures provide this ioctl.
76 x86 includes both i386 and x86_64. 79 x86 includes both i386 and x86_64.
@@ -604,7 +607,7 @@ struct kvm_fpu {
6044.24 KVM_CREATE_IRQCHIP 6074.24 KVM_CREATE_IRQCHIP
605 608
606Capability: KVM_CAP_IRQCHIP, KVM_CAP_S390_IRQCHIP (s390) 609Capability: KVM_CAP_IRQCHIP, KVM_CAP_S390_IRQCHIP (s390)
607Architectures: x86, ia64, ARM, arm64, s390 610Architectures: x86, ARM, arm64, s390
608Type: vm ioctl 611Type: vm ioctl
609Parameters: none 612Parameters: none
610Returns: 0 on success, -1 on error 613Returns: 0 on success, -1 on error
@@ -612,7 +615,7 @@ Returns: 0 on success, -1 on error
612Creates an interrupt controller model in the kernel. On x86, creates a virtual 615Creates an interrupt controller model in the kernel. On x86, creates a virtual
613ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a 616ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a
614local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 617local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23
615only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM/arm64, a GIC is 618only go to the IOAPIC. On ARM/arm64, a GIC is
616created. On s390, a dummy irq routing table is created. 619created. On s390, a dummy irq routing table is created.
617 620
618Note that on s390 the KVM_CAP_S390_IRQCHIP vm capability needs to be enabled 621Note that on s390 the KVM_CAP_S390_IRQCHIP vm capability needs to be enabled
@@ -622,7 +625,7 @@ before KVM_CREATE_IRQCHIP can be used.
6224.25 KVM_IRQ_LINE 6254.25 KVM_IRQ_LINE
623 626
624Capability: KVM_CAP_IRQCHIP 627Capability: KVM_CAP_IRQCHIP
625Architectures: x86, ia64, arm, arm64 628Architectures: x86, arm, arm64
626Type: vm ioctl 629Type: vm ioctl
627Parameters: struct kvm_irq_level 630Parameters: struct kvm_irq_level
628Returns: 0 on success, -1 on error 631Returns: 0 on success, -1 on error
@@ -676,7 +679,7 @@ struct kvm_irq_level {
6764.26 KVM_GET_IRQCHIP 6794.26 KVM_GET_IRQCHIP
677 680
678Capability: KVM_CAP_IRQCHIP 681Capability: KVM_CAP_IRQCHIP
679Architectures: x86, ia64 682Architectures: x86
680Type: vm ioctl 683Type: vm ioctl
681Parameters: struct kvm_irqchip (in/out) 684Parameters: struct kvm_irqchip (in/out)
682Returns: 0 on success, -1 on error 685Returns: 0 on success, -1 on error
@@ -698,7 +701,7 @@ struct kvm_irqchip {
6984.27 KVM_SET_IRQCHIP 7014.27 KVM_SET_IRQCHIP
699 702
700Capability: KVM_CAP_IRQCHIP 703Capability: KVM_CAP_IRQCHIP
701Architectures: x86, ia64 704Architectures: x86
702Type: vm ioctl 705Type: vm ioctl
703Parameters: struct kvm_irqchip (in) 706Parameters: struct kvm_irqchip (in)
704Returns: 0 on success, -1 on error 707Returns: 0 on success, -1 on error
@@ -991,7 +994,7 @@ for vm-wide capabilities.
9914.38 KVM_GET_MP_STATE 9944.38 KVM_GET_MP_STATE
992 995
993Capability: KVM_CAP_MP_STATE 996Capability: KVM_CAP_MP_STATE
994Architectures: x86, ia64, s390 997Architectures: x86, s390
995Type: vcpu ioctl 998Type: vcpu ioctl
996Parameters: struct kvm_mp_state (out) 999Parameters: struct kvm_mp_state (out)
997Returns: 0 on success; -1 on error 1000Returns: 0 on success; -1 on error
@@ -1005,16 +1008,15 @@ uniprocessor guests).
1005 1008
1006Possible values are: 1009Possible values are:
1007 1010
1008 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86, ia64] 1011 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86]
1009 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) 1012 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP)
1010 which has not yet received an INIT signal [x86, 1013 which has not yet received an INIT signal [x86]
1011 ia64]
1012 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is 1014 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is
1013 now ready for a SIPI [x86, ia64] 1015 now ready for a SIPI [x86]
1014 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and 1016 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and
1015 is waiting for an interrupt [x86, ia64] 1017 is waiting for an interrupt [x86]
1016 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector 1018 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector
1017 accessible via KVM_GET_VCPU_EVENTS) [x86, ia64] 1019 accessible via KVM_GET_VCPU_EVENTS) [x86]
1018 - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390] 1020 - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390]
1019 - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390] 1021 - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390]
1020 - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted) 1022 - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted)
@@ -1022,7 +1024,7 @@ Possible values are:
1022 - KVM_MP_STATE_LOAD: the vcpu is in a special load/startup state 1024 - KVM_MP_STATE_LOAD: the vcpu is in a special load/startup state
1023 [s390] 1025 [s390]
1024 1026
1025On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an 1027On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1026in-kernel irqchip, the multiprocessing state must be maintained by userspace on 1028in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1027these architectures. 1029these architectures.
1028 1030
@@ -1030,7 +1032,7 @@ these architectures.
10304.39 KVM_SET_MP_STATE 10324.39 KVM_SET_MP_STATE
1031 1033
1032Capability: KVM_CAP_MP_STATE 1034Capability: KVM_CAP_MP_STATE
1033Architectures: x86, ia64, s390 1035Architectures: x86, s390
1034Type: vcpu ioctl 1036Type: vcpu ioctl
1035Parameters: struct kvm_mp_state (in) 1037Parameters: struct kvm_mp_state (in)
1036Returns: 0 on success; -1 on error 1038Returns: 0 on success; -1 on error
@@ -1038,7 +1040,7 @@ Returns: 0 on success; -1 on error
1038Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for 1040Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for
1039arguments. 1041arguments.
1040 1042
1041On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an 1043On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1042in-kernel irqchip, the multiprocessing state must be maintained by userspace on 1044in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1043these architectures. 1045these architectures.
1044 1046
@@ -1065,7 +1067,7 @@ documentation when it pops into existence).
10654.41 KVM_SET_BOOT_CPU_ID 10674.41 KVM_SET_BOOT_CPU_ID
1066 1068
1067Capability: KVM_CAP_SET_BOOT_CPU_ID 1069Capability: KVM_CAP_SET_BOOT_CPU_ID
1068Architectures: x86, ia64 1070Architectures: x86
1069Type: vm ioctl 1071Type: vm ioctl
1070Parameters: unsigned long vcpu_id 1072Parameters: unsigned long vcpu_id
1071Returns: 0 on success, -1 on error 1073Returns: 0 on success, -1 on error
@@ -1257,8 +1259,8 @@ The flags bitmap is defined as:
1257 1259
12584.48 KVM_ASSIGN_PCI_DEVICE 12604.48 KVM_ASSIGN_PCI_DEVICE
1259 1261
1260Capability: KVM_CAP_DEVICE_ASSIGNMENT 1262Capability: none
1261Architectures: x86 ia64 1263Architectures: x86
1262Type: vm ioctl 1264Type: vm ioctl
1263Parameters: struct kvm_assigned_pci_dev (in) 1265Parameters: struct kvm_assigned_pci_dev (in)
1264Returns: 0 on success, -1 on error 1266Returns: 0 on success, -1 on error
@@ -1298,25 +1300,36 @@ Only PCI header type 0 devices with PCI BAR resources are supported by
1298device assignment. The user requesting this ioctl must have read/write 1300device assignment. The user requesting this ioctl must have read/write
1299access to the PCI sysfs resource files associated with the device. 1301access to the PCI sysfs resource files associated with the device.
1300 1302
1303Errors:
1304 ENOTTY: kernel does not support this ioctl
1305
1306 Other error conditions may be defined by individual device types or
1307 have their standard meanings.
1308
1301 1309
13024.49 KVM_DEASSIGN_PCI_DEVICE 13104.49 KVM_DEASSIGN_PCI_DEVICE
1303 1311
1304Capability: KVM_CAP_DEVICE_DEASSIGNMENT 1312Capability: none
1305Architectures: x86 ia64 1313Architectures: x86
1306Type: vm ioctl 1314Type: vm ioctl
1307Parameters: struct kvm_assigned_pci_dev (in) 1315Parameters: struct kvm_assigned_pci_dev (in)
1308Returns: 0 on success, -1 on error 1316Returns: 0 on success, -1 on error
1309 1317
1310Ends PCI device assignment, releasing all associated resources. 1318Ends PCI device assignment, releasing all associated resources.
1311 1319
1312See KVM_CAP_DEVICE_ASSIGNMENT for the data structure. Only assigned_dev_id is 1320See KVM_ASSIGN_PCI_DEVICE for the data structure. Only assigned_dev_id is
1313used in kvm_assigned_pci_dev to identify the device. 1321used in kvm_assigned_pci_dev to identify the device.
1314 1322
1323Errors:
1324 ENOTTY: kernel does not support this ioctl
1325
1326 Other error conditions may be defined by individual device types or
1327 have their standard meanings.
1315 1328
13164.50 KVM_ASSIGN_DEV_IRQ 13294.50 KVM_ASSIGN_DEV_IRQ
1317 1330
1318Capability: KVM_CAP_ASSIGN_DEV_IRQ 1331Capability: KVM_CAP_ASSIGN_DEV_IRQ
1319Architectures: x86 ia64 1332Architectures: x86
1320Type: vm ioctl 1333Type: vm ioctl
1321Parameters: struct kvm_assigned_irq (in) 1334Parameters: struct kvm_assigned_irq (in)
1322Returns: 0 on success, -1 on error 1335Returns: 0 on success, -1 on error
@@ -1346,11 +1359,17 @@ The following flags are defined:
1346It is not valid to specify multiple types per host or guest IRQ. However, the 1359It is not valid to specify multiple types per host or guest IRQ. However, the
1347IRQ type of host and guest can differ or can even be null. 1360IRQ type of host and guest can differ or can even be null.
1348 1361
1362Errors:
1363 ENOTTY: kernel does not support this ioctl
1364
1365 Other error conditions may be defined by individual device types or
1366 have their standard meanings.
1367
1349 1368
13504.51 KVM_DEASSIGN_DEV_IRQ 13694.51 KVM_DEASSIGN_DEV_IRQ
1351 1370
1352Capability: KVM_CAP_ASSIGN_DEV_IRQ 1371Capability: KVM_CAP_ASSIGN_DEV_IRQ
1353Architectures: x86 ia64 1372Architectures: x86
1354Type: vm ioctl 1373Type: vm ioctl
1355Parameters: struct kvm_assigned_irq (in) 1374Parameters: struct kvm_assigned_irq (in)
1356Returns: 0 on success, -1 on error 1375Returns: 0 on success, -1 on error
@@ -1365,7 +1384,7 @@ KVM_ASSIGN_DEV_IRQ. Partial deassignment of host or guest IRQ is allowed.
13654.52 KVM_SET_GSI_ROUTING 13844.52 KVM_SET_GSI_ROUTING
1366 1385
1367Capability: KVM_CAP_IRQ_ROUTING 1386Capability: KVM_CAP_IRQ_ROUTING
1368Architectures: x86 ia64 s390 1387Architectures: x86 s390
1369Type: vm ioctl 1388Type: vm ioctl
1370Parameters: struct kvm_irq_routing (in) 1389Parameters: struct kvm_irq_routing (in)
1371Returns: 0 on success, -1 on error 1390Returns: 0 on success, -1 on error
@@ -1423,8 +1442,8 @@ struct kvm_irq_routing_s390_adapter {
1423 1442
14244.53 KVM_ASSIGN_SET_MSIX_NR 14434.53 KVM_ASSIGN_SET_MSIX_NR
1425 1444
1426Capability: KVM_CAP_DEVICE_MSIX 1445Capability: none
1427Architectures: x86 ia64 1446Architectures: x86
1428Type: vm ioctl 1447Type: vm ioctl
1429Parameters: struct kvm_assigned_msix_nr (in) 1448Parameters: struct kvm_assigned_msix_nr (in)
1430Returns: 0 on success, -1 on error 1449Returns: 0 on success, -1 on error
@@ -1445,8 +1464,8 @@ struct kvm_assigned_msix_nr {
1445 1464
14464.54 KVM_ASSIGN_SET_MSIX_ENTRY 14654.54 KVM_ASSIGN_SET_MSIX_ENTRY
1447 1466
1448Capability: KVM_CAP_DEVICE_MSIX 1467Capability: none
1449Architectures: x86 ia64 1468Architectures: x86
1450Type: vm ioctl 1469Type: vm ioctl
1451Parameters: struct kvm_assigned_msix_entry (in) 1470Parameters: struct kvm_assigned_msix_entry (in)
1452Returns: 0 on success, -1 on error 1471Returns: 0 on success, -1 on error
@@ -1461,6 +1480,12 @@ struct kvm_assigned_msix_entry {
1461 __u16 padding[3]; 1480 __u16 padding[3];
1462}; 1481};
1463 1482
1483Errors:
1484 ENOTTY: kernel does not support this ioctl
1485
1486 Other error conditions may be defined by individual device types or
1487 have their standard meanings.
1488
1464 1489
14654.55 KVM_SET_TSC_KHZ 14904.55 KVM_SET_TSC_KHZ
1466 1491
@@ -2453,9 +2478,15 @@ return ENOEXEC for that vcpu.
2453Note that because some registers reflect machine topology, all vcpus 2478Note that because some registers reflect machine topology, all vcpus
2454should be created before this ioctl is invoked. 2479should be created before this ioctl is invoked.
2455 2480
2481Userspace can call this function multiple times for a given vcpu, including
2482after the vcpu has been run. This will reset the vcpu to its initial
2483state. All calls to this function after the initial call must use the same
2484target and same set of feature flags, otherwise EINVAL will be returned.
2485
2456Possible features: 2486Possible features:
2457 - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state. 2487 - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state.
2458 Depends on KVM_CAP_ARM_PSCI. 2488 Depends on KVM_CAP_ARM_PSCI. If not set, the CPU will be powered on
2489 and execute guest code when KVM_RUN is called.
2459 - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode. 2490 - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode.
2460 Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only). 2491 Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only).
2461 - KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 for the CPU. 2492 - KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 for the CPU.
@@ -2951,6 +2982,15 @@ HVC instruction based PSCI call from the vcpu. The 'type' field describes
2951the system-level event type. The 'flags' field describes architecture 2982the system-level event type. The 'flags' field describes architecture
2952specific flags for the system-level event. 2983specific flags for the system-level event.
2953 2984
2985Valid values for 'type' are:
2986 KVM_SYSTEM_EVENT_SHUTDOWN -- the guest has requested a shutdown of the
2987 VM. Userspace is not obliged to honour this, and if it does honour
2988 this does not need to destroy the VM synchronously (ie it may call
2989 KVM_RUN again before shutdown finally occurs).
2990 KVM_SYSTEM_EVENT_RESET -- the guest has requested a reset of the VM.
2991 As with SHUTDOWN, userspace can choose to ignore the request, or
2992 to schedule the reset to occur in the future and may call KVM_RUN again.
2993
2954 /* Fix the size of the union. */ 2994 /* Fix the size of the union. */
2955 char padding[256]; 2995 char padding[256];
2956 }; 2996 };
diff --git a/Documentation/virtual/kvm/devices/vm.txt b/Documentation/virtual/kvm/devices/vm.txt
index 0d16f96c0eac..d426fc87fe93 100644
--- a/Documentation/virtual/kvm/devices/vm.txt
+++ b/Documentation/virtual/kvm/devices/vm.txt
@@ -12,14 +12,14 @@ specific.
121. GROUP: KVM_S390_VM_MEM_CTRL 121. GROUP: KVM_S390_VM_MEM_CTRL
13Architectures: s390 13Architectures: s390
14 14
151.1. ATTRIBUTE: KVM_S390_VM_MEM_CTRL 151.1. ATTRIBUTE: KVM_S390_VM_MEM_ENABLE_CMMA
16Parameters: none 16Parameters: none
17Returns: -EBUSY if already a vcpus is defined, otherwise 0 17Returns: -EBUSY if a vcpu is already defined, otherwise 0
18 18
19Enables CMMA for the virtual machine 19Enables Collaborative Memory Management Assist (CMMA) for the virtual machine.
20 20
211.2. ATTRIBUTE: KVM_S390_VM_CLR_CMMA 211.2. ATTRIBUTE: KVM_S390_VM_MEM_CLR_CMMA
22Parameteres: none 22Parameters: none
23Returns: 0 23Returns: 0
24 24
25Clear the CMMA status for all guest pages, so any pages the guest marked 25Clear the CMMA status for all guest pages, so any pages the guest marked
diff --git a/Documentation/virtual/kvm/msr.txt b/Documentation/virtual/kvm/msr.txt
index 6d470ae7b073..2a71c8f29f68 100644
--- a/Documentation/virtual/kvm/msr.txt
+++ b/Documentation/virtual/kvm/msr.txt
@@ -168,7 +168,7 @@ MSR_KVM_ASYNC_PF_EN: 0x4b564d02
168 64 byte memory area which must be in guest RAM and must be 168 64 byte memory area which must be in guest RAM and must be
169 zeroed. Bits 5-2 are reserved and should be zero. Bit 0 is 1 169 zeroed. Bits 5-2 are reserved and should be zero. Bit 0 is 1
170 when asynchronous page faults are enabled on the vcpu 0 when 170 when asynchronous page faults are enabled on the vcpu 0 when
171 disabled. Bit 2 is 1 if asynchronous page faults can be injected 171 disabled. Bit 1 is 1 if asynchronous page faults can be injected
172 when vcpu is in cpl == 0. 172 when vcpu is in cpl == 0.
173 173
174 First 4 byte of 64 byte memory location will be written to by 174 First 4 byte of 64 byte memory location will be written to by
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt
index b64e0af9cc56..f2d3a100fe38 100644
--- a/Documentation/vm/hugetlbpage.txt
+++ b/Documentation/vm/hugetlbpage.txt
@@ -1,8 +1,8 @@
1 1
2The intent of this file is to give a brief summary of hugetlbpage support in 2The intent of this file is to give a brief summary of hugetlbpage support in
3the Linux kernel. This support is built on top of multiple page size support 3the Linux kernel. This support is built on top of multiple page size support
4that is provided by most modern architectures. For example, i386 4that is provided by most modern architectures. For example, x86 CPUs normally
5architecture supports 4K and 4M (2M in PAE mode) page sizes, ia64 5support 4K and 2M (1G if architecturally supported) page sizes, ia64
6architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M, 6architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M,
7256M and ppc64 supports 4K and 16M. A TLB is a cache of virtual-to-physical 7256M and ppc64 supports 4K and 16M. A TLB is a cache of virtual-to-physical
8translations. Typically this is a very scarce resource on processor. 8translations. Typically this is a very scarce resource on processor.
diff --git a/Documentation/vm/page_owner.txt b/Documentation/vm/page_owner.txt
new file mode 100644
index 000000000000..8f3ce9b3aa11
--- /dev/null
+++ b/Documentation/vm/page_owner.txt
@@ -0,0 +1,81 @@
1page owner: Tracking about who allocated each page
2-----------------------------------------------------------
3
4* Introduction
5
6page owner is for the tracking about who allocated each page.
7It can be used to debug memory leak or to find a memory hogger.
8When allocation happens, information about allocation such as call stack
9and order of pages is stored into certain storage for each page.
10When we need to know about status of all pages, we can get and analyze
11this information.
12
13Although we already have tracepoint for tracing page allocation/free,
14using it for analyzing who allocate each page is rather complex. We need
15to enlarge the trace buffer for preventing overlapping until userspace
16program launched. And, launched program continually dump out the trace
17buffer for later analysis and it would change system behviour with more
18possibility rather than just keeping it in memory, so bad for debugging.
19
20page owner can also be used for various purposes. For example, accurate
21fragmentation statistics can be obtained through gfp flag information of
22each page. It is already implemented and activated if page owner is
23enabled. Other usages are more than welcome.
24
25page owner is disabled in default. So, if you'd like to use it, you need
26to add "page_owner=on" into your boot cmdline. If the kernel is built
27with page owner and page owner is disabled in runtime due to no enabling
28boot option, runtime overhead is marginal. If disabled in runtime, it
29doesn't require memory to store owner information, so there is no runtime
30memory overhead. And, page owner inserts just two unlikely branches into
31the page allocator hotpath and if it returns false then allocation is
32done like as the kernel without page owner. These two unlikely branches
33would not affect to allocation performance. Following is the kernel's
34code size change due to this facility.
35
36- Without page owner
37 text data bss dec hex filename
38 40662 1493 644 42799 a72f mm/page_alloc.o
39
40- With page owner
41 text data bss dec hex filename
42 40892 1493 644 43029 a815 mm/page_alloc.o
43 1427 24 8 1459 5b3 mm/page_ext.o
44 2722 50 0 2772 ad4 mm/page_owner.o
45
46Although, roughly, 4 KB code is added in total, page_alloc.o increase by
47230 bytes and only half of it is in hotpath. Building the kernel with
48page owner and turning it on if needed would be great option to debug
49kernel memory problem.
50
51There is one notice that is caused by implementation detail. page owner
52stores information into the memory from struct page extension. This memory
53is initialized some time later than that page allocator starts in sparse
54memory system, so, until initialization, many pages can be allocated and
55they would have no owner information. To fix it up, these early allocated
56pages are investigated and marked as allocated in initialization phase.
57Although it doesn't mean that they have the right owner information,
58at least, we can tell whether the page is allocated or not,
59more accurately. On 2GB memory x86-64 VM box, 13343 early allocated pages
60are catched and marked, although they are mostly allocated from struct
61page extension feature. Anyway, after that, no page is left in
62un-tracking state.
63
64* Usage
65
661) Build user-space helper
67 cd tools/vm
68 make page_owner_sort
69
702) Enable page owner
71 Add "page_owner=on" to boot cmdline.
72
733) Do the job what you want to debug
74
754) Analyze information from page owner
76 cat /sys/kernel/debug/page_owner > page_owner_full.txt
77 grep -v ^PFN page_owner_full.txt > page_owner.txt
78 ./page_owner_sort page_owner.txt sorted_page_owner.txt
79
80 See the result about who allocated each page
81 in the sorted_page_owner.txt.
diff --git a/Documentation/x86/entry_64.txt b/Documentation/x86/entry_64.txt
index bc7226ef5055..4a1c5c2dc5a9 100644
--- a/Documentation/x86/entry_64.txt
+++ b/Documentation/x86/entry_64.txt
@@ -7,9 +7,12 @@ http://lkml.kernel.org/r/<20110529191055.GC9835%40elte.hu>
7The x86 architecture has quite a few different ways to jump into 7The x86 architecture has quite a few different ways to jump into
8kernel code. Most of these entry points are registered in 8kernel code. Most of these entry points are registered in
9arch/x86/kernel/traps.c and implemented in arch/x86/kernel/entry_64.S 9arch/x86/kernel/traps.c and implemented in arch/x86/kernel/entry_64.S
10and arch/x86/ia32/ia32entry.S. 10for 64-bit, arch/x86/kernel/entry_32.S for 32-bit and finally
11arch/x86/ia32/ia32entry.S which implements the 32-bit compatibility
12syscall entry points and thus provides for 32-bit processes the
13ability to execute syscalls when running on 64-bit kernels.
11 14
12The IDT vector assignments are listed in arch/x86/include/irq_vectors.h. 15The IDT vector assignments are listed in arch/x86/include/asm/irq_vectors.h.
13 16
14Some of these entries are: 17Some of these entries are:
15 18