Merge tag 'devicetree-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Sep 2017 21:43:33 +0000 (14:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Sep 2017 21:43:33 +0000 (14:43 -0700)
Pull DeviceTree updates from Rob Herring:
 "There's a few orphans in the conversion to %pOF printf specifiers
  included here that no one else picked up.

  Summary:

   - Convert more DT code to use of_property_read_* API.

   - Improve DT overlay support when adding multiple overlays

   - Convert printk's to %pOF format specifiers. Most went via subsystem
     trees, but picked up the remaining orphans

   - Correct unittests to use preferred "okay" for "status" property
     value

   - Add a KASLR seed property

   - Vendor prefixes for Mellanox, Theobroma System, Adaptrum, Moxa

   - Fix modalias buffer handling

   - Clean-up of include paths for building dtbs

   - Add bindings for amc6821, isl1208, tsl2x7x, srf02, and srf10
     devices

   - Add nvmem bindings for MediaTek MT7623 and MT7622 SoC

   - Add compatible string for Allwinner H5 Mali-450 GPU

   - Fix links to old OpenFirmware docs with new mirror on
     devicetree.org

   - Remove status property from binding doc examples"

* tag 'devicetree-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (45 commits)
  devicetree: Adjust status "ok" -> "okay" under drivers/of/
  dt-bindings: Remove "status" from examples
  dt-bindings: pinctrl: sh-pfc: Use generic node name
  dt-bindings: Add vendor Mellanox
  dt-binding: net/phy: fix interrupts description
  virt: Convert to using %pOF instead of full_name
  macintosh: Convert to using %pOF instead of full_name
  ide: pmac: Convert to using %pOF instead of full_name
  microblaze: Convert to using %pOF instead of full_name
  dt-bindings: usb: musb: Grammar s/the/to/, s/is/are/
  of: Use PLATFORM_DEVID_NONE definition
  of/device: Fix of_device_get_modalias() buffer handling
  of/device: Prevent buffer overflow in of_device_modalias()
  dt-bindings: add amc6821, isl1208 trivial bindings
  dt-bindings: add vendor prefix for Theobroma Systems
  of: search scripts/dtc/include-prefixes path for both CPP and DTC
  of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP
  of: remove drivers/of/testcase-data from include search path for CPP
  of: return of_get_cpu_node from of_cpu_device_node_get if CPUs are not registered
  iio: srf08: add device tree binding for srf02 and srf10
  ...

24 files changed:
1  2 
Documentation/devicetree/bindings/crypto/inside-secure-safexcel.txt
Documentation/devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt
Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
Documentation/devicetree/bindings/mfd/da9052-i2c.txt
Documentation/devicetree/bindings/mmc/zx-dw-mshc.txt
Documentation/devicetree/bindings/net/brcm,amac.txt
Documentation/devicetree/bindings/net/marvell-pp2.txt
Documentation/devicetree/bindings/net/phy.txt
Documentation/devicetree/bindings/net/rockchip-dwmac.txt
Documentation/devicetree/bindings/phy/phy-mtk-tphy.txt
Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.txt
Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
Documentation/devicetree/bindings/ptp/brcm,ptp-dte.txt
Documentation/devicetree/bindings/sound/renesas,rsnd.txt
Documentation/devicetree/bindings/sound/rockchip,pdm.txt
Documentation/devicetree/bindings/spi/sh-msiof.txt
Documentation/devicetree/bindings/usb/keystone-usb.txt
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
Documentation/devicetree/bindings/vendor-prefixes.txt
drivers/of/device.c
drivers/of/irq.c
drivers/of/of_mdio.c
drivers/of/property.c

index 941bb6a6fb1304609bb3fa8a94520bfbdcca06f7,c08d5ad79b1f3bb89416cacc4f6872ed80b278ed..fbc07d12322f8020bc7a1ab282cd2eaffb587f9f
@@@ -23,5 -24,5 +23,4 @@@ Example
                interrupt-names = "mem", "ring0", "ring1", "ring2", "ring3",
                                  "eip";
                clocks = <&cpm_syscon0 1 26>;
-               status = "disabled";
 -              dma-mask = <0xff 0xffffffff>;
        };
