From: Andrzej Hajda <hidden> Date: 2018-02-21 08:56:14
Hi,
Thanks for reviews of previous iterations.
This patchset introduces USB physical connector bindings, together with
working example.
I have removed RFC prefix - the patchset seems to be heading
to a happy end :)
v4: improved binding descriptions, added missing reg in dts.
v3: Separate binding for Samsung 11-pin connector, added full-blown USB-C
example.
v2: I have addressed comments by Rob and Laurent, thanks
Changes in datail are described in the patches.
Regards
Andrzej
Andrzej Hajda (5):
dt-bindings: add bindings for USB physical connector
dt-bindings: add bindings for Samsung micro-USB 11-pin connector
arm64: dts: exynos: add micro-USB connector node to TM2 platforms
arm64: dts: exynos: add OF graph between MHL and USB connector
extcon: add possibility to get extcon device by OF node
Maciej Purski (1):
drm/bridge/sii8620: use micro-USB cable detection logic to detect MHL
.../connector/samsung,usb-connector-11pin.txt | 49 +++++++++++
.../bindings/connector/usb-connector.txt | 75 +++++++++++++++++
.../boot/dts/exynos/exynos5433-tm2-common.dtsi | 39 ++++++++-
drivers/extcon/extcon.c | 44 +++++++---
drivers/gpu/drm/bridge/sil-sii8620.c | 97 +++++++++++++++++++++-
include/linux/extcon.h | 6 ++
6 files changed, 294 insertions(+), 16 deletions(-)
create mode 100644 Documentation/devicetree/bindings/connector/samsung,usb-connector-11pin.txt
create mode 100644 Documentation/devicetree/bindings/connector/usb-connector.txt
--
2.16.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
From: Andrzej Hajda <hidden> Date: 2018-02-21 08:56:11
These bindings allow to describe most known standard USB connectors
and it should be possible to extend it if necessary.
USB connectors, beside USB can be used to route other protocols,
for example UART, Audio, MHL. In such case every device passing data
through the connector should have appropriate graph bindings.
Signed-off-by: Andrzej Hajda <redacted>
---
v4:
- improved 'type' description (Rob),
- improved description of 2nd example (Rob).
v3:
- removed MHL port (samsung connector will have separate bindings),
- added 2nd example for USB-C,
- improved formatting.
v2:
- moved connector type(A,B,C) to compatible string (Rob),
- renamed size property to type (Rob),
- changed type description to be less confusing (Laurent),
- removed vendor specific compatibles (implied by graph port number),
- added requirement of connector being a child of IC (Rob),
- removed max-mode (subtly suggested by Rob, it should be detected anyway
by USB Controller in runtime, downside is that device is not able to
report its real capabilities, maybe better would be to make it optional(?)),
- assigned port numbers to data buses (Rob).
Regards
Andrzej
---
.../bindings/connector/usb-connector.txt | 75 ++++++++++++++++++++++
1 file changed, 75 insertions(+)
create mode 100644 Documentation/devicetree/bindings/connector/usb-connector.txt
@@ -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>;+ };+ };+ };+ };+};
--
2.16.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
@@ -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>;+ };+ };+ };+ };+};
--
2.16.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
From: Andrzej Hajda <hidden> Date: 2018-02-21 08:56:18
Since USB connector bindings are available we can describe it on TM2(e).
Signed-off-by: Andrzej Hajda <redacted>
---
arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
From: Andrzej Hajda <hidden> Date: 2018-02-21 08:57:09
From: Maciej Purski <redacted>
Currently MHL chip must be turned on permanently to detect MHL cable. It
duplicates micro-USB controller's (MUIC) functionality and consumes
unnecessary power. Lets use extcon attached to MUIC to enable MHL chip
only if it detects MHL cable.
Signed-off-by: Maciej Purski <redacted>
Signed-off-by: Andrzej Hajda <redacted>
---
This is rework of the patch by Maciej with following changes:
- use micro-USB port bindings to get extcon, instead of extcon property,
- fixed remove sequence,
- fixed extcon get state logic.
Code finding extcon node is hacky IMO, I guess ultimately it should be done
via some framework (maybe even extcon), or at least via helper, I hope it
can stay as is until the proper solution will be merged.
Signed-off-by: Andrzej Hajda <redacted>
---
drivers/gpu/drm/bridge/sil-sii8620.c | 97 ++++++++++++++++++++++++++++++++++--
1 file changed, 94 insertions(+), 3 deletions(-)
From: Andrzej Hajda <hidden> Date: 2018-02-21 08:57:37
Since extcon property is not allowed in DT, extcon subsystem requires
another way to get extcon device. Lets try the simplest approach - get
edev by of_node.
Signed-off-by: Andrzej Hajda <redacted>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
---
v2: changed label to follow local convention (Chanwoo)
---
drivers/extcon/extcon.c | 44 ++++++++++++++++++++++++++++++++++----------
include/linux/extcon.h | 6 ++++++
2 files changed, 40 insertions(+), 10 deletions(-)
From: Andrzej Hajda <hidden> Date: 2018-02-21 08:58:12
OF graph describes MHL data lanes between MHL and respective USB
connector.
Signed-off-by: Andrzej Hajda <redacted>
---
v4:
- added missing reg property in connector's port node (Krzysztof)
---
.../boot/dts/exynos/exynos5433-tm2-common.dtsi | 32 ++++++++++++++++++++--
1 file changed, 29 insertions(+), 3 deletions(-)
From: Andy Shevchenko <hidden> Date: 2018-02-21 14:27:15
On Wed, Feb 21, 2018 at 10:55 AM, Andrzej Hajda [off-list ref] wrote:
Since extcon property is not allowed in DT, extcon subsystem requires
another way to get extcon device. Lets try the simplest approach - get
edev by of_node.
+/*
+ * extcon_get_edev_by_of_node - Get the extcon device from devicetree.
+ * @node : OF node identyfying edev
+ *
+ * Return the pointer of extcon device if success or ERR_PTR(err) if fail.
+ */
+struct extcon_dev *extcon_get_edev_by_of_node(struct device_node *node)
First of all, the all other similar cases use "_by_node" in the name.
Second, it's not _get_, it's _find_.
See good example in i2c-core-of.c
of_find_i2c_adapter_by_node()
of_get_i2c_adapter_by_node()
--
With Best Regards,
Andy Shevchenko
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
From: Andrzej Hajda <hidden> Date: 2018-02-21 15:54:55
On 21.02.2018 15:27, Andy Shevchenko wrote:
On Wed, Feb 21, 2018 at 10:55 AM, Andrzej Hajda [off-list ref] wrote:
quoted
Since extcon property is not allowed in DT, extcon subsystem requires
another way to get extcon device. Lets try the simplest approach - get
edev by of_node.
+/*
+ * extcon_get_edev_by_of_node - Get the extcon device from devicetree.
+ * @node : OF node identyfying edev
+ *
+ * Return the pointer of extcon device if success or ERR_PTR(err) if fail.
+ */
+struct extcon_dev *extcon_get_edev_by_of_node(struct device_node *node)
First of all, the all other similar cases use "_by_node" in the name.
OK, looks better.
Second, it's not _get_, it's _find_.
The patch splits exisiting extcon_get_edev_by_phandle function into two
functions, nothing more.
Thus it followed naming convention present in extcon framework. I can
switch it of course to _find_.
There is no special extcon bus, so I am not sure. Anyway if it can, it
should be done probably in another patch.
Regards
Andrzej
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
FATAL ERROR: Unable to parse input tree
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2018-02-26 15:30:06
On Wed, Feb 21, 2018 at 9:55 AM, Andrzej Hajda [off-list ref] wrote:
OF graph describes MHL data lanes between MHL and respective USB
connector.
Signed-off-by: Andrzej Hajda <redacted>
---
v4:
- added missing reg property in connector's port node (Krzysztof)
---
.../boot/dts/exynos/exynos5433-tm2-common.dtsi | 32 ++++++++++++++++++++--
1 file changed, 29 insertions(+), 3 deletions(-)
You have a duplicated '};' so kbuild complains so I assume there will
be next iteration of this. Beside that I am okay with both, so I will
take next version when your bindings and driver changes get
acked/accepted.
Best Regards,
Krzysztof
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
From: Andrzej Hajda <hidden> Date: 2018-02-27 07:06:40
On 26.02.2018 16:21, Krzysztof Kozlowski wrote:
On Wed, Feb 21, 2018 at 9:55 AM, Andrzej Hajda [off-list ref] wrote:
quoted
OF graph describes MHL data lanes between MHL and respective USB
connector.
Signed-off-by: Andrzej Hajda <redacted>
---
v4:
- added missing reg property in connector's port node (Krzysztof)
---
.../boot/dts/exynos/exynos5433-tm2-common.dtsi | 32 ++++++++++++++++++++--
1 file changed, 29 insertions(+), 3 deletions(-)
You have a duplicated '};' so kbuild complains so I assume there will
be next iteration of this. Beside that I am okay with both, so I will
take next version when your bindings and driver changes get
acked/accepted.
Yes, test robot already reported it, thanks for looking at it.
I have postponed next iteration in case anything new is spotted, but
since it is calm I will send it in few minutes.
Regards
Andrzej
Best Regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Rob Herring <robh+dt@kernel.org> Date: 2018-02-27 21:24:58
On Wed, Feb 21, 2018 at 2:55 AM, Andrzej Hajda [off-list ref] wrote:
quoted hunk
OF graph describes MHL data lanes between MHL and respective USB
connector.
Signed-off-by: Andrzej Hajda <redacted>
---
v4:
- added missing reg property in connector's port node (Krzysztof)
---
.../boot/dts/exynos/exynos5433-tm2-common.dtsi | 32 ++++++++++++++++++++--
1 file changed, 29 insertions(+), 3 deletions(-)
These ports are mutually exclusive, right? If so, it should be 1 port
with 2 endpoints. Ports should represent independent data flows.
Something muxed or replicated (1 to many connection) should be be
endpoints.
Rob
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
From: Andrzej Hajda <hidden> Date: 2018-02-28 06:39:44
On 27.02.2018 22:24, Rob Herring wrote:
On Wed, Feb 21, 2018 at 2:55 AM, Andrzej Hajda [off-list ref] wrote:
quoted
OF graph describes MHL data lanes between MHL and respective USB
connector.
Signed-off-by: Andrzej Hajda <redacted>
---
v4:
- added missing reg property in connector's port node (Krzysztof)
---
.../boot/dts/exynos/exynos5433-tm2-common.dtsi | 32 ++++++++++++++++++++--
1 file changed, 29 insertions(+), 3 deletions(-)
These ports are mutually exclusive, right? If so, it should be 1 port
with 2 endpoints. Ports should represent independent data flows.
Something muxed or replicated (1 to many connection) should be be
endpoints.
No, this is HDMI -> MHL bridge, so port 0 is HDMI input, and port 1 is
MHL output.
Regards
Andrzej