Message ID | 1395955764-18103-9-git-send-email-carlo@caione.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Mar 28, 2014 at 5:29 AM, Carlo Caione <carlo@caione.org> wrote: > Signed-off-by: Hans de Goede <hdegoede@redhat.com> > Signed-off-by: Carlo Caione <carlo@caione.org> > --- > arch/arm/boot/dts/sun4i-a10-a1000.dts | 13 +++++++++++++ > arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 13 +++++++++++++ > arch/arm/boot/dts/sun4i-a10-hackberry.dts | 19 +++++++++++++++++++ > arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 13 +++++++++++++ > arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 19 +++++++++++++++++++ > arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 19 +++++++++++++++++++ > arch/arm/boot/dts/sun4i-a10-pcduino.dts | 13 +++++++++++++ > arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 14 ++++++++++++++ > arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 15 +++++++++++++++ > arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 14 ++++++++++++++ > 10 files changed, 152 insertions(+) > > diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts > index fa746aea..cf18c4d 100644 > --- a/arch/arm/boot/dts/sun4i-a10-a1000.dts > +++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts > @@ -88,6 +88,19 @@ > pinctrl-names = "default"; > pinctrl-0 = <&i2c0_pins_a>; > status = "okay"; > + #address-cells = <1>; > + #size-cells = <0>; > + > + axp: axp20x@34 { Hi, Sorry for spotting this just now. I suggest you change it to axp209: pmic@34 { or axp209_pmic@34 { to match the ePAPR policy that node names should be generic and describe functionality. The latter is what some DTs use. > + reg = <0x34>; > + interrupts = <0>; > + > + compatible = "x-powers,axp209"; > + interrupt-controller; > + #interrupt-cells = <1>; > + > + /include/ "x-powers-axp209.dtsi" > + }; > }; > }; > [...] Same for all the other files. Thanks for working on this! ChenYu
On Fri, Mar 28, 2014 at 4:12 AM, Chen-Yu Tsai <wens@csie.org> wrote: >> diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts >> index fa746aea..cf18c4d 100644 >> --- a/arch/arm/boot/dts/sun4i-a10-a1000.dts >> +++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts >> @@ -88,6 +88,19 @@ >> pinctrl-names = "default"; >> pinctrl-0 = <&i2c0_pins_a>; >> status = "okay"; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + axp: axp20x@34 { > > Hi, > > Sorry for spotting this just now. I suggest you change it to > > axp209: pmic@34 { > > or > > axp209_pmic@34 { > > to match the ePAPR policy that node names should be generic and > describe functionality. The latter is what some DTs use. Right. Thanks for reviewing this. > Same for all the other files. > > Thanks for working on this! Thank you,
On Thu, Mar 27, 2014 at 10:29:22PM +0100, Carlo Caione wrote: > Signed-off-by: Hans de Goede <hdegoede@redhat.com> > Signed-off-by: Carlo Caione <carlo@caione.org> > --- > arch/arm/boot/dts/sun4i-a10-a1000.dts | 13 +++++++++++++ > arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 13 +++++++++++++ > arch/arm/boot/dts/sun4i-a10-hackberry.dts | 19 +++++++++++++++++++ > arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 13 +++++++++++++ > arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 19 +++++++++++++++++++ > arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 19 +++++++++++++++++++ > arch/arm/boot/dts/sun4i-a10-pcduino.dts | 13 +++++++++++++ > arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 14 ++++++++++++++ > arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 15 +++++++++++++++ > arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 14 ++++++++++++++ > 10 files changed, 152 insertions(+) > > diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts > index fa746aea..cf18c4d 100644 > --- a/arch/arm/boot/dts/sun4i-a10-a1000.dts > +++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts > @@ -88,6 +88,19 @@ > pinctrl-names = "default"; > pinctrl-0 = <&i2c0_pins_a>; > status = "okay"; > + #address-cells = <1>; > + #size-cells = <0>; > + > + axp: axp20x@34 { > + reg = <0x34>; > + interrupts = <0>; > + > + compatible = "x-powers,axp209"; > + interrupt-controller; > + #interrupt-cells = <1>; > + > + /include/ "x-powers-axp209.dtsi" > + }; > }; > }; Actually, you can make the whole thing much more robust by using the &label syntax. Here, you would just include the dtsi at the top of the file, and in the DTSI, you would have something like: &axp209 { regulators { ... } } (Given that the node in your DTS is axp209: pmic@something like Chen-Yu suggested) You don't rely any more on the position of the include, and you use a standard DT syntax.
On Fri, Mar 28, 2014 at 11:11:46AM +0100, Maxime Ripard wrote: > Here, you would just include the dtsi at the top of the file, and in > the DTSI, you would have something like: > &axp209 { > regulators { > ... > } > } Hang on, what is an include file setting up regulators for?
On Fri, Mar 28, 2014 at 11:38:39AM +0000, Mark Brown wrote: > On Fri, Mar 28, 2014 at 11:11:46AM +0100, Maxime Ripard wrote: > > > Here, you would just include the dtsi at the top of the file, and in > > the DTSI, you would have something like: > > > &axp209 { > > regulators { > > ... > > } > > } > > Hang on, what is an include file setting up regulators for? Look at patch 7. To share the regulators declaration across all boards and avoid duplication.
On Fri, Mar 28, 2014 at 01:54:12PM +0100, Maxime Ripard wrote: > On Fri, Mar 28, 2014 at 11:38:39AM +0000, Mark Brown wrote: > > Hang on, what is an include file setting up regulators for? > Look at patch 7. To share the regulators declaration across all boards > and avoid duplication. Oh, wonderful. I'll go and reply to that...
diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts index fa746aea..cf18c4d 100644 --- a/arch/arm/boot/dts/sun4i-a10-a1000.dts +++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts @@ -88,6 +88,19 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp: axp20x@34 { + reg = <0x34>; + interrupts = <0>; + + compatible = "x-powers,axp209"; + interrupt-controller; + #interrupt-cells = <1>; + + /include/ "x-powers-axp209.dtsi" + }; }; }; diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts index 4684cbe..52d21bb 100644 --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts @@ -80,6 +80,19 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp: axp20x@34 { + reg = <0x34>; + interrupts = <0>; + + compatible = "x-powers,axp209"; + interrupt-controller; + #interrupt-cells = <1>; + + /include/ "x-powers-axp209.dtsi" + }; }; i2c1: i2c@01c2b000 { diff --git a/arch/arm/boot/dts/sun4i-a10-hackberry.dts b/arch/arm/boot/dts/sun4i-a10-hackberry.dts index d7c17e4..3960d67 100644 --- a/arch/arm/boot/dts/sun4i-a10-hackberry.dts +++ b/arch/arm/boot/dts/sun4i-a10-hackberry.dts @@ -82,6 +82,25 @@ pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; + + i2c0: i2c@01c2ac00 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp: axp20x@34 { + reg = <0x34>; + interrupts = <0>; + + compatible = "x-powers,axp209"; + interrupt-controller; + #interrupt-cells = <1>; + + /include/ "x-powers-axp209.dtsi" + }; + }; }; reg_emac_3v3: emac-3v3 { diff --git a/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts b/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts index fe9272e..c797f5c 100644 --- a/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts +++ b/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts @@ -34,6 +34,19 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp: axp20x@34 { + reg = <0x34>; + interrupts = <0>; + + compatible = "x-powers,axp209"; + interrupt-controller; + #interrupt-cells = <1>; + + /include/ "x-powers-axp209.dtsi" + }; }; usbphy: phy@01c13400 { diff --git a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts index dd84a9e..c61902d 100644 --- a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts +++ b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts @@ -47,6 +47,25 @@ pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; + + i2c0: i2c@01c2ac00 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp: axp20x@34 { + reg = <0x34>; + interrupts = <0>; + + compatible = "x-powers,axp209"; + interrupt-controller; + #interrupt-cells = <1>; + + /include/ "x-powers-axp209.dtsi" + }; + }; }; reg_usb1_vbus: usb1-vbus { diff --git a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts index 66cf0c7..7e862d6 100644 --- a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts +++ b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts @@ -81,6 +81,25 @@ pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; + + i2c0: i2c@01c2ac00 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp: axp20x@34 { + reg = <0x34>; + interrupts = <0>; + + compatible = "x-powers,axp209"; + interrupt-controller; + #interrupt-cells = <1>; + + /include/ "x-powers-axp209.dtsi" + }; + }; }; leds { diff --git a/arch/arm/boot/dts/sun4i-a10-pcduino.dts b/arch/arm/boot/dts/sun4i-a10-pcduino.dts index 255b47e..8ad0a86 100644 --- a/arch/arm/boot/dts/sun4i-a10-pcduino.dts +++ b/arch/arm/boot/dts/sun4i-a10-pcduino.dts @@ -66,6 +66,19 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp: axp20x@34 { + reg = <0x34>; + interrupts = <0>; + + compatible = "x-powers,axp209"; + interrupt-controller; + #interrupt-cells = <1>; + + /include/ "x-powers-axp209.dtsi" + }; }; }; diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts index 68de89f..c5c91b8 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts @@ -66,6 +66,20 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp: axp20x@34 { + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 8>; + + compatible = "x-powers,axp209"; + interrupt-controller; + #interrupt-cells = <1>; + + /include/ "x-powers-axp209.dtsi" + }; }; i2c1: i2c@01c2b000 { diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts index cb25d3c..a42f5bc 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts @@ -73,6 +73,21 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp: axp20x@34 { + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 8>; + + compatible = "x-powers,axp209"; + interrupt-controller; + #interrupt-cells = <1>; + + /include/ "x-powers-axp209.dtsi" + }; + }; i2c1: i2c@01c2b000 { diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts index eeadf76..63171c4 100644 --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts @@ -95,6 +95,20 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + axp: axp20x@34 { + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 8>; + + compatible = "x-powers,axp209"; + interrupt-controller; + #interrupt-cells = <1>; + + /include/ "x-powers-axp209.dtsi" + }; }; i2c1: i2c@01c2b000 {