* Re: [PATCH v4 3/4] powernv: Pass PSSCR value and mask to power9_idle_stop
From: Gautham R Shenoy @ 2016-12-14 9:02 UTC (permalink / raw)
To: Balbir Singh
Cc: Gautham R. Shenoy, Michael Ellerman, Benjamin Herrenschmidt,
Paul Mackerras, Rafael J. Wysocki, Daniel Lezcano,
Michael Neuling, Vaidyanathan Srinivasan, Shreyas B. Prabhu,
Shilpasri G Bhat, Stewart Smith, Oliver O'Halloran,
linuxppc-dev, linux-kernel, linux-pm, devicetree, Rob Herring,
Mark Rutland
In-Reply-To: <b2b6c3c6-f564-6970-0281-dfddc739dda4@gmail.com>
Hi Balbir,
Thanks for reviewing the patch. Please find my comments inline.
On Wed, Dec 14, 2016 at 11:16:26AM +1100, Balbir Singh wrote:
[..snip..]
> >
> > /*
> > - * r3 - requested stop state
> > + * r3 - PSSCR value corresponding to the requested stop state.
> > */
> > power_enter_stop:
> > #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
> > @@ -274,9 +272,19 @@ power_enter_stop:
> > stb r4,HSTATE_HWTHREAD_STATE(r13)
> > #endif
> > /*
> > + * Check if we are executing the lite variant with ESL=EC=0
> > + */
> > + andis. r4, r3, PSSCR_EC_ESL_MASK_SHIFTED
>
> r4 = psscr & (PSSCR_EC | PSSCR_ESL)
>
> > + andi. r3, r3, PSSCR_RL_MASK /* r3 = requested stop state */
>
> r3 = psscr & RL_MASK (requested mask).
>
> Why do we do and andis. followed by andi. and a compdi below?
Do you mean why are we not using the CR0 value instead of using cmpdi
again ? Hmm.. The subsequent code expect r3 to contain only the RL
value. So, how about the following?
andi. r4, r3, PSSCR_RL_MASK;
andis. r3, r3, PSSCR_EC_ESL_MASK_SHIFTED;
mr r3, r4;
bne 1f;
>
> > + cmpdi r4, 0
>
> r4 == 0 implies we either both PSSCR_EC|ESL are cleared.
> I am not sure if our checks for EC are well defined/implemented.
> Should we worry about EC at all at this point?
Yes, we need to check the value of EC. Because if EC == 0, that
implies that the hardware will wake up from the stop instruction at
the subsequent instruction which we need to handle. This behaviour is
only available from POWER9 onwards, since on POWER8, the wakeup from
nap,sleep and winkle were always at 0x100. Hence the existing code
assumes that all the wakeups are at 0x100, which is what this patch
modifies.
>
> > + bne 1f
> > + IDLE_STATE_ENTER_SEQ(PPC_STOP)
> > + li r3,0 /* Since we didn't lose state, return 0 */
> > + b pnv_wakeup_noloss
> > +/*
> > * Check if the requested state is a deep idle state.
> > */
> > - LOAD_REG_ADDRBASE(r5,pnv_first_deep_stop_state)
> > +1: LOAD_REG_ADDRBASE(r5,pnv_first_deep_stop_state)
> > ld r4,ADDROFF(pnv_first_deep_stop_state)(r5)
> > cmpd r3,r4
> > bge 2f
> > @@ -353,16 +361,17 @@ ALT_FTR_SECTION_END_NESTED_IFSET(CPU_FTR_ARCH_207S, 66); \
> > ld r3,ORIG_GPR3(r1); /* Restore original r3 */ \
> > 20: nop;
> >
> > -
>
> Spurious change?
There were two empty lines for no particular reason. So got rid of one
of them.
>
> > /*
> > - * r3 - requested stop state
> > + * r3 - The PSSCR value corresponding to the stop state.
> > + * r4 - The PSSCR mask corrresonding to the stop state.
> > */
> > _GLOBAL(power9_idle_stop)
> > - LOAD_REG_IMMEDIATE(r4, PSSCR_HV_TEMPLATE)
> > - or r4,r4,r3
> > - mtspr SPRN_PSSCR, r4
> > - li r4, 1
> > + mfspr r5, SPRN_PSSCR
> > + andc r5, r5, r4
> > + or r3, r3, r5
> > + mtspr SPRN_PSSCR, r3
> > LOAD_REG_ADDR(r5,power_enter_stop)
> > + li r4, 1
> > b pnv_powersave_common
> > /* No return */
> > /*
[..snip..]
> > @@ -253,9 +259,11 @@ static void power9_idle(void)
> > u64 pnv_first_deep_stop_state = MAX_STOP_STATE;
> >
> > /*
> > - * Deepest stop idle state. Used when a cpu is offlined
> > + * psscr value and mask of the deepest stop idle state.
> > + * Used when a cpu is offlined.
> > */
> > -u64 pnv_deepest_stop_state;
> > +u64 pnv_deepest_stop_psscr_val;
> > +u64 pnv_deepest_stop_psscr_mask;
> >
> > /*
> > * Power ISA 3.0 idle initialization.
> > @@ -302,28 +310,58 @@ static int __init pnv_arch300_idle_init(struct device_node *np, u32 *flags,
> > int dt_idle_states)
>
> In some cases we say power9 and arch300 in others, not related to
> > this patchset, but just a generic comment
Will see if I can make this consistent.
[..snip..]
> > @@ -333,12 +371,27 @@ static int __init pnv_arch300_idle_init(struct device_node *np, u32 *flags,
> > (pnv_first_deep_stop_state > psscr_rl))
> > pnv_first_deep_stop_state = psscr_rl;
> >
> > - if (pnv_deepest_stop_state < psscr_rl)
> > - pnv_deepest_stop_state = psscr_rl;
> > - }
> > + if (max_residency_ns < residency_ns[i]) {
> > + max_residency_ns = residency_ns[i];
> > + pnv_deepest_stop_psscr_val =
> > + compute_psscr_val(psscr_val[i], psscr_mask[i]);
> > + pnv_deepest_stop_psscr_mask =
> > + compute_psscr_mask(psscr_mask[i]);
> > + }
> >
>
> Does it make sense to have them sorted and then use the last value
> from the array?
Yes, if the firmware can be relied upon to do this, we can obtain the
deepest_stop_psscr_val and the mask in constant time.
However, this init function is called only once during the boot, and
we are anyway iterating over all the idle states to find the first
deep stop state and the default stop state. So the optimization for
deepest_stop_psscr_val and mask may not gain us much.
>
>
> Balbir Singh
>
--
Thanks and Regards
gautham.
^ permalink raw reply
* Re: [PATCH 2/6] clk: sunxi-ng: set the parent rate when adjustin CPUX clock on A33
From: Maxime Ripard @ 2016-12-14 9:21 UTC (permalink / raw)
To: Icenowy Zheng
Cc: devicetree@vger.kernel.org, Quentin Schulz, Michael Turquette,
Stephen Boyd, Russell King, linux-kernel@vger.kernel.org,
Hans de Goede, Chen-Yu Tsai, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Jorik Jonker
In-Reply-To: <306991481662454@web33j.yandex.ru>
[-- Attachment #1.1: Type: text/plain, Size: 733 bytes --]
On Wed, Dec 14, 2016 at 04:54:14AM +0800, Icenowy Zheng wrote:
>
>
> 13.12.2016, 23:44, "Maxime Ripard" <maxime.ripard@free-electrons.com>:
> > On Tue, Dec 13, 2016 at 11:22:48PM +0800, Icenowy Zheng wrote:
> >> The CPUX clock on A33, which is for the Cortex-A7 cores, is designed to
> >> be changeable by changing the rate of PLL_CPUX.
> >>
> >> Add CLK_SET_RATE_PARENT flag to this clock.
> >>
> >> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
> >
> > Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>
> Excuse me, have you merged this patch?
Yes, sorry, that's what I meant :)
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: clk: clk-mstp has never worked for RZ/A1
From: Geert Uytterhoeven @ 2016-12-14 9:25 UTC (permalink / raw)
To: Chris Brandt
Cc: linux-renesas-soc@vger.kernel.org, geert+renesas@glider.be,
devicetree@vger.kernel.org
In-Reply-To: <SG2PR06MB1165A4A8A555A3176D0C4ED98A9A0@SG2PR06MB1165.apcprd06.prod.outlook.com>
Hi Chris,
CC devicetree
On Wed, Dec 14, 2016 at 3:14 AM, Chris Brandt <Chris.Brandt@renesas.com> wrote:
> Today I realized that the clock control using clk-mstp has never actually worked for RZ/A1 (r7s72100).
Oops... Where did your (offlist) bug report for rspi needing a delay after
clock enable come from?
> The reason is that the MSTP registers are 8-bit instead of the normal 32-bit, and if you do a 32-bit write to them, nothing happens.
> If you look in drivers/clk/renesas/clk-mstp.c, you'll see that clk_readl and clk_writel are used.
I was aware the registers are documented to be 8-bit wide, but I always
assumed 32-bit accesses do work.
> The reason why I have gotten this far is because u-boot has been enabling everything early in boot, so all the clocks were already on.
> Of course if I disable everything again before I booting the kernel....nothing works.
Oops, I only have MSTP early disable debug code for boards I do have
physical access to (cfr. my topic/renesas-debug branch)...
> If I change the accesses in clk-mspt.c to 8-bit, clocks get enabled/disabled as they should.
> #define clk_readl readb
> #define clk_writel writeb
>
>
> So, any suggestions on the best way to fix this???
> Ideally I would like something that can easily be integrated back into 4.9.x
>
>
>
> Maybe add a new DT property named "reg_width":
>
> mstp3_clks: mstp3_clks@fcfe0420 {
> #clock-cells = <1>;
> compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
> reg = <0xfcfe0420 4>;
> reg_width = 8;
> clocks = <&p0_clk>;
> clock-indices = <R7S72100_CLK_MTU2>;
> clock-output-names = "mtu2";
> };
>
> and then in cpg_mstp_clocks_init(), do:
>
> if (of_find_property(np, "reg_width", &i))
> group->reg_width = i;
> else
> group->reg_width = 32; /* default */
>
>
> In cpg_mstp_clock_endisable(), do:
>
> if (group->reg_width == 8)
> writeb(value, group->smstpcr);
> else
> clk_writel(value, group->smstpcr);
That's one option. Note that the standard name for such property seems to be
"reg-io-width".
Another option is to let the driver bind against
"renesas,r7s72100-mstp-clocks", and switch to 8-bit access mode.
CLK_OF_DECLARE(cpg_mstp_clks, "renesas,r7s72100-mstp-clocks",
cpg_mstp_clocks_init8);
cpg_mstp_clocks_init8() can set a gloal flag, and call cpg_mstp_clocks_init().
The latter means no DT update is needed, and thus preserves compatibility
with old DTBs.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* RE: [PATCH] arm/dts: ls1021a: Add dma-coherent property to usb3 node
From: Jerry Huang @ 2016-12-14 9:44 UTC (permalink / raw)
To: Jerry Huang, robh+dt@kernel.org, mark.rutland@arm.com,
linux@armlinux.org.uk
Cc: devicetree@vger.kernel.org, Rajesh Bhagat,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <1479885324-5468-1-git-send-email-jerry.huang@nxp.com>
> -----Original Message-----
> From: Changming Huang [mailto:jerry.huang@nxp.com]
> Sent: Wednesday, November 23, 2016 3:15 PM
> To: robh+dt@kernel.org; mark.rutland@arm.com; linux@armlinux.org.uk
> Cc: devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; Jerry Huang <jerry.huang@nxp.com>; Rajesh
> Bhagat <rajesh.bhagat@nxp.com>
> Subject: [PATCH] arm/dts: ls1021a: Add dma-coherent property to usb3 node
>
> This sets dma ops as coherent for usb 3.0 platform device
>
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
> ---
> arch/arm/boot/dts/ls1021a.dtsi | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
> index 368e219..81fb4d9 100644
> --- a/arch/arm/boot/dts/ls1021a.dtsi
> +++ b/arch/arm/boot/dts/ls1021a.dtsi
> @@ -627,6 +627,7 @@
> dr_mode = "host";
> snps,quirk-frame-length-adjustment = <0x20>;
> snps,dis_rxdet_inp3_quirk;
> + dma-coherent;
> };
>
> pcie@3400000 {
> --
How about this property for usb? Any comment for it?
^ permalink raw reply
* Re: [RFT PATCH] ARM64: dts: meson-gxbb: Add reserved memory zone and usable memory range
From: Neil Armstrong @ 2016-12-14 9:52 UTC (permalink / raw)
To: Heinrich Schuchardt, khilman, carlo
Cc: linux-amlogic, linux-arm-kernel, linux-kernel, devicetree
In-Reply-To: <09bb78ed-c8ec-d21f-d464-16e55c481d4e@gmx.de>
On 12/12/2016 10:22 PM, Heinrich Schuchardt wrote:
> On 12/12/2016 11:18 AM, Neil Armstrong wrote:
>> The Amlogic Meson GXBB secure monitor uses part of the memory space, this
>> patch adds these reserved zones and redefines the usable memory range for
>> each boards.
>>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>> arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 2 +-
>> arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 21 +++++++++++++++++++++
>> .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 2 +-
>> arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +-
>> arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 2 +-
>> .../boot/dts/amlogic/meson-gxbb-vega-s95-meta.dts | 2 +-
>> .../boot/dts/amlogic/meson-gxbb-vega-s95-pro.dts | 2 +-
>> .../boot/dts/amlogic/meson-gxbb-vega-s95-telos.dts | 2 +-
>> .../boot/dts/amlogic/meson-gxl-nexbox-a95x.dts | 2 +-
>> .../arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts | 2 +-
>> arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 2 +-
>> 11 files changed, 31 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
>> index 7a078be..ac40b2d 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
>> @@ -56,7 +56,7 @@
>>
>> memory@0 {
>> device_type = "memory";
>> - reg = <0x0 0x0 0x0 0x80000000>;
>> + reg = <0x0 0x1000000 0x0 0x7f000000>;
>> };
>>
>> vddio_boot: regulator-vddio_boot {
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> index fc033c0..e085588 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
>> @@ -55,6 +55,27 @@
>> #address-cells = <2>;
>> #size-cells = <2>;
>>
>> + reserved-memory {
>> + #address-cells = <2>;
>> + #size-cells = <2>;
>> + ranges;
>> +
>> + secos: secos {
>> + reg = <0x0 0x05300000 0x0 0x2000000>;
>> + no-map;
>> + };
>
> Hello Neil,
>
> In
> https://github.com/hardkernel/linux/blob/odroidc2-3.14.y/arch/arm64/boot/dts/meson64_odroidc2.dts
> the secos region does not exist. In linux-next I find no reference to
> the secos label. Where is the consumer of the region defined?
>
>> +
>> + pstore: pstore {
>> + reg = <0x0 0x07300000 0x0 0x100000>;
>> + no-map;
>> + };
>
> In
> https://github.com/hardkernel/linux/blob/odroidc2-3.14.y/arch/arm64/boot/dts/amlogic/gxbb_skt.dts
> and other files pstore uses a different position
> (reg = <0x0 0x20000000 0x0 0x100000>;).
> Why are we moving this?
> Should this region be marked
> compatible = "ramoops"; ?
> Cf. Documentation/devicetree/bindings/reserved-memory/ramoops.txt.
>
> It would be nice if you could add a short description of each reserved
> area to the commit message.
>
> Regards
>
> Heinrich Schuchardt
>
>> +
>> + secmon: secmon {
>> + reg = <0x0 0x10000000 0x0 0x200000>;
>> + no-map;
>> + };
>> + };
>> +
>> cpus {
>> #address-cells = <0x2>;
>> #size-cells = <0x0>;
>
>
Hi Heinrich,
Thanks for testing and for the report,
we are still struggling into finding what are these zones and how to label them correctly.
We need to identify the zones on all boards, the patch I provided works on a non-odroid-c2 and gxm and gxl boards.
Neil
^ permalink raw reply
* Re: [PATCH v7 4/5] ARM: dts: da850-lcdk: add the vga-bridge node
From: Tomi Valkeinen @ 2016-12-14 9:54 UTC (permalink / raw)
To: Bartosz Golaszewski, Jyri Sarha, David Airlie, Kevin Hilman,
Michael Turquette, Sekhar Nori, Rob Herring, Frank Rowand,
Mark Rutland, Laurent Pinchart, Peter Ujfalusi, Russell King,
Maxime Ripard
Cc: linux-devicetree, linux-drm, LKML, arm-soc
In-Reply-To: <1481623759-12786-5-git-send-email-bgolaszewski@baylibre.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 551 bytes --]
On 13/12/16 12:09, Bartosz Golaszewski wrote:
> Add the vga-bridge node to the board DT together with corresponding
> ports and vga connector. This allows to retrieve the edid info from
> the display automatically.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> arch/arm/boot/dts/da850-lcdk.dts | 51 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* Re: [PATCH v7 1/5] ARM: dts: da850: rename the display node label
From: Tomi Valkeinen @ 2016-12-14 9:57 UTC (permalink / raw)
To: Bartosz Golaszewski, Jyri Sarha, David Airlie, Kevin Hilman,
Michael Turquette, Sekhar Nori, Rob Herring, Frank Rowand,
Mark Rutland, Laurent Pinchart, Peter Ujfalusi, Russell King,
Maxime Ripard
Cc: linux-devicetree, linux-drm, LKML, arm-soc
In-Reply-To: <1481623759-12786-2-git-send-email-bgolaszewski@baylibre.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 882 bytes --]
On 13/12/16 12:09, Bartosz Golaszewski wrote:
> The tilcdc node name is 'display' as per the ePAPR 1.1 recommendation.
> The label is also 'display', but change it to 'lcdc' to make it clear
> what the underlying hardware is.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
> arch/arm/boot/dts/da850.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
> index 104155d..6b0ef3d 100644
> --- a/arch/arm/boot/dts/da850.dtsi
> +++ b/arch/arm/boot/dts/da850.dtsi
> @@ -458,7 +458,7 @@
> dma-names = "tx", "rx";
> };
>
> - display: display@213000 {
> + lcdc: display@213000 {
> compatible = "ti,da850-tilcdc";
> reg = <0x213000 0x1000>;
> interrupts = <52>;
>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* [PATCH v2 0/2] iio: adc: hx711: Add IIO driver for AVIA HX711 ADC
From: Andreas Klinger @ 2016-12-14 9:59 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-iio-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ, jic23-DgEjT+Ai2ygdnm+yROfE0A,
knaack.h-Mmb7MZpHnFY, lars-Qo5EllUWu/uELgA04lAiVw,
pmeerw-jW+XmwGofnusTnJN9+BGXg, ak-n176/SwNRljddJNmlsFzeA
This series adds IIO driver support for the AVIA HX711 ADC which is
mostly used in weighting cells.
The first patch adds the new DT binding for which a new vendor avia
was also added.
The second patch is the simple IIO driver implemented as ADC.
The protocol is specific to this device and implemented using GPIO's.
Documentation of the chip can be found here:
https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf
Changes:
Lots of updates thanks to Peters review.
* Patch 1: "iio: adc: hx711: Add DT binding for avia,hx711"
- typo
- removed unneded section
* Patch 2: "iio: adc: hx711: Add IIO driver for AVIA HX711"
- updated help text in Kconfig
- removed dead code
- removed unused power management
- reduced channel spec to what is actually used
- added error handling in case reset of chip not possible
Andreas Klinger (2):
iio: adc: hx711: Add DT binding for avia,hx711
iio: adc: hx711: Add IIO driver for AVIA HX711
.../devicetree/bindings/iio/adc/avia-hx711.txt | 21 ++
.../devicetree/bindings/vendor-prefixes.txt | 1 +
drivers/iio/adc/Kconfig | 18 ++
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/hx711.c | 231 +++++++++++++++++++++
5 files changed, 272 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
create mode 100644 drivers/iio/adc/hx711.c
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH v2 1/2] iio: adc: hx711: Add DT binding for avia,hx711
From: Andreas Klinger @ 2016-12-14 9:59 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-iio-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ, jic23-DgEjT+Ai2ygdnm+yROfE0A,
knaack.h-Mmb7MZpHnFY, lars-Qo5EllUWu/uELgA04lAiVw,
pmeerw-jW+XmwGofnusTnJN9+BGXg, ak-n176/SwNRljddJNmlsFzeA
Add DT bindings for avia,hx711
Add vendor avia to vendor list
Signed-off-by: Andreas Klinger <ak-n176/SwNRljddJNmlsFzeA@public.gmane.org>
---
.../devicetree/bindings/iio/adc/avia-hx711.txt | 21 +++++++++++++++++++++
.../devicetree/bindings/vendor-prefixes.txt | 1 +
2 files changed, 22 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
diff --git a/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt b/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
new file mode 100644
index 000000000000..6a4659fc7a4f
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
@@ -0,0 +1,21 @@
+* AVIA HX711 ADC chip for weight cells
+ Bit-banging driver
+
+Required properties:
+ - compatible: Should be "avia,hx711"
+ - sck-gpios: Definition of the GPIO for the clock
+ - dout-gpios: Definition of the GPIO for data-out
+ See Documentation/devicetree/bindings/gpio/gpio.txt
+
+Recommended properties:
+ - gain: Gain select, can be 32, 64 or 128
+ default is 128
+
+Example:
+weight@0 {
+ compatible = "avia,hx711";
+ sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>;
+ dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+ gain = <32>
+};
+
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 44ddc980b085..4696bb5c2198 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -32,6 +32,7 @@ atlas Atlas Scientific LLC
atmel Atmel Corporation
auo AU Optronics Corporation
avago Avago Technologies
+avia avia semiconductor
avic Shanghai AVIC Optoelectronics Co., Ltd.
axis Axis Communications AB
boe BOE Technology Group Co., Ltd.
--
2.1.4
^ permalink raw reply related
* [PATCH v2 2/2] iio: adc: hx711: Add IIO driver for AVIA HX711
From: Andreas Klinger @ 2016-12-14 10:00 UTC (permalink / raw)
To: devicetree, linux-iio
Cc: linux-kernel, robh+dt, pawel.moll, mark.rutland, ijc+devicetree,
galak, jic23, knaack.h, lars, pmeerw, ak
This is the IIO driver for AVIA HX711 ADC which ist mostly used in weighting
cells.
The protocol is quite simple and using GPIO's:
One GPIO is used as clock (SCK) while another GPIO is read (DOUT)
The raw value read from the chip is delivered.
To get a weight one needs to subtract the zero offset and scale it.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
---
drivers/iio/adc/Kconfig | 18 ++++
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/hx711.c | 231 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 250 insertions(+)
create mode 100644 drivers/iio/adc/hx711.c
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index 932de1f9d1e7..918f582288c9 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -205,6 +205,24 @@ config HI8435
This driver can also be built as a module. If so, the module will be
called hi8435.
+config HX711
+ tristate "AVIA HX711 ADC for weight cells"
+ depends on GPIOLIB
+ help
+ If you say yes here you get support for AVIA HX711 ADC which is used
+ for weight cells
+
+ This driver uses two GPIOs, one for setting the clock and the other
+ one for getting the data
+
+ Currently the raw value is read from the chip and delivered.
+ For getting an actual weight one needs to subtract the
+ zero offset and multiply by a scale factor.
+ This should be done in userspace.
+
+ This driver can also be built as a module. If so, the module will be
+ called hx711.
+
config INA2XX_ADC
tristate "Texas Instruments INA2xx Power Monitors IIO driver"
depends on I2C && !SENSORS_INA2XX
diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile
index b1aa456e6af3..d46e289900ef 100644
--- a/drivers/iio/adc/Makefile
+++ b/drivers/iio/adc/Makefile
@@ -21,6 +21,7 @@ obj-$(CONFIG_CC10001_ADC) += cc10001_adc.o
obj-$(CONFIG_DA9150_GPADC) += da9150-gpadc.o
obj-$(CONFIG_EXYNOS_ADC) += exynos_adc.o
obj-$(CONFIG_HI8435) += hi8435.o
+obj-$(CONFIG_HX711) += hx711.o
obj-$(CONFIG_IMX7D_ADC) += imx7d_adc.o
obj-$(CONFIG_INA2XX_ADC) += ina2xx-adc.o
obj-$(CONFIG_LP8788_ADC) += lp8788_adc.o
diff --git a/drivers/iio/adc/hx711.c b/drivers/iio/adc/hx711.c
new file mode 100644
index 000000000000..420f9451f3d1
--- /dev/null
+++ b/drivers/iio/adc/hx711.c
@@ -0,0 +1,231 @@
+/*
+ * HX711: analog to digital converter for weight sensor module
+ *
+ * Copyright (c) 2016 Andreas Klinger <ak@it-klinger.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+#include <linux/err.h>
+#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/property.h>
+#include <linux/slab.h>
+#include <linux/sched.h>
+#include <linux/delay.h>
+#include <linux/iio/iio.h>
+
+#define HX711_GAIN_32 2 /* gain = 32 for channel B */
+#define HX711_GAIN_64 3 /* gain = 64 for channel A */
+#define HX711_GAIN_128 1 /* gain = 128 for channel A */
+
+struct hx711_data {
+ struct device *dev;
+ struct gpio_desc *gpiod_sck;
+ struct gpio_desc *gpiod_dout;
+ int gain_pulse;
+ struct mutex lock;
+};
+
+static int hx711_reset(struct hx711_data *hx711_data)
+{
+ int i, val;
+
+ val = gpiod_get_value(hx711_data->gpiod_dout);
+ if (val) {
+ gpiod_set_value(hx711_data->gpiod_sck, 1);
+ udelay(80);
+ gpiod_set_value(hx711_data->gpiod_sck, 0);
+
+ for (i = 0; i < 1000; i++) {
+ val = gpiod_get_value(hx711_data->gpiod_dout);
+ if (!val)
+ break;
+ /* sleep at least 1 ms */
+ msleep(1);
+ }
+ }
+
+ return val;
+}
+
+static int hx711_cycle(struct hx711_data *hx711_data)
+{
+ int val;
+
+ /* if preempted for more then 60us while SCK is high:
+ * hx711 is going in reset
+ * ==> measuring is false
+ */
+ preempt_disable();
+ gpiod_set_value(hx711_data->gpiod_sck, 1);
+ val = gpiod_get_value(hx711_data->gpiod_dout);
+ gpiod_set_value(hx711_data->gpiod_sck, 0);
+ preempt_enable();
+
+ return val;
+}
+
+static int hx711_read(struct hx711_data *hx711_data)
+{
+ int i, ret;
+ int value = 0;
+
+ if (hx711_reset(hx711_data)) {
+ dev_err(hx711_data->dev, "reset failed!");
+ return -1;
+ }
+
+ for (i = 0; i < 24; i++) {
+ value <<= 1;
+ ret = hx711_cycle(hx711_data);
+ if (ret)
+ value++;
+ }
+
+ value ^= 0x800000;
+
+ for (i = 0; i < hx711_data->gain_pulse; i++)
+ ret = hx711_cycle(hx711_data);
+
+ return value;
+}
+
+static int hx711_read_raw(struct iio_dev *iio_dev,
+ const struct iio_chan_spec *chan,
+ int *val, int *val2, long mask)
+{
+ struct hx711_data *hx711_data = iio_priv(iio_dev);
+
+ switch (mask) {
+ case IIO_CHAN_INFO_RAW:
+ switch (chan->type) {
+ case IIO_VOLTAGE:
+ mutex_lock(&hx711_data->lock);
+ *val = hx711_read(hx711_data);
+ mutex_unlock(&hx711_data->lock);
+ return IIO_VAL_INT;
+ default:
+ return -EINVAL;
+ }
+ default:
+ return -EINVAL;
+ }
+}
+
+static const struct iio_info hx711_iio_info = {
+ .driver_module = THIS_MODULE,
+ .read_raw = hx711_read_raw,
+};
+
+static const struct iio_chan_spec hx711_chan_spec[] = {
+ { .type = IIO_VOLTAGE,
+ .info_mask_separate =
+ BIT(IIO_CHAN_INFO_RAW),
+ },
+};
+
+static int hx711_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct device_node *node = dev->of_node;
+ struct hx711_data *hx711_data = NULL;
+ struct iio_dev *iio;
+ int ret = 0, ival;
+
+ iio = devm_iio_device_alloc(dev, sizeof(struct hx711_data));
+ if (!iio) {
+ dev_err(dev, "failed to allocate IIO device\n");
+ return -ENOMEM;
+ }
+
+ hx711_data = iio_priv(iio);
+ hx711_data->dev = dev;
+
+ mutex_init(&hx711_data->lock);
+
+ hx711_data->gpiod_sck = devm_gpiod_get(dev, "sck", GPIOD_OUT_HIGH);
+ if (IS_ERR(hx711_data->gpiod_sck)) {
+ dev_err(dev, "failed to get sck-gpiod: err=%ld\n",
+ PTR_ERR(hx711_data->gpiod_sck));
+ return PTR_ERR(hx711_data->gpiod_sck);
+ }
+
+ hx711_data->gpiod_dout = devm_gpiod_get(dev, "dout", GPIOD_OUT_HIGH);
+ if (IS_ERR(hx711_data->gpiod_dout)) {
+ dev_err(dev, "failed to get dout-gpiod: err=%ld\n",
+ PTR_ERR(hx711_data->gpiod_dout));
+ return PTR_ERR(hx711_data->gpiod_dout);
+ }
+
+ of_property_read_u32 (node, "gain", &ival);
+ switch (ival) {
+ case 32:
+ hx711_data->gain_pulse = HX711_GAIN_32;
+ break;
+ case 64:
+ hx711_data->gain_pulse = HX711_GAIN_64;
+ break;
+ default:
+ hx711_data->gain_pulse = HX711_GAIN_128;
+ }
+ dev_dbg(hx711_data->dev, "gain: %d\n", hx711_data->gain_pulse);
+
+ ret = gpiod_direction_input(hx711_data->gpiod_dout);
+ if (ret < 0) {
+ dev_err(hx711_data->dev, "gpiod_direction_input: %d\n", ret);
+ return ret;
+ }
+
+ ret = gpiod_direction_output(hx711_data->gpiod_sck, 0);
+ if (ret < 0) {
+ dev_err(hx711_data->dev, "gpiod_direction_output: %d\n", ret);
+ return ret;
+ }
+
+ platform_set_drvdata(pdev, iio);
+
+ iio->name = pdev->name;
+ iio->dev.parent = &pdev->dev;
+ iio->info = &hx711_iio_info;
+ iio->modes = INDIO_DIRECT_MODE;
+ iio->channels = hx711_chan_spec;
+ iio->num_channels = ARRAY_SIZE(hx711_chan_spec);
+
+ return devm_iio_device_register(dev, iio);
+}
+
+static const struct of_device_id of_hx711_match[] = {
+ { .compatible = "avia,hx711", },
+ {},
+};
+
+MODULE_DEVICE_TABLE(of, of_hx711_match);
+
+static struct platform_driver hx711_driver = {
+ .probe = hx711_probe,
+ .driver = {
+ .name = "hx711-gpio",
+ .of_match_table = of_hx711_match,
+ },
+};
+
+module_platform_driver(hx711_driver);
+
+MODULE_AUTHOR("Andreas Klinger <ak@it-klinger.de>");
+MODULE_DESCRIPTION("HX711 bitbanging driver - ADC for weight cells");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:hx711-gpio");
+
--
2.1.4
^ permalink raw reply related
* [PATCH] ARM: dts: sunxi: Change node name for pwrseq pin on Olinuxino-lime2-emmc
From: Emmanuel Vadot @ 2016-12-14 10:08 UTC (permalink / raw)
To: robh+dt, mark.rutland, @armlinux.org.uk, maxime.ripard, wens
Cc: devicetree, linux-arm-kernel, linux-kernel, Emmanuel Vadot
The node name for the power seq pin is mmc2@0 like the mmc2_pins_a one.
This makes the original node (mmc2_pins_a) scrapped out of the dtb and
result in a unusable eMMC if U-Boot didn't configured the pins to the
correct functions.
Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
---
arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
index 5ea4915..68cb1b5 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
@@ -56,7 +56,7 @@
};
&pio {
- mmc2_pins_nrst: mmc2@0 {
+ mmc2_pins_nrst: mmc2@1 {
allwinner,pins = "PC16";
allwinner,function = "gpio_out";
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
--
2.9.2
^ permalink raw reply related
* Re: [PATCH v2 1/2] iio: adc: hx711: Add DT binding for avia,hx711
From: Lars-Peter Clausen @ 2016-12-14 10:11 UTC (permalink / raw)
To: Andreas Klinger, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-iio-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ, jic23-DgEjT+Ai2ygdnm+yROfE0A,
knaack.h-Mmb7MZpHnFY, pmeerw-jW+XmwGofnusTnJN9+BGXg
In-Reply-To: <20161214095945.GA26511@andreas>
On 12/14/2016 10:59 AM, Andreas Klinger wrote:
> Add DT bindings for avia,hx711
> Add vendor avia to vendor list
>
> Signed-off-by: Andreas Klinger <ak-n176/SwNRljddJNmlsFzeA@public.gmane.org>
> ---
> .../devicetree/bindings/iio/adc/avia-hx711.txt | 21 +++++++++++++++++++++
> .../devicetree/bindings/vendor-prefixes.txt | 1 +
> 2 files changed, 22 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt b/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
> new file mode 100644
> index 000000000000..6a4659fc7a4f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
> @@ -0,0 +1,21 @@
> +* AVIA HX711 ADC chip for weight cells
> + Bit-banging driver
> +
> +Required properties:
> + - compatible: Should be "avia,hx711"
> + - sck-gpios: Definition of the GPIO for the clock
> + - dout-gpios: Definition of the GPIO for data-out
> + See Documentation/devicetree/bindings/gpio/gpio.txt
> +
> +Recommended properties:
> + - gain: Gain select, can be 32, 64 or 128
> + default is 128
If the gain is software programmable it should be exposed by the driver
allowing the application to change it rather than putting it in the devicetree.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH 0/3] Add and export clk-480m clocks for ehci and ohci on RK3399
From: Xing Zheng @ 2016-12-14 10:11 UTC (permalink / raw)
To: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Cc: Mark Rutland, heiko-4mtYJXux2i+zQB+pC5nmwQ, Catalin Marinas,
Shawn Lin, Will Deacon, Douglas Anderson, Chris Zhong,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Xing Zheng, Brian Norris,
Jianqun Xu, Michael Turquette, Caesar Wang,
devicetree-u79uwXL29TY76Z2rM5mHXA, Elaine Zhang,
dianders-hpIqsD4AKlfQT0dZR+AlfA, Rob Herring, William wu,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Lin Huang,
Stephen Boyd, linux-kernel-u79uwXL29TY76Z2rM5mHXA, David Wu
Hi,
This patches would like to fix the USB suspend block without
the clk-480m clock. Let's add and export them to control them.
Thanks.
William wu (1):
arm64: dts: rockchip: add clk-480m for ehci and ohci of rk3399
Xing Zheng (2):
clk: rockchip: rk3399: add USBPHYx_480M_SRC clock IDs
clk: rockchip: rk3399: export 480M_SRC clocks id for usbphy0/usbphy1
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 28 ++++++++++++++++++++--------
drivers/clk/rockchip/clk-rk3399.c | 4 ++--
include/dt-bindings/clock/rk3399-cru.h | 2 ++
3 files changed, 24 insertions(+), 10 deletions(-)
--
2.7.4
^ permalink raw reply
* [PATCH 1/3] clk: rockchip: rk3399: add USBPHYx_480M_SRC clock IDs
From: Xing Zheng @ 2016-12-14 10:11 UTC (permalink / raw)
To: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, Lin Huang,
Xing Zheng, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
dianders-hpIqsD4AKlfQT0dZR+AlfA, Rob Herring, Chris Zhong,
heiko-4mtYJXux2i+zQB+pC5nmwQ
In-Reply-To: <1481710301-1454-1-git-send-email-zhengxing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
This patch add two clock IDs for the usb phy 480m source clocks.
Signed-off-by: Xing Zheng <zhengxing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
include/dt-bindings/clock/rk3399-cru.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/dt-bindings/clock/rk3399-cru.h b/include/dt-bindings/clock/rk3399-cru.h
index 220a60f..224daf7 100644
--- a/include/dt-bindings/clock/rk3399-cru.h
+++ b/include/dt-bindings/clock/rk3399-cru.h
@@ -132,6 +132,8 @@
#define SCLK_RMII_SRC 166
#define SCLK_PCIEPHY_REF100M 167
#define SCLK_DDRC 168
+#define SCLK_USBPHY0_480M_SRC 169
+#define SCLK_USBPHY1_480M_SRC 170
#define DCLK_VOP0 180
#define DCLK_VOP1 181
--
2.7.4
^ permalink raw reply related
* [PATCH 3/3] arm64: dts: rockchip: add clk-480m for ehci and ohci of rk3399
From: Xing Zheng @ 2016-12-14 10:11 UTC (permalink / raw)
To: linux-rockchip
Cc: dianders, heiko, William wu, Xing Zheng, Rob Herring,
Mark Rutland, Catalin Marinas, Will Deacon, Douglas Anderson,
Caesar Wang, Brian Norris, Shawn Lin, Jianqun Xu, Elaine Zhang,
David Wu, devicetree, linux-arm-kernel, linux-kernel
In-Reply-To: <1481710301-1454-1-git-send-email-zhengxing@rock-chips.com>
From: William wu <wulf@rock-chips.com>
We found that the suspend process was blocked when it run into
ehci/ohci module due to clk-480m of usb2-phy was disabled.
The root cause is that usb2-phy suspended earlier than ehci/ohci
(usb2-phy will be auto suspended if no devices plug-in). and the
clk-480m provided by it was disabled if no module used. However,
some suspend process related ehci/ohci are base on this clock,
so we should refer it into ehci/ohci driver to prevent this case.
Signed-off-by: William wu <wulf@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
---
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index b65c193..228c764 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -315,8 +315,10 @@
compatible = "generic-ehci";
reg = <0x0 0xfe380000 0x0 0x20000>;
interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH 0>;
- clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>;
- clock-names = "hclk_host0", "hclk_host0_arb";
+ clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>,
+ <&cru SCLK_USBPHY0_480M_SRC>;
+ clock-names = "hclk_host0", "hclk_host0_arb",
+ "usbphy0_480m";
phys = <&u2phy0_host>;
phy-names = "usb";
status = "disabled";
@@ -326,8 +328,12 @@
compatible = "generic-ohci";
reg = <0x0 0xfe3a0000 0x0 0x20000>;
interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH 0>;
- clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>;
- clock-names = "hclk_host0", "hclk_host0_arb";
+ clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>,
+ <&cru SCLK_USBPHY0_480M_SRC>;
+ clock-names = "hclk_host0", "hclk_host0_arb",
+ "usbphy0_480m";
+ phys = <&u2phy0_host>;
+ phy-names = "usb";
status = "disabled";
};
@@ -335,8 +341,10 @@
compatible = "generic-ehci";
reg = <0x0 0xfe3c0000 0x0 0x20000>;
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH 0>;
- clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>;
- clock-names = "hclk_host1", "hclk_host1_arb";
+ clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>,
+ <&cru SCLK_USBPHY1_480M_SRC>;
+ clock-names = "hclk_host1", "hclk_host1_arb",
+ "usbphy1_480m";
phys = <&u2phy1_host>;
phy-names = "usb";
status = "disabled";
@@ -346,8 +354,12 @@
compatible = "generic-ohci";
reg = <0x0 0xfe3e0000 0x0 0x20000>;
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH 0>;
- clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>;
- clock-names = "hclk_host1", "hclk_host1_arb";
+ clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>,
+ <&cru SCLK_USBPHY1_480M_SRC>;
+ clock-names = "hclk_host1", "hclk_host1_arb",
+ "usbphy1_480m";
+ phys = <&u2phy1_host>;
+ phy-names = "usb";
status = "disabled";
};
--
2.7.4
^ permalink raw reply related
* Re: [PATCH v2 1/2] iio: adc: hx711: Add DT binding for avia,hx711
From: Andreas Klinger @ 2016-12-14 10:34 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-iio-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ, jic23-DgEjT+Ai2ygdnm+yROfE0A,
knaack.h-Mmb7MZpHnFY, pmeerw-jW+XmwGofnusTnJN9+BGXg
In-Reply-To: <470f0017-2607-d5bd-bcd3-69f892cdc88b-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
Hi Lars-Peter,
Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org> schrieb am Wed, 14. Dec 11:11:
> On 12/14/2016 10:59 AM, Andreas Klinger wrote:
> > Add DT bindings for avia,hx711
> > Add vendor avia to vendor list
> >
> > Signed-off-by: Andreas Klinger <ak-n176/SwNRljddJNmlsFzeA@public.gmane.org>
> > ---
> > .../devicetree/bindings/iio/adc/avia-hx711.txt | 21 +++++++++++++++++++++
> > .../devicetree/bindings/vendor-prefixes.txt | 1 +
> > 2 files changed, 22 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt b/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
> > new file mode 100644
> > index 000000000000..6a4659fc7a4f
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
> > @@ -0,0 +1,21 @@
> > +* AVIA HX711 ADC chip for weight cells
> > + Bit-banging driver
> > +
> > +Required properties:
> > + - compatible: Should be "avia,hx711"
> > + - sck-gpios: Definition of the GPIO for the clock
> > + - dout-gpios: Definition of the GPIO for data-out
> > + See Documentation/devicetree/bindings/gpio/gpio.txt
> > +
> > +Recommended properties:
> > + - gain: Gain select, can be 32, 64 or 128
> > + default is 128
>
> If the gain is software programmable it should be exposed by the driver
> allowing the application to change it rather than putting it in the devicetree.
>
There is also a hardware dependency in terms of where to connect the input
channel to:
- gain 64 and gain 128 are available only on input channel A
- gain 32 is only available on input channel B
Do you still think, it should be removed from the devicetree?
Andreas
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] ARM: dts: dra72-evm-tps65917: Add voltage supplies to usb_phy, mmc, dss
From: Roger Quadros @ 2016-12-14 11:00 UTC (permalink / raw)
To: Lokesh Vutla, Tony Lindgren, Linux OMAP Mailing List
Cc: devicetree, Sekhar Nori, Carlos Hernandez, Tero Kristo, robh+dt,
Linux ARM Mailing List
In-Reply-To: <20161214085703.506-1-lokeshvutla@ti.com>
Lokesh,
On 14/12/16 10:57, Lokesh Vutla wrote:
> Commit 5d080aa30681 ("ARM: dts: dra72: Add separate dtsi for tps65917")
> added a separate dtsi for dra72-evm-tps65917 moving all the voltage supplies
> to this file. But it missed adding voltage supplies to usb_phy, mmc,
> dss and deleted from dra72-evm-common.dtsi. Adding the voltage supply
> phandles to these nodes in dra72-evm-tps65917.dtsi
>
> Fixes: 5d080aa30681 ("ARM: dts: dra72: Add separate dtsi for tps65917")
> Reported-by: Carlos Hernandez <ceh@ti.com>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
> Logs:
> - DRA72-evm revC: http://pastebin.ubuntu.com/23627665/
> - DRA72-evm revB: http://pastebin.ubuntu.com/23627658/
> arch/arm/boot/dts/dra72-evm-tps65917.dtsi | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/arch/arm/boot/dts/dra72-evm-tps65917.dtsi b/arch/arm/boot/dts/dra72-evm-tps65917.dtsi
> index ee6dac44edf1..e6df676886c0 100644
> --- a/arch/arm/boot/dts/dra72-evm-tps65917.dtsi
> +++ b/arch/arm/boot/dts/dra72-evm-tps65917.dtsi
> @@ -132,3 +132,19 @@
> ti,palmas-long-press-seconds = <6>;
> };
> };
> +
> +&usb2_phy1 {
> + phy-supply = <&ldo4_reg>;
> +};
> +
> +&usb2_phy2 {
> + phy-supply = <&ldo4_reg>;
> +};
> +
> +&dss {
> + vdda_video-supply = <&ldo5_reg>;
> +};
> +
> +&mmc1 {
> + vmmc_aux-supply = <&ldo1_reg>;
> +};
>
Are you sure that all future users of dra72-evm-tps65917.dtsi will use this same configuration?
If not I'd rather put this in the board dts files.
cheers,
-roger
^ permalink raw reply
* Re: [PATCH linux v1 4/4] arm: dts: Add dt-binding to support seven segment display on zaius
From: Russell King - ARM Linux @ 2016-12-14 11:06 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Jaghathiswari Rankappagounder Natarajan,
openbmc-uLR06cmDAlY/bJ5BZ2RsiQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
mark.rutland-5wv7dgnIgG8, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
joel-U3u1mxZcP9KHXe+LvDLADg, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linus.walleij-QSEj5FYQhm4dnm+yROfE0A
In-Reply-To: <10697525.O7CkPN6Gfl@wuerfel>
On Wed, Dec 14, 2016 at 10:00:46AM +0100, Arnd Bergmann wrote:
> On Wednesday, December 14, 2016 9:55:47 AM CET Arnd Bergmann wrote:
> > According to your introductory mail, the interface is assumed to be
> > a 74HC164. Should we use that ID in the compatible string?
> >
> > We can always add other strings later if we want to support multiple
> > wire formats.
>
> Actually, looking up 74hc164, that seems to be a gpio expander,
> so maybe a more flexible way to do the same is to put a driver
> for the expander into drivers/gpio/ and have the main driver
> access the outputs of that using the gpiolib interface.
There already is - drivers/gpio/gpio-74x164.c
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v2 1/2] iio: adc: hx711: Add DT binding for avia,hx711
From: Lars-Peter Clausen @ 2016-12-14 11:18 UTC (permalink / raw)
To: Andreas Klinger
Cc: devicetree, linux-iio, linux-kernel, robh+dt, pawel.moll,
mark.rutland, ijc+devicetree, galak, jic23, knaack.h, pmeerw
In-Reply-To: <20161214103455.GA27362@andreas>
On 12/14/2016 11:34 AM, Andreas Klinger wrote:
> Hi Lars-Peter,
>
> Lars-Peter Clausen <lars@metafoo.de> schrieb am Wed, 14. Dec 11:11:
>> On 12/14/2016 10:59 AM, Andreas Klinger wrote:
>>> Add DT bindings for avia,hx711
>>> Add vendor avia to vendor list
>>>
>>> Signed-off-by: Andreas Klinger <ak@it-klinger.de>
>>> ---
>>> .../devicetree/bindings/iio/adc/avia-hx711.txt | 21 +++++++++++++++++++++
>>> .../devicetree/bindings/vendor-prefixes.txt | 1 +
>>> 2 files changed, 22 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt b/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
>>> new file mode 100644
>>> index 000000000000..6a4659fc7a4f
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
>>> @@ -0,0 +1,21 @@
>>> +* AVIA HX711 ADC chip for weight cells
>>> + Bit-banging driver
>>> +
>>> +Required properties:
>>> + - compatible: Should be "avia,hx711"
>>> + - sck-gpios: Definition of the GPIO for the clock
>>> + - dout-gpios: Definition of the GPIO for data-out
>>> + See Documentation/devicetree/bindings/gpio/gpio.txt
>>> +
>>> +Recommended properties:
>>> + - gain: Gain select, can be 32, 64 or 128
>>> + default is 128
>>
>> If the gain is software programmable it should be exposed by the driver
>> allowing the application to change it rather than putting it in the devicetree.
>>
> There is also a hardware dependency in terms of where to connect the input
> channel to:
> - gain 64 and gain 128 are available only on input channel A
> - gain 32 is only available on input channel B
>
> Do you still think, it should be removed from the devicetree?
I believe so, especially considering that there are two channels and your
driver currently only exposes one of them, which is elected by the gain
configuration. I'd expect that there are use-cases where both inputs are
connected and the application wants to switch between them dynamically at
runtime.
The only tricky part here seems to be that the configuration for the next
conversion is selected on the current conversion. This means you probably
need to do a dummy conversion whenever the settings change.
^ permalink raw reply
* Re: [PATCH linux v1 4/4] arm: dts: Add dt-binding to support seven segment display on zaius
From: Russell King - ARM Linux @ 2016-12-14 11:40 UTC (permalink / raw)
To: Arnd Bergmann
Cc: mark.rutland, Jaghathiswari Rankappagounder Natarajan, devicetree,
gregkh, openbmc, linux-kernel, linux-gpio@vger.kernel.org,
robh+dt, joel, linus.walleij, linux-arm-kernel
In-Reply-To: <20161214110635.GB14217@n2100.armlinux.org.uk>
On Wed, Dec 14, 2016 at 11:06:35AM +0000, Russell King - ARM Linux wrote:
> On Wed, Dec 14, 2016 at 10:00:46AM +0100, Arnd Bergmann wrote:
> > On Wednesday, December 14, 2016 9:55:47 AM CET Arnd Bergmann wrote:
> > > According to your introductory mail, the interface is assumed to be
> > > a 74HC164. Should we use that ID in the compatible string?
> > >
> > > We can always add other strings later if we want to support multiple
> > > wire formats.
> >
> > Actually, looking up 74hc164, that seems to be a gpio expander,
> > so maybe a more flexible way to do the same is to put a driver
> > for the expander into drivers/gpio/ and have the main driver
> > access the outputs of that using the gpiolib interface.
>
> There already is - drivers/gpio/gpio-74x164.c
Looking at this more, it's a SPI driver, presumably because the first
case where it appeared was on a SPI bus.
However, it's not a SPI device as such, it's a piece of standard,
general purpose logic that's been around for many years, pre-dating
the SPI bus.
Now, as for DT, we have this "DT represents the hardware, not the
implementation" edict, which now brings up an interesting problem.
If we want to use this driver in its existing form, we need to:
- declare in DT a spi-gpio driver to provide a SPI bus on the GPIO
pins connected to the 74HC164.
- attach the 74HC164 to the SPI bus.
The problem with that is it's not representative of the hardware -
what we're saying is that we want to reuse our existing implementation
and make DT conform to the implementation. At that point, we might as
well scrap our "DT is implementation independent" edict above.
What if, tomorrow, we end up with 74HC164 connected to via a different
method?
I think a much more sensible approach would be to turn the GPIO side
of the 74x164 driver into a library, which can be re-used by multiple
bus-specific drivers - one for SPI which allows it to be used in its
current form, one for our platform bus which takes the GPIO lines for
the data, clock and clear signals.
I also don't see why they shouldn't use the same compatible - they're
the same _device_ at the end of the day, just wired up differently.
It makes the binding documentation a little fun wrt what are required
and optional properties, but nothing that shouldn't be too difficult.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply
* RE: clk: clk-mstp has never worked for RZ/A1
From: Chris Brandt @ 2016-12-14 11:43 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-renesas-soc@vger.kernel.org, geert+renesas@glider.be,
devicetree@vger.kernel.org
In-Reply-To: <CAMuHMdUJFSbX96pqY2Ogxztxz-SWCNfbe=d3eWKn+eWSdHLwfw@mail.gmail.com>
Hi Geert,
On 12/14/206, Geert Uytterhoeven wrote:
> Oops... Where did your (offlist) bug report for rspi needing a delay after
> clock enable come from?
Because the RSPI driver in our current BSP is almost exactly the same so I was making the assumption that it would be a problem (but I have not tested it yet).
> I was aware the registers are documented to be 8-bit wide, but I always
> assumed 32-bit accesses do work.
At first, I did too.
> Another option is to let the driver bind against "renesas,r7s72100-mstp-
> clocks", and switch to 8-bit access mode.
>
> CLK_OF_DECLARE(cpg_mstp_clks, "renesas,r7s72100-mstp-clocks",
> cpg_mstp_clocks_init8);
>
> cpg_mstp_clocks_init8() can set a gloal flag, and call
> cpg_mstp_clocks_init().
>
> The latter means no DT update is needed, and thus preserves compatibility
> with old DTBs.
I like this idea. I'll code it up and give it a shot.
Thank you.
Chris
^ permalink raw reply
* Re: [PATCH] n900 device tree: cleanup
From: Pali Rohár @ 2016-12-14 12:28 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Tony Lindgren, Pavel Machek, kernel list, linux-arm-kernel,
linux-omap-u79uwXL29TY76Z2rM5mHXA, khilman-DgEjT+Ai2ygdnm+yROfE0A,
aaro.koskinen-X3B1VOXEql0,
ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w,
patrikbachan-Re5JQEeQqe8AvxtiuMwx3w, serge-A9i7LUbDfNHQT0dZR+AlfA,
bcousson-rdvid1DuHRBWk0Htik3J/w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20161207031048.pi7j4dms5uuco3yf@earth>
[-- Attachment #1: Type: Text/Plain, Size: 1500 bytes --]
On Wednesday 07 December 2016 04:10:48 Sebastian Reichel wrote:
> Hi Tony,
>
> It looks like this fell through the cracks. Apart from inconsistent
> patch subject:
>
> Reviewed-By: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Fine for me too. Reviewed-By: Pali Rohár <pali.rohar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> -- Sebastian
>
> On Tue, Oct 11, 2016 at 10:12:43AM +0200, Pavel Machek wrote:
> > Fix GPIO comment to be consistent with rest of file and add comment
> > what tpa6130 is.
> >
> > Signed-off-by: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
> >
> > diff --git a/arch/arm/boot/dts/omap3-n900.dts
> > b/arch/arm/boot/dts/omap3-n900.dts index bfffd6c..ca9fe8c 100644
> > --- a/arch/arm/boot/dts/omap3-n900.dts
> > +++ b/arch/arm/boot/dts/omap3-n900.dts
> > @@ -47,7 +47,7 @@
> >
> > compatible = "gpio-leds";
> > heartbeat {
> >
> > label = "debug::sleep";
> >
> > - gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; /* gpio162 */
> > + gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; /* 162 */
> >
> > linux,default-trigger = "default-on";
> > pinctrl-names = "default";
> > pinctrl-0 = <&debug_leds>;
> >
> > @@ -637,6 +637,7 @@
> >
> > reg = <0x55>;
> >
> > };
> >
> > + /* Stereo headphone amplifier */
> >
> > tpa6130a2: tpa6130a2@60 {
> >
> > compatible = "ti,tpa6130a2";
> > reg = <0x60>;
--
Pali Rohár
pali.rohar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Re: [PATCH linux v1 2/4] drivers: misc: Character device driver for seven segment display
From: Russell King - ARM Linux @ 2016-12-14 12:32 UTC (permalink / raw)
To: Jaghathiswari Rankappagounder Natarajan
Cc: openbmc-uLR06cmDAlY/bJ5BZ2RsiQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
mark.rutland-5wv7dgnIgG8, arnd-r2nGTMty4D4,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
joel-U3u1mxZcP9KHXe+LvDLADg
In-Reply-To: <1481702104-8617-3-git-send-email-jaghu-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
On Tue, Dec 13, 2016 at 11:55:02PM -0800, Jaghathiswari Rankappagounder Natarajan wrote:
> +int seven_seg_setup_cdev(struct seven_seg_disp_dev *disp_dev,
> + void (*update_disp_data)(struct device *, u16 data))
> +{
> + struct device *dev;
> + int err;
> +
> + dev = device_create(seven_seg_disp_class, &disp_dev->parent,
> + seven_seg_devno,
> + NULL, "seven_seg_disp_val");
> + if (dev == NULL)
> + return -1;
Do not use return -1 in kernel code.
> + disp_dev->dev = dev;
> + disp_dev->update_seven_seg_data = update_disp_data;
> + disp_dev->disp_data_valid = false;
> +
> + cdev_init(&disp_dev->cdev, &seven_seg_disp_fops);
> + err = cdev_add(&disp_dev->cdev, seven_seg_devno, 1);
> + if (err)
> + device_destroy(seven_seg_disp_class, seven_seg_devno);
> + return err;
> +}
> +
> +static int __init seven_seg_disp_init(void)
> +{
> + if (alloc_chrdev_region(&seven_seg_devno, 0, 1, "disp_state") < 0)
> + return -1;
Do not use return -1 in kernel code.
> +
> + seven_seg_disp_class = class_create(THIS_MODULE, "disp_state");
> + if (seven_seg_disp_class == NULL)
> + goto unreg_chrdev;
> +
> +unreg_chrdev:
> + unregister_chrdev_region(seven_seg_devno, 1);
> + return -1;
Do not use return -1 in kernel code.
(Look up what an errno value of '1' means. Negative values returned from
functions are interpreted as negated errno values.)
Always propagate error codes, or select an appropriate errno value to
return.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] ARM: dts: dra72-evm-tps65917: Add voltage supplies to usb_phy, mmc, dss
From: Lokesh Vutla @ 2016-12-14 12:35 UTC (permalink / raw)
To: Roger Quadros, Tony Lindgren, Linux OMAP Mailing List
Cc: Tero Kristo, Sekhar Nori, Carlos Hernandez,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA,
Linux ARM Mailing List
In-Reply-To: <2bb73170-dbb5-01a3-5b3a-4d5d9414e3a9-l0cyMroinI0@public.gmane.org>
On Wednesday 14 December 2016 04:30 PM, Roger Quadros wrote:
> Lokesh,
>
> On 14/12/16 10:57, Lokesh Vutla wrote:
>> Commit 5d080aa30681 ("ARM: dts: dra72: Add separate dtsi for tps65917")
>> added a separate dtsi for dra72-evm-tps65917 moving all the voltage supplies
>> to this file. But it missed adding voltage supplies to usb_phy, mmc,
>> dss and deleted from dra72-evm-common.dtsi. Adding the voltage supply
>> phandles to these nodes in dra72-evm-tps65917.dtsi
>>
>> Fixes: 5d080aa30681 ("ARM: dts: dra72: Add separate dtsi for tps65917")
>> Reported-by: Carlos Hernandez <ceh-l0cyMroinI0@public.gmane.org>
>> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
>> Signed-off-by: Lokesh Vutla <lokeshvutla-l0cyMroinI0@public.gmane.org>
>> ---
>> Logs:
>> - DRA72-evm revC: http://pastebin.ubuntu.com/23627665/
>> - DRA72-evm revB: http://pastebin.ubuntu.com/23627658/
>> arch/arm/boot/dts/dra72-evm-tps65917.dtsi | 16 ++++++++++++++++
>> 1 file changed, 16 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/dra72-evm-tps65917.dtsi b/arch/arm/boot/dts/dra72-evm-tps65917.dtsi
>> index ee6dac44edf1..e6df676886c0 100644
>> --- a/arch/arm/boot/dts/dra72-evm-tps65917.dtsi
>> +++ b/arch/arm/boot/dts/dra72-evm-tps65917.dtsi
>> @@ -132,3 +132,19 @@
>> ti,palmas-long-press-seconds = <6>;
>> };
>> };
>> +
>> +&usb2_phy1 {
>> + phy-supply = <&ldo4_reg>;
>> +};
>> +
>> +&usb2_phy2 {
>> + phy-supply = <&ldo4_reg>;
>> +};
>> +
>> +&dss {
>> + vdda_video-supply = <&ldo5_reg>;
>> +};
>> +
>> +&mmc1 {
>> + vmmc_aux-supply = <&ldo1_reg>;
>> +};
>>
>
> Are you sure that all future users of dra72-evm-tps65917.dtsi will use this same configuration?
> If not I'd rather put this in the board dts files.
hmm..This debate already happened when creating dra72-evm-tps65917 file
and concluded that all the common regulator stuff on dra72 evm revA,B,C
should go in this file. Any new board which is not similar to dra72-evm
will not be using this file.
Thanks and regards,
Lokesh
>
> cheers,
> -roger
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH linux v1 0/4] Seven segment display support
From: Thomas Petazzoni @ 2016-12-14 12:45 UTC (permalink / raw)
To: Jaghathiswari Rankappagounder Natarajan
Cc: openbmc-uLR06cmDAlY/bJ5BZ2RsiQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
mark.rutland-5wv7dgnIgG8, linux-I+IVW8TIWO2tmTQ+vhA3Yw,
arnd-r2nGTMty4D4, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
joel-U3u1mxZcP9KHXe+LvDLADg, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1481702104-8617-1-git-send-email-jaghu-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Hello,
On Tue, 13 Dec 2016 23:55:00 -0800, Jaghathiswari Rankappagounder
Natarajan wrote:
> Documentation for the binding which provides an interface for adding clock,
> data and clear signal GPIO lines to control seven segment display.
>
> The platform device driver provides an API for displaying on two 7-segment
> displays, and implements the required bit-banging. The hardware assumed is
> 74HC164 wired to two 7-segment displays.
>
> The character device driver implements the user-space API for letting a user
> write to two 7-segment displays including any conversion methods necessary
> to map the user input to two 7-segment displays.
>
> Adding clock, data and clear signal GPIO lines in the devicetree to control
> seven segment display on zaius platform.
>
> The platform driver matches on the device tree node; the platform driver also
> initializes the character device.
>
> Tested that the seven segment display works properly by writing to the
> character device file on a EVB AST2500 board which also has 74HC164 wired
> to two 7-segment displays.
FWIW, I proposed a driver for seven segment displays back in 2013:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/139986.html
And the feedback from Greg KH was: we don't need a driver for that, do
it from userspace. See:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/139992.html
So: good luck :-)
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox