[PATCH 0/7] canaan k210 SoC fixes

2022-02-15 Thread Niklas Cassel
From: Niklas Cassel Hello there, This series improves the support for the canaan k210 SoC. Patch 1 renames a few compatible strings so that the k210 compatible strings are identical to the ones used in Linux. Patch 2 add missing power bus clocks, which is needed if supplying the u-boot device

[PATCH 3/7] k210: dts: fix fpioa node

2022-02-15 Thread Niklas Cassel
rties with "canaan,k210-sysctl-power" to satisfy the Linux kernel requirements. This new property is parsed using the existing function dev_read_phandle_with_args(). Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel --- arch/riscv/dts/k210.dtsi | 3 +-- drivers/pinctrl/pi

[PATCH 7/7] pinctrl: k210: Fix bias-pull-up

2022-02-15 Thread Niklas Cassel
From: Niklas Cassel Using bias-pull-up would actually cause the pin to have its pull-down enabled. Fix this. Original Linux patch by Sean Anderson: https://lore.kernel.org/linux-gpio/20220209182822.640905-1-sean...@gmail.com/ Fixes: 7224d5ccf8e1 ("pinctrl: Add support for Kendryte K210

[PATCH 6/7] pinctrl: k210: Fix loop in k210_pc_get_drive()

2022-02-15 Thread Niklas Cassel
From: Niklas Cassel The loop exited too early so the k210_pc_drive_strength[0] array element was never used. Original Linux patch by Dan Carpenter: https://lore.kernel.org/linux-gpio/20220209180804.GA18385@kili/ Fixes: 7224d5ccf8e1 ("pinctrl: Add support for Kendryte K210 FPIOA") Sig

[PATCH 1/7] k210: use the board vendor name rather than the marketing name

2022-02-15 Thread Niklas Cassel
these changes, the device tree files are more in sync with the Linux kernel DTS and drivers, making uboot device tree usable by the kernel. Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel --- MAINTAINERS | 10 +- arch/riscv/dts/k210-maix-bit.dts

[PATCH 2/7] k210: dts: add missing power bus clocks

2022-02-15 Thread Niklas Cassel
From: Damien Le Moal Linux drivers for many of the K210 peripherals depend on the power bus clock to be specified. Add the missing clocks and their names to avoid problems when booting Linux using u-boot DT. Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel --- arch/riscv/dts/k210

[PATCH 4/7] spi: dw: Force set K210 fifo length to 31

2022-02-15 Thread Niklas Cassel
fifo_len to 31. Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel --- drivers/spi/designware_spi.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c index 9200efced9..f9b19a5ea4 100644 --- a

[PATCH 5/7] spi: dw: Actually mask interrupts

2022-02-15 Thread Niklas Cassel
allows us to successfully boot Linux, even after resetting the board. Fixes: 5bef6fd79f94 ("spi: Add designware master SPI DM driver used on SoCFPGA") Signed-off-by: Sean Anderson [Niklas: rewrite commit message] Signed-off-by: Niklas Cassel --- drivers/spi/designware_spi.c | 2 +- 1 fi

[PATCH] spi: dw: Fix broken dw_spi_mem_ops()

2022-02-08 Thread Niklas Cassel
From: Niklas Cassel The driver is currently using sizeof(op->cmd.opcode) in the op_len calculation. Commit d15de623013c ("spi: spi-mem: allow specifying a command's extension") changed op->cmd.opcode from one byte to two. Instead, a new struct member op->cmd.nbytes is

k210 spi flash regression

2022-02-07 Thread Niklas Cassel
Hello Pratyush, I upgraded u-boot on my k210 maix bit board, and the SPI flash is no longer detected. I bisected the problem to commit: d15de623013c ("spi: spi-mem: allow specifying a command's extension") Before the commit in question, the following was printed: Loading Environment from SPIFl