From: Christopher Covington <cov@codeaurora.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org,
Austin Christ <austinwc@codeaurora.org>,
wsa@the-dreams.de, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
timur@codeaurora.org, rruigrok@codeaurora.org,
Philip Elcan <pelcan@codeaurora.org>,
Sricharan R <sricharan@codeaurora.org>,
Stephen Boyd <sboyd@codeaurora.org>
Subject: Re: [PATCH v4 1/2] i2c: qup: add ACPI support
Date: Thu, 30 Jun 2016 14:50:44 -0400 [thread overview]
Message-ID: <57756A04.3030301@codeaurora.org> (raw)
In-Reply-To: <4043322.Uc6lMkrL43@wuerfel>
Hi Arnd,
On 06/30/2016 07:52 AM, Arnd Bergmann wrote:
> On Thursday, June 30, 2016 7:35:14 AM CEST Christopher Covington wrote:
>> Hi Arnd,
>>
>> On 06/08/2016 05:02 PM, Arnd Bergmann wrote:
>>> On Wednesday, June 8, 2016 12:19:44 PM CEST Austin Christ wrote:
>>>> + ret = device_property_read_u32(qup->dev,
>>>> + "src-clock-hz", &src_clk_freq);
>>>> + if (ret) {
>>>> + dev_warn(qup->dev, "using default src-clock-hz %d",
>>>> + DEFAULT_SRC_CLK);
>>>> + src_clk_freq = DEFAULT_SRC_CLK;
>>>> + }
>>>>
>>>
>>> Where is this property documented?
>>
>> We plan on submitting documentation via dsd@acpica.org to
>> https://github.com/ahs3/dsd once it is operational. As I understand it
>> the project is brand new. It may take several months to begin accepting
>> submissions. In the mean time, we could potentially include
>> documentation in a reply to this thread, the cover of the next series, a
>> wiki page on codeaurora.org, a file in Documentation (perhaps to be
>> replaced by ACPICA style imports of the OS-neutral DSD project or a git
>> submodule) or potentially other means. Please let us know what you think
>> is sufficient.
>
> As you are reusing part of the DT binding, it seems appropriate to put
> the documentation for this into the binding documentation in the kernel.
My understanding is that in the device tree case, the input/source clock
frequency is assumed to be run-time managed through Global Clock
Controller (GCC) code and the common clock framework.
drivers/i2c/busses/i2c-qup.c:1549
src_clk_freq = clk_get_rate(qup->clk);
So a given I2C device tree entry points to the GCC device tree entry,
but there isn't an explicit, fixed input/source clock frequency value.
arch/arm64/boot/dts/qcom/msm8916.dtsi:310
blsp_i2c2: i2c@78b6000 {
compatible = "qcom,i2c-qup-v2.2.1";
reg = <0x78b6000 0x1000>;
interrupts = <GIC_SPI 96 0>;
clocks = <&gcc GCC_BLSP1_AHB_CLK>,
<&gcc GCC_BLSP1_QUP2_I2C_APPS_CLK>;
clock-names = "iface", "core";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c2_default>;
pinctrl-1 = <&i2c2_sleep>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
On the other hand, when ACPI is in use, the driver assumes a fixed
input/source clock frequency value, which it tries to look up as a
device property.
(I'm out of my depth here, so somebody please correct me if I've
described this wrong.)
Thanks,
Cov
--
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
WARNING: multiple messages have this Message-ID (diff)
From: cov@codeaurora.org (Christopher Covington)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/2] i2c: qup: add ACPI support
Date: Thu, 30 Jun 2016 14:50:44 -0400 [thread overview]
Message-ID: <57756A04.3030301@codeaurora.org> (raw)
In-Reply-To: <4043322.Uc6lMkrL43@wuerfel>
Hi Arnd,
On 06/30/2016 07:52 AM, Arnd Bergmann wrote:
> On Thursday, June 30, 2016 7:35:14 AM CEST Christopher Covington wrote:
>> Hi Arnd,
>>
>> On 06/08/2016 05:02 PM, Arnd Bergmann wrote:
>>> On Wednesday, June 8, 2016 12:19:44 PM CEST Austin Christ wrote:
>>>> + ret = device_property_read_u32(qup->dev,
>>>> + "src-clock-hz", &src_clk_freq);
>>>> + if (ret) {
>>>> + dev_warn(qup->dev, "using default src-clock-hz %d",
>>>> + DEFAULT_SRC_CLK);
>>>> + src_clk_freq = DEFAULT_SRC_CLK;
>>>> + }
>>>>
>>>
>>> Where is this property documented?
>>
>> We plan on submitting documentation via dsd at acpica.org to
>> https://github.com/ahs3/dsd once it is operational. As I understand it
>> the project is brand new. It may take several months to begin accepting
>> submissions. In the mean time, we could potentially include
>> documentation in a reply to this thread, the cover of the next series, a
>> wiki page on codeaurora.org, a file in Documentation (perhaps to be
>> replaced by ACPICA style imports of the OS-neutral DSD project or a git
>> submodule) or potentially other means. Please let us know what you think
>> is sufficient.
>
> As you are reusing part of the DT binding, it seems appropriate to put
> the documentation for this into the binding documentation in the kernel.
My understanding is that in the device tree case, the input/source clock
frequency is assumed to be run-time managed through Global Clock
Controller (GCC) code and the common clock framework.
drivers/i2c/busses/i2c-qup.c:1549
src_clk_freq = clk_get_rate(qup->clk);
So a given I2C device tree entry points to the GCC device tree entry,
but there isn't an explicit, fixed input/source clock frequency value.
arch/arm64/boot/dts/qcom/msm8916.dtsi:310
blsp_i2c2: i2c at 78b6000 {
compatible = "qcom,i2c-qup-v2.2.1";
reg = <0x78b6000 0x1000>;
interrupts = <GIC_SPI 96 0>;
clocks = <&gcc GCC_BLSP1_AHB_CLK>,
<&gcc GCC_BLSP1_QUP2_I2C_APPS_CLK>;
clock-names = "iface", "core";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c2_default>;
pinctrl-1 = <&i2c2_sleep>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
On the other hand, when ACPI is in use, the driver assumes a fixed
input/source clock frequency value, which it tries to look up as a
device property.
(I'm out of my depth here, so somebody please correct me if I've
described this wrong.)
Thanks,
Cov
--
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2016-06-30 18:50 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 18:19 [PATCH v4 1/2] i2c: qup: add ACPI support Austin Christ
2016-06-08 18:19 ` Austin Christ
2016-06-08 18:19 ` [PATCH v4 2/2] i2c: qup: support SMBus block read Austin Christ
2016-06-08 18:19 ` Austin Christ
2016-06-18 14:13 ` Wolfram Sang
2016-06-18 14:13 ` Wolfram Sang
2016-06-08 21:02 ` [PATCH v4 1/2] i2c: qup: add ACPI support Arnd Bergmann
2016-06-08 21:02 ` Arnd Bergmann
2016-06-30 11:35 ` Christopher Covington
2016-06-30 11:35 ` Christopher Covington
2016-06-30 11:52 ` Arnd Bergmann
2016-06-30 11:52 ` Arnd Bergmann
2016-06-30 18:50 ` Christopher Covington [this message]
2016-06-30 18:50 ` Christopher Covington
2016-07-01 9:57 ` Arnd Bergmann
2016-07-01 9:57 ` Arnd Bergmann
2016-07-01 9:57 ` Arnd Bergmann
2016-06-09 13:51 ` kbuild test robot
2016-06-09 13:51 ` kbuild test robot
2016-06-09 13:51 ` kbuild test robot
2016-06-18 14:10 ` Wolfram Sang
2016-06-18 14:10 ` Wolfram Sang
2016-06-20 8:24 ` Mika Westerberg
2016-06-20 8:24 ` Mika Westerberg
2016-06-20 15:00 ` Timur Tabi
2016-06-20 15:00 ` Timur Tabi
2016-06-20 15:00 ` Timur Tabi
2016-06-20 15:07 ` Mika Westerberg
2016-06-20 15:07 ` Mika Westerberg
2016-06-20 15:07 ` Mika Westerberg
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=57756A04.3030301@codeaurora.org \
--to=cov@codeaurora.org \
--cc=arnd@arndb.de \
--cc=austinwc@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pelcan@codeaurora.org \
--cc=rruigrok@codeaurora.org \
--cc=sboyd@codeaurora.org \
--cc=sricharan@codeaurora.org \
--cc=timur@codeaurora.org \
--cc=wsa@the-dreams.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.