Skip to content

Commit aafd017

Browse files
committed
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/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 8b45e9d + d9b553b commit aafd017

File tree

4 files changed

+70
-70
lines changed

4 files changed

+70
-70
lines changed

arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@
374374
};
375375

376376
&reg_dldo3 {
377-
regulator-min-microvolt = <2800000>;
378-
regulator-max-microvolt = <2800000>;
377+
regulator-min-microvolt = <1800000>;
378+
regulator-max-microvolt = <1800000>;
379379
regulator-name = "vdd-csi";
380380
};
381381

@@ -498,7 +498,8 @@
498498
};
499499

500500
&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>;
502503
usb0_vbus-supply = <&reg_drivevbus>;
503504
usb1_vbus-supply = <&reg_vmain>;
504505
usb2_vbus-supply = <&reg_vmain>;

arch/arm/boot/dts/sun8i-a83t.dtsi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,10 +1006,10 @@
10061006
reg = <0x01c30000 0x104>;
10071007
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
10081008
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>;
10121010
clock-names = "stmmaceth";
1011+
resets = <&ccu RST_BUS_EMAC>;
1012+
reset-names = "stmmaceth";
10131013
status = "disabled";
10141014

10151015
mdio: mdio {

arch/arm/boot/dts/sun8i-r40.dtsi

Lines changed: 62 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,32 @@
181181
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
182182
};
183183

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+
184210
csi0: csi@1c09000 {
185211
compatible = "allwinner,sun8i-r40-csi0",
186212
"allwinner,sun7i-a20-csi0";
@@ -290,6 +316,29 @@
290316
resets = <&ccu RST_BUS_CE>;
291317
};
292318

319+
spi2: spi@1c17000 {
320+
compatible = "allwinner,sun8i-r40-spi",
321+
"allwinner,sun8i-h3-spi";
322+
reg = <0x01c17000 0x1000>;
323+
interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
324+
clocks = <&ccu CLK_BUS_SPI2>, <&ccu CLK_SPI2>;
325+
clock-names = "ahb", "mod";
326+
resets = <&ccu RST_BUS_SPI2>;
327+
status = "disabled";
328+
#address-cells = <1>;
329+
#size-cells = <0>;
330+
};
331+
332+
ahci: sata@1c18000 {
333+
compatible = "allwinner,sun8i-r40-ahci";
334+
reg = <0x01c18000 0x1000>;
335+
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
336+
clocks = <&ccu CLK_BUS_SATA>, <&ccu CLK_SATA>;
337+
resets = <&ccu RST_BUS_SATA>;
338+
reset-names = "ahci";
339+
status = "disabled";
340+
};
341+
293342
ehci1: usb@1c19000 {
294343
compatible = "allwinner,sun8i-r40-ehci", "generic-ehci";
295344
reg = <0x01c19000 0x100>;
@@ -336,6 +385,19 @@
336385
status = "disabled";
337386
};
338387

388+
spi3: spi@1c1f000 {
389+
compatible = "allwinner,sun8i-r40-spi",
390+
"allwinner,sun8i-h3-spi";
391+
reg = <0x01c1f000 0x1000>;
392+
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
393+
clocks = <&ccu CLK_BUS_SPI3>, <&ccu CLK_SPI3>;
394+
clock-names = "ahb", "mod";
395+
resets = <&ccu RST_BUS_SPI3>;
396+
status = "disabled";
397+
#address-cells = <1>;
398+
#size-cells = <0>;
399+
};
400+
339401
ccu: clock@1c20000 {
340402
compatible = "allwinner,sun8i-r40-ccu";
341403
reg = <0x01c20000 0x400>;
@@ -653,69 +715,6 @@
653715
#size-cells = <0>;
654716
};
655717

656-
spi0: spi@1c05000 {
657-
compatible = "allwinner,sun8i-r40-spi",
658-
"allwinner,sun8i-h3-spi";
659-
reg = <0x01c05000 0x1000>;
660-
interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
661-
clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
662-
clock-names = "ahb", "mod";
663-
resets = <&ccu RST_BUS_SPI0>;
664-
status = "disabled";
665-
#address-cells = <1>;
666-
#size-cells = <0>;
667-
};
668-
669-
spi1: spi@1c06000 {
670-
compatible = "allwinner,sun8i-r40-spi",
671-
"allwinner,sun8i-h3-spi";
672-
reg = <0x01c06000 0x1000>;
673-
interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
674-
clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>;
675-
clock-names = "ahb", "mod";
676-
resets = <&ccu RST_BUS_SPI1>;
677-
status = "disabled";
678-
#address-cells = <1>;
679-
#size-cells = <0>;
680-
};
681-
682-
spi2: spi@1c07000 {
683-
compatible = "allwinner,sun8i-r40-spi",
684-
"allwinner,sun8i-h3-spi";
685-
reg = <0x01c07000 0x1000>;
686-
interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
687-
clocks = <&ccu CLK_BUS_SPI2>, <&ccu CLK_SPI2>;
688-
clock-names = "ahb", "mod";
689-
resets = <&ccu RST_BUS_SPI2>;
690-
status = "disabled";
691-
#address-cells = <1>;
692-
#size-cells = <0>;
693-
};
694-
695-
spi3: spi@1c0f000 {
696-
compatible = "allwinner,sun8i-r40-spi",
697-
"allwinner,sun8i-h3-spi";
698-
reg = <0x01c0f000 0x1000>;
699-
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
700-
clocks = <&ccu CLK_BUS_SPI3>, <&ccu CLK_SPI3>;
701-
clock-names = "ahb", "mod";
702-
resets = <&ccu RST_BUS_SPI3>;
703-
status = "disabled";
704-
#address-cells = <1>;
705-
#size-cells = <0>;
706-
};
707-
708-
ahci: sata@1c18000 {
709-
compatible = "allwinner,sun8i-r40-ahci";
710-
reg = <0x01c18000 0x1000>;
711-
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
712-
clocks = <&ccu CLK_BUS_SATA>, <&ccu CLK_SATA>;
713-
resets = <&ccu RST_BUS_SATA>;
714-
reset-names = "ahci";
715-
status = "disabled";
716-
717-
};
718-
719718
gmac: ethernet@1c50000 {
720719
compatible = "allwinner,sun8i-r40-gmac";
721720
syscon = <&ccu>;

drivers/bus/sunxi-rsb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ static int sunxi_rsb_read(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
345345
if (ret)
346346
goto unlock;
347347

348-
*buf = readl(rsb->regs + RSB_DATA);
348+
*buf = readl(rsb->regs + RSB_DATA) & GENMASK(len * 8 - 1, 0);
349349

350350
unlock:
351351
mutex_unlock(&rsb->lock);

0 commit comments

Comments
 (0)