Skip to content

Commit

Permalink
Merge tag 'char-misc-4.17-rc1' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/gregkh/char-misc

Pull char/misc updates from Greg KH:
 "Here is the big set of char/misc driver patches for 4.17-rc1.

  There are a lot of little things in here, nothing huge, but all
  important to the different hardware types involved:

   -  thunderbolt driver updates

   -  parport updates (people still care...)

   -  nvmem driver updates

   -  mei updates (as always)

   -  hwtracing driver updates

   -  hyperv driver updates

   -  extcon driver updates

   -  ... and a handful of even smaller driver subsystem and individual
      driver updates

  All of these have been in linux-next with no reported issues"

* tag 'char-misc-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (149 commits)
  hwtracing: Add HW tracing support menu
  intel_th: Add ACPI glue layer
  intel_th: Allow forcing host mode through drvdata
  intel_th: Pick up irq number from resources
  intel_th: Don't touch switch routing in host mode
  intel_th: Use correct method of finding hub
  intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate
  stm class: Make dummy's master/channel ranges configurable
  stm class: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate
  MAINTAINERS: Bestow upon myself the care for drivers/hwtracing
  hv: add SPDX license id to Kconfig
  hv: add SPDX license to trace
  Drivers: hv: vmbus: do not mark HV_PCIE as perf_device
  Drivers: hv: vmbus: respect what we get from hv_get_synint_state()
  /dev/mem: Avoid overwriting "err" in read_mem()
  eeprom: at24: use SPDX identifier instead of GPL boiler-plate
  eeprom: at24: simplify the i2c functionality checking
  eeprom: at24: fix a line break
  eeprom: at24: tweak newlines
  eeprom: at24: refactor at24_probe()
  ...
  • Loading branch information
torvalds committed Apr 5, 2018
2 parents 38047d5 + 86f690e commit 06dd3df
Show file tree
Hide file tree
Showing 141 changed files with 3,377 additions and 1,207 deletions.
7 changes: 7 additions & 0 deletions Documentation/ABI/stable/sysfs-bus-vmbus
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,10 @@ KernelVersion: 4.16
Contact: Stephen Hemminger <[email protected]>
Description: Monitor bit associated with channel
Users: Debugging tools and userspace drivers

What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/ring
Date: January. 2018
KernelVersion: 4.16
Contact: Stephen Hemminger <[email protected]>
Description: Binary file created by uio_hv_generic for ring buffer
Users: Userspace drivers
33 changes: 33 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-thunderbolt
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
What: /sys/bus/thunderbolt/devices/.../domainX/boot_acl
Date: Jun 2018
KernelVersion: 4.17
Contact: [email protected]
Description: Holds a comma separated list of device unique_ids that
are allowed to be connected automatically during system
startup (e.g boot devices). The list always contains
maximum supported number of unique_ids where unused
entries are empty. This allows the userspace software
to determine how many entries the controller supports.
If there are multiple controllers, each controller has
its own ACL list and size may be different between the
controllers.

System BIOS may have an option "Preboot ACL" or similar
that needs to be selected before this list is taken into
consideration.

Software always updates a full list in each write.

If a device is authorized automatically during boot its
boot attribute is set to 1.

What: /sys/bus/thunderbolt/devices/.../domainX/security
Date: Sep 2017
KernelVersion: 4.13
Expand All @@ -12,6 +35,9 @@ Description: This attribute holds current Thunderbolt security level
minimum. User needs to authorize each device.
dponly: Automatically tunnel Display port (and USB). No
PCIe tunnels are created.
usbonly: Automatically tunnel USB controller of the
connected Thunderbolt dock (and Display Port). All
PCIe links downstream of the dock are removed.

What: /sys/bus/thunderbolt/devices/.../authorized
Date: Sep 2017
Expand All @@ -38,6 +64,13 @@ Description: This attribute is used to authorize Thunderbolt devices
the device did not contain a key at all, and
EKEYREJECTED if the challenge response did not match.

What: /sys/bus/thunderbolt/devices/.../boot
Date: Jun 2018
KernelVersion: 4.17
Contact: [email protected]
Description: This attribute contains 1 if Thunderbolt device was already
authorized on boot and 0 otherwise.

What: /sys/bus/thunderbolt/devices/.../key
Date: Sep 2017
KernelVersion: 4.13
Expand Down
9 changes: 9 additions & 0 deletions Documentation/ABI/testing/sysfs-class-mei
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,12 @@ Contact: Tomas Winkler <[email protected]>
Description: Display the driver HBM protocol version.

The HBM protocol version supported by the driver.

What: /sys/class/mei/meiN/tx_queue_limit
Date: Jan 2018
KernelVersion: 4.16
Contact: Tomas Winkler <[email protected]>
Description: Configure tx queue limit