index faf18084a33ad09411d0a17fdd7ac5d029eb3932,0000000000000000000000000000000000000000..41e09ed2ca70e2caaf7ee65b2f67651fba7bb9f4
mode 100644,000000..100644
--- /dev/null
@@@ -1,144 -1,0 +1,140 @@@
-       status = "okay";
 +MediaTek T-PHY binding
 +--------------------------
 +
 +T-phy controller supports physical layer functionality for a number of
 +controllers on MediaTek SoCs, such as, USB2.0, USB3.0, PCIe, and SATA.
 +
 +Required properties (controller (parent) node):
 + - compatible : should be one of
 +                "mediatek,generic-tphy-v1"
 +                "mediatek,generic-tphy-v2"
 +                "mediatek,mt2701-u3phy" (deprecated)
 +                "mediatek,mt2712-u3phy" (deprecated)
 +                "mediatek,mt8173-u3phy";
 +                make use of "mediatek,generic-tphy-v1" on mt2701 instead and
 +                "mediatek,generic-tphy-v2" on mt2712 instead.
 + - clocks     : (deprecated, use port's clocks instead) a list of phandle +
 +                clock-specifier pairs, one for each entry in clock-names
 + - clock-names        : (deprecated, use port's one instead) must contain
 +                "u3phya_ref": for reference clock of usb3.0 analog phy.
 +
 +Required nodes        : a sub-node is required for each port the controller
 +                provides. Address range information including the usual
 +                'reg' property is used inside these nodes to describe
 +                the controller's topology.
 +
 +Optional properties (controller (parent) node):
 + - reg                : offset and length of register shared by multiple ports,
 +                exclude port's private register. It is needed on mt2701
 +                and mt8173, but not on mt2712.
 +
 +Required properties (port (child) node):
 +- reg         : address and length of the register set for the port.
 +- clocks      : a list of phandle + clock-specifier pairs, one for each
 +                entry in clock-names
 +- clock-names : must contain
 +                "ref": 48M reference clock for HighSpeed analog phy; and 26M
 +                      reference clock for SuperSpeed analog phy, sometimes is
 +                      24M, 25M or 27M, depended on platform.
 +- #phy-cells  : should be 1 (See second example)
 +                cell after port phandle is phy type from:
 +                      - PHY_TYPE_USB2
 +                      - PHY_TYPE_USB3
 +                      - PHY_TYPE_PCIE
 +                      - PHY_TYPE_SATA
 +
 +Example:
 +
 +u3phy: usb-phy@11290000 {
 +      compatible = "mediatek,mt8173-u3phy";
 +      reg = <0 0x11290000 0 0x800>;
 +      #address-cells = <2>;
 +      #size-cells = <2>;
 +      ranges;
-               status = "okay";
 +
 +      u2port0: usb-phy@11290800 {
 +              reg = <0 0x11290800 0 0x100>;
 +              clocks = <&apmixedsys CLK_APMIXED_REF2USB_TX>;
 +              clock-names = "ref";
 +              #phy-cells = <1>;
-               status = "okay";
 +      };
 +
 +      u3port0: usb-phy@11290900 {
 +              reg = <0 0x11290800 0 0x700>;
 +              clocks = <&clk26m>;
 +              clock-names = "ref";
 +              #phy-cells = <1>;
-               status = "okay";
 +      };
 +
 +      u2port1: usb-phy@11291000 {
 +              reg = <0 0x11291000 0 0x100>;
 +              clocks = <&apmixedsys CLK_APMIXED_REF2USB_TX>;
 +              clock-names = "ref";
 +              #phy-cells = <1>;
 +      };
 +};
 +
 +Specifying phy control of devices
 +---------------------------------
 +
 +Device nodes should specify the configuration required in their "phys"
 +property, containing a phandle to the phy port node and a device type;
 +phy-names for each port are optional.
 +
 +Example:
 +
 +#include <dt-bindings/phy/phy.h>
 +
 +usb30: usb@11270000 {
 +      ...
 +      phys = <&u2port0 PHY_TYPE_USB2>, <&u3port0 PHY_TYPE_USB3>;
 +      phy-names = "usb2-0", "usb3-0";
 +      ...
 +};
 +
 +
 +Layout differences of banks between mt8173/mt2701 and mt2712
 +-------------------------------------------------------------
 +mt8173 and mt2701:
 +port        offset    bank
 +shared      0x0000    SPLLC
 +            0x0100    FMREG
 +u2 port0    0x0800    U2PHY_COM
 +u3 port0    0x0900    U3PHYD
 +            0x0a00    U3PHYD_BANK2
 +            0x0b00    U3PHYA
 +            0x0c00    U3PHYA_DA
 +u2 port1    0x1000    U2PHY_COM
 +u3 port1    0x1100    U3PHYD
 +            0x1200    U3PHYD_BANK2
 +            0x1300    U3PHYA
 +            0x1400    U3PHYA_DA
 +u2 port2    0x1800    U2PHY_COM
 +            ...
 +
 +mt2712:
 +port        offset    bank
 +u2 port0    0x0000    MISC
 +            0x0100    FMREG
 +            0x0300    U2PHY_COM
 +u3 port0    0x0700    SPLLC
 +            0x0800    CHIP
 +            0x0900    U3PHYD
 +            0x0a00    U3PHYD_BANK2
 +            0x0b00    U3PHYA
 +            0x0c00    U3PHYA_DA
 +u2 port1    0x1000    MISC
 +            0x1100    FMREG
 +            0x1300    U2PHY_COM
 +u3 port1    0x1700    SPLLC
 +            0x1800    CHIP
 +            0x1900    U3PHYD
 +            0x1a00    U3PHYD_BANK2
 +            0x1b00    U3PHYA
 +            0x1c00    U3PHYA_DA
 +u2 port2    0x2000    MISC
 +            ...
 +
 +    SPLLC shared by u3 ports and FMREG shared by u2 ports on
 +mt8173/mt2701 are put back into each port; a new bank MISC for
 +u2 ports and CHIP for u3 ports are added on mt2712.
index 7c04e22a5d6af016fe8198d2d6d955011abc2173,16e3389c8118ad59c31f469d364c0e2babafb60e..6b1075ee8a3025f58c0609da564521afbec70ff7
@@@ -13,8 -6,7 +13,7 @@@ Required properties
  
  Example:
  
 -ptp_dte: ptp_dte@180af650 {
 -      compatible = "brcm,ptp-dte";
 +ptp: ptp-dte@180af650 {
 +      compatible = "brcm,iproc-ptp-dte", "brcm,ptp-dte";
        reg = <0x180af650 0x10>;
-       status = "okay";
  };
index 2ad66f649a28fabed59c28e518a3b68f6d7c2973,beb32ca26e5d476661090b1c7574367d312c794c..47f164fbd1d72f80f8caedb7e6d62ad991351897
@@@ -33,10 -34,5 +33,9 @@@ pdm: pdm@ff040000 
                     &pdmm0_sdi1
                     &pdmm0_sdi2
                     &pdmm0_sdi3>;
 -      pinctrl-1 = <&pdmm0_sleep>;
 +      pinctrl-1 = <&pdmm0_clk_sleep
 +                   &pdmm0_sdi0_sleep
 +                   &pdmm0_sdi1_sleep
 +                   &pdmm0_sdi2_sleep
 +                   &pdmm0_sdi3_sleep>;
-       status = "disabled";
  };
index 838ae48eafc159fe28f9cf4cc589a4db979f9881,0000000000000000000000000000000000000000..49f54767cd214e8d6d4ada2dcd1e133aa6ede4cc
mode 100644,000000..100644
--- /dev/null
@@@ -1,91 -1,0 +1,89 @@@
-       status = "disabled";
 +The device node for Mediatek USB3.0 DRD controller
 +
 +Required properties:
 + - compatible : should be "mediatek,<soc-model>-mtu3", "mediatek,mtu3",
 +      soc-model is the name of SoC, such as mt8173, mt2712 etc,
 +      when using "mediatek,mtu3" compatible string, you need SoC specific
 +      ones in addition, one of:
 +      - "mediatek,mt8173-mtu3"
 + - reg : specifies physical base address and size of the registers
 + - reg-names: should be "mac" for device IP and "ippc" for IP port control
 + - interrupts : interrupt used by the device IP
 + - power-domains : a phandle to USB power domain node to control USB's
 +      mtcmos
 + - vusb33-supply : regulator of USB avdd3.3v
 + - clocks : a list of phandle + clock-specifier pairs, one for each
 +      entry in clock-names
 + - clock-names : must contain "sys_ck" and "ref_ck" for clock of controller;
 +      "wakeup_deb_p0" and "wakeup_deb_p1" are optional, they are
 +      depends on "mediatek,enable-wakeup"
 + - phys : a list of phandle + phy specifier pairs
 + - dr_mode : should be one of "host", "peripheral" or "otg",
 +      refer to usb/generic.txt
 +
 +Optional properties:
 + - #address-cells, #size-cells : should be '2' if the device has sub-nodes
 +      with 'reg' property
 + - ranges : allows valid 1:1 translation between child's address space and
 +      parent's address space
 + - extcon : external connector for vbus and idpin changes detection, needed
 +      when supports dual-role mode.
 + - vbus-supply : reference to the VBUS regulator, needed when supports
 +      dual-role mode.
 + - pinctl-names : a pinctrl state named "default" must be defined,
 +      "id_float" and "id_ground" are optinal which depends on
 +      "mediatek,enable-manual-drd"
 + - pinctrl-0 : pin control group
 +      See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
 +
 + - maximum-speed : valid arguments are "super-speed", "high-speed" and
 +      "full-speed"; refer to usb/generic.txt
 + - enable-manual-drd : supports manual dual-role switch via debugfs; usually
 +      used when receptacle is TYPE-A and also wants to support dual-role
 +      mode.
 + - mediatek,enable-wakeup : supports ip sleep wakeup used by host mode
 + - mediatek,syscon-wakeup : phandle to syscon used to access USB wakeup
 +      control register, it depends on "mediatek,enable-wakeup".
 +
 +Sub-nodes:
 +The xhci should be added as subnode to mtu3 as shown in the following example
 +if host mode is enabled. The DT binding details of xhci can be found in:
 +Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
 +
 +Example:
 +ssusb: usb@11271000 {
 +      compatible = "mediatek,mt8173-mtu3";
 +      reg = <0 0x11271000 0 0x3000>,
 +            <0 0x11280700 0 0x0100>;
 +      reg-names = "mac", "ippc";
 +      interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_LOW>;
 +      phys = <&phy_port0 PHY_TYPE_USB3>,
 +             <&phy_port1 PHY_TYPE_USB2>;
 +      power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
 +      clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>,
 +               <&pericfg CLK_PERI_USB0>,
 +               <&pericfg CLK_PERI_USB1>;
 +      clock-names = "sys_ck", "ref_ck",
 +                    "wakeup_deb_p0",
 +                    "wakeup_deb_p1";
 +      vusb33-supply = <&mt6397_vusb_reg>;
 +      vbus-supply = <&usb_p0_vbus>;
 +      extcon = <&extcon_usb>;
 +      dr_mode = "otg";
 +      mediatek,enable-wakeup;
 +      mediatek,syscon-wakeup = <&pericfg>;
 +      #address-cells = <2>;
 +      #size-cells = <2>;
 +      ranges;
-               status = "disabled";
 +
 +      usb_host: xhci@11270000 {
 +              compatible = "mediatek,mt8173-xhci";
 +              reg = <0 0x11270000 0 0x1000>;
 +              reg-names = "mac";
 +              interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
 +              power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
 +              clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>;
 +              clock-names = "sys_ck", "ref_ck";
 +              vusb33-supply = <&mt6397_vusb_reg>;
 +      };
 +};
Simple merge
Simple merge
Simple merge
index ed9c3827fad2c32d0ebccb34943177f7c0189ec6,9eb45f69db2fe0b68fa952b1c9289f28f28e9510..fbb72116e9d456b8a08672391de9e2cc144ed171
@@@ -943,10 -897,10 +942,10 @@@ of_fwnode_graph_get_next_endpoint(cons
  }
  
  static struct fwnode_handle *
 -of_fwnode_graph_get_remote_endpoint(struct fwnode_handle *fwnode)
 +of_fwnode_graph_get_remote_endpoint(const struct fwnode_handle *fwnode)
  {
-       return of_fwnode_handle(of_parse_phandle(to_of_node(fwnode),
-                                                "remote-endpoint", 0));
+       return of_fwnode_handle(
+               of_graph_get_remote_endpoint(to_of_node(fwnode)));
  }
  
  static struct fwnode_handle *