ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets
Subsystems (3)
cover ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets
Hi Maxime, Chen-Yu,
Here is a series based on Chen-Yu's suggestion to add a reference-design-tablet.dtsi file. This works out quite nicely, resulting in much simpler tablet .dts files, as well as enabling a bunch of extra features on some tablets, showing that having to add the same dts bits over and over again for all model tablets is not a good idea.
This also includes a v2 submission of the new tablet dts files which sparked the reference-design-tablet.dtsi discussion.
Regards,
Hans
PATCH 1/15 ARM: dts: sunxi: Rename sunxi-q8-common.dtsi sunxi-reference-design-tablet.dtsi
Rename sunxi-q8-common.dtsi to sunxi-reference-design-tablet.dtsi. This is part of renaming all the sun?i-q8-common.dtsi files to sun?i-reference-design-tablet.dtsi since most of the hw-config in there is shared by all sunxi tablets.
---
arch/arm/boot/dts/sun5i-q8-common.dtsi | 2 +-
arch/arm/boot/dts/sun8i-q8-common.dtsi | 2 +-
.../dts/{sunxi-q8-common.dtsi => sunxi-reference-design-tablet.dtsi} | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename arch/arm/boot/dts/{sunxi-q8-common.dtsi => sunxi-reference-design-tablet.dtsi} (100%)arch/arm/boot/dts/sun5i-q8-common.dtsi +1 -1
@@ -39,7 +39,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ -#include "sunxi-q8-common.dtsi" +#include "sunxi-reference-design-tablet.dtsi" #include <dt-bindings/pwm/pwm.h>
arch/arm/boot/dts/sun8i-q8-common.dtsi +1 -1
@@ -39,7 +39,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ -#include "sunxi-q8-common.dtsi" +#include "sunxi-reference-design-tablet.dtsi" #include <dt-bindings/pwm/pwm.h>
arch/arm/boot/dts/sunxi-reference-design-tablet.dtsi renamed from arch/arm/boot/dts/sunxi-q8-common.dtsi +0 -0
Signature · 1 line
2.7.4
PATCH 2/15 ARM: dts: sun5i: Move q8 display bits to sun5i-a13-q8-tablet.dts
In reply to Hans de GoedeThis is a preparation patch for renaming sun5i-q8-common.dtsi to sun5i-reference-design-tablet.dtsi and sharing it between all the A13 tablet dts files.
Since we only have a panel config for the 18 tablets (for now) move this to the q8 specific dts file.
--- arch/arm/boot/dts/sun5i-a13-q8-tablet.dts | 36 +++++++++++++++++++++++++++++++ arch/arm/boot/dts/sun5i-q8-common.dtsi | 36 ------------------------------- 2 files changed, 36 insertions(+), 36 deletions(-)
arch/arm/boot/dts/sun5i-a13-q8-tablet.dts +36 -0
@@ -47,4 +47,40 @@ / { model = "Q8 A13 Tablet"; compatible = "allwinner,q8-a13", "allwinner,sun5i-a13"; + + panel: panel { + compatible = "urt,umsh-8596md-t", "simple-panel"; + #address-cells = <1>; + #size-cells = <0>; + + port at 0 { + reg = <0>; + /* TODO: lcd panel uses axp gpio0 as enable pin */ + backlight = <&backlight>; + #address-cells = <1>; + #size-cells = <0>; + + panel_input: endpoint at 0 { + reg = <0>; + remote-endpoint = <&tcon0_out_lcd>; + }; + }; + }; +}; + +&be0 { + status = "okay"; +}; + +&tcon0 { + pinctrl-names = "default"; + pinctrl-0 = <&lcd_rgb666_pins>; + status = "okay"; +}; + +&tcon0_out { + tcon0_out_lcd: endpoint at 0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; };
arch/arm/boot/dts/sun5i-q8-common.dtsi +0 -36
@@ -59,29 +59,6 @@ chosen { stdout-path = "serial0:115200n8"; }; - - panel: panel { - compatible = "urt,umsh-8596md-t", "simple-panel"; - #address-cells = <1>; - #size-cells = <0>; - - port at 0 { - reg = <0>; - /* TODO: lcd panel uses axp gpio0 as enable pin */ - backlight = <&backlight>; - #address-cells = <1>; - #size-cells = <0>; - - panel_input: endpoint at 0 { - reg = <0>; - remote-endpoint = <&tcon0_out_lcd>; - }; - }; - }; -}; - -&be0 { - status = "okay"; }; &codec {
@@ -202,19 +179,6 @@ status = "okay"; }; -&tcon0 { - pinctrl-names = "default"; - pinctrl-0 = <&lcd_rgb666_pins>; - status = "okay"; -}; - -&tcon0_out { - tcon0_out_lcd: endpoint at 0 { - reg = <0>; - remote-endpoint = <&panel_input>; - }; -}; - &uart1 { pinctrl-names = "default"; pinctrl-0 = <&uart1_pins_b>;
Signature · 1 line
2.7.4
PATCH 3/15 ARM: dts: sun5i: Rename sun5i-q8-common.dtsi sun5i-reference-design-tablet.dtsi
In reply to Hans de GoedeRename sun5i-q8-common.dtsi to sun5i-reference-design-tablet.dtsi. This is part of renaming all the sun?i-q8-common.dtsi files to sun?i-reference-design-tablet.dtsi since most of the hw-config in there is shared by all sunxi tablets.
---
arch/arm/boot/dts/sun5i-a13-q8-tablet.dts | 2 +-
.../dts/{sun5i-q8-common.dtsi => sun5i-reference-design-tablet.dtsi} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename arch/arm/boot/dts/{sun5i-q8-common.dtsi => sun5i-reference-design-tablet.dtsi} (100%)arch/arm/boot/dts/sun5i-a13-q8-tablet.dts +1 -1
@@ -42,7 +42,7 @@ /dts-v1/; #include "sun5i-a13.dtsi" -#include "sun5i-q8-common.dtsi" +#include "sun5i-reference-design-tablet.dtsi" / { model = "Q8 A13 Tablet";
arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi renamed from arch/arm/boot/dts/sun5i-q8-common.dtsi +0 -0
Signature · 1 line
2.7.4
PATCH 4/15 ARM: dts: sun5i: reference-design-tablet: Set lradc vref to avcc
In reply to Hans de GoedeSet lradc vref to the actual avcc ldo, rather then to the fixed 3v0 regulator from common-regulators.dtsi.
--- arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi +4 -0
@@ -92,6 +92,10 @@ #include "axp209.dtsi" +&lradc { + vref-supply = <®_ldo2>; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
Signature · 1 line
2.7.4
PATCH 5/15 ARM: dts: sun5i: reference-design-tablet: Remove mention of q8
In reply to Hans de GoedeRemove all mention of q8 from sun5i-reference-design-tablet.dtsi.
--- arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi +2 -2
@@ -98,7 +98,7 @@ &mmc0 { pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v0>; bus-width = <4>; cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
@@ -118,7 +118,7 @@ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; - mmc0_cd_pin_q8: mmc0_cd_pin at 0 { + mmc0_cd_pin: mmc0_cd_pin at 0 { allwinner,pins = "PG0"; allwinner,function = "gpio_in"; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
Signature · 1 line
2.7.4
PATCH 5/15 ARM: dts: sun5i: reference-design-tablet: Remove mention of q8
Quoted 21 lines · Hans de Goede
Remove all mention of q8 from
sun5i-reference-design-tablet.dtsi.Signed-off-by Hans de Goede <[email protected]>--- arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi +1
-1@@ -98,7 +98,7 @@ &mmc0 { pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v0>; bus-width = <4>; cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi line 121
Quoted 5 lines
arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi +1
-1@@ -118,7 +118,7 @@ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; - mmc0_cd_pin_q8: mmc0_cd_pin at 0 { + mmc0_cd_pin: mmc0_cd_pin at 0 {
We could name this mmc0_cd_pin_reference_design and put it in sun5i-a13.dtsi. We already do this for A10/A20.
This works equally well though.
Quoted 6 lines
arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi +0
-1allwinner,pins = "PG0"; allwinner,function = "gpio_in"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; --2.7.4
PATCH 5/15 ARM: dts: sun5i: reference-design-tablet: Remove mention of q8
Hi,
Quoted 25 lines · Chen-Yu Tsai
Quoted 24 lines · Hans de Goede
Remove all mention of q8 from
sun5i-reference-design-tablet.dtsi.Signed-off-by Hans de Goede <[email protected]>--- arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi +1
-1@@ -98,7 +98,7 @@ &mmc0 { pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v0>; bus-width = <4>; cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */@@ -118,7 +118,7 @@ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; };
Quoted 5 lines
arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi line 121
Quoted 2 lines
arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi +1
-1- mmc0_cd_pin_q8: mmc0_cd_pin at 0 { + mmc0_cd_pin: mmc0_cd_pin at 0 {We could name this
mmc0_cd_pin_reference_designand put it insun5i-a13.dtsi. We already do this for A10/A20.
I would prefer to keep this this way, I was never really fond of the A10/A20 solution, in retrospect we should have done a sun4i-a10-reference-design.dtsi defining a lot more stuff then just the cd_pin.
Quoted 3 lines
This works equally well though.
Acked-by Chen-Yu Tsai <[email protected]>
Thanks.
Regards,
Hans
Quoted 7 lines
Quoted 7 lines
arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi +0
-1allwinner,pins = "PG0"; allwinner,function = "gpio_in"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; --2.7.4
PATCH 6/15 ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for dit4350 dts
In reply to Hans de GoedeThis results in quite a nice cleanup for this dts file.
Note as a side-effect this also enables the on board speaker / headphones out. I've tested that this works as advertised.
--- arch/arm/boot/dts/sun5i-a13-difrnce-dit4350.dts | 178 +----------------------- 1 file changed, 1 insertion(+), 177 deletions(-)
arch/arm/boot/dts/sun5i-a13-difrnce-dit4350.dts +1 -177
@@ -42,185 +42,9 @@ /dts-v1/; #include "sun5i-a13.dtsi" -#include "sunxi-common-regulators.dtsi" -#include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/input/input.h> -#include <dt-bindings/interrupt-controller/irq.h> -#include <dt-bindings/pinctrl/sun4i-a10.h> -#include <dt-bindings/pwm/pwm.h> +#include "sun5i-reference-design-tablet.dtsi" / { model = "Difrnce DIT4350"; compatible = "difrnce,dit4350", "allwinner,sun5i-a13"; - - aliases { - serial0 = &uart1; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; - brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; - default-brightness-level = <8>; - /* TODO: backlight uses axp gpio1 as enable pin */ - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; -}; - -&cpu0 { - cpu-supply = <®_dcdc2>; -}; - -&ehci0 { - status = "okay"; -}; - -&i2c0 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c0_pins_a>; - status = "okay"; - - axp209: pmic at 34 { - reg = <0x34>; - interrupts = <0>; - }; -}; - -#include "axp209.dtsi" - -&i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_a>; - status = "okay"; - - pcf8563: rtc at 51 { - compatible = "nxp,pcf8563"; - reg = <0x51>; - }; -}; - -&lradc { - vref-supply = <®_ldo2>; - status = "okay"; - - button at 200 { - label = "Volume Up"; - linux,code = <KEY_VOLUMEUP>; - channel = <0>; - voltage = <200000>; - }; - - button at 400 { - label = "Volume Down"; - linux,code = <KEY_VOLUMEDOWN>; - channel = <0>; - voltage = <400000>; - }; -}; - -&mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>; - vmmc-supply = <®_vcc3v3>; - bus-width = <4>; - cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ - cd-inverted; - status = "okay"; -}; - -&otg_sram { - status = "okay"; -}; - -&pio { - mmc0_cd_pin_d709: mmc0_cd_pin at 0 { - allwinner,pins = "PG0"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; - }; - - usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 { - allwinner,pins = "PG1"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>; - }; - - usb0_id_detect_pin: usb0_id_detect_pin at 0 { - allwinner,pins = "PG2"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; - }; -}; - -&pwm { - pinctrl-names = "default"; - pinctrl-0 = <&pwm0_pins>; - status = "okay"; -}; - -®_dcdc2 { - regulator-always-on; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1400000>; - regulator-name = "vdd-cpu"; -}; - -®_dcdc3 { - regulator-always-on; - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1250000>; - regulator-name = "vdd-int-pll"; -}; - -®_ldo1 { - regulator-name = "vdd-rtc"; -}; - -®_ldo2 { - regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "avcc"; -}; - -®_ldo3 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc-wifi"; -}; - -®_usb0_vbus { - gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ - status = "okay"; -}; - -&uart1 { - pinctrl-names = "default"; - pinctrl-0 = <&uart1_pins_b>; - status = "okay"; -}; - -&usb_otg { - dr_mode = "otg"; - status = "okay"; -}; - -&usb0_vbus_pin_a { - allwinner,pins = "PG12"; -}; - -&usbphy { - pinctrl-names = "default"; - pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; - usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ - usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ - usb0_vbus-supply = <®_usb0_vbus>; - usb1_vbus-supply = <®_ldo3>; - status = "okay"; };
Signature · 1 line
2.7.4
PATCH 7/15 ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for utoo p66 dts
In reply to Hans de GoedeThis results in a nice cleanup for this dts file.
--- arch/arm/boot/dts/sun5i-a13-utoo-p66.dts | 180 ++++--------------------------- 1 file changed, 21 insertions(+), 159 deletions(-)
arch/arm/boot/dts/sun5i-a13-utoo-p66.dts +21 -159
@@ -42,24 +42,20 @@ /dts-v1/; #include "sun5i-a13.dtsi" -#include "sunxi-common-regulators.dtsi" -#include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/input/input.h> +#include "sun5i-reference-design-tablet.dtsi" #include <dt-bindings/interrupt-controller/irq.h> -#include <dt-bindings/pinctrl/sun4i-a10.h> -#include <dt-bindings/pwm/pwm.h> / { model = "Utoo P66"; compatible = "utoo,p66", "allwinner,sun5i-a13"; - backlight: backlight { - compatible = "pwm-backlight"; - pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; - /* Note levels of 10 / 20% result in backlight off */ - brightness-levels = <0 30 40 50 60 70 80 90 100>; - default-brightness-level = <6>; - /* TODO: backlight uses axp gpio1 as enable pin */ + /* The P66 uses the uart pins as gpios */ + aliases { + /delete-property/serial0; + }; + + chosen { + /delete-property/stdout-path; }; i2c_lcd: i2c at 0 {
@@ -73,39 +69,21 @@ }; }; -&codec { - pinctrl-names = "default"; - pinctrl-0 = <&codec_pa_pin>; - allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */ - status = "okay"; -}; - -&cpu0 { - cpu-supply = <®_dcdc2>; +&backlight { + /* Note levels of 10 / 20% result in backlight off */ + brightness-levels = <0 30 40 50 60 70 80 90 100>; + default-brightness-level = <6>; }; -&ehci0 { - status = "okay"; +&codec { + allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */ }; -&i2c0 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c0_pins_a>; - status = "okay"; - - axp209: pmic at 34 { - reg = <0x34>; - interrupts = <0>; - }; +&codec_pa_pin { + allwinner,pins = "PG3"; }; -#include "axp209.dtsi" - &i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_a>; - status = "okay"; - icn8318: touchscreen at 40 { compatible = "chipone,icn8318"; reg = <0x40>;
@@ -119,40 +97,6 @@ touchscreen-inverted-x; touchscreen-swapped-x-y; }; - - pcf8563: rtc at 51 { - compatible = "nxp,pcf8563"; - reg = <0x51>; - }; -}; - -&lradc { - vref-supply = <®_ldo2>; - status = "okay"; - - button at 200 { - label = "Volume Up"; - linux,code = <KEY_VOLUMEUP>; - channel = <0>; - voltage = <200000>; - }; - - button at 400 { - label = "Volume Down"; - linux,code = <KEY_VOLUMEDOWN>; - channel = <0>; - voltage = <400000>; - }; -}; - -&mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_p66>; - vmmc-supply = <®_vcc3v3>; - bus-width = <4>; - cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ - cd-inverted; - status = "okay"; }; &mmc2 {
@@ -170,39 +114,7 @@ }; }; -&otg_sram { - status = "okay"; -}; - &pio { - codec_pa_pin: codec_pa_pin at 0 { - allwinner,pins = "PG3"; - allwinner,function = "gpio_out"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; - }; - - mmc0_cd_pin_p66: mmc0_cd_pin at 0 { - allwinner,pins = "PG0"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; - }; - - usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 { - allwinner,pins = "PG1"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>; - }; - - usb0_id_detect_pin: usb0_id_detect_pin at 0 { - allwinner,pins = "PG2"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; - }; - i2c_lcd_pins: i2c_lcd_pin at 0 { allwinner,pins = "PG10", "PG12"; allwinner,function = "gpio_out";
@@ -217,67 +129,17 @@ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; - usb0_vbus_pin_a: usb0_vbus_pin at 0 { - allwinner,pins = "PB4"; - allwinner,function = "gpio_out"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; - }; -}; - -&pwm { - pinctrl-names = "default"; - pinctrl-0 = <&pwm0_pins>; - status = "okay"; -}; - -®_dcdc2 { - regulator-always-on; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1500000>; - regulator-name = "vdd-cpu"; -}; - -®_dcdc3 { - regulator-always-on; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1400000>; - regulator-name = "vdd-int-pll"; -}; - -®_ldo1 { - regulator-name = "vdd-rtc"; -}; - -®_ldo2 { - regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "avcc"; -}; - -®_ldo3 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc-wifi"; }; ®_usb0_vbus { gpio = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ - status = "okay"; }; -&usb_otg { - dr_mode = "otg"; - status = "okay"; +&uart1 { + /* The P66 uses the uart pins as gpios */ + status = "disabled"; }; -&usbphy { - pinctrl-names = "default"; - pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; - usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ - usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ - usb0_vbus-supply = <®_usb0_vbus>; - usb1_vbus-supply = <®_ldo3>; - status = "okay"; +&usb0_vbus_pin_a { + allwinner,pins = "PB4"; };
Signature · 1 line
2.7.4
PATCH 8/15 ARM: dts: Copy sun8i-q8-common.dtsi sun8i-reference-design-tablet.dtsi
In reply to Hans de GoedeCopy sun8i-q8-common.dtsi to sun8i-reference-design-tablet.dtsi. This is part of renaming all the sun?i-q8-common.dtsi files to sun?i-reference-design-tablet.dtsi since most of the hw-config in there is shared by all sunxi tablets.
Note that in this case we keep sun5i-q8-common.dtsi as it is shared between a23 / a33 q8 tablets. Also we leave the usb-wifi config in there (rather then in sun8i-reference-design-tablet.dtsi) as most sun8i tablets use sdio wifi rather then usb wifi.
---
arch/arm/boot/dts/sun8i-q8-common.dtsi | 171 +--------------------
...mon.dtsi => sun8i-reference-design-tablet.dtsi} | 13 +-
2 files changed, 5 insertions(+), 179 deletions(-)
copy arch/arm/boot/dts/{sun8i-q8-common.dtsi => sun8i-reference-design-tablet.dtsi} (96%)arch/arm/boot/dts/sun8i-q8-common.dtsi +1 -170
@@ -40,181 +40,12 @@ * OTHER DEALINGS IN THE SOFTWARE. */ #include "sunxi-reference-design-tablet.dtsi" - -#include <dt-bindings/pwm/pwm.h> - -/ { - aliases { - serial0 = &r_uart; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - pinctrl-names = "default"; - pinctrl-0 = <&bl_en_pin_q8>; - pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; - brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; - default-brightness-level = <8>; - enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; -}; +#include "sun8i-reference-design-tablet.dtsi" &ehci0 { status = "okay"; }; -&mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>; - vmmc-supply = <®_dcdc1>; - bus-width = <4>; - cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ - cd-inverted; - status = "okay"; -}; - -&pio { - bl_en_pin_q8: bl_en_pin at 0 { - allwinner,pins = "PH6"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; - }; - - mmc0_cd_pin_q8: mmc0_cd_pin at 0 { - allwinner,pins = "PB4"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; - }; - - usb0_id_detect_pin: usb0_id_detect_pin at 0 { - allwinner,pins = "PH8"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; - }; -}; - -&r_rsb { - status = "okay"; - - axp22x: pmic at 3a3 { - compatible = "x-powers,axp223"; - reg = <0x3a3>; - interrupt-parent = <&nmi_intc>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; - eldoin-supply = <®_dcdc1>; - x-powers,drive-vbus-en; - }; -}; - -#include "axp22x.dtsi" - -®_aldo1 { - regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "vcc-io"; -}; - -®_aldo2 { - regulator-always-on; - regulator-min-microvolt = <2350000>; - regulator-max-microvolt = <2650000>; - regulator-name = "vdd-dll"; -}; - -®_aldo3 { - regulator-always-on; - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc-pll-avcc"; -}; - -®_dc1sw { - regulator-name = "vcc-lcd"; -}; - -®_dc5ldo { - regulator-always-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1400000>; - regulator-name = "vdd-cpus"; -}; - -®_dcdc1 { - regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "vcc-3v0"; -}; - -®_dcdc2 { - regulator-always-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1400000>; - regulator-name = "vdd-sys"; -}; - -®_dcdc3 { - regulator-always-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1400000>; - regulator-name = "vdd-cpu"; -}; - -®_dcdc5 { - regulator-always-on; - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1500000>; - regulator-name = "vcc-dram"; -}; - -®_dldo1 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc-wifi"; -}; - -®_drivevbus { - regulator-name = "usb0-vbus"; - status = "okay"; -}; - -®_rtc_ldo { - regulator-name = "vcc-rtc"; -}; - -&r_uart { - pinctrl-names = "default"; - pinctrl-0 = <&r_uart_pins_a>; - status = "okay"; -}; - -&simplefb_lcd { - vcc-lcd-supply = <®_dc1sw>; -}; - -&usb_otg { - dr_mode = "otg"; - status = "okay"; -}; - -&usb_power_supply { - status = "okay"; -}; - &usbphy { - pinctrl-names = "default"; - pinctrl-0 = <&usb0_id_detect_pin>; - usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ - usb0_vbus_power-supply = <&usb_power_supply>; - usb0_vbus-supply = <®_drivevbus>; usb1_vbus-supply = <®_dldo1>; - status = "okay"; };
arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi renamed from arch/arm/boot/dts/sun8i-q8-common.dtsi +4 -9
@@ -51,7 +51,7 @@ backlight: backlight { compatible = "pwm-backlight"; pinctrl-names = "default"; - pinctrl-0 = <&bl_en_pin_q8>; + pinctrl-0 = <&bl_en_pin>; pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; default-brightness-level = <8>;
@@ -63,13 +63,9 @@ }; }; -&ehci0 { - status = "okay"; -}; - &mmc0 { pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_dcdc1>; bus-width = <4>; cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
@@ -78,14 +74,14 @@ }; &pio { - bl_en_pin_q8: bl_en_pin at 0 { + bl_en_pin: bl_en_pin at 0 { allwinner,pins = "PH6"; allwinner,function = "gpio_in"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; - mmc0_cd_pin_q8: mmc0_cd_pin at 0 { + mmc0_cd_pin: mmc0_cd_pin at 0 { allwinner,pins = "PB4"; allwinner,function = "gpio_in"; allwinner,drive = <SUN4I_PINCTRL_10_MA>;
@@ -215,6 +211,5 @@ usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ usb0_vbus_power-supply = <&usb_power_supply>; usb0_vbus-supply = <®_drivevbus>; - usb1_vbus-supply = <®_dldo1>; status = "okay"; };
Signature · 1 line
2.7.4
PATCH 9/15 ARM: dts: sun8i: reference-design-tablet: Add drivevbus-supply
In reply to Hans de GoedeAdd a drivevbus-supply property so that the drivevbus regulator reports the right voltage value.
--- arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi +1 -0
@@ -105,6 +105,7 @@ interrupt-parent = <&nmi_intc>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; eldoin-supply = <®_dcdc1>; + drivevbus-supply = <®_vcc5v0>; x-powers,drive-vbus-en; }; };
Signature · 1 line
2.7.4
PATCH 10/15 ARM: dts: sun8i: Use sun8i-reference-design-tablet for polaroid mid2809pxe04
In reply to Hans de GoedeThis results in quite a nice cleanup for this dts file.
--- .../boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts | 207 +-------------------- 1 file changed, 1 insertion(+), 206 deletions(-)
arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts +1 -206
@@ -42,214 +42,9 @@ /dts-v1/; #include "sun8i-a23.dtsi" -#include "sunxi-common-regulators.dtsi" - -#include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/input/input.h> -#include <dt-bindings/pinctrl/sun4i-a10.h> -#include <dt-bindings/pwm/pwm.h> +#include "sun8i-reference-design-tablet.dtsi" / { model = "Polaroid MID2809PXE04 tablet"; compatible = "polaroid,mid2809pxe04", "allwinner,sun8i-a23"; - - aliases { - serial0 = &r_uart; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - pinctrl-names = "default"; - pinctrl-0 = <&bl_en_pin_mid2809>; - pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; - brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; - default-brightness-level = <8>; - enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; -}; - -&i2c0 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c0_pins_a>; - status = "okay"; -}; - -&i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_a>; - status = "okay"; -}; - -&lradc { - vref-supply = <®_vcc3v0>; - status = "okay"; - - button at 200 { - label = "Volume Up"; - linux,code = <KEY_VOLUMEUP>; - channel = <0>; - voltage = <200000>; - }; - - button at 400 { - label = "Volume Down"; - linux,code = <KEY_VOLUMEDOWN>; - channel = <0>; - voltage = <400000>; - }; -}; - -&mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_mid2809>; - vmmc-supply = <®_dcdc1>; - bus-width = <4>; - cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ - cd-inverted; - status = "okay"; -}; - -&pio { - bl_en_pin_mid2809: bl_en_pin at 0 { - allwinner,pins = "PH6"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; - }; - - mmc0_cd_pin_mid2809: mmc0_cd_pin at 0 { - allwinner,pins = "PB4"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; - }; - - usb0_id_detect_pin: usb0_id_detect_pin at 0 { - allwinner,pins = "PH8"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; - }; -}; - -&pwm { - pinctrl-names = "default"; - pinctrl-0 = <&pwm0_pins>; - status = "okay"; -}; - -&r_rsb { - status = "okay"; - - axp22x: pmic at 3a3 { - compatible = "x-powers,axp223"; - reg = <0x3a3>; - interrupt-parent = <&nmi_intc>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; - eldoin-supply = <®_dcdc1>; - x-powers,drive-vbus-en; - }; -}; - -&r_uart { - pinctrl-names = "default"; - pinctrl-0 = <&r_uart_pins_a>; - status = "okay"; -}; - -#include "axp22x.dtsi" - -®_aldo1 { - regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "vcc-io"; -}; - -®_aldo2 { - regulator-always-on; - regulator-min-microvolt = <2350000>; - regulator-max-microvolt = <2650000>; - regulator-name = "vdd-dll"; -}; - -®_aldo3 { - regulator-always-on; - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc-pll-avcc"; -}; - -®_dc1sw { - regulator-name = "vcc-lcd"; -}; - -®_dc5ldo { - regulator-always-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1400000>; - regulator-name = "vdd-cpus"; -}; - -®_dcdc1 { - regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "vcc-3v0"; -}; - -®_dcdc2 { - regulator-always-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1400000>; - regulator-name = "vdd-sys"; -}; - -®_dcdc3 { - regulator-always-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1400000>; - regulator-name = "vdd-cpu"; -}; - -®_dcdc5 { - regulator-always-on; - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1500000>; - regulator-name = "vcc-dram"; -}; - -®_drivevbus { - regulator-name = "usb0-vbus"; - status = "okay"; -}; - -®_rtc_ldo { - regulator-name = "vcc-rtc"; -}; - -&simplefb_lcd { - vcc-lcd-supply = <®_dc1sw>; -}; - -&usb_otg { - dr_mode = "otg"; - status = "okay"; -}; - -&usb_power_supply { - status = "okay"; -}; - -&usbphy { - pinctrl-names = "default"; - pinctrl-0 = <&usb0_id_detect_pin>; - usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ - usb0_vbus_power-supply = <&usb_power_supply>; - usb0_vbus-supply = <®_drivevbus>; - status = "okay"; };
Signature · 1 line
2.7.4
PATCH 11/15 ARM: dts: sun8i: Use sun8i-reference-design-tablet for gt90h dts
In reply to Hans de GoedeThis results in quite a nice cleanup for this dts file.
As an added bonus this also enables full otg support. I've tested that this works as advertised.
--- arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 215 +------------------------------ 1 file changed, 1 insertion(+), 214 deletions(-)
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts +1 -214
@@ -42,86 +42,18 @@ /dts-v1/; #include "sun8i-a23.dtsi" -#include "sunxi-common-regulators.dtsi" - -#include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/input/input.h> -#include <dt-bindings/pinctrl/sun4i-a10.h> -#include <dt-bindings/pwm/pwm.h> +#include "sun8i-reference-design-tablet.dtsi" / { model = "Allwinner GT90H Dual Core Tablet (v4)"; compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23"; - - aliases { - serial0 = &r_uart; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - pinctrl-names = "default"; - pinctrl-0 = <&bl_en_pin_gt90h>; - pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; - brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; - default-brightness-level = <8>; - enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; }; &ehci0 { status = "okay"; }; -&i2c0 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c0_pins_a>; - status = "okay"; - /* - * The gsl1680 is rated at 400KHz and it will not work reliable at - * 100KHz, this has been confirmed on multiple different tablets. - * The gsl1680 is the only device on this bus. - */ - clock-frequency = <400000>; - - gsl1680: touchscreen at 40 { - compatible = "silead,gsl1680"; - reg = <0x40>; - interrupt-parent = <&pio>; - interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */ - pinctrl-names = "default"; - pinctrl-0 = <&ts_power_pin_gth90h>; - power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ - }; -}; - -&i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_a>; - status = "okay"; -}; - &lradc { - vref-supply = <®_vcc3v0>; - status = "okay"; - - button at 200 { - label = "Volume Up"; - linux,code = <KEY_VOLUMEUP>; - channel = <0>; - voltage = <200000>; - }; - - button at 400 { - label = "Volume Down"; - linux,code = <KEY_VOLUMEDOWN>; - channel = <0>; - voltage = <400000>; - }; - button at 600 { label = "Back"; linux,code = <KEY_BACK>;
@@ -130,151 +62,6 @@ }; }; -&mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>; - vmmc-supply = <®_aldo1>; - bus-width = <4>; - cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ - cd-inverted; - status = "okay"; -}; - -&pio { - bl_en_pin_gt90h: bl_en_pin at 0 { - allwinner,pins = "PH6"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; - }; - - mmc0_cd_pin_gt90h: mmc0_cd_pin at 0 { - allwinner,pins = "PB4"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; - }; - - ts_power_pin_gth90h: ts_power_pin at 0 { - allwinner,pins = "PH1"; - allwinner,function = "gpio_out"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; - }; -}; - -&pwm { - pinctrl-names = "default"; - pinctrl-0 = <&pwm0_pins>; - status = "okay"; -}; - -&r_rsb { - status = "okay"; - - axp22x: pmic at 3a3 { - compatible = "x-powers,axp223"; - reg = <0x3a3>; - interrupt-parent = <&nmi_intc>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; - eldoin-supply = <®_dcdc1>; - }; -}; - -&r_uart { - pinctrl-names = "default"; - pinctrl-0 = <&r_uart_pins_a>; - status = "okay"; -}; - -#include "axp22x.dtsi" - -®_aldo1 { - regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "vcc-io"; -}; - -®_aldo2 { - regulator-always-on; - regulator-min-microvolt = <2350000>; - regulator-max-microvolt = <2650000>; - regulator-name = "vdd-dll"; -}; - -®_aldo3 { - regulator-always-on; - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc-pll-avcc"; -}; - -®_dc1sw { - regulator-name = "vcc-lcd"; -}; - -®_dc5ldo { - regulator-always-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1400000>; - regulator-name = "vdd-cpus"; -}; - -®_dcdc1 { - regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "vcc-3v0"; -}; - -®_dcdc2 { - regulator-always-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1400000>; - regulator-name = "vdd-sys"; -}; - -®_dcdc3 { - regulator-always-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1400000>; - regulator-name = "vdd-cpu"; -}; - -®_dcdc5 { - regulator-always-on; - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1500000>; - regulator-name = "vcc-dram"; -}; - -®_dldo1 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-name = "vcc-wifi"; -}; - -®_rtc_ldo { - regulator-name = "vcc-rtc"; -}; - -&simplefb_lcd { - vcc-lcd-supply = <®_dc1sw>; -}; - -/* - * FIXME for now we only support host mode and rely on u-boot to have - * turned on Vbus which is controlled by the axp223 pmic on the board. - * - * Once we have axp223 support we should switch to fully supporting otg. - */ -&usb_otg { - dr_mode = "host"; - status = "okay"; -}; - &usbphy { usb1_vbus-supply = <®_dldo1>; - status = "okay"; };
Signature · 1 line
2.7.4
PATCH 12/15 ARM: dts: sun8i: Use sun8i-reference-design-tablet for ga10h dts
In reply to Hans de GoedeThis results in quite a nice cleanup for this dts file.
As an added bonus this also enables backlight, regulator and full otg support. I've tested that all these works as advertised.
--- arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 77 +----------------------------- 1 file changed, 1 insertion(+), 76 deletions(-)
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts +1 -76
@@ -42,59 +42,18 @@ /dts-v1/; #include "sun8i-a33.dtsi" -#include "sunxi-common-regulators.dtsi" - -#include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/input/input.h> -#include <dt-bindings/pinctrl/sun4i-a10.h> +#include "sun8i-reference-design-tablet.dtsi" / { model = "Allwinner GA10H Quad Core Tablet (v1.1)"; compatible = "allwinner,ga10h-v1.1", "allwinner,sun8i-a33"; - - aliases { - serial0 = &r_uart; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; }; &ehci0 { status = "okay"; }; -&i2c0 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c0_pins_a>; - status = "okay"; -}; - -&i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_a>; - status = "okay"; -}; - &lradc { - vref-supply = <®_vcc3v0>; - status = "okay"; - - button at 200 { - label = "Volume Up"; - linux,code = <KEY_VOLUMEUP>; - channel = <0>; - voltage = <200000>; - }; - - button at 400 { - label = "Volume Down"; - linux,code = <KEY_VOLUMEDOWN>; - channel = <0>; - voltage = <400000>; - }; - button at 600 { label = "Back"; linux,code = <KEY_BACK>;
@@ -103,40 +62,6 @@ }; }; -&mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8h>; - vmmc-supply = <®_vcc3v0>; - bus-width = <4>; - cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ - cd-inverted; - status = "okay"; -}; - &ohci0 { status = "okay"; }; - -&pio { - mmc0_cd_pin_q8h: mmc0_cd_pin at 0 { - allwinner,pins = "PB4"; - allwinner,function = "gpio_in"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; - }; -}; - -&r_uart { - pinctrl-names = "default"; - pinctrl-0 = <&r_uart_pins_a>; - status = "okay"; -}; - -&usb_otg { - dr_mode = "host"; - status = "okay"; -}; - -&usbphy { - status = "okay"; -};
Signature · 1 line
2.7.4
PATCH 13/15 ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h
In reply to Hans de GoedeThe ga10h tablet has a rtl8703as wifi chip, add a dt node describing it.
This enables usage of wifi on this tablet (together with the out of tree rtl8732bs driver).
--- arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts +18 -0
@@ -47,6 +47,11 @@ / { model = "Allwinner GA10H Quad Core Tablet (v1.1)"; compatible = "allwinner,ga10h-v1.1", "allwinner,sun8i-a33"; + + aliases { + /* Make u-boot set mac-address for rtl8703as (no eeprom) */ + ethernet0 = &rtl8703as; + }; }; &ehci0 {
@@ -62,6 +67,19 @@ }; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_dldo1>; + bus-width = <4>; + non-removable; + status = "okay"; + + rtl8703as: sdio_wifi at 1 { + reg = <1>; + }; +}; + &ohci0 { status = "okay"; };
Signature · 1 line
2.7.4
PATCH 13/15 ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h
Hi,
Quoted 29 lines · Hans de Goede
The ga10h tablet has a rtl8703as wifi chip, add a dt node describing it.
This enables usage of wifi on this tablet (together with the out of tree rtl8732bs driver).
Signed-off-by Hans de Goede <[email protected]>--- arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts +5
-0@@ -47,6 +47,11 @@ / { model = "Allwinner GA10H Quad Core Tablet (v1.1)"; compatible = "allwinner,ga10h-v1.1", "allwinner,sun8i-a33"; + + aliases { + /* Make u-boot set mac-address for rtl8703as (no eeprom) */ + ethernet0 = &rtl8703as; + }; }; &ehci0 {@@ -62,6 +67,19 @@ }; };
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts line 78
Quoted 10 lines
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts +9
-0+&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_dldo1>; + bus-width = <4>; + non-removable; + status = "okay"; + + rtl8703as: sdio_wifi at 1 {
Shouldn't that need a compatible ?
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160711/fd1e428f/attachment.sig>
PATCH 13/15 ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h
Hi,
Quoted 33 lines · Maxime Ripard
Hi,
Quoted 30 lines · Hans de Goede
The ga10h tablet has a rtl8703as wifi chip, add a dt node describing it.
This enables usage of wifi on this tablet (together with the out of tree rtl8732bs driver).
Signed-off-by Hans de Goede <[email protected]>--- arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts +5
-0@@ -47,6 +47,11 @@ / { model = "Allwinner GA10H Quad Core Tablet (v1.1)"; compatible = "allwinner,ga10h-v1.1", "allwinner,sun8i-a33"; + + aliases { + /* Make u-boot set mac-address for rtl8703as (no eeprom) */ + ethernet0 = &rtl8703as; + }; }; &ehci0 {@@ -62,6 +67,19 @@ }; };
Quoted 11 lines
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts line 78
Quoted 9 lines
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts +9
-0+&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_dldo1>; + bus-width = <4>; + non-removable; + status = "okay"; + + rtl8703as: sdio_wifi at 1 {Shouldn't that need a compatible ?
There is no upstream driver yet, so no devicetree binding for the specific wifi chip used. But all we really need is to follow generic sdio / network bindings:
Describes how to create a mmc-host child-node describing an (e)mmc-card or sdio-function, in this case we are adding a node for sdio-function 1, hence the reg = <1>; in the child-node.
Linux implementation wise, this will make the mmc core set the dev->of_node ptr to this node for the struct device it passes into the sdio-drivers probe function.
And u-boot will add a local-mac-address property as documented here:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/ethernet.txt
to the node pointed to by ethernet%d aliases.
To actually make use of this I've modified the out of tree driver to check for the "local-mac-address" property:
https://github.com/jwrdegoede/rtl8723bs/commit/be5e87ea71677120ede457213208902ed9942653
So that each device actually gets a unique address rather then the (stupid) behavior of the out of tree driver to set the same fixes mac address on every device which does not have a mac address in eeprom / nvram.
Since this follows the existing ethernet bindings standard I believe the dts bits can go upstream as is, but since there is no upstream-able driver yet, I do not believe that making up a compatible string to add to the child-node is a good idea.
More-over on q8 tablets we will want to do the same (again for eeprom / nvram less boards) but without pinning ourselves to a specific sdio-wifi module / compatible, instead relying on sdio enumeration to figure out which sdio-wifi module is present.
Regards,
Hans
PATCH 13/15 ARM: dts: sun8i: Add dt node for rtl8703as wifi chip on ga10h
Quoted 16 lines · Hans de Goede
Quoted 11 lines
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts line 78
Quoted 9 lines
+&mmc1 {
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts +8
-0+ pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_dldo1>; + bus-width = <4>; + non-removable; + status = "okay"; + + rtl8703as: sdio_wifi at 1 {Shouldn't that need a compatible ?
There is no upstream driver yet, so no devicetree binding for the specific wifi chip used. But all we really need is to follow generic sdio / network bindings:
Quoted 5 lines
Describes how to create a mmc-host child-node describing an (e)mmc-card or sdio-function, in this case we are adding a node for sdio-function 1, hence the reg = <1>; in the child-node.
Both that file and
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc.txt
list the compatible property as mandatory.
Quoted 25 lines
Linux implementation wise, this will make the mmc core set the
dev->of_nodeptr to this node for the struct device it passes into the sdio-drivers probe function.And u-boot will add a local-mac-address property as documented here:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/ethernet.txtto the node pointed to by ethernet%d aliases.
To actually make use of this I've modified the out of tree driver to check for the "local-mac-address" property:
https://github.com/jwrdegoede/rtl8723bs/commit/be5e87ea71677120ede457213208902ed9942653
So that each device actually gets a unique address rather then the (stupid) behavior of the out of tree driver to set the same fixes mac address on every device which does not have a mac address in eeprom / nvram.
Since this follows the existing ethernet bindings standard I believe the dts bits can go upstream as is, but since there is no upstream-able driver yet, I do not believe that making up a compatible string to add to the child-node is a good idea.
Quoted 4 lines
More-over on q8 tablets we will want to do the same (again for eeprom / nvram less boards) but without pinning ourselves to a specific sdio-wifi module / compatible, instead relying on sdio enumeration to figure out which sdio-wifi module is present.
Feel free to raise that issue to the DT maintainers. But this patch breaks the existing bindings, so it cannot be merged as is.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160713/b9fe20fb/attachment.sig>
PATCH 14/15 ARM: dts: sun8i: Add dts file for Polaroid MID2407PXE03 tablet
In reply to Hans de GoedeThe Polaroid MID2407PXE03 is an a23 based 7" tablet based on a M86_MB V2.0 PCB, featuring a 800x480 LCD, 512MB RAM, 4G NAND, esp8089 wifi, gsl1680 touchschreen, micro-sd slot, 3.5mm headphone jack and a micro-usb otg connector which doubles as charging port.
---
Changes in v2:
-Use sun8i-reference-design-tablet.dtsi
-Note this makes the dts pretty much empty for now, this will change
once the touchscreen driver + some mmc-pwrseq changes for the sdio wifi land upstream
--- arch/arm/boot/dts/Makefile | 1 + .../boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts | 50 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts
arch/arm/boot/dts/Makefile +1 -0
@@ -755,6 +755,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-a23-gt90h-v4.dtb \ sun8i-a23-ippo-q8h-v5.dtb \ sun8i-a23-ippo-q8h-v1.2.dtb \ + sun8i-a23-polaroid-mid2407pxe03.dtb \ sun8i-a23-polaroid-mid2809pxe04.dtb \ sun8i-a23-q8-tablet.dtb \ sun8i-a33-et-q8-v1.6.dtb \
arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts new file +50 -0
50 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 15/15 ARM: dts: sun8i: Add dts file for inet86dz board
In reply to Hans de GoedeThe inet86dz board is a board used in 7" tablets from various oems.
These tablets are a23 based 7" tablets featuring a 1024x600 LCD, 512MB RAM, 4G NAND, rtl8188etv usb wifi, gsl1680 touchschreen, micro-sd slot, 3.5mm headphone jack and a micro-usb otg connector which doubles as charging port.
---
Changes in v2:
-Use sun8i-reference-design-tablet.dtsi
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-a23-inet86dz.dts | 58 ++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-a23-inet86dz.dts
arch/arm/boot/dts/Makefile +1 -0
@@ -753,6 +753,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-a23-evb.dtb \ sun8i-a23-gt90h-v4.dtb \ + sun8i-a23-inet86dz.dtb \ sun8i-a23-ippo-q8h-v5.dtb \ sun8i-a23-ippo-q8h-v1.2.dtb \ sun8i-a23-polaroid-mid2407pxe03.dtb \
arch/arm/boot/dts/sun8i-a23-inet86dz.dts new file +58 -0
58 lines not on this page · raw message
Signature · 1 line
2.7.4
cover ARM: dts: sunxi: Add reference-design-tablet.dtsi files + 2 new tablets
In reply to Hans de GoedeQuoted 9 lines · Hans de Goede
Hi Maxime, Chen-Yu,
Here is a series based on Chen-Yu's suggestion to add a
reference-design-tablet.dtsifile. This works out quite nicely, resulting in much simpler tablet .dts files, as well as enabling a bunch of extra features on some tablets, showing that having to add the same dts bits over and over again for all model tablets is not a good idea.
Quoted 3 lines
This also includes a v2 submission of the new tablet dts files which sparked the
reference-design-tablet.dtsidiscussion.
Beside the minor comment on patch 13, applied everything.
Thanks, this is a very nice cleanup.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160711/2d0840eb/attachment-0001.sig>