2023-04-18 05:08:04

by Kumar, Udit

[permalink] [raw]
Subject: [PATCH v2 0/2] arm64: dts: ti: k3-j7200-common-proc-board fixes

This patch series fixes the pin mux configuration and enable
wkup_i2c0 at board level.

Changes since v1:
https://lore.kernel.org/all/[email protected]/
Pin mux:
- Fixed commit message and author

wkup_i2c:
- Removed Fixes tag in commit message
- Moved wkup_i2c in som instead of common board
- Added eeprom as child device


Keerthy (1):
arm64: dts: ti: k3-j7200: Fix physical address of pin

Udit Kumar (1):
arm64: dts: ti: k3-j7200-som: Enable I2C

.../dts/ti/k3-j7200-common-proc-board.dts | 28 +++++++++----------
arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi | 8 ++++++
2 files changed, 22 insertions(+), 14 deletions(-)

--
2.34.1


2023-04-18 05:09:11

by Kumar, Udit

[permalink] [raw]
Subject: [PATCH v2 2/2] arm64: dts: ti: k3-j7200-som: Enable I2C

This patch enables wkup_i2c0 node in board dts file.
and underneath eeprom CAV24C256WE.

J7200 User Guide (Section 4.3, Table 4-2) :
https://www.ti.com/lit/ug/spruiw7a/spruiw7a.pdf

Signed-off-by: Udit Kumar <[email protected]>
---
arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi
index fa44ed4c17d5..137492ae89c4 100644
--- a/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi
@@ -214,6 +214,14 @@ exp_som: gpio@21 {
};
};

+&wkup_i2c0 {
+ status = "okay";
+ eeprom@50 {
+ compatible = "atmel,24c256";
+ reg = <0x50>;
+ };
+};
+
&ospi0 {
pinctrl-names = "default";
pinctrl-0 = <&mcu_fss0_ospi0_pins_default>;
--
2.34.1

2023-04-18 05:09:44

by Kumar, Udit

[permalink] [raw]
Subject: [PATCH v2 1/2] arm64: dts: ti: k3-j7200: Fix physical address of pin

From: Keerthy <[email protected]>

wkup_pmx splits into multiple regions. Like

wkup_pmx0 -> 13 pins (WKUP_PADCONFIG 0 - 12)
wkup_pmx1 -> 2 pins (WKUP_PADCONFIG 14 - 15)
wkup_pmx2 -> 59 pins (WKUP_PADCONFIG 26 - 84)
wkup_pmx3 -> 8 pins (WKUP_PADCONFIG 93 - 100)

With this split, pin offset needs to be adjusted to
match with new pmx for all pins above wkup_pmx0.

Example a pin under wkup_pmx1 should start from 0 instead of
old offset(0x38 WKUP_PADCONFIG 14 offset)

J7200 Datasheet (Table 6-106, Section 6.4 Pin Multiplexing) :
https://www.ti.com/lit/ds/symlink/dra821u.pdf

Fixes: 9ae21ac445e9 ("arm64: dts: ti: k3-j7200: Fix wakeup pinmux range")

Signed-off-by: Keerthy <[email protected]>
Signed-off-by: Udit Kumar <[email protected]>
---
.../dts/ti/k3-j7200-common-proc-board.dts | 28 +++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
index 0d39d6b8cc0c..63633e4f6c59 100644
--- a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
@@ -83,25 +83,25 @@ vdd_sd_dv: gpio-regulator-TLV71033 {
&wkup_pmx2 {
mcu_cpsw_pins_default: mcu-cpsw-pins-default {
pinctrl-single,pins = <
- J721E_WKUP_IOPAD(0x0068, PIN_OUTPUT, 0) /* MCU_RGMII1_TX_CTL */
- J721E_WKUP_IOPAD(0x006c, PIN_INPUT, 0) /* MCU_RGMII1_RX_CTL */
- J721E_WKUP_IOPAD(0x0070, PIN_OUTPUT, 0) /* MCU_RGMII1_TD3 */
- J721E_WKUP_IOPAD(0x0074, PIN_OUTPUT, 0) /* MCU_RGMII1_TD2 */
- J721E_WKUP_IOPAD(0x0078, PIN_OUTPUT, 0) /* MCU_RGMII1_TD1 */
- J721E_WKUP_IOPAD(0x007c, PIN_OUTPUT, 0) /* MCU_RGMII1_TD0 */
- J721E_WKUP_IOPAD(0x0088, PIN_INPUT, 0) /* MCU_RGMII1_RD3 */
- J721E_WKUP_IOPAD(0x008c, PIN_INPUT, 0) /* MCU_RGMII1_RD2 */
- J721E_WKUP_IOPAD(0x0090, PIN_INPUT, 0) /* MCU_RGMII1_RD1 */
- J721E_WKUP_IOPAD(0x0094, PIN_INPUT, 0) /* MCU_RGMII1_RD0 */
- J721E_WKUP_IOPAD(0x0080, PIN_OUTPUT, 0) /* MCU_RGMII1_TXC */
- J721E_WKUP_IOPAD(0x0084, PIN_INPUT, 0) /* MCU_RGMII1_RXC */
+ J721E_WKUP_IOPAD(0x0000, PIN_OUTPUT, 0) /* MCU_RGMII1_TX_CTL */
+ J721E_WKUP_IOPAD(0x0004, PIN_INPUT, 0) /* MCU_RGMII1_RX_CTL */
+ J721E_WKUP_IOPAD(0x0008, PIN_OUTPUT, 0) /* MCU_RGMII1_TD3 */
+ J721E_WKUP_IOPAD(0x000c, PIN_OUTPUT, 0) /* MCU_RGMII1_TD2 */
+ J721E_WKUP_IOPAD(0x0010, PIN_OUTPUT, 0) /* MCU_RGMII1_TD1 */
+ J721E_WKUP_IOPAD(0x0014, PIN_OUTPUT, 0) /* MCU_RGMII1_TD0 */
+ J721E_WKUP_IOPAD(0x0020, PIN_INPUT, 0) /* MCU_RGMII1_RD3 */
+ J721E_WKUP_IOPAD(0x0024, PIN_INPUT, 0) /* MCU_RGMII1_RD2 */
+ J721E_WKUP_IOPAD(0x0028, PIN_INPUT, 0) /* MCU_RGMII1_RD1 */
+ J721E_WKUP_IOPAD(0x002c, PIN_INPUT, 0) /* MCU_RGMII1_RD0 */
+ J721E_WKUP_IOPAD(0x0018, PIN_OUTPUT, 0) /* MCU_RGMII1_TXC */
+ J721E_WKUP_IOPAD(0x001c, PIN_INPUT, 0) /* MCU_RGMII1_RXC */
>;
};

mcu_mdio_pins_default: mcu-mdio1-pins-default {
pinctrl-single,pins = <
- J721E_WKUP_IOPAD(0x009c, PIN_OUTPUT, 0) /* (L1) MCU_MDIO0_MDC */
- J721E_WKUP_IOPAD(0x0098, PIN_INPUT, 0) /* (L4) MCU_MDIO0_MDIO */
+ J721E_WKUP_IOPAD(0x0034, PIN_OUTPUT, 0) /* (L1) MCU_MDIO0_MDC */
+ J721E_WKUP_IOPAD(0x0030, PIN_INPUT, 0) /* (L4) MCU_MDIO0_MDIO */
>;
};
};
--
2.34.1

2023-04-18 12:24:51

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] arm64: dts: ti: k3-j7200-som: Enable I2C

On 10:35-20230418, Udit Kumar wrote:
> This patch enables wkup_i2c0 node in board dts file.
> and underneath eeprom CAV24C256WE.
>
> J7200 User Guide (Section 4.3, Table 4-2) :
> https://www.ti.com/lit/ug/spruiw7a/spruiw7a.pdf
>
> Signed-off-by: Udit Kumar <[email protected]>
> ---
> arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi
> index fa44ed4c17d5..137492ae89c4 100644
> --- a/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi
> @@ -214,6 +214,14 @@ exp_som: gpio@21 {
> };
> };
>
> +&wkup_i2c0 {
> + status = "okay";
> + eeprom@50 {
> + compatible = "atmel,24c256";
> + reg = <0x50>;
> + };
> +};

pinmux?
speed ?

> +
> &ospi0 {
> pinctrl-names = "default";
> pinctrl-0 = <&mcu_fss0_ospi0_pins_default>;
> --
> 2.34.1
>

--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2023-04-19 03:38:42

by Kumar, Udit

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] arm64: dts: ti: k3-j7200-som: Enable I2C


On 18/04/23 17:44, Nishanth Menon wrote:
> On 10:35-20230418, Udit Kumar wrote:
>> [..]
> pinmux?
> speed ?


I misunderstood your comments in v1.

will fix in v3

Thanks for review