public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eugen Hristev <eugen.hristev@microchip.com>
To: <hs@denx.de>, <u-boot@lists.denx.de>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Subject: [PATCH 4/4] configs: at91: sama7g5ek: enable CONFIG_PHANDLE_CHECK_SEQ
Date: Tue, 4 Jan 2022 20:43:59 +0200	[thread overview]
Message-ID: <20220104184359.315440-4-eugen.hristev@microchip.com> (raw)
In-Reply-To: <20220104184359.315440-1-eugen.hristev@microchip.com>

CONFIG_PHANDLE_CHECK_SEQ will allow different sequence number for nodes
that have the same name, but they are different.
In sama7g5ek case, there are multiple 'i2c@600' nodes which are child
nodes of different parent 'flexcom' nodes.
These are different i2c busses even if the node is the same, and have to be
differentiated.
Without this config, the sequence number 0 is reused for two i2c busses, and
this is something that we have to avoid:

Looking for 'i2c' at 4704, name i2c@600
   - serial0, /ahb/apb/serial@e1824200
   - i2c0, /ahb/apb/flexcom@e181c000/i2c@600
Found seq 0
i2c_post_bind: i2c@600, seq=0
Looking for 'i2c' at 6236, name i2c@600
   - serial0, /ahb/apb/serial@e1824200
   - i2c0, /ahb/apb/flexcom@e181c000/i2c@600
Found seq 0
i2c_post_bind: i2c@600, seq=0

After this patch:

Looking for 'i2c' at 4704, name i2c@600
   - serial0, /ahb/apb/serial@e1824200
   - i2c0, /ahb/apb/flexcom@e181c000/i2c@600
   - i2c1, /ahb/apb/flexcom@e2818000/i2c@600
Found seq 1

Before the patch:
=> i2c bus
Bus 0:  i2c@600
Bus 0:  i2c@600  (active 0)
   52: eeprom@52, offset len 1, flags 0
   53: eeprom@53, offset len 1, flags 0
=>

After the patch:
=> i2c bus
Bus 0:  i2c@600
Bus 1:  i2c@600  (active 1)
   52: eeprom@52, offset len 1, flags 0
   53: eeprom@53, offset len 1, flags 0

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
 configs/sama7g5ek_mmc1_defconfig | 1 +
 configs/sama7g5ek_mmc_defconfig  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/sama7g5ek_mmc1_defconfig b/configs/sama7g5ek_mmc1_defconfig
index e297489900..15a5c54e75 100644
--- a/configs/sama7g5ek_mmc1_defconfig
+++ b/configs/sama7g5ek_mmc1_defconfig
@@ -72,3 +72,4 @@ CONFIG_TIMER=y
 CONFIG_MCHP_PIT64B_TIMER=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 # CONFIG_EFI_LOADER_HII is not set
+CONFIG_PHANDLE_CHECK_SEQ=y
diff --git a/configs/sama7g5ek_mmc_defconfig b/configs/sama7g5ek_mmc_defconfig
index 4f68a46456..7abd5c8a38 100644
--- a/configs/sama7g5ek_mmc_defconfig
+++ b/configs/sama7g5ek_mmc_defconfig
@@ -72,3 +72,4 @@ CONFIG_TIMER=y
 CONFIG_MCHP_PIT64B_TIMER=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 # CONFIG_EFI_LOADER_HII is not set
+CONFIG_PHANDLE_CHECK_SEQ=y
-- 
2.25.1


  parent reply	other threads:[~2022-01-04 18:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 18:43 [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Eugen Hristev
2022-01-04 18:43 ` [PATCH 2/4] ARM: dts: at91: sama7g5: add flx8 and required nodes Eugen Hristev
2022-01-04 18:43 ` [PATCH 3/4] ARM: dts: at91: sama7g5ek: move eeproms to flexcom8 Eugen Hristev
2022-01-04 18:43 ` Eugen Hristev [this message]
2022-01-05 10:04 ` [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Michael Walle
2022-01-05 10:37   ` Eugen.Hristev
2022-01-05 10:49     ` Michael Walle
2022-01-05 11:00       ` Eugen.Hristev
2022-01-17  9:20 ` Eugen.Hristev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220104184359.315440-4-eugen.hristev@microchip.com \
    --to=eugen.hristev@microchip.com \
    --cc=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox