Message ID | 20230130042003.577063-1-quic_bjorande@quicinc.com |
---|---|
Headers | show |
Series | soc: qcom: Introduce PMIC GLINK | expand |
On 30/01/2023 05:20, Bjorn Andersson wrote: > From: Bjorn Andersson <bjorn.andersson@linaro.org> > > The PMIC GLINK service runs on one of the co-processors of some modern > Qualcomm platforms and implements USB-C and battery managements. It uses > a message based protocol over GLINK for communication with the OS, hence > the name. > > The driver implemented provides the rpmsg device for communication and > uses auxiliary bus to spawn off individual devices in respective > subsystem. The auxiliary devices are spawned off from a > platform_device, so that the drm_bridge is available early, to allow the > DisplayPort driver to probe even before the remoteproc has spun up. > > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org> # SM8350 PDX215 > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > --- > > Changes since v2: > - None > > drivers/soc/qcom/Kconfig | 15 ++ > drivers/soc/qcom/Makefile | 1 + > drivers/soc/qcom/pmic_glink.c | 336 ++++++++++++++++++++++++++++ > include/linux/soc/qcom/pmic_glink.h | 32 +++ > 4 files changed, 384 insertions(+) > create mode 100644 drivers/soc/qcom/pmic_glink.c > create mode 100644 include/linux/soc/qcom/pmic_glink.h > <snip> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-MTP & SM8450-HDK
On 30/01/2023 05:20, Bjorn Andersson wrote: > From: Bjorn Andersson <bjorn.andersson@linaro.org> > > With the PMIC GLINK service, the host OS subscribes to USB-C altmode > messages, which are sent by the firmware to notify the host OS about > state updates and HPD interrupts. > > The pmic_glink_altmode driver registers for these notifications and > propagates the notifications as typec_mux, typec_switch and DRM OOB > notifications as necessary to implement DisplayPort altmode support. > > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > Acked-by: Neil Armstrong <neil.armstrong@linaro.org> > Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org> # SM8350 PDX215 > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > --- > > Changes since v2: > - Include bitfield.h > > drivers/soc/qcom/Makefile | 1 + > drivers/soc/qcom/pmic_glink_altmode.c | 478 ++++++++++++++++++++++++++ > 2 files changed, 479 insertions(+) > create mode 100644 drivers/soc/qcom/pmic_glink_altmode.c > <snip> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-MTP & SM8450-HDK
On 30/01/2023 05:20, Bjorn Andersson wrote: > From: Bjorn Andersson <bjorn.andersson@linaro.org> > > The PMIC GLINK service, running on a coprocessor of modern Qualcomm > platforms, deals with battery charging and fuel gauging, as well as > reporting status of AC and wireless power supplies. > > As this is just one of the functionalities provided by the PMIC GLINK > service, this power supply driver is implemented as an auxilirary bus > driver, spawned by the main "pmic glink" driver when the PMIC GLINK > service is detected. > > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org> # SM8350 PDX215 > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > --- > > Changes since v2: > - None > > drivers/power/supply/Kconfig | 9 + > drivers/power/supply/Makefile | 1 + > drivers/power/supply/qcom_battmgr.c | 1421 +++++++++++++++++++++++++++ > 3 files changed, 1431 insertions(+) > create mode 100644 drivers/power/supply/qcom_battmgr.c > <snip> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Devices doesn't have a battery, but it behaved as expected and values were coherent: Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-MTP & SM8450-HDK