Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'sunxi-fixes-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes

Allwinner Fixes for v5.6

A pretty normal set of fixes for v5.6:

- Fix reversed macros used for A83T EMAC clock and reset
- Fix camera regulator voltage and USB OTG for TBS-A711
- 16-bit / 8-bit mixed read fix for our RSB driver
- Fix SPI controller base address for R40
- Reorder device nodes based on base address for R40

* tag 'sunxi-fixes-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
ARM: dts: sun8i: r40: Move SPI device nodes based on address order
ARM: dts: sun8i: r40: Fix register base address for SPI2 and SPI3
ARM: dts: sun8i: r40: Move AHCI device node based on address order
bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads
ARM: dts: sun8i-a83t-tbs-a711: Fix USB OTG mode detection
ARM: dts: sun8i-a83t-tbs-a711: HM5065 doesn't like such a high voltage
ARM: dts: sun8i: a83t: Fix incorrect clk and reset macros for EMAC device

Link: https://lore.kernel.org/r/20200313055233.GA19649@wens.csie.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+70 -70
+4 -3
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
··· 374 374 }; 375 375 376 376 &reg_dldo3 { 377 - regulator-min-microvolt = <2800000>; 378 - regulator-max-microvolt = <2800000>; 377 + regulator-min-microvolt = <1800000>; 378 + regulator-max-microvolt = <1800000>; 379 379 regulator-name = "vdd-csi"; 380 380 }; 381 381 ··· 498 498 }; 499 499 500 500 &usbphy { 501 - usb0_id_det-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ 501 + usb0_id_det-gpios = <&pio 7 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH11 */ 502 + usb0_vbus_power-supply = <&usb_power_supply>; 502 503 usb0_vbus-supply = <&reg_drivevbus>; 503 504 usb1_vbus-supply = <&reg_vmain>; 504 505 usb2_vbus-supply = <&reg_vmain>;
+3 -3
arch/arm/boot/dts/sun8i-a83t.dtsi
··· 1006 1006 reg = <0x01c30000 0x104>; 1007 1007 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 1008 1008 interrupt-names = "macirq"; 1009 - resets = <&ccu CLK_BUS_EMAC>; 1010 - reset-names = "stmmaceth"; 1011 - clocks = <&ccu RST_BUS_EMAC>; 1009 + clocks = <&ccu CLK_BUS_EMAC>; 1012 1010 clock-names = "stmmaceth"; 1011 + resets = <&ccu RST_BUS_EMAC>; 1012 + reset-names = "stmmaceth"; 1013 1013 status = "disabled"; 1014 1014 1015 1015 mdio: mdio {
+62 -63
arch/arm/boot/dts/sun8i-r40.dtsi
··· 181 181 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 182 182 }; 183 183 184 + spi0: spi@1c05000 { 185 + compatible = "allwinner,sun8i-r40-spi", 186 + "allwinner,sun8i-h3-spi"; 187 + reg = <0x01c05000 0x1000>; 188 + interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 189 + clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>; 190 + clock-names = "ahb", "mod"; 191 + resets = <&ccu RST_BUS_SPI0>; 192 + status = "disabled"; 193 + #address-cells = <1>; 194 + #size-cells = <0>; 195 + }; 196 + 197 + spi1: spi@1c06000 { 198 + compatible = "allwinner,sun8i-r40-spi", 199 + "allwinner,sun8i-h3-spi"; 200 + reg = <0x01c06000 0x1000>; 201 + interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; 202 + clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>; 203 + clock-names = "ahb", "mod"; 204 + resets = <&ccu RST_BUS_SPI1>; 205 + status = "disabled"; 206 + #address-cells = <1>; 207 + #size-cells = <0>; 208 + }; 209 + 184 210 csi0: csi@1c09000 { 185 211 compatible = "allwinner,sun8i-r40-csi0", 186 212 "allwinner,sun7i-a20-csi0"; ··· 316 290 resets = <&ccu RST_BUS_CE>; 317 291 }; 318 292 293 + spi2: spi@1c17000 { 294 + compatible = "allwinner,sun8i-r40-spi", 295 + "allwinner,sun8i-h3-spi"; 296 + reg = <0x01c17000 0x1000>; 297 + interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; 298 + clocks = <&ccu CLK_BUS_SPI2>, <&ccu CLK_SPI2>; 299 + clock-names = "ahb", "mod"; 300 + resets = <&ccu RST_BUS_SPI2>; 301 + status = "disabled"; 302 + #address-cells = <1>; 303 + #size-cells = <0>; 304 + }; 305 + 306 + ahci: sata@1c18000 { 307 + compatible = "allwinner,sun8i-r40-ahci"; 308 + reg = <0x01c18000 0x1000>; 309 + interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; 310 + clocks = <&ccu CLK_BUS_SATA>, <&ccu CLK_SATA>; 311 + resets = <&ccu RST_BUS_SATA>; 312 + reset-names = "ahci"; 313 + status = "disabled"; 314 + }; 315 + 319 316 ehci1: usb@1c19000 { 320 317 compatible = "allwinner,sun8i-r40-ehci", "generic-ehci"; 321 318 reg = <0x01c19000 0x100>; ··· 383 334 phys = <&usbphy 2>; 384 335 phy-names = "usb"; 385 336 status = "disabled"; 337 + }; 338 + 339 + spi3: spi@1c1f000 { 340 + compatible = "allwinner,sun8i-r40-spi", 341 + "allwinner,sun8i-h3-spi"; 342 + reg = <0x01c1f000 0x1000>; 343 + interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; 344 + clocks = <&ccu CLK_BUS_SPI3>, <&ccu CLK_SPI3>; 345 + clock-names = "ahb", "mod"; 346 + resets = <&ccu RST_BUS_SPI3>; 347 + status = "disabled"; 348 + #address-cells = <1>; 349 + #size-cells = <0>; 386 350 }; 387 351 388 352 ccu: clock@1c20000 { ··· 713 651 status = "disabled"; 714 652 #address-cells = <1>; 715 653 #size-cells = <0>; 716 - }; 717 - 718 - spi0: spi@1c05000 { 719 - compatible = "allwinner,sun8i-r40-spi", 720 - "allwinner,sun8i-h3-spi"; 721 - reg = <0x01c05000 0x1000>; 722 - interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 723 - clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>; 724 - clock-names = "ahb", "mod"; 725 - resets = <&ccu RST_BUS_SPI0>; 726 - status = "disabled"; 727 - #address-cells = <1>; 728 - #size-cells = <0>; 729 - }; 730 - 731 - spi1: spi@1c06000 { 732 - compatible = "allwinner,sun8i-r40-spi", 733 - "allwinner,sun8i-h3-spi"; 734 - reg = <0x01c06000 0x1000>; 735 - interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; 736 - clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>; 737 - clock-names = "ahb", "mod"; 738 - resets = <&ccu RST_BUS_SPI1>; 739 - status = "disabled"; 740 - #address-cells = <1>; 741 - #size-cells = <0>; 742 - }; 743 - 744 - spi2: spi@1c07000 { 745 - compatible = "allwinner,sun8i-r40-spi", 746 - "allwinner,sun8i-h3-spi"; 747 - reg = <0x01c07000 0x1000>; 748 - interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; 749 - clocks = <&ccu CLK_BUS_SPI2>, <&ccu CLK_SPI2>; 750 - clock-names = "ahb", "mod"; 751 - resets = <&ccu RST_BUS_SPI2>; 752 - status = "disabled"; 753 - #address-cells = <1>; 754 - #size-cells = <0>; 755 - }; 756 - 757 - spi3: spi@1c0f000 { 758 - compatible = "allwinner,sun8i-r40-spi", 759 - "allwinner,sun8i-h3-spi"; 760 - reg = <0x01c0f000 0x1000>; 761 - interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; 762 - clocks = <&ccu CLK_BUS_SPI3>, <&ccu CLK_SPI3>; 763 - clock-names = "ahb", "mod"; 764 - resets = <&ccu RST_BUS_SPI3>; 765 - status = "disabled"; 766 - #address-cells = <1>; 767 - #size-cells = <0>; 768 - }; 769 - 770 - ahci: sata@1c18000 { 771 - compatible = "allwinner,sun8i-r40-ahci"; 772 - reg = <0x01c18000 0x1000>; 773 - interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; 774 - clocks = <&ccu CLK_BUS_SATA>, <&ccu CLK_SATA>; 775 - resets = <&ccu RST_BUS_SATA>; 776 - reset-names = "ahci"; 777 - status = "disabled"; 778 - 779 654 }; 780 655 781 656 gmac: ethernet@1c50000 {
+1 -1
drivers/bus/sunxi-rsb.c
··· 345 345 if (ret) 346 346 goto unlock; 347 347 348 - *buf = readl(rsb->regs + RSB_DATA); 348 + *buf = readl(rsb->regs + RSB_DATA) & GENMASK(len * 8 - 1, 0); 349 349 350 350 unlock: 351 351 mutex_unlock(&rsb->lock);