staging: typec: rt1711h typec driver and dt-bindings
Subsystems (3)
v5 cover staging: typec: rt1711h typec driver and dt-bindings
From: ShuFan Lee <[email protected]>
This patch series add rt1711h typec chip driver and dt-bindings
changelogs between v1 & v2
- use gpiod_* instead of gpio_*
changelogs between v2 & v3
- add dt-bindings for rt1711h typec driver
changelogs between v3 & v4
- add definition of RT1711H_VID and RT1711H_PID
- modify the way of using RT1711H_RTCTRL8_SET in rt1711h_set_vconn
changelogs between v4 & v5
- remove rt,intr-gpios in binding file and always use interrupts property
- remove parsing rt,intr-gpios and just use client->irq in rt1711h typec driver
ShuFan Lee (2):
staging: typec: rt1711h typec chip driver
dt-bindings: usb: rt1711h device tree binding document
.../devicetree/bindings/usb/richtek,rt1711h.txt | 17 ++ drivers/staging/typec/Kconfig | 8 + drivers/staging/typec/Makefile | 1 + drivers/staging/typec/tcpci.h | 1 + drivers/staging/typec/tcpci_rt1711h.c | 312 +++++++++++++++++++++ 5 files changed, 339 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/richtek,rt1711h.txt create mode 100644 drivers/staging/typec/tcpci_rt1711h.c
Signature · 1 line
1.9.1
PATCH v5 1/2 staging: typec: rt1711h typec chip driver
From: ShuFan Lee <[email protected]>
Richtek RT1711H Type-C chip driver that works with Type-C Port Controller Manager to provide USB PD and USB Type-C functionalities.
Add definition of TCPC_CC_STATUS_TOGGLING.
--- drivers/staging/typec/Kconfig | 8 + drivers/staging/typec/Makefile | 1 + drivers/staging/typec/tcpci.h | 1 + drivers/staging/typec/tcpci_rt1711h.c | 312 ++++++++++++++++++++++++++++++++++ 4 files changed, 322 insertions(+) create mode 100644 drivers/staging/typec/tcpci_rt1711h.c
changelogs between v1 & v2
- use gpiod_* instead of gpio_*
changelogs between v3 & v4
- add definition of RT1711H_VID and RT1711H_PID
- modify the way of using RT1711H_RTCTRL8_SET in rt1711h_set_vconn
changelogs between v4 & v5
- remove parsing rt,intr-gpios and just use client->irq parsed from interrupts property
drivers/staging/typec/Kconfig +8 -0
@@ -9,6 +9,14 @@ config TYPEC_TCPCI help Type-C Port Controller driver for TCPCI-compliant controller. +config TYPEC_RT1711H + tristate "Richtek RT1711H Type-C chip driver" + select TYPEC_TCPCI + help + Richtek RT1711H Type-C chip driver that works with + Type-C Port Controller Manager to provide USB PD and USB + Type-C functionalities. + endif endmenu
drivers/staging/typec/Makefile +1 -0
@@ -1 +1,2 @@ obj-$(CONFIG_TYPEC_TCPCI) += tcpci.o +obj-$(CONFIG_TYPEC_RT1711H) += tcpci_rt1711h.o
drivers/staging/typec/tcpci.h +1 -0
@@ -59,6 +59,7 @@#define TCPC_POWER_CTRL_VCONN_ENABLE BIT(0)#define TCPC_CC_STATUS 0x1d +#define TCPC_CC_STATUS_TOGGLING BIT(5)#define TCPC_CC_STATUS_TERM BIT(4)#define TCPC_CC_STATUS_CC2_SHIFT 2#define TCPC_CC_STATUS_CC2_MASK 0x3
drivers/staging/typec/tcpci_rt1711h.c new file +312 -0
312 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v5 2/2 dt-bindings: usb: rt1711h device tree binding document
In reply to ShuFan LeeFrom: ShuFan Lee <[email protected]>
Add device tree binding document for Richtek RT1711H Type-C chip driver
--- .../devicetree/bindings/usb/richtek,rt1711h.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/richtek,rt1711h.txt
changelogs between v2 & v3
- add dt-bindings for rt1711h typec driver
changelogs between v4 & v5
- remove rt,intr-gpios, always use interrupts property
Documentation/devicetree/bindings/usb/richtek,rt1711h.txt new file +17 -0
@@ -0,0 +1,17 @@ +Richtek RT1711H TypeC PD Controller. + +Required properties: + - compatible : Must be "richtek,rt1711h". + - reg : Must be 0x4e, it's slave address of RT1711H. + - interrupt-parent : the phandle for the interrupt controller that + provides interrupts for this device. + - interrupts : <a b> where a is the interrupt number and b represents an + encoding of the sense and level information for the interrupt. + +Example : +rt1711h@4e { + compatible = "richtek,rt1711h"; + reg = <0x4e>; + interrupt-parent = <&gpio26>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; +};
Signature · 1 line
1.9.1
Re: [PATCH v5 2/2] dt-bindings: usb: rt1711h device tree binding document
Quoted 9 lines · ShuFan Lee
From: ShuFan Lee <[email protected]>
Add device tree binding document for Richtek RT1711H Type-C chip driver
Signed-off-by ShuFan Lee <[email protected]>--- .../devicetree/bindings/usb/richtek,rt1711h.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/richtek,rt1711h.txt