- Jul 10, 2023
-
-
Caleb Connolly authored
Add the type-c connector and sbu-mux nodes and hook up the usb phy ports. The db845c can source 5v@1.5A vbus. TODO: figure out power-roles. In theory db845c is always power source, it doesn't actually run off vbus. However legacy cables (type-c -> type-a) will provide vbus regardless, need to ensure that TCPM can handle this.
-
Caleb Connolly authored
-
Caleb Connolly authored
pmi8998 doesn't support fast role swap
-
Caleb Connolly authored
-
Caleb Connolly authored
-
Caleb Connolly authored
-
Caleb Connolly authored
-
Caleb Connolly authored
-
Caleb Connolly authored
-
Caleb Connolly authored
-
Caleb Connolly authored
-
Caleb Connolly authored
Various minor improvements and hacking to try and make dwc3 work at all in gadget mode.
-
Caleb Connolly authored
pmi8998 is eager to disable it's legacy cable detection, make sure it's on and that we handle it properly, otherwise the type-c state machine gets a bit confused.
-
Caleb Connolly authored
The GENMASK() macro causes a compiler error if the lsb and msb are specified the wrong way around, however the format of regmap fields means that the mask isn't calculated until runtime. Use the GENMASK_INPUT_CHECK() macro to catch this for constant reg_fields. Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
The current method of cat-ing register file dumps the entire address space. One can use dd command to dump a subrange within the address space. However one needs to know the string length of each line which is derived from max address, the character length of each register entry and the format. Provide simple means to dump a range by allowing user to specify the start address and the count of registers. When the data is read convert the dump address to a starting position in the file. Similarly if the file offset goes beyond the dump range return 0 to indicate that the data is already dumped. Also provide means to write to a register address. CRs-Fixed: 1001770 Change-Id: I3466ce89007d127151f6760328edad116d679db8 Signed-off-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
-
Caleb Connolly authored
This reverts commit 4892c179.
-
Caleb Connolly authored
-
Caleb Connolly authored
Configure the type-c block and connector, enabling full type-c support, excluding DP alt mode. Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
The type-c port is intermingled with the charger register block, but is still encapsulated as its own function. Define it and the PDPHY. Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Add port definitions to the qmpphy and dwc3 controller for type-c. Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Hack in a current table for PMI8998 and use the "proper" status register to check if the regulator is enabled. Needed for type-c host mode support on PMI8998 to prevent the sink from triggering OCP by powering on too fast. Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
The lane select switch for USB typec orientation is within the USB QMP PHY. the current device. It could be connected through an endpoint, to an independent device handling the typec detection, ie the QCOM SPMI typec driver. bod: Fixed the logic qcom_qmp_phy_typec_switch_set() to disable phy on disconnect if and only if we have initialized the PHY. Retained CC orientation logic in qcom_qmp_phy_com_init() to simplify patch. bod: Ported from earlier version of driver to phy-qcom-qmp-combo.c Co-developed-by:
Wesley Cheng <wcheng@codeaurora.org> Signed-off-by:
Wesley Cheng <wcheng@codeaurora.org> Co-developed-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by:
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
-
Caleb Connolly authored
PMI8998 is a generation older than PM8150B, it has pretty much all of the same register fields, just in much more confusing places. Use the regmap_fields abstraction to enable support for type-c on this PMIC. Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Prepare for supporting additional platforms by migrating the driver to use regmap_fields, abstracting away platform specific behaviour. Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
There is a (presumably?) unnecessary register read here, drop it and simplify the function. Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
-
This commit adds a QCOM PMIC TCPM driver with an initial pm8150b block. The driver is layered as follows: qcom_pmic_typec.c : Responsible for registering with TCPM and arbitrates access to the Type-C and PDPHY hardware blocks in one place. This presents a single TCPM device to device to the Linux TCPM layer. qcom_pmic_typec_pdphy.c: Responsible for interfacing with the PDPHY hardware and processing power-delivery related calls from TCPM. This hardware binding can be extended to facilitate similar hardware in different PMICs. qcom_pmic_typec_port.c: Responsible for notifying and processing Type-C related calls from TCPM. Similar to the pdphy this layer can be extended to handle the specifics of different Qualcomm PMIC Type-C port managers. This code provides all of the same functionality as the existing qcom typec driver plus power-delivery as well. As a result commit 6c8cf369 ("usb: typec: Add QCOM PMIC typec detection driver") can be deleted entirely. References code from Jonathan Marek, Jack Pham, Wesley Cheng, Hemant Kumar, Guru Das Srinagesh and Ashay Jaiswal. Acked-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Reviewed-by:
Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
Switch on USB orientation-switching for usb_1_qmp via TCPM. Detecting the orientation switch is required to get the PHY to reset and bring-up the PHY with the CC lines set to the appropriate lane. Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
Switch on usb-role-switching for usb_1 via TCPM. We need to declare usb-role-switch in &usb_1 and associate with the remote-endpoint in TCPM which provides the necessary signal. Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
Switch on TCPM for the RB5. Here we declare as a source only not a sink since qrb5165 doesn't support powering exclusively from the type-c port. Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
Switch on VBUS for the Type-C port. We need to support a higher amperage than the bootloader set 2 Amps. Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
Type-C port management functionality lives inside of the PMIC block on pm8150b. The Type-C port management logic controls orientation detection, vbus/vconn sense and to send/receive Type-C Power Domain messages. Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org>
-
ports for orientation switching input and output. The individual board dts files will instantiate port@0 and port@1 depending on the supported feature-set. Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
Add the PMIC Type-C port driver to the list of devices. Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
Add a ports declaration which is optional containing two port@ declarations. port@0 to receive an orientation-switch message from the Type-C port or redriver port@1 to subsequently transmit the orientation-switch on once the PHY has finished doing its orientation turn-around. If ports is declared the input port port@0 is mandatory but the output port@1 is optional. Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
orientation-switch it the standard declaration to inform the Type-C mux layer that a remote-endpoint is capable of processing orientation change messages. Add as an optional since not all versions of the dp-phy currently support the orientation-switch. Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
The VBUS driver needs to know the regulator-min-microamp and regulator-max-microamp so they should both be marked as required. regulator.yaml defines those two dependencies so include regulator.yaml. We need to change from additionalProperties: false to unevaluatedProperties: false. Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
The regulator code needs to know the location of the register to write to to switch on/off. Right now we have a driver that does this, a yaml that partially describes it and no dts that uses it. Switching on the VBUS for sm8250 shows that we haven't documented reg as a required property, do so now. Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
- Jul 02, 2023
-
-
Caleb Connolly authored
Fix the sound-dai codec reference.
-