OpenWRT compilation for VoCore Ultimate

eroshiva
 
Posts: 2
Joined: Fri Jun 05, 2020 7:49 am

OpenWRT compilation for VoCore Ultimate

Fri Jun 05, 2020 8:07 am

Dear Vonger,
Could you please "open source" .dts files for both VoCore devices with Dock, VoCore 2 Ultimate and VoCore Dock (old version)? These files have definition of the Dock pinout (already prewritten).
I recently can't find any of them to enclose to the OpenWRT source files for compilation needs.
This would definitely ease a compilation for a lot of people.

Right now OpenWRT community can compile it's firmware only for VoCore 2 and VoCore Light, which is cool! Since VoCore 2 Ultimate is from different price range, it would be good to be able to compile system for them as well.


Sincerely,
Ivan.

Vonger
 
Posts: 896
Joined: Sun Oct 19, 2014 6:00 am

Re: OpenWRT compilation for VoCore Ultimate

Sat Jun 06, 2020 1:18 am

.dts is opensourced.
Please download at github.com/vonger/vocore2
It is in the patches.

eroshiva
 
Posts: 2
Joined: Fri Jun 05, 2020 7:49 am

Re: OpenWRT compilation for VoCore Ultimate

Sat Jun 06, 2020 9:12 am

Alright, can you clarify correctness of following .dts files for VoCore 2 Ultimate? Did I miss something?

mt7628an_vocore_vocore2-ultimate.dtsi is following:

#include "mt7628an.dtsi"

#include <dt-bindings/gpio/gpio.h>

/ {
compatible = "vocore,vocore2", "mediatek,mt7628an-soc";

aliases {
label-mac-device = &wmac;
};

chosen {
bootargs = "console=ttyS2,115200";
};
};

&state_default {
gpio {
groups = "wled_an", "wdt";
function = "gpio";
};
refclk {
group = "gpio0";
function = "gpio refclk";
};
};

&wmac {
status = "okay";
};

&ethernet {
mtd-mac-address = <&factory 0x28>;
};

&esw {
mediatek,portmap = <0x7>;
mediatek,portdisable = <0x3a>;
};

&i2s {
#sound-dai-cells = <0>;
status = "okay";
};

&gdma {
status = "okay";
};

&pwm {
status = "okay";
};

&uart1 {
status = "okay";
};

&uart2 {
status = "okay";
};

-----------------------------------------------------------------------

mt7628an_vocore_vocore2-ultimate.dts is following:

/dts-v1/;

#include "mt7628an_vocore_vocore2_ultimate.dtsi"

/ {
compatible = "vocore,vocore2", "mediatek,mt7628an-soc";
model = "VoCore2Ultimate";

aliases {
led-boot = &led_status;
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
};

leds {
compatible = "gpio-leds";

led_status: status {
label = "vocore2:fuchsia:status";
gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
};

sound {
compatible = "simple-audio-card";

name = "soundcard";
format = "i2s";
bitclock-master = <&sound_master>;
frame-master = <&sound_master>;
mclk-fs = <272>;
widgets =
"Microphone", "Microphone Jack",
"Headphone", "Headphone Jack";
routing =
"LINPUT1", "Microphone Jack",
"RINPUT1", "Microphone Jack",
"Microphone Jack", "Mic Bias",
"Headphone Jack", "LOUT1",
"Headphone Jack", "ROUT1";

cpu {
sound-dai = <&i2s>;
};

sound_master: codec {
sound-dai = <&codec>;
};
};
};

&i2c {
status = "okay";

codec: es8388@10 {
#sound-dai-cells = <0>;
compatible = "everest,es8328";
reg = <0x10>;

clocks = <&clkctrl 20>;
clock-names = "refclk";
};
};

&spi0 {
status = "okay";

flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};

partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};

factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};

partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};

----------------------------------------------------------

Is that correct?

Vonger
 
Posts: 896
Joined: Sun Oct 19, 2014 6:00 am

Re: OpenWRT compilation for VoCore Ultimate

Mon Jun 08, 2020 8:54 am

VOCORE2.dtsi and MT7628.dtsi we can use default one.
After patch, the VOCORE2.dts should be like this

Code: Select all
/dts-v1/;

#include "VOCORE2.dtsi"

#include <dt-bindings/gpio/gpio.h>

/ {
   compatible = "vocore,vocore2", "mediatek,mt7628an-soc";
   model = "VoCore2";

   gpio-leds {
      compatible = "gpio-leds";

      status {
         label = "vocore2:fuchsia:status";
         gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
      };
   };

   sound {
      compatible = "simple-audio-card";
      simple-audio-card,name = "soundcard";
      simple-audio-card,format = "i2s";
      simple-audio-card,bitclock-master = <&sound_master>;
      simple-audio-card,frame-master = <&sound_master>;
      simple-audio-card,mclk-fs = <272>;
      simple-audio-card,widgets =
         "Microphone", "Microphone Jack",
         "Headphone", "Headphone Jack";
      simple-audio-card,routing =
         "LINPUT1", "Microphone Jack",
         "RINPUT1", "Microphone Jack",
         "Microphone Jack", "Mic Bias",
         "Headphone Jack", "LOUT1",
         "Headphone Jack", "ROUT1";

      simple-audio-card,cpu {
         sound-dai = <&i2s>;
      };

      sound_master:simple-audio-card,codec {
         sound-dai = <&codec>;
      };
   };
};

&i2c {
   status = "okay";

   codec: es8388@10 {
      #sound-dai-cells = <0>;
      compatible = "everest,es8328";
      reg = <0x10>;

      clocks = <&clkctrl 20>;
      clock-names = "refclk";
   };
};

&spi0 {
   status = "okay";

   cs-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>,
         <&gpio0 10 GPIO_ACTIVE_HIGH>;
//         <&gpio1 5 GPIO_ACTIVE_HIGH>,
//         <&gpio1 6 GPIO_ACTIVE_HIGH>;

   m25p80@0 {
      #address-cells = <1>;
      #size-cells = <1>;
      compatible = "jedec,spi-nor";
      reg = <0>;
      spi-max-frequency = <10000000>;
      m25p,chunked-io = <32>;

      partition@0 {
         label = "u-boot";
         reg = <0x0 0x30000>;
         read-only;
      };

      partition@30000 {
         label = "u-boot-env";
         reg = <0x30000 0x10000>;
         read-only;
      };

      factory: partition@40000 {
         label = "factory";
         reg = <0x40000 0x10000>;
         read-only;
      };

      partition@50000 {
         label = "firmware";
         reg = <0x50000 0xfb0000>;
      };
   };

   spidev@1 {
      #address-cells = <1>;
      #size-cells = <1>;
      compatible = "rohm,dh2228fv";
      reg = <1>;
      spi-max-frequency = <100000000>;
   };
/*
        spidev@2 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "rohm,dh2228fv";
                reg = <2>;
                spi-max-frequency = <100000000>;
        };

        spidev@3 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "rohm,dh2228fv";
                reg = <3>;
                spi-max-frequency = <100000000>;
        };
*/
};

&sdhci {
       status = "okay";
       mediatek,cd-poll;
};

Return to VoCore2/Lite/Ultimate

Who is online

Users browsing this forum: Google [Bot] and 31 guests