<div dir="ltr"><div dir="ltr">Hi Samuel,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 3, 2022 at 1:12 PM Samuel Holland <<a href="mailto:samuel@sholland.org">samuel@sholland.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 6/15/22 4:39 AM, Suniel Mahesh wrote:<br>
> The R16-Vista-E board from RenewWorldOutreach based on allwinner<br>
> R16(A33).<br>
> <br>
> General features:<br>
> - 1GB RAM<br>
> - microSD slot<br>
> - Realtek Wifi<br>
> - 1 x USB 2.0<br>
> - HDMI IN<br>
> - HDMI OUT<br>
> - Audio out<br>
> - MIPI DSI<br>
> - TI DLPC3433<br>
> <br>
> It has also connectors to connect an external mini keypad.<br>
> <br>
> Signed-off-by: Christopher Vollo <<a href="mailto:chris@renewoutreach.org" target="_blank">chris@renewoutreach.org</a>><br>
> Signed-off-by: Jagan Teki <<a href="mailto:jagan@amarulasolutions.com" target="_blank">jagan@amarulasolutions.com</a>><br>
> Signed-off-by: Suniel Mahesh <<a href="mailto:sunil@amarulasolutions.com" target="_blank">sunil@amarulasolutions.com</a>><br>
> <br>
> ---<br>
> Changes for v2:<br>
> - Add missing compatible string<br>
> - insert missing signatures of contributors<br>
> ---<br>
>  arch/arm/boot/dts/Makefile                    |   1 +<br>
>  arch/arm/boot/dts/sun8i-r16-renew-vista-e.dts | 361 ++++++++++++++++++<br>
>  2 files changed, 362 insertions(+)<br>
>  create mode 100644 arch/arm/boot/dts/sun8i-r16-renew-vista-e.dts<br>
> <br>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile<br>
> index 184899808ee7..b5966c0742e1 100644<br>
> --- a/arch/arm/boot/dts/Makefile<br>
> +++ b/arch/arm/boot/dts/Makefile<br>
> @@ -1353,6 +1353,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \<br>
>       sun8i-r16-nintendo-nes-classic.dtb \<br>
>       sun8i-r16-nintendo-super-nes-classic.dtb \<br>
>       sun8i-r16-parrot.dtb \<br>
> +     sun8i-r16-renew-vista-e.dtb \<br>
>       sun8i-r40-bananapi-m2-ultra.dtb \<br>
>       sun8i-r40-oka40i-c.dtb \<br>
>       sun8i-s3-elimo-initium.dtb \<br>
> diff --git a/arch/arm/boot/dts/sun8i-r16-renew-vista-e.dts b/arch/arm/boot/dts/sun8i-r16-renew-vista-e.dts<br>
> new file mode 100644<br>
> index 000000000000..45f620203c33<br>
> --- /dev/null<br>
> +++ b/arch/arm/boot/dts/sun8i-r16-renew-vista-e.dts<br>
> @@ -0,0 +1,361 @@<br>
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)<br>
> +/*<br>
> + * Copyright (C) 2022 RenewWorldOutreach<br>
> + * Copyright (C) 2022 Amarula Solutions(India)<br>
> + */<br>
> +<br>
> +/dts-v1/;<br>
> +#include "sun8i-a33.dtsi"<br>
> +<br>
> +#include <dt-bindings/gpio/gpio.h><br>
> +#include <dt-bindings/input/input.h><br>
> +#include <dt-bindings/leds/common.h><br>
> +<br>
> +/ {<br>
> +     model = "RenewWorldOutreach R16-Vista-E";<br>
> +     compatible = "renewworldoutreach,r16-vista-e", "allwinner,sun8i-r16", "allwinner,sun8i-a33";<br>
> +<br>
> +     aliases {<br>
> +             serial0 = &uart0;<br>
> +     };<br>
> +<br>
> +     chosen {<br>
> +             stdout-path = "serial0:115200n8";<br>
> +     };<br>
> +<br>
> +     gpio-keys-polled {<br>
> +             compatible = "gpio-keys-polled";<br>
> +             poll-interval = <100>;<br>
> +<br>
> +             ok {<br>
> +                     label = "ok";<br>
> +                     linux,code = <KEY_OK>;<br>
> +                     gpios = <&pio 4 0 GPIO_ACTIVE_LOW>;<br>
> +             };<br>
> +<br>
> +             left {<br>
> +                     label = "left";<br>
> +                     linux,code = <KEY_LEFT>;<br>
> +                     gpios = <&pio 4 1 GPIO_ACTIVE_LOW>;<br>
> +             };<br>
> +<br>
> +             right {<br>
> +                     label = "right";<br>
> +                     linux,code = <KEY_RIGHT>;<br>
> +                     gpios = <&pio 4 2 GPIO_ACTIVE_LOW>;<br>
> +             };<br>
> +<br>
> +             up {<br>
> +                     label = "up";<br>
> +                     linux,code = <KEY_UP>;<br>
> +                     gpios = <&pio 4 3 GPIO_ACTIVE_LOW>;<br>
> +             };<br>
> +<br>
> +             down {<br>
> +                     label = "down";<br>
> +                     linux,code = <KEY_DOWN>;<br>
> +                     gpios = <&pio 4 4 GPIO_ACTIVE_LOW>;<br>
> +             };<br>
> +<br>
> +             back {<br>
> +                     label = "back";<br>
> +                     linux,code = <KEY_BACK>;<br>
> +                     gpios = <&pio 4 5 GPIO_ACTIVE_LOW>;<br>
> +             };<br>
> +<br>
> +             power {<br>
> +                     label = "power";<br>
> +                     linux,code = <KEY_POWER>;<br>
> +                     gpios = <&pio 4 6 GPIO_ACTIVE_LOW>;<br>
> +             };<br>
> +<br>
> +             vol-down {<br>
> +                     label = "vol-down";<br>
> +                     linux,code = <KEY_VOLUMEDOWN>;<br>
> +                     gpios = <&pio 7 3 GPIO_ACTIVE_LOW>;<br>
> +             };<br>
> +<br>
> +             vol-up {<br>
> +                     label = "vol-up";<br>
> +                     linux,code = <KEY_VOLUMEUP>;<br>
> +                     gpios = <&pio 7 9 GPIO_ACTIVE_LOW>;<br>
> +             };<br>
> +     };<br>
> +<br>
> +     leds {<br>
> +             compatible = "gpio-leds";<br>
> +<br>
> +             battery-led0 {<br>
> +                     label = "renew-e:battery-led0";<br>
> +                     gpios = <&r_pio 0 2 GPIO_ACTIVE_HIGH>;<br>
> +             };<br>
> +<br>
> +             battery-led1 {<br>
> +                     label = "renew-e:battery-led1";<br>
> +                     gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>;<br>
> +             };<br>
> +<br>
> +             battery-led2 {<br>
> +                     label = "renew-e:battery-led2";<br>
> +                     gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>;<br>
> +             };<br>
> +<br>
> +             battery-led3 {<br>
> +                     label = "renew-e:battery-led3";<br>
> +                     gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>;<br>
> +             };<br>
> +<br>
> +             pad-intz {<br>
> +                     label = "renew-e:pad-intz";<br>
> +                     gpios = <&pio 4 16 GPIO_ACTIVE_HIGH>;<br>
> +                     default-state = "on";<br>
> +             };<br>
<br>
Is this really an LED, or just a generic output?<br></blockquote><div><br></div><div>this is an LED</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> +<br>
> +             battery-led4 {<br>
> +                     label = "renew-e:battery-led4";<br>
> +                     gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;<br>
> +             };<br>
> +<br>
> +             volume-led0 {<br>
> +                        label = "renew-e:volume-led0";<br>
> +                        gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;<br>
> +                };<br>
<br>
Indent with tabs, please.<br></blockquote><div> </div><div>indenting, sending a v3 </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> +<br>
> +             volume-led1 {<br>
> +                     label = "renew-e:volume-led1";<br>
> +                     gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>;<br>
> +             };<br>
> +<br>
> +             volume-led2 {<br>
> +                     label = "renew-e:volume-led2";<br>
> +                     gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>;<br>
> +             };<br>
> +<br>
> +             volume-led3 {<br>
> +                     label = "renew-e:volume-led3";<br>
> +                     gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>;<br>
> +             };<br>
> +<br>
> +             volume-led4 {<br>
> +                     label = "renew-e:volume-led4";<br>
> +                     gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>;<br>
> +             };<br>
> +<br>
> +             fans-on {<br>
> +                     label = "renew-e:fans-on";<br>
> +                     gpios = <&pio 4 14 GPIO_ACTIVE_HIGH>; /* FAN_ON/OFF: PE14 */<br>
> +                     default-state = "on";<br>
> +             };<br>
<br>
Does this drive an LED or control a fan? If it controls a fan, it should use the<br>
gpio-fan binding, and not pretend to be an LED.<br>
<br></blockquote><div>it controls a fan </div><div>changing the binding to gpio-fan</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
It also does not validate against the gpio-leds binding:<br>
<br>
sun8i-r16-renew-vista-e.dtb: leds: 'fans-on', 'pad-intz' do not match any of the<br>
regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+'<br>
<br>
> +     };<br>
> +<br>
> +     reg_vcc5v0: vcc5v0 {<br>
> +             compatible = "regulator-fixed";<br>
> +             regulator-name = "vcc5v0";<br>
> +             regulator-min-microvolt = <5000000>;<br>
> +             regulator-max-microvolt = <5000000>;<br>
> +     };<br>
> +};<br>
> +<br>
> +&codec {<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&cpu0 {<br>
> +     cpu-supply = <&reg_dcdc3>;<br>
> +};<br>
> +<br>
> +&cpu0_opp_table {<br>
> +     opp-1104000000 {<br>
> +             opp-hz = /bits/ 64 <1104000000>;<br>
> +             opp-microvolt = <1320000>;<br>
> +             clock-latency-ns = <244144>; /* 8 32k periods */<br>
> +     };<br>
> +<br>
> +     opp-1200000000 {<br>
> +             opp-hz = /bits/ 64 <1200000000>;<br>
> +             opp-microvolt = <1320000>;<br>
> +             clock-latency-ns = <244144>; /* 8 32k periods */<br>
> +     };<br>
> +};<br>
> +<br>
> +&dai {<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&de {<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&dphy {<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&ehci0 {<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&mmc0 {<br>
> +     vmmc-supply = <&reg_dcdc1>;<br>
> +     bus-width = <4>;<br>
> +     non-removable;<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&mmc1 {<br>
> +     pinctrl-names = "default";<br>
> +     pinctrl-0 = <&mmc1_pg_pins>;<br>
> +     vmmc-supply = <&reg_dcdc1>;<br>
> +     bus-width = <4>;<br>
> +     broken-cd;<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&ohci0 {<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&r_rsb {<br>
> +     status = "okay";<br>
> +<br>
> +     axp22x: pmic@3a3 {<br>
> +             compatible = "x-powers,axp223";<br>
> +             reg = <0x3a3>;<br>
> +             interrupt-parent = <&r_intc>;<br>
> +             interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;<br>
> +             eldoin-supply = <&reg_dcdc1>;<br>
> +             x-powers,drive-vbus-en;<br>
> +     };<br>
> +};<br>
> +<br>
> +#include "axp223.dtsi"<br>
> +<br>
> +&ac_power_supply {<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&reg_aldo1 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <3000000>;<br>
> +     regulator-max-microvolt = <3000000>;<br>
> +     regulator-name = "vcc-io";<br>
> +};<br>
> +<br>
> +&reg_aldo2 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <2500000>;<br>
> +     regulator-max-microvolt = <2500000>;<br>
> +     regulator-name = "vdd-dll";<br>
> +};<br>
> +<br>
> +&reg_aldo3 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <3000000>;<br>
> +     regulator-max-microvolt = <3000000>;<br>
> +     regulator-name = "avcc";<br>
> +};<br>
> +<br>
> +&reg_dc1sw {<br>
> +     regulator-name = "vcc-lcd";<br>
> +};<br>
> +<br>
> +&reg_dc5ldo {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <900000>;<br>
> +     regulator-max-microvolt = <1400000>;<br>
> +     regulator-name = "vdd-cpus";<br>
> +};<br>
> +<br>
> +&reg_dcdc1 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <3000000>;<br>
> +     regulator-max-microvolt = <3000000>;<br>
> +     regulator-name = "vcc-3v0";<br>
> +};<br>
> +<br>
> +&reg_dcdc2 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <900000>;<br>
> +     regulator-max-microvolt = <1400000>;<br>
> +     regulator-name = "vdd-sys";<br>
> +};<br>
> +<br>
> +&reg_dcdc3 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <900000>;<br>
> +     regulator-max-microvolt = <1400000>;<br>
> +     regulator-name = "vdd-cpu";<br>
> +};<br>
> +<br>
> +&reg_dcdc5 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <1500000>;<br>
> +     regulator-max-microvolt = <1500000>;<br>
> +     regulator-name = "vcc-dram";<br>
> +};<br>
> +<br>
> +&reg_dldo1 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <3300000>;<br>
> +     regulator-max-microvolt = <3300000>;<br>
> +     regulator-name = "vcc-3v3-main1";<br>
> +};<br>
> +<br>
> +&reg_dldo2 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <3300000>;<br>
> +     regulator-max-microvolt = <3300000>;<br>
> +     regulator-name = "vcc-3v3-main2";<br>
> +};<br>
> +<br>
> +&reg_dldo3 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <3300000>;<br>
> +     regulator-max-microvolt = <3300000>;<br>
> +     regulator-name = "vcc-3v3-main3";<br>
> +};<br>
> +<br>
> +&reg_dldo4 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <3300000>;<br>
> +     regulator-max-microvolt = <3300000>;<br>
> +     regulator-name = "vcc-3v3-main4";<br>
> +};<br>
> +<br>
> +&reg_eldo1 {<br>
> +     regulator-always-on;<br>
> +     regulator-min-microvolt = <1200000>;<br>
> +     regulator-max-microvolt = <1200000>;<br>
> +     regulator-name = "vcc-1v2-hdmi";<br>
> +};<br>
> +<br>
> +&reg_drivevbus {<br>
> +     regulator-name = "usb0-vbus";<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&reg_rtc_ldo {<br>
> +     regulator-name = "vcc-rtc";<br>
> +};<br>
> +<br>
> +&sound {<br>
> +     status = "okay";<br>
> +     simple-audio-card,routing =<br>
> +             "Left DAC", "AIF1 Slot 0 Left",<br>
> +             "Right DAC", "AIF1 Slot 0 Right";<br>
<br>
Please use "DACL" and "DACR" here, instead of the AIF1 Slot 0 widgets. The AIF1<br>
Slot 0 widgets do not accurately describe the audio routing and are only kept<br>
for backward compatibility.<br>
<br></blockquote><div>making the changes as suggested</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> +};<br>
> +<br>
> +&uart0 {<br>
> +     pinctrl-names = "default";<br>
> +     pinctrl-0 = <&uart0_pb_pins>;<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&usb_otg {<br>
> +     dr_mode = "host";<br>
> +     status = "okay";<br>
> +};<br>
> +<br>
> +&usbphy {<br>
> +     usb0_vbus-supply = <&reg_vcc5v0>;<br>
<br>
You enable drivevbus and label it as "usb0-vbus". But this suggests the VBUS is<br>
always on. Which is correct?<br></blockquote><div><br></div><div>yes, VBUS is always on</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> +     status = "okay";<br>
> +};<br>
> <br>
<br>
</blockquote></div></div>