Skip to content

Commit 61da93d

Browse files
author
CKI KWF Bot
committed
Merge: i2c: imx: update to v6.17 and enable driver
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1463 ## Summary of Changes Update `nxp,s32g2-i2c` to v6.17 as part of NXP S32G enablement work. See the associated ticket for details. Depends: !1679 ## Testing To test this driver, I used `i2cdetect` after probing `i2c-imx` and `i2c-dev` (the latter is required for `i2cdetect`): ``` # modprobe i2c-imx [ 8.679303] i2c_imx: module verification failed: signature and/or required key missing - tainting kernel [ 8.682505] i2c i2c-0: using pinctrl states for GPIO recovery [ 8.682979] i2c i2c-0: IMX I2C adapter registered [ 8.683973] i2c i2c-1: using pinctrl states for GPIO recovery [ 8.684081] i2c i2c-1: IMX I2C adapter registered [ 8.684905] i2c i2c-2: using pinctrl states for GPIO recovery [ 8.685175] i2c i2c-2: IMX I2C adapter registered # modprobe i2c-dev [ 42.359864] i2c_dev: i2c /dev entries driver # i2cdetect -l i2c-1 i2c 401ec000.i2c I2C adapter i2c-2 i2c 402dc000.i2c I2C adapter i2c-0 i2c 401e4000.i2c I2C adapter # i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- 22 -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- # i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- # i2cdetect -y 2 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- 08 09 -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- -- 20: 20 21 -- -- -- -- -- -- 28 -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- ``` The `i2cdetect` results are expected from a functional I2C bus: in the devicetree, `i2c-0`, `i2c-1`, and `i2c-2` correspond to `i2c@401e4000`, `i2c@401ec000`, and `i2c@402dc000`, respectively: ``` i2c@401e4000 { compatible = "nxp,s32g3-i2c\0nxp,s32g2-i2c"; reg = <0x401e4000 0x1000>; #address-cells = <0x01>; #size-cells = <0x00>; interrupts = <0x00 0x5c 0x04>; clocks = <0x0c 0x28>; clock-names = "ipg"; status = "okay"; pinctrl-names = "default\0gpio"; pinctrl-0 = <0x12>; pinctrl-1 = <0x13>; gpio-expander@22 { compatible = "nxp,pcal6524"; reg = <0x22>; gpio-controller; #gpio-cells = <0x02>; }; rtc@51 { compatible = "nxp,pca85073a"; reg = <0x51>; }; }; /* ... */ i2c@401ec000 { compatible = "nxp,s32g3-i2c\0nxp,s32g2-i2c"; reg = <0x401ec000 0x1000>; #address-cells = <0x01>; #size-cells = <0x00>; interrupts = <0x00 0x5e 0x04>; clocks = <0x0c 0x28>; clock-names = "ipg"; status = "okay"; pinctrl-names = "default\0gpio"; pinctrl-0 = <0x14>; pinctrl-1 = <0x15>; }; /* ... */ i2c@402dc000 { compatible = "nxp,s32g3-i2c\0nxp,s32g2-i2c"; reg = <0x402dc000 0x1000>; #address-cells = <0x01>; #size-cells = <0x00>; interrupts = <0x00 0x60 0x04>; clocks = <0x0c 0x28>; clock-names = "ipg"; status = "okay"; pinctrl-names = "default\0gpio"; pinctrl-0 = <0x17>; pinctrl-1 = <0x18>; current-sensor@40 { compatible = "ti,ina231"; reg = <0x40>; shunt-resistor = <0x3e8>; }; }; ``` `i2c-0` shows chips at addresses 22 (`gpio-expander@22`) and 51 (`rtc@51`), and `i2c-2` shows a chip at address 40 (`current-sensor@40`). There are other addresses shown on these buses, but I'm assuming they're simply on-board devices that haven't been upstreamed. `i2c-1` not showing any chips is not a concern either, based on the bus lacking any child nodes in the devicetree. One thing to note is that the driver may cause warnings on probe. I've sent a patch upstream [here](https://lore.kernel.org/all/20251111-pinctrl-s32cc-alloc-init-v1-0-071b3485b776@redhat.com/) to resolve this. ## Approved Development Ticket(s) JIRA: https://issues.redhat.com/browse/RHEL-116101 Related ARK enablement MR: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/4195 Signed-off-by: Jared Kangas <jkangas@redhat.com> Approved-by: Radu Rendec <rrendec@redhat.com> Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents a456b5d + f276fdc commit 61da93d

File tree

5 files changed

+468
-98
lines changed

5 files changed

+468
-98
lines changed

Documentation/devicetree/bindings/i2c/i2c-imx.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ properties:
1818
- const: fsl,imx1-i2c
1919
- const: fsl,imx21-i2c
2020
- const: fsl,vf610-i2c
21+
- const: nxp,s32g2-i2c
2122
- items:
2223
- enum:
2324
- fsl,ls1012a-i2c
@@ -54,6 +55,9 @@ properties:
5455
- fsl,imx8mn-i2c
5556
- fsl,imx8mp-i2c
5657
- const: fsl,imx21-i2c
58+
- items:
59+
- const: nxp,s32g3-i2c
60+
- const: nxp,s32g2-i2c
5761

5862
reg:
5963
maxItems: 1

drivers/i2c/busses/Kconfig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,13 +742,14 @@ config I2C_IMG
742742

743743
config I2C_IMX
744744
tristate "IMX I2C interface"
745-
depends on ARCH_MXC || ARCH_LAYERSCAPE || COLDFIRE || COMPILE_TEST
745+
depends on ARCH_MXC || ARCH_LAYERSCAPE || ARCH_S32 || COLDFIRE \
746+
|| COMPILE_TEST
746747
select I2C_SLAVE
747748
help
748749
Say Y here if you want to use the IIC bus controller on
749-
the Freescale i.MX/MXC, Layerscape or ColdFire processors.
750+
the Freescale i.MX/MXC/S32G, Layerscape or ColdFire processors.
750751

751-
This driver can also be built as a module. If so, the module
752+
This driver can also be built as a module. If so, the module
752753
will be called i2c-imx.
753754

754755
config I2C_IMX_LPI2C

0 commit comments

Comments
 (0)