Re: [PATCH] omap: Add devicetree for Gumstix Pepper board
On Tue, Jun 10, 2014 at 8:59 AM, Florian Vaussard wrote: > It is not very common to add oneself as the maintainer of a single .dts > file. I could only found the am335x-nano.dts with such a way of doing. > Usually get_maintainer.pl will also take into account the commit author > and properly handle this case. Okay--I'll remove this. Ironically, I was looking at the nano to make sure I'd done everything I needed to ;-). ... > For all the boards that I have seen, all the properties of a new node > are declared at the same place, where you put some of them at the end. I > have not a strong opinion on this, but I find it a bit more difficult to > read. ... > Splitting the pinmux is also unusual, but in this case I found it more > readable. My goal both by moving the properties and the pinmux was to separate out chunks of functionality into discrete sections. It makes it easy to resolve an issue with a specific board feature (e.g. LEDs) or adapt for a new board version as the pinmux and any node properties are grouped together. I recognize this is something of a personal bias though so I can certainly re-organize if this is stylistically bad. ... >> +&am33xx_pinmux { >> + accel_pins: pinmux_accel { >> + pinctrl-single,pins = < >> + 0x98 (PIN_INPUT_PULLUP | MUX_MODE7) /* >> gpmc_wen.gpio2_4 */ > > The INT pin of the LIS33 chip seems to be push-pull, thus enabling the > pullup on the SoC side will increase the current consumption when held down. Good catch. ... >> +&am33xx_pinmux { >> + audio_pins: pinmux_audio { >> + pinctrl-single,pins = < >> + 0x1AC (PIN_INPUT_PULLDOWN | MUX_MODE0) /* >> mcasp0_ahcklx.mcasp0_ahclkx */ >> + 0x194 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* >> mcasp0_fsx.mcasp0_fsx */ >> + 0x190 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* >> mcasp0_aclkx.mcasp0_aclkx */ >> + 0x198 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* >> mcasp0_axr0.mcasp0_axr0 */ >> + 0x1A8 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* >> mcasp0_axr1.mcasp0_axr1 */ >> + 0x40 (PIN_OUTPUT_PULLUP | MUX_MODE7)/* >> gpmc_a0.gpio1_16 */ > > You already have an external pullup in your design, so this one seems > superfluous. You're correct. Changed. ... >> +/* Power */ >> +&vbat { >> + regulator-name = "vbat"; >> + regulator-min-microvolt = <500>; >> + regulator-max-microvolt = <500>; >> + regulator-always-on; removed regulator-always-on >> +}; >> + >> +&v3v3c_reg { >> + regulator-name = "v3v3c_reg"; >> + regulator-min-microvolt = <330>; >> + regulator-max-microvolt = <330>; >> + vin-supply = <&vbat>; >> + regulator-always-on; removed regulator-always-on >> +}; >> + >> +&vdd5_reg { >> + regulator-name = "vdd5_reg"; >> + regulator-min-microvolt = <500>; >> + regulator-max-microvolt = <500>; >> + regulator-always-on; removed regulator-always-on >> + vin-supply = <&vbat>; >> +}; >> + >> +/include/ "tps65217.dtsi" >> + >> +&tps { >> + backlight { >> + isel = <1>; /* ISET1 */ >> + fdim = <200>; /* TPS65217_BL_FDIM_200HZ */ >> + default-brightness = <80>; >> + }; >> + >> + regulators { >> + dcdc1_reg: regulator@0 { >> + /* VDD_1V8 system supply */ >> + regulator-always-on; removed regulator-always-on >> + }; >> + >> + dcdc2_reg: regulator@1 { >> + /* VDD_CORE voltage limits 0.95V - 1.26V with +/-4% >> tolerance */ >> + regulator-name = "vdd_core"; >> + regulator-min-microvolt = <925000>; >> + regulator-max-microvolt = <1325000>; >> + regulator-boot-on; >> + regulator-always-on; removed regulator-always-on >> + }; >> + >> + dcdc3_reg: regulator@2 { >> + /* VDD_MPU voltage limits 0.95V - 1.1V with +/-4% >> tolerance */ >> + regulator-name = "vdd_mpu"; >> + regulator-min-microvolt = <925000>; >> + regulator-max-microvolt = <115>; >> + regulator-boot-on; >> + regulator-always-on; removed regulator-always-on >> + }; >> + >> + ldo1_reg: regulator@3 { >> + /* VRTC 1.8V always-on supply */ >> + regulator-always-on; This is the backup supply shouldn't be switched off. >> + }; >> + >> + ldo2_reg: regulator@4 { >> + /* 3.3V rail */ >> + regulator-always-on; removed regulator-always-on >> + }; >> + >> + ldo3_reg: regulator@5 { >> + /* VDD_3V3A 3.3V rail */ >> + regulator-always-on; removed regulator-always-on >> + re
Re: [PATCH] omap: Add devicetree for Gumstix Pepper board
Hi Ash, On 06/06/2014 10:51 PM, Ash Charles wrote: > This adds the Gumstix Pepper[1] single-board computer based on the > TI AM335x processor. Schematics are available [2]. > > [1] https://store.gumstix.com/index.php/products/344/ > [2] https://pubs.gumstix.com/boards/PEPPER/ > > Signed-off-by: Ash Charles > --- > MAINTAINERS | 6 + > arch/arm/boot/dts/Makefile | 3 +- > arch/arm/boot/dts/am335x-pepper.dts | 661 > > 3 files changed, 669 insertions(+), 1 deletion(-) > create mode 100644 arch/arm/boot/dts/am335x-pepper.dts > > diff --git a/MAINTAINERS b/MAINTAINERS > index 51ebb77..d44e2e3 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -6427,6 +6427,12 @@ L: linux-omap@vger.kernel.org > S: Maintained > F: arch/arm/boot/dts/am335x-nano.dts > > +OMAP/GUMSTIX PEPPER MACHINE SUPPORT > +M: Ash Charles > +L: linux-omap@vger.kernel.org > +S: Maintained > +F: arch/arm/boot/dts/am335x-pepper.dts > + It is not very common to add oneself as the maintainer of a single .dts file. I could only found the am335x-nano.dts with such a way of doing. Usually get_maintainer.pl will also take into account the commit author and properly handle this case. > OMFS FILESYSTEM > M: Bob Copeland > L: linux-karma-de...@lists.sourceforge.net > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index a81a24c..9e0352f 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -277,7 +277,8 @@ dtb-$(CONFIG_SOC_AM33XX) += am335x-base0033.dtb \ > am335x-boneblack.dtb \ > am335x-evm.dtb \ > am335x-evmsk.dtb \ > - am335x-nano.dtb > + am335x-nano.dtb \ > + am335x-pepper.dtb > dtb-$(CONFIG_ARCH_OMAP4) += omap4-duovero-parlor.dtb \ > omap4-panda.dtb \ > omap4-panda-a4.dtb \ > diff --git a/arch/arm/boot/dts/am335x-pepper.dts > b/arch/arm/boot/dts/am335x-pepper.dts > new file mode 100644 > index 000..27d9b75 > --- /dev/null > +++ b/arch/arm/boot/dts/am335x-pepper.dts > @@ -0,0 +1,661 @@ > +/* > + * Copyright (C) 2014 Gumstix, Inc. - https://www.gumstix.com/ > + * > + * This program 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. > + */ > +/dts-v1/; > + > +#include "am33xx.dtsi" > + > +/ { > + model = "Gumstix Pepper"; > + compatible = "gumstix,am335x-pepper", "ti,am33xx"; > + > + cpus { > + cpu@0 { > + cpu0-supply = <&dcdc3_reg>; > + }; > + }; > + > + memory { > + device_type = "memory"; > + reg = <0x8000 0x2000>; /* 512 MB */ > + }; > + > + buttons: user_buttons { > + compatible = "gpio-keys"; > + }; > + For all the boards that I have seen, all the properties of a new node are declared at the same place, where you put some of them at the end. I have not a strong opinion on this, but I find it a bit more difficult to read. > + leds: user_leds { > + compatible = "gpio-leds"; > + }; > + > + panel: lcd_panel { > + compatible = "ti,tilcdc,panel"; > + }; > + > + sound: sound_iface { > + compatible = "ti,da830-evm-audio"; > + }; > + > + vbat: fixedregulator@0 { > + compatible = "regulator-fixed"; > + }; > + > + v3v3c_reg: fixedregulator@1 { > + compatible = "regulator-fixed"; > + }; > + > + vdd5_reg: fixedregulator@2 { > + compatible = "regulator-fixed"; > + }; > +}; > + > +/* I2C Busses */ > +&i2c0 { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c0_pins>; > + > + clock-frequency = <40>; > + > + tps: tps@24 { > + reg = <0x24>; > + }; > + > + eeprom: eeprom@50 { > + compatible = "at,24c256"; > + reg = <0x50>; > + }; > + > + audio_codec: tlv320aic3106@1b { > + compatible = "ti,tlv320aic3106"; > + reg = <0x1b>; > + }; > + > + accel: lis331dlh@1d { > + compatible = "st,lis3lv02d"; > + reg = <0x1d>; > + }; > +}; > + > +&i2c1 { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c1_pins>; > + clock-frequency = <40>; > +}; > + > +&am33xx_pinmux { > + i2c0_pins: pinmux_i2c0 { > + pinctrl-single,pins = < > + 0x188 (PIN_INPUT_PULLUP | MUX_MODE0)/* > i2c0_sda.i2c0_sda */ > + 0x18c (PIN_INPUT_PULLUP | MUX_MODE0)/* > i2c0_scl.i2c0_scl */ > + >; > + }; > + i2c1_pins: pinmux_i2c1 { > + pinctrl-single,pins = < > + 0x10C (PIN_INPUT_PULLUP | MUX_MODE3)/* > mii1_crs,i2c1_sda */ > + 0x110 (PIN_INPUT_PULLUP | MUX_MODE3)/* > mii1_rxerr,i2c1_scl */ > + >
[PATCH] omap: Add devicetree for Gumstix Pepper board
This adds the Gumstix Pepper[1] single-board computer based on the TI AM335x processor. Schematics are available [2]. [1] https://store.gumstix.com/index.php/products/344/ [2] https://pubs.gumstix.com/boards/PEPPER/ Signed-off-by: Ash Charles --- MAINTAINERS | 6 + arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/am335x-pepper.dts | 661 3 files changed, 669 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/am335x-pepper.dts diff --git a/MAINTAINERS b/MAINTAINERS index 51ebb77..d44e2e3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6427,6 +6427,12 @@ L: linux-omap@vger.kernel.org S: Maintained F: arch/arm/boot/dts/am335x-nano.dts +OMAP/GUMSTIX PEPPER MACHINE SUPPORT +M: Ash Charles +L: linux-omap@vger.kernel.org +S: Maintained +F: arch/arm/boot/dts/am335x-pepper.dts + OMFS FILESYSTEM M: Bob Copeland L: linux-karma-de...@lists.sourceforge.net diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index a81a24c..9e0352f 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -277,7 +277,8 @@ dtb-$(CONFIG_SOC_AM33XX) += am335x-base0033.dtb \ am335x-boneblack.dtb \ am335x-evm.dtb \ am335x-evmsk.dtb \ - am335x-nano.dtb + am335x-nano.dtb \ + am335x-pepper.dtb dtb-$(CONFIG_ARCH_OMAP4) += omap4-duovero-parlor.dtb \ omap4-panda.dtb \ omap4-panda-a4.dtb \ diff --git a/arch/arm/boot/dts/am335x-pepper.dts b/arch/arm/boot/dts/am335x-pepper.dts new file mode 100644 index 000..27d9b75 --- /dev/null +++ b/arch/arm/boot/dts/am335x-pepper.dts @@ -0,0 +1,661 @@ +/* + * Copyright (C) 2014 Gumstix, Inc. - https://www.gumstix.com/ + * + * This program 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. + */ +/dts-v1/; + +#include "am33xx.dtsi" + +/ { + model = "Gumstix Pepper"; + compatible = "gumstix,am335x-pepper", "ti,am33xx"; + + cpus { + cpu@0 { + cpu0-supply = <&dcdc3_reg>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x8000 0x2000>; /* 512 MB */ + }; + + buttons: user_buttons { + compatible = "gpio-keys"; + }; + + leds: user_leds { + compatible = "gpio-leds"; + }; + + panel: lcd_panel { + compatible = "ti,tilcdc,panel"; + }; + + sound: sound_iface { + compatible = "ti,da830-evm-audio"; + }; + + vbat: fixedregulator@0 { + compatible = "regulator-fixed"; + }; + + v3v3c_reg: fixedregulator@1 { + compatible = "regulator-fixed"; + }; + + vdd5_reg: fixedregulator@2 { + compatible = "regulator-fixed"; + }; +}; + +/* I2C Busses */ +&i2c0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + + clock-frequency = <40>; + + tps: tps@24 { + reg = <0x24>; + }; + + eeprom: eeprom@50 { + compatible = "at,24c256"; + reg = <0x50>; + }; + + audio_codec: tlv320aic3106@1b { + compatible = "ti,tlv320aic3106"; + reg = <0x1b>; + }; + + accel: lis331dlh@1d { + compatible = "st,lis3lv02d"; + reg = <0x1d>; + }; +}; + +&i2c1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + clock-frequency = <40>; +}; + +&am33xx_pinmux { + i2c0_pins: pinmux_i2c0 { + pinctrl-single,pins = < + 0x188 (PIN_INPUT_PULLUP | MUX_MODE0)/* i2c0_sda.i2c0_sda */ + 0x18c (PIN_INPUT_PULLUP | MUX_MODE0)/* i2c0_scl.i2c0_scl */ + >; + }; + i2c1_pins: pinmux_i2c1 { + pinctrl-single,pins = < + 0x10C (PIN_INPUT_PULLUP | MUX_MODE3)/* mii1_crs,i2c1_sda */ + 0x110 (PIN_INPUT_PULLUP | MUX_MODE3)/* mii1_rxerr,i2c1_scl */ + >; + }; +}; + +/* Accelerometer */ +&accel { + pinctrl-names = "default"; + pinctrl-0 = <&accel_pins>; + + Vdd-supply = <&ldo3_reg>; + Vdd_IO-supply = <&ldo3_reg>; + st,irq1-click; + st,wakeup-x-lo; + st,wakeup-x-hi; + st,wakeup-y-lo; + st,wakeup-y-hi; + st,wakeup-z-lo; + st,wakeup-z-hi; + st,min-limit-x = <92>; + st,max-limit-x = <14>; + st,min-limit-y = <14>; + st,max-limit-y = <92>; + st,min-limit-z = <92>; + st,max-limit-z = <14>; +}; + +&am33xx_pinmux { + accel_pins: pinmux_accel { + pinctrl-single,pins = < + 0x98 (PI