Message ID | 1454109558-22800-5-git-send-email-akshay.bhat@timesys.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jan 29, 2016 at 06:19:15PM -0500, Akshay Bhat wrote: > From: Justin Waters <justin.waters@timesys.com> > > Advantech has 3 carrier boards (B450v3, B650v3, B850v3) which use > the Advantech BA-16 module (based on iMX6D). This file has the > devicetree entries that are common to all 3 boards. > > Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com> > Signed-off-by: Justin Waters <justin.waters@timesys.com> > --- > arch/arm/boot/dts/imx6q-bx50v3.dtsi | 239 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 239 insertions(+) > create mode 100644 arch/arm/boot/dts/imx6q-bx50v3.dtsi > > diff --git a/arch/arm/boot/dts/imx6q-bx50v3.dtsi b/arch/arm/boot/dts/imx6q-bx50v3.dtsi > new file mode 100644 > index 0000000..a44b074 > --- /dev/null > +++ b/arch/arm/boot/dts/imx6q-bx50v3.dtsi > @@ -0,0 +1,239 @@ > +/* > + * Copyright 2015 Timesys Corporation. > + * Copyright 2015 General Electric Company > + * > + * This file is dual-licensed: you can use it either under the terms > + * of the GPL or the X11 license, at your option. Note that this dual > + * licensing only applies to this file, and not this project as a > + * whole. > + * > + * a) This file is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * version 2 as published by the Free Software Foundation. > + * > + * This file 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. > + * > + * Or, alternatively > + * > + * b) Permission is hereby granted, free of charge, to any person > + * obtaining a copy of this software and associated documentation > + * files (the "Software"), to deal in the Software without > + * restriction, including without limitation the rights to use > + * copy, modify, merge, publish, distribute, sublicense, and/or > + * sell copies of the Software, and to permit persons to whom the > + * Software is furnished to do so, subject to the following > + * conditions: > + * > + * The above copyright notice and this permission notice shall be > + * included in all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES > + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT > + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY > + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > + * OTHER DEALINGS IN THE SOFTWARE. > + */ > + > +#include "imx6q-ba16.dtsi" > + > +/ { > + clocks { > + #address-cells = <1>; > + #size-cells = <0>; These are already specified in imx6qdl.dtsi. > + > + mclk: clock@0 { > + compatible = "fixed-clock"; > + reg = <0>; > + #clock-cells = <0>; > + clock-frequency = <22000000>; > + }; > + }; <snip> > +&i2c1 { > + pca9547: mux@70 { > + compatible = "nxp,pca9547"; > + reg = <0x70>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + mux1_i2c1: i2c@0 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <0x0>; > + > + ads7830: ads7830@48 { > + compatible = "ti,ads7830"; > + reg = <0x48>; > + }; > + > + mma8453: mma8453@1c { > + compatible = "fsl,mma8453"; > + reg = <0x1c>; > + }; > + }; > + > + mux1_i2c2: i2c@1 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <0x1>; > + > + eeprom: eeprom@50 { > + compatible = "atmel,24c08"; > + reg = <0x50>; > + }; > + > + mpl3115: mpl3115@60 { > + compatible = "fsl,mpl3115"; > + reg = <0x60>; > + }; > + }; > + > + mux1_i2c3: i2c@2 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <0x2>; > + }; > + > + mux1_i2c4: i2c@3 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <0x3>; > + > + codec: sgtl5000@0a { I think the naming schema below matches DT convention better, i.e. the node name should be generic. sgtl5000: codec@0a { > + compatible = "fsl,sgtl5000"; > + reg = <0x0a>; > + clocks = <&mclk>; > + VDDA-supply = <®_1p8v>; > + VDDIO-supply = <®_3p3v>; > + }; > + }; <snip> > +&usdhc4 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_usdhc4>; > + bus-width = <4>; > + vmmc-supply = <®_wl18xx_vmmc>; > + no-1-8-v; > + non-removable; > + wakeup-source; > + keep-power-in-suspend; > + cap-power-off-card; > + max-frequency = <25000000>; > + status = "okay"; > + Drop this new line and have 'status' be the last property. > + #address-cells = <1>; > + #size-cells = <0>; I'm not sure why this and a 'reg' property in sub-nodes are necessary at all, but ... > + > + wlcore: wlcore@0 { > + compatible = "ti,wl1837"; > + reg = <2>; ... at least the 'reg' property should match the unit-address after node name. Shawn > + interrupt-parent = <&gpio2>; > + interrupts = <6 IRQ_TYPE_LEVEL_HIGH>; > + tcxo-clock-frequency = <26000000>; > + }; > +}; > -- > 2.7.0 > >
On 02/03/2016 09:52 AM, Shawn Guo wrote: > On Fri, Jan 29, 2016 at 06:19:15PM -0500, Akshay Bhat wrote: >> From: Justin Waters <justin.waters@timesys.com> >> >> Advantech has 3 carrier boards (B450v3, B650v3, B850v3) which use >> the Advantech BA-16 module (based on iMX6D). This file has the >> devicetree entries that are common to all 3 boards. >> >> Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com> >> Signed-off-by: Justin Waters <justin.waters@timesys.com> >> --- >> arch/arm/boot/dts/imx6q-bx50v3.dtsi | 239 ++++++++++++++++++++++++++++++++++++ >> 1 file changed, 239 insertions(+) >> create mode 100644 arch/arm/boot/dts/imx6q-bx50v3.dtsi >> >> diff --git a/arch/arm/boot/dts/imx6q-bx50v3.dtsi b/arch/arm/boot/dts/imx6q-bx50v3.dtsi >> new file mode 100644 >> index 0000000..a44b074 >> --- /dev/null >> +++ b/arch/arm/boot/dts/imx6q-bx50v3.dtsi >> @@ -0,0 +1,239 @@ >> +/* >> + * Copyright 2015 Timesys Corporation. >> + * Copyright 2015 General Electric Company >> + * >> + * This file is dual-licensed: you can use it either under the terms >> + * of the GPL or the X11 license, at your option. Note that this dual >> + * licensing only applies to this file, and not this project as a >> + * whole. >> + * >> + * a) This file is free software; you can redistribute it and/or >> + * modify it under the terms of the GNU General Public License >> + * version 2 as published by the Free Software Foundation. >> + * >> + * This file 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. >> + * >> + * Or, alternatively >> + * >> + * b) Permission is hereby granted, free of charge, to any person >> + * obtaining a copy of this software and associated documentation >> + * files (the "Software"), to deal in the Software without >> + * restriction, including without limitation the rights to use >> + * copy, modify, merge, publish, distribute, sublicense, and/or >> + * sell copies of the Software, and to permit persons to whom the >> + * Software is furnished to do so, subject to the following >> + * conditions: >> + * >> + * The above copyright notice and this permission notice shall be >> + * included in all copies or substantial portions of the Software. >> + * >> + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND >> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES >> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND >> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT >> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY >> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING >> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR >> + * OTHER DEALINGS IN THE SOFTWARE. >> + */ >> + >> +#include "imx6q-ba16.dtsi" >> + >> +/ { >> + clocks { >> + #address-cells = <1>; >> + #size-cells = <0>; > > These are already specified in imx6qdl.dtsi. > Will fix this. Once it is removed, should I have a new line before the child node? eg: clocks { mclk: clock@0 { compatible = "fixed-clock"; >> + >> + mclk: clock@0 { >> + compatible = "fixed-clock"; >> + reg = <0>; >> + #clock-cells = <0>; >> + clock-frequency = <22000000>; >> + }; >> + }; > > <snip> > >> +&i2c1 { >> + pca9547: mux@70 { >> + compatible = "nxp,pca9547"; >> + reg = <0x70>; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + mux1_i2c1: i2c@0 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + reg = <0x0>; >> + >> + ads7830: ads7830@48 { >> + compatible = "ti,ads7830"; >> + reg = <0x48>; >> + }; >> + >> + mma8453: mma8453@1c { >> + compatible = "fsl,mma8453"; >> + reg = <0x1c>; >> + }; >> + }; >> + >> + mux1_i2c2: i2c@1 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + reg = <0x1>; >> + >> + eeprom: eeprom@50 { >> + compatible = "atmel,24c08"; >> + reg = <0x50>; >> + }; >> + >> + mpl3115: mpl3115@60 { >> + compatible = "fsl,mpl3115"; >> + reg = <0x60>; >> + }; >> + }; >> + >> + mux1_i2c3: i2c@2 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + reg = <0x2>; >> + }; >> + >> + mux1_i2c4: i2c@3 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + reg = <0x3>; >> + >> + codec: sgtl5000@0a { > > I think the naming schema below matches DT convention better, i.e. the > node name should be generic. > > sgtl5000: codec@0a { > Will update the naming. >> + compatible = "fsl,sgtl5000"; >> + reg = <0x0a>; >> + clocks = <&mclk>; >> + VDDA-supply = <®_1p8v>; >> + VDDIO-supply = <®_3p3v>; >> + }; >> + }; > > <snip> > >> +&usdhc4 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&pinctrl_usdhc4>; >> + bus-width = <4>; >> + vmmc-supply = <®_wl18xx_vmmc>; >> + no-1-8-v; >> + non-removable; >> + wakeup-source; >> + keep-power-in-suspend; >> + cap-power-off-card; >> + max-frequency = <25000000>; >> + status = "okay"; >> + > > Drop this new line and have 'status' be the last property. > Will update the same. >> + #address-cells = <1>; >> + #size-cells = <0>; > > I'm not sure why this and a 'reg' property in sub-nodes are necessary at > all, but ... > Most other devicetrees that use ti wlcore had the above properties along with a 'reg' property in the sub-node. So I used them as reference. Since there is a single child node here, is it preferred to change this to: &usdhc4 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usdhc4>; bus-width = <4>; vmmc-supply = <®_wl18xx_vmmc>; no-1-8-v; non-removable; wakeup-source; keep-power-in-suspend; cap-power-off-card; max-frequency = <25000000>; status = "okay"; wlcore { compatible = "ti,wl1837"; interrupt-parent = <&gpio2>; interrupts = <6 IRQ_TYPE_LEVEL_HIGH>; tcxo-clock-frequency = <26000000>; }; }; >> + >> + wlcore: wlcore@0 { >> + compatible = "ti,wl1837"; >> + reg = <2>; > > ... at least the 'reg' property should match the unit-address after node > name. > > Shawn > Will fix this. Thanks, Akshay >> + interrupt-parent = <&gpio2>; >> + interrupts = <6 IRQ_TYPE_LEVEL_HIGH>; >> + tcxo-clock-frequency = <26000000>; >> + }; >> +}; >> -- >> 2.7.0 >> >>
On Thu, Feb 04, 2016 at 06:57:44PM -0500, Akshay Bhat wrote: > >>+/ { > >>+ clocks { > >>+ #address-cells = <1>; > >>+ #size-cells = <0>; > > > >These are already specified in imx6qdl.dtsi. > > > > Will fix this. Once it is removed, should I have a new line before > the child node? > eg: > > clocks { > No, this new line is not needed. Shawn > mclk: clock@0 { > compatible = "fixed-clock"; > >>+ > >>+ mclk: clock@0 { > >>+ compatible = "fixed-clock"; > >>+ reg = <0>; > >>+ #clock-cells = <0>; > >>+ clock-frequency = <22000000>; > >>+ }; > >>+ };
diff --git a/arch/arm/boot/dts/imx6q-bx50v3.dtsi b/arch/arm/boot/dts/imx6q-bx50v3.dtsi new file mode 100644 index 0000000..a44b074 --- /dev/null +++ b/arch/arm/boot/dts/imx6q-bx50v3.dtsi @@ -0,0 +1,239 @@ +/* + * Copyright 2015 Timesys Corporation. + * Copyright 2015 General Electric Company + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This file 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. + * + * Or, alternatively + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "imx6q-ba16.dtsi" + +/ { + clocks { + #address-cells = <1>; + #size-cells = <0>; + + mclk: clock@0 { + compatible = "fixed-clock"; + reg = <0>; + #clock-cells = <0>; + clock-frequency = <22000000>; + }; + }; + + reg_wl18xx_vmmc: regulator-wl18xx { + compatible = "regulator-fixed"; + regulator-name = "vwl1807"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&pca9539 3 GPIO_ACTIVE_HIGH>; + startup-delay-us = <70000>; + enable-active-high; + }; + + reg_wlan: regulator-wlan { + compatible = "regulator-fixed"; + regulator-name = "3P3V_wlan"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + gpio = <&gpio6 14 GPIO_ACTIVE_HIGH>; + }; + + sound { + compatible = "fsl,imx6q-ba16-sgtl5000", + "fsl,imx-audio-sgtl5000"; + model = "imx6q-ba16-sgtl5000"; + ssi-controller = <&ssi1>; + audio-codec = <&codec>; + audio-routing = + "MIC_IN", "Mic Jack", + "Mic Jack", "Mic Bias", + "LINE_IN", "Line In Jack", + "Headphone Jack", "HP_OUT"; + mux-int-port = <1>; + mux-ext-port = <4>; + }; +}; + +&ecspi5 { + fsl,spi-num-chipselects = <1>; + cs-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ecspi5>; + status = "okay"; + + m25_eeprom: m25p80@0 { + compatible = "atmel,at25"; + spi-max-frequency = <20000000>; + size = <0x8000>; + pagesize = <64>; + reg = <0>; + address-width = <16>; + }; +}; + +&i2c1 { + pca9547: mux@70 { + compatible = "nxp,pca9547"; + reg = <0x70>; + #address-cells = <1>; + #size-cells = <0>; + + mux1_i2c1: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x0>; + + ads7830: ads7830@48 { + compatible = "ti,ads7830"; + reg = <0x48>; + }; + + mma8453: mma8453@1c { + compatible = "fsl,mma8453"; + reg = <0x1c>; + }; + }; + + mux1_i2c2: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x1>; + + eeprom: eeprom@50 { + compatible = "atmel,24c08"; + reg = <0x50>; + }; + + mpl3115: mpl3115@60 { + compatible = "fsl,mpl3115"; + reg = <0x60>; + }; + }; + + mux1_i2c3: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x2>; + }; + + mux1_i2c4: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x3>; + + codec: sgtl5000@0a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + clocks = <&mclk>; + VDDA-supply = <®_1p8v>; + VDDIO-supply = <®_3p3v>; + }; + }; + + mux1_i2c5: i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x4>; + + pca9539: pca9539@74 { + compatible = "nxp,pca9539"; + reg = <0x74>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + interrupt-parent = <&gpio2>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; + }; + }; + + mux1_i2c6: i2c@5 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x5>; + + igb@49 { + compatible = "intel,igb"; + reg = <0x49>; + }; + + igb@61 { + compatible = "intel,igb"; + reg = <0x61>; + }; + }; + + mux1_i2c7: i2c@6 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x6>; + }; + + mux1_i2c8: i2c@7 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x7>; + }; + }; +}; + +&usdhc4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc4>; + bus-width = <4>; + vmmc-supply = <®_wl18xx_vmmc>; + no-1-8-v; + non-removable; + wakeup-source; + keep-power-in-suspend; + cap-power-off-card; + max-frequency = <25000000>; + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + + wlcore: wlcore@0 { + compatible = "ti,wl1837"; + reg = <2>; + interrupt-parent = <&gpio2>; + interrupts = <6 IRQ_TYPE_LEVEL_HIGH>; + tcxo-clock-frequency = <26000000>; + }; +};