Skip to content

Commit d80610a

Browse files
committed
ARM: dts: at91: sama5d2_xplained: Describe the flx0 I2C function
A better version of this has already been sent to mainline, do not port this from a release to another. Users can choose which flexcom function to use. Describe the I2C Flexcom0 function. Add alias for the i2c2 node in order to not rely on probe order for the i2c device numbering. The sama5d2 SoC has two dedicated i2c buses and five flexcoms that can function as i2c. The i2c0 and i2c1 aliases are kept for the dedicated i2c buses, the i2c flexcom functions can be numbered in order starting from i2c2. Tested with ECC608, by deploying an AWS GG group using HSI. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
1 parent 9617e10 commit d80610a

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

arch/arm/boot/dts/at91-sama5d2_xplained.dts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
model = "Atmel SAMA5D2 Xplained";
1818
compatible = "atmel,sama5d2-xplained", "atmel,sama5d2", "atmel,sama5";
1919

20+
aliases {
21+
i2c2 = &i2c2; /* XPRO EXT2 */
22+
};
23+
2024
chosen {
2125
stdout-path = "serial0:115200n8";
2226
};
@@ -338,6 +342,28 @@
338342
atmel,fifo-size = <32>;
339343
status = "okay";
340344
};
345+
346+
i2c2: i2c@600 {
347+
compatible = "atmel,sama5d2-i2c";
348+
reg = <0x600 0x200>;
349+
interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
350+
dmas = <0>, <0>;
351+
dma-names = "tx", "rx";
352+
#address-cells = <1>;
353+
#size-cells = <0>;
354+
clocks = <&pmc PMC_TYPE_PERIPHERAL 19>;
355+
pinctrl-names = "default", "gpio";
356+
pinctrl-0 = <&pinctrl_flx0_default>;
357+
pinctrl-1 = <&pinctrl_i2c2_gpio>;
358+
sda-gpios = <&pioA PIN_PB28 GPIO_ACTIVE_HIGH>;
359+
scl-gpios = <&pioA PIN_PB29 GPIO_ACTIVE_HIGH>;
360+
i2c-sda-hold-time-ns = <350>;
361+
i2c-analog-filter;
362+
i2c-digital-filter;
363+
i2c-digital-filter-width-ns = <35>;
364+
atmel,fifo-size = <16>;
365+
status = "disabled"; /* conflict with ISC_D2 & ISC_D3 data pins */
366+
};
341367
};
342368

343369
shdwc@f8048010 {
@@ -533,6 +559,12 @@
533559
bias-disable;
534560
};
535561

562+
pinctrl_i2c2_gpio: i2c2_gpio {
563+
pinmux = <PIN_PB28__GPIO>,
564+
<PIN_PB29__GPIO>;
565+
bias-disable;
566+
};
567+
536568
pinctrl_i2s0_default: i2s0_default {
537569
pinmux = <PIN_PC1__I2SC0_CK>,
538570
<PIN_PC2__I2SC0_MCK>,

0 commit comments

Comments
 (0)