From: Przemyslaw Marczak <p.marczak@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] Kconfig: i2c: add entry for driver-model software i2c
Date: Thu, 26 Mar 2015 14:17:43 +0100 [thread overview]
Message-ID: <551406F7.5050404@samsung.com> (raw)
In-Reply-To: <CAK7LNATD4_sJFyeqdBKAbv0N8Sd2q1FXE=NjvLM_rem238ZX1g@mail.gmail.com>
Hello Masahiro,
On 03/25/2015 04:35 AM, Masahiro Yamada wrote:
> Hi.
>
>
>
> 2015-03-10 19:30 GMT+09:00 Przemyslaw Marczak <p.marczak@samsung.com>:
>> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
>> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
>
> I am no longer working for Panasonic.
> The old email address will get unavailable at the end of March.
>
> Going forward, please use my new address, yamada.masahiro at socionext.com
>
>
>
Ok, will update this.
>>
>> diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
>> index 0a52ed9..dd7eb3c 100644
>> --- a/drivers/i2c/Kconfig
>> +++ b/drivers/i2c/Kconfig
>> @@ -13,6 +13,49 @@ config DM_I2C_COMPAT
>> to convert all code for a board in a single commit. It should not
>> be enabled for any board in an official release.
>>
>> +config DM_I2C_SOFT
>> + bool "Enable Driver Model for Software I2C Driver"
>> + depends on DM_I2C
>> + help
>> + Enable the i2c bus driver emulation by using GPIO.
>
> Very nice!
>
>> + The bus configuration is given by the device-tree, like below.
>> +
>> + /* First, define the alias number to have continuous bus numbering */
>> + aliases {
>> + [...]
>> + i2c5 = "/i2c at 13500000";
>> + i2c6 = "/soft-i2c at 1";
>> + [...]
>> + }
>
> This description is not specific to this CONFIG option.
>
> The relation between the aliases node and the sequence number
> is well-documented in doc/driver-model/README.txt.
>
> Should we repeat it here?
>
>
Yes, you are right. I wanted to put here all informations, required to
make it working with devices, since I think it could facilitate the
development for the others.
Will remove this.
>> + /* And next define the basic bus attributes */
>> + soft-i2c at 1 {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> + compatible = "soft-i2c";
>> + clock-frequency = <50000>;
>> + /* Define the proper GPIO pins */
>> + clock-pin = <&gpa0 0 GPIO_ACTIVE_HIGH>;
>> + data-pin = <&gpa0 1 GPIO_ACTIVE_HIGH>;
>> +
>> + /* Optionally, define some driver node (bus child) */
>> + somedev at 0x44 {
>> + compatible = "somedev";
>> + reg = <0x44>;
>> + [...]
>> + };
>> + }
>
> This is binding information, right?
>
> Stuff like that is usually documented in a separate text file.
>
> In Linux, Documentation/devicetree/bindings/i2c/
> In U-boot, doc/device-tree-bindings/i2c/
>
Right, will move into proper path.
>
>
>> + The device can be accessed by the i2c command:
>> + # i2c dev 8 (bus number set by alias)
>> + # i2c probe <0x44> (address is optionally)
>> + # i2c md 0x44 0x0 (dump dev registers at address 0x0)
>> + # Valid chip addresses: 0x44 (success!)
>> + ...
>
>
> This is the usage of "i2c" command.
> It is not specific to this option, either.
>
Ok.
>
>
>
>> + Driving the bus lines is done by dm gpio calls in the preprocessor
>> + macros. Each, can be redefined by the user.
>> +
>> config SYS_I2C_UNIPHIER
>> bool "UniPhier I2C driver"
>> depends on ARCH_UNIPHIER && DM_I2C
>> --
>> 1.9.1
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>
>
>
Thanks for review!
Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
next prev parent reply other threads:[~2015-03-26 13:17 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 10:30 [U-Boot] [PATCH 0/3] dm: i2c: enable driver model for software i2c Przemyslaw Marczak
2015-03-10 10:30 ` [U-Boot] [PATCH 1/3] dm: i2c soft: enable driver model for software i2c driver Przemyslaw Marczak
2015-03-23 8:44 ` Lukasz Majewski
2015-03-23 23:38 ` Simon Glass
2015-03-24 6:01 ` Heiko Schocher
2015-03-26 13:18 ` Przemyslaw Marczak
2015-03-26 13:18 ` Przemyslaw Marczak
2015-03-10 10:30 ` [U-Boot] [PATCH 2/3] Kconfig: i2c: remove wrong help message related to dm i2c Przemyslaw Marczak
2015-03-23 8:45 ` Lukasz Majewski
2015-03-23 23:39 ` Simon Glass
2015-03-26 13:18 ` Przemyslaw Marczak
2015-03-10 10:30 ` [U-Boot] [PATCH 3/3] Kconfig: i2c: add entry for driver-model software i2c Przemyslaw Marczak
2015-03-23 8:46 ` Lukasz Majewski
2015-03-23 23:40 ` Simon Glass
2015-03-25 3:35 ` Masahiro Yamada
2015-03-26 13:17 ` Przemyslaw Marczak [this message]
2015-03-27 17:33 ` [U-Boot] [PATCH V2 0/3] dm: i2c: enable driver model for i2c gpio Przemyslaw Marczak
2015-03-27 17:33 ` [U-Boot] [PATCH V2 1/3] dm: gpio: request list: return the count if requests max_count reached Przemyslaw Marczak
2015-03-28 15:04 ` Simon Glass
2015-03-27 17:33 ` [U-Boot] [PATCH V2 2/3] Kconfig: i2c: fix help message related to dm i2c Przemyslaw Marczak
2015-03-28 15:08 ` Simon Glass
2015-03-31 15:57 ` Przemyslaw Marczak
2015-03-27 17:33 ` [U-Boot] [PATCH V2 3/3] dm: i2c: add i2c-gpio driver Przemyslaw Marczak
2015-03-28 15:08 ` Simon Glass
2015-03-31 15:58 ` Przemyslaw Marczak
2015-03-31 16:57 ` [U-Boot] [PATCH V3 0/3] dm: i2c: enable driver model for i2c gpio Przemyslaw Marczak
2015-03-31 16:57 ` [U-Boot] [PATCH V3 1/3] dm: gpio: request list: return the count if requests max_count reached Przemyslaw Marczak
2015-04-01 3:17 ` Simon Glass
2015-04-01 3:19 ` Simon Glass
2015-04-01 6:44 ` Przemyslaw Marczak
2015-03-31 16:57 ` [U-Boot] [PATCH V3 2/3] Kconfig: i2c: fix help message related to dm i2c Przemyslaw Marczak
2015-04-01 3:17 ` Simon Glass
2015-04-01 3:19 ` Simon Glass
2015-03-31 16:57 ` [U-Boot] [PATCH V3 3/3] dm: i2c: add i2c-gpio driver Przemyslaw Marczak
2015-04-01 3:18 ` Simon Glass
2015-04-01 3:19 ` Simon Glass
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=551406F7.5050404@samsung.com \
--to=p.marczak@samsung.com \
--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