All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 7/7] i2c: mux: Generate longer i2c mux name
Date: Sat, 2 Feb 2019 08:00:43 -0700	[thread overview]
Message-ID: <CAPnjgZ1muj74Dh8FAb1s047Vm6qEURc9CBZdfja1s8iOciHOHA@mail.gmail.com> (raw)
In-Reply-To: <ccfe7fc75bead0856535c79d7b750b9170687125.1548948659.git.michal.simek@xilinx.com>

On Thu, 31 Jan 2019 at 08:31, Michal Simek <michal.simek@xilinx.com> wrote:
>
> For !DM case busses are listed as
> ZynqMP> i2c bus
> Bus 0:  zynq_0
> Bus 1:  zynq_0->PCA9544A at 0x75:0
> Bus 2:  zynq_0->PCA9544A at 0x75:1
> Bus 3:  zynq_0->PCA9544A at 0x75:2
> Bus 4:  zynq_1
> Bus 5:  zynq_1->PCA9548 at 0x74:0
> Bus 6:  zynq_1->PCA9548 at 0x74:1
> Bus 7:  zynq_1->PCA9548 at 0x74:2
> Bus 8:  zynq_1->PCA9548 at 0x74:3
> Bus 9:  zynq_1->PCA9548 at 0x74:4
> Bus 10: zynq_1->PCA9548 at 0x75:0
> Bus 11: zynq_1->PCA9548 at 0x75:1
> Bus 12: zynq_1->PCA9548 at 0x75:2
> Bus 13: zynq_1->PCA9548 at 0x75:3
> Bus 14: zynq_1->PCA9548 at 0x75:4
> Bus 15: zynq_1->PCA9548 at 0x75:5
> Bus 16: zynq_1->PCA9548 at 0x75:6
> Bus 17: zynq_1->PCA9548 at 0x75:7
>
> where is exactly describing i2c bus topology.
> By moving to DM case i2c mux buses are using names from DT and because
> i2c-muxes describing sub busses with the same names like i2c at 0, etc it
> is hard to identify which bus is where.
> Linux is adding topology information to i2c-mux busses to identify them
> better.
> This patch is doing the same and composing bus name with topology
> information.
>
> When patch is applied with topology information on zcu102-revA.
> ZynqMP> i2c bus
> Bus 0:  i2c at ff020000
>    20: gpio at 20, offset len 1, flags 0
>    21: gpio at 21, offset len 1, flags 0
>    75: i2c-mux at 75, offset len 1, flags 0
> Bus 2:  i2c at ff020000->i2c-mux at 75->i2c at 0
> Bus 3:  i2c at ff020000->i2c-mux at 75->i2c at 1
> Bus 4:  i2c at ff020000->i2c-mux at 75->i2c at 2
> Bus 1:  i2c at ff030000  (active 1)
>    74: i2c-mux at 74, offset len 1, flags 0
>    75: i2c-mux at 75, offset len 1, flags 0
> Bus 5:  i2c at ff030000->i2c-mux at 74->i2c at 0  (active 5)
>    54: eeprom at 54, offset len 1, flags 0
> Bus 6:  i2c at ff030000->i2c-mux at 74->i2c at 1
> Bus 7:  i2c at ff030000->i2c-mux at 74->i2c at 2
> Bus 8:  i2c at ff030000->i2c-mux at 74->i2c at 3
> Bus 9:  i2c at ff030000->i2c-mux at 74->i2c at 4
> Bus 10: i2c at ff030000->i2c-mux at 75->i2c at 0
> Bus 11: i2c at ff030000->i2c-mux at 75->i2c at 1
> Bus 12: i2c at ff030000->i2c-mux at 75->i2c at 2
> Bus 13: i2c at ff030000->i2c-mux at 75->i2c at 3
> Bus 14: i2c at ff030000->i2c-mux at 75->i2c at 4
> Bus 15: i2c at ff030000->i2c-mux at 75->i2c at 5
> Bus 16: i2c at ff030000->i2c-mux at 75->i2c at 6
> Bus 17: i2c at ff030000->i2c-mux at 75->i2c at 7
>
> Behavior before the patch is applied.
> ZynqMP> i2c bus
> Bus 0:  i2c at ff020000
>    20: gpio at 20, offset len 1, flags 0
>    21: gpio at 21, offset len 1, flags 0
>    75: i2c-mux at 75, offset len 1, flags 0
> Bus 2:  i2c at 0
> Bus 3:  i2c at 1
> Bus 4:  i2c at 2
> Bus 1:  i2c at ff030000  (active 1)
>    74: i2c-mux at 74, offset len 1, flags 0
>    75: i2c-mux at 75, offset len 1, flags 0
> Bus 5:  i2c at 0  (active 5)
>    54: eeprom at 54, offset len 1, flags 0
> Bus 6:  i2c at 1
> Bus 7:  i2c at 2
> Bus 8:  i2c at 3
> Bus 9:  i2c at 4
> Bus 10: i2c at 0
> Bus 11: i2c at 1
> Bus 12: i2c at 2
> Bus 13: i2c at 3
> Bus 14: i2c at 4
> Bus 15: i2c at 5
> Bus 16: i2c at 6
> Bus 17: i2c at 7
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> Changes in v2:
> - Fix headers
> - Change patch description to focus only on bus name
>
>  drivers/i2c/muxes/i2c-mux-uclass.c | 29 ++++++++++++++++++++++++++---
>  1 file changed, 26 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

  reply	other threads:[~2019-02-02 15:00 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31 15:30 [U-Boot] [PATCH v2 0/7] Align U-Boot I2C DM bus ID handling with Linux Michal Simek
2019-01-31 15:30 ` [U-Boot] [PATCH v2 1/7] dm: core: Add of_alias_get_highest_id() Michal Simek
2019-02-07  6:46   ` Heiko Schocher
2019-02-08  4:11     ` Simon Glass
2019-02-11 15:50   ` Heiko Schocher
2019-01-31 15:30 ` [U-Boot] [PATCH v2 2/7] fdt: Introduce fdtdec_get_alias_highest_id() Michal Simek
2019-02-07  6:47   ` Heiko Schocher
2019-02-08  4:11   ` Simon Glass
2019-02-11 15:51   ` Heiko Schocher
2019-01-31 15:30 ` [U-Boot] [PATCH v2 3/7] dm: core: Introduce dev_read_alias_highest_id() Michal Simek
2019-02-07  6:48   ` Heiko Schocher
2019-02-08  4:11   ` Simon Glass
2019-02-11 15:52   ` Heiko Schocher
2019-01-31 15:31 ` [U-Boot] [PATCH v2 4/7] dm: core: Add tests for dev_read_alias_highest_id() Michal Simek
2019-02-07  6:49   ` Heiko Schocher
2019-02-08  4:11   ` Simon Glass
2019-02-11 15:52   ` Heiko Schocher
2019-01-31 15:31 ` [U-Boot] [PATCH v2 5/7] i2c: dm: Record maximum id of devices before probing devices Michal Simek
2019-02-07  6:49   ` Heiko Schocher
2019-02-11 15:54   ` Heiko Schocher
2019-01-31 15:31 ` [U-Boot] [PATCH v2 6/7] i2c: Fill req_seq in i2c_post_bind() Michal Simek
2019-02-07  6:52   ` Heiko Schocher
2019-02-11 15:54   ` Heiko Schocher
2019-01-31 15:31 ` [U-Boot] [PATCH v2 7/7] i2c: mux: Generate longer i2c mux name Michal Simek
2019-02-02 15:00   ` Simon Glass [this message]
2019-02-07  6:55   ` Heiko Schocher
2019-02-11 15:55   ` Heiko Schocher
2019-02-02 14:10 ` [U-Boot] [PATCH v2 0/7] Align U-Boot I2C DM bus ID handling with Linux Simon Glass
2019-02-05  7:57   ` Michal Simek
2019-02-05  8:20     ` Heiko Schocher
2019-02-05  9:04       ` Michal Simek
2019-02-08  4:11     ` Simon Glass
2019-02-08  6:45       ` Michal Simek
2019-02-08  9:57 ` Heiko Schocher
2019-02-08 11:14   ` Michal Simek
2019-02-08 11:24     ` Michal Simek
2019-02-11  6:20       ` Heiko Schocher
2019-02-11  6:58         ` Michal Simek
2019-02-11  8:45           ` Heiko Schocher
2019-02-11 10:06             ` Michal Simek

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=CAPnjgZ1muj74Dh8FAb1s047Vm6qEURc9CBZdfja1s8iOciHOHA@mail.gmail.com \
    --to=sjg@chromium.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.