Message ID | 20180312161050.7647-6-harald@ccbib.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, On Mon, Mar 12, 2018 at 04:10:50PM +0000, Harald Geyer wrote: > The TERES I is an open hardware laptop built by Olimex using the > Allwinner A64 SoC. > > Add the board specific .dts file, which includes the A64 .dtsi and > enables the peripherals that we support so far. > > Signed-off-by: Harald Geyer <harald@ccbib.org> > --- > arch/arm64/boot/dts/allwinner/Makefile | 1 + > .../boot/dts/allwinner/sun50i-a64-teres-i.dts | 308 +++++++++++++++++++++ > 2 files changed, 309 insertions(+) > create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts > > diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile > index f505227b0250..5f073f7423b7 100644 > --- a/arch/arm64/boot/dts/allwinner/Makefile > +++ b/arch/arm64/boot/dts/allwinner/Makefile > @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb > dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb > dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb > dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb > +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb > dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb > dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb > dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts > new file mode 100644 > index 000000000000..0d42b5111f0f > --- /dev/null > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts > @@ -0,0 +1,308 @@ > +/* > + * Copyright (C) Harald Geyer <harald@ccbib.org> > + * based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.com> > + * > + * 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 library 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 library 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 "AS IS", 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. > + */ you should use an SPDX header here to define the license > + > +/dts-v1/; > + > +#include "sun50i-a64.dtsi" > + > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/pwm/pwm.h> > + > +/ { > + model = "Olimex Teres I A64"; It's called the Teres-I, there's no need for the A64 here > + compatible = "olimex,a64-teres-i", "allwinner,sun50i-a64"; Or in the compatible > + > + aliases { > + serial0 = &uart0; > + }; > + > + backlight: backlight { > + compatible = "pwm-backlight"; > + pwms = <&pwm 0 50000 0>; > + brightness-levels = <0 10 20 30 40 50 60 70 100>; > + default-brightness-level = <3>; > + enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + > + framebuffer-lcd { > + eDP25-supply = <®_dldo2>; > + eDP12-supply = <®_dldo3>; > + }; > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + > + lid-switch { > + label = "Lid Switch"; > + gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ > + linux,input-type = <EV_SW>; > + linux,code = <SW_LID>; > + }; > + }; > + > + leds: leds { Do you need a label? > + compatible = "gpio-leds"; > + > + led_capslock: capslock { Same thing here > + gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */ Ideally you should have LED labels here, following the scheme devicename:colour:function > + }; > + > + led_numlock: numlock { > + gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */ > + }; > + }; > + > + reg_usb1_vbus: usb1-vbus { > + compatible = "regulator-fixed"; > + regulator-name = "usb1-vbus"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + enable-active-high; > + gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ > + status = "okay"; I guess this one has a parent regulator too? > + }; > + > + wifi_pwrseq: wifi_pwrseq { > + compatible = "mmc-pwrseq-simple"; > + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ > + }; > +}; > + > +&ehci1 { > + status = "okay"; > +}; > + > +&i2c0 { > + clock-frequency = <100000>; > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c0_pins>; > + status = "okay"; > +}; What is this used for? Looks good otherwise, thanks! Maxime
Hi, > Maxime Ripard writes: > > Hi, > > On Mon, Mar 12, 2018 at 04:10:50PM +0000, Harald Geyer wrote: >> The TERES I is an open hardware laptop built by Olimex using the >> Allwinner A64 SoC. >> >> Add the board specific .dts file, which includes the A64 .dtsi and >> enables the peripherals that we support so far. >> >> Signed-off-by: Harald Geyer <harald@ccbib.org> >> --- >> arch/arm64/boot/dts/allwinner/Makefile | 1 + >> .../boot/dts/allwinner/sun50i-a64-teres-i.dts | 308 +++++++++++++++++++++ >> 2 files changed, 309 insertions(+) >> create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts >> >> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile >> index f505227b0250..5f073f7423b7 100644 >> --- a/arch/arm64/boot/dts/allwinner/Makefile >> +++ b/arch/arm64/boot/dts/allwinner/Makefile >> @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb >> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb >> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb >> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts >> new file mode 100644 >> index 000000000000..0d42b5111f0f >> --- /dev/null >> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts >> @@ -0,0 +1,308 @@ >> +/* >> + * Copyright (C) Harald Geyer <harald@ccbib.org> >> + * based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.com> >> + * >> + * 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 library 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 library 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 "AS IS", 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. >> + */ > > you should use an SPDX header here to define the license Ok, I will strip the actual text then. Nice. >> + >> +/dts-v1/; >> + >> +#include "sun50i-a64.dtsi" >> + >> +#include <dt-bindings/gpio/gpio.h> >> +#include <dt-bindings/input/input.h> >> +#include <dt-bindings/pwm/pwm.h> >> + >> +/ { >> + model = "Olimex Teres I A64"; > > It's called the Teres-I, there's no need for the A64 here Olimex said in the past they want the Teres to be very modular, with boards for different SoCs compatible with each other on the level of external pins. The PCBs we have right now are labled like TERES_PCB1-A64-MAIN, TERES-PCB2-IO, etc. - I wouldn't be surprised if they start selling TERES_PCB1-x86-MAIN to be put into your average Teres I, so I felt this naming was safer. However I specifically CCed them on this series, so they can comment on issues such as this one... >> + compatible = "olimex,a64-teres-i", "allwinner,sun50i-a64"; > > Or in the compatible > >> + >> + aliases { >> + serial0 = &uart0; >> + }; >> + >> + backlight: backlight { >> + compatible = "pwm-backlight"; >> + pwms = <&pwm 0 50000 0>; >> + brightness-levels = <0 10 20 30 40 50 60 70 100>; >> + default-brightness-level = <3>; >> + enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ >> + }; >> + >> + chosen { >> + stdout-path = "serial0:115200n8"; >> + >> + framebuffer-lcd { >> + eDP25-supply = <®_dldo2>; >> + eDP12-supply = <®_dldo3>; >> + }; >> + }; >> + >> + gpio-keys { >> + compatible = "gpio-keys"; >> + >> + lid-switch { >> + label = "Lid Switch"; >> + gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ >> + linux,input-type = <EV_SW>; >> + linux,code = <SW_LID>; >> + }; >> + }; >> + >> + leds: leds { > > Do you need a label? Here probably not. >> + compatible = "gpio-leds"; >> + >> + led_capslock: capslock { > > Same thing here I was kind of hoping I could use it to link the led to the keyboard, so that it goes on when the capslock key is pressed. But no such luck: 1) There seems to be no binding for external leds in the input subsystem. 2) The keyboard is a usb one and get enumerated automatically, so not DT node by default. I guess I can remove it, but then I guess labels for the leds might be helpful when further customizing the DT locally, so why not just keep them? >> + gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */ > > Ideally you should have LED labels here, following the scheme > devicename:colour:function Okay. >> + }; >> + >> + led_numlock: numlock { >> + gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */ >> + }; >> + }; >> + >> + reg_usb1_vbus: usb1-vbus { >> + compatible = "regulator-fixed"; >> + regulator-name = "usb1-vbus"; >> + regulator-min-microvolt = <5000000>; >> + regulator-max-microvolt = <5000000>; >> + enable-active-high; >> + gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ >> + status = "okay"; > > I guess this one has a parent regulator too? Unless I failed to read the schematic correctly: No. The step-up converter providing 5V power for the usb1-vbus is connected directly to the IPS (intelligent power source) output of the PMIC and enabled directly by the 3.3V supply. So technically of course there is a parent regulator, but nothing we can control from software. >> + }; >> + >> + wifi_pwrseq: wifi_pwrseq { >> + compatible = "mmc-pwrseq-simple"; >> + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ >> + }; >> +}; >> + >> +&ehci1 { >> + status = "okay"; >> +}; >> + >> +&i2c0 { >> + clock-frequency = <100000>; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&i2c0_pins>; >> + status = "okay"; >> +}; > > What is this used for? As explained in the other message in more detail: The ANX6345 eDP-bridge. Thanks for the review, Harald > Looks good otherwise, thanks! > Maxime > > -- > Maxime Ripard, Bootlin (formerly Free Electrons) > Embedded Linux and Kernel engineering > https://bootlin.com
On Tue, Mar 13, 2018 at 12:07:36PM +0100, Harald Geyer wrote: > >> +/ { > >> + model = "Olimex Teres I A64"; > > > > It's called the Teres-I, there's no need for the A64 here > > Olimex said in the past they want the Teres to be very modular, with > boards for different SoCs compatible with each other on the level of > external pins. The PCBs we have right now are labled like > TERES_PCB1-A64-MAIN, TERES-PCB2-IO, etc. - I wouldn't be surprised if > they start selling TERES_PCB1-x86-MAIN to be put into your average Teres I, > so I felt this naming was safer. > > However I specifically CCed them on this series, so they can comment on > issues such as this one... Then maybe call it A64 Teres-I to be consistent with the compatible? > >> + compatible = "gpio-leds"; > >> + > >> + led_capslock: capslock { > > > > Same thing here > > I was kind of hoping I could use it to link the led to the keyboard, > so that it goes on when the capslock key is pressed. But no such luck: > 1) There seems to be no binding for external leds in the input subsystem. > 2) The keyboard is a usb one and get enumerated automatically, so not DT > node by default. > > I guess I can remove it, but then I guess labels for the leds might be > helpful when further customizing the DT locally, so why not just keep them? I'm not sure that would be useful either. I'd expect someone modifying the DT locally that they would modify the DT directly, and you already have the node there. > >> + reg_usb1_vbus: usb1-vbus { > >> + compatible = "regulator-fixed"; > >> + regulator-name = "usb1-vbus"; > >> + regulator-min-microvolt = <5000000>; > >> + regulator-max-microvolt = <5000000>; > >> + enable-active-high; > >> + gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ > >> + status = "okay"; > > > > I guess this one has a parent regulator too? > > Unless I failed to read the schematic correctly: No. > The step-up converter providing 5V power for the usb1-vbus is connected > directly to the IPS (intelligent power source) output of the PMIC and > enabled directly by the 3.3V supply. So technically of course there is > a parent regulator, but nothing we can control from software. Ok Thanks! Maxime
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile index f505227b0250..5f073f7423b7 100644 --- a/arch/arm64/boot/dts/allwinner/Makefile +++ b/arch/arm64/boot/dts/allwinner/Makefile @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts new file mode 100644 index 000000000000..0d42b5111f0f --- /dev/null +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts @@ -0,0 +1,308 @@ +/* + * Copyright (C) Harald Geyer <harald@ccbib.org> + * based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.com> + * + * 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 library 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 library 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 "AS IS", 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. + */ + +/dts-v1/; + +#include "sun50i-a64.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/pwm/pwm.h> + +/ { + model = "Olimex Teres I A64"; + compatible = "olimex,a64-teres-i", "allwinner,sun50i-a64"; + + aliases { + serial0 = &uart0; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 50000 0>; + brightness-levels = <0 10 20 30 40 50 60 70 100>; + default-brightness-level = <3>; + enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ + }; + + chosen { + stdout-path = "serial0:115200n8"; + + framebuffer-lcd { + eDP25-supply = <®_dldo2>; + eDP12-supply = <®_dldo3>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + lid-switch { + label = "Lid Switch"; + gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ + linux,input-type = <EV_SW>; + linux,code = <SW_LID>; + }; + }; + + leds: leds { + compatible = "gpio-leds"; + + led_capslock: capslock { + gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */ + }; + + led_numlock: numlock { + gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */ + }; + }; + + reg_usb1_vbus: usb1-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb1-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ + status = "okay"; + }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ + }; +}; + +&ehci1 { + status = "okay"; +}; + +&i2c0 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + status = "okay"; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; + vmmc-supply = <®_dcdc1>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; + disable-wp; + bus-width = <4>; + status = "okay"; +}; + +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + vmmc-supply = <®_aldo2>; + vqmmc-supply = <®_dldo4>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + rtl8723bs: wifi@1 { + reg = <1>; + interrupt-parent = <&r_pio>; + interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ + interrupt-names = "host-wake"; + }; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_pins>; + vmmc-supply = <®_dcdc1>; + vqmmc-supply = <®_dcdc1>; + bus-width = <8>; + non-removable; + cap-mmc-hw-reset; + status = "okay"; +}; + +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm_pin>; + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + +&r_rsb { + status = "okay"; + + axp803: pmic@3a3 { + compatible = "x-powers,axp803"; + reg = <0x3a3>; + interrupt-parent = <&r_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + wakeup-source; + }; +}; + +#include "axp803.dtsi" + +®_aldo1 { + regulator-always-on; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-name = "vcc-pe"; +}; + +®_aldo2 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-pl"; +}; + +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-pll-avcc"; +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1040000>; + regulator-max-microvolt = <1300000>; + regulator-name = "vdd-cpux"; +}; + +/* DCDC3 is polyphased with DCDC2 */ + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vcc-ddr3"; +}; + +®_dcdc6 { + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-sys"; +}; + +®_dldo1 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-hdmi"; +}; + +®_dldo2 { + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-name = "vcc-pd"; +}; + +®_dldo3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-name = "eDP12"; +}; + +®_dldo4 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-wifi-io"; +}; + +®_eldo1 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "cpvdd"; +}; + +®_eldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc-dvdd-csi"; +}; + +®_fldo1 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-name = "vcc-1v2-hsic"; +}; + +/* + * The A64 chip cannot work without this regulator off, although + * it seems to be only driving the AR100 core. + * Maybe we don't still know well about CPUs domain. + */ +®_fldo2 { + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-cpus"; +}; + +®_rtc_ldo { + regulator-name = "vcc-rtc"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&usbphy { + usb1_vbus-supply = <®_usb1_vbus>; + status = "okay"; +};
The TERES I is an open hardware laptop built by Olimex using the Allwinner A64 SoC. Add the board specific .dts file, which includes the A64 .dtsi and enables the peripherals that we support so far. Signed-off-by: Harald Geyer <harald@ccbib.org> --- arch/arm64/boot/dts/allwinner/Makefile | 1 + .../boot/dts/allwinner/sun50i-a64-teres-i.dts | 308 +++++++++++++++++++++ 2 files changed, 309 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts