On Mon, Nov 14 2022 at 09:16:29 PM +01:00:00, Jernej Škrabec
<jernej.skrabec@xxxxxxxxx> wrote:
> Hi Martin,
>
> Dne ponedeljek, 14. november 2022 ob 18:20:16 CET je Martin Botka
>
> napisal(a):
>> CB1 is Compute Module style board that plugs into Rpi board
style
>>
>> adapter or
>>
>> Manta 3D printer boards (M4P/M8P).
>>
>> The board has:
>> H616 SoC
>> 1GB of RAM
>> AXP313A PMIC
>>
>> And the actual boards that CB1 plugs in are just extension to it
>>
>> with ports
>>
>> and thus are not split in DT.
>>
>> Boards have:
>> 4x (3x for Manta boards) USB and 1 USB OTG.
>> SDcard slot for loading images.
>> Ethernet port wired to the internal PHY.
>> 2x HDMI 2.0.
>> Power and Status LEDs.
>>
>> Currently working:
>> Booting
>> USB
>> UART
>>
>> Signed-off-by: Martin Botka <martin.botka@xxxxxxxxxxxxxx>
>> ---
>> Changes in V2:
>> Add proper board compatible
>> Add regulator prefix for vcc5v
>> Drop okay status from PMIC
>> Drop standby_param
>>
>> arch/arm64/boot/dts/allwinner/Makefile | 1 +
>> .../dts/allwinner/sun50i-h616-biqu-cb1.dts | 186
>>
>> ++++++++++++++++++
>>
>> 2 files changed, 187 insertions(+)
>> create mode 100644
>>
>> arch/arm64/boot/dts/allwinner/sun50i-h616-biqu-cb1.dts
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/Makefile
>> b/arch/arm64/boot/dts/allwinner/Makefile index
>>
>> 6a96494a2e0a..223f1be73541
>>
>> 100644
>> --- a/arch/arm64/boot/dts/allwinner/Makefile
>> +++ b/arch/arm64/boot/dts/allwinner/Makefile
>> @@ -38,5 +38,6 @@ dtb-$(CONFIG_ARCH_SUNXI) +=
sun50i-h6-pine-h64.dtb
>>
>> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64-model-b.dtb
>> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6.dtb
>> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6-mini.dtb
>>
>> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-biqu-cb1.dtb
>>
>> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
>> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
>>
>> diff --git
a/arch/arm64/boot/dts/allwinner/sun50i-h616-biqu-cb1.dts
>> b/arch/arm64/boot/dts/allwinner/sun50i-h616-biqu-cb1.dts new
file
>>
>> mode
>>
>> 100644
>> index 000000000000..297536d7629a
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-biqu-cb1.dts
>> @@ -0,0 +1,186 @@
>> +// SPDX-License-Identifier: (GPL-2.0+ or MIT)
>> +/*
>> + * Copyright (C) 2022 Arm Ltd.
>
> I suppose Arm Ltd. has nothing to do with this board? Put yours
> copyrights
> there.
Correct. Was a left over from Opi Zero 2 with just changed year.
Will
correct in V3 with the rest of the changes
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "sun50i-h616.dtsi"
>> +
>> +#include <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/interrupt-controller/arm-gic.h>
>> +#include <dt-bindings/leds/common.h>
>> +
>> +/ {
>> + model = "BIQU CB1";
>> + compatible = "biqu,cb1", "allwinner,sun50i-h616";
>> +
>> + aliases {
>> + serial0 = &uart0;
>> + };
>> +
>> + chosen {
>> + stdout-path = "serial0:115200n8";
>> + };
>> +
>> + leds {
>> + compatible = "gpio-leds";
>> +
>> + led-0 {
>> + function = LED_FUNCTION_POWER;
>> + color = <LED_COLOR_ID_RED>;
>> + gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /*
>
> PC12 */
>
>> + default-state = "on";
>> + };
>> +
>> + led-1 {
>> + function = LED_FUNCTION_STATUS;
>> + color = <LED_COLOR_ID_GREEN>;
>> + gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /*
>
> PC13 */
>
>> + };
>> + };
>> +
>> + reg_vcc5v: regulator_vcc5v {
>> + /* board wide 5V supply directly from the USB-C socket
>
> */
>
>> + compatible = "regulator-fixed";
>> + regulator-name = "vcc-5v";
>> + regulator-min-microvolt = <5000000>;
>> + regulator-max-microvolt = <5000000>;
>> + regulator-always-on;
>> + };
>> +
>> + reg_usb1_vbus: regulator-usb1-vbus {
>> + compatible = "regulator-fixed";
>> + regulator-name = "usb1-vbus";
>> + regulator-min-microvolt = <5000000>;
>> + regulator-max-microvolt = <5000000>;
>> + vin-supply = <®_vcc5v>;
>> + enable-active-high;
>> + gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
>> + };
>> +};
>> +
>> +&ehci0 {
>> + status = "okay";
>> +};
>> +
>> +&ehci1 {
>> + status = "okay";
>> +};
>> +
>> +&ehci2 {
>> + status = "okay";
>> +};
>> +
>> +&ehci3 {
>> + status = "okay";
>> +};
>> +
>> +&mmc0 {
>> + vmmc-supply = <®_dldo1>;
>> + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
>> + no-1-8-v;
>> + bus-width = <4>;
>> + status = "disabled";
>> +};
>> +
>> +&ohci0 {
>> + status = "okay";
>> +};
>> +
>> +&ohci1 {
>> + status = "okay";
>> +};
>> +
>> +&ohci2 {
>> + status = "okay";
>> +};
>> +
>> +&ohci3 {
>> + status = "okay";
>> +};
>> +
>> +&r_i2c {
>> + status = "okay";
>> +
>> + axp1530: pmic@36 {
>> + compatible = "x-powers,axp1530";
>
> I see that you send driver for this PMIC separately. Next time
please
> mention
> that this series depends on another, otherwise checks will fail.
Ping
> us here
> once PMIC driver is merged to unblock this.
>
> Anyway, RSB is prefered. Can you switch to it?
RSB does initialize but as soon as I try to give it the PMIC via
RSB it
doesnt really wanna work so thats a no sadly.