mbox series

[v3,0/6] soc: qcom: add support for the I2C Master Hub

Message ID 20221114-narmstrong-sm8550-upstream-i2c-master-hub-v3-0-f6a20dc9996e@linaro.org
Headers show
Series soc: qcom: add support for the I2C Master Hub | expand

Message

Neil Armstrong Nov. 29, 2022, 2:47 p.m. UTC
The I2C Master Hub is a stripped down version of the GENI Serial Engine
QUP Wrapper Controller but only supporting I2C serial engines without
DMA support.

The I2C Master Hub only supports a variant of the I2C serial engine with:
- a separate "core" clock
- no DMA support
- non discoverable fixed FIFO size

Since DMA isn't supported, the wrapper doesn't need the Master AHB clock
and the iommus property neither.

This patchset adds the bindings changes to the QUPv3 wrapper and I2C serial
element bindings to reflect the different resources requirements.

In order to reuse the QUPv3 wrapper and I2C serial element driver support,
the I2C Master Hub requirements are expressed in new desc structs passed
as device match data.

To: Andy Gross <agross@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Rob Herring <robh+dt@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-i2c@vger.kernel.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v3:
- Fixed check of DT clocks count on geni-se.c with Kondar help
- Added Krzysztof's Reviewed-by on patches 1 & 2
- Link to v2: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-i2c-master-hub-v2-0-aadaa6997b28@linaro.org

Changes in v2:
- Fixed all commits messages to remove "This" and fix grammar
- Fixed the bindings by moving the if in allOf:if
- Fixed the bindings by adding minItems: & maxItems: instead of true
- Added a warning about clock count in patch 3
- Added Reviewed-by from Konrad on patches 3, 4 & 5
- Link to v1: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-i2c-master-hub-v1-0-64449106a148@linaro.org

---
Neil Armstrong (6):
      dt-bindings: qcom: geni-se: document I2C Master Hub wrapper variant
      dt-bindings: i2c: qcom-geni: document I2C Master Hub serial I2C engine
      soc: qcom: geni-se: add desc struct to specify clocks from device match data
      soc: qcom: geni-se: add support for I2C Master Hub wrapper variant
      i2c: qcom-geni: add desc struct to prepare support for I2C Master Hub variant
      i2c: qcom-geni: add support for I2C Master Hub variant

 .../bindings/i2c/qcom,i2c-geni-qcom.yaml           | 64 +++++++++++++++---
 .../devicetree/bindings/soc/qcom/qcom,geni-se.yaml | 44 ++++++++++--
 drivers/i2c/busses/i2c-qcom-geni.c                 | 58 +++++++++++++++-
 drivers/soc/qcom/qcom-geni-se.c                    | 79 ++++++++++++++++++----
 4 files changed, 212 insertions(+), 33 deletions(-)
---
base-commit: 094226ad94f471a9f19e8f8e7140a09c2625abaa
change-id: 20221114-narmstrong-sm8550-upstream-i2c-master-hub-44a7fb19475e

Best regards,

Comments

Wolfram Sang Dec. 5, 2022, 8:31 a.m. UTC | #1
On Thu, Dec 01, 2022 at 11:49:21PM +0100, Wolfram Sang wrote:
> On Tue, Nov 29, 2022 at 03:47:00PM +0100, Neil Armstrong wrote:
> > The I2C Master Hub is a stripped down version of the GENI Serial Engine
> > QUP Wrapper Controller but only supporting I2C serial engines without
> > DMA support.
> > 
> > The I2C Master Hub only supports a variant of the I2C serial engine with:
> > - a separate "core" clock
> > - no DMA support
> > - non discoverable fixed FIFO size
> > 
> > Since DMA isn't supported, the wrapper doesn't need the Master AHB clock
> > and the iommus property neither.
> > 
> > This patchset adds the bindings changes to the QUPv3 wrapper and I2C serial
> > element bindings to reflect the different resources requirements.
> > 
> > In order to reuse the QUPv3 wrapper and I2C serial element driver support,
> > the I2C Master Hub requirements are expressed in new desc structs passed
> > as device match data.
> 
> Is everyone fine if I take all this via the I2C tree?

I did this now.

All applied to for-next, thanks!
Neil Armstrong Dec. 5, 2022, 8:37 a.m. UTC | #2
On 05/12/2022 09:31, Wolfram Sang wrote:
> On Thu, Dec 01, 2022 at 11:49:21PM +0100, Wolfram Sang wrote:
>> On Tue, Nov 29, 2022 at 03:47:00PM +0100, Neil Armstrong wrote:
>>> The I2C Master Hub is a stripped down version of the GENI Serial Engine
>>> QUP Wrapper Controller but only supporting I2C serial engines without
>>> DMA support.
>>>
>>> The I2C Master Hub only supports a variant of the I2C serial engine with:
>>> - a separate "core" clock
>>> - no DMA support
>>> - non discoverable fixed FIFO size
>>>
>>> Since DMA isn't supported, the wrapper doesn't need the Master AHB clock
>>> and the iommus property neither.
>>>
>>> This patchset adds the bindings changes to the QUPv3 wrapper and I2C serial
>>> element bindings to reflect the different resources requirements.
>>>
>>> In order to reuse the QUPv3 wrapper and I2C serial element driver support,
>>> the I2C Master Hub requirements are expressed in new desc structs passed
>>> as device match data.
>>
>> Is everyone fine if I take all this via the I2C tree?
> 
> I did this now.
> 
> All applied to for-next, thanks!
> 

Thanks !

Neil