Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: connector: Add sink properties to comply with PD 3.1 spec

Add additional properties for ports supporting sink mode. The properties
define certain hardware and electrical properties such as sink load
step, sink load characteristics, sink compliance and charging adapter
Power Delivery Profile (PDP) for the connector. These properties need to
be defined for a Type-C port in compliance with the PD 3.1 spec.

Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20260223-skedb-v2-1-60675765bc7e@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Amit Sunil Dhamne and committed by
Greg Kroah-Hartman
ef22555f d6a093c3

+56
+34
Documentation/devicetree/bindings/connector/usb-connector.yaml
··· 300 300 $ref: /schemas/types.yaml#/definitions/uint8-array 301 301 maxItems: 4 302 302 303 + sink-load-step: 304 + description: Indicates the preferred load step slew rate in mA/usec for 305 + the port (in sink mode). This property is defined in "6.5.13.7" of 306 + "USB Power Delivery Specification Revision 3.1 Version 1.8". 307 + $ref: /schemas/types.yaml#/definitions/uint32 308 + enum: [150, 500] 309 + default: 150 310 + 311 + sink-load-characteristics: 312 + description: Indicates the port's (in sink mode) preferred load 313 + characteristics. Users can leverage SINK_LOAD_CHAR() defined in 314 + dt-bindings/usb/pd.h to populate this field. This property is defined in 315 + "6.5.13.8" of "USB Power Delivery Specification Revision 3.1 Version 1.8". 316 + $ref: /schemas/types.yaml#/definitions/uint16 317 + 318 + sink-compliance: 319 + description: Represents the types of sources the sink device has been tested 320 + and certified with. This property is defined in "6.5.13.9" of 321 + "USB Power Delivery Specification Revision 3.1 Version 1.8" 322 + Bit 0 when set indicates it has been tested on LPS compliant source 323 + Bit 1 when set indicates it has been tested on PS1 compliant source 324 + Bit 2 when set indicates it has been tested on PS2 compliant source 325 + $ref: /schemas/types.yaml#/definitions/uint8 326 + maximum: 7 327 + 328 + charging-adapter-pdp-milliwatt: 329 + description: This corresponds to the Power Delivery Profile rating of the 330 + charging adapter shipped or recommended for use with the connector port. 331 + This property is a requirement to infer the USB PD property 332 + "SPR Sink Operational PDP" given in "6.5.13.14" of 333 + "USB Power Delivery Specification Revision 3.1 Version 1.8". 334 + minimum: 0 335 + maximum: 100000 336 + 303 337 dependencies: 304 338 sink-vdos-v1: [ sink-vdos ] 305 339 sink-vdos: [ sink-vdos-v1 ]
+4
Documentation/devicetree/bindings/usb/maxim,max33359.yaml
··· 75 75 PDO_FIXED(9000, 2000, 0)>; 76 76 sink-bc12-completion-time-ms = <500>; 77 77 pd-revision = /bits/ 8 <0x03 0x01 0x01 0x08>; 78 + sink-load-step = <150>; 79 + sink-load-characteristics = /bits/ 16 <SINK_LOAD_CHAR(0, 1, 1, 2)>; 80 + sink-compliance = /bits/ 8 <(COMPLIANCE_LPS | COMPLIANCE_PS1)>; 81 + charging-adapter-pdp-milliwatt = <18000>; 78 82 }; 79 83 }; 80 84 };
+18
include/dt-bindings/usb/pd.h
··· 465 465 | ((vbm) & 0x3) << 15 | (curr) << 14 | ((vbi) & 0x3f) << 7 \ 466 466 | ((gi) & 0x3f) << 1 | (ct)) 467 467 468 + /* 469 + * Sink Load Characteristics 470 + * ------------------------- 471 + * <15> :: Can tolerate vbus voltage droop 472 + * <11:14> :: Duty cycle in 5% increments when bits 4:0 are non-zero 473 + * <10:5> :: Overload period in 20ms when bits 4:0 are non-zero 474 + * <4:0> :: Percent overload in 10% increments. Values higher than 25 are 475 + * clipped to 250% 476 + */ 477 + #define SINK_LOAD_CHAR(vdroop, duty_cycle, period, percent_ol) \ 478 + (((vdroop) & 0x1) << 15 | ((duty_cycle) & 0xf) << 11 | \ 479 + ((period) & 0x3f) << 5 | ((percent_ol) & 0x1f)) 480 + 481 + /* Compliance */ 482 + #define COMPLIANCE_LPS (1 << 0) 483 + #define COMPLIANCE_PS1 (1 << 1) 484 + #define COMPLIANCE_PS2 (1 << 2) 485 + 468 486 #endif /* __DT_POWER_DELIVERY_H */