Skip to content

Commit 0df8aa2

Browse files
committed
riscv: dts: microchip: fix icicle i2c pinctrl configuration
Unfortunately, an erratum with engineering sample that I was not aware of was exposed by adding pinctrl configuration to the icicle kit. When routed to MSS IOs, i2c signals are never anything other than tied low. Being an FPGA, a Libero workaround for this problem was created, that involves routing i2c signals to the FPGA fabric when the MSS IO option is selected in the configurator and then back to the intended pin using the debug "fabric test" capability. This is invisible to user facing information in the tooling and not mentioned in reference designs documentation. It manifests solely in the .xml output from the MSS configuration that the HSS firmware uses to configure the device, which Linux now overwrites using the pinctrl information. As a result, I never noticed this. My original submission had the engineering sample configuration, but I modified it on application after I was told it didn't work, not realising that the report came from a colleague with a production device, where the erratum was fixed and the workaround not automatically implemented by Libero when creating a design. Move this part of the pinctrl configuration out of the shared portion of the icicle device trees, into the portions that are specific to engineering sample and production devices so that the different settings for i2c pins can be dealt with. Although the reference design only has this workaround in place for i2c1, as i2c0 is genuinely fabric routed, move it too since the erratum affects both controllers. Link: https://ww1.microchip.com/downloads/aemDocuments/documents/FPGA/ProductDocuments/Errata/polarfiresoc/microsemi_polarfire_soc_fpga_egineering_samples_errata_er0219_v1.pdf [3.3] Fixes: 123f427 ("riscv: dts: microchip: add pinctrl nodes for mpfs/icicle kit") Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
1 parent 3e256d4 commit 0df8aa2

3 files changed

Lines changed: 29 additions & 10 deletions

File tree

arch/riscv/boot/dts/microchip/mpfs-icicle-kit-fabric.dtsi

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,6 @@
101101
status = "okay";
102102
};
103103

104-
&i2c0 {
105-
pinctrl-names = "default";
106-
pinctrl-0 = <&i2c0_fabric>;
107-
};
108-
109-
&i2c1 {
110-
pinctrl-names = "default";
111-
pinctrl-0 = <&i2c1_mssio>;
112-
};
113-
114104
&mmuart1 {
115105
pinctrl-names = "default";
116106
pinctrl-0 = <&uart1_fabric>;

arch/riscv/boot/dts/microchip/mpfs-icicle-kit-prod.dts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
"microchip,mpfs";
1515
};
1616

17+
&i2c0 {
18+
pinctrl-names = "default";
19+
pinctrl-0 = <&i2c0_fabric>;
20+
};
21+
22+
&i2c1 {
23+
pinctrl-names = "default";
24+
pinctrl-0 = <&i2c1_mssio>;
25+
};
26+
1727
&syscontroller {
1828
microchip,bitstream-flash = <&sys_ctrl_flash>;
1929
};

arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,22 @@
1111
"microchip,mpfs-icicle-kit",
1212
"microchip,mpfs";
1313
};
14+
15+
&i2c0 {
16+
pinctrl-names = "default";
17+
pinctrl-0 = <&i2c0_fabric>;
18+
};
19+
20+
/*
21+
* Due to silicon errata, routing via MSS IOs doesn't work on ES devices.
22+
* Instead, i2c1, appearing on B1/C1, which are normally MSS IOs, is routed
23+
* via the fabric and back to B1/C1 via "fabric-test" functionality.
24+
* This is done silently by Libero, so the iomux0 setting for i2c1 has to
25+
* be fabric IO, despite tooling etc saying that MSS IOs are used.
26+
*
27+
* See Section 3.3 of https://ww1.microchip.com/downloads/aemDocuments/documents/FPGA/ProductDocuments/Errata/polarfiresoc/microsemi_polarfire_soc_fpga_egineering_samples_errata_er0219_v1.pdf
28+
*/
29+
&i2c1 {
30+
pinctrl-names = "default";
31+
pinctrl-0 = <&i2c1_fabric>;
32+
};

0 commit comments

Comments
 (0)