Set maximal number of pending writes
per opened session.
10 changes: 10 additions & 0 deletions Documentation/ABI/testing/sysfs-driver-fsi-master-gpio
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
What: /sys/bus/platform/devices/[..]/fsi-master-gpio/external_mode
Date: Feb 2018
KernelVersion: 4.17
Contact: [email protected]
Description:
Controls access arbitration for GPIO-based FSI master. A
value of 0 (the default) sets normal mode, where the
driver performs FSI bus transactions, 1 sets external mode,
where the FSI bus is driven externally (for example, by
a debug device).
15 changes: 10 additions & 5 deletions Documentation/admin-guide/thunderbolt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ vulnerable to DMA attacks.
Security levels and how to use them
-----------------------------------
Starting with Intel Falcon Ridge Thunderbolt controller there are 4
security levels available. The reason for these is the fact that the
connected devices can be DMA masters and thus read contents of the host
memory without CPU and OS knowing about it. There are ways to prevent
this by setting up an IOMMU but it is not always available for various
reasons.
security levels available. Intel Titan Ridge added one more security level
(usbonly). The reason for these is the fact that the connected devices can
be DMA masters and thus read contents of the host memory without CPU and OS
knowing about it. There are ways to prevent this by setting up an IOMMU but
it is not always available for various reasons.

The security levels are as follows:

Expand All @@ -52,6 +52,11 @@ The security levels are as follows:
USB. No PCIe tunneling is done. In BIOS settings this is
typically called *Display Port Only*.

usbonly
The firmware automatically creates tunnels for the USB controller and
Display Port in a dock. All PCIe links downstream of the dock are
removed.

The current security level can be read from
``/sys/bus/thunderbolt/devices/domainX/security`` where ``domainX`` is
the Thunderbolt domain the host controller manages. There is typically
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Samsung micro-USB 11-pin connector
==================================

Samsung micro-USB 11-pin connector is an extension of micro-USB connector.
It is present in multiple Samsung mobile devices.
It has additional pins to route MHL traffic simultanously with USB.

The bindings are superset of usb-connector bindings for micro-USB connector[1].

Required properties:
- compatible: must be: "samsung,usb-connector-11pin", "usb-b-connector",
- type: must be "micro".

Required nodes:
- any data bus to the connector should be modeled using the OF graph bindings
specified in bindings/graph.txt, unless the bus is between parent node and
the connector. Since single connector can have multpile data buses every bus
has assigned OF graph port number as follows:
0: High Speed (HS),
3: Mobile High-Definition Link (MHL), specific to 11-pin Samsung micro-USB.

[1]: bindings/connector/usb-connector.txt

Example
-------

Micro-USB connector with HS lines routed via controller (MUIC) and MHL lines
connected to HDMI-MHL bridge (sii8620):

muic-max77843@66 {
...
usb_con: connector {
compatible = "samsung,usb-connector-11pin", "usb-b-connector";
label = "micro-USB";
type = "micro";

ports {
#address-cells = <1>;
#size-cells = <0>;

port@3 {
reg = <3>;
usb_con_mhl: endpoint {
remote-endpoint = <&sii8620_mhl>;
};
};
};
};
};
75 changes: 75 additions & 0 deletions Documentation/devicetree/bindings/connector/usb-connector.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
USB Connector
=============

USB connector node represents physical USB connector. It should be
a child of USB interface controller.

Required properties:
- compatible: describes type of the connector, must be one of:
"usb-a-connector",
"usb-b-connector",
"usb-c-connector".

Optional properties:
- label: symbolic name for the connector,
- type: size of the connector, should be specified in case of USB-A, USB-B
non-fullsize connectors: "mini", "micro".

Required nodes:
- any data bus to the connector should be modeled using the OF graph bindings
specified in bindings/graph.txt, unless the bus is between parent node and
the connector. Since single connector can have multpile data buses every bus
has assigned OF graph port number as follows:
0: High Speed (HS), present in all connectors,
1: Super Speed (SS), present in SS capable connectors,
2: Sideband use (SBU), present in USB-C.

Examples
--------

1. Micro-USB connector with HS lines routed via controller (MUIC):

muic-max77843@66 {
...
usb_con: connector {
compatible = "usb-b-connector";
label = "micro-USB";
type = "micro";
};
};

2. USB-C connector attached to CC controller (s2mm005), HS lines routed
to companion PMIC (max77865), SS lines to USB3 PHY and SBU to DisplayPort.
DisplayPort video lines are routed to the connector via SS mux in USB3 PHY.

ccic: s2mm005@33 {
...
usb_con: connector {
compatible = "usb-c-connector";
label = "USB-C";

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
usb_con_hs: endpoint {
remote-endpoint = <&max77865_usbc_hs>;
};
};
port@1 {
reg = <1>;
usb_con_ss: endpoint {
remote-endpoint = <&usbdrd_phy_ss>;
};
};
port@2 {
reg = <2>;
usb_con_sbu: endpoint {
remote-endpoint = <&dp_aux>;
};
};
};
};
};
151 changes: 151 additions & 0 deletions Documentation/devicetree/bindings/fsi/fsi.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
FSI bus & engine generic device tree bindings
=============================================

The FSI bus is probe-able, so the OS is able to enumerate FSI slaves, and
engines within those slaves. However, we have a facility to match devicetree
nodes to probed engines. This allows for fsi engines to expose non-probeable
busses, which are then exposed by the device tree. For example, an FSI engine
that is an I2C master - the I2C bus can be described by the device tree under
the engine's device tree node.

FSI masters may require their own DT nodes (to describe the master HW itself);
that requirement is defined by the master's implementation, and is described by
the fsi-master-* binding specifications.

Under the masters' nodes, we can describe the bus topology using nodes to
represent the FSI slaves and their slave engines. As a basic outline:

fsi-master {
/* top-level of FSI bus topology, bound to an FSI master driver and
* exposes an FSI bus */

fsi-slave@<link,id> {
/* this node defines the FSI slave device, and is handled
* entirely with FSI core code */

fsi-slave-engine@<addr> {
/* this node defines the engine endpoint & address range, which
* is bound to the relevant fsi device driver */
...
};

fsi-slave-engine@<addr> {
...
};

};
};

Note that since the bus is probe-able, some (or all) of the topology may
not be described; this binding only provides an optional facility for
adding subordinate device tree nodes as children of FSI engines.

FSI masters
-----------

FSI master nodes declare themselves as such with the "fsi-master" compatible
value. It's likely that an implementation-specific compatible value will
be needed as well, for example:

compatible = "fsi-master-gpio", "fsi-master";

Since the master nodes describe the top-level of the FSI topology, they also
need to declare the FSI-standard addressing scheme. This requires two cells for
addresses (link index and slave ID), and no size:

#address-cells = <2>;
#size-cells = <0>;

An optional boolean property can be added to indicate that a particular master
should not scan for connected devices at initialization time. This is
necessary in cases where a scan could cause arbitration issues with other
masters that may be present on the bus.

no-scan-on-init;

FSI slaves
----------

Slaves are identified by a (link-index, slave-id) pair, so require two cells
for an address identifier. Since these are not a range, no size cells are
required. For an example, a slave on link 1, with ID 2, could be represented
as:

cfam@1,2 {
reg = <1 2>;
[...];
}

Each slave provides an address-space, under which the engines are accessible.
That address space has a maximum of 23 bits, so we use one cell to represent
addresses and sizes in the slave address space:

#address-cells = <1>;
#size-cells = <1>;


FSI engines (devices)
---------------------

Engines are identified by their address under the slaves' address spaces. We
use a single cell for address and size. Engine nodes represent the endpoint
FSI device, and are passed to those FSI device drivers' ->probe() functions.

For example, for a slave using a single 0x400-byte page starting at address
0xc00:

engine@c00 {
reg = <0xc00 0x400>;
};


Full example
------------

Here's an example that illustrates:
- an FSI master
- connected to an FSI slave
- that contains an engine that is an I2C master
- connected to an I2C EEPROM

The FSI master may be connected to additional slaves, and slaves may have
additional engines, but they don't necessarily need to be describe in the
device tree if no extra platform information is required.

/* The GPIO-based FSI master node, describing the top level of the
* FSI bus
*/
gpio-fsi {
compatible = "fsi-master-gpio", "fsi-master";
#address-cells = <2>;
#size-cells = <0>;

/* A FSI slave (aka. CFAM) at link 0, ID 0. */
cfam@0,0 {
reg = <0 0>;
#address-cells = <1>;
#size-cells = <1>;

/* FSI engine at 0xc00, using a single page. In this example,
* it's an I2C master controller, so subnodes describe the
* I2C bus.
*/
i2c-controller@c00 {
reg = <0xc00 0x400>;

/* Engine-specific data. In this case, we're describing an
* I2C bus, so we're conforming to the generic I2C binding
*/
compatible = "some-vendor,fsi-i2c-controller";
#address-cells = <1>;
#size-cells = <1>;

/* I2C endpoint device: an Atmel EEPROM */
eeprom@50 {
compatible = "atmel,24c256";
reg = <0x50>;
pagesize = <64>;
};
};
};
};
Loading

0 comments on commit 06dd3df

Please sign in to comment